@web-utils/component 3.0.2 → 3.0.3
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/address-input/index.mjs +14 -14
- package/chat/index.mjs +39 -40
- package/chunk-file-uploader/index.mjs +35 -594
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/FormTemp.d079292b.mjs +139 -0
- package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
- package/chunks/detail.d6f8e347.mjs +29 -0
- package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
- package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
- package/chunks/form-input-mixin.78a567bc.mjs +24 -0
- package/chunks/form-item-mixin.57cb2019.mjs +140 -0
- package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
- package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
- package/chunks/input-number-mixin.41a066be.mjs +60 -0
- package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
- package/count-up/index.mjs +17 -14
- package/data-box/index.mjs +18 -19
- package/data-display/index.mjs +17 -18
- package/data-icons/index.mjs +16 -17
- package/data-panel/index.mjs +20 -21
- package/data-pay/index.mjs +15 -16
- package/data-progress/index.mjs +19 -20
- package/data-rotate/index.mjs +35 -36
- package/data-table-picker/index.mjs +23 -25
- package/data-tabs/index.mjs +15 -16
- package/dialog-form/index.mjs +11 -12
- package/dynamic-table/index.mjs +34 -35
- package/easy-popup/index.mjs +56 -29
- package/editable-tree/index.mjs +485 -134
- package/element-dialog/index.mjs +127 -37
- package/empty-view/index.mjs +31 -13
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +40 -105
- package/flow-designer/index.mjs +555 -615
- package/flow-node/index.mjs +47 -15
- package/flow-viewer/index.mjs +78 -167
- package/form-cascader/index.mjs +24 -24
- package/form-checkbox-group/index.mjs +35 -79
- package/form-date-picker/index.mjs +22 -22
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +86 -28
- package/form-input-email/index.mjs +18 -18
- package/form-input-id-card/index.mjs +27 -27
- package/form-input-number/index.mjs +59 -219
- package/form-input-phone-number/index.mjs +27 -27
- package/form-input-tag/index.mjs +38 -160
- package/form-input-time/index.mjs +16 -16
- package/form-item/index.mjs +146 -15
- package/form-item-group/index.mjs +164 -14
- package/form-radio-group/index.mjs +41 -41
- package/form-select/index.mjs +20 -20
- package/form-switch/index.mjs +19 -19
- package/form-textarea/index.mjs +29 -29
- package/form-view/index.mjs +42 -46
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +15 -15
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2824 -210
- package/fy-date/index.mjs +59 -17
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +208 -64
- package/fy-empty/index.mjs +29 -12
- package/fy-form/index.mjs +743 -178
- package/fy-form-design/index.mjs +1013 -1540
- package/fy-input/index.mjs +105 -17
- package/fy-input-color/index.mjs +67 -16
- package/fy-input-icon/index.mjs +119 -23
- package/fy-input-map/index.mjs +14 -15
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +19 -21
- package/fy-input-tree/index.mjs +3 -3
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +50 -16
- package/fy-select/index.mjs +126 -29
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +51 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +23 -25
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/highlight-j-s/index.mjs +29 -19
- package/icon-temp/index.mjs +30 -12
- package/iframe-window/index.mjs +18 -19
- package/image-cropper/index.mjs +22 -23
- package/image-preview/index.mjs +1 -1
- package/input-number/index.mjs +173 -63
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +33 -15
- package/login/index.mjs +1 -1
- package/nav-bar/index.mjs +31 -15
- package/package.json +1 -1
- package/page/index.mjs +20 -12
- package/page-header/index.mjs +34 -13
- package/page-index-top/index.mjs +53 -100
- package/page-skeleton/index.mjs +35 -18
- package/page-skeleton-new/index.mjs +15 -16
- package/pageable-table/index.mjs +228 -86
- package/pageable-view/index.mjs +1 -1
- package/present-view/index.mjs +71 -75
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +29 -21
- package/search/index.mjs +9 -9
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +45 -40
- package/swiper/index.mjs +13 -14
- package/table-view/index.mjs +97 -631
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +63 -63
- package/toolbar/index.mjs +208 -15
- package/toolbar-button/index.mjs +56 -30
- package/verify/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +118 -49
- package/chunks/CountUp.f1a19f35.mjs +0 -124
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
- package/chunks/ElementDialog.d8f3105c.mjs +0 -211
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
- package/chunks/EmptyView.e2430422.mjs +0 -51
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
- package/chunks/FormItem.2920ac0c.mjs +0 -45
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
- package/chunks/FormItemGroup.41daddb6.mjs +0 -64
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
- package/chunks/FyCurd.8acd2983.mjs +0 -548
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
- package/chunks/FyForm.0294e494.mjs +0 -439
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
- package/chunks/IconTemp.42c48e1f.mjs +0 -32
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
- package/chunks/Page.81f4b8d9.mjs +0 -32
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
- package/chunks/PageableTable.333cbdc1.mjs +0 -335
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
- package/chunks/ResizeObserver.60f728f0.mjs +0 -54
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
- package/chunks/TableColumn.8503272e.mjs +0 -106
- package/chunks/Toolbar.5c539dbb.mjs +0 -24
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
package/table-view/index.mjs
CHANGED
|
@@ -1,566 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = Object.getOwnPropertySymbols;
|
|
4
|
-
var K = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var g = (e, t, i) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, h = (e, t) => {
|
|
6
|
-
for (var i in t || (t = {}))
|
|
7
|
-
K.call(t, i) && g(e, i, t[i]);
|
|
8
|
-
if (_)
|
|
9
|
-
for (var i of _(t))
|
|
10
|
-
R.call(t, i) && g(e, i, t[i]);
|
|
11
|
-
return e;
|
|
12
|
-
}, c = (e, t) => L(e, A(t));
|
|
13
|
-
var r = (e, t, i) => new Promise((s, o) => {
|
|
14
|
-
var a = (d) => {
|
|
1
|
+
var a = (e, r, t) => new Promise((s, l) => {
|
|
2
|
+
var i = (o) => {
|
|
15
3
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
4
|
+
c(t.next(o));
|
|
5
|
+
} catch (h) {
|
|
6
|
+
l(h);
|
|
19
7
|
}
|
|
20
|
-
},
|
|
8
|
+
}, m = (o) => {
|
|
21
9
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
10
|
+
c(t.throw(o));
|
|
11
|
+
} catch (h) {
|
|
12
|
+
l(h);
|
|
25
13
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
14
|
+
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(i, m);
|
|
15
|
+
c((t = t.apply(e, r)).next());
|
|
28
16
|
});
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
import { _ as te } from "../chunks/Toolbar.5c539dbb.mjs";
|
|
41
|
-
const ie = {
|
|
42
|
-
name: "FormItemConfigProvider",
|
|
43
|
-
provide() {
|
|
44
|
-
return {
|
|
45
|
-
formItemConfig: this.config
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
props: {
|
|
49
|
-
block: Boolean,
|
|
50
|
-
wrapCol: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: !0
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
config: {
|
|
58
|
-
block: !1,
|
|
59
|
-
wrapCol: !0
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
},
|
|
63
|
-
watch: {
|
|
64
|
-
block: {
|
|
65
|
-
immediate: !0,
|
|
66
|
-
handler(e) {
|
|
67
|
-
this.config.block = e;
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
wrapCol: {
|
|
71
|
-
immediate: !0,
|
|
72
|
-
handler(e) {
|
|
73
|
-
this.config.wrapCol = e;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
render() {
|
|
78
|
-
return this.$scopedSlots.default();
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
let se, re;
|
|
82
|
-
const k = {};
|
|
83
|
-
var oe = /* @__PURE__ */ $(
|
|
84
|
-
ie,
|
|
85
|
-
se,
|
|
86
|
-
re,
|
|
87
|
-
!1,
|
|
88
|
-
ae,
|
|
89
|
-
null,
|
|
90
|
-
null,
|
|
91
|
-
null
|
|
92
|
-
);
|
|
93
|
-
function ae(e) {
|
|
94
|
-
for (let t in k)
|
|
95
|
-
this[t] = k[t];
|
|
96
|
-
}
|
|
97
|
-
const ne = /* @__PURE__ */ function() {
|
|
98
|
-
return oe.exports;
|
|
99
|
-
}(), le = {
|
|
100
|
-
name: "EditableTree",
|
|
101
|
-
props: {
|
|
102
|
-
label: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: "书签"
|
|
105
|
-
},
|
|
106
|
-
addRootNodeLabel: {
|
|
107
|
-
type: String
|
|
108
|
-
},
|
|
109
|
-
defaultExpandedKeys: {
|
|
110
|
-
type: Array,
|
|
111
|
-
default: () => []
|
|
112
|
-
},
|
|
113
|
-
newNodeBuilder: {
|
|
114
|
-
type: Function,
|
|
115
|
-
default: (e, t) => ({
|
|
116
|
-
name: e,
|
|
117
|
-
parentId: t.id
|
|
118
|
-
})
|
|
119
|
-
},
|
|
120
|
-
contextMenu: Boolean,
|
|
121
|
-
lazy: {
|
|
122
|
-
type: Boolean,
|
|
123
|
-
default: !0
|
|
124
|
-
},
|
|
125
|
-
expandFirstNode: {
|
|
126
|
-
type: Boolean,
|
|
127
|
-
default: !0
|
|
128
|
-
},
|
|
129
|
-
readonly: Boolean,
|
|
130
|
-
saveApi: {
|
|
131
|
-
type: Function
|
|
132
|
-
},
|
|
133
|
-
updateApi: {
|
|
134
|
-
type: Function
|
|
135
|
-
},
|
|
136
|
-
deleteApi: {
|
|
137
|
-
type: Function
|
|
138
|
-
},
|
|
139
|
-
fetchApi: {
|
|
140
|
-
type: Function
|
|
141
|
-
},
|
|
142
|
-
customRootNode: {
|
|
143
|
-
type: {
|
|
144
|
-
type: Object,
|
|
145
|
-
default: void 0
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
rootNode: {
|
|
149
|
-
type: Object
|
|
150
|
-
},
|
|
151
|
-
contextMenuIcon: Boolean,
|
|
152
|
-
contextMenuInline: Boolean,
|
|
153
|
-
treeProps: {
|
|
154
|
-
type: Object,
|
|
155
|
-
default: () => ({
|
|
156
|
-
children: "children",
|
|
157
|
-
label: "name",
|
|
158
|
-
isLeaf: (e) => p(e, "hasChildren") ? !e.hasChildren : p(e, "hasChild") ? !e.hasChild : p(e, "children") && e.children ? e.children.length === 0 : !0
|
|
159
|
-
})
|
|
160
|
-
},
|
|
161
|
-
menuLabel: {
|
|
162
|
-
type: Object,
|
|
163
|
-
default: () => ({
|
|
164
|
-
appendPeer: "添加同级节点",
|
|
165
|
-
appendChild: "添加",
|
|
166
|
-
removeNode: "删除",
|
|
167
|
-
editNode: "修改"
|
|
168
|
-
})
|
|
169
|
-
},
|
|
170
|
-
icon: {
|
|
171
|
-
type: [Function, Boolean],
|
|
172
|
-
default: () => "el-icon-collection-tag"
|
|
173
|
-
},
|
|
174
|
-
confirmButton: {
|
|
175
|
-
type: Boolean,
|
|
176
|
-
default: !0
|
|
177
|
-
},
|
|
178
|
-
addRootNodeButtonStyle: {
|
|
179
|
-
type: String,
|
|
180
|
-
default: "top"
|
|
181
|
-
},
|
|
182
|
-
reserveExpandKey: Boolean,
|
|
183
|
-
nodeKey: {
|
|
184
|
-
type: String,
|
|
185
|
-
default: "id"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
data() {
|
|
189
|
-
return {
|
|
190
|
-
loading: !1,
|
|
191
|
-
showMenu: !1,
|
|
192
|
-
empty: !0,
|
|
193
|
-
expandedKeys: this.lazy ? [] : this.defaultExpandedKeys,
|
|
194
|
-
treeData: [],
|
|
195
|
-
curNode: {},
|
|
196
|
-
curData: {},
|
|
197
|
-
position: {},
|
|
198
|
-
text: "",
|
|
199
|
-
right: 4,
|
|
200
|
-
treeKey: Date.now()
|
|
201
|
-
};
|
|
202
|
-
},
|
|
203
|
-
computed: {
|
|
204
|
-
defaultOptions() {
|
|
205
|
-
return {
|
|
206
|
-
confirmButtonText: "确定",
|
|
207
|
-
cancelButtonText: "取消",
|
|
208
|
-
closeOnClickModal: !1,
|
|
209
|
-
modal: !0,
|
|
210
|
-
inputErrorMessage: `${this.label}名不能为空!`,
|
|
211
|
-
inputPlaceholder: `请输入${this.label}名...`,
|
|
212
|
-
inputValidator: (e) => e != null && e.trim().length > 0
|
|
213
|
-
};
|
|
214
|
-
},
|
|
215
|
-
innerTreeData() {
|
|
216
|
-
var e;
|
|
217
|
-
return (e = this.$attrs.data) != null && e.length ? this.$attrs.data : this.treeData;
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
watch: {
|
|
221
|
-
defaultExpandedKeys: {
|
|
222
|
-
immediate: !0,
|
|
223
|
-
handler(e) {
|
|
224
|
-
this.expandedKeys = [...e];
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
created() {
|
|
229
|
-
this.tryFetch();
|
|
230
|
-
},
|
|
231
|
-
mounted() {
|
|
232
|
-
T(this.$refs.tree.$el, this.resize), T(this.$refs.treeWrapper, this.resize);
|
|
233
|
-
},
|
|
234
|
-
beforeDestroy() {
|
|
235
|
-
P(this.$refs.tree.$el, this.resize), P(this.$refs.treeWrapper, this.resize);
|
|
236
|
-
},
|
|
237
|
-
methods: {
|
|
238
|
-
filterTreeProperties: q,
|
|
239
|
-
filterTreeEvents: H,
|
|
240
|
-
addExpandKey(e) {
|
|
241
|
-
this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
|
|
242
|
-
},
|
|
243
|
-
removeExpandKey(e) {
|
|
244
|
-
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
|
|
245
|
-
},
|
|
246
|
-
resize() {
|
|
247
|
-
D(this.$refs.treeWrapper) ? this.right = 4 + I : this.right = 4;
|
|
248
|
-
},
|
|
249
|
-
showContextMenu(e, t, i) {
|
|
250
|
-
return r(this, null, function* () {
|
|
251
|
-
t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), yield this.$nextTick(), this.position = V(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
252
|
-
});
|
|
253
|
-
},
|
|
254
|
-
hideContextMenu() {
|
|
255
|
-
this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
|
|
256
|
-
},
|
|
257
|
-
tryFetch() {
|
|
258
|
-
return r(this, null, function* () {
|
|
259
|
-
var e, t;
|
|
260
|
-
if (this.lazy === !1 && this.fetchApi) {
|
|
261
|
-
const i = yield this.fetchApi((t = (e = this.rootNode) == null ? void 0 : e.id) != null ? t : -1, {});
|
|
262
|
-
if (u(i.data) && (i.data = [i.data]), i.data = i.data || [], this.empty = i.data.length === 0, u(this.customRootNode)) {
|
|
263
|
-
const s = C(this.customRootNode);
|
|
264
|
-
s[this.treeProps.children || "children"] = i.data, this.treeData = [s];
|
|
265
|
-
} else if (w(this.customRootNode)) {
|
|
266
|
-
const s = this.customRootNode(i.data);
|
|
267
|
-
s[this.treeProps.children || "children"] = i.data, this.treeData = u(s) ? [s] : s;
|
|
268
|
-
} else
|
|
269
|
-
this.treeData = i.data;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
},
|
|
273
|
-
loadNode(e, t) {
|
|
274
|
-
return r(this, null, function* () {
|
|
275
|
-
var i, s, o, a;
|
|
276
|
-
if (e.level === 0) {
|
|
277
|
-
const n = yield this.fetchApi((s = (i = this.rootNode) == null ? void 0 : i.id) != null ? s : -1, e);
|
|
278
|
-
if (this.empty = n.data.length === 0, u(this.customRootNode)) {
|
|
279
|
-
const l = C(this.customRootNode);
|
|
280
|
-
l[this.treeProps.children || "children"] = n.data, t([l]);
|
|
281
|
-
} else if (w(this.customRootNode)) {
|
|
282
|
-
const l = this.customRootNode(n.data);
|
|
283
|
-
l[this.treeProps.children || "children"] = n.data, this.treeData = u(l) ? [l] : l;
|
|
284
|
-
} else
|
|
285
|
-
t(n.data);
|
|
286
|
-
yield this.$nextTick(), this.$emit("root-node-loaded", n.data), this.defaultExpandedKeys ? this.expandedKeys = [(o = n == null ? void 0 : n.data[0]) == null ? void 0 : o.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(a = n == null ? void 0 : n.data[0]) == null ? void 0 : a.id]);
|
|
287
|
-
} else {
|
|
288
|
-
if (e.leaf || e.data.isTempNode)
|
|
289
|
-
return t([]);
|
|
290
|
-
const n = yield this.fetchApi(e.data.id, e);
|
|
291
|
-
t(n.data), yield this.$nextTick(), this.$emit("node-loaded", n.data);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
},
|
|
295
|
-
clear() {
|
|
296
|
-
this.cancelEdit(), this.removeNewNode();
|
|
297
|
-
},
|
|
298
|
-
clearChecked() {
|
|
299
|
-
this.$refs.tree.setCheckedKeys([]);
|
|
300
|
-
},
|
|
301
|
-
removeNewNode() {
|
|
302
|
-
this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
|
|
303
|
-
},
|
|
304
|
-
cancelEdit() {
|
|
305
|
-
this.editData && (m(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
|
|
306
|
-
},
|
|
307
|
-
editNode(e, t) {
|
|
308
|
-
return r(this, null, function* () {
|
|
309
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], m(t.edit) ? this.$set(t, "edit", !0) : t.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, c(h({}, this.defaultOptions), {
|
|
310
|
-
inputValue: t[this.treeProps.label],
|
|
311
|
-
beforeClose: (i, s, o) => r(this, null, function* () {
|
|
312
|
-
if (i === "confirm") {
|
|
313
|
-
try {
|
|
314
|
-
s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), o();
|
|
315
|
-
} catch (a) {
|
|
316
|
-
s.confirmButtonText = "确定";
|
|
317
|
-
}
|
|
318
|
-
s.confirmButtonLoading = !1;
|
|
319
|
-
} else
|
|
320
|
-
o();
|
|
321
|
-
})
|
|
322
|
-
})).catch((i) => i);
|
|
323
|
-
});
|
|
324
|
-
},
|
|
325
|
-
appendRootNode() {
|
|
326
|
-
return r(this, null, function* () {
|
|
327
|
-
this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.scrollIntoView(!0)) : yield this.$prompt(`请输入${this.label}名:`, c(h({}, this.defaultOptions), {
|
|
328
|
-
beforeClose: (e, t, i) => r(this, null, function* () {
|
|
329
|
-
if (e === "confirm") {
|
|
330
|
-
try {
|
|
331
|
-
this.createNewChild(-1), t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...";
|
|
332
|
-
const s = yield this.saveApi(this.newNodeBuilder(t.inputValue, { id: -1 }));
|
|
333
|
-
this.newChild[this.treeProps.label] = t.inputValue, this.newChild.edit = !1, y(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), i();
|
|
334
|
-
} catch (s) {
|
|
335
|
-
t.confirmButtonText = "确定";
|
|
336
|
-
}
|
|
337
|
-
t.confirmButtonLoading = !1;
|
|
338
|
-
} else
|
|
339
|
-
i();
|
|
340
|
-
})
|
|
341
|
-
})).catch((e) => e);
|
|
342
|
-
});
|
|
343
|
-
},
|
|
344
|
-
appendChildNode(e) {
|
|
345
|
-
this.text = "";
|
|
346
|
-
const t = e.expanded;
|
|
347
|
-
e.expand(() => r(this, null, function* () {
|
|
348
|
-
!this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(t)) : yield this.$prompt(`请输入${this.label}名:`, c(h({}, this.defaultOptions), {
|
|
349
|
-
beforeClose: (i, s, o) => r(this, null, function* () {
|
|
350
|
-
if (i === "confirm") {
|
|
351
|
-
try {
|
|
352
|
-
this.createNewChild(e.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
|
|
353
|
-
const a = yield this.saveApi(this.newNodeBuilder(s.inputValue, e.data));
|
|
354
|
-
this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, y(this.newChild, a.data), this.$refs.tree.append(this.newChild, e), yield this.locateView(), o();
|
|
355
|
-
} catch (a) {
|
|
356
|
-
s.confirmButtonText = "确定";
|
|
357
|
-
}
|
|
358
|
-
s.confirmButtonLoading = !1;
|
|
359
|
-
} else
|
|
360
|
-
o();
|
|
361
|
-
})
|
|
362
|
-
})).catch((i) => i);
|
|
363
|
-
}));
|
|
364
|
-
},
|
|
365
|
-
appendChildNodeWithData(e, t, i) {
|
|
366
|
-
this.text = "";
|
|
367
|
-
const s = e.expanded;
|
|
368
|
-
e.expand(() => r(this, null, function* () {
|
|
369
|
-
this.clear(), this.newChild = {
|
|
370
|
-
id: -1,
|
|
371
|
-
parentId: t,
|
|
372
|
-
[this.treeProps.label]: i,
|
|
373
|
-
edit: !1,
|
|
374
|
-
isTempNode: !0,
|
|
375
|
-
hasChildren: !1
|
|
376
|
-
}, this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(s);
|
|
377
|
-
}));
|
|
378
|
-
},
|
|
379
|
-
appendPeerNode(e) {
|
|
380
|
-
e.parent && e.parent.level !== 0 ? this.appendChildNode(e.parent) : this.appendRootNode();
|
|
381
|
-
},
|
|
382
|
-
addRootNode(e) {
|
|
383
|
-
return r(this, null, function* () {
|
|
384
|
-
this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.root.insertChild({ data: e }, void 0, !0);
|
|
385
|
-
});
|
|
386
|
-
},
|
|
387
|
-
addChildNode(e) {
|
|
388
|
-
return r(this, null, function* () {
|
|
389
|
-
this.curNode && this.curNode.level !== 0 ? this.curNode.expand(() => r(this, null, function* () {
|
|
390
|
-
this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.append(e, this.curNode);
|
|
391
|
-
})) : yield this.addRootNode(e);
|
|
392
|
-
});
|
|
393
|
-
},
|
|
394
|
-
addPeerNode(e) {
|
|
395
|
-
return r(this, null, function* () {
|
|
396
|
-
this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(() => r(this, null, function* () {
|
|
397
|
-
this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.append(e, this.curNode.parent);
|
|
398
|
-
})) : yield this.addRootNode(e);
|
|
399
|
-
});
|
|
400
|
-
},
|
|
401
|
-
updateNode(e) {
|
|
402
|
-
const t = this.$refs.tree.getNode(e);
|
|
403
|
-
t && (t.data = e);
|
|
404
|
-
},
|
|
405
|
-
setCurrentKey(e) {
|
|
406
|
-
this.$refs.tree && this.$refs.tree.setCurrentKey(e);
|
|
407
|
-
},
|
|
408
|
-
createNewChild(e) {
|
|
409
|
-
this.newChild = {
|
|
410
|
-
id: -1,
|
|
411
|
-
parentId: e,
|
|
412
|
-
[this.treeProps.label]: "",
|
|
413
|
-
edit: !0,
|
|
414
|
-
isTempNode: !0,
|
|
415
|
-
hasChildren: !1
|
|
416
|
-
}, this.$emit("create-new-node", this.newChild);
|
|
417
|
-
},
|
|
418
|
-
removeNodeModal(e) {
|
|
419
|
-
return r(this, null, function* () {
|
|
420
|
-
yield this.$confirm(
|
|
421
|
-
`你确定要删除${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]吗?`,
|
|
422
|
-
"系统提示",
|
|
423
|
-
{
|
|
424
|
-
type: "warning",
|
|
425
|
-
modal: !0,
|
|
426
|
-
dangerouslyUseHTMLString: !0,
|
|
427
|
-
iconClass: "el-icon-question",
|
|
428
|
-
closeOnClickModal: !1,
|
|
429
|
-
confirmButtonClass: "el-button--danger",
|
|
430
|
-
cancelButtonClass: "el-button--primary is-plain",
|
|
431
|
-
beforeClose: (t, i, s) => r(this, null, function* () {
|
|
432
|
-
if (t === "confirm") {
|
|
433
|
-
try {
|
|
434
|
-
i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
|
|
435
|
-
const o = e.parent, a = yield this.deleteApi(e.data.id);
|
|
436
|
-
a.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", o, e.data), s()) : this.$message.error(a.message);
|
|
437
|
-
} catch (o) {
|
|
438
|
-
}
|
|
439
|
-
i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
|
|
440
|
-
} else
|
|
441
|
-
s();
|
|
442
|
-
})
|
|
443
|
-
}
|
|
444
|
-
).catch((t) => t);
|
|
445
|
-
});
|
|
446
|
-
},
|
|
447
|
-
removeNode(e) {
|
|
448
|
-
return r(this, null, function* () {
|
|
449
|
-
try {
|
|
450
|
-
const t = e.parent;
|
|
451
|
-
if (this.deleteApi) {
|
|
452
|
-
const i = yield this.deleteApi(e.data.id);
|
|
453
|
-
i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data)) : this.$message.error(i.message);
|
|
454
|
-
} else
|
|
455
|
-
this.$refs.tree.remove(e);
|
|
456
|
-
} catch (t) {
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
},
|
|
460
|
-
onConfirm(e, t) {
|
|
461
|
-
return r(this, null, function* () {
|
|
462
|
-
if (t[this.treeProps.label] === this.text || !F(this.text)) {
|
|
463
|
-
this.clear();
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
m(t.loading) ? this.$set(t, "loading", !0) : t.loading = !0;
|
|
467
|
-
try {
|
|
468
|
-
if (this.loading = !0, t.id === -1) {
|
|
469
|
-
const i = yield this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), s = O(t);
|
|
470
|
-
y(t, c(h({}, i.data), { isTempNode: !1 })), this.$emit("node-added", t, s, e), this.registerNode(e);
|
|
471
|
-
} else
|
|
472
|
-
yield this.updateApi(c(h({}, t), { [this.treeProps.label]: this.text }));
|
|
473
|
-
t[this.treeProps.label] = this.text, t.edit = !1, this.$emit("node-updated", t, e), this.text = "";
|
|
474
|
-
} catch (i) {
|
|
475
|
-
}
|
|
476
|
-
t.loading = !1, this.loading = !1;
|
|
477
|
-
});
|
|
478
|
-
},
|
|
479
|
-
onCancel(e, t) {
|
|
480
|
-
t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
|
|
481
|
-
},
|
|
482
|
-
nodeClick(e, t, i) {
|
|
483
|
-
this.hideContextMenu(), (m(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, i));
|
|
484
|
-
},
|
|
485
|
-
getCurrentNode() {
|
|
486
|
-
return this.$refs.tree.getCurrentNode();
|
|
487
|
-
},
|
|
488
|
-
locateView() {
|
|
489
|
-
return r(this, null, function* () {
|
|
490
|
-
yield this.$nextTick();
|
|
491
|
-
const e = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
|
|
492
|
-
e && e.scrollIntoView();
|
|
493
|
-
});
|
|
494
|
-
},
|
|
495
|
-
scrollIntoView(e) {
|
|
496
|
-
return r(this, null, function* () {
|
|
497
|
-
var t, i;
|
|
498
|
-
yield this.$nextTick(), e || (yield E(300)), (i = (t = this.$refs) == null ? void 0 : t.labelTxt) == null || i.focus();
|
|
499
|
-
});
|
|
500
|
-
},
|
|
501
|
-
inputKeyup(e, t, i) {
|
|
502
|
-
e.keyCode === 13 && this.onConfirm(t, i), e.keyCode === 27 && this.clear();
|
|
503
|
-
},
|
|
504
|
-
inputBlur(e, t, i) {
|
|
505
|
-
this.confirmButton || this.onConfirm(t, i);
|
|
506
|
-
},
|
|
507
|
-
getCheckedKeys() {
|
|
508
|
-
return this.$refs.tree.getCheckedKeys();
|
|
509
|
-
},
|
|
510
|
-
setCheckedKeys(e) {
|
|
511
|
-
this.$refs.tree.setCheckedKeys(e);
|
|
512
|
-
},
|
|
513
|
-
getCheckedNodes() {
|
|
514
|
-
return this.$refs.tree.getCheckedNodes();
|
|
515
|
-
},
|
|
516
|
-
setCheckedNodes(e) {
|
|
517
|
-
this.$refs.tree.setCheckedNodes(e);
|
|
518
|
-
},
|
|
519
|
-
getNode(e) {
|
|
520
|
-
return this.$refs.tree.getNode(e);
|
|
521
|
-
},
|
|
522
|
-
getRootNode() {
|
|
523
|
-
return this.$refs.tree.root;
|
|
524
|
-
},
|
|
525
|
-
findTreeNode(e) {
|
|
526
|
-
return j(
|
|
527
|
-
this.$refs.tree.root.childNodes,
|
|
528
|
-
(t) => t.data === e || t.data.id === e,
|
|
529
|
-
"childNodes"
|
|
530
|
-
);
|
|
531
|
-
},
|
|
532
|
-
registerNode(e) {
|
|
533
|
-
e.store.registerNode(e), delete e.store.nodesMap[-1];
|
|
534
|
-
},
|
|
535
|
-
reloadTree() {
|
|
536
|
-
return r(this, null, function* () {
|
|
537
|
-
this.lazy ? this.treeKey = Date.now() : yield this.tryFetch();
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}, B = {};
|
|
542
|
-
var de = /* @__PURE__ */ $(
|
|
543
|
-
le,
|
|
544
|
-
ee,
|
|
545
|
-
Z,
|
|
546
|
-
!1,
|
|
547
|
-
he,
|
|
548
|
-
null,
|
|
549
|
-
null,
|
|
550
|
-
null
|
|
551
|
-
);
|
|
552
|
-
function he(e) {
|
|
553
|
-
for (let t in B)
|
|
554
|
-
this[t] = B[t];
|
|
555
|
-
}
|
|
556
|
-
const ce = /* @__PURE__ */ function() {
|
|
557
|
-
return de.exports;
|
|
558
|
-
}();
|
|
559
|
-
var ue = function() {
|
|
560
|
-
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
561
|
-
return i("div", {
|
|
17
|
+
import { merge as n } from "@web-utils/integrations/lodash";
|
|
18
|
+
import { isString as d, isArray as _, trace as p, warning as g, toStringArray as w, isFunction as v, hasOwn as f } from "@web-utils/core";
|
|
19
|
+
import { k as y } from "../chunks/index.57f871af.mjs";
|
|
20
|
+
import u from "element-ui/lib/button";
|
|
21
|
+
import P from "element-ui/lib/form-item";
|
|
22
|
+
import $ from "element-ui/lib/row";
|
|
23
|
+
import S from "element-ui/lib/form";
|
|
24
|
+
import { n as T } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
25
|
+
var C = function() {
|
|
26
|
+
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
27
|
+
return t("div", {
|
|
562
28
|
staticClass: "table-view"
|
|
563
|
-
}, [
|
|
29
|
+
}, [t("Toolbar", e._g(e._b({
|
|
564
30
|
on: {
|
|
565
31
|
search: e.toggleSearch,
|
|
566
32
|
del: e.del,
|
|
@@ -585,21 +51,21 @@ var ue = function() {
|
|
|
585
51
|
proxy: !0
|
|
586
52
|
};
|
|
587
53
|
})], null, !0)
|
|
588
|
-
}, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)),
|
|
54
|
+
}, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", {
|
|
589
55
|
staticClass: "table-view-content-wrapper"
|
|
590
|
-
}, [
|
|
56
|
+
}, [t("div", {
|
|
591
57
|
staticClass: "table-view-content"
|
|
592
|
-
}, [e.treeProps.show ?
|
|
58
|
+
}, [e.treeProps.show ? t("div", {
|
|
593
59
|
ref: "treeScroller",
|
|
594
60
|
staticClass: "table-view-sidebar",
|
|
595
61
|
on: {
|
|
596
62
|
scroll: e.onTreeScroll
|
|
597
63
|
}
|
|
598
|
-
}, [
|
|
64
|
+
}, [t("div", {
|
|
599
65
|
staticStyle: {
|
|
600
66
|
"font-size": "16px"
|
|
601
67
|
}
|
|
602
|
-
}, [e._v("视图导航")]),
|
|
68
|
+
}, [e._v("视图导航")]), t("EditableTree", e._g(e._b({
|
|
603
69
|
ref: "tree",
|
|
604
70
|
attrs: {
|
|
605
71
|
readonly: ""
|
|
@@ -607,26 +73,26 @@ var ue = function() {
|
|
|
607
73
|
scopedSlots: e._u([{
|
|
608
74
|
key: "default",
|
|
609
75
|
fn: function(s) {
|
|
610
|
-
var
|
|
76
|
+
var l = s.node, i = s.data;
|
|
611
77
|
return [e._t("tree-node", function() {
|
|
612
|
-
return [
|
|
78
|
+
return [t("span", [t("i", {
|
|
613
79
|
staticClass: "node-icon",
|
|
614
|
-
class:
|
|
80
|
+
class: l.childNodes.length > 0 ? l.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
|
|
615
81
|
}), e._t("tree-label", function() {
|
|
616
|
-
return [e._v(e._s(
|
|
82
|
+
return [e._v(e._s(l.label))];
|
|
617
83
|
}, {
|
|
618
|
-
node:
|
|
619
|
-
data:
|
|
84
|
+
node: l,
|
|
85
|
+
data: i
|
|
620
86
|
})], 2)];
|
|
621
87
|
}, {
|
|
622
|
-
node:
|
|
623
|
-
data:
|
|
88
|
+
node: l,
|
|
89
|
+
data: i
|
|
624
90
|
})];
|
|
625
91
|
}
|
|
626
92
|
}], null, !0)
|
|
627
|
-
}, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(),
|
|
93
|
+
}, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", {
|
|
628
94
|
staticClass: "table-view-table"
|
|
629
|
-
}, [
|
|
95
|
+
}, [t("PageableTable", e._g(e._b({
|
|
630
96
|
ref: "table",
|
|
631
97
|
class: [{
|
|
632
98
|
"border-top": e.borderTop,
|
|
@@ -641,15 +107,15 @@ var ue = function() {
|
|
|
641
107
|
"row-dblclick": e.rowDbClick,
|
|
642
108
|
"selection-change": e.onSelectionChange
|
|
643
109
|
}
|
|
644
|
-
}, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ?
|
|
110
|
+
}, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", {
|
|
645
111
|
staticClass: "slide-panel",
|
|
646
112
|
style: {
|
|
647
113
|
right: `${e.right}px`,
|
|
648
114
|
width: `${e.searchPanelProps.width}px`
|
|
649
115
|
}
|
|
650
|
-
}, [e._m(0),
|
|
116
|
+
}, [e._m(0), t("div", {
|
|
651
117
|
staticClass: "slide-panel-content"
|
|
652
|
-
}, [
|
|
118
|
+
}, [t(S, {
|
|
653
119
|
ref: "form",
|
|
654
120
|
attrs: {
|
|
655
121
|
"label-position": "right",
|
|
@@ -662,30 +128,30 @@ var ue = function() {
|
|
|
662
128
|
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
663
129
|
}
|
|
664
130
|
}
|
|
665
|
-
}, [
|
|
131
|
+
}, [t("FormItemConfigProvider", {
|
|
666
132
|
attrs: {
|
|
667
133
|
block: "",
|
|
668
134
|
"wrap-col": !1
|
|
669
135
|
}
|
|
670
|
-
}, [
|
|
136
|
+
}, [t($, {
|
|
671
137
|
attrs: {
|
|
672
138
|
gutter: 0
|
|
673
139
|
}
|
|
674
140
|
}, [e._t("search-form", function() {
|
|
675
|
-
return [
|
|
676
|
-
})], 2)], 1),
|
|
141
|
+
return [t("p", [e._v("请添加搜索条件!")])];
|
|
142
|
+
})], 2)], 1), t(P, {
|
|
677
143
|
attrs: {
|
|
678
144
|
"label-width": "0"
|
|
679
145
|
}
|
|
680
|
-
}, [
|
|
146
|
+
}, [t("div", {
|
|
681
147
|
staticClass: "slide-panel-actions"
|
|
682
|
-
}, [
|
|
148
|
+
}, [t(u, {
|
|
683
149
|
attrs: {
|
|
684
150
|
type: "primary",
|
|
685
151
|
"native-type": "submit",
|
|
686
152
|
size: "mini"
|
|
687
153
|
}
|
|
688
|
-
}, [e._v(" 开始搜索 ")]),
|
|
154
|
+
}, [e._v(" 开始搜索 ")]), t(u, {
|
|
689
155
|
attrs: {
|
|
690
156
|
size: "mini"
|
|
691
157
|
},
|
|
@@ -693,15 +159,15 @@ var ue = function() {
|
|
|
693
159
|
click: e.onClearClick
|
|
694
160
|
}
|
|
695
161
|
}, [e._v(" 清除条件 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
|
|
696
|
-
},
|
|
697
|
-
var e = this,
|
|
698
|
-
return
|
|
162
|
+
}, L = [function() {
|
|
163
|
+
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
164
|
+
return t("div", {
|
|
699
165
|
staticClass: "slide-panel-line"
|
|
700
|
-
}, [
|
|
166
|
+
}, [t("div", {
|
|
701
167
|
staticClass: "slide-panel-line-indicator"
|
|
702
168
|
})]);
|
|
703
169
|
}];
|
|
704
|
-
const
|
|
170
|
+
const k = [
|
|
705
171
|
"back",
|
|
706
172
|
"create",
|
|
707
173
|
"save",
|
|
@@ -721,16 +187,16 @@ const fe = [
|
|
|
721
187
|
"disabled",
|
|
722
188
|
"reload",
|
|
723
189
|
"slot"
|
|
724
|
-
],
|
|
190
|
+
], x = {
|
|
725
191
|
name: "TableView",
|
|
726
192
|
bus: {
|
|
727
|
-
reloadTableView(e,
|
|
193
|
+
reloadTableView(e, r) {
|
|
728
194
|
if (this._viewIds)
|
|
729
|
-
if (
|
|
730
|
-
let
|
|
731
|
-
|
|
195
|
+
if (d(e) || _(e)) {
|
|
196
|
+
let t = e;
|
|
197
|
+
d(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (r ? this.$refs.tree && (p.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (p.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
|
|
732
198
|
} else
|
|
733
|
-
|
|
199
|
+
g.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
734
200
|
}
|
|
735
201
|
},
|
|
736
202
|
props: {
|
|
@@ -798,20 +264,20 @@ const fe = [
|
|
|
798
264
|
},
|
|
799
265
|
computed: {
|
|
800
266
|
buttonSlots() {
|
|
801
|
-
return
|
|
267
|
+
return k.filter((e) => this.$scopedSlots[e]);
|
|
802
268
|
},
|
|
803
269
|
toolbarProps() {
|
|
804
|
-
var s,
|
|
805
|
-
const e = {},
|
|
806
|
-
let
|
|
807
|
-
return
|
|
270
|
+
var s, l;
|
|
271
|
+
const e = {}, r = n(this.toolbarAttrs, e);
|
|
272
|
+
let t = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
|
|
273
|
+
return t = t || [], t.includes("reload") || (t = [...t, "reload"]), r.buttons = t, r.buttons = w(r.buttons), r.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), r;
|
|
808
274
|
},
|
|
809
275
|
treeProps() {
|
|
810
276
|
const e = {
|
|
811
277
|
treeProps: {
|
|
812
278
|
children: "children",
|
|
813
279
|
label: "label",
|
|
814
|
-
isLeaf: (
|
|
280
|
+
isLeaf: (r) => f(r, "hasChildren") ? !r.hasChildren : f(r, "hasChild") ? !r.hasChild : !0
|
|
815
281
|
},
|
|
816
282
|
show: !1,
|
|
817
283
|
lazy: !0,
|
|
@@ -820,30 +286,30 @@ const fe = [
|
|
|
820
286
|
"expand-first-node": !1,
|
|
821
287
|
"default-expand-all": !1
|
|
822
288
|
};
|
|
823
|
-
return
|
|
289
|
+
return n(this.treeAttrs, e);
|
|
824
290
|
},
|
|
825
291
|
tableProps() {
|
|
826
|
-
const e = this.tableAttrs.api || this.$parent.getPage,
|
|
292
|
+
const e = this.tableAttrs.api || this.$parent.getPage, r = {
|
|
827
293
|
model: this.searchModel || {},
|
|
828
294
|
height: "auto",
|
|
829
295
|
"highlight-current-row": !0,
|
|
830
296
|
api: e
|
|
831
297
|
};
|
|
832
|
-
return
|
|
298
|
+
return n(this.tableAttrs, r);
|
|
833
299
|
},
|
|
834
300
|
searchPanelProps() {
|
|
835
301
|
const e = {
|
|
836
302
|
width: 350,
|
|
837
303
|
model: this.searchModel || {}
|
|
838
304
|
};
|
|
839
|
-
return
|
|
305
|
+
return n(this.searchPanelAttrs, e);
|
|
840
306
|
}
|
|
841
307
|
},
|
|
842
308
|
created() {
|
|
843
309
|
this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
|
|
844
310
|
},
|
|
845
311
|
activated() {
|
|
846
|
-
return
|
|
312
|
+
return a(this, null, function* () {
|
|
847
313
|
this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
|
|
848
314
|
});
|
|
849
315
|
},
|
|
@@ -855,21 +321,21 @@ const fe = [
|
|
|
855
321
|
this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
|
|
856
322
|
},
|
|
857
323
|
onSearchClick() {
|
|
858
|
-
return
|
|
324
|
+
return a(this, null, function* () {
|
|
859
325
|
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
860
326
|
});
|
|
861
327
|
},
|
|
862
328
|
onClearClick() {
|
|
863
|
-
return
|
|
329
|
+
return a(this, null, function* () {
|
|
864
330
|
this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
865
331
|
});
|
|
866
332
|
},
|
|
867
333
|
openFrom(e) {
|
|
868
|
-
this.$router.push(
|
|
334
|
+
this.$router.push(y(this.formPath, e));
|
|
869
335
|
},
|
|
870
336
|
rowDbClick(e) {
|
|
871
|
-
var
|
|
872
|
-
!((
|
|
337
|
+
var r;
|
|
338
|
+
!((r = this.tableListeners) != null && r["row-dblclick"]) && this.formPath && this.openFrom(e);
|
|
873
339
|
},
|
|
874
340
|
onSelectionChange(e) {
|
|
875
341
|
this.selectedRows = e;
|
|
@@ -879,10 +345,10 @@ const fe = [
|
|
|
879
345
|
!((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
|
|
880
346
|
},
|
|
881
347
|
del() {
|
|
882
|
-
return
|
|
883
|
-
var
|
|
348
|
+
return a(this, null, function* () {
|
|
349
|
+
var r;
|
|
884
350
|
const e = this.deleteApi || this.$parent.del;
|
|
885
|
-
if (!((
|
|
351
|
+
if (!((r = this.toolbarListeners) != null && r.del) && v(e)) {
|
|
886
352
|
if (!this.selectedRows.length) {
|
|
887
353
|
this.$message.warning("请选择要删除的记录!");
|
|
888
354
|
return;
|
|
@@ -895,16 +361,16 @@ const fe = [
|
|
|
895
361
|
modal: !0,
|
|
896
362
|
dangerouslyUseHTMLString: !0,
|
|
897
363
|
closeOnClickModal: !1,
|
|
898
|
-
beforeClose: (
|
|
899
|
-
if (
|
|
364
|
+
beforeClose: (t, s, l) => a(this, null, function* () {
|
|
365
|
+
if (t === "confirm")
|
|
900
366
|
try {
|
|
901
|
-
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", yield e.call(this, this.selectedRows.map((
|
|
902
|
-
} catch (
|
|
367
|
+
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", yield e.call(this, this.selectedRows.map((i) => i.id).join(",")), this.$message.success("删除成功"), yield this.reloadTable(), yield this.refreshTree();
|
|
368
|
+
} catch (i) {
|
|
903
369
|
}
|
|
904
|
-
|
|
370
|
+
l();
|
|
905
371
|
})
|
|
906
372
|
}
|
|
907
|
-
).catch((
|
|
373
|
+
).catch((t) => t);
|
|
908
374
|
}
|
|
909
375
|
});
|
|
910
376
|
},
|
|
@@ -913,7 +379,7 @@ const fe = [
|
|
|
913
379
|
(e = this.$refs.table) == null || e.reload();
|
|
914
380
|
},
|
|
915
381
|
refreshTable() {
|
|
916
|
-
return
|
|
382
|
+
return a(this, null, function* () {
|
|
917
383
|
var e;
|
|
918
384
|
yield (e = this.$refs.table) == null ? void 0 : e.getPage();
|
|
919
385
|
});
|
|
@@ -925,24 +391,24 @@ const fe = [
|
|
|
925
391
|
return this.searchPanelProps.model;
|
|
926
392
|
}
|
|
927
393
|
}
|
|
928
|
-
},
|
|
929
|
-
var
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
394
|
+
}, b = {};
|
|
395
|
+
var A = /* @__PURE__ */ T(
|
|
396
|
+
x,
|
|
397
|
+
C,
|
|
398
|
+
L,
|
|
933
399
|
!1,
|
|
934
|
-
|
|
400
|
+
M,
|
|
935
401
|
null,
|
|
936
402
|
null,
|
|
937
403
|
null
|
|
938
404
|
);
|
|
939
|
-
function
|
|
940
|
-
for (let
|
|
941
|
-
this[
|
|
405
|
+
function M(e) {
|
|
406
|
+
for (let r in b)
|
|
407
|
+
this[r] = b[r];
|
|
942
408
|
}
|
|
943
|
-
const
|
|
944
|
-
return
|
|
409
|
+
const E = /* @__PURE__ */ function() {
|
|
410
|
+
return A.exports;
|
|
945
411
|
}();
|
|
946
412
|
export {
|
|
947
|
-
|
|
413
|
+
E as default
|
|
948
414
|
};
|