| | |
| | | :batt-curr="battCurr" |
| | | :dev-temp="devTemp" |
| | | :type="type" |
| | | :mode="mode" |
| | | :update="update" |
| | | :batt="batt" |
| | | ></fbo4831-diagram> |
| | |
| | | type: Number, |
| | | default: -1, |
| | | }, |
| | | mode: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | return this.state == 1; |
| | | }, |
| | | chargeState() { |
| | | return this.state == 2 && this.mode == 1; |
| | | return this.state == 2; |
| | | }, |
| | | stopState() { |
| | | return this.state == 0; |
| | |
| | | </div> |
| | | <div class="diagram-stc" ref="static"></div> |
| | | <div class="diagram-flush" ref="flush"></div> |
| | | <div class="diagram-box" :style="dcDcStyle" @click="dialog = true" v-if="isLithium"></div> |
| | | <!-- 均衡参数设置 --> |
| | | <el-dialog |
| | | title="DCDC内部数据" |
| | | width="auto" |
| | | :visible.sync="dialog" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false" |
| | | > |
| | | <inside-params |
| | | v-if="dialog" |
| | | :batt="batt" |
| | | visible.sync="dialog" |
| | | ></inside-params> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialog: false, |
| | | dcdcInfo: { |
| | | point: [], |
| | | width: 100, |
| | |
| | | diagram.setOption("groupVol", "text", val + "V"); |
| | | }, |
| | | battCurr(val) { |
| | | diagram.setOption("battCurr", "text", val + "A"); |
| | | diagram.setOption("groupCurr", "text", val + "A"); |
| | | }, |
| | | // devTemp(val) { |
| | | // diagram.setOption("devTemp", "text", "设备温度:" + val + "℃"); |
| | |
| | | // 设置在线,组端,电流,和温度 |
| | | diagram.setOption("onlineVol", "text", this.onlineVol + "V"); |
| | | diagram.setOption("groupVol", "text", this.groupVol + "V"); |
| | | diagram.setOption("battCurr", "text", this.battCurr + "A"); |
| | | diagram.setOption("groupCurr", "text", this.battCurr + "A"); |
| | | // diagram.setOption("devTemp", "text", "设备温度:" + this.devTemp + "℃"); |
| | | |
| | | diagram.setOption( |
| | |
| | | }, |
| | | setDiagramByType() { |
| | | let type = this.type; |
| | | // type = 2; |
| | | switch (type) { |
| | | case -1: |
| | | diagramStates(diagram, "break"); |
| | |
| | | }, |
| | | }, |
| | | computed: { |
| | | dcDcStyle() { |
| | | let dcdcInfo = this.dcdcInfo; |
| | | return { |
| | | top: dcdcInfo.point.y + "px", |
| | | left: dcdcInfo.point.x + "px", |
| | | width: dcdcInfo.width + "px", |
| | | height: dcdcInfo.height + "px", |
| | | }; |
| | | }, |
| | | isLithium() { |
| | | let batt = this.batt; |
| | | return regEquipType(batt.fbsdeviceId, ["lithium", "li9132"]); |
| | | } |
| | | |
| | | }, |
| | | mounted() { |
| | | diagram = circuitDiagram(this.$refs.static, this.$refs.flush); |
| | |
| | | height: imageHt, |
| | | }); |
| | | |
| | | // 线条1 |
| | | let line1 = diagram.line({ |
| | | id: 'line1', |
| | | hide: true, |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | batteryImage.right, |
| | | [batteryImage.right[0] + splitWidth, batteryImage.right[1]] |
| | | batteryImage.top, |
| | | [batteryImage.top[0], batteryImage.top[1] - 200] |
| | | ] |
| | | }); |
| | | |
| | | let line2 = diagram.line({ |
| | | id: 'line2', |
| | | strokeStyle: red, |
| | | lineWidth, |
| | | points: [ |
| | | line1[1], |
| | | [line1[1][0] + 320, line1[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 机器顶上的短竖线长度 |
| | | let len1 = 14; |
| | | let line3 = diagram.line({ |
| | | id: 'line3', |
| | | strokeStyle: red, |
| | | lineWidth, |
| | | points: [ |
| | | line2[1], |
| | | [line2[1][0], line2[1][1] + len1] |
| | | ] |
| | | }); |
| | | |
| | | // 机器顶部线离机器左边的距离 |
| | | let offset1 = 40; |
| | | // 机器往上的偏移 |
| | | const offset2 = 28; |
| | | const scale = 1.5; |
| | | // 监控主机 |
| | | let doubleDcdcImage = diagram.drawImage({ |
| | | id: 'doubleDcdcImage', |
| | | flush: false, |
| | | url: doubleDcdc, |
| | | point: [line1[1][0], line1[1][1] - imageHt / 2], |
| | | width: 1274 * imageHt / 484, |
| | | height: imageHt, |
| | | point: [line3[1][0] - offset1, line3[1][1] - offset2], |
| | | width: 175 * scale, |
| | | height: 293 * scale, |
| | | }); |
| | | |
| | | // 线条2 |
| | | let line2 = diagram.line({ |
| | | id: 'line2', |
| | | hide: true, |
| | | let line4 = diagram.line({ |
| | | id: 'line4', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | lineWidth, |
| | | points: [ |
| | | doubleDcdcImage.right, |
| | | [doubleDcdcImage.right[0] + splitWidth * 3 / 4, doubleDcdcImage.right[1]] |
| | | [doubleDcdcImage.right[0] - offset1, doubleDcdcImage.top[1] + offset2], |
| | | [doubleDcdcImage.right[0] - offset1, doubleDcdcImage.top[1] + offset2 - len1] |
| | | ] |
| | | }); |
| | | |
| | | // 绘制整流电源 |
| | | let line5 = diagram.line({ |
| | | id: 'line5', |
| | | strokeStyle: red, |
| | | lineWidth, |
| | | points: [ |
| | | line4[1], |
| | | [line4[1][0] + 324, line4[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | let line6 = diagram.line({ |
| | | id: 'line6', |
| | | strokeStyle: red, |
| | | lineWidth, |
| | | points: [ |
| | | line5[1], |
| | | [line5[1][0], line5[1][1] + 200] |
| | | ] |
| | | }); |
| | | |
| | | let powerImage = diagram.drawImage({ |
| | | id: 'powerImage', |
| | | flush: false, |
| | | url: power, |
| | | point: [doubleDcdcImage.right[0] + splitWidth * 1.2, doubleDcdcImage.top[1]], |
| | | point: [line6[1][0] - 60, line6[1][1]], |
| | | width: 970 * imageHt / 598, |
| | | height: imageHt, |
| | | }); |
| | | |
| | | // 线条3 |
| | | let line3 = diagram.line({ |
| | | id: 'line3', |
| | | hide: true, |
| | | let line7 = diagram.line({ |
| | | id: 'line7', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | lineWidth, |
| | | points: [ |
| | | line2[1], |
| | | [line2[1][0], line2[1][1] - splitWidth * 2] |
| | | line6[0], |
| | | [line6[0][0] + 400, line6[0][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 线条4 |
| | | let powerImageOffset = 60; |
| | | let line4Start = [powerImage.top[0] - powerImageOffset, powerImage.top[1]]; |
| | | let line4 = diagram.line({ |
| | | id: 'line4', |
| | | let line8 = diagram.line({ |
| | | id: 'line8', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | lineWidth, |
| | | points: [ |
| | | line4Start, |
| | | [line4Start[0], line3[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 线条5 |
| | | let line5 = diagram.line({ |
| | | id: 'line5', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line3[1], |
| | | line4[1] |
| | | line7[1], |
| | | [line7[1][0], line7[0][1] + 150] |
| | | ] |
| | | }); |
| | | |
| | |
| | | id: 'loaderImage', |
| | | flush: false, |
| | | url: loader, |
| | | point: [1500 - end - loaderImageWidth, doubleDcdcImage.top[1] - loaderImageHt + imageHt], |
| | | point: [line8[1][0] - loaderImageWidth / 2, line8[1][1]], |
| | | width: loaderImageWidth, |
| | | height: loaderImageHt, |
| | | }); |
| | | |
| | | // 线条6 |
| | | let line6 = diagram.line({ |
| | | id: 'line6', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | loaderImage.top, |
| | | [loaderImage.top[0], line5[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 线条7 |
| | | let line7 = diagram.line({ |
| | | id: 'line7', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line5[1], |
| | | line6[1] |
| | | ] |
| | | }); |
| | | |
| | | // 线条8 |
| | | let line8 = diagram.line({ |
| | | id: 'line8', |
| | | let line9 = diagram.line({ |
| | | id: 'line9', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | lineWidth, |
| | | points: [ |
| | | loaderImage.bottom, |
| | | [loaderImage.bottom[0], loaderImage.bottom[1] - 6], |
| | | [loaderImage.bottom[0], loaderImage.bottom[1] + splitWidth] |
| | | ] |
| | | }); |
| | | |
| | | // 线条9 |
| | | let line9Start = [powerImage.bottom[0] + powerImageOffset, powerImage.bottom[1]]; |
| | | let line9 = diagram.line({ |
| | | id: 'line9', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line9Start, |
| | | [line9Start[0], line8[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 线条10 |
| | | let powerImageOffset = 60; |
| | | let line10Start = [powerImage.bottom[0] + powerImageOffset, powerImage.bottom[1]]; |
| | | let line10 = diagram.line({ |
| | | id: 'line10', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | lineWidth, |
| | | points: [ |
| | | line8[1], |
| | | line9[1] |
| | | line10Start, |
| | | [line10Start[0], line9[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | // 线条11 |
| | | let doubleDcdcOffset = 80; |
| | | |
| | | let line11 = diagram.line({ |
| | | id: 'line11', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line9[1], |
| | | line10[1] |
| | | ] |
| | | }); |
| | | |
| | | let doubleDcdcOffset = 94; |
| | | let line12 = diagram.line({ |
| | | id: 'line12', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | |
| | | ] |
| | | }); |
| | | |
| | | // 线条12 |
| | | let line12 = diagram.line({ |
| | | id: 'line12', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line11[1], |
| | | [line11[1][0], doubleDcdcImage.bottom[1]] |
| | | ] |
| | | }); |
| | | |
| | | // dcdc下的圆圈 |
| | | let arc1 = diagram.arc({ |
| | | point: [line12[1][0], line12[1][1] + lineWidth], |
| | | flush: false, |
| | | fillStyle: springGreen, |
| | | strokeStyle: '#50cef5', |
| | | radius: lineWidth * 2, |
| | | type: 'fill' |
| | | }); |
| | | |
| | | // 线条13 |
| | | let line13 = diagram.line({ |
| | | id: 'line13', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | [doubleDcdcImage.bottom[0] - doubleDcdcOffset, doubleDcdcImage.bottom[1]], |
| | | [doubleDcdcImage.bottom[0] - doubleDcdcOffset, line11[1][1]], |
| | | line12[1], |
| | | [line12[1][0], doubleDcdcImage.bottom[1]] |
| | | ] |
| | | }); |
| | | |
| | | let arc2 = diagram.arc({ |
| | | point: [line13[0][0], line13[0][1] + lineWidth], |
| | | // dcdc下的圆圈 |
| | | let arc1 = diagram.arc({ |
| | | point: [line13[1][0], line13[1][1] + lineWidth], |
| | | flush: false, |
| | | fillStyle: springGreen, |
| | | strokeStyle: '#50cef5', |
| | |
| | | type: 'fill' |
| | | }); |
| | | |
| | | // 线条14 |
| | | let line14 = diagram.line({ |
| | | id: 'line14', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line13[1], |
| | | [batteryImage.bottom[0], line13[1][1]] |
| | | [doubleDcdcImage.bottom[0] - doubleDcdcOffset, doubleDcdcImage.bottom[1]], |
| | | [doubleDcdcImage.bottom[0] - doubleDcdcOffset, line12[1][1]], |
| | | ] |
| | | }); |
| | | |
| | | // 线条15 |
| | | let arc2 = diagram.arc({ |
| | | point: [line14[0][0], line14[0][1] + lineWidth], |
| | | flush: false, |
| | | fillStyle: springGreen, |
| | | strokeStyle: '#50cef5', |
| | | radius: lineWidth * 2, |
| | | type: 'fill' |
| | | }); |
| | | |
| | | let line15 = diagram.line({ |
| | | id: 'line15', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line14[1], |
| | | [batteryImage.bottom[0], line14[1][1]] |
| | | ] |
| | | }); |
| | | |
| | | let line16 = diagram.line({ |
| | | id: 'line16', |
| | | strokeStyle: springGreen, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line15[1], |
| | | batteryImage.bottom |
| | | ] |
| | | }); |
| | | |
| | | // 线条16 |
| | | let line16 = diagram.line({ |
| | | id: 'line16', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | batteryImage.top, |
| | | [batteryImage.top[0], line5[1][1]] |
| | | ] |
| | | }); |
| | | // 线条1 |
| | | // let line1 = diagram.line({ |
| | | // id: 'line1', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // batteryImage.right, |
| | | // [batteryImage.right[0] + splitWidth, batteryImage.right[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // 线条17 |
| | | let line17 = diagram.line({ |
| | | id: 'line17', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line16[1], |
| | | [line13[0][0], line16[1][1]] |
| | | ] |
| | | }); |
| | | // 监控主机 |
| | | // let doubleDcdcImage = diagram.drawImage({ |
| | | // id: 'doubleDcdcImage', |
| | | // flush: false, |
| | | // url: doubleDcdc, |
| | | // point: [line1[1][0], line1[1][1] - 898 / 4], |
| | | // width: 640/2, |
| | | // height: 898/2, |
| | | // }); |
| | | |
| | | // 线条18 |
| | | let line18 = diagram.line({ |
| | | id: 'line18', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line17[1], |
| | | [line17[1][0], doubleDcdcImage.top[1]] |
| | | ] |
| | | }); |
| | | // 线条2 |
| | | // let line2 = diagram.line({ |
| | | // id: 'line2', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // doubleDcdcImage.right, |
| | | // [doubleDcdcImage.right[0] + splitWidth * 3 / 4, doubleDcdcImage.right[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // 线条19 |
| | | let line19 = diagram.line({ |
| | | id: 'line19', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | [line12[0][0], doubleDcdcImage.top[1]], |
| | | [line12[0][0], line5[1][1]] |
| | | ] |
| | | }); |
| | | // 绘制整流电源 |
| | | // let powerImage = diagram.drawImage({ |
| | | // id: 'powerImage', |
| | | // flush: false, |
| | | // url: power, |
| | | // point: [doubleDcdcImage.right[0] + splitWidth * 1.2, doubleDcdcImage.right[1] - imageHt / 2], |
| | | // width: 970 * imageHt / 598, |
| | | // height: imageHt, |
| | | // }); |
| | | |
| | | // 线条20 |
| | | let line20 = diagram.line({ |
| | | id: 'line20', |
| | | strokeStyle: red, |
| | | lineWidth: lineWidth, |
| | | points: [ |
| | | line19[1], |
| | | line5[0] |
| | | ] |
| | | }); |
| | | // // 线条3 |
| | | // let line3 = diagram.line({ |
| | | // id: 'line3', |
| | | // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line2[1], |
| | | // [line2[1][0], line2[1][1] - splitWidth * 2] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条4 |
| | | // let powerImageOffset = 60; |
| | | // let line4Start = [powerImage.top[0] - powerImageOffset, powerImage.top[1]]; |
| | | // let line4 = diagram.line({ |
| | | // id: 'line4', |
| | | // // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line4Start, |
| | | // [line4Start[0], line3[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条5 |
| | | // let line5 = diagram.line({ |
| | | // id: 'line5', |
| | | // // hide: true, |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line3[1], |
| | | // line4[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 用电负载 |
| | | // let loaderImageHt = imageHt * 5 / 3; |
| | | // let loaderImageWidth = 439 * loaderImageHt / 709; |
| | | // let loaderImage = diagram.drawImage({ |
| | | // id: 'loaderImage', |
| | | // flush: false, |
| | | // url: loader, |
| | | // point: [1500 - end - loaderImageWidth, doubleDcdcImage.top[1] - loaderImageHt + imageHt * 3], |
| | | // width: loaderImageWidth, |
| | | // height: loaderImageHt, |
| | | // }); |
| | | |
| | | // // 线条6 |
| | | // let line6 = diagram.line({ |
| | | // id: 'line6', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // loaderImage.top, |
| | | // [loaderImage.top[0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条7 |
| | | // let line7 = diagram.line({ |
| | | // id: 'line7', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line5[1], |
| | | // line6[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条8 |
| | | // let line8 = diagram.line({ |
| | | // id: 'line8', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // loaderImage.bottom, |
| | | // [loaderImage.bottom[0], loaderImage.bottom[1] + splitWidth] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条9 |
| | | // let line9Start = [powerImage.bottom[0] + powerImageOffset, powerImage.bottom[1]]; |
| | | // let line9 = diagram.line({ |
| | | // id: 'line9', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line9Start, |
| | | // [line9Start[0], line8[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条10 |
| | | // let line10 = diagram.line({ |
| | | // id: 'line10', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line8[1], |
| | | // line9[1] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条11 |
| | | // let doubleDcdcOffset = 80; |
| | | // let line11 = diagram.line({ |
| | | // id: 'line11', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line10[1], |
| | | // [doubleDcdcImage.bottom[0] + doubleDcdcOffset, line10[1][1]] |
| | | |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条12 |
| | | // let line12 = diagram.line({ |
| | | // id: 'line12', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line11[1], |
| | | // [line11[1][0], doubleDcdcImage.bottom[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // dcdc下的圆圈 |
| | | // let arc1 = diagram.arc({ |
| | | // point: [line12[1][0], line12[1][1] + lineWidth], |
| | | // flush: false, |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: '#50cef5', |
| | | // radius: lineWidth * 2, |
| | | // type: 'fill' |
| | | // }); |
| | | |
| | | // // 线条13 |
| | | // let line13 = diagram.line({ |
| | | // id: 'line13', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // [doubleDcdcImage.bottom[0] - doubleDcdcOffset, doubleDcdcImage.bottom[1]], |
| | | // [doubleDcdcImage.bottom[0] - doubleDcdcOffset, line11[1][1]], |
| | | // ] |
| | | // }); |
| | | |
| | | // let arc2 = diagram.arc({ |
| | | // point: [line13[0][0], line13[0][1] + lineWidth], |
| | | // flush: false, |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: '#50cef5', |
| | | // radius: lineWidth * 2, |
| | | // type: 'fill' |
| | | // }); |
| | | |
| | | // // 线条14 |
| | | // let line14 = diagram.line({ |
| | | // id: 'line14', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line13[1], |
| | | // [batteryImage.bottom[0], line13[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条15 |
| | | // let line15 = diagram.line({ |
| | | // id: 'line15', |
| | | // strokeStyle: springGreen, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line14[1], |
| | | // batteryImage.bottom |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条16 |
| | | // let line16 = diagram.line({ |
| | | // id: 'line16', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // batteryImage.top, |
| | | // [batteryImage.top[0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条17 |
| | | // let line17 = diagram.line({ |
| | | // id: 'line17', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line16[1], |
| | | // [line13[0][0], line16[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条18 |
| | | // let line18 = diagram.line({ |
| | | // id: 'line18', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line17[1], |
| | | // [line17[1][0], doubleDcdcImage.top[1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条19 |
| | | // let line19 = diagram.line({ |
| | | // id: 'line19', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // [line12[0][0], doubleDcdcImage.top[1]], |
| | | // [line12[0][0], line5[1][1]] |
| | | // ] |
| | | // }); |
| | | |
| | | // // 线条20 |
| | | // let line20 = diagram.line({ |
| | | // id: 'line20', |
| | | // strokeStyle: red, |
| | | // lineWidth: lineWidth, |
| | | // points: [ |
| | | // line19[1], |
| | | // line5[0] |
| | | // ] |
| | | // }); |
| | | |
| | | // 设置文本 |
| | | setDiagramTexts(diagram); |
| | |
| | | fontSize: textFont, |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1]], |
| | | text: '0.00V' |
| | | }); |
| | | diagram.text({ |
| | | id: 'groupCurr', |
| | | flush: true, |
| | | baseline: 'bottom', |
| | | align: 'left', |
| | | fontSize: textFont, |
| | | point: [groupVolPoint[0] + offsetTop, groupVolPoint[1] - 34], |
| | | text: '0.00A' |
| | | }); |
| | | |
| | | // 监控主机 |
| | |
| | | // text: '设备未连接', |
| | | // }); |
| | | |
| | | let line17 = diagram.getOption("line17").points; |
| | | // let line17 = diagram.getOption("line17").points; |
| | | // diagram.text({ |
| | | // id: 'devTemp', |
| | | // flush: true, |
| | |
| | | // text: '设备温度:0℃', |
| | | // }); |
| | | |
| | | let line7 = diagram.getOption("line7").points; |
| | | let line5 = diagram.getOption("line5").points; |
| | | diagram.text({ |
| | | id: 'onlineVol', |
| | | flush: true, |
| | | fontSize: textFont, |
| | | align: 'center', |
| | | point: [line7[0][0] + (line7[1][0] - line7[0][0]) / 2, line7[0][1] + 16], |
| | | point: [line5[0][0] + (line5[1][0] - line5[0][0]) / 2, line5[0][1] - 28], |
| | | text: '0V', |
| | | }); |
| | | } |
| | |
| | | // floatCharge(diagram); |
| | | break; |
| | | case "powerCutDischarge": // 停电放电 |
| | | powerCutDischarge(diagram); |
| | | // powerCutDischarge(diagram); |
| | | break; |
| | | case 'resTest': // 内阻测试 |
| | | resTest(diagram); |
| | | // resTest(diagram); |
| | | break; |
| | | case 'break': |
| | | diagram.setOption('type', 'text', '设备未连接'); |
| | |
| | | }); |
| | | |
| | | // 线条6 |
| | | let line6 = diagram.getOption('line6').points; |
| | | diagram.moveDot({ |
| | | id: 'line6_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line6[1], |
| | | line6[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条8 |
| | | let line8 = diagram.getOption('line8').points; |
| | | diagram.moveDot({ |
| | | id: 'line8_dot', |
| | |
| | | points: line8, |
| | | }); |
| | | |
| | | // 线条10 |
| | | let line10 = diagram.getOption('line10').points; |
| | | // 线条8 |
| | | let line9 = diagram.getOption('line9').points; |
| | | diagram.moveDot({ |
| | | id: 'line10_dot', |
| | | id: 'line9_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line10, |
| | | points: line9, |
| | | }); |
| | | |
| | | // 线条11 |
| | | // 线条10 |
| | | let line11 = diagram.getOption('line11').points; |
| | | diagram.moveDot({ |
| | | id: 'line11_dot', |
| | |
| | | points: line11, |
| | | }); |
| | | |
| | | // 线条12 |
| | | // 线条11 |
| | | let line12 = diagram.getOption('line12').points; |
| | | diagram.moveDot({ |
| | | id: 'line12_dot', |
| | |
| | | points: line12, |
| | | }); |
| | | |
| | | // 线条13 |
| | | // 线条12 |
| | | let line13 = diagram.getOption('line13').points; |
| | | diagram.moveDot({ |
| | | id: 'line13_dot', |
| | |
| | | points: line13, |
| | | }); |
| | | |
| | | // 线条14 |
| | | // 线条13 |
| | | let line14 = diagram.getOption('line14').points; |
| | | diagram.moveDot({ |
| | | id: 'line14_dot', |
| | |
| | | points: line14, |
| | | }); |
| | | |
| | | // 线条15 |
| | | // 线条14 |
| | | let line15 = diagram.getOption('line15').points; |
| | | diagram.moveDot({ |
| | | id: 'line15_dot', |
| | |
| | | points: line15, |
| | | }); |
| | | |
| | | // 线条16 |
| | | // 线条15 |
| | | let line16 = diagram.getOption('line16').points; |
| | | diagram.moveDot({ |
| | | id: 'line16_dot', |
| | |
| | | points: line16, |
| | | }); |
| | | |
| | | // 线条17 |
| | | let line17 = diagram.getOption('line17').points; |
| | | diagram.moveDot({ |
| | | id: 'line17_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line17, |
| | | }); |
| | | |
| | | // 线条18 |
| | | let line18 = diagram.getOption('line18').points; |
| | | diagram.moveDot({ |
| | | id: 'line18_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line18, |
| | | }); |
| | | |
| | | // 线条19 |
| | | let line19 = diagram.getOption('line19').points; |
| | | diagram.moveDot({ |
| | | id: 'line19_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line19, |
| | | }); |
| | | |
| | | // 线条20 |
| | | let line20 = diagram.getOption('line20').points; |
| | | diagram.moveDot({ |
| | | id: 'line20_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line20, |
| | | |
| | | }); |
| | | |
| | | } |
| | | // 充电 |
| | | function charge(diagram) { |
| | | // 设置电路图类型 |
| | | diagram.setOption('type', 'text', '充电状态'); |
| | | |
| | | // 线条1 |
| | | // let line1 = diagram.getOption('line1').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line1_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line1[1], |
| | | // line1[0] |
| | | // ], |
| | | // }); |
| | | // |
| | | // // 线条2 |
| | | // let line2 = diagram.getOption('line2').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line2_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line2[1], |
| | | // line2[0] |
| | | // ], |
| | | // }); |
| | | // |
| | | // // 线条3 |
| | | // let line3 = diagram.getOption('line3').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line3_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line3[1], |
| | | // line3[0] |
| | | // ], |
| | | // }); |
| | | |
| | | // 线条5 |
| | | let line5 = diagram.getOption('line5').points; |
| | | diagram.moveDot({ |
| | | id: 'line5_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line5[1], |
| | | line5[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条4 |
| | | let line4 = diagram.getOption('line4').points; |
| | | diagram.moveDot({ |
| | | id: 'line4_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line4, |
| | | }); |
| | | |
| | | // 线条9 |
| | | let line9 = diagram.getOption('line9').points; |
| | | diagram.moveDot({ |
| | | id: 'line9_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line9[1], |
| | | line9[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条11 |
| | | let line11 = diagram.getOption('line11').points; |
| | | diagram.moveDot({ |
| | | id: 'line11_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line11[1], |
| | | line11[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条12 |
| | | let line12 = diagram.getOption('line12').points; |
| | | diagram.moveDot({ |
| | | id: 'line12_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line12[1], |
| | | line12[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条13 |
| | | let line13 = diagram.getOption('line13').points; |
| | | diagram.moveDot({ |
| | | id: 'line13_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line13[1], |
| | | line13[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条14 |
| | | let line14 = diagram.getOption('line14').points; |
| | | diagram.moveDot({ |
| | | id: 'line14_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line14[1], |
| | | line14[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条15 |
| | | let line15 = diagram.getOption('line15').points; |
| | | diagram.moveDot({ |
| | | id: 'line15_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line15[1], |
| | | line15[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条7 |
| | | let line7 = diagram.getOption('line7').points; |
| | | diagram.moveDot({ |
| | | id: 'line7_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line7, |
| | | }); |
| | | |
| | | // 线条6 |
| | | let line6 = diagram.getOption('line6').points; |
| | | diagram.moveDot({ |
| | | id: 'line6_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line6[1], |
| | | line6[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条8 |
| | | let line8 = diagram.getOption('line8').points; |
| | | diagram.moveDot({ |
| | | id: 'line8_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line8, |
| | | }); |
| | | |
| | | // 线条10 |
| | | let line10 = diagram.getOption('line10').points; |
| | | diagram.moveDot({ |
| | | id: 'line10_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line10, |
| | | }); |
| | | |
| | | // 线条16 |
| | | let line16 = diagram.getOption('line16').points; |
| | | let line1 = diagram.getOption('line1').points; |
| | | diagram.moveDot({ |
| | | id: 'line16_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | id: 'line1_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line16[1], |
| | | line16[0] |
| | | ], |
| | | points: line1, |
| | | }); |
| | | |
| | | // 线条17 |
| | | let line17 = diagram.getOption('line17').points; |
| | | // // 线条17 |
| | | let line2 = diagram.getOption('line2').points; |
| | | diagram.moveDot({ |
| | | id: 'line17_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | id: 'line2_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line17[1], |
| | | line17[0] |
| | | ], |
| | | points: line2, |
| | | }); |
| | | |
| | | // 线条18 |
| | | let line18 = diagram.getOption('line18').points; |
| | | diagram.moveDot({ |
| | | id: 'line18_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line18[1], |
| | | line18[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条19 |
| | | let line19 = diagram.getOption('line19').points; |
| | | diagram.moveDot({ |
| | | id: 'line19_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line19[1], |
| | | line19[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条20 |
| | | let line20 = diagram.getOption('line20').points; |
| | | diagram.moveDot({ |
| | | id: 'line20_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line20[1], |
| | | line20[0] |
| | | ], |
| | | }); |
| | | |
| | | } |
| | | |
| | | // 浮电 |
| | | function floatCharge(diagram) { |
| | | // 设置电路图类型 |
| | | // diagram.setOption('type', 'text', '浮充状态'); |
| | | |
| | | // 线条1 |
| | | // let line1 = diagram.getOption('line1').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line1_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line1[1], |
| | | // line1[0] |
| | | // ], |
| | | // }); |
| | | // |
| | | // // 线条2 |
| | | // let line2 = diagram.getOption('line2').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line2_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line2[1], |
| | | // line2[0] |
| | | // ], |
| | | // }); |
| | | // |
| | | // // 线条3 |
| | | // let line3 = diagram.getOption('line3').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line3_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line3[1], |
| | | // line3[0] |
| | | // ], |
| | | // }); |
| | | |
| | | // 线条5 |
| | | let line5 = diagram.getOption('line5').points; |
| | | diagram.moveDot({ |
| | | id: 'line5_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line5[1], |
| | | line5[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条4 |
| | | let line4 = diagram.getOption('line4').points; |
| | | diagram.moveDot({ |
| | | id: 'line4_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line4, |
| | | }); |
| | | |
| | | // 线条9 |
| | | let line9 = diagram.getOption('line9').points; |
| | | diagram.moveDot({ |
| | | id: 'line9_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line9[1], |
| | | line9[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条11 |
| | | let line11 = diagram.getOption('line11').points; |
| | | diagram.moveDot({ |
| | | id: 'line11_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line11[1], |
| | | line11[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条12 |
| | | let line12 = diagram.getOption('line12').points; |
| | | diagram.moveDot({ |
| | | id: 'line12_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line12[1], |
| | | line12[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条13 |
| | | let line13 = diagram.getOption('line13').points; |
| | | diagram.moveDot({ |
| | | id: 'line13_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line13[1], |
| | | line13[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条14 |
| | | let line14 = diagram.getOption('line14').points; |
| | | diagram.moveDot({ |
| | | id: 'line14_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line14[1], |
| | | line14[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条15 |
| | | let line15 = diagram.getOption('line15').points; |
| | | diagram.moveDot({ |
| | | id: 'line15_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line15[1], |
| | | line15[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条7 |
| | | let line7 = diagram.getOption('line7').points; |
| | | diagram.moveDot({ |
| | | id: 'line7_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line7, |
| | | }); |
| | | |
| | | // 线条6 |
| | | let line6 = diagram.getOption('line6').points; |
| | | diagram.moveDot({ |
| | | id: 'line6_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line6[1], |
| | | line6[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条8 |
| | | let line8 = diagram.getOption('line8').points; |
| | | diagram.moveDot({ |
| | | id: 'line8_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line8, |
| | | }); |
| | | |
| | | // 线条10 |
| | | let line10 = diagram.getOption('line10').points; |
| | | diagram.moveDot({ |
| | | id: 'line10_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line10, |
| | | }); |
| | | |
| | | // 线条16 |
| | | let line16 = diagram.getOption('line16').points; |
| | | diagram.moveDot({ |
| | | id: 'line16_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line16[1], |
| | | line16[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条17 |
| | | let line17 = diagram.getOption('line17').points; |
| | | diagram.moveDot({ |
| | | id: 'line17_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line17[1], |
| | | line17[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条18 |
| | | let line18 = diagram.getOption('line18').points; |
| | | diagram.moveDot({ |
| | | id: 'line18_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line18[1], |
| | | line18[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条19 |
| | | let line19 = diagram.getOption('line19').points; |
| | | diagram.moveDot({ |
| | | id: 'line19_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line19[1], |
| | | line19[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条20 |
| | | let line20 = diagram.getOption('line20').points; |
| | | diagram.moveDot({ |
| | | id: 'line20_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line20[1], |
| | | line20[0] |
| | | ], |
| | | }); |
| | | } |
| | | // 停电放电 |
| | | function powerCutDischarge(diagram) { |
| | | // 设置电路图类型 |
| | | diagram.setOption('type', 'text', '停电放电状态'); |
| | | |
| | | // // 线条1 |
| | | // let line1 = diagram.getOption('line1').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line1_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line1, |
| | | // }); |
| | | // |
| | | // // 线条2 |
| | | // let line2 = diagram.getOption('line2').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line2_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line2, |
| | | // }); |
| | | // |
| | | // // 线条3 |
| | | // // 线条18 |
| | | // let line3 = diagram.getOption('line3').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line3_dot', |
| | |
| | | // points: line3, |
| | | // }); |
| | | |
| | | // // 线条19 |
| | | // let line19 = diagram.getOption('line19').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line19_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line19, |
| | | // }); |
| | | |
| | | // // 线条20 |
| | | // let line20 = diagram.getOption('line20').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line20_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line20, |
| | | |
| | | // }); |
| | | |
| | | } |
| | | // 充电 |
| | | function charge(diagram) { |
| | | // 设置电路图类型 |
| | | // diagram.setOption('type', 'text', '充电状态'); |
| | | |
| | | // 线条5 |
| | | let line5 = diagram.getOption('line5').points; |
| | | diagram.moveDot({ |
| | | id: 'line5_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line5, |
| | | points: [ |
| | | line5[1], |
| | | line5[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条4 |
| | | let line6 = diagram.getOption('line6').points; |
| | | diagram.moveDot({ |
| | | id: 'line6_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [line6[1], line6[0]], |
| | | }); |
| | | |
| | | // 线条9 |
| | | let line10 = diagram.getOption('line10').points; |
| | | diagram.moveDot({ |
| | | id: 'line10_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line10[1], |
| | | line10[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条11 |
| | | let line12 = diagram.getOption('line12').points; |
| | | diagram.moveDot({ |
| | | id: 'line12_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line12[1], |
| | | line12[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条12 |
| | | let line13 = diagram.getOption('line13').points; |
| | | diagram.moveDot({ |
| | | id: 'line13_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line13[1], |
| | | line13[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条13 |
| | | let line14 = diagram.getOption('line14').points; |
| | | diagram.moveDot({ |
| | | id: 'line14_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line14[1], |
| | | line14[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条14 |
| | | let line15 = diagram.getOption('line15').points; |
| | | diagram.moveDot({ |
| | | id: 'line15_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line15[1], |
| | | line15[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条15 |
| | | let line16 = diagram.getOption('line16').points; |
| | | diagram.moveDot({ |
| | | id: 'line16_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line16[1], |
| | | line16[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条7 |
| | | let line7 = diagram.getOption('line7').points; |
| | | diagram.moveDot({ |
| | | id: 'line7_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line7, |
| | | }); |
| | | |
| | | // 线条6 |
| | | let line6 = diagram.getOption('line6').points; |
| | | diagram.moveDot({ |
| | | id: 'line6_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: [ |
| | | line6[1], |
| | | line6[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条8 |
| | | let line8 = diagram.getOption('line8').points; |
| | | diagram.moveDot({ |
| | | id: 'line8_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line8, |
| | | }); |
| | | |
| | | // 线条10 |
| | | let line10 = diagram.getOption('line10').points; |
| | | let line9 = diagram.getOption('line9').points; |
| | | diagram.moveDot({ |
| | | id: 'line10_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | id: 'line9_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line10, |
| | | points: line9, |
| | | }); |
| | | |
| | | // 线条11 |
| | | // 线条10 |
| | | let line11 = diagram.getOption('line11').points; |
| | | diagram.moveDot({ |
| | | id: 'line11_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line11, |
| | | }); |
| | | |
| | | // 线条12 |
| | | let line12 = diagram.getOption('line12').points; |
| | | diagram.moveDot({ |
| | | id: 'line12_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line12, |
| | | }); |
| | | |
| | | // 线条13 |
| | | let line13 = diagram.getOption('line13').points; |
| | | diagram.moveDot({ |
| | | id: 'line13_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line13, |
| | | }); |
| | | |
| | | // 线条14 |
| | | let line14 = diagram.getOption('line14').points; |
| | | diagram.moveDot({ |
| | | id: 'line14_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line14, |
| | | }); |
| | | |
| | | // 线条15 |
| | | let line15 = diagram.getOption('line15').points; |
| | | diagram.moveDot({ |
| | | id: 'line15_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line15, |
| | | }); |
| | | |
| | | // 线条16 |
| | | let line16 = diagram.getOption('line16').points; |
| | | diagram.moveDot({ |
| | | id: 'line16_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line16, |
| | | }); |
| | | // // 线条16 |
| | | // let line16 = diagram.getOption('line16').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line16_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line16[1], |
| | | // line16[0] |
| | | // ], |
| | | // }); |
| | | |
| | | // 线条17 |
| | | let line17 = diagram.getOption('line17').points; |
| | | let line1 = diagram.getOption('line1').points; |
| | | diagram.moveDot({ |
| | | id: 'line17_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | id: 'line1_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line17, |
| | | points: [ |
| | | line1[1], |
| | | line1[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条18 |
| | | let line18 = diagram.getOption('line18').points; |
| | | let line2 = diagram.getOption('line2').points; |
| | | diagram.moveDot({ |
| | | id: 'line18_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | id: 'line2_dot', |
| | | fillStyle: springGreen, |
| | | strokeStyle: springGreen, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line18, |
| | | points: [ |
| | | line2[1], |
| | | line2[0] |
| | | ], |
| | | }); |
| | | |
| | | // 线条19 |
| | | let line19 = diagram.getOption('line19').points; |
| | | diagram.moveDot({ |
| | | id: 'line19_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line19, |
| | | }); |
| | | // let line19 = diagram.getOption('line19').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line19_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line19[1], |
| | | // line19[0] |
| | | // ], |
| | | // }); |
| | | |
| | | // 线条20 |
| | | let line20 = diagram.getOption('line20').points; |
| | | diagram.moveDot({ |
| | | id: 'line20_dot', |
| | | fillStyle: red, |
| | | strokeStyle: red, |
| | | radius: scalcRadius, |
| | | flush: true, |
| | | points: line20, |
| | | // // 线条20 |
| | | // let line20 = diagram.getOption('line20').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line20_dot', |
| | | // fillStyle: springGreen, |
| | | // strokeStyle: springGreen, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line20[1], |
| | | // line20[0] |
| | | // ], |
| | | // }); |
| | | |
| | | }); |
| | | } |
| | | // 内阻测试 |
| | | function resTest(diagram) { |
| | | // 设置电路图类型 |
| | | diagram.setOption('type', 'text', '内阻测试'); |
| | | } |
| | | |
| | | // 停电放电 |
| | | // function powerCutDischarge(diagram) { |
| | | // // 设置电路图类型 |
| | | // diagram.setOption('type', 'text', '停电放电状态'); |
| | | |
| | | // // 线条5 |
| | | // let line5 = diagram.getOption('line5').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line5_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line5, |
| | | // }); |
| | | |
| | | // // 线条7 |
| | | // let line7 = diagram.getOption('line7').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line7_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line7, |
| | | // }); |
| | | |
| | | // // 线条6 |
| | | // let line6 = diagram.getOption('line6').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line6_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: [ |
| | | // line6[1], |
| | | // line6[0] |
| | | // ], |
| | | // }); |
| | | |
| | | // // 线条8 |
| | | // let line8 = diagram.getOption('line8').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line8_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line8, |
| | | // }); |
| | | |
| | | // // 线条10 |
| | | // let line10 = diagram.getOption('line10').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line10_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line10, |
| | | // }); |
| | | |
| | | // // 线条11 |
| | | // let line11 = diagram.getOption('line11').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line11_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line11, |
| | | // }); |
| | | |
| | | // // 线条12 |
| | | // let line12 = diagram.getOption('line12').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line12_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line12, |
| | | // }); |
| | | |
| | | // // 线条13 |
| | | // let line13 = diagram.getOption('line13').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line13_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line13, |
| | | // }); |
| | | |
| | | // // 线条14 |
| | | // let line14 = diagram.getOption('line14').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line14_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line14, |
| | | // }); |
| | | |
| | | // // 线条15 |
| | | // let line15 = diagram.getOption('line15').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line15_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line15, |
| | | // }); |
| | | |
| | | // // 线条16 |
| | | // let line16 = diagram.getOption('line16').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line16_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line16, |
| | | // }); |
| | | |
| | | // // 线条17 |
| | | // let line17 = diagram.getOption('line17').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line17_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line17, |
| | | // }); |
| | | |
| | | // // 线条18 |
| | | // let line18 = diagram.getOption('line18').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line18_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line18, |
| | | // }); |
| | | |
| | | // // 线条19 |
| | | // let line19 = diagram.getOption('line19').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line19_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line19, |
| | | // }); |
| | | |
| | | // // 线条20 |
| | | // let line20 = diagram.getOption('line20').points; |
| | | // diagram.moveDot({ |
| | | // id: 'line20_dot', |
| | | // fillStyle: red, |
| | | // strokeStyle: red, |
| | | // radius: scalcRadius, |
| | | // flush: true, |
| | | // points: line20, |
| | | |
| | | // }); |
| | | // } |
| | | export default diagramStates; |
| | |
| | | res = JSON.parse(res.data); |
| | | let data = res.data.data; |
| | | // console.log(data, "=====111data"); |
| | | this.realTimeLd9Data(data.ld9); |
| | | this.realTimePowerOffs(data.f9100state); |
| | | this.realTimeSearch(data.rtdata); |
| | | this.realTimeGroupss(data.rtstate, res.data.data2); |
| | |
| | | } |
| | | if (res2.cellShowType != this.batt.cellShowType) { |
| | | this.batt.cellShowType = res2.cellShowType; |
| | | } |
| | | }, |
| | | realTimeLd9Data(res) { |
| | | if (res) { |
| | | // res = res.data; |
| | | if (res.code && res.data) { |
| | | let data = res.data2; |
| | | // 判断是否超时 |
| | | let outTime = 2 * 60; //设备超时时间(2分钟) |
| | | var nowTime = new Date(data.note).getTime(); //当前时间 |
| | | var record = new Date(data.recordDatetime).getTime(); |
| | | if (Math.abs(nowTime - record) / 1000 > outTime) { |
| | | this.disconnect(); |
| | | } else { |
| | | this.diagram.desc = ""; |
| | | // 0-在线监测,1-核容测试,2-测试状态状态停止,3-内阻测试 |
| | | switch (data.sysState) { |
| | | case 0: |
| | | this.diagram.type = 0; |
| | | break; |
| | | case 1: |
| | | let chargeMon = this.chargeMon; |
| | | let dischargeMon = this.dischargeMon; |
| | | // 存在放电和充电单体 |
| | | if (dischargeMon != "" && chargeMon != "") { |
| | | this.diagram.type = 6; |
| | | } else if (chargeMon != "") { |
| | | // 存在充电单体 |
| | | this.diagram.type = 2; |
| | | } else { |
| | | this.diagram.type = 1; |
| | | } |
| | | break; |
| | | case 2: |
| | | this.diagram.type = 0; |
| | | break; |
| | | case 3: |
| | | this.diagram.type = 3; |
| | | this.diagram.desc = "(内阻测试)"; |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | this.disconnect(); |
| | | } |
| | | } |
| | | }, |
| | | /* 查询电路图开关状态和信息 */ |
| | |
| | | // 判断workstatus |
| | | switch (workstatus) { |
| | | case 0: |
| | | case 5: // 等待充电 显示停止 |
| | | case 6: |
| | | // 停机 |
| | | this.diagram.type = 0; |
| | | break; |
| | | case 1: |
| | | case 2: |
| | | case 5: // 等待充电 显示放电状态 |
| | | // 放电 |
| | | this.diagram.type = 1; |
| | | break; |
| | |
| | | list = { |
| | | fbo4830Stopstr: "--", |
| | | battState: "未知", |
| | | group_online_vol: "组端:0.000V", |
| | | group_online_vol: "在线:0.000V;组端:0.000V", |
| | | groupCurr: "0.00A", |
| | | recDatetime: "1982-01-01 00:00:00", |
| | | battTestTlong: formatSeconds(0), |
| | |
| | | let batt_state_text = obj[this.inputs.battState]; |
| | | list.battState = batt_state_text + this.diagram.desc; |
| | | |
| | | list.group_online_vol = `组端:${this.inputs.groupVol.toFixed(2)}V`; |
| | | list.group_online_vol = `在线:${this.inputs.onlineVol.toFixed(2)}V;组端:${this.inputs.groupVol.toFixed(2)}V`; |
| | | |
| | | list.groupCurr = this.inputs.groupCurr.toFixed(2) + "A"; |
| | | list.recDatetime = this.inputs.recDatetime; |