| | |
| | | } |
| | | }); |
| | | }); |
| | | let maxint = Math.ceil(max / 9.5); |
| | | //不让最高的值超过最上面的刻度 |
| | | let maxval = maxint * 10; |
| | | // let maxint = Math.ceil(max / 9.5); |
| | | // let maxint = (max * 1.1); |
| | | // //不让最高的值超过最上面的刻度 |
| | | // let maxval = maxint * 10; |
| | | //让显示的刻度是整数 |
| | | return maxval; |
| | | return max * 1.1; |
| | | } |
| | | |
| | | var max = Math.ceil(calMax([sData]) / 10) * 10; |
| | | var max = Math.ceil(calMax([sData]) * 10) / 10; |
| | | const unit = this.unit; |
| | | return { |
| | | grid: { |
| | |
| | | backgroundColor: "#0C4D77", |
| | | fontSize: 14, |
| | | // lineHeight: 24, |
| | | verticalAlign: 'middle', |
| | | verticalAlign: "middle", |
| | | width: 50, |
| | | color: "#78EEF8", |
| | | // padding: [4, 0, 0, 1], |
| | | padding: [4, 4 ], |
| | | padding: [4, 4], |
| | | borderColor: "#78EEF8", |
| | | borderRadius: 3, |
| | | borderWidth: 1, |
| | |
| | | data: getmydzd, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#52768C' |
| | | color: "#52768C", |
| | | }, |
| | | }, |
| | | z: 0, |
| | |
| | | }); |
| | | }, |
| | | }; |
| | | </script> |
| | | </script> |
| | |
| | | this.curSwitch = |
| | | this.breakerList.filter((v) => v.breakerName == name)[0] || {}; |
| | | }, |
| | | onWSOpen1() { |
| | | this.$nextTick(() => { |
| | | this.sendMessage1(); |
| | | }); |
| | | }, |
| | | sendMessage1() { |
| | | if (!this.isWSOpen1) { |
| | | return false; |
| | | } |
| | | this.SOCKET1.send(''); |
| | | }, |
| | | onWSMessage1(res) { |
| | | let { data, data2, data3 } = JSON.parse(res.data); |
| | | // console.log(data, "=====data", data2); |
| | |
| | | setParam() { |
| | | this.paramVisible = true; |
| | | }, |
| | | onWSOpen1() { |
| | | this.$nextTick(() => { |
| | | this.sendMessage1(); |
| | | }); |
| | | }, |
| | | sendMessage1() { |
| | | if (!this.isWSOpen1) { |
| | | return false; |
| | | } |
| | | this.SOCKET1.send(''); |
| | | }, |
| | | onWSMessage1(res) { |
| | | let { data, data2, data3, data4 } = JSON.parse(res.data); |
| | | // console.log(data, "=====data??", data2); |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | onWSOpen1() { |
| | | this.$nextTick(() => { |
| | | this.sendMessage1(); |
| | | }); |
| | | }, |
| | | sendMessage1() { |
| | | if (!this.isWSOpen1) { |
| | | return false; |
| | | } |
| | | this.SOCKET1.send(''); |
| | | }, |
| | | onWSMessage1(res) { |
| | | let { data, data2, data3, data4 } = JSON.parse(res.data); |
| | | // console.log(data, "=====data??", data2); |
| | |
| | | this.childrenVisible = true; |
| | | } |
| | | }, |
| | | onWSOpen1() { |
| | | this.$nextTick(() => { |
| | | this.sendMessage1(); |
| | | }); |
| | | }, |
| | | sendMessage1() { |
| | | if (!this.isWSOpen1) { |
| | | return false; |
| | | } |
| | | this.SOCKET1.send(''); |
| | | }, |
| | | onWSMessage1(res) { |
| | | let { data, data2, data3, data4 } = JSON.parse(res.data); |
| | | // console.log(data, "=====data", data2); |
| | |
| | | this.$layer.close(loading); |
| | | if (code && data) { |
| | | this.$message.success(msg); |
| | | this.sendMessage1(); |
| | | } else { |
| | | this.$message.error(msg); |
| | | } |
| | |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | onWSOpen1() { |
| | | this.$nextTick(() => { |
| | | this.sendMessage1(); |
| | | }); |
| | | }, |
| | | sendMessage1() { |
| | | if (!this.isWSOpen1) { |
| | | return false; |
| | | } |
| | | this.SOCKET1.send(''); |
| | | }, |
| | | onWSMessage1(res) { |
| | | let { data, data2, data3 } = JSON.parse(res.data); |
| | | // console.log(data, "=====data", data2); |