| | |
| | | let acDcSignalData = getAcDcSignalData(); |
| | | let dcSignalData = getDcSignalData(); |
| | | return { |
| | | battFullName: "电池组全称", |
| | | layout: { |
| | | gutter: 16, |
| | | span: 8, |
| | |
| | | }); |
| | | }, |
| | | changeDcData(config) { |
| | | console.log(config); |
| | | // console.log(config); |
| | | let outputSWCount = config.outputSWCount; |
| | | let list = {}; |
| | | for (let i = 1; i <= outputSWCount; i++) { |
| | |
| | | powerDeviceId: powerDeviceId, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res); |
| | | // console.log(res); |
| | | let rs = JSON.parse(res.data.result); |
| | | if (rs.code == 1) { |
| | | this.powerData.info = rs.data; |
| | | this.batt.StationName = this.powerData.info.stationName; |
| | | this.battFullName = |
| | | this.batt.StationName + |
| | | "-" + |
| | | this.powerData.info.powerDeviceName + |
| | | "-" + |
| | | "通信电源"; |
| | | } else { |
| | | this.powerData.info = { |
| | | powerDeviceId: 0, |
| | |
| | | let res = getItemByKey(item, data); |
| | | return res == 0 ? ["未知", 0] : [res.label1, res.value]; |
| | | }); |
| | | option.refs.setOption(opt); |
| | | option?.refs?.setOption(opt); |
| | | }, |
| | | resize() { |
| | | this.$nextTick(() => { |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | battFullName() { |
| | | let batt = this.batt; |
| | | if (batt.StationName && batt.BattGroupName) { |
| | | return batt.StationName + "-" + "通信电源"; |
| | | } |
| | | return "电池组全称"; |
| | | }, |
| | | // battFullName() { |
| | | // let batt = this.batt; |
| | | // console.log("batt", JSON.stringify(batt)); |
| | | // if (batt.StationName) { |
| | | // return batt.StationName + "-" + "通信电源"; |
| | | // } |
| | | // return "电池组全称"; |
| | | // }, |
| | | }, |
| | | mounted() { |
| | | // 获取电源信息 |
| | |
| | | } |
| | | |
| | | // 设置配置项 |
| | | this.setOption(); |
| | | // this.setOption(); |
| | | // 添加窗口自动缩放 |
| | | window.addEventListener("resize", this.resize); |
| | | window.addEventListener("resize", this.resize, 20); |
| | | }, |
| | | destroyed() { |
| | | this.timer.stop(); |
| | | // 添加窗口自动缩放 |
| | | window.removeEventListener("resize", this.resize); |
| | | window.removeEventListener("resize", this.resize, 20); |
| | | }, |
| | | }; |
| | | </script> |