| | |
| | | <div class="row" v-show="isShowPower"> |
| | | <card> |
| | | <big-screen-card title="电源品牌"> |
| | | <pie3d ref="powerChart"></pie3d> |
| | | <!-- <pie3d ref="powerChart"></pie3d>--> |
| | | <power-pie-chart ref="powerChart"></power-pie-chart> |
| | | </big-screen-card> |
| | | </card> |
| | | </div> |
| | |
| | | import LedNum from "@/components/ledNum"; |
| | | import pieChart from "./components/pieCharts"; |
| | | import BarChartAlarm from "./components/batt-chart-alarm"; |
| | | import PowerPieChart from "@/components/myCharts/PieRoseChart.vue"; |
| | | |
| | | import createWs from "@/assets/js/websocket"; |
| | | import { sethoubeiTime, formatSeconds } from "@/assets/js/tools"; |
| | |
| | | pieChart, |
| | | BarChartAlarm, |
| | | bar3d, |
| | | PowerPieChart, |
| | | }, |
| | | methods: { |
| | | alarmTypeChangede(value) { |
| | |
| | | res.sData = arr; |
| | | res.sData.push({ name, value }); |
| | | } |
| | | let total_datas = 0; |
| | | res.sData.map((item) => { |
| | | total_datas += item.value; |
| | | }); |
| | | const option = { |
| | | title: { |
| | | show: true, |
| | | text: "总数", |
| | | subtext: total_datas, |
| | | textStyle: { |
| | | color: "#f2f2f2", |
| | | fontSize: 20, |
| | | align: "center", |
| | | }, |
| | | subtextStyle: { |
| | | fontSize: 18, |
| | | color: ["#ff9d19"], |
| | | }, |
| | | x: "center", |
| | | y: "center", |
| | | }, |
| | | series: [ |
| | | { |
| | | name: "电源品牌", |
| | | data: res.sData, |
| | | }, |
| | | ], |
| | | }; |
| | | |
| | | // 存在电源品牌显示电源品牌图形 |
| | | if (total) { |
| | |
| | | this.$refs.chart_alarm?.resize(); |
| | | this.$refs.alarmPieChart?.resize(); |
| | | }); |
| | | this.$refs.powerChart.setData(res); |
| | | this.$refs.powerChart.setData(option); |
| | | }, |
| | | updateTestData(obj) { |
| | | const { month, year, quarter } = obj.data2; |
| | |
| | | |
| | | // 电源品牌 |
| | | this.$refs.powerChart.getChart().on("click", (params) => { |
| | | let producer = [params.seriesName]; |
| | | if ("其他" == params.seriesName) { |
| | | let producer = [params.name]; |
| | | if ("其他" == params.name) { |
| | | producer = this.otherPwrProd; |
| | | } |
| | | this.goToPowerMagerPage(producer); |