1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
| <template>
| <!-- 假负载电路图 -->
| <load-circuit-diagram
| v-if="diagramType === 'load'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :load-curr="loadCurr"
| :dis-curr-max="DisCurrMax"
| :update="update"
| ></load-circuit-diagram>
| <!-- 串负极假负载拓扑图 -->
| <load-reverse-circuit-diagram
| v-else-if="diagramType === 'loadReverse'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :update="update"
| ></load-reverse-circuit-diagram>
| <!-- 交流电网电路图 -->
| <grid-circuit-diagram
| v-else-if="diagramType === 'grid'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :update="update"
| :dev-type="devType"
| :buscouple-switch="buscoupleSwitch"
| ></grid-circuit-diagram>
| <collect-circuit-diagram
| v-else-if="diagramType === 'collect'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :update="update"
| ></collect-circuit-diagram>
| <lithium-diagram
| v-else-if="diagramType === 'lithium'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :update="update"
| :batt="batt"
| ></lithium-diagram>
| <ld9-diagram
| v-else-if="diagramType === 'ld9'"
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :charge-mon="chargeMon"
| :discharge-mon="dischargeMon"
| :type="type"
| :update="update"
| :batt="batt"></ld9-diagram>
| <!-- 通用电路图 -->
| <normal-circuit-diagram
| v-else
| :online-vol="onlineVol"
| :group-vol="groupVol"
| :batt-curr="battCurr"
| :dev-temp="devTemp"
| :type="type"
| :update="update"
| :drop-vol="dropVol"
| :contact-res="contactRes"
| :load-curr="loadCurr"
| :dis-curr-max="DisCurrMax"
| :start="start"
| ></normal-circuit-diagram>
| </template>
|
| <script>
| import LoadCircuitDiagram from "./diagrams/load";
| import LoadReverseCircuitDiagram from "./diagrams/loadReverse";
| import GridCircuitDiagram from "./diagrams/grid";
| import NormalCircuitDiagram from "./diagrams/normal";
| import CollectCircuitDiagram from "./diagrams/collect";
| import LithiumDiagram from "./diagrams/lithium";
| import Ld9Diagram from "@/pages/dataTest/diagrams/ld9";
| import { regEquipType } from "@/assets/js/tools";
|
| export default {
| components: {
| LoadCircuitDiagram,
| LoadReverseCircuitDiagram,
| GridCircuitDiagram,
| NormalCircuitDiagram,
| CollectCircuitDiagram,
| LithiumDiagram,
| Ld9Diagram,
| },
| props: {
| onlineVol: {
| // 在线电压
| type: [String, Number],
| default: 0,
| },
| groupVol: {
| // 组端电压
| type: [String, Number],
| default: 0,
| },
| battCurr: {
| // 电池电流
| type: [String, Number],
| default: 0,
| },
| devTemp: {
| // 设备温度
| type: [String, Number],
| default: 0,
| },
| type: {
| type: Number,
| default: -1,
| },
| update: {
| type: Boolean,
| default: true,
| },
| version: {
| type: String,
| default: "",
| },
| dropVol: {
| // 导通压降
| type: [String, Number],
| default: 0,
| },
| contactRes: {
| // 接触器阻抗
| type: [String, Number],
| default: 0,
| },
| batt: {
| type: Object,
| default() {
| return {};
| },
| },
| start: {
| type: Array,
| default() {
| return [280, 40];
| },
| },
| devType: {
| type: Number,
| default: 0,
| },
| chargeMon: {
| type: String,
| default: "--------------"
| },
| dischargeMon: {
| type: String,
| default: "--------------"
| },
| buscoupleSwitch: {
| type: Number,
| default: 0
| }
| },
| computed: {
| diagramType() {
| let rs = "normal";
| let devId = this.batt.FBSDeviceId;
| // 根据设备的类型获取设备的信息
| if (regEquipType(devId, "BTS9110")) {
| // 假负载
| let pattern = /^D:6/;
| if (pattern.test(this.version)) {
| rs = "load";
| } else {
| rs = "loadReverse";
| }
| } else if (regEquipType(devId, "BTS9120")) {
| // 交流电网
| rs = "grid";
| } else if (regEquipType(devId, ["BTS9605", "BTS9611"])) {
| rs = "collect";
| } else if (regEquipType(devId, ["lithium", "lithiumPack"])) {
| rs = "lithium";
| }else if(regEquipType(devId, "LD9")) {
| rs = "ld9"
| }
| return rs;
| },
| loadCurr() {
| return this.batt.Load_curr != undefined
| ? this.batt.Load_curr.toHold(2)
| : "??";
| },
| DisCurrMax() {
| return this.batt.DisCurrMax != undefined ? this.batt.DisCurrMax : "??";
| },
| },
| mounted() {},
| };
| </script>
|
|