@das-fed/ui 1.1.4 → 6.3.0-beta.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/global/icons/index.local.js +1 -1
- package/global/style/index.css +1 -1
- package/global/style/scrollbar.css +22 -22
- package/global/theme/index.js +12 -12
- package/global/theme/module/color.js +31 -31
- package/global/theme/module/fontSize.js +5 -5
- package/global/theme/module/scrollbar.js +6 -6
- package/package.json +13 -7
- package/packages/business-components/app-container/index.js +154 -147
- package/packages/business-components/change-enterprises/index.css +1 -0
- package/packages/business-components/change-enterprises/index.js +241 -0
- package/packages/business-components/change-pwd/index.css +1 -0
- package/packages/business-components/change-pwd/index.js +330 -0
- package/packages/business-components/currency-page/index.css +1 -0
- package/packages/business-components/currency-page/index.js +99 -0
- package/packages/business-components/device-panel/index.css +1 -0
- package/packages/business-components/device-panel/index.js +115939 -0
- package/packages/business-components/echarts/index.js +93 -122
- package/packages/business-components/export-button/index.js +73 -66
- package/packages/business-components/import-button/index.js +213 -170
- package/packages/business-components/index.js +8 -1
- package/packages/business-components/layout-breadcrumb/index.js +82 -66
- package/packages/business-components/model-table-dialog/index.js +299 -289
- package/packages/business-components/process-configuration/index.css +1 -0
- package/packages/business-components/process-configuration/index.js +612 -0
- package/packages/business-components/process-form/index.css +1 -0
- package/packages/business-components/process-form/index.js +524 -0
- package/packages/business-components/process-search-form/index.js +73 -315
- package/packages/business-components/process-table/index.css +1 -1
- package/packages/business-components/process-table/index.js +186 -152
- package/packages/business-components/urgent-panel/index.css +1 -0
- package/packages/business-components/urgent-panel/index.js +3914 -0
- package/packages/business-components/user-org-dialog/index.js +466 -375
- package/packages/business-components/video-dialog/index.css +1 -0
- package/packages/business-components/video-dialog/index.js +1041 -0
- package/packages/business.js +1 -2
- package/packages/components/alert/index.js +449 -633
- package/packages/components/audio-video/index.css +1 -1
- package/packages/components/audio-video/index.js +312 -126
- package/packages/components/autocomplete/index.css +1 -1
- package/packages/components/autocomplete/index.js +312 -2923
- package/packages/components/breadcrumb/index.js +97 -82
- package/packages/components/button/index.css +1 -1
- package/packages/components/button/index.js +646 -787
- package/packages/components/calendar/index.css +1 -1
- package/packages/components/calendar/index.js +655 -3879
- package/packages/components/cascader/index.js +209 -203
- package/packages/components/checkbox/index.css +1 -1
- package/packages/components/checkbox/index.js +710 -872
- package/packages/components/collapse-panel/index.css +1 -1
- package/packages/components/collapse-panel/index.js +419 -601
- package/packages/components/collapse-transition/index.js +23 -21
- package/packages/components/collaspe/index.css +1 -1
- package/packages/components/collaspe/index.js +413 -595
- package/packages/components/color-picker/index.css +1 -1
- package/packages/components/color-picker/index.js +176 -133
- package/packages/components/custom-search-item/index.js +43 -37
- package/packages/components/date-picker/index.js +1338 -1459
- package/packages/components/dialog/index.js +441 -241
- package/packages/components/dimple-layout/index.css +1 -1
- package/packages/components/dimple-layout/index.js +1298 -1794
- package/packages/components/drawer/index.js +116 -101
- package/packages/components/dropdown/index.js +129 -109
- package/packages/components/edit-table/index.css +1 -1
- package/packages/components/edit-table/index.js +868 -752
- package/packages/components/empty/index.js +83 -78
- package/packages/components/form/index.js +22 -15
- package/packages/components/form-item/index.css +1 -1
- package/packages/components/form-item/index.js +601 -440
- package/packages/components/icon/index.css +1 -1
- package/packages/components/icon/index.js +38 -22
- package/packages/components/image-preview/index.css +1 -0
- package/packages/components/image-preview/index.js +2714 -0
- package/packages/components/image-upload/index.js +601 -765
- package/packages/components/image-viewer/index.css +1 -1
- package/packages/components/image-viewer/index.js +909 -990
- package/packages/components/index.js +2 -2
- package/packages/components/input/index.css +1 -1
- package/packages/components/input/index.js +284 -256
- package/packages/components/input-dialog-select/index.css +1 -1
- package/packages/components/input-dialog-select/index.js +179 -156
- package/packages/components/input-number/index.css +1 -1
- package/packages/components/input-number/index.js +157 -170
- package/packages/components/live-player/index.css +1 -0
- package/packages/components/live-player/index.js +170 -0
- package/packages/components/loading/index.js +17 -26
- package/packages/components/map/index.css +1 -1
- package/packages/components/map/index.js +18913 -461
- package/packages/components/menu-aside/index.css +1 -1
- package/packages/components/menu-aside/index.js +648 -713
- package/packages/components/menu-header/index.js +446 -629
- package/packages/components/message/index.js +25 -16
- package/packages/components/notification/index.js +386 -575
- package/packages/components/overlay/index.js +112 -103
- package/packages/components/pagination/index.js +260 -330
- package/packages/components/popover/index.js +104 -93
- package/packages/components/popup-mask/index.css +1 -1
- package/packages/components/popup-mask/index.js +77 -72
- package/packages/components/preview/index.js +33 -28
- package/packages/components/progress/index.js +214 -221
- package/packages/components/radio/index.css +1 -1
- package/packages/components/radio/index.js +699 -862
- package/packages/components/radio-tabs/index.js +144 -107
- package/packages/components/rich-editor/index.css +1 -1
- package/packages/components/rich-editor/index.js +105 -106
- package/packages/components/scrollbar/index.css +3 -2
- package/packages/components/scrollbar/index.js +2262 -1201
- package/packages/components/search/index.js +500 -664
- package/packages/components/search-form/index.css +1 -1
- package/packages/components/search-form/index.js +724 -626
- package/packages/components/select/index.css +1 -1
- package/packages/components/select/index.js +1052 -950
- package/packages/components/select-input/index.js +63 -53
- package/packages/components/select-list/index.css +1 -1
- package/packages/components/select-list/index.js +258 -235
- package/packages/components/special-range-picker-month/index.css +1 -1
- package/packages/components/special-range-picker-month/index.js +3068 -72555
- package/packages/components/special-range-picker-year/index.css +1 -1
- package/packages/components/special-range-picker-year/index.js +345 -339
- package/packages/components/spin/index.js +415 -594
- package/packages/components/split-panel/index.css +1 -1
- package/packages/components/split-panel/index.js +146 -127
- package/packages/components/step/index.js +414 -597
- package/packages/components/steps/index.js +407 -590
- package/packages/components/switch/index.js +23 -23
- package/packages/components/table/index.css +1 -1
- package/packages/components/table/index.js +80813 -27734
- package/packages/components/tabs/index.css +1 -1
- package/packages/components/tabs/index.js +620 -813
- package/packages/components/tag/index.js +63 -63
- package/packages/components/text-tooltip/index.css +9 -0
- package/packages/components/text-tooltip/index.js +2739 -33
- package/packages/components/time-line/index.js +464 -643
- package/packages/components/tooltip/index.css +1 -1
- package/packages/components/tooltip/index.js +108 -79
- package/packages/components/tree/index.css +1 -1
- package/packages/components/tree/index.js +840 -809
- package/packages/components/tree-select/index.js +271 -303
- package/packages/components/tree-table/index.js +461 -352
- package/packages/components/upload/index.js +682 -858
- package/packages/components/virtual-tree/index.css +1 -1
- package/packages/components/virtual-tree/index.js +144 -126
- package/packages/index.d.ts +1 -0
- package/packages/index.js +2 -2
- package/style/business.css +11 -4
- package/style/index.css +55 -45
- package/packages/business-components/low-code/index.css +0 -1
- package/packages/business-components/low-code/index.js +0 -60
- package/packages/components/audio-video-player/index.css +0 -1
- package/packages/components/audio-video-player/index.js +0 -83
- package/packages/components/table-column/index.css +0 -1
- package/packages/components/table-column/index.js +0 -82021
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, renderSlot, createCommentVNode, Fragment, renderList, createBlock,
|
|
1
|
+
import { defineComponent, mergeModels, ref, useModel, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, renderSlot, createCommentVNode, Fragment, renderList, createBlock, withCtx, createTextVNode, withDirectives, createVNode, vShow, pushScopeId, popScopeId } from 'vue';
|
|
2
2
|
import { withInstall } from '@das-fed/utils';
|
|
3
3
|
import { setThemeRule } from '@das-fed/web';
|
|
4
|
-
import {
|
|
5
|
-
import { flatTree } from '@das-fed/utils/common-tools';
|
|
4
|
+
import { DasTree, DasVirtualTree, DasCheckbox, vOverlay, DasEmpty, DasSpin } from '@das-fed/ui';
|
|
5
|
+
import { treeFind, flatTree } from '@das-fed/utils/common-tools';
|
|
6
6
|
|
|
7
7
|
const useFirst = (props, emit, treeProps, calcDisabled, calcHidden, parentIdLabel, tableData) => {
|
|
8
8
|
const linkCheck = (id, attr, status, nodes, index) => {
|
|
@@ -11,8 +11,7 @@ const useFirst = (props, emit, treeProps, calcDisabled, calcHidden, parentIdLabe
|
|
|
11
11
|
find = (tree) => {
|
|
12
12
|
if (tree[treeProps.value?.children] && tree[treeProps.value?.children].length) {
|
|
13
13
|
tree[treeProps.value?.children].forEach((item) => {
|
|
14
|
-
if (find)
|
|
15
|
-
find(item);
|
|
14
|
+
if (find) find(item);
|
|
16
15
|
if (item[attr + "-targetId"] == id) {
|
|
17
16
|
if (props.nodeKey) {
|
|
18
17
|
if (!calcDisabled(tree, index) && !calcHidden(tree)) {
|
|
@@ -36,23 +35,21 @@ const useFirst = (props, emit, treeProps, calcDisabled, calcHidden, parentIdLabe
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
|
-
if (find)
|
|
40
|
-
find(item);
|
|
38
|
+
if (find) find(item);
|
|
41
39
|
});
|
|
42
40
|
}
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
if (tableData.value && tableData.value.length) {
|
|
46
44
|
for (let i = 0; i < tableData.value.length; i++) {
|
|
47
|
-
if (find)
|
|
48
|
-
find(tableData.value[i]);
|
|
45
|
+
if (find) find(tableData.value[i]);
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
};
|
|
52
49
|
return { linkCheck };
|
|
53
50
|
};
|
|
54
51
|
|
|
55
|
-
const
|
|
52
|
+
const useTwo = (props, emit, treeProps, calcDisabled, calcHidden, parentIdLabel, tableData) => {
|
|
56
53
|
const linkCheck = (id, attr, status, nodes, index) => {
|
|
57
54
|
let find = null;
|
|
58
55
|
if (status) {
|
|
@@ -61,28 +58,22 @@ const useTwoOrThree = (props, emit, treeProps, calcDisabled, calcHidden, parentI
|
|
|
61
58
|
tree[treeProps.value?.children].forEach((item) => {
|
|
62
59
|
if (tree[attr + "-targetId"] == item[parentIdLabel.value]) {
|
|
63
60
|
if (props.nodeKey) {
|
|
64
|
-
if (!calcDisabled(item, index) && !calcHidden(item))
|
|
65
|
-
nodes[item[props.nodeKey]].data[attr] = true;
|
|
61
|
+
if (!calcDisabled(item, index) && !calcHidden(item)) nodes[item[props.nodeKey]].data[attr] = true;
|
|
66
62
|
nodes[item[props.nodeKey]].data[attr + "-targetId"] = item.id;
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
|
-
if (find)
|
|
70
|
-
find(item);
|
|
65
|
+
if (find) find(item);
|
|
71
66
|
});
|
|
72
67
|
}
|
|
73
68
|
};
|
|
74
69
|
} else {
|
|
75
|
-
if (linkageType === "three")
|
|
76
|
-
return;
|
|
77
70
|
find = (tree) => {
|
|
78
71
|
if (tree[treeProps.value?.children] && tree[treeProps.value?.children].length) {
|
|
79
72
|
tree[treeProps.value?.children].forEach((item) => {
|
|
80
|
-
if (find)
|
|
81
|
-
find(item);
|
|
73
|
+
if (find) find(item);
|
|
82
74
|
if (item[attr + "-targetId"] == id) {
|
|
83
75
|
if (props.nodeKey) {
|
|
84
|
-
if (!calcDisabled(tree, index) && !calcHidden(tree))
|
|
85
|
-
nodes[tree[props.nodeKey]].data[attr] = false;
|
|
76
|
+
if (!calcDisabled(tree, index) && !calcHidden(tree)) nodes[tree[props.nodeKey]].data[attr] = false;
|
|
86
77
|
nodes[tree[props.nodeKey]].data[attr + "-targetId"] = id;
|
|
87
78
|
}
|
|
88
79
|
}
|
|
@@ -92,38 +83,67 @@ const useTwoOrThree = (props, emit, treeProps, calcDisabled, calcHidden, parentI
|
|
|
92
83
|
}
|
|
93
84
|
if (tableData.value && tableData.value.length) {
|
|
94
85
|
for (let i = 0; i < tableData.value.length; i++) {
|
|
95
|
-
if (find)
|
|
96
|
-
find(tableData.value[i]);
|
|
86
|
+
if (find) find(tableData.value[i]);
|
|
97
87
|
}
|
|
98
88
|
}
|
|
99
89
|
};
|
|
100
90
|
return { linkCheck };
|
|
101
91
|
};
|
|
102
92
|
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
93
|
+
const useThree = (props, emit, treeProps, calcDisabled, calcHidden, parentIdLabel, tableData) => {
|
|
94
|
+
const linkCheck = (id, attr, status, nodes, index) => {
|
|
95
|
+
let find = null;
|
|
96
|
+
if (status) {
|
|
97
|
+
find = (tree) => {
|
|
98
|
+
if (tree[treeProps.value?.children] && tree[treeProps.value?.children].length) {
|
|
99
|
+
tree[treeProps.value?.children].forEach((item) => {
|
|
100
|
+
if (tree[attr + "-targetId"] == item[parentIdLabel.value]) {
|
|
101
|
+
if (props.nodeKey) {
|
|
102
|
+
if (!calcDisabled(item, index) && !calcHidden(item)) nodes[item[props.nodeKey]].data[attr] = true;
|
|
103
|
+
nodes[item[props.nodeKey]].data[attr + "-targetId"] = item.id;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (find) find(item);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
} else {
|
|
111
|
+
find = (tree) => {
|
|
112
|
+
if (tree[props.nodeKey] === id) {
|
|
113
|
+
delete nodes[tree[props.nodeKey]].data[attr + "-targetId"];
|
|
114
|
+
} else {
|
|
115
|
+
if (tree[treeProps.value?.children] && tree[treeProps.value?.children].length) {
|
|
116
|
+
tree[treeProps.value?.children].forEach((item) => {
|
|
117
|
+
if (item[props.nodeKey] == id) {
|
|
118
|
+
if (props.nodeKey) delete nodes[item[props.nodeKey]].data[attr + "-targetId"];
|
|
119
|
+
} else {
|
|
120
|
+
if (find) find(item);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (tableData.value && tableData.value.length) {
|
|
128
|
+
const tree = treeFind(tableData.value, (node) => node[props.nodeKey] === id);
|
|
129
|
+
console.log("tree===", tree);
|
|
130
|
+
if (find) find(tree);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
return { linkCheck };
|
|
111
134
|
};
|
|
112
|
-
|
|
113
|
-
const _hoisted_6 = { class: "first-column" };
|
|
114
|
-
const _hoisted_7 = { class: "title" };
|
|
115
|
-
const _hoisted_8 = { class: "tree-node" };
|
|
116
|
-
const _hoisted_9 = { class: "first-column" };
|
|
117
|
-
const _hoisted_10 = { class: "title" };
|
|
135
|
+
|
|
118
136
|
const __default__ = {
|
|
119
137
|
name: "DasTreeTable",
|
|
120
138
|
inheritAttrs: false
|
|
121
139
|
};
|
|
122
140
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
123
141
|
...__default__,
|
|
124
|
-
props: {
|
|
142
|
+
props: /* @__PURE__ */ mergeModels({
|
|
125
143
|
virtual: { type: Boolean, required: false, default: true },
|
|
126
144
|
linkageType: { type: String, required: false, default: "first" },
|
|
145
|
+
keyword: { type: String, required: false },
|
|
146
|
+
loading: { type: Boolean, required: false },
|
|
127
147
|
nodeKey: { type: String, required: false, default: "id" },
|
|
128
148
|
title: { type: String, required: false, default: "" },
|
|
129
149
|
height: { type: [String, Number], required: false },
|
|
@@ -139,38 +159,36 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
139
159
|
props: { type: Object, required: false },
|
|
140
160
|
isView: { type: Boolean, required: false },
|
|
141
161
|
checkNum: { type: Number, required: false },
|
|
142
|
-
twoLinkFirstCheck: { type: Boolean, required: false }
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
twoLinkFirstCheck: { type: Boolean, required: false },
|
|
163
|
+
emptyText: { type: String, required: false, default: "\u6682\u65E0\u6570\u636E" }
|
|
164
|
+
}, {
|
|
165
|
+
"keyword": { type: String, default: "" },
|
|
166
|
+
"keywordModifiers": {}
|
|
167
|
+
}),
|
|
168
|
+
emits: /* @__PURE__ */ mergeModels(["update:data", "update:keyword", "all-check", "item-check"], ["update:keyword"]),
|
|
145
169
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
146
170
|
const props = __props;
|
|
147
171
|
const emit = __emit;
|
|
148
172
|
const dasTreeTableRef = ref();
|
|
173
|
+
const innerKeyword = useModel(__props, "keyword");
|
|
149
174
|
const checkColumnNum = computed(() => props.checkNum ?? props.checkboxLabels?.length ?? 0);
|
|
150
175
|
const containerHeight = computed(() => {
|
|
151
|
-
if (props?.height)
|
|
152
|
-
return props.height + "px";
|
|
176
|
+
if (props?.height) return props.height + "px";
|
|
153
177
|
return "100%";
|
|
154
178
|
});
|
|
155
179
|
const realHeight = computed(() => {
|
|
156
|
-
if (!props?.height)
|
|
157
|
-
return void 0;
|
|
180
|
+
if (!props?.height) return void 0;
|
|
158
181
|
if (typeof props.height === "string") {
|
|
159
|
-
if (props.height.includes("%"))
|
|
160
|
-
|
|
161
|
-
if (props.height.includes("px"))
|
|
162
|
-
return Number(props.height.replace("px", ""));
|
|
182
|
+
if (props.height.includes("%")) return void 0;
|
|
183
|
+
if (props.height.includes("px")) return Number(props.height.replace("px", ""));
|
|
163
184
|
}
|
|
164
185
|
return props.height;
|
|
165
186
|
});
|
|
166
187
|
const treeProps = computed(() => {
|
|
167
188
|
const propsValue = { ...props.props };
|
|
168
|
-
if (propsValue?.disabled)
|
|
169
|
-
|
|
170
|
-
if (propsValue?.
|
|
171
|
-
delete propsValue.hidden;
|
|
172
|
-
if (propsValue?.parentId)
|
|
173
|
-
delete propsValue.parentId;
|
|
189
|
+
if (propsValue?.disabled) delete propsValue.disabled;
|
|
190
|
+
if (propsValue?.hidden) delete propsValue.hidden;
|
|
191
|
+
if (propsValue?.parentId) delete propsValue.parentId;
|
|
174
192
|
return { label: "name", children: "children", disabled: "disabled", isLeaf: "leaf", ...propsValue };
|
|
175
193
|
});
|
|
176
194
|
const parentIdLabel = computed(() => props.props?.parentId ?? "parentId");
|
|
@@ -206,32 +224,25 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
206
224
|
get: () => props.data,
|
|
207
225
|
set: (val) => emit("update:data", val)
|
|
208
226
|
});
|
|
209
|
-
const
|
|
210
|
-
const
|
|
227
|
+
const buildTreeNodesMap = (treeData) => {
|
|
228
|
+
const nodesMap = {};
|
|
211
229
|
if (!Array.isArray(treeData)) {
|
|
212
|
-
return
|
|
230
|
+
return nodesMap;
|
|
213
231
|
}
|
|
214
232
|
treeData.forEach((node) => {
|
|
215
233
|
const nodeObj = { data: node };
|
|
216
|
-
|
|
234
|
+
nodesMap[node.id] = nodeObj;
|
|
217
235
|
if (Array.isArray(node[treeProps.value.children])) {
|
|
218
|
-
Object.assign(
|
|
236
|
+
Object.assign(nodesMap, buildTreeNodesMap(node[treeProps.value.children]));
|
|
219
237
|
}
|
|
220
238
|
});
|
|
221
|
-
return
|
|
239
|
+
return nodesMap;
|
|
222
240
|
};
|
|
223
241
|
const getTreeNodesMap = () => {
|
|
224
|
-
|
|
225
|
-
if (props.virtual) {
|
|
226
|
-
nodesMap = buildFlatTreeObject(tableData.value);
|
|
227
|
-
} else {
|
|
228
|
-
nodesMap = $treeTableBody.value?.treeRef?.store.nodesMap;
|
|
229
|
-
}
|
|
230
|
-
return nodesMap;
|
|
242
|
+
return buildTreeNodesMap(tableData.value);
|
|
231
243
|
};
|
|
232
244
|
const linkAllCheck = (trueNum, falseNum, index) => {
|
|
233
|
-
if (props.allCheckboxDisabled[index])
|
|
234
|
-
return;
|
|
245
|
+
if (props.allCheckboxDisabled[index]) return;
|
|
235
246
|
if (trueNum > 0 && falseNum > 0) {
|
|
236
247
|
allCheck.value[index] = false;
|
|
237
248
|
allIndeterminate.value[index] = true;
|
|
@@ -254,8 +265,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
254
265
|
for (let i = 0; i < checkColumnNum.value; i++) {
|
|
255
266
|
let trueNum = 0, falseNum = 0;
|
|
256
267
|
flagData.forEach((item) => {
|
|
257
|
-
if (calcDisabled(item, i) || calcHidden(item))
|
|
258
|
-
return;
|
|
268
|
+
if (calcDisabled(item, i) || calcHidden(item)) return;
|
|
259
269
|
item[props.checkboxLabels[i]] ? trueNum++ : falseNum++;
|
|
260
270
|
});
|
|
261
271
|
linkAllCheck(trueNum, falseNum, i);
|
|
@@ -270,29 +280,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
270
280
|
parentIdLabel,
|
|
271
281
|
tableData
|
|
272
282
|
);
|
|
273
|
-
const { linkCheck:
|
|
283
|
+
const { linkCheck: linkCheckTwo } = useTwo(props, emit, treeProps, calcDisabled, calcHidden, parentIdLabel, tableData);
|
|
284
|
+
const { linkCheck: linkCheckThree } = useThree(
|
|
274
285
|
props,
|
|
275
286
|
emit,
|
|
276
287
|
treeProps,
|
|
277
288
|
calcDisabled,
|
|
278
289
|
calcHidden,
|
|
279
290
|
parentIdLabel,
|
|
280
|
-
tableData
|
|
281
|
-
props.linkageType
|
|
291
|
+
tableData
|
|
282
292
|
);
|
|
283
293
|
const linkCheck = (id, attr, status, nodes, index) => {
|
|
284
|
-
if (props.linkageType === "custom")
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
294
|
+
if (props.linkageType === "custom") return;
|
|
295
|
+
const fnObj = {
|
|
296
|
+
first: linkCheckFirst,
|
|
297
|
+
two: linkCheckTwo,
|
|
298
|
+
three: linkCheckThree
|
|
299
|
+
};
|
|
300
|
+
return fnObj[props.linkageType](id, attr, status, nodes, index);
|
|
290
301
|
};
|
|
291
302
|
const onAllCheck = (val, index) => {
|
|
292
303
|
emit("all-check", val, index);
|
|
293
304
|
allCheck.value[index] = val;
|
|
294
305
|
allIndeterminate.value[index] = false;
|
|
295
306
|
const nodes = getTreeNodesMap();
|
|
307
|
+
console.log("nodes===", nodes);
|
|
296
308
|
if (nodes) {
|
|
297
309
|
for (let i in nodes) {
|
|
298
310
|
if (!calcDisabled(nodes[i].data, index) && !calcHidden(nodes[i].data)) {
|
|
@@ -304,26 +316,61 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
304
316
|
if (props.twoLinkFirstCheck) {
|
|
305
317
|
if (val) {
|
|
306
318
|
if (index === 1) {
|
|
307
|
-
if (props.allCheckboxDisabled[index - 1])
|
|
308
|
-
return;
|
|
319
|
+
if (props.allCheckboxDisabled[index - 1]) return;
|
|
309
320
|
onAllCheck(val, index - 1);
|
|
310
321
|
}
|
|
311
322
|
} else {
|
|
312
323
|
if (index === 0) {
|
|
313
|
-
if (props.allCheckboxDisabled[index + 1])
|
|
314
|
-
return;
|
|
324
|
+
if (props.allCheckboxDisabled[index + 1]) return;
|
|
315
325
|
onAllCheck(val, index + 1);
|
|
316
326
|
}
|
|
317
327
|
}
|
|
318
328
|
}
|
|
319
329
|
};
|
|
330
|
+
const filterData = computed(() => {
|
|
331
|
+
let result = [];
|
|
332
|
+
if (!tableData.value || !tableData.value.length) return result;
|
|
333
|
+
const child = treeProps.value.children;
|
|
334
|
+
const flatTreeData = flatTree(tableData.value, child);
|
|
335
|
+
result = flatTreeData.filter(
|
|
336
|
+
(item) => item[treeProps.value.label].toLowerCase().includes(innerKeyword.value.toLowerCase())
|
|
337
|
+
);
|
|
338
|
+
return result;
|
|
339
|
+
});
|
|
340
|
+
const isEmpty = computed(() => {
|
|
341
|
+
let result = false;
|
|
342
|
+
if (!tableData.value.length) result = true;
|
|
343
|
+
if (innerKeyword.value && !filterData.value.length) result = true;
|
|
344
|
+
return result;
|
|
345
|
+
});
|
|
346
|
+
const treeNextTick = () => {
|
|
347
|
+
return new Promise((res) => {
|
|
348
|
+
const check = () => {
|
|
349
|
+
if ($treeTableBody.value?.treeRef) return res(true);
|
|
350
|
+
setTimeout(() => check(), 50);
|
|
351
|
+
};
|
|
352
|
+
check();
|
|
353
|
+
});
|
|
354
|
+
};
|
|
355
|
+
const onFilter = async () => {
|
|
356
|
+
await treeNextTick();
|
|
357
|
+
$treeTableBody.value?.treeRef?.filter(innerKeyword.value);
|
|
358
|
+
};
|
|
320
359
|
watch(
|
|
321
360
|
() => tableData.value,
|
|
322
361
|
() => {
|
|
323
362
|
columnLinkAllCheck();
|
|
363
|
+
onFilter();
|
|
324
364
|
},
|
|
325
365
|
{ immediate: true, deep: true }
|
|
326
366
|
);
|
|
367
|
+
watch(
|
|
368
|
+
() => innerKeyword.value,
|
|
369
|
+
() => {
|
|
370
|
+
onFilter();
|
|
371
|
+
},
|
|
372
|
+
{ immediate: true }
|
|
373
|
+
);
|
|
327
374
|
const onCheck = (val, data, index) => {
|
|
328
375
|
emit("item-check", val, data, index);
|
|
329
376
|
const nodes = getTreeNodesMap();
|
|
@@ -335,298 +382,360 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
335
382
|
linkCheck(data[props.nodeKey], attr, val, nodes, index);
|
|
336
383
|
if (props.twoLinkFirstCheck) {
|
|
337
384
|
if (val) {
|
|
338
|
-
if (index === 1 && !calcDisabled(data, index - 1) && !calcHidden(data))
|
|
339
|
-
onCheck(val, data, index - 1);
|
|
385
|
+
if (index === 1 && !calcDisabled(data, index - 1) && !calcHidden(data)) onCheck(val, data, index - 1);
|
|
340
386
|
} else {
|
|
341
|
-
if (index === 0 && !calcDisabled(data, index + 1) && !calcHidden(data))
|
|
342
|
-
onCheck(val, data, index + 1);
|
|
387
|
+
if (index === 0 && !calcDisabled(data, index + 1) && !calcHidden(data)) onCheck(val, data, index + 1);
|
|
343
388
|
}
|
|
344
389
|
}
|
|
345
390
|
};
|
|
346
391
|
__expose({
|
|
347
392
|
$treeTableBody,
|
|
393
|
+
getTreeNodesMap,
|
|
348
394
|
setAllCheck: onAllCheck,
|
|
349
395
|
setCheck: onCheck,
|
|
350
396
|
linkAllCheck
|
|
351
397
|
});
|
|
352
|
-
|
|
353
|
-
return
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
398
|
+
const __returned__ = { props, emit, dasTreeTableRef, innerKeyword, checkColumnNum, containerHeight, realHeight, treeProps, parentIdLabel, disabledLabel, calcDisabled, hiddenLabel, calcHidden, $treeTableBody, allCheck, allIndeterminate, tableData, buildTreeNodesMap, getTreeNodesMap, linkAllCheck, columnLinkAllCheck, linkCheckFirst, linkCheckTwo, linkCheckThree, linkCheck, onAllCheck, filterData, isEmpty, treeNextTick, onFilter, onCheck, get DasTree() {
|
|
399
|
+
return DasTree;
|
|
400
|
+
}, get DasVirtualTree() {
|
|
401
|
+
return DasVirtualTree;
|
|
402
|
+
}, get DasCheckbox() {
|
|
403
|
+
return DasCheckbox;
|
|
404
|
+
}, get vOverlay() {
|
|
405
|
+
return vOverlay;
|
|
406
|
+
}, get DasEmpty() {
|
|
407
|
+
return DasEmpty;
|
|
408
|
+
}, get DasSpin() {
|
|
409
|
+
return DasSpin;
|
|
410
|
+
} };
|
|
411
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
412
|
+
return __returned__;
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
var _export_sfc = (sfc, props) => {
|
|
417
|
+
const target = sfc.__vccOpts || sfc;
|
|
418
|
+
for (const [key, val] of props) {
|
|
419
|
+
target[key] = val;
|
|
420
|
+
}
|
|
421
|
+
return target;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
const _withScopeId = (n) => (pushScopeId("data-v-4823b55d"), n = n(), popScopeId(), n);
|
|
425
|
+
const _hoisted_1 = { class: "table-header" };
|
|
426
|
+
const _hoisted_2 = { class: "title table-label" };
|
|
427
|
+
const _hoisted_3 = {
|
|
428
|
+
key: 0,
|
|
429
|
+
class: "table-label"
|
|
430
|
+
};
|
|
431
|
+
const _hoisted_4 = {
|
|
432
|
+
class: /* @__PURE__ */ normalizeClass(["table-body", "das-tree-box"])
|
|
433
|
+
};
|
|
434
|
+
const _hoisted_5 = { class: "tree-node" };
|
|
435
|
+
const _hoisted_6 = { class: "tree-node" };
|
|
436
|
+
const _hoisted_7 = { class: "first-column" };
|
|
437
|
+
const _hoisted_8 = { class: "title" };
|
|
438
|
+
const _hoisted_9 = { class: "tree-node" };
|
|
439
|
+
const _hoisted_10 = { class: "tree-node" };
|
|
440
|
+
const _hoisted_11 = { class: "first-column" };
|
|
441
|
+
const _hoisted_12 = { class: "title" };
|
|
442
|
+
const _hoisted_13 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
|
|
443
|
+
"div",
|
|
444
|
+
{ style: { "width": "100%", "height": "100%" } },
|
|
445
|
+
null,
|
|
446
|
+
-1
|
|
447
|
+
/* HOISTED */
|
|
448
|
+
));
|
|
449
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
450
|
+
return openBlock(), createElementBlock(
|
|
451
|
+
"div",
|
|
452
|
+
{
|
|
453
|
+
ref: "dasTreeTableRef",
|
|
454
|
+
class: normalizeClass(["das-ui-tree-table", $props.border ? "is-border" : ""]),
|
|
455
|
+
style: normalizeStyle({ height: $setup.containerHeight })
|
|
456
|
+
},
|
|
457
|
+
[
|
|
458
|
+
createElementVNode("div", _hoisted_1, [
|
|
459
|
+
createElementVNode(
|
|
460
|
+
"div",
|
|
461
|
+
_hoisted_2,
|
|
462
|
+
toDisplayString($props.title),
|
|
463
|
+
1
|
|
464
|
+
/* TEXT */
|
|
465
|
+
),
|
|
466
|
+
_ctx.$slots.headerLeft ? renderSlot(_ctx.$slots, "headerLeft", { key: 0 }, void 0, true) : createCommentVNode("v-if", true),
|
|
467
|
+
(openBlock(true), createElementBlock(
|
|
468
|
+
Fragment,
|
|
469
|
+
null,
|
|
470
|
+
renderList($setup.checkColumnNum, (n) => {
|
|
471
|
+
return openBlock(), createElementBlock(
|
|
364
472
|
"div",
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
{
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
"onUpdate:modelValue": ($event) => allCheck.value[n - 1] = $event,
|
|
393
|
-
checkboxType: "default",
|
|
394
|
-
indeterminate: allIndeterminate.value[n - 1],
|
|
395
|
-
disabled: _ctx.allCheckboxDisabled[n - 1] || !tableData.value || !tableData.value.length,
|
|
396
|
-
isView: _ctx.isView,
|
|
397
|
-
onChange: (val) => {
|
|
398
|
-
onAllCheck(val, n - 1);
|
|
399
|
-
}
|
|
400
|
-
}, {
|
|
401
|
-
default: withCtx(() => [
|
|
402
|
-
createTextVNode(
|
|
403
|
-
toDisplayString(_ctx.allCheckboxNames[n - 1] ?? ""),
|
|
404
|
-
1
|
|
405
|
-
/* TEXT */
|
|
406
|
-
)
|
|
407
|
-
]),
|
|
408
|
-
_: 2
|
|
409
|
-
/* DYNAMIC */
|
|
410
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "indeterminate", "disabled", "isView", "onChange"]))
|
|
411
|
-
], true)
|
|
412
|
-
],
|
|
413
|
-
4
|
|
414
|
-
/* STYLE */
|
|
415
|
-
);
|
|
416
|
-
}),
|
|
417
|
-
256
|
|
418
|
-
/* UNKEYED_FRAGMENT */
|
|
419
|
-
)),
|
|
420
|
-
_ctx.$slots.headerRight ? renderSlot(_ctx.$slots, "headerRight", { key: 1 }, void 0, true) : createCommentVNode("v-if", true)
|
|
421
|
-
]),
|
|
422
|
-
createElementVNode("div", _hoisted_4, [
|
|
423
|
-
_ctx.virtual ? (openBlock(), createBlock(unref(DasVirtualTree), {
|
|
424
|
-
key: 0,
|
|
425
|
-
ref_key: "$treeTableBody",
|
|
426
|
-
ref: $treeTableBody,
|
|
427
|
-
nodeKey: _ctx.nodeKey,
|
|
428
|
-
data: tableData.value,
|
|
429
|
-
props: treeProps.value,
|
|
430
|
-
"expand-on-click-node": false,
|
|
431
|
-
"default-expand-all": _ctx.defaultExpandAll,
|
|
432
|
-
overlayZIndex: "auto",
|
|
433
|
-
height: realHeight.value,
|
|
434
|
-
style: { "width": "100%" }
|
|
435
|
-
}, {
|
|
436
|
-
default: withCtx(({ data, node }) => [
|
|
437
|
-
withDirectives((openBlock(), createElementBlock("div", _hoisted_5, [
|
|
438
|
-
createElementVNode("div", _hoisted_6, [
|
|
439
|
-
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", {
|
|
440
|
-
key: 0,
|
|
441
|
-
node,
|
|
442
|
-
data
|
|
443
|
-
}, () => [
|
|
444
|
-
createTextVNode("icon")
|
|
445
|
-
], true) : createCommentVNode("v-if", true),
|
|
446
|
-
renderSlot(_ctx.$slots, "title", {
|
|
447
|
-
node,
|
|
448
|
-
data
|
|
449
|
-
}, () => [
|
|
450
|
-
createElementVNode(
|
|
451
|
-
"span",
|
|
452
|
-
_hoisted_7,
|
|
453
|
-
toDisplayString(data[_ctx.fistLabel]),
|
|
473
|
+
{
|
|
474
|
+
class: "check-item",
|
|
475
|
+
style: normalizeStyle({ width: $props.checkboxWidth[0] })
|
|
476
|
+
},
|
|
477
|
+
[
|
|
478
|
+
renderSlot(_ctx.$slots, $props.checkboxLabels[n - 1] + "Header", {}, () => [
|
|
479
|
+
$props.isView ? (openBlock(), createElementBlock(
|
|
480
|
+
"span",
|
|
481
|
+
_hoisted_3,
|
|
482
|
+
toDisplayString($props.allCheckboxNames[n - 1] ?? ""),
|
|
483
|
+
1
|
|
484
|
+
/* TEXT */
|
|
485
|
+
)) : (openBlock(), createBlock($setup["DasCheckbox"], {
|
|
486
|
+
key: 1,
|
|
487
|
+
modelValue: $setup.allCheck[n - 1],
|
|
488
|
+
"onUpdate:modelValue": ($event) => $setup.allCheck[n - 1] = $event,
|
|
489
|
+
checkboxType: "default",
|
|
490
|
+
indeterminate: $setup.allIndeterminate[n - 1],
|
|
491
|
+
disabled: $props.allCheckboxDisabled[n - 1] || !$setup.tableData || !$setup.tableData.length,
|
|
492
|
+
isView: $props.isView,
|
|
493
|
+
onChange: (val) => {
|
|
494
|
+
$setup.onAllCheck(val, n - 1);
|
|
495
|
+
}
|
|
496
|
+
}, {
|
|
497
|
+
default: withCtx(() => [
|
|
498
|
+
createTextVNode(
|
|
499
|
+
toDisplayString($props.allCheckboxNames[n - 1] ?? ""),
|
|
454
500
|
1
|
|
455
501
|
/* TEXT */
|
|
456
502
|
)
|
|
457
|
-
],
|
|
458
|
-
|
|
459
|
-
|
|
503
|
+
]),
|
|
504
|
+
_: 2
|
|
505
|
+
/* DYNAMIC */
|
|
506
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "indeterminate", "disabled", "isView", "onChange"]))
|
|
507
|
+
], true)
|
|
508
|
+
],
|
|
509
|
+
4
|
|
510
|
+
/* STYLE */
|
|
511
|
+
);
|
|
512
|
+
}),
|
|
513
|
+
256
|
|
514
|
+
/* UNKEYED_FRAGMENT */
|
|
515
|
+
)),
|
|
516
|
+
_ctx.$slots.headerRight ? renderSlot(_ctx.$slots, "headerRight", { key: 1 }, void 0, true) : createCommentVNode("v-if", true)
|
|
517
|
+
]),
|
|
518
|
+
createElementVNode("div", _hoisted_4, [
|
|
519
|
+
$props.virtual ? withDirectives((openBlock(), createBlock($setup["DasVirtualTree"], {
|
|
520
|
+
key: 0,
|
|
521
|
+
ref: "$treeTableBody",
|
|
522
|
+
nodeKey: $props.nodeKey,
|
|
523
|
+
data: $setup.tableData,
|
|
524
|
+
props: $setup.treeProps,
|
|
525
|
+
"expand-on-click-node": false,
|
|
526
|
+
"default-expand-all": $props.defaultExpandAll,
|
|
527
|
+
overlayZIndex: "auto",
|
|
528
|
+
height: $setup.realHeight,
|
|
529
|
+
style: { "width": "100%" }
|
|
530
|
+
}, {
|
|
531
|
+
default: withCtx(({ data, node }) => [
|
|
532
|
+
withDirectives((openBlock(), createElementBlock("div", _hoisted_5, [
|
|
533
|
+
createElementVNode("div", _hoisted_6, [
|
|
534
|
+
createElementVNode("div", _hoisted_7, [
|
|
535
|
+
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", {
|
|
460
536
|
key: 0,
|
|
461
537
|
node,
|
|
462
538
|
data
|
|
463
|
-
},
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
renderList(checkColumnNum.value, (n) => {
|
|
468
|
-
return openBlock(), createElementBlock(
|
|
469
|
-
"div",
|
|
470
|
-
{
|
|
471
|
-
class: "check-item",
|
|
472
|
-
style: normalizeStyle({ width: _ctx.checkboxWidth[n - 1] })
|
|
473
|
-
},
|
|
474
|
-
[
|
|
475
|
-
createVNode(unref(DasCheckbox), {
|
|
476
|
-
modelValue: data[_ctx.checkboxLabels[n - 1]],
|
|
477
|
-
"onUpdate:modelValue": ($event) => data[_ctx.checkboxLabels[n - 1]] = $event,
|
|
478
|
-
checkboxType: "default",
|
|
479
|
-
isView: _ctx.isView,
|
|
480
|
-
disabled: calcDisabled(data, n - 1),
|
|
481
|
-
onChange: (val) => {
|
|
482
|
-
onCheck(val, data, n - 1);
|
|
483
|
-
}
|
|
484
|
-
}, {
|
|
485
|
-
default: withCtx(() => [
|
|
486
|
-
createTextVNode(
|
|
487
|
-
toDisplayString(_ctx.checkboxNames[n - 1] ?? ""),
|
|
488
|
-
1
|
|
489
|
-
/* TEXT */
|
|
490
|
-
)
|
|
491
|
-
]),
|
|
492
|
-
_: 2
|
|
493
|
-
/* DYNAMIC */
|
|
494
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "isView", "disabled", "onChange"])
|
|
495
|
-
],
|
|
496
|
-
4
|
|
497
|
-
/* STYLE */
|
|
498
|
-
);
|
|
499
|
-
}),
|
|
500
|
-
256
|
|
501
|
-
/* UNKEYED_FRAGMENT */
|
|
502
|
-
)) : createCommentVNode("v-if", true),
|
|
503
|
-
_ctx.$slots.bodyRight ? renderSlot(_ctx.$slots, "bodyRight", {
|
|
504
|
-
key: 2,
|
|
539
|
+
}, () => [
|
|
540
|
+
createTextVNode("icon")
|
|
541
|
+
], true) : createCommentVNode("v-if", true),
|
|
542
|
+
renderSlot(_ctx.$slots, "title", {
|
|
505
543
|
node,
|
|
506
544
|
data
|
|
507
|
-
},
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
545
|
+
}, () => [
|
|
546
|
+
createElementVNode(
|
|
547
|
+
"span",
|
|
548
|
+
_hoisted_8,
|
|
549
|
+
toDisplayString(data[$props.fistLabel]),
|
|
550
|
+
1
|
|
551
|
+
/* TEXT */
|
|
552
|
+
)
|
|
553
|
+
], true)
|
|
554
|
+
]),
|
|
555
|
+
_ctx.$slots.bodyLeft ? renderSlot(_ctx.$slots, "bodyLeft", {
|
|
556
|
+
key: 0,
|
|
557
|
+
node,
|
|
558
|
+
data
|
|
559
|
+
}, void 0, true) : createCommentVNode("v-if", true),
|
|
560
|
+
!$setup.calcHidden(data) ? (openBlock(true), createElementBlock(
|
|
561
|
+
Fragment,
|
|
562
|
+
{ key: 1 },
|
|
563
|
+
renderList($setup.checkColumnNum, (n) => {
|
|
564
|
+
return openBlock(), createElementBlock(
|
|
565
|
+
"div",
|
|
566
|
+
{
|
|
567
|
+
class: "check-item",
|
|
568
|
+
style: normalizeStyle({ width: $props.checkboxWidth[n - 1] })
|
|
569
|
+
},
|
|
570
|
+
[
|
|
571
|
+
createVNode($setup["DasCheckbox"], {
|
|
572
|
+
modelValue: data[$props.checkboxLabels[n - 1]],
|
|
573
|
+
"onUpdate:modelValue": ($event) => data[$props.checkboxLabels[n - 1]] = $event,
|
|
574
|
+
checkboxType: "default",
|
|
575
|
+
isView: $props.isView,
|
|
576
|
+
disabled: $setup.calcDisabled(data, n - 1),
|
|
577
|
+
onChange: (val) => {
|
|
578
|
+
$setup.onCheck(val, data, n - 1);
|
|
579
|
+
}
|
|
580
|
+
}, {
|
|
581
|
+
default: withCtx(() => [
|
|
582
|
+
createTextVNode(
|
|
583
|
+
toDisplayString($props.checkboxNames[n - 1] ?? ""),
|
|
584
|
+
1
|
|
585
|
+
/* TEXT */
|
|
586
|
+
)
|
|
587
|
+
]),
|
|
588
|
+
_: 2
|
|
589
|
+
/* DYNAMIC */
|
|
590
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "isView", "disabled", "onChange"])
|
|
591
|
+
],
|
|
592
|
+
4
|
|
593
|
+
/* STYLE */
|
|
594
|
+
);
|
|
595
|
+
}),
|
|
596
|
+
256
|
|
597
|
+
/* UNKEYED_FRAGMENT */
|
|
598
|
+
)) : createCommentVNode("v-if", true),
|
|
599
|
+
_ctx.$slots.bodyRight ? renderSlot(_ctx.$slots, "bodyRight", {
|
|
600
|
+
key: 2,
|
|
601
|
+
node,
|
|
602
|
+
data
|
|
603
|
+
}, void 0, true) : createCommentVNode("v-if", true)
|
|
604
|
+
])
|
|
605
|
+
])), [
|
|
606
|
+
[$setup["vOverlay"], { x: false, "z-index": "auto" }]
|
|
607
|
+
])
|
|
608
|
+
]),
|
|
609
|
+
_: 3
|
|
610
|
+
/* FORWARDED */
|
|
611
|
+
}, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
|
|
612
|
+
[vShow, !$setup.isEmpty && !$props.loading]
|
|
613
|
+
]) : createCommentVNode("v-if", true),
|
|
614
|
+
!$props.virtual ? withDirectives((openBlock(), createBlock($setup["DasTree"], {
|
|
615
|
+
key: 1,
|
|
616
|
+
ref: "$treeTableBody",
|
|
617
|
+
nodeKey: $props.nodeKey,
|
|
618
|
+
data: $setup.tableData,
|
|
619
|
+
props: $setup.treeProps,
|
|
620
|
+
"expand-on-click-node": false,
|
|
621
|
+
"default-expand-all": $props.defaultExpandAll,
|
|
622
|
+
overlayZIndex: "auto",
|
|
623
|
+
height: $setup.realHeight,
|
|
624
|
+
style: { "width": "100%" }
|
|
625
|
+
}, {
|
|
626
|
+
default: withCtx(({ data, node }) => [
|
|
627
|
+
withDirectives((openBlock(), createElementBlock("div", _hoisted_9, [
|
|
628
|
+
createElementVNode("div", _hoisted_10, [
|
|
629
|
+
createElementVNode("div", _hoisted_11, [
|
|
630
|
+
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", {
|
|
554
631
|
key: 0,
|
|
555
632
|
node,
|
|
556
633
|
data
|
|
557
|
-
},
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
renderList(checkColumnNum.value, (n) => {
|
|
562
|
-
return openBlock(), createElementBlock(
|
|
563
|
-
"div",
|
|
564
|
-
{
|
|
565
|
-
class: "check-item",
|
|
566
|
-
style: normalizeStyle({ width: _ctx.checkboxWidth[n - 1] })
|
|
567
|
-
},
|
|
568
|
-
[
|
|
569
|
-
createVNode(unref(DasCheckbox), {
|
|
570
|
-
modelValue: data[_ctx.checkboxLabels[n - 1]],
|
|
571
|
-
"onUpdate:modelValue": ($event) => data[_ctx.checkboxLabels[n - 1]] = $event,
|
|
572
|
-
checkboxType: "default",
|
|
573
|
-
isView: _ctx.isView,
|
|
574
|
-
disabled: calcDisabled(data, n - 1),
|
|
575
|
-
onChange: (val) => {
|
|
576
|
-
onCheck(val, data, n - 1);
|
|
577
|
-
}
|
|
578
|
-
}, {
|
|
579
|
-
default: withCtx(() => [
|
|
580
|
-
createTextVNode(
|
|
581
|
-
toDisplayString(_ctx.checkboxNames[n - 1] ?? ""),
|
|
582
|
-
1
|
|
583
|
-
/* TEXT */
|
|
584
|
-
)
|
|
585
|
-
]),
|
|
586
|
-
_: 2
|
|
587
|
-
/* DYNAMIC */
|
|
588
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "isView", "disabled", "onChange"])
|
|
589
|
-
],
|
|
590
|
-
4
|
|
591
|
-
/* STYLE */
|
|
592
|
-
);
|
|
593
|
-
}),
|
|
594
|
-
256
|
|
595
|
-
/* UNKEYED_FRAGMENT */
|
|
596
|
-
)) : createCommentVNode("v-if", true),
|
|
597
|
-
_ctx.$slots.bodyRight ? renderSlot(_ctx.$slots, "bodyRight", {
|
|
598
|
-
key: 2,
|
|
634
|
+
}, () => [
|
|
635
|
+
createTextVNode("icon")
|
|
636
|
+
], true) : createCommentVNode("v-if", true),
|
|
637
|
+
renderSlot(_ctx.$slots, "title", {
|
|
599
638
|
node,
|
|
600
639
|
data
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
640
|
+
}, () => [
|
|
641
|
+
createElementVNode(
|
|
642
|
+
"span",
|
|
643
|
+
_hoisted_12,
|
|
644
|
+
toDisplayString(data[$props.fistLabel]),
|
|
645
|
+
1
|
|
646
|
+
/* TEXT */
|
|
647
|
+
)
|
|
648
|
+
], true)
|
|
649
|
+
]),
|
|
650
|
+
_ctx.$slots.bodyLeft ? renderSlot(_ctx.$slots, "bodyLeft", {
|
|
651
|
+
key: 0,
|
|
652
|
+
node,
|
|
653
|
+
data
|
|
654
|
+
}, void 0, true) : createCommentVNode("v-if", true),
|
|
655
|
+
!$setup.calcHidden(data) ? (openBlock(true), createElementBlock(
|
|
656
|
+
Fragment,
|
|
657
|
+
{ key: 1 },
|
|
658
|
+
renderList($setup.checkColumnNum, (n) => {
|
|
659
|
+
return openBlock(), createElementBlock(
|
|
660
|
+
"div",
|
|
661
|
+
{
|
|
662
|
+
class: "check-item",
|
|
663
|
+
style: normalizeStyle({ width: $props.checkboxWidth[n - 1] })
|
|
664
|
+
},
|
|
665
|
+
[
|
|
666
|
+
createVNode($setup["DasCheckbox"], {
|
|
667
|
+
modelValue: data[$props.checkboxLabels[n - 1]],
|
|
668
|
+
"onUpdate:modelValue": ($event) => data[$props.checkboxLabels[n - 1]] = $event,
|
|
669
|
+
checkboxType: "default",
|
|
670
|
+
isView: $props.isView,
|
|
671
|
+
disabled: $setup.calcDisabled(data, n - 1),
|
|
672
|
+
onChange: (val) => {
|
|
673
|
+
$setup.onCheck(val, data, n - 1);
|
|
674
|
+
}
|
|
675
|
+
}, {
|
|
676
|
+
default: withCtx(() => [
|
|
677
|
+
createTextVNode(
|
|
678
|
+
toDisplayString($props.checkboxNames[n - 1] ?? ""),
|
|
679
|
+
1
|
|
680
|
+
/* TEXT */
|
|
681
|
+
)
|
|
682
|
+
]),
|
|
683
|
+
_: 2
|
|
684
|
+
/* DYNAMIC */
|
|
685
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "isView", "disabled", "onChange"])
|
|
686
|
+
],
|
|
687
|
+
4
|
|
688
|
+
/* STYLE */
|
|
689
|
+
);
|
|
690
|
+
}),
|
|
691
|
+
256
|
|
692
|
+
/* UNKEYED_FRAGMENT */
|
|
693
|
+
)) : createCommentVNode("v-if", true),
|
|
694
|
+
_ctx.$slots.bodyRight ? renderSlot(_ctx.$slots, "bodyRight", {
|
|
695
|
+
key: 2,
|
|
696
|
+
node,
|
|
697
|
+
data
|
|
698
|
+
}, void 0, true) : createCommentVNode("v-if", true)
|
|
699
|
+
])
|
|
700
|
+
])), [
|
|
701
|
+
[$setup["vOverlay"], { x: false, "z-index": "auto" }]
|
|
702
|
+
])
|
|
703
|
+
]),
|
|
704
|
+
_: 3
|
|
705
|
+
/* FORWARDED */
|
|
706
|
+
}, 8, ["nodeKey", "data", "props", "default-expand-all", "height"])), [
|
|
707
|
+
[vShow, !$setup.isEmpty && !$props.loading]
|
|
708
|
+
]) : createCommentVNode("v-if", true),
|
|
709
|
+
createCommentVNode(" \u7A7A\u72B6\u6001 "),
|
|
710
|
+
withDirectives(createVNode(
|
|
711
|
+
$setup["DasEmpty"],
|
|
712
|
+
null,
|
|
713
|
+
null,
|
|
714
|
+
512
|
|
715
|
+
/* NEED_PATCH */
|
|
716
|
+
), [
|
|
717
|
+
[vShow, $setup.isEmpty && !$props.loading]
|
|
718
|
+
]),
|
|
719
|
+
createCommentVNode(" \u52A0\u8F7D\u72B6\u6001 "),
|
|
720
|
+
withDirectives(createVNode($setup["DasSpin"], {
|
|
721
|
+
size: "small",
|
|
722
|
+
spinning: $props.loading
|
|
723
|
+
}, {
|
|
724
|
+
default: withCtx(() => [
|
|
725
|
+
_hoisted_13
|
|
726
|
+
]),
|
|
727
|
+
_: 1
|
|
728
|
+
/* STABLE */
|
|
729
|
+
}, 8, ["spinning"]), [
|
|
730
|
+
[vShow, $props.loading]
|
|
731
|
+
])
|
|
732
|
+
])
|
|
733
|
+
],
|
|
734
|
+
6
|
|
735
|
+
/* CLASS, STYLE */
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
var TreeTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4823b55d"], ["__file", "/Users/xiecp/das/das-fe/framework/packages/das-ui/packages/components/tree-table/src/App.vue"]]);
|
|
630
739
|
|
|
631
740
|
var theme = {
|
|
632
741
|
"--das-ui-tree-table-highlight-color": "#5582f3",
|