yc-vep-ui 0.3.7 → 0.3.8
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/dist/components/Icons/index.d.ts +4 -0
- package/dist/components/Icons/svg/Bell.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Clock.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Info.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Share.vue.d.ts +2 -0
- package/dist/components/Upload/index.vue.d.ts +5 -3
- package/dist/components/YcApproval/History.vue.d.ts +8 -0
- package/dist/components/YcApproval/ReadScope.vue.d.ts +10 -0
- package/dist/components/YcApproval/Remind.vue.d.ts +44 -0
- package/dist/components/YcApproval/api.d.ts +1 -0
- package/dist/components/YcApproval/useBtnActive.d.ts +6 -0
- package/dist/components/YcApproval/useDetail.d.ts +103 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/entry-D3QkTN2N.js +4791 -0
- package/dist/entry.d.ts +14 -17
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useDictionary.d.ts +25 -0
- package/dist/hooks/useRoute.d.ts +20 -0
- package/dist/hooks/useUser.d.ts +4 -0
- package/dist/index.css +16 -7
- package/dist/utils/rsaCrypto.d.ts +10 -0
- package/dist/vep-ui.js +2 -2
- package/package.json +3 -2
- package/dist/entry-C2idE4D3.js +0 -2275
package/dist/entry-C2idE4D3.js
DELETED
|
@@ -1,2275 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onMounted as y, onUnmounted as b, openBlock as x, reactive as S, ref as C, renderList as w, renderSlot as T, resolveComponent as E, resolveDirective as D, resolveDynamicComponent as O, setBlockTracking as k, shallowRef as A, toDisplayString as j, toRaw as M, toValue as N, unref as P, useAttrs as F, useCssVars as ee, useModel as I, watch as L, watchEffect as R, withCtx as z, withDirectives as B, withKeys as te, withModifiers as V } from "vue";
|
|
2
|
-
import { AiEditor as H } from "aieditor";
|
|
3
|
-
//#region \0rolldown/runtime.js
|
|
4
|
-
var U = Object.defineProperty, W = (e, t) => {
|
|
5
|
-
let n = {};
|
|
6
|
-
for (var r in e) U(n, r, {
|
|
7
|
-
get: e[r],
|
|
8
|
-
enumerable: !0
|
|
9
|
-
});
|
|
10
|
-
return t || U(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
-
}, ne = { class: /* @__PURE__ */ _({ bodyClass: !0 }) }, re = /* @__PURE__ */ u({
|
|
12
|
-
__name: "index",
|
|
13
|
-
props: {
|
|
14
|
-
title: {},
|
|
15
|
-
bodyClass: {},
|
|
16
|
-
hideBorder: { type: Boolean },
|
|
17
|
-
icon: {}
|
|
18
|
-
},
|
|
19
|
-
setup(e) {
|
|
20
|
-
let i = t(() => ({
|
|
21
|
-
display: "flex",
|
|
22
|
-
alignItems: "center",
|
|
23
|
-
gap: "4px",
|
|
24
|
-
borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
|
|
25
|
-
}));
|
|
26
|
-
return (t, o) => {
|
|
27
|
-
let l = E("el-icon"), u = E("el-card");
|
|
28
|
-
return x(), n(u, h(t.$attrs, { class: {
|
|
29
|
-
"ui-card": !0,
|
|
30
|
-
hideBorder: e.hideBorder
|
|
31
|
-
} }), s({
|
|
32
|
-
default: z(() => [a("div", ne, [T(t.$slots, "default", {}, void 0, !0)])]),
|
|
33
|
-
_: 2
|
|
34
|
-
}, [e.title && e.title?.length > 0 ? {
|
|
35
|
-
name: "header",
|
|
36
|
-
fn: z(() => [a("div", { style: v(i.value) }, [e.icon ? (x(), n(l, { key: 0 }, {
|
|
37
|
-
default: z(() => [(x(), n(O(e.icon), { color: "#2563eb" }))]),
|
|
38
|
-
_: 1
|
|
39
|
-
})) : r("", !0), o[0] || (k(-1, !0), (o[0] = a("h4", null, [c(j(e.title), 1)])).cacheIndex = 0, k(1), o[0])], 4)]),
|
|
40
|
-
key: "0"
|
|
41
|
-
} : void 0]), 1040, ["class"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}), G = (e, t) => {
|
|
45
|
-
let n = e.__vccOpts || e;
|
|
46
|
-
for (let [e, r] of t) n[e] = r;
|
|
47
|
-
return n;
|
|
48
|
-
}, ie = /* @__PURE__ */ W({ default: () => ae }), ae = /* @__PURE__ */ G(re, [["__scopeId", "data-v-6ebb01d7"]]), K = {
|
|
49
|
-
get Button() {
|
|
50
|
-
return $()?.resolveComponent?.("el-button") || "el-button";
|
|
51
|
-
},
|
|
52
|
-
get Link() {
|
|
53
|
-
return $()?.resolveComponent?.("el-link") || "el-link";
|
|
54
|
-
},
|
|
55
|
-
get Tag() {
|
|
56
|
-
return $()?.resolveComponent?.("el-tag") || "el-tag";
|
|
57
|
-
},
|
|
58
|
-
get Select() {
|
|
59
|
-
return $()?.resolveComponent?.("el-select") || "el-select";
|
|
60
|
-
},
|
|
61
|
-
get DatePicker() {
|
|
62
|
-
return $()?.resolveComponent?.("el-date-picker") || "el-date-picker";
|
|
63
|
-
},
|
|
64
|
-
get Input() {
|
|
65
|
-
return $()?.resolveComponent?.("el-input") || "el-input";
|
|
66
|
-
},
|
|
67
|
-
get InputTag() {
|
|
68
|
-
return $()?.resolveComponent?.("el-input-tag") || "el-input-tag";
|
|
69
|
-
},
|
|
70
|
-
get TimeSelect() {
|
|
71
|
-
return $()?.resolveComponent?.("el-time-select") || "el-time-select";
|
|
72
|
-
},
|
|
73
|
-
get InputNumber() {
|
|
74
|
-
return $()?.resolveComponent?.("el-input-number") || "el-input-number";
|
|
75
|
-
},
|
|
76
|
-
get RadioGroup() {
|
|
77
|
-
return $()?.resolveComponent?.("el-radio-group") || "el-radio-group";
|
|
78
|
-
},
|
|
79
|
-
get Text() {
|
|
80
|
-
return $()?.resolveComponent?.("el-text") || "el-text";
|
|
81
|
-
},
|
|
82
|
-
get Card() {
|
|
83
|
-
return $()?.resolveComponent?.("el-card") || "el-card";
|
|
84
|
-
},
|
|
85
|
-
get Table() {
|
|
86
|
-
return $()?.resolveComponent?.("el-table") || "el-table";
|
|
87
|
-
},
|
|
88
|
-
get TableColumn() {
|
|
89
|
-
return $()?.resolveComponent?.("el-table-column") || "el-table-column";
|
|
90
|
-
},
|
|
91
|
-
get Pagination() {
|
|
92
|
-
return $()?.resolveComponent?.("el-pagination") || "el-pagination";
|
|
93
|
-
},
|
|
94
|
-
get Form() {
|
|
95
|
-
return $()?.resolveComponent?.("el-form") || "el-form";
|
|
96
|
-
},
|
|
97
|
-
get FormItem() {
|
|
98
|
-
return $()?.resolveComponent?.("el-form-item") || "el-form-item";
|
|
99
|
-
},
|
|
100
|
-
get Row() {
|
|
101
|
-
return $()?.resolveComponent?.("el-row") || "el-row";
|
|
102
|
-
},
|
|
103
|
-
get Col() {
|
|
104
|
-
return $()?.resolveComponent?.("el-col") || "el-col";
|
|
105
|
-
},
|
|
106
|
-
get Icon() {
|
|
107
|
-
return $()?.resolveComponent?.("el-icon") || "el-icon";
|
|
108
|
-
},
|
|
109
|
-
get TreeV2() {
|
|
110
|
-
return $()?.resolveComponent?.("el-tree-v2") || "el-tree-v2";
|
|
111
|
-
},
|
|
112
|
-
get Dropdown() {
|
|
113
|
-
return $()?.resolveComponent?.("el-dropdown") || "el-dropdown";
|
|
114
|
-
},
|
|
115
|
-
get DropdownMenu() {
|
|
116
|
-
return $()?.resolveComponent?.("el-dropdown-menu") || "el-dropdown-menu";
|
|
117
|
-
},
|
|
118
|
-
get DropdownItem() {
|
|
119
|
-
return $()?.resolveComponent?.("el-dropdown-item") || "el-dropdown-item";
|
|
120
|
-
},
|
|
121
|
-
get Dialog() {
|
|
122
|
-
return $()?.resolveComponent?.("el-dialog") || "el-dialog";
|
|
123
|
-
},
|
|
124
|
-
get ButtonGroup() {
|
|
125
|
-
return $()?.resolveComponent?.("el-button-group") || "el-button-group";
|
|
126
|
-
},
|
|
127
|
-
get Descriptions() {
|
|
128
|
-
return $()?.resolveComponent?.("el-descriptions") || "el-descriptions";
|
|
129
|
-
},
|
|
130
|
-
get DescriptionsItem() {
|
|
131
|
-
return $()?.resolveComponent?.("el-descriptions-item") || "el-descriptions-item";
|
|
132
|
-
},
|
|
133
|
-
get Message() {
|
|
134
|
-
return $()?.config?.globalProperties?.$message || {
|
|
135
|
-
error: (e) => console.error("[Message.error]", e),
|
|
136
|
-
success: (e) => console.log("[Message.success]", e),
|
|
137
|
-
warning: (e) => console.warn("[Message.warning]", e)
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/components/utils/render.ts
|
|
143
|
-
function q() {
|
|
144
|
-
let e = $();
|
|
145
|
-
return e?.h ? e.h : function(e, t, n) {
|
|
146
|
-
return console.warn("[yc-vep-ui] Vue not initialized. Call setHostVue(Vue) before using components."), null;
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function oe(e) {
|
|
150
|
-
let t = q();
|
|
151
|
-
return t ? t("div", { style: {
|
|
152
|
-
display: "flex",
|
|
153
|
-
flexDirection: "row",
|
|
154
|
-
flexWrap: "wrap",
|
|
155
|
-
gap: "8px"
|
|
156
|
-
} }, (Array.isArray(e) ? e : [e]).map((e) => {
|
|
157
|
-
let { text: n, ...r } = e;
|
|
158
|
-
return t(K.Button, {
|
|
159
|
-
...r,
|
|
160
|
-
link: !0,
|
|
161
|
-
size: "small",
|
|
162
|
-
type: e.type || "default"
|
|
163
|
-
}, () => n);
|
|
164
|
-
})) : null;
|
|
165
|
-
}
|
|
166
|
-
function se(e) {
|
|
167
|
-
let t = q();
|
|
168
|
-
return t ? Array.isArray(e) ? t("div", { style: {
|
|
169
|
-
display: "flex",
|
|
170
|
-
gap: "8px",
|
|
171
|
-
flexDirection: "row",
|
|
172
|
-
flexWrap: "wrap"
|
|
173
|
-
} }, e.map((e) => t(K.Link, {
|
|
174
|
-
...e,
|
|
175
|
-
type: e.type || "primary"
|
|
176
|
-
}, () => t(K.Text, {
|
|
177
|
-
lineClamp: e?.lineClamp,
|
|
178
|
-
type: e.type || "primary"
|
|
179
|
-
}, () => e.prop)))) : t(K.Link, {
|
|
180
|
-
...e,
|
|
181
|
-
type: e.type || "primary"
|
|
182
|
-
}, () => t(K.Text, {
|
|
183
|
-
lineClamp: e?.lineClamp,
|
|
184
|
-
type: e.type || "primary"
|
|
185
|
-
}, () => e.prop)) : null;
|
|
186
|
-
}
|
|
187
|
-
function ce(e) {
|
|
188
|
-
let t = q();
|
|
189
|
-
return t ? t("div", { style: {
|
|
190
|
-
display: "flex",
|
|
191
|
-
gap: "4px",
|
|
192
|
-
flexDirection: "row",
|
|
193
|
-
flexWrap: "wrap"
|
|
194
|
-
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(K.Tag, e, () => n))) : null;
|
|
195
|
-
}
|
|
196
|
-
function le(e) {
|
|
197
|
-
let t = q();
|
|
198
|
-
return t ? t(K.Tag, { ...e }) : null;
|
|
199
|
-
}
|
|
200
|
-
function ue(e) {
|
|
201
|
-
let t = q();
|
|
202
|
-
return t ? t(K.Select, {
|
|
203
|
-
style: { minWidth: "160px" },
|
|
204
|
-
...e,
|
|
205
|
-
placeholder: "请选择",
|
|
206
|
-
filterable: !0
|
|
207
|
-
}) : null;
|
|
208
|
-
}
|
|
209
|
-
function de(e) {
|
|
210
|
-
let t = q();
|
|
211
|
-
if (!t) return null;
|
|
212
|
-
let n = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
213
|
-
return t(K.DatePicker, {
|
|
214
|
-
format: n,
|
|
215
|
-
valueFormat: n,
|
|
216
|
-
startPlaceholder: "开始时间",
|
|
217
|
-
endPlaceholder: "结束时间",
|
|
218
|
-
...e,
|
|
219
|
-
placeholder: "请选择",
|
|
220
|
-
"onUpdate:modelValue": (t) => e?.onChange?.(t)
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
function fe(e) {
|
|
224
|
-
let t = q();
|
|
225
|
-
if (!t) return null;
|
|
226
|
-
let { start: n = "00:00", end: r = "23:30", ...i } = e;
|
|
227
|
-
return t(K.TimeSelect, {
|
|
228
|
-
start: n,
|
|
229
|
-
end: r,
|
|
230
|
-
...i,
|
|
231
|
-
placeholder: "请选择",
|
|
232
|
-
filterable: !0
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
function pe(e) {
|
|
236
|
-
let t = q();
|
|
237
|
-
return t ? t(K.Input, {
|
|
238
|
-
...e,
|
|
239
|
-
placeholder: "请输入"
|
|
240
|
-
}) : null;
|
|
241
|
-
}
|
|
242
|
-
function me(e) {
|
|
243
|
-
let t = q();
|
|
244
|
-
if (!t) return null;
|
|
245
|
-
let { align: n = "left", controlsPosition: r = "right", ...i } = e, a = {
|
|
246
|
-
...e?.style || {},
|
|
247
|
-
width: "100%"
|
|
248
|
-
};
|
|
249
|
-
return t(K.InputNumber, {
|
|
250
|
-
align: n,
|
|
251
|
-
style: a,
|
|
252
|
-
controlsPosition: r,
|
|
253
|
-
placeholder: "请输入",
|
|
254
|
-
...i
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
function he(e) {
|
|
258
|
-
let t = q();
|
|
259
|
-
if (!t) return null;
|
|
260
|
-
let { rows: n = 1, ...r } = e;
|
|
261
|
-
return t(K.Input, {
|
|
262
|
-
placeholder: "请输入",
|
|
263
|
-
rows: n,
|
|
264
|
-
...r,
|
|
265
|
-
type: "textarea"
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
function ge(e) {
|
|
269
|
-
let t = q();
|
|
270
|
-
return t ? t(K.InputTag, {
|
|
271
|
-
placeholder: "请输入",
|
|
272
|
-
...e,
|
|
273
|
-
clearable: !1
|
|
274
|
-
}) : null;
|
|
275
|
-
}
|
|
276
|
-
function _e(e) {
|
|
277
|
-
let t = q();
|
|
278
|
-
return t ? t(mt || pt, e) : null;
|
|
279
|
-
}
|
|
280
|
-
function ve(e) {
|
|
281
|
-
let t = q();
|
|
282
|
-
return t ? t(K.RadioGroup, e) : null;
|
|
283
|
-
}
|
|
284
|
-
function ye(e) {
|
|
285
|
-
let t = q();
|
|
286
|
-
return t ? t(K.Text, e, () => typeof e == "string" ? e : e.prop ?? "") : null;
|
|
287
|
-
}
|
|
288
|
-
function be(e) {
|
|
289
|
-
let t = q();
|
|
290
|
-
return t ? t(en || $t, {
|
|
291
|
-
placeholder: "请选择",
|
|
292
|
-
...e,
|
|
293
|
-
searchable: !0
|
|
294
|
-
}) : null;
|
|
295
|
-
}
|
|
296
|
-
function xe(e) {
|
|
297
|
-
let t = q();
|
|
298
|
-
return t ? t(sn || on, e) : null;
|
|
299
|
-
}
|
|
300
|
-
var J = {
|
|
301
|
-
button: oe,
|
|
302
|
-
link: se,
|
|
303
|
-
tag: ce,
|
|
304
|
-
switch: le,
|
|
305
|
-
select: ue,
|
|
306
|
-
datePicker: de,
|
|
307
|
-
timeSelect: fe,
|
|
308
|
-
input: pe,
|
|
309
|
-
inputNumber: me,
|
|
310
|
-
textarea: he,
|
|
311
|
-
inputTag: ge,
|
|
312
|
-
editor: _e,
|
|
313
|
-
radio: ve,
|
|
314
|
-
text: ye,
|
|
315
|
-
staffSelect: be,
|
|
316
|
-
upload: xe
|
|
317
|
-
}, Se = /* @__PURE__ */ u({
|
|
318
|
-
name: "UiColumn",
|
|
319
|
-
__name: "UiColumn",
|
|
320
|
-
props: {
|
|
321
|
-
key: {},
|
|
322
|
-
data: {},
|
|
323
|
-
column: {},
|
|
324
|
-
align: {},
|
|
325
|
-
size: {}
|
|
326
|
-
},
|
|
327
|
-
emits: ["update:data"],
|
|
328
|
-
setup(t, { emit: r }) {
|
|
329
|
-
let a = r, o = t;
|
|
330
|
-
function s(e, t, n) {
|
|
331
|
-
let r = {};
|
|
332
|
-
Object.keys(J).forEach((i) => {
|
|
333
|
-
let o = i;
|
|
334
|
-
r[o] = (r) => {
|
|
335
|
-
let i = Array.isArray(r) ? r : {
|
|
336
|
-
placeholder: "请输入",
|
|
337
|
-
filterable: !0,
|
|
338
|
-
...r,
|
|
339
|
-
prop: r?.prop || e[n.prop],
|
|
340
|
-
modelValue: r?.prop || e[n.prop],
|
|
341
|
-
onChange: r?.onChange || ((e) => a("update:data", t, n.prop, e)),
|
|
342
|
-
onInput: r?.onInput || ((e) => a("update:data", t, n.prop, e))
|
|
343
|
-
};
|
|
344
|
-
return J[o](i);
|
|
345
|
-
};
|
|
346
|
-
});
|
|
347
|
-
let i = n.render ? n.render({
|
|
348
|
-
data: e,
|
|
349
|
-
index: t,
|
|
350
|
-
h: r,
|
|
351
|
-
column: n
|
|
352
|
-
}) : null;
|
|
353
|
-
return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
|
|
354
|
-
}
|
|
355
|
-
return (r, a) => {
|
|
356
|
-
let l = E("UiColumn", !0), u = E("el-table-column"), d = E("el-text");
|
|
357
|
-
return t.column?.children && t.column?.children?.length > 0 ? (x(), n(u, {
|
|
358
|
-
key: 0,
|
|
359
|
-
label: t.column.label,
|
|
360
|
-
align: o.align
|
|
361
|
-
}, {
|
|
362
|
-
default: z(() => [(x(!0), i(e, null, w(t.column.children, (e) => (x(), n(l, h({
|
|
363
|
-
column: e,
|
|
364
|
-
data: o.data
|
|
365
|
-
}, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
|
|
366
|
-
"column",
|
|
367
|
-
"data",
|
|
368
|
-
"align"
|
|
369
|
-
]))), 256))]),
|
|
370
|
-
_: 1
|
|
371
|
-
}, 8, ["label", "align"])) : (x(), n(u, {
|
|
372
|
-
key: 1,
|
|
373
|
-
prop: String(t.column.prop),
|
|
374
|
-
label: t.column.label,
|
|
375
|
-
"column-key": String(t.column.prop),
|
|
376
|
-
align: o.align,
|
|
377
|
-
width: t.column.width,
|
|
378
|
-
"show-overflow-tooltip": t.column.showOverflowTooltip
|
|
379
|
-
}, {
|
|
380
|
-
default: z(({ row: e, $index: r }) => [t.column.render ? (x(), n(O(s(e, r, t.column)), {
|
|
381
|
-
key: 0,
|
|
382
|
-
align: o.align,
|
|
383
|
-
size: o.size
|
|
384
|
-
}, null, 8, ["align", "size"])) : (x(), n(d, {
|
|
385
|
-
key: 1,
|
|
386
|
-
"line-clamp": t.column?.lineClamp || 2
|
|
387
|
-
}, {
|
|
388
|
-
default: z(() => [c(j(e[t.column.prop]), 1)]),
|
|
389
|
-
_: 2
|
|
390
|
-
}, 1032, ["line-clamp"]))]),
|
|
391
|
-
_: 1
|
|
392
|
-
}, 8, [
|
|
393
|
-
"prop",
|
|
394
|
-
"label",
|
|
395
|
-
"column-key",
|
|
396
|
-
"align",
|
|
397
|
-
"width",
|
|
398
|
-
"show-overflow-tooltip"
|
|
399
|
-
]));
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
}), Ce = /* @__PURE__ */ u({
|
|
403
|
-
__name: "index",
|
|
404
|
-
props: {
|
|
405
|
-
loading: {
|
|
406
|
-
type: [Boolean, Object],
|
|
407
|
-
default: !1
|
|
408
|
-
},
|
|
409
|
-
border: {
|
|
410
|
-
type: Boolean,
|
|
411
|
-
default: !1
|
|
412
|
-
},
|
|
413
|
-
size: { default: "default" },
|
|
414
|
-
data: { default: () => S([]) },
|
|
415
|
-
columns: {},
|
|
416
|
-
align: { default: "left" },
|
|
417
|
-
hidePagination: {
|
|
418
|
-
type: Boolean,
|
|
419
|
-
default: !1
|
|
420
|
-
},
|
|
421
|
-
pagination: { default: () => S({
|
|
422
|
-
page: 1,
|
|
423
|
-
pageSize: 10,
|
|
424
|
-
total: 0,
|
|
425
|
-
pageSizes: [
|
|
426
|
-
10,
|
|
427
|
-
20,
|
|
428
|
-
50
|
|
429
|
-
]
|
|
430
|
-
}) },
|
|
431
|
-
currentChange: { type: Function },
|
|
432
|
-
selectionChange: { type: Function },
|
|
433
|
-
selectable: { type: Function },
|
|
434
|
-
defaultCheckedKeys: {},
|
|
435
|
-
rowKey: {}
|
|
436
|
-
},
|
|
437
|
-
emits: ["pagination"],
|
|
438
|
-
setup(a, { emit: s }) {
|
|
439
|
-
let c = s, l = o(a, [
|
|
440
|
-
"loading",
|
|
441
|
-
"border",
|
|
442
|
-
"align",
|
|
443
|
-
"hidePagination",
|
|
444
|
-
"pagination",
|
|
445
|
-
"data",
|
|
446
|
-
"size"
|
|
447
|
-
]), u = C(), d = t(() => N(l.columns)?.some((e) => e.type === "index")), f = t(() => N(l.columns)?.some((e) => e.type === "selection")), p = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
|
|
448
|
-
L(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
|
|
449
|
-
!e?.length || !t?.length || g(() => {
|
|
450
|
-
if (!u.value) return;
|
|
451
|
-
let n = t.filter((t) => e.includes(t.id));
|
|
452
|
-
u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
|
|
453
|
-
});
|
|
454
|
-
}, { immediate: !0 });
|
|
455
|
-
function m(e, t) {
|
|
456
|
-
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", N(a.pagination));
|
|
457
|
-
}
|
|
458
|
-
function _(e, t, n) {
|
|
459
|
-
a.data[e] && (a.data[e] = {
|
|
460
|
-
...a.data[e],
|
|
461
|
-
[t]: n
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
return (t, o) => {
|
|
465
|
-
let s = E("el-table-column"), c = E("el-table"), g = E("el-pagination"), v = D("loading");
|
|
466
|
-
return x(), i("div", null, [
|
|
467
|
-
B((x(), n(c, h({ border: a.border }, t.$attrs, {
|
|
468
|
-
data: a.data,
|
|
469
|
-
lazy: !0,
|
|
470
|
-
class: "ui-table",
|
|
471
|
-
fit: "",
|
|
472
|
-
ref_key: "tableRef",
|
|
473
|
-
ref: u
|
|
474
|
-
}), {
|
|
475
|
-
default: z(() => [
|
|
476
|
-
f.value ? (x(), n(s, {
|
|
477
|
-
key: 0,
|
|
478
|
-
type: "selection",
|
|
479
|
-
selectable: l.selectable,
|
|
480
|
-
"column-key": "selection_0",
|
|
481
|
-
align: a.align,
|
|
482
|
-
fixed: "left"
|
|
483
|
-
}, null, 8, ["selectable", "align"])) : r("", !0),
|
|
484
|
-
d.value ? (x(), n(s, {
|
|
485
|
-
key: 1,
|
|
486
|
-
fixed: "left",
|
|
487
|
-
type: "index",
|
|
488
|
-
label: "序号",
|
|
489
|
-
width: "60",
|
|
490
|
-
"column-key": "index_1",
|
|
491
|
-
align: a.align
|
|
492
|
-
}, null, 8, ["align"])) : r("", !0),
|
|
493
|
-
(x(!0), i(e, null, w(p.value, (e, t) => (x(), n(Se, {
|
|
494
|
-
key: t + "column_" + e?.prop?.toString(),
|
|
495
|
-
column: e,
|
|
496
|
-
data: a.data,
|
|
497
|
-
align: a.align,
|
|
498
|
-
"onUpdate:data": _,
|
|
499
|
-
size: a.size
|
|
500
|
-
}, null, 8, [
|
|
501
|
-
"column",
|
|
502
|
-
"data",
|
|
503
|
-
"align",
|
|
504
|
-
"size"
|
|
505
|
-
]))), 128))
|
|
506
|
-
]),
|
|
507
|
-
_: 1
|
|
508
|
-
}, 16, ["border", "data"])), [[v, a.loading]]),
|
|
509
|
-
a.hidePagination ? r("", !0) : (x(), n(g, {
|
|
510
|
-
key: 0,
|
|
511
|
-
class: "ui-pagination",
|
|
512
|
-
size: "small",
|
|
513
|
-
background: "",
|
|
514
|
-
layout: "total, sizes, prev, pager, next, jumper",
|
|
515
|
-
"page-sizes": a.pagination?.pageSizes || [
|
|
516
|
-
10,
|
|
517
|
-
20,
|
|
518
|
-
50
|
|
519
|
-
],
|
|
520
|
-
"page-size": a.pagination.pageSize,
|
|
521
|
-
"onUpdate:pageSize": o[0] ||= (e) => a.pagination.pageSize = e,
|
|
522
|
-
"current-page": a.pagination.page,
|
|
523
|
-
"onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
|
|
524
|
-
total: a.pagination.total,
|
|
525
|
-
"onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
|
|
526
|
-
onChange: m
|
|
527
|
-
}, null, 8, [
|
|
528
|
-
"page-sizes",
|
|
529
|
-
"page-size",
|
|
530
|
-
"current-page",
|
|
531
|
-
"total"
|
|
532
|
-
])),
|
|
533
|
-
T(t.$slots, "default", {}, void 0, !0)
|
|
534
|
-
]);
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
}), we = /* @__PURE__ */ W({ default: () => Te }), Te = /* @__PURE__ */ G(Ce, [["__scopeId", "data-v-adf869c1"]]), Ee = ["src"], De = /* @__PURE__ */ u({
|
|
538
|
-
__name: "Icon",
|
|
539
|
-
props: {
|
|
540
|
-
name: {},
|
|
541
|
-
url: {},
|
|
542
|
-
size: {}
|
|
543
|
-
},
|
|
544
|
-
setup(e) {
|
|
545
|
-
return (t, a) => e.name ? (x(), n(O(t.$attrs.component || e.name), h({ key: 0 }, t.$attrs, { style: {
|
|
546
|
-
width: "100%",
|
|
547
|
-
height: "100%"
|
|
548
|
-
} }), null, 16)) : e.url ? (x(), i("img", {
|
|
549
|
-
key: 1,
|
|
550
|
-
src: e.url,
|
|
551
|
-
style: v({
|
|
552
|
-
width: e.size,
|
|
553
|
-
height: e.size
|
|
554
|
-
})
|
|
555
|
-
}, null, 12, Ee)) : r("", !0);
|
|
556
|
-
}
|
|
557
|
-
}), Oe = {
|
|
558
|
-
style: {
|
|
559
|
-
width: "100%",
|
|
560
|
-
height: "100%"
|
|
561
|
-
},
|
|
562
|
-
t: "1779702889490",
|
|
563
|
-
class: "icon",
|
|
564
|
-
viewBox: "0 0 1024 1024",
|
|
565
|
-
version: "1.1",
|
|
566
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
567
|
-
"p-id": "8979"
|
|
568
|
-
}, ke = /* @__PURE__ */ u({
|
|
569
|
-
__name: "Search",
|
|
570
|
-
setup(e) {
|
|
571
|
-
return (e, t) => (x(), i("svg", Oe, [...t[0] ||= [a("path", {
|
|
572
|
-
d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z",
|
|
573
|
-
"p-id": "8980"
|
|
574
|
-
}, null, -1)]]));
|
|
575
|
-
}
|
|
576
|
-
}), Ae = {
|
|
577
|
-
style: {
|
|
578
|
-
width: "100%",
|
|
579
|
-
height: "100%"
|
|
580
|
-
},
|
|
581
|
-
viewBox: "0 0 1024 1024",
|
|
582
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
583
|
-
}, je = /* @__PURE__ */ u({
|
|
584
|
-
__name: "CloseBold",
|
|
585
|
-
setup(e) {
|
|
586
|
-
return (e, t) => (x(), i("svg", Ae, [...t[0] ||= [a("path", {
|
|
587
|
-
d: "M512 476.25l256-256 33.75 33.75-256 256 256 256-33.75 33.75-256-256-256 256-33.75-33.75 256-256-256-256L256 220.25l256 256z",
|
|
588
|
-
fill: "currentColor"
|
|
589
|
-
}, null, -1)]]));
|
|
590
|
-
}
|
|
591
|
-
}), Me = {
|
|
592
|
-
style: {
|
|
593
|
-
width: "100%",
|
|
594
|
-
height: "100%"
|
|
595
|
-
},
|
|
596
|
-
t: "1779703362484",
|
|
597
|
-
class: "icon",
|
|
598
|
-
viewBox: "0 0 1024 1024",
|
|
599
|
-
version: "1.1",
|
|
600
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
601
|
-
"p-id": "10092"
|
|
602
|
-
}, Ne = /* @__PURE__ */ u({
|
|
603
|
-
__name: "User",
|
|
604
|
-
setup(e) {
|
|
605
|
-
return (e, t) => (x(), i("svg", Me, [...t[0] ||= [a("path", {
|
|
606
|
-
d: "M512 512c141.385 0 256-114.615 256-256S653.385 0 512 0 256 114.615 256 256s114.615 256 256 256zM366.336 110.336C405.244 71.428 456.976 50 512 50s106.756 21.428 145.664 60.336S718 200.976 718 256s-21.428 106.756-60.336 145.664S567.024 462 512 462s-106.756-21.428-145.664-60.336S306 311.024 306 256s21.428-106.756 60.336-145.664z",
|
|
607
|
-
fill: "#999999",
|
|
608
|
-
"p-id": "10093"
|
|
609
|
-
}, null, -1), a("path", {
|
|
610
|
-
d: "M716.903 474C669.947 527.911 590.06 562.11 512 562.11S354.053 527.911 307.097 474C184.731 524.207 112 620.226 112 730.426 112 892.563 291.087 1024 512 1024c220.914 0 400-131.438 400-293.574 0-110.2-72.731-206.22-195.097-256.426z m48.356 423.705c-32.252 23.672-70.063 42.335-112.384 55.473C608.365 966.994 560.969 974 512 974c-48.968 0-96.365-7.006-140.874-20.822-42.321-13.138-80.132-31.801-112.384-55.473C196.357 851.919 162 792.512 162 730.426c0-21.672 3.545-42.928 10.538-63.177 6.961-20.159 17.368-39.432 30.933-57.281 22.865-30.09 54.718-56.024 93.187-76.069C353.356 582.787 432.632 612.11 512 612.11c79.367 0 158.644-29.323 215.342-78.212 38.469 20.044 70.321 45.979 93.188 76.068 13.564 17.851 23.972 37.123 30.933 57.282 6.992 20.25 10.537 41.506 10.537 63.178 0 62.086-34.356 121.493-96.741 167.279z",
|
|
611
|
-
fill: "#999999",
|
|
612
|
-
"p-id": "10094"
|
|
613
|
-
}, null, -1)]]));
|
|
614
|
-
}
|
|
615
|
-
}), Pe = {
|
|
616
|
-
style: {
|
|
617
|
-
width: "100%",
|
|
618
|
-
height: "100%"
|
|
619
|
-
},
|
|
620
|
-
t: "1779705400881",
|
|
621
|
-
class: "icon",
|
|
622
|
-
viewBox: "0 0 1152 1024",
|
|
623
|
-
version: "1.1",
|
|
624
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
625
|
-
"p-id": "11055"
|
|
626
|
-
}, Fe = /* @__PURE__ */ u({
|
|
627
|
-
__name: "Plus",
|
|
628
|
-
setup(e) {
|
|
629
|
-
return (e, t) => (x(), i("svg", Pe, [...t[0] ||= [a("path", {
|
|
630
|
-
d: "M489.244444 489.244444v295.822223c0 18.850702-15.282631 34.133333-34.133333 34.133333s-34.133333-15.282631-34.133333-34.133333v-295.822223h-295.822222c-18.850702 0-34.133333-15.282631-34.133334-34.133333s15.282631-34.133333 34.133334-34.133333h295.822222v-295.822222c0-18.850702 15.282631-34.133333 34.133333-34.133334s34.133333 15.282631 34.133333 34.133334v295.822222h295.822223c18.850702 0 34.133333 15.282631 34.133333 34.133333s-15.282631 34.133333-34.133333 34.133333h-295.822223z",
|
|
631
|
-
fill: "#323233",
|
|
632
|
-
"p-id": "11056"
|
|
633
|
-
}, null, -1)]]));
|
|
634
|
-
}
|
|
635
|
-
}), Ie = {}, Le = {
|
|
636
|
-
style: {
|
|
637
|
-
width: "100%",
|
|
638
|
-
height: "100%"
|
|
639
|
-
},
|
|
640
|
-
t: "1779754328342",
|
|
641
|
-
class: "icon",
|
|
642
|
-
viewBox: "0 0 1024 1024",
|
|
643
|
-
version: "1.1",
|
|
644
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
645
|
-
"p-id": "4859"
|
|
646
|
-
};
|
|
647
|
-
function Re(e, t) {
|
|
648
|
-
return x(), i("svg", Le, [...t[0] ||= [a("path", {
|
|
649
|
-
d: "M731.733333 480l-384-341.333333c-17.066667-14.933333-44.8-14.933333-59.733333 4.266666-14.933333 17.066667-14.933333 44.8 4.266667 59.733334L640 512 292.266667 821.333333c-17.066667 14.933333-19.2 42.666667-4.266667 59.733334 8.533333 8.533333 19.2 14.933333 32 14.933333 10.666667 0 19.2-4.266667 27.733333-10.666667l384-341.333333c8.533333-8.533333 14.933333-19.2 14.933334-32s-4.266667-23.466667-14.933334-32z",
|
|
650
|
-
fill: "#666666",
|
|
651
|
-
"p-id": "4860"
|
|
652
|
-
}, null, -1)]]);
|
|
653
|
-
}
|
|
654
|
-
var ze = /* @__PURE__ */ G(Ie, [["render", Re]]), Be = {}, Ve = {
|
|
655
|
-
style: {
|
|
656
|
-
width: "100%",
|
|
657
|
-
height: "100%"
|
|
658
|
-
},
|
|
659
|
-
t: "1779754450238",
|
|
660
|
-
class: "icon",
|
|
661
|
-
viewBox: "0 0 1024 1024",
|
|
662
|
-
version: "1.1",
|
|
663
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
664
|
-
"p-id": "6029"
|
|
665
|
-
};
|
|
666
|
-
function He(e, t) {
|
|
667
|
-
return x(), i("svg", Ve, [...t[0] ||= [a("path", {
|
|
668
|
-
d: "M897.96 728.3c-18.8 18.8-49.1 18.801-67.901 0l-318-318-318 318c-18.8 18.8-49.2 18.8-67.901 0-18.8-18.8-18.801-49.1 0-67.901l352-352c18.8-18.8 49.2-18.8 67.901 0l352 352c9.4 9.4 14 21.7 14 34-0.1 12.2-4.7 24.501-14.1 33.9z",
|
|
669
|
-
"p-id": "6030"
|
|
670
|
-
}, null, -1)]]);
|
|
671
|
-
}
|
|
672
|
-
var Ue = /* @__PURE__ */ G(Be, [["render", He]]), We = {}, Ge = {
|
|
673
|
-
style: {
|
|
674
|
-
width: "100%",
|
|
675
|
-
height: "100%"
|
|
676
|
-
},
|
|
677
|
-
t: "1779754522950",
|
|
678
|
-
class: "icon",
|
|
679
|
-
viewBox: "0 0 1024 1024",
|
|
680
|
-
version: "1.1",
|
|
681
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
682
|
-
"p-id": "6997"
|
|
683
|
-
};
|
|
684
|
-
function Ke(e, t) {
|
|
685
|
-
return x(), i("svg", Ge, [...t[0] ||= [a("path", {
|
|
686
|
-
d: "M512.34133333 931.38488889c-49.94844445 0-98.87288889-8.64711111-145.29422222-25.82755556-44.94222222-16.61155555-86.35733333-40.61866667-123.22133333-71.45244444-74.29688889-61.89511111-125.15555555-148.02488889-143.24622223-242.34666667l71.45244445-13.76711111c31.28888889 162.58844445 174.42133333 280.576 340.30933333 280.576 70.08711111 0 137.55733333-20.82133333 195.12888889-60.07466666 56.32-38.45688889 99.66933333-91.93244445 125.49688889-154.73777778l67.35644444 27.648c-31.28888889 76.00355555-83.74044445 140.74311111-151.77955555 187.16444444-69.85955555 47.67288889-151.43822222 72.81777778-236.20266667 72.81777778zM846.848 421.43288889C827.392 349.29777778 783.92888889 284.33066667 724.65066667 238.13688889c-61.21244445-47.55911111-134.59911111-72.704-212.30933334-72.704-69.97333333 0-137.44355555 20.70755555-194.90133333 59.96088889-56.32 38.57066667-99.78311111 91.93244445-125.61066667 154.624l-67.35644444-27.76177778c31.28888889-75.88977778 83.74044445-140.40177778 151.77955556-186.82311111 69.74577778-47.55911111 151.32444445-72.704 235.9751111-72.704 47.33155555 0 93.86666667 7.85066667 138.12622223 23.32444444 42.89422222 14.90488889 82.83022222 36.75022222 118.784 64.62577778 35.61244445 27.648 66.33244445 60.64355555 91.47733333 98.07644444 25.48622222 38.00177778 44.48711111 79.64444445 56.32 123.67644445l-70.08711111 19.00088889z",
|
|
687
|
-
"p-id": "6998"
|
|
688
|
-
}, null, -1), a("path", {
|
|
689
|
-
d: "M30.26488889 669.35466667l93.52533333-162.58844445 162.58844445 93.52533333M997.71733333 345.20177778l-83.28533333 168.16355555-168.16355555-83.17155555",
|
|
690
|
-
"p-id": "6999"
|
|
691
|
-
}, null, -1)]]);
|
|
692
|
-
}
|
|
693
|
-
var qe = /* @__PURE__ */ G(We, [["render", Ke]]), Je = {}, Ye = {
|
|
694
|
-
style: {
|
|
695
|
-
width: "100%",
|
|
696
|
-
height: "100%"
|
|
697
|
-
},
|
|
698
|
-
t: "1779754755766",
|
|
699
|
-
class: "icon",
|
|
700
|
-
viewBox: "0 0 1024 1024",
|
|
701
|
-
version: "1.1",
|
|
702
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
703
|
-
"p-id": "9850"
|
|
704
|
-
};
|
|
705
|
-
function Xe(e, t) {
|
|
706
|
-
return x(), i("svg", Ye, [...t[0] ||= [a("path", {
|
|
707
|
-
d: "M64 448l832-320-128 704-446.016-243.008L832 192 243.008 544.96 64 448z m256 512v-303.04L512 768l-192 192z",
|
|
708
|
-
"p-id": "9851"
|
|
709
|
-
}, null, -1)]]);
|
|
710
|
-
}
|
|
711
|
-
var Ze = /* @__PURE__ */ G(Je, [["render", Xe]]), Qe = /* @__PURE__ */ W({
|
|
712
|
-
ArrowRight: () => ze,
|
|
713
|
-
ArrowUp: () => Ue,
|
|
714
|
-
CloseBold: () => je,
|
|
715
|
-
Plus: () => Fe,
|
|
716
|
-
Promotion: () => Ze,
|
|
717
|
-
Refresh: () => qe,
|
|
718
|
-
Search: () => ke,
|
|
719
|
-
User: () => Ne,
|
|
720
|
-
YcIcon: () => De
|
|
721
|
-
});
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region src/components/utils/tools.ts
|
|
724
|
-
function $e(e) {
|
|
725
|
-
return typeof e == "number" ? e + "px" : e || "100px";
|
|
726
|
-
}
|
|
727
|
-
function et(e) {
|
|
728
|
-
return typeof e == "number" ? e + "px" : e || "180px";
|
|
729
|
-
}
|
|
730
|
-
function Y(e, t) {
|
|
731
|
-
let n = Object.fromEntries(Object.entries(J).map(([n, r]) => [n, (i = {}) => ({
|
|
732
|
-
props: {
|
|
733
|
-
...i,
|
|
734
|
-
data: t,
|
|
735
|
-
prop: e.prop
|
|
736
|
-
},
|
|
737
|
-
type: n,
|
|
738
|
-
component: r
|
|
739
|
-
})]));
|
|
740
|
-
return typeof e.render == "function" ? e.render({
|
|
741
|
-
h: n,
|
|
742
|
-
data: t
|
|
743
|
-
}) : n.input({ prop: e.prop });
|
|
744
|
-
}
|
|
745
|
-
function X(e, t) {
|
|
746
|
-
let n = e.prop;
|
|
747
|
-
n && typeof t == "object" && t && t[n];
|
|
748
|
-
let r = Y(e, t);
|
|
749
|
-
return typeof r != "object" || !r ? r ?? "" : (r.component, r);
|
|
750
|
-
}
|
|
751
|
-
//#endregion
|
|
752
|
-
//#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
753
|
-
var tt = { style: {
|
|
754
|
-
display: "flex",
|
|
755
|
-
"justify-content": "end",
|
|
756
|
-
"align-items": "center",
|
|
757
|
-
width: "100%"
|
|
758
|
-
} }, nt = /* @__PURE__ */ u({
|
|
759
|
-
name: "UiDefaultFilter",
|
|
760
|
-
__name: "index",
|
|
761
|
-
props: {
|
|
762
|
-
type: {},
|
|
763
|
-
size: { default: "default" },
|
|
764
|
-
fields: {},
|
|
765
|
-
expandNum: {},
|
|
766
|
-
valueWidth: { default: "100%" },
|
|
767
|
-
labelWidth: { default: "100px" },
|
|
768
|
-
omitFields: { default: () => [] },
|
|
769
|
-
rules: {},
|
|
770
|
-
required: { type: Boolean },
|
|
771
|
-
column: { default: 4 },
|
|
772
|
-
filterFixedValues: { default: () => ({ page: 1 }) }
|
|
773
|
-
},
|
|
774
|
-
emits: [
|
|
775
|
-
"submit",
|
|
776
|
-
"reset",
|
|
777
|
-
"search"
|
|
778
|
-
],
|
|
779
|
-
setup(s, { emit: u }) {
|
|
780
|
-
let d = u, f = o(s, [
|
|
781
|
-
"fields",
|
|
782
|
-
"labelWidth",
|
|
783
|
-
"valueWidth",
|
|
784
|
-
"omitFields",
|
|
785
|
-
"column",
|
|
786
|
-
"size",
|
|
787
|
-
"filterFixedValues"
|
|
788
|
-
]), p = S({
|
|
789
|
-
expandNum: 0,
|
|
790
|
-
expand: !1
|
|
791
|
-
}), m = S({}), g = t(() => s.fields.slice(0, p.expand ? s.fields.length : p.expandNum)), _ = t(() => 24 - g.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
|
|
792
|
-
y(() => {
|
|
793
|
-
p.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
|
|
794
|
-
let t = Y(e, m)?.props?.defaultValue;
|
|
795
|
-
t !== void 0 && (m[e.prop] = t);
|
|
796
|
-
});
|
|
797
|
-
});
|
|
798
|
-
function b() {
|
|
799
|
-
let e = {};
|
|
800
|
-
Object.keys(m).forEach((t) => {
|
|
801
|
-
if (m[t] !== void 0) {
|
|
802
|
-
let n = N(m[t]);
|
|
803
|
-
e[t] = typeof n == "string" ? n.trim() : n;
|
|
804
|
-
}
|
|
805
|
-
}), d("submit", {
|
|
806
|
-
...e,
|
|
807
|
-
...s.filterFixedValues
|
|
808
|
-
}), d("search", {
|
|
809
|
-
...e,
|
|
810
|
-
...s.filterFixedValues
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
function C() {
|
|
814
|
-
Object.keys(m).forEach((e) => {
|
|
815
|
-
s.omitFields.includes(e) || (m[e] = void 0);
|
|
816
|
-
}), d("reset", m);
|
|
817
|
-
}
|
|
818
|
-
return (t, o) => {
|
|
819
|
-
let u = E("el-input"), d = E("el-form-item"), f = E("el-col"), y = E("el-button"), S = E("el-row"), D = E("el-form");
|
|
820
|
-
return x(), n(D, h({
|
|
821
|
-
model: m,
|
|
822
|
-
class: "ui-filter",
|
|
823
|
-
size: s.size
|
|
824
|
-
}, t.$attrs), {
|
|
825
|
-
default: z(() => [l(S, {
|
|
826
|
-
gutter: 20,
|
|
827
|
-
style: { "margin-bottom": "-15px" }
|
|
828
|
-
}, {
|
|
829
|
-
default: z(() => [(x(!0), i(e, null, w(g.value, (e) => (x(), n(f, { span: e.span || 24 / s.column }, {
|
|
830
|
-
default: z(() => [(x(), n(d, {
|
|
831
|
-
key: e.prop,
|
|
832
|
-
label: e.label,
|
|
833
|
-
"label-width": P($e)(e?.labelWidth || s.labelWidth),
|
|
834
|
-
"value-width": P(et)(e?.valueWidth || s.valueWidth)
|
|
835
|
-
}, {
|
|
836
|
-
default: z(() => [e.render ? (x(), n(O(P(Y)(e, m).component), h({
|
|
837
|
-
key: 0,
|
|
838
|
-
modelValue: m[e.prop],
|
|
839
|
-
"onUpdate:modelValue": (t) => m[e.prop] = t
|
|
840
|
-
}, { ref_for: !0 }, P(Y)(e, m).props, {
|
|
841
|
-
clearable: !0,
|
|
842
|
-
style: { width: P(et)(e?.valueWidth || s.valueWidth) }
|
|
843
|
-
}), null, 16, [
|
|
844
|
-
"modelValue",
|
|
845
|
-
"onUpdate:modelValue",
|
|
846
|
-
"style"
|
|
847
|
-
])) : (x(), n(u, {
|
|
848
|
-
key: 1,
|
|
849
|
-
modelValue: m[e.prop],
|
|
850
|
-
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
851
|
-
placeholder: "请输入",
|
|
852
|
-
clearable: !0,
|
|
853
|
-
style: v({ width: P(et)(e?.valueWidth || s.valueWidth) })
|
|
854
|
-
}, null, 8, [
|
|
855
|
-
"modelValue",
|
|
856
|
-
"onUpdate:modelValue",
|
|
857
|
-
"style"
|
|
858
|
-
]))]),
|
|
859
|
-
_: 2
|
|
860
|
-
}, 1032, [
|
|
861
|
-
"label",
|
|
862
|
-
"label-width",
|
|
863
|
-
"value-width"
|
|
864
|
-
]))]),
|
|
865
|
-
_: 2
|
|
866
|
-
}, 1032, ["span"]))), 256)), l(f, {
|
|
867
|
-
span: 24 / s.column,
|
|
868
|
-
offset: _.value
|
|
869
|
-
}, {
|
|
870
|
-
default: z(() => [l(d, {
|
|
871
|
-
label: "",
|
|
872
|
-
"label-width": "30px"
|
|
873
|
-
}, {
|
|
874
|
-
default: z(() => [a("div", tt, [
|
|
875
|
-
T(t.$slots, "left", { form: m }, void 0, !0),
|
|
876
|
-
s.fields.length >= 2 * s.column ? (x(), n(y, {
|
|
877
|
-
key: 0,
|
|
878
|
-
text: "",
|
|
879
|
-
icon: p.expand ? P(Ue) : P(ze),
|
|
880
|
-
onClick: o[0] ||= (e) => p.expand = !p.expand
|
|
881
|
-
}, {
|
|
882
|
-
default: z(() => [c(j(p.expand ? "收起" : "展开"), 1)]),
|
|
883
|
-
_: 1
|
|
884
|
-
}, 8, ["icon"])) : r("", !0),
|
|
885
|
-
l(y, {
|
|
886
|
-
icon: P(ke),
|
|
887
|
-
type: "primary",
|
|
888
|
-
onClick: b
|
|
889
|
-
}, {
|
|
890
|
-
default: z(() => [...o[1] ||= [c("查询", -1)]]),
|
|
891
|
-
_: 1
|
|
892
|
-
}, 8, ["icon"]),
|
|
893
|
-
l(y, {
|
|
894
|
-
icon: P(qe),
|
|
895
|
-
onClick: C
|
|
896
|
-
}, {
|
|
897
|
-
default: z(() => [...o[2] ||= [c("重置", -1)]]),
|
|
898
|
-
_: 1
|
|
899
|
-
}, 8, ["icon"]),
|
|
900
|
-
T(t.$slots, "handle", { form: m }, void 0, !0),
|
|
901
|
-
T(t.$slots, "right", { form: m }, void 0, !0)
|
|
902
|
-
])]),
|
|
903
|
-
_: 3
|
|
904
|
-
})]),
|
|
905
|
-
_: 3
|
|
906
|
-
}, 8, ["span", "offset"])]),
|
|
907
|
-
_: 3
|
|
908
|
-
})]),
|
|
909
|
-
_: 3
|
|
910
|
-
}, 16, ["model", "size"]);
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
}), rt = /* @__PURE__ */ W({ default: () => it }), it = /* @__PURE__ */ G(nt, [["__scopeId", "data-v-0e3c7086"]]), at = {
|
|
914
|
-
key: 0,
|
|
915
|
-
style: { display: "inline-block" }
|
|
916
|
-
}, ot = {
|
|
917
|
-
key: 0,
|
|
918
|
-
style: { display: "inline-block" }
|
|
919
|
-
}, st = {
|
|
920
|
-
key: 0,
|
|
921
|
-
class: "ui-form-buttons"
|
|
922
|
-
}, ct = /* @__PURE__ */ u({
|
|
923
|
-
__name: "index",
|
|
924
|
-
props: {
|
|
925
|
-
fields: {},
|
|
926
|
-
expandNum: {},
|
|
927
|
-
valueWidth: {},
|
|
928
|
-
labelWidth: {},
|
|
929
|
-
labelPosition: {},
|
|
930
|
-
omitFields: {},
|
|
931
|
-
rules: {},
|
|
932
|
-
required: { type: Boolean },
|
|
933
|
-
column: {},
|
|
934
|
-
defaultValues: {},
|
|
935
|
-
model: {},
|
|
936
|
-
modelValue: {},
|
|
937
|
-
valueModel: {},
|
|
938
|
-
size: {}
|
|
939
|
-
},
|
|
940
|
-
emits: [
|
|
941
|
-
"submit",
|
|
942
|
-
"reset",
|
|
943
|
-
"update:model",
|
|
944
|
-
"update:modelValue"
|
|
945
|
-
],
|
|
946
|
-
setup(a, { expose: o, emit: s }) {
|
|
947
|
-
ee((e) => ({ v37071bce: P(k) / 2 }));
|
|
948
|
-
let u = s, d = a, { fields: f, labelWidth: p = "100px", valueWidth: m = "auto", omitFields: g = [], rules: y = S({}), labelPosition: b = "top", valueModel: D = "default", column: k = 24 } = d, A = C(0), N = C(), F = t(() => d.modelValue !== void 0), I = S({}), L = t(() => F.value ? d.modelValue : d.model || I), R = t({
|
|
949
|
-
get: () => L.value,
|
|
950
|
-
set: (e) => {
|
|
951
|
-
F.value && u("update:modelValue", e);
|
|
952
|
-
}
|
|
953
|
-
}), B = t(() => f.filter((e) => typeof e.prop == "string")), te = t(() => {
|
|
954
|
-
if (y && Object.keys(y).length) return y;
|
|
955
|
-
let e = {};
|
|
956
|
-
return f.forEach((t) => {
|
|
957
|
-
t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
|
|
958
|
-
required: !0,
|
|
959
|
-
message: "请输入" + t.label,
|
|
960
|
-
trigger: "change"
|
|
961
|
-
}]);
|
|
962
|
-
}), e;
|
|
963
|
-
});
|
|
964
|
-
async function V() {
|
|
965
|
-
await N.value?.validate().catch(() => !1) && u("submit", M(L.value));
|
|
966
|
-
}
|
|
967
|
-
function H() {
|
|
968
|
-
let e = {};
|
|
969
|
-
Object.keys(L.value).forEach((t) => {
|
|
970
|
-
g.includes(t) || (e[t] = void 0);
|
|
971
|
-
}), Object.assign(L.value, e), A.value += 1, u("reset", M(L.value));
|
|
972
|
-
}
|
|
973
|
-
function U() {
|
|
974
|
-
return M(L.value);
|
|
975
|
-
}
|
|
976
|
-
function W(e) {
|
|
977
|
-
Object.assign(L.value, e);
|
|
978
|
-
}
|
|
979
|
-
function ne() {
|
|
980
|
-
N.value?.clearValidate();
|
|
981
|
-
}
|
|
982
|
-
async function re() {
|
|
983
|
-
return new Promise((e) => {
|
|
984
|
-
N.value?.validate((t, n) => e(n));
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
return o({
|
|
988
|
-
getValues: U,
|
|
989
|
-
setValues: W,
|
|
990
|
-
clearValidate: ne,
|
|
991
|
-
onSubmit: V,
|
|
992
|
-
validate: re
|
|
993
|
-
}), (t, a) => {
|
|
994
|
-
let o = E("el-input"), s = E("el-form-item"), u = E("el-form"), d = E("el-button");
|
|
995
|
-
return x(), i(e, null, [l(u, h({
|
|
996
|
-
ref_key: "uiFormRef",
|
|
997
|
-
ref: N,
|
|
998
|
-
model: R.value
|
|
999
|
-
}, t.$attrs, {
|
|
1000
|
-
rules: te.value,
|
|
1001
|
-
inline: P(b) !== "top",
|
|
1002
|
-
"label-position": P(b),
|
|
1003
|
-
class: {
|
|
1004
|
-
"ui-form": !0,
|
|
1005
|
-
horizontal: P(b) !== "top"
|
|
1006
|
-
},
|
|
1007
|
-
"validate-on-rule-change": !1
|
|
1008
|
-
}), {
|
|
1009
|
-
default: z(() => [(x(!0), i(e, null, w(B.value, (r) => (x(), n(s, {
|
|
1010
|
-
key: r.prop,
|
|
1011
|
-
label: r.label,
|
|
1012
|
-
"label-width": P(p),
|
|
1013
|
-
"value-width": P(m),
|
|
1014
|
-
prop: r.prop,
|
|
1015
|
-
style: v({
|
|
1016
|
-
width: `${r?.width ? r?.width + "px" : "100%"}`,
|
|
1017
|
-
gridColumn: `span ${(r?.span || P(k)) / 2 || 1}`
|
|
1018
|
-
})
|
|
1019
|
-
}, {
|
|
1020
|
-
default: z(() => [r.render ? (x(), i(e, { key: 0 }, [P(X)(r, R.value).component ? (x(), n(O(P(X)(r, R.value).component), h({
|
|
1021
|
-
key: 1,
|
|
1022
|
-
modelValue: R.value[r.prop],
|
|
1023
|
-
"onUpdate:modelValue": (e) => R.value[r.prop] = e
|
|
1024
|
-
}, { ref_for: !0 }, P(X)(r, R.value).props, {
|
|
1025
|
-
clearable: !0,
|
|
1026
|
-
key: `${r.prop}-${A.value}`,
|
|
1027
|
-
style: { display: "inline-block" },
|
|
1028
|
-
class: { underline: P(D) === "underline" }
|
|
1029
|
-
}), null, 16, [
|
|
1030
|
-
"modelValue",
|
|
1031
|
-
"onUpdate:modelValue",
|
|
1032
|
-
"class"
|
|
1033
|
-
])) : (x(), i("span", at, j(P(X)(r, R.value) || "-"), 1)), (x(!0), i(e, null, w(r.slots, (e) => T(t.$slots, "default", { form: R.value }, () => [P(X)(e, R.value).component ? (x(), n(O(P(X)(e, R.value).component), h({
|
|
1034
|
-
key: 1,
|
|
1035
|
-
modelValue: R.value[e.prop],
|
|
1036
|
-
"onUpdate:modelValue": (t) => R.value[e.prop] = t,
|
|
1037
|
-
"default-value": e.defaultValue,
|
|
1038
|
-
placeholder: e.placeholder
|
|
1039
|
-
}, { ref_for: !0 }, P(X)(e, R.value).props, {
|
|
1040
|
-
style: {
|
|
1041
|
-
display: "inline-block",
|
|
1042
|
-
marginLeft: "10px",
|
|
1043
|
-
width: `${e.width ? e.width + "px" : "100%"}`
|
|
1044
|
-
},
|
|
1045
|
-
class: { underline: P(D) === "underline" },
|
|
1046
|
-
clearable: !0,
|
|
1047
|
-
key: `${e.prop}-${A.value}`
|
|
1048
|
-
}), null, 16, [
|
|
1049
|
-
"modelValue",
|
|
1050
|
-
"onUpdate:modelValue",
|
|
1051
|
-
"default-value",
|
|
1052
|
-
"placeholder",
|
|
1053
|
-
"style",
|
|
1054
|
-
"class"
|
|
1055
|
-
])) : (x(), i("span", ot, j(P(X)(e, R.value) || "-"), 1))], !0)), 256))], 64)) : (x(), n(o, {
|
|
1056
|
-
key: 1,
|
|
1057
|
-
modelValue: R.value[r.prop],
|
|
1058
|
-
"onUpdate:modelValue": (e) => R.value[r.prop] = e,
|
|
1059
|
-
placeholder: "请输入",
|
|
1060
|
-
clearable: !0,
|
|
1061
|
-
class: _({ underline: P(D) === "underline" })
|
|
1062
|
-
}, null, 8, [
|
|
1063
|
-
"modelValue",
|
|
1064
|
-
"onUpdate:modelValue",
|
|
1065
|
-
"class"
|
|
1066
|
-
]))]),
|
|
1067
|
-
_: 2
|
|
1068
|
-
}, 1032, [
|
|
1069
|
-
"label",
|
|
1070
|
-
"label-width",
|
|
1071
|
-
"value-width",
|
|
1072
|
-
"prop",
|
|
1073
|
-
"style"
|
|
1074
|
-
]))), 128))]),
|
|
1075
|
-
_: 3
|
|
1076
|
-
}, 16, [
|
|
1077
|
-
"model",
|
|
1078
|
-
"rules",
|
|
1079
|
-
"inline",
|
|
1080
|
-
"label-position",
|
|
1081
|
-
"class"
|
|
1082
|
-
]), t.$attrs?.hideHandle ? r("", !0) : (x(), i("div", st, [
|
|
1083
|
-
T(t.$slots, "handle", { form: R.value }, void 0, !0),
|
|
1084
|
-
l(d, {
|
|
1085
|
-
icon: P(qe),
|
|
1086
|
-
onClick: H,
|
|
1087
|
-
size: t.$props.size
|
|
1088
|
-
}, {
|
|
1089
|
-
default: z(() => [...a[0] ||= [c("重置", -1)]]),
|
|
1090
|
-
_: 1
|
|
1091
|
-
}, 8, ["icon", "size"]),
|
|
1092
|
-
l(d, {
|
|
1093
|
-
icon: P(Ze),
|
|
1094
|
-
type: "primary",
|
|
1095
|
-
onClick: V,
|
|
1096
|
-
size: t.$props.size
|
|
1097
|
-
}, {
|
|
1098
|
-
default: z(() => [...a[1] ||= [c("提交", -1)]]),
|
|
1099
|
-
_: 1
|
|
1100
|
-
}, 8, ["icon", "size"])
|
|
1101
|
-
]))], 64);
|
|
1102
|
-
};
|
|
1103
|
-
}
|
|
1104
|
-
}), lt = /* @__PURE__ */ W({ default: () => ut }), ut = /* @__PURE__ */ G(ct, [["__scopeId", "data-v-21f3a974"]]), dt = ["disabled"], ft = /* @__PURE__ */ u({
|
|
1105
|
-
__name: "index",
|
|
1106
|
-
props: /* @__PURE__ */ m({
|
|
1107
|
-
defaultValue: { default: "" },
|
|
1108
|
-
disabled: {
|
|
1109
|
-
type: Boolean,
|
|
1110
|
-
default: !1
|
|
1111
|
-
}
|
|
1112
|
-
}, {
|
|
1113
|
-
modelValue: {
|
|
1114
|
-
type: String,
|
|
1115
|
-
default: ""
|
|
1116
|
-
},
|
|
1117
|
-
modelModifiers: {}
|
|
1118
|
-
}),
|
|
1119
|
-
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
1120
|
-
setup(e, { emit: t }) {
|
|
1121
|
-
let n = C(), r = I(e, "modelValue"), a = C(r.value || e.defaultValue || ""), o = null, s = t;
|
|
1122
|
-
return y(() => {
|
|
1123
|
-
o = new H({
|
|
1124
|
-
element: n.value,
|
|
1125
|
-
placeholder: "点击输入内容...",
|
|
1126
|
-
content: r.value || e.defaultValue || "",
|
|
1127
|
-
toolbarExcludeKeys: ["ai"],
|
|
1128
|
-
onChange: (e) => {
|
|
1129
|
-
let t = e.getHtml();
|
|
1130
|
-
r.value = t, a.value = t, s("change", t);
|
|
1131
|
-
}
|
|
1132
|
-
}), o.setEditable(!e.disabled);
|
|
1133
|
-
}), L(r, (e) => {
|
|
1134
|
-
o && e !== o.getHtml() && o.setContent(e);
|
|
1135
|
-
}), b(() => {
|
|
1136
|
-
o && o.destroy();
|
|
1137
|
-
}), (t, r) => (x(), i("div", {
|
|
1138
|
-
ref_key: "editorRef",
|
|
1139
|
-
ref: n,
|
|
1140
|
-
style: { height: "500px" },
|
|
1141
|
-
disabled: e.disabled
|
|
1142
|
-
}, null, 8, dt));
|
|
1143
|
-
}
|
|
1144
|
-
}), pt = /* @__PURE__ */ W({ default: () => mt }), mt = ft, ht = { class: "ui-tree-wrapper" }, gt = {
|
|
1145
|
-
key: 0,
|
|
1146
|
-
style: {
|
|
1147
|
-
display: "flex",
|
|
1148
|
-
"flex-direction": "row",
|
|
1149
|
-
"justify-content": "space-between",
|
|
1150
|
-
"align-items": "center",
|
|
1151
|
-
gap: "10px"
|
|
1152
|
-
}
|
|
1153
|
-
}, _t = {
|
|
1154
|
-
key: 0,
|
|
1155
|
-
class: "custom-tree-node"
|
|
1156
|
-
}, vt = { class: "node-label" }, yt = { key: 0 }, bt = ["onClick"], xt = /* @__PURE__ */ u({
|
|
1157
|
-
__name: "index",
|
|
1158
|
-
props: {
|
|
1159
|
-
id: {},
|
|
1160
|
-
data: { default: () => [] },
|
|
1161
|
-
filterable: { type: Boolean },
|
|
1162
|
-
placeholder: {},
|
|
1163
|
-
hidePlusHandle: { type: Boolean },
|
|
1164
|
-
hideNodeAdd: { type: Boolean },
|
|
1165
|
-
hideNodeEdit: { type: Boolean },
|
|
1166
|
-
hideNodeDel: { type: Boolean },
|
|
1167
|
-
hideNodeHandle: { type: Boolean },
|
|
1168
|
-
onNodeAdd: { type: Function },
|
|
1169
|
-
onNodeEdit: { type: Function },
|
|
1170
|
-
onNodeDel: { type: Function },
|
|
1171
|
-
showTotal: { type: Boolean },
|
|
1172
|
-
"show-total": { type: Boolean },
|
|
1173
|
-
nodeKey: {},
|
|
1174
|
-
props: { default: () => ({ label: "label" }) }
|
|
1175
|
-
},
|
|
1176
|
-
emits: [
|
|
1177
|
-
"add",
|
|
1178
|
-
"edit",
|
|
1179
|
-
"delete"
|
|
1180
|
-
],
|
|
1181
|
-
setup(e, { emit: s }) {
|
|
1182
|
-
let u = s, f = F(), p = o(e, [
|
|
1183
|
-
"filterable",
|
|
1184
|
-
"placeholder",
|
|
1185
|
-
"data",
|
|
1186
|
-
"props"
|
|
1187
|
-
]), m = C(""), g = C(), _ = C(), v = d()?.appContext.config.globalProperties.$messageBox;
|
|
1188
|
-
L(m, (t) => {
|
|
1189
|
-
e.filterable && _.value?.filter(t);
|
|
1190
|
-
});
|
|
1191
|
-
let y = t(() => f?.["show-total"] ?? p?.showTotal ?? !0);
|
|
1192
|
-
function b(t, n) {
|
|
1193
|
-
return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
|
|
1194
|
-
}
|
|
1195
|
-
function S(e, t) {
|
|
1196
|
-
e?.stopPropagation(), g.value = t.id;
|
|
1197
|
-
}
|
|
1198
|
-
function w(e) {
|
|
1199
|
-
v?.prompt("请输入新的名称", "添加节点", {
|
|
1200
|
-
confirmButtonText: "确定",
|
|
1201
|
-
cancelButtonText: "取消"
|
|
1202
|
-
}).then(({ value: t }) => {
|
|
1203
|
-
u("add", {
|
|
1204
|
-
node: e,
|
|
1205
|
-
value: t
|
|
1206
|
-
});
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
function D(t) {
|
|
1210
|
-
v?.prompt("请输入新的名称", "重命名", {
|
|
1211
|
-
confirmButtonText: "确定",
|
|
1212
|
-
cancelButtonText: "取消",
|
|
1213
|
-
inputValue: e.props?.label ? t[e.props?.label] : ""
|
|
1214
|
-
}).then(({ value: e }) => {
|
|
1215
|
-
u("edit", {
|
|
1216
|
-
node: t,
|
|
1217
|
-
value: e
|
|
1218
|
-
});
|
|
1219
|
-
});
|
|
1220
|
-
}
|
|
1221
|
-
async function O(e) {
|
|
1222
|
-
e.id && u("delete", e);
|
|
1223
|
-
}
|
|
1224
|
-
return (t, o) => {
|
|
1225
|
-
let s = E("el-input"), u = E("el-button"), d = E("el-dropdown-item"), f = E("el-dropdown-menu"), g = E("el-dropdown"), v = E("el-tree-v2");
|
|
1226
|
-
return x(), i("div", ht, [
|
|
1227
|
-
e.filterable ? (x(), i("div", gt, [l(s, {
|
|
1228
|
-
modelValue: m.value,
|
|
1229
|
-
"onUpdate:modelValue": o[0] ||= (e) => m.value = e,
|
|
1230
|
-
placeholder: e.placeholder ?? "请输入",
|
|
1231
|
-
clearable: ""
|
|
1232
|
-
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (x(), n(u, {
|
|
1233
|
-
key: 0,
|
|
1234
|
-
style: {
|
|
1235
|
-
margin: "0px",
|
|
1236
|
-
padding: "0px"
|
|
1237
|
-
},
|
|
1238
|
-
link: "",
|
|
1239
|
-
onClick: o[1] ||= (e) => w()
|
|
1240
|
-
}, {
|
|
1241
|
-
default: z(() => [...o[2] ||= [a("span", { style: { padding: "4px" } }, "+", -1)]]),
|
|
1242
|
-
_: 1
|
|
1243
|
-
}))])) : r("", !0),
|
|
1244
|
-
T(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
|
|
1245
|
-
l(v, h({
|
|
1246
|
-
ref_key: "treeRef",
|
|
1247
|
-
ref: _,
|
|
1248
|
-
style: { "margin-top": "8px" }
|
|
1249
|
-
}, {
|
|
1250
|
-
...t.$props,
|
|
1251
|
-
...t.$attrs
|
|
1252
|
-
}, {
|
|
1253
|
-
"node-key": p?.nodeKey || "id",
|
|
1254
|
-
"highlight-current": !0,
|
|
1255
|
-
"filter-method": b
|
|
1256
|
-
}), {
|
|
1257
|
-
default: z((s) => [s?.data ? (x(), i("div", _t, [a("div", vt, [s.data?.children?.length ? (x(), i("span", yt, "📁")) : r("", !0), c(" " + j(s.data?.[e.props?.label || "label"]) + " " + j(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (x(), n(g, {
|
|
1258
|
-
key: 0,
|
|
1259
|
-
trigger: "click"
|
|
1260
|
-
}, {
|
|
1261
|
-
dropdown: z(() => [l(f, null, {
|
|
1262
|
-
default: z(() => [
|
|
1263
|
-
p?.hideNodeAdd ? r("", !0) : (x(), n(d, {
|
|
1264
|
-
key: 0,
|
|
1265
|
-
onClick: (e) => w(s.data)
|
|
1266
|
-
}, {
|
|
1267
|
-
default: z(() => [...o[3] ||= [c(" 添加 ", -1)]]),
|
|
1268
|
-
_: 1
|
|
1269
|
-
}, 8, ["onClick"])),
|
|
1270
|
-
p?.hideNodeEdit ? r("", !0) : (x(), n(d, {
|
|
1271
|
-
key: 1,
|
|
1272
|
-
onClick: (e) => D(s.data)
|
|
1273
|
-
}, {
|
|
1274
|
-
default: z(() => [...o[4] ||= [c(" 编辑 ", -1)]]),
|
|
1275
|
-
_: 1
|
|
1276
|
-
}, 8, ["onClick"])),
|
|
1277
|
-
p?.hideNodeDel ? r("", !0) : (x(), n(d, {
|
|
1278
|
-
key: 2,
|
|
1279
|
-
onClick: (e) => O(s.data)
|
|
1280
|
-
}, {
|
|
1281
|
-
default: z(() => [...o[5] ||= [a("span", { style: { color: "#ef4444" } }, "删除", -1)]]),
|
|
1282
|
-
_: 1
|
|
1283
|
-
}, 8, ["onClick"])),
|
|
1284
|
-
T(t.$slots, "node-handle", { data: s.data }, void 0, !0)
|
|
1285
|
-
]),
|
|
1286
|
-
_: 2
|
|
1287
|
-
}, 1024)]),
|
|
1288
|
-
default: z(() => [a("span", {
|
|
1289
|
-
onClick: (e) => S(e, s.data),
|
|
1290
|
-
style: {
|
|
1291
|
-
padding: "4px",
|
|
1292
|
-
"font-weight": "bold"
|
|
1293
|
-
}
|
|
1294
|
-
}, "⋮", 8, bt)]),
|
|
1295
|
-
_: 2
|
|
1296
|
-
}, 1024))])) : r("", !0)]),
|
|
1297
|
-
_: 3
|
|
1298
|
-
}, 16, ["node-key"])
|
|
1299
|
-
]);
|
|
1300
|
-
};
|
|
1301
|
-
}
|
|
1302
|
-
}), St = /* @__PURE__ */ W({ default: () => Ct }), Ct = /* @__PURE__ */ G(xt, [["__scopeId", "data-v-7858d79e"]]), wt = { style: { height: "100%" } }, Tt = { style: {
|
|
1303
|
-
display: "flex",
|
|
1304
|
-
"flex-direction": "row",
|
|
1305
|
-
"justify-content": "space-between",
|
|
1306
|
-
"align-items": "center",
|
|
1307
|
-
gap: "10px"
|
|
1308
|
-
} }, Et = { style: { margin: "10px 0px" } }, Dt = ["onClick"], Ot = { key: 0 }, kt = /* @__PURE__ */ u({
|
|
1309
|
-
__name: "index",
|
|
1310
|
-
props: {
|
|
1311
|
-
loading: { default: () => C(!1) },
|
|
1312
|
-
data: {},
|
|
1313
|
-
placeholder: {},
|
|
1314
|
-
props: {},
|
|
1315
|
-
vInfiniteScroll: { type: Function },
|
|
1316
|
-
filterable: { type: Boolean }
|
|
1317
|
-
},
|
|
1318
|
-
emits: ["node-click"],
|
|
1319
|
-
setup(o, { emit: s }) {
|
|
1320
|
-
let c = s, l = C(""), u = C(), d = t(() => l.value ? o.data.filter((e) => e[o.props?.label || "label"]?.includes(l.value)) : o.data);
|
|
1321
|
-
L(() => [u.value, o.data?.[0]], (e) => {
|
|
1322
|
-
!e[0] && e[1] && (u.value = o.data?.[0]);
|
|
1323
|
-
}, { immediate: !0 });
|
|
1324
|
-
function f(e) {
|
|
1325
|
-
u.value = e, c("node-click", e);
|
|
1326
|
-
}
|
|
1327
|
-
return (t, s) => {
|
|
1328
|
-
let c = E("el-input");
|
|
1329
|
-
return x(), i("div", wt, [
|
|
1330
|
-
a("div", Tt, [o.filterable ? (x(), n(c, {
|
|
1331
|
-
key: 0,
|
|
1332
|
-
modelValue: l.value,
|
|
1333
|
-
"onUpdate:modelValue": s[0] ||= (e) => l.value = e,
|
|
1334
|
-
placeholder: o.placeholder ?? "请输入"
|
|
1335
|
-
}, null, 8, ["modelValue", "placeholder"])) : r("", !0), T(t.$slots, "plus", {}, void 0, !0)]),
|
|
1336
|
-
a("div", Et, [T(t.$slots, "handle", {}, void 0, !0)]),
|
|
1337
|
-
B((x(), i("ul", h({
|
|
1338
|
-
class: "infinite-list",
|
|
1339
|
-
"infinite-scroll-immediate": !1
|
|
1340
|
-
}, t.$attrs), [(x(!0), i(e, null, w(d.value, (e, n) => (x(), i("li", {
|
|
1341
|
-
key: "infinite-list-" + n,
|
|
1342
|
-
class: _({
|
|
1343
|
-
"infinite-list-item": !0,
|
|
1344
|
-
active: e === u.value
|
|
1345
|
-
}),
|
|
1346
|
-
onClick: (t) => f(e)
|
|
1347
|
-
}, [a("span", null, j(e[o.props?.label || "label"]), 1), T(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, Dt))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
|
|
1348
|
-
o.loading.value ? (x(), i("p", Ot, "loading...")) : r("", !0)
|
|
1349
|
-
]);
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
}), At = /* @__PURE__ */ W({ default: () => jt }), jt = /* @__PURE__ */ G(kt, [["__scopeId", "data-v-0ab5cd97"]]), Mt = {
|
|
1353
|
-
key: 0,
|
|
1354
|
-
style: {
|
|
1355
|
-
padding: "10px 0px",
|
|
1356
|
-
"margin-bottom": "10px",
|
|
1357
|
-
"border-bottom": "1px solid #e5e5e5"
|
|
1358
|
-
}
|
|
1359
|
-
}, Nt = { key: 1 }, Pt = /* @__PURE__ */ u({
|
|
1360
|
-
__name: "index",
|
|
1361
|
-
props: {
|
|
1362
|
-
data: {},
|
|
1363
|
-
fields: { default: () => [] },
|
|
1364
|
-
column: { default: 4 },
|
|
1365
|
-
title: { default: "" }
|
|
1366
|
-
},
|
|
1367
|
-
setup(t) {
|
|
1368
|
-
let a = o(t, [
|
|
1369
|
-
"title",
|
|
1370
|
-
"column",
|
|
1371
|
-
"fields",
|
|
1372
|
-
"data"
|
|
1373
|
-
]);
|
|
1374
|
-
return (o, s) => {
|
|
1375
|
-
let c = E("el-descriptions-item"), u = E("el-descriptions");
|
|
1376
|
-
return x(), i(e, null, [
|
|
1377
|
-
t.title ? (x(), i("h4", Mt, j(t.title), 1)) : r("", !0),
|
|
1378
|
-
T(o.$slots, "title", {}, void 0, !0),
|
|
1379
|
-
l(u, h({ column: t.column }, a, { class: "ui-descriptions" }), {
|
|
1380
|
-
default: z(() => [(x(!0), i(e, null, w(t.fields, (e) => (x(), n(c, {
|
|
1381
|
-
key: e.prop,
|
|
1382
|
-
label: e.label,
|
|
1383
|
-
span: e.span || 2
|
|
1384
|
-
}, {
|
|
1385
|
-
default: z(() => [e.render ? (x(), n(O(P(Y)(e, t.data).component), h({
|
|
1386
|
-
key: 0,
|
|
1387
|
-
modelValue: t.data[e.prop],
|
|
1388
|
-
"onUpdate:modelValue": (n) => t.data[e.prop] = n
|
|
1389
|
-
}, { ref_for: !0 }, P(Y)(e, t.data).props, {
|
|
1390
|
-
clearable: !0,
|
|
1391
|
-
key: e.prop,
|
|
1392
|
-
style: { display: "inline-block" }
|
|
1393
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (x(), i("span", Nt, j(t.data[e.prop] || "-"), 1))]),
|
|
1394
|
-
_: 2
|
|
1395
|
-
}, 1032, ["label", "span"]))), 128))]),
|
|
1396
|
-
_: 1
|
|
1397
|
-
}, 16, ["column"])
|
|
1398
|
-
], 64);
|
|
1399
|
-
};
|
|
1400
|
-
}
|
|
1401
|
-
}), Ft = /* @__PURE__ */ W({ default: () => It }), It = /* @__PURE__ */ G(Pt, [["__scopeId", "data-v-f02c30f9"]]), Lt = {
|
|
1402
|
-
key: 0,
|
|
1403
|
-
style: {
|
|
1404
|
-
display: "flex",
|
|
1405
|
-
"margin-top": "12px",
|
|
1406
|
-
"justify-content": "end"
|
|
1407
|
-
}
|
|
1408
|
-
}, Rt = /* @__PURE__ */ u({
|
|
1409
|
-
__name: "index",
|
|
1410
|
-
props: {
|
|
1411
|
-
visible: { type: Boolean },
|
|
1412
|
-
width: {},
|
|
1413
|
-
disabled: { type: Boolean },
|
|
1414
|
-
component: {},
|
|
1415
|
-
componentProps: {}
|
|
1416
|
-
},
|
|
1417
|
-
emits: [
|
|
1418
|
-
"update:visible",
|
|
1419
|
-
"close",
|
|
1420
|
-
"submit"
|
|
1421
|
-
],
|
|
1422
|
-
setup(e, { emit: t }) {
|
|
1423
|
-
let a = t, o = e, s = C();
|
|
1424
|
-
function u() {
|
|
1425
|
-
a("close"), a("update:visible", !1);
|
|
1426
|
-
}
|
|
1427
|
-
function d() {
|
|
1428
|
-
a("submit", N(s?.value || {})), a("update:visible", !1);
|
|
1429
|
-
}
|
|
1430
|
-
return (e, t) => {
|
|
1431
|
-
let a = E("el-button"), f = E("el-dialog");
|
|
1432
|
-
return x(), n(f, h(e.$attrs, {
|
|
1433
|
-
"model-value": o.visible,
|
|
1434
|
-
"show-close": o.disabled,
|
|
1435
|
-
fullscreen: !o.width,
|
|
1436
|
-
"destroy-on-close": "",
|
|
1437
|
-
"lock-scroll": !1,
|
|
1438
|
-
"close-on-click-modal": !1,
|
|
1439
|
-
"onUpdate:modelValue": t[0] ||= (e) => !e && u(),
|
|
1440
|
-
onClose: u
|
|
1441
|
-
}), {
|
|
1442
|
-
default: z(() => [(x(), n(O(o.component), h({
|
|
1443
|
-
ref_key: "slotRef",
|
|
1444
|
-
ref: s
|
|
1445
|
-
}, o.componentProps, {
|
|
1446
|
-
onClose: u,
|
|
1447
|
-
onSubmit: d
|
|
1448
|
-
}), null, 16)), o.disabled ? r("", !0) : (x(), i("div", Lt, [l(a, { onClick: u }, {
|
|
1449
|
-
default: z(() => [...t[1] ||= [c("取消", -1)]]),
|
|
1450
|
-
_: 1
|
|
1451
|
-
}), l(a, {
|
|
1452
|
-
type: "primary",
|
|
1453
|
-
onClick: d
|
|
1454
|
-
}, {
|
|
1455
|
-
default: z(() => [...t[2] ||= [c("确定", -1)]]),
|
|
1456
|
-
_: 1
|
|
1457
|
-
})]))]),
|
|
1458
|
-
_: 1
|
|
1459
|
-
}, 16, [
|
|
1460
|
-
"model-value",
|
|
1461
|
-
"show-close",
|
|
1462
|
-
"fullscreen"
|
|
1463
|
-
]);
|
|
1464
|
-
};
|
|
1465
|
-
}
|
|
1466
|
-
}), zt = /* @__PURE__ */ W({ default: () => Bt }), Bt = Rt, Z = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
1467
|
-
function Vt(e) {
|
|
1468
|
-
return Array.from(new Set(e));
|
|
1469
|
-
}
|
|
1470
|
-
function Ht(e, t) {
|
|
1471
|
-
let n = /* @__PURE__ */ new Set();
|
|
1472
|
-
return e.filter((e) => {
|
|
1473
|
-
let r = typeof t == "function" ? t(e) : e[t];
|
|
1474
|
-
return n.has(r) ? !1 : (n.add(r), !0);
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
//#endregion
|
|
1478
|
-
//#region src/components/StaffSelect/default.vue
|
|
1479
|
-
var Ut = /* @__PURE__ */ u({
|
|
1480
|
-
__name: "default",
|
|
1481
|
-
props: {
|
|
1482
|
-
multiple: { type: Boolean },
|
|
1483
|
-
type: {},
|
|
1484
|
-
valueAt: {},
|
|
1485
|
-
modelValue: {},
|
|
1486
|
-
token: {}
|
|
1487
|
-
},
|
|
1488
|
-
emits: ["update:modelValue"],
|
|
1489
|
-
setup(r, { emit: a }) {
|
|
1490
|
-
let o = r, s = a, c = o.valueAt ?? "all", u = new Headers({
|
|
1491
|
-
"Content-Type": "application/json",
|
|
1492
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
1493
|
-
token: localStorage.getItem("TOKEN") ?? "",
|
|
1494
|
-
Accept: "application/json"
|
|
1495
|
-
}), d = t({
|
|
1496
|
-
get: () => o.modelValue || "",
|
|
1497
|
-
set: (e) => s("update:modelValue", e)
|
|
1498
|
-
}), f = C([]);
|
|
1499
|
-
y(() => {
|
|
1500
|
-
o.modelValue && p(o.modelValue);
|
|
1501
|
-
});
|
|
1502
|
-
async function p(e = "") {
|
|
1503
|
-
f.value = ((await fetch(Z + "/user/pageQueryUser", {
|
|
1504
|
-
method: "POST",
|
|
1505
|
-
headers: u,
|
|
1506
|
-
body: JSON.stringify({
|
|
1507
|
-
page: 1,
|
|
1508
|
-
pageSize: 999,
|
|
1509
|
-
name: e
|
|
1510
|
-
})
|
|
1511
|
-
}).then((e) => e.json()))?.table || []).map((e) => {
|
|
1512
|
-
let t = c === "all" ? `${e.name}(${e.account})` : e[c];
|
|
1513
|
-
return {
|
|
1514
|
-
...e,
|
|
1515
|
-
label: `${e.name}(${e.account})`,
|
|
1516
|
-
value: t
|
|
1517
|
-
};
|
|
1518
|
-
});
|
|
1519
|
-
}
|
|
1520
|
-
async function m(e) {
|
|
1521
|
-
e.length < 1 || (d.value = e, await p(e));
|
|
1522
|
-
}
|
|
1523
|
-
return (t, r) => {
|
|
1524
|
-
let a = E("el-icon"), o = E("el-option"), s = E("el-select");
|
|
1525
|
-
return x(), n(s, h({
|
|
1526
|
-
remote: "",
|
|
1527
|
-
filterable: "",
|
|
1528
|
-
modelValue: d.value,
|
|
1529
|
-
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
1530
|
-
"remote-method": m
|
|
1531
|
-
}, t.$attrs), {
|
|
1532
|
-
prefix: z(() => [l(a, null, {
|
|
1533
|
-
default: z(() => [l(P(Ne))]),
|
|
1534
|
-
_: 1
|
|
1535
|
-
})]),
|
|
1536
|
-
default: z(() => [(x(!0), i(e, null, w(f.value, (e) => (x(), n(o, {
|
|
1537
|
-
key: `${e.employeeCode}-${e.employeeName}`,
|
|
1538
|
-
label: e.label,
|
|
1539
|
-
value: e.value
|
|
1540
|
-
}, null, 8, ["label", "value"]))), 128))]),
|
|
1541
|
-
_: 1
|
|
1542
|
-
}, 16, ["modelValue"]);
|
|
1543
|
-
};
|
|
1544
|
-
}
|
|
1545
|
-
}), Wt = { style: {
|
|
1546
|
-
display: "flex",
|
|
1547
|
-
"max-width": "100%",
|
|
1548
|
-
gap: "20px",
|
|
1549
|
-
"overflow-y": "scroll",
|
|
1550
|
-
height: "400px"
|
|
1551
|
-
} }, Gt = { style: { flex: "1" } }, Kt = { style: { width: "320px" } }, qt = { style: {
|
|
1552
|
-
display: "flex",
|
|
1553
|
-
"justify-content": "space-between",
|
|
1554
|
-
"align-items": "center",
|
|
1555
|
-
"margin-bottom": "8px",
|
|
1556
|
-
height: "30px"
|
|
1557
|
-
} }, Jt = { key: 0 }, Yt = { style: {
|
|
1558
|
-
"overflow-y": "auto",
|
|
1559
|
-
height: "90%"
|
|
1560
|
-
} }, Xt = { style: {
|
|
1561
|
-
display: "flex",
|
|
1562
|
-
"justify-content": "end",
|
|
1563
|
-
"align-items": "center"
|
|
1564
|
-
} }, Zt = /* @__PURE__ */ G(/* @__PURE__ */ u({
|
|
1565
|
-
__name: "dialog",
|
|
1566
|
-
props: {
|
|
1567
|
-
modelValue: {},
|
|
1568
|
-
disabled: {
|
|
1569
|
-
type: Boolean,
|
|
1570
|
-
default: !1
|
|
1571
|
-
},
|
|
1572
|
-
data: {},
|
|
1573
|
-
required: { type: Boolean },
|
|
1574
|
-
valueAt: { default: "all" }
|
|
1575
|
-
},
|
|
1576
|
-
emits: ["update:modelValue", "change"],
|
|
1577
|
-
setup(n, { expose: o, emit: s }) {
|
|
1578
|
-
let u = s, d = F(), f = n, p = f.valueAt ?? "all", m = C(), _ = C(!1), v = new Headers({
|
|
1579
|
-
"Content-Type": "application/json",
|
|
1580
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
1581
|
-
token: localStorage.getItem("TOKEN") ?? "",
|
|
1582
|
-
Accept: "application/json"
|
|
1583
|
-
}), y = S({
|
|
1584
|
-
searchData: [],
|
|
1585
|
-
staffData: [],
|
|
1586
|
-
loading: !1,
|
|
1587
|
-
filterText: "",
|
|
1588
|
-
requiredVisible: !1
|
|
1589
|
-
}), b = C([]), T = C([]), D = t(() => y.searchData?.length ? y.searchData : y.staffData), O = t(() => f.required ?? d?.required ?? !1);
|
|
1590
|
-
R(() => {
|
|
1591
|
-
T.value = Vt(f.modelValue || []);
|
|
1592
|
-
}), R(() => {
|
|
1593
|
-
_.value && k();
|
|
1594
|
-
});
|
|
1595
|
-
async function k() {
|
|
1596
|
-
let e = await fetch(Z + "/department/queryDepartmentTree", {
|
|
1597
|
-
method: "GET",
|
|
1598
|
-
headers: v
|
|
1599
|
-
}).then((e) => e.json());
|
|
1600
|
-
y.staffData = e.data || [], e.data?.[0] && M(e.data?.[0]);
|
|
1601
|
-
}
|
|
1602
|
-
async function A(e) {
|
|
1603
|
-
return fetch(Z + "/user/pageQueryUser", {
|
|
1604
|
-
method: "POST",
|
|
1605
|
-
headers: v,
|
|
1606
|
-
body: JSON.stringify(e)
|
|
1607
|
-
}).then((e) => e.json());
|
|
1608
|
-
}
|
|
1609
|
-
async function M(e, t) {
|
|
1610
|
-
let n = !!e?.data?.code, r = e?.data?.code || e?.code;
|
|
1611
|
-
return !r || e?.data?.account ? t?.([]) : (y.loading = !0, A({
|
|
1612
|
-
page: 1,
|
|
1613
|
-
pageSize: 9999,
|
|
1614
|
-
departmentCode: r
|
|
1615
|
-
}).then((t) => {
|
|
1616
|
-
if (t.code !== "ok") return;
|
|
1617
|
-
let r = (t?.table || []).map((e) => ({
|
|
1618
|
-
...e,
|
|
1619
|
-
code: e.account
|
|
1620
|
-
}));
|
|
1621
|
-
n ? e.data.children = Ht([...r, ...e.data.children || []], "code") : e.children = Ht([...r, ...e.children || []], "code"), y.loading = !1;
|
|
1622
|
-
}), t?.(e?.children || []));
|
|
1623
|
-
}
|
|
1624
|
-
function N(e, { data: t }) {
|
|
1625
|
-
let n = y.searchData?.length > 0;
|
|
1626
|
-
return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
|
|
1627
|
-
width: "14px",
|
|
1628
|
-
height: "14px"
|
|
1629
|
-
} }, e(Ne)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
|
|
1630
|
-
}
|
|
1631
|
-
function ee(e) {
|
|
1632
|
-
if (T.value = T.value.filter((t) => t !== e), m.value) {
|
|
1633
|
-
let t = e.match(/\((.*?)\)/)?.[1];
|
|
1634
|
-
g(() => {
|
|
1635
|
-
m.value?.setChecked(t, !1);
|
|
1636
|
-
});
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
async function I() {
|
|
1640
|
-
if (!y.filterText?.trim()) return y.searchData = [];
|
|
1641
|
-
let e = await A({
|
|
1642
|
-
page: 1,
|
|
1643
|
-
pageSize: 9999,
|
|
1644
|
-
name: y.filterText?.trim()
|
|
1645
|
-
});
|
|
1646
|
-
if (e.code !== "ok") return K.Message.error(e.message);
|
|
1647
|
-
y.searchData = (e?.table || []).map((e) => ({
|
|
1648
|
-
...e,
|
|
1649
|
-
code: e.account
|
|
1650
|
-
}));
|
|
1651
|
-
}
|
|
1652
|
-
function L(e, t) {
|
|
1653
|
-
let n = t?.checkedNodes?.map((e) => `${e.name}(${e.account ?? e.code})`);
|
|
1654
|
-
T.value = Vt([...T.value, ...n]);
|
|
1655
|
-
}
|
|
1656
|
-
function B() {
|
|
1657
|
-
let e = p === "all" ? T.value : T.value?.map((e) => {
|
|
1658
|
-
let [t, n] = e.split("(");
|
|
1659
|
-
return {
|
|
1660
|
-
name: t.trim(),
|
|
1661
|
-
account: n?.replace(")", "")
|
|
1662
|
-
}[p] || e.trim();
|
|
1663
|
-
});
|
|
1664
|
-
u("change", e), u("update:modelValue", e), _.value = !1, U();
|
|
1665
|
-
}
|
|
1666
|
-
function H() {
|
|
1667
|
-
u("update:modelValue", void 0), _.value = !1;
|
|
1668
|
-
}
|
|
1669
|
-
function U() {
|
|
1670
|
-
return y.requiredVisible = O.value && T.value.length === 0, y.requiredVisible;
|
|
1671
|
-
}
|
|
1672
|
-
return o({ validate: U }), (t, n) => {
|
|
1673
|
-
let o = E("el-select"), s = E("el-input"), u = E("el-tree"), d = E("el-icon"), p = E("el-button"), g = E("el-dialog");
|
|
1674
|
-
return x(), i(e, null, [a("div", {
|
|
1675
|
-
class: "staff-select-trigger",
|
|
1676
|
-
onClick: n[1] ||= (e) => !f.disabled && (_.value = !0)
|
|
1677
|
-
}, [l(o, h({
|
|
1678
|
-
...t.$attrs,
|
|
1679
|
-
...t.$props
|
|
1680
|
-
}, {
|
|
1681
|
-
modelValue: T.value,
|
|
1682
|
-
"onUpdate:modelValue": n[0] ||= (e) => T.value = e,
|
|
1683
|
-
class: { "is-required": y.requiredVisible },
|
|
1684
|
-
options: b.value,
|
|
1685
|
-
placeholder: "请选择",
|
|
1686
|
-
multiple: "",
|
|
1687
|
-
disabled: f.disabled,
|
|
1688
|
-
props: {
|
|
1689
|
-
label: "label",
|
|
1690
|
-
value: "account"
|
|
1691
|
-
}
|
|
1692
|
-
}), null, 16, [
|
|
1693
|
-
"modelValue",
|
|
1694
|
-
"class",
|
|
1695
|
-
"options",
|
|
1696
|
-
"disabled"
|
|
1697
|
-
])]), l(g, {
|
|
1698
|
-
modelValue: _.value,
|
|
1699
|
-
"onUpdate:modelValue": n[3] ||= (e) => _.value = e,
|
|
1700
|
-
style: {
|
|
1701
|
-
height: "480px",
|
|
1702
|
-
width: "70%",
|
|
1703
|
-
"z-index": "10000"
|
|
1704
|
-
},
|
|
1705
|
-
"show-close": !1,
|
|
1706
|
-
"append-to-body": "",
|
|
1707
|
-
"close-on-click-modal": !1,
|
|
1708
|
-
"destroy-on-close": ""
|
|
1709
|
-
}, {
|
|
1710
|
-
default: z(() => [a("div", Wt, [a("div", Gt, [l(s, {
|
|
1711
|
-
placeholder: "请输入",
|
|
1712
|
-
modelValue: y.filterText,
|
|
1713
|
-
"onUpdate:modelValue": n[2] ||= (e) => y.filterText = e,
|
|
1714
|
-
clearable: "",
|
|
1715
|
-
"prefix-icon": P(ke),
|
|
1716
|
-
onKeydown: te(I, ["enter"])
|
|
1717
|
-
}, null, 8, ["modelValue", "prefix-icon"]), l(u, {
|
|
1718
|
-
loading: y.loading,
|
|
1719
|
-
data: D.value,
|
|
1720
|
-
props: { label: "fullName" },
|
|
1721
|
-
"highlight-current": !0,
|
|
1722
|
-
"render-content": N,
|
|
1723
|
-
load: M,
|
|
1724
|
-
onCheck: L,
|
|
1725
|
-
"show-checkbox": "",
|
|
1726
|
-
"check-strictly": "",
|
|
1727
|
-
lazy: "",
|
|
1728
|
-
class: "staff-tree",
|
|
1729
|
-
ref_key: "staffDialogRef",
|
|
1730
|
-
ref: m,
|
|
1731
|
-
"node-key": "code"
|
|
1732
|
-
}, null, 8, ["loading", "data"])]), a("div", Kt, [a("div", qt, [n[4] ||= a("h3", null, "已选择", -1), T.value.length ? (x(), i("span", Jt, "已选择" + j(T.value.length) + "个用户", 1)) : r("", !0)]), a("div", Yt, [(x(!0), i(e, null, w(T.value, (e) => (x(), i("li", {
|
|
1733
|
-
key: e,
|
|
1734
|
-
class: "staff-item"
|
|
1735
|
-
}, [a("span", null, j(e), 1), l(d, {
|
|
1736
|
-
color: "red",
|
|
1737
|
-
onClick: V((t) => ee(e), ["stop"])
|
|
1738
|
-
}, {
|
|
1739
|
-
default: z(() => [l(P(je))]),
|
|
1740
|
-
_: 1
|
|
1741
|
-
}, 8, ["onClick"])]))), 128))])])]), a("div", Xt, [l(p, { onClick: H }, {
|
|
1742
|
-
default: z(() => [...n[5] ||= [c("取消", -1)]]),
|
|
1743
|
-
_: 1
|
|
1744
|
-
}), l(p, {
|
|
1745
|
-
type: "primary",
|
|
1746
|
-
onClick: B
|
|
1747
|
-
}, {
|
|
1748
|
-
default: z(() => [...n[6] ||= [c("确定", -1)]]),
|
|
1749
|
-
_: 1
|
|
1750
|
-
})])]),
|
|
1751
|
-
_: 1
|
|
1752
|
-
}, 8, ["modelValue"])], 64);
|
|
1753
|
-
};
|
|
1754
|
-
}
|
|
1755
|
-
}), [["__scopeId", "data-v-6c972882"]]), Qt = /* @__PURE__ */ u({
|
|
1756
|
-
__name: "index",
|
|
1757
|
-
props: {
|
|
1758
|
-
multiple: { type: Boolean },
|
|
1759
|
-
type: {},
|
|
1760
|
-
valueAt: {},
|
|
1761
|
-
modelValue: {},
|
|
1762
|
-
token: {}
|
|
1763
|
-
},
|
|
1764
|
-
setup(e, { expose: t }) {
|
|
1765
|
-
let r = e, i = C();
|
|
1766
|
-
return t({ validate: () => i.value?.validate?.() }), (e, t) => (x(), n(O(r?.type === "dialog" ? Zt : Ut), h({
|
|
1767
|
-
ref_key: "staffSelectRef",
|
|
1768
|
-
ref: i
|
|
1769
|
-
}, {
|
|
1770
|
-
...e.$attrs,
|
|
1771
|
-
...r
|
|
1772
|
-
}), null, 16));
|
|
1773
|
-
}
|
|
1774
|
-
}), $t = /* @__PURE__ */ W({ default: () => en }), en = Qt, tn = /* @__PURE__ */ G(/* @__PURE__ */ u({
|
|
1775
|
-
__name: "file",
|
|
1776
|
-
props: {
|
|
1777
|
-
icon: {},
|
|
1778
|
-
limit: {},
|
|
1779
|
-
size: {},
|
|
1780
|
-
prop: {},
|
|
1781
|
-
data: {},
|
|
1782
|
-
text: {},
|
|
1783
|
-
type: {},
|
|
1784
|
-
defaultValue: {},
|
|
1785
|
-
fileList: {},
|
|
1786
|
-
action: {},
|
|
1787
|
-
onChange: { type: Function }
|
|
1788
|
-
},
|
|
1789
|
-
setup(e) {
|
|
1790
|
-
let r = e, { text: i = "选择文件", icon: a = void 0, size: o = "default" } = r, u = F(), d = u.disabled, f = C(r.fileList || []);
|
|
1791
|
-
L(() => r.fileList, (e) => {
|
|
1792
|
-
f.value = e || [];
|
|
1793
|
-
}, {
|
|
1794
|
-
immediate: !0,
|
|
1795
|
-
deep: !0
|
|
1796
|
-
});
|
|
1797
|
-
let p = t(() => r.limit && u.count < r.limit), m = t(() => r.limit && u.count >= r.limit), g = t(() => r.limit === void 0 ? !1 : !p.value);
|
|
1798
|
-
return (e, t) => {
|
|
1799
|
-
let u = E("el-button"), _ = E("el-upload");
|
|
1800
|
-
return x(), n(_, h(e.$attrs, {
|
|
1801
|
-
style: { width: "100%" },
|
|
1802
|
-
action: r.action,
|
|
1803
|
-
"file-list": f.value,
|
|
1804
|
-
"onUpdate:fileList": t[0] ||= (e) => f.value = e,
|
|
1805
|
-
limit: r.limit,
|
|
1806
|
-
class: {
|
|
1807
|
-
"hide-upload-list": p.value,
|
|
1808
|
-
"hide-upload-text": m.value
|
|
1809
|
-
}
|
|
1810
|
-
}), s({
|
|
1811
|
-
default: z(() => [T(e.$slots, "tip", {}, void 0, !0)]),
|
|
1812
|
-
_: 2
|
|
1813
|
-
}, [g.value ? void 0 : {
|
|
1814
|
-
name: "trigger",
|
|
1815
|
-
fn: z(() => [l(u, {
|
|
1816
|
-
type: "primary",
|
|
1817
|
-
plain: "",
|
|
1818
|
-
icon: P(a),
|
|
1819
|
-
size: P(o),
|
|
1820
|
-
disabled: P(d)
|
|
1821
|
-
}, {
|
|
1822
|
-
default: z(() => [c(j(P(i)), 1)]),
|
|
1823
|
-
_: 1
|
|
1824
|
-
}, 8, [
|
|
1825
|
-
"icon",
|
|
1826
|
-
"size",
|
|
1827
|
-
"disabled"
|
|
1828
|
-
])]),
|
|
1829
|
-
key: "0"
|
|
1830
|
-
}]), 1040, [
|
|
1831
|
-
"action",
|
|
1832
|
-
"file-list",
|
|
1833
|
-
"limit",
|
|
1834
|
-
"class"
|
|
1835
|
-
]);
|
|
1836
|
-
};
|
|
1837
|
-
}
|
|
1838
|
-
}), [["__scopeId", "data-v-43d34dc4"]]), nn = ["src"], rn = /* @__PURE__ */ u({
|
|
1839
|
-
__name: "image",
|
|
1840
|
-
props: {
|
|
1841
|
-
icon: {},
|
|
1842
|
-
limit: {},
|
|
1843
|
-
size: {},
|
|
1844
|
-
prop: {},
|
|
1845
|
-
data: {},
|
|
1846
|
-
text: {},
|
|
1847
|
-
type: {},
|
|
1848
|
-
defaultValue: {},
|
|
1849
|
-
fileList: {},
|
|
1850
|
-
action: {},
|
|
1851
|
-
onChange: { type: Function }
|
|
1852
|
-
},
|
|
1853
|
-
emits: ["update:fileList"],
|
|
1854
|
-
setup(n, { emit: r }) {
|
|
1855
|
-
let o = n, s = C({}), c = C(!1), u = r, d = t({
|
|
1856
|
-
get: () => o.fileList || [],
|
|
1857
|
-
set: (e) => u("update:fileList", e)
|
|
1858
|
-
});
|
|
1859
|
-
function f(e) {
|
|
1860
|
-
s.value = e, c.value = !0;
|
|
1861
|
-
}
|
|
1862
|
-
return (t, n) => {
|
|
1863
|
-
let r = E("el-icon"), u = E("el-upload"), p = E("el-dialog");
|
|
1864
|
-
return x(), i(e, null, [l(u, h({
|
|
1865
|
-
accept: "image/*",
|
|
1866
|
-
action: o.action,
|
|
1867
|
-
"auto-upload": !1
|
|
1868
|
-
}, t.$attrs, {
|
|
1869
|
-
"list-type": "picture-card",
|
|
1870
|
-
"on-preview": f,
|
|
1871
|
-
"file-list": d.value,
|
|
1872
|
-
"onUpdate:fileList": n[0] ||= (e) => d.value = e
|
|
1873
|
-
}), {
|
|
1874
|
-
default: z(() => [l(r, null, {
|
|
1875
|
-
default: z(() => [l(P(Fe))]),
|
|
1876
|
-
_: 1
|
|
1877
|
-
})]),
|
|
1878
|
-
_: 1
|
|
1879
|
-
}, 16, ["action", "file-list"]), l(p, {
|
|
1880
|
-
modelValue: c.value,
|
|
1881
|
-
"onUpdate:modelValue": n[1] ||= (e) => c.value = e
|
|
1882
|
-
}, {
|
|
1883
|
-
default: z(() => [a("img", {
|
|
1884
|
-
"w-full": "",
|
|
1885
|
-
src: s.value.url,
|
|
1886
|
-
alt: "预览"
|
|
1887
|
-
}, null, 8, nn)]),
|
|
1888
|
-
_: 1
|
|
1889
|
-
}, 8, ["modelValue"])], 64);
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
}), an = /* @__PURE__ */ u({
|
|
1893
|
-
__name: "index",
|
|
1894
|
-
props: {
|
|
1895
|
-
icon: {},
|
|
1896
|
-
limit: {},
|
|
1897
|
-
size: {},
|
|
1898
|
-
prop: {},
|
|
1899
|
-
data: {},
|
|
1900
|
-
text: {},
|
|
1901
|
-
type: {},
|
|
1902
|
-
defaultValue: {},
|
|
1903
|
-
fileList: {},
|
|
1904
|
-
action: {},
|
|
1905
|
-
onChange: { type: Function }
|
|
1906
|
-
},
|
|
1907
|
-
emits: [
|
|
1908
|
-
"update:modelValue",
|
|
1909
|
-
"update:fileList",
|
|
1910
|
-
"change",
|
|
1911
|
-
"success",
|
|
1912
|
-
"error",
|
|
1913
|
-
"exceed",
|
|
1914
|
-
"remove"
|
|
1915
|
-
],
|
|
1916
|
-
setup(e, { emit: r }) {
|
|
1917
|
-
let i = r, a = e, { type: o = "file", onChange: s, limit: c, action: l, data: u, prop: d, fileList: f, ...p } = a, m = l || Z + "/attachment/uploadAttachment", g = { token: localStorage.getItem("TOKEN") || "" }, _ = t(() => u && d && u[d] ? u[d] : a.fileList || []), v = t(() => _.value.length);
|
|
1918
|
-
function y(e) {
|
|
1919
|
-
i("update:fileList", e);
|
|
1920
|
-
}
|
|
1921
|
-
function b(e, t) {
|
|
1922
|
-
let n = Array.isArray(t) ? t : [];
|
|
1923
|
-
s?.(n, e), i("update:fileList", n), i("update:modelValue", n), i("change", n);
|
|
1924
|
-
}
|
|
1925
|
-
function S() {
|
|
1926
|
-
c && K.Message.warning(`最多只能上传 ${c} 个文件`);
|
|
1927
|
-
}
|
|
1928
|
-
function C(e, t) {
|
|
1929
|
-
i("update:fileList", t), i("update:modelValue", t), i("remove", t);
|
|
1930
|
-
}
|
|
1931
|
-
function w(e, t) {
|
|
1932
|
-
let n = [...a.fileList || []];
|
|
1933
|
-
if (e?.code !== "ok") return K.Message.error(e?.message);
|
|
1934
|
-
let r = Z + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${g.token}`;
|
|
1935
|
-
n.some((t) => t?.objectKey === e.data?.objectKey) || n.push({
|
|
1936
|
-
name: t.name,
|
|
1937
|
-
uid: t.uid,
|
|
1938
|
-
size: t.size,
|
|
1939
|
-
status: "success",
|
|
1940
|
-
...e.data,
|
|
1941
|
-
url: r
|
|
1942
|
-
}), i("update:fileList", n), i("update:modelValue", n), i("success", n);
|
|
1943
|
-
}
|
|
1944
|
-
function T(e, t, n) {
|
|
1945
|
-
i("update:fileList", n), i("update:modelValue", n);
|
|
1946
|
-
}
|
|
1947
|
-
return (e, t) => (x(), n(O(P(o) === "image" ? rn : tn), h({
|
|
1948
|
-
ref: "uploadInstance",
|
|
1949
|
-
name: "file",
|
|
1950
|
-
action: P(m),
|
|
1951
|
-
headers: g,
|
|
1952
|
-
"on-change": b,
|
|
1953
|
-
"on-exceed": S,
|
|
1954
|
-
"on-remove": C,
|
|
1955
|
-
"on-success": w,
|
|
1956
|
-
"on-error": T,
|
|
1957
|
-
"file-list": _.value,
|
|
1958
|
-
"onUpdate:fileList": y,
|
|
1959
|
-
count: v.value,
|
|
1960
|
-
limit: P(c)
|
|
1961
|
-
}, p), null, 16, [
|
|
1962
|
-
"action",
|
|
1963
|
-
"file-list",
|
|
1964
|
-
"count",
|
|
1965
|
-
"limit"
|
|
1966
|
-
]));
|
|
1967
|
-
}
|
|
1968
|
-
}), on = /* @__PURE__ */ W({ default: () => sn }), sn = an, cn = {
|
|
1969
|
-
mounted(e, t) {
|
|
1970
|
-
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
1971
|
-
e._stickyOriginalStyles = {
|
|
1972
|
-
position: e.style.position || "",
|
|
1973
|
-
top: e.style.top || "",
|
|
1974
|
-
zIndex: e.style.zIndex || "",
|
|
1975
|
-
width: e.style.width || ""
|
|
1976
|
-
}, e._stickyConfig = {
|
|
1977
|
-
target: typeof r == "string" ? document.querySelector(r) || document.body : r,
|
|
1978
|
-
top: i
|
|
1979
|
-
}, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener = () => {
|
|
1980
|
-
(window.pageYOffset || document.documentElement.scrollTop) >= e._stickyOffsetTop - e._stickyConfig.top ? (e.style.position = "fixed", e.style.top = `${e._stickyConfig.top}px`, e.style.zIndex = "100", e.style.width = `${e.offsetWidth}px`) : (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
|
|
1981
|
-
}, window.addEventListener("scroll", e._stickyScrollListener, { passive: !0 }), e._stickyScrollListener();
|
|
1982
|
-
},
|
|
1983
|
-
updated(e, t) {
|
|
1984
|
-
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
1985
|
-
e._stickyConfig = {
|
|
1986
|
-
target: typeof r == "string" ? document.querySelector(r) || document.body : r,
|
|
1987
|
-
top: i
|
|
1988
|
-
}, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener();
|
|
1989
|
-
},
|
|
1990
|
-
unmounted(e) {
|
|
1991
|
-
e._stickyScrollListener && window.removeEventListener("scroll", e._stickyScrollListener), e._stickyOriginalStyles && (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
|
|
1992
|
-
}
|
|
1993
|
-
}, ln = { mounted(e) {
|
|
1994
|
-
e.style.boxShadow = "0px 0px 12px rgba(0, 0, 0, 0.12)", e.style.padding = "20px", e.style.borderRadius = "4px", e.style.border = "1px solid #e4e7ed", e.style.backgroundColor = "#fff";
|
|
1995
|
-
} }, un = /* @__PURE__ */ W({
|
|
1996
|
-
card: () => ln,
|
|
1997
|
-
sticky: () => cn
|
|
1998
|
-
});
|
|
1999
|
-
//#endregion
|
|
2000
|
-
//#region src/hooks/useFetch.ts
|
|
2001
|
-
function dn(e, t = {}) {
|
|
2002
|
-
let { immediate: n = !0, method: r = "GET", onBefore: i, onSuccess: a, onError: o, onFinally: s, ...c } = t, l = localStorage.getItem("TOKEN"), u = {
|
|
2003
|
-
method: r,
|
|
2004
|
-
headers: new Headers({
|
|
2005
|
-
"Content-Type": "application/json",
|
|
2006
|
-
token: l ?? "",
|
|
2007
|
-
...c.headers || {}
|
|
2008
|
-
})
|
|
2009
|
-
}, d = C(!1), f = C(null), m = C(null), h = S({}), _ = !1;
|
|
2010
|
-
async function v() {
|
|
2011
|
-
if (_) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2012
|
-
_ = !0, d.value = !0, m.value = null;
|
|
2013
|
-
try {
|
|
2014
|
-
let t = Z + e;
|
|
2015
|
-
if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2016
|
-
if (r === "GET") {
|
|
2017
|
-
let e = new URLSearchParams(M(h)).toString();
|
|
2018
|
-
e && (t = `${t}?${e}`);
|
|
2019
|
-
} else u.body = JSON.stringify(M(h));
|
|
2020
|
-
let n = await (await fetch(t, u)).json();
|
|
2021
|
-
return n.code ? ["return.optSuccess", "ok"].includes(n.code) || K.Message.error(n.message || "未知错误!") : n.data?.success || K.Message.error(n.message || "未知错误!"), f.value = n, a?.(n), n;
|
|
2022
|
-
} catch (e) {
|
|
2023
|
-
let t = e instanceof Error ? e : Error(String(e));
|
|
2024
|
-
throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
|
|
2025
|
-
} finally {
|
|
2026
|
-
d.value = !1, _ = !1, s?.();
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
let y = null;
|
|
2030
|
-
R(() => {
|
|
2031
|
-
Object.assign(h, N(c.defaultParams) || {}), y && clearTimeout(y), y = setTimeout(() => {
|
|
2032
|
-
let e = p(t.ready) ? t.ready.value : t.ready ?? !0;
|
|
2033
|
-
n && e && !_ && g(() => v());
|
|
2034
|
-
}, 10);
|
|
2035
|
-
});
|
|
2036
|
-
function b(e) {
|
|
2037
|
-
for (let e in h) h[e] = void 0;
|
|
2038
|
-
Object.assign(h, e);
|
|
2039
|
-
}
|
|
2040
|
-
return {
|
|
2041
|
-
execute: v,
|
|
2042
|
-
loading: d,
|
|
2043
|
-
data: f,
|
|
2044
|
-
error: m,
|
|
2045
|
-
params: h,
|
|
2046
|
-
setParams: b
|
|
2047
|
-
};
|
|
2048
|
-
}
|
|
2049
|
-
//#endregion
|
|
2050
|
-
//#region src/hooks/useTable/default.ts
|
|
2051
|
-
function fn(e, t) {
|
|
2052
|
-
let n = S({
|
|
2053
|
-
ignoreAttrs: [
|
|
2054
|
-
"tableName",
|
|
2055
|
-
"sort",
|
|
2056
|
-
...t?.ignoreAttrs || []
|
|
2057
|
-
],
|
|
2058
|
-
replaceAttrs: t?.replaceAttrs || {
|
|
2059
|
-
table: "table",
|
|
2060
|
-
total: "total"
|
|
2061
|
-
}
|
|
2062
|
-
}), r = A([]), i = S({
|
|
2063
|
-
total: 0,
|
|
2064
|
-
page: 1,
|
|
2065
|
-
pageSize: 10
|
|
2066
|
-
}), a = C([]), o = S({
|
|
2067
|
-
page: 1,
|
|
2068
|
-
pageSize: 10
|
|
2069
|
-
});
|
|
2070
|
-
if (t?.onBefore?.(o) === !1) return {
|
|
2071
|
-
loading: C(!1),
|
|
2072
|
-
data: r,
|
|
2073
|
-
pagination: i
|
|
2074
|
-
};
|
|
2075
|
-
let s = dn(e, {
|
|
2076
|
-
...t,
|
|
2077
|
-
defaultParams: o,
|
|
2078
|
-
onSuccess: (e) => {
|
|
2079
|
-
t?.onSuccess?.(e), i.total = e[n?.replaceAttrs?.total] || 0, r.value = e[n?.replaceAttrs?.table] || [];
|
|
2080
|
-
}
|
|
2081
|
-
});
|
|
2082
|
-
R(() => {
|
|
2083
|
-
let e = N(t.defaultParams || {});
|
|
2084
|
-
i.page = 1, i.pageSize = 10, Object.assign(o, {
|
|
2085
|
-
...e,
|
|
2086
|
-
page: 1,
|
|
2087
|
-
pageSize: 10
|
|
2088
|
-
});
|
|
2089
|
-
});
|
|
2090
|
-
function c(e = {}) {
|
|
2091
|
-
i.page = 1, i.pageSize = 10, e && (Object.keys(o).forEach((t) => {
|
|
2092
|
-
n.ignoreAttrs?.includes(t) || Object.keys(e).includes(t) || delete o[t];
|
|
2093
|
-
}), Object.assign(o, {
|
|
2094
|
-
...e,
|
|
2095
|
-
page: 1,
|
|
2096
|
-
pageSize: 10
|
|
2097
|
-
}));
|
|
2098
|
-
}
|
|
2099
|
-
function l({ page: e, pageSize: t }) {
|
|
2100
|
-
i.page = e, i.pageSize = t, Object.assign(o, {
|
|
2101
|
-
page: e,
|
|
2102
|
-
pageSize: t
|
|
2103
|
-
});
|
|
2104
|
-
}
|
|
2105
|
-
function u(e) {
|
|
2106
|
-
a.value = e;
|
|
2107
|
-
}
|
|
2108
|
-
return S({
|
|
2109
|
-
...s,
|
|
2110
|
-
data: r,
|
|
2111
|
-
pagination: i,
|
|
2112
|
-
selection: a,
|
|
2113
|
-
reset: c,
|
|
2114
|
-
updatePagination: l,
|
|
2115
|
-
selectionChange: u
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
//#endregion
|
|
2119
|
-
//#region src/utils/request.ts
|
|
2120
|
-
var pn = new Headers({
|
|
2121
|
-
"Content-Type": "application/json",
|
|
2122
|
-
token: localStorage.getItem("TOKEN") || ""
|
|
2123
|
-
});
|
|
2124
|
-
async function mn(e, t) {
|
|
2125
|
-
let n = `${Z}${e}`;
|
|
2126
|
-
if (t) {
|
|
2127
|
-
let e = new URLSearchParams(t).toString();
|
|
2128
|
-
e && (n = `${n}?${e}`);
|
|
2129
|
-
}
|
|
2130
|
-
return (await fetch(n, {
|
|
2131
|
-
headers: pn,
|
|
2132
|
-
method: "GET"
|
|
2133
|
-
})).json();
|
|
2134
|
-
}
|
|
2135
|
-
async function hn(e, t) {
|
|
2136
|
-
return (await fetch(`${Z}${e}`, {
|
|
2137
|
-
headers: pn,
|
|
2138
|
-
method: "POST",
|
|
2139
|
-
body: JSON.stringify(t)
|
|
2140
|
-
})).json();
|
|
2141
|
-
}
|
|
2142
|
-
async function gn(e, t) {
|
|
2143
|
-
return (await fetch(`${Z}${e}`, {
|
|
2144
|
-
headers: pn,
|
|
2145
|
-
method: "POST",
|
|
2146
|
-
body: JSON.stringify(t)
|
|
2147
|
-
})).blob();
|
|
2148
|
-
}
|
|
2149
|
-
var Q = {
|
|
2150
|
-
get: mn,
|
|
2151
|
-
post: hn,
|
|
2152
|
-
blob: gn
|
|
2153
|
-
};
|
|
2154
|
-
//#endregion
|
|
2155
|
-
//#region src/hooks/useTable/common.ts
|
|
2156
|
-
function _n(e, n) {
|
|
2157
|
-
let { defaultParams: r, ...i } = n, a = p(r) ? r : C(r || {}), o = fn(e, {
|
|
2158
|
-
...i,
|
|
2159
|
-
ready: t(() => {
|
|
2160
|
-
let e = p(n.ready) ? n.ready.value : n.ready, t = !!a.value?.tableId;
|
|
2161
|
-
return (e === void 0 || e) && t;
|
|
2162
|
-
}),
|
|
2163
|
-
defaultParams: t(() => {
|
|
2164
|
-
let { tableId: e, page: t, pageSize: n, sort: r, ...i } = N(a) || {};
|
|
2165
|
-
return {
|
|
2166
|
-
tableId: e,
|
|
2167
|
-
page: t || 1,
|
|
2168
|
-
pageSize: n || 10,
|
|
2169
|
-
params: {
|
|
2170
|
-
...i,
|
|
2171
|
-
sort: r
|
|
2172
|
-
}
|
|
2173
|
-
};
|
|
2174
|
-
}),
|
|
2175
|
-
ignoreAttrs: [
|
|
2176
|
-
"tableName",
|
|
2177
|
-
"sort",
|
|
2178
|
-
...n?.ignoreAttrs || []
|
|
2179
|
-
]
|
|
2180
|
-
});
|
|
2181
|
-
function s(e = {}) {
|
|
2182
|
-
Object.assign(a.value, e, {
|
|
2183
|
-
page: 1,
|
|
2184
|
-
pageSize: 10
|
|
2185
|
-
});
|
|
2186
|
-
}
|
|
2187
|
-
async function c(e) {
|
|
2188
|
-
let t = N(a);
|
|
2189
|
-
return Q.post("/common/insert", {
|
|
2190
|
-
params: { ...e },
|
|
2191
|
-
tableId: t?.tableId
|
|
2192
|
-
});
|
|
2193
|
-
}
|
|
2194
|
-
async function l(e) {
|
|
2195
|
-
let t = N(a);
|
|
2196
|
-
return Q.post("/common/update", {
|
|
2197
|
-
params: { ...e },
|
|
2198
|
-
tableId: t?.tableId
|
|
2199
|
-
});
|
|
2200
|
-
}
|
|
2201
|
-
async function u(e) {
|
|
2202
|
-
let t = N(a);
|
|
2203
|
-
return Q.post("/common/delete", {
|
|
2204
|
-
idList: e,
|
|
2205
|
-
tableId: t?.tableId
|
|
2206
|
-
});
|
|
2207
|
-
}
|
|
2208
|
-
async function d(t) {
|
|
2209
|
-
let { title: n = "export" } = t || {}, r = N(a), i = await Q.blob(e ?? "/common/exportExcel", {
|
|
2210
|
-
tableId: r?.tableId,
|
|
2211
|
-
type: "all"
|
|
2212
|
-
}), o = new Blob([i]), s = document.createElement("a");
|
|
2213
|
-
s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), K.Message.success("导出成功"), window.URL.revokeObjectURL(s.href);
|
|
2214
|
-
}
|
|
2215
|
-
let f = S({
|
|
2216
|
-
loading: !1,
|
|
2217
|
-
data: [],
|
|
2218
|
-
insert: c,
|
|
2219
|
-
update: l,
|
|
2220
|
-
remove: u,
|
|
2221
|
-
delete: u,
|
|
2222
|
-
exportData: d
|
|
2223
|
-
});
|
|
2224
|
-
return R(() => {
|
|
2225
|
-
Object.assign(f, o, { reset: s });
|
|
2226
|
-
}), f;
|
|
2227
|
-
}
|
|
2228
|
-
//#endregion
|
|
2229
|
-
//#region src/hooks/useTable/index.ts
|
|
2230
|
-
function vn(e, t) {
|
|
2231
|
-
return e?.includes("/common/pageQuery") ? _n(e, t) : fn(e, t);
|
|
2232
|
-
}
|
|
2233
|
-
//#endregion
|
|
2234
|
-
//#region src/hooks/index.ts
|
|
2235
|
-
var yn = /* @__PURE__ */ W({
|
|
2236
|
-
useFetch: () => dn,
|
|
2237
|
-
useTable: () => vn
|
|
2238
|
-
}), bn = "Yc", xn = {
|
|
2239
|
-
UiCard: ie,
|
|
2240
|
-
UiTable: we,
|
|
2241
|
-
UiFilter: rt,
|
|
2242
|
-
UiForm: lt,
|
|
2243
|
-
UiEditor: pt,
|
|
2244
|
-
UiTree: St,
|
|
2245
|
-
UiInfiniteScroll: At,
|
|
2246
|
-
UiDescriptions: Ft,
|
|
2247
|
-
UiDialog: zt,
|
|
2248
|
-
UiStaffSelect: $t,
|
|
2249
|
-
UiUpload: on
|
|
2250
|
-
}, Sn = null;
|
|
2251
|
-
function Cn(e) {
|
|
2252
|
-
Sn = e;
|
|
2253
|
-
}
|
|
2254
|
-
function $() {
|
|
2255
|
-
return Sn;
|
|
2256
|
-
}
|
|
2257
|
-
var wn = { install(e, t) {
|
|
2258
|
-
t?.elementPlus && t.elementPlus.install(e), Sn ||= {
|
|
2259
|
-
...e,
|
|
2260
|
-
h: f
|
|
2261
|
-
};
|
|
2262
|
-
for (let [t, n] of Object.entries(xn)) {
|
|
2263
|
-
let r = n?.default || n;
|
|
2264
|
-
if (r && (typeof r == "function" || typeof r == "object")) {
|
|
2265
|
-
let n = t.replace(/^Ui/, bn);
|
|
2266
|
-
e.component(n, r);
|
|
2267
|
-
let i = n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2268
|
-
i !== n && e.component(i, r);
|
|
2269
|
-
}
|
|
2270
|
-
}
|
|
2271
|
-
for (let [t, n] of Object.entries(Qe)) e.component(t, n), e.component(t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n);
|
|
2272
|
-
for (let [t, n] of Object.entries(un)) (typeof n == "function" || typeof n == "object") && e.directive(t, n);
|
|
2273
|
-
} };
|
|
2274
|
-
//#endregion
|
|
2275
|
-
export { ie as _, vn as a, $t as c, At as d, St as f, we as g, rt as h, yn as i, zt as l, lt as m, Cn as n, dn as o, pt as p, wn as r, on as s, $ as t, Ft as u };
|