{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\views\\SysIndex.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\views\\SysIndex.vue","mtime":1681441192473},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.array.sort\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport req from '@/api/biz/healthData.js';\nimport health from '@/api/biz/statePrediction.js';\nimport { Chart } from '@antv/g2';\nimport { Liquid } from '@antv/g2plot';\nimport utils from '@/hotent-ui-util';\nimport DvBorderBox5 from '@/components/border/DvBorderBox5';\nimport AlarmCodeExplain from '@/views/AlarmCodeExplain.vue';\nexport default {\n components: {\n DvBorderBox5: DvBorderBox5,\n AlarmCodeExplain: AlarmCodeExplain\n },\n data: function data() {\n return {\n healthScoreTitle: '健康评分机组排行',\n warnDataTitle: '预警数量机组排行',\n partWarnDataStat: '预警数量部件排行',\n modelWarnDataStat: '预警数量模型排行',\n healthScoreList: [],\n //健康评分机组排行列表\n warnDataList: [],\n //预警数量机组排行列表\n partWarnDataStatList: [],\n //预警数量部件排行列表\n modelWarnDataStatList: [],\n //预警数量模型排行列表\n bodyStyle2: {\n width: '100%',\n boxSizing: 'border-box',\n padding: '10px',\n height: '100%',\n display: 'flex',\n flexWrap: 'wrap'\n },\n bodyStyle: {\n padding: '16px 10px',\n height: 'calc(100% - 60px)'\n },\n sectionData: {\n emsFactoryWinspdAvg: {\n bgType: 'blue',\n icon: 'icon-fengsu1',\n val: 0,\n unit: 'm/s',\n name: '风场平均风速'\n },\n factoryPowAct: {\n bgType: 'blue',\n icon: 'icon-yougonggongshuai',\n val: 0,\n unit: 'kW',\n name: '风场总有功'\n },\n factoryDayEnergy: {\n bgType: 'blue',\n icon: 'icon-rifadianliang',\n val: 0,\n unit: 'MW',\n name: '全场当日发电量'\n },\n totalEnergy: {\n bgType: 'blue',\n icon: 'icon-lajifadian',\n val: 0,\n unit: 'MW',\n name: '全场累计发电量'\n },\n setsNo: {\n bgType: 'blue',\n icon: 'icon-fengdianchang',\n val: 0,\n unit: '台',\n name: '装机台数'\n },\n capacity: {\n bgType: 'blue',\n icon: 'icon-rongliangguanli',\n val: 0,\n unit: 'MW',\n name: '装机容量'\n },\n normal: {\n bgType: 'green',\n icon: 'icon-fengdian',\n val: 0,\n unit: '台',\n name: '正常发电台数'\n },\n emsFaultCount: {\n bgType: 'red',\n icon: 'icon-fengdian1',\n val: 0,\n unit: '台',\n name: '故障台数'\n },\n healthScore: {\n bgType: 'blue',\n icon: 'icon-jiankangxian',\n val: 0,\n unit: '分',\n name: '健康评分'\n },\n unplannedDowntime: {\n bgType: 'gray',\n icon: 'icon-fengdian1',\n val: 0,\n unit: '小时',\n name: '减少非计划停机'\n }\n },\n chart1: null,\n // 风场总有功 (MW)/风场平均风速 (m/s)\n chart2: null,\n // 全场月发电量\n chart3: null,\n // 年累计发电量/年计划发电量 (MW)\n chart4: null,\n // 机组故障次数\n monthDataReady: false,\n monthEnergyData: [{\n month: '1月',\n energy: null\n }, {\n month: '2月',\n energy: null\n }, {\n month: '3月',\n energy: null\n }, {\n month: '4月',\n energy: null\n }, {\n month: '5月',\n energy: null\n }, {\n month: '6月',\n energy: null\n }, {\n month: '7月',\n energy: null\n }, {\n month: '8月',\n energy: null\n }, {\n month: '9月',\n energy: null\n }, {\n month: '10月',\n energy: null\n }, {\n month: '11月',\n energy: null\n }, {\n month: '12月',\n energy: null\n }],\n //全场月发电量\n breakData: [],\n // 机组故障次数\n chartData: [],\n // 风场总有功 (MW)/风场平均风速 (m/s)\n tableData: [// 年累计发电量/年计划发电量 (MW)\n // {month: '2021-01-01', cumulative: 0},\n // {month: new Date().getTime(), cumulative: null},\n // {month: '2021-12-31', cumulative: null},\n {\n type: '年计划发电量',\n cumulative: null\n }, {\n type: '年累计发电量',\n cumulative: null\n }],\n speedData1: [],\n speedData2: [],\n currentMsg: 'scada',\n tableHeight: 300,\n scadaData: [],\n cmsData: [],\n healthData: [],\n headerData: [{\n name: 'SCADA报警',\n key: 'scada',\n type: 'getFaultData'\n }, {\n name: '全息报警',\n key: 'cms',\n type: 'getFaultData'\n }, {\n name: '健康预警',\n key: 'health',\n type: 'health'\n }, {\n name: '运维排程',\n key: 'devops',\n type: 'devops'\n }],\n scadaColumns: [{\n label: '机组',\n prop: 'msgFanName',\n minWidth: 50,\n align: 'center'\n }, {\n label: '故障发生时间',\n prop: 'msgStartTime',\n minWidth: 76,\n align: 'center'\n }, {\n label: '故障代码',\n prop: 'msgCode',\n minWidth: 80,\n align: 'center',\n renderColumn: true\n }, {\n label: '故障名称',\n prop: 'msgContent',\n minWidth: 140,\n align: 'left'\n }],\n cmsColumns: [{\n label: '机组',\n prop: 'msgFanName',\n minWidth: 56\n }, {\n label: '报警时间',\n prop: 'msgStartTime',\n minWidth: 76\n }, {\n label: '设备名称',\n prop: 'msgContent'\n }, {\n label: '预警状态',\n prop: 'msgEqu'\n }],\n healthColumns: [{\n label: '机组',\n prop: 'fanName',\n minWidth: 56,\n align: 'center'\n }, {\n label: '预警时间',\n prop: 'dataTime',\n minWidth: 100,\n align: 'center'\n }, {\n label: '关联部位',\n prop: 'partName',\n minWidth: 50,\n align: 'center'\n }, {\n label: '预警信息',\n prop: 'alarmInfo',\n minWidth: 120,\n align: 'left'\n }, {\n label: '预警等级',\n prop: 'resultStatus',\n minWidth: 50,\n align: 'center'\n }],\n devopsColumns: [{\n label: '机组',\n prop: 'fan_no',\n minWidth: 56,\n align: 'center'\n }, {\n label: '任务时间',\n prop: 'task_time',\n minWidth: 76,\n align: 'center'\n }, {\n label: '任务内容',\n prop: 'task_content',\n minWidth: 76,\n align: 'center'\n }, {\n label: '计划状态',\n prop: 'planStatus',\n align: 'center'\n }],\n healthScore: '',\n //健康评分\n unplannedDowntime: '',\n // 减少非计划停机\n devopsData: [],\n entryBodyStyle: {\n padding: '0',\n height: '100%'\n },\n sysList: [],\n yearPlanElectric: null,\n fanBreakData: null,\n accecptData: false,\n monthLength: 0,\n schedulingDateTime: ''\n };\n },\n created: function created() {},\n mounted: function mounted() {\n var _this = this;\n\n this.getViewDateTime(); // 获取需要绑定的table\n\n this.dom = this.$refs.table.bodyWrapper;\n this.dom.addEventListener('scroll', function () {\n // 监听表格滚动距离\n var scrollTop = _this.dom.scrollTop; // console.log(scrollTop);\n });\n this.getHealthOverview(); //获取健康监测总览\n\n this.accecptData = true;\n document.addEventListener('visibilitychange', this.windowVisiable);\n this.initWindFactory();\n this.initMonthEnergy(); // this.initCrewList(this.initChart4)\n\n this.getYearPlanElectric(this.initChart3); //年累计发电量/年计划发电量 (MW)\n\n this.initChart1(); // 风场总有功 (MW)/风场平均风速 (m/s)\n // this.initChart2() // 全场月发电量\n // this.initChart4() // 机组故障次数\n\n this.getSysList();\n this.calcTableHeight();\n this.getFaultData('scada'); // this.getRealWarn('health')\n\n this.$bus.$on('SCADAMsg', function (data) {\n if (_this.accecptData) {\n _this.changeData(data);\n }\n });\n this.$bus.$on('SCADAAlram', function (data) {\n if (_this.accecptData) {\n _this.getFaultData('scada');\n }\n });\n },\n beforeDestroy: function beforeDestroy() {\n // 切换页面 不再接收数据\n this.accecptData = false;\n this.monthDataReady = false;\n document.removeEventListener('visibilitychange', this.windowVisiable);\n },\n methods: {\n handleMsgCode: function handleMsgCode(errorCode) {\n this.$refs.AlarmCodeExplain.open(errorCode);\n },\n // 获取健康监测总览\n getHealthOverview: function getHealthOverview() {\n var _this2 = this;\n\n this.heallthStatusList = [];\n this.healthStatusCount = {};\n req.getHealthOverview().then(function (res) {\n // console.log(res, '健康监测总览')\n if (res.state && res.value) {\n _this2.healthScoreList = res.value.fanHealthStatusScoreList.sort(function (a, b) {\n return a.statValue - b.statValue;\n });\n _this2.warnDataList = res.value.fanWarnDataStatList.sort(function (a, b) {\n return b.fanWarnNum - a.fanWarnNum;\n });\n _this2.modelWarnDataStatList = res.value.modelWarnDataStatList.sort(function (a, b) {\n return b.modelWarnNum - a.modelWarnNum;\n });\n _this2.partWarnDataStatList = res.value.partWarnDataStatList.sort(function (a, b) {\n return b.partWarnNum - a.partWarnNum;\n });\n _this2.sectionData.healthScore.val = res.value.healthScore;\n _this2.sectionData.unplannedDowntime.val = res.value.unplannedDowntime;\n }\n });\n },\n changeItem: function changeItem(type) {\n this[\"\".concat(type, \"Key\")] = this[\"\".concat(type, \"Key\")] == 1 ? 2 : 1;\n this[\"\".concat(type, \"Title\")] = this[\"\".concat(type, \"Title\").concat(this[\"\".concat(type, \"Key\")])];\n this[\"\".concat(type, \"List\")] = this[\"\".concat(type, \"List\").concat(this[\"\".concat(type, \"Key\")])];\n },\n renderHeader: function renderHeader(h, _ref) {\n var column = _ref.column;\n\n if (column.label.length && column.label.length >= 6) {\n column.minWidth = 140;\n }\n\n return h('div', {\n class: 'table-header'\n }, [column.label]);\n },\n windowVisiable: function windowVisiable(e) {\n if (e.target.visibilityState == 'visible') {\n // console.log('回到当前tab标签')\n this.reloadChart();\n } else {// console.log('离开当前tab标签')\n }\n },\n reloadChart: function reloadChart() {\n this.chartData = [];\n this.chart1.changeData(this.chartData);\n },\n changeData: function changeData(data) {\n // console.log(data,'data')\n // 平均风速\n this.sectionData.emsFactoryWinspdAvg.val = data.wind.emsFactoryWinspdAvg ? data.wind.emsFactoryWinspdAvg.val : null; // 风场总有功\n\n this.sectionData.factoryPowAct.val = data.wind.factoryPowAct ? data.wind.factoryPowAct.val : null; // 全场当日发电量\n\n this.sectionData.factoryDayEnergy.val = data.wind.factoryDayEnergy ? data.wind.factoryDayEnergy.val : null; // 故障台数\n\n this.sectionData.emsFaultCount.val = data.wind.emsFaultCount ? data.wind.emsFaultCount.val : null;\n var totalEnergy = 0; // 大指标中的累计发电量\n\n var totalEnergyYear = 0; // chart中的累计发电量\n\n var totalEnergyMonth = 0; // 当月发电量\n\n var normal = 0;\n var changeFaultData = null;\n\n for (var crew in data.fan) {\n totalEnergy += data.fan[crew].totalEnergy ? data.fan[crew].totalEnergy.val : 0;\n totalEnergyYear += data.fan[crew].totalEnergy_year ? data.fan[crew].totalEnergy_year.val : 0;\n totalEnergyMonth += data.fan[crew].totalEnergy_month ? data.fan[crew].totalEnergy_month.val : 0;\n\n if (data.fan[crew].workModeSrc && data.fan[crew].workModeSrc.val === 32) {\n normal++;\n }\n }\n\n if (this.monthDataReady && totalEnergyMonth) {\n this.monthEnergyData[this.monthLength] = {\n month: this.monthLength + 1 + '月',\n energy: Math.round(totalEnergyMonth * 100) / 100 // 保留小数点后两位\n\n };\n\n if (this.chart2) {\n this.chart2.changeData(this.monthEnergyData);\n }\n }\n\n this.sectionData.totalEnergy.val = Math.round(totalEnergy * 100) / 100; // 保留小数点后两位 // 累计发电量\n\n this.sectionData.normal.val = normal; // 正常台数\n\n this.tableData[1].cumulative = Math.round(totalEnergyYear * 100) / 100; // 保留小数点后两位\n\n if (this.chart3 && this.tableData[1].cumulative) {\n var percent;\n\n if (!this.tableData[1].cumulative && !this.tableData[1].cumulative) {\n percent = 0;\n } else if (!this.tableData[0].cumulative) {\n percent = this.tableData[1].cumulative / this.tableData[1].cumulative;\n } else {\n percent = this.tableData[1].cumulative / this.tableData[0].cumulative;\n }\n\n this.chart3.changeData(percent);\n } // 总有功/风速chart\n\n\n var newData = {\n date: parseInt(data.time),\n powAct: data.wind.factoryPowAct ? data.wind.factoryPowAct.val : null,\n winSpd: data.wind.emsFactoryWinspdAvg ? data.wind.emsFactoryWinspdAvg.val : null\n }; // 任意一个有就更新,两个都没有就不更新\n\n if (data.wind.factoryPowAct || data.wind.emsFactoryWinspdAvg) {\n this.formatData(newData);\n }\n },\n initMonthEnergy: function initMonthEnergy() {\n var _this3 = this;\n\n var data = this.qs.stringify({\n year: ''\n });\n var param = {\n url: '${cssc}/biz/scada/electricMonth/v1/queryByYear',\n data: data,\n method: 'post',\n headers: {\n 'Content-type': 'application/x-www-form-urlencoded'\n }\n };\n this.$http.request(param).then(function (res) {\n if (res && res.data && res.status == 200) {\n var resData = res.data;\n\n if (resData && resData.length) {\n var date = new Date().getDate();\n\n if (date !== 1) {\n resData.pop();\n }\n\n _this3.monthLength = resData.length;\n\n if (resData.length) {\n resData.forEach(function (item) {\n _this3.monthEnergyData[item.month - 1].month = item.month + '月';\n _this3.monthEnergyData[item.month - 1].energy = item.electric;\n });\n }\n\n _this3.monthDataReady = true;\n\n if (_this3.chart2) {\n _this3.chart2.changeData(_this3.monthEnergyData);\n }\n }\n }\n });\n },\n getYearPlanElectric: function getYearPlanElectric(cb) {\n var _this4 = this;\n\n var data = this.qs.stringify({\n year: ''\n });\n var param = {\n url: '${cssc}/biz/scada/planElectric/v1/queryByYear',\n data: data,\n method: 'post',\n headers: {\n 'Content-type': 'application/x-www-form-urlencoded'\n }\n };\n this.$http.request(param).then(function (res) {\n if (res && res.data && res.status == 200) {\n for (var key in res.data) {\n _this4.yearPlanElectric = res.data[key];\n _this4.tableData[0].cumulative = _this4.yearPlanElectric;\n }\n\n _this4.$nextTick(function () {\n cb();\n });\n }\n });\n },\n // 查询消息\n getFaultData: function getFaultData(sys) {\n var _this5 = this;\n\n var data = null;\n\n if (sys) {\n data = {\n pageBean: {\n page: 1,\n pageSize: 300,\n showTotal: true\n },\n querys: [{\n group: 'filter',\n operation: 'EQUAL',\n property: 'msgSys',\n relation: 'AND',\n value: sys\n }, {\n group: 'filter',\n operation: 'EQUAL',\n property: 'msgType',\n relation: 'AND',\n value: 'alarm'\n }],\n sorter: [{\n direction: 'DESC',\n property: 'msgStartTime'\n }]\n };\n } else {\n data = {\n pageBean: {\n page: 1,\n pageSize: 300,\n showTotal: true\n },\n querys: [{\n group: 'filter',\n operation: 'EQUAL',\n property: 'msgSys',\n relation: 'AND',\n value: \"cms\"\n }]\n };\n }\n\n this.$http.post('${cssc}/biz/base/faultMessage/v1/queryPage', data).then(function (res) {\n if (res && res.data && res.data.rows) {\n _this5.scadaData = res.data.rows;\n _this5.dom.scrollTop = 0; // 表格切换滚动回到顶部\n }\n });\n },\n calcTableHeight: function calcTableHeight() {\n var _this6 = this;\n\n this.$nextTick(function () {\n _this6.tableHeight = _this6.$refs.tableCon.clientHeight;\n });\n },\n changeMsg: function changeMsg(key, type) {\n if (this.currentMsg !== key) {\n this.currentMsg = key;\n\n if (type == 'getFaultData') {\n this.getFaultData(key);\n } else if (type == 'health') {\n this.getRealWarn();\n } else if (type == 'devops') {\n this.getViewData();\n }\n }\n },\n getViewDateTime: function getViewDateTime() {\n var _this7 = this;\n\n var query = {\n url: \"/scheduling-manager/api/optimization/latest-date\",\n method: 'get'\n };\n this.$http.request(query).then(function (res) {\n if (res && res.status == 200 && res.data) {\n _this7.schedulingDateTime = res.data.data;\n }\n });\n },\n // 运维排程\n getViewData: function getViewData() {\n var _this8 = this;\n\n var query = {\n url: \"/scheduling-manager/api/optimization/viewdata?date=\".concat(this.schedulingDateTime),\n method: 'get'\n };\n this.$http.request(query).then(function (res) {\n // console.log(res, 'res')\n if (res && res.status == 200 && res.data) {\n var tempData = res.data.data.schedulingTask;\n\n if (tempData.length) {\n _this8.devopsData = tempData.map(function (item) {\n item.task_time = _this8.schedulingDateTime;\n item.planStatus = item.task_status == 1 ? '已排程' : '未排程';\n return item;\n });\n } else {\n _this8.devopsData = [];\n }\n }\n });\n },\n // 获取健康预警详情\n getRealWarn: function getRealWarn() {\n var _this9 = this;\n\n var data = {\n pageBean: {\n page: 1,\n pageSize: 300,\n showTotal: true\n },\n sorter: [{\n direction: 'DESC',\n property: 'collTime'\n }]\n };\n health.getRealWarn(data).then(function (res) {\n // console.log(res, '健康预警详情')\n if (res && res.rows) {\n _this9.healthData = res.rows;\n _this9.dom.scrollTop = 0; //表格切换滚动回到顶部\n }\n });\n },\n getSysList: function getSysList() {\n var _this10 = this;\n\n var parmas = {};\n parmas.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'isShow',\n relation: 'AND',\n value: 1\n }];\n parmas.sorter = [{\n direction: 'ASC',\n property: 'sn'\n }];\n this.$http.post('${cssc}/biz/base/systemInfo/v1/list', parmas).then(function (response) {\n if (response && response.data) {\n _this10.sysList = response.data;\n }\n });\n },\n initWindFactory: function initWindFactory() {\n var _this11 = this;\n\n this.$http.post('${cssc}/biz/base/windFactory/v1/getOne').then(function (resp) {\n if (resp && resp.data) {\n _this11.sectionData.capacity.val = resp.data.capacity;\n _this11.sectionData.setsNo.val = resp.data.setsNo;\n }\n }, function (error) {\n reject(error);\n });\n },\n initCrewList: function initCrewList(cb) {\n var _this12 = this;\n\n var query = {\n sorter: [{\n direction: 'ASC',\n property: 'sn'\n }]\n };\n this.$http.post('${cssc}/biz/base/fanInfo/v1/list', query).then(function (resp) {\n if (resp && resp.data) {\n _this12.breakData = [];\n resp.data.forEach(function (item, index) {\n _this12.breakData.push({\n fan: item.fanCode,\n value: null\n });\n }); // 画图\n\n _this12.$nextTick(function () {\n cb();\n });\n }\n }, function (error) {\n reject(error);\n });\n },\n formatData: function formatData(newData) {\n this.chartData.push(newData);\n\n if (this.chartData.length > 300) {\n this.chartData.splice(0, 1);\n }\n\n this.chart1.changeData(this.chartData);\n },\n initChart1: function initChart1() {\n this.chart1 = new Chart({\n container: 'container1',\n autoFit: true,\n height: 300\n });\n this.chart1.data(this.chartData);\n this.chart1.scale({\n date: {\n alias: '时间',\n type: 'time',\n formatter: function formatter(value) {\n return utils.formatDate(value, 'time');\n }\n },\n powAct: {\n alias: '总有功 (kW)',\n sync: true,\n // 将 pv 字段数值同 time 字段数值进行同步\n nice: true,\n min: 0\n },\n winSpd: {\n alias: '平均风速(m/s)',\n sync: true,\n // 将 pv 字段数值同 time 字段数值进行同步\n nice: true,\n min: 0,\n max: 20\n }\n });\n this.chart1.axis('date', {\n grid: null,\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n }\n });\n this.chart1.axis('powAct', {\n grid: {\n line: {\n style: {\n stroke: '#414959',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n }\n },\n title: {\n style: {\n fill: '#979ba4'\n }\n },\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n }\n });\n this.chart1.axis('winSpd', {\n grid: null,\n title: {\n style: {\n fill: '#979ba4'\n }\n },\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n }\n });\n this.chart1.legend({\n position: 'top',\n custom: true,\n itemName: {\n style: {\n fill: '#979ba4'\n }\n },\n items: [{\n name: '总有功',\n id: 'powAct',\n value: 'powAct',\n marker: {\n symbol: 'circle',\n style: {\n fill: '#4FAAEB'\n }\n }\n }, {\n name: '平均风速',\n id: 'winSpd',\n value: 'winSpd',\n marker: {\n symbol: 'circle',\n style: {\n fill: '#eb4f4f'\n }\n }\n }]\n });\n this.chart1.tooltip({\n shared: true,\n showCrosshairs: true,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n this.chart1.line().position('date*powAct').color('#4FAAEB');\n this.chart1.line().position('date*winSpd').color('#eb4f4f');\n this.chart1.interaction('active-region');\n this.chart1.render();\n },\n initChart2: function initChart2() {\n this.chart2 = new Chart({\n container: 'container2',\n autoFit: true,\n height: 300,\n padding: [20, 20, 20, 40]\n }); // this.chart3.data(dv.rows)\n\n this.chart2.data(this.monthEnergyData);\n this.chart2.scale({\n month: {\n sync: true,\n nice: true\n },\n energy: {\n alias: '月发电量(MW)',\n sync: true,\n nice: true\n }\n });\n this.chart2.axis('month', {\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n }\n });\n this.chart2.axis('energy', {\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n },\n grid: {\n line: {\n style: {\n stroke: '#414959',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n },\n alignTick: true\n }\n });\n this.chart2.legend(false);\n this.chart2.tooltip({\n shared: false,\n showCrosshairs: false,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n this.chart2.interval().position('month*energy').color('month'); // .label('energy', (energy) => {\n // return {\n // position: 'top',\n // offset: 2,\n // content: (originData) => {\n // return energy\n // },\n // style: {\n // fill: '#fff',\n // },\n // }\n // }) //#1486bb\n // .style({fill: 'l(90) 0:#22C3FE 0.5:#199FD7 1:#044879'})\n\n this.chart2.interaction('element-active');\n this.chart2.render();\n },\n initChart3: function initChart3() {\n document.getElementById('container3').style.background = '#0b2a46';\n var percent;\n\n if (!this.tableData[0].cumulative && !this.tableData[1].cumulative) {\n percent = 0;\n } else if (!this.tableData[0].cumulative) {\n percent = this.tableData[1].cumulative / this.tableData[1].cumulative;\n } else {\n percent = this.tableData[1].cumulative / this.tableData[0].cumulative;\n }\n\n this.chart3 = new Liquid('liquid', {\n percent: percent,\n outline: {\n border: 4,\n distance: 0\n },\n wave: {\n count: 3,\n length: 60\n },\n pattern: {\n type: 'line'\n },\n statistic: {\n content: {\n style: {\n fill: '#fff'\n }\n }\n },\n theme: {\n styleSheet: {\n brandColor: '#10c4b5'\n }\n }\n });\n this.chart3.render();\n },\n // initChart3() {\n // this.chart3 = new Chart({\n // container: 'container3',\n // autoFit: true,\n // height: 300,\n // })\n // // this.chart3.data(dv.rows)\n // this.chart3.data(this.tableData)\n // this.chart3.scale({\n // type: {\n // sync: true,\n // nice: true,\n // },\n // cumulative: {\n // alias: '发电量(MW)',\n // sync: true,\n // nice: true,\n // // maxLimit: parseInt(this.yearPlanElectric * 1.2),\n // },\n // })\n // this.chart3.axis('type', {\n // label: {\n // style: {\n // fill: '#979ba4',\n // },\n // },\n // line: {\n // style: {\n // stroke: '#414959',\n // },\n // },\n // })\n // this.chart3.axis('cumulative', {\n // label: {\n // style: {\n // fill: '#979ba4',\n // },\n // },\n // line: {\n // style: {\n // stroke: '#414959',\n // },\n // },\n // grid: {\n // line: {\n // style: {\n // stroke: '#414959',\n // lineWidth: 1,\n // lineDash: [3, 3],\n // },\n // },\n // alignTick: true,\n // },\n // })\n // this.chart3.tooltip({\n // shared: false,\n // showCrosshairs: false,\n // domStyles: {\n // 'g2-tooltip': {\n // background: 'rgba(0,0,0, 0.8)',\n // color: '#d6e0ec',\n // },\n // },\n // })\n // this.chart3.legend(false)\n // this.chart3\n // .interval()\n // .position('type*cumulative')\n // .color('type')\n // .label('cumulative', {\n // offset: 10,\n // style: {\n // fill: '#979ba4',\n // fontSize: 12,\n // },\n // })\n // this.chart3.interaction('element-highlight')\n // this.chart3.render()\n // },\n // initChart3() {\n // this.chart3 = new Chart({\n // container: 'container3',\n // autoFit: true,\n // height: 300,\n // })\n // // this.chart3.data(dv.rows)\n // this.chart3.data(this.tableData)\n // this.chart3.scale({\n // month: {\n // sync: true,\n // nice: true,\n // },\n // cumulative: {\n // alias: '累计发电量(MW)',\n // sync: true,\n // nice: true,\n // maxLimit: parseInt(this.yearPlanElectric * 1.2),\n // },\n // })\n // this.chart3.axis('month', {\n // label: {\n // style: {\n // fill: '#979ba4',\n // },\n // },\n // line: {\n // style: {\n // stroke: '#414959',\n // },\n // },\n // })\n // this.chart3.axis('cumulative', {\n // label: {\n // style: {\n // fill: '#979ba4',\n // },\n // },\n // line: {\n // style: {\n // stroke: '#414959',\n // },\n // },\n // grid: {\n // line: {\n // style: {\n // stroke: '#414959',\n // lineWidth: 1,\n // lineDash: [3, 3],\n // },\n // },\n // alignTick: true,\n // },\n // })\n // this.chart3.legend({\n // position: 'right',\n // })\n // this.chart3.tooltip({\n // shared: false,\n // showCrosshairs: true,\n // domStyles: {\n // 'g2-tooltip': {\n // background: 'rgba(0,0,0, 0.8)',\n // color: '#d6e0ec',\n // },\n // },\n // })\n // this.chart3.annotation().line({\n // top: true,\n // start: ['min', this.yearPlanElectric],\n // end: ['max', this.yearPlanElectric],\n // style: {\n // stroke: '#ff9c00',\n // lineWidth: 1,\n // lineDash: [5, 5],\n // },\n // text: {\n // position: 'start',\n // style: {\n // fill: '#d6e0ec',\n // fontSize: 12,\n // fontWeight: 'normal',\n // },\n // content: `年计划发电量 ${this.yearPlanElectric} MW`,\n // offsetY: -4,\n // },\n // })\n // this.chart3.line().position('month*cumulative').color('#25b4be')\n // this.chart3.area().position('month*cumulative').color('#0195ff')\n // this.chart3.render()\n // },\n initChart4: function initChart4() {\n this.chart4 = new Chart({\n container: 'container4',\n autoFit: true,\n height: 300\n });\n this.chart4.data(this.breakData);\n this.chart4.scale({\n fan: {\n sync: true,\n nice: true\n },\n value: {\n alias: '故障次数',\n sync: true,\n nice: true\n }\n });\n this.chart4.axis('fan', {\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n }\n });\n this.chart4.axis('value', {\n label: {\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n stroke: '#414959'\n }\n },\n grid: {\n line: {\n style: {\n stroke: '#414959',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n },\n alignTick: true\n }\n });\n this.chart4.legend(false);\n this.chart4.tooltip({\n shared: false,\n showCrosshairs: true,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n this.chart4.interval().position('fan*value').color('#22C3FE').style({\n fill: 'l(90) 0:#22C3FE 0.5:#199FD7 1:#25b4be'\n });\n this.chart4.interaction('element-active');\n this.chart4.render();\n },\n handleOpenSys: function handleOpenSys(url) {\n if (url) {\n window.open(url, '_blank');\n } else {\n this.$message.warning('未配置系统链接');\n } // url\n // window.open(url, '_blank')\n // window.open('http://www.baidu.com', '_blank')\n\n }\n }\n};",null]}