@ganwei-web/gw-base-components-plus 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,45 @@
1
- import { createBlock as S, createCommentVNode as f, createElementBlock as l, createElementVNode as C, createTextVNode as k, createVNode as q, mergeProps as x, normalizeClass as G, normalizeStyle as O, openBlock as n, resolveComponent as g, toDisplayString as b, toHandlers as T, withCtx as w, withModifiers as M } from "vue";
1
+ import { createBlock as E, createCommentVNode as w, createElementBlock as d, createElementVNode as S, createTextVNode as M, createVNode as b, mergeProps as L, normalizeClass as y, normalizeStyle as G, openBlock as p, resolveComponent as C, toDisplayString as N, toHandlers as _, withCtx as q, withModifiers as k } from "vue";
2
2
  import I from "vue3-virtual-scroll-list";
3
- import * as y from "@aspnet/signalr";
3
+ import * as T from "@aspnet/signalr";
4
4
 
5
5
  import "./style.css";
6
- class _ {
6
+ class v {
7
7
  // 分组节点扁平化对象、设备扁平化对象、window缓存设备扁平化对象
8
- constructor(e, t, i) {
9
- this.groupNodeObject = e, this.nodesMap = t, this.controlObject = i;
8
+ constructor(t, e, i) {
9
+ this.groupNodeObject = t, this.nodesMap = e, this.controlObject = i;
10
10
  }
11
11
  // 增加映射
12
- addNodesMap(e) {
13
- e && e.forEach((t) => {
14
- this.nodesMap[t.key] = t;
12
+ addNodesMap(t) {
13
+ t && t.forEach((e) => {
14
+ this.nodesMap[e.key] = e;
15
15
  });
16
16
  }
17
17
  // 移除映射
18
- removeNodesMap(e) {
19
- e && e.forEach((t) => {
20
- delete this.nodesMap[t.key];
18
+ removeNodesMap(t) {
19
+ t && t.forEach((e) => {
20
+ delete this.nodesMap[e.key];
21
21
  });
22
22
  }
23
23
  // 回收所有分组节点缓存
24
- recycleAllNodeCache(e) {
25
- for (let t in this.groupNodeObject) { this.groupNodeObject[t].expand = !1, this.groupNodeObject[t].count = 0, this.recycleGroupCache(this.groupNodeObject[t].key), e && delete this.groupNodeObject[t]; }
24
+ recycleAllNodeCache(t) {
25
+ for (let e in this.groupNodeObject) { this.groupNodeObject[e].expand = !1, this.groupNodeObject[e].count = 0, this.recycleGroupCache(this.groupNodeObject[e].key), t && delete this.groupNodeObject[e]; }
26
26
  }
27
27
  // 回收分组节点内存
28
- recycleGroupCache(e) {
29
- if (this.groupNodeObject[e]) {
30
- this.groupNodeObject[e].children = [], this.removeNodesMap(this.groupNodeObject[e].equips), this.groupNodeObject[e].equips = [], this.groupNodeObject[e].equips.length = 0, this.groupNodeObject[e].expand = !1;
31
- for (let t in this.groupNodeObject) { this.groupNodeObject[t].groupId == e && this.recycleGroupCache(this.groupNodeObject[t].key); }
28
+ recycleGroupCache(t) {
29
+ if (this.groupNodeObject[t]) {
30
+ this.groupNodeObject[t].children = [], this.removeNodesMap(this.groupNodeObject[t].equips), this.groupNodeObject[t].equips = [], this.groupNodeObject[t].equips.length = 0, this.groupNodeObject[t].expand = !1;
31
+ for (let e in this.groupNodeObject) { this.groupNodeObject[e].groupId == t && this.recycleGroupCache(this.groupNodeObject[e].key); }
32
32
  }
33
33
  }
34
34
  // 关闭兄弟分组节点及回收内存
35
- closeBrotherNode(e) {
36
- if (e && this.groupNodeObject[e]) {
37
- let t = this.groupNodeObject[e].groupId;
38
- for (let i in this.groupNodeObject) { this.groupNodeObject[i].groupId == t && this.groupNodeObject[i].key != e && this.groupNodeObject[i].expand && (this.groupNodeObject[i].expand = !1, this.recycleGroupCache(this.groupNodeObject[i].key)); }
35
+ closeBrotherNode(t) {
36
+ if (t && this.groupNodeObject[t]) {
37
+ let e = this.groupNodeObject[t].groupId;
38
+ for (let i in this.groupNodeObject) { this.groupNodeObject[i].groupId == e && this.groupNodeObject[i].key != t && this.groupNodeObject[i].expand && (this.groupNodeObject[i].expand = !1, this.recycleGroupCache(this.groupNodeObject[i].key)); }
39
39
  }
40
40
  }
41
41
  }
42
- class N {
42
+ class m {
43
43
  constructor() {
44
44
  this.window = window;
45
45
  try {
@@ -49,7 +49,7 @@ class N {
49
49
  }
50
50
  }
51
51
  }
52
- const m = {
52
+ const x = {
53
53
  data() {
54
54
  return {
55
55
  window: null
@@ -64,117 +64,141 @@ const m = {
64
64
  }
65
65
  }
66
66
  };
67
- class L extends N {
68
- constructor(e, t, i, o, u, a) {
69
- super(), this.equipControllObject = i, this.groupNodeObject = e, this.nodesMap = t, this.controlObject = o, this.equipCheckObject = u, this.isSearchStatus = !1, this.searchStatusGroupObject = {}, this.aliasName = a;
67
+ class A extends m {
68
+ constructor(t, e, i, o, u, a) {
69
+ super(), this.equipControllObject = i, this.groupNodeObject = t, this.nodesMap = e, this.controlObject = o, this.equipCheckObject = u, this.isSearchStatus = !1, this.searchStatusGroupObject = {}, this.aliasName = a;
70
70
  }
71
71
  resetCheckedStatus() {
72
- Object.values(this.nodesMap).forEach((e) => {
73
- this.setCheckStatus(e.key, !1, !1), e.isGroup && !e.isEquip && (this.clearCheckedEquips(e.key), this.updateEquipSelectCount(e.key, !0)), e.halfCheckedEquips && (e.halfCheckedEquips = []);
74
- }), Object.keys(this.equipCheckObject).forEach((e) => {
75
- this.setEquipCheckObject(e, !1, !1, this.equipCheckObject[e].groupId);
76
- });
72
+ Object.values(this.nodesMap).forEach((t) => {
73
+ this.setCheckStatus(t.key, !1, !1);
74
+ }), Object.keys(this.equipCheckObject).forEach((t) => delete this.equipCheckObject[t]), this.updateGroupCheckStatus();
77
75
  }
78
- // 搜索状态下,更新分组选中状态
76
+
79
77
  /**
80
- * 1:备份原有选中的设备数据量,父级分组Id
81
- * 2:清空之前分组的设备选中数量
82
- * 3:依照搜索结果,重新计算分组选中的设备数据量
83
- * */
84
- reComputedCheckNum(e) {
85
- this.isSearchStatus = e, this.isSearchStatus ? (Object.values(this.groupNodeObject).forEach((t) => {
86
- this.searchStatusGroupObject[t.key] = {
87
- groupId: t.groupId,
88
- equipSelectCount: t.equipSelectCount,
89
- halfCheckedEquips: t.halfCheckedEquips,
90
- ...this.searchStatusGroupObject[t.key]
91
- };
92
- }), Object.values(this.groupNodeObject).forEach((t) => {
93
- this.updateEquipSelectCount(t.key, !0), t.halfCheckedEquips = [];
94
- }), Object.values(this.groupNodeObject).forEach((t) => {
95
- (this.window[`group-${t.key}-search`] || []).forEach((o) => {
96
- this.equipCheckObject[o.equipNo] && this.equipCheckObject[o.equipNo].checked ? this.updateEquipSelectCount(t.key, !1, 1) : this.equipCheckObject[o.equipNo] && this.equipCheckObject[o.equipNo].indeterminate && t.halfCheckedEquips.push(o.equipNo);
97
- });
98
- })) : (Object.values(this.groupNodeObject).forEach((t) => {
99
- let i = this.searchStatusGroupObject[t.key];
100
- i && (t.equipSelectCount = i.equipSelectCount, t.halfCheckedEquips = [...i.halfCheckedEquips, ...t.halfCheckedEquips], t.halfCheckedEquips = [...new Set(t.halfCheckedEquips)]);
101
- }), this.searchStatusGroupObject = {});
78
+ * 搜索状态下,更新分组选中状态
79
+ * 新方案:直接调用 updateGroupCheckStatus 重新计算
80
+ */
81
+ reComputedCheckNum(t) {
82
+ this.isSearchStatus = t, this.updateGroupCheckStatus();
102
83
  }
103
84
  // 根据传过来的设备选中数据、回显选中状态
104
85
  /**
105
- * 1:记录进全局设备选中状态
106
- * 2:设备设备选中状态
107
- * 3:更新分组选中的设备数量
108
- * 4:更新展开的设备控制项选中状态
109
- * 5:更新分组选中状态
110
- * */
111
- updateCheckedStatusWithEquips(e) {
112
- window.setTimeout(() => {
113
- for (let t = 0, i = e.length; t < i; t++) {
114
- let o = this.window.equipCache && this.window.equipCache[e[t]];
115
- o && o.groupId && (this.setEquipCheckObject(e[t], !0, !1, o.groupId), this.setCheckStatus(`${o.groupId}-${e[t]}`, !0, !1), this.updateEquipSelectCount(o.groupId, !1, 1), this.updateExpandControlCheckStatus(o.groupId, e[t]));
86
+ * 支持两种数据格式:
87
+ * 格式1:纯 equipNo 数组,如 [1, 2, 3],选中该设备在所有分组下的实例
88
+ * 格式2:{ groupId: [equipNo1, equipNo2] } 对象,如 { 2: [1, 2], 3: [5] },只选中指定分组下的设备
89
+ *
90
+ * 注意:此方法只负责将选中状态写入 equipCheckObject,不调用 updateGroupCheckStatus。
91
+ * 分组状态的更新由调用方在合适的时机(数据就绪后)统一调用。
92
+ */
93
+ updateCheckedStatusWithEquips(t) {
94
+ let e = [];
95
+ Array.isArray(t) ? e = t.map((i) => ({ equipNo: i, groupId: null })) : t !== null && typeof t == "object" && Object.keys(t).forEach((i) => {
96
+ Array.isArray(t[i]) && t[i].forEach((o) => {
97
+ e.push({ equipNo: o, groupId: Number(i) });
98
+ });
99
+ });
100
+ for (let i = 0, o = e.length; i < o; i++) {
101
+ const { equipNo: u, groupId: a } = e[i];
102
+ if (a != null) {
103
+ const h = `${a}-${u}`;
104
+ this.setEquipCheckObject(h, !0, !1, a), this.setCheckStatus(h, !0, !1), this.updateExpandControlCheckStatus(a, u);
105
+ } else {
106
+ const h = this.window.equipCache && this.window.equipCache[u];
107
+ h && (h.groupIds || (h.groupId ? [h.groupId] : [])).forEach((n) => {
108
+ const c = `${n}-${u}`;
109
+ this.setEquipCheckObject(c, !0, !1, n), this.setCheckStatus(c, !0, !1), this.updateExpandControlCheckStatus(n, u);
110
+ });
116
111
  }
117
- this.updateGroupCheckStatus();
118
- }, 200);
112
+ }
119
113
  }
120
114
  // 更新展开的设备控制项选中状态
121
- updateExpandControlCheckStatus(e, t) {
122
- let i = this.nodesMap[`${e}-${t}`];
115
+ updateExpandControlCheckStatus(t, e) {
116
+ let i = this.nodesMap[`${t}-${e}`];
123
117
  i && i.settings && i.settings.length && i.settings.forEach((o) => {
124
- this.nodesMap[`${e}-${t}-${o.setNo}`] && this.setCheckStatus(`${e}-${t}-${o.setNo}`, !0, !1);
118
+ this.nodesMap[`${t}-${e}-${o.setNo}`] && this.setCheckStatus(`${t}-${e}-${o.setNo}`, !0, !1);
125
119
  });
126
120
  }
127
121
  // 根据传过来的设备控制项,回显设备分组选中状态
128
122
  /**
129
- * 1:记录全局设备控制项选中
130
- * 2:设置设备和设备控制项选中状态
131
- * 3:记录分组的半选设备
132
- * 4:记录全局设备半选状态
133
- * 5:更新分组选中状态
134
- * */
135
- updateCheckedStatusWithControls(e) {
136
- window.setTimeout(() => {
137
- for (let t = 0, i = e.length; t < i; t++) {
138
- let o = e[t].split("."), u = o[0], a = o[1];
139
- if (this.equipControllObject[u] || (this.equipControllObject[u] = []), this.equipControllObject[u].push(Number(a)), this.window.equipCache && this.window.equipCache[u]) {
140
- let r = this.window.equipCache[u].groupId, h = `${r}-${u}-${a}`;
141
- this.nodesMap[h] && this.setCheckStatus(h, !0, !1), this.nodesMap[`${r}-${u}`] && this.setCheckStatus(`${r}-${u}`, !1, !0), this.nodesMap[`${r}`].halfCheckedEquips && this.nodesMap[`${r}`].halfCheckedEquips.push(u), this.setEquipCheckObject(u, !1, !0, r);
142
- }
123
+ * 注意:此方法只负责将控制项状态写入 equipControllObject/equipCheckObject,不调用 updateGroupCheckStatus。
124
+ * 分组状态的更新由调用方在合适的时机(数据就绪后)统一调用。
125
+ */
126
+ updateCheckedStatusWithControls(t) {
127
+ for (let e = 0, i = t.length; e < i; e++) {
128
+ let o = t[e], u, a, h;
129
+ if (o !== null && typeof o == "object" && !Array.isArray(o)) { u = o.equipNo, a = o.setNo, h = o.groupId; } else {
130
+ let n = o.split(".");
131
+ u = n[0], a = n[1], h = null;
143
132
  }
144
- this.updateGroupCheckStatus();
145
- }, 100);
133
+ this.equipControllObject[u] || (this.equipControllObject[u] = []), this.equipControllObject[u].push(Number(a));
134
+ const r = this.window.equipCache && this.window.equipCache[u];
135
+ r && (h != null ? [h] : r.groupIds || (r.groupId ? [r.groupId] : [])).forEach((c) => {
136
+ const g = `${c}-${u}`, l = `${c}-${u}-${a}`;
137
+ this.nodesMap[l] && this.setCheckStatus(l, !0, !1), this.nodesMap[g] && this.setCheckStatus(g, !1, !0), this.setEquipCheckObject(g, !1, !0, c);
138
+ });
139
+ }
146
140
  }
147
- // 更新分组选中状态
141
+ // 更新分组选中状态------------------------------------------------------------------------------------
142
+ /**
143
+ * 新方案:基于 equipCheckObject 实时计算分组状态,而不是依赖中间状态
144
+ * 优点:状态判断准确,不会累积误差
145
+ */
148
146
  updateGroupCheckStatus() {
149
- Object.values(this.groupNodeObject).forEach((e) => {
150
- e.count > 0 && e.count == e.equipSelectCount ? this.setCheckStatus(e.key, !0, !1) : e.count && e.equipSelectCount && e.count > e.equipSelectCount || e.halfCheckedEquips.length ? this.setGroupHalfChecked(e.key) : this.setCheckStatus(e.key, !1, !1);
147
+ this.getSortedGroupsByLevel().forEach((e) => {
148
+ const i = this.computeGroupStatus(e.key);
149
+ this.setCheckStatus(e.key, i.checked, i.indeterminate), e.equipSelectCount = i.selectCount;
151
150
  });
152
151
  }
153
- // 设置父级分组半选状态
154
- setGroupHalfChecked(e) {
155
- this.nodesMap[e] && this.setCheckStatus(e, !1, !0), this.nodesMap[e].groupId && this.setGroupHalfChecked(this.nodesMap[e].groupId);
152
+ // 按层级排序分组(从深到浅,确保子分组先处理)
153
+ getSortedGroupsByLevel() {
154
+ return Object.values(this.groupNodeObject).sort((t, e) => e.level - t.level);
155
+ }
156
+ // 计算单个分组的选中状态
157
+ /**
158
+ * @returns {Object} { checked, indeterminate, selectCount }
159
+ */
160
+ computeGroupStatus(t) {
161
+ const e = this.groupNodeObject[t];
162
+ if (!e) { return { checked: !1, indeterminate: !1, selectCount: 0 }; }
163
+ const i = this.isSearchStatus ? this.window[`group-${t}-search`] || [] : this.window[`group-${t}${this.aliasName}`] || [];
164
+ let o = 0;
165
+ i.forEach((g) => {
166
+ const l = `${t}-${g.equipNo}`;
167
+ this.equipCheckObject[l] && this.equipCheckObject[l].checked && o++;
168
+ });
169
+ let u = 0, a = 0, h = !1, r = !1;
170
+ e.groups && e.groups.length > 0 && e.groups.forEach((g) => {
171
+ const l = this.nodesMap[g.key];
172
+ l && (l.checked ? (u += l.count || 0, h = !0) : l.indeterminate ? (r = !0, h = !0) : r = !0, a += l.count || 0);
173
+ });
174
+ const n = o + u, c = e.count || 0;
175
+ return c === 0 ? { checked: !1, indeterminate: !1, selectCount: 0 } : n === 0 ? h ? { checked: !1, indeterminate: !0, selectCount: n } : { checked: !1, indeterminate: !1, selectCount: 0 } : n === c && !r ? { checked: !0, indeterminate: !1, selectCount: n } : { checked: !1, indeterminate: !0, selectCount: n };
156
176
  }
157
177
  // 设置设备控制项状态
158
- setControlStatus(e, t, i, o) {
159
- e && e.forEach((u) => {
160
- this.nodesMap[`${t}-${i}-${u.setNo}`] && this.setCheckStatus(`${t}-${i}-${u.setNo}`, o, !1);
178
+ setControlStatus(t, e, i, o) {
179
+ t && t.forEach((u) => {
180
+ this.nodesMap[`${e}-${i}-${u.setNo}`] && this.setCheckStatus(`${e}-${i}-${u.setNo}`, o, !1);
161
181
  });
162
182
  }
163
183
  // 更新设备控制项选中状态
184
+ /**
185
+ * 改造点:controlObject 键格式统一为 ${groupId}-${equipNo}
186
+ * */
164
187
  updateControlCheckStatus() {
165
- Object.keys(this.controlObject).forEach((e) => {
166
- let t = this.nodesMap[`${this.controlObject[e].groupId}-${e}`];
167
- if (t) {
168
- if (t.checked) {
169
- let i = t.settings;
170
- this.setControlStatus(i, this.controlObject[e].groupId, e, !0);
171
- } else if (!t.checked && !t.indeterminate) {
172
- let i = t.settings;
173
- this.setControlStatus(i, this.controlObject[e].groupId, e, !1);
188
+ Object.keys(this.controlObject).forEach((t) => {
189
+ const [e, i] = t.split("-");
190
+ let o = this.nodesMap[t];
191
+ if (o) {
192
+ if (o.checked) {
193
+ let u = o.settings;
194
+ this.setControlStatus(u, e, i, !0);
195
+ } else if (!o.checked && !o.indeterminate) {
196
+ let u = o.settings;
197
+ this.setControlStatus(u, e, i, !1);
174
198
  } else {
175
- this.equipControllObject[e] && this.equipControllObject[e].forEach((i) => {
176
- let o = `${this.controlObject[e].groupId}-${e}-${i}`;
177
- this.nodesMap[o] && this.setCheckStatus(o, !0, !1);
199
+ this.equipControllObject[i] && this.equipControllObject[i].forEach((u) => {
200
+ let a = `${e}-${i}-${u}`;
201
+ this.nodesMap[a] && this.setCheckStatus(a, !0, !1);
178
202
  });
179
203
  }
180
204
  }
@@ -182,358 +206,340 @@ class L extends N {
182
206
  }
183
207
  // 获取选中的分组
184
208
  getGroupChecked() {
185
- let e = [];
186
- return Object.keys(this.groupNodeObject).forEach((t) => {
187
- this.groupNodeObject[t].checked && e.push(t);
188
- }), e;
209
+ let t = [];
210
+ return Object.keys(this.groupNodeObject).forEach((e) => {
211
+ this.groupNodeObject[e].checked && t.push(e);
212
+ }), t;
189
213
  }
190
214
  // 获取选中设备
191
215
  getEquipSelectd() {
192
- let e = [];
193
- return Object.keys(this.equipCheckObject).forEach((t) => {
194
- this.equipCheckObject[t].checked && e.push(Number(t));
216
+ let t = [], e = /* @__PURE__ */ new Set();
217
+ return Object.keys(this.equipCheckObject).forEach((i) => {
218
+ if (this.equipCheckObject[i].checked) {
219
+ try {
220
+ e.add(Number(i.split("-")[1]));
221
+ } catch (o) {
222
+ console.log(o);
223
+ }
224
+ }
225
+ }), t = Array.from(e), t;
226
+ }
227
+ // 获取选中设备(携带分组)
228
+ getEquipGroupSelectd() {
229
+ let t = Object.keys(this.equipCheckObject);
230
+ return t.length > 0 && (t = this.returnArray(t)), t;
231
+ }
232
+ returnArray(t) {
233
+ const e = [];
234
+ return t.forEach((i) => {
235
+ const [o, u] = i.split("-"), a = parseInt(u);
236
+ isNaN(a) || e.push(a);
195
237
  }), e;
196
238
  }
197
- // 获取选中的设备控制箱
198
- getControlSelected() {
199
- let e = [];
200
- return Object.keys(this.equipControllObject).forEach((t) => {
201
- e.push(...this.equipControllObject[t].map((i) => `${t}.${i}`));
239
+ // 解析设备数组为分组格式
240
+ parseEquipArrayToGroupFormat(t) {
241
+ const e = {};
242
+ return t.forEach((i) => {
243
+ const [o, u] = i.split("-"), a = parseInt(o);
244
+ isNaN(a) || (e[a] || (e[a] = []), e[a].push(parseInt(u)));
202
245
  }), e;
203
246
  }
247
+ // 获取选中的设备控制项
248
+ getControlSelected() {
249
+ let t = [];
250
+ return Object.keys(this.equipControllObject).forEach((e) => {
251
+ t.push(...this.equipControllObject[e].map((i) => `${e}.${i}`));
252
+ }), t;
253
+ }
204
254
  // 点击选中
205
255
  /**
206
256
  * 1:如果是分组选择,触发分组选中事件
207
257
  * 2:如果是设备选择,触发设备选中事件
208
258
  * 3:如果是设备控制项选择,触发设备控制项选中事件
209
259
  * */
210
- onChecked(e, t) {
211
- this.isSearchStatus = t || !1, e.isGroup && !e.isEquip ? this.selectGroup(e) : e.isEquip ? this.selectEquip(e) : e.isSetting && this.selectControl(e);
260
+ onChecked(t, e) {
261
+ this.isSearchStatus = e || !1, t.isGroup && !t.isEquip ? this.selectGroup(t) : t.isEquip ? this.selectEquip(t) : t.isSetting && this.selectControl(t);
212
262
  }
213
263
  // 从全局映射中,设置节点选中状态
214
- setCheckStatus(e, t, i) {
215
- this.nodesMap[e] && (this.nodesMap[e].checked = t, this.nodesMap[e].isGroup && (this.nodesMap[e].indeterminate = i));
216
- }
217
- // 清除选中的设备
218
- clearCheckedEquips(e) {
219
- this.groupNodeObject[e] && (this.groupNodeObject[e].equipSelectCount = 0, this.groupNodeObject[e].halfCheckedEquips && this.groupNodeObject[e].halfCheckedEquips.forEach((t) => {
220
- this.equipControllObject[t] && this.equipControllObject[t].forEach((i) => {
221
- this.setCheckStatus(`${e}-${t}-${i}`, !1, !1);
222
- });
223
- }), this.groupNodeObject[e].halfCheckedEquips = [], this.groupNodeObject[e].groupId && this.clearCheckedEquips(this.groupNodeObject[e].groupId));
224
- }
225
- // 搜索状态下,更新分组选中的设备数量
226
- updateSearchStatusObject(e, t) {
227
- this.searchStatusGroupObject[e] && (this.searchStatusGroupObject[e].equipSelectCount = this.searchStatusGroupObject[e].equipSelectCount + t, this.searchStatusGroupObject[e].groupId && this.updateSearchStatusObject(this.searchStatusGroupObject[e].groupId, t));
228
- }
229
- // 更新分组设备选中数量
230
- updateEquipSelectCount(e, t, i) {
231
- this.nodesMap[e] && (t ? this.nodesMap[e].equipSelectCount = 0 : this.nodesMap[e].equipSelectCount = this.nodesMap[e].equipSelectCount + i, this.nodesMap[e].groupId && this.updateEquipSelectCount(this.nodesMap[e].groupId, t, i));
264
+ setCheckStatus(t, e, i, o) {
265
+ this.nodesMap[t] && (this.nodesMap[t].checked = e, this.nodesMap[t].isGroup && (this.nodesMap[t].indeterminate = i));
232
266
  }
233
267
  // 保存全局设备选中状态
234
- setEquipCheckObject(e, t, i, o) {
235
- this.equipCheckObject[e] || (this.equipCheckObject[e] = {}), this.equipCheckObject[e].checked = t, this.equipCheckObject[e].indeterminate = i, this.equipCheckObject[e].groupId = o;
236
- }
237
- // 更新当前展开的分组所选中的设备、设置分组选中的设备数量、更新选中状态(已经实例化的节点)
238
- updateEquipSelect(e, t, i, o) {
239
- this.nodesMap[e] && t.length && t.forEach((u) => {
240
- i ? (this.setEquipCheckObject(u.equipNo, !0, !1, e), this.nodesMap[`${e}-${u.equipNo}`] && this.setCheckStatus(`${e}-${u.equipNo}`, !0, !1)) : (this.setEquipCheckObject(u.equipNo, !1, !1, e), this.nodesMap[`${e}-${u.equipNo}`] && this.setCheckStatus(`${e}-${u.equipNo}`, !1, !1)), this.equipControllObject[u.equipNo] && delete this.equipControllObject[u.equipNo], this.nodesMap[e].halfCheckedEquips.includes(u.equipNo) && (this.nodesMap[e].halfCheckedEquips = this.nodesMap[e].halfCheckedEquips.filter((a) => a != u.equipNo), this.searchStatusGroupObject[e] && (this.searchStatusGroupObject[e].halfCheckedEquips = this.nodesMap[e].halfCheckedEquips));
241
- });
242
- }
243
- // 根据分组更新选中的设备,全选分组或者取消选择分组时调用
244
- /**
245
- * 1:统计需要更新的设备数量
246
- * 2:把所有子孙分组设备全部统计,并且记录所有当前分组选中的设备,更新除分组之外的选中状态(已经实例化的节点)
247
- * 3:更新自身设备选择数量、向上级分组累加已经选中的设备数量
248
- * 4:更新搜索状态下分组副本数据
249
- * */
250
- // list(Array):所要更新的分组,type(String):更新类型,add为新增,delete为删除;
251
- updateGroupSelect(e, t) {
252
- e.forEach((i) => {
253
- if (this.groupNodeObject[i]) {
254
- this.groupNodeObject[i].groups && this.groupNodeObject[i].groups.length > 0 && this.updateGroupSelect(this.groupNodeObject[i].groups.map((h) => h.key), t);
255
- let o = this.window[`group-${i}${this.aliasName}`] || [];
256
- this.isSearchStatus && (o = this.window[`group-${i}-search`] || []);
257
- let u = 0, a = 0;
258
- o.forEach((h) => {
259
- let c = this.equipCheckObject[h.equipNo];
260
- !c || !c.checked ? u++ : a--;
261
- });
262
- let r = t ? u : a;
263
- this.updateEquipSelect(i, o, t, r), this.updateEquipSelectCount(i, !1, r), this.updateSearchStatusObject(i, r);
264
- }
265
- });
266
- }
267
- // 清除分组挂载的半选设备
268
- clearHalfCheckedEquips(e) {
269
- e.forEach((t) => {
270
- this.groupNodeObject[t].halfCheckedEquips && this.groupNodeObject[t].halfCheckedEquips.forEach((i) => {
271
- this.equipControllObject[i] && this.equipControllObject[i].forEach((o) => {
272
- this.setCheckStatus(`${t}-${i}-${o}`, !1, !1);
273
- });
274
- }), this.groupNodeObject[t].halfCheckedEquips = [], this.groupNodeObject[t].groups && this.groupNodeObject[t].groups.length > 0 && this.clearHalfCheckedEquips(this.groupNodeObject[t].groups.map((i) => i.key));
275
- });
268
+ setEquipCheckObject(t, e, i, o) {
269
+ this.equipCheckObject[t] || (this.equipCheckObject[t] = {}), this.equipCheckObject[t].checked = e, this.equipCheckObject[t].indeterminate = i, this.equipCheckObject[t].groupId = o, !e && !i && delete this.equipCheckObject[t];
276
270
  }
277
271
  // 触发分组选择
278
- /**
279
- * 1:清除之前半选设备
280
- * 2:更新分组中设备选择
281
- * 3:更新所有分组选中状态
282
- * 4:更新控制项选中状态
283
- * */
284
- selectGroup(e) {
285
- this.clearHalfCheckedEquips([e.key]), this.updateGroupSelect([e.key], e.checked), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
272
+ selectGroup(t) {
273
+ this.updateAllEquipStatus(t.key, t.checked), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
274
+ }
275
+ // 更新分组下所有设备的选中状态
276
+ updateAllEquipStatus(t, e) {
277
+ const i = this.groupNodeObject[t];
278
+ if (!i) { return; }
279
+ (this.isSearchStatus ? this.window[`group-${t}-search`] || [] : this.window[`group-${t}${this.aliasName}`] || []).forEach((u) => {
280
+ const a = `${t}-${u.equipNo}`;
281
+ this.setEquipCheckObject(a, e, !1, t), this.nodesMap[a] && this.setCheckStatus(a, e, !1);
282
+ }), i.groups && i.groups.length > 0 && i.groups.forEach((u) => {
283
+ this.updateAllEquipStatus(u.key, e);
284
+ });
286
285
  }
287
286
  // 触发设备选择
288
287
  /**
289
- * 1:更新分组选择的设备
290
- * 2:更新分组所选择的设备数量
291
- * 3:更新控制项选中状态
292
- * 4:更新分组状态
293
- * */
294
- selectEquip(e) {
295
- if (this.nodesMap[e.groupId]) {
296
- let t = [{ equipNo: e.equipNo }], i = (e.checked ? 1 : -1) * t.length;
297
- this.updateEquipSelect(e.groupId, t, e.checked, i), this.updateEquipSelectCount(e.groupId, !1, i), this.updateSearchStatusObject(e.groupId, i), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
298
- }
288
+ * 新方案:简化逻辑,只更新设备状态,分组状态由 updateGroupCheckStatus 统一计算
289
+ */
290
+ selectEquip(t) {
291
+ const e = `${t.groupId}-${t.equipNo}`;
292
+ this.setEquipCheckObject(e, t.checked, !1, t.groupId), this.nodesMap[e] && this.setCheckStatus(e, t.checked, !1), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
299
293
  }
300
294
  // 更新设备控制项存储
301
- updateEquipControl(e, t, i) {
302
- this.equipControllObject[e] || (this.equipControllObject[e] = []), i ? this.equipControllObject[e].push(t) : this.equipControllObject[e] = this.equipControllObject[e].filter((o) => o != t);
295
+ updateEquipControl(t, e, i) {
296
+ this.equipControllObject[t] || (this.equipControllObject[t] = []), i ? this.equipControllObject[t].push(e) : this.equipControllObject[t] = this.equipControllObject[t].filter((o) => o != e);
303
297
  }
304
298
  // 触发控制项选择
305
299
  /**
306
- * 1:更新设备控制项
307
- * 2:更新设备选中状态
308
- (1)选择情况下:
309
- 1)如果设备即将全选,清除分组中半选设备、清除设备控制项记录(equipControllObject),分组全选设备数组+1,半选设备数组中有则-1,设置设备全选
310
- 2) 如果之前设备没选择情况下(非半选情况下),分组中半选设备数组+1,设置设备半选
311
- 3)如果设备是半选状态。不做处理
312
- (2)取消选择情况下
313
- 1)如果设备是全选情况下、分组全选设备数组-1
314
- 1)如果不仅有一个测点,设备半选分组+1,设备控制项(equipControllObject)记录剩余设备,设置设备半选
315
- 2)如果仅有一个测点,设置设备不选
316
- 2) 如果设备是半选情况下,如果还是半选,不做处理,如果从半选到不选情况下,分组挂载的半选分组-1,设备控制项有则-1,设置设备不选
317
- * 3:更新分组状态
318
- * */
319
- selectControl(e) {
320
- let t = this.nodesMap[`${e.groupId}-${e.equipNo}`];
321
- t && (this.updateEquipControl(e.equipNo, e.setNo, e.checked), e.checked ? t.settings && t.settings.length == this.equipControllObject[e.equipNo].length ? (delete this.equipControllObject[e.equipNo], this.updateEquipSelectCount(e.groupId, !1, 1), this.updateSearchStatusObject(e.groupId, 1), this.nodesMap[e.groupId].halfCheckedEquips = this.nodesMap[e.groupId].halfCheckedEquips.filter((i) => i != e.equipNo), this.setEquipCheckObject(e.equipNo, !0, !1, e.groupId), this.setCheckStatus(`${e.groupId}-${e.equipNo}`, !0, !1)) : t && !t.indeterminate && (this.nodesMap[`${e.groupId}`].halfCheckedEquips.push(e.equipNo), this.setCheckStatus(`${e.groupId}-${e.equipNo}`, !1, !0), this.setEquipCheckObject(e.equipNo, !1, !0, e.groupId)) : t.checked ? (this.updateEquipSelectCount(e.groupId, !1, -1), this.updateSearchStatusObject(e.groupId, -1), t.settings.length > 1 ? (this.nodesMap[e.groupId].halfCheckedEquips.push(e.equipNo), t.settings.map((o) => o.setNo).filter((o) => o != e.setNo).forEach((o) => {
322
- this.updateEquipControl(e.equipNo, o, !0);
323
- }), this.setEquipCheckObject(e.equipNo, !1, !0, e.groupId), this.setCheckStatus(`${e.groupId}-${e.equipNo}`, !1, !0)) : (this.setEquipCheckObject(e.equipNo, !1, !1, e.groupId), this.setCheckStatus(`${e.groupId}-${e.equipNo}`, !1, !1))) : t.indeterminate && this.equipControllObject[e.equipNo] && !this.equipControllObject[e.equipNo].length && (this.nodesMap[e.groupId].halfCheckedEquips = this.nodesMap[e.groupId].halfCheckedEquips.filter((i) => i != e.equipNo), this.setEquipCheckObject(e.equipNo, !1, !1, e.groupId), this.setCheckStatus(`${e.groupId}-${e.equipNo}`, !1, !1)), this.updateGroupCheckStatus());
300
+ * 新方案:简化逻辑,只更新控制项和设备状态,分组状态由 updateGroupCheckStatus 统一计算
301
+ */
302
+ selectControl(t) {
303
+ const e = `${t.groupId}-${t.equipNo}`, i = `${t.groupId}-${t.equipNo}-${t.setNo}`, o = this.nodesMap[e];
304
+ if (!o) { return; }
305
+ this.updateEquipControl(t.equipNo, t.setNo, t.checked), this.setCheckStatus(i, t.checked, !1);
306
+ const u = o.settings || [], a = this.equipControllObject[t.equipNo] || [], h = u.length, r = a.length;
307
+ t.checked ? r === h ? (delete this.equipControllObject[t.equipNo], this.setEquipCheckObject(e, !0, !1, t.groupId), this.setCheckStatus(e, !0, !1)) : (this.setEquipCheckObject(e, !1, !0, t.groupId), this.setCheckStatus(e, !1, !0)) : r === 0 ? (this.setEquipCheckObject(e, !1, !1, t.groupId), this.setCheckStatus(e, !1, !1)) : (this.setEquipCheckObject(e, !1, !0, t.groupId), this.setCheckStatus(e, !1, !0)), this.updateGroupCheckStatus();
324
308
  }
325
309
  }
326
- class v extends N {
310
+ class B extends m {
327
311
  // 分组节点扁平化对象、设备扁平化对象、window缓存设备扁平化对象
328
- constructor(e, t) {
329
- super(), this.aliasName = t, this.groupNodeObject = e;
312
+ constructor(t, e) {
313
+ super(), this.aliasName = e, this.groupNodeObject = t;
330
314
  }
331
315
  // 重新计算分组设备数量
332
- resetGroupNum(e) {
316
+ resetGroupNum(t, e, i) {
333
317
  this.clearAllEquipNum();
334
- for (let t in this.groupNodeObject) {
335
- let i = [];
336
- e ? i = this.window[`group-${t}-search`] : i = this.window[`group-${t}${this.aliasName}`];
337
- let o = i ? i.length : 0;
338
- o && (this.groupNodeObject[t].equipCount = o, this.setGroupNum(t, o));
318
+ for (let o in this.groupNodeObject) {
319
+ let u = [];
320
+ t ? u = this.window[`group-${o}-search`] : u = this.window[`group-${o}${this.aliasName}`], e && u && u.length && (u = u.filter((h) => i[h.equipNo] === 2));
321
+ let a = u ? u.length : 0;
322
+ this.groupNodeObject[o].equipCount = a, a && this.setGroupNum(o, a);
339
323
  }
340
324
  }
341
325
  clearAllEquipNum() {
342
- for (let e in this.groupNodeObject) { this.groupNodeObject[e].equipCount = 0, this.groupNodeObject[e].count = 0; }
326
+ for (let t in this.groupNodeObject) { this.groupNodeObject[t].equipCount = 0, this.groupNodeObject[t].count = 0; }
343
327
  }
344
328
  // 设置分组设备数量
345
- setGroupNum(e, t) {
346
- this.groupNodeObject[e] && (this.groupNodeObject[e].count = Number(this.groupNodeObject[e].count) + Number(t), this.setGroupNum(this.groupNodeObject[e].groupId, t));
329
+ setGroupNum(t, e) {
330
+ this.groupNodeObject[t] && (this.groupNodeObject[t].count = Number(this.groupNodeObject[t].count) + Number(e), this.setGroupNum(this.groupNodeObject[t].groupId, e));
347
331
  }
348
332
  // 获取设备总数
349
333
  getAllEquipsNum() {
350
- let e = 0;
351
- for (let t in this.groupNodeObject) { this.window[`group-${this.groupNodeObject[t].key}${this.aliasName}`] && (e = e + this.window[`group-${this.groupNodeObject[t].key}${this.aliasName}`].length); }
352
- return e;
334
+ let t = 0;
335
+ for (let e in this.groupNodeObject) { this.window[`group-${this.groupNodeObject[e].key}${this.aliasName}`] && (t = t + this.window[`group-${this.groupNodeObject[e].key}${this.aliasName}`].length); }
336
+ return t;
353
337
  }
354
338
  }
355
339
  class $ {
356
- constructor(e, t, i) {
357
- this.url = e, this.connectionId = t, this.equipNo = i, this.signalr = null;
340
+ constructor(t, e, i) {
341
+ this.url = t, this.connectionId = e, this.equipNo = i, this.signalr = null;
358
342
  }
359
343
  openConnect() {
360
- return this.signalr && (this.signalr.stop(), this.signalr = null), this.signalr = new y.HubConnectionBuilder().withUrl(this.url).build(), this.signalr.serverTimeoutInMilliseconds = 5e8, this.signalr.keepaliveintervalinmilliseconds = 5e8, new Promise((e) => {
344
+ return this.signalr && (this.signalr.stop(), this.signalr = null), this.signalr = new T.HubConnectionBuilder().withUrl(this.url).build(), this.signalr.serverTimeoutInMilliseconds = 5e8, this.signalr.keepaliveintervalinmilliseconds = 5e8, new Promise((t) => {
361
345
  this.signalr.start().then(() => {
362
- this.connectionId && this.send(), e(this.signalr);
363
- }).catch((t) => {
364
- console.log(t);
346
+ this.connectionId && this.send(), t(this.signalr);
347
+ }).catch((e) => {
348
+ console.log(e);
365
349
  });
366
350
  });
367
351
  }
368
352
  async send() {
369
353
  try {
370
354
  await this.signalr.invoke(this.connectionId, this.equipNo);
371
- } catch (e) {
372
- console.log("connectHub 连接失败" + e);
355
+ } catch (t) {
356
+ console.log("connectHub 连接失败" + t);
373
357
  }
374
358
  }
375
359
  }
376
- class A extends N {
377
- constructor(e, t, i, o, u) {
378
- super(), this.equipStatusObject = t, this.groupNodeObject = i, this.aleadyUpdateStatus = {}, this.isGetAllEquipStatus = !1, this.nodesMap = e, this.statusChange = o, this.openSignlr(), this.aliasName = u;
360
+ class U extends m {
361
+ constructor(t, e, i, o, u) {
362
+ super(), this.equipStatusObject = e, this.groupNodeObject = i, this.aleadyUpdateStatus = {}, this.isGetAllEquipStatus = !1, this.nodesMap = t, this.statusChange = o, this.openSignlr(), this.aliasName = u;
379
363
  }
380
364
  openSignlr() {
381
- this.equipStatusSignlr = new $("/equipStatusMonitor", "", ""), this.equipStatusSignlr.openConnect().then((e) => {
365
+ this.equipStatusSignlr = new $("/equipStatusMonitor", "", ""), this.equipStatusSignlr.openConnect().then((t) => {
382
366
  try {
383
- e.invoke("GetAllEquipStatus");
384
- } catch (t) {
385
- console.log(t);
367
+ t.invoke("GetAllEquipStatus");
368
+ } catch (e) {
369
+ console.log(e);
386
370
  }
387
- this.subscribeTo(e, "GetAllEquipStatus");
371
+ this.subscribeTo(t, "GetAllEquipStatus");
388
372
  try {
389
- e.invoke("GetEquipChangeStatus");
390
- } catch (t) {
391
- console.log(t);
373
+ t.invoke("GetEquipChangeStatus");
374
+ } catch (e) {
375
+ console.log(e);
392
376
  }
393
- e.onclose(() => {
377
+ t.onclose(() => {
394
378
  this.openSignlr();
395
- }), this.subscribeTo(e, "GetEquipChangeStatus");
379
+ }), this.subscribeTo(t, "GetEquipChangeStatus");
396
380
  });
397
381
  }
398
- subscribeTo(e, t) {
399
- e.off(t), e.on(t, (i) => {
400
- i && i.isSuccess && i.data && (this[t] ? this[t](i.data) : this.notice({ func: t, data: i.data, key: i.groupId }));
382
+ subscribeTo(t, e) {
383
+ t.off(e), t.on(e, (i) => {
384
+ i && i.isSuccess && i.data && (this[e] ? this[e](i.data) : this.notice({ func: e, data: i.data, key: i.groupId }));
401
385
  });
402
386
  }
403
- GetAllEquipStatus(e) {
404
- this.isGetAllEquipStatus = !0, this.resetGroupStatus(), Object.keys(e).forEach((t) => {
405
- this.equipStatusObject[t] = e[t];
406
- }), Object.keys(this.groupNodeObject).forEach((t) => {
407
- this.updateByGroup(t);
387
+ GetAllEquipStatus(t) {
388
+ this.isGetAllEquipStatus = !0, this.resetGroupStatus(), Object.keys(t).forEach((e) => {
389
+ this.equipStatusObject[e] = t[e];
390
+ }), Object.keys(this.groupNodeObject).forEach((e) => {
391
+ this.updateByGroup(e);
408
392
  });
409
393
  }
410
- updateByGroup(e) {
411
- if (!this.aleadyUpdateStatus[e]) {
412
- let t = this.window[`group-${e}${this.aliasName}`] || [];
413
- t.length && (this.aleadyUpdateStatus[e] = !0, t.forEach((i) => {
414
- this.equipStatusObject[i.equipNo] == 0 || this.equipStatusObject[i.equipNo] == 2 ? this.setGroupStatus(e, !0, 2) : this.equipStatusObject[i.equipNo] == 6 && this.setGroupStatus(e, !0, 6), this.nodesMap[`${e}-${i.equipNo}`] && (this.nodesMap[`${e}-${i.equipNo}`].status = this.equipStatusObject[i.equipNo]);
394
+ updateByGroup(t) {
395
+ if (!this.aleadyUpdateStatus[t]) {
396
+ let e = this.window[`group-${t}${this.aliasName}`] || [];
397
+ e.length && (this.aleadyUpdateStatus[t] = !0, e.some((i) => this.equipStatusObject[i.equipNo] == 0) && !e.some((i) => this.equipStatusObject[i.equipNo] == 2 || this.equipStatusObject[i.equipNo] == 6) && this.setOfflineStatus(t, e), e.forEach((i) => {
398
+ this.equipStatusObject[i.equipNo] == 2 ? this.setGroupStatus(t, !0, 2) : this.equipStatusObject[i.equipNo] == 6 && this.setGroupStatus(t, !0, 6), this.nodesMap[`${t}-${i.equipNo}`] && (this.nodesMap[`${t}-${i.equipNo}`].status = this.equipStatusObject[i.equipNo]);
415
399
  }));
416
400
  }
417
401
  }
418
- updateGroupStatus(e) {
419
- this.isGetAllEquipStatus && this.updateByGroup(e);
402
+ updateGroupStatus(t) {
403
+ this.isGetAllEquipStatus && this.updateByGroup(t);
420
404
  }
421
- GetEquipChangeStatus(e) {
422
- this.setStatus(e);
405
+ GetEquipChangeStatus(t) {
406
+ this.setStatus(t);
423
407
  }
424
408
  // 设置分组状态 key:扁平化数据中节点索引;type:类型(增加,减少);status:状态(报警2、双机热备6)
425
- setGroupStatus(e, t, i) {
426
- t ? i == 2 ? (this.nodesMap[e].alarmCounts = this.nodesMap[e].alarmCounts + 1, this.nodesMap[e].alarmCounts > 0 && (this.nodesMap[e].status = 2)) : (this.nodesMap[e].backUpCounts = this.nodesMap[e].backUpCounts + 1, this.nodesMap[e].alarmCounts == 0 && this.nodesMap[e].backUpCounts > 0 && (this.nodesMap[e].status = 6)) : i == 2 ? (this.nodesMap[e].alarmCounts = this.nodesMap[e].alarmCounts - 1, this.nodesMap[e].alarmCounts == 0 && (this.nodesMap[e].status = 1)) : (this.nodesMap[e].backUpCounts = this.nodesMap[e].backUpCounts - 1, this.nodesMap[e].alarmCounts == 0 && (this.nodesMap[e].backUpCounts == 0 ? this.nodesMap[e].status = 1 : this.nodesMap[e].status = 6)), this.nodesMap[e].groupId && this.setGroupStatus(this.nodesMap[e].groupId, t, i);
409
+ setGroupStatus(t, e, i) {
410
+ e ? i == 2 ? (this.nodesMap[t].alarmCounts = this.nodesMap[t].alarmCounts + 1, this.nodesMap[t].alarmCounts > 0 && (this.nodesMap[t].status = 2)) : (this.nodesMap[t].backUpCounts = this.nodesMap[t].backUpCounts + 1, this.nodesMap[t].alarmCounts == 0 && this.nodesMap[t].backUpCounts > 0 && (this.nodesMap[t].status = 6)) : i == 2 ? (this.nodesMap[t].alarmCounts = this.nodesMap[t].alarmCounts - 1, this.nodesMap[t].alarmCounts == 0 && (this.nodesMap[t].status = 1)) : (this.nodesMap[t].backUpCounts = this.nodesMap[t].backUpCounts - 1, this.nodesMap[t].alarmCounts == 0 && (this.nodesMap[t].backUpCounts == 0 ? this.nodesMap[t].status = 1 : this.nodesMap[t].status = 6)), this.nodesMap[t].groupId && this.setGroupStatus(this.nodesMap[t].groupId, e, i);
411
+ }
412
+ setOfflineStatus(t) {
413
+ this.nodesMap[t].status != 2 && this.nodesMap[t].status != 6 && (this.nodesMap[t].status = 0, this.nodesMap[t].groupId && this.setOfflineStatus(this.nodesMap[t].groupId));
414
+ }
415
+ // 获取设备所属的所有分组ID
416
+ // 优先从 groupCache 反查(按分组隔离存储,数据准确),兜底从 equipCache 获取
417
+ getEquipGroupIds(t) {
418
+ const e = [];
419
+ if (this.window.groupCache && Object.keys(this.window.groupCache).forEach((i) => {
420
+ this.window.groupCache[i] && this.window.groupCache[i][t] && e.push(Number(i));
421
+ }), e.length === 0) {
422
+ const i = this.window.equipCache && this.window.equipCache[t];
423
+ if (i) {
424
+ if (i.groupIds && i.groupIds.length > 0) { return i.groupIds; }
425
+ i.groupId && e.push(i.groupId);
426
+ }
427
+ }
428
+ return e;
427
429
  }
428
- setStatus(e) {
429
- let t = this.equipStatusObject[e.equipNo], i = this.window.equipCache && this.window.equipCache[e.equipNo] && this.window.equipCache[e.equipNo].groupId;
430
- if (e.status != 3 && i) {
431
- switch (e.status) {
430
+ setStatus(t) {
431
+ let e = this.equipStatusObject[t.equipNo];
432
+ const i = this.getEquipGroupIds(t.equipNo);
433
+ t.status != 3 && i.length > 0 && (i.forEach((o) => {
434
+ switch (t.status) {
432
435
  case 0:
433
- t != 0 && this.setGroupStatus(i, !0, 2), t == 6 && this.setGroupStatus(i, !1, 6);
436
+ e == 6 && this.setGroupStatus(o, !1, 6);
434
437
  break;
435
438
  case 1:
436
- t == 6 ? this.setGroupStatus(i, !1, 6) : (t == 2 || t == 0) && this.setGroupStatus(i, !1, 2);
439
+ e == 6 ? this.setGroupStatus(o, !1, 6) : e == 2 && this.setGroupStatus(o, !1, 2);
437
440
  break;
438
441
  case 2:
439
- t != 2 && this.setGroupStatus(i, !0, 2), t == 6 && this.setGroupStatus(i, !1, 6);
442
+ e != 2 && this.setGroupStatus(o, !0, 2), e == 6 && this.setGroupStatus(o, !1, 6);
440
443
  break;
441
444
  case 6:
442
- (t == 2 || t == 0) && this.setGroupStatus(i, !1, 2), t != 6 && this.setGroupStatus(i, !0, 6);
445
+ e == 2 && this.setGroupStatus(o, !1, 2), e != 6 && this.setGroupStatus(o, !0, 6);
443
446
  break;
444
447
  }
445
- this.equipStatusObject[e.equipNo] = e.status;
446
- let o = `${i}-${e.equipNo}`;
447
- this.nodesMap[o] && (this.nodesMap[o].status = e.status), this.statusChange(i, e.equipNo, e.status);
448
- }
448
+ let u = `${o}-${t.equipNo}`;
449
+ this.nodesMap[u] && (this.nodesMap[u].status = t.status);
450
+ }), this.equipStatusObject[t.equipNo] = t.status, this.statusChange(i[0], t.equipNo, t.status));
449
451
  }
450
452
  // 重置分组状态
451
453
  resetGroupStatus() {
452
- for (let e in this.groupNodeObject) { this.groupNodeObject[e].alarmCounts = 0, this.groupNodeObject[e].backUpCount = 0; }
454
+ for (let t in this.groupNodeObject) { this.groupNodeObject[t].alarmCounts = 0, this.groupNodeObject[t].backUpCount = 0; }
453
455
  }
454
456
  }
455
- const B = {
457
+ const W = {
456
458
  getSetParm(s) {
457
- if (window.axios) {
458
- return window.axios({
459
+ if (window.AxiosBuilder.axios) {
460
+ return window.AxiosBuilder.axios({
459
461
  method: "post",
460
462
  url: "/IoT/api/v3/EquipList/GetFullSetParmByEquipNo",
461
463
  params: s,
462
- data: s
464
+ data: s,
465
+ headers: {
466
+ "Content-Type": "application/json;charset=UTF-8",
467
+ "Accept-Language": window.sessionStorage.languageType || "zh-CN"
468
+ }
463
469
  });
464
470
  }
465
471
  }
466
- }, U = Object.assign(
472
+ }, K = Object.assign(
467
473
  {},
468
- B
474
+ W
469
475
  );
470
- class W {
471
- constructor(e, t) {
472
- this.nodesMap = e, this.equipControllObject = t;
476
+ class D {
477
+ constructor(t, e) {
478
+ this.nodesMap = t, this.equipControllObject = e;
473
479
  }
474
480
  // 获取设备控制项
475
- async getSetting(e, t, i, o) {
476
- let [u, a] = String(e).split("-"), r = {
481
+ async getSetting(t, e, i, o) {
482
+ let [u, a] = String(t).split("-"), h = {
477
483
  equipNo: a
478
484
  };
479
- await U.getSetParm(r).then((h) => {
480
- if (h.data.code == 200) {
481
- let c = h && h.data && h.data.data && h.data.data.rows || [];
482
- this.nodesMap[e].settings || (this.nodesMap[e].settings = []), c && c.length > 0 && this.nodesMap[e] && (c.forEach((p) => {
483
- p.title = p.setNm, p.key = `${u}-${a}-${p.setNo}`, p.level = Number(i) + 1, p.checked = o || this.equipControllObject[a] && this.equipControllObject[a].includes(p.setNo), p.isSetting = !0, p.equipNo = a, p.groupId = u, p.equipName = t;
484
- }), this.nodesMap[e].settings = [...c]);
485
+ await K.getSetParm(h).then((r) => {
486
+ if (r.data.code == 200) {
487
+ let n = r && r.data && r.data.data && r.data.data.rows || [];
488
+ this.nodesMap[t].settings || (this.nodesMap[t].settings = []), n && n.length > 0 && this.nodesMap[t] && (n.forEach((c) => {
489
+ c.title = c.setNm, c.key = `${u}-${a}-${c.setNo}`, c.level = Number(i) + 1, c.checked = o || this.equipControllObject[a] && this.equipControllObject[a].includes(c.setNo), c.isSetting = !0, c.equipNo = a, c.groupId = u, c.setNo = c.setNo, c.equipName = e;
490
+ }), this.nodesMap[t].settings = [...n]);
485
491
  }
486
492
  });
487
493
  }
488
494
  }
489
- class d {
490
- static formateList(e, t) {
495
+ class f {
496
+ static formateList(t, e) {
491
497
  let i = [];
492
- for (const o of e) {
498
+ for (const o of t) {
493
499
  let u = {};
494
- u.count = 0, u.equipSelectCount = 0, u.controlSelectCount = 0, u.equipCount = o.equipCount || 0, u.title = o.name, u.key = o.id, u.isGroup = !0, u.children = [], u.status = 1, u.level = t || 1, u.expand = !t, u.equips = [], u.groupId = o.parentId, u.groups = [], u.alarmCounts = 0, u.backUpCounts = 0, u.indeterminate = !1, u.checked = !1, u.visible = !0, u.nodeEquipSelectCount = 0, u.checkedEquips = [], u.halfCheckedEquips = [], u.selectControlCount = 0, o.children && o.children.length > 0 && (u.groups = [
495
- ...this.formateList(o.children, t ? t + 1 : 2)
500
+ u.count = 0, u.equipSelectCount = 0, u.controlSelectCount = 0, u.equipCount = o.equipCount || 0, u.title = o.name, u.key = o.id, u.isGroup = !0, u.children = [], u.status = 1, u.level = e || 1, u.expand = !e, u.equips = [], u.groupId = o.parentId, u.groups = [], u.alarmCounts = 0, u.backUpCounts = 0, u.indeterminate = !1, u.checked = !1, u.visible = !0, u.nodeEquipSelectCount = 0, u.checkedEquips = [], u.halfCheckedEquips = [], u.selectControlCount = 0, o.children && o.children.length > 0 && (u.groups = [
501
+ ...this.formateList(o.children, e ? e + 1 : 2)
496
502
  ]), i.push(u);
497
503
  }
498
504
  return i;
499
505
  }
500
- static deepClone(e, t, i, o, u, a) {
501
- let r = [];
502
- if (e) {
503
- for (let h = 0, c = e.length; h < c; h++) {
504
- r.push(
506
+ static deepClone(t, e, i, o, u, a) {
507
+ let h = [];
508
+ if (t) {
509
+ for (let r = 0, n = t.length; r < n; r++) {
510
+ h.push(
505
511
  {
506
512
  isGroup: i,
507
- key: `${o}-${e[h].id}`,
508
- status: a[e[h].id] || 0,
509
- title: e[h].title,
510
- level: t,
513
+ key: `${o}-${t[r].id}`,
514
+ status: a[t[r].id] || 0,
515
+ title: t[r].title,
516
+ level: e,
511
517
  expand: !1,
512
518
  isEquip: !0,
513
519
  loading: !1,
514
- indeterminate: u[e[h].equipNo] && u[e[h].equipNo].indeterminate || !1,
515
- checked: u[e[h].equipNo] && u[e[h].equipNo].checked || !1,
520
+ indeterminate: u[`${t[r].groupId}-${t[r].equipNo}`] && u[`${t[r].groupId}-${t[r].equipNo}`].indeterminate || !1,
521
+ checked: u[`${t[r].groupId}-${t[r].equipNo}`] && u[`${t[r].groupId}-${t[r].equipNo}`].checked || !1,
516
522
  groupId: o,
517
- equipNo: e[h].id,
523
+ equipNo: t[r].id,
518
524
  visible: !0,
519
525
  settings: []
520
526
  }
521
527
  );
522
528
  }
523
529
  }
524
- return r;
530
+ return h;
525
531
  }
526
- static copyOrigin(e) {
527
- let t = [];
528
- return e.forEach((i) => {
529
- t.push({ ...i });
530
- }), t;
532
+ static copyOrigin(t) {
533
+ let e = [];
534
+ return t.forEach((i) => {
535
+ e.push({ ...i });
536
+ }), e;
531
537
  }
532
538
  // 获取分组位置
533
- static getPosition(e, t) {
539
+ static getPosition(t, e) {
534
540
  let i = 0;
535
- for (let o = 0, u = t.length; o < u; o++) {
536
- if (t[o].key == e) {
541
+ for (let o = 0, u = e.length; o < u; o++) {
542
+ if (e[o].key == t) {
537
543
  i = o - 30;
538
544
  break;
539
545
  }
@@ -541,9 +547,9 @@ class d {
541
547
  return i;
542
548
  }
543
549
  // 扁平化
544
- static flattern(e, t) {
545
- e.forEach((i) => {
546
- i.isGroup && (t[`${i.key}`] = null, t[`${i.key}`] = i), i.groups && i.groups.length && this.flattern(i.groups, t);
550
+ static flattern(t, e) {
551
+ t.forEach((i) => {
552
+ i.isGroup && (e[`${i.key}`] = null, e[`${i.key}`] = i), i.groups && i.groups.length && this.flattern(i.groups, e);
547
553
  });
548
554
  }
549
555
 
@@ -553,10 +559,10 @@ class d {
553
559
  * @return {string}
554
560
  */
555
561
  static generateUUID() {
556
- let e = (/* @__PURE__ */ new Date()).getTime();
557
- return window.performance && typeof window.performance.now == "function" && (e += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
558
- let o = (e + Math.random() * 16) % 16 | 0;
559
- return e = Math.floor(e / 16), (i === "x" ? o : o & 3 | 8).toString(16);
562
+ let t = (/* @__PURE__ */ new Date()).getTime();
563
+ return window.performance && typeof window.performance.now == "function" && (t += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
564
+ let o = (t + Math.random() * 16) % 16 | 0;
565
+ return t = Math.floor(t / 16), (i === "x" ? o : o & 3 | 8).toString(16);
560
566
  });
561
567
  }
562
568
 
@@ -565,97 +571,107 @@ class d {
565
571
  * @param {list} 可构建树形结构的普通列表
566
572
  * @return {string}
567
573
  */
568
- static listToTreeList(e) {
569
- const t = e, i = [], o = {};
570
- return t.forEach((u) => {
574
+ static listToTreeList(t) {
575
+ const e = t, i = [], o = {};
576
+ return e.forEach((u) => {
571
577
  o[u.id] = u;
572
- }), t.forEach((u) => {
578
+ }), e.forEach((u) => {
573
579
  const a = o[u.parentId];
574
580
  a ? (a.children || (a.children = [])).push(u) : i.push(u);
575
581
  }), i;
576
582
  }
577
583
  }
578
- class D extends N {
584
+ class F extends m {
579
585
  // 分组节点扁平化对象、设备扁平化对象、window缓存设备扁平化对象
580
- constructor(e, t, i) {
581
- super(), this.showSettings = t, this.groupNodeObject = e, this.aliasName = i;
586
+ constructor(t, e, i) {
587
+ super(), this.showSettings = e, this.groupNodeObject = t, this.aliasName = i;
582
588
  }
583
589
  // 触发搜索
584
- filterMethod(e) {
585
- for (let t in this.groupNodeObject) { e && this.updateBySearch(t, e); }
590
+ filterMethod(t) {
591
+ for (let e in this.groupNodeObject) { t && this.updateBySearch(e, t); }
586
592
  }
587
593
  // 搜索状态将搜索的结果存放缓存中
588
- updateBySearch(e, t) {
589
- let i = this.window[`group-${this.groupNodeObject[e].key}${this.aliasName}`];
590
- i && (i = i.filter((o) => o.title.includes(t)), this.window[`group-${this.groupNodeObject[e].key}-search`] = d.copyOrigin(i));
594
+ updateBySearch(t, e) {
595
+ let i = this.window[`group-${this.groupNodeObject[t].key}${this.aliasName}`];
596
+ i && (i = i.filter((o) => o.title.includes(e)), this.window[`group-${this.groupNodeObject[t].key}-search`] = f.copyOrigin(i));
591
597
  }
592
598
  }
593
- const E = (s, e) => {
594
- const t = s.__vccOpts || s;
595
- for (const [i, o] of e) { t[i] = o; }
596
- return t;
597
- }, K = {
599
+ const O = (s, t) => {
600
+ const e = s.__vccOpts || s;
601
+ for (const [i, o] of t) { e[i] = o; }
602
+ return e;
603
+ }, J = {
598
604
  props: {
599
605
  source: {
600
- type: Object
606
+ type: Object,
607
+ default: () => {
608
+ }
601
609
  },
602
610
  groupEditAndNew: {
603
- type: Function
611
+ type: Function,
612
+ default: () => {
613
+ }
604
614
  },
605
615
  deleteGroup: {
606
- type: Function
616
+ type: Function,
617
+ default: () => {
618
+ }
607
619
  }
608
620
  }
609
- }, F = { class: "operates" };
610
- function J(s, e, t, i, o, u) {
611
- const a = g("el-button"), r = g("el-button-group"), h = g("el-popover");
612
- return n(), l("div", F, [
613
- q(h, {
621
+ }, V = { class: "operates" };
622
+ function P(s, t, e, i, o, u) {
623
+ const a = C("el-button"), h = C("el-button-group"), r = C("el-popover");
624
+ return p(), d("div", V, [
625
+ b(r, {
614
626
  placement: "bottom",
615
627
  trigger: "hover"
616
628
  }, {
617
- reference: w(() => e[3] || (e[3] = [
618
- C("i", { class: "el-icon-more" }, null, -1)
619
- ])),
620
- default: w(() => [
621
- q(r, { class: "new-button-group setModule" }, {
622
- default: w(() => [
623
- q(a, {
629
+ reference: q(() => [
630
+ S("i", {
631
+ class: "el-icon-more",
632
+ onClick: t[3] || (t[3] = k(() => {
633
+ }, ["stop"]))
634
+ })
635
+ ]),
636
+ default: q(() => [
637
+ b(h, { class: "new-button-group setModule" }, {
638
+ default: q(() => [
639
+ b(a, {
624
640
  type: "text",
625
641
  size: "small",
626
642
  class: "elBtn",
627
643
  icon: " iconfont icon-tubiao20_bianji",
628
- onClick: e[0] || (e[0] = M((c) => t.groupEditAndNew(!1, t.source), ["stop"]))
644
+ onClick: t[0] || (t[0] = k((n) => e.groupEditAndNew(!1, e.source), ["stop"]))
629
645
  }, {
630
- default: w(() => [
631
- k(b(s.$t("equipInfo.poverTips.rename")), 1)
646
+ default: q(() => [
647
+ M(N(s.$t("equipInfo.poverTips.rename")), 1)
632
648
  ]),
633
649
  _: 1
634
650
  }),
635
- q(a, {
651
+ b(a, {
636
652
  type: "text",
637
653
  size: "small",
638
654
  class: "elBtn",
639
655
  icon: " iconfont icon-gw-icon-tianjia1",
640
- onClick: e[1] || (e[1] = (c) => t.groupEditAndNew(!0, t.source))
656
+ onClick: t[1] || (t[1] = (n) => e.groupEditAndNew(!0, e.source))
641
657
  }, {
642
- default: w(() => [
643
- k(b(s.$t("equipInfo.poverTips.newChildGroup")), 1)
658
+ default: q(() => [
659
+ M(N(s.$t("equipInfo.poverTips.newChildGroup")), 1)
644
660
  ]),
645
661
  _: 1
646
662
  }),
647
- t.source.level != 1 ? (n(), S(a, {
663
+ e.source.level != 1 ? (p(), E(a, {
648
664
  key: 0,
649
665
  type: "danger",
650
666
  size: "small",
651
- onClick: e[2] || (e[2] = M((c) => t.deleteGroup(t.source), ["stop"])),
667
+ onClick: t[2] || (t[2] = k((n) => e.deleteGroup(e.source), ["stop"])),
652
668
  icon: " iconfont icon-tubiao20_shanchu"
653
669
  }, {
654
- default: w(() => [
655
- k(b(s.$t("publics.button.deletes")), 1)
670
+ default: q(() => [
671
+ M(N(s.$t("publics.button.deletes")), 1)
656
672
  ]),
657
673
  _: 1
658
- })) : f("", !0)
674
+ })) : w("", !0)
659
675
  ]),
660
676
  _: 1
661
677
  })
@@ -664,7 +680,7 @@ function J(s, e, t, i, o, u) {
664
680
  })
665
681
  ]);
666
682
  }
667
- const V = /* @__PURE__ */ E(K, [["render", J]]), P = {
683
+ const z = /* @__PURE__ */ O(J, [["render", P]]), R = {
668
684
  name: "ElTreeVirtualNode",
669
685
  componentName: "ElTreeVirtualNode",
670
686
  props: {
@@ -718,8 +734,16 @@ const V = /* @__PURE__ */ E(K, [["render", J]]), P = {
718
734
  deleteGroup: {
719
735
  type: Function
720
736
  },
737
+ childrenResetGroupNum: {
738
+ type: Function
739
+ },
740
+ getEquipStatus: {
741
+ type: Function
742
+ },
721
743
  colorConfig: {
722
- type: Object
744
+ type: Object,
745
+ default: () => {
746
+ }
723
747
  },
724
748
  index: {
725
749
  type: Number,
@@ -727,39 +751,48 @@ const V = /* @__PURE__ */ E(K, [["render", J]]), P = {
727
751
  }
728
752
  },
729
753
  components: {
730
- oparate: V
754
+ oparate: z
731
755
  },
732
756
  computed: {
733
757
  getColor() {
734
758
  return function(s) {
735
- let e;
759
+ this.colorConfig || (this.colorConfig = {
760
+ noComm: "#a0a0a0",
761
+ normal: "#63e03f",
762
+ alarm: "#f22433",
763
+ lsSet: "#bebcaa",
764
+ initialize: "#289ac0",
765
+ withdraw: "#ffc0cb",
766
+ BackUp: "#f8901c"
767
+ });
768
+ let t;
736
769
  switch (s) {
737
770
  case 0:
738
- e = this.colorConfig.noComm;
771
+ t = this.colorConfig.noComm;
739
772
  break;
740
773
  case 1:
741
- e = this.colorConfig.normal;
774
+ t = this.colorConfig.normal;
742
775
  break;
743
776
  case 2:
744
- e = this.colorConfig.alarm;
777
+ t = this.colorConfig.alarm;
745
778
  break;
746
779
  case 3:
747
- e = this.colorConfig.lsSet;
780
+ t = this.colorConfig.lsSet;
748
781
  break;
749
782
  case 4:
750
- e = this.colorConfig.initialize;
783
+ t = this.colorConfig.initialize;
751
784
  break;
752
785
  case 5:
753
- e = this.colorConfig.withdraw;
786
+ t = this.colorConfig.withdraw;
754
787
  break;
755
788
  case 6:
756
- e = this.colorConfig.BackUp;
789
+ t = this.colorConfig.BackUp;
757
790
  break;
758
791
  default:
759
- e = this.colorConfig.noComm;
792
+ t = this.colorConfig.noComm;
760
793
  break;
761
794
  }
762
- return e;
795
+ return t;
763
796
  };
764
797
  }
765
798
  },
@@ -776,83 +809,85 @@ const V = /* @__PURE__ */ E(K, [["render", J]]), P = {
776
809
  this.onChecked(this.source);
777
810
  }
778
811
  }
779
- }, H = { class: "el-tree-node__content" }, z = { class: "nodeContent" }, R = {
812
+ }, H = { class: "el-tree-node__content" }, Q = { class: "nodeContent" }, X = {
780
813
  key: 1,
781
814
  class: "circle"
782
- }, Q = { class: "label" }, X = {
815
+ }, Y = { class: "label" }, Z = {
783
816
  key: 2,
784
817
  class: "equipNumber"
785
- }, Y = {
818
+ }, tt = {
786
819
  key: 4,
787
820
  class: "el-tree-node__loading-icon el-icon-loading"
788
821
  };
789
- function Z(s, e, t, i, o, u) {
790
- const a = g("el-checkbox"), r = g("oparate");
791
- return n(), l("div", {
792
- class: G(["el-tree-node", {
793
- parent_tag: t.source.isGroup,
794
- child_tags: !t.source.isGroup,
795
- selectedColor: t.currentSelect === t.source.key && !t.source.isGroup
822
+ function et(s, t, e, i, o, u) {
823
+ const a = C("el-checkbox"), h = C("oparate");
824
+ return p(), d("div", {
825
+ class: y(["el-tree-node", {
826
+ parent_tag: e.source.isGroup,
827
+ child_tags: !e.source.isGroup,
828
+ selectedColor: e.currentSelect === e.source.key && !e.source.isGroup
796
829
  }]),
797
- onClick: e[1] || (e[1] = (...h) => u.clickFunction && u.clickFunction(...h))
830
+ onClick: t[2] || (t[2] = (...r) => u.clickFunction && u.clickFunction(...r))
798
831
  }, [
799
- C("div", H, [
800
- C("span", {
832
+ S("div", H, [
833
+ S("span", {
801
834
  class: "el-tree__indent",
802
835
  "aria-hidden": "true",
803
- style: O({ width: (t.source.level - 1) * o.indent + "px" })
836
+ style: G({ width: (e.source.level - 1) * o.indent + "px" })
804
837
  }, null, 4),
805
- t.source.isGroup ? (n(), l("span", {
838
+ e.source.isGroup ? (p(), d("span", {
806
839
  key: 0,
807
- class: G([
840
+ class: y([
808
841
  {
809
- "is-leaf": !t.source.isGroup,
810
- expanded: t.source.isGroup && t.source.expand
842
+ "is-leaf": !e.source.isGroup,
843
+ expanded: e.source.isGroup && e.source.expand
811
844
  },
812
845
  "el-tree-node__expand-icon",
813
- "el-icon-arrow-right"
846
+ "iconfont icon-fangxiangL"
814
847
  ])
815
- }, null, 2)) : f("", !0),
816
- C("div", z, [
817
- t.showCheckbox ? (n(), S(a, {
848
+ }, null, 2)) : w("", !0),
849
+ S("div", Q, [
850
+ e.showCheckbox ? (p(), E(a, {
818
851
  key: 0,
819
- modelValue: t.source.checked,
820
- "onUpdate:modelValue": e[0] || (e[0] = (h) => t.source.checked = h),
821
- indeterminate: t.source.indeterminate,
852
+ onClick: t[0] || (t[0] = k(() => {
853
+ }, ["stop"])),
854
+ modelValue: e.source.checked,
855
+ "onUpdate:modelValue": t[1] || (t[1] = (r) => e.source.checked = r),
856
+ indeterminate: e.source.indeterminate,
822
857
  onChange: u.checkedChange
823
- }, null, 8, ["modelValue", "indeterminate", "onChange"])) : f("", !0),
824
- t.showStatus ? (n(), l("span", R, [
825
- t.source.status != 6 ? (n(), l("span", {
858
+ }, null, 8, ["modelValue", "indeterminate", "onChange"])) : w("", !0),
859
+ e.showStatus ? (p(), d("span", X, [
860
+ e.source.status != 6 ? (p(), d("span", {
826
861
  key: 0,
827
862
  class: "yd",
828
- style: O({ backgroundColor: u.getColor(t.source.status) })
829
- }, null, 4)) : (n(), l("i", {
863
+ style: G({ backgroundColor: u.getColor(e.source.status) })
864
+ }, null, 4)) : (p(), d("i", {
830
865
  key: 1,
831
- style: O({ color: t.colorConfig.BackUp }),
866
+ style: G({ color: e.colorConfig.BackUp }),
832
867
  class: "iconfont icon-gw-icon-beiji2"
833
868
  }, null, 4))
834
- ])) : f("", !0),
835
- C("span", Q, b(t.source.title), 1),
836
- t.source.isGroup && !t.source.isEquip || t.source.isGroup && !t.source.isEquip ? (n(), l("span", X, b(t.source.count), 1)) : f("", !0),
837
- t.source.isGroup && t.showOperate ? (n(), S(r, {
869
+ ])) : w("", !0),
870
+ S("span", Y, N(e.source.title), 1),
871
+ e.source.isGroup && !e.source.isEquip || e.source.isGroup && !e.source.isEquip ? (p(), d("span", Z, N(e.source.count), 1)) : w("", !0),
872
+ e.source.isGroup && e.showOperate ? (p(), E(h, {
838
873
  key: 3,
839
- source: t.source,
840
- groupEditAndNew: t.groupEditAndNew,
841
- deleteGroup: t.deleteGroup
842
- }, null, 8, ["source", "groupEditAndNew", "deleteGroup"])) : f("", !0),
843
- t.source.loading ? (n(), l("span", Y)) : f("", !0)
874
+ source: e.source,
875
+ groupEditAndNew: e.groupEditAndNew,
876
+ deleteGroup: e.deleteGroup
877
+ }, null, 8, ["source", "groupEditAndNew", "deleteGroup"])) : w("", !0),
878
+ e.source.loading ? (p(), d("span", tt)) : w("", !0)
844
879
  ])
845
880
  ])
846
881
  ], 2);
847
882
  }
848
- const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
883
+ const it = /* @__PURE__ */ O(R, [["render", et]]), st = {
849
884
  components: {
850
885
  VirtualList: I
851
886
  },
852
- mixins: [m],
887
+ mixins: [x],
853
888
  data() {
854
889
  return {
855
- itemComponent: ee,
890
+ itemComponent: it,
856
891
  //节点组件
857
892
  visibleList: [],
858
893
  //虚拟滚动所需要的列表
@@ -886,7 +921,9 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
886
921
  //绑定所有的已选中的设备控制项
887
922
  expandGroup: [],
888
923
  //记录已展开的分组
889
- updateJob: null
924
+ updateJob: null,
925
+ filterEquipList: []
926
+ //过滤条件下新增的设备列表,由于设备开始状态都是0,因而需要单独维护
890
927
  };
891
928
  },
892
929
  props: {
@@ -895,8 +932,8 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
895
932
  type: Array
896
933
  },
897
934
  selectEquips: {
898
- //设备选中列表,用于回显,如权限管理
899
- type: Array,
935
+ //设备选中列表,用于回显,如权限管理。支持数组格式 [equipNo] 或对象格式 { groupId: [equipNo] }
936
+ type: [Array, Object],
900
937
  default: () => []
901
938
  },
902
939
  controllList: {
@@ -926,6 +963,11 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
926
963
  type: Boolean,
927
964
  default: !1
928
965
  },
966
+ filterEquip: {
967
+ //是否过滤
968
+ type: Boolean,
969
+ default: !1
970
+ },
929
971
  showOperate: {
930
972
  // 是否展示操作按钮
931
973
  type: Boolean,
@@ -953,10 +995,14 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
953
995
  default: ""
954
996
  },
955
997
  buildTree: {
956
- type: Function
998
+ type: Function,
999
+ default: () => {
1000
+ }
957
1001
  },
958
1002
  filterData: {
959
- type: Function
1003
+ type: Function,
1004
+ default: () => {
1005
+ }
960
1006
  },
961
1007
  alias: {
962
1008
  type: String,
@@ -965,13 +1011,20 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
965
1011
  },
966
1012
  watch: {
967
1013
  data(s) {
968
- s && s.length && (d.flattern(this.data, this.groupNodeObject), this.cacheManage.addNodesMap(Object.values(this.groupNodeObject).map((e) => e)), this.init());
1014
+ s && s.length && (f.flattern(this.data, this.groupNodeObject), this.cacheManage.addNodesMap(Object.values(this.groupNodeObject).map((t) => t)), this.init());
969
1015
  },
970
1016
  controllList(s) {
971
1017
  this.updateCheckedStatusWithControls();
972
1018
  },
973
1019
  selectEquips(s) {
974
- this.updateCheckedStatusWithEquips();
1020
+ this.updateCheckedStatusWithEquips(), this.$nextTick(() => {
1021
+ this.checkStatusManage && this.checkStatusManage.updateGroupCheckStatus();
1022
+ });
1023
+ },
1024
+ filterEquip(s) {
1025
+ this.$nextTick(() => {
1026
+ this.visibleList = [], this.$refs.virtualList.scrollToIndex(0), this.updateTreeList(this.data), this.equipNumManage.resetGroupNum(this.isSearchStatus, s, this.equipStatusObject);
1027
+ });
975
1028
  }
976
1029
  },
977
1030
  computed: {
@@ -980,7 +1033,7 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
980
1033
  }
981
1034
  },
982
1035
  created() {
983
- this.showCheckbox && (this.checkStatusManage = new L(this.groupNodeObject, this.nodesMap, this.equipControllObject, this.controlObject, this.equipCheckObject, this.aliasName)), this.cacheManage = new _(this.groupNodeObject, this.nodesMap, this.controlObject, this.equipCheckObject), this.searchManage = new D(this.groupNodeObject, this.showSettings, this.aliasName), this.equipNumManage = new v(this.groupNodeObject, this.aliasName), this.requestManage = new W(this.nodesMap, this.equipControllObject);
1036
+ this.showCheckbox && (this.checkStatusManage = new A(this.groupNodeObject, this.nodesMap, this.equipControllObject, this.controlObject, this.equipCheckObject, this.aliasName)), this.cacheManage = new v(this.groupNodeObject, this.nodesMap, this.controlObject, this.equipCheckObject), this.searchManage = new F(this.groupNodeObject, this.showSettings, this.aliasName), this.equipNumManage = new B(this.groupNodeObject, this.aliasName), this.requestManage = new D(this.nodesMap, this.equipControllObject);
984
1037
  },
985
1038
  mounted() {
986
1039
  this.updateCheckedStatusWithControls(), this.updateCheckedStatusWithEquips(), window.addEventListener("message", (s) => {
@@ -991,16 +1044,16 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
991
1044
  // 初始化
992
1045
  init() {
993
1046
  this.data[0].expand = !0, this.updateTreeList(), setTimeout(() => {
994
- Object.values(this.groupNodeObject).forEach((s) => {
1047
+ Object.values(this.groupNodeObject).forEach((s, t) => {
995
1048
  !s.expand && this.expandGroup.includes(s.key) && (s.expand = !0), this.filterWithAlias(s.key), this.updateGroupEquips(s.key, !0);
996
- }), this.equipNumManage.resetGroupNum(this.isSearchStatus), this.showStatus && !this.equipStatusManage && (this.equipStatusManage = new A(this.nodesMap, this.equipStatusObject, this.groupNodeObject, this.statusChange, this.aliasName));
997
- }, 100);
1049
+ }), this.showCheckbox && this.checkStatusManage && this.checkStatusManage.updateGroupCheckStatus(), this.showStatus && !this.equipStatusManage && (this.equipStatusManage = new U(this.nodesMap, this.equipStatusObject, this.groupNodeObject, this.statusChange, this.aliasName));
1050
+ }, 500);
998
1051
  },
999
1052
  // 根据条件过滤
1000
1053
  filterWithAlias(s) {
1001
1054
  if (this.aliasName) {
1002
- let e = this.window[`group-${s}`] || [];
1003
- this.window[`group-${s}${this.aliasName}`] = this.filterData(e);
1055
+ let t = this.window[`group-${s}`] || [];
1056
+ this.window[`group-${s}${this.aliasName}`] = this.filterData(t);
1004
1057
  }
1005
1058
  },
1006
1059
  // 更新当前选中
@@ -1008,53 +1061,49 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1008
1061
  this.window.equipCache && this.window.equipCache[this.currentNodeKey] && (this.currentSelect = `${this.window.equipCache[this.currentNodeKey].groupId}-${this.currentNodeKey}`);
1009
1062
  },
1010
1063
  // 设备状态变化
1011
- statusChange(s, e, t) {
1012
- this.currentSelect == `${s}-${e}` && this.$emit("statusChange", e, t);
1064
+ statusChange(s, t, e) {
1065
+ this.currentSelect == `${s}-${t}` && this.$emit("statusChange", t, e);
1013
1066
  },
1014
1067
  // 更新checkbox选中状态
1015
1068
  updateCheckWidthJob() {
1016
- this.showCheckbox && (this.checkStatusManage.resetCheckedStatus(), this.updateCheckedStatusWithControls(), this.updateCheckedStatusWithEquips());
1069
+ this.showCheckbox && (this.checkStatusManage.resetCheckedStatus(), this.updateCheckedStatusWithControls(), this.updateCheckedStatusWithEquips(), this.checkStatusManage && this.checkStatusManage.updateGroupCheckStatus());
1017
1070
  },
1018
1071
  // 通过外框更新设备
1019
- updateGroupEquips(s, e) {
1072
+ updateGroupEquips(s, t) {
1020
1073
  if (!this.isSearchStatus && this.groupNodeObject[s]) {
1021
- let t = this.equipNumManage.getAllEquipsNum();
1022
- this.$emit("getTotal", t);
1023
- }
1024
- if (e) {
1025
- let t = this.window[`group-${s}${this.aliasName}`] || [];
1026
- this.equipNumManage.setGroupNum(s, t.length);
1074
+ let e = this.equipNumManage.getAllEquipsNum();
1075
+ this.$emit("getTotal", e);
1027
1076
  }
1028
- this.groupNodeObject[s].expand && this.updateList(s, this.groupNodeObject[s].level, null, !1);
1077
+ this.equipNumManage.resetGroupNum(this.isSearchStatus, this.filterEquip, this.equipStatusObject), this.groupNodeObject[s].expand && this.updateList(s, this.groupNodeObject[s].level, null, !1);
1029
1078
  },
1030
1079
  // 展开的时候从缓存中拿设备数据到equips中并更新视图
1031
1080
  updateList(s) {
1032
1081
  if (this.groupNodeObject[s]) {
1033
- let e = [];
1034
- this.isSearchStatus ? (e = this.window[`group-${s}-search`], this.groupNodeObject[s].equips = [...d.deepClone(e, Number(this.groupNodeObject[s].level) + 1, this.showSettings, s, this.equipCheckObject, this.equipStatusObject)]) : (e = this.window[`group-${s}${this.aliasName}`], this.groupNodeObject[s].equips = [...d.deepClone(e, Number(this.groupNodeObject[s].level) + 1, this.showSettings, s, this.equipCheckObject, this.equipStatusObject)]), this.cacheManage.addNodesMap(this.groupNodeObject[s].equips), this.cacheManage.closeBrotherNode(s), this.visibleList = [], this.updateTreeList(this.data), this.showStatus && this.equipStatusManage && this.equipStatusManage.updateGroupStatus(s), this.updateCurrentSelect();
1082
+ let t = [];
1083
+ this.isSearchStatus ? (t = this.window[`group-${s}-search`], this.groupNodeObject[s].equips = [...f.deepClone(t, Number(this.groupNodeObject[s].level) + 1, this.showSettings, s, this.equipCheckObject, this.equipStatusObject)]) : (t = this.window[`group-${s}${this.aliasName}`], this.groupNodeObject[s].equips = [...f.deepClone(t, Number(this.groupNodeObject[s].level) + 1, this.showSettings, s, this.equipCheckObject, this.equipStatusObject)]), this.cacheManage.addNodesMap(this.groupNodeObject[s].equips), this.cacheManage.closeBrotherNode(s), this.visibleList = [], this.updateTreeList(this.data), this.showCheckbox && this.checkStatusManage && t && t.length && this.checkStatusManage.updateGroupCheckStatus(), this.showStatus && this.equipStatusManage && this.equipStatusManage.updateGroupStatus(s), this.updateCurrentSelect();
1035
1084
  }
1036
1085
  },
1037
1086
  // 更新整个树形结构
1038
1087
  updateTreeList(s) {
1039
- s && s.forEach((e) => {
1040
- this.visibleList.push(e), e.expand ? e.isEquip ? (e.children || (e.children = []), e.settings && (e.children = [...e.settings || []])) : e.children = [...e.equips || [], ...e.groups || []] : e.children = [], this.updateTreeList(e.children || []);
1088
+ s && s.length > 0 && s.forEach((t) => {
1089
+ this.filterEquip && t.status === 2 ? this.filterEquipList.includes(t.equipNo) || this.visibleList.push(t) : this.filterEquip || this.visibleList.push(t), t.expand ? t.isEquip ? (t.children || (t.children = []), t.settings && (t.children = [...t.settings || []])) : t.children = [...t.equips || [], ...t.groups || []] : t.children = [], this.updateTreeList(t.children || []);
1041
1090
  });
1042
1091
  },
1043
1092
  // 节点点击事件
1044
- nodeClick(s, e, t, i) {
1045
- this.$emit("node-click", { ...s, key: s.isEquip ? s.equipNo : s.key }), s.isGroup ? s.isEquip ? this.equipClick(s, e, i) : this.groupClick(s, e, i) : this.currentSelect = s.key;
1093
+ nodeClick(s, t, e, i) {
1094
+ this.$emit("node-click", { ...s, key: s.isEquip ? s.equipNo : s.key }), s.isGroup ? s.isEquip ? this.equipClick(s, t, i) : this.groupClick(s, t, i) : this.currentSelect = s.key;
1046
1095
  },
1047
- groupClick(s, e, t) {
1048
- s.expand ? this.updateList(s.key, s.level, e, t) : (this.cacheManage.recycleGroupCache(s.key), this.visibleList = [], this.updateTreeList(this.data));
1096
+ groupClick(s, t, e) {
1097
+ s.expand ? this.updateList(s.key, s.level, t, e) : (this.cacheManage.recycleGroupCache(s.key), this.visibleList = [], this.updateTreeList(this.data));
1049
1098
  },
1050
- async equipClick(s, e, t) {
1051
- this.showSettings && (s.expand ? (s.loading = !0, await this.requestManage.getSetting(s.key, s.title, s.level, t), this.controlObject[s.equipNo] = { groupId: s.groupId }, s.loading = !1, this.visibleList.splice(e + 1, 0, ...this.nodesMap[s.key].settings), this.cacheManage.addNodesMap(this.nodesMap[s.key].settings)) : (this.visibleList.splice(e + 1, this.nodesMap[s.key].settings.length), this.cacheManage.removeNodesMap(this.nodesMap[s.key].settings), this.nodesMap[s.key].settings = [], delete this.controlObject[s.equipNo]));
1099
+ async equipClick(s, t, e) {
1100
+ this.showSettings && (s.expand ? (s.loading = !0, await this.requestManage.getSetting(s.key, s.title, s.level, e), this.controlObject[`${s.groupId}-${s.equipNo}`] = { groupId: s.groupId }, s.loading = !1, this.visibleList.splice(t + 1, 0, ...this.nodesMap[s.key].settings), this.cacheManage.addNodesMap(this.nodesMap[s.key].settings)) : (this.visibleList.splice(t + 1, this.nodesMap[s.key].settings.length), this.cacheManage.removeNodesMap(this.nodesMap[s.key].settings), this.nodesMap[s.key].settings = [], delete this.controlObject[`${s.groupId}-${s.equipNo}`]));
1052
1101
  },
1053
1102
  onChecked(s) {
1054
1103
  this.checkStatusManage && this.checkStatusManage.onChecked(s, this.isSearchStatus), this.$emit("onCheck");
1055
1104
  },
1056
- groupEditAndNew(s, e) {
1057
- this.$emit("groupEditAndNew", { isGroupNew: s, node: e });
1105
+ groupEditAndNew(s, t) {
1106
+ this.$emit("groupEditAndNew", { isGroupNew: s, node: t });
1058
1107
  },
1059
1108
  deleteGroup(s) {
1060
1109
  this.$emit("deleteGroup", s);
@@ -1063,7 +1112,7 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1063
1112
  this.controllList && this.controllList.length && this.checkStatusManage && this.checkStatusManage && this.checkStatusManage.updateCheckedStatusWithControls(this.controllList);
1064
1113
  },
1065
1114
  updateCheckedStatusWithEquips() {
1066
- this.selectEquips && this.selectEquips.length && this.checkStatusManage && this.checkStatusManage && this.checkStatusManage.updateCheckedStatusWithEquips(this.selectEquips);
1115
+ this.selectEquips && (this.selectEquips.length || Object.keys(this.selectEquips).length) && this.checkStatusManage && this.checkStatusManage && this.checkStatusManage.updateCheckedStatusWithEquips(this.selectEquips);
1067
1116
  },
1068
1117
  resetCheckedStatus() {
1069
1118
  this.checkStatusManage && this.checkStatusManage.resetCheckedStatus();
@@ -1077,6 +1126,14 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1077
1126
  return this.checkStatusManage && this.checkStatusManage.getEquipSelectd();
1078
1127
  },
1079
1128
 
1129
+ /**
1130
+ * @description 获取选择的设备(携带分组)
1131
+ * @return Array
1132
+ */
1133
+ getEquipGroupSelectd() {
1134
+ return this.checkStatusManage && this.checkStatusManage.getEquipGroupSelectd();
1135
+ },
1136
+
1080
1137
  /**
1081
1138
  * @description 获取选择的设备控制项
1082
1139
  * @return Array
@@ -1116,7 +1173,7 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1116
1173
  filterMethod(s) {
1117
1174
  this.visibleList = [], this.cacheManage.recycleAllNodeCache(), s ? (this.isSearchStatus = !0, this.searchManage.filterMethod(s)) : this.isSearchStatus = !1, this.init(), this.$nextTick(() => {
1118
1175
  this.$refs.virtualList.scrollToIndex(0);
1119
- }), this.equipNumManage.resetGroupNum(this.isSearchStatus), this.showCheckbox && (this.checkStatusManage && this.checkStatusManage.reComputedCheckNum(this.isSearchStatus), this.checkStatusManage && this.checkStatusManage.updateGroupCheckStatus());
1176
+ }), this.equipNumManage.resetGroupNum(this.isSearchStatus, this.filterEquip, this.equipStatusObject), this.showCheckbox && (this.checkStatusManage && this.checkStatusManage.reComputedCheckNum(this.isSearchStatus), this.checkStatusManage && this.checkStatusManage.updateGroupCheckStatus());
1120
1177
  },
1121
1178
  // 重新构建树
1122
1179
  rebuildTree() {
@@ -1146,10 +1203,10 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1146
1203
  * @return 无返回值
1147
1204
  */
1148
1205
  DeleteEquip(s) {
1149
- const { groupId: e, equips: t } = s || {};
1150
- e && this.groupNodeObject[e] && (this.updateGroupEquips(s.groupId), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus()), t.length && t.forEach((i) => {
1151
- let o = this.nodesMap[`${e}-${i.id}`];
1152
- o && (this.currentSelect.toString().includes(i.id) && this.$emit("currentDelete"), this.showStatus && (o.status == 2 || o.status == 0 ? this.equipStatusManage.setGroupStatus(e, !1, 2) : o.status == 6 && this.equipStatusManage.setGroupStatus(e, !1, 6)), delete this.nodesMap[`${e}-${i.id}`], delete this.equipCheckObject[i.id]), delete this.equipStatusObject[i.id];
1206
+ const { groupId: t, equips: e } = s || {};
1207
+ t && this.groupNodeObject[t] && (this.updateGroupEquips(s.groupId), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus()), e.length && e.forEach((i) => {
1208
+ let o = this.nodesMap[`${t}-${i.id}`];
1209
+ o && (this.currentSelect.toString().includes(i.id) && this.$emit("currentDelete"), this.showStatus && (o.status == 2 ? this.equipStatusManage.setGroupStatus(t, !1, 2) : o.status == 6 && this.equipStatusManage.setGroupStatus(t, !1, 6)), delete this.nodesMap[`${t}-${i.id}`], delete this.equipCheckObject[i.id]), delete this.equipStatusObject[i.id];
1153
1210
  });
1154
1211
  },
1155
1212
 
@@ -1159,10 +1216,10 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1159
1216
  * @return 无返回值
1160
1217
  */
1161
1218
  moveEquips(s) {
1162
- const { updateGroups: e, buildTree: t } = s || {};
1163
- !t && e ? e.forEach((i) => {
1219
+ const { updateGroups: t, buildTree: e } = s || {};
1220
+ !e && t ? t.forEach((i) => {
1164
1221
  i && this.groupNodeObject[i] && (this.updateGroupEquips(i), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus());
1165
- }) : t && this.rebuildTree();
1222
+ }) : e && this.rebuildTree();
1166
1223
  },
1167
1224
 
1168
1225
  /**
@@ -1171,8 +1228,8 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1171
1228
  * @return 无返回值
1172
1229
  */
1173
1230
  DeleteEquipGroup(s) {
1174
- s.forEach((e) => {
1175
- e.groupId && this.nodesMap[e.groupId] && (this.isSearchStatus || this.rebuildTree());
1231
+ s.forEach((t) => {
1232
+ t.groupId && this.nodesMap[t.groupId] && (this.isSearchStatus || this.rebuildTree());
1176
1233
  });
1177
1234
  },
1178
1235
 
@@ -1182,8 +1239,8 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1182
1239
  * @return 无返回值
1183
1240
  */
1184
1241
  AddEquipGroup(s) {
1185
- const { parentGroupId: e, groupId: t } = s || {};
1186
- t && this.nodesMap[e] && this.treeType && (this.isSearchStatus || this.rebuildTree());
1242
+ const { parentGroupId: t, groupId: e } = s || {};
1243
+ e && this.nodesMap[t] && this.treeType && (this.isSearchStatus || this.rebuildTree());
1187
1244
  },
1188
1245
 
1189
1246
  /** 编辑分组
@@ -1192,8 +1249,8 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1192
1249
  * @return 无返回值
1193
1250
  */
1194
1251
  EditEquipGroup(s) {
1195
- const { groupId: e, groupName: t } = s;
1196
- this.nodesMap[e] && (this.nodesMap[e].title = t);
1252
+ const { groupId: t, groupName: e } = s;
1253
+ this.nodesMap[t] && (this.nodesMap[t].title = e);
1197
1254
  },
1198
1255
 
1199
1256
  /**
@@ -1202,33 +1259,50 @@ const ee = /* @__PURE__ */ E(P, [["render", Z]]), te = {
1202
1259
  * @return 无返回值
1203
1260
  */
1204
1261
  AddEquip(s) {
1205
- const { groupId: e } = s || {};
1206
- e && (this.isSearchStatus || this.rebuildTree());
1262
+ this.filterEquip && (this.filterEquipList = s == null ? void 0 : s.equips.map((t) => t.id)), this.init();
1207
1263
  },
1208
1264
 
1209
1265
  /**
1210
- * @description 新增分组设备
1211
- * @param {data} {分组Id,设备}
1212
- * @return 无返回值
1266
+ * @description 新增分组设备
1267
+ * @param {data} {分组Id,设备}
1268
+ * @return 无返回值
1213
1269
  */
1214
1270
  EditEquip(s) {
1215
- const { equipNo: e, groupId: t, equipName: i } = s || {};
1216
- this.nodesMap[`${t}-${e}`] && (this.isSearchStatus || (this.nodesMap[`${t}-${e}`].title = i));
1271
+ const { equipNo: t, groupId: e, equipName: i } = s || {};
1272
+ this.nodesMap[`${e}-${t}`] && (this.isSearchStatus || (this.nodesMap[`${e}-${t}`].title = i));
1273
+ },
1274
+
1275
+ /**
1276
+ * @description 重置分组数量
1277
+ * @param {isSearchStatus} {是否查询状态}
1278
+ * @return 无返回值
1279
+ */
1280
+ childrenResetGroupNum(s) {
1281
+ this.equipNumManage.resetGroupNum(s, this.filterEquip, this.equipStatusObject);
1282
+ },
1283
+
1284
+ /**
1285
+ * @description 获取设备状态
1286
+ * @param {data} {equipNo}
1287
+ * @return arry[equipNo]
1288
+ */
1289
+ getEquipStatus(s) {
1290
+ return this.equipStatusManage.equipStatusObject[s];
1217
1291
  }
1218
1292
  // 通过外框事件更新树形结构数据--end
1219
1293
  }
1220
- }, ie = {
1294
+ }, ot = {
1221
1295
  class: "gw-tree",
1222
1296
  style: { height: "100%" }
1223
- }, se = {
1297
+ }, ut = {
1224
1298
  class: "tree",
1225
1299
  style: { height: "100%" }
1226
1300
  };
1227
- function oe(s, e, t, i, o, u) {
1228
- const a = g("virtual-list", !0);
1229
- return n(), l("div", ie, [
1230
- C("div", se, [
1231
- q(a, {
1301
+ function at(s, t, e, i, o, u) {
1302
+ const a = C("virtual-list", !0);
1303
+ return p(), d("div", ot, [
1304
+ S("div", ut, [
1305
+ b(a, {
1232
1306
  ref: "virtualList",
1233
1307
  class: "virtualList",
1234
1308
  "data-key": "key",
@@ -1238,21 +1312,24 @@ function oe(s, e, t, i, o, u) {
1238
1312
  "extra-props": {
1239
1313
  currentSelect: o.currentSelect,
1240
1314
  nodeClick: u.nodeClick,
1241
- showStatus: t.showStatus,
1242
- showSettings: t.showSettings,
1243
- showCheckbox: t.showCheckbox,
1315
+ showStatus: e.showStatus,
1316
+ filterEquip: e.filterEquip,
1317
+ showSettings: e.showSettings,
1318
+ showCheckbox: e.showCheckbox,
1244
1319
  onChecked: u.onChecked,
1245
- showOperate: t.showOperate,
1320
+ showOperate: e.showOperate,
1246
1321
  groupEditAndNew: u.groupEditAndNew,
1247
1322
  deleteGroup: u.deleteGroup,
1248
- colorConfig: t.colorConfig
1323
+ colorConfig: e.colorConfig,
1324
+ childrenResetGroupNum: u.childrenResetGroupNum,
1325
+ getEquipStatus: u.getEquipStatus
1249
1326
  }
1250
1327
  }, null, 8, ["data-sources", "data-component", "extra-props"])
1251
1328
  ])
1252
1329
  ]);
1253
1330
  }
1254
- const ue = /* @__PURE__ */ E(te, [["render", oe]]);
1255
- class ae {
1331
+ const rt = /* @__PURE__ */ O(st, [["render", at]]);
1332
+ class ht {
1256
1333
  constructor() {
1257
1334
  this.eGroupNotify = new $("/eGroupNotify", "", ""), this.alreadyUpdate = {}, this.notify = null, this.window = window;
1258
1335
  try {
@@ -1265,181 +1342,181 @@ class ae {
1265
1342
  this.notify && this.notify.stop();
1266
1343
  }
1267
1344
  Init() {
1268
- this.eGroupNotify.openConnect().then((e) => {
1269
- this.notify = e;
1345
+ this.eGroupNotify.openConnect().then((t) => {
1346
+ this.notify = t;
1270
1347
  try {
1271
- e.invoke("GetEquipGroupTree"), e.invoke("GetAllEquipGroupTree");
1272
- } catch (t) {
1273
- console.log(t);
1348
+ t.invoke("GetEquipGroupTree"), t.invoke("GetAllEquipGroupTree");
1349
+ } catch (e) {
1350
+ console.log(e);
1274
1351
  }
1275
- this.subscribeTo(e, "GetEquipGroupTree"), this.subscribeTo(e, "AddEquipGroup"), this.subscribeTo(e, "EditEquipGroup"), this.subscribeTo(e, "DeleteEquipGroup");
1352
+ this.subscribeTo(t, "GetEquipGroupTree"), this.subscribeTo(t, "AddEquipGroup"), this.subscribeTo(t, "EditEquipGroup"), this.subscribeTo(t, "DeleteEquipGroup");
1276
1353
  try {
1277
- e.invoke("GetGroupEquips");
1278
- } catch (t) {
1279
- console.log(t);
1354
+ t.invoke("GetGroupEquips");
1355
+ } catch (e) {
1356
+ console.log(e);
1280
1357
  }
1281
- this.subscribeTo(e, "GetGroupEquips"), this.subscribeTo(e, "AddEquip"), this.subscribeTo(e, "DeleteEquip"), this.subscribeTo(e, "EditEquip"), this.subscribeTo(e, "moveEquips"), this.subscribeTo(e, "GetAllEquipGroupTree"), e.onclose((t) => {
1358
+ this.subscribeTo(t, "GetGroupEquips"), this.subscribeTo(t, "AddEquip"), this.subscribeTo(t, "DeleteEquip"), this.subscribeTo(t, "EditEquip"), this.subscribeTo(t, "moveEquips"), this.subscribeTo(t, "GetAllEquipGroupTree"), t.onclose((e) => {
1282
1359
  try {
1283
1360
  this.Init();
1284
1361
  } catch (i) {
1285
1362
  console.log(i);
1286
1363
  }
1287
- console.log("重连", t);
1364
+ console.log("重连", e);
1288
1365
  });
1289
- }).catch((e) => {
1290
- console.error(e);
1366
+ }).catch((t) => {
1367
+ console.error(t);
1291
1368
  });
1292
1369
  }
1293
- subscribeTo(e, t) {
1294
- e.off(t), e.on(t, (i) => {
1295
- i && i.isSuccess && (this[t] ? this[t](i.data) : this.notice({ func: t, data: i.data, key: i.groupId }));
1370
+ subscribeTo(t, e) {
1371
+ t.off(e), t.on(e, (i) => {
1372
+ i && i.isSuccess && (this[e] ? this[e](i.data) : this.notice({ func: e, data: i.data, key: i.groupId }));
1296
1373
  });
1297
1374
  }
1298
1375
  // 获取分组---无权限管理的分组列表--空设备分组不展示
1299
- GetEquipGroupTree(e) {
1300
- this.window.groupList || (this.window.groupList = e, this.notice({ type: "GetEquipGroupTree" }));
1376
+ GetEquipGroupTree(t) {
1377
+ this.window.groupList || (this.window.groupList = t, this.notice({ type: "GetEquipGroupTree" }));
1301
1378
  }
1302
1379
  // 获取全量分组---设备管理使用
1303
- GetAllEquipGroupTree(e) {
1304
- this.window.groupList_manageMent || (this.window.groupList_manageMent = e, this.notice({ type: "GetEquipGroupTreeWidthTreeType" }));
1380
+ GetAllEquipGroupTree(t) {
1381
+ this.window.groupList_manageMent || (this.window.groupList_manageMent = t, this.notice({ type: "GetEquipGroupTreeWidthTreeType" }));
1305
1382
  }
1306
1383
  // 新增分组
1307
- AddEquipGroup(e) {
1308
- const { parentGroupId: t, groupId: i, groupName: o } = e || {};
1384
+ AddEquipGroup(t) {
1385
+ const { parentGroupId: e, groupId: i, groupName: o } = t || {};
1309
1386
  i && (this.window.groupList_manageMent || (this.window.groupList_manageMent = []), this.window.groupList_manageMent.push({
1310
- parentId: t,
1387
+ parentId: e,
1311
1388
  id: i,
1312
1389
  name: o,
1313
1390
  equipCount: 0
1314
- }), this.notice({ type: "AddEquipGroup", data: e }));
1391
+ }), this.notice({ type: "AddEquipGroup", data: t }));
1315
1392
  }
1316
1393
  // 编辑分组
1317
- EditEquipGroup(e) {
1318
- const { groupId: t, groupName: i } = e;
1394
+ EditEquipGroup(t) {
1395
+ const { groupId: e, groupName: i } = t;
1319
1396
  this.window.groupList && window.groupList.forEach((o) => {
1320
- o.id == t && (o.name = i);
1397
+ o.id == e && (o.name = i);
1321
1398
  }), this.window.groupList_manageMent && window.groupList_manageMent.forEach((o) => {
1322
- o.id == t && (o.name = i);
1323
- }), this.notice({ type: "EditEquipGroup", data: e });
1399
+ o.id == e && (o.name = i);
1400
+ }), this.notice({ type: "EditEquipGroup", data: t });
1324
1401
  }
1325
- deleteChildGroup(e, t) {
1402
+ deleteChildGroup(t, e) {
1326
1403
  let i = [];
1327
- t.forEach((o) => {
1328
- o.parentId == e && i.push(o.id);
1404
+ e.forEach((o) => {
1405
+ o.parentId == t && i.push(o.id);
1329
1406
  }), i.forEach((o) => {
1330
- let u = t.findIndex((a) => a.id == o);
1331
- u > -1 && t.splice(u, 1), this.deleteChildGroup(o, t);
1407
+ let u = e.findIndex((a) => a.id == o);
1408
+ u > -1 && e.splice(u, 1), this.deleteChildGroup(o, e);
1332
1409
  });
1333
1410
  }
1334
1411
  // 删除分组
1335
- DeleteEquipGroup(e) {
1336
- e.forEach((t) => {
1412
+ DeleteEquipGroup(t) {
1413
+ t.forEach((e) => {
1337
1414
  if (this.window.groupList) {
1338
- let i = this.window.groupList.findIndex((o) => o.id == t.groupId);
1339
- i > -1 && this.window.groupList.splice(i, 1), this.deleteChildGroup(t.groupId, this.window.groupList);
1415
+ let i = this.window.groupList.findIndex((o) => o.id == e.groupId);
1416
+ i > -1 && this.window.groupList.splice(i, 1), this.deleteChildGroup(e.groupId, this.window.groupList);
1340
1417
  }
1341
1418
  if (this.window.groupList_manageMent) {
1342
- let i = this.window.groupList_manageMent.findIndex((o) => o.id == t.groupId);
1343
- i > -1 && this.window.groupList_manageMent.splice(i, 1), this.deleteChildGroup(t.groupId, this.window.groupList_manageMent);
1419
+ let i = this.window.groupList_manageMent.findIndex((o) => o.id == e.groupId);
1420
+ i > -1 && this.window.groupList_manageMent.splice(i, 1), this.deleteChildGroup(e.groupId, this.window.groupList_manageMent);
1344
1421
  }
1345
- }), this.notice({ type: "DeleteEquipGroup", data: e });
1422
+ }), this.notice({ type: "DeleteEquipGroup", data: t });
1346
1423
  }
1347
1424
  // 获取设备
1348
- GetGroupEquips(e) {
1349
- const { groupId: t, equips: i } = e || {};
1350
- this.alreadyUpdate[t] || (this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[t] = {}, t && i && i instanceof Array && (i.forEach((o) => {
1351
- o.title = o.name, o.groupId = t, o.equipNo = o.id, delete o.name, window.equipCache || (this.window.equipCache = {}), this.window.equipCache[o.id] = o, this.window.groupCache[t][o.id] = o;
1352
- }), this.window[`group-${t}`] = i, this.notice({ type: "GetGroupEquips", data: { groupId: t } }), this.alreadyUpdate[t] = !0));
1425
+ GetGroupEquips(t) {
1426
+ const { groupId: e, equips: i } = t || {};
1427
+ this.alreadyUpdate[e] || (this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[e] = {}, e && i && i instanceof Array && (i.forEach((o) => {
1428
+ o.title = o.name, o.groupId = e, o.equipNo = o.id, delete o.name, window.equipCache || (this.window.equipCache = {}), this.window.equipCache[o.id] = o, this.window.groupCache[e][o.id] = o;
1429
+ }), this.window[`group-${e}`] = i, this.notice({ type: "GetGroupEquips", data: { groupId: e } }), this.alreadyUpdate[e] = !0));
1353
1430
  }
1354
1431
  // 新增设备
1355
- AddEquip(e) {
1356
- const { groupId: t, equips: i } = e || {};
1357
- this.window[`group-${t}`] || (this.window[`group-${t}`] = []), this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[t] || (this.window.groupCache[t] = {}), this.window.equipCache || (this.window.equipCache = {});
1358
- let o = this.window[`group-${t}`].length;
1359
- if (t && i) {
1432
+ AddEquip(t) {
1433
+ const { groupId: e, equips: i } = t || {};
1434
+ this.window[`group-${e}`] || (this.window[`group-${e}`] = []), this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[e] || (this.window.groupCache[e] = {}), this.window.equipCache || (this.window.equipCache = {});
1435
+ let o = this.window[`group-${e}`].length;
1436
+ if (e && i) {
1360
1437
  if (i.forEach((u, a) => {
1361
- this.window[`group-${t}`].push(
1438
+ this.window[`group-${e}`].push(
1362
1439
  {
1363
1440
  equipNo: u.id,
1364
- groupId: t,
1441
+ groupId: e,
1365
1442
  id: u.id,
1366
1443
  title: u.name
1367
1444
  }
1368
- ), this.window.equipCache[u.id] = this.window[`group-${t}`][o + a], this.window.groupCache[t][u.id] = this.window[`group-${t}`][o + a];
1369
- }), !this.exist(t, this.window.groupList)) {
1370
- let u = this.findParentList(t, this.window.groupList_manageMent);
1445
+ ), this.window.equipCache[u.id] = this.window[`group-${e}`][o + a], this.window.groupCache[e][u.id] = this.window[`group-${e}`][o + a];
1446
+ }), !this.exist(e, this.window.groupList)) {
1447
+ let u = this.findParentList(e, this.window.groupList_manageMent);
1371
1448
  this.window.groupList.push(...u);
1372
1449
  }
1373
- this.notice({ type: "AddEquip", data: e });
1450
+ this.notice({ type: "AddEquip", data: t });
1374
1451
  }
1375
1452
  }
1376
- moveEquips(e) {
1377
- let t = [], i = !0, o = [];
1378
- const { sourceGroup: u, targetGroupId: a } = e || {};
1379
- a && t.push(a), u.forEach((r) => {
1380
- if (t.push(r.groupId), (!this.window[`group-${a}`] || !this.window[`group-${a}`].length) && (this.window[`group-${a}`] = [], o.push(a)), this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[a] || (this.window.groupCache[a] = {}), r.equips.forEach((h) => {
1381
- if (h.title = h.name, h.groupId = a, h.equipNo = h.id, this.window[`group-${r.groupId}`]) {
1382
- let c = this.window[`group-${r.groupId}`].findIndex((p) => p.id == h.id);
1383
- c > -1 && this.window[`group-${r.groupId}`].splice(c, 1);
1453
+ moveEquips(t) {
1454
+ let e = [], i = !0, o = [];
1455
+ const { sourceGroup: u, targetGroupId: a } = t || {};
1456
+ a && e.push(a), u.forEach((h) => {
1457
+ if (e.push(h.groupId), (!this.window[`group-${a}`] || !this.window[`group-${a}`].length) && (this.window[`group-${a}`] = [], o.push(a)), this.window.groupCache || (this.window.groupCache = {}), this.window.groupCache[a] || (this.window.groupCache[a] = {}), h.equips.forEach((r) => {
1458
+ if (r.title = r.name, r.groupId = a, r.equipNo = r.id, this.window[`group-${h.groupId}`]) {
1459
+ let n = this.window[`group-${h.groupId}`].findIndex((c) => c.id == r.id);
1460
+ n > -1 && this.window[`group-${h.groupId}`].splice(n, 1);
1384
1461
  }
1385
- window.equipCache || (this.window.equipCache = {}), this.window.equipCache[h.id] = h, this.window.groupCache[a][h.id] = h, this.window[`group-${a}`].push(h);
1386
- }), !this.window[`group-${r.groupId}`].length) {
1387
- let h = this.window.groupList.findIndex((c) => c.id == r.groupId);
1388
- h > -1 && this.window.groupList.splice(h, 1), this.deleteChildGroup(r.groupId, this.window.groupList);
1462
+ window.equipCache || (this.window.equipCache = {}), this.window.equipCache[r.id] = r, this.window.groupCache[a][r.id] = r, this.window[`group-${a}`].push(r);
1463
+ }), !this.window[`group-${h.groupId}`].length) {
1464
+ let r = this.window.groupList.findIndex((n) => n.id == h.groupId);
1465
+ r > -1 && this.window.groupList.splice(r, 1), this.deleteChildGroup(h.groupId, this.window.groupList);
1389
1466
  }
1390
- }), o.forEach((r) => {
1391
- if (!this.exist(r, this.window.groupList)) {
1392
- let h = this.findParentList(r, this.window.groupList_manageMent);
1393
- this.window.groupList.push(...h);
1467
+ }), o.forEach((h) => {
1468
+ if (!this.exist(h, this.window.groupList)) {
1469
+ let r = this.findParentList(h, this.window.groupList_manageMent);
1470
+ this.window.groupList.push(...r);
1394
1471
  }
1395
- }), this.notice({ type: "moveEquips", data: { updateGroups: t, buildTree: i } });
1472
+ }), this.notice({ type: "moveEquips", data: { updateGroups: e, buildTree: i } });
1396
1473
  }
1397
- exist(e, t) {
1398
- return t ? t.some((i) => i.id == e) : !1;
1474
+ exist(t, e) {
1475
+ return e ? e.some((i) => i.id == t) : !1;
1399
1476
  }
1400
- findParentList(e, t) {
1477
+ findParentList(t, e) {
1401
1478
  let i = [];
1402
- if (t) {
1403
- let o = t.findIndex((u) => u.id == e);
1404
- o > -1 && i.push({ ...t[o] }), t[o].parentId && !this.exist(t[o].parentId, this.window.groupList) && i.push(...this.findParentList(t[o].parentId, this.window.groupList_manageMent));
1479
+ if (e) {
1480
+ let o = e.findIndex((u) => u.id == t);
1481
+ o > -1 && i.push({ ...e[o] }), e[o].parentId && !this.exist(e[o].parentId, this.window.groupList) && i.push(...this.findParentList(e[o].parentId, this.window.groupList_manageMent));
1405
1482
  }
1406
1483
  return i;
1407
1484
  }
1408
1485
  // 删除设备
1409
- DeleteEquip(e) {
1410
- const { groupId: t, equips: i } = e || {};
1411
- if (t && i && i instanceof Array) {
1412
- if (this.window[`group-${t}`]) {
1486
+ DeleteEquip(t) {
1487
+ const { groupId: e, equips: i } = t || {};
1488
+ if (e && i && i instanceof Array) {
1489
+ if (this.window[`group-${e}`]) {
1413
1490
  for (let o = 0, u = i.length; o < u; o++) {
1414
- let a = this.window[`group-${t}`].findIndex((r) => r.id == i[o].id);
1415
- a > -1 && this.window[`group-${t}`].splice(a, 1), delete this.window.equipCache[i[o].id], delete this.window.groupCache[t][i[o].id];
1491
+ let a = this.window[`group-${e}`].findIndex((h) => h.id == i[o].id);
1492
+ a > -1 && this.window[`group-${e}`].splice(a, 1), delete this.window.equipCache[i[o].id], delete this.window.groupCache[e][i[o].id];
1416
1493
  }
1417
1494
  }
1418
- this.notice({ type: "DeleteEquip", data: e });
1495
+ this.notice({ type: "DeleteEquip", data: t });
1419
1496
  }
1420
1497
  }
1421
1498
  // 编辑设备
1422
- EditEquip(e) {
1423
- const { equipNo: t, groupId: i, equipName: o } = e || {};
1424
- i && t && (window[`group-${i}`] && (this.window.equipCache[t] = o), this.notice({ type: "EditEquip", data: e }));
1499
+ EditEquip(t) {
1500
+ const { equipNo: e, groupId: i, equipName: o } = t || {};
1501
+ i && e && (window[`group-${i}`] && (this.window.equipCache[e] = o), this.notice({ type: "EditEquip", data: t }));
1425
1502
  }
1426
- notice(e) {
1503
+ notice(t) {
1427
1504
  if (this.window.hasIframe) {
1428
- let t = document.getElementsByTagName("iframe");
1429
- for (let i of t) { i.contentWindow.postMessage(e); }
1430
- } else { window.postMessage(e, "*"); }
1505
+ let e = document.getElementsByTagName("iframe");
1506
+ for (let i of e) { i.contentWindow.postMessage(t); }
1507
+ } else { window.postMessage(t, "*"); }
1431
1508
  }
1432
1509
  }
1433
- const he = {
1510
+ const nt = {
1434
1511
  name: "treeV2",
1435
1512
  components: {
1436
- tree: ue
1513
+ tree: rt
1437
1514
  },
1438
- mixins: [m],
1515
+ mixins: [x],
1439
1516
  data() {
1440
1517
  return {
1441
1518
  list: [],
1442
- refId: d.generateUUID(),
1519
+ refId: f.generateUUID(),
1443
1520
  treeKey: null,
1444
1521
  listKey: null,
1445
1522
  hasBuildTree: !1
@@ -1452,7 +1529,7 @@ const he = {
1452
1529
  }
1453
1530
  },
1454
1531
  mounted() {
1455
- this.treeKey = `equipGroup${this.treeType}`, this.listKey = `groupList${this.treeType}`, this.window[this.treeKey] ? this.list = d.formateList(JSON.parse(JSON.stringify(this.window[this.treeKey]))) : this.window[this.listKey] && this.buildTree(), window.executeQueue || (window.executeQueues = {}), window.executeQueues[this.refId] = this.destroyTree, window.addEventListener("message", (s) => {
1532
+ this.treeKey = `equipGroup${this.treeType}`, this.listKey = `groupList${this.treeType}`, this.window[this.treeKey] ? this.list = f.formateList(JSON.parse(JSON.stringify(this.window[this.treeKey]))) : this.window[this.listKey] && this.buildTree(), window.executeQueue || (window.executeQueues = {}), window.executeQueues[this.refId] = this.destroyTree, window.addEventListener("message", (s) => {
1456
1533
  s && s.data && s.data.type && this[s.data.type] && this[s.data.type]();
1457
1534
  });
1458
1535
  try {
@@ -1463,7 +1540,7 @@ const he = {
1463
1540
  },
1464
1541
  methods: {
1465
1542
  selfRequest() {
1466
- new ae().Init();
1543
+ new ht().Init();
1467
1544
  },
1468
1545
  GetEquipGroupTreeWidthTreeType() {
1469
1546
  this.treeType && this.window[this.listKey] && this.buildTree();
@@ -1473,8 +1550,8 @@ const he = {
1473
1550
  },
1474
1551
  buildTree() {
1475
1552
  if (this.window[this.listKey]) {
1476
- let s = d.listToTreeList(JSON.parse(JSON.stringify(this.window[this.listKey])));
1477
- this.list = d.formateList(JSON.parse(JSON.stringify(s))), this.window[`equipGroup${this.treeType}`] = s, this.hasBuildTree = !0;
1553
+ let s = f.listToTreeList(JSON.parse(JSON.stringify(this.window[this.listKey])));
1554
+ this.list = f.formateList(JSON.parse(JSON.stringify(s))), this.window[`equipGroup${this.treeType}`] = s, this.hasBuildTree = !0;
1478
1555
  }
1479
1556
  },
1480
1557
  filterMethod(s) {
@@ -1486,6 +1563,9 @@ const he = {
1486
1563
  getEquipSelectd() {
1487
1564
  return this.$refs[this.refId].getEquipSelectd();
1488
1565
  },
1566
+ getEquipGroupSelectd() {
1567
+ return this.$refs[this.refId].getEquipGroupSelectd();
1568
+ },
1489
1569
  getControlSelected() {
1490
1570
  return this.$refs[this.refId].getControlSelected();
1491
1571
  },
@@ -1494,14 +1574,14 @@ const he = {
1494
1574
  }
1495
1575
  }
1496
1576
  };
1497
- function re(s, e, t, i, o, u) {
1498
- const a = g("tree");
1499
- return n(), S(a, x({
1577
+ function ct(s, t, e, i, o, u) {
1578
+ const a = C("tree");
1579
+ return p(), E(a, L({
1500
1580
  ref: o.refId,
1501
1581
  data: o.list
1502
- }, { ...s.$attrs, ...s.$props }, T(s.$listeners), { buildTree: u.buildTree }), null, 16, ["data", "buildTree"]);
1582
+ }, { ...s.$attrs, ...s.$props }, _(s.$listeners), { buildTree: u.buildTree }), null, 16, ["data", "buildTree"]);
1503
1583
  }
1504
- const j = /* @__PURE__ */ E(he, [["render", re]]);
1584
+ const j = /* @__PURE__ */ O(nt, [["render", ct]]);
1505
1585
  j.install = function(s) {
1506
1586
  s.component(j.name, j);
1507
1587
  };