| | |
| | | const { |
| | | resBadCoeK4, |
| | | resGoodCoeK3, |
| | | vol1d2HighCoeK2, |
| | | vol1d2LowCoeK1, |
| | | vol2HighCoeK2, |
| | | vol2LowCoeK1, |
| | | vol6HighCoeK2, |
| | | vol6LowCoeK1, |
| | | vol12HighCoeK2, |
| | | vol12LowCoeK1, |
| | | } = this.params; |
| | |
| | | BIT |
| | | ); |
| | | |
| | | if (2 == battVol) { |
| | | this.marks.volChart[0].y = toFixed(vol2HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol2LowCoeK1, BIT); |
| | | } else if (12 == battVol) { |
| | | this.marks.volChart[0].y = toFixed(vol12HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol12LowCoeK1, BIT); |
| | | } else { |
| | | this.marks.volChart = []; |
| | | if (!this.marks.volChart.length) { |
| | | this.marks.volChart = [ |
| | | { |
| | | name: "高压告警", |
| | | y: 0, |
| | | type: "high", |
| | | color: "#ff0", |
| | | }, |
| | | { |
| | | name: "低压告警", |
| | | y: 0, |
| | | type: "low", |
| | | color: "#d9001b", |
| | | }, |
| | | ]; |
| | | } |
| | | switch (battVol) { |
| | | case 1.2: |
| | | this.marks.volChart[0].y = toFixed(vol1d2HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol1d2LowCoeK1, BIT); |
| | | break; |
| | | case 2: |
| | | this.marks.volChart[0].y = toFixed(vol2HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol2LowCoeK1, BIT); |
| | | break; |
| | | case 6: |
| | | this.marks.volChart[0].y = toFixed(vol6HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol6LowCoeK1, BIT); |
| | | break; |
| | | case 12: |
| | | this.marks.volChart[0].y = toFixed(vol12HighCoeK2, BIT); |
| | | this.marks.volChart[1].y = toFixed(vol12LowCoeK1, BIT); |
| | | break; |
| | | default: |
| | | this.marks.volChart = []; |
| | | break; |
| | | } |
| | | this.$nextTick(() => { |
| | | this.initChart(); |