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

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,9 +1,672 @@
1
1
  import "./style.css";
2
- import b from "vue-virtual-scroll-list";
3
- import * as w from "@aspnet/signalr";
4
- class N {
5
- constructor(t, e, s) {
6
- this.groupNodeObject = t, this.nodesMap = e, this.controlObject = s;
2
+ import et from "vue";
3
+ import * as it from "@aspnet/signalr";
4
+ var st = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, H = { exports: {} };
5
+ /*!
6
+ * vue-virtual-scroll-list v2.3.4
7
+ * open source under the MIT license
8
+ * https://github.com/tangbc/vue-virtual-scroll-list#readme
9
+ */
10
+ (function(o, t) {
11
+ (function(e, i) {
12
+ o.exports = i(et);
13
+ })(st, function(e) {
14
+ e = e && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
15
+ function i(u, n) {
16
+ var r = Object.keys(u);
17
+ if (Object.getOwnPropertySymbols) {
18
+ var p = Object.getOwnPropertySymbols(u);
19
+ n && (p = p.filter(function(f) {
20
+ return Object.getOwnPropertyDescriptor(u, f).enumerable;
21
+ })), r.push.apply(r, p);
22
+ }
23
+ return r;
24
+ }
25
+ function s(u) {
26
+ for (var n = 1; n < arguments.length; n++) {
27
+ var r = arguments[n] != null ? arguments[n] : {};
28
+ n % 2 ? i(Object(r), !0).forEach(function(p) {
29
+ l(u, p, r[p]);
30
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(u, Object.getOwnPropertyDescriptors(r)) : i(Object(r)).forEach(function(p) {
31
+ Object.defineProperty(u, p, Object.getOwnPropertyDescriptor(r, p));
32
+ });
33
+ }
34
+ return u;
35
+ }
36
+ function a(u, n) {
37
+ if (!(u instanceof n))
38
+ throw new TypeError("Cannot call a class as a function");
39
+ }
40
+ function h(u, n) {
41
+ for (var r = 0; r < n.length; r++) {
42
+ var p = n[r];
43
+ p.enumerable = p.enumerable || !1, p.configurable = !0, "value" in p && (p.writable = !0), Object.defineProperty(u, p.key, p);
44
+ }
45
+ }
46
+ function c(u, n, r) {
47
+ return n && h(u.prototype, n), r && h(u, r), Object.defineProperty(u, "prototype", {
48
+ writable: !1
49
+ }), u;
50
+ }
51
+ function l(u, n, r) {
52
+ return n in u ? Object.defineProperty(u, n, {
53
+ value: r,
54
+ enumerable: !0,
55
+ configurable: !0,
56
+ writable: !0
57
+ }) : u[n] = r, u;
58
+ }
59
+ function g(u) {
60
+ return d(u) || w(u) || S(u) || m();
61
+ }
62
+ function d(u) {
63
+ if (Array.isArray(u))
64
+ return b(u);
65
+ }
66
+ function w(u) {
67
+ if (typeof Symbol < "u" && u[Symbol.iterator] != null || u["@@iterator"] != null)
68
+ return Array.from(u);
69
+ }
70
+ function S(u, n) {
71
+ if (!!u) {
72
+ if (typeof u == "string")
73
+ return b(u, n);
74
+ var r = Object.prototype.toString.call(u).slice(8, -1);
75
+ if (r === "Object" && u.constructor && (r = u.constructor.name), r === "Map" || r === "Set")
76
+ return Array.from(u);
77
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
78
+ return b(u, n);
79
+ }
80
+ }
81
+ function b(u, n) {
82
+ (n == null || n > u.length) && (n = u.length);
83
+ for (var r = 0, p = new Array(n); r < n; r++)
84
+ p[r] = u[r];
85
+ return p;
86
+ }
87
+ function m() {
88
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
89
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
90
+ }
91
+ var y = {
92
+ FRONT: "FRONT",
93
+ BEHIND: "BEHIND"
94
+ }, O = {
95
+ INIT: "INIT",
96
+ FIXED: "FIXED",
97
+ DYNAMIC: "DYNAMIC"
98
+ }, G = 0, z = /* @__PURE__ */ function() {
99
+ function u(n, r) {
100
+ a(this, u), this.init(n, r);
101
+ }
102
+ return c(u, [{
103
+ key: "init",
104
+ value: function(r, p) {
105
+ this.param = r, this.callUpdate = p, this.sizes = /* @__PURE__ */ new Map(), this.firstRangeTotalSize = 0, this.firstRangeAverageSize = 0, this.fixedSizeValue = 0, this.calcType = O.INIT, this.offset = 0, this.direction = "", this.range = /* @__PURE__ */ Object.create(null), r && this.checkRange(0, r.keeps - 1);
106
+ }
107
+ }, {
108
+ key: "destroy",
109
+ value: function() {
110
+ this.init(null, null);
111
+ }
112
+ }, {
113
+ key: "getRange",
114
+ value: function() {
115
+ var r = /* @__PURE__ */ Object.create(null);
116
+ return r.start = this.range.start, r.end = this.range.end, r.padFront = this.range.padFront, r.padBehind = this.range.padBehind, r;
117
+ }
118
+ }, {
119
+ key: "isBehind",
120
+ value: function() {
121
+ return this.direction === y.BEHIND;
122
+ }
123
+ }, {
124
+ key: "isFront",
125
+ value: function() {
126
+ return this.direction === y.FRONT;
127
+ }
128
+ }, {
129
+ key: "getOffset",
130
+ value: function(r) {
131
+ return (r < 1 ? 0 : this.getIndexOffset(r)) + this.param.slotHeaderSize;
132
+ }
133
+ }, {
134
+ key: "updateParam",
135
+ value: function(r, p) {
136
+ var f = this;
137
+ this.param && r in this.param && (r === "uniqueIds" && this.sizes.forEach(function(C, q) {
138
+ p.includes(q) || f.sizes.delete(q);
139
+ }), this.param[r] = p);
140
+ }
141
+ }, {
142
+ key: "saveSize",
143
+ value: function(r, p) {
144
+ this.sizes.set(r, p), this.calcType === O.INIT ? (this.fixedSizeValue = p, this.calcType = O.FIXED) : this.calcType === O.FIXED && this.fixedSizeValue !== p && (this.calcType = O.DYNAMIC, delete this.fixedSizeValue), this.calcType !== O.FIXED && typeof this.firstRangeTotalSize < "u" && (this.sizes.size < Math.min(this.param.keeps, this.param.uniqueIds.length) ? (this.firstRangeTotalSize = g(this.sizes.values()).reduce(function(f, C) {
145
+ return f + C;
146
+ }, 0), this.firstRangeAverageSize = Math.round(this.firstRangeTotalSize / this.sizes.size)) : delete this.firstRangeTotalSize);
147
+ }
148
+ }, {
149
+ key: "handleDataSourcesChange",
150
+ value: function() {
151
+ var r = this.range.start;
152
+ this.isFront() ? r = r - G : this.isBehind() && (r = r + G), r = Math.max(r, 0), this.updateRange(this.range.start, this.getEndByStart(r));
153
+ }
154
+ }, {
155
+ key: "handleSlotSizeChange",
156
+ value: function() {
157
+ this.handleDataSourcesChange();
158
+ }
159
+ }, {
160
+ key: "handleScroll",
161
+ value: function(r) {
162
+ this.direction = r < this.offset || r === 0 ? y.FRONT : y.BEHIND, this.offset = r, this.param && (this.direction === y.FRONT ? this.handleFront() : this.direction === y.BEHIND && this.handleBehind());
163
+ }
164
+ }, {
165
+ key: "handleFront",
166
+ value: function() {
167
+ var r = this.getScrollOvers();
168
+ if (!(r > this.range.start)) {
169
+ var p = Math.max(r - this.param.buffer, 0);
170
+ this.checkRange(p, this.getEndByStart(p));
171
+ }
172
+ }
173
+ }, {
174
+ key: "handleBehind",
175
+ value: function() {
176
+ var r = this.getScrollOvers();
177
+ r < this.range.start + this.param.buffer || this.checkRange(r, this.getEndByStart(r));
178
+ }
179
+ }, {
180
+ key: "getScrollOvers",
181
+ value: function() {
182
+ var r = this.offset - this.param.slotHeaderSize;
183
+ if (r <= 0)
184
+ return 0;
185
+ if (this.isFixedType())
186
+ return Math.floor(r / this.fixedSizeValue);
187
+ for (var p = 0, f = 0, C = 0, q = this.param.uniqueIds.length; p <= q; ) {
188
+ if (f = p + Math.floor((q - p) / 2), C = this.getIndexOffset(f), C === r)
189
+ return f;
190
+ C < r ? p = f + 1 : C > r && (q = f - 1);
191
+ }
192
+ return p > 0 ? --p : 0;
193
+ }
194
+ }, {
195
+ key: "getIndexOffset",
196
+ value: function(r) {
197
+ if (!r)
198
+ return 0;
199
+ for (var p = 0, f = 0, C = 0; C < r; C++)
200
+ f = this.sizes.get(this.param.uniqueIds[C]), p = p + (typeof f == "number" ? f : this.getEstimateSize());
201
+ return p;
202
+ }
203
+ }, {
204
+ key: "isFixedType",
205
+ value: function() {
206
+ return this.calcType === O.FIXED;
207
+ }
208
+ }, {
209
+ key: "getLastIndex",
210
+ value: function() {
211
+ return this.param.uniqueIds.length - 1;
212
+ }
213
+ }, {
214
+ key: "checkRange",
215
+ value: function(r, p) {
216
+ var f = this.param.keeps, C = this.param.uniqueIds.length;
217
+ C <= f ? (r = 0, p = this.getLastIndex()) : p - r < f - 1 && (r = p - f + 1), this.range.start !== r && this.updateRange(r, p);
218
+ }
219
+ }, {
220
+ key: "updateRange",
221
+ value: function(r, p) {
222
+ this.range.start = r, this.range.end = p, this.range.padFront = this.getPadFront(), this.range.padBehind = this.getPadBehind(), this.callUpdate(this.getRange());
223
+ }
224
+ }, {
225
+ key: "getEndByStart",
226
+ value: function(r) {
227
+ var p = r + this.param.keeps - 1, f = Math.min(p, this.getLastIndex());
228
+ return f;
229
+ }
230
+ }, {
231
+ key: "getPadFront",
232
+ value: function() {
233
+ return this.isFixedType() ? this.fixedSizeValue * this.range.start : this.getIndexOffset(this.range.start);
234
+ }
235
+ }, {
236
+ key: "getPadBehind",
237
+ value: function() {
238
+ var r = this.range.end, p = this.getLastIndex();
239
+ return this.isFixedType() ? (p - r) * this.fixedSizeValue : (p - r) * this.getEstimateSize();
240
+ }
241
+ }, {
242
+ key: "getEstimateSize",
243
+ value: function() {
244
+ return this.isFixedType() ? this.fixedSizeValue : this.firstRangeAverageSize || this.param.estimateSize;
245
+ }
246
+ }]), u;
247
+ }(), V = {
248
+ dataKey: {
249
+ type: [String, Function],
250
+ required: !0
251
+ },
252
+ dataSources: {
253
+ type: Array,
254
+ required: !0
255
+ },
256
+ dataComponent: {
257
+ type: [Object, Function],
258
+ required: !0
259
+ },
260
+ keeps: {
261
+ type: Number,
262
+ default: 30
263
+ },
264
+ extraProps: {
265
+ type: Object
266
+ },
267
+ estimateSize: {
268
+ type: Number,
269
+ default: 50
270
+ },
271
+ direction: {
272
+ type: String,
273
+ default: "vertical"
274
+ },
275
+ start: {
276
+ type: Number,
277
+ default: 0
278
+ },
279
+ offset: {
280
+ type: Number,
281
+ default: 0
282
+ },
283
+ topThreshold: {
284
+ type: Number,
285
+ default: 0
286
+ },
287
+ bottomThreshold: {
288
+ type: Number,
289
+ default: 0
290
+ },
291
+ pageMode: {
292
+ type: Boolean,
293
+ default: !1
294
+ },
295
+ rootTag: {
296
+ type: String,
297
+ default: "div"
298
+ },
299
+ wrapTag: {
300
+ type: String,
301
+ default: "div"
302
+ },
303
+ wrapClass: {
304
+ type: String,
305
+ default: ""
306
+ },
307
+ wrapStyle: {
308
+ type: Object
309
+ },
310
+ itemTag: {
311
+ type: String,
312
+ default: "div"
313
+ },
314
+ itemClass: {
315
+ type: String,
316
+ default: ""
317
+ },
318
+ itemClassAdd: {
319
+ type: Function
320
+ },
321
+ itemStyle: {
322
+ type: Object
323
+ },
324
+ headerTag: {
325
+ type: String,
326
+ default: "div"
327
+ },
328
+ headerClass: {
329
+ type: String,
330
+ default: ""
331
+ },
332
+ headerStyle: {
333
+ type: Object
334
+ },
335
+ footerTag: {
336
+ type: String,
337
+ default: "div"
338
+ },
339
+ footerClass: {
340
+ type: String,
341
+ default: ""
342
+ },
343
+ footerStyle: {
344
+ type: Object
345
+ },
346
+ itemScopedSlots: {
347
+ type: Object
348
+ }
349
+ }, J = {
350
+ index: {
351
+ type: Number
352
+ },
353
+ event: {
354
+ type: String
355
+ },
356
+ tag: {
357
+ type: String
358
+ },
359
+ horizontal: {
360
+ type: Boolean
361
+ },
362
+ source: {
363
+ type: Object
364
+ },
365
+ component: {
366
+ type: [Object, Function]
367
+ },
368
+ slotComponent: {
369
+ type: Function
370
+ },
371
+ uniqueKey: {
372
+ type: [String, Number]
373
+ },
374
+ extraProps: {
375
+ type: Object
376
+ },
377
+ scopedSlots: {
378
+ type: Object
379
+ }
380
+ }, X = {
381
+ event: {
382
+ type: String
383
+ },
384
+ uniqueKey: {
385
+ type: String
386
+ },
387
+ tag: {
388
+ type: String
389
+ },
390
+ horizontal: {
391
+ type: Boolean
392
+ }
393
+ }, D = {
394
+ created: function() {
395
+ this.shapeKey = this.horizontal ? "offsetWidth" : "offsetHeight";
396
+ },
397
+ mounted: function() {
398
+ var n = this;
399
+ typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(function() {
400
+ n.dispatchSizeChange();
401
+ }), this.resizeObserver.observe(this.$el));
402
+ },
403
+ updated: function() {
404
+ this.resizeObserver.observe(this.$el);
405
+ },
406
+ beforeDestroy: function() {
407
+ this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null);
408
+ },
409
+ methods: {
410
+ getCurrentSize: function() {
411
+ return this.$el ? this.$el[this.shapeKey] : 0;
412
+ },
413
+ dispatchSizeChange: function() {
414
+ this.$parent.$emit(this.event, this.uniqueKey, this.getCurrentSize(), this.hasInitial);
415
+ }
416
+ }
417
+ }, Y = e.component("virtual-list-item", {
418
+ mixins: [D],
419
+ props: J,
420
+ render: function(n) {
421
+ var r = this.tag, p = this.component, f = this.extraProps, C = f === void 0 ? {} : f, q = this.index, v = this.source, N = this.scopedSlots, I = N === void 0 ? {} : N, x = this.uniqueKey, M = this.slotComponent, j = s(s({}, C), {}, {
422
+ source: v,
423
+ index: q
424
+ });
425
+ return n(r, {
426
+ key: x,
427
+ attrs: {
428
+ role: "listitem"
429
+ }
430
+ }, [M ? M({
431
+ item: v,
432
+ index: q,
433
+ scope: j
434
+ }) : n(p, {
435
+ props: j,
436
+ scopedSlots: I
437
+ })]);
438
+ }
439
+ }), K = e.component("virtual-list-slot", {
440
+ mixins: [D],
441
+ props: X,
442
+ render: function(n) {
443
+ var r = this.tag, p = this.uniqueKey;
444
+ return n(r, {
445
+ key: p,
446
+ attrs: {
447
+ role: p
448
+ }
449
+ }, this.$slots.default);
450
+ }
451
+ }), T = {
452
+ ITEM: "item_resize",
453
+ SLOT: "slot_resize"
454
+ }, L = {
455
+ HEADER: "thead",
456
+ FOOTER: "tfoot"
457
+ }, Q = e.component("virtual-list", {
458
+ props: V,
459
+ data: function() {
460
+ return {
461
+ range: null
462
+ };
463
+ },
464
+ watch: {
465
+ "dataSources.length": function() {
466
+ this.virtual.updateParam("uniqueIds", this.getUniqueIdFromDataSources()), this.virtual.handleDataSourcesChange();
467
+ },
468
+ keeps: function(n) {
469
+ this.virtual.updateParam("keeps", n), this.virtual.handleSlotSizeChange();
470
+ },
471
+ start: function(n) {
472
+ this.scrollToIndex(n);
473
+ },
474
+ offset: function(n) {
475
+ this.scrollToOffset(n);
476
+ }
477
+ },
478
+ created: function() {
479
+ this.isHorizontal = this.direction === "horizontal", this.directionKey = this.isHorizontal ? "scrollLeft" : "scrollTop", this.installVirtual(), this.$on(T.ITEM, this.onItemResized), (this.$slots.header || this.$slots.footer) && this.$on(T.SLOT, this.onSlotResized);
480
+ },
481
+ activated: function() {
482
+ this.scrollToOffset(this.virtual.offset), this.pageMode && document.addEventListener("scroll", this.onScroll, {
483
+ passive: !1
484
+ });
485
+ },
486
+ deactivated: function() {
487
+ this.pageMode && document.removeEventListener("scroll", this.onScroll);
488
+ },
489
+ mounted: function() {
490
+ this.start ? this.scrollToIndex(this.start) : this.offset && this.scrollToOffset(this.offset), this.pageMode && (this.updatePageModeFront(), document.addEventListener("scroll", this.onScroll, {
491
+ passive: !1
492
+ }));
493
+ },
494
+ beforeDestroy: function() {
495
+ this.virtual.destroy(), this.pageMode && document.removeEventListener("scroll", this.onScroll);
496
+ },
497
+ methods: {
498
+ getSize: function(n) {
499
+ return this.virtual.sizes.get(n);
500
+ },
501
+ getSizes: function() {
502
+ return this.virtual.sizes.size;
503
+ },
504
+ getOffset: function() {
505
+ if (this.pageMode)
506
+ return document.documentElement[this.directionKey] || document.body[this.directionKey];
507
+ var n = this.$refs.root;
508
+ return n ? Math.ceil(n[this.directionKey]) : 0;
509
+ },
510
+ getClientSize: function() {
511
+ var n = this.isHorizontal ? "clientWidth" : "clientHeight";
512
+ if (this.pageMode)
513
+ return document.documentElement[n] || document.body[n];
514
+ var r = this.$refs.root;
515
+ return r ? Math.ceil(r[n]) : 0;
516
+ },
517
+ getScrollSize: function() {
518
+ var n = this.isHorizontal ? "scrollWidth" : "scrollHeight";
519
+ if (this.pageMode)
520
+ return document.documentElement[n] || document.body[n];
521
+ var r = this.$refs.root;
522
+ return r ? Math.ceil(r[n]) : 0;
523
+ },
524
+ scrollToOffset: function(n) {
525
+ if (this.pageMode)
526
+ document.body[this.directionKey] = n, document.documentElement[this.directionKey] = n;
527
+ else {
528
+ var r = this.$refs.root;
529
+ r && (r[this.directionKey] = n);
530
+ }
531
+ },
532
+ scrollToIndex: function(n) {
533
+ if (n >= this.dataSources.length - 1)
534
+ this.scrollToBottom();
535
+ else {
536
+ var r = this.virtual.getOffset(n);
537
+ this.scrollToOffset(r);
538
+ }
539
+ },
540
+ scrollToBottom: function() {
541
+ var n = this, r = this.$refs.shepherd;
542
+ if (r) {
543
+ var p = r[this.isHorizontal ? "offsetLeft" : "offsetTop"];
544
+ this.scrollToOffset(p), setTimeout(function() {
545
+ n.getOffset() + n.getClientSize() + 1 < n.getScrollSize() && n.scrollToBottom();
546
+ }, 3);
547
+ }
548
+ },
549
+ updatePageModeFront: function() {
550
+ var n = this.$refs.root;
551
+ if (n) {
552
+ var r = n.getBoundingClientRect(), p = n.ownerDocument.defaultView, f = this.isHorizontal ? r.left + p.pageXOffset : r.top + p.pageYOffset;
553
+ this.virtual.updateParam("slotHeaderSize", f);
554
+ }
555
+ },
556
+ reset: function() {
557
+ this.virtual.destroy(), this.scrollToOffset(0), this.installVirtual();
558
+ },
559
+ installVirtual: function() {
560
+ this.virtual = new z({
561
+ slotHeaderSize: 0,
562
+ slotFooterSize: 0,
563
+ keeps: this.keeps,
564
+ estimateSize: this.estimateSize,
565
+ buffer: Math.round(this.keeps / 3),
566
+ uniqueIds: this.getUniqueIdFromDataSources()
567
+ }, this.onRangeChanged), this.range = this.virtual.getRange();
568
+ },
569
+ getUniqueIdFromDataSources: function() {
570
+ var n = this.dataKey;
571
+ return this.dataSources.map(function(r) {
572
+ return typeof n == "function" ? n(r) : r[n];
573
+ });
574
+ },
575
+ onItemResized: function(n, r) {
576
+ this.virtual.saveSize(n, r), this.$emit("resized", n, r);
577
+ },
578
+ onSlotResized: function(n, r, p) {
579
+ n === L.HEADER ? this.virtual.updateParam("slotHeaderSize", r) : n === L.FOOTER && this.virtual.updateParam("slotFooterSize", r), p && this.virtual.handleSlotSizeChange();
580
+ },
581
+ onRangeChanged: function(n) {
582
+ this.range = n;
583
+ },
584
+ onScroll: function(n) {
585
+ var r = this.getOffset(), p = this.getClientSize(), f = this.getScrollSize();
586
+ r < 0 || r + p > f + 1 || !f || (this.virtual.handleScroll(r), this.emitEvent(r, p, f, n));
587
+ },
588
+ emitEvent: function(n, r, p, f) {
589
+ this.$emit("scroll", f, this.virtual.getRange()), this.virtual.isFront() && !!this.dataSources.length && n - this.topThreshold <= 0 ? this.$emit("totop") : this.virtual.isBehind() && n + r + this.bottomThreshold >= p && this.$emit("tobottom");
590
+ },
591
+ getRenderSlots: function(n) {
592
+ for (var r = [], p = this.range, f = p.start, C = p.end, q = this.dataSources, v = this.dataKey, N = this.itemClass, I = this.itemTag, x = this.itemStyle, M = this.isHorizontal, j = this.extraProps, A = this.dataComponent, R = this.itemScopedSlots, F = this.$scopedSlots && this.$scopedSlots.item, E = f; E <= C; E++) {
593
+ var $ = q[E];
594
+ if ($) {
595
+ var _ = typeof v == "function" ? v($) : $[v];
596
+ typeof _ == "string" || typeof _ == "number" ? r.push(n(Y, {
597
+ props: {
598
+ index: E,
599
+ tag: I,
600
+ event: T.ITEM,
601
+ horizontal: M,
602
+ uniqueKey: _,
603
+ source: $,
604
+ extraProps: j,
605
+ component: A,
606
+ slotComponent: F,
607
+ scopedSlots: R
608
+ },
609
+ style: x,
610
+ class: "".concat(N).concat(this.itemClassAdd ? " " + this.itemClassAdd(E) : "")
611
+ })) : console.warn("Cannot get the data-key '".concat(v, "' from data-sources."));
612
+ } else
613
+ console.warn("Cannot get the index '".concat(E, "' from data-sources."));
614
+ }
615
+ return r;
616
+ }
617
+ },
618
+ render: function(n) {
619
+ var r = this.$slots, p = r.header, f = r.footer, C = this.range, q = C.padFront, v = C.padBehind, N = this.isHorizontal, I = this.pageMode, x = this.rootTag, M = this.wrapTag, j = this.wrapClass, A = this.wrapStyle, R = this.headerTag, F = this.headerClass, E = this.headerStyle, $ = this.footerTag, _ = this.footerClass, Z = this.footerStyle, U = {
620
+ padding: N ? "0px ".concat(v, "px 0px ").concat(q, "px") : "".concat(q, "px 0px ").concat(v, "px")
621
+ }, tt = A ? Object.assign({}, A, U) : U;
622
+ return n(x, {
623
+ ref: "root",
624
+ on: {
625
+ "&scroll": !I && this.onScroll
626
+ }
627
+ }, [
628
+ p ? n(K, {
629
+ class: F,
630
+ style: E,
631
+ props: {
632
+ tag: R,
633
+ event: T.SLOT,
634
+ uniqueKey: L.HEADER
635
+ }
636
+ }, p) : null,
637
+ n(M, {
638
+ class: j,
639
+ attrs: {
640
+ role: "group"
641
+ },
642
+ style: tt
643
+ }, this.getRenderSlots(n)),
644
+ f ? n(K, {
645
+ class: _,
646
+ style: Z,
647
+ props: {
648
+ tag: $,
649
+ event: T.SLOT,
650
+ uniqueKey: L.FOOTER
651
+ }
652
+ }, f) : null,
653
+ n("div", {
654
+ ref: "shepherd",
655
+ style: {
656
+ width: N ? "0px" : "100%",
657
+ height: N ? "100%" : "0px"
658
+ }
659
+ })
660
+ ]);
661
+ }
662
+ });
663
+ return Q;
664
+ });
665
+ })(H);
666
+ const ot = H.exports;
667
+ class at {
668
+ constructor(t, e, i) {
669
+ this.groupNodeObject = t, this.nodesMap = e, this.controlObject = i;
7
670
  }
8
671
  addNodesMap(t) {
9
672
  t && t.forEach((e) => {
@@ -29,95 +692,141 @@ class N {
29
692
  closeBrotherNode(t) {
30
693
  if (!!t && this.groupNodeObject[t]) {
31
694
  let e = this.groupNodeObject[t].groupId;
32
- for (let s in this.groupNodeObject)
33
- this.groupNodeObject[s].groupId == e && this.groupNodeObject[s].key != t && this.groupNodeObject[s].expand && (this.groupNodeObject[s].expand = !1, this.recycleGroupCache(this.groupNodeObject[s].key));
695
+ for (let i in this.groupNodeObject)
696
+ 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));
34
697
  }
35
698
  }
36
699
  }
37
- class E {
38
- constructor(t, e, s, i, u, r) {
39
- this.equipControllObject = s, this.groupNodeObject = t, this.nodesMap = e, this.controlObject = i, this.equipCheckObject = u, this.isSearchStatus = !1, this.searchStatusGroupObject = {}, this.aliasName = r;
700
+ class rt {
701
+ constructor(t, e, i, s, a, h) {
702
+ this.equipControllObject = i, this.groupNodeObject = t, this.nodesMap = e, this.controlObject = s, this.equipCheckObject = a, this.isSearchStatus = !1, this.searchStatusGroupObject = {}, this.aliasName = h;
40
703
  }
41
704
  resetCheckedStatus() {
42
705
  Object.values(this.nodesMap).forEach((t) => {
43
- this.setCheckStatus(t.key, !1, !1), t.isGroup && !t.isEquip && (this.clearCheckedEquips(t.key), this.updateEquipSelectCount(t.key, !0)), t.halfCheckedEquips && (t.halfCheckedEquips = []);
44
- }), Object.keys(this.equipCheckObject).forEach((t) => {
45
- this.setEquipCheckObject(t, !1, !1, this.equipCheckObject[t].groupId);
46
- });
706
+ this.setCheckStatus(t.key, !1, !1);
707
+ }), Object.keys(this.equipCheckObject).forEach((t) => delete this.equipCheckObject[t]), this.updateGroupCheckStatus();
47
708
  }
48
709
  reComputedCheckNum(t) {
49
- this.isSearchStatus = t, this.isSearchStatus ? (Object.values(this.groupNodeObject).forEach((e) => {
50
- this.searchStatusGroupObject[e.key] = {
51
- groupId: e.groupId,
52
- equipSelectCount: e.equipSelectCount,
53
- halfCheckedEquips: e.halfCheckedEquips,
54
- ...this.searchStatusGroupObject[e.key]
55
- };
56
- }), Object.values(this.groupNodeObject).forEach((e) => {
57
- this.updateEquipSelectCount(e.key, !0), e.halfCheckedEquips = [];
58
- }), Object.values(this.groupNodeObject).forEach((e) => {
59
- (window.top[`group-${e.key}-search`] || []).forEach((i) => {
60
- this.equipCheckObject[i.equipNo] && this.equipCheckObject[i.equipNo].checked ? this.updateEquipSelectCount(e.key, !1, 1) : this.equipCheckObject[i.equipNo] && this.equipCheckObject[i.equipNo].indeterminate && e.halfCheckedEquips.push(i.equipNo);
61
- });
62
- })) : (Object.values(this.groupNodeObject).forEach((e) => {
63
- let s = this.searchStatusGroupObject[e.key];
64
- s && (e.equipSelectCount = s.equipSelectCount, e.halfCheckedEquips = [...s.halfCheckedEquips, ...e.halfCheckedEquips], e.halfCheckedEquips = [...new Set(e.halfCheckedEquips)]);
65
- }), this.searchStatusGroupObject = {});
710
+ this.isSearchStatus = t, this.updateGroupCheckStatus();
66
711
  }
67
712
  updateCheckedStatusWithEquips(t) {
68
- window.setTimeout(() => {
69
- for (let e = 0, s = t.length; e < s; e++) {
70
- let i = window.top.equipCache && window.top.equipCache[t[e]];
71
- i && i.groupId && (this.setEquipCheckObject(t[e], !0, !1, i.groupId), this.setCheckStatus(`${i.groupId}-${t[e]}`, !0, !1), this.updateEquipSelectCount(i.groupId, !1, 1), this.updateExpandControlCheckStatus(i.groupId, t[e]));
713
+ Object.keys(this.equipCheckObject).forEach((i) => {
714
+ i.split("-").length === 2 && delete this.equipCheckObject[i];
715
+ });
716
+ let e = [];
717
+ Array.isArray(t) ? e = t.map((i) => ({ equipNo: Number(i), groupId: null })) : t !== null && typeof t == "object" && Object.keys(t).forEach((i) => {
718
+ Array.isArray(t[i]) && t[i].forEach((s) => {
719
+ e.push({ equipNo: Number(s), groupId: Number(i) });
720
+ });
721
+ });
722
+ for (let i = 0, s = e.length; i < s; i++) {
723
+ const { equipNo: a, groupId: h } = e[i];
724
+ if (h != null) {
725
+ const c = `${h}-${a}`;
726
+ this.setEquipCheckObject(c, !0, !1, h), this.setCheckStatus(c, !0, !1), this.updateExpandControlCheckStatus(h, a);
727
+ } else {
728
+ const c = window.top.equipCache && window.top.equipCache[a];
729
+ c && (c.groupIds || (c.groupId ? [c.groupId] : [])).forEach((g) => {
730
+ const d = `${g}-${a}`;
731
+ this.setEquipCheckObject(d, !0, !1, g), this.setCheckStatus(d, !0, !1), this.updateExpandControlCheckStatus(g, a);
732
+ });
72
733
  }
73
- this.updateGroupCheckStatus();
74
- }, 200);
734
+ }
75
735
  }
76
736
  updateExpandControlCheckStatus(t, e) {
77
- let s = this.nodesMap[`${t}-${e}`];
78
- s && s.settings && s.settings.length && s.settings.forEach((i) => {
79
- this.nodesMap[`${t}-${e}-${i.setNo}`] && this.setCheckStatus(`${t}-${e}-${i.setNo}`, !0, !1);
737
+ let i = this.nodesMap[`${t}-${e}`];
738
+ i && i.settings && i.settings.length && i.settings.forEach((s) => {
739
+ this.nodesMap[`${t}-${e}-${s.setNo}`] && this.setCheckStatus(`${t}-${e}-${s.setNo}`, !0, !1);
80
740
  });
81
741
  }
82
742
  updateCheckedStatusWithControls(t) {
83
- window.setTimeout(() => {
84
- for (let e = 0, s = t.length; e < s; e++) {
85
- let i = t[e].split("."), u = i[0], r = i[1];
86
- if (this.equipControllObject[u] || (this.equipControllObject[u] = []), this.equipControllObject[u].push(Number(r)), window.top.equipCache && window.top.equipCache[u]) {
87
- let p = window.top.equipCache[u].groupId, a = `${p}-${u}-${r}`;
88
- this.nodesMap[a] && this.setCheckStatus(a, !0, !1), this.nodesMap[`${p}-${u}`] && this.setCheckStatus(`${p}-${u}`, !1, !0), this.nodesMap[`${p}`].halfCheckedEquips && this.nodesMap[`${p}`].halfCheckedEquips.push(u), this.setEquipCheckObject(u, !1, !0, p);
89
- }
743
+ for (let e = 0, i = t.length; e < i; e++) {
744
+ let s = t[e], a, h, c;
745
+ if (s !== null && typeof s == "object" && !Array.isArray(s))
746
+ a = Number(s.equipNo), h = s.setNo, c = s.groupId;
747
+ else {
748
+ let g = s.split(".");
749
+ a = Number(g[0]), h = g[1], c = null;
90
750
  }
91
- this.updateGroupCheckStatus();
92
- }, 100);
751
+ this.equipControllObject[a] || (this.equipControllObject[a] = []), this.equipControllObject[a].push(Number(h));
752
+ const l = window.top.equipCache && window.top.equipCache[a];
753
+ l && (c != null ? [c] : l.groupIds || (l.groupId ? [l.groupId] : [])).forEach((d) => {
754
+ const w = `${d}-${a}`, S = `${d}-${a}-${h}`;
755
+ this.nodesMap[S] && this.setCheckStatus(S, !0, !1), this.nodesMap[w] && this.setCheckStatus(w, !1, !0), this.setEquipCheckObject(w, !1, !0, d);
756
+ });
757
+ }
93
758
  }
94
759
  updateGroupCheckStatus() {
95
- Object.values(this.groupNodeObject).forEach((t) => {
96
- t.count > 0 && t.count == t.equipSelectCount ? this.setCheckStatus(t.key, !0, !1) : t.count && t.equipSelectCount && t.count > t.equipSelectCount || t.halfCheckedEquips.length ? this.setGroupHalfChecked(t.key) : this.setCheckStatus(t.key, !1, !1);
760
+ this.getSortedGroupsByLevel().forEach((e) => {
761
+ const i = this.computeGroupStatus(e.key);
762
+ this.setCheckStatus(e.key, i.checked, i.indeterminate), e.equipSelectCount = i.selectCount, e.count === 0 && i.checked && i.selectCount > 0 && (e.count = i.selectCount);
97
763
  });
98
764
  }
99
- setGroupHalfChecked(t) {
100
- this.nodesMap[t] && this.setCheckStatus(t, !1, !0), this.nodesMap[t].groupId && this.setGroupHalfChecked(this.nodesMap[t].groupId);
765
+ getSortedGroupsByLevel() {
766
+ return Object.values(this.groupNodeObject).sort((t, e) => e.level - t.level);
767
+ }
768
+ computeGroupStatus(t) {
769
+ const e = this.groupNodeObject[t];
770
+ if (!e)
771
+ return { checked: !1, indeterminate: !1, selectCount: 0 };
772
+ let i = this.isSearchStatus ? window.top[`group-${t}-search`] || [] : window.top[`group-${t}${this.aliasName}`] || [];
773
+ !this.isSearchStatus && i.length === 0 && this.aliasName && (i = window.top[`group-${t}`] || []);
774
+ let s = 0, a = i.length || e.equipCount || 0;
775
+ if (i.length > 0)
776
+ i.forEach((S) => {
777
+ const b = S.equipNo || S.id, m = `${t}-${b}`;
778
+ this.equipCheckObject[m] && this.equipCheckObject[m].checked && s++;
779
+ }), a = i.length;
780
+ else {
781
+ const S = `${t}-`;
782
+ i.forEach((m) => {
783
+ const y = m.equipNo || m.id, O = `${S}${y}`;
784
+ this.equipCheckObject[O] && this.equipCheckObject[O].checked && s++;
785
+ });
786
+ let b = /* @__PURE__ */ new Set();
787
+ Object.keys(this.equipCheckObject).forEach((m) => {
788
+ m.startsWith(S) && m.split("-").length === 2 && (b.add(m.split("-")[1]), this.equipCheckObject[m].checked && s++);
789
+ }), a === 0 && b.size > 0 && (a = b.size);
790
+ }
791
+ let h = 0, c = 0, l = !1, g = !1;
792
+ e.groups && e.groups.length > 0 && e.groups.forEach((S) => {
793
+ const b = this.nodesMap[S.key], m = this.groupNodeObject[S.key];
794
+ if (b) {
795
+ let y = b.count || (m ? m.equipCount : 0) || 0;
796
+ if (y === 0) {
797
+ const O = `${S.key}-`;
798
+ let G = 0;
799
+ Object.keys(this.equipCheckObject).forEach((z) => {
800
+ z.startsWith(O) && z.split("-").length === 2 && G++;
801
+ }), y = G, y === 0 && b.equipSelectCount > 0 && (y = b.equipSelectCount);
802
+ }
803
+ c += y, y > 0 && (b.checked ? (h += y, l = !0) : b.indeterminate ? (g = !0, l = !0) : g = !0);
804
+ }
805
+ });
806
+ const d = s + h;
807
+ let w = e.count || 0;
808
+ return w === 0 && (w = a + c), d === 0 && !l ? { checked: !1, indeterminate: !1, selectCount: 0 } : w === 0 ? d > 0 ? { checked: !1, indeterminate: !0, selectCount: d } : { checked: !1, indeterminate: !1, selectCount: 0 } : d === 0 ? l ? { checked: !1, indeterminate: !0, selectCount: d } : { checked: !1, indeterminate: !1, selectCount: 0 } : d === w && !g ? { checked: !0, indeterminate: !1, selectCount: d } : { checked: !1, indeterminate: !0, selectCount: d };
101
809
  }
102
- setControlStatus(t, e, s, i) {
103
- t && t.forEach((u) => {
104
- this.nodesMap[`${e}-${s}-${u.setNo}`] && this.setCheckStatus(`${e}-${s}-${u.setNo}`, i, !1);
810
+ setControlStatus(t, e, i, s) {
811
+ t && t.forEach((a) => {
812
+ this.nodesMap[`${e}-${i}-${a.setNo}`] && this.setCheckStatus(`${e}-${i}-${a.setNo}`, s, !1);
105
813
  });
106
814
  }
107
815
  updateControlCheckStatus() {
108
816
  Object.keys(this.controlObject).forEach((t) => {
109
- let e = this.nodesMap[`${this.controlObject[t].groupId}-${t}`];
110
- if (e)
111
- if (e.checked) {
112
- let s = e.settings;
113
- this.setControlStatus(s, this.controlObject[t].groupId, t, !0);
114
- } else if (!e.checked && !e.indeterminate) {
115
- let s = e.settings;
116
- this.setControlStatus(s, this.controlObject[t].groupId, t, !1);
817
+ const [e, i] = t.split("-");
818
+ let s = this.nodesMap[t];
819
+ if (s)
820
+ if (s.checked) {
821
+ let a = s.settings;
822
+ this.setControlStatus(a, e, i, !0);
823
+ } else if (!s.checked && !s.indeterminate) {
824
+ let a = s.settings;
825
+ this.setControlStatus(a, e, i, !1);
117
826
  } else
118
- this.equipControllObject[t] && this.equipControllObject[t].forEach((s) => {
119
- let i = `${this.controlObject[t].groupId}-${t}-${s}`;
120
- this.nodesMap[i] && this.setCheckStatus(i, !0, !1);
827
+ this.equipControllObject[i] && this.equipControllObject[i].forEach((a) => {
828
+ let h = `${e}-${i}-${a}`;
829
+ this.nodesMap[h] && this.setCheckStatus(h, !0, !1);
121
830
  });
122
831
  });
123
832
  }
@@ -128,99 +837,95 @@ class E {
128
837
  }), t;
129
838
  }
130
839
  getEquipSelectd() {
131
- let t = [];
132
- return Object.keys(this.equipCheckObject).forEach((e) => {
133
- this.equipCheckObject[e].checked && t.push(Number(e));
134
- }), t;
840
+ let t = [], e = /* @__PURE__ */ new Set();
841
+ return Object.keys(this.equipCheckObject).forEach((i) => {
842
+ if (this.equipCheckObject[i].checked)
843
+ try {
844
+ e.add(Number(i.split("-")[1]));
845
+ } catch (s) {
846
+ console.log(s);
847
+ }
848
+ }), t = Array.from(e), t;
849
+ }
850
+ getEquipGroupSelectd() {
851
+ let t = Object.keys(this.equipCheckObject);
852
+ return t.length > 0 && (t = this.returnArray(t)), t;
853
+ }
854
+ returnArray(t) {
855
+ const e = [];
856
+ return t.forEach((i) => {
857
+ const s = i.split("-");
858
+ if (s.length >= 2) {
859
+ const a = parseInt(s[0]), h = parseInt(s[1]);
860
+ !isNaN(a) && !isNaN(h) && e.push({ groupId: a, equipNo: h });
861
+ }
862
+ }), e;
863
+ }
864
+ parseEquipArrayToGroupFormat(t) {
865
+ const e = {};
866
+ return t.forEach((i) => {
867
+ const [s, a] = i.split("-"), h = parseInt(s);
868
+ isNaN(h) || (e[h] || (e[h] = []), e[h].push(parseInt(a)));
869
+ }), e;
135
870
  }
136
871
  getControlSelected() {
137
872
  let t = [];
138
873
  return Object.keys(this.equipControllObject).forEach((e) => {
139
- t.push(...this.equipControllObject[e].map((s) => `${e}.${s}`));
874
+ t.push(...this.equipControllObject[e].map((i) => `${e}.${i}`));
140
875
  }), t;
141
876
  }
142
877
  onChecked(t, e) {
143
878
  this.isSearchStatus = e || !1, t.isGroup && !t.isEquip ? this.selectGroup(t) : t.isEquip ? this.selectEquip(t) : t.isSetting && this.selectControl(t);
144
879
  }
145
- setCheckStatus(t, e, s) {
146
- this.nodesMap[t] && (this.nodesMap[t].checked = e, this.nodesMap[t].isGroup && (this.nodesMap[t].indeterminate = s));
147
- }
148
- clearCheckedEquips(t) {
149
- this.groupNodeObject[t] && (this.groupNodeObject[t].equipSelectCount = 0, this.groupNodeObject[t].halfCheckedEquips && this.groupNodeObject[t].halfCheckedEquips.forEach((e) => {
150
- this.equipControllObject[e] && this.equipControllObject[e].forEach((s) => {
151
- this.setCheckStatus(`${t}-${e}-${s}`, !1, !1);
152
- });
153
- }), this.groupNodeObject[t].halfCheckedEquips = [], this.groupNodeObject[t].groupId && this.clearCheckedEquips(this.groupNodeObject[t].groupId));
154
- }
155
- updateSearchStatusObject(t, e) {
156
- this.searchStatusGroupObject[t] && (this.searchStatusGroupObject[t].equipSelectCount = this.searchStatusGroupObject[t].equipSelectCount + e, this.searchStatusGroupObject[t].groupId && this.updateSearchStatusObject(this.searchStatusGroupObject[t].groupId, e));
157
- }
158
- updateEquipSelectCount(t, e, s) {
159
- this.nodesMap[t] && (e ? this.nodesMap[t].equipSelectCount = 0 : this.nodesMap[t].equipSelectCount = this.nodesMap[t].equipSelectCount + s, this.nodesMap[t].groupId && this.updateEquipSelectCount(this.nodesMap[t].groupId, e, s));
160
- }
161
- setEquipCheckObject(t, e, s, i) {
162
- this.equipCheckObject[t] || (this.equipCheckObject[t] = {}), this.equipCheckObject[t].checked = e, this.equipCheckObject[t].indeterminate = s, this.equipCheckObject[t].groupId = i;
163
- }
164
- updateEquipSelect(t, e, s, i) {
165
- this.nodesMap[t] && e.length && e.forEach((u) => {
166
- s ? (this.setEquipCheckObject(u.equipNo, !0, !1, t), this.nodesMap[`${t}-${u.equipNo}`] && this.setCheckStatus(`${t}-${u.equipNo}`, !0, !1)) : (this.setEquipCheckObject(u.equipNo, !1, !1, t), this.nodesMap[`${t}-${u.equipNo}`] && this.setCheckStatus(`${t}-${u.equipNo}`, !1, !1)), this.equipControllObject[u.equipNo] && delete this.equipControllObject[u.equipNo], this.nodesMap[t].halfCheckedEquips.includes(u.equipNo) && (this.nodesMap[t].halfCheckedEquips = this.nodesMap[t].halfCheckedEquips.filter((r) => r != u.equipNo), this.searchStatusGroupObject[t] && (this.searchStatusGroupObject[t].halfCheckedEquips = this.nodesMap[t].halfCheckedEquips));
167
- });
168
- }
169
- updateGroupSelect(t, e) {
170
- t.forEach((s) => {
171
- if (this.groupNodeObject[s]) {
172
- this.groupNodeObject[s].groups && this.groupNodeObject[s].groups.length > 0 && this.updateGroupSelect(this.groupNodeObject[s].groups.map((a) => a.key), e);
173
- let i = window.top[`group-${s}${this.aliasName}`] || [];
174
- this.isSearchStatus && (i = window.top[`group-${s}-search`] || []);
175
- let u = 0, r = 0;
176
- i.forEach((a) => {
177
- let h = this.equipCheckObject[a.equipNo];
178
- !h || !h.checked ? u++ : r--;
179
- });
180
- let p = e ? u : r;
181
- this.updateEquipSelect(s, i, e, p), this.updateEquipSelectCount(s, !1, p), this.updateSearchStatusObject(s, p);
182
- }
183
- });
880
+ setCheckStatus(t, e, i) {
881
+ this.nodesMap[t] && (this.nodesMap[t].checked = e, this.nodesMap[t].isGroup && (this.nodesMap[t].indeterminate = i));
184
882
  }
185
- clearHalfCheckedEquips(t) {
186
- t.forEach((e) => {
187
- this.groupNodeObject[e].halfCheckedEquips && this.groupNodeObject[e].halfCheckedEquips.forEach((s) => {
188
- this.equipControllObject[s] && this.equipControllObject[s].forEach((i) => {
189
- this.setCheckStatus(`${e}-${s}-${i}`, !1, !1);
190
- });
191
- }), this.groupNodeObject[e].halfCheckedEquips = [], this.groupNodeObject[e].groups && this.groupNodeObject[e].groups.length > 0 && this.clearHalfCheckedEquips(this.groupNodeObject[e].groups.map((s) => s.key));
192
- });
883
+ setEquipCheckObject(t, e, i, s) {
884
+ this.equipCheckObject[t] || (this.equipCheckObject[t] = {}), this.equipCheckObject[t].checked = e, this.equipCheckObject[t].indeterminate = i, this.equipCheckObject[t].groupId = s, !e && !i && delete this.equipCheckObject[t];
193
885
  }
194
886
  selectGroup(t) {
195
- this.clearHalfCheckedEquips([t.key]), this.updateGroupSelect([t.key], t.checked), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
887
+ this.updateAllEquipStatus(t.key, t.checked), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
888
+ }
889
+ updateAllEquipStatus(t, e) {
890
+ const i = this.groupNodeObject[t];
891
+ if (!i)
892
+ return;
893
+ let s = this.isSearchStatus ? window.top[`group-${t}-search`] || [] : window.top[`group-${t}${this.aliasName}`] || [];
894
+ !this.isSearchStatus && s.length === 0 && this.aliasName && (s = window.top[`group-${t}`] || []), s.forEach((a) => {
895
+ const h = a.equipNo || a.id, c = `${t}-${h}`;
896
+ this.setEquipCheckObject(c, e, !1, t), this.nodesMap[c] && this.setCheckStatus(c, e, !1);
897
+ }), i.groups && i.groups.length > 0 && i.groups.forEach((a) => {
898
+ this.updateAllEquipStatus(a.key, e);
899
+ });
196
900
  }
197
901
  selectEquip(t) {
198
- if (this.nodesMap[t.groupId]) {
199
- let e = [{ equipNo: t.equipNo }], s = (t.checked ? 1 : -1) * e.length;
200
- this.updateEquipSelect(t.groupId, e, t.checked, s), this.updateEquipSelectCount(t.groupId, !1, s), this.updateSearchStatusObject(t.groupId, s), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
201
- }
902
+ const e = `${t.groupId}-${t.equipNo}`;
903
+ this.setEquipCheckObject(e, t.checked, !1, t.groupId), this.nodesMap[e] && this.setCheckStatus(e, t.checked, !1), this.updateControlCheckStatus(), this.updateGroupCheckStatus();
202
904
  }
203
- updateEquipControl(t, e, s) {
204
- this.equipControllObject[t] || (this.equipControllObject[t] = []), s ? this.equipControllObject[t].push(e) : this.equipControllObject[t] = this.equipControllObject[t].filter((i) => i != e);
905
+ updateEquipControl(t, e, i) {
906
+ this.equipControllObject[t] || (this.equipControllObject[t] = []), i ? this.equipControllObject[t].push(e) : this.equipControllObject[t] = this.equipControllObject[t].filter((s) => s != e);
205
907
  }
206
908
  selectControl(t) {
207
- let e = this.nodesMap[`${t.groupId}-${t.equipNo}`];
208
- e && (this.updateEquipControl(t.equipNo, t.setNo, t.checked), t.checked ? e.settings && e.settings.length == this.equipControllObject[t.equipNo].length ? (delete this.equipControllObject[t.equipNo], this.updateEquipSelectCount(t.groupId, !1, 1), this.updateSearchStatusObject(t.groupId, 1), this.nodesMap[t.groupId].halfCheckedEquips = this.nodesMap[t.groupId].halfCheckedEquips.filter((s) => s != t.equipNo), this.setEquipCheckObject(t.equipNo, !0, !1, t.groupId), this.setCheckStatus(`${t.groupId}-${t.equipNo}`, !0, !1)) : e && !e.indeterminate && (this.nodesMap[`${t.groupId}`].halfCheckedEquips.push(t.equipNo), this.setCheckStatus(`${t.groupId}-${t.equipNo}`, !1, !0), this.setEquipCheckObject(t.equipNo, !1, !0, t.groupId)) : e.checked ? (this.updateEquipSelectCount(t.groupId, !1, -1), this.updateSearchStatusObject(t.groupId, -1), e.settings.length > 1 ? (this.nodesMap[t.groupId].halfCheckedEquips.push(t.equipNo), e.settings.map((i) => i.setNo).filter((i) => i != t.setNo).forEach((i) => {
209
- this.updateEquipControl(t.equipNo, i, !0);
210
- }), this.setEquipCheckObject(t.equipNo, !1, !0, t.groupId), this.setCheckStatus(`${t.groupId}-${t.equipNo}`, !1, !0)) : (this.setEquipCheckObject(t.equipNo, !1, !1, t.groupId), this.setCheckStatus(`${t.groupId}-${t.equipNo}`, !1, !1))) : e.indeterminate && this.equipControllObject[t.equipNo] && !this.equipControllObject[t.equipNo].length && (this.nodesMap[t.groupId].halfCheckedEquips = this.nodesMap[t.groupId].halfCheckedEquips.filter((s) => s != t.equipNo), this.setEquipCheckObject(t.equipNo, !1, !1, t.groupId), this.setCheckStatus(`${t.groupId}-${t.equipNo}`, !1, !1)), this.updateGroupCheckStatus());
909
+ const e = `${t.groupId}-${t.equipNo}`, i = `${t.groupId}-${t.equipNo}-${t.setNo}`, s = this.nodesMap[e];
910
+ if (!s)
911
+ return;
912
+ this.updateEquipControl(t.equipNo, t.setNo, t.checked), this.setCheckStatus(i, t.checked, !1);
913
+ const a = s.settings || [], h = this.equipControllObject[t.equipNo] || [], c = a.length, l = h.length;
914
+ t.checked ? l === c ? (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)) : l === 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();
211
915
  }
212
916
  }
213
- class O {
917
+ class nt {
214
918
  constructor(t, e) {
215
919
  this.aliasName = e, this.groupNodeObject = t;
216
920
  }
217
921
  resetGroupNum(t) {
218
922
  this.clearAllEquipNum();
219
- for (let e in this.groupNodeObject) {
923
+ const e = Object.keys(this.groupNodeObject).sort((i, s) => (this.groupNodeObject[s].level || 0) - (this.groupNodeObject[i].level || 0));
924
+ for (let i of e) {
220
925
  let s = [];
221
- t ? s = window.top[`group-${e}-search`] : s = window.top[`group-${e}${this.aliasName}`];
222
- let i = s ? s.length : 0;
223
- i && (this.groupNodeObject[e].equipCount = i, this.setGroupNum(e, i));
926
+ t ? s = window.top[`group-${i}-search`] : s = window.top[`group-${i}${this.aliasName}`];
927
+ let a = s ? s.length : 0;
928
+ a && (this.groupNodeObject[i].equipCount = a, this.setGroupNum(i, a));
224
929
  }
225
930
  }
226
931
  clearAllEquipNum() {
@@ -237,12 +942,12 @@ class O {
237
942
  return t;
238
943
  }
239
944
  }
240
- class S {
241
- constructor(t, e, s) {
242
- this.url = t, this.connectionId = e, this.equipNo = s, this.signalr = null;
945
+ class W {
946
+ constructor(t, e, i) {
947
+ this.url = t, this.connectionId = e, this.equipNo = i, this.signalr = null;
243
948
  }
244
949
  openConnect() {
245
- return this.signalr && (this.signalr.stop(), this.signalr = null), this.signalr = new w.HubConnectionBuilder().withUrl(this.url).build(), this.signalr.serverTimeoutInMilliseconds = 5e8, this.signalr.keepaliveintervalinmilliseconds = 5e8, new Promise((t) => {
950
+ return this.signalr && (this.signalr.stop(), this.signalr = null), this.signalr = new it.HubConnectionBuilder().withUrl(this.url).build(), this.signalr.serverTimeoutInMilliseconds = 5e8, this.signalr.keepaliveintervalinmilliseconds = 5e8, new Promise((t) => {
246
951
  this.signalr.start().then(() => {
247
952
  this.connectionId && this.send(), t(this.signalr);
248
953
  }).catch((e) => {
@@ -260,28 +965,12 @@ class S {
260
965
  }
261
966
  }
262
967
  }
263
- class k {
264
- constructor(t, e, s, i, u) {
265
- this.equipStatusObject = e, this.groupNodeObject = s, this.aleadyUpdateStatus = {}, this.isGetAllEquipStatus = !1, this.nodesMap = t, this.statusChange = i, this.openSignlr(), this.aliasName = u, this.statusMap = {
266
- 0: "noComCounts",
267
- 1: "normalCounts",
268
- 2: "alarmCounts",
269
- 3: "lsSetCounts",
270
- 4: "initializeCounts",
271
- 5: "withdrawCounts",
272
- 6: "backUpCounts"
273
- }, this.reverseStatusMap = {
274
- noComCounts: 0,
275
- normalCounts: 1,
276
- alarmCounts: 2,
277
- lsSetCounts: 3,
278
- initializeCounts: 4,
279
- withdrawCounts: 5,
280
- backUpCounts: 6
281
- };
968
+ class ut {
969
+ constructor(t, e, i, s, a) {
970
+ this.equipStatusObject = e, this.groupNodeObject = i, this.aleadyUpdateStatus = {}, this.isGetAllEquipStatus = !1, this.nodesMap = t, this.statusChange = s, this.openSignlr(), this.aliasName = a;
282
971
  }
283
972
  openSignlr() {
284
- this.equipStatusSignlr = new S("/equipStatusMonitor", "", ""), this.equipStatusSignlr.openConnect().then((t) => {
973
+ this.equipStatusSignlr = new W("/equipStatusMonitor", "", ""), this.equipStatusSignlr.openConnect().then((t) => {
285
974
  try {
286
975
  t.invoke("GetAllEquipStatus");
287
976
  } catch (e) {
@@ -293,12 +982,12 @@ class k {
293
982
  });
294
983
  }
295
984
  subscribeTo(t, e) {
296
- t.off(e), t.on(e, (s) => {
297
- if (s && s.isSuccess && s.data && (this[e] ? this[e](s.data) : this.notice({ func: e, data: s.data, key: s.groupId }), e === "GetAllEquipStatus")) {
985
+ t.off(e), t.on(e, (i) => {
986
+ if (i && i.isSuccess && i.data && (this[e] ? this[e](i.data) : this.notice({ func: e, data: i.data, key: i.groupId }), e === "GetAllEquipStatus")) {
298
987
  try {
299
988
  t.invoke("GetEquipChangeStatus");
300
- } catch (i) {
301
- console.log(i);
989
+ } catch (s) {
990
+ console.log(s);
302
991
  }
303
992
  this.subscribeTo(t, "GetEquipChangeStatus");
304
993
  }
@@ -318,25 +1007,25 @@ class k {
318
1007
  this.updateByGroup(t);
319
1008
  }), this.updateAllGroupStatus();
320
1009
  }
321
- updateStatusCounts(t, e, s) {
1010
+ updateStatusCounts(t, e, i) {
322
1011
  if (this.groupNodeObject[t]) {
323
- this.groupNodeObject[t][e] = this.groupNodeObject[t][e] + s;
324
- let i = this.groupNodeObject[t].groupId;
325
- i && this.updateStatusCounts(i, e, s);
1012
+ this.groupNodeObject[t][e] = this.groupNodeObject[t][e] + i;
1013
+ let s = this.groupNodeObject[t].groupId;
1014
+ s && this.updateStatusCounts(s, e, i);
326
1015
  }
327
1016
  }
328
1017
  updateByGroup(t) {
329
1018
  if (!this.aleadyUpdateStatus[t]) {
330
- let e = window.top[`group-${t}${this.aliasName}`] || [], s = e.length;
331
- s && (this.aleadyUpdateStatus[t] = !0, this.updateStatusCounts(t, this.statusMap[1], s), e.forEach((i) => {
332
- this.updateGroupStatusCounts(t, this.equipStatusObject[i.equipNo], 1), this.nodesMap[`${t}-${i.equipNo}`] && (this.nodesMap[`${t}-${i.equipNo}`].status = this.equipStatusObject[i.equipNo]);
1019
+ let e = window.top[`group-${t}${this.aliasName}`] || [], i = e.length;
1020
+ i && (this.aleadyUpdateStatus[t] = !0, this.updateStatusCounts(t, this.statusMap[1], i), e.forEach((s) => {
1021
+ this.updateGroupStatusCounts(t, this.equipStatusObject[s.equipNo], 1), this.nodesMap[`${t}-${s.equipNo}`] && (this.nodesMap[`${t}-${s.equipNo}`].status = this.equipStatusObject[s.equipNo]);
333
1022
  }));
334
1023
  }
335
1024
  }
336
- updateGroupStatusCounts(t, e, s) {
337
- if (this.nodesMap[t] && this.statusMap[e] && this.statusMap[s]) {
338
- let i = this.statusMap[e], u = this.statusMap[s];
339
- this.updateStatusCounts(t, i, 1), this.updateStatusCounts(t, u, -1);
1025
+ updateGroupStatusCounts(t, e, i) {
1026
+ if (this.nodesMap[t] && this.statusMap[e] && this.statusMap[i]) {
1027
+ let s = this.statusMap[e], a = this.statusMap[i];
1028
+ this.updateStatusCounts(t, s, 1), this.updateStatusCounts(t, a, -1);
340
1029
  }
341
1030
  }
342
1031
  updateGroupStatusByKey(t) {
@@ -344,40 +1033,40 @@ class k {
344
1033
  }
345
1034
  updateAllGroupStatus() {
346
1035
  Object.keys(this.groupNodeObject).forEach((t) => {
347
- let e = this.groupNodeObject[t], s = this.getSingleStatus(e);
348
- if (s !== -1)
349
- this.nodesMap[e.key].status = s;
1036
+ let e = this.groupNodeObject[t], i = this.getSingleStatus(e);
1037
+ if (i !== -1)
1038
+ this.nodesMap[e.key].status = i;
350
1039
  else if (e.alarmCounts > 0)
351
1040
  this.nodesMap[e.key].status = 2;
352
1041
  else if (e.noComCounts > 0 && (e.normalCounts > 0 || e.lsSetCounts > 0 || e.initializeCounts > 0 || e.withdrawCounts > 0 || e.backUpCounts > 0))
353
1042
  this.nodesMap[e.key].status = 2;
354
1043
  else if (e.backUpCounts > 0 && (e.normalCounts > 0 || e.lsSetCounts > 0 || e.initializeCounts > 0 || e.withdrawCounts > 0)) {
355
- let i = this.getStatusArray(e).filter((u) => u.statusMap != "backUpCounts" && u.value > 0);
356
- i.length > 0 ? this.nodesMap[e.key].status = i.pop().status : this.nodesMap[e.key].status = 6;
1044
+ let s = this.getStatusArray(e).filter((a) => a.statusMap != "backUpCounts" && a.value > 0);
1045
+ s.length > 0 ? this.nodesMap[e.key].status = s.pop().status : this.nodesMap[e.key].status = 6;
357
1046
  } else if (e.normalCounts > 0 || e.lsSetCounts > 0 || e.initializeCounts > 0 || e.withdrawCounts > 0) {
358
- let i = this.getStatusArray(e).filter((u) => u.value > 0);
359
- i.length > 0 ? this.nodesMap[e.key].status = i.pop().status : this.nodesMap[e.key].status = 1;
1047
+ let s = this.getStatusArray(e).filter((a) => a.value > 0);
1048
+ s.length > 0 ? this.nodesMap[e.key].status = s.pop().status : this.nodesMap[e.key].status = 1;
360
1049
  }
361
1050
  });
362
1051
  }
363
1052
  getStatusArray(t) {
364
- let e = [], s = Object.values(this.statusMap);
365
- return Object.keys(t).forEach((i) => {
366
- s.includes(i) && e.push({
367
- statusMap: i,
368
- status: this.reverseStatusMap[i],
369
- value: t[i]
1053
+ let e = [], i = Object.values(this.statusMap);
1054
+ return Object.keys(t).forEach((s) => {
1055
+ i.includes(s) && e.push({
1056
+ statusMap: s,
1057
+ status: this.reverseStatusMap[s],
1058
+ value: t[s]
370
1059
  });
371
1060
  }), e;
372
1061
  }
373
1062
  getSingleStatus(t) {
374
- let e = this.getStatusArray(t), s = e.filter((i) => i.value == 0);
375
- if (s.length == e.length)
1063
+ let e = this.getStatusArray(t), i = e.filter((s) => s.value == 0);
1064
+ if (i.length == e.length)
376
1065
  return 1;
377
- if (s.length == 6) {
378
- let i = e.find((u) => u.value > 0);
379
- if (i)
380
- return i.status;
1066
+ if (i.length == 6) {
1067
+ let s = e.find((a) => a.value > 0);
1068
+ if (s)
1069
+ return s.status;
381
1070
  }
382
1071
  return -1;
383
1072
  }
@@ -385,12 +1074,43 @@ class k {
385
1074
  this.setStatus(t), this.updateAllGroupStatus();
386
1075
  }
387
1076
  setStatus(t) {
388
- let e = this.equipStatusObject[t.equipNo], s = window.top.equipCache && window.top.equipCache[t.equipNo] && window.top.equipCache[t.equipNo].groupId;
389
- if (t.status != 3 && s && e != t.status) {
390
- this.updateGroupStatusCounts(s, t.status, e), this.equipStatusObject[t.equipNo] = t.status;
391
- let i = `${s}-${t.equipNo}`;
392
- this.nodesMap[i] && (this.nodesMap[i].status = t.status), this.statusChange(s, t.equipNo, t.status), this.updateAllGroupStatus();
1077
+ let e = this.equipStatusObject[t.equipNo];
1078
+ const i = this.getEquipGroupIds(t.equipNo);
1079
+ t.status != 3 && i.length > 0 && (i.forEach((s) => {
1080
+ switch (t.status) {
1081
+ case 0:
1082
+ e == 6 && this.setGroupStatus(s, !1, 6);
1083
+ break;
1084
+ case 1:
1085
+ e == 6 ? this.setGroupStatus(s, !1, 6) : e == 2 && this.setGroupStatus(s, !1, 2);
1086
+ break;
1087
+ case 2:
1088
+ e != 2 && this.setGroupStatus(s, !0, 2), e == 6 && this.setGroupStatus(s, !1, 6);
1089
+ break;
1090
+ case 6:
1091
+ e == 2 && this.setGroupStatus(s, !1, 2), e != 6 && this.setGroupStatus(s, !0, 6);
1092
+ break;
1093
+ }
1094
+ let a = `${s}-${t.equipNo}`;
1095
+ this.nodesMap[a] && (this.nodesMap[a].status = t.status);
1096
+ }), this.equipStatusObject[t.equipNo] = t.status, this.statusChange(i[0], t.equipNo, t.status));
1097
+ }
1098
+ getEquipGroupIds(t) {
1099
+ const e = [];
1100
+ if (window.top.groupCache && Object.keys(window.top.groupCache).forEach((i) => {
1101
+ window.top.groupCache[i] && window.top.groupCache[i][t] && e.push(Number(i));
1102
+ }), e.length === 0) {
1103
+ const i = window.top.equipCache && window.top.equipCache[t];
1104
+ if (i) {
1105
+ if (i.groupIds && i.groupIds.length > 0)
1106
+ return i.groupIds;
1107
+ i.groupId && e.push(i.groupId);
1108
+ }
393
1109
  }
1110
+ return e;
1111
+ }
1112
+ setGroupStatus(t, e, i) {
1113
+ 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);
394
1114
  }
395
1115
  resetGroupStatusCounts() {
396
1116
  for (let t in this.groupNodeObject)
@@ -401,11 +1121,11 @@ class k {
401
1121
  countGroupStatus(t) {
402
1122
  this.resetGroupStatusCounts();
403
1123
  for (let e in this.groupNodeObject) {
404
- let s = [];
405
- if (t ? s = window.top[`group-${e}-search`] : s = window.top[`group-${e}${this.aliasName}`], s ? s.length : 0)
406
- for (let u of s) {
407
- const r = this.equipStatusObject[u.equipNo];
408
- this.setGroupNum(u.groupId, r);
1124
+ let i = [];
1125
+ if (t ? i = window.top[`group-${e}-search`] : i = window.top[`group-${e}${this.aliasName}`], i ? i.length : 0)
1126
+ for (let a of i) {
1127
+ const h = this.equipStatusObject[a.equipNo];
1128
+ this.setGroupNum(a.groupId, h);
409
1129
  }
410
1130
  }
411
1131
  }
@@ -413,7 +1133,7 @@ class k {
413
1133
  !this.groupNodeObject[t] || (this.groupNodeObject[t][this.statusMap[e]] += 1, this.setGroupNum(this.groupNodeObject[t].groupId, e));
414
1134
  }
415
1135
  }
416
- const j = {
1136
+ const ht = {
417
1137
  getSetParm(o) {
418
1138
  if (window.axios)
419
1139
  return window.axios({
@@ -423,141 +1143,143 @@ const j = {
423
1143
  data: o
424
1144
  });
425
1145
  }
426
- }, M = Object.assign(
1146
+ }, pt = Object.assign(
427
1147
  {},
428
- j
1148
+ ht
429
1149
  );
430
- class G {
1150
+ class lt {
431
1151
  constructor(t, e) {
432
1152
  this.nodesMap = t, this.equipControllObject = e;
433
1153
  }
434
- async getSetting(t, e, s, i) {
435
- let [u, r] = String(t).split("-"), p = {
436
- equipNo: r
1154
+ async getSetting(t, e, i, s) {
1155
+ let [a, h] = String(t).split("-"), c = {
1156
+ equipNo: h
437
1157
  };
438
- await M.getSetParm(p).then((a) => {
439
- if (a.data.code == 200) {
440
- let h = a && a.data && a.data.data && a.data.data.rows || [];
441
- this.nodesMap[t].settings || (this.nodesMap[t].settings = []), h && h.length > 0 && this.nodesMap[t] && (h.forEach((n) => {
442
- n.title = n.setNm, n.key = `${u}-${r}-${n.setNo}`, n.level = Number(s) + 1, n.checked = i || this.equipControllObject[r] && this.equipControllObject[r].includes(n.setNo), n.isSetting = !0, n.equipNo = r, n.groupId = u, n.equipName = e;
443
- }), this.nodesMap[t].settings = [...h]);
1158
+ await pt.getSetParm(c).then((l) => {
1159
+ if (l.data.code == 200) {
1160
+ let g = l && l.data && l.data.data && l.data.data.rows || [];
1161
+ this.nodesMap[t].settings || (this.nodesMap[t].settings = []), g && g.length > 0 && this.nodesMap[t] && (g.forEach((d) => {
1162
+ d.title = d.setNm, d.key = `${a}-${h}-${d.setNo}`, d.level = Number(i) + 1, d.checked = s || this.equipControllObject[h] && this.equipControllObject[h].includes(d.setNo), d.isSetting = !0, d.equipNo = h, d.groupId = a, d.equipName = e;
1163
+ }), this.nodesMap[t].settings = [...g]);
444
1164
  }
445
1165
  });
446
1166
  }
447
1167
  }
448
- class l {
1168
+ class k {
449
1169
  static formateList(t, e) {
450
- let s = [];
451
- for (const i of t) {
452
- let u = {};
453
- u.count = 0, u.equipSelectCount = 0, u.controlSelectCount = 0, u.equipCount = i.equipCount || 0, u.title = i.name, u.key = i.id, u.isGroup = !0, u.children = [], u.status = 1, u.level = e || 1, u.expand = !e, u.equips = [], u.groupId = i.parentId, u.groups = [], u.alarmCounts = 0, u.backUpCounts = 0, u.noComCounts = 0, u.normalCounts = 0, u.lsSetCounts = 0, u.initializeCounts = 0, u.withdrawCounts = 0, u.indeterminate = !1, u.checked = !1, u.visible = !0, u.nodeEquipSelectCount = 0, u.checkedEquips = [], u.halfCheckedEquips = [], u.selectControlCount = 0, i.children && i.children.length > 0 && (u.groups = [
454
- ...this.formateList(i.children, e ? e + 1 : 2)
455
- ]), s.push(u);
1170
+ let i = [];
1171
+ for (const s of t) {
1172
+ let a = {};
1173
+ a.count = 0, a.equipSelectCount = 0, a.controlSelectCount = 0, a.equipCount = s.equipCount || 0, a.title = s.name, a.key = s.id, a.isGroup = !0, a.children = [], a.status = 1, a.level = e || 1, a.expand = !e, a.equips = [], a.groupId = s.parentId, a.groups = [], a.alarmCounts = 0, a.backUpCounts = 0, a.noComCounts = 0, a.normalCounts = 0, a.lsSetCounts = 0, a.initializeCounts = 0, a.withdrawCounts = 0, a.indeterminate = !1, a.checked = !1, a.visible = !0, a.nodeEquipSelectCount = 0, a.checkedEquips = [], a.halfCheckedEquips = [], a.selectControlCount = 0, s.children && s.children.length > 0 && (a.groups = [
1174
+ ...this.formateList(s.children, e ? e + 1 : 2)
1175
+ ]), i.push(a);
456
1176
  }
457
- return s;
1177
+ return i;
458
1178
  }
459
- static deepClone(t, e, s, i, u, r) {
460
- let p = [];
1179
+ static deepClone(t, e, i, s, a, h) {
1180
+ let c = [];
461
1181
  if (t)
462
- for (let a = 0, h = t.length; a < h; a++)
463
- p.push(
1182
+ for (let l = 0, g = t.length; l < g; l++) {
1183
+ const d = t[l].id || t[l].equipNo, w = `${s}-${d}`;
1184
+ c.push(
464
1185
  {
465
- isGroup: s,
466
- key: `${i}-${t[a].id}`,
467
- status: r[t[a].id] || 0,
468
- title: t[a].title,
1186
+ isGroup: i,
1187
+ key: w,
1188
+ status: h[d] || 0,
1189
+ title: t[l].title,
469
1190
  level: e,
470
1191
  expand: !1,
471
1192
  isEquip: !0,
472
1193
  loading: !1,
473
- indeterminate: u[t[a].equipNo] && u[t[a].equipNo].indeterminate || !1,
474
- checked: u[t[a].equipNo] && u[t[a].equipNo].checked || !1,
475
- groupId: i,
476
- equipNo: t[a].id,
1194
+ indeterminate: a[w] && a[w].indeterminate || !1,
1195
+ checked: a[w] && a[w].checked || !1,
1196
+ groupId: s,
1197
+ equipNo: d,
477
1198
  visible: !0,
478
1199
  settings: []
479
1200
  }
480
1201
  );
481
- return p;
1202
+ }
1203
+ return c;
482
1204
  }
483
1205
  static copyOrigin(t) {
484
1206
  let e = [];
485
- return t.forEach((s) => {
486
- e.push({ ...s });
1207
+ return t.forEach((i) => {
1208
+ e.push({ ...i });
487
1209
  }), e;
488
1210
  }
489
1211
  static getPosition(t, e) {
490
- let s = 0;
491
- for (let i = 0, u = e.length; i < u; i++)
492
- if (e[i].key == t) {
493
- s = i - 30;
1212
+ let i = 0;
1213
+ for (let s = 0, a = e.length; s < a; s++)
1214
+ if (e[s].key == t) {
1215
+ i = s - 30;
494
1216
  break;
495
1217
  }
496
- return s;
1218
+ return i;
497
1219
  }
498
1220
  static flattern(t, e) {
499
- t.forEach((s) => {
500
- s.isGroup && (e[`${s.key}`] = null, e[`${s.key}`] = s), s.groups && s.groups.length && this.flattern(s.groups, e);
1221
+ t.forEach((i) => {
1222
+ i.isGroup && (e[`${i.key}`] = null, e[`${i.key}`] = i), i.groups && i.groups.length && this.flattern(i.groups, e);
501
1223
  });
502
1224
  }
503
1225
  static generateUUID() {
504
1226
  let t = new Date().getTime();
505
- return window.performance && typeof window.performance.now == "function" && (t += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(s) {
506
- let i = (t + Math.random() * 16) % 16 | 0;
507
- return t = Math.floor(t / 16), (s === "x" ? i : i & 3 | 8).toString(16);
1227
+ return window.performance && typeof window.performance.now == "function" && (t += performance.now()), "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
1228
+ let s = (t + Math.random() * 16) % 16 | 0;
1229
+ return t = Math.floor(t / 16), (i === "x" ? s : s & 3 | 8).toString(16);
508
1230
  });
509
1231
  }
510
1232
  static listToTreeList(t) {
511
- const e = t, s = [], i = {};
512
- return e.forEach((u) => {
513
- i[u.id] = u;
514
- }), e.forEach((u) => {
515
- const r = i[u.parentId];
516
- r ? (r.children || (r.children = [])).push(u) : s.push(u);
517
- }), s;
1233
+ const e = t, i = [], s = {};
1234
+ return e.forEach((a) => {
1235
+ s[a.id] = a;
1236
+ }), e.forEach((a) => {
1237
+ const h = s[a.parentId];
1238
+ h ? (h.children || (h.children = [])).push(a) : i.push(a);
1239
+ }), i;
518
1240
  }
519
1241
  }
520
- class $ {
521
- constructor(t, e, s) {
522
- this.showSettings = e, this.groupNodeObject = t, this.aliasName = s;
1242
+ class ct {
1243
+ constructor(t, e, i) {
1244
+ this.showSettings = e, this.groupNodeObject = t, this.aliasName = i;
523
1245
  }
524
1246
  filterMethod(t) {
525
1247
  for (let e in this.groupNodeObject)
526
1248
  t && this.updateBySearch(e, t);
527
1249
  }
528
1250
  updateBySearch(t, e) {
529
- let s = window.top[`group-${this.groupNodeObject[t].key}${this.aliasName}`];
530
- s && (s = s.filter((i) => i.title.includes(e)), window.top[`group-${this.groupNodeObject[t].key}-search`] = l.copyOrigin(s));
1251
+ let i = window.top[`group-${this.groupNodeObject[t].key}${this.aliasName}`];
1252
+ i && (i = i.filter((s) => s.title.includes(e)), window.top[`group-${this.groupNodeObject[t].key}-search`] = k.copyOrigin(i));
531
1253
  }
532
1254
  }
533
- function d(o, t, e, s, i, u, r, p) {
534
- var a = typeof o == "function" ? o.options : o;
535
- t && (a.render = t, a.staticRenderFns = e, a._compiled = !0), s && (a.functional = !0), u && (a._scopeId = "data-v-" + u);
536
- var h;
537
- if (r ? (h = function(c) {
538
- c = c || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !c && typeof __VUE_SSR_CONTEXT__ < "u" && (c = __VUE_SSR_CONTEXT__), i && i.call(this, c), c && c._registeredComponents && c._registeredComponents.add(r);
539
- }, a._ssrRegister = h) : i && (h = p ? function() {
540
- i.call(
1255
+ function B(o, t, e, i, s, a, h, c) {
1256
+ var l = typeof o == "function" ? o.options : o;
1257
+ t && (l.render = t, l.staticRenderFns = e, l._compiled = !0), i && (l.functional = !0), a && (l._scopeId = "data-v-" + a);
1258
+ var g;
1259
+ if (h ? (g = function(S) {
1260
+ S = S || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !S && typeof __VUE_SSR_CONTEXT__ < "u" && (S = __VUE_SSR_CONTEXT__), s && s.call(this, S), S && S._registeredComponents && S._registeredComponents.add(h);
1261
+ }, l._ssrRegister = g) : s && (g = c ? function() {
1262
+ s.call(
541
1263
  this,
542
- (a.functional ? this.parent : this).$root.$options.shadowRoot
1264
+ (l.functional ? this.parent : this).$root.$options.shadowRoot
543
1265
  );
544
- } : i), h)
545
- if (a.functional) {
546
- a._injectStyles = h;
547
- var n = a.render;
548
- a.render = function(q, C) {
549
- return h.call(C), n(q, C);
1266
+ } : s), g)
1267
+ if (l.functional) {
1268
+ l._injectStyles = g;
1269
+ var d = l.render;
1270
+ l.render = function(b, m) {
1271
+ return g.call(m), d(b, m);
550
1272
  };
551
1273
  } else {
552
- var g = a.beforeCreate;
553
- a.beforeCreate = g ? [].concat(g, h) : [h];
1274
+ var w = l.beforeCreate;
1275
+ l.beforeCreate = w ? [].concat(w, g) : [g];
554
1276
  }
555
1277
  return {
556
1278
  exports: o,
557
- options: a
1279
+ options: l
558
1280
  };
559
1281
  }
560
- const y = {
1282
+ const dt = {
561
1283
  props: {
562
1284
  source: {
563
1285
  type: Object
@@ -570,28 +1292,28 @@ const y = {
570
1292
  }
571
1293
  }
572
1294
  };
573
- var m = function() {
1295
+ var ft = function() {
574
1296
  var t = this, e = t._self._c;
575
1297
  return e("div", { staticClass: "operates" }, [e("el-popover", { attrs: { placement: "bottom", trigger: "hover" }, scopedSlots: t._u([{ key: "reference", fn: function() {
576
1298
  return [e("i", { staticClass: "el-icon-more" })];
577
- }, proxy: !0 }]) }, [e("el-button-group", { staticClass: "new-button-group setModule" }, [e("el-button", { staticClass: "elBtn", attrs: { type: "text", size: "small", icon: " iconfont icon-tubiao20_bianji" }, on: { click: function(s) {
578
- return s.stopPropagation(), t.groupEditAndNew(!1, t.source);
579
- } } }, [t._v(" " + t._s(t.$t("equipInfo.poverTips.rename")) + " ")]), e("el-button", { staticClass: "elBtn", attrs: { type: "text", size: "small", icon: " iconfont icon-gw-icon-tianjia1" }, on: { click: function(s) {
1299
+ }, proxy: !0 }]) }, [e("el-button-group", { staticClass: "new-button-group setModule" }, [e("el-button", { staticClass: "elBtn", attrs: { type: "text", size: "small", icon: " iconfont icon-tubiao20_bianji" }, on: { click: function(i) {
1300
+ return i.stopPropagation(), t.groupEditAndNew(!1, t.source);
1301
+ } } }, [t._v(" " + t._s(t.$t("equipInfo.poverTips.rename")) + " ")]), e("el-button", { staticClass: "elBtn", attrs: { type: "text", size: "small", icon: " iconfont icon-gw-icon-tianjia1" }, on: { click: function(i) {
580
1302
  return t.groupEditAndNew(!0, t.source);
581
- } } }, [t._v(" " + t._s(t.$t("equipInfo.poverTips.newChildGroup")) + " ")]), t.source.level != 1 ? e("el-button", { attrs: { type: "danger", size: "small", icon: " iconfont icon-tubiao20_shanchu" }, on: { click: function(s) {
582
- return s.stopPropagation(), t.deleteGroup(t.source);
1303
+ } } }, [t._v(" " + t._s(t.$t("equipInfo.poverTips.newChildGroup")) + " ")]), t.source.level != 1 ? e("el-button", { attrs: { type: "danger", size: "small", icon: " iconfont icon-tubiao20_shanchu" }, on: { click: function(i) {
1304
+ return i.stopPropagation(), t.deleteGroup(t.source);
583
1305
  } } }, [t._v(" " + t._s(t.$t("publics.button.deletes")) + " ")]) : t._e()], 1)], 1)], 1);
584
- }, I = [], _ = /* @__PURE__ */ d(
585
- y,
586
- m,
587
- I,
1306
+ }, gt = [], St = /* @__PURE__ */ B(
1307
+ dt,
1308
+ ft,
1309
+ gt,
588
1310
  !1,
589
1311
  null,
590
1312
  null,
591
1313
  null,
592
1314
  null
593
1315
  );
594
- const v = _.exports, x = {
1316
+ const Ct = St.exports, wt = {
595
1317
  name: "ElTreeVirtualNode",
596
1318
  componentName: "ElTreeVirtualNode",
597
1319
  props: {
@@ -657,7 +1379,7 @@ const v = _.exports, x = {
657
1379
  }
658
1380
  },
659
1381
  components: {
660
- oparate: v
1382
+ oparate: Ct
661
1383
  },
662
1384
  computed: {
663
1385
  getColor() {
@@ -707,7 +1429,7 @@ const v = _.exports, x = {
707
1429
  }
708
1430
  }
709
1431
  };
710
- var T = function() {
1432
+ var bt = function() {
711
1433
  var t = this, e = t._self._c;
712
1434
  return e("div", { staticClass: "el-tree-node", class: {
713
1435
  parent_tag: t.source.isGroup,
@@ -720,26 +1442,26 @@ var T = function() {
720
1442
  },
721
1443
  "el-tree-node__expand-icon",
722
1444
  "el-icon-arrow-right"
723
- ] }) : t._e(), e("div", { staticClass: "nodeContent" }, [t.showCheckbox ? e("el-checkbox", { attrs: { indeterminate: t.source.indeterminate }, on: { change: t.checkedChange }, model: { value: t.source.checked, callback: function(s) {
724
- t.$set(t.source, "checked", s);
1445
+ ] }) : t._e(), e("div", { staticClass: "nodeContent" }, [t.showCheckbox ? e("el-checkbox", { attrs: { indeterminate: t.source.indeterminate }, on: { change: t.checkedChange }, model: { value: t.source.checked, callback: function(i) {
1446
+ t.$set(t.source, "checked", i);
725
1447
  }, expression: "source.checked" } }) : t._e(), t.showStatus ? e("span", { staticClass: "circle" }, [t.source.status != 6 ? e("span", { staticClass: "yd", style: { backgroundColor: t.getColor(t.source.status) } }) : e("i", { staticClass: "iconfont icon-gw-icon-beiji2", style: { color: t.colorConfig.BackUp } })]) : t._e(), e("span", { staticClass: "label" }, [t._v(" " + t._s(t.source.title))]), t.source.isGroup && !t.source.isEquip ? e("span", { staticClass: "equipNumber" }, [t._v(" " + t._s(t.source.count) + " ")]) : t._e(), t.source.isGroup && t.showOperate ? e("oparate", { attrs: { source: t.source, groupEditAndNew: t.groupEditAndNew, deleteGroup: t.deleteGroup } }) : t._e(), t.source.loading ? e("span", { staticClass: "el-tree-node__loading-icon el-icon-loading" }) : t._e()], 1)])]);
726
- }, L = [], A = /* @__PURE__ */ d(
727
- x,
728
- T,
729
- L,
1448
+ }, mt = [], yt = /* @__PURE__ */ B(
1449
+ wt,
1450
+ bt,
1451
+ mt,
730
1452
  !1,
731
1453
  null,
732
1454
  null,
733
1455
  null,
734
1456
  null
735
1457
  );
736
- const B = A.exports, U = {
1458
+ const qt = yt.exports, Ot = {
737
1459
  components: {
738
- VirtualList: b
1460
+ VirtualList: ot
739
1461
  },
740
1462
  data() {
741
1463
  return {
742
- itemComponent: B,
1464
+ itemComponent: qt,
743
1465
  visibleList: [],
744
1466
  currentSelect: -1,
745
1467
  equipStatusManage: null,
@@ -827,7 +1549,7 @@ const B = A.exports, U = {
827
1549
  },
828
1550
  watch: {
829
1551
  data(o) {
830
- o && o.length && (l.flattern(this.data, this.groupNodeObject), this.cacheManage.addNodesMap(Object.values(this.groupNodeObject).map((t) => t)), this.init());
1552
+ o && o.length && (k.flattern(this.data, this.groupNodeObject), this.cacheManage.addNodesMap(Object.values(this.groupNodeObject).map((t) => t)), this.init());
831
1553
  },
832
1554
  controllList(o) {
833
1555
  this.updateCheckedStatusWithControls();
@@ -842,7 +1564,7 @@ const B = A.exports, U = {
842
1564
  }
843
1565
  },
844
1566
  created() {
845
- this.showCheckbox && (this.checkStatusManage = new E(this.groupNodeObject, this.nodesMap, this.equipControllObject, this.controlObject, this.equipCheckObject, this.aliasName)), this.cacheManage = new N(this.groupNodeObject, this.nodesMap, this.controlObject, this.equipCheckObject), this.searchManage = new $(this.groupNodeObject, this.showSettings, this.aliasName), this.equipNumManage = new O(this.groupNodeObject, this.aliasName), this.requestManage = new G(this.nodesMap, this.equipControllObject);
1567
+ this.showCheckbox && (this.checkStatusManage = new rt(this.groupNodeObject, this.nodesMap, this.equipControllObject, this.controlObject, this.equipCheckObject, this.aliasName)), this.cacheManage = new at(this.groupNodeObject, this.nodesMap, this.controlObject, this.equipCheckObject), this.searchManage = new ct(this.groupNodeObject, this.showSettings, this.aliasName), this.equipNumManage = new nt(this.groupNodeObject, this.aliasName), this.requestManage = new lt(this.nodesMap, this.equipControllObject);
846
1568
  },
847
1569
  mounted() {
848
1570
  this.updateCheckedStatusWithControls(), this.updateCheckedStatusWithEquips(), window.addEventListener("message", (o) => {
@@ -854,7 +1576,7 @@ const B = A.exports, U = {
854
1576
  this.data[0].expand = !0, this.updateTreeList(), setTimeout(() => {
855
1577
  Object.values(this.groupNodeObject).forEach((o) => {
856
1578
  !o.expand && this.expandGroup.includes(o.key) && (o.expand = !0), this.filterWithAlias(o.key), this.updateGroupEquips(o.key, !0);
857
- }), this.equipNumManage.resetGroupNum(this.isSearchStatus), this.showStatus && !this.equipStatusManage && (this.equipStatusManage = new k(this.nodesMap, this.equipStatusObject, this.groupNodeObject, this.statusChange, this.aliasName)), this.filterEmptyGroup();
1579
+ }), this.equipNumManage.resetGroupNum(this.isSearchStatus), this.showStatus && !this.equipStatusManage && (this.equipStatusManage = new ut(this.nodesMap, this.equipStatusObject, this.groupNodeObject, this.statusChange, this.aliasName)), this.filterEmptyGroup(), this.showCheckbox && this.checkStatusManage && (this.updateCheckedStatusWithEquips(), this.checkStatusManage.updateGroupCheckStatus());
858
1580
  }, 100);
859
1581
  },
860
1582
  filterEmptyGroup() {
@@ -885,16 +1607,12 @@ const B = A.exports, U = {
885
1607
  let e = this.equipNumManage.getAllEquipsNum();
886
1608
  this.$emit("getTotal", e);
887
1609
  }
888
- if (t) {
889
- let e = window.top[`group-${o}${this.aliasName}`] || [];
890
- this.equipNumManage.setGroupNum(o, e.length);
891
- }
892
1610
  this.groupNodeObject[o].expand && this.updateList(o, this.groupNodeObject[o].level, null, !1), this.showStatus && this.equipStatusManage && this.equipStatusManage.updateGroupStatusByKey(o);
893
1611
  },
894
1612
  updateList(o) {
895
1613
  if (this.groupNodeObject[o]) {
896
1614
  let t = [];
897
- this.isSearchStatus ? (t = window.top[`group-${o}-search`], this.groupNodeObject[o].equips = [...l.deepClone(t, Number(this.groupNodeObject[o].level) + 1, this.showSettings, o, this.equipCheckObject, this.equipStatusObject)]) : (t = window.top[`group-${o}${this.aliasName}`], this.groupNodeObject[o].equips = [...l.deepClone(t, Number(this.groupNodeObject[o].level) + 1, this.showSettings, o, this.equipCheckObject, this.equipStatusObject)]), this.cacheManage.addNodesMap(this.groupNodeObject[o].equips), this.cacheManage.closeBrotherNode(o), this.visibleList = [], this.updateTreeList(this.data), this.updateCurrentSelect();
1615
+ this.isSearchStatus ? (t = window.top[`group-${o}-search`], this.groupNodeObject[o].equips = [...k.deepClone(t, Number(this.groupNodeObject[o].level) + 1, this.showSettings, o, this.equipCheckObject, this.equipStatusObject)]) : (t = window.top[`group-${o}${this.aliasName}`], this.groupNodeObject[o].equips = [...k.deepClone(t, Number(this.groupNodeObject[o].level) + 1, this.showSettings, o, this.equipCheckObject, this.equipStatusObject)]), this.cacheManage.addNodesMap(this.groupNodeObject[o].equips), this.cacheManage.closeBrotherNode(o), this.visibleList = [], this.updateTreeList(this.data), this.updateCurrentSelect();
898
1616
  }
899
1617
  },
900
1618
  updateTreeList(o) {
@@ -902,14 +1620,14 @@ const B = A.exports, U = {
902
1620
  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 || []);
903
1621
  });
904
1622
  },
905
- nodeClick(o, t, e, s) {
906
- this.$emit("node-click", { ...o, key: o.isEquip ? o.equipNo : o.key }), o.isGroup ? o.isEquip ? this.equipClick(o, t, s) : this.groupClick(o, t, s) : this.currentSelect = o.key;
1623
+ nodeClick(o, t, e, i) {
1624
+ this.$emit("node-click", { ...o, key: o.isEquip ? o.equipNo : o.key }), o.isGroup ? o.isEquip ? this.equipClick(o, t, i) : this.groupClick(o, t, i) : this.currentSelect = o.key;
907
1625
  },
908
1626
  groupClick(o, t, e) {
909
1627
  o.expand ? this.updateList(o.key, o.level, t, e) : (this.cacheManage.recycleGroupCache(o.key), this.visibleList = [], this.updateTreeList(this.data)), this.isSearchStatus && this.filterEmptyGroup();
910
1628
  },
911
1629
  async equipClick(o, t, e) {
912
- this.showSettings && (o.expand ? (o.loading = !0, await this.requestManage.getSetting(o.key, o.title, o.level, e), this.controlObject[o.equipNo] = { groupId: o.groupId }, o.loading = !1, this.visibleList.splice(t + 1, 0, ...this.nodesMap[o.key].settings), this.cacheManage.addNodesMap(this.nodesMap[o.key].settings)) : (this.visibleList.splice(t + 1, this.nodesMap[o.key].settings.length), this.cacheManage.removeNodesMap(this.nodesMap[o.key].settings), this.nodesMap[o.key].settings = [], delete this.controlObject[o.equipNo]));
1630
+ this.showSettings && (o.expand ? (o.loading = !0, await this.requestManage.getSetting(o.key, o.title, o.level, e), this.controlObject[`${o.groupId}-${o.equipNo}`] = { groupId: o.groupId }, o.loading = !1, this.visibleList.splice(t + 1, 0, ...this.nodesMap[o.key].settings), this.cacheManage.addNodesMap(this.nodesMap[o.key].settings)) : (this.visibleList.splice(t + 1, this.nodesMap[o.key].settings.length), this.cacheManage.removeNodesMap(this.nodesMap[o.key].settings), this.nodesMap[o.key].settings = [], delete this.controlObject[`${o.groupId}-${o.equipNo}`]));
913
1631
  },
914
1632
  onChecked(o) {
915
1633
  this.checkStatusManage && this.checkStatusManage.onChecked(o, this.isSearchStatus), this.$emit("onCheck", o);
@@ -924,7 +1642,9 @@ const B = A.exports, U = {
924
1642
  this.controllList && this.controllList.length && this.checkStatusManage && this.checkStatusManage && this.checkStatusManage.updateCheckedStatusWithControls(this.controllList);
925
1643
  },
926
1644
  updateCheckedStatusWithEquips() {
927
- this.selectEquips && this.selectEquips.length && this.checkStatusManage && this.checkStatusManage && this.checkStatusManage.updateCheckedStatusWithEquips(this.selectEquips);
1645
+ if (!this.checkStatusManage || !this.selectEquips)
1646
+ return;
1647
+ (Array.isArray(this.selectEquips) ? this.selectEquips.length > 0 : Object.keys(this.selectEquips).length > 0) && (this.checkStatusManage.updateCheckedStatusWithEquips(this.selectEquips), this.checkStatusManage.updateGroupCheckStatus());
928
1648
  },
929
1649
  resetCheckedStatus() {
930
1650
  this.checkStatusManage && this.checkStatusManage.resetCheckedStatus();
@@ -932,6 +1652,9 @@ const B = A.exports, U = {
932
1652
  getEquipSelectd() {
933
1653
  return this.checkStatusManage && this.checkStatusManage.getEquipSelectd();
934
1654
  },
1655
+ getEquipGroupSelectd() {
1656
+ return this.checkStatusManage && this.checkStatusManage.getEquipGroupSelectd();
1657
+ },
935
1658
  getControlSelected() {
936
1659
  return this.checkStatusManage && this.checkStatusManage.getControlSelected();
937
1660
  },
@@ -960,20 +1683,20 @@ const B = A.exports, U = {
960
1683
  },
961
1684
  GetGroupEquips(o) {
962
1685
  o.groupId && this.groupNodeObject[o.groupId] && !this.isSearchStatus && (this.updateGroupEquips(o.groupId, !0), this.updateJob && clearTimeout(this.updateJob), this.updateJob = setTimeout(() => {
963
- this.updateCheckWidthJob();
1686
+ this.equipNumManage.resetGroupNum(this.isSearchStatus), this.updateCheckWidthJob();
964
1687
  }, 500));
965
1688
  },
966
1689
  DeleteEquip(o) {
967
1690
  const { groupId: t, equips: e } = o || {};
968
- t && this.groupNodeObject[t] && (this.updateGroupEquips(o.groupId), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus()), e.length && e.forEach((s) => {
969
- let i = this.nodesMap[`${t}-${s.id}`];
970
- i && (this.currentSelect.toString().includes(s.id) && this.$emit("currentDelete"), this.showStatus && (i.status == 2 || i.status == 0 ? this.equipStatusManage.setGroupStatus(t, !1, 2) : i.status == 6 && this.equipStatusManage.setGroupStatus(t, !1, 6)), delete this.nodesMap[`${t}-${s.id}`], delete this.equipCheckObject[s.id]), delete this.equipStatusObject[s.id];
1691
+ t && this.groupNodeObject[t] && (this.updateGroupEquips(o.groupId), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus()), e.length && e.forEach((i) => {
1692
+ let s = this.nodesMap[`${t}-${i.id}`];
1693
+ s && (this.currentSelect.toString().includes(i.id) && this.$emit("currentDelete"), this.showStatus && (s.status == 2 || s.status == 0 ? this.equipStatusManage.setGroupStatus(t, !1, 2) : s.status == 6 && this.equipStatusManage.setGroupStatus(t, !1, 6)), delete this.nodesMap[`${t}-${i.id}`], delete this.equipCheckObject[`${t}-${i.id}`]), delete this.equipStatusObject[i.id];
971
1694
  }), this.equipStatusManage && this.equipStatusManage.reRenderGroupStatus();
972
1695
  },
973
1696
  moveEquips(o) {
974
1697
  const { updateGroups: t, buildTree: e } = o || {};
975
- !e && t ? t.forEach((s) => {
976
- s && this.groupNodeObject[s] && (this.updateGroupEquips(s), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus());
1698
+ !e && t ? t.forEach((i) => {
1699
+ i && this.groupNodeObject[i] && (this.updateGroupEquips(i), this.equipNumManage.resetGroupNum(), this.checkStatusManage && this.checkStatusManage.resetCheckedStatus());
977
1700
  }) : e && this.rebuildTree(), this.equipStatusManage && this.equipStatusManage.reRenderGroupStatus();
978
1701
  },
979
1702
  DeleteEquipGroup(o) {
@@ -994,12 +1717,12 @@ const B = A.exports, U = {
994
1717
  t && (this.isSearchStatus || this.rebuildTree(), this.equipStatusManage && this.equipStatusManage.reRenderGroupStatus());
995
1718
  },
996
1719
  EditEquip(o) {
997
- const { equipNo: t, groupId: e, equipName: s } = o || {};
998
- this.nodesMap[`${e}-${t}`] && (this.isSearchStatus || (this.nodesMap[`${e}-${t}`].title = s));
1720
+ const { equipNo: t, groupId: e, equipName: i } = o || {};
1721
+ this.nodesMap[`${e}-${t}`] && (this.isSearchStatus || (this.nodesMap[`${e}-${t}`].title = i));
999
1722
  }
1000
1723
  }
1001
1724
  };
1002
- var W = function() {
1725
+ var vt = function() {
1003
1726
  var t = this, e = t._self._c;
1004
1727
  return e("div", { staticClass: "gw-tree", style: { height: "100%" } }, [e("div", { staticClass: "tree", style: { height: "100%" } }, [e("virtual-list", { ref: "virtualList", staticClass: "virtualList", attrs: { "data-key": "key", "data-sources": t.visibleList, "data-component": t.itemComponent, keeps: 40, "extra-props": {
1005
1728
  currentSelect: t.currentSelect,
@@ -1014,20 +1737,20 @@ var W = function() {
1014
1737
  colorConfig: t.colorConfig,
1015
1738
  isSearchStatus: t.isSearchStatus
1016
1739
  } } })], 1)]);
1017
- }, R = [], K = /* @__PURE__ */ d(
1018
- U,
1019
- W,
1020
- R,
1740
+ }, Nt = [], Et = /* @__PURE__ */ B(
1741
+ Ot,
1742
+ vt,
1743
+ Nt,
1021
1744
  !1,
1022
1745
  null,
1023
1746
  null,
1024
1747
  null,
1025
1748
  null
1026
1749
  );
1027
- const D = K.exports;
1028
- class F {
1750
+ const kt = Et.exports;
1751
+ class Mt {
1029
1752
  constructor() {
1030
- this.eGroupNotify = new S("/eGroupNotify", "", ""), this.alreadyUpdate = {}, this.notify = null;
1753
+ this.eGroupNotify = new W("/eGroupNotify", "", ""), this.alreadyUpdate = {}, this.notify = null;
1031
1754
  }
1032
1755
  stop() {
1033
1756
  this.notify && this.notify.stop();
@@ -1046,11 +1769,11 @@ class F {
1046
1769
  } catch (e) {
1047
1770
  console.log(e);
1048
1771
  }
1049
- 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) => {
1772
+ this.subscribeTo(t, "GetGroupEquips"), this.subscribeTo(t, "AddEquip"), this.subscribeTo(t, "DeleteEquip"), this.subscribeTo(t, "EditEquip"), this.subscribeTo(t, "moveEquips"), this.subscribeTo(t, "CopyEquips"), this.subscribeTo(t, "GetAllEquipGroupTree"), t.onclose((e) => {
1050
1773
  try {
1051
1774
  this.Init();
1052
- } catch (s) {
1053
- console.log(s);
1775
+ } catch (i) {
1776
+ console.log(i);
1054
1777
  }
1055
1778
  console.log("\u91CD\u8FDE", e);
1056
1779
  });
@@ -1059,146 +1782,178 @@ class F {
1059
1782
  });
1060
1783
  }
1061
1784
  subscribeTo(t, e) {
1062
- t.off(e), t.on(e, (s) => {
1063
- s && s.isSuccess && (this[e] ? this[e](s.data) : this.notice({ func: e, data: s.data, key: s.groupId }));
1785
+ t.off(e), t.on(e, (i) => {
1786
+ i && i.isSuccess && (this[e] ? this[e](i.data) : this.notice({ func: e, data: i.data, key: i.groupId }));
1064
1787
  });
1065
1788
  }
1066
1789
  GetEquipGroupTree(t) {
1067
1790
  window.top.groupList || (window.top.groupList = t, this.notice({ type: "GetEquipGroupTree" }));
1068
1791
  }
1069
1792
  GetAllEquipGroupTree(t) {
1070
- console.log(8899, t), window.top.groupList_manageMent || (window.top.groupList_manageMent = t, this.notice({ type: "GetEquipGroupTreeWidthTreeType" }));
1793
+ window.top.groupList_manageMent || (window.top.groupList_manageMent = t, this.notice({ type: "GetEquipGroupTreeWidthTreeType" }));
1071
1794
  }
1072
1795
  AddEquipGroup(t) {
1073
- const { parentGroupId: e, groupId: s, groupName: i } = t || {};
1074
- s && (window.top.groupList_manageMent || (window.top.groupList_manageMent = []), window.top.groupList_manageMent.push({
1796
+ const { parentGroupId: e, groupId: i, groupName: s } = t || {};
1797
+ i && (window.top.groupList_manageMent || (window.top.groupList_manageMent = []), window.top.groupList_manageMent.push({
1075
1798
  parentId: e,
1076
- id: s,
1077
- name: i,
1799
+ id: i,
1800
+ name: s,
1078
1801
  equipCount: 0
1079
1802
  }), this.notice({ type: "AddEquipGroup", data: t }));
1080
1803
  }
1081
1804
  EditEquipGroup(t) {
1082
- const { groupId: e, groupName: s } = t;
1083
- window.top.groupList && window.groupList.forEach((i) => {
1084
- i.id == e && (i.name = s);
1085
- }), window.top.groupList_manageMent && window.groupList_manageMent.forEach((i) => {
1086
- i.id == e && (i.name = s);
1805
+ const { groupId: e, groupName: i } = t;
1806
+ window.top.groupList && window.groupList.forEach((s) => {
1807
+ s.id == e && (s.name = i);
1808
+ }), window.top.groupList_manageMent && window.groupList_manageMent.forEach((s) => {
1809
+ s.id == e && (s.name = i);
1087
1810
  }), this.notice({ type: "EditEquipGroup", data: t });
1088
1811
  }
1089
1812
  deleteChildGroup(t, e) {
1090
- let s = [];
1091
- e.forEach((i) => {
1092
- i.parentId == t && s.push(i.id);
1093
- }), s.forEach((i) => {
1094
- let u = e.findIndex((r) => r.id == i);
1095
- u > -1 && e.splice(u, 1), this.deleteChildGroup(i, e);
1813
+ let i = [];
1814
+ e.forEach((s) => {
1815
+ s.parentId == t && i.push(s.id);
1816
+ }), i.forEach((s) => {
1817
+ let a = e.findIndex((h) => h.id == s);
1818
+ a > -1 && e.splice(a, 1), this.deleteChildGroup(s, e);
1096
1819
  });
1097
1820
  }
1098
1821
  DeleteEquipGroup(t) {
1099
1822
  t.forEach((e) => {
1100
1823
  if (window.top.groupList) {
1101
- let s = window.top.groupList.findIndex((i) => i.id == e.groupId);
1102
- s > -1 && window.top.groupList.splice(s, 1), this.deleteChildGroup(e.groupId, window.top.groupList);
1824
+ let i = window.top.groupList.findIndex((s) => s.id == e.groupId);
1825
+ i > -1 && window.top.groupList.splice(i, 1), this.deleteChildGroup(e.groupId, window.top.groupList);
1103
1826
  }
1104
1827
  if (window.top.groupList_manageMent) {
1105
- let s = window.top.groupList_manageMent.findIndex((i) => i.id == e.groupId);
1106
- s > -1 && window.top.groupList_manageMent.splice(s, 1), this.deleteChildGroup(e.groupId, window.top.groupList_manageMent);
1828
+ let i = window.top.groupList_manageMent.findIndex((s) => s.id == e.groupId);
1829
+ i > -1 && window.top.groupList_manageMent.splice(i, 1), this.deleteChildGroup(e.groupId, window.top.groupList_manageMent);
1107
1830
  }
1108
1831
  }), this.notice({ type: "DeleteEquipGroup", data: t });
1109
1832
  }
1110
1833
  GetGroupEquips(t) {
1111
- const { groupId: e, equips: s } = t || {};
1112
- console.log(this.alreadyUpdate[e]), this.alreadyUpdate[e] || (window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[e] = {}, e && s && s instanceof Array && (s.forEach((i) => {
1113
- i.title = i.name, i.groupId = e, i.equipNo = i.id, delete i.name, window.equipCache || (window.top.equipCache = {}), window.top.equipCache[i.id] = i, window.top.groupCache[e][i.id] = i;
1114
- }), window.top[`group-${e}`] = s, this.notice({ type: "GetGroupEquips", data: { groupId: e } }), this.alreadyUpdate[e] = !0));
1834
+ const { groupId: e, equips: i } = t || {};
1835
+ console.log(this.alreadyUpdate[e]), this.alreadyUpdate[e] || (window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[e] = {}, e && i && i instanceof Array && (i.forEach((s) => {
1836
+ s.title = s.name, s.groupId = e, s.equipNo = s.id, window.top.equipCache || (window.top.equipCache = {}), window.top.equipCache[s.id] = s, window.top.groupCache[e][s.id] = s;
1837
+ }), window.top[`group-${e}`] = i, this.notice({ type: "GetGroupEquips", data: { groupId: e } }), this.alreadyUpdate[e] = !0));
1115
1838
  }
1116
1839
  AddEquip(t) {
1117
- const { groupId: e, equips: s } = t || {};
1840
+ const { groupId: e, equips: i } = t || {};
1118
1841
  window.top[`group-${e}`] || (window.top[`group-${e}`] = []), window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[e] || (window.top.groupCache[e] = {}), window.top.equipCache || (window.top.equipCache = {});
1119
- let i = window.top[`group-${e}`].length;
1120
- if (e && s) {
1121
- if (s.forEach((u, r) => {
1842
+ let s = window.top[`group-${e}`].length;
1843
+ if (e && i) {
1844
+ if (i.forEach((a, h) => {
1122
1845
  window.top[`group-${e}`].push(
1123
1846
  {
1124
- equipNo: u.id,
1847
+ equipNo: a.id,
1125
1848
  groupId: e,
1126
- id: u.id,
1127
- title: u.name
1849
+ id: a.id,
1850
+ title: a.name
1128
1851
  }
1129
- ), window.top.equipCache[u.id] = window.top[`group-${e}`][i + r], window.top.groupCache[e][u.id] = window.top[`group-${e}`][i + r];
1852
+ ), window.top.equipCache[a.id] = window.top[`group-${e}`][s + h], window.top.groupCache[e][a.id] = window.top[`group-${e}`][s + h];
1130
1853
  }), !this.exist(e, window.top.groupList)) {
1131
- let u = this.findParentList(e, window.top.groupList_manageMent);
1132
- window.top.groupList.push(...u);
1854
+ let a = this.findParentList(e, window.top.groupList_manageMent);
1855
+ window.top.groupList.push(...a);
1133
1856
  }
1134
1857
  this.notice({ type: "AddEquip", data: t });
1135
1858
  }
1136
1859
  }
1137
1860
  moveEquips(t) {
1138
- let e = [], s = !0, i = [];
1139
- const { sourceGroup: u, targetGroupId: r } = t || {};
1140
- r && e.push(r), u.forEach((p) => {
1141
- if (e.push(p.groupId), (!window.top[`group-${r}`] || !window.top[`group-${r}`].length) && (window.top[`group-${r}`] = [], i.push(r)), window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[r] || (window.top.groupCache[r] = {}), p.equips.forEach((a) => {
1142
- if (a.title = a.name, a.groupId = r, a.equipNo = a.id, window.top[`group-${p.groupId}`]) {
1143
- let h = window.top[`group-${p.groupId}`].findIndex((n) => n.id == a.id);
1144
- h > -1 && window.top[`group-${p.groupId}`].splice(h, 1);
1861
+ let e = [], i = !0, s = [];
1862
+ const { sourceGroup: a, targetGroupId: h } = t || {};
1863
+ h && e.push(h), a.forEach((c) => {
1864
+ if (e.push(c.groupId), (!window.top[`group-${h}`] || !window.top[`group-${h}`].length) && (window.top[`group-${h}`] = [], s.push(h)), window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[h] || (window.top.groupCache[h] = {}), c.equips.forEach((l) => {
1865
+ if (!l.name && window.top.equipCache && window.top.equipCache[l.id] && (l.name = window.top.equipCache[l.id].title || window.top.equipCache[l.id].name), l.title = l.name || "", l.groupId = h, l.equipNo = l.id, window.top[`group-${c.groupId}`]) {
1866
+ let g = window.top[`group-${c.groupId}`].findIndex((d) => d.id == l.id);
1867
+ g > -1 && window.top[`group-${c.groupId}`].splice(g, 1);
1145
1868
  }
1146
- window.equipCache || (window.top.equipCache = {}), window.top.equipCache[a.id] = a, window.top.groupCache[r][a.id] = a, window.top[`group-${r}`].push(a);
1147
- }), !window.top[`group-${p.groupId}`].length) {
1148
- let a = window.top.groupList.findIndex((h) => h.id == p.groupId);
1149
- a > -1 && window.top.groupList.splice(a, 1), this.deleteChildGroup(p.groupId, window.top.groupList);
1869
+ window.top.equipCache || (window.top.equipCache = {}), window.top.equipCache[l.id] = l, window.top.groupCache[h][l.id] = l, window.top[`group-${h}`].push(l);
1870
+ }), !window.top[`group-${c.groupId}`].length) {
1871
+ let l = window.top.groupList.findIndex((g) => g.id == c.groupId);
1872
+ l > -1 && window.top.groupList.splice(l, 1), this.deleteChildGroup(c.groupId, window.top.groupList);
1150
1873
  }
1151
- }), i.forEach((p) => {
1152
- if (!this.exist(p, window.top.groupList)) {
1153
- let a = this.findParentList(p, window.top.groupList_manageMent);
1154
- window.top.groupList.push(...a);
1874
+ }), s.forEach((c) => {
1875
+ if (!this.exist(c, window.top.groupList)) {
1876
+ let l = this.findParentList(c, window.top.groupList_manageMent);
1877
+ window.top.groupList.push(...l);
1878
+ }
1879
+ }), this.notice({ type: "moveEquips", data: { updateGroups: e, buildTree: i } });
1880
+ }
1881
+ CopyEquips(t) {
1882
+ const { targetGroupId: e, equips: i } = t || {};
1883
+ if (!e || !i || !Array.isArray(i)) {
1884
+ console.warn("CopyEquips: \u65E0\u6548\u7684\u6570\u636E\u683C\u5F0F", t);
1885
+ return;
1886
+ }
1887
+ let s = [e], a = [];
1888
+ window.top[`group-${e}`] || (window.top[`group-${e}`] = [], a.push(e)), window.top.groupCache || (window.top.groupCache = {}), window.top.groupCache[e] || (window.top.groupCache[e] = {}), window.top.equipCache || (window.top.equipCache = {}), i.forEach((h) => {
1889
+ !h.name && window.top.equipCache && window.top.equipCache[h.id] && (h.name = window.top.equipCache[h.id].title || window.top.equipCache[h.id].name);
1890
+ const c = {
1891
+ id: h.id,
1892
+ equipNo: h.id,
1893
+ groupId: e,
1894
+ title: h.name || "",
1895
+ name: h.name || ""
1896
+ };
1897
+ window.top.equipCache[h.id] = c, window.top.groupCache[e][h.id] = c, window.top[`group-${e}`].push(c);
1898
+ }), a.forEach((h) => {
1899
+ if (!this.exist(h, window.top.groupList)) {
1900
+ let c = this.findParentList(h, window.top.groupList_manageMent);
1901
+ window.top.groupList.push(...c);
1902
+ }
1903
+ }), this.notice({
1904
+ type: "moveEquips",
1905
+ data: {
1906
+ updateGroups: s,
1907
+ buildTree: !1,
1908
+ targetGroupId: e,
1909
+ equipCount: i.length
1155
1910
  }
1156
- }), this.notice({ type: "moveEquips", data: { updateGroups: e, buildTree: s } });
1911
+ });
1157
1912
  }
1158
1913
  exist(t, e) {
1159
- return e ? e.some((s) => s.id == t) : !1;
1914
+ return e ? e.some((i) => i.id == t) : !1;
1160
1915
  }
1161
1916
  findParentList(t, e) {
1162
- let s = [];
1917
+ let i = [];
1163
1918
  if (e) {
1164
- let i = e.findIndex((u) => u.id == t);
1165
- i > -1 && s.push({ ...e[i] }), e[i].parentId && !this.exist(e[i].parentId, window.top.groupList) && s.push(...this.findParentList(e[i].parentId, window.top.groupList_manageMent));
1919
+ let s = e.findIndex((a) => a.id == t);
1920
+ s > -1 && i.push({ ...e[s] }), e[s].parentId && !this.exist(e[s].parentId, window.top.groupList) && i.push(...this.findParentList(e[s].parentId, window.top.groupList_manageMent));
1166
1921
  }
1167
- return s;
1922
+ return i;
1168
1923
  }
1169
1924
  DeleteEquip(t) {
1170
- const { groupId: e, equips: s } = t || {};
1171
- if (e && s && s instanceof Array) {
1925
+ const { groupId: e, equips: i } = t || {};
1926
+ if (e && i && i instanceof Array) {
1172
1927
  if (window.top[`group-${e}`])
1173
- for (let i = 0, u = s.length; i < u; i++) {
1174
- let r = window.top[`group-${e}`].findIndex((p) => p.id == s[i].id);
1175
- r > -1 && window.top[`group-${e}`].splice(r, 1), delete window.top.equipCache[s[i].id], delete window.top.groupCache[e][s[i].id];
1928
+ for (let s = 0, a = i.length; s < a; s++) {
1929
+ let h = window.top[`group-${e}`].findIndex((c) => c.id == i[s].id);
1930
+ h > -1 && window.top[`group-${e}`].splice(h, 1), delete window.top.equipCache[i[s].id], delete window.top.groupCache[e][i[s].id];
1176
1931
  }
1177
1932
  this.notice({ type: "DeleteEquip", data: t });
1178
1933
  }
1179
1934
  }
1180
1935
  EditEquip(t) {
1181
- const { equipNo: e, groupId: s, equipName: i } = t || {};
1182
- s && e && (window[`group-${s}`] && (window.top.equipCache[e] = i), this.notice({ type: "EditEquip", data: t }));
1936
+ const { equipNo: e, groupId: i, equipName: s } = t || {};
1937
+ i && e && (window[`group-${i}`] && (window.top.equipCache[e] = s), this.notice({ type: "EditEquip", data: t }));
1183
1938
  }
1184
1939
  notice(t) {
1185
1940
  if (window.top.hasIframe) {
1186
1941
  let e = document.getElementsByTagName("iframe");
1187
- for (let s of e)
1188
- s.contentWindow.postMessage(t);
1942
+ for (let i of e)
1943
+ i.contentWindow.postMessage(t);
1189
1944
  } else
1190
1945
  window.postMessage(t, "*");
1191
1946
  }
1192
1947
  }
1193
- const z = {
1948
+ const jt = {
1194
1949
  name: "treeV2",
1195
1950
  components: {
1196
- tree: D
1951
+ tree: kt
1197
1952
  },
1198
1953
  data() {
1199
1954
  return {
1200
1955
  list: [],
1201
- refId: l.generateUUID(),
1956
+ refId: k.generateUUID(),
1202
1957
  treeKey: null,
1203
1958
  listKey: null,
1204
1959
  hasBuildTree: !1
@@ -1211,7 +1966,7 @@ const z = {
1211
1966
  }
1212
1967
  },
1213
1968
  mounted() {
1214
- this.treeKey = `equipGroup${this.treeType}`, this.listKey = `groupList${this.treeType}`, window.top[this.treeKey] ? this.list = l.formateList(JSON.parse(JSON.stringify(window.top[this.treeKey]))) : window.top[this.listKey] && this.buildTree(), window.executeQueue || (window.executeQueues = {}), window.executeQueues[this.refId] = this.destroyTree, window.addEventListener("message", (o) => {
1969
+ this.treeKey = `equipGroup${this.treeType}`, this.listKey = `groupList${this.treeType}`, window.top[this.treeKey] ? this.list = k.formateList(JSON.parse(JSON.stringify(window.top[this.treeKey]))) : window.top[this.listKey] && this.buildTree(), window.executeQueue || (window.executeQueues = {}), window.executeQueues[this.refId] = this.destroyTree, window.addEventListener("message", (o) => {
1215
1970
  o && o.data && o.data.type && this[o.data.type] && this[o.data.type]();
1216
1971
  });
1217
1972
  try {
@@ -1222,7 +1977,7 @@ const z = {
1222
1977
  },
1223
1978
  methods: {
1224
1979
  selfRequest() {
1225
- new F().Init();
1980
+ new Mt().Init();
1226
1981
  },
1227
1982
  GetEquipGroupTreeWidthTreeType() {
1228
1983
  this.treeType && window.top[this.listKey] && this.buildTree();
@@ -1232,8 +1987,8 @@ const z = {
1232
1987
  },
1233
1988
  buildTree() {
1234
1989
  if (window.top[this.listKey]) {
1235
- let o = l.listToTreeList(JSON.parse(JSON.stringify(window.top[this.listKey])));
1236
- this.list = l.formateList(JSON.parse(JSON.stringify(o))), window.top[`equipGroup${this.treeType}`] = o, this.hasBuildTree = !0;
1990
+ let o = k.listToTreeList(JSON.parse(JSON.stringify(window.top[this.listKey])));
1991
+ this.list = k.formateList(JSON.parse(JSON.stringify(o))), window.top[`equipGroup${this.treeType}`] = o, this.hasBuildTree = !0;
1237
1992
  }
1238
1993
  },
1239
1994
  filterMethod(o) {
@@ -1248,28 +2003,31 @@ const z = {
1248
2003
  getControlSelected() {
1249
2004
  return this.$refs[this.refId].getControlSelected();
1250
2005
  },
2006
+ getEquipGroupSelectd() {
2007
+ return this.$refs[this.refId].getEquipGroupSelectd();
2008
+ },
1251
2009
  destroyTree() {
1252
2010
  this.$refs[this.refId].destroyTree();
1253
2011
  }
1254
2012
  }
1255
2013
  };
1256
- var J = function() {
2014
+ var $t = function() {
1257
2015
  var t = this, e = t._self._c;
1258
2016
  return e("tree", t._g(t._b({ ref: t.refId, attrs: { data: t.list, buildTree: t.buildTree } }, "tree", { ...t.$attrs, ...t.$props }, !1), t.$listeners));
1259
- }, P = [], V = /* @__PURE__ */ d(
1260
- z,
1261
- J,
1262
- P,
2017
+ }, Gt = [], Tt = /* @__PURE__ */ B(
2018
+ jt,
2019
+ $t,
2020
+ Gt,
1263
2021
  !1,
1264
2022
  null,
1265
2023
  null,
1266
2024
  null,
1267
2025
  null
1268
2026
  );
1269
- const f = V.exports;
1270
- f.install = function(o) {
1271
- o.component(f.name, f);
2027
+ const P = Tt.exports;
2028
+ P.install = function(o) {
2029
+ o.component(P.name, P);
1272
2030
  };
1273
2031
  export {
1274
- f as default
2032
+ P as default
1275
2033
  };