yc-vep-ui 0.2.0 → 0.2.2
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/Form/index.vue.d.ts +3 -2
- package/dist/components/Form/type.d.ts +2 -2
- package/dist/components/utils/index.d.ts +3 -7
- package/dist/components/utils/render.d.ts +3 -1
- package/dist/{yc-vep-ui.css → index.css} +13 -13
- package/dist/vep-ui.es.js +757 -499
- package/dist/vep-ui.umd.js +1 -1
- package/package.json +14 -10
package/dist/vep-ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
-
import { AiEditor as
|
|
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 te, watch as I, watchEffect as L, withCtx as R, withDirectives as ne, withKeys as re, withModifiers as ie } from "vue";
|
|
2
|
+
import { AiEditor as ae } from "aieditor";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var z = Object.defineProperty, B = (e, t) => {
|
|
5
5
|
let n = {};
|
|
@@ -8,7 +8,7 @@ var z = Object.defineProperty, B = (e, t) => {
|
|
|
8
8
|
enumerable: !0
|
|
9
9
|
});
|
|
10
10
|
return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
-
},
|
|
11
|
+
}, oe = { class: /* @__PURE__ */ _({ bodyClass: !0 }) }, se = /* @__PURE__ */ u({
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
14
|
title: {},
|
|
@@ -24,28 +24,28 @@ var z = Object.defineProperty, B = (e, t) => {
|
|
|
24
24
|
borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
|
|
25
25
|
}));
|
|
26
26
|
return (t, o) => {
|
|
27
|
-
let l =
|
|
28
|
-
return
|
|
27
|
+
let l = E("el-icon"), u = E("el-card");
|
|
28
|
+
return x(), n(u, h(t.$attrs, { class: {
|
|
29
29
|
"ui-card": !0,
|
|
30
30
|
hideBorder: e.hideBorder
|
|
31
31
|
} }), s({
|
|
32
|
-
default:
|
|
32
|
+
default: R(() => [a("div", oe, [T(t.$slots, "default", {}, void 0, !0)])]),
|
|
33
33
|
_: 2
|
|
34
34
|
}, [e.title && e.title?.length > 0 ? {
|
|
35
35
|
name: "header",
|
|
36
|
-
fn:
|
|
37
|
-
default:
|
|
36
|
+
fn: R(() => [a("div", { style: v(i.value) }, [e.icon ? (x(), n(l, { key: 0 }, {
|
|
37
|
+
default: R(() => [(x(), n(O(e.icon), { color: "#2563eb" }))]),
|
|
38
38
|
_: 1
|
|
39
|
-
})) : r("", !0), o[0] || (
|
|
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
40
|
key: "0"
|
|
41
41
|
} : void 0]), 1040, ["class"]);
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), V = (e, t) => {
|
|
45
45
|
let n = e.__vccOpts || e;
|
|
46
46
|
for (let [e, r] of t) n[e] = r;
|
|
47
47
|
return n;
|
|
48
|
-
},
|
|
48
|
+
}, ce = /* @__PURE__ */ B({ default: () => le }), le = /* @__PURE__ */ V(se, [["__scopeId", "data-v-6ebb01d7"]]), H = {
|
|
49
49
|
get Button() {
|
|
50
50
|
return $()?.resolveComponent?.("el-button") || "el-button";
|
|
51
51
|
},
|
|
@@ -140,14 +140,14 @@ var z = Object.defineProperty, B = (e, t) => {
|
|
|
140
140
|
};
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/components/utils/render.ts
|
|
143
|
-
function
|
|
143
|
+
function U() {
|
|
144
144
|
let e = $();
|
|
145
145
|
return e?.h ? e.h : function(e, t, n) {
|
|
146
146
|
return console.warn("[yc-vep-ui] Vue not initialized. Call setHostVue(Vue) before using components."), null;
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
let t =
|
|
149
|
+
function ue(e) {
|
|
150
|
+
let t = U();
|
|
151
151
|
return t ? t("div", { style: {
|
|
152
152
|
display: "flex",
|
|
153
153
|
flexDirection: "row",
|
|
@@ -155,7 +155,7 @@ function oe(e) {
|
|
|
155
155
|
gap: "8px"
|
|
156
156
|
} }, (Array.isArray(e) ? e : [e]).map((e) => {
|
|
157
157
|
let { text: n, ...r } = e;
|
|
158
|
-
return t(
|
|
158
|
+
return t(H.Button, {
|
|
159
159
|
...r,
|
|
160
160
|
link: !0,
|
|
161
161
|
size: "small",
|
|
@@ -163,54 +163,54 @@ function oe(e) {
|
|
|
163
163
|
}, () => n);
|
|
164
164
|
})) : null;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
let t =
|
|
166
|
+
function de(e) {
|
|
167
|
+
let t = U();
|
|
168
168
|
return t ? Array.isArray(e) ? t("div", { style: {
|
|
169
169
|
display: "flex",
|
|
170
170
|
gap: "8px",
|
|
171
171
|
flexDirection: "row",
|
|
172
172
|
flexWrap: "wrap"
|
|
173
|
-
} }, e.map((e) => t(
|
|
173
|
+
} }, e.map((e) => t(H.Link, {
|
|
174
174
|
...e,
|
|
175
175
|
type: e.type || "primary"
|
|
176
|
-
}, () => t(
|
|
176
|
+
}, () => t(H.Text, {
|
|
177
177
|
lineClamp: e?.lineClamp,
|
|
178
178
|
type: e.type || "primary"
|
|
179
|
-
}, () => e.prop)))) : t(
|
|
179
|
+
}, () => e.prop)))) : t(H.Link, {
|
|
180
180
|
...e,
|
|
181
181
|
type: e.type || "primary"
|
|
182
|
-
}, () => t(
|
|
182
|
+
}, () => t(H.Text, {
|
|
183
183
|
lineClamp: e?.lineClamp,
|
|
184
184
|
type: e.type || "primary"
|
|
185
185
|
}, () => e.prop)) : null;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
let t =
|
|
187
|
+
function fe(e) {
|
|
188
|
+
let t = U();
|
|
189
189
|
return t ? t("div", { style: {
|
|
190
190
|
display: "flex",
|
|
191
191
|
gap: "4px",
|
|
192
192
|
flexDirection: "row",
|
|
193
193
|
flexWrap: "wrap"
|
|
194
|
-
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(
|
|
194
|
+
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(H.Tag, e, () => n))) : null;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
let t =
|
|
198
|
-
return t ? t(
|
|
196
|
+
function pe(e) {
|
|
197
|
+
let t = U();
|
|
198
|
+
return t ? t(H.Tag, { ...e }) : null;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
let t =
|
|
202
|
-
return t ? t(
|
|
200
|
+
function me(e) {
|
|
201
|
+
let t = U();
|
|
202
|
+
return t ? t(H.Select, {
|
|
203
203
|
style: { minWidth: "160px" },
|
|
204
204
|
...e,
|
|
205
205
|
placeholder: "请选择",
|
|
206
206
|
filterable: !0
|
|
207
207
|
}) : null;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
let t =
|
|
209
|
+
function he(e) {
|
|
210
|
+
let t = U();
|
|
211
211
|
if (!t) return null;
|
|
212
212
|
let n = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
213
|
-
return t(
|
|
213
|
+
return t(H.DatePicker, {
|
|
214
214
|
format: n,
|
|
215
215
|
valueFormat: n,
|
|
216
216
|
startPlaceholder: "开始时间",
|
|
@@ -220,11 +220,11 @@ function de(e) {
|
|
|
220
220
|
"onUpdate:modelValue": (t) => e?.onChange?.(t)
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
let t =
|
|
223
|
+
function ge(e) {
|
|
224
|
+
let t = U();
|
|
225
225
|
if (!t) return null;
|
|
226
226
|
let { start: n = "00:00", end: r = "23:30", ...i } = e;
|
|
227
|
-
return t(
|
|
227
|
+
return t(H.TimeSelect, {
|
|
228
228
|
start: n,
|
|
229
229
|
end: r,
|
|
230
230
|
...i,
|
|
@@ -232,21 +232,21 @@ function fe(e) {
|
|
|
232
232
|
filterable: !0
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
let t =
|
|
237
|
-
return t ? t(
|
|
235
|
+
function _e(e) {
|
|
236
|
+
let t = U();
|
|
237
|
+
return t ? t(H.Input, {
|
|
238
238
|
...e,
|
|
239
239
|
placeholder: "请输入"
|
|
240
240
|
}) : null;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
let t =
|
|
242
|
+
function ve(e) {
|
|
243
|
+
let t = U();
|
|
244
244
|
if (!t) return null;
|
|
245
245
|
let { align: n = "left", controlsPosition: r = "right", ...i } = e, a = {
|
|
246
246
|
...e?.style || {},
|
|
247
247
|
width: "100%"
|
|
248
248
|
};
|
|
249
|
-
return t(
|
|
249
|
+
return t(H.InputNumber, {
|
|
250
250
|
align: n,
|
|
251
251
|
style: a,
|
|
252
252
|
controlsPosition: r,
|
|
@@ -254,70 +254,71 @@ function me(e) {
|
|
|
254
254
|
...i
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
let t =
|
|
257
|
+
function ye(e) {
|
|
258
|
+
let t = U();
|
|
259
259
|
if (!t) return null;
|
|
260
260
|
let { rows: n = 1, ...r } = e;
|
|
261
|
-
return t(
|
|
261
|
+
return t(H.Input, {
|
|
262
262
|
placeholder: "请输入",
|
|
263
263
|
rows: n,
|
|
264
264
|
...r,
|
|
265
265
|
type: "textarea"
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
let t =
|
|
270
|
-
return t ? t(
|
|
268
|
+
function be(e) {
|
|
269
|
+
let t = U();
|
|
270
|
+
return t ? t(H.InputTag, {
|
|
271
271
|
placeholder: "请输入",
|
|
272
272
|
...e,
|
|
273
273
|
clearable: !1
|
|
274
274
|
}) : null;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
let t =
|
|
278
|
-
return t ? t(
|
|
276
|
+
function xe(e) {
|
|
277
|
+
let t = U();
|
|
278
|
+
return t ? t(ht || mt, e) : null;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
let t =
|
|
282
|
-
return t ? t(
|
|
280
|
+
function Se(e) {
|
|
281
|
+
let t = U();
|
|
282
|
+
return t ? t(H.RadioGroup, e) : null;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
let t =
|
|
286
|
-
return t ? t(
|
|
284
|
+
function Ce(e) {
|
|
285
|
+
let t = U();
|
|
286
|
+
return t ? t(H.Text, e, () => e.prop) : null;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
let t =
|
|
290
|
-
return t ? t(
|
|
288
|
+
function we(e) {
|
|
289
|
+
let t = U();
|
|
290
|
+
return t ? t(tn || en, {
|
|
291
291
|
placeholder: "请选择",
|
|
292
292
|
...e,
|
|
293
293
|
searchable: !0
|
|
294
294
|
}) : null;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
let t =
|
|
298
|
-
return t ? t(
|
|
296
|
+
function Te(e) {
|
|
297
|
+
let t = U();
|
|
298
|
+
return t ? t(cn || sn, {
|
|
299
299
|
...e,
|
|
300
|
+
"file-list": e.modelValue || e.fileList,
|
|
300
301
|
"onUpdate:fileList": (t, n) => e.onChange?.(n, t)
|
|
301
302
|
}) : null;
|
|
302
303
|
}
|
|
303
|
-
var
|
|
304
|
-
button:
|
|
305
|
-
link:
|
|
306
|
-
tag:
|
|
307
|
-
switch:
|
|
308
|
-
select:
|
|
309
|
-
datePicker:
|
|
310
|
-
timeSelect:
|
|
311
|
-
input:
|
|
312
|
-
inputNumber:
|
|
313
|
-
textarea:
|
|
314
|
-
inputTag:
|
|
315
|
-
editor:
|
|
316
|
-
radio:
|
|
317
|
-
text:
|
|
318
|
-
staffSelect:
|
|
319
|
-
upload:
|
|
320
|
-
},
|
|
304
|
+
var W = {
|
|
305
|
+
button: ue,
|
|
306
|
+
link: de,
|
|
307
|
+
tag: fe,
|
|
308
|
+
switch: pe,
|
|
309
|
+
select: me,
|
|
310
|
+
datePicker: he,
|
|
311
|
+
timeSelect: ge,
|
|
312
|
+
input: _e,
|
|
313
|
+
inputNumber: ve,
|
|
314
|
+
textarea: ye,
|
|
315
|
+
inputTag: be,
|
|
316
|
+
editor: xe,
|
|
317
|
+
radio: Se,
|
|
318
|
+
text: Ce,
|
|
319
|
+
staffSelect: we,
|
|
320
|
+
upload: Te
|
|
321
|
+
}, Ee = /* @__PURE__ */ u({
|
|
321
322
|
name: "UiColumn",
|
|
322
323
|
__name: "UiColumn",
|
|
323
324
|
props: {
|
|
@@ -332,7 +333,7 @@ var G = {
|
|
|
332
333
|
let a = r, o = t;
|
|
333
334
|
function s(e, t, n) {
|
|
334
335
|
let r = {};
|
|
335
|
-
Object.keys(
|
|
336
|
+
Object.keys(W).forEach((i) => {
|
|
336
337
|
let o = i;
|
|
337
338
|
r[o] = (r) => {
|
|
338
339
|
let i = Array.isArray(r) ? r : {
|
|
@@ -344,7 +345,7 @@ var G = {
|
|
|
344
345
|
onChange: r?.onChange || ((e) => a("update:data", t, n.prop, e)),
|
|
345
346
|
onInput: r?.onInput || ((e) => a("update:data", t, n.prop, e))
|
|
346
347
|
};
|
|
347
|
-
return
|
|
348
|
+
return W[o](i);
|
|
348
349
|
};
|
|
349
350
|
});
|
|
350
351
|
let i = n.render ? n.render({
|
|
@@ -356,13 +357,13 @@ var G = {
|
|
|
356
357
|
return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
|
|
357
358
|
}
|
|
358
359
|
return (r, a) => {
|
|
359
|
-
let l =
|
|
360
|
-
return t.column?.children && t.column?.children?.length > 0 ? (
|
|
360
|
+
let l = E("UiColumn", !0), u = E("el-table-column"), d = E("el-text");
|
|
361
|
+
return t.column?.children && t.column?.children?.length > 0 ? (x(), n(u, {
|
|
361
362
|
key: 0,
|
|
362
363
|
label: t.column.label,
|
|
363
364
|
align: o.align
|
|
364
365
|
}, {
|
|
365
|
-
default:
|
|
366
|
+
default: R(() => [(x(!0), i(e, null, w(t.column.children, (e) => (x(), n(l, h({
|
|
366
367
|
column: e,
|
|
367
368
|
data: o.data
|
|
368
369
|
}, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
|
|
@@ -371,7 +372,7 @@ var G = {
|
|
|
371
372
|
"align"
|
|
372
373
|
]))), 256))]),
|
|
373
374
|
_: 1
|
|
374
|
-
}, 8, ["label", "align"])) : (
|
|
375
|
+
}, 8, ["label", "align"])) : (x(), n(u, {
|
|
375
376
|
key: 1,
|
|
376
377
|
prop: String(t.column.prop),
|
|
377
378
|
label: t.column.label,
|
|
@@ -380,15 +381,15 @@ var G = {
|
|
|
380
381
|
width: t.column.width,
|
|
381
382
|
"show-overflow-tooltip": t.column.showOverflowTooltip
|
|
382
383
|
}, {
|
|
383
|
-
default:
|
|
384
|
+
default: R(({ row: e, $index: r }) => [t.column.render ? (x(), n(O(s(e, r, t.column)), {
|
|
384
385
|
key: 0,
|
|
385
386
|
align: o.align,
|
|
386
387
|
size: o.size
|
|
387
|
-
}, null, 8, ["align", "size"])) : (
|
|
388
|
+
}, null, 8, ["align", "size"])) : (x(), n(d, {
|
|
388
389
|
key: 1,
|
|
389
390
|
"line-clamp": t.column?.lineClamp || 2
|
|
390
391
|
}, {
|
|
391
|
-
default:
|
|
392
|
+
default: R(() => [c(j(e[t.column.prop]), 1)]),
|
|
392
393
|
_: 2
|
|
393
394
|
}, 1032, ["line-clamp"]))]),
|
|
394
395
|
_: 1
|
|
@@ -402,7 +403,7 @@ var G = {
|
|
|
402
403
|
]));
|
|
403
404
|
};
|
|
404
405
|
}
|
|
405
|
-
}),
|
|
406
|
+
}), De = /* @__PURE__ */ u({
|
|
406
407
|
__name: "index",
|
|
407
408
|
props: {
|
|
408
409
|
loading: {
|
|
@@ -414,14 +415,14 @@ var G = {
|
|
|
414
415
|
default: !1
|
|
415
416
|
},
|
|
416
417
|
size: { default: "default" },
|
|
417
|
-
data: { default: () =>
|
|
418
|
+
data: { default: () => S([]) },
|
|
418
419
|
columns: {},
|
|
419
420
|
align: { default: "left" },
|
|
420
421
|
hidePagination: {
|
|
421
422
|
type: Boolean,
|
|
422
423
|
default: !1
|
|
423
424
|
},
|
|
424
|
-
pagination: { default: () =>
|
|
425
|
+
pagination: { default: () => S({
|
|
425
426
|
page: 1,
|
|
426
427
|
pageSize: 10,
|
|
427
428
|
total: 0,
|
|
@@ -447,16 +448,16 @@ var G = {
|
|
|
447
448
|
"pagination",
|
|
448
449
|
"data",
|
|
449
450
|
"size"
|
|
450
|
-
]), u =
|
|
451
|
-
|
|
452
|
-
!e?.length || !t?.length ||
|
|
451
|
+
]), 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"));
|
|
452
|
+
I(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
|
|
453
|
+
!e?.length || !t?.length || g(() => {
|
|
453
454
|
if (!u.value) return;
|
|
454
455
|
let n = t.filter((t) => e.includes(t.id));
|
|
455
456
|
u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
|
|
456
457
|
});
|
|
457
458
|
}, { immediate: !0 });
|
|
458
|
-
function
|
|
459
|
-
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination",
|
|
459
|
+
function m(e, t) {
|
|
460
|
+
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", N(a.pagination));
|
|
460
461
|
}
|
|
461
462
|
function _(e, t, n) {
|
|
462
463
|
a.data[e] && (a.data[e] = {
|
|
@@ -465,9 +466,9 @@ var G = {
|
|
|
465
466
|
});
|
|
466
467
|
}
|
|
467
468
|
return (t, o) => {
|
|
468
|
-
let s =
|
|
469
|
-
return
|
|
470
|
-
|
|
469
|
+
let s = E("el-table-column"), c = E("el-table"), g = E("el-pagination"), v = D("loading");
|
|
470
|
+
return x(), i("div", null, [
|
|
471
|
+
ne((x(), n(c, h({ border: a.border }, t.$attrs, {
|
|
471
472
|
data: a.data,
|
|
472
473
|
lazy: !0,
|
|
473
474
|
class: "ui-table",
|
|
@@ -475,8 +476,8 @@ var G = {
|
|
|
475
476
|
ref_key: "tableRef",
|
|
476
477
|
ref: u
|
|
477
478
|
}), {
|
|
478
|
-
default:
|
|
479
|
-
f.value ? (
|
|
479
|
+
default: R(() => [
|
|
480
|
+
f.value ? (x(), n(s, {
|
|
480
481
|
key: 0,
|
|
481
482
|
type: "selection",
|
|
482
483
|
selectable: l.selectable,
|
|
@@ -484,7 +485,7 @@ var G = {
|
|
|
484
485
|
align: a.align,
|
|
485
486
|
fixed: "left"
|
|
486
487
|
}, null, 8, ["selectable", "align"])) : r("", !0),
|
|
487
|
-
d.value ? (
|
|
488
|
+
d.value ? (x(), n(s, {
|
|
488
489
|
key: 1,
|
|
489
490
|
fixed: "left",
|
|
490
491
|
type: "index",
|
|
@@ -493,7 +494,7 @@ var G = {
|
|
|
493
494
|
"column-key": "index_1",
|
|
494
495
|
align: a.align
|
|
495
496
|
}, null, 8, ["align"])) : r("", !0),
|
|
496
|
-
(
|
|
497
|
+
(x(!0), i(e, null, w(p.value, (e, t) => (x(), n(Ee, {
|
|
497
498
|
key: t + "column_" + e?.prop?.toString(),
|
|
498
499
|
column: e,
|
|
499
500
|
data: a.data,
|
|
@@ -509,7 +510,7 @@ var G = {
|
|
|
509
510
|
]),
|
|
510
511
|
_: 1
|
|
511
512
|
}, 16, ["border", "data"])), [[v, a.loading]]),
|
|
512
|
-
a.hidePagination ? r("", !0) : (
|
|
513
|
+
a.hidePagination ? r("", !0) : (x(), n(g, {
|
|
513
514
|
key: 0,
|
|
514
515
|
class: "ui-pagination",
|
|
515
516
|
size: "small",
|
|
@@ -526,18 +527,18 @@ var G = {
|
|
|
526
527
|
"onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
|
|
527
528
|
total: a.pagination.total,
|
|
528
529
|
"onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
|
|
529
|
-
onChange:
|
|
530
|
+
onChange: m
|
|
530
531
|
}, null, 8, [
|
|
531
532
|
"page-sizes",
|
|
532
533
|
"page-size",
|
|
533
534
|
"current-page",
|
|
534
535
|
"total"
|
|
535
536
|
])),
|
|
536
|
-
|
|
537
|
+
T(t.$slots, "default", {}, void 0, !0)
|
|
537
538
|
]);
|
|
538
539
|
};
|
|
539
540
|
}
|
|
540
|
-
}),
|
|
541
|
+
}), Oe = /* @__PURE__ */ B({ default: () => ke }), ke = /* @__PURE__ */ V(De, [["__scopeId", "data-v-adf869c1"]]), Ae = ["src"], je = /* @__PURE__ */ u({
|
|
541
542
|
__name: "Icon",
|
|
542
543
|
props: {
|
|
543
544
|
name: {},
|
|
@@ -545,19 +546,19 @@ var G = {
|
|
|
545
546
|
size: {}
|
|
546
547
|
},
|
|
547
548
|
setup(e) {
|
|
548
|
-
return (t, a) => e.name ? (
|
|
549
|
+
return (t, a) => e.name ? (x(), n(O(t.$attrs.component || e.name), h({ key: 0 }, t.$attrs, { style: {
|
|
549
550
|
width: "100%",
|
|
550
551
|
height: "100%"
|
|
551
|
-
} }), null, 16)) : e.url ? (
|
|
552
|
+
} }), null, 16)) : e.url ? (x(), i("img", {
|
|
552
553
|
key: 1,
|
|
553
554
|
src: e.url,
|
|
554
|
-
style:
|
|
555
|
+
style: v({
|
|
555
556
|
width: e.size,
|
|
556
557
|
height: e.size
|
|
557
558
|
})
|
|
558
|
-
}, null, 12,
|
|
559
|
+
}, null, 12, Ae)) : r("", !0);
|
|
559
560
|
}
|
|
560
|
-
}),
|
|
561
|
+
}), Me = {
|
|
561
562
|
style: {
|
|
562
563
|
width: "100%",
|
|
563
564
|
height: "100%"
|
|
@@ -568,30 +569,30 @@ var G = {
|
|
|
568
569
|
version: "1.1",
|
|
569
570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
570
571
|
"p-id": "8979"
|
|
571
|
-
},
|
|
572
|
+
}, G = /* @__PURE__ */ u({
|
|
572
573
|
__name: "Search",
|
|
573
574
|
setup(e) {
|
|
574
|
-
return (e, t) => (
|
|
575
|
+
return (e, t) => (x(), i("svg", Me, [...t[0] ||= [a("path", {
|
|
575
576
|
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",
|
|
576
577
|
"p-id": "8980"
|
|
577
578
|
}, null, -1)]]));
|
|
578
579
|
}
|
|
579
|
-
}),
|
|
580
|
+
}), Ne = {
|
|
580
581
|
style: {
|
|
581
582
|
width: "100%",
|
|
582
583
|
height: "100%"
|
|
583
584
|
},
|
|
584
585
|
viewBox: "0 0 1024 1024",
|
|
585
586
|
xmlns: "http://www.w3.org/2000/svg"
|
|
586
|
-
},
|
|
587
|
+
}, Pe = /* @__PURE__ */ u({
|
|
587
588
|
__name: "CloseBold",
|
|
588
589
|
setup(e) {
|
|
589
|
-
return (e, t) => (
|
|
590
|
+
return (e, t) => (x(), i("svg", Ne, [...t[0] ||= [a("path", {
|
|
590
591
|
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",
|
|
591
592
|
fill: "currentColor"
|
|
592
593
|
}, null, -1)]]));
|
|
593
594
|
}
|
|
594
|
-
}),
|
|
595
|
+
}), Fe = {
|
|
595
596
|
style: {
|
|
596
597
|
width: "100%",
|
|
597
598
|
height: "100%"
|
|
@@ -602,10 +603,10 @@ var G = {
|
|
|
602
603
|
version: "1.1",
|
|
603
604
|
xmlns: "http://www.w3.org/2000/svg",
|
|
604
605
|
"p-id": "10092"
|
|
605
|
-
},
|
|
606
|
+
}, K = /* @__PURE__ */ u({
|
|
606
607
|
__name: "User",
|
|
607
608
|
setup(e) {
|
|
608
|
-
return (e, t) => (
|
|
609
|
+
return (e, t) => (x(), i("svg", Fe, [...t[0] ||= [a("path", {
|
|
609
610
|
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",
|
|
610
611
|
fill: "#999999",
|
|
611
612
|
"p-id": "10093"
|
|
@@ -615,7 +616,7 @@ var G = {
|
|
|
615
616
|
"p-id": "10094"
|
|
616
617
|
}, null, -1)]]));
|
|
617
618
|
}
|
|
618
|
-
}),
|
|
619
|
+
}), Ie = {
|
|
619
620
|
style: {
|
|
620
621
|
width: "100%",
|
|
621
622
|
height: "100%"
|
|
@@ -626,16 +627,16 @@ var G = {
|
|
|
626
627
|
version: "1.1",
|
|
627
628
|
xmlns: "http://www.w3.org/2000/svg",
|
|
628
629
|
"p-id": "11055"
|
|
629
|
-
},
|
|
630
|
+
}, Le = /* @__PURE__ */ u({
|
|
630
631
|
__name: "Plus",
|
|
631
632
|
setup(e) {
|
|
632
|
-
return (e, t) => (
|
|
633
|
+
return (e, t) => (x(), i("svg", Ie, [...t[0] ||= [a("path", {
|
|
633
634
|
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",
|
|
634
635
|
fill: "#323233",
|
|
635
636
|
"p-id": "11056"
|
|
636
637
|
}, null, -1)]]));
|
|
637
638
|
}
|
|
638
|
-
}),
|
|
639
|
+
}), Re = {}, ze = {
|
|
639
640
|
style: {
|
|
640
641
|
width: "100%",
|
|
641
642
|
height: "100%"
|
|
@@ -647,14 +648,14 @@ var G = {
|
|
|
647
648
|
xmlns: "http://www.w3.org/2000/svg",
|
|
648
649
|
"p-id": "4859"
|
|
649
650
|
};
|
|
650
|
-
function
|
|
651
|
-
return
|
|
651
|
+
function Be(e, t) {
|
|
652
|
+
return x(), i("svg", ze, [...t[0] ||= [a("path", {
|
|
652
653
|
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",
|
|
653
654
|
fill: "#666666",
|
|
654
655
|
"p-id": "4860"
|
|
655
656
|
}, null, -1)]]);
|
|
656
657
|
}
|
|
657
|
-
var
|
|
658
|
+
var Ve = /* @__PURE__ */ V(Re, [["render", Be]]), He = {}, Ue = {
|
|
658
659
|
style: {
|
|
659
660
|
width: "100%",
|
|
660
661
|
height: "100%"
|
|
@@ -666,13 +667,13 @@ var Le = /* @__PURE__ */ H(Pe, [["render", Ie]]), Re = {}, ze = {
|
|
|
666
667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
667
668
|
"p-id": "6029"
|
|
668
669
|
};
|
|
669
|
-
function
|
|
670
|
-
return
|
|
670
|
+
function We(e, t) {
|
|
671
|
+
return x(), i("svg", Ue, [...t[0] ||= [a("path", {
|
|
671
672
|
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",
|
|
672
673
|
"p-id": "6030"
|
|
673
674
|
}, null, -1)]]);
|
|
674
675
|
}
|
|
675
|
-
var
|
|
676
|
+
var Ge = /* @__PURE__ */ V(He, [["render", We]]), Ke = {}, qe = {
|
|
676
677
|
style: {
|
|
677
678
|
width: "100%",
|
|
678
679
|
height: "100%"
|
|
@@ -684,8 +685,8 @@ var Ve = /* @__PURE__ */ H(Re, [["render", Be]]), He = {}, Ue = {
|
|
|
684
685
|
xmlns: "http://www.w3.org/2000/svg",
|
|
685
686
|
"p-id": "6997"
|
|
686
687
|
};
|
|
687
|
-
function
|
|
688
|
-
return
|
|
688
|
+
function Je(e, t) {
|
|
689
|
+
return x(), i("svg", qe, [...t[0] ||= [a("path", {
|
|
689
690
|
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",
|
|
690
691
|
"p-id": "6998"
|
|
691
692
|
}, null, -1), a("path", {
|
|
@@ -693,7 +694,7 @@ function We(e, t) {
|
|
|
693
694
|
"p-id": "6999"
|
|
694
695
|
}, null, -1)]]);
|
|
695
696
|
}
|
|
696
|
-
var
|
|
697
|
+
var q = /* @__PURE__ */ V(Ke, [["render", Je]]), Ye = {}, Xe = {
|
|
697
698
|
style: {
|
|
698
699
|
width: "100%",
|
|
699
700
|
height: "100%"
|
|
@@ -705,34 +706,34 @@ var J = /* @__PURE__ */ H(He, [["render", We]]), Ge = {}, Ke = {
|
|
|
705
706
|
xmlns: "http://www.w3.org/2000/svg",
|
|
706
707
|
"p-id": "9850"
|
|
707
708
|
};
|
|
708
|
-
function
|
|
709
|
-
return
|
|
709
|
+
function Ze(e, t) {
|
|
710
|
+
return x(), i("svg", Xe, [...t[0] ||= [a("path", {
|
|
710
711
|
d: "M64 448l832-320-128 704-446.016-243.008L832 192 243.008 544.96 64 448z m256 512v-303.04L512 768l-192 192z",
|
|
711
712
|
"p-id": "9851"
|
|
712
713
|
}, null, -1)]]);
|
|
713
714
|
}
|
|
714
|
-
var
|
|
715
|
-
ArrowRight: () =>
|
|
716
|
-
ArrowUp: () =>
|
|
717
|
-
CloseBold: () =>
|
|
718
|
-
Plus: () =>
|
|
719
|
-
Promotion: () =>
|
|
720
|
-
Refresh: () =>
|
|
721
|
-
Search: () =>
|
|
722
|
-
User: () =>
|
|
723
|
-
YcIcon: () =>
|
|
715
|
+
var Qe = /* @__PURE__ */ V(Ye, [["render", Ze]]), $e = /* @__PURE__ */ B({
|
|
716
|
+
ArrowRight: () => Ve,
|
|
717
|
+
ArrowUp: () => Ge,
|
|
718
|
+
CloseBold: () => Pe,
|
|
719
|
+
Plus: () => Le,
|
|
720
|
+
Promotion: () => Qe,
|
|
721
|
+
Refresh: () => q,
|
|
722
|
+
Search: () => G,
|
|
723
|
+
User: () => K,
|
|
724
|
+
YcIcon: () => je
|
|
724
725
|
});
|
|
725
726
|
//#endregion
|
|
726
727
|
//#region src/components/utils/tools.ts
|
|
727
|
-
function
|
|
728
|
+
function et(e) {
|
|
728
729
|
return typeof e == "number" ? e + "px" : e || "100px";
|
|
729
730
|
}
|
|
730
|
-
function
|
|
731
|
+
function tt(e) {
|
|
731
732
|
return typeof e == "number" ? e + "px" : e || "180px";
|
|
732
733
|
}
|
|
733
|
-
function
|
|
734
|
+
function J(e, t) {
|
|
734
735
|
let n = {};
|
|
735
|
-
return Object.keys(
|
|
736
|
+
return Object.keys(W).forEach((r) => {
|
|
736
737
|
let i = r;
|
|
737
738
|
n[i] = (n = {}) => ({
|
|
738
739
|
props: {
|
|
@@ -742,25 +743,28 @@ function X(e, t) {
|
|
|
742
743
|
onChange: (r) => n.onChange?.(r) || (t[e.prop] = r)
|
|
743
744
|
},
|
|
744
745
|
type: i,
|
|
745
|
-
component:
|
|
746
|
+
component: W[i]
|
|
746
747
|
});
|
|
747
748
|
}), ((n) => typeof e.render == "function" ? e.render({
|
|
748
749
|
h: n,
|
|
749
750
|
data: t
|
|
750
751
|
}) : n.input(n.props || {}))(n);
|
|
751
752
|
}
|
|
752
|
-
function
|
|
753
|
-
let n =
|
|
754
|
-
return typeof n == "object"
|
|
753
|
+
function Y(e, t) {
|
|
754
|
+
let n = J(e, t);
|
|
755
|
+
return typeof n == "object" ? n.type && typeof n.type == "object" ? {
|
|
756
|
+
component: n.type,
|
|
757
|
+
props: n.props
|
|
758
|
+
} : (n.component ||= n, n) : n;
|
|
755
759
|
}
|
|
756
760
|
//#endregion
|
|
757
761
|
//#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
758
|
-
var
|
|
762
|
+
var nt = { style: {
|
|
759
763
|
display: "flex",
|
|
760
764
|
"justify-content": "end",
|
|
761
765
|
"align-items": "center",
|
|
762
766
|
width: "100%"
|
|
763
|
-
} },
|
|
767
|
+
} }, rt = /* @__PURE__ */ u({
|
|
764
768
|
name: "UiDefaultFilter",
|
|
765
769
|
__name: "index",
|
|
766
770
|
props: {
|
|
@@ -790,21 +794,21 @@ var Ze = { style: {
|
|
|
790
794
|
"column",
|
|
791
795
|
"size",
|
|
792
796
|
"filterFixedValues"
|
|
793
|
-
]), p =
|
|
797
|
+
]), p = S({
|
|
794
798
|
expandNum: 0,
|
|
795
799
|
expand: !1
|
|
796
|
-
}),
|
|
797
|
-
|
|
800
|
+
}), 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);
|
|
801
|
+
y(() => {
|
|
798
802
|
p.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
|
|
799
|
-
let t =
|
|
800
|
-
t !== void 0 && (
|
|
803
|
+
let t = J(e, m)?.props?.defaultValue;
|
|
804
|
+
t !== void 0 && (m[e.prop] = t);
|
|
801
805
|
});
|
|
802
806
|
});
|
|
803
|
-
function
|
|
807
|
+
function b() {
|
|
804
808
|
let e = {};
|
|
805
|
-
Object.keys(
|
|
806
|
-
if (
|
|
807
|
-
let n =
|
|
809
|
+
Object.keys(m).forEach((t) => {
|
|
810
|
+
if (m[t] !== void 0) {
|
|
811
|
+
let n = N(m[t]);
|
|
808
812
|
e[t] = typeof n == "string" ? n.trim() : n;
|
|
809
813
|
}
|
|
810
814
|
}), d("submit", {
|
|
@@ -815,47 +819,47 @@ var Ze = { style: {
|
|
|
815
819
|
...s.filterFixedValues
|
|
816
820
|
});
|
|
817
821
|
}
|
|
818
|
-
function
|
|
819
|
-
Object.keys(
|
|
820
|
-
s.omitFields.includes(e) || (
|
|
821
|
-
}), d("reset",
|
|
822
|
+
function C() {
|
|
823
|
+
Object.keys(m).forEach((e) => {
|
|
824
|
+
s.omitFields.includes(e) || (m[e] = void 0);
|
|
825
|
+
}), d("reset", m);
|
|
822
826
|
}
|
|
823
827
|
return (t, o) => {
|
|
824
|
-
let u =
|
|
825
|
-
return
|
|
826
|
-
model:
|
|
828
|
+
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");
|
|
829
|
+
return x(), n(D, h({
|
|
830
|
+
model: m,
|
|
827
831
|
class: "ui-filter",
|
|
828
832
|
size: s.size
|
|
829
833
|
}, t.$attrs), {
|
|
830
|
-
default:
|
|
834
|
+
default: R(() => [l(S, {
|
|
831
835
|
gutter: 20,
|
|
832
836
|
style: { "margin-bottom": "-15px" }
|
|
833
837
|
}, {
|
|
834
|
-
default:
|
|
835
|
-
default:
|
|
838
|
+
default: R(() => [(x(!0), i(e, null, w(g.value, (e) => (x(), n(f, { span: e.span || 24 / s.column }, {
|
|
839
|
+
default: R(() => [(x(), n(d, {
|
|
836
840
|
key: e.prop,
|
|
837
841
|
label: e.label,
|
|
838
|
-
"label-width":
|
|
839
|
-
"value-width":
|
|
842
|
+
"label-width": P(et)(e?.labelWidth || s.labelWidth),
|
|
843
|
+
"value-width": P(tt)(e?.valueWidth || s.valueWidth)
|
|
840
844
|
}, {
|
|
841
|
-
default:
|
|
845
|
+
default: R(() => [e.render ? (x(), n(O(P(J)(e, m).component), h({
|
|
842
846
|
key: 0,
|
|
843
|
-
modelValue:
|
|
844
|
-
"onUpdate:modelValue": (t) =>
|
|
845
|
-
}, { ref_for: !0 },
|
|
847
|
+
modelValue: m[e.prop],
|
|
848
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t
|
|
849
|
+
}, { ref_for: !0 }, P(J)(e, m).props, {
|
|
846
850
|
clearable: !0,
|
|
847
|
-
style: { width:
|
|
851
|
+
style: { width: P(tt)(e?.valueWidth || s.valueWidth) }
|
|
848
852
|
}), null, 16, [
|
|
849
853
|
"modelValue",
|
|
850
854
|
"onUpdate:modelValue",
|
|
851
855
|
"style"
|
|
852
|
-
])) : (
|
|
856
|
+
])) : (x(), n(u, {
|
|
853
857
|
key: 1,
|
|
854
|
-
modelValue:
|
|
855
|
-
"onUpdate:modelValue": (t) =>
|
|
858
|
+
modelValue: m[e.prop],
|
|
859
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
856
860
|
placeholder: "请输入",
|
|
857
861
|
clearable: !0,
|
|
858
|
-
style:
|
|
862
|
+
style: v({ width: P(tt)(e?.valueWidth || s.valueWidth) })
|
|
859
863
|
}, null, 8, [
|
|
860
864
|
"modelValue",
|
|
861
865
|
"onUpdate:modelValue",
|
|
@@ -870,40 +874,40 @@ var Ze = { style: {
|
|
|
870
874
|
_: 2
|
|
871
875
|
}, 1032, ["span"]))), 256)), l(f, {
|
|
872
876
|
span: 24 / s.column,
|
|
873
|
-
offset:
|
|
877
|
+
offset: _.value
|
|
874
878
|
}, {
|
|
875
|
-
default:
|
|
879
|
+
default: R(() => [l(d, {
|
|
876
880
|
label: "",
|
|
877
881
|
"label-width": "30px"
|
|
878
882
|
}, {
|
|
879
|
-
default:
|
|
880
|
-
|
|
881
|
-
s.fields.length >= 2 * s.column ? (
|
|
883
|
+
default: R(() => [a("div", nt, [
|
|
884
|
+
T(t.$slots, "left", { form: m }, void 0, !0),
|
|
885
|
+
s.fields.length >= 2 * s.column ? (x(), n(y, {
|
|
882
886
|
key: 0,
|
|
883
887
|
text: "",
|
|
884
|
-
icon: p.expand ?
|
|
888
|
+
icon: p.expand ? P(Ge) : P(Ve),
|
|
885
889
|
onClick: o[0] ||= (e) => p.expand = !p.expand
|
|
886
890
|
}, {
|
|
887
|
-
default:
|
|
891
|
+
default: R(() => [c(j(p.expand ? "收起" : "展开"), 1)]),
|
|
888
892
|
_: 1
|
|
889
893
|
}, 8, ["icon"])) : r("", !0),
|
|
890
|
-
l(
|
|
891
|
-
icon:
|
|
894
|
+
l(y, {
|
|
895
|
+
icon: P(G),
|
|
892
896
|
type: "primary",
|
|
893
|
-
onClick:
|
|
897
|
+
onClick: b
|
|
894
898
|
}, {
|
|
895
|
-
default:
|
|
899
|
+
default: R(() => [...o[1] ||= [c("查询", -1)]]),
|
|
896
900
|
_: 1
|
|
897
901
|
}, 8, ["icon"]),
|
|
898
|
-
l(
|
|
899
|
-
icon:
|
|
900
|
-
onClick:
|
|
902
|
+
l(y, {
|
|
903
|
+
icon: P(q),
|
|
904
|
+
onClick: C
|
|
901
905
|
}, {
|
|
902
|
-
default:
|
|
906
|
+
default: R(() => [...o[2] ||= [c("重置", -1)]]),
|
|
903
907
|
_: 1
|
|
904
908
|
}, 8, ["icon"]),
|
|
905
|
-
|
|
906
|
-
|
|
909
|
+
T(t.$slots, "handle", { form: m }, void 0, !0),
|
|
910
|
+
T(t.$slots, "right", { form: m }, void 0, !0)
|
|
907
911
|
])]),
|
|
908
912
|
_: 3
|
|
909
913
|
})]),
|
|
@@ -915,16 +919,16 @@ var Ze = { style: {
|
|
|
915
919
|
}, 16, ["model", "size"]);
|
|
916
920
|
};
|
|
917
921
|
}
|
|
918
|
-
}),
|
|
922
|
+
}), it = /* @__PURE__ */ B({ default: () => at }), at = /* @__PURE__ */ V(rt, [["__scopeId", "data-v-0e3c7086"]]), ot = {
|
|
919
923
|
key: 0,
|
|
920
924
|
style: { display: "inline-block" }
|
|
921
|
-
},
|
|
925
|
+
}, st = {
|
|
922
926
|
key: 0,
|
|
923
927
|
style: { display: "inline-block" }
|
|
924
|
-
},
|
|
928
|
+
}, ct = {
|
|
925
929
|
key: 0,
|
|
926
930
|
class: "ui-form-buttons"
|
|
927
|
-
},
|
|
931
|
+
}, lt = /* @__PURE__ */ u({
|
|
928
932
|
__name: "index",
|
|
929
933
|
props: {
|
|
930
934
|
fields: {},
|
|
@@ -933,18 +937,23 @@ var Ze = { style: {
|
|
|
933
937
|
labelWidth: { default: "100px" },
|
|
934
938
|
labelPosition: { default: "top" },
|
|
935
939
|
omitFields: { default: () => [] },
|
|
936
|
-
rules: { default: () =>
|
|
940
|
+
rules: { default: () => S({}) },
|
|
937
941
|
required: { type: Boolean },
|
|
938
942
|
column: { default: 24 },
|
|
939
943
|
defaultValues: {},
|
|
940
|
-
|
|
944
|
+
model: {},
|
|
941
945
|
valueModel: { default: "default" },
|
|
942
946
|
size: {}
|
|
943
947
|
},
|
|
944
|
-
emits: [
|
|
948
|
+
emits: [
|
|
949
|
+
"submit",
|
|
950
|
+
"reset",
|
|
951
|
+
"update:model"
|
|
952
|
+
],
|
|
945
953
|
setup(a, { expose: s, emit: u }) {
|
|
946
|
-
|
|
947
|
-
let d = u
|
|
954
|
+
ee((e) => ({ fc2b2f2a: e.column / 2 }));
|
|
955
|
+
let d = u;
|
|
956
|
+
o(a, [
|
|
948
957
|
"fields",
|
|
949
958
|
"labelWidth",
|
|
950
959
|
"valueWidth",
|
|
@@ -952,20 +961,22 @@ var Ze = { style: {
|
|
|
952
961
|
"rules",
|
|
953
962
|
"labelPosition",
|
|
954
963
|
"valueModel",
|
|
955
|
-
"column"
|
|
956
|
-
|
|
957
|
-
|
|
964
|
+
"column",
|
|
965
|
+
"model"
|
|
966
|
+
]);
|
|
967
|
+
let f = C(0), p = C(), m = S({}), g = t(() => {
|
|
968
|
+
let e = N(m);
|
|
958
969
|
return a.fields.forEach((t) => {
|
|
959
|
-
let n = t.prop ? e?.[t.prop] : void 0, r =
|
|
960
|
-
|
|
961
|
-
let n = t.prop ? e?.[t.prop] : void 0, r =
|
|
962
|
-
|
|
970
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, m)?.props?.defaultValue;
|
|
971
|
+
m[t.prop] = n ?? r ?? void 0, t?.slots && t?.slots?.length > 0 && t.slots.forEach((t) => {
|
|
972
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, m)?.props?.defaultValue;
|
|
973
|
+
m[t.prop] = n ?? r ?? void 0;
|
|
963
974
|
});
|
|
964
975
|
}), a.fields.filter((e) => typeof e.prop == "string");
|
|
965
|
-
}),
|
|
976
|
+
}), y = t(() => {
|
|
966
977
|
if (a.rules && Object.keys(a.rules).length) return a.rules;
|
|
967
978
|
let e = {};
|
|
968
|
-
return
|
|
979
|
+
return g.value.forEach((t) => {
|
|
969
980
|
t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
|
|
970
981
|
required: !0,
|
|
971
982
|
message: "请输入" + t.label,
|
|
@@ -973,54 +984,54 @@ var Ze = { style: {
|
|
|
973
984
|
}]);
|
|
974
985
|
}), e;
|
|
975
986
|
});
|
|
976
|
-
|
|
977
|
-
Object.assign(
|
|
987
|
+
L(() => {
|
|
988
|
+
Object.assign(m, a.model);
|
|
978
989
|
});
|
|
979
|
-
async function
|
|
990
|
+
async function b(e) {
|
|
980
991
|
let t = !0;
|
|
981
992
|
if (await e.validate((e) => {
|
|
982
993
|
t = e;
|
|
983
994
|
}), !t) return;
|
|
984
995
|
let n = {};
|
|
985
|
-
Object.keys(
|
|
986
|
-
|
|
996
|
+
Object.keys(m).forEach((e) => {
|
|
997
|
+
m[e] !== void 0 && (n[e] = N(m[e]));
|
|
987
998
|
}), d("submit", n);
|
|
988
999
|
}
|
|
989
|
-
function
|
|
990
|
-
|
|
1000
|
+
function D() {
|
|
1001
|
+
p && p.value?.clearValidate();
|
|
991
1002
|
}
|
|
992
|
-
function
|
|
993
|
-
Object.keys(
|
|
994
|
-
a.omitFields.includes(e) || (
|
|
995
|
-
}),
|
|
1003
|
+
function k(e) {
|
|
1004
|
+
Object.keys(m).forEach((e) => {
|
|
1005
|
+
a.omitFields.includes(e) || (m[e] = void 0);
|
|
1006
|
+
}), f.value += 1, d("reset", m);
|
|
996
1007
|
}
|
|
997
|
-
function
|
|
998
|
-
return
|
|
1008
|
+
function A() {
|
|
1009
|
+
return m;
|
|
999
1010
|
}
|
|
1000
|
-
function
|
|
1011
|
+
function M(e) {
|
|
1001
1012
|
Object.keys(e).forEach((t) => {
|
|
1002
|
-
|
|
1013
|
+
m[t] = e[t];
|
|
1003
1014
|
});
|
|
1004
1015
|
}
|
|
1005
|
-
async function
|
|
1016
|
+
async function F() {
|
|
1006
1017
|
return new Promise((e) => {
|
|
1007
|
-
|
|
1018
|
+
p.value?.validate((t, n) => e(n));
|
|
1008
1019
|
});
|
|
1009
1020
|
}
|
|
1010
1021
|
return s({
|
|
1011
|
-
getValues:
|
|
1012
|
-
setValues:
|
|
1013
|
-
clearValidate:
|
|
1014
|
-
onSubmit:
|
|
1015
|
-
validate:
|
|
1022
|
+
getValues: A,
|
|
1023
|
+
setValues: M,
|
|
1024
|
+
clearValidate: D,
|
|
1025
|
+
onSubmit: b,
|
|
1026
|
+
validate: F
|
|
1016
1027
|
}), (t, o) => {
|
|
1017
|
-
let s =
|
|
1018
|
-
return
|
|
1028
|
+
let s = E("el-input"), u = E("el-form-item"), d = E("el-form"), S = E("el-button");
|
|
1029
|
+
return x(), i(e, null, [l(d, h({
|
|
1019
1030
|
ref_key: "uiFormRef",
|
|
1020
|
-
ref:
|
|
1021
|
-
model:
|
|
1031
|
+
ref: p,
|
|
1032
|
+
model: m
|
|
1022
1033
|
}, t.$attrs, {
|
|
1023
|
-
rules:
|
|
1034
|
+
rules: y.value,
|
|
1024
1035
|
inline: a.labelPosition !== "top",
|
|
1025
1036
|
"label-position": a.labelPosition,
|
|
1026
1037
|
class: {
|
|
@@ -1029,37 +1040,37 @@ var Ze = { style: {
|
|
|
1029
1040
|
},
|
|
1030
1041
|
"validate-on-rule-change": !1
|
|
1031
1042
|
}), {
|
|
1032
|
-
default:
|
|
1043
|
+
default: R(() => [(x(!0), i(e, null, w(g.value, (r) => (x(), n(u, {
|
|
1033
1044
|
key: r.prop,
|
|
1034
1045
|
label: r.label,
|
|
1035
1046
|
"label-width": a.labelWidth,
|
|
1036
1047
|
"value-width": a.valueWidth,
|
|
1037
1048
|
prop: r.prop,
|
|
1038
|
-
style:
|
|
1049
|
+
style: v({
|
|
1039
1050
|
width: `${r?.width ? r?.width + "px" : "100%"}`,
|
|
1040
1051
|
gridColumn: `span ${(r?.span || a.column) / 2 || 1}`
|
|
1041
1052
|
})
|
|
1042
1053
|
}, {
|
|
1043
|
-
default:
|
|
1054
|
+
default: R(() => [r.render ? (x(), i(e, { key: 0 }, [P(Y)(r, m).component ? (x(), n(O(P(Y)(r, m).component), h({
|
|
1044
1055
|
key: 1,
|
|
1045
|
-
modelValue:
|
|
1046
|
-
"onUpdate:modelValue": (e) =>
|
|
1047
|
-
}, { ref_for: !0 },
|
|
1056
|
+
modelValue: m[r.prop],
|
|
1057
|
+
"onUpdate:modelValue": (e) => m[r.prop] = e
|
|
1058
|
+
}, { ref_for: !0 }, P(Y)(r, m).props, {
|
|
1048
1059
|
clearable: !0,
|
|
1049
|
-
key: `${r.prop}-${
|
|
1060
|
+
key: `${r.prop}-${f.value}`,
|
|
1050
1061
|
style: { display: "inline-block" },
|
|
1051
1062
|
class: { underline: a.valueModel === "underline" }
|
|
1052
1063
|
}), null, 16, [
|
|
1053
1064
|
"modelValue",
|
|
1054
1065
|
"onUpdate:modelValue",
|
|
1055
1066
|
"class"
|
|
1056
|
-
])) : (
|
|
1067
|
+
])) : (x(), i("span", ot, j(P(Y)(r, m) || "-"), 1)), (x(!0), i(e, null, w(r.slots, (e) => T(t.$slots, "default", { form: m }, () => [P(Y)(e, m).component ? (x(), n(O(P(Y)(e, m).component), h({
|
|
1057
1068
|
key: 1,
|
|
1058
|
-
modelValue:
|
|
1059
|
-
"onUpdate:modelValue": (t) =>
|
|
1069
|
+
modelValue: m[e.prop],
|
|
1070
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
1060
1071
|
"default-value": e.defaultValue,
|
|
1061
1072
|
placeholder: e.placeholder
|
|
1062
|
-
}, { ref_for: !0 },
|
|
1073
|
+
}, { ref_for: !0 }, P(Y)(e, m).props, {
|
|
1063
1074
|
style: {
|
|
1064
1075
|
display: "inline-block",
|
|
1065
1076
|
marginLeft: "10px",
|
|
@@ -1067,7 +1078,7 @@ var Ze = { style: {
|
|
|
1067
1078
|
},
|
|
1068
1079
|
class: { underline: a.valueModel === "underline" },
|
|
1069
1080
|
clearable: !0,
|
|
1070
|
-
key: `${e.prop}-${
|
|
1081
|
+
key: `${e.prop}-${f.value}`
|
|
1071
1082
|
}), null, 16, [
|
|
1072
1083
|
"modelValue",
|
|
1073
1084
|
"onUpdate:modelValue",
|
|
@@ -1075,13 +1086,13 @@ var Ze = { style: {
|
|
|
1075
1086
|
"placeholder",
|
|
1076
1087
|
"style",
|
|
1077
1088
|
"class"
|
|
1078
|
-
])) : (
|
|
1089
|
+
])) : (x(), i("span", st, j(P(Y)(e, m) || "-"), 1))], !0)), 256))], 64)) : (x(), n(s, {
|
|
1079
1090
|
key: 1,
|
|
1080
|
-
modelValue:
|
|
1081
|
-
"onUpdate:modelValue": (e) =>
|
|
1091
|
+
modelValue: m[r.prop],
|
|
1092
|
+
"onUpdate:modelValue": (e) => m[r.prop] = e,
|
|
1082
1093
|
placeholder: "请输入",
|
|
1083
1094
|
clearable: !0,
|
|
1084
|
-
class:
|
|
1095
|
+
class: _({ underline: a.valueModel === "underline" })
|
|
1085
1096
|
}, null, 8, [
|
|
1086
1097
|
"modelValue",
|
|
1087
1098
|
"onUpdate:modelValue",
|
|
@@ -1102,31 +1113,31 @@ var Ze = { style: {
|
|
|
1102
1113
|
"inline",
|
|
1103
1114
|
"label-position",
|
|
1104
1115
|
"class"
|
|
1105
|
-
]), t.$attrs?.hideHandle ? r("", !0) : (
|
|
1106
|
-
|
|
1107
|
-
l(
|
|
1108
|
-
icon:
|
|
1109
|
-
onClick: o[0] ||= (e) =>
|
|
1116
|
+
]), t.$attrs?.hideHandle ? r("", !0) : (x(), i("div", ct, [
|
|
1117
|
+
T(t.$slots, "handle", { form: m }, void 0, !0),
|
|
1118
|
+
l(S, {
|
|
1119
|
+
icon: P(q),
|
|
1120
|
+
onClick: o[0] ||= (e) => p.value && k(p.value),
|
|
1110
1121
|
size: t.$props.size
|
|
1111
1122
|
}, {
|
|
1112
|
-
default:
|
|
1123
|
+
default: R(() => [...o[2] ||= [c("重置", -1)]]),
|
|
1113
1124
|
_: 1
|
|
1114
1125
|
}, 8, ["icon", "size"]),
|
|
1115
|
-
l(
|
|
1116
|
-
icon:
|
|
1126
|
+
l(S, {
|
|
1127
|
+
icon: P(Qe),
|
|
1117
1128
|
type: "primary",
|
|
1118
|
-
onClick: o[1] ||= (e) =>
|
|
1129
|
+
onClick: o[1] ||= (e) => p.value && b(p.value),
|
|
1119
1130
|
size: t.$props.size
|
|
1120
1131
|
}, {
|
|
1121
|
-
default:
|
|
1132
|
+
default: R(() => [...o[3] ||= [c("提交", -1)]]),
|
|
1122
1133
|
_: 1
|
|
1123
1134
|
}, 8, ["icon", "size"])
|
|
1124
1135
|
]))], 64);
|
|
1125
1136
|
};
|
|
1126
1137
|
}
|
|
1127
|
-
}),
|
|
1138
|
+
}), ut = /* @__PURE__ */ B({ default: () => dt }), dt = /* @__PURE__ */ V(lt, [["__scopeId", "data-v-5e602fff"]]), ft = ["disabled"], pt = /* @__PURE__ */ u({
|
|
1128
1139
|
__name: "index",
|
|
1129
|
-
props: /* @__PURE__ */
|
|
1140
|
+
props: /* @__PURE__ */ m({
|
|
1130
1141
|
defaultValue: { default: "" },
|
|
1131
1142
|
disabled: {
|
|
1132
1143
|
type: Boolean,
|
|
@@ -1139,11 +1150,11 @@ var Ze = { style: {
|
|
|
1139
1150
|
},
|
|
1140
1151
|
modelModifiers: {}
|
|
1141
1152
|
}),
|
|
1142
|
-
emits: /* @__PURE__ */
|
|
1153
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
1143
1154
|
setup(e, { emit: t }) {
|
|
1144
|
-
let n =
|
|
1145
|
-
return
|
|
1146
|
-
o = new
|
|
1155
|
+
let n = C(), r = te(e, "modelValue"), a = C(r.value || e.defaultValue || ""), o = null, s = t;
|
|
1156
|
+
return y(() => {
|
|
1157
|
+
o = new ae({
|
|
1147
1158
|
element: n.value,
|
|
1148
1159
|
placeholder: "点击输入内容...",
|
|
1149
1160
|
content: r.value || e.defaultValue || "",
|
|
@@ -1153,18 +1164,18 @@ var Ze = { style: {
|
|
|
1153
1164
|
r.value = t, a.value = t, s("change", t);
|
|
1154
1165
|
}
|
|
1155
1166
|
}), o.setEditable(!e.disabled);
|
|
1156
|
-
}),
|
|
1167
|
+
}), I(r, (e) => {
|
|
1157
1168
|
o && e !== o.getHtml() && o.setContent(e);
|
|
1158
|
-
}),
|
|
1169
|
+
}), b(() => {
|
|
1159
1170
|
o && o.destroy();
|
|
1160
|
-
}), (t, r) => (
|
|
1171
|
+
}), (t, r) => (x(), i("div", {
|
|
1161
1172
|
ref_key: "editorRef",
|
|
1162
1173
|
ref: n,
|
|
1163
1174
|
style: { height: "500px" },
|
|
1164
1175
|
disabled: e.disabled
|
|
1165
|
-
}, null, 8,
|
|
1176
|
+
}, null, 8, ft));
|
|
1166
1177
|
}
|
|
1167
|
-
}),
|
|
1178
|
+
}), mt = /* @__PURE__ */ B({ default: () => ht }), ht = pt, gt = { class: "ui-tree-wrapper" }, _t = {
|
|
1168
1179
|
key: 0,
|
|
1169
1180
|
style: {
|
|
1170
1181
|
display: "flex",
|
|
@@ -1173,10 +1184,10 @@ var Ze = { style: {
|
|
|
1173
1184
|
"align-items": "center",
|
|
1174
1185
|
gap: "10px"
|
|
1175
1186
|
}
|
|
1176
|
-
},
|
|
1187
|
+
}, vt = {
|
|
1177
1188
|
key: 0,
|
|
1178
1189
|
class: "custom-tree-node"
|
|
1179
|
-
},
|
|
1190
|
+
}, yt = { class: "node-label" }, bt = { key: 0 }, xt = ["onClick"], St = /* @__PURE__ */ u({
|
|
1180
1191
|
__name: "index",
|
|
1181
1192
|
props: {
|
|
1182
1193
|
id: {},
|
|
@@ -1202,23 +1213,23 @@ var Ze = { style: {
|
|
|
1202
1213
|
"delete"
|
|
1203
1214
|
],
|
|
1204
1215
|
setup(e, { emit: s }) {
|
|
1205
|
-
let u = s, f =
|
|
1216
|
+
let u = s, f = F(), p = o(e, [
|
|
1206
1217
|
"filterable",
|
|
1207
1218
|
"placeholder",
|
|
1208
1219
|
"data",
|
|
1209
1220
|
"props"
|
|
1210
|
-
]),
|
|
1211
|
-
|
|
1221
|
+
]), m = C(""), g = C(), _ = C(), v = d()?.appContext.config.globalProperties.$messageBox;
|
|
1222
|
+
I(m, (t) => {
|
|
1212
1223
|
e.filterable && _.value?.filter(t);
|
|
1213
1224
|
});
|
|
1214
1225
|
let y = t(() => f?.["show-total"] ?? p?.showTotal ?? !0);
|
|
1215
|
-
function
|
|
1226
|
+
function b(t, n) {
|
|
1216
1227
|
return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
|
|
1217
1228
|
}
|
|
1218
|
-
function
|
|
1229
|
+
function S(e, t) {
|
|
1219
1230
|
e?.stopPropagation(), g.value = t.id;
|
|
1220
1231
|
}
|
|
1221
|
-
function
|
|
1232
|
+
function w(e) {
|
|
1222
1233
|
v?.prompt("请输入新的名称", "添加节点", {
|
|
1223
1234
|
confirmButtonText: "确定",
|
|
1224
1235
|
cancelButtonText: "取消"
|
|
@@ -1245,27 +1256,27 @@ var Ze = { style: {
|
|
|
1245
1256
|
e.id && u("delete", e);
|
|
1246
1257
|
}
|
|
1247
1258
|
return (t, o) => {
|
|
1248
|
-
let s =
|
|
1249
|
-
return
|
|
1250
|
-
e.filterable ? (
|
|
1251
|
-
modelValue:
|
|
1252
|
-
"onUpdate:modelValue": o[0] ||= (e) =>
|
|
1259
|
+
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");
|
|
1260
|
+
return x(), i("div", gt, [
|
|
1261
|
+
e.filterable ? (x(), i("div", _t, [l(s, {
|
|
1262
|
+
modelValue: m.value,
|
|
1263
|
+
"onUpdate:modelValue": o[0] ||= (e) => m.value = e,
|
|
1253
1264
|
placeholder: e.placeholder ?? "请输入",
|
|
1254
1265
|
clearable: ""
|
|
1255
|
-
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (
|
|
1266
|
+
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (x(), n(u, {
|
|
1256
1267
|
key: 0,
|
|
1257
1268
|
style: {
|
|
1258
1269
|
margin: "0px",
|
|
1259
1270
|
padding: "0px"
|
|
1260
1271
|
},
|
|
1261
1272
|
link: "",
|
|
1262
|
-
onClick: o[1] ||= (e) =>
|
|
1273
|
+
onClick: o[1] ||= (e) => w()
|
|
1263
1274
|
}, {
|
|
1264
|
-
default:
|
|
1275
|
+
default: R(() => [...o[2] ||= [a("span", { style: { padding: "4px" } }, "+", -1)]]),
|
|
1265
1276
|
_: 1
|
|
1266
1277
|
}))])) : r("", !0),
|
|
1267
|
-
|
|
1268
|
-
l(v,
|
|
1278
|
+
T(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
|
|
1279
|
+
l(v, h({
|
|
1269
1280
|
ref_key: "treeRef",
|
|
1270
1281
|
ref: _,
|
|
1271
1282
|
style: { "margin-top": "8px" }
|
|
@@ -1275,46 +1286,46 @@ var Ze = { style: {
|
|
|
1275
1286
|
}, {
|
|
1276
1287
|
"node-key": p?.nodeKey || "id",
|
|
1277
1288
|
"highlight-current": !0,
|
|
1278
|
-
"filter-method":
|
|
1289
|
+
"filter-method": b
|
|
1279
1290
|
}), {
|
|
1280
|
-
default:
|
|
1291
|
+
default: R((s) => [s?.data ? (x(), i("div", vt, [a("div", yt, [s.data?.children?.length ? (x(), i("span", bt, "📁")) : 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, {
|
|
1281
1292
|
key: 0,
|
|
1282
1293
|
trigger: "click"
|
|
1283
1294
|
}, {
|
|
1284
|
-
dropdown:
|
|
1285
|
-
default:
|
|
1286
|
-
p?.hideNodeAdd ? r("", !0) : (
|
|
1295
|
+
dropdown: R(() => [l(f, null, {
|
|
1296
|
+
default: R(() => [
|
|
1297
|
+
p?.hideNodeAdd ? r("", !0) : (x(), n(d, {
|
|
1287
1298
|
key: 0,
|
|
1288
|
-
onClick: (e) =>
|
|
1299
|
+
onClick: (e) => w(s.data)
|
|
1289
1300
|
}, {
|
|
1290
|
-
default:
|
|
1301
|
+
default: R(() => [...o[3] ||= [c(" 添加 ", -1)]]),
|
|
1291
1302
|
_: 1
|
|
1292
1303
|
}, 8, ["onClick"])),
|
|
1293
|
-
p?.hideNodeEdit ? r("", !0) : (
|
|
1304
|
+
p?.hideNodeEdit ? r("", !0) : (x(), n(d, {
|
|
1294
1305
|
key: 1,
|
|
1295
1306
|
onClick: (e) => D(s.data)
|
|
1296
1307
|
}, {
|
|
1297
|
-
default:
|
|
1308
|
+
default: R(() => [...o[4] ||= [c(" 编辑 ", -1)]]),
|
|
1298
1309
|
_: 1
|
|
1299
1310
|
}, 8, ["onClick"])),
|
|
1300
|
-
p?.hideNodeDel ? r("", !0) : (
|
|
1311
|
+
p?.hideNodeDel ? r("", !0) : (x(), n(d, {
|
|
1301
1312
|
key: 2,
|
|
1302
1313
|
onClick: (e) => O(s.data)
|
|
1303
1314
|
}, {
|
|
1304
|
-
default:
|
|
1315
|
+
default: R(() => [...o[5] ||= [a("span", { style: { color: "#ef4444" } }, "删除", -1)]]),
|
|
1305
1316
|
_: 1
|
|
1306
1317
|
}, 8, ["onClick"])),
|
|
1307
|
-
|
|
1318
|
+
T(t.$slots, "node-handle", { data: s.data }, void 0, !0)
|
|
1308
1319
|
]),
|
|
1309
1320
|
_: 2
|
|
1310
1321
|
}, 1024)]),
|
|
1311
|
-
default:
|
|
1312
|
-
onClick: (e) =>
|
|
1322
|
+
default: R(() => [a("span", {
|
|
1323
|
+
onClick: (e) => S(e, s.data),
|
|
1313
1324
|
style: {
|
|
1314
1325
|
padding: "4px",
|
|
1315
1326
|
"font-weight": "bold"
|
|
1316
1327
|
}
|
|
1317
|
-
}, "⋮", 8,
|
|
1328
|
+
}, "⋮", 8, xt)]),
|
|
1318
1329
|
_: 2
|
|
1319
1330
|
}, 1024))])) : r("", !0)]),
|
|
1320
1331
|
_: 3
|
|
@@ -1322,16 +1333,16 @@ var Ze = { style: {
|
|
|
1322
1333
|
]);
|
|
1323
1334
|
};
|
|
1324
1335
|
}
|
|
1325
|
-
}),
|
|
1336
|
+
}), Ct = /* @__PURE__ */ B({ default: () => wt }), wt = /* @__PURE__ */ V(St, [["__scopeId", "data-v-7858d79e"]]), Tt = { style: { height: "100%" } }, Et = { style: {
|
|
1326
1337
|
display: "flex",
|
|
1327
1338
|
"flex-direction": "row",
|
|
1328
1339
|
"justify-content": "space-between",
|
|
1329
1340
|
"align-items": "center",
|
|
1330
1341
|
gap: "10px"
|
|
1331
|
-
} },
|
|
1342
|
+
} }, Dt = { style: { margin: "10px 0px" } }, Ot = ["onClick"], kt = { key: 0 }, At = /* @__PURE__ */ u({
|
|
1332
1343
|
__name: "index",
|
|
1333
1344
|
props: {
|
|
1334
|
-
loading: { default: () =>
|
|
1345
|
+
loading: { default: () => C(!1) },
|
|
1335
1346
|
data: {},
|
|
1336
1347
|
placeholder: {},
|
|
1337
1348
|
props: {},
|
|
@@ -1340,46 +1351,46 @@ var Ze = { style: {
|
|
|
1340
1351
|
},
|
|
1341
1352
|
emits: ["node-click"],
|
|
1342
1353
|
setup(o, { emit: s }) {
|
|
1343
|
-
let c = s, l =
|
|
1344
|
-
|
|
1354
|
+
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);
|
|
1355
|
+
I(() => [u.value, o.data?.[0]], (e) => {
|
|
1345
1356
|
!e[0] && e[1] && (u.value = o.data?.[0]);
|
|
1346
1357
|
}, { immediate: !0 });
|
|
1347
1358
|
function f(e) {
|
|
1348
1359
|
u.value = e, c("node-click", e);
|
|
1349
1360
|
}
|
|
1350
1361
|
return (t, s) => {
|
|
1351
|
-
let c =
|
|
1352
|
-
return
|
|
1353
|
-
a("div",
|
|
1362
|
+
let c = E("el-input");
|
|
1363
|
+
return x(), i("div", Tt, [
|
|
1364
|
+
a("div", Et, [o.filterable ? (x(), n(c, {
|
|
1354
1365
|
key: 0,
|
|
1355
1366
|
modelValue: l.value,
|
|
1356
1367
|
"onUpdate:modelValue": s[0] ||= (e) => l.value = e,
|
|
1357
1368
|
placeholder: o.placeholder ?? "请输入"
|
|
1358
|
-
}, null, 8, ["modelValue", "placeholder"])) : r("", !0),
|
|
1359
|
-
a("div",
|
|
1360
|
-
|
|
1369
|
+
}, null, 8, ["modelValue", "placeholder"])) : r("", !0), T(t.$slots, "plus", {}, void 0, !0)]),
|
|
1370
|
+
a("div", Dt, [T(t.$slots, "handle", {}, void 0, !0)]),
|
|
1371
|
+
ne((x(), i("ul", h({
|
|
1361
1372
|
class: "infinite-list",
|
|
1362
1373
|
"infinite-scroll-immediate": !1
|
|
1363
|
-
}, t.$attrs), [(
|
|
1374
|
+
}, t.$attrs), [(x(!0), i(e, null, w(d.value, (e, n) => (x(), i("li", {
|
|
1364
1375
|
key: "infinite-list-" + n,
|
|
1365
|
-
class:
|
|
1376
|
+
class: _({
|
|
1366
1377
|
"infinite-list-item": !0,
|
|
1367
1378
|
active: e === u.value
|
|
1368
1379
|
}),
|
|
1369
1380
|
onClick: (t) => f(e)
|
|
1370
|
-
}, [a("span", null,
|
|
1371
|
-
o.loading.value ? (
|
|
1381
|
+
}, [a("span", null, j(e[o.props?.label || "label"]), 1), T(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, Ot))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
|
|
1382
|
+
o.loading.value ? (x(), i("p", kt, "loading...")) : r("", !0)
|
|
1372
1383
|
]);
|
|
1373
1384
|
};
|
|
1374
1385
|
}
|
|
1375
|
-
}),
|
|
1386
|
+
}), jt = /* @__PURE__ */ B({ default: () => Mt }), Mt = /* @__PURE__ */ V(At, [["__scopeId", "data-v-0ab5cd97"]]), Nt = {
|
|
1376
1387
|
key: 0,
|
|
1377
1388
|
style: {
|
|
1378
1389
|
padding: "10px 0px",
|
|
1379
1390
|
"margin-bottom": "10px",
|
|
1380
1391
|
"border-bottom": "1px solid #e5e5e5"
|
|
1381
1392
|
}
|
|
1382
|
-
},
|
|
1393
|
+
}, Pt = { key: 1 }, Ft = /* @__PURE__ */ u({
|
|
1383
1394
|
__name: "index",
|
|
1384
1395
|
props: {
|
|
1385
1396
|
data: {},
|
|
@@ -1395,25 +1406,25 @@ var Ze = { style: {
|
|
|
1395
1406
|
"data"
|
|
1396
1407
|
]);
|
|
1397
1408
|
return (o, s) => {
|
|
1398
|
-
let c =
|
|
1399
|
-
return
|
|
1400
|
-
t.title ? (
|
|
1401
|
-
|
|
1402
|
-
l(u,
|
|
1403
|
-
default:
|
|
1409
|
+
let c = E("el-descriptions-item"), u = E("el-descriptions");
|
|
1410
|
+
return x(), i(e, null, [
|
|
1411
|
+
t.title ? (x(), i("h4", Nt, j(t.title), 1)) : r("", !0),
|
|
1412
|
+
T(o.$slots, "title", {}, void 0, !0),
|
|
1413
|
+
l(u, h({ column: t.column }, a, { class: "ui-descriptions" }), {
|
|
1414
|
+
default: R(() => [(x(!0), i(e, null, w(t.fields, (e) => (x(), n(c, {
|
|
1404
1415
|
key: e.prop,
|
|
1405
1416
|
label: e.label,
|
|
1406
1417
|
span: e.span || 2
|
|
1407
1418
|
}, {
|
|
1408
|
-
default:
|
|
1419
|
+
default: R(() => [e.render ? (x(), n(O(P(J)(e, t.data).component), h({
|
|
1409
1420
|
key: 0,
|
|
1410
1421
|
modelValue: t.data[e.prop],
|
|
1411
1422
|
"onUpdate:modelValue": (n) => t.data[e.prop] = n
|
|
1412
|
-
}, { ref_for: !0 },
|
|
1423
|
+
}, { ref_for: !0 }, P(J)(e, t.data).props, {
|
|
1413
1424
|
clearable: !0,
|
|
1414
1425
|
key: e.prop,
|
|
1415
1426
|
style: { display: "inline-block" }
|
|
1416
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (
|
|
1427
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (x(), i("span", Pt, j(t.data[e.prop] || "-"), 1))]),
|
|
1417
1428
|
_: 2
|
|
1418
1429
|
}, 1032, ["label", "span"]))), 128))]),
|
|
1419
1430
|
_: 1
|
|
@@ -1421,14 +1432,14 @@ var Ze = { style: {
|
|
|
1421
1432
|
], 64);
|
|
1422
1433
|
};
|
|
1423
1434
|
}
|
|
1424
|
-
}),
|
|
1435
|
+
}), It = /* @__PURE__ */ B({ default: () => Lt }), Lt = /* @__PURE__ */ V(Ft, [["__scopeId", "data-v-f02c30f9"]]), Rt = {
|
|
1425
1436
|
key: 0,
|
|
1426
1437
|
style: {
|
|
1427
1438
|
display: "flex",
|
|
1428
1439
|
"margin-top": "12px",
|
|
1429
1440
|
"justify-content": "end"
|
|
1430
1441
|
}
|
|
1431
|
-
},
|
|
1442
|
+
}, zt = /* @__PURE__ */ u({
|
|
1432
1443
|
__name: "index",
|
|
1433
1444
|
props: {
|
|
1434
1445
|
visible: { type: Boolean },
|
|
@@ -1443,16 +1454,16 @@ var Ze = { style: {
|
|
|
1443
1454
|
"submit"
|
|
1444
1455
|
],
|
|
1445
1456
|
setup(e, { emit: t }) {
|
|
1446
|
-
let a = t, o = e, s =
|
|
1457
|
+
let a = t, o = e, s = C();
|
|
1447
1458
|
function u() {
|
|
1448
1459
|
a("close"), a("update:visible", !1);
|
|
1449
1460
|
}
|
|
1450
1461
|
function d() {
|
|
1451
|
-
a("submit",
|
|
1462
|
+
a("submit", N(s?.value || {})), a("update:visible", !1);
|
|
1452
1463
|
}
|
|
1453
1464
|
return (e, t) => {
|
|
1454
|
-
let a =
|
|
1455
|
-
return
|
|
1465
|
+
let a = E("el-button"), f = E("el-dialog");
|
|
1466
|
+
return x(), n(f, h(e.$attrs, {
|
|
1456
1467
|
"model-value": o.visible,
|
|
1457
1468
|
"show-close": o.disabled,
|
|
1458
1469
|
fullscreen: !o.width,
|
|
@@ -1462,20 +1473,20 @@ var Ze = { style: {
|
|
|
1462
1473
|
"onUpdate:modelValue": t[0] ||= (e) => !e && u(),
|
|
1463
1474
|
onClose: u
|
|
1464
1475
|
}), {
|
|
1465
|
-
default:
|
|
1476
|
+
default: R(() => [(x(), n(O(o.component), h({
|
|
1466
1477
|
ref_key: "slotRef",
|
|
1467
1478
|
ref: s
|
|
1468
1479
|
}, o.componentProps, {
|
|
1469
1480
|
onClose: u,
|
|
1470
1481
|
onSubmit: d
|
|
1471
|
-
}), null, 16)), o.disabled ? r("", !0) : (
|
|
1472
|
-
default:
|
|
1482
|
+
}), null, 16)), o.disabled ? r("", !0) : (x(), i("div", Rt, [l(a, { onClick: u }, {
|
|
1483
|
+
default: R(() => [...t[1] ||= [c("取消", -1)]]),
|
|
1473
1484
|
_: 1
|
|
1474
1485
|
}), l(a, {
|
|
1475
1486
|
type: "primary",
|
|
1476
1487
|
onClick: d
|
|
1477
1488
|
}, {
|
|
1478
|
-
default:
|
|
1489
|
+
default: R(() => [...t[2] ||= [c("确定", -1)]]),
|
|
1479
1490
|
_: 1
|
|
1480
1491
|
})]))]),
|
|
1481
1492
|
_: 1
|
|
@@ -1486,11 +1497,11 @@ var Ze = { style: {
|
|
|
1486
1497
|
]);
|
|
1487
1498
|
};
|
|
1488
1499
|
}
|
|
1489
|
-
}),
|
|
1490
|
-
function
|
|
1500
|
+
}), Bt = /* @__PURE__ */ B({ default: () => Vt }), Vt = zt, X = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
1501
|
+
function Ht(e) {
|
|
1491
1502
|
return Array.from(new Set(e));
|
|
1492
1503
|
}
|
|
1493
|
-
function
|
|
1504
|
+
function Ut(e, t) {
|
|
1494
1505
|
let n = /* @__PURE__ */ new Set();
|
|
1495
1506
|
return e.filter((e) => {
|
|
1496
1507
|
let r = typeof t == "function" ? t(e) : e[t];
|
|
@@ -1499,7 +1510,7 @@ function Rt(e, t) {
|
|
|
1499
1510
|
}
|
|
1500
1511
|
//#endregion
|
|
1501
1512
|
//#region src/components/StaffSelect/default.vue
|
|
1502
|
-
var
|
|
1513
|
+
var Wt = /* @__PURE__ */ u({
|
|
1503
1514
|
__name: "default",
|
|
1504
1515
|
props: {
|
|
1505
1516
|
multiple: { type: Boolean },
|
|
@@ -1518,12 +1529,12 @@ var zt = /* @__PURE__ */ u({
|
|
|
1518
1529
|
}), d = t({
|
|
1519
1530
|
get: () => o.modelValue || "",
|
|
1520
1531
|
set: (e) => s("update:modelValue", e)
|
|
1521
|
-
}), f =
|
|
1522
|
-
|
|
1532
|
+
}), f = C([]);
|
|
1533
|
+
y(() => {
|
|
1523
1534
|
o.modelValue && p(o.modelValue);
|
|
1524
1535
|
});
|
|
1525
1536
|
async function p(e = "") {
|
|
1526
|
-
f.value = ((await fetch(
|
|
1537
|
+
f.value = ((await fetch(X + "/user/pageQueryUser", {
|
|
1527
1538
|
method: "POST",
|
|
1528
1539
|
headers: u,
|
|
1529
1540
|
body: JSON.stringify({
|
|
@@ -1540,23 +1551,23 @@ var zt = /* @__PURE__ */ u({
|
|
|
1540
1551
|
};
|
|
1541
1552
|
});
|
|
1542
1553
|
}
|
|
1543
|
-
async function
|
|
1554
|
+
async function m(e) {
|
|
1544
1555
|
e.length < 1 || (d.value = e, await p(e));
|
|
1545
1556
|
}
|
|
1546
1557
|
return (t, r) => {
|
|
1547
|
-
let a =
|
|
1548
|
-
return
|
|
1558
|
+
let a = E("el-icon"), o = E("el-option"), s = E("el-select");
|
|
1559
|
+
return x(), n(s, h({
|
|
1549
1560
|
remote: "",
|
|
1550
1561
|
filterable: "",
|
|
1551
1562
|
modelValue: d.value,
|
|
1552
1563
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
1553
|
-
"remote-method":
|
|
1564
|
+
"remote-method": m
|
|
1554
1565
|
}, t.$attrs), {
|
|
1555
|
-
prefix:
|
|
1556
|
-
default:
|
|
1566
|
+
prefix: R(() => [l(a, null, {
|
|
1567
|
+
default: R(() => [l(P(K))]),
|
|
1557
1568
|
_: 1
|
|
1558
1569
|
})]),
|
|
1559
|
-
default:
|
|
1570
|
+
default: R(() => [(x(!0), i(e, null, w(f.value, (e) => (x(), n(o, {
|
|
1560
1571
|
key: `${e.employeeCode}-${e.employeeName}`,
|
|
1561
1572
|
label: e.label,
|
|
1562
1573
|
value: e.value
|
|
@@ -1565,26 +1576,26 @@ var zt = /* @__PURE__ */ u({
|
|
|
1565
1576
|
}, 16, ["modelValue"]);
|
|
1566
1577
|
};
|
|
1567
1578
|
}
|
|
1568
|
-
}),
|
|
1579
|
+
}), Gt = { style: {
|
|
1569
1580
|
display: "flex",
|
|
1570
1581
|
"max-width": "100%",
|
|
1571
1582
|
gap: "20px",
|
|
1572
1583
|
"overflow-y": "scroll",
|
|
1573
1584
|
height: "400px"
|
|
1574
|
-
} },
|
|
1585
|
+
} }, Kt = { style: { flex: "1" } }, qt = { style: { width: "320px" } }, Jt = { style: {
|
|
1575
1586
|
display: "flex",
|
|
1576
1587
|
"justify-content": "space-between",
|
|
1577
1588
|
"align-items": "center",
|
|
1578
1589
|
"margin-bottom": "8px",
|
|
1579
1590
|
height: "30px"
|
|
1580
|
-
} },
|
|
1591
|
+
} }, Yt = { key: 0 }, Xt = { style: {
|
|
1581
1592
|
"overflow-y": "auto",
|
|
1582
1593
|
height: "90%"
|
|
1583
|
-
} },
|
|
1594
|
+
} }, Zt = { style: {
|
|
1584
1595
|
display: "flex",
|
|
1585
1596
|
"justify-content": "end",
|
|
1586
1597
|
"align-items": "center"
|
|
1587
|
-
} },
|
|
1598
|
+
} }, Qt = /* @__PURE__ */ V(/* @__PURE__ */ u({
|
|
1588
1599
|
__name: "dialog",
|
|
1589
1600
|
props: {
|
|
1590
1601
|
modelValue: {},
|
|
@@ -1598,40 +1609,40 @@ var zt = /* @__PURE__ */ u({
|
|
|
1598
1609
|
},
|
|
1599
1610
|
emits: ["update:modelValue", "change"],
|
|
1600
1611
|
setup(n, { expose: o, emit: s }) {
|
|
1601
|
-
let u = s, d =
|
|
1612
|
+
let u = s, d = F(), f = n, p = f.valueAt ?? "all", m = C(), _ = C(!1), v = new Headers({
|
|
1602
1613
|
"Content-Type": "application/json",
|
|
1603
1614
|
"X-Requested-With": "XMLHttpRequest",
|
|
1604
1615
|
token: localStorage.getItem("TOKEN") ?? "",
|
|
1605
1616
|
Accept: "application/json"
|
|
1606
|
-
}), y =
|
|
1617
|
+
}), y = S({
|
|
1607
1618
|
searchData: [],
|
|
1608
1619
|
staffData: [],
|
|
1609
1620
|
loading: !1,
|
|
1610
1621
|
filterText: "",
|
|
1611
1622
|
requiredVisible: !1
|
|
1612
|
-
}),
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
}),
|
|
1616
|
-
_.value &&
|
|
1623
|
+
}), b = C([]), T = C([]), D = t(() => y.searchData?.length ? y.searchData : y.staffData), O = t(() => f.required ?? d?.required ?? !1);
|
|
1624
|
+
L(() => {
|
|
1625
|
+
T.value = Ht(f.modelValue || []);
|
|
1626
|
+
}), L(() => {
|
|
1627
|
+
_.value && k();
|
|
1617
1628
|
});
|
|
1618
|
-
async function
|
|
1619
|
-
let e = await fetch(
|
|
1629
|
+
async function k() {
|
|
1630
|
+
let e = await fetch(X + "/department/queryDepartmentTree", {
|
|
1620
1631
|
method: "GET",
|
|
1621
1632
|
headers: v
|
|
1622
1633
|
}).then((e) => e.json());
|
|
1623
|
-
y.staffData = e.data || [], e.data?.[0] &&
|
|
1634
|
+
y.staffData = e.data || [], e.data?.[0] && M(e.data?.[0]);
|
|
1624
1635
|
}
|
|
1625
|
-
async function
|
|
1626
|
-
return fetch(
|
|
1636
|
+
async function A(e) {
|
|
1637
|
+
return fetch(X + "/user/pageQueryUser", {
|
|
1627
1638
|
method: "POST",
|
|
1628
1639
|
headers: v,
|
|
1629
1640
|
body: JSON.stringify(e)
|
|
1630
1641
|
}).then((e) => e.json());
|
|
1631
1642
|
}
|
|
1632
|
-
async function
|
|
1643
|
+
async function M(e, t) {
|
|
1633
1644
|
let n = !!e?.data?.code, r = e?.data?.code || e?.code;
|
|
1634
|
-
return !r || e?.data?.account ? t?.([]) : (y.loading = !0,
|
|
1645
|
+
return !r || e?.data?.account ? t?.([]) : (y.loading = !0, A({
|
|
1635
1646
|
page: 1,
|
|
1636
1647
|
pageSize: 9999,
|
|
1637
1648
|
departmentCode: r
|
|
@@ -1641,70 +1652,70 @@ var zt = /* @__PURE__ */ u({
|
|
|
1641
1652
|
...e,
|
|
1642
1653
|
code: e.account
|
|
1643
1654
|
}));
|
|
1644
|
-
n ? e.data.children =
|
|
1655
|
+
n ? e.data.children = Ut([...r, ...e.data.children || []], "code") : e.children = Ut([...r, ...e.children || []], "code"), y.loading = !1;
|
|
1645
1656
|
}), t?.(e?.children || []));
|
|
1646
1657
|
}
|
|
1647
|
-
function
|
|
1658
|
+
function N(e, { data: t }) {
|
|
1648
1659
|
let n = y.searchData?.length > 0;
|
|
1649
1660
|
return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
|
|
1650
1661
|
width: "14px",
|
|
1651
1662
|
height: "14px"
|
|
1652
|
-
} }, e(
|
|
1663
|
+
} }, e(K)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
|
|
1653
1664
|
}
|
|
1654
|
-
function
|
|
1655
|
-
if (
|
|
1665
|
+
function ee(e) {
|
|
1666
|
+
if (T.value = T.value.filter((t) => t !== e), m.value) {
|
|
1656
1667
|
let t = e.match(/\((.*?)\)/)?.[1];
|
|
1657
|
-
|
|
1658
|
-
|
|
1668
|
+
g(() => {
|
|
1669
|
+
m.value?.setChecked(t, !1);
|
|
1659
1670
|
});
|
|
1660
1671
|
}
|
|
1661
1672
|
}
|
|
1662
|
-
async function
|
|
1673
|
+
async function te() {
|
|
1663
1674
|
if (!y.filterText?.trim()) return y.searchData = [];
|
|
1664
|
-
let e = await
|
|
1675
|
+
let e = await A({
|
|
1665
1676
|
page: 1,
|
|
1666
1677
|
pageSize: 9999,
|
|
1667
1678
|
name: y.filterText?.trim()
|
|
1668
1679
|
});
|
|
1669
|
-
if (e.code !== "ok") return
|
|
1680
|
+
if (e.code !== "ok") return H.Message.error(e.message);
|
|
1670
1681
|
y.searchData = (e?.table || []).map((e) => ({
|
|
1671
1682
|
...e,
|
|
1672
1683
|
code: e.account
|
|
1673
1684
|
}));
|
|
1674
1685
|
}
|
|
1675
|
-
function
|
|
1686
|
+
function I(e, t) {
|
|
1676
1687
|
let n = (t?.checkedNodes.filter((e) => e.account)).map((e) => `${e.name}(${e.account})`);
|
|
1677
|
-
|
|
1688
|
+
T.value = Ht(T.value.concat(n));
|
|
1678
1689
|
}
|
|
1679
|
-
function
|
|
1680
|
-
let e = p === "all" ?
|
|
1690
|
+
function ne() {
|
|
1691
|
+
let e = p === "all" ? T.value : T.value?.map((e) => {
|
|
1681
1692
|
let [t, n] = e.split("(");
|
|
1682
1693
|
return {
|
|
1683
1694
|
name: t.trim(),
|
|
1684
1695
|
account: n?.replace(")", "")
|
|
1685
1696
|
}[p] || e.trim();
|
|
1686
1697
|
});
|
|
1687
|
-
u("change", e), u("update:modelValue", e), _.value = !1,
|
|
1698
|
+
u("change", e), u("update:modelValue", e), _.value = !1, z();
|
|
1688
1699
|
}
|
|
1689
|
-
function
|
|
1700
|
+
function ae() {
|
|
1690
1701
|
u("update:modelValue", void 0), _.value = !1;
|
|
1691
1702
|
}
|
|
1692
|
-
function
|
|
1693
|
-
return y.requiredVisible = O.value &&
|
|
1703
|
+
function z() {
|
|
1704
|
+
return y.requiredVisible = O.value && T.value.length === 0, y.requiredVisible;
|
|
1694
1705
|
}
|
|
1695
|
-
return o({ validate:
|
|
1696
|
-
let o =
|
|
1697
|
-
return
|
|
1706
|
+
return o({ validate: z }), (t, n) => {
|
|
1707
|
+
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");
|
|
1708
|
+
return x(), i(e, null, [a("div", {
|
|
1698
1709
|
class: "staff-select-trigger",
|
|
1699
1710
|
onClick: n[1] ||= (e) => !f.disabled && (_.value = !0)
|
|
1700
|
-
}, [l(o,
|
|
1711
|
+
}, [l(o, h({
|
|
1701
1712
|
...t.$attrs,
|
|
1702
1713
|
...t.$props
|
|
1703
1714
|
}, {
|
|
1704
|
-
modelValue:
|
|
1705
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1715
|
+
modelValue: T.value,
|
|
1716
|
+
"onUpdate:modelValue": n[0] ||= (e) => T.value = e,
|
|
1706
1717
|
class: { "is-required": y.requiredVisible },
|
|
1707
|
-
options:
|
|
1718
|
+
options: b.value,
|
|
1708
1719
|
placeholder: "请选择",
|
|
1709
1720
|
multiple: "",
|
|
1710
1721
|
disabled: f.disabled,
|
|
@@ -1717,7 +1728,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1717
1728
|
"class",
|
|
1718
1729
|
"options",
|
|
1719
1730
|
"disabled"
|
|
1720
|
-
])]), l(
|
|
1731
|
+
])]), l(g, {
|
|
1721
1732
|
modelValue: _.value,
|
|
1722
1733
|
"onUpdate:modelValue": n[3] ||= (e) => _.value = e,
|
|
1723
1734
|
style: {
|
|
@@ -1729,51 +1740,51 @@ var zt = /* @__PURE__ */ u({
|
|
|
1729
1740
|
"append-to-body": "",
|
|
1730
1741
|
"close-on-click-modal": !1
|
|
1731
1742
|
}, {
|
|
1732
|
-
default:
|
|
1743
|
+
default: R(() => [a("div", Gt, [a("div", Kt, [l(s, {
|
|
1733
1744
|
placeholder: "请输入",
|
|
1734
1745
|
modelValue: y.filterText,
|
|
1735
1746
|
"onUpdate:modelValue": n[2] ||= (e) => y.filterText = e,
|
|
1736
1747
|
clearable: "",
|
|
1737
|
-
"prefix-icon":
|
|
1738
|
-
onKeydown:
|
|
1748
|
+
"prefix-icon": P(G),
|
|
1749
|
+
onKeydown: re(te, ["enter"])
|
|
1739
1750
|
}, null, 8, ["modelValue", "prefix-icon"]), l(u, {
|
|
1740
1751
|
loading: y.loading,
|
|
1741
1752
|
data: D.value,
|
|
1742
1753
|
props: { label: "fullName" },
|
|
1743
1754
|
"highlight-current": !0,
|
|
1744
|
-
"render-content":
|
|
1745
|
-
load:
|
|
1746
|
-
onCheck:
|
|
1755
|
+
"render-content": N,
|
|
1756
|
+
load: M,
|
|
1757
|
+
onCheck: I,
|
|
1747
1758
|
"show-checkbox": "",
|
|
1748
1759
|
lazy: "",
|
|
1749
1760
|
class: "staff-tree",
|
|
1750
1761
|
ref_key: "staffDialogRef",
|
|
1751
|
-
ref:
|
|
1762
|
+
ref: m,
|
|
1752
1763
|
"node-key": "code"
|
|
1753
|
-
}, null, 8, ["loading", "data"])]), a("div",
|
|
1764
|
+
}, null, 8, ["loading", "data"])]), a("div", qt, [a("div", Jt, [n[4] ||= a("h3", null, "已选择", -1), T.value.length ? (x(), i("span", Yt, "已选择" + j(T.value.length) + "个用户", 1)) : r("", !0)]), a("div", Xt, [(x(!0), i(e, null, w(T.value, (e) => (x(), i("li", {
|
|
1754
1765
|
key: e,
|
|
1755
1766
|
class: "staff-item"
|
|
1756
|
-
}, [a("span", null,
|
|
1767
|
+
}, [a("span", null, j(e), 1), l(d, {
|
|
1757
1768
|
color: "red",
|
|
1758
|
-
onClick:
|
|
1769
|
+
onClick: ie((t) => ee(e), ["stop"])
|
|
1759
1770
|
}, {
|
|
1760
|
-
default:
|
|
1771
|
+
default: R(() => [l(P(Pe))]),
|
|
1761
1772
|
_: 1
|
|
1762
|
-
}, 8, ["onClick"])]))), 128))])])]), a("div",
|
|
1763
|
-
default:
|
|
1773
|
+
}, 8, ["onClick"])]))), 128))])])]), a("div", Zt, [l(p, { onClick: ae }, {
|
|
1774
|
+
default: R(() => [...n[5] ||= [c("取消", -1)]]),
|
|
1764
1775
|
_: 1
|
|
1765
1776
|
}), l(p, {
|
|
1766
1777
|
type: "primary",
|
|
1767
|
-
onClick:
|
|
1778
|
+
onClick: ne
|
|
1768
1779
|
}, {
|
|
1769
|
-
default:
|
|
1780
|
+
default: R(() => [...n[6] ||= [c("确定", -1)]]),
|
|
1770
1781
|
_: 1
|
|
1771
1782
|
})])]),
|
|
1772
1783
|
_: 1
|
|
1773
1784
|
}, 8, ["modelValue"])], 64);
|
|
1774
1785
|
};
|
|
1775
1786
|
}
|
|
1776
|
-
}), [["__scopeId", "data-v-
|
|
1787
|
+
}), [["__scopeId", "data-v-5c901fff"]]), $t = /* @__PURE__ */ u({
|
|
1777
1788
|
__name: "index",
|
|
1778
1789
|
props: {
|
|
1779
1790
|
multiple: { type: Boolean },
|
|
@@ -1783,8 +1794,8 @@ var zt = /* @__PURE__ */ u({
|
|
|
1783
1794
|
token: {}
|
|
1784
1795
|
},
|
|
1785
1796
|
setup(e, { expose: t }) {
|
|
1786
|
-
let r = e, i =
|
|
1787
|
-
return t({ validate: () => i.value?.validate?.() }), (e, t) => (
|
|
1797
|
+
let r = e, i = C();
|
|
1798
|
+
return t({ validate: () => i.value?.validate?.() }), (e, t) => (x(), n(O(r?.type === "dialog" ? Qt : Wt), h({
|
|
1788
1799
|
ref_key: "staffSelectRef",
|
|
1789
1800
|
ref: i
|
|
1790
1801
|
}, {
|
|
@@ -1792,7 +1803,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1792
1803
|
...r
|
|
1793
1804
|
}), null, 16));
|
|
1794
1805
|
}
|
|
1795
|
-
}),
|
|
1806
|
+
}), en = /* @__PURE__ */ B({ default: () => tn }), tn = $t, nn = /* @__PURE__ */ V(/* @__PURE__ */ u({
|
|
1796
1807
|
__name: "file",
|
|
1797
1808
|
props: {
|
|
1798
1809
|
icon: {},
|
|
@@ -1808,31 +1819,31 @@ var zt = /* @__PURE__ */ u({
|
|
|
1808
1819
|
},
|
|
1809
1820
|
emits: ["change"],
|
|
1810
1821
|
setup(e, { emit: r }) {
|
|
1811
|
-
let i = e, { text: a = "选择文件", icon: o = void 0, size: u = "default" } = i, d = i, f =
|
|
1822
|
+
let i = e, { text: a = "选择文件", icon: o = void 0, size: u = "default" } = i, d = i, f = F(), p = f.disabled, m = t(() => d.limit && f.count < d?.limit), g = t(() => d.limit && f.count >= d?.limit), _ = t(() => d.limit === void 0 ? !1 : !m.value);
|
|
1812
1823
|
return (e, t) => {
|
|
1813
|
-
let r =
|
|
1814
|
-
return
|
|
1824
|
+
let r = E("el-button"), i = E("el-upload");
|
|
1825
|
+
return x(), n(i, h(e.$attrs, {
|
|
1815
1826
|
style: { width: "100%" },
|
|
1816
|
-
action:
|
|
1817
|
-
"file-list":
|
|
1818
|
-
limit:
|
|
1827
|
+
action: P(d).action,
|
|
1828
|
+
"file-list": P(d).fileList,
|
|
1829
|
+
limit: P(d).limit,
|
|
1819
1830
|
class: {
|
|
1820
|
-
"hide-upload-list":
|
|
1831
|
+
"hide-upload-list": m.value,
|
|
1821
1832
|
"hide-upload-text": g.value
|
|
1822
1833
|
}
|
|
1823
1834
|
}), s({
|
|
1824
|
-
default:
|
|
1835
|
+
default: R(() => [T(e.$slots, "tip", {}, void 0, !0)]),
|
|
1825
1836
|
_: 2
|
|
1826
1837
|
}, [_.value ? void 0 : {
|
|
1827
1838
|
name: "trigger",
|
|
1828
|
-
fn:
|
|
1839
|
+
fn: R(() => [l(r, {
|
|
1829
1840
|
type: "primary",
|
|
1830
1841
|
plain: "",
|
|
1831
|
-
icon:
|
|
1832
|
-
size:
|
|
1833
|
-
disabled:
|
|
1842
|
+
icon: P(o),
|
|
1843
|
+
size: P(u),
|
|
1844
|
+
disabled: P(p)
|
|
1834
1845
|
}, {
|
|
1835
|
-
default:
|
|
1846
|
+
default: R(() => [c(j(P(a)), 1)]),
|
|
1836
1847
|
_: 1
|
|
1837
1848
|
}, 8, [
|
|
1838
1849
|
"icon",
|
|
@@ -1848,7 +1859,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1848
1859
|
]);
|
|
1849
1860
|
};
|
|
1850
1861
|
}
|
|
1851
|
-
}), [["__scopeId", "data-v-ee74ad23"]]),
|
|
1862
|
+
}), [["__scopeId", "data-v-ee74ad23"]]), rn = ["src"], an = /* @__PURE__ */ u({
|
|
1852
1863
|
__name: "image",
|
|
1853
1864
|
props: {
|
|
1854
1865
|
icon: {},
|
|
@@ -1863,13 +1874,13 @@ var zt = /* @__PURE__ */ u({
|
|
|
1863
1874
|
onChange: { type: Function }
|
|
1864
1875
|
},
|
|
1865
1876
|
setup(t) {
|
|
1866
|
-
let n = t, r =
|
|
1877
|
+
let n = t, r = C({}), o = C(!1);
|
|
1867
1878
|
function s(e) {
|
|
1868
1879
|
r.value = e, o.value = !0;
|
|
1869
1880
|
}
|
|
1870
1881
|
return (t, c) => {
|
|
1871
|
-
let u =
|
|
1872
|
-
return
|
|
1882
|
+
let u = E("el-icon"), d = E("el-upload"), f = E("el-dialog");
|
|
1883
|
+
return x(), i(e, null, [l(d, h({
|
|
1873
1884
|
accept: "image/*",
|
|
1874
1885
|
action: n.action,
|
|
1875
1886
|
"auto-upload": !1
|
|
@@ -1877,8 +1888,8 @@ var zt = /* @__PURE__ */ u({
|
|
|
1877
1888
|
"list-type": "picture-card",
|
|
1878
1889
|
"on-preview": s
|
|
1879
1890
|
}), {
|
|
1880
|
-
default:
|
|
1881
|
-
default:
|
|
1891
|
+
default: R(() => [l(u, null, {
|
|
1892
|
+
default: R(() => [l(P(Le))]),
|
|
1882
1893
|
_: 1
|
|
1883
1894
|
})]),
|
|
1884
1895
|
_: 1
|
|
@@ -1886,16 +1897,16 @@ var zt = /* @__PURE__ */ u({
|
|
|
1886
1897
|
modelValue: o.value,
|
|
1887
1898
|
"onUpdate:modelValue": c[0] ||= (e) => o.value = e
|
|
1888
1899
|
}, {
|
|
1889
|
-
default:
|
|
1900
|
+
default: R(() => [a("img", {
|
|
1890
1901
|
"w-full": "",
|
|
1891
1902
|
src: r.value.url,
|
|
1892
1903
|
alt: "预览"
|
|
1893
|
-
}, null, 8,
|
|
1904
|
+
}, null, 8, rn)]),
|
|
1894
1905
|
_: 1
|
|
1895
1906
|
}, 8, ["modelValue"])], 64);
|
|
1896
1907
|
};
|
|
1897
1908
|
}
|
|
1898
|
-
}),
|
|
1909
|
+
}), on = /* @__PURE__ */ u({
|
|
1899
1910
|
__name: "index",
|
|
1900
1911
|
props: {
|
|
1901
1912
|
icon: {},
|
|
@@ -1926,27 +1937,27 @@ var zt = /* @__PURE__ */ u({
|
|
|
1926
1937
|
"fileList",
|
|
1927
1938
|
"limit",
|
|
1928
1939
|
"action"
|
|
1929
|
-
]), s =
|
|
1930
|
-
get: () =>
|
|
1940
|
+
]), s = X + "/attachment/uploadAttachment", c = e.action || s, l = C(), u = C(0), d = { token: localStorage.getItem("TOKEN") || "" }, f = t({
|
|
1941
|
+
get: () => N(e.fileList) || [],
|
|
1931
1942
|
set: (e) => i("update:fileList", e)
|
|
1932
1943
|
});
|
|
1933
|
-
|
|
1934
|
-
u.value =
|
|
1944
|
+
y(async () => {
|
|
1945
|
+
u.value = N(e.fileList)?.length || 0;
|
|
1935
1946
|
});
|
|
1936
1947
|
function p(t, n) {
|
|
1937
1948
|
let r = Array.isArray(n) ? n : [];
|
|
1938
1949
|
e.onChange?.(r, t), f.value = r, i("update:modelValue", r), i("change", r), u.value = r.length;
|
|
1939
1950
|
}
|
|
1940
|
-
function
|
|
1941
|
-
e.limit &&
|
|
1951
|
+
function m() {
|
|
1952
|
+
e.limit && H.Message.warning(`最多只能上传 ${e.limit} 个文件`);
|
|
1942
1953
|
}
|
|
1943
1954
|
function g(e, t) {
|
|
1944
|
-
i("update:modelValue",
|
|
1955
|
+
i("update:modelValue", N(t)), i("remove", N(t)), u.value = t.length;
|
|
1945
1956
|
}
|
|
1946
1957
|
function _(e, t) {
|
|
1947
|
-
let n =
|
|
1948
|
-
if (e?.code !== "ok") return
|
|
1949
|
-
let r =
|
|
1958
|
+
let n = N(f);
|
|
1959
|
+
if (e?.code !== "ok") return H.Message.error(e?.message);
|
|
1960
|
+
let r = X + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${d.token}`;
|
|
1950
1961
|
n?.some((t) => t?.objectKey === e.data?.objectKey) || n.push({
|
|
1951
1962
|
name: t.name,
|
|
1952
1963
|
uid: t.uid,
|
|
@@ -1954,22 +1965,22 @@ var zt = /* @__PURE__ */ u({
|
|
|
1954
1965
|
status: "success",
|
|
1955
1966
|
...e.data,
|
|
1956
1967
|
url: r
|
|
1957
|
-
}), f.value = [...n], i("update:modelValue",
|
|
1968
|
+
}), f.value = [...n], i("update:modelValue", N(f)), i("success", N(f)), u.value = n.length;
|
|
1958
1969
|
}
|
|
1959
|
-
function
|
|
1970
|
+
function v(e, t, n) {
|
|
1960
1971
|
i("update:modelValue", n);
|
|
1961
1972
|
}
|
|
1962
|
-
return (t, r) => (
|
|
1973
|
+
return (t, r) => (x(), n(O(e.type === "image" ? an : nn), h({
|
|
1963
1974
|
ref_key: "uploadInstance",
|
|
1964
1975
|
ref: l,
|
|
1965
1976
|
name: "file",
|
|
1966
|
-
action:
|
|
1977
|
+
action: P(c),
|
|
1967
1978
|
headers: d,
|
|
1968
1979
|
"on-change": p,
|
|
1969
|
-
"on-exceed":
|
|
1980
|
+
"on-exceed": m,
|
|
1970
1981
|
"on-remove": g,
|
|
1971
1982
|
"on-success": _,
|
|
1972
|
-
"on-error":
|
|
1983
|
+
"on-error": v,
|
|
1973
1984
|
"file-list": f.value,
|
|
1974
1985
|
count: u.value,
|
|
1975
1986
|
limit: e.limit
|
|
@@ -1980,7 +1991,7 @@ var zt = /* @__PURE__ */ u({
|
|
|
1980
1991
|
"limit"
|
|
1981
1992
|
]));
|
|
1982
1993
|
}
|
|
1983
|
-
}),
|
|
1994
|
+
}), sn = /* @__PURE__ */ B({ default: () => cn }), cn = on, ln = {
|
|
1984
1995
|
mounted(e, t) {
|
|
1985
1996
|
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
1986
1997
|
e._stickyOriginalStyles = {
|
|
@@ -2005,43 +2016,290 @@ var zt = /* @__PURE__ */ u({
|
|
|
2005
2016
|
unmounted(e) {
|
|
2006
2017
|
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);
|
|
2007
2018
|
}
|
|
2008
|
-
},
|
|
2019
|
+
}, un = { mounted(e) {
|
|
2009
2020
|
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";
|
|
2010
|
-
} },
|
|
2011
|
-
card: () =>
|
|
2012
|
-
sticky: () =>
|
|
2013
|
-
}),
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2021
|
+
} }, dn = /* @__PURE__ */ B({
|
|
2022
|
+
card: () => un,
|
|
2023
|
+
sticky: () => ln
|
|
2024
|
+
}), Z = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
2025
|
+
//#endregion
|
|
2026
|
+
//#region src/hooks/useFetch.ts
|
|
2027
|
+
function fn(e, t = {}) {
|
|
2028
|
+
let { immediate: n = !0, method: r = "GET", onBefore: i, onSuccess: a, onError: o, onFinally: s, ...c } = t, l = localStorage.getItem("TOKEN"), u = {
|
|
2029
|
+
method: r,
|
|
2030
|
+
headers: new Headers({
|
|
2031
|
+
"Content-Type": "application/json",
|
|
2032
|
+
token: l ?? "",
|
|
2033
|
+
...c.headers || {}
|
|
2034
|
+
})
|
|
2035
|
+
}, d = C(!1), f = C(null), m = C(null), h = S({}), _ = !1;
|
|
2036
|
+
async function v() {
|
|
2037
|
+
if (_) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2038
|
+
_ = !0, d.value = !0, m.value = null;
|
|
2039
|
+
try {
|
|
2040
|
+
let t = Z + e;
|
|
2041
|
+
if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2042
|
+
if (r === "GET") {
|
|
2043
|
+
let e = new URLSearchParams(M(h)).toString();
|
|
2044
|
+
e && (t = `${t}?${e}`);
|
|
2045
|
+
} else u.body = JSON.stringify(M(h));
|
|
2046
|
+
let n = await (await fetch(t, u)).json();
|
|
2047
|
+
return n.code ? ["return.optSuccess", "ok"].includes(n.code) || H.Message.error(n.message || "未知错误!") : n.data?.success || H.Message.error(n.message || "未知错误!"), f.value = n, a?.(n), n;
|
|
2048
|
+
} catch (e) {
|
|
2049
|
+
let t = e instanceof Error ? e : Error(String(e));
|
|
2050
|
+
throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
|
|
2051
|
+
} finally {
|
|
2052
|
+
d.value = !1, _ = !1, s?.();
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
let y = null;
|
|
2056
|
+
L(() => {
|
|
2057
|
+
Object.assign(h, N(c.defaultParams) || {}), y && clearTimeout(y), y = setTimeout(() => {
|
|
2058
|
+
let e = p(t.ready) ? t.ready.value : t.ready ?? !0;
|
|
2059
|
+
n && e && !_ && g(() => v());
|
|
2060
|
+
}, 10);
|
|
2061
|
+
});
|
|
2062
|
+
function b(e) {
|
|
2063
|
+
for (let e in h) h[e] = void 0;
|
|
2064
|
+
Object.assign(h, e);
|
|
2065
|
+
}
|
|
2066
|
+
return {
|
|
2067
|
+
execute: v,
|
|
2068
|
+
loading: d,
|
|
2069
|
+
data: f,
|
|
2070
|
+
error: m,
|
|
2071
|
+
params: h,
|
|
2072
|
+
setParams: b
|
|
2073
|
+
};
|
|
2074
|
+
}
|
|
2075
|
+
//#endregion
|
|
2076
|
+
//#region src/hooks/useTable/default.ts
|
|
2077
|
+
function pn(e, t) {
|
|
2078
|
+
let n = S({
|
|
2079
|
+
ignoreAttrs: [
|
|
2080
|
+
"tableName",
|
|
2081
|
+
"sort",
|
|
2082
|
+
...t?.ignoreAttrs || []
|
|
2083
|
+
],
|
|
2084
|
+
replaceAttrs: t?.replaceAttrs || {
|
|
2085
|
+
table: "table",
|
|
2086
|
+
total: "total"
|
|
2087
|
+
}
|
|
2088
|
+
}), r = A([]), i = S({
|
|
2089
|
+
total: 0,
|
|
2090
|
+
page: 1,
|
|
2091
|
+
pageSize: 10
|
|
2092
|
+
}), a = C([]), o = S({
|
|
2093
|
+
page: 1,
|
|
2094
|
+
pageSize: 10
|
|
2095
|
+
});
|
|
2096
|
+
if (t?.onBefore?.(o) === !1) return {
|
|
2097
|
+
loading: C(!1),
|
|
2098
|
+
data: r,
|
|
2099
|
+
pagination: i
|
|
2100
|
+
};
|
|
2101
|
+
let s = fn(e, {
|
|
2102
|
+
...t,
|
|
2103
|
+
defaultParams: o,
|
|
2104
|
+
onSuccess: (e) => {
|
|
2105
|
+
t?.onSuccess?.(e), i.total = e[n?.replaceAttrs?.total] || 0, r.value = e[n?.replaceAttrs?.table] || [];
|
|
2106
|
+
}
|
|
2107
|
+
});
|
|
2108
|
+
L(() => {
|
|
2109
|
+
let e = N(t.defaultParams || {});
|
|
2110
|
+
i.page = 1, i.pageSize = 10, Object.assign(o, {
|
|
2111
|
+
...e,
|
|
2112
|
+
page: 1,
|
|
2113
|
+
pageSize: 10
|
|
2114
|
+
});
|
|
2115
|
+
});
|
|
2116
|
+
function c(e = {}) {
|
|
2117
|
+
i.page = 1, i.pageSize = 10, e && (Object.keys(o).forEach((t) => {
|
|
2118
|
+
n.ignoreAttrs?.includes(t) || Object.keys(e).includes(t) || delete o[t];
|
|
2119
|
+
}), Object.assign(o, {
|
|
2120
|
+
...e,
|
|
2121
|
+
page: 1,
|
|
2122
|
+
pageSize: 10
|
|
2123
|
+
}));
|
|
2124
|
+
}
|
|
2125
|
+
function l({ page: e, pageSize: t }) {
|
|
2126
|
+
i.page = e, i.pageSize = t, Object.assign(o, {
|
|
2127
|
+
page: e,
|
|
2128
|
+
pageSize: t
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
function u(e) {
|
|
2132
|
+
a.value = e;
|
|
2133
|
+
}
|
|
2134
|
+
return S({
|
|
2135
|
+
...s,
|
|
2136
|
+
data: r,
|
|
2137
|
+
pagination: i,
|
|
2138
|
+
selection: a,
|
|
2139
|
+
reset: c,
|
|
2140
|
+
updatePagination: l,
|
|
2141
|
+
selectionChange: u
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
//#endregion
|
|
2145
|
+
//#region src/utils/request.ts
|
|
2146
|
+
var mn = new Headers({
|
|
2147
|
+
"Content-Type": "application/json",
|
|
2148
|
+
token: localStorage.getItem("TOKEN") || ""
|
|
2149
|
+
});
|
|
2150
|
+
async function hn(e, t) {
|
|
2151
|
+
let n = `${Z}${e}`;
|
|
2152
|
+
if (t) {
|
|
2153
|
+
let e = new URLSearchParams(t).toString();
|
|
2154
|
+
e && (n = `${n}?${e}`);
|
|
2155
|
+
}
|
|
2156
|
+
return (await fetch(n, {
|
|
2157
|
+
headers: mn,
|
|
2158
|
+
method: "GET"
|
|
2159
|
+
})).json();
|
|
2160
|
+
}
|
|
2161
|
+
async function gn(e, t) {
|
|
2162
|
+
return (await fetch(`${Z}${e}`, {
|
|
2163
|
+
headers: mn,
|
|
2164
|
+
method: "POST",
|
|
2165
|
+
body: JSON.stringify(t)
|
|
2166
|
+
})).json();
|
|
2167
|
+
}
|
|
2168
|
+
async function _n(e, t) {
|
|
2169
|
+
return (await fetch(`${Z}${e}`, {
|
|
2170
|
+
headers: mn,
|
|
2171
|
+
method: "POST",
|
|
2172
|
+
body: JSON.stringify(t)
|
|
2173
|
+
})).blob();
|
|
2174
|
+
}
|
|
2175
|
+
var Q = {
|
|
2176
|
+
get: hn,
|
|
2177
|
+
post: gn,
|
|
2178
|
+
blob: _n
|
|
2179
|
+
};
|
|
2180
|
+
//#endregion
|
|
2181
|
+
//#region src/hooks/useTable/common.ts
|
|
2182
|
+
function vn(e, n) {
|
|
2183
|
+
let { defaultParams: r, ...i } = n, a = (e) => {
|
|
2184
|
+
let { tableId: t, page: n, pageSize: r, sort: i, ...a } = JSON.parse(JSON.stringify(e || {}));
|
|
2185
|
+
return {
|
|
2186
|
+
tableId: t,
|
|
2187
|
+
page: n || 1,
|
|
2188
|
+
pageSize: r || 10,
|
|
2189
|
+
params: {
|
|
2190
|
+
...a,
|
|
2191
|
+
sort: i
|
|
2192
|
+
}
|
|
2193
|
+
};
|
|
2194
|
+
}, o = pn(e, {
|
|
2195
|
+
...i,
|
|
2196
|
+
ready: t(() => {
|
|
2197
|
+
let e = p(n.ready) ? n.ready.value : n.ready, t = !!N(r)?.tableId;
|
|
2198
|
+
return (e === void 0 || e) && t;
|
|
2199
|
+
}),
|
|
2200
|
+
defaultParams: t(() => a(N(r))),
|
|
2201
|
+
ignoreAttrs: [
|
|
2202
|
+
"tableName",
|
|
2203
|
+
"sort",
|
|
2204
|
+
...n?.ignoreAttrs || []
|
|
2205
|
+
]
|
|
2206
|
+
});
|
|
2207
|
+
function s(e = {}) {
|
|
2208
|
+
if (e) {
|
|
2209
|
+
let e = N(r), t = e?.sort ? { sort: e.sort } : {};
|
|
2210
|
+
Object.assign(e, {
|
|
2211
|
+
...t,
|
|
2212
|
+
page: 1,
|
|
2213
|
+
pageSize: 10
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
async function c(e) {
|
|
2218
|
+
let t = N(r);
|
|
2219
|
+
return Q.post("/common/insert", {
|
|
2220
|
+
params: { ...e },
|
|
2221
|
+
tableId: t?.tableId
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
async function l(e) {
|
|
2225
|
+
let t = N(r);
|
|
2226
|
+
return Q.post("/common/update", {
|
|
2227
|
+
params: { ...e },
|
|
2228
|
+
tableId: t?.tableId
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
2231
|
+
async function u(e) {
|
|
2232
|
+
let t = N(r);
|
|
2233
|
+
return Q.post("/common/delete", {
|
|
2234
|
+
idList: e,
|
|
2235
|
+
tableId: t?.tableId
|
|
2236
|
+
});
|
|
2237
|
+
}
|
|
2238
|
+
async function d(e, t) {
|
|
2239
|
+
let { title: n = "export" } = e || {}, i = N(r), a = await Q.blob(t ?? "/common/exportExcel", {
|
|
2240
|
+
tableId: i?.tableId,
|
|
2241
|
+
type: "all"
|
|
2242
|
+
}), o = document.createElement("a");
|
|
2243
|
+
o.href = window.URL.createObjectURL(a), o.download = `${n}.xlsx`, o.click(), H.Message.success("导出成功"), window.URL.revokeObjectURL(o.href);
|
|
2244
|
+
}
|
|
2245
|
+
let f = S({
|
|
2246
|
+
loading: !1,
|
|
2247
|
+
data: [],
|
|
2248
|
+
insert: c,
|
|
2249
|
+
update: l,
|
|
2250
|
+
remove: u,
|
|
2251
|
+
delete: u,
|
|
2252
|
+
exportData: d
|
|
2253
|
+
});
|
|
2254
|
+
return L(() => {
|
|
2255
|
+
Object.assign(f, o, { reset: s });
|
|
2256
|
+
}), f;
|
|
2257
|
+
}
|
|
2258
|
+
//#endregion
|
|
2259
|
+
//#region src/hooks/useTable/index.ts
|
|
2260
|
+
function yn(e, t) {
|
|
2261
|
+
return e?.includes("/common/pageQuery") ? vn(e, t) : pn(e, t);
|
|
2262
|
+
}
|
|
2263
|
+
//#endregion
|
|
2264
|
+
//#region src/hooks/index.ts
|
|
2265
|
+
var bn = /* @__PURE__ */ B({
|
|
2266
|
+
useFetch: () => fn,
|
|
2267
|
+
useTable: () => yn
|
|
2268
|
+
}), xn = "Yc", Sn = {
|
|
2269
|
+
UiCard: ce,
|
|
2270
|
+
UiTable: Oe,
|
|
2271
|
+
UiFilter: it,
|
|
2272
|
+
UiForm: ut,
|
|
2273
|
+
UiEditor: mt,
|
|
2274
|
+
UiTree: Ct,
|
|
2275
|
+
UiInfiniteScroll: jt,
|
|
2276
|
+
UiDescriptions: It,
|
|
2277
|
+
UiDialog: Bt,
|
|
2278
|
+
UiStaffSelect: en,
|
|
2279
|
+
UiUpload: sn
|
|
2280
|
+
}, Cn = null;
|
|
2281
|
+
function wn(e) {
|
|
2282
|
+
Cn = e;
|
|
2028
2283
|
}
|
|
2029
2284
|
function $() {
|
|
2030
|
-
return
|
|
2285
|
+
return Cn;
|
|
2031
2286
|
}
|
|
2032
|
-
var
|
|
2033
|
-
t?.elementPlus && t.elementPlus.install(e),
|
|
2034
|
-
|
|
2287
|
+
var Tn = { install(e, t) {
|
|
2288
|
+
t?.elementPlus && t.elementPlus.install(e), Cn ||= {
|
|
2289
|
+
...e,
|
|
2290
|
+
h: f
|
|
2291
|
+
};
|
|
2292
|
+
for (let [t, n] of Object.entries(Sn)) {
|
|
2035
2293
|
let r = n?.default || n;
|
|
2036
2294
|
if (r && (typeof r == "function" || typeof r == "object")) {
|
|
2037
|
-
let n = t.replace(/^Ui/,
|
|
2295
|
+
let n = t.replace(/^Ui/, xn);
|
|
2038
2296
|
e.component(n, r);
|
|
2039
2297
|
let i = n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2040
2298
|
i !== n && e.component(i, r);
|
|
2041
2299
|
}
|
|
2042
2300
|
}
|
|
2043
|
-
for (let [t, n] of Object.entries(
|
|
2044
|
-
for (let [t, n] of Object.entries(
|
|
2301
|
+
for (let [t, n] of Object.entries($e)) e.component(t, n), e.component(t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n);
|
|
2302
|
+
for (let [t, n] of Object.entries(dn)) (typeof n == "function" || typeof n == "object") && e.directive(t, n);
|
|
2045
2303
|
} };
|
|
2046
2304
|
//#endregion
|
|
2047
|
-
export {
|
|
2305
|
+
export { ce as UiCard, It as UiDescriptions, Bt as UiDialog, mt as UiEditor, it as UiFilter, ut as UiForm, jt as UiInfiniteScroll, en as UiStaffSelect, Oe as UiTable, Ct as UiTree, sn as UiUpload, Tn as default, Tn as ycPlugin, $ as getHostVue, bn as hooks, wn as setHostVue };
|