@xtctwins/tctwins-bimx-engine 0.2.53 → 0.3.0
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.
- package/README.md +196 -193
- package/dist/AnnotationTool-CGRte6Cc.mjs +167 -0
- package/dist/BIMX_Viewer_Lib.es.js +3 -3
- package/dist/BIMX_Viewer_Lib.umd.js +139 -131
- package/dist/{CommentTool-D_AlsrTE.mjs → CommentTool-CT3wFozB.mjs} +168 -168
- package/dist/{HiddenTool-DvSKSssY.mjs → HiddenTool-CoPawMRd.mjs} +13 -13
- package/dist/{InspectorTool-DLWyGXgI.mjs → InspectorTool-BIvnydPf.mjs} +64 -64
- package/dist/{MeasureTool-BcVGavki.mjs → MeasureTool-BUi0QI_R.mjs} +22 -22
- package/dist/{MouseTool-YNKPFjAo.mjs → MouseTool-CdVwRiX1.mjs} +15 -15
- package/dist/{NavigateTool-DsY1_TdT.mjs → NavigateTool-DoP9z3yP.mjs} +13 -13
- package/dist/{RoamTool-BFVE2V3K.mjs → RoamTool-POFy076i.mjs} +17 -17
- package/dist/ScreenShotTool-CcUyU0g7.mjs +357 -0
- package/dist/{SectionTool-4cRL2V6O.mjs → SectionTool-DGjjH3JO.mjs} +43 -43
- package/dist/SettingTool-CjXfbX5r.mjs +657 -0
- package/dist/StructureTree-DdRX-y-V.mjs +1583 -0
- package/dist/{alert-p1T29wPF.mjs → alert-ChDNxVgQ.mjs} +9 -9
- package/dist/el-input-number-CK5d8pzH.mjs +818 -0
- package/dist/{index-DNbbNkvv.mjs → index-Dsq1epCY.mjs} +47820 -51677
- package/dist/index.html +17 -17
- package/dist/{panel.vue_vue_type_style_index_0_lang-6c_lx4nG.mjs → panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs} +3 -3
- package/dist/style.css +1 -1
- package/dist/{tallPanel-ubDUD9VF.mjs → tallPanel-DKlcFjrl.mjs} +15 -15
- package/package.json +2 -2
- package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +10 -38
- package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +22 -0
- package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +9 -37
- package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +7 -5
- package/types/components/BCFComponents/BCFFilter.vue.d.ts +7 -5
- package/types/components/BCFComponents/BCFTool.vue.d.ts +7 -4
- package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +7 -5
- package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +6 -5
- package/types/components/BCFComponents/commentInput.vue.d.ts +10 -36
- package/types/components/BCFComponents/commentsView.vue.d.ts +7 -36
- package/types/components/BCFComponents/dialogPanel.vue.d.ts +8 -5
- package/types/components/BCFComponents/imageView.vue.d.ts +7 -5
- package/types/components/BCFComponents/imageZoomIn.vue.d.ts +6 -5
- package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +1 -18
- package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +1 -32
- package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +8 -6
- package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +5 -4
- package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
- package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +1 -478
- package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +7 -499
- package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +6 -5
- package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/SettingTool.vue.d.ts +6 -4
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +1 -4026
- package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/emptyPage.vue.d.ts +8 -0
- package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +1 -18
- package/types/components/BimxViewerComp.vue.d.ts +14 -7
- package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +10 -37
- package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +9 -37
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +7 -499
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +1 -478
- package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +8 -5
- package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +12 -38
- package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +9 -7
- package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +7 -5
- package/types/components/bimxViewer.vue.d.ts +14 -7
- package/types/components/utilsComponents/alert.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
- package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
- package/types/components/utilsComponents/loading.vue.d.ts +1 -1
- package/types/components/utilsComponents/panel.vue.d.ts +2 -8
- package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
- package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -3
- package/types/components/utilsComponents/tallPanel.vue.d.ts +3 -13
- package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +3 -13
- package/types/pages/BimxViewerEntry.vue.d.ts +57 -5
- package/types/pages/viewerEntry.vue.d.ts +57 -7
- package/types/store/initConfigs.d.ts +1 -1
- package/types/store/toolbars.d.ts +46 -46
- package/types/tests/cmt.d.ts +1 -0
- package/dist/AnnotationTool-BU5DCBHd.mjs +0 -239
- package/dist/ScreenShotTool-BDUErHu1.mjs +0 -500
- package/dist/SettingTool-BzaZsP21.mjs +0 -815
- package/dist/StructureTree-zC5APcxf.mjs +0 -1846
- package/dist/el-input-number-BWTLtMdM.mjs +0 -1169
|
@@ -0,0 +1,1583 @@
|
|
|
1
|
+
import { u as re, _ as Ne, w as Ie, h as be, i as je, a as Oe, r as Ce, b as Me, E as Pe, c as He, d as ze, e as Fe, f as qe, g as Re, j as Z, k as Ve, l as Ue, s as We, m as Ye, n as Ge, o as Je, p as ee, q as ye, T as De, t as Qe, v as Xe, x as Ze, y as et } from "./index-Dsq1epCY.mjs";
|
|
2
|
+
import { _ as tt } from "./tallPanel-DKlcFjrl.mjs";
|
|
3
|
+
import { _ as nt } from "./panel.vue_vue_type_style_index_0_lang-BaSZShh_.mjs";
|
|
4
|
+
import { defineComponent as de, openBlock as w, createBlock as Y, Transition as ot, mergeProps as st, unref as x, toHandlers as at, withCtx as I, renderSlot as xe, reactive as rt, inject as ae, h as Ke, provide as fe, ref as E, getCurrentInstance as Be, watch as O, nextTick as ke, resolveComponent as ne, withDirectives as U, createElementBlock as $, normalizeClass as z, withModifiers as te, createElementVNode as _, normalizeStyle as dt, resolveDynamicComponent as it, createCommentVNode as le, createVNode as S, Fragment as ue, renderList as he, vShow as W, shallowRef as Te, onMounted as Ae, onUpdated as lt, computed as ct, toDisplayString as H, onBeforeUnmount as ut } from "vue";
|
|
5
|
+
import { S as ve } from "./const-DOnRsYpZ.mjs";
|
|
6
|
+
import { Loading as ht, CaretRight as ft } from "@element-plus/icons-vue";
|
|
7
|
+
const pt = de({
|
|
8
|
+
name: "ElCollapseTransition"
|
|
9
|
+
}), yt = /* @__PURE__ */ de({
|
|
10
|
+
...pt,
|
|
11
|
+
setup(t) {
|
|
12
|
+
const e = re("collapse-transition"), o = (n) => {
|
|
13
|
+
n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom;
|
|
14
|
+
}, s = {
|
|
15
|
+
beforeEnter(n) {
|
|
16
|
+
n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.style.height && (n.dataset.elExistsHeight = n.style.height), n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0;
|
|
17
|
+
},
|
|
18
|
+
enter(n) {
|
|
19
|
+
requestAnimationFrame(() => {
|
|
20
|
+
n.dataset.oldOverflow = n.style.overflow, n.dataset.elExistsHeight ? n.style.maxHeight = n.dataset.elExistsHeight : n.scrollHeight !== 0 ? n.style.maxHeight = `${n.scrollHeight}px` : n.style.maxHeight = 0, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom, n.style.overflow = "hidden";
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
afterEnter(n) {
|
|
24
|
+
n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow;
|
|
25
|
+
},
|
|
26
|
+
enterCancelled(n) {
|
|
27
|
+
o(n);
|
|
28
|
+
},
|
|
29
|
+
beforeLeave(n) {
|
|
30
|
+
n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.dataset.oldOverflow = n.style.overflow, n.style.maxHeight = `${n.scrollHeight}px`, n.style.overflow = "hidden";
|
|
31
|
+
},
|
|
32
|
+
leave(n) {
|
|
33
|
+
n.scrollHeight !== 0 && (n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0);
|
|
34
|
+
},
|
|
35
|
+
afterLeave(n) {
|
|
36
|
+
o(n);
|
|
37
|
+
},
|
|
38
|
+
leaveCancelled(n) {
|
|
39
|
+
o(n);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return (n, a) => (w(), Y(ot, st({
|
|
43
|
+
name: x(e).b()
|
|
44
|
+
}, at(s)), {
|
|
45
|
+
default: I(() => [
|
|
46
|
+
xe(n.$slots, "default")
|
|
47
|
+
]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 16, ["name"]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var vt = /* @__PURE__ */ Ne(yt, [["__file", "collapse-transition.vue"]]);
|
|
53
|
+
const gt = Ie(vt), se = "$treeNodeId", Se = function(t, e) {
|
|
54
|
+
!e || e[se] || Object.defineProperty(e, se, {
|
|
55
|
+
value: t.id,
|
|
56
|
+
enumerable: !1,
|
|
57
|
+
configurable: !1,
|
|
58
|
+
writable: !1
|
|
59
|
+
});
|
|
60
|
+
}, we = function(t, e) {
|
|
61
|
+
return t ? e[t] : e[se];
|
|
62
|
+
}, _e = (t, e, o) => {
|
|
63
|
+
const s = t.value.currentNode;
|
|
64
|
+
o();
|
|
65
|
+
const n = t.value.currentNode;
|
|
66
|
+
s !== n && e("current-change", n ? n.data : null, n);
|
|
67
|
+
}, Ee = (t) => {
|
|
68
|
+
let e = !0, o = !0, s = !0;
|
|
69
|
+
for (let n = 0, a = t.length; n < a; n++) {
|
|
70
|
+
const i = t[n];
|
|
71
|
+
(i.checked !== !0 || i.indeterminate) && (e = !1, i.disabled || (s = !1)), (i.checked !== !1 || i.indeterminate) && (o = !1);
|
|
72
|
+
}
|
|
73
|
+
return { all: e, none: o, allWithoutDisable: s, half: !e && !o };
|
|
74
|
+
}, ce = function(t) {
|
|
75
|
+
if (t.childNodes.length === 0 || t.loading)
|
|
76
|
+
return;
|
|
77
|
+
const { all: e, none: o, half: s } = Ee(t.childNodes);
|
|
78
|
+
e ? (t.checked = !0, t.indeterminate = !1) : s ? (t.checked = !1, t.indeterminate = !0) : o && (t.checked = !1, t.indeterminate = !1);
|
|
79
|
+
const n = t.parent;
|
|
80
|
+
!n || n.level === 0 || t.store.checkStrictly || ce(n);
|
|
81
|
+
}, ge = function(t, e) {
|
|
82
|
+
const o = t.store.props, s = t.data || {}, n = o[e];
|
|
83
|
+
if (typeof n == "function")
|
|
84
|
+
return n(s, t);
|
|
85
|
+
if (typeof n == "string")
|
|
86
|
+
return s[n];
|
|
87
|
+
if (typeof n > "u") {
|
|
88
|
+
const a = s[e];
|
|
89
|
+
return a === void 0 ? "" : a;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
let kt = 0;
|
|
93
|
+
class oe {
|
|
94
|
+
constructor(e) {
|
|
95
|
+
this.id = kt++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
|
|
96
|
+
for (const o in e)
|
|
97
|
+
be(e, o) && (this[o] = e[o]);
|
|
98
|
+
this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
|
|
99
|
+
}
|
|
100
|
+
initialize() {
|
|
101
|
+
const e = this.store;
|
|
102
|
+
if (!e)
|
|
103
|
+
throw new Error("[Node]store is required!");
|
|
104
|
+
e.registerNode(this);
|
|
105
|
+
const o = e.props;
|
|
106
|
+
if (o && typeof o.isLeaf < "u") {
|
|
107
|
+
const a = ge(this, "isLeaf");
|
|
108
|
+
typeof a == "boolean" && (this.isLeafByUser = a);
|
|
109
|
+
}
|
|
110
|
+
if (e.lazy !== !0 && this.data ? (this.setData(this.data), e.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && e.lazy && e.defaultExpandAll && !this.isLeafByUser && this.expand(), Array.isArray(this.data) || Se(this, this.data), !this.data)
|
|
111
|
+
return;
|
|
112
|
+
const s = e.defaultExpandedKeys, n = e.key;
|
|
113
|
+
n && s && s.includes(this.key) && this.expand(null, e.autoExpandParent), n && e.currentNodeKey !== void 0 && this.key === e.currentNodeKey && (e.currentNode = this, e.currentNode.isCurrent = !0), e.lazy && e._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
|
|
114
|
+
}
|
|
115
|
+
setData(e) {
|
|
116
|
+
Array.isArray(e) || Se(this, e), this.data = e, this.childNodes = [];
|
|
117
|
+
let o;
|
|
118
|
+
this.level === 0 && Array.isArray(this.data) ? o = this.data : o = ge(this, "children") || [];
|
|
119
|
+
for (let s = 0, n = o.length; s < n; s++)
|
|
120
|
+
this.insertChild({ data: o[s] });
|
|
121
|
+
}
|
|
122
|
+
get label() {
|
|
123
|
+
return ge(this, "label");
|
|
124
|
+
}
|
|
125
|
+
get key() {
|
|
126
|
+
const e = this.store.key;
|
|
127
|
+
return this.data ? this.data[e] : null;
|
|
128
|
+
}
|
|
129
|
+
get disabled() {
|
|
130
|
+
return ge(this, "disabled");
|
|
131
|
+
}
|
|
132
|
+
get nextSibling() {
|
|
133
|
+
const e = this.parent;
|
|
134
|
+
if (e) {
|
|
135
|
+
const o = e.childNodes.indexOf(this);
|
|
136
|
+
if (o > -1)
|
|
137
|
+
return e.childNodes[o + 1];
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
get previousSibling() {
|
|
142
|
+
const e = this.parent;
|
|
143
|
+
if (e) {
|
|
144
|
+
const o = e.childNodes.indexOf(this);
|
|
145
|
+
if (o > -1)
|
|
146
|
+
return o > 0 ? e.childNodes[o - 1] : null;
|
|
147
|
+
}
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
contains(e, o = !0) {
|
|
151
|
+
return (this.childNodes || []).some((s) => s === e || o && s.contains(e));
|
|
152
|
+
}
|
|
153
|
+
remove() {
|
|
154
|
+
const e = this.parent;
|
|
155
|
+
e && e.removeChild(this);
|
|
156
|
+
}
|
|
157
|
+
insertChild(e, o, s) {
|
|
158
|
+
if (!e)
|
|
159
|
+
throw new Error("InsertChild error: child is required.");
|
|
160
|
+
if (!(e instanceof oe)) {
|
|
161
|
+
if (!s) {
|
|
162
|
+
const n = this.getChildren(!0);
|
|
163
|
+
n.includes(e.data) || (typeof o > "u" || o < 0 ? n.push(e.data) : n.splice(o, 0, e.data));
|
|
164
|
+
}
|
|
165
|
+
Object.assign(e, {
|
|
166
|
+
parent: this,
|
|
167
|
+
store: this.store
|
|
168
|
+
}), e = rt(new oe(e)), e instanceof oe && e.initialize();
|
|
169
|
+
}
|
|
170
|
+
e.level = this.level + 1, typeof o > "u" || o < 0 ? this.childNodes.push(e) : this.childNodes.splice(o, 0, e), this.updateLeafState();
|
|
171
|
+
}
|
|
172
|
+
insertBefore(e, o) {
|
|
173
|
+
let s;
|
|
174
|
+
o && (s = this.childNodes.indexOf(o)), this.insertChild(e, s);
|
|
175
|
+
}
|
|
176
|
+
insertAfter(e, o) {
|
|
177
|
+
let s;
|
|
178
|
+
o && (s = this.childNodes.indexOf(o), s !== -1 && (s += 1)), this.insertChild(e, s);
|
|
179
|
+
}
|
|
180
|
+
removeChild(e) {
|
|
181
|
+
const o = this.getChildren() || [], s = o.indexOf(e.data);
|
|
182
|
+
s > -1 && o.splice(s, 1);
|
|
183
|
+
const n = this.childNodes.indexOf(e);
|
|
184
|
+
n > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(n, 1)), this.updateLeafState();
|
|
185
|
+
}
|
|
186
|
+
removeChildByData(e) {
|
|
187
|
+
let o = null;
|
|
188
|
+
for (let s = 0; s < this.childNodes.length; s++)
|
|
189
|
+
if (this.childNodes[s].data === e) {
|
|
190
|
+
o = this.childNodes[s];
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
o && this.removeChild(o);
|
|
194
|
+
}
|
|
195
|
+
expand(e, o) {
|
|
196
|
+
const s = () => {
|
|
197
|
+
if (o) {
|
|
198
|
+
let n = this.parent;
|
|
199
|
+
for (; n.level > 0; )
|
|
200
|
+
n.expanded = !0, n = n.parent;
|
|
201
|
+
}
|
|
202
|
+
this.expanded = !0, e && e(), this.childNodes.forEach((n) => {
|
|
203
|
+
n.canFocus = !0;
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
this.shouldLoadData() ? this.loadData((n) => {
|
|
207
|
+
Array.isArray(n) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || ce(this), s());
|
|
208
|
+
}) : s();
|
|
209
|
+
}
|
|
210
|
+
doCreateChildren(e, o = {}) {
|
|
211
|
+
e.forEach((s) => {
|
|
212
|
+
this.insertChild(Object.assign({ data: s }, o), void 0, !0);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
collapse() {
|
|
216
|
+
this.expanded = !1, this.childNodes.forEach((e) => {
|
|
217
|
+
e.canFocus = !1;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
shouldLoadData() {
|
|
221
|
+
return this.store.lazy === !0 && this.store.load && !this.loaded;
|
|
222
|
+
}
|
|
223
|
+
updateLeafState() {
|
|
224
|
+
if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
|
|
225
|
+
this.isLeaf = this.isLeafByUser;
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const e = this.childNodes;
|
|
229
|
+
if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
|
|
230
|
+
this.isLeaf = !e || e.length === 0;
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.isLeaf = !1;
|
|
234
|
+
}
|
|
235
|
+
setChecked(e, o, s, n) {
|
|
236
|
+
if (this.indeterminate = e === "half", this.checked = e === !0, this.store.checkStrictly)
|
|
237
|
+
return;
|
|
238
|
+
if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
|
|
239
|
+
const { all: i, allWithoutDisable: l } = Ee(this.childNodes);
|
|
240
|
+
!this.isLeaf && !i && l && (this.checked = !1, e = !1);
|
|
241
|
+
const y = () => {
|
|
242
|
+
if (o) {
|
|
243
|
+
const N = this.childNodes;
|
|
244
|
+
for (let f = 0, v = N.length; f < v; f++) {
|
|
245
|
+
const k = N[f];
|
|
246
|
+
n = n || e !== !1;
|
|
247
|
+
const b = k.disabled ? k.checked : n;
|
|
248
|
+
k.setChecked(b, o, !0, n);
|
|
249
|
+
}
|
|
250
|
+
const { half: c, all: d } = Ee(N);
|
|
251
|
+
d || (this.checked = d, this.indeterminate = c);
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
if (this.shouldLoadData()) {
|
|
255
|
+
this.loadData(() => {
|
|
256
|
+
y(), ce(this);
|
|
257
|
+
}, {
|
|
258
|
+
checked: e !== !1
|
|
259
|
+
});
|
|
260
|
+
return;
|
|
261
|
+
} else
|
|
262
|
+
y();
|
|
263
|
+
}
|
|
264
|
+
const a = this.parent;
|
|
265
|
+
!a || a.level === 0 || s || ce(a);
|
|
266
|
+
}
|
|
267
|
+
getChildren(e = !1) {
|
|
268
|
+
if (this.level === 0)
|
|
269
|
+
return this.data;
|
|
270
|
+
const o = this.data;
|
|
271
|
+
if (!o)
|
|
272
|
+
return null;
|
|
273
|
+
const s = this.store.props;
|
|
274
|
+
let n = "children";
|
|
275
|
+
return s && (n = s.children || "children"), o[n] === void 0 && (o[n] = null), e && !o[n] && (o[n] = []), o[n];
|
|
276
|
+
}
|
|
277
|
+
updateChildren() {
|
|
278
|
+
const e = this.getChildren() || [], o = this.childNodes.map((a) => a.data), s = {}, n = [];
|
|
279
|
+
e.forEach((a, i) => {
|
|
280
|
+
const l = a[se];
|
|
281
|
+
!!l && o.findIndex((N) => N[se] === l) >= 0 ? s[l] = { index: i, data: a } : n.push({ index: i, data: a });
|
|
282
|
+
}), this.store.lazy || o.forEach((a) => {
|
|
283
|
+
s[a[se]] || this.removeChildByData(a);
|
|
284
|
+
}), n.forEach(({ index: a, data: i }) => {
|
|
285
|
+
this.insertChild({ data: i }, a);
|
|
286
|
+
}), this.updateLeafState();
|
|
287
|
+
}
|
|
288
|
+
loadData(e, o = {}) {
|
|
289
|
+
if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(o).length)) {
|
|
290
|
+
this.loading = !0;
|
|
291
|
+
const s = (a) => {
|
|
292
|
+
this.childNodes = [], this.doCreateChildren(a, o), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, a);
|
|
293
|
+
}, n = () => {
|
|
294
|
+
this.loading = !1;
|
|
295
|
+
};
|
|
296
|
+
this.store.load(this, s, n);
|
|
297
|
+
} else
|
|
298
|
+
e && e.call(this);
|
|
299
|
+
}
|
|
300
|
+
eachNode(e) {
|
|
301
|
+
const o = [this];
|
|
302
|
+
for (; o.length; ) {
|
|
303
|
+
const s = o.shift();
|
|
304
|
+
o.unshift(...s.childNodes), e(s);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
reInitChecked() {
|
|
308
|
+
this.store.checkStrictly || ce(this);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
class Nt {
|
|
312
|
+
constructor(e) {
|
|
313
|
+
this.currentNode = null, this.currentNodeKey = null;
|
|
314
|
+
for (const o in e)
|
|
315
|
+
be(e, o) && (this[o] = e[o]);
|
|
316
|
+
this.nodesMap = {};
|
|
317
|
+
}
|
|
318
|
+
initialize() {
|
|
319
|
+
if (this.root = new oe({
|
|
320
|
+
data: this.data,
|
|
321
|
+
store: this
|
|
322
|
+
}), this.root.initialize(), this.lazy && this.load) {
|
|
323
|
+
const e = this.load;
|
|
324
|
+
e(this.root, (o) => {
|
|
325
|
+
this.root.doCreateChildren(o), this._initDefaultCheckedNodes();
|
|
326
|
+
});
|
|
327
|
+
} else
|
|
328
|
+
this._initDefaultCheckedNodes();
|
|
329
|
+
}
|
|
330
|
+
filter(e) {
|
|
331
|
+
const o = this.filterNodeMethod, s = this.lazy, n = function(a) {
|
|
332
|
+
const i = a.root ? a.root.childNodes : a.childNodes;
|
|
333
|
+
if (i.forEach((l) => {
|
|
334
|
+
l.visible = o.call(l, e, l.data, l), n(l);
|
|
335
|
+
}), !a.visible && i.length) {
|
|
336
|
+
let l = !0;
|
|
337
|
+
l = !i.some((y) => y.visible), a.root ? a.root.visible = l === !1 : a.visible = l === !1;
|
|
338
|
+
}
|
|
339
|
+
e && a.visible && !a.isLeaf && (!s || a.loaded) && a.expand();
|
|
340
|
+
};
|
|
341
|
+
n(this);
|
|
342
|
+
}
|
|
343
|
+
setData(e) {
|
|
344
|
+
e !== this.root.data ? (this.root.setData(e), this._initDefaultCheckedNodes()) : this.root.updateChildren();
|
|
345
|
+
}
|
|
346
|
+
getNode(e) {
|
|
347
|
+
if (e instanceof oe)
|
|
348
|
+
return e;
|
|
349
|
+
const o = je(e) ? we(this.key, e) : e;
|
|
350
|
+
return this.nodesMap[o] || null;
|
|
351
|
+
}
|
|
352
|
+
insertBefore(e, o) {
|
|
353
|
+
const s = this.getNode(o);
|
|
354
|
+
s.parent.insertBefore({ data: e }, s);
|
|
355
|
+
}
|
|
356
|
+
insertAfter(e, o) {
|
|
357
|
+
const s = this.getNode(o);
|
|
358
|
+
s.parent.insertAfter({ data: e }, s);
|
|
359
|
+
}
|
|
360
|
+
remove(e) {
|
|
361
|
+
const o = this.getNode(e);
|
|
362
|
+
o && o.parent && (o === this.currentNode && (this.currentNode = null), o.parent.removeChild(o));
|
|
363
|
+
}
|
|
364
|
+
append(e, o) {
|
|
365
|
+
const s = Oe(o) ? this.root : this.getNode(o);
|
|
366
|
+
s && s.insertChild({ data: e });
|
|
367
|
+
}
|
|
368
|
+
_initDefaultCheckedNodes() {
|
|
369
|
+
const e = this.defaultCheckedKeys || [], o = this.nodesMap;
|
|
370
|
+
e.forEach((s) => {
|
|
371
|
+
const n = o[s];
|
|
372
|
+
n && n.setChecked(!0, !this.checkStrictly);
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
_initDefaultCheckedNode(e) {
|
|
376
|
+
(this.defaultCheckedKeys || []).includes(e.key) && e.setChecked(!0, !this.checkStrictly);
|
|
377
|
+
}
|
|
378
|
+
setDefaultCheckedKey(e) {
|
|
379
|
+
e !== this.defaultCheckedKeys && (this.defaultCheckedKeys = e, this._initDefaultCheckedNodes());
|
|
380
|
+
}
|
|
381
|
+
registerNode(e) {
|
|
382
|
+
const o = this.key;
|
|
383
|
+
!e || !e.data || (o ? e.key !== void 0 && (this.nodesMap[e.key] = e) : this.nodesMap[e.id] = e);
|
|
384
|
+
}
|
|
385
|
+
deregisterNode(e) {
|
|
386
|
+
!this.key || !e || !e.data || (e.childNodes.forEach((s) => {
|
|
387
|
+
this.deregisterNode(s);
|
|
388
|
+
}), delete this.nodesMap[e.key]);
|
|
389
|
+
}
|
|
390
|
+
getCheckedNodes(e = !1, o = !1) {
|
|
391
|
+
const s = [], n = function(a) {
|
|
392
|
+
(a.root ? a.root.childNodes : a.childNodes).forEach((l) => {
|
|
393
|
+
(l.checked || o && l.indeterminate) && (!e || e && l.isLeaf) && s.push(l.data), n(l);
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
return n(this), s;
|
|
397
|
+
}
|
|
398
|
+
getCheckedKeys(e = !1) {
|
|
399
|
+
return this.getCheckedNodes(e).map((o) => (o || {})[this.key]);
|
|
400
|
+
}
|
|
401
|
+
getHalfCheckedNodes() {
|
|
402
|
+
const e = [], o = function(s) {
|
|
403
|
+
(s.root ? s.root.childNodes : s.childNodes).forEach((a) => {
|
|
404
|
+
a.indeterminate && e.push(a.data), o(a);
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
return o(this), e;
|
|
408
|
+
}
|
|
409
|
+
getHalfCheckedKeys() {
|
|
410
|
+
return this.getHalfCheckedNodes().map((e) => (e || {})[this.key]);
|
|
411
|
+
}
|
|
412
|
+
_getAllNodes() {
|
|
413
|
+
const e = [], o = this.nodesMap;
|
|
414
|
+
for (const s in o)
|
|
415
|
+
be(o, s) && e.push(o[s]);
|
|
416
|
+
return e;
|
|
417
|
+
}
|
|
418
|
+
updateChildren(e, o) {
|
|
419
|
+
const s = this.nodesMap[e];
|
|
420
|
+
if (!s)
|
|
421
|
+
return;
|
|
422
|
+
const n = s.childNodes;
|
|
423
|
+
for (let a = n.length - 1; a >= 0; a--) {
|
|
424
|
+
const i = n[a];
|
|
425
|
+
this.remove(i.data);
|
|
426
|
+
}
|
|
427
|
+
for (let a = 0, i = o.length; a < i; a++) {
|
|
428
|
+
const l = o[a];
|
|
429
|
+
this.append(l, s.data);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
_setCheckedKeys(e, o = !1, s) {
|
|
433
|
+
const n = this._getAllNodes().sort((y, N) => y.level - N.level), a = /* @__PURE__ */ Object.create(null), i = Object.keys(s);
|
|
434
|
+
n.forEach((y) => y.setChecked(!1, !1));
|
|
435
|
+
const l = (y) => {
|
|
436
|
+
y.childNodes.forEach((N) => {
|
|
437
|
+
var c;
|
|
438
|
+
a[N.data[e]] = !0, (c = N.childNodes) != null && c.length && l(N);
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
for (let y = 0, N = n.length; y < N; y++) {
|
|
442
|
+
const c = n[y], d = c.data[e].toString();
|
|
443
|
+
if (!i.includes(d)) {
|
|
444
|
+
c.checked && !a[d] && c.setChecked(!1, !1);
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
if (c.childNodes.length && l(c), c.isLeaf || this.checkStrictly) {
|
|
448
|
+
c.setChecked(!0, !1);
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
if (c.setChecked(!0, !0), o) {
|
|
452
|
+
c.setChecked(!1, !1);
|
|
453
|
+
const v = function(k) {
|
|
454
|
+
k.childNodes.forEach((m) => {
|
|
455
|
+
m.isLeaf || m.setChecked(!1, !1), v(m);
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
v(c);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
setCheckedNodes(e, o = !1) {
|
|
463
|
+
const s = this.key, n = {};
|
|
464
|
+
e.forEach((a) => {
|
|
465
|
+
n[(a || {})[s]] = !0;
|
|
466
|
+
}), this._setCheckedKeys(s, o, n);
|
|
467
|
+
}
|
|
468
|
+
setCheckedKeys(e, o = !1) {
|
|
469
|
+
this.defaultCheckedKeys = e;
|
|
470
|
+
const s = this.key, n = {};
|
|
471
|
+
e.forEach((a) => {
|
|
472
|
+
n[a] = !0;
|
|
473
|
+
}), this._setCheckedKeys(s, o, n);
|
|
474
|
+
}
|
|
475
|
+
setDefaultExpandedKeys(e) {
|
|
476
|
+
e = e || [], this.defaultExpandedKeys = e, e.forEach((o) => {
|
|
477
|
+
const s = this.getNode(o);
|
|
478
|
+
s && s.expand(null, this.autoExpandParent);
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
setChecked(e, o, s) {
|
|
482
|
+
const n = this.getNode(e);
|
|
483
|
+
n && n.setChecked(!!o, s);
|
|
484
|
+
}
|
|
485
|
+
getCurrentNode() {
|
|
486
|
+
return this.currentNode;
|
|
487
|
+
}
|
|
488
|
+
setCurrentNode(e) {
|
|
489
|
+
const o = this.currentNode;
|
|
490
|
+
o && (o.isCurrent = !1), this.currentNode = e, this.currentNode.isCurrent = !0;
|
|
491
|
+
}
|
|
492
|
+
setUserCurrentNode(e, o = !0) {
|
|
493
|
+
const s = e[this.key], n = this.nodesMap[s];
|
|
494
|
+
this.setCurrentNode(n), o && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0);
|
|
495
|
+
}
|
|
496
|
+
setCurrentNodeKey(e, o = !0) {
|
|
497
|
+
if (e == null) {
|
|
498
|
+
this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
const s = this.getNode(e);
|
|
502
|
+
s && (this.setCurrentNode(s), o && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
const mt = de({
|
|
506
|
+
name: "ElTreeNodeContent",
|
|
507
|
+
props: {
|
|
508
|
+
node: {
|
|
509
|
+
type: Object,
|
|
510
|
+
required: !0
|
|
511
|
+
},
|
|
512
|
+
renderContent: Function
|
|
513
|
+
},
|
|
514
|
+
setup(t) {
|
|
515
|
+
const e = re("tree"), o = ae("NodeInstance"), s = ae("RootTree");
|
|
516
|
+
return () => {
|
|
517
|
+
const n = t.node, { data: a, store: i } = n;
|
|
518
|
+
return t.renderContent ? t.renderContent(Ke, { _self: o, node: n, data: a, store: i }) : xe(s.ctx.slots, "default", { node: n, data: a }, () => [
|
|
519
|
+
Ke("span", { class: e.be("node", "label") }, [n.label])
|
|
520
|
+
]);
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
var Ct = /* @__PURE__ */ Ne(mt, [["__file", "tree-node-content.vue"]]);
|
|
525
|
+
function Le(t) {
|
|
526
|
+
const e = ae("TreeNodeMap", null), o = {
|
|
527
|
+
treeNodeExpand: (s) => {
|
|
528
|
+
t.node !== s && t.node.collapse();
|
|
529
|
+
},
|
|
530
|
+
children: []
|
|
531
|
+
};
|
|
532
|
+
return e && e.children.push(o), fe("TreeNodeMap", o), {
|
|
533
|
+
broadcastExpanded: (s) => {
|
|
534
|
+
if (t.accordion)
|
|
535
|
+
for (const n of o.children)
|
|
536
|
+
n.treeNodeExpand(s);
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
const $e = Symbol("dragEvents");
|
|
541
|
+
function bt({ props: t, ctx: e, el$: o, dropIndicator$: s, store: n }) {
|
|
542
|
+
const a = re("tree"), i = E({
|
|
543
|
+
showDropIndicator: !1,
|
|
544
|
+
draggingNode: null,
|
|
545
|
+
dropNode: null,
|
|
546
|
+
allowDrop: !0,
|
|
547
|
+
dropType: null
|
|
548
|
+
});
|
|
549
|
+
return fe($e, {
|
|
550
|
+
treeNodeDragStart: ({ event: c, treeNode: d }) => {
|
|
551
|
+
if (typeof t.allowDrag == "function" && !t.allowDrag(d.node))
|
|
552
|
+
return c.preventDefault(), !1;
|
|
553
|
+
c.dataTransfer.effectAllowed = "move";
|
|
554
|
+
try {
|
|
555
|
+
c.dataTransfer.setData("text/plain", "");
|
|
556
|
+
} catch {
|
|
557
|
+
}
|
|
558
|
+
i.value.draggingNode = d, e.emit("node-drag-start", d.node, c);
|
|
559
|
+
},
|
|
560
|
+
treeNodeDragOver: ({ event: c, treeNode: d }) => {
|
|
561
|
+
const f = d, v = i.value.dropNode;
|
|
562
|
+
v && v.node.id !== f.node.id && Ce(v.$el, a.is("drop-inner"));
|
|
563
|
+
const k = i.value.draggingNode;
|
|
564
|
+
if (!k || !f)
|
|
565
|
+
return;
|
|
566
|
+
let b = !0, m = !0, C = !0, L = !0;
|
|
567
|
+
typeof t.allowDrop == "function" && (b = t.allowDrop(k.node, f.node, "prev"), L = m = t.allowDrop(k.node, f.node, "inner"), C = t.allowDrop(k.node, f.node, "next")), c.dataTransfer.dropEffect = m || b || C ? "move" : "none", (b || m || C) && (v == null ? void 0 : v.node.id) !== f.node.id && (v && e.emit("node-drag-leave", k.node, v.node, c), e.emit("node-drag-enter", k.node, f.node, c)), b || m || C ? i.value.dropNode = f : i.value.dropNode = null, f.node.nextSibling === k.node && (C = !1), f.node.previousSibling === k.node && (b = !1), f.node.contains(k.node, !1) && (m = !1), (k.node === f.node || k.node.contains(f.node)) && (b = !1, m = !1, C = !1);
|
|
568
|
+
const j = f.$el.querySelector(`.${a.be("node", "content")}`).getBoundingClientRect(), q = o.value.getBoundingClientRect();
|
|
569
|
+
let T;
|
|
570
|
+
const M = b ? m ? 0.25 : C ? 0.45 : 1 : -1, Q = C ? m ? 0.75 : b ? 0.55 : 0 : 1;
|
|
571
|
+
let P = -9999;
|
|
572
|
+
const p = c.clientY - j.top;
|
|
573
|
+
p < j.height * M ? T = "before" : p > j.height * Q ? T = "after" : m ? T = "inner" : T = "none";
|
|
574
|
+
const D = f.$el.querySelector(`.${a.be("node", "expand-icon")}`).getBoundingClientRect(), K = s.value;
|
|
575
|
+
T === "before" ? P = D.top - q.top : T === "after" && (P = D.bottom - q.top), K.style.top = `${P}px`, K.style.left = `${D.right - q.left}px`, T === "inner" ? Me(f.$el, a.is("drop-inner")) : Ce(f.$el, a.is("drop-inner")), i.value.showDropIndicator = T === "before" || T === "after", i.value.allowDrop = i.value.showDropIndicator || L, i.value.dropType = T, e.emit("node-drag-over", k.node, f.node, c);
|
|
576
|
+
},
|
|
577
|
+
treeNodeDragEnd: (c) => {
|
|
578
|
+
const { draggingNode: d, dropType: f, dropNode: v } = i.value;
|
|
579
|
+
if (c.preventDefault(), c.dataTransfer.dropEffect = "move", d && v) {
|
|
580
|
+
const k = { data: d.node.data };
|
|
581
|
+
f !== "none" && d.node.remove(), f === "before" ? v.node.parent.insertBefore(k, v.node) : f === "after" ? v.node.parent.insertAfter(k, v.node) : f === "inner" && v.node.insertChild(k), f !== "none" && (n.value.registerNode(k), n.value.key && d.node.eachNode((b) => {
|
|
582
|
+
var m;
|
|
583
|
+
(m = n.value.nodesMap[b.data[n.value.key]]) == null || m.setChecked(b.checked, !n.value.checkStrictly);
|
|
584
|
+
})), Ce(v.$el, a.is("drop-inner")), e.emit("node-drag-end", d.node, v.node, f, c), f !== "none" && e.emit("node-drop", d.node, v.node, f, c);
|
|
585
|
+
}
|
|
586
|
+
d && !v && e.emit("node-drag-end", d.node, null, f, c), i.value.showDropIndicator = !1, i.value.draggingNode = null, i.value.dropNode = null, i.value.allowDrop = !0;
|
|
587
|
+
}
|
|
588
|
+
}), {
|
|
589
|
+
dragState: i
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
const _t = de({
|
|
593
|
+
name: "ElTreeNode",
|
|
594
|
+
components: {
|
|
595
|
+
ElCollapseTransition: gt,
|
|
596
|
+
ElCheckbox: Pe,
|
|
597
|
+
NodeContent: Ct,
|
|
598
|
+
ElIcon: He,
|
|
599
|
+
Loading: ht
|
|
600
|
+
},
|
|
601
|
+
props: {
|
|
602
|
+
node: {
|
|
603
|
+
type: oe,
|
|
604
|
+
default: () => ({})
|
|
605
|
+
},
|
|
606
|
+
props: {
|
|
607
|
+
type: Object,
|
|
608
|
+
default: () => ({})
|
|
609
|
+
},
|
|
610
|
+
accordion: Boolean,
|
|
611
|
+
renderContent: Function,
|
|
612
|
+
renderAfterExpand: Boolean,
|
|
613
|
+
showCheckbox: {
|
|
614
|
+
type: Boolean,
|
|
615
|
+
default: !1
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
emits: ["node-expand"],
|
|
619
|
+
setup(t, e) {
|
|
620
|
+
const o = re("tree"), { broadcastExpanded: s } = Le(t), n = ae("RootTree"), a = E(!1), i = E(!1), l = E(null), y = E(null), N = E(null), c = ae($e), d = Be();
|
|
621
|
+
fe("NodeInstance", d), n || ze("Tree", "Can not find node's tree."), t.node.expanded && (a.value = !0, i.value = !0);
|
|
622
|
+
const f = n.props.props.children || "children";
|
|
623
|
+
O(() => {
|
|
624
|
+
const p = t.node.data[f];
|
|
625
|
+
return p && [...p];
|
|
626
|
+
}, () => {
|
|
627
|
+
t.node.updateChildren();
|
|
628
|
+
}), O(() => t.node.indeterminate, (p) => {
|
|
629
|
+
b(t.node.checked, p);
|
|
630
|
+
}), O(() => t.node.checked, (p) => {
|
|
631
|
+
b(p, t.node.indeterminate);
|
|
632
|
+
}), O(() => t.node.childNodes.length, () => t.node.reInitChecked()), O(() => t.node.expanded, (p) => {
|
|
633
|
+
ke(() => a.value = p), p && (i.value = !0);
|
|
634
|
+
});
|
|
635
|
+
const v = (p) => we(n.props.nodeKey, p.data), k = (p) => {
|
|
636
|
+
const D = t.props.class;
|
|
637
|
+
if (!D)
|
|
638
|
+
return {};
|
|
639
|
+
let K;
|
|
640
|
+
if (Fe(D)) {
|
|
641
|
+
const { data: G } = p;
|
|
642
|
+
K = D(G, p);
|
|
643
|
+
} else
|
|
644
|
+
K = D;
|
|
645
|
+
return qe(K) ? { [K]: !0 } : K;
|
|
646
|
+
}, b = (p, D) => {
|
|
647
|
+
(l.value !== p || y.value !== D) && n.ctx.emit("check-change", t.node.data, p, D), l.value = p, y.value = D;
|
|
648
|
+
}, m = (p) => {
|
|
649
|
+
_e(n.store, n.ctx.emit, () => n.store.value.setCurrentNode(t.node)), n.currentNode.value = t.node, n.props.expandOnClickNode && L(), n.props.checkOnClickNode && !t.node.disabled && j(null, {
|
|
650
|
+
target: { checked: !t.node.checked }
|
|
651
|
+
}), n.ctx.emit("node-click", t.node.data, t.node, d, p);
|
|
652
|
+
}, C = (p) => {
|
|
653
|
+
n.instance.vnode.props.onNodeContextmenu && (p.stopPropagation(), p.preventDefault()), n.ctx.emit("node-contextmenu", p, t.node.data, t.node, d);
|
|
654
|
+
}, L = () => {
|
|
655
|
+
t.node.isLeaf || (a.value ? (n.ctx.emit("node-collapse", t.node.data, t.node, d), t.node.collapse()) : (t.node.expand(), e.emit("node-expand", t.node.data, t.node, d)));
|
|
656
|
+
}, j = (p, D) => {
|
|
657
|
+
t.node.setChecked(D.target.checked, !n.props.checkStrictly), ke(() => {
|
|
658
|
+
const K = n.store.value;
|
|
659
|
+
n.ctx.emit("check", t.node.data, {
|
|
660
|
+
checkedNodes: K.getCheckedNodes(),
|
|
661
|
+
checkedKeys: K.getCheckedKeys(),
|
|
662
|
+
halfCheckedNodes: K.getHalfCheckedNodes(),
|
|
663
|
+
halfCheckedKeys: K.getHalfCheckedKeys()
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
};
|
|
667
|
+
return {
|
|
668
|
+
ns: o,
|
|
669
|
+
node$: N,
|
|
670
|
+
tree: n,
|
|
671
|
+
expanded: a,
|
|
672
|
+
childNodeRendered: i,
|
|
673
|
+
oldChecked: l,
|
|
674
|
+
oldIndeterminate: y,
|
|
675
|
+
getNodeKey: v,
|
|
676
|
+
getNodeClass: k,
|
|
677
|
+
handleSelectChange: b,
|
|
678
|
+
handleClick: m,
|
|
679
|
+
handleContextMenu: C,
|
|
680
|
+
handleExpandIconClick: L,
|
|
681
|
+
handleCheckChange: j,
|
|
682
|
+
handleChildNodeExpand: (p, D, K) => {
|
|
683
|
+
s(D), n.ctx.emit("node-expand", p, D, K);
|
|
684
|
+
},
|
|
685
|
+
handleDragStart: (p) => {
|
|
686
|
+
n.props.draggable && c.treeNodeDragStart({ event: p, treeNode: t });
|
|
687
|
+
},
|
|
688
|
+
handleDragOver: (p) => {
|
|
689
|
+
p.preventDefault(), n.props.draggable && c.treeNodeDragOver({
|
|
690
|
+
event: p,
|
|
691
|
+
treeNode: { $el: N.value, node: t.node }
|
|
692
|
+
});
|
|
693
|
+
},
|
|
694
|
+
handleDrop: (p) => {
|
|
695
|
+
p.preventDefault();
|
|
696
|
+
},
|
|
697
|
+
handleDragEnd: (p) => {
|
|
698
|
+
n.props.draggable && c.treeNodeDragEnd(p);
|
|
699
|
+
},
|
|
700
|
+
CaretRight: ft
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
function Et(t, e, o, s, n, a) {
|
|
705
|
+
const i = ne("el-icon"), l = ne("el-checkbox"), y = ne("loading"), N = ne("node-content"), c = ne("el-tree-node"), d = ne("el-collapse-transition");
|
|
706
|
+
return U((w(), $("div", {
|
|
707
|
+
ref: "node$",
|
|
708
|
+
class: z([
|
|
709
|
+
t.ns.b("node"),
|
|
710
|
+
t.ns.is("expanded", t.expanded),
|
|
711
|
+
t.ns.is("current", t.node.isCurrent),
|
|
712
|
+
t.ns.is("hidden", !t.node.visible),
|
|
713
|
+
t.ns.is("focusable", !t.node.disabled),
|
|
714
|
+
t.ns.is("checked", !t.node.disabled && t.node.checked),
|
|
715
|
+
t.getNodeClass(t.node)
|
|
716
|
+
]),
|
|
717
|
+
role: "treeitem",
|
|
718
|
+
tabindex: "-1",
|
|
719
|
+
"aria-expanded": t.expanded,
|
|
720
|
+
"aria-disabled": t.node.disabled,
|
|
721
|
+
"aria-checked": t.node.checked,
|
|
722
|
+
draggable: t.tree.props.draggable,
|
|
723
|
+
"data-key": t.getNodeKey(t.node),
|
|
724
|
+
onClick: te(t.handleClick, ["stop"]),
|
|
725
|
+
onContextmenu: t.handleContextMenu,
|
|
726
|
+
onDragstart: te(t.handleDragStart, ["stop"]),
|
|
727
|
+
onDragover: te(t.handleDragOver, ["stop"]),
|
|
728
|
+
onDragend: te(t.handleDragEnd, ["stop"]),
|
|
729
|
+
onDrop: te(t.handleDrop, ["stop"])
|
|
730
|
+
}, [
|
|
731
|
+
_("div", {
|
|
732
|
+
class: z(t.ns.be("node", "content")),
|
|
733
|
+
style: dt({ paddingLeft: (t.node.level - 1) * t.tree.props.indent + "px" })
|
|
734
|
+
}, [
|
|
735
|
+
t.tree.props.icon || t.CaretRight ? (w(), Y(i, {
|
|
736
|
+
key: 0,
|
|
737
|
+
class: z([
|
|
738
|
+
t.ns.be("node", "expand-icon"),
|
|
739
|
+
t.ns.is("leaf", t.node.isLeaf),
|
|
740
|
+
{
|
|
741
|
+
expanded: !t.node.isLeaf && t.expanded
|
|
742
|
+
}
|
|
743
|
+
]),
|
|
744
|
+
onClick: te(t.handleExpandIconClick, ["stop"])
|
|
745
|
+
}, {
|
|
746
|
+
default: I(() => [
|
|
747
|
+
(w(), Y(it(t.tree.props.icon || t.CaretRight)))
|
|
748
|
+
]),
|
|
749
|
+
_: 1
|
|
750
|
+
}, 8, ["class", "onClick"])) : le("v-if", !0),
|
|
751
|
+
t.showCheckbox ? (w(), Y(l, {
|
|
752
|
+
key: 1,
|
|
753
|
+
"model-value": t.node.checked,
|
|
754
|
+
indeterminate: t.node.indeterminate,
|
|
755
|
+
disabled: !!t.node.disabled,
|
|
756
|
+
onClick: te(() => {
|
|
757
|
+
}, ["stop"]),
|
|
758
|
+
onChange: t.handleCheckChange
|
|
759
|
+
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : le("v-if", !0),
|
|
760
|
+
t.node.loading ? (w(), Y(i, {
|
|
761
|
+
key: 2,
|
|
762
|
+
class: z([t.ns.be("node", "loading-icon"), t.ns.is("loading")])
|
|
763
|
+
}, {
|
|
764
|
+
default: I(() => [
|
|
765
|
+
S(y)
|
|
766
|
+
]),
|
|
767
|
+
_: 1
|
|
768
|
+
}, 8, ["class"])) : le("v-if", !0),
|
|
769
|
+
S(N, {
|
|
770
|
+
node: t.node,
|
|
771
|
+
"render-content": t.renderContent
|
|
772
|
+
}, null, 8, ["node", "render-content"])
|
|
773
|
+
], 6),
|
|
774
|
+
S(d, null, {
|
|
775
|
+
default: I(() => [
|
|
776
|
+
!t.renderAfterExpand || t.childNodeRendered ? U((w(), $("div", {
|
|
777
|
+
key: 0,
|
|
778
|
+
class: z(t.ns.be("node", "children")),
|
|
779
|
+
role: "group",
|
|
780
|
+
"aria-expanded": t.expanded
|
|
781
|
+
}, [
|
|
782
|
+
(w(!0), $(ue, null, he(t.node.childNodes, (f) => (w(), Y(c, {
|
|
783
|
+
key: t.getNodeKey(f),
|
|
784
|
+
"render-content": t.renderContent,
|
|
785
|
+
"render-after-expand": t.renderAfterExpand,
|
|
786
|
+
"show-checkbox": t.showCheckbox,
|
|
787
|
+
node: f,
|
|
788
|
+
accordion: t.accordion,
|
|
789
|
+
props: t.props,
|
|
790
|
+
onNodeExpand: t.handleChildNodeExpand
|
|
791
|
+
}, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))), 128))
|
|
792
|
+
], 10, ["aria-expanded"])), [
|
|
793
|
+
[W, t.expanded]
|
|
794
|
+
]) : le("v-if", !0)
|
|
795
|
+
]),
|
|
796
|
+
_: 1
|
|
797
|
+
})
|
|
798
|
+
], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [
|
|
799
|
+
[W, t.node.visible]
|
|
800
|
+
]);
|
|
801
|
+
}
|
|
802
|
+
var xt = /* @__PURE__ */ Ne(_t, [["render", Et], ["__file", "tree-node.vue"]]);
|
|
803
|
+
function wt({ el$: t }, e) {
|
|
804
|
+
const o = re("tree"), s = Te([]), n = Te([]);
|
|
805
|
+
Ae(() => {
|
|
806
|
+
i();
|
|
807
|
+
}), lt(() => {
|
|
808
|
+
s.value = Array.from(t.value.querySelectorAll("[role=treeitem]")), n.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
|
|
809
|
+
}), O(n, (l) => {
|
|
810
|
+
l.forEach((y) => {
|
|
811
|
+
y.setAttribute("tabindex", "-1");
|
|
812
|
+
});
|
|
813
|
+
}), Re(t, "keydown", (l) => {
|
|
814
|
+
const y = l.target;
|
|
815
|
+
if (!y.className.includes(o.b("node")))
|
|
816
|
+
return;
|
|
817
|
+
const N = l.code;
|
|
818
|
+
s.value = Array.from(t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`));
|
|
819
|
+
const c = s.value.indexOf(y);
|
|
820
|
+
let d;
|
|
821
|
+
if ([Z.up, Z.down].includes(N)) {
|
|
822
|
+
if (l.preventDefault(), N === Z.up) {
|
|
823
|
+
d = c === -1 ? 0 : c !== 0 ? c - 1 : s.value.length - 1;
|
|
824
|
+
const v = d;
|
|
825
|
+
for (; !e.value.getNode(s.value[d].dataset.key).canFocus; ) {
|
|
826
|
+
if (d--, d === v) {
|
|
827
|
+
d = -1;
|
|
828
|
+
break;
|
|
829
|
+
}
|
|
830
|
+
d < 0 && (d = s.value.length - 1);
|
|
831
|
+
}
|
|
832
|
+
} else {
|
|
833
|
+
d = c === -1 ? 0 : c < s.value.length - 1 ? c + 1 : 0;
|
|
834
|
+
const v = d;
|
|
835
|
+
for (; !e.value.getNode(s.value[d].dataset.key).canFocus; ) {
|
|
836
|
+
if (d++, d === v) {
|
|
837
|
+
d = -1;
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
d >= s.value.length && (d = 0);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
d !== -1 && s.value[d].focus();
|
|
844
|
+
}
|
|
845
|
+
[Z.left, Z.right].includes(N) && (l.preventDefault(), y.click());
|
|
846
|
+
const f = y.querySelector('[type="checkbox"]');
|
|
847
|
+
[Z.enter, Z.space].includes(N) && f && (l.preventDefault(), f.click());
|
|
848
|
+
});
|
|
849
|
+
const i = () => {
|
|
850
|
+
var l;
|
|
851
|
+
s.value = Array.from(t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)), n.value = Array.from(t.value.querySelectorAll("input[type=checkbox]"));
|
|
852
|
+
const y = t.value.querySelectorAll(`.${o.is("checked")}[role=treeitem]`);
|
|
853
|
+
if (y.length) {
|
|
854
|
+
y[0].setAttribute("tabindex", "0");
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
(l = s.value[0]) == null || l.setAttribute("tabindex", "0");
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
const Dt = de({
|
|
861
|
+
name: "ElTree",
|
|
862
|
+
components: { ElTreeNode: xt },
|
|
863
|
+
props: {
|
|
864
|
+
data: {
|
|
865
|
+
type: Array,
|
|
866
|
+
default: () => []
|
|
867
|
+
},
|
|
868
|
+
emptyText: {
|
|
869
|
+
type: String
|
|
870
|
+
},
|
|
871
|
+
renderAfterExpand: {
|
|
872
|
+
type: Boolean,
|
|
873
|
+
default: !0
|
|
874
|
+
},
|
|
875
|
+
nodeKey: String,
|
|
876
|
+
checkStrictly: Boolean,
|
|
877
|
+
defaultExpandAll: Boolean,
|
|
878
|
+
expandOnClickNode: {
|
|
879
|
+
type: Boolean,
|
|
880
|
+
default: !0
|
|
881
|
+
},
|
|
882
|
+
checkOnClickNode: Boolean,
|
|
883
|
+
checkDescendants: {
|
|
884
|
+
type: Boolean,
|
|
885
|
+
default: !1
|
|
886
|
+
},
|
|
887
|
+
autoExpandParent: {
|
|
888
|
+
type: Boolean,
|
|
889
|
+
default: !0
|
|
890
|
+
},
|
|
891
|
+
defaultCheckedKeys: Array,
|
|
892
|
+
defaultExpandedKeys: Array,
|
|
893
|
+
currentNodeKey: [String, Number],
|
|
894
|
+
renderContent: Function,
|
|
895
|
+
showCheckbox: {
|
|
896
|
+
type: Boolean,
|
|
897
|
+
default: !1
|
|
898
|
+
},
|
|
899
|
+
draggable: {
|
|
900
|
+
type: Boolean,
|
|
901
|
+
default: !1
|
|
902
|
+
},
|
|
903
|
+
allowDrag: Function,
|
|
904
|
+
allowDrop: Function,
|
|
905
|
+
props: {
|
|
906
|
+
type: Object,
|
|
907
|
+
default: () => ({
|
|
908
|
+
children: "children",
|
|
909
|
+
label: "label",
|
|
910
|
+
disabled: "disabled"
|
|
911
|
+
})
|
|
912
|
+
},
|
|
913
|
+
lazy: {
|
|
914
|
+
type: Boolean,
|
|
915
|
+
default: !1
|
|
916
|
+
},
|
|
917
|
+
highlightCurrent: Boolean,
|
|
918
|
+
load: Function,
|
|
919
|
+
filterNodeMethod: Function,
|
|
920
|
+
accordion: Boolean,
|
|
921
|
+
indent: {
|
|
922
|
+
type: Number,
|
|
923
|
+
default: 18
|
|
924
|
+
},
|
|
925
|
+
icon: {
|
|
926
|
+
type: Ve
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
emits: [
|
|
930
|
+
"check-change",
|
|
931
|
+
"current-change",
|
|
932
|
+
"node-click",
|
|
933
|
+
"node-contextmenu",
|
|
934
|
+
"node-collapse",
|
|
935
|
+
"node-expand",
|
|
936
|
+
"check",
|
|
937
|
+
"node-drag-start",
|
|
938
|
+
"node-drag-end",
|
|
939
|
+
"node-drop",
|
|
940
|
+
"node-drag-leave",
|
|
941
|
+
"node-drag-enter",
|
|
942
|
+
"node-drag-over"
|
|
943
|
+
],
|
|
944
|
+
setup(t, e) {
|
|
945
|
+
const { t: o } = Ue(), s = re("tree"), n = ae(We, null), a = E(new Nt({
|
|
946
|
+
key: t.nodeKey,
|
|
947
|
+
data: t.data,
|
|
948
|
+
lazy: t.lazy,
|
|
949
|
+
props: t.props,
|
|
950
|
+
load: t.load,
|
|
951
|
+
currentNodeKey: t.currentNodeKey,
|
|
952
|
+
checkStrictly: t.checkStrictly,
|
|
953
|
+
checkDescendants: t.checkDescendants,
|
|
954
|
+
defaultCheckedKeys: t.defaultCheckedKeys,
|
|
955
|
+
defaultExpandedKeys: t.defaultExpandedKeys,
|
|
956
|
+
autoExpandParent: t.autoExpandParent,
|
|
957
|
+
defaultExpandAll: t.defaultExpandAll,
|
|
958
|
+
filterNodeMethod: t.filterNodeMethod
|
|
959
|
+
}));
|
|
960
|
+
a.value.initialize();
|
|
961
|
+
const i = E(a.value.root), l = E(null), y = E(null), N = E(null), { broadcastExpanded: c } = Le(t), { dragState: d } = bt({
|
|
962
|
+
props: t,
|
|
963
|
+
ctx: e,
|
|
964
|
+
el$: y,
|
|
965
|
+
dropIndicator$: N,
|
|
966
|
+
store: a
|
|
967
|
+
});
|
|
968
|
+
wt({ el$: y }, a);
|
|
969
|
+
const f = ct(() => {
|
|
970
|
+
const { childNodes: r } = i.value, u = n ? n.hasFilteredOptions !== 0 : !1;
|
|
971
|
+
return (!r || r.length === 0 || r.every(({ visible: A }) => !A)) && !u;
|
|
972
|
+
});
|
|
973
|
+
O(() => t.currentNodeKey, (r) => {
|
|
974
|
+
a.value.setCurrentNodeKey(r);
|
|
975
|
+
}), O(() => t.defaultCheckedKeys, (r) => {
|
|
976
|
+
a.value.setDefaultCheckedKey(r);
|
|
977
|
+
}), O(() => t.defaultExpandedKeys, (r) => {
|
|
978
|
+
a.value.setDefaultExpandedKeys(r);
|
|
979
|
+
}), O(() => t.data, (r) => {
|
|
980
|
+
a.value.setData(r);
|
|
981
|
+
}, { deep: !0 }), O(() => t.checkStrictly, (r) => {
|
|
982
|
+
a.value.checkStrictly = r;
|
|
983
|
+
});
|
|
984
|
+
const v = (r) => {
|
|
985
|
+
if (!t.filterNodeMethod)
|
|
986
|
+
throw new Error("[Tree] filterNodeMethod is required when filter");
|
|
987
|
+
a.value.filter(r);
|
|
988
|
+
}, k = (r) => we(t.nodeKey, r.data), b = (r) => {
|
|
989
|
+
if (!t.nodeKey)
|
|
990
|
+
throw new Error("[Tree] nodeKey is required in getNodePath");
|
|
991
|
+
const u = a.value.getNode(r);
|
|
992
|
+
if (!u)
|
|
993
|
+
return [];
|
|
994
|
+
const A = [u.data];
|
|
995
|
+
let F = u.parent;
|
|
996
|
+
for (; F && F !== i.value; )
|
|
997
|
+
A.push(F.data), F = F.parent;
|
|
998
|
+
return A.reverse();
|
|
999
|
+
}, m = (r, u) => a.value.getCheckedNodes(r, u), C = (r) => a.value.getCheckedKeys(r), L = () => {
|
|
1000
|
+
const r = a.value.getCurrentNode();
|
|
1001
|
+
return r ? r.data : null;
|
|
1002
|
+
}, j = () => {
|
|
1003
|
+
if (!t.nodeKey)
|
|
1004
|
+
throw new Error("[Tree] nodeKey is required in getCurrentKey");
|
|
1005
|
+
const r = L();
|
|
1006
|
+
return r ? r[t.nodeKey] : null;
|
|
1007
|
+
}, q = (r, u) => {
|
|
1008
|
+
if (!t.nodeKey)
|
|
1009
|
+
throw new Error("[Tree] nodeKey is required in setCheckedNodes");
|
|
1010
|
+
a.value.setCheckedNodes(r, u);
|
|
1011
|
+
}, T = (r, u) => {
|
|
1012
|
+
if (!t.nodeKey)
|
|
1013
|
+
throw new Error("[Tree] nodeKey is required in setCheckedKeys");
|
|
1014
|
+
a.value.setCheckedKeys(r, u);
|
|
1015
|
+
}, M = (r, u, A) => {
|
|
1016
|
+
a.value.setChecked(r, u, A);
|
|
1017
|
+
}, Q = () => a.value.getHalfCheckedNodes(), P = () => a.value.getHalfCheckedKeys(), p = (r, u = !0) => {
|
|
1018
|
+
if (!t.nodeKey)
|
|
1019
|
+
throw new Error("[Tree] nodeKey is required in setCurrentNode");
|
|
1020
|
+
_e(a, e.emit, () => {
|
|
1021
|
+
c(r), a.value.setUserCurrentNode(r, u);
|
|
1022
|
+
});
|
|
1023
|
+
}, D = (r, u = !0) => {
|
|
1024
|
+
if (!t.nodeKey)
|
|
1025
|
+
throw new Error("[Tree] nodeKey is required in setCurrentKey");
|
|
1026
|
+
_e(a, e.emit, () => {
|
|
1027
|
+
c(), a.value.setCurrentNodeKey(r, u);
|
|
1028
|
+
});
|
|
1029
|
+
}, K = (r) => a.value.getNode(r), G = (r) => {
|
|
1030
|
+
a.value.remove(r);
|
|
1031
|
+
}, pe = (r, u) => {
|
|
1032
|
+
a.value.append(r, u);
|
|
1033
|
+
}, R = (r, u) => {
|
|
1034
|
+
a.value.insertBefore(r, u);
|
|
1035
|
+
}, V = (r, u) => {
|
|
1036
|
+
a.value.insertAfter(r, u);
|
|
1037
|
+
}, ie = (r, u, A) => {
|
|
1038
|
+
c(u), e.emit("node-expand", r, u, A);
|
|
1039
|
+
}, h = (r, u) => {
|
|
1040
|
+
if (!t.nodeKey)
|
|
1041
|
+
throw new Error("[Tree] nodeKey is required in updateKeyChild");
|
|
1042
|
+
a.value.updateChildren(r, u);
|
|
1043
|
+
};
|
|
1044
|
+
return fe("RootTree", {
|
|
1045
|
+
ctx: e,
|
|
1046
|
+
props: t,
|
|
1047
|
+
store: a,
|
|
1048
|
+
root: i,
|
|
1049
|
+
currentNode: l,
|
|
1050
|
+
instance: Be()
|
|
1051
|
+
}), fe(Ye, void 0), {
|
|
1052
|
+
ns: s,
|
|
1053
|
+
store: a,
|
|
1054
|
+
root: i,
|
|
1055
|
+
currentNode: l,
|
|
1056
|
+
dragState: d,
|
|
1057
|
+
el$: y,
|
|
1058
|
+
dropIndicator$: N,
|
|
1059
|
+
isEmpty: f,
|
|
1060
|
+
filter: v,
|
|
1061
|
+
getNodeKey: k,
|
|
1062
|
+
getNodePath: b,
|
|
1063
|
+
getCheckedNodes: m,
|
|
1064
|
+
getCheckedKeys: C,
|
|
1065
|
+
getCurrentNode: L,
|
|
1066
|
+
getCurrentKey: j,
|
|
1067
|
+
setCheckedNodes: q,
|
|
1068
|
+
setCheckedKeys: T,
|
|
1069
|
+
setChecked: M,
|
|
1070
|
+
getHalfCheckedNodes: Q,
|
|
1071
|
+
getHalfCheckedKeys: P,
|
|
1072
|
+
setCurrentNode: p,
|
|
1073
|
+
setCurrentKey: D,
|
|
1074
|
+
t: o,
|
|
1075
|
+
getNode: K,
|
|
1076
|
+
remove: G,
|
|
1077
|
+
append: pe,
|
|
1078
|
+
insertBefore: R,
|
|
1079
|
+
insertAfter: V,
|
|
1080
|
+
handleNodeExpand: ie,
|
|
1081
|
+
updateKeyChildren: h
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
function Kt(t, e, o, s, n, a) {
|
|
1086
|
+
const i = ne("el-tree-node");
|
|
1087
|
+
return w(), $("div", {
|
|
1088
|
+
ref: "el$",
|
|
1089
|
+
class: z([
|
|
1090
|
+
t.ns.b(),
|
|
1091
|
+
t.ns.is("dragging", !!t.dragState.draggingNode),
|
|
1092
|
+
t.ns.is("drop-not-allow", !t.dragState.allowDrop),
|
|
1093
|
+
t.ns.is("drop-inner", t.dragState.dropType === "inner"),
|
|
1094
|
+
{ [t.ns.m("highlight-current")]: t.highlightCurrent }
|
|
1095
|
+
]),
|
|
1096
|
+
role: "tree"
|
|
1097
|
+
}, [
|
|
1098
|
+
(w(!0), $(ue, null, he(t.root.childNodes, (l) => (w(), Y(i, {
|
|
1099
|
+
key: t.getNodeKey(l),
|
|
1100
|
+
node: l,
|
|
1101
|
+
props: t.props,
|
|
1102
|
+
accordion: t.accordion,
|
|
1103
|
+
"render-after-expand": t.renderAfterExpand,
|
|
1104
|
+
"show-checkbox": t.showCheckbox,
|
|
1105
|
+
"render-content": t.renderContent,
|
|
1106
|
+
onNodeExpand: t.handleNodeExpand
|
|
1107
|
+
}, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))), 128)),
|
|
1108
|
+
t.isEmpty ? (w(), $("div", {
|
|
1109
|
+
key: 0,
|
|
1110
|
+
class: z(t.ns.e("empty-block"))
|
|
1111
|
+
}, [
|
|
1112
|
+
xe(t.$slots, "empty", {}, () => {
|
|
1113
|
+
var l;
|
|
1114
|
+
return [
|
|
1115
|
+
_("span", {
|
|
1116
|
+
class: z(t.ns.e("empty-text"))
|
|
1117
|
+
}, H((l = t.emptyText) != null ? l : t.t("el.tree.emptyText")), 3)
|
|
1118
|
+
];
|
|
1119
|
+
})
|
|
1120
|
+
], 2)) : le("v-if", !0),
|
|
1121
|
+
U(_("div", {
|
|
1122
|
+
ref: "dropIndicator$",
|
|
1123
|
+
class: z(t.ns.e("drop-indicator"))
|
|
1124
|
+
}, null, 2), [
|
|
1125
|
+
[W, t.dragState.showDropIndicator]
|
|
1126
|
+
])
|
|
1127
|
+
], 2);
|
|
1128
|
+
}
|
|
1129
|
+
var Tt = /* @__PURE__ */ Ne(Dt, [["render", Kt], ["__file", "tree.vue"]]);
|
|
1130
|
+
const St = Ie(Tt), It = {
|
|
1131
|
+
key: 0,
|
|
1132
|
+
class: "panel_content"
|
|
1133
|
+
}, Bt = { class: "types" }, At = ["onClick"], Lt = { class: "tree" }, $t = {
|
|
1134
|
+
key: 1,
|
|
1135
|
+
class: "panel_content_null"
|
|
1136
|
+
}, jt = { class: "pc_tree_type_button" }, Ot = ["onClick"], Mt = { class: "pc_tree_content" }, Pt = { class: "tree-search-box" }, Ht = { class: "tree-wrapper" }, zt = ["id"], Ft = { class: "tree-wrapper" }, qt = ["id"], Rt = { class: "tree-wrapper" }, Vt = ["id"], Ut = {
|
|
1137
|
+
key: 2,
|
|
1138
|
+
class: "operate-tree-box"
|
|
1139
|
+
}, Wt = { class: "operate-tree" }, Yt = { class: "tree-title-box" }, Gt = { class: "tree-title" }, Jt = { class: "tree-title-icon" }, Qt = { class: "tree-category-box" }, Xt = { class: "tree-category-list" }, Zt = ["onClick"], en = { class: "tree-search-box" }, tn = { class: "tree-content" }, nn = { class: "tree-wrapper" }, on = ["id"], sn = { class: "tree-wrapper" }, an = ["id"], rn = { class: "tree-wrapper" }, dn = ["id"], ln = /* @__PURE__ */ de({
|
|
1140
|
+
__name: "StructureTree",
|
|
1141
|
+
props: ["componentId"],
|
|
1142
|
+
emits: ["closePanel", "emitHandler"],
|
|
1143
|
+
setup(t, { emit: e }) {
|
|
1144
|
+
const o = Ge(), s = Je(), n = t, a = E(!1), i = E(!1), l = E(), y = E(), N = E(), c = E(), d = E(0), f = E(), v = E(), k = E(), b = E(), m = E();
|
|
1145
|
+
let C;
|
|
1146
|
+
const L = E(""), j = E(""), q = E("");
|
|
1147
|
+
O(
|
|
1148
|
+
() => s.isToolActive(n.componentId),
|
|
1149
|
+
(h) => {
|
|
1150
|
+
if (a.value && h) {
|
|
1151
|
+
if (i.value || G(ve[0]), j.value == q.value || j.value == "")
|
|
1152
|
+
return;
|
|
1153
|
+
K(j.value);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
), O(L, (h) => {
|
|
1157
|
+
var r, u, A;
|
|
1158
|
+
d.value === 0 ? (r = l.value) == null || r.filter(h) : d.value === 1 ? (u = y.value) == null || u.filter(h) : d.value === 2 && ((A = N.value) == null || A.filter(h));
|
|
1159
|
+
});
|
|
1160
|
+
const T = (h, r) => h ? r.title.includes(L.value) : !0, M = {
|
|
1161
|
+
children: "children",
|
|
1162
|
+
label: "title",
|
|
1163
|
+
value: "nodeId"
|
|
1164
|
+
}, Q = e, P = (h) => {
|
|
1165
|
+
Q("emitHandler", h);
|
|
1166
|
+
}, p = E(!1);
|
|
1167
|
+
Ae(() => {
|
|
1168
|
+
ee("userInfo").isInShare && ee("userInfo").isShareClient && (p.value = !0), s.setReadyById(n.componentId);
|
|
1169
|
+
});
|
|
1170
|
+
const D = () => {
|
|
1171
|
+
i.value = !1, C = window.bimViewer;
|
|
1172
|
+
const { eventTrigger: h } = C;
|
|
1173
|
+
h.on("treeAllReady", (r) => {
|
|
1174
|
+
a.value = !0, c.value = r, console.log("初始化结构树数据", c.value), C.SetShowSpaceModeActive(!1);
|
|
1175
|
+
}), ee("isMobile") || h.on("pickedEntity", (r) => {
|
|
1176
|
+
i.value && (j.value = r.id, s.isToolActive(n.componentId) && K(r.id));
|
|
1177
|
+
}), ee("isMobile") && (h.on("touchEntity", (r) => {
|
|
1178
|
+
i.value !== !1 && (j.value = r.id, s.isToolActive(n.componentId) && K(r.id));
|
|
1179
|
+
}), h.on("touchNothing", () => {
|
|
1180
|
+
ke(() => {
|
|
1181
|
+
m.value = "";
|
|
1182
|
+
}), P({
|
|
1183
|
+
isTool: !0,
|
|
1184
|
+
event_target: "StructureTree",
|
|
1185
|
+
event_name: "touchNothing",
|
|
1186
|
+
content: {
|
|
1187
|
+
msg: "pickedNothing"
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
}));
|
|
1191
|
+
};
|
|
1192
|
+
ye.on("BimViewer", D), ut(() => {
|
|
1193
|
+
ye.off("BimViewer", D);
|
|
1194
|
+
});
|
|
1195
|
+
const K = (h) => {
|
|
1196
|
+
let r, u;
|
|
1197
|
+
d.value === 0 ? r = C.objectsExplorer.objectList[h] ? C.objectsExplorer.objectList[h] : null : d.value === 1 ? r = C.classesExplorer.objectList[h] ? C.classesExplorer.objectList[h] : null : d.value === 2 && (r = C.storeysExplorer.objectList[h] ? C.storeysExplorer.objectList[h] : null), r && (m.value = r.nodeId, d.value === 0 ? (l.value.setCurrentKey(r.nodeId, !0), u = document.getElementById(r.nodeId + "0")) : d.value === 1 ? (y.value.setCurrentKey(r.nodeId, !0), u = document.getElementById(r.nodeId + "1")) : d.value === 2 && (N.value.setCurrentKey(r.nodeId, !0), u = document.getElementById(r.nodeId + "2")), setTimeout(() => {
|
|
1198
|
+
u && ke(() => {
|
|
1199
|
+
u.scrollIntoView({ block: "center" });
|
|
1200
|
+
});
|
|
1201
|
+
}, 200), q.value = h, P({
|
|
1202
|
+
isTool: !0,
|
|
1203
|
+
event_target: "StructureTree",
|
|
1204
|
+
event_name: "pickedEntity",
|
|
1205
|
+
content: {
|
|
1206
|
+
entityId: h,
|
|
1207
|
+
viewer_nodeId: r.nodeId
|
|
1208
|
+
}
|
|
1209
|
+
}));
|
|
1210
|
+
}, G = (h) => {
|
|
1211
|
+
if (c.value) {
|
|
1212
|
+
if (h.id == 0) {
|
|
1213
|
+
if (!v.value) {
|
|
1214
|
+
if (v.value = c.value.objectsData ? c.value.objectsData : [], v.value[0]) {
|
|
1215
|
+
v.value[0].title = o("structure.all");
|
|
1216
|
+
const r = v.value.map((u) => u.nodeId);
|
|
1217
|
+
l.value.setCheckedKeys(r);
|
|
1218
|
+
}
|
|
1219
|
+
i.value = !0;
|
|
1220
|
+
}
|
|
1221
|
+
} else if (h.id == 1) {
|
|
1222
|
+
if (!b.value && (k.value = c.value.classesData ? c.value.classesData : [], k.value[0])) {
|
|
1223
|
+
k.value[0].title = o("structure.all");
|
|
1224
|
+
const r = k.value.map((u) => u.nodeId);
|
|
1225
|
+
y.value.setCheckedKeys(r);
|
|
1226
|
+
}
|
|
1227
|
+
} else if (h.id == 2 && !b.value && (b.value = c.value.storeysData ? c.value.storeysData : [], b.value[0])) {
|
|
1228
|
+
b.value[0].title = o("structure.all");
|
|
1229
|
+
const r = b.value.map((u) => u.nodeId);
|
|
1230
|
+
N.value.setCheckedKeys(r);
|
|
1231
|
+
}
|
|
1232
|
+
P({
|
|
1233
|
+
isTool: !0,
|
|
1234
|
+
event_target: "StructureTree",
|
|
1235
|
+
event_name: "changeTreeStructure",
|
|
1236
|
+
content: {
|
|
1237
|
+
item: h
|
|
1238
|
+
}
|
|
1239
|
+
}), d.value !== h.id && (d.value = h.id);
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
let pe = [];
|
|
1243
|
+
const R = (h, r) => {
|
|
1244
|
+
pe.includes(h.nodeId) ? h.checked = !0 : h.checked = !h.checked;
|
|
1245
|
+
const u = C.viewer.scene.objects[h.objectId];
|
|
1246
|
+
u ? C.setEntityVisible(u, h.checked) : A(h, h.checked), F(h, h.checked), P({
|
|
1247
|
+
isTool: !0,
|
|
1248
|
+
event_target: "StructureTree",
|
|
1249
|
+
event_name: "clickTreeBox",
|
|
1250
|
+
content: {
|
|
1251
|
+
active_tree: d.value,
|
|
1252
|
+
nodeId: h.nodeId,
|
|
1253
|
+
status: h.checked
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
function A(B, X) {
|
|
1257
|
+
if (B.checked = X, B.children.length == 0) {
|
|
1258
|
+
const J = C.viewer.scene.objects[B.objectId];
|
|
1259
|
+
J && C.setEntityVisible(J, B.checked);
|
|
1260
|
+
} else
|
|
1261
|
+
for (let J = 0; J < B.children.length; J++)
|
|
1262
|
+
A(B.children[J], X);
|
|
1263
|
+
}
|
|
1264
|
+
function F(B, X) {
|
|
1265
|
+
B.checked = X, B.parent && F(B.parent, X);
|
|
1266
|
+
}
|
|
1267
|
+
pe = r.halfCheckedKeys;
|
|
1268
|
+
}, V = (h, r) => {
|
|
1269
|
+
const u = C.viewer.scene.objects[h.objectId];
|
|
1270
|
+
u && (C.setAllObjectsSelected(!1), C.setEntitySelected(u), C.viewFitEntity(u)), ye.emit("tree_clickNode", u), P({
|
|
1271
|
+
isTool: !0,
|
|
1272
|
+
event_target: "StructureTree",
|
|
1273
|
+
event_name: "clickTreeNode",
|
|
1274
|
+
content: {
|
|
1275
|
+
active_tree: d.value,
|
|
1276
|
+
objectId: h.objectId
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
}, ie = () => {
|
|
1280
|
+
ye.emit("hideToolbar", !1), Q("closePanel");
|
|
1281
|
+
};
|
|
1282
|
+
return (h, r) => {
|
|
1283
|
+
const u = St, A = nt, F = Qe, B = Xe, X = tt, J = Ze;
|
|
1284
|
+
return !x(ee)("isMobile") && x(De).currentTheme == "blue" ? (w(), Y(A, {
|
|
1285
|
+
key: 0,
|
|
1286
|
+
class: "web_tree_container",
|
|
1287
|
+
width: 268,
|
|
1288
|
+
panelTitle: x(o)("structure.title"),
|
|
1289
|
+
"click-handle": ie
|
|
1290
|
+
}, {
|
|
1291
|
+
default: I(() => [
|
|
1292
|
+
i.value ? (w(), $("div", It, [
|
|
1293
|
+
_("div", Bt, [
|
|
1294
|
+
(w(!0), $(ue, null, he(x(ve), (g) => (w(), $("div", {
|
|
1295
|
+
key: g.id,
|
|
1296
|
+
class: z(["types-item", { "types-item-active": d.value === g.id }]),
|
|
1297
|
+
onClick: (me) => G(g)
|
|
1298
|
+
}, H(x(o)(g.name)), 11, At))), 128))
|
|
1299
|
+
]),
|
|
1300
|
+
_("div", Lt, [
|
|
1301
|
+
S(u, {
|
|
1302
|
+
ref: "tree",
|
|
1303
|
+
height: 700,
|
|
1304
|
+
"node-key": "nodeId",
|
|
1305
|
+
data: f.value,
|
|
1306
|
+
"current-node-key": m.value,
|
|
1307
|
+
"highlight-current": !0,
|
|
1308
|
+
props: M,
|
|
1309
|
+
"show-checkbox": "",
|
|
1310
|
+
onCheck: R,
|
|
1311
|
+
onNodeClick: V,
|
|
1312
|
+
"empty-text": x(o)("common.noData")
|
|
1313
|
+
}, null, 8, ["data", "current-node-key", "empty-text"])
|
|
1314
|
+
])
|
|
1315
|
+
])) : (w(), $("div", $t, [
|
|
1316
|
+
_("span", null, H(x(o)("common.loading")), 1)
|
|
1317
|
+
]))
|
|
1318
|
+
]),
|
|
1319
|
+
_: 1
|
|
1320
|
+
}, 8, ["panelTitle"])) : !x(ee)("isMobile") && x(De).currentTheme == "light-gray" ? (w(), Y(X, {
|
|
1321
|
+
key: 1,
|
|
1322
|
+
class: "pc_structure_container",
|
|
1323
|
+
width: 286,
|
|
1324
|
+
panelTitle: x(o)("structure.title"),
|
|
1325
|
+
"click-handle": ie,
|
|
1326
|
+
pos: x(ee)("treePos"),
|
|
1327
|
+
setWidth: ""
|
|
1328
|
+
}, {
|
|
1329
|
+
default: I(() => [
|
|
1330
|
+
_("div", jt, [
|
|
1331
|
+
(w(!0), $(ue, null, he(x(ve), (g) => (w(), $("div", {
|
|
1332
|
+
key: g.id,
|
|
1333
|
+
class: z(["type_button", { type_button_active: d.value === g.id }]),
|
|
1334
|
+
onClick: (me) => G(g)
|
|
1335
|
+
}, H(x(o)(g.name)), 11, Ot))), 128))
|
|
1336
|
+
]),
|
|
1337
|
+
_("div", Mt, [
|
|
1338
|
+
_("div", Pt, [
|
|
1339
|
+
S(F, {
|
|
1340
|
+
modelValue: L.value,
|
|
1341
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => L.value = g),
|
|
1342
|
+
placeholder: x(o)("structure.search"),
|
|
1343
|
+
"prefix-icon": "Search",
|
|
1344
|
+
clearable: ""
|
|
1345
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
1346
|
+
]),
|
|
1347
|
+
U(_("div", Ht, [
|
|
1348
|
+
S(B, null, {
|
|
1349
|
+
default: I(() => [
|
|
1350
|
+
S(u, {
|
|
1351
|
+
ref_key: "tree0",
|
|
1352
|
+
ref: l,
|
|
1353
|
+
"node-key": "nodeId",
|
|
1354
|
+
data: v.value,
|
|
1355
|
+
"current-node-key": m.value,
|
|
1356
|
+
"highlight-current": !0,
|
|
1357
|
+
props: M,
|
|
1358
|
+
"filter-node-method": T,
|
|
1359
|
+
"show-checkbox": "",
|
|
1360
|
+
onCheck: R,
|
|
1361
|
+
onNodeClick: V,
|
|
1362
|
+
"empty-text": x(o)("common.noData")
|
|
1363
|
+
}, {
|
|
1364
|
+
default: I(({ node: g }) => [
|
|
1365
|
+
_("span", {
|
|
1366
|
+
id: g.key + "0",
|
|
1367
|
+
class: "tree_node_text"
|
|
1368
|
+
}, H(g.data.title), 9, zt)
|
|
1369
|
+
]),
|
|
1370
|
+
_: 1
|
|
1371
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1372
|
+
]),
|
|
1373
|
+
_: 1
|
|
1374
|
+
})
|
|
1375
|
+
], 512), [
|
|
1376
|
+
[W, d.value == 0]
|
|
1377
|
+
]),
|
|
1378
|
+
U(_("div", Ft, [
|
|
1379
|
+
S(B, null, {
|
|
1380
|
+
default: I(() => [
|
|
1381
|
+
S(u, {
|
|
1382
|
+
ref_key: "tree1",
|
|
1383
|
+
ref: y,
|
|
1384
|
+
"node-key": "nodeId",
|
|
1385
|
+
data: k.value,
|
|
1386
|
+
"current-node-key": m.value,
|
|
1387
|
+
"highlight-current": !0,
|
|
1388
|
+
props: M,
|
|
1389
|
+
"filter-node-method": T,
|
|
1390
|
+
"show-checkbox": "",
|
|
1391
|
+
onCheck: R,
|
|
1392
|
+
onNodeClick: V,
|
|
1393
|
+
"empty-text": x(o)("common.noData")
|
|
1394
|
+
}, {
|
|
1395
|
+
default: I(({ node: g }) => [
|
|
1396
|
+
_("span", {
|
|
1397
|
+
id: g.key + "1",
|
|
1398
|
+
class: "tree_node_text"
|
|
1399
|
+
}, H(g.data.title), 9, qt)
|
|
1400
|
+
]),
|
|
1401
|
+
_: 1
|
|
1402
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1403
|
+
]),
|
|
1404
|
+
_: 1
|
|
1405
|
+
})
|
|
1406
|
+
], 512), [
|
|
1407
|
+
[W, d.value == 1]
|
|
1408
|
+
]),
|
|
1409
|
+
U(_("div", Rt, [
|
|
1410
|
+
S(B, null, {
|
|
1411
|
+
default: I(() => [
|
|
1412
|
+
S(u, {
|
|
1413
|
+
ref_key: "tree2",
|
|
1414
|
+
ref: N,
|
|
1415
|
+
"node-key": "nodeId",
|
|
1416
|
+
data: b.value,
|
|
1417
|
+
"current-node-key": m.value,
|
|
1418
|
+
"highlight-current": !0,
|
|
1419
|
+
props: M,
|
|
1420
|
+
"filter-node-method": T,
|
|
1421
|
+
"show-checkbox": "",
|
|
1422
|
+
onCheck: R,
|
|
1423
|
+
onNodeClick: V,
|
|
1424
|
+
"empty-text": x(o)("common.noData")
|
|
1425
|
+
}, {
|
|
1426
|
+
default: I(({ node: g }) => [
|
|
1427
|
+
_("span", {
|
|
1428
|
+
id: g.key + "2",
|
|
1429
|
+
class: "tree_node_text"
|
|
1430
|
+
}, H(g.data.title), 9, Vt)
|
|
1431
|
+
]),
|
|
1432
|
+
_: 1
|
|
1433
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1434
|
+
]),
|
|
1435
|
+
_: 1
|
|
1436
|
+
})
|
|
1437
|
+
], 512), [
|
|
1438
|
+
[W, d.value == 2]
|
|
1439
|
+
])
|
|
1440
|
+
])
|
|
1441
|
+
]),
|
|
1442
|
+
_: 1
|
|
1443
|
+
}, 8, ["panelTitle", "pos"])) : (w(), $("div", Ut, [
|
|
1444
|
+
_("div", Wt, [
|
|
1445
|
+
_("div", Yt, [
|
|
1446
|
+
_("div", Gt, H(x(o)("structure.title")), 1),
|
|
1447
|
+
_("div", Jt, [
|
|
1448
|
+
S(J, {
|
|
1449
|
+
class: "close",
|
|
1450
|
+
width: 0.4,
|
|
1451
|
+
"size-type": "rem",
|
|
1452
|
+
"click-handle": ie
|
|
1453
|
+
})
|
|
1454
|
+
])
|
|
1455
|
+
]),
|
|
1456
|
+
_("div", Qt, [
|
|
1457
|
+
S(B, null, {
|
|
1458
|
+
default: I(() => [
|
|
1459
|
+
_("div", Xt, [
|
|
1460
|
+
(w(!0), $(ue, null, he(x(ve), (g, me) => (w(), $("div", {
|
|
1461
|
+
key: me,
|
|
1462
|
+
class: z(["tree-category-item", {
|
|
1463
|
+
"tree-category-item-active": g.id === d.value
|
|
1464
|
+
}]),
|
|
1465
|
+
onClick: (cn) => G(g)
|
|
1466
|
+
}, H(x(o)(g.name)), 11, Zt))), 128))
|
|
1467
|
+
])
|
|
1468
|
+
]),
|
|
1469
|
+
_: 1
|
|
1470
|
+
})
|
|
1471
|
+
]),
|
|
1472
|
+
_("div", en, [
|
|
1473
|
+
S(F, {
|
|
1474
|
+
modelValue: L.value,
|
|
1475
|
+
"onUpdate:modelValue": r[1] || (r[1] = (g) => L.value = g),
|
|
1476
|
+
placeholder: x(o)("structure.search"),
|
|
1477
|
+
"prefix-icon": "Search",
|
|
1478
|
+
clearable: ""
|
|
1479
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
1480
|
+
]),
|
|
1481
|
+
_("div", tn, [
|
|
1482
|
+
U(_("div", nn, [
|
|
1483
|
+
S(B, null, {
|
|
1484
|
+
default: I(() => [
|
|
1485
|
+
S(u, {
|
|
1486
|
+
ref_key: "tree0",
|
|
1487
|
+
ref: l,
|
|
1488
|
+
"node-key": "nodeId",
|
|
1489
|
+
data: v.value,
|
|
1490
|
+
"current-node-key": m.value,
|
|
1491
|
+
"highlight-current": !0,
|
|
1492
|
+
props: M,
|
|
1493
|
+
"filter-node-method": T,
|
|
1494
|
+
"show-checkbox": "",
|
|
1495
|
+
onCheck: R,
|
|
1496
|
+
onNodeClick: V,
|
|
1497
|
+
"empty-text": x(o)("common.noData")
|
|
1498
|
+
}, {
|
|
1499
|
+
default: I(({ node: g }) => [
|
|
1500
|
+
_("span", {
|
|
1501
|
+
id: g.key + "0",
|
|
1502
|
+
class: "tree_node_text"
|
|
1503
|
+
}, H(g.data.title), 9, on)
|
|
1504
|
+
]),
|
|
1505
|
+
_: 1
|
|
1506
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1507
|
+
]),
|
|
1508
|
+
_: 1
|
|
1509
|
+
})
|
|
1510
|
+
], 512), [
|
|
1511
|
+
[W, d.value == 0]
|
|
1512
|
+
]),
|
|
1513
|
+
U(_("div", sn, [
|
|
1514
|
+
S(B, null, {
|
|
1515
|
+
default: I(() => [
|
|
1516
|
+
S(u, {
|
|
1517
|
+
ref_key: "tree1",
|
|
1518
|
+
ref: y,
|
|
1519
|
+
"node-key": "nodeId",
|
|
1520
|
+
data: k.value,
|
|
1521
|
+
"current-node-key": m.value,
|
|
1522
|
+
"highlight-current": !0,
|
|
1523
|
+
props: M,
|
|
1524
|
+
"filter-node-method": T,
|
|
1525
|
+
"show-checkbox": "",
|
|
1526
|
+
onCheck: R,
|
|
1527
|
+
onNodeClick: V,
|
|
1528
|
+
"empty-text": x(o)("common.noData")
|
|
1529
|
+
}, {
|
|
1530
|
+
default: I(({ node: g }) => [
|
|
1531
|
+
_("span", {
|
|
1532
|
+
id: g.key + "1",
|
|
1533
|
+
class: "tree_node_text"
|
|
1534
|
+
}, H(g.data.title), 9, an)
|
|
1535
|
+
]),
|
|
1536
|
+
_: 1
|
|
1537
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1538
|
+
]),
|
|
1539
|
+
_: 1
|
|
1540
|
+
})
|
|
1541
|
+
], 512), [
|
|
1542
|
+
[W, d.value == 1]
|
|
1543
|
+
]),
|
|
1544
|
+
U(_("div", rn, [
|
|
1545
|
+
S(B, null, {
|
|
1546
|
+
default: I(() => [
|
|
1547
|
+
S(u, {
|
|
1548
|
+
ref_key: "tree2",
|
|
1549
|
+
ref: N,
|
|
1550
|
+
"node-key": "nodeId",
|
|
1551
|
+
data: b.value,
|
|
1552
|
+
"current-node-key": m.value,
|
|
1553
|
+
"highlight-current": !0,
|
|
1554
|
+
props: M,
|
|
1555
|
+
"filter-node-method": T,
|
|
1556
|
+
"show-checkbox": "",
|
|
1557
|
+
onCheck: R,
|
|
1558
|
+
onNodeClick: V,
|
|
1559
|
+
"empty-text": x(o)("common.noData")
|
|
1560
|
+
}, {
|
|
1561
|
+
default: I(({ node: g }) => [
|
|
1562
|
+
_("span", {
|
|
1563
|
+
id: g.key + "2",
|
|
1564
|
+
class: "tree_node_text"
|
|
1565
|
+
}, H(g.data.title), 9, dn)
|
|
1566
|
+
]),
|
|
1567
|
+
_: 1
|
|
1568
|
+
}, 8, ["data", "current-node-key", "empty-text"])
|
|
1569
|
+
]),
|
|
1570
|
+
_: 1
|
|
1571
|
+
})
|
|
1572
|
+
], 512), [
|
|
1573
|
+
[W, d.value == 2]
|
|
1574
|
+
])
|
|
1575
|
+
])
|
|
1576
|
+
])
|
|
1577
|
+
]));
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
}), gn = /* @__PURE__ */ et(ln, [["__scopeId", "data-v-d7b4d053"]]);
|
|
1581
|
+
export {
|
|
1582
|
+
gn as default
|
|
1583
|
+
};
|