@xmszm/core 0.0.4 → 0.0.6
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/index.cjs +2 -2
- package/dist/index.mjs +731 -734
- package/dist/style.css +1 -1
- package/package.json +6 -2
- package/src/dialog/commonDialog.tsx +6 -1
- package/src/dialog/style/commonDialog.less +3 -1
- package/src/image/ImagesUpload.vue +65 -67
- package/src/index.ts +1 -0
- package/src/query/CommonQuery.vue +108 -95
- package/src/table/DataTable.vue +121 -116
- package/src/table/FilterDialog.vue +53 -48
- package/src/utils/config.ts +15 -1
- package/types/index.d.ts +324 -11
- package/types/style.d.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var de = (e, l, t) =>
|
|
4
|
-
import { unref as
|
|
5
|
-
import { useThemeVars as
|
|
6
|
-
import { Funnel as
|
|
7
|
-
import { useRoute as
|
|
8
|
-
import
|
|
9
|
-
import { uniqueId as
|
|
10
|
-
import { initRouteMeta as
|
|
1
|
+
var st = Object.defineProperty;
|
|
2
|
+
var ft = (e, l, t) => l in e ? st(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t;
|
|
3
|
+
var de = (e, l, t) => ft(e, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
+
import { unref as c, useCssVars as ct, ref as P, watchEffect as Pe, createElementBlock as le, openBlock as B, createVNode as f, createElementVNode as Ae, withCtx as L, Fragment as ae, renderList as he, createBlock as K, createTextVNode as X, toDisplayString as pe, defineComponent as j, getCurrentInstance as ue, computed as Y, watch as ee, onMounted as ke, renderSlot as be, isProxy as dt, normalizeStyle as Ve, mergeProps as M, isVNode as te, withDirectives as yt, resolveDirective as gt, isRef as mt, mergeModels as xe, useModel as ze, reactive as ht, onUnmounted as pt, createCommentVNode as bt, resolveDynamicComponent as xt, h as ye } from "vue";
|
|
5
|
+
import { useThemeVars as wt, NCheckboxGroup as we, NCheckbox as Oe, NEllipsis as We, NButton as z, NDataTable as Ot, NEmpty as Ct, NTooltip as At, NSpace as k, NUpload as He, NSwitch as _t, NDivider as Dt, NProgress as Nt, NUploadDragger as St, NIcon as Ke, NText as It, NInputNumber as Mt, NInput as Re, NRadioGroup as Ft, NRadio as Ut, NDatePicker as qe, NTimePicker as Pt, NSelect as Rt, NFormItem as qt, NForm as Et, useDialog as _e, createDiscreteApi as $t, NPopconfirm as Tt, NPopover as Bt, NSpin as Yt, NImage as vt } from "naive-ui";
|
|
6
|
+
import { Funnel as Lt, ArchiveOutline as kt, RefreshOutline as Vt, SearchOutline as zt, Code as Wt, ChevronDown as Ht, ChevronUp as Kt } from "@vicons/ionicons5";
|
|
7
|
+
import { useRoute as je, useRouter as jt } from "vue-router";
|
|
8
|
+
import V from "dayjs";
|
|
9
|
+
import { uniqueId as Ee } from "lodash-es";
|
|
10
|
+
import { initRouteMeta as un } from "./plugin/vite/initRouteMeta.mjs";
|
|
11
11
|
const $ = "name", T = "id";
|
|
12
|
-
function
|
|
12
|
+
function Ge(e, { labelField: l = $, valueField: t = T } = {}) {
|
|
13
13
|
return Object.keys(e).reduce((a, u) => {
|
|
14
|
-
const i =
|
|
14
|
+
const i = Gt(e[u], u), n = {
|
|
15
15
|
...i
|
|
16
16
|
};
|
|
17
17
|
return n[l] = i == null ? void 0 : i[l], n[t] = i == null ? void 0 : i[t], a.concat(n);
|
|
18
18
|
}, []);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Gt(e, l) {
|
|
21
21
|
const t = {
|
|
22
|
-
[$]:
|
|
22
|
+
[$]: c(e),
|
|
23
23
|
[T]: Number.isNaN(Number(l)) ? l : Number(l)
|
|
24
24
|
};
|
|
25
|
-
return typeof
|
|
26
|
-
...
|
|
25
|
+
return typeof c(e) == "object" ? {
|
|
26
|
+
...c(e),
|
|
27
27
|
[T]: Number.isNaN(Number(l)) ? l : Number(l)
|
|
28
28
|
} : t;
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const $e = {
|
|
31
31
|
style: {
|
|
32
32
|
cursor: "pointer"
|
|
33
33
|
},
|
|
@@ -48,12 +48,12 @@ const qe = {
|
|
|
48
48
|
backgroundColor: "--n-color"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
},
|
|
51
|
+
}, re = (e, l) => {
|
|
52
52
|
const t = e.__vccOpts || e;
|
|
53
53
|
for (const [a, u] of l)
|
|
54
54
|
t[a] = u;
|
|
55
55
|
return t;
|
|
56
|
-
},
|
|
56
|
+
}, Jt = { class: "filter-box" }, Qt = { class: "filter-footer" }, Xt = {
|
|
57
57
|
__name: "FilterDialog",
|
|
58
58
|
props: {
|
|
59
59
|
type: {
|
|
@@ -80,21 +80,21 @@ const qe = {
|
|
|
80
80
|
},
|
|
81
81
|
emits: ["submit"],
|
|
82
82
|
setup(e, { emit: l }) {
|
|
83
|
-
var w,
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
var w, b;
|
|
84
|
+
ct((O) => ({
|
|
85
|
+
v56ebba65: c(u).infoColor
|
|
86
86
|
}));
|
|
87
|
-
const t = e, a = l, u =
|
|
88
|
-
|
|
87
|
+
const t = e, a = l, u = wt(), i = P([]);
|
|
88
|
+
Pe(() => {
|
|
89
89
|
i.value = t.selectItem;
|
|
90
90
|
});
|
|
91
|
-
const n = P([]),
|
|
91
|
+
const n = P([]), y = [
|
|
92
92
|
{
|
|
93
93
|
key: "all",
|
|
94
94
|
label: "全选",
|
|
95
95
|
onCheck: () => {
|
|
96
|
-
var
|
|
97
|
-
return i.value = (
|
|
96
|
+
var O;
|
|
97
|
+
return i.value = (O = t.filterItem) == null ? void 0 : O.map((m) => m.key);
|
|
98
98
|
},
|
|
99
99
|
unCheck: () => i.value = []
|
|
100
100
|
},
|
|
@@ -111,82 +111,79 @@ const qe = {
|
|
|
111
111
|
unCheck: () => i.value = t.selectItem
|
|
112
112
|
}
|
|
113
113
|
];
|
|
114
|
-
|
|
115
|
-
n.value =
|
|
116
|
-
(
|
|
114
|
+
Pe(() => {
|
|
115
|
+
n.value = y.filter(
|
|
116
|
+
(O) => t.filterButtonKey.includes(O.key)
|
|
117
117
|
), console.log(t.filterButtonKey);
|
|
118
118
|
});
|
|
119
119
|
function o() {
|
|
120
120
|
a("submit", i.value);
|
|
121
121
|
}
|
|
122
122
|
const s = P(
|
|
123
|
-
((w = t.filterItem) == null ? void 0 : w.length) === ((
|
|
123
|
+
((w = t.filterItem) == null ? void 0 : w.length) === ((b = t.selectItem) == null ? void 0 : b.length) ? ["all"] : []
|
|
124
124
|
);
|
|
125
|
-
function g(
|
|
126
|
-
var
|
|
127
|
-
console.log(
|
|
125
|
+
function g(O, m) {
|
|
126
|
+
var N, S, r, _;
|
|
127
|
+
console.log(O), console.log(m), m.actionType === "uncheck" ? ((S = (N = n.value) == null ? void 0 : N.find((h) => (h == null ? void 0 : h.key) === m.value)) == null || S.unCheck(), s.value = []) : ((_ = (r = n.value) == null ? void 0 : r.find((h) => (h == null ? void 0 : h.key) === m.value)) == null || _.onCheck(), s.value = [m.value]);
|
|
128
128
|
}
|
|
129
|
-
return (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
return (O, m) => (B(), le("div", Jt, [
|
|
130
|
+
f(c(we), {
|
|
131
|
+
value: i.value,
|
|
132
|
+
"onUpdate:value": m[0] || (m[0] = (N) => i.value = N),
|
|
133
|
+
class: "filter-main"
|
|
134
|
+
}, {
|
|
135
|
+
default: L(() => [
|
|
136
|
+
(B(!0), le(ae, null, he(e.filterItem, (N) => (B(), K(c(Oe), {
|
|
137
|
+
key: N.key,
|
|
138
|
+
value: N.key,
|
|
139
|
+
class: "filter-item"
|
|
140
|
+
}, {
|
|
141
|
+
default: L(() => [
|
|
142
|
+
f(c(We), { style: { "max-width": "100px" } }, {
|
|
143
|
+
default: L(() => [
|
|
144
|
+
X(pe(N.title), 1)
|
|
145
|
+
]),
|
|
146
|
+
_: 2
|
|
147
|
+
}, 1024)
|
|
148
|
+
]),
|
|
149
|
+
_: 2
|
|
150
|
+
}, 1032, ["value"]))), 128))
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["value"]),
|
|
154
|
+
Ae("div", Qt, [
|
|
155
|
+
f(c(we), {
|
|
156
|
+
type: t.type,
|
|
157
|
+
value: s.value,
|
|
158
|
+
"onUpdate:value": g
|
|
136
159
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
(B(!0),
|
|
139
|
-
key:
|
|
140
|
-
value:
|
|
141
|
-
class: "filter-item"
|
|
160
|
+
default: L(() => [
|
|
161
|
+
(B(!0), le(ae, null, he(n.value, (N) => (B(), K(c(Oe), {
|
|
162
|
+
key: N.key,
|
|
163
|
+
value: N.key
|
|
142
164
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
|
|
145
|
-
default: v(() => [
|
|
146
|
-
Z(pe(m.title), 1)
|
|
147
|
-
]),
|
|
148
|
-
_: 2
|
|
149
|
-
}, 1024)
|
|
165
|
+
default: L(() => [
|
|
166
|
+
X(pe(N.label), 1)
|
|
150
167
|
]),
|
|
151
168
|
_: 2
|
|
152
169
|
}, 1032, ["value"]))), 128))
|
|
153
170
|
]),
|
|
154
171
|
_: 1
|
|
155
|
-
}, 8, ["value"]),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
Z(pe(m.label), 1)
|
|
169
|
-
]),
|
|
170
|
-
_: 2
|
|
171
|
-
}, 1032, ["value"]))), 128))
|
|
172
|
-
]),
|
|
173
|
-
_: 1
|
|
174
|
-
}, 8, ["type", "value"]),
|
|
175
|
-
f(A, {
|
|
176
|
-
class: "submit-btn",
|
|
177
|
-
type: t.type,
|
|
178
|
-
onClick: o
|
|
179
|
-
}, {
|
|
180
|
-
default: v(() => [...h[1] || (h[1] = [
|
|
181
|
-
Z(" 保存 ", -1)
|
|
182
|
-
])]),
|
|
183
|
-
_: 1
|
|
184
|
-
}, 8, ["type"])
|
|
185
|
-
])
|
|
186
|
-
]);
|
|
187
|
-
};
|
|
172
|
+
}, 8, ["type", "value"]),
|
|
173
|
+
f(c(z), {
|
|
174
|
+
class: "submit-btn",
|
|
175
|
+
type: t.type,
|
|
176
|
+
onClick: o
|
|
177
|
+
}, {
|
|
178
|
+
default: L(() => [...m[1] || (m[1] = [
|
|
179
|
+
X(" 保存 ", -1)
|
|
180
|
+
])]),
|
|
181
|
+
_: 1
|
|
182
|
+
}, 8, ["type"])
|
|
183
|
+
])
|
|
184
|
+
]));
|
|
188
185
|
}
|
|
189
|
-
},
|
|
186
|
+
}, Zt = /* @__PURE__ */ re(Xt, [["__scopeId", "data-v-ffb0cfbf"]]), q = {
|
|
190
187
|
// API 基础地址
|
|
191
188
|
baseURL: "",
|
|
192
189
|
// 权限检查函数
|
|
@@ -200,10 +197,12 @@ const qe = {
|
|
|
200
197
|
// 是否继承外部定义的主题色(默认 true)
|
|
201
198
|
inheritTheme: !0,
|
|
202
199
|
// 主题色覆盖(当 inheritTheme 为 false 时使用)
|
|
203
|
-
themeOverrides: null
|
|
200
|
+
themeOverrides: null,
|
|
201
|
+
// Dialog 默认配置项
|
|
202
|
+
defaultOption: null
|
|
204
203
|
}
|
|
205
204
|
};
|
|
206
|
-
function
|
|
205
|
+
function el(e = {}) {
|
|
207
206
|
if (e.baseURL !== void 0 && (q.baseURL = e.baseURL), e.hasPermission !== void 0) {
|
|
208
207
|
if (typeof e.hasPermission != "function")
|
|
209
208
|
throw new TypeError("hasPermission 必须是一个函数");
|
|
@@ -217,40 +216,40 @@ function Jt(e = {}) {
|
|
|
217
216
|
if (e.dialog !== void 0) {
|
|
218
217
|
if (typeof e.dialog != "object")
|
|
219
218
|
throw new TypeError("dialog 必须是一个对象");
|
|
220
|
-
e.dialog.instance !== void 0 && (q.dialog.instance = e.dialog.instance), e.dialog.inheritTheme !== void 0 && (q.dialog.inheritTheme = e.dialog.inheritTheme), e.dialog.themeOverrides !== void 0 && (q.dialog.themeOverrides = e.dialog.themeOverrides);
|
|
219
|
+
e.dialog.instance !== void 0 && (q.dialog.instance = e.dialog.instance), e.dialog.inheritTheme !== void 0 && (q.dialog.inheritTheme = e.dialog.inheritTheme), e.dialog.themeOverrides !== void 0 && (q.dialog.themeOverrides = e.dialog.themeOverrides), e.dialog.defaultOption !== void 0 && (q.dialog.defaultOption = e.dialog.defaultOption);
|
|
221
220
|
}
|
|
222
221
|
return q;
|
|
223
222
|
}
|
|
224
|
-
function
|
|
223
|
+
function vl() {
|
|
225
224
|
return { ...q };
|
|
226
225
|
}
|
|
227
|
-
function
|
|
226
|
+
function tl() {
|
|
228
227
|
return q.baseURL;
|
|
229
228
|
}
|
|
230
|
-
function
|
|
229
|
+
function Ll() {
|
|
231
230
|
return q.hasPermission;
|
|
232
231
|
}
|
|
233
|
-
function
|
|
232
|
+
function ll() {
|
|
234
233
|
return q.uploadMethod;
|
|
235
234
|
}
|
|
236
|
-
function
|
|
235
|
+
function Je() {
|
|
237
236
|
return { ...q.dialog };
|
|
238
237
|
}
|
|
239
|
-
function
|
|
238
|
+
function Qe(e) {
|
|
240
239
|
q.dialog.instance = e;
|
|
241
240
|
}
|
|
242
|
-
function
|
|
241
|
+
function nl() {
|
|
243
242
|
return q.dialog.instance;
|
|
244
243
|
}
|
|
245
|
-
function
|
|
244
|
+
function Ce(e) {
|
|
246
245
|
return q.hasPermission ? q.hasPermission(e) : (console.warn("hasPermission 未配置,默认返回 true。请使用 setupConfig 配置权限检查函数。"), !0);
|
|
247
246
|
}
|
|
248
|
-
const
|
|
247
|
+
const al = {
|
|
249
248
|
mounted(e, l) {
|
|
250
249
|
const t = l.value;
|
|
251
250
|
if (!t)
|
|
252
251
|
return;
|
|
253
|
-
(Array.isArray(t) ? t : [t]).some((i) =>
|
|
252
|
+
(Array.isArray(t) ? t : [t]).some((i) => Ce(i)) || (e.style.display = "none", e._originalDisplay = e.style.display || "");
|
|
254
253
|
},
|
|
255
254
|
updated(e, l) {
|
|
256
255
|
const t = l.value;
|
|
@@ -258,33 +257,33 @@ const tl = {
|
|
|
258
257
|
e._originalDisplay !== void 0 ? e.style.display = e._originalDisplay || "" : e.style.display = "";
|
|
259
258
|
return;
|
|
260
259
|
}
|
|
261
|
-
(Array.isArray(t) ? t : [t]).some((i) =>
|
|
260
|
+
(Array.isArray(t) ? t : [t]).some((i) => Ce(i)) ? e._originalDisplay !== void 0 ? e.style.display = e._originalDisplay || "" : e.style.display = "" : e.style.display = "none";
|
|
262
261
|
},
|
|
263
262
|
unmounted(e) {
|
|
264
263
|
delete e._originalDisplay;
|
|
265
264
|
}
|
|
266
265
|
};
|
|
267
|
-
let
|
|
268
|
-
function
|
|
266
|
+
let Xe = null;
|
|
267
|
+
function Z(e) {
|
|
269
268
|
var l;
|
|
270
|
-
e && (
|
|
269
|
+
e && (Xe = e, (l = e._context.directives) != null && l.corePermission || e.directive("corePermission", al));
|
|
271
270
|
}
|
|
272
|
-
function
|
|
271
|
+
function kl() {
|
|
273
272
|
var e;
|
|
274
273
|
try {
|
|
275
274
|
const l = typeof require < "u" ? require("vue") : null;
|
|
276
275
|
if (!l) return !1;
|
|
277
276
|
const { getCurrentInstance: t } = l, a = t == null ? void 0 : t();
|
|
278
277
|
if ((e = a == null ? void 0 : a.appContext) != null && e.app)
|
|
279
|
-
return
|
|
278
|
+
return Z(a.appContext.app), !0;
|
|
280
279
|
} catch {
|
|
281
280
|
}
|
|
282
281
|
return !1;
|
|
283
282
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
283
|
+
function ul() {
|
|
284
|
+
return Xe;
|
|
286
285
|
}
|
|
287
|
-
const
|
|
286
|
+
const Te = "filter_key", rl = /* @__PURE__ */ j({
|
|
288
287
|
__name: "DataTable",
|
|
289
288
|
props: {
|
|
290
289
|
data: {
|
|
@@ -340,82 +339,82 @@ const Ee = "filter_key", nl = /* @__PURE__ */ j({
|
|
|
340
339
|
emit: t
|
|
341
340
|
}) {
|
|
342
341
|
var x;
|
|
343
|
-
const a =
|
|
344
|
-
(x = a == null ? void 0 : a.appContext) != null && x.app &&
|
|
345
|
-
const u = e, i =
|
|
342
|
+
const a = ue();
|
|
343
|
+
(x = a == null ? void 0 : a.appContext) != null && x.app && Z(a.appContext.app);
|
|
344
|
+
const u = e, i = je(), n = t, y = () => {
|
|
346
345
|
try {
|
|
347
346
|
return (i == null ? void 0 : i.fullPath) || (i == null ? void 0 : i.path) || "";
|
|
348
347
|
} catch {
|
|
349
348
|
return "";
|
|
350
349
|
}
|
|
351
350
|
}, o = Y(() => (console.log("table -data", u.data), u.data));
|
|
352
|
-
function s(
|
|
353
|
-
window.localStorage.setItem(
|
|
351
|
+
function s(p) {
|
|
352
|
+
window.localStorage.setItem(Te, JSON.stringify(p));
|
|
354
353
|
}
|
|
355
354
|
function g() {
|
|
356
|
-
return JSON.parse(window.localStorage.getItem(
|
|
355
|
+
return JSON.parse(window.localStorage.getItem(Te) || "{}") || {};
|
|
357
356
|
}
|
|
358
|
-
const w = P(g()),
|
|
359
|
-
function
|
|
357
|
+
const w = P(g()), b = P([]), O = P(0);
|
|
358
|
+
function m(p) {
|
|
360
359
|
if (u.summaryColumns)
|
|
361
|
-
return [u.selectColumns, ...
|
|
360
|
+
return [u.selectColumns, ...c(u.columns || []), u.oprColumns].reduce((d, C) => {
|
|
362
361
|
var U, E;
|
|
363
|
-
return C != null && C.key ?
|
|
362
|
+
return C != null && C.key ? d[C.key] = ((E = (U = u.summaryColumns) == null ? void 0 : U.call(u, p)) == null ? void 0 : E[C.key]) || {
|
|
364
363
|
value: null
|
|
365
|
-
} :
|
|
364
|
+
} : d[Ee("table")] = {
|
|
366
365
|
value: null
|
|
367
|
-
},
|
|
366
|
+
}, d;
|
|
368
367
|
}, {});
|
|
369
368
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
369
|
+
const N = P([]);
|
|
370
|
+
ee(() => c(u.columns), () => {
|
|
371
|
+
S();
|
|
373
372
|
}, {
|
|
374
373
|
immediate: !0
|
|
375
|
-
}),
|
|
376
|
-
console.log("oprColumns",
|
|
374
|
+
}), ee(() => u.oprColumns, (p) => {
|
|
375
|
+
console.log("oprColumns", p);
|
|
377
376
|
});
|
|
378
|
-
function
|
|
377
|
+
function S() {
|
|
379
378
|
var E;
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const C = u.isFilter ?
|
|
379
|
+
const p = c(u.columns || []), d = y();
|
|
380
|
+
b.value = d && ((E = w.value) == null ? void 0 : E[d]) || (p == null ? void 0 : p.map((R, D) => (R == null ? void 0 : R.key) || String(V().valueOf() + D)));
|
|
381
|
+
const C = u.isFilter ? p.filter((R) => {
|
|
383
382
|
var D;
|
|
384
|
-
return (D =
|
|
385
|
-
}) : [...
|
|
383
|
+
return (D = b.value) == null ? void 0 : D.includes(R.key);
|
|
384
|
+
}) : [...p];
|
|
386
385
|
u.selectColumns && C.unshift({
|
|
387
386
|
key: "selectKey",
|
|
388
387
|
...u.selectColumns
|
|
389
388
|
}), u.oprColumns && C.push(u.oprColumns);
|
|
390
389
|
let U = 0;
|
|
391
|
-
|
|
390
|
+
N.value = C.reduce((R, D) => {
|
|
392
391
|
var G;
|
|
393
392
|
if (D != null && D.display && console.log("display", D == null ? void 0 : D.display), !((D == null ? void 0 : D.display) ?? !0)) return R;
|
|
394
393
|
const F = {
|
|
395
394
|
align: "center",
|
|
396
395
|
width: 120,
|
|
397
396
|
...D,
|
|
398
|
-
key: (D == null ? void 0 : D.key) ||
|
|
399
|
-
ellipsis: D != null && D.ellipsis || u.isEllipsis ? D != null && D.ellipsisProp ? D == null ? void 0 : D.ellipsisProp(
|
|
397
|
+
key: (D == null ? void 0 : D.key) || Ee("table"),
|
|
398
|
+
ellipsis: D != null && D.ellipsis || u.isEllipsis ? D != null && D.ellipsisProp ? D == null ? void 0 : D.ellipsisProp($e) : $e : !1,
|
|
400
399
|
"ellipsis-component": "ellipsis",
|
|
401
400
|
title: () => {
|
|
402
|
-
const
|
|
401
|
+
const v = (D == null ? void 0 : D.label) || (D == null ? void 0 : D.title) || "";
|
|
403
402
|
return f("div", {
|
|
404
403
|
style: {
|
|
405
404
|
width: "100%",
|
|
406
405
|
whiteSpace: "pre-wrap"
|
|
407
406
|
}
|
|
408
|
-
}, [typeof
|
|
407
|
+
}, [typeof v == "string" ? v : v == null ? void 0 : v()]);
|
|
409
408
|
}
|
|
410
409
|
};
|
|
411
410
|
return D != null && D.sorter && (F.renderSorterIcon = ({
|
|
412
|
-
order:
|
|
411
|
+
order: v
|
|
413
412
|
}) => {
|
|
414
413
|
const {
|
|
415
414
|
Icon: ie,
|
|
416
415
|
title: se
|
|
417
|
-
} = me[
|
|
418
|
-
return f(
|
|
416
|
+
} = me[v];
|
|
417
|
+
return f(At, null, {
|
|
419
418
|
trigger: () => ie,
|
|
420
419
|
default: () => se
|
|
421
420
|
});
|
|
@@ -423,37 +422,37 @@ const Ee = "filter_key", nl = /* @__PURE__ */ j({
|
|
|
423
422
|
multiple: 1,
|
|
424
423
|
fn: D.sorter
|
|
425
424
|
}), U += F != null && F.width ? Number.parseInt(String(F == null ? void 0 : F.width)) : (typeof (F == null ? void 0 : F.title) == "string" ? ((G = F == null ? void 0 : F.title) == null ? void 0 : G.length) * 30 : 0) || 0, R.push(F), R;
|
|
426
|
-
}, []),
|
|
425
|
+
}, []), O.value = U, console.log("计算");
|
|
427
426
|
}
|
|
428
427
|
function r() {
|
|
429
428
|
return f(z, {
|
|
430
429
|
type: "info",
|
|
431
|
-
onClick: () =>
|
|
430
|
+
onClick: () => _()
|
|
432
431
|
}, {
|
|
433
432
|
default: () => "筛选字段",
|
|
434
|
-
icon: () => f(
|
|
433
|
+
icon: () => f(Lt, null, null)
|
|
435
434
|
});
|
|
436
435
|
}
|
|
437
|
-
function
|
|
436
|
+
function _() {
|
|
438
437
|
const {
|
|
439
|
-
cancel:
|
|
440
|
-
} =
|
|
438
|
+
cancel: p
|
|
439
|
+
} = tt({
|
|
441
440
|
title: "筛选字段",
|
|
442
441
|
read: !0,
|
|
443
442
|
options: [{
|
|
444
443
|
key: "filter-dialog",
|
|
445
|
-
render: () => f(
|
|
444
|
+
render: () => f(Zt, {
|
|
446
445
|
style: {
|
|
447
446
|
width: "100%",
|
|
448
447
|
margin: "0",
|
|
449
448
|
padding: 0
|
|
450
449
|
},
|
|
451
|
-
filterItem:
|
|
452
|
-
selectItem:
|
|
450
|
+
filterItem: c(u.columns || []),
|
|
451
|
+
selectItem: b.value,
|
|
453
452
|
defaultItem: u.defaultColumns,
|
|
454
|
-
onSubmit: (
|
|
455
|
-
const C =
|
|
456
|
-
C && (w.value[C] =
|
|
453
|
+
onSubmit: (d) => {
|
|
454
|
+
const C = y();
|
|
455
|
+
C && (w.value[C] = d, s(w.value)), S(), p();
|
|
457
456
|
}
|
|
458
457
|
}, null)
|
|
459
458
|
}]
|
|
@@ -464,74 +463,71 @@ const Ee = "filter_key", nl = /* @__PURE__ */ j({
|
|
|
464
463
|
}
|
|
465
464
|
});
|
|
466
465
|
}
|
|
467
|
-
function
|
|
468
|
-
if (console.log("onSorter",
|
|
469
|
-
|
|
466
|
+
function h(p) {
|
|
467
|
+
if (console.log("onSorter", p), !p) return;
|
|
468
|
+
De(p).forEach((C) => {
|
|
470
469
|
var U, E, R;
|
|
471
470
|
console.log("v", C), C != null && C.sorter && ((R = (U = C == null ? void 0 : C.sorter) == null ? void 0 : U.fn) == null || R.call(U, (D, F, G) => {
|
|
472
|
-
var
|
|
473
|
-
(
|
|
471
|
+
var v;
|
|
472
|
+
(v = me[C.order]) == null || v.fn(D, G), F.fetchData();
|
|
474
473
|
}, {
|
|
475
474
|
field: C == null ? void 0 : C.columnKey,
|
|
476
475
|
value: (E = me[C == null ? void 0 : C.order]) == null ? void 0 : E.value,
|
|
477
|
-
isClick: !
|
|
476
|
+
isClick: !dt(C)
|
|
478
477
|
}));
|
|
479
478
|
}), n("sorted");
|
|
480
479
|
}
|
|
481
480
|
return l({
|
|
482
|
-
filterHandle:
|
|
481
|
+
filterHandle: _,
|
|
483
482
|
filterButton: r,
|
|
484
|
-
initColumns:
|
|
483
|
+
initColumns: S
|
|
485
484
|
}), ke(() => {
|
|
486
|
-
}), (
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
pagination: u.pagination,
|
|
496
|
-
"row-props": () => ({
|
|
497
|
-
style: {
|
|
498
|
-
height: "60px"
|
|
499
|
-
}
|
|
500
|
-
}),
|
|
501
|
-
"flex-height": "",
|
|
502
|
-
remote: "",
|
|
503
|
-
"virtual-scroll": !!(u.virtual ?? u.data.length > 1e3),
|
|
485
|
+
}), (p, d) => (B(), K(c(Ot), {
|
|
486
|
+
data: o.value,
|
|
487
|
+
columns: N.value,
|
|
488
|
+
"scroll-x": O.value,
|
|
489
|
+
"single-column": u.singleColumn,
|
|
490
|
+
summary: u.summaryColumns ? m : void 0,
|
|
491
|
+
"summary-placement": "bottom",
|
|
492
|
+
pagination: u.pagination,
|
|
493
|
+
"row-props": () => ({
|
|
504
494
|
style: {
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
495
|
+
height: "60px"
|
|
496
|
+
}
|
|
497
|
+
}),
|
|
498
|
+
"flex-height": "",
|
|
499
|
+
remote: "",
|
|
500
|
+
"virtual-scroll": !!(u.virtual ?? u.data.length > 1e3),
|
|
501
|
+
style: {
|
|
502
|
+
flex: "1"
|
|
503
|
+
},
|
|
504
|
+
"onUpdate:sorter": h
|
|
505
|
+
}, {
|
|
506
|
+
empty: L(() => [be(p.$slots, "empty", {}, () => [f(c(Ct), null, {
|
|
507
|
+
default: L(() => [X(pe(e.emptyText), 1)]),
|
|
508
|
+
_: 1
|
|
509
|
+
})], !0)]),
|
|
510
|
+
_: 3
|
|
511
|
+
}, 8, ["data", "columns", "scroll-x", "single-column", "summary", "pagination", "virtual-scroll"]));
|
|
516
512
|
}
|
|
517
|
-
}),
|
|
518
|
-
function
|
|
519
|
-
|
|
513
|
+
}), ol = /* @__PURE__ */ re(rl, [["__scopeId", "data-v-057650fc"]]);
|
|
514
|
+
function Vl(e) {
|
|
515
|
+
el({ uploadMethod: e });
|
|
520
516
|
}
|
|
521
|
-
function
|
|
522
|
-
const l =
|
|
517
|
+
function il(...e) {
|
|
518
|
+
const l = ll();
|
|
523
519
|
if (typeof l != "function")
|
|
524
520
|
throw new TypeError("请先通过 setupConfig({ uploadMethod: fn }) 或 registryUpload(fn) 注册上传实现");
|
|
525
521
|
return l(...e);
|
|
526
522
|
}
|
|
527
523
|
function W(e, l = null) {
|
|
528
524
|
if (e && !(e != null && e.startsWith("http"))) {
|
|
529
|
-
const t =
|
|
525
|
+
const t = tl();
|
|
530
526
|
return t ? l ? `${t}${e}?x-oss-process=style/w${l}` : `${t}${e}` : (console.warn('BASE_URL 未配置,返回原始 URL。请使用 setupConfig({ baseURL: "..." }) 配置。'), e);
|
|
531
527
|
}
|
|
532
528
|
return e;
|
|
533
529
|
}
|
|
534
|
-
const
|
|
530
|
+
const sl = "/admin/file", fl = {
|
|
535
531
|
__name: "ImagesUpload",
|
|
536
532
|
props: {
|
|
537
533
|
value: {
|
|
@@ -581,24 +577,24 @@ const rl = "/admin/file", ol = {
|
|
|
581
577
|
emit: l
|
|
582
578
|
}) {
|
|
583
579
|
const t = e, a = l, u = P([]);
|
|
584
|
-
|
|
580
|
+
ee(() => t.value, (o) => {
|
|
585
581
|
console.log("props.value", o), u.value = t.max === 1 ? o ? typeof o != "string" ? o != null && o.length ? [{
|
|
586
|
-
id:
|
|
587
|
-
name: `img${
|
|
582
|
+
id: V().valueOf(),
|
|
583
|
+
name: `img${V().valueOf()}`,
|
|
588
584
|
url: W(o[0]),
|
|
589
585
|
thumbnailUrl: W(o[0]),
|
|
590
586
|
fullPath: o[0],
|
|
591
587
|
status: "finished"
|
|
592
588
|
}] : [] : [{
|
|
593
|
-
id:
|
|
594
|
-
name: `img${
|
|
589
|
+
id: V().valueOf(),
|
|
590
|
+
name: `img${V().valueOf()}`,
|
|
595
591
|
url: W(o),
|
|
596
592
|
fullPath: o,
|
|
597
593
|
thumbnailUrl: W(o),
|
|
598
594
|
status: "finished"
|
|
599
595
|
}] : [] : (o == null ? void 0 : o.map((s, g) => ({
|
|
600
|
-
id:
|
|
601
|
-
name: `img${
|
|
596
|
+
id: V().valueOf() + g,
|
|
597
|
+
name: `img${V().valueOf()}`,
|
|
602
598
|
url: W(s),
|
|
603
599
|
fullPath: s,
|
|
604
600
|
thumbnailUrl: W(s),
|
|
@@ -615,87 +611,84 @@ const rl = "/admin/file", ol = {
|
|
|
615
611
|
onFinish: s,
|
|
616
612
|
onError: g,
|
|
617
613
|
onProgress: w
|
|
618
|
-
},
|
|
619
|
-
const
|
|
620
|
-
o.status === "pending" && (
|
|
621
|
-
|
|
622
|
-
}),
|
|
623
|
-
url:
|
|
624
|
-
data:
|
|
614
|
+
}, b) {
|
|
615
|
+
const O = new FormData();
|
|
616
|
+
o.status === "pending" && (O.append("file", o.file), t.formData && Object.keys(t.formData).length && Object.keys(t.formData).forEach((m) => {
|
|
617
|
+
O.append(m, t.formData[m]);
|
|
618
|
+
}), il({
|
|
619
|
+
url: sl,
|
|
620
|
+
data: O,
|
|
625
621
|
method: "post",
|
|
626
622
|
onUploadProgress: ({
|
|
627
|
-
percent:
|
|
623
|
+
percent: m
|
|
628
624
|
}) => w({
|
|
629
|
-
percent:
|
|
625
|
+
percent: m
|
|
630
626
|
})
|
|
631
|
-
}).then((
|
|
627
|
+
}).then((m) => {
|
|
632
628
|
const {
|
|
633
|
-
url:
|
|
634
|
-
} =
|
|
635
|
-
o.url = W(
|
|
629
|
+
url: N
|
|
630
|
+
} = m.data;
|
|
631
|
+
o.url = W(N), o.fullPath = N, o.thumbnailUrl = W(N), s(), y();
|
|
636
632
|
}).catch(() => {
|
|
637
633
|
o = null, g();
|
|
638
634
|
}).finally(() => {
|
|
639
635
|
}));
|
|
640
636
|
}
|
|
641
|
-
function
|
|
637
|
+
function y() {
|
|
642
638
|
console.log("onSubmit", u.value);
|
|
643
639
|
const o = u.value.reduce((s, g) => (g.status === "finished" && (g != null && g.fullPath) && s.push(g.fullPath), s), []);
|
|
644
640
|
t.max === 1 && o.length === 1 ? a("update:value", o[0]) : o.length ? a("update:value", o) : a("update:value", t.max === 1 ? null : []);
|
|
645
641
|
}
|
|
646
|
-
return (o, s) => {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
_: 1
|
|
678
|
-
});
|
|
679
|
-
};
|
|
642
|
+
return (o, s) => (B(), K(c(k), {
|
|
643
|
+
align: "end",
|
|
644
|
+
"wrap-item": !1
|
|
645
|
+
}, {
|
|
646
|
+
default: L(() => [f(c(He), {
|
|
647
|
+
"file-list": u.value,
|
|
648
|
+
"onUpdate:fileList": s[0] || (s[0] = (g) => u.value = g),
|
|
649
|
+
accept: ".jpeg,.jpg,.png",
|
|
650
|
+
"list-type": "image-card",
|
|
651
|
+
"custom-request": i,
|
|
652
|
+
max: t.read ? Array.isArray(t.value) ? t.value.length : 1 : t.max,
|
|
653
|
+
"show-retry-button": !1,
|
|
654
|
+
"show-remove-button": !t.read,
|
|
655
|
+
class: "upload-box",
|
|
656
|
+
style: Ve({
|
|
657
|
+
...t.size ? {
|
|
658
|
+
"--image-w": `${t.size}px`,
|
|
659
|
+
"--image-h": `${t.size}px`
|
|
660
|
+
} : {
|
|
661
|
+
"--image-w": `${t.width}px`,
|
|
662
|
+
"--image-h": `${t.height}px`
|
|
663
|
+
},
|
|
664
|
+
"--image-mode": t.mode
|
|
665
|
+
}),
|
|
666
|
+
onFinish: s[1] || (s[1] = () => {
|
|
667
|
+
y(), a("complete");
|
|
668
|
+
}),
|
|
669
|
+
onRemove: s[2] || (s[2] = (g, w) => (u.value.splice(w, 1), y(), !1))
|
|
670
|
+
}, null, 8, ["file-list", "max", "show-remove-button", "style"])]),
|
|
671
|
+
_: 1
|
|
672
|
+
}));
|
|
680
673
|
}
|
|
681
|
-
},
|
|
682
|
-
function
|
|
683
|
-
return
|
|
674
|
+
}, cl = /* @__PURE__ */ re(fl, [["__scopeId", "data-v-29718977"]]);
|
|
675
|
+
function Be(e = [], l = $, t = T) {
|
|
676
|
+
return c(e).reduce((a, u) => (a[u[t]] = {
|
|
684
677
|
...u,
|
|
685
678
|
[l]: u[l],
|
|
686
679
|
[t]: u[t]
|
|
687
680
|
}, a), {});
|
|
688
681
|
}
|
|
689
|
-
function
|
|
682
|
+
function De(e) {
|
|
690
683
|
return Array.isArray(e) ? e : [e];
|
|
691
684
|
}
|
|
692
|
-
function
|
|
693
|
-
return e ?
|
|
685
|
+
function Ye(e, l = "YYYY-MM-DD", t = { emptyText: "" }) {
|
|
686
|
+
return e ? V(Number.isNaN(Number(e)) ? e : Number(e)).format(l) : (t == null ? void 0 : t.emptyText) || "";
|
|
694
687
|
}
|
|
695
|
-
function
|
|
696
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
688
|
+
function dl(e) {
|
|
689
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !te(e);
|
|
697
690
|
}
|
|
698
|
-
const
|
|
691
|
+
const yl = {
|
|
699
692
|
input: ({
|
|
700
693
|
label: e,
|
|
701
694
|
key: l,
|
|
@@ -705,16 +698,16 @@ const fl = {
|
|
|
705
698
|
read: i
|
|
706
699
|
}, {
|
|
707
700
|
_value: n,
|
|
708
|
-
_isRead:
|
|
701
|
+
_isRead: y
|
|
709
702
|
}) => {
|
|
710
|
-
const o =
|
|
711
|
-
return i ?? s ? f(
|
|
703
|
+
const o = c(n), s = c(y);
|
|
704
|
+
return i ?? s ? f(We, a, {
|
|
712
705
|
default: () => [u ? u == null ? void 0 : u(o[l], o) : o[l]]
|
|
713
|
-
}) : f(
|
|
706
|
+
}) : f(Re, M({
|
|
714
707
|
value: o[l],
|
|
715
708
|
"onUpdate:value": (g) => o[l] = g,
|
|
716
709
|
clearable: !0,
|
|
717
|
-
placeholder: `请输入${
|
|
710
|
+
placeholder: `请输入${c(e)}`
|
|
718
711
|
}, t), {
|
|
719
712
|
...(t == null ? void 0 : t.slots) || {}
|
|
720
713
|
});
|
|
@@ -728,22 +721,22 @@ const fl = {
|
|
|
728
721
|
format: i = null,
|
|
729
722
|
read: n
|
|
730
723
|
}, {
|
|
731
|
-
_value:
|
|
724
|
+
_value: y,
|
|
732
725
|
_isRead: o
|
|
733
726
|
}) => {
|
|
734
|
-
var
|
|
735
|
-
const s = y
|
|
736
|
-
return n ?? g ? f("div", null, [i ? i == null ? void 0 : i(s[l], w) : ((
|
|
727
|
+
var b, O;
|
|
728
|
+
const s = c(y), g = c(o), w = Array.isArray(a) ? a : typeof a == "function" ? a(s[l]) : [];
|
|
729
|
+
return n ?? g ? f("div", null, [i ? i == null ? void 0 : i(s[l], w) : ((O = (b = Be(w, (t == null ? void 0 : t.labelField) || $, (t == null ? void 0 : t.valueField) || T)) == null ? void 0 : b[s[l]]) == null ? void 0 : O[(t == null ? void 0 : t.labelField) || $]) || s[l]]) : f(Rt, M({
|
|
737
730
|
value: s[l],
|
|
738
|
-
"onUpdate:value": (
|
|
731
|
+
"onUpdate:value": (m) => s[l] = m,
|
|
739
732
|
options: w,
|
|
740
|
-
loading:
|
|
733
|
+
loading: c(u),
|
|
741
734
|
clearable: !0,
|
|
742
735
|
filterable: !0,
|
|
743
736
|
"fallback-option": () => (t != null && t.asyncFallback || (s[l] = null), !1),
|
|
744
737
|
labelField: (t == null ? void 0 : t.labelField) || $,
|
|
745
738
|
valueField: (t == null ? void 0 : t.valueField) || T,
|
|
746
|
-
placeholder: `请选择${
|
|
739
|
+
placeholder: `请选择${c(e)}`,
|
|
747
740
|
style: "width:100%",
|
|
748
741
|
"max-tag-count": "responsive"
|
|
749
742
|
}, t), {
|
|
@@ -759,18 +752,18 @@ const fl = {
|
|
|
759
752
|
format: i,
|
|
760
753
|
read: n
|
|
761
754
|
}, {
|
|
762
|
-
_value:
|
|
755
|
+
_value: y,
|
|
763
756
|
_isRead: o
|
|
764
757
|
}) => {
|
|
765
|
-
const s = y
|
|
766
|
-
return n ?? g ? f("div", null, [i ? i == null ? void 0 : i(s[l]) :
|
|
758
|
+
const s = c(y), g = c(o);
|
|
759
|
+
return n ?? g ? f("div", null, [i ? i == null ? void 0 : i(s[l]) : Ye(s[l], a)]) : f(qe, M({
|
|
767
760
|
"formatted-value": s[l],
|
|
768
761
|
"onUpdate:formatted-value": (w) => {
|
|
769
762
|
s[l] = w;
|
|
770
763
|
},
|
|
771
764
|
type: u,
|
|
772
765
|
clearable: !0,
|
|
773
|
-
placeholder: `请选择${
|
|
766
|
+
placeholder: `请选择${c(e)}`,
|
|
774
767
|
"update-value-on-close": !["year"].includes(t == null ? void 0 : t.type),
|
|
775
768
|
style: "width:100%"
|
|
776
769
|
}, t), {
|
|
@@ -786,10 +779,10 @@ const fl = {
|
|
|
786
779
|
read: i
|
|
787
780
|
}, {
|
|
788
781
|
_value: n,
|
|
789
|
-
_isRead:
|
|
782
|
+
_isRead: y
|
|
790
783
|
}) => {
|
|
791
|
-
const o =
|
|
792
|
-
return i ?? s ? f("div", null, [a ? a == null ? void 0 : a(o[l]) :
|
|
784
|
+
const o = c(n), s = c(y);
|
|
785
|
+
return i ?? s ? f("div", null, [a ? a == null ? void 0 : a(o[l]) : Ye(o[l], u)]) : f(Pt, M({
|
|
793
786
|
"formatted-value": o[l],
|
|
794
787
|
"onUpdate:value": (g, w) => {
|
|
795
788
|
console.log("v", w), o[l] = w;
|
|
@@ -797,7 +790,7 @@ const fl = {
|
|
|
797
790
|
clearable: !0,
|
|
798
791
|
format: "HH:mm:ss",
|
|
799
792
|
style: "width:100%",
|
|
800
|
-
placeholder: `请选择${
|
|
793
|
+
placeholder: `请选择${c(e)}`
|
|
801
794
|
}, t), {
|
|
802
795
|
...(t == null ? void 0 : t.slots) || {}
|
|
803
796
|
});
|
|
@@ -812,17 +805,17 @@ const fl = {
|
|
|
812
805
|
_isRead: i
|
|
813
806
|
}) => {
|
|
814
807
|
var g, w;
|
|
815
|
-
const n =
|
|
808
|
+
const n = c(u), y = c(i), o = {
|
|
816
809
|
date: "YYYY-MM-DD",
|
|
817
810
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
818
811
|
time: "HH:mm:ss",
|
|
819
812
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
820
813
|
daterange: "YYYY-MM-DD"
|
|
821
814
|
}, s = l != null && l.format ? (w = (g = l == null ? void 0 : l.format) == null ? void 0 : g.replace("yyyy", "YYYY")) == null ? void 0 : w.replace("dd", "DD") : o[(l == null ? void 0 : l.type) || t];
|
|
822
|
-
return console.log("formatStr type", t), console.log("formatStr", s), a ??
|
|
823
|
-
"formatted-value": Array.isArray(e) ? n != null && n[e == null ? void 0 : e[0]] && (n != null && n[e == null ? void 0 : e[1]]) ? [
|
|
824
|
-
"onUpdate:formatted-value": (
|
|
825
|
-
console.log(
|
|
815
|
+
return console.log("formatStr type", t), console.log("formatStr", s), a ?? y ? f("div", null, [Array.isArray(e) ? `${n == null ? void 0 : n[e == null ? void 0 : e[0]]} - ${n == null ? void 0 : n[e == null ? void 0 : e[1]]}` : n == null ? void 0 : n[e]]) : f(qe, M({
|
|
816
|
+
"formatted-value": Array.isArray(e) ? n != null && n[e == null ? void 0 : e[0]] && (n != null && n[e == null ? void 0 : e[1]]) ? [V(n == null ? void 0 : n[e == null ? void 0 : e[0]]).format(s), V(n == null ? void 0 : n[e == null ? void 0 : e[1]]).format(s)] : null : (n == null ? void 0 : n[e]) || null,
|
|
817
|
+
"onUpdate:formatted-value": (b) => {
|
|
818
|
+
console.log(b), b && ![o.datetime, o.datetimerange].includes(s) && (b = b.map((O, m) => V(O, s)[m ? "endOf" : "startOf"]("day").format(s))), Array.isArray(e) ? (n[e == null ? void 0 : e[0]] = b == null ? void 0 : b[0], n[e == null ? void 0 : e[1]] = b == null ? void 0 : b[1]) : n[e] = b;
|
|
826
819
|
},
|
|
827
820
|
"update-value-on-close": !["year", "month"].includes(l == null ? void 0 : l.type),
|
|
828
821
|
type: t,
|
|
@@ -841,30 +834,30 @@ const fl = {
|
|
|
841
834
|
}, {
|
|
842
835
|
_value: i,
|
|
843
836
|
_isRead: n,
|
|
844
|
-
labelField:
|
|
837
|
+
labelField: y,
|
|
845
838
|
valueField: o
|
|
846
839
|
}) => {
|
|
847
|
-
var w,
|
|
848
|
-
const s =
|
|
849
|
-
return u ?? g ? f("div", null, [(
|
|
840
|
+
var w, b;
|
|
841
|
+
const s = c(i), g = c(n);
|
|
842
|
+
return u ?? g ? f("div", null, [(b = (w = Be(Array.isArray(l) ? l : [], (t == null ? void 0 : t.labelField) || y || $, (t == null ? void 0 : t.valueField) || o || T)) == null ? void 0 : w[s[e]]) == null ? void 0 : b[(t == null ? void 0 : t.labelField) || y || $]]) : f(Ft, M({
|
|
850
843
|
style: {
|
|
851
844
|
width: "100%"
|
|
852
845
|
},
|
|
853
846
|
value: s[e],
|
|
854
|
-
"onUpdate:value": (
|
|
847
|
+
"onUpdate:value": (O) => s[e] = O
|
|
855
848
|
}, t), {
|
|
856
849
|
...(t == null ? void 0 : t.slots) || {},
|
|
857
|
-
default: () => f(
|
|
850
|
+
default: () => f(k, M({
|
|
858
851
|
"item-wrap": !1
|
|
859
852
|
}, (t == null ? void 0 : t.radioProps) || {}), {
|
|
860
853
|
default: () => {
|
|
861
|
-
var
|
|
862
|
-
return [(
|
|
863
|
-
key:
|
|
864
|
-
value:
|
|
854
|
+
var O;
|
|
855
|
+
return [(O = Array.isArray(l) ? l : []) == null ? void 0 : O.map((m) => f(Ut, {
|
|
856
|
+
key: m.value,
|
|
857
|
+
value: m == null ? void 0 : m[(t == null ? void 0 : t.valueField) || o || T],
|
|
865
858
|
class: "items-center"
|
|
866
859
|
}, {
|
|
867
|
-
default: () => [f("div", (a == null ? void 0 : a(
|
|
860
|
+
default: () => [f("div", (a == null ? void 0 : a(m)) || {}, [m == null ? void 0 : m[(t == null ? void 0 : t.labelField) || y || $]])]
|
|
868
861
|
}))];
|
|
869
862
|
}
|
|
870
863
|
})
|
|
@@ -879,14 +872,14 @@ const fl = {
|
|
|
879
872
|
_value: u,
|
|
880
873
|
_isRead: i
|
|
881
874
|
}) => {
|
|
882
|
-
const n =
|
|
883
|
-
return a ??
|
|
875
|
+
const n = c(u), y = c(i);
|
|
876
|
+
return a ?? y ? f("div", null, [n[l]]) : f(Re, M({
|
|
884
877
|
value: n[l],
|
|
885
878
|
"onUpdate:value": (o) => n[l] = o,
|
|
886
879
|
clearable: !0,
|
|
887
880
|
style: "width:100%",
|
|
888
881
|
"allow-input": (o) => !o || /^\d$/.test(o) || o.length <= 11,
|
|
889
|
-
placeholder: `请输入${
|
|
882
|
+
placeholder: `请输入${c(e)}`
|
|
890
883
|
}, t), {
|
|
891
884
|
...t == null ? void 0 : t.slots
|
|
892
885
|
});
|
|
@@ -900,8 +893,8 @@ const fl = {
|
|
|
900
893
|
_value: u,
|
|
901
894
|
_isRead: i
|
|
902
895
|
}) => {
|
|
903
|
-
const n =
|
|
904
|
-
return a ??
|
|
896
|
+
const n = c(u), y = c(i);
|
|
897
|
+
return a ?? y ? f("div", null, [n[l]]) : f(Mt, M({
|
|
905
898
|
value: typeof n[l] == "string" && n[l] ? Number(n[l]) : n[l],
|
|
906
899
|
"onUpdate:value": (o) => {
|
|
907
900
|
n[l] = o;
|
|
@@ -909,7 +902,7 @@ const fl = {
|
|
|
909
902
|
showButton: !1,
|
|
910
903
|
clearable: !0,
|
|
911
904
|
style: "width:100%",
|
|
912
|
-
placeholder: `请输入${
|
|
905
|
+
placeholder: `请输入${c(e)}`,
|
|
913
906
|
min: 0
|
|
914
907
|
}, t), {
|
|
915
908
|
...(t == null ? void 0 : t.slots) || {}
|
|
@@ -921,26 +914,26 @@ const fl = {
|
|
|
921
914
|
}, {
|
|
922
915
|
_value: t
|
|
923
916
|
}) => {
|
|
924
|
-
const a =
|
|
925
|
-
return f(
|
|
917
|
+
const a = c(t);
|
|
918
|
+
return f(He, M({
|
|
926
919
|
multiple: !0,
|
|
927
920
|
max: 1,
|
|
928
921
|
accept: ".xls,.xlsx",
|
|
929
922
|
"file-list": a[e],
|
|
930
923
|
"onUpdate:file-list": (u) => a[e] = u
|
|
931
924
|
}, l), {
|
|
932
|
-
default: () => [f(
|
|
925
|
+
default: () => [f(St, null, {
|
|
933
926
|
default: () => [f("div", {
|
|
934
927
|
style: "margin-bottom: 12px"
|
|
935
|
-
}, [f(
|
|
928
|
+
}, [f(Ke, {
|
|
936
929
|
size: "48",
|
|
937
930
|
depth: 3
|
|
938
931
|
}, {
|
|
939
|
-
default: () => [f(
|
|
940
|
-
})]), f(
|
|
932
|
+
default: () => [f(kt, null, null)]
|
|
933
|
+
})]), f(It, {
|
|
941
934
|
style: "font-size: 16px"
|
|
942
935
|
}, {
|
|
943
|
-
default: () => [
|
|
936
|
+
default: () => [X("点击或者拖动文件到该区域来上传")]
|
|
944
937
|
})]
|
|
945
938
|
})]
|
|
946
939
|
});
|
|
@@ -954,12 +947,12 @@ const fl = {
|
|
|
954
947
|
pageState: i
|
|
955
948
|
}, {
|
|
956
949
|
_value: n,
|
|
957
|
-
_isRead:
|
|
950
|
+
_isRead: y
|
|
958
951
|
}) => {
|
|
959
|
-
var
|
|
960
|
-
const o =
|
|
952
|
+
var b;
|
|
953
|
+
const o = c(n);
|
|
961
954
|
console.log(l), console.log(i);
|
|
962
|
-
const s = (
|
|
955
|
+
const s = (b = i == null ? void 0 : i.data) != null && b.length ? i.data : o[e], g = Array.isArray(a) ? a : typeof a == "function" ? a(o[e]) : [], w = {
|
|
963
956
|
data: s,
|
|
964
957
|
columns: g,
|
|
965
958
|
maxHeight: 200,
|
|
@@ -969,7 +962,7 @@ const fl = {
|
|
|
969
962
|
loading: i == null ? void 0 : i.loading,
|
|
970
963
|
...t
|
|
971
964
|
};
|
|
972
|
-
return f(
|
|
965
|
+
return f(ol, w, null);
|
|
973
966
|
},
|
|
974
967
|
progress: ({
|
|
975
968
|
key: e,
|
|
@@ -977,12 +970,12 @@ const fl = {
|
|
|
977
970
|
}, {
|
|
978
971
|
_value: t
|
|
979
972
|
}) => {
|
|
980
|
-
const a =
|
|
981
|
-
return f(
|
|
973
|
+
const a = c(t);
|
|
974
|
+
return f(Nt, M({
|
|
982
975
|
percentage: a[e]
|
|
983
976
|
}, l), null);
|
|
984
977
|
},
|
|
985
|
-
line: () => f(
|
|
978
|
+
line: () => f(Dt, null, null),
|
|
986
979
|
image: ({
|
|
987
980
|
key: e,
|
|
988
981
|
props: l,
|
|
@@ -991,10 +984,10 @@ const fl = {
|
|
|
991
984
|
_isRead: a,
|
|
992
985
|
_value: u
|
|
993
986
|
}) => {
|
|
994
|
-
const i =
|
|
995
|
-
return f(
|
|
987
|
+
const i = c(u), n = c(a);
|
|
988
|
+
return f(cl, M({
|
|
996
989
|
value: i[e],
|
|
997
|
-
"onUpdate:value": (
|
|
990
|
+
"onUpdate:value": (y) => i[e] = y,
|
|
998
991
|
max: 1
|
|
999
992
|
}, l, {
|
|
1000
993
|
read: t ?? n
|
|
@@ -1007,12 +1000,12 @@ const fl = {
|
|
|
1007
1000
|
}, {
|
|
1008
1001
|
_value: a
|
|
1009
1002
|
}) => {
|
|
1010
|
-
const u =
|
|
1011
|
-
return f(z,
|
|
1003
|
+
const u = c(a);
|
|
1004
|
+
return f(z, M({
|
|
1012
1005
|
type: "info"
|
|
1013
1006
|
}, l, {
|
|
1014
1007
|
onClick: () => l != null && l.onClick ? l == null ? void 0 : l.onClick(u) : e == null ? void 0 : e(u)
|
|
1015
|
-
}),
|
|
1008
|
+
}), dl(t) ? t : {
|
|
1016
1009
|
default: () => [t]
|
|
1017
1010
|
});
|
|
1018
1011
|
},
|
|
@@ -1024,10 +1017,10 @@ const fl = {
|
|
|
1024
1017
|
_isRead: a,
|
|
1025
1018
|
_value: u
|
|
1026
1019
|
}) => {
|
|
1027
|
-
const i =
|
|
1028
|
-
return t ?? n ? f("div", null, [i[e] ? "是" : "否"]) : f(
|
|
1020
|
+
const i = c(u), n = c(a);
|
|
1021
|
+
return t ?? n ? f("div", null, [i[e] ? "是" : "否"]) : f(_t, M({
|
|
1029
1022
|
value: i[e],
|
|
1030
|
-
"onUpdate:value": (
|
|
1023
|
+
"onUpdate:value": (y) => i[e] = y
|
|
1031
1024
|
}, l), {
|
|
1032
1025
|
...(l == null ? void 0 : l.slots) || {}
|
|
1033
1026
|
});
|
|
@@ -1041,29 +1034,29 @@ const fl = {
|
|
|
1041
1034
|
_value: u,
|
|
1042
1035
|
_isRead: i,
|
|
1043
1036
|
labelField: n,
|
|
1044
|
-
valueField:
|
|
1037
|
+
valueField: y
|
|
1045
1038
|
}) => {
|
|
1046
|
-
var g, w,
|
|
1047
|
-
const o =
|
|
1048
|
-
return a ?? s ? f("div", null, [(
|
|
1049
|
-
var
|
|
1050
|
-
return (
|
|
1051
|
-
})) == null ? void 0 : w.map((
|
|
1039
|
+
var g, w, b;
|
|
1040
|
+
const o = c(u), s = c(i);
|
|
1041
|
+
return a ?? s ? f("div", null, [(b = (w = (g = Array.isArray(l) ? l : []) == null ? void 0 : g.filter((O) => {
|
|
1042
|
+
var m;
|
|
1043
|
+
return (m = o[e]) == null ? void 0 : m.includes(O[(t == null ? void 0 : t.valueField) || y || T]);
|
|
1044
|
+
})) == null ? void 0 : w.map((O) => O[(t == null ? void 0 : t.labelField) || n || $])) == null ? void 0 : b.join("、")]) : f(we, M({
|
|
1052
1045
|
value: o[e],
|
|
1053
|
-
"onUpdate:value": (
|
|
1046
|
+
"onUpdate:value": (O) => o[e] = O,
|
|
1054
1047
|
style: {
|
|
1055
1048
|
width: "100%"
|
|
1056
1049
|
}
|
|
1057
1050
|
}, t), {
|
|
1058
1051
|
...(t == null ? void 0 : t.slots) || {},
|
|
1059
|
-
default: () => f(
|
|
1052
|
+
default: () => f(k, (t == null ? void 0 : t.checkBoxProps) || {}, {
|
|
1060
1053
|
default: () => {
|
|
1061
|
-
var
|
|
1062
|
-
return [(
|
|
1063
|
-
key:
|
|
1064
|
-
value:
|
|
1054
|
+
var O;
|
|
1055
|
+
return [(O = Array.isArray(l) ? l : []) == null ? void 0 : O.map((m) => f(Oe, {
|
|
1056
|
+
key: m == null ? void 0 : m[(t == null ? void 0 : t.valueField) || y || T],
|
|
1057
|
+
value: m == null ? void 0 : m[(t == null ? void 0 : t.valueField) || y || T]
|
|
1065
1058
|
}, {
|
|
1066
|
-
default: () => [
|
|
1059
|
+
default: () => [m == null ? void 0 : m[(t == null ? void 0 : t.labelField) || n || $]]
|
|
1067
1060
|
}))];
|
|
1068
1061
|
}
|
|
1069
1062
|
})
|
|
@@ -1075,10 +1068,10 @@ const fl = {
|
|
|
1075
1068
|
options: t
|
|
1076
1069
|
}, {
|
|
1077
1070
|
_value: a
|
|
1078
|
-
}) => (
|
|
1071
|
+
}) => (c(a), f("div", null, [X("FilterSelect 组件需要外部提供")]))
|
|
1079
1072
|
};
|
|
1080
1073
|
let J = {};
|
|
1081
|
-
class
|
|
1074
|
+
class gl {
|
|
1082
1075
|
constructor() {
|
|
1083
1076
|
de(this, "defaultMap", null);
|
|
1084
1077
|
de(this, "extendOptions", null);
|
|
@@ -1125,20 +1118,20 @@ class cl {
|
|
|
1125
1118
|
});
|
|
1126
1119
|
}
|
|
1127
1120
|
initSetup(l) {
|
|
1128
|
-
this.defaultMap && this.clear(), this.defaultMap = /* @__PURE__ */ new Map(), this.initOptions(
|
|
1121
|
+
this.defaultMap && this.clear(), this.defaultMap = /* @__PURE__ */ new Map(), this.initOptions(yl), l && l(), this.initOptions(J);
|
|
1129
1122
|
}
|
|
1130
1123
|
init(l) {
|
|
1131
1124
|
this.initSetup(l);
|
|
1132
1125
|
}
|
|
1133
1126
|
}
|
|
1134
|
-
const
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1127
|
+
const oe = new gl(), zl = (e) => oe.init(e), Ze = (e = []) => oe.getOptions(e);
|
|
1128
|
+
function Wl() {
|
|
1129
|
+
return oe.getAllOptions();
|
|
1137
1130
|
}
|
|
1138
|
-
function
|
|
1139
|
-
return
|
|
1131
|
+
function Hl(e, l) {
|
|
1132
|
+
return oe.setupExtendOptions(e, l);
|
|
1140
1133
|
}
|
|
1141
|
-
const
|
|
1134
|
+
const ml = ["xlink:href", "fill"], hl = /* @__PURE__ */ j({
|
|
1142
1135
|
__name: "SvgIcon",
|
|
1143
1136
|
props: {
|
|
1144
1137
|
name: {
|
|
@@ -1152,76 +1145,76 @@ const dl = ["xlink:href", "fill"], yl = /* @__PURE__ */ j({
|
|
|
1152
1145
|
},
|
|
1153
1146
|
setup(e) {
|
|
1154
1147
|
const l = e, t = Y(() => `#svg-${l.name}`);
|
|
1155
|
-
return (a, u) => (B(),
|
|
1148
|
+
return (a, u) => (B(), le("svg", M({ class: "svg-icon" }, a.$attrs, {
|
|
1156
1149
|
style: { color: e.color },
|
|
1157
1150
|
"aria-hidden": ""
|
|
1158
1151
|
}), [
|
|
1159
|
-
|
|
1152
|
+
Ae("use", {
|
|
1160
1153
|
"xlink:href": t.value,
|
|
1161
1154
|
fill: e.color
|
|
1162
|
-
}, null, 8,
|
|
1155
|
+
}, null, 8, ml)
|
|
1163
1156
|
], 16));
|
|
1164
1157
|
}
|
|
1165
|
-
}),
|
|
1166
|
-
function
|
|
1167
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1158
|
+
}), pl = /* @__PURE__ */ re(hl, [["__scopeId", "data-v-9dbe5f10"]]);
|
|
1159
|
+
function bl(e) {
|
|
1160
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !te(e);
|
|
1168
1161
|
}
|
|
1169
|
-
const
|
|
1162
|
+
const xl = /* @__PURE__ */ j((e, {
|
|
1170
1163
|
emit: l
|
|
1171
1164
|
}) => {
|
|
1172
|
-
var
|
|
1173
|
-
const t =
|
|
1174
|
-
if ((
|
|
1175
|
-
|
|
1165
|
+
var S;
|
|
1166
|
+
const t = ue();
|
|
1167
|
+
if ((S = t == null ? void 0 : t.appContext) != null && S.app)
|
|
1168
|
+
Z(t.appContext.app);
|
|
1176
1169
|
else {
|
|
1177
|
-
const r =
|
|
1178
|
-
r &&
|
|
1170
|
+
const r = ul();
|
|
1171
|
+
r && Z(r);
|
|
1179
1172
|
}
|
|
1180
1173
|
const a = P(e.value || {}), u = Y(() => e.read || !1);
|
|
1181
1174
|
let i = e.formRef;
|
|
1182
|
-
|
|
1175
|
+
ee(() => e.formRef, (r) => i = r);
|
|
1183
1176
|
const n = Y(() => e.option || []);
|
|
1184
|
-
function
|
|
1185
|
-
return r.reduce((
|
|
1186
|
-
|
|
1187
|
-
const x = [
|
|
1177
|
+
function y(r) {
|
|
1178
|
+
return r.reduce((_, h) => {
|
|
1179
|
+
_.push((h == null ? void 0 : h.way) ?? "input");
|
|
1180
|
+
const x = [h == null ? void 0 : h.default, h == null ? void 0 : h.suffix, h == null ? void 0 : h.prefix].reduce((p, d) => {
|
|
1188
1181
|
var C;
|
|
1189
|
-
return Array.isArray(
|
|
1182
|
+
return Array.isArray(d) ? p = p.concat(d) : d && ((C = Object.keys(d)) != null && C.length) && p.push(d), p;
|
|
1190
1183
|
}, []);
|
|
1191
|
-
return console.log(x), x.length && x.forEach((
|
|
1184
|
+
return console.log(x), x.length && x.forEach((p) => _.push((p == null ? void 0 : p.way) ?? "input")), _;
|
|
1192
1185
|
}, []);
|
|
1193
1186
|
}
|
|
1194
|
-
const o = Y(() => [...new Set(
|
|
1195
|
-
console.log(e.option), console.log("defaultOption", s, o.value),
|
|
1187
|
+
const o = Y(() => [...new Set(y(e.option || []))]), s = Ze(o.value);
|
|
1188
|
+
console.log(e.option), console.log("defaultOption", s, o.value), ee(() => a.value, (r) => {
|
|
1196
1189
|
l("update:value", r);
|
|
1197
1190
|
}, {
|
|
1198
1191
|
immediate: !0
|
|
1199
1192
|
});
|
|
1200
|
-
function g(r,
|
|
1201
|
-
let
|
|
1193
|
+
function g(r, _) {
|
|
1194
|
+
let h = {};
|
|
1202
1195
|
const x = typeof r;
|
|
1203
|
-
let
|
|
1196
|
+
let p = null;
|
|
1204
1197
|
try {
|
|
1205
|
-
return r ? x === "string" || x === "object" ?
|
|
1198
|
+
return r ? x === "string" || x === "object" ? p = r : x === "function" && (p = r(c(a), {
|
|
1206
1199
|
formRef: i,
|
|
1207
1200
|
resetForm: () => {
|
|
1208
|
-
var
|
|
1209
|
-
return (
|
|
1201
|
+
var d;
|
|
1202
|
+
return (d = i == null ? void 0 : i.value) == null ? void 0 : d.restoreValidation();
|
|
1210
1203
|
},
|
|
1211
1204
|
close: () => {
|
|
1212
|
-
var
|
|
1213
|
-
return (
|
|
1205
|
+
var d;
|
|
1206
|
+
return (d = e.cancel) == null ? void 0 : d.call(e);
|
|
1214
1207
|
},
|
|
1215
1208
|
setValue: w
|
|
1216
|
-
})) :
|
|
1217
|
-
const C =
|
|
1218
|
-
|
|
1219
|
-
}) :
|
|
1209
|
+
})) : p = r, typeof p == "object" && !Array.isArray(p) ? Object.keys(p).forEach((d) => {
|
|
1210
|
+
const C = p[d];
|
|
1211
|
+
mt(C) ? h[d] = c(C) : h[d] = C;
|
|
1212
|
+
}) : h = p, h;
|
|
1220
1213
|
} catch {
|
|
1221
1214
|
return {};
|
|
1222
1215
|
}
|
|
1223
1216
|
}
|
|
1224
|
-
|
|
1217
|
+
ee(() => e.value, (r) => {
|
|
1225
1218
|
console.log(r), a.value = r || {};
|
|
1226
1219
|
}, {
|
|
1227
1220
|
immediate: !0
|
|
@@ -1229,8 +1222,8 @@ const hl = /* @__PURE__ */ j((e, {
|
|
|
1229
1222
|
function w(r) {
|
|
1230
1223
|
a.value = r;
|
|
1231
1224
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return f(
|
|
1225
|
+
function b(r) {
|
|
1226
|
+
return f(k, M({
|
|
1234
1227
|
"wrap-item": !1,
|
|
1235
1228
|
wrap: !!(r != null && r.isWrap),
|
|
1236
1229
|
align: "center",
|
|
@@ -1238,39 +1231,39 @@ const hl = /* @__PURE__ */ j((e, {
|
|
|
1238
1231
|
width: "100%"
|
|
1239
1232
|
}
|
|
1240
1233
|
}, (r == null ? void 0 : r.contentProps) || {}), {
|
|
1241
|
-
default: () => [
|
|
1234
|
+
default: () => [O(r == null ? void 0 : r.prefix), O((r == null ? void 0 : r.default) || r), O(r == null ? void 0 : r.suffix)]
|
|
1242
1235
|
});
|
|
1243
1236
|
}
|
|
1244
|
-
function
|
|
1237
|
+
function O(r) {
|
|
1245
1238
|
if (!r) return;
|
|
1246
|
-
let
|
|
1247
|
-
return typeof r == "function" && (
|
|
1248
|
-
item:
|
|
1239
|
+
let _ = r;
|
|
1240
|
+
return typeof r == "function" && (_ = g(r)), _ = g(_), te(_) ? (console.log("??? isVNode"), _) : typeof _ == "string" ? (console.log("??? string"), _) : Array.isArray(_) ? (console.log("???"), f(ae, null, [_.map((h, x) => f(N, {
|
|
1241
|
+
item: h,
|
|
1249
1242
|
index: x
|
|
1250
|
-
}, null))])) : typeof
|
|
1251
|
-
var
|
|
1252
|
-
return (
|
|
1253
|
-
_value:
|
|
1254
|
-
_formRef:
|
|
1255
|
-
_isRead:
|
|
1243
|
+
}, null))])) : typeof _ == "object" ? (console.log("??? object"), _.props = g((_ == null ? void 0 : _.props) ?? {}), c(Y(() => {
|
|
1244
|
+
var h;
|
|
1245
|
+
return (h = s == null ? void 0 : s[(_ == null ? void 0 : _.way) || "input"]) == null ? void 0 : h.call(s, m(_), {
|
|
1246
|
+
_value: _ != null && _.queryType ? c(a)[_ == null ? void 0 : _.queryType] : c(a),
|
|
1247
|
+
_formRef: c(i),
|
|
1248
|
+
_isRead: c(u),
|
|
1256
1249
|
labelField: $,
|
|
1257
1250
|
valueField: T
|
|
1258
1251
|
});
|
|
1259
1252
|
}))) : null;
|
|
1260
1253
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1254
|
+
function m(r) {
|
|
1255
|
+
return c(r.enum) && (r.options = Ge(c(r.enum))), r;
|
|
1263
1256
|
}
|
|
1264
|
-
function
|
|
1257
|
+
function N({
|
|
1265
1258
|
item: r,
|
|
1266
|
-
index:
|
|
1259
|
+
index: _
|
|
1267
1260
|
}) {
|
|
1268
|
-
var
|
|
1269
|
-
return r.formItemProps = g(r == null ? void 0 : r.formItemProps), r.formItemProps || (r.formItemProps = {}), !((
|
|
1270
|
-
key:
|
|
1261
|
+
var h, x, p, d, C, U;
|
|
1262
|
+
return r.formItemProps = g(r == null ? void 0 : r.formItemProps), r.formItemProps || (r.formItemProps = {}), !((h = r.formItemProps) != null && h.labelWidth) && ((x = e.formProps) != null && x.labelWidth) && (r.formItemProps.labelWidth = (p = e.formProps) == null ? void 0 : p.labelWidth), yt(f(qt, M({
|
|
1263
|
+
key: _,
|
|
1271
1264
|
showLabel: !(r != null && r.noLabel)
|
|
1272
1265
|
}, r == null ? void 0 : r.formItemProps, {
|
|
1273
|
-
labelWidth: ((
|
|
1266
|
+
labelWidth: ((d = r == null ? void 0 : r.formItemProps) == null ? void 0 : d.labelWidth) || "auto",
|
|
1274
1267
|
feedback: g((C = r == null ? void 0 : r.formItemProps) == null ? void 0 : C.feedback),
|
|
1275
1268
|
style: {
|
|
1276
1269
|
padding: "0 15px",
|
|
@@ -1280,26 +1273,26 @@ const hl = /* @__PURE__ */ j((e, {
|
|
|
1280
1273
|
},
|
|
1281
1274
|
path: String(r.key)
|
|
1282
1275
|
}), {
|
|
1283
|
-
default: () =>
|
|
1276
|
+
default: () => b(r),
|
|
1284
1277
|
label: () => {
|
|
1285
1278
|
var E, R;
|
|
1286
1279
|
return f("div", {
|
|
1287
1280
|
class: r != null && r.labelClass || r != null && r.labelSuffix ? ` ${r == null ? void 0 : r.labelClass} flex items-center gap-col-9px` : ""
|
|
1288
|
-
}, [r != null && r.labelSuffix ? typeof (r == null ? void 0 : r.labelSuffix) == "string" ? f(
|
|
1281
|
+
}, [r != null && r.labelSuffix ? typeof (r == null ? void 0 : r.labelSuffix) == "string" ? f(Ke, {
|
|
1289
1282
|
class: "wh-20px c-inherit",
|
|
1290
1283
|
...r == null ? void 0 : r.labelSuffixProps
|
|
1291
1284
|
}, {
|
|
1292
|
-
default: () => [f(
|
|
1285
|
+
default: () => [f(pl, {
|
|
1293
1286
|
name: r == null ? void 0 : r.labelSuffix
|
|
1294
1287
|
}, null)]
|
|
1295
|
-
}) : (E = r == null ? void 0 : r.labelSuffix) == null ? void 0 : E.call(r) : f(
|
|
1288
|
+
}) : (E = r == null ? void 0 : r.labelSuffix) == null ? void 0 : E.call(r) : f(ae, null, null), `${c(typeof (r == null ? void 0 : r[e.labelField || "label"]) == "function" ? (R = r == null ? void 0 : r[e.labelField || "label"]) == null ? void 0 : R.call(r) : r == null ? void 0 : r[e.labelField || "label"]) || ""} ${u.value || r.read, " "}
|
|
1296
1289
|
`]);
|
|
1297
1290
|
}
|
|
1298
|
-
}), [[
|
|
1291
|
+
}), [[gt("corePermission"), r == null ? void 0 : r.permission]]);
|
|
1299
1292
|
}
|
|
1300
1293
|
return () => {
|
|
1301
1294
|
let r;
|
|
1302
|
-
return f(
|
|
1295
|
+
return f(k, {
|
|
1303
1296
|
"wrap-item": !1,
|
|
1304
1297
|
size: [0, 8],
|
|
1305
1298
|
style: {
|
|
@@ -1308,14 +1301,14 @@ const hl = /* @__PURE__ */ j((e, {
|
|
|
1308
1301
|
alignContent: "baseline",
|
|
1309
1302
|
...e.style
|
|
1310
1303
|
}
|
|
1311
|
-
},
|
|
1312
|
-
isRender:
|
|
1313
|
-
...
|
|
1314
|
-
}, x) => (typeof
|
|
1304
|
+
}, bl(r = n.value.map(({
|
|
1305
|
+
isRender: _ = !0,
|
|
1306
|
+
...h
|
|
1307
|
+
}, x) => (typeof c(_) != "boolean" ? _ != null && _(c(a)) : c(_)) ? h != null && h.render ? h == null ? void 0 : h.render(c(a), x, {
|
|
1315
1308
|
setValue: w,
|
|
1316
|
-
value:
|
|
1317
|
-
}) : f(
|
|
1318
|
-
item:
|
|
1309
|
+
value: c(a)
|
|
1310
|
+
}) : f(N, {
|
|
1311
|
+
item: h,
|
|
1319
1312
|
index: x
|
|
1320
1313
|
}, null) : null)) ? r : {
|
|
1321
1314
|
default: () => [r]
|
|
@@ -1357,11 +1350,11 @@ const hl = /* @__PURE__ */ j((e, {
|
|
|
1357
1350
|
}
|
|
1358
1351
|
},
|
|
1359
1352
|
emits: ["update:value"]
|
|
1360
|
-
}),
|
|
1353
|
+
}), wl = {
|
|
1361
1354
|
showIcon: !1,
|
|
1362
1355
|
autoFocus: !1
|
|
1363
1356
|
};
|
|
1364
|
-
function
|
|
1357
|
+
function Ol({
|
|
1365
1358
|
options: e = [],
|
|
1366
1359
|
model: l,
|
|
1367
1360
|
labelField: t = "label",
|
|
@@ -1374,31 +1367,31 @@ function bl({
|
|
|
1374
1367
|
n != null && n.required && (u[String(g)] = {
|
|
1375
1368
|
key: g,
|
|
1376
1369
|
type: "any",
|
|
1377
|
-
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(
|
|
1370
|
+
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(c(l), { ...a }) : n == null ? void 0 : n.required : !1,
|
|
1378
1371
|
message: (n == null ? void 0 : n.message) || `请选择${n == null ? void 0 : n[t]}`,
|
|
1379
1372
|
fields: i
|
|
1380
1373
|
});
|
|
1381
1374
|
});
|
|
1382
|
-
const
|
|
1375
|
+
const y = n != null && n.rule ? typeof (n == null ? void 0 : n.rule) != "function" ? n == null ? void 0 : n.rule : n == null ? void 0 : n.rule(c(l), { ...a }) : i ? {
|
|
1383
1376
|
key: n == null ? void 0 : n.key,
|
|
1384
1377
|
type: "any",
|
|
1385
|
-
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(
|
|
1378
|
+
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(c(l), { ...a }) : n == null ? void 0 : n.required : !1,
|
|
1386
1379
|
message: (n == null ? void 0 : n.message) || `请${(o = n == null ? void 0 : n.options) != null && o.length ? "选择" : "输入"}${n == null ? void 0 : n[t]}`,
|
|
1387
1380
|
fields: i
|
|
1388
1381
|
} : {
|
|
1389
1382
|
key: n == null ? void 0 : n.key,
|
|
1390
1383
|
type: "any",
|
|
1391
|
-
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(
|
|
1384
|
+
required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(c(l), { ...a }) : n == null ? void 0 : n.required : !1,
|
|
1392
1385
|
message: (n == null ? void 0 : n.message) || `请${(s = n == null ? void 0 : n.options) != null && s.length ? "选择" : "输入"}${n == null ? void 0 : n[t]}`,
|
|
1393
1386
|
...Array.isArray(n == null ? void 0 : n.key) ? {
|
|
1394
|
-
validator: (g) => (console.log(g), !(n == null ? void 0 : n.key.every((
|
|
1387
|
+
validator: (g) => (console.log(g), !(n == null ? void 0 : n.key.every((b) => c(l)[b])) && (n != null && n.required) ? new Error(g == null ? void 0 : g.message) : !0)
|
|
1395
1388
|
} : {}
|
|
1396
1389
|
};
|
|
1397
|
-
return
|
|
1390
|
+
return y != null && y.required && (u[String(n == null ? void 0 : n.key)] = y), u;
|
|
1398
1391
|
}, {})) || {}
|
|
1399
1392
|
);
|
|
1400
1393
|
}
|
|
1401
|
-
const
|
|
1394
|
+
const et = /* @__PURE__ */ j({
|
|
1402
1395
|
__name: "DataForm",
|
|
1403
1396
|
props: /* @__PURE__ */ xe({
|
|
1404
1397
|
value: {},
|
|
@@ -1421,54 +1414,54 @@ const Ge = /* @__PURE__ */ j({
|
|
|
1421
1414
|
emits: ["update:value"],
|
|
1422
1415
|
setup(e, { expose: l }) {
|
|
1423
1416
|
var o;
|
|
1424
|
-
const t =
|
|
1425
|
-
(o = t == null ? void 0 : t.appContext) != null && o.app &&
|
|
1426
|
-
const a = e, u = Y(() => a.options), i = P(), n =
|
|
1427
|
-
u.value ?
|
|
1417
|
+
const t = ue();
|
|
1418
|
+
(o = t == null ? void 0 : t.appContext) != null && o.app && Z(t.appContext.app);
|
|
1419
|
+
const a = e, u = Y(() => a.options), i = P(), n = ze(e, "value"), y = Y(() => c(
|
|
1420
|
+
u.value ? Ol({
|
|
1428
1421
|
options: u.value,
|
|
1429
1422
|
model: n,
|
|
1430
1423
|
labelField: a.labelField,
|
|
1431
1424
|
formOpr: { formRef: i }
|
|
1432
1425
|
}) : {}
|
|
1433
1426
|
));
|
|
1434
|
-
return console.log(
|
|
1427
|
+
return console.log(y.value), l({
|
|
1435
1428
|
formRef: i,
|
|
1436
|
-
getRule: () =>
|
|
1429
|
+
getRule: () => y.value,
|
|
1437
1430
|
valid: (s = []) => (console.log("?? valid", s), new Promise((g, w) => {
|
|
1438
|
-
var
|
|
1439
|
-
const
|
|
1440
|
-
(
|
|
1441
|
-
if (
|
|
1431
|
+
var O;
|
|
1432
|
+
const b = De(s);
|
|
1433
|
+
(O = i.value) == null || O.validate((m) => {
|
|
1434
|
+
if (m) return w(m);
|
|
1442
1435
|
g();
|
|
1443
|
-
}, (
|
|
1436
|
+
}, (m) => b.length ? b.includes(m == null ? void 0 : m.key) : !0);
|
|
1444
1437
|
})),
|
|
1445
1438
|
confirm: (s) => new Promise((g, w) => {
|
|
1446
|
-
var
|
|
1447
|
-
(
|
|
1448
|
-
if (
|
|
1449
|
-
s && s(
|
|
1439
|
+
var b;
|
|
1440
|
+
(b = i.value) == null || b.validate((O) => {
|
|
1441
|
+
if (O) return w(O);
|
|
1442
|
+
s && s(c(n)), g(c(n));
|
|
1450
1443
|
});
|
|
1451
1444
|
})
|
|
1452
|
-
}), (s, g) => (B(), K(
|
|
1445
|
+
}), (s, g) => (B(), K(c(Et), M({
|
|
1453
1446
|
ref_key: "formRef",
|
|
1454
1447
|
ref: i,
|
|
1455
1448
|
model: n.value,
|
|
1456
|
-
rules: a.read ? {} :
|
|
1449
|
+
rules: a.read ? {} : y.value,
|
|
1457
1450
|
"label-placement": "left",
|
|
1458
1451
|
"label-width": "100px",
|
|
1459
1452
|
"require-mark-placement": "right-hanging",
|
|
1460
1453
|
class: a.dialog ? a.read ? "core-dialog-content" : "core-dialog-main" : "",
|
|
1461
1454
|
style: { minHeight: a.isNo ? "unset" : null }
|
|
1462
1455
|
}, a.formProps), {
|
|
1463
|
-
default:
|
|
1464
|
-
f(
|
|
1456
|
+
default: L(() => [
|
|
1457
|
+
f(c(xl), {
|
|
1465
1458
|
value: n.value,
|
|
1466
1459
|
"onUpdate:value": g[0] || (g[0] = (w) => n.value = w),
|
|
1467
1460
|
"form-ref": i.value,
|
|
1468
1461
|
option: a.options,
|
|
1469
1462
|
"label-field": a.labelField,
|
|
1470
1463
|
read: a.read,
|
|
1471
|
-
style:
|
|
1464
|
+
style: Ve(a.contentStyle),
|
|
1472
1465
|
"form-props": a.formProps
|
|
1473
1466
|
}, null, 8, ["value", "form-ref", "option", "label-field", "read", "style", "form-props"])
|
|
1474
1467
|
]),
|
|
@@ -1476,16 +1469,16 @@ const Ge = /* @__PURE__ */ j({
|
|
|
1476
1469
|
}, 16, ["model", "rules", "class", "style"]));
|
|
1477
1470
|
}
|
|
1478
1471
|
});
|
|
1479
|
-
function
|
|
1480
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1472
|
+
function Cl(e) {
|
|
1473
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !te(e);
|
|
1481
1474
|
}
|
|
1482
1475
|
let H = null, ge = null;
|
|
1483
|
-
function
|
|
1476
|
+
function Al() {
|
|
1484
1477
|
if (H) return H;
|
|
1485
1478
|
if (typeof $dialog < "u" && $dialog)
|
|
1486
1479
|
return H = $dialog, H;
|
|
1487
1480
|
try {
|
|
1488
|
-
const e =
|
|
1481
|
+
const e = _e();
|
|
1489
1482
|
if (e)
|
|
1490
1483
|
return H = e, H;
|
|
1491
1484
|
} catch {
|
|
@@ -1493,14 +1486,14 @@ function wl() {
|
|
|
1493
1486
|
if (!ge) {
|
|
1494
1487
|
const {
|
|
1495
1488
|
dialog: e
|
|
1496
|
-
} =
|
|
1489
|
+
} = $t(["dialog"]);
|
|
1497
1490
|
ge = {
|
|
1498
1491
|
dialog: e
|
|
1499
1492
|
};
|
|
1500
1493
|
}
|
|
1501
1494
|
return H = ge.dialog, H;
|
|
1502
1495
|
}
|
|
1503
|
-
function
|
|
1496
|
+
function tt({
|
|
1504
1497
|
title: e = "",
|
|
1505
1498
|
noTitle: l = !1,
|
|
1506
1499
|
titleFull: t = null,
|
|
@@ -1508,16 +1501,16 @@ function Je({
|
|
|
1508
1501
|
mode: u = "add",
|
|
1509
1502
|
modeEnum: i = {},
|
|
1510
1503
|
labelField: n = "label",
|
|
1511
|
-
isNo:
|
|
1504
|
+
isNo: y = !0,
|
|
1512
1505
|
formProps: o = {},
|
|
1513
1506
|
interfaceFn: s = null,
|
|
1514
1507
|
interfaceFnCancel: g = null,
|
|
1515
1508
|
valueData: w,
|
|
1516
|
-
read:
|
|
1517
|
-
isRead:
|
|
1518
|
-
action:
|
|
1519
|
-
contentStyle:
|
|
1520
|
-
actionProps:
|
|
1509
|
+
read: b,
|
|
1510
|
+
isRead: O,
|
|
1511
|
+
action: m = null,
|
|
1512
|
+
contentStyle: N = {},
|
|
1513
|
+
actionProps: S = {}
|
|
1521
1514
|
} = {
|
|
1522
1515
|
title: "自定义弹窗",
|
|
1523
1516
|
noTitle: !1,
|
|
@@ -1527,8 +1520,8 @@ function Je({
|
|
|
1527
1520
|
isRead: !1,
|
|
1528
1521
|
valueData: {}
|
|
1529
1522
|
}, r = null) {
|
|
1530
|
-
var
|
|
1531
|
-
const
|
|
1523
|
+
var Ne, Se;
|
|
1524
|
+
const _ = Al(), h = {
|
|
1532
1525
|
none: {
|
|
1533
1526
|
sub: "",
|
|
1534
1527
|
read: !1
|
|
@@ -1566,7 +1559,7 @@ function Je({
|
|
|
1566
1559
|
read: !1
|
|
1567
1560
|
},
|
|
1568
1561
|
...i
|
|
1569
|
-
}, x = P(),
|
|
1562
|
+
}, x = P(), p = ht([]), d = P({
|
|
1570
1563
|
...w
|
|
1571
1564
|
}), C = {
|
|
1572
1565
|
justify: "end",
|
|
@@ -1583,138 +1576,141 @@ function Je({
|
|
|
1583
1576
|
ghost: !0
|
|
1584
1577
|
},
|
|
1585
1578
|
onClick: ({
|
|
1586
|
-
cancel:
|
|
1579
|
+
cancel: I
|
|
1587
1580
|
}) => {
|
|
1588
|
-
g ? g(
|
|
1589
|
-
close:
|
|
1590
|
-
}) :
|
|
1581
|
+
g ? g(c(d), {
|
|
1582
|
+
close: I
|
|
1583
|
+
}) : I();
|
|
1591
1584
|
}
|
|
1592
1585
|
}, {
|
|
1593
1586
|
label: "确定",
|
|
1594
1587
|
valid: !0,
|
|
1595
1588
|
onClick: async ({
|
|
1596
|
-
cancel:
|
|
1597
|
-
hideLoading:
|
|
1598
|
-
}) => s ? await s(
|
|
1599
|
-
close:
|
|
1600
|
-
hideLoading:
|
|
1601
|
-
}) :
|
|
1589
|
+
cancel: I,
|
|
1590
|
+
hideLoading: A
|
|
1591
|
+
}) => s ? await s(c(d), {
|
|
1592
|
+
close: I,
|
|
1593
|
+
hideLoading: A
|
|
1594
|
+
}) : I()
|
|
1602
1595
|
}];
|
|
1603
|
-
(Array.isArray(
|
|
1604
|
-
|
|
1596
|
+
(Array.isArray(m) ? m : E).forEach((I, A) => {
|
|
1597
|
+
p[A] = !1;
|
|
1605
1598
|
});
|
|
1606
1599
|
const R = typeof t == "function" ? () => {
|
|
1607
|
-
var
|
|
1608
|
-
return t(((
|
|
1600
|
+
var I;
|
|
1601
|
+
return t(((I = h[u]) == null ? void 0 : I.sub) || "");
|
|
1609
1602
|
} : t, D = P();
|
|
1610
1603
|
function F() {
|
|
1611
|
-
var
|
|
1612
|
-
console.log("取消",
|
|
1604
|
+
var I;
|
|
1605
|
+
console.log("取消", d.value), (I = D.value) == null || I.destroy();
|
|
1613
1606
|
}
|
|
1614
|
-
async function G(
|
|
1615
|
-
var
|
|
1616
|
-
console.log("开启验证"), await ((
|
|
1607
|
+
async function G(I = []) {
|
|
1608
|
+
var A;
|
|
1609
|
+
console.log("开启验证"), await ((A = x.value) == null ? void 0 : A.valid());
|
|
1617
1610
|
}
|
|
1618
|
-
async function
|
|
1619
|
-
return
|
|
1611
|
+
async function v(I) {
|
|
1612
|
+
return I && I();
|
|
1620
1613
|
}
|
|
1621
|
-
const ie =
|
|
1614
|
+
const ie = b ?? O ? null : typeof m == "function" ? () => m({
|
|
1622
1615
|
formRef: x,
|
|
1623
|
-
data:
|
|
1616
|
+
data: c(d),
|
|
1624
1617
|
d: D.value,
|
|
1625
1618
|
close: F
|
|
1626
1619
|
}) : () => {
|
|
1627
|
-
let
|
|
1628
|
-
return f(
|
|
1620
|
+
let I;
|
|
1621
|
+
return f(k, M(C, S, {
|
|
1629
1622
|
style: {
|
|
1630
1623
|
...C == null ? void 0 : C.style,
|
|
1631
|
-
...(
|
|
1624
|
+
...(S == null ? void 0 : S.style) || {}
|
|
1632
1625
|
}
|
|
1633
|
-
}),
|
|
1634
|
-
var
|
|
1635
|
-
return
|
|
1626
|
+
}), Cl(I = (Array.isArray(m) ? m : E).map((A, fe) => {
|
|
1627
|
+
var Ie;
|
|
1628
|
+
return A != null && A.render ? (Ie = A == null ? void 0 : A.render) == null ? void 0 : Ie.call(A) : f(z, M({
|
|
1636
1629
|
type: "primary",
|
|
1637
|
-
ghost:
|
|
1638
|
-
}, (
|
|
1630
|
+
ghost: A.mode === "cancel"
|
|
1631
|
+
}, (A == null ? void 0 : A.props) || {}, (S == null ? void 0 : S.buttonProps) || {}, {
|
|
1639
1632
|
style: {
|
|
1640
1633
|
...U,
|
|
1641
|
-
...(
|
|
1634
|
+
...(A == null ? void 0 : A.style) || {}
|
|
1642
1635
|
},
|
|
1643
|
-
loading:
|
|
1636
|
+
loading: p[fe],
|
|
1644
1637
|
onClick: async () => {
|
|
1645
|
-
var
|
|
1646
|
-
if (
|
|
1647
|
-
(
|
|
1638
|
+
var Me, Fe;
|
|
1639
|
+
if (A.mode === "cancel")
|
|
1640
|
+
(Me = D.value) == null || Me.destroy();
|
|
1648
1641
|
else {
|
|
1649
|
-
const ce = () =>
|
|
1650
|
-
|
|
1642
|
+
const ce = () => p[fe] = !0, Ue = () => p[fe] = !1;
|
|
1643
|
+
A != null && A.loading && ce();
|
|
1651
1644
|
try {
|
|
1652
|
-
console.log("model",
|
|
1653
|
-
model:
|
|
1654
|
-
comfirm:
|
|
1645
|
+
console.log("model", c(d)), A != null && A.valid && await G(), console.log(A == null ? void 0 : A.valid), (A != null && A.valid || A != null && A.loading) && ce(), await ((Fe = A == null ? void 0 : A.onClick) == null ? void 0 : Fe.call(A, {
|
|
1646
|
+
model: c(d),
|
|
1647
|
+
comfirm: v,
|
|
1655
1648
|
cancel: F,
|
|
1656
1649
|
validate: G,
|
|
1657
1650
|
showLoading: ce,
|
|
1658
|
-
hideLoading:
|
|
1651
|
+
hideLoading: Ue
|
|
1659
1652
|
}));
|
|
1660
|
-
} catch (
|
|
1661
|
-
console.log(
|
|
1653
|
+
} catch (it) {
|
|
1654
|
+
console.log(it);
|
|
1662
1655
|
} finally {
|
|
1663
|
-
(
|
|
1656
|
+
(A != null && A.valid || A != null && A.loading) && Ue();
|
|
1664
1657
|
}
|
|
1665
1658
|
}
|
|
1666
1659
|
}
|
|
1667
1660
|
}), {
|
|
1668
|
-
default: () => [
|
|
1661
|
+
default: () => [A.label || ""]
|
|
1669
1662
|
});
|
|
1670
|
-
})) ?
|
|
1671
|
-
default: () => [
|
|
1663
|
+
})) ? I : {
|
|
1664
|
+
default: () => [I]
|
|
1672
1665
|
});
|
|
1673
|
-
}, se =
|
|
1666
|
+
}, se = ((Ne = Je()) == null ? void 0 : Ne.defaultOption) || {}, rt = {
|
|
1667
|
+
...wl,
|
|
1668
|
+
...se
|
|
1669
|
+
}, ot = _.create({
|
|
1674
1670
|
type: "info",
|
|
1675
|
-
...
|
|
1671
|
+
...rt,
|
|
1676
1672
|
...l ? {} : {
|
|
1677
|
-
title: R || (((
|
|
1673
|
+
title: R || (((Se = h[u]) == null ? void 0 : Se.sub) ?? "") + e
|
|
1678
1674
|
},
|
|
1679
1675
|
style: {
|
|
1680
1676
|
width: "500px"
|
|
1681
1677
|
},
|
|
1682
|
-
content: () => f(
|
|
1683
|
-
ref: (
|
|
1684
|
-
x.value =
|
|
1678
|
+
content: () => f(et, {
|
|
1679
|
+
ref: (I) => {
|
|
1680
|
+
x.value = I;
|
|
1685
1681
|
},
|
|
1686
1682
|
options: a,
|
|
1687
|
-
value:
|
|
1688
|
-
"onUpdate:value": (
|
|
1689
|
-
isNo:
|
|
1690
|
-
read:
|
|
1683
|
+
value: c(d),
|
|
1684
|
+
"onUpdate:value": (I) => d.value = I,
|
|
1685
|
+
isNo: y,
|
|
1686
|
+
read: b ?? O,
|
|
1691
1687
|
labelField: n,
|
|
1692
1688
|
formProps: o,
|
|
1693
|
-
contentStyle:
|
|
1689
|
+
contentStyle: N,
|
|
1694
1690
|
dialog: !0
|
|
1695
1691
|
}, null),
|
|
1696
1692
|
action: ie,
|
|
1697
1693
|
// ...readButton.value,
|
|
1698
1694
|
...r,
|
|
1699
|
-
class: `core-dialog ${
|
|
1695
|
+
class: `core-dialog ${b ?? O ? "core-dialog-read" : ""} ${(r == null ? void 0 : r.class) || ""}`
|
|
1700
1696
|
});
|
|
1701
|
-
return D.value =
|
|
1697
|
+
return D.value = ot, {
|
|
1702
1698
|
cancel: F,
|
|
1703
|
-
setValue: (
|
|
1704
|
-
...
|
|
1705
|
-
...
|
|
1699
|
+
setValue: (I, A) => A ? d.value[A] = I : d.value = {
|
|
1700
|
+
...d.value,
|
|
1701
|
+
...I
|
|
1706
1702
|
},
|
|
1707
|
-
model:
|
|
1708
|
-
modeEnum:
|
|
1703
|
+
model: c(d),
|
|
1704
|
+
modeEnum: h
|
|
1709
1705
|
};
|
|
1710
1706
|
}
|
|
1711
|
-
function
|
|
1712
|
-
const e =
|
|
1713
|
-
return
|
|
1707
|
+
function Kl() {
|
|
1708
|
+
const e = _e();
|
|
1709
|
+
return Qe(e), (l, t) => tt(l, t);
|
|
1714
1710
|
}
|
|
1715
1711
|
const _l = {
|
|
1716
1712
|
class: "flex-1"
|
|
1717
|
-
},
|
|
1713
|
+
}, Dl = /* @__PURE__ */ j({
|
|
1718
1714
|
__name: "CommonQuery",
|
|
1719
1715
|
props: /* @__PURE__ */ xe({
|
|
1720
1716
|
query: {
|
|
@@ -1758,68 +1754,68 @@ const _l = {
|
|
|
1758
1754
|
setup(e, {
|
|
1759
1755
|
emit: l
|
|
1760
1756
|
}) {
|
|
1761
|
-
var
|
|
1762
|
-
const t =
|
|
1763
|
-
(
|
|
1764
|
-
function a(
|
|
1765
|
-
let
|
|
1766
|
-
return function(...
|
|
1767
|
-
clearTimeout(
|
|
1768
|
-
|
|
1757
|
+
var _;
|
|
1758
|
+
const t = ue();
|
|
1759
|
+
(_ = t == null ? void 0 : t.appContext) != null && _.app && Z(t.appContext.app);
|
|
1760
|
+
function a(h, x) {
|
|
1761
|
+
let p;
|
|
1762
|
+
return function(...d) {
|
|
1763
|
+
clearTimeout(p), p = setTimeout(() => {
|
|
1764
|
+
h.apply(this, d);
|
|
1769
1765
|
}, x);
|
|
1770
1766
|
};
|
|
1771
1767
|
}
|
|
1772
1768
|
const u = l, i = e;
|
|
1773
|
-
function n(
|
|
1774
|
-
return
|
|
1769
|
+
function n(h) {
|
|
1770
|
+
return h.map((x) => ({
|
|
1775
1771
|
...x,
|
|
1776
1772
|
props: {
|
|
1777
1773
|
...x.props,
|
|
1778
1774
|
...!x.way || x.way === "input" ? {
|
|
1779
|
-
onUpdateValue: (...
|
|
1780
|
-
var
|
|
1781
|
-
(C = (
|
|
1775
|
+
onUpdateValue: (...p) => {
|
|
1776
|
+
var d, C;
|
|
1777
|
+
(C = (d = x.props) == null ? void 0 : d.onUpdateValue) == null || C.call(d, ...p), y();
|
|
1782
1778
|
}
|
|
1783
1779
|
} : {},
|
|
1784
1780
|
...(x == null ? void 0 : x.way) === "select" ? {
|
|
1785
|
-
onUpdateValue: (...
|
|
1786
|
-
var
|
|
1787
|
-
(C = (
|
|
1781
|
+
onUpdateValue: (...p) => {
|
|
1782
|
+
var d, C;
|
|
1783
|
+
(C = (d = x.props) == null ? void 0 : d.onUpdateValue) == null || C.call(d, ...p), y();
|
|
1788
1784
|
}
|
|
1789
1785
|
} : {}
|
|
1790
1786
|
}
|
|
1791
1787
|
}));
|
|
1792
1788
|
}
|
|
1793
|
-
const
|
|
1789
|
+
const y = a(() => {
|
|
1794
1790
|
u("submit");
|
|
1795
1791
|
}, 500);
|
|
1796
1792
|
function o() {
|
|
1797
|
-
|
|
1793
|
+
y();
|
|
1798
1794
|
}
|
|
1799
|
-
const s = P(!1), g =
|
|
1795
|
+
const s = P(!1), g = ze(e, "query"), w = {
|
|
1800
1796
|
style: {
|
|
1801
1797
|
width: "33%"
|
|
1802
1798
|
}
|
|
1803
|
-
},
|
|
1804
|
-
var
|
|
1805
|
-
return (
|
|
1799
|
+
}, b = Y(() => {
|
|
1800
|
+
var h;
|
|
1801
|
+
return (h = i.options) == null ? void 0 : h.map((x) => (x == null ? void 0 : x.way) || "input");
|
|
1806
1802
|
});
|
|
1807
|
-
|
|
1808
|
-
const
|
|
1809
|
-
var
|
|
1803
|
+
Ze(b.value);
|
|
1804
|
+
const O = Y(() => {
|
|
1805
|
+
var h;
|
|
1810
1806
|
try {
|
|
1811
1807
|
const x = [];
|
|
1812
|
-
for (let
|
|
1813
|
-
const
|
|
1814
|
-
if (
|
|
1808
|
+
for (let p = 0; p < (((h = i.options) == null ? void 0 : h.length) || 0); p++) {
|
|
1809
|
+
const d = i.options[p];
|
|
1810
|
+
if (d != null && d.enum && !(d != null && d.options) && (d.options = Ge(d.enum)), d != null && d.props || (d.props = {
|
|
1815
1811
|
size: i.size
|
|
1816
|
-
}), !(
|
|
1817
|
-
|
|
1812
|
+
}), !(d != null && d.formItemProps))
|
|
1813
|
+
d.formItemProps = {
|
|
1818
1814
|
...w
|
|
1819
1815
|
};
|
|
1820
1816
|
else {
|
|
1821
|
-
const U = typeof
|
|
1822
|
-
|
|
1817
|
+
const U = typeof d.formItemProps == "function" ? d.formItemProps({}, {}) : d.formItemProps;
|
|
1818
|
+
d.formItemProps = {
|
|
1823
1819
|
...w,
|
|
1824
1820
|
...U,
|
|
1825
1821
|
style: {
|
|
@@ -1828,10 +1824,10 @@ const _l = {
|
|
|
1828
1824
|
}
|
|
1829
1825
|
};
|
|
1830
1826
|
}
|
|
1831
|
-
const C = (
|
|
1827
|
+
const C = (d == null ? void 0 : d.key) || (d == null ? void 0 : d.value);
|
|
1832
1828
|
if (!C) throw new Error("key no set");
|
|
1833
1829
|
x.push({
|
|
1834
|
-
...
|
|
1830
|
+
...d,
|
|
1835
1831
|
key: C
|
|
1836
1832
|
});
|
|
1837
1833
|
}
|
|
@@ -1839,76 +1835,76 @@ const _l = {
|
|
|
1839
1835
|
} catch (x) {
|
|
1840
1836
|
return console.warn("error", x), [];
|
|
1841
1837
|
}
|
|
1842
|
-
}),
|
|
1838
|
+
}), m = {
|
|
1843
1839
|
style: {
|
|
1844
1840
|
borderRadius: "3px"
|
|
1845
1841
|
}
|
|
1846
|
-
},
|
|
1847
|
-
search: () => f(z,
|
|
1842
|
+
}, N = {
|
|
1843
|
+
search: () => f(z, M({
|
|
1848
1844
|
type: i.type,
|
|
1849
1845
|
loading: s.value,
|
|
1850
1846
|
"default-props": {
|
|
1851
1847
|
attrType: "submit"
|
|
1852
1848
|
},
|
|
1853
1849
|
onClick: () => o()
|
|
1854
|
-
},
|
|
1850
|
+
}, m), {
|
|
1855
1851
|
default: () => "搜索",
|
|
1856
|
-
icon: () => f(
|
|
1852
|
+
icon: () => f(zt, null, null)
|
|
1857
1853
|
}),
|
|
1858
|
-
reset: () => f(z,
|
|
1854
|
+
reset: () => f(z, M({
|
|
1859
1855
|
type: "default",
|
|
1860
1856
|
onClick: () => {
|
|
1861
|
-
|
|
1857
|
+
S();
|
|
1862
1858
|
}
|
|
1863
|
-
},
|
|
1859
|
+
}, m), {
|
|
1864
1860
|
default: () => "重置",
|
|
1865
|
-
icon: () => f(
|
|
1861
|
+
icon: () => f(Vt, null, null)
|
|
1866
1862
|
})
|
|
1867
1863
|
};
|
|
1868
|
-
function
|
|
1869
|
-
var
|
|
1870
|
-
(
|
|
1871
|
-
const
|
|
1872
|
-
|
|
1864
|
+
function S() {
|
|
1865
|
+
var h;
|
|
1866
|
+
(h = i.options) == null || h.forEach((x) => {
|
|
1867
|
+
const p = (x == null ? void 0 : x.key) || (x == null ? void 0 : x.value);
|
|
1868
|
+
p && (x != null && x.queryType ? (g.value[x.queryType] || (g.value[x.queryType] = {}), g.value[x.queryType][p] = null) : g.value[p] = null);
|
|
1873
1869
|
}), u("reset");
|
|
1874
1870
|
}
|
|
1875
|
-
function r(
|
|
1876
|
-
|
|
1871
|
+
function r(h) {
|
|
1872
|
+
h.key === "Enter" && o();
|
|
1877
1873
|
}
|
|
1878
1874
|
return ke(() => {
|
|
1879
1875
|
document.addEventListener("keydown", r);
|
|
1880
|
-
}),
|
|
1876
|
+
}), pt(() => {
|
|
1881
1877
|
document.removeEventListener("keydown", r);
|
|
1882
|
-
}), (
|
|
1878
|
+
}), (h, x) => (B(), K(c(k), {
|
|
1883
1879
|
"wrap-item": !1,
|
|
1884
1880
|
justify: "space-between",
|
|
1885
1881
|
align: "center",
|
|
1886
1882
|
wrap: !1
|
|
1887
1883
|
}, {
|
|
1888
|
-
default:
|
|
1884
|
+
default: L(() => [Ae("div", _l, [f(et, {
|
|
1889
1885
|
value: g.value,
|
|
1890
|
-
"onUpdate:value": x[0] || (x[0] = (
|
|
1891
|
-
options:
|
|
1886
|
+
"onUpdate:value": x[0] || (x[0] = (p) => g.value = p),
|
|
1887
|
+
options: O.value,
|
|
1892
1888
|
"form-props": {
|
|
1893
1889
|
showFeedback: !1
|
|
1894
1890
|
}
|
|
1895
|
-
}, null, 8, ["value", "options"])]), i.noButton ?
|
|
1891
|
+
}, null, 8, ["value", "options"])]), i.noButton ? bt("", !0) : (B(), K(c(k), {
|
|
1896
1892
|
key: 0,
|
|
1897
1893
|
align: "center",
|
|
1898
1894
|
wrap: !1
|
|
1899
1895
|
}, {
|
|
1900
|
-
default:
|
|
1896
|
+
default: L(() => [be(h.$slots, "left-btn", {}, void 0, !0), (B(!0), le(ae, null, he(i.btn, (p, d) => {
|
|
1901
1897
|
var C;
|
|
1902
|
-
return B(), K(
|
|
1903
|
-
key:
|
|
1898
|
+
return B(), K(xt((C = N == null ? void 0 : N[p]) == null ? void 0 : C.call(N)), {
|
|
1899
|
+
key: d
|
|
1904
1900
|
});
|
|
1905
|
-
}), 128)), be(
|
|
1901
|
+
}), 128)), be(h.$slots, "right-btn", {}, void 0, !0)]),
|
|
1906
1902
|
_: 3
|
|
1907
1903
|
}))]),
|
|
1908
1904
|
_: 3
|
|
1909
1905
|
}));
|
|
1910
1906
|
}
|
|
1911
|
-
}),
|
|
1907
|
+
}), jl = /* @__PURE__ */ re(Dl, [["__scopeId", "data-v-e03318bb"]]), lt = /* @__PURE__ */ j(({
|
|
1912
1908
|
action: e,
|
|
1913
1909
|
row: l,
|
|
1914
1910
|
index: t
|
|
@@ -1918,10 +1914,10 @@ const _l = {
|
|
|
1918
1914
|
disabled: u,
|
|
1919
1915
|
type: i = "primary",
|
|
1920
1916
|
loading: n = !1,
|
|
1921
|
-
label:
|
|
1917
|
+
label: y = null,
|
|
1922
1918
|
...o
|
|
1923
1919
|
} = e || {}, s = P(!1);
|
|
1924
|
-
return () => f(z,
|
|
1920
|
+
return () => f(z, M({
|
|
1925
1921
|
text: !0,
|
|
1926
1922
|
onClick: async () => {
|
|
1927
1923
|
if (a)
|
|
@@ -1935,7 +1931,7 @@ const _l = {
|
|
|
1935
1931
|
loading: s.value,
|
|
1936
1932
|
type: typeof u == "function" && u(l) ? "default" : i
|
|
1937
1933
|
}, o), {
|
|
1938
|
-
default: () => [typeof
|
|
1934
|
+
default: () => [typeof y == "function" ? y == null ? void 0 : y(l) : y]
|
|
1939
1935
|
});
|
|
1940
1936
|
}, {
|
|
1941
1937
|
props: {
|
|
@@ -1952,7 +1948,7 @@ const _l = {
|
|
|
1952
1948
|
default: 0
|
|
1953
1949
|
}
|
|
1954
1950
|
}
|
|
1955
|
-
}),
|
|
1951
|
+
}), nt = /* @__PURE__ */ j(({
|
|
1956
1952
|
onClick: e,
|
|
1957
1953
|
row: l,
|
|
1958
1954
|
index: t,
|
|
@@ -1961,7 +1957,7 @@ const _l = {
|
|
|
1961
1957
|
slots: u
|
|
1962
1958
|
}) => {
|
|
1963
1959
|
const i = P(!1);
|
|
1964
|
-
return () => f(
|
|
1960
|
+
return () => f(Tt, {
|
|
1965
1961
|
"positive-button-props": {
|
|
1966
1962
|
type: "warning",
|
|
1967
1963
|
loading: i.value
|
|
@@ -2002,48 +1998,48 @@ const _l = {
|
|
|
2002
1998
|
}
|
|
2003
1999
|
}
|
|
2004
2000
|
});
|
|
2005
|
-
function
|
|
2006
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2001
|
+
function ve(e) {
|
|
2002
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !te(e);
|
|
2007
2003
|
}
|
|
2008
|
-
const
|
|
2004
|
+
const Nl = /* @__PURE__ */ j((e) => {
|
|
2009
2005
|
const l = e.options.length, t = P(!1), a = Y(() => e.options.slice(0, t.value ? l : e.max)), u = Y(() => e.options.slice(e.max));
|
|
2010
2006
|
function i(n) {
|
|
2011
2007
|
return n == null ? void 0 : n.map(({
|
|
2012
|
-
isRender:
|
|
2008
|
+
isRender: y = () => !0,
|
|
2013
2009
|
onClick: o = null,
|
|
2014
2010
|
mode: s = null,
|
|
2015
2011
|
disabled: g = !1,
|
|
2016
2012
|
type: w = "primary",
|
|
2017
|
-
...
|
|
2018
|
-
},
|
|
2013
|
+
...b
|
|
2014
|
+
}, O) => (typeof y == "function" ? y(e.data) : y) ? s === "pop" ? f(nt, {
|
|
2019
2015
|
onClick: o,
|
|
2020
2016
|
row: e.data,
|
|
2021
2017
|
index: e.index,
|
|
2022
|
-
action:
|
|
2023
|
-
key:
|
|
2018
|
+
action: b,
|
|
2019
|
+
key: ne(e.data, e.index) + O
|
|
2024
2020
|
}, {
|
|
2025
|
-
default: () => [f(z,
|
|
2021
|
+
default: () => [f(z, M({
|
|
2026
2022
|
text: !0,
|
|
2027
2023
|
disabled: typeof g == "function" ? g(e.data) : g,
|
|
2028
2024
|
type: typeof g == "function" && g(e.data) ? "default" : w
|
|
2029
|
-
},
|
|
2030
|
-
default: () => [typeof (
|
|
2025
|
+
}, b), {
|
|
2026
|
+
default: () => [typeof (b == null ? void 0 : b.label) == "function" ? b == null ? void 0 : b.label(e.data) : b == null ? void 0 : b.label]
|
|
2031
2027
|
})]
|
|
2032
|
-
}) : f(
|
|
2028
|
+
}) : f(lt, {
|
|
2033
2029
|
row: e.data,
|
|
2034
2030
|
action: {
|
|
2035
|
-
...
|
|
2031
|
+
...b,
|
|
2036
2032
|
disabled: g,
|
|
2037
2033
|
onClick: o,
|
|
2038
2034
|
type: w
|
|
2039
2035
|
},
|
|
2040
2036
|
index: e.index,
|
|
2041
|
-
key:
|
|
2042
|
-
}, null) : void 0).filter((
|
|
2037
|
+
key: ne(e.data, e.index) + O
|
|
2038
|
+
}, null) : void 0).filter((y) => y !== void 0);
|
|
2043
2039
|
}
|
|
2044
2040
|
return () => {
|
|
2045
2041
|
let n;
|
|
2046
|
-
return f(
|
|
2042
|
+
return f(k, {
|
|
2047
2043
|
style: {
|
|
2048
2044
|
width: "100%"
|
|
2049
2045
|
},
|
|
@@ -2051,31 +2047,31 @@ const Ol = /* @__PURE__ */ j((e) => {
|
|
|
2051
2047
|
justify: "center",
|
|
2052
2048
|
align: "center"
|
|
2053
2049
|
}, {
|
|
2054
|
-
default: () => [f(
|
|
2050
|
+
default: () => [f(k, {
|
|
2055
2051
|
"wrap-item": !1,
|
|
2056
2052
|
align: "center"
|
|
2057
|
-
},
|
|
2053
|
+
}, ve(n = i(a.value)) ? n : {
|
|
2058
2054
|
default: () => [n]
|
|
2059
|
-
}), f(
|
|
2055
|
+
}), f(Bt, {
|
|
2060
2056
|
trigger: "click"
|
|
2061
2057
|
}, {
|
|
2062
2058
|
trigger: () => f(z, {
|
|
2063
2059
|
text: !0,
|
|
2064
2060
|
type: "info"
|
|
2065
2061
|
}, {
|
|
2066
|
-
default: () => [
|
|
2062
|
+
default: () => [X("更多")]
|
|
2067
2063
|
}),
|
|
2068
2064
|
default: () => {
|
|
2069
|
-
let
|
|
2070
|
-
return f(
|
|
2065
|
+
let y;
|
|
2066
|
+
return f(k, {
|
|
2071
2067
|
"wrap-item": !1,
|
|
2072
2068
|
align: "center",
|
|
2073
2069
|
style: {
|
|
2074
2070
|
width: "250px",
|
|
2075
2071
|
padding: "5px"
|
|
2076
2072
|
}
|
|
2077
|
-
},
|
|
2078
|
-
default: () => [
|
|
2073
|
+
}, ve(y = i(u.value)) ? y : {
|
|
2074
|
+
default: () => [y]
|
|
2079
2075
|
});
|
|
2080
2076
|
}
|
|
2081
2077
|
})]
|
|
@@ -2102,13 +2098,13 @@ const Ol = /* @__PURE__ */ j((e) => {
|
|
|
2102
2098
|
}
|
|
2103
2099
|
}
|
|
2104
2100
|
});
|
|
2105
|
-
function
|
|
2101
|
+
function Sl() {
|
|
2106
2102
|
var l;
|
|
2107
|
-
const e =
|
|
2103
|
+
const e = nl();
|
|
2108
2104
|
if (e)
|
|
2109
2105
|
return e;
|
|
2110
2106
|
try {
|
|
2111
|
-
const t =
|
|
2107
|
+
const t = ue();
|
|
2112
2108
|
if ((l = t == null ? void 0 : t.appContext) != null && l.app)
|
|
2113
2109
|
return null;
|
|
2114
2110
|
} catch {
|
|
@@ -2116,7 +2112,7 @@ function Al() {
|
|
|
2116
2112
|
return null;
|
|
2117
2113
|
}
|
|
2118
2114
|
function Q(e = {}, l = null) {
|
|
2119
|
-
const t =
|
|
2115
|
+
const t = Je();
|
|
2120
2116
|
return !t.inheritTheme && t.themeOverrides ? {
|
|
2121
2117
|
...e,
|
|
2122
2118
|
themeOverrides: {
|
|
@@ -2125,13 +2121,13 @@ function Q(e = {}, l = null) {
|
|
|
2125
2121
|
}
|
|
2126
2122
|
} : e;
|
|
2127
2123
|
}
|
|
2128
|
-
function
|
|
2124
|
+
function Gl(e, l = {}) {
|
|
2129
2125
|
if (!e)
|
|
2130
2126
|
throw new Error("dialogInstance 是必需的。请在组件中使用 useDialog() 获取实例,然后传递给此函数。");
|
|
2131
2127
|
const t = Q(l, e);
|
|
2132
2128
|
return e.create(t);
|
|
2133
2129
|
}
|
|
2134
|
-
function
|
|
2130
|
+
function Jl(e) {
|
|
2135
2131
|
if (!e)
|
|
2136
2132
|
throw new Error("dialogInstance 是必需的。请在组件中使用 useDialog() 获取实例。");
|
|
2137
2133
|
return {
|
|
@@ -2157,11 +2153,11 @@ function Hl(e) {
|
|
|
2157
2153
|
}
|
|
2158
2154
|
};
|
|
2159
2155
|
}
|
|
2160
|
-
function
|
|
2161
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2156
|
+
function Il(e) {
|
|
2157
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !te(e);
|
|
2162
2158
|
}
|
|
2163
|
-
const
|
|
2164
|
-
function
|
|
2159
|
+
const ne = (e, l) => e ? JSON.stringify(e) : String(l);
|
|
2160
|
+
function Ql(e, l = null, t) {
|
|
2165
2161
|
const a = {
|
|
2166
2162
|
max: 4,
|
|
2167
2163
|
width: 80
|
|
@@ -2174,11 +2170,11 @@ function Kl(e, l = null, t) {
|
|
|
2174
2170
|
throw new TypeError("需要配置数组");
|
|
2175
2171
|
console.log("ddd");
|
|
2176
2172
|
let i = [], n = 0;
|
|
2177
|
-
const
|
|
2173
|
+
const y = [];
|
|
2178
2174
|
return Array.isArray(e) && (i = e, i.forEach((o, s) => {
|
|
2179
2175
|
var g, w;
|
|
2180
|
-
o.permission ?
|
|
2181
|
-
})), n = Math.max(80, n), n += 0, u && (n += 2),
|
|
2176
|
+
o.permission ? Ce(o.permission) && ((!t || typeof u == "object" && s < u.max) && (n += (typeof (o == null ? void 0 : o.label) == "string" ? (g = o == null ? void 0 : o.label) == null ? void 0 : g.length : 10) * 12 + 36), y.push(o)) : ((!t || typeof u == "object" && s < u.max) && (n += (typeof (o == null ? void 0 : o.label) == "string" ? (w = o == null ? void 0 : o.label) == null ? void 0 : w.length : 10) * 12 + 36), y.push(o));
|
|
2177
|
+
})), n = Math.max(80, n), n += 0, u && (n += 2), y.length ? {
|
|
2182
2178
|
title: "操作",
|
|
2183
2179
|
key: "opr",
|
|
2184
2180
|
fixed: "right",
|
|
@@ -2186,56 +2182,56 @@ function Kl(e, l = null, t) {
|
|
|
2186
2182
|
width: n,
|
|
2187
2183
|
...l,
|
|
2188
2184
|
render(o, s) {
|
|
2189
|
-
const g = u ? f(
|
|
2185
|
+
const g = u ? f(Nl, {
|
|
2190
2186
|
data: o,
|
|
2191
2187
|
index: s,
|
|
2192
2188
|
max: u.max,
|
|
2193
|
-
options:
|
|
2194
|
-
}, null) :
|
|
2189
|
+
options: y
|
|
2190
|
+
}, null) : y.map(({
|
|
2195
2191
|
isRender: w = () => !0,
|
|
2196
|
-
onClick:
|
|
2197
|
-
mode:
|
|
2198
|
-
disabled:
|
|
2199
|
-
type:
|
|
2200
|
-
...
|
|
2201
|
-
}, r) => (typeof w == "function" ? w(o) : w) ?
|
|
2202
|
-
onClick:
|
|
2192
|
+
onClick: b = null,
|
|
2193
|
+
mode: O = null,
|
|
2194
|
+
disabled: m = !1,
|
|
2195
|
+
type: N = "primary",
|
|
2196
|
+
...S
|
|
2197
|
+
}, r) => (typeof w == "function" ? w(o) : w) ? O === "pop" ? f(nt, {
|
|
2198
|
+
onClick: b,
|
|
2203
2199
|
row: o,
|
|
2204
2200
|
index: s,
|
|
2205
|
-
action:
|
|
2206
|
-
key:
|
|
2201
|
+
action: S,
|
|
2202
|
+
key: ne(o, s) + r
|
|
2207
2203
|
}, {
|
|
2208
|
-
default: () => [f(z,
|
|
2204
|
+
default: () => [f(z, M({
|
|
2209
2205
|
text: !0,
|
|
2210
|
-
disabled: typeof
|
|
2211
|
-
type: typeof
|
|
2212
|
-
},
|
|
2213
|
-
default: () => [typeof (
|
|
2206
|
+
disabled: typeof m == "function" ? m(o) : m,
|
|
2207
|
+
type: typeof m == "function" && m(o) ? "default" : N
|
|
2208
|
+
}, S), {
|
|
2209
|
+
default: () => [typeof (S == null ? void 0 : S.label) == "function" ? S == null ? void 0 : S.label(o) : S == null ? void 0 : S.label]
|
|
2214
2210
|
})]
|
|
2215
|
-
}) : f(
|
|
2211
|
+
}) : f(lt, {
|
|
2216
2212
|
row: o,
|
|
2217
2213
|
action: {
|
|
2218
|
-
...
|
|
2219
|
-
disabled:
|
|
2220
|
-
onClick:
|
|
2221
|
-
type:
|
|
2214
|
+
...S,
|
|
2215
|
+
disabled: m,
|
|
2216
|
+
onClick: b,
|
|
2217
|
+
type: N
|
|
2222
2218
|
},
|
|
2223
2219
|
index: s,
|
|
2224
|
-
key:
|
|
2220
|
+
key: ne(o, s) + r
|
|
2225
2221
|
}, null) : void 0).filter((w) => w !== void 0);
|
|
2226
|
-
return l != null && l.isRender ? l == null ? void 0 : l.render(o) : f(
|
|
2222
|
+
return l != null && l.isRender ? l == null ? void 0 : l.render(o) : f(k, {
|
|
2227
2223
|
align: "center",
|
|
2228
2224
|
"wrap-item": !1,
|
|
2229
2225
|
size: 18,
|
|
2230
|
-
key:
|
|
2231
|
-
},
|
|
2226
|
+
key: ne(o, s)
|
|
2227
|
+
}, Il(g) ? g : {
|
|
2232
2228
|
default: () => [g]
|
|
2233
2229
|
});
|
|
2234
2230
|
}
|
|
2235
2231
|
} : void 0;
|
|
2236
2232
|
}
|
|
2237
|
-
async function
|
|
2238
|
-
const t =
|
|
2233
|
+
async function Ml(e, l = null) {
|
|
2234
|
+
const t = Sl();
|
|
2239
2235
|
if (!t)
|
|
2240
2236
|
throw new Error("无法获取 dialog 实例。请使用 useQRCode hook 或在组件中通过 setupConfig 注册 dialog 实例。");
|
|
2241
2237
|
const a = P(null), u = P(!1), i = Q({
|
|
@@ -2247,12 +2243,12 @@ async function Nl(e, l = null) {
|
|
|
2247
2243
|
},
|
|
2248
2244
|
content: () => f("div", {
|
|
2249
2245
|
class: "qr-box"
|
|
2250
|
-
}, [u.value ? f(
|
|
2246
|
+
}, [u.value ? f(Yt, {
|
|
2251
2247
|
class: "qr-spin",
|
|
2252
2248
|
show: !0
|
|
2253
2249
|
}, null) : "", f("div", {
|
|
2254
2250
|
class: "qr-img"
|
|
2255
|
-
}, [f(
|
|
2251
|
+
}, [f(vt, {
|
|
2256
2252
|
src: a.value,
|
|
2257
2253
|
style: {
|
|
2258
2254
|
width: "100%"
|
|
@@ -2263,58 +2259,58 @@ async function Nl(e, l = null) {
|
|
|
2263
2259
|
}, t);
|
|
2264
2260
|
return t.info(i), l && (u.value = !0, a.value = await l(), u.value = !1), !0;
|
|
2265
2261
|
}
|
|
2266
|
-
function
|
|
2267
|
-
const e =
|
|
2268
|
-
return
|
|
2262
|
+
function Xl() {
|
|
2263
|
+
const e = _e();
|
|
2264
|
+
return Qe(e), (l, t) => Ml(l, t);
|
|
2269
2265
|
}
|
|
2270
|
-
function
|
|
2266
|
+
function Fl(e) {
|
|
2271
2267
|
var l, t;
|
|
2272
2268
|
if ((l = e == null ? void 0 : e.children) != null && l.length) {
|
|
2273
2269
|
const a = [];
|
|
2274
2270
|
e.children.forEach((u) => {
|
|
2275
|
-
var n,
|
|
2276
|
-
|
|
2271
|
+
var n, y, o, s;
|
|
2272
|
+
Fl(u);
|
|
2277
2273
|
let i = [];
|
|
2278
|
-
typeof ((n = u == null ? void 0 : u.meta) == null ? void 0 : n.permission) == "string" ? i = [u.meta.permission] : Array.isArray((
|
|
2274
|
+
typeof ((n = u == null ? void 0 : u.meta) == null ? void 0 : n.permission) == "string" ? i = [u.meta.permission] : Array.isArray((y = u.meta) == null ? void 0 : y.permission) ? i.push(...u.meta.permission) : typeof ((o = u.meta) == null ? void 0 : o.permission) == "object" ? i.push(...Ul(at(u.meta.permission))) : (s = u == null ? void 0 : u.meta) != null && s.permission || (i = null), u.meta.permission = i, a.push(...new Set(i));
|
|
2279
2275
|
}), (t = e == null ? void 0 : e.meta) != null && t.permission ? e.meta.permission = [...new Set(e.meta.permission.concat(a))] : e.meta.permission = a;
|
|
2280
2276
|
}
|
|
2281
2277
|
return e;
|
|
2282
2278
|
}
|
|
2283
|
-
function
|
|
2279
|
+
function Ul(...e) {
|
|
2284
2280
|
const l = e == null ? void 0 : e.map((t) => Array.isArray(t) ? t : t == null ? void 0 : t.ALL);
|
|
2285
2281
|
return [].concat(...l);
|
|
2286
2282
|
}
|
|
2287
|
-
function
|
|
2288
|
-
return e ? Object.keys(e).reduce((l, t) => (typeof e[t] != "string" ? l.concat(
|
|
2283
|
+
function at(e) {
|
|
2284
|
+
return e ? Object.keys(e).reduce((l, t) => (typeof e[t] != "string" ? l.concat(at(e[t])) : l.push(e[t]), l), []) : [];
|
|
2289
2285
|
}
|
|
2290
|
-
function
|
|
2286
|
+
function Zl(...e) {
|
|
2291
2287
|
return {
|
|
2292
|
-
...
|
|
2288
|
+
...ut("auth", e)
|
|
2293
2289
|
};
|
|
2294
2290
|
}
|
|
2295
|
-
function
|
|
2291
|
+
function en(...e) {
|
|
2296
2292
|
return {
|
|
2297
|
-
...
|
|
2293
|
+
...ut("api", e)
|
|
2298
2294
|
};
|
|
2299
2295
|
}
|
|
2300
|
-
function
|
|
2296
|
+
function tn(e, l = {}) {
|
|
2301
2297
|
const t = Object.keys(l);
|
|
2302
2298
|
return t.length && t.forEach((a) => {
|
|
2303
2299
|
const u = new RegExp(`${a}`, "g");
|
|
2304
2300
|
e = e == null ? void 0 : e.replace(u, l[a]);
|
|
2305
2301
|
}), e;
|
|
2306
2302
|
}
|
|
2307
|
-
function
|
|
2303
|
+
function ut(e, l) {
|
|
2308
2304
|
var n;
|
|
2309
|
-
const t =
|
|
2305
|
+
const t = je(), a = jt(), u = Le(((n = t == null ? void 0 : t.meta) == null ? void 0 : n[e]) ?? {}), i = De(l[0]);
|
|
2310
2306
|
return i != null && i.length && a.getRoutes().filter((o) => i.includes(o.name)).forEach((o) => {
|
|
2311
2307
|
var s;
|
|
2312
|
-
(s = o.meta) != null && s[e] && (u[o.name] =
|
|
2308
|
+
(s = o.meta) != null && s[e] && (u[o.name] = Le(o.meta[e]));
|
|
2313
2309
|
}), {
|
|
2314
2310
|
...u
|
|
2315
2311
|
};
|
|
2316
2312
|
}
|
|
2317
|
-
function
|
|
2313
|
+
function Le(e = {}) {
|
|
2318
2314
|
return Object.keys(e).reduce((l, t) => {
|
|
2319
2315
|
const a = e[t];
|
|
2320
2316
|
return typeof a == "object" ? l[t] = a == null ? void 0 : a.key : typeof a == "string" && (l[t] = String(a)), l;
|
|
@@ -2324,7 +2320,7 @@ const me = {
|
|
|
2324
2320
|
ascend: {
|
|
2325
2321
|
title: "升序",
|
|
2326
2322
|
value: !0,
|
|
2327
|
-
Icon: ye(
|
|
2323
|
+
Icon: ye(Kt),
|
|
2328
2324
|
fn: (e, l) => {
|
|
2329
2325
|
e.desc = !0, e.sortFieldName = l;
|
|
2330
2326
|
}
|
|
@@ -2332,7 +2328,7 @@ const me = {
|
|
|
2332
2328
|
descend: {
|
|
2333
2329
|
title: "降序",
|
|
2334
2330
|
value: !1,
|
|
2335
|
-
Icon: ye(
|
|
2331
|
+
Icon: ye(Ht),
|
|
2336
2332
|
fn: (e) => {
|
|
2337
2333
|
e.sortFieldName = "", e.desc = !0;
|
|
2338
2334
|
}
|
|
@@ -2340,7 +2336,7 @@ const me = {
|
|
|
2340
2336
|
false: {
|
|
2341
2337
|
title: "默认",
|
|
2342
2338
|
value: null,
|
|
2343
|
-
Icon: ye(
|
|
2339
|
+
Icon: ye(Wt, {
|
|
2344
2340
|
style: "transform:rotateZ(90deg)"
|
|
2345
2341
|
}),
|
|
2346
2342
|
fn: (e) => {
|
|
@@ -2348,59 +2344,60 @@ const me = {
|
|
|
2348
2344
|
}
|
|
2349
2345
|
}
|
|
2350
2346
|
};
|
|
2351
|
-
function
|
|
2352
|
-
|
|
2347
|
+
function Pl(e, l = {}) {
|
|
2348
|
+
Z(e);
|
|
2353
2349
|
}
|
|
2354
|
-
const
|
|
2355
|
-
install:
|
|
2350
|
+
const ln = {
|
|
2351
|
+
install: Pl
|
|
2356
2352
|
};
|
|
2357
2353
|
export {
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2354
|
+
Be as ArrayToObject,
|
|
2355
|
+
jl as CommonQuery,
|
|
2356
|
+
ln as CorePlugin,
|
|
2357
|
+
et as DataForm,
|
|
2358
|
+
ol as DataTable,
|
|
2359
|
+
Ge as ObjectToArray,
|
|
2360
|
+
lt as OprButton,
|
|
2361
|
+
xl as Options,
|
|
2362
|
+
nt as Pop,
|
|
2363
|
+
kl as autoRegisterDirectives,
|
|
2364
|
+
Fl as cellectChildenPermission,
|
|
2365
|
+
Ce as checkPermission,
|
|
2366
|
+
tt as commonDialogMethod,
|
|
2367
|
+
Ql as createActionColumnJsx,
|
|
2368
|
+
Gl as createDialog,
|
|
2369
|
+
Jl as createDialogMethods,
|
|
2374
2370
|
Q as createDialogOptions,
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2371
|
+
Ml as createQRCode,
|
|
2372
|
+
il as customUpload,
|
|
2373
|
+
$e as ellipsis,
|
|
2374
|
+
Wl as getAllOptions,
|
|
2375
|
+
tl as getBaseURL,
|
|
2376
|
+
vl as getConfig,
|
|
2377
|
+
Je as getDialogConfig,
|
|
2378
|
+
nl as getDialogInstance,
|
|
2383
2379
|
W as getFileUrl,
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2380
|
+
ul as getGlobalApp,
|
|
2381
|
+
Ll as getHasPermission,
|
|
2382
|
+
Ze as getOptions,
|
|
2383
|
+
ll as getUploadMethod,
|
|
2388
2384
|
$ as globalLabelField,
|
|
2389
2385
|
T as globalValueField,
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2386
|
+
tn as handleParams,
|
|
2387
|
+
un as initRouteMeta,
|
|
2388
|
+
Ol as initRules,
|
|
2389
|
+
Pl as install,
|
|
2394
2390
|
me as orderEnum,
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2391
|
+
al as permissionDirective,
|
|
2392
|
+
Qe as registerDialogInstance,
|
|
2393
|
+
Z as registerDirectives,
|
|
2394
|
+
Vl as registryUpload,
|
|
2395
|
+
el as setupConfig,
|
|
2396
|
+
zl as setupInitOptions,
|
|
2397
|
+
Hl as setupOptions,
|
|
2398
|
+
De as toArray,
|
|
2399
|
+
en as useApiConfig,
|
|
2400
|
+
Zl as useAuthPermission,
|
|
2401
|
+
Kl as useCommonDialog,
|
|
2402
|
+
Xl as useQRCode
|
|
2406
2403
|
};
|