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