| | |
| | | getList, |
| | | getEquipmentList, |
| | | getDayWarnList, |
| | | getEquipment, |
| | | getEquipments, |
| | | } from "@/api/supervisory/data"; |
| | | |
| | | export default { |
| | |
| | | var that = this; |
| | | getList().then((res) => { |
| | | res.data.data.forEach((item) => { |
| | | if (item.waringType == "紧急求救") { |
| | | if (item.waringType == "一键求助") { |
| | | that.tableData.push(item); |
| | | } |
| | | }); |
| | |
| | | that.drawPillar(res.data.data); |
| | | }); |
| | | |
| | | getEquipment().then((res) => { |
| | | getEquipments().then((res) => { |
| | | console.log(res.data.data, 123); |
| | | |
| | | var total = 0; |
| | |
| | | total += res.data.data.zx; |
| | | total += res.data.data.dx; |
| | | total += res.data.data.gz; |
| | | total += res.data.data.yj; |
| | | |
| | | console.log(total, 45); |
| | | |
| | |
| | | itemStyle: { color: "#29c194" }, |
| | | }, |
| | | { |
| | | value: that.yj, |
| | | legendname: "预警", |
| | | name: "预警", |
| | | itemStyle: { color: "#F34A4A" }, |
| | | }, |
| | | { |
| | | value: that.gz, |
| | | legendname: "故障", |
| | | name: "故障", |
| | |
| | | ]; |
| | | |
| | | var sum = 0; |
| | | |
| | | m2R2Data.forEach((item) => { |
| | | sum += item.value; |
| | | }); |
| | | |
| | | // sum +=that.yj; |
| | | |
| | | var option = { |
| | | title: [ |
| | |
| | | ], |
| | | tooltip: { |
| | | trigger: "item", |
| | | formatter: function (parms) { |
| | | var str = |
| | | parms.marker + |
| | | "" + |
| | | parms.data.legendname + |
| | | "</br>" + |
| | | "数量:" + |
| | | parms.data.value + |
| | | "</br>" + |
| | | "占比:" + |
| | | parms.percent + |
| | | "%"; |
| | | return str; |
| | | }, |
| | | // formatter: function (parms) { |
| | | // var str = |
| | | // parms.marker + |
| | | // "" + |
| | | // parms.data.legendname + |
| | | // "</br>" + |
| | | // "数量:" + |
| | | // parms.data.value + |
| | | // "</br>" + |
| | | // "占比:" + |
| | | // parms.percent + |
| | | // "%"; |
| | | // return str; |
| | | // }, |
| | | formatter: "{b}: {c} ({d}%)", |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | } |
| | | .pie-total-container { |
| | | display: flex; |
| | | border: 1px solid transparent; |
| | | padding: 20px 0; |
| | | } |
| | | .info-active { |