longyvfengyun
2023-11-17 3bb931d4eb57fec4a857c9dd0b11f9643c3506e5
src/components/echarts/options/horizontalTechnologyBar.js
@@ -1,27 +1,36 @@
const getHorizontalTechnologyOption = ()=> {
const getHorizontalTechnologyOption = (list)=> {
  let category= [
    {
      name: "告警1",
      value: 2500
      value: 0
    },
    {
      name: "告警2",
      value: 8000
      value: 0
    },
    {
      name: "告警3",
      value: 3000
      value: 0
    },
    {
      name: "告警4",
      value: 3000
      value: 0
    },
    {
      name: "告警5",
      value: 3000
      value: 0
    }
  ]; // 类别
  let total = 10000; // 数据总数
  let total = 10; // 数据总数
  if(list && list.length !== 0) {
    category = list;
    total = 0;
    for(let i=0; i<list.length; i++) {
      total += Number(list[i].value);
    }
  }
  let datas = [];
  category.forEach(value => {
    datas.push(value.value);