@skyfox2000/webui 1.4.23 → 1.4.25
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/lib/components/content/index.d.ts +2 -0
- package/lib/components/content/toolbar/groupTools.vue.d.ts +27 -0
- package/lib/components/content/toolbar/index.d.ts +4 -0
- package/lib/components/index.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1013 -948
- package/package.json +1 -1
- package/src/components/content/index.ts +2 -0
- package/src/components/content/toolbar/groupTools.vue +115 -0
- package/src/components/content/toolbar/index.ts +11 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
package/lib/webui.es.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { u as Le, i as ce, a as Ue, L as
|
|
2
|
-
import { ad as
|
|
3
|
-
import { f as
|
|
4
|
-
import { A as
|
|
5
|
-
import { EnvConfig as Ae, isMicroApp as
|
|
6
|
-
import { FrontCache as ve, httpPost as Be, ResStatus as
|
|
1
|
+
import { u as Le, i as ce, a as Ue, L as kt, c as wt, P as ae, o as We, b as Ct, d as St, e as qe, g as He, r as ue, f as Qe, h as Ge, j as Je, k as $t, l as me, m as Xe, _ as Ze, n as et, O as Ne, p as Tt, q as tt, s as Dt, t as Ft, v as H, w as It, x as Pt, y as Et, z as Lt, A as Ut, B as Nt, C as le, D as Bt, E as zt, F as Mt, G as at, M as Ot } from "./assets/modules/upload-template-BuaWOXY_.js";
|
|
2
|
+
import { ad as gr, T as br, U as yr, Y as xr, ac as _r, aa as kr, ab as wr, ae as Cr, a0 as Sr, W as $r, a8 as Tr, a5 as Dr, R as Fr, a7 as Ir, X as Pr, I as Er, a2 as Lr, a6 as Ur, a9 as Nr, S as Br, V as zr, af as Mr, H as Or, a4 as Ar, ag as Rr, $ as Kr, a1 as jr, Z as Vr, al as Yr, ak as Wr, ah as qr, J as Hr, K as Qr, ai as Gr, Q as Jr, aj as Xr, N as Zr, a3 as es } from "./assets/modules/upload-template-BuaWOXY_.js";
|
|
3
|
+
import { f as At, p as Oe } from "./assets/modules/file-upload-CKMd0H11.js";
|
|
4
|
+
import { A as as, U as ls } from "./assets/modules/file-upload-CKMd0H11.js";
|
|
5
|
+
import { EnvConfig as Ae, isMicroApp as Rt } from "@skyfox2000/microbase";
|
|
6
|
+
import { FrontCache as ve, httpPost as Be, ResStatus as ze, SERVER_HOST as Kt, fieldMapping as he } from "@skyfox2000/fapi";
|
|
7
7
|
import G from "vue-m-message";
|
|
8
|
-
import { defineComponent as T, createBlock as b, openBlock as v, withModifiers as pe, unref as l, useAttrs as ne, withCtx as h, createElementVNode as
|
|
8
|
+
import { defineComponent as T, createBlock as b, openBlock as v, withModifiers as pe, unref as l, useAttrs as ne, withCtx as h, createElementVNode as F, createVNode as S, mergeProps as N, renderSlot as L, normalizeClass as E, toDisplayString as U, createCommentVNode as _, ref as y, provide as xe, watch as D, onMounted as X, createTextVNode as z, inject as ge, resolveDirective as re, withDirectives as q, computed as j, createElementBlock as x, normalizeStyle as Me, Fragment as P, renderList as R, resolveDynamicComponent as lt, onActivated as _e, createSlots as rt, useSlots as jt, shallowRef as Vt, onUnmounted as Yt, withKeys as Re } from "vue";
|
|
9
9
|
import "async-validator";
|
|
10
10
|
import Pe from "dayjs";
|
|
11
|
-
import { Popover as Wt, theme as
|
|
11
|
+
import { Popover as Wt, theme as st, Drawer as qt, Space as ie, Form as ot, message as Ht, FormItem as nt, ConfigProvider as be, Popconfirm as it, DropdownButton as ut, Menu as ke, MenuItem as we, Dropdown as Ee, Checkbox as Qt, List as Gt, ListItem as Jt, Card as Xt, Button as ct, Table as dt, Tree as Zt, Cascader as ea, DatePicker as ta, Input as de, InputPassword as aa, InputNumber as la, RangePicker as ra, Textarea as sa, TimePicker as oa, Transfer as na, TreeSelect as ia, Upload as ua, Image as ca, LayoutContent as da } from "ant-design-vue";
|
|
12
12
|
import { VueDraggableNext as pa } from "vue-draggable-next";
|
|
13
13
|
import { d as fa } from "./assets/modules/uploadList-De6KfTAV.js";
|
|
14
|
-
import { C as
|
|
15
|
-
import { c as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
14
|
+
import { C as ss, U as os, a as ns, p as is } from "./assets/modules/uploadList-De6KfTAV.js";
|
|
15
|
+
import { c as pt } from "./assets/modules/index-gmbMtZa2.js";
|
|
16
|
+
import { _ as cs, h as ds, b as ps, a as fs, d as vs, e as ms, g as hs, f as gs, n as bs, p as ys, t as xs, v as _s } from "./assets/modules/index-gmbMtZa2.js";
|
|
17
|
+
import { _ as Y } from "./assets/modules/index-BpsqYPCw.js";
|
|
18
18
|
import { _ as K } from "./assets/modules/toolIcon-DWurTPaB.js";
|
|
19
|
-
import { a as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
19
|
+
import { a as ws } from "./assets/modules/toolIcon-DWurTPaB.js";
|
|
20
|
+
import { _ as Ss, b as $s, c as Ts, d as Ds, e as Fs, I as Is, f as Ps, g as Es, a as Ls } from "./assets/modules/menuTabs-CvAiSVNW.js";
|
|
21
|
+
import { _ as Ns } from "./assets/modules/index-DvozNhVM.js";
|
|
22
22
|
import { _ as se } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
23
|
-
const Ke = (
|
|
23
|
+
const Ke = (s, a, e, t = "remove") => {
|
|
24
24
|
if (!e)
|
|
25
25
|
if (t === "disable") {
|
|
26
26
|
const o = a.component;
|
|
27
|
-
o ? o.props.disabled = !0 : (a.el,
|
|
27
|
+
o ? o.props.disabled = !0 : (a.el, s.setAttribute("disabled", "disabled"), s.disabled = !0), s.classList.add("disabled");
|
|
28
28
|
} else {
|
|
29
|
-
const o = document.createComment("No Permission"),
|
|
30
|
-
if (
|
|
29
|
+
const o = document.createComment("No Permission"), u = s.parentNode;
|
|
30
|
+
if (u) {
|
|
31
31
|
const i = a.component;
|
|
32
|
-
i ? i.props.style = { display: "none" } :
|
|
32
|
+
i ? i.props.style = { display: "none" } : u.replaceChild(o, s);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
}, je = (
|
|
35
|
+
}, je = (s) => {
|
|
36
36
|
var i, p;
|
|
37
|
-
const a = Le(), { url: e, role: t, permit: o } =
|
|
37
|
+
const a = Le(), { url: e, role: t, permit: o } = s;
|
|
38
38
|
if (ce(t) && ce(o))
|
|
39
39
|
return !0;
|
|
40
|
-
const
|
|
40
|
+
const u = e ?? ((p = (i = window.location.hash) == null ? void 0 : i.split("#")) == null ? void 0 : p[1]) ?? window.location.pathname;
|
|
41
41
|
if (Ae.VITE_PERMISSION_MODE === "role")
|
|
42
42
|
return ce(t) ? !0 : a.hasRole(t);
|
|
43
43
|
if (Ae.VITE_PERMISSION_MODE === "permit") {
|
|
44
|
-
let
|
|
45
|
-
return ce(t) || (
|
|
44
|
+
let n = !1, c = !1;
|
|
45
|
+
return ce(t) || (n = a.hasRole(t)), a.isAdmin() ? n : (ce(o) || (c = a.hasPermit(u, o)), n || c);
|
|
46
46
|
}
|
|
47
47
|
return !1;
|
|
48
48
|
}, va = {
|
|
49
|
-
mounted(
|
|
50
|
-
const t = a.value || {}, o = a.arg || "remove",
|
|
51
|
-
Ke(
|
|
49
|
+
mounted(s, a, e) {
|
|
50
|
+
const t = a.value || {}, o = a.arg || "remove", u = t.behavior || o, i = je(t);
|
|
51
|
+
Ke(s, e, i, u);
|
|
52
52
|
},
|
|
53
|
-
updated(
|
|
54
|
-
const t = a.value || {}, o = a.arg || "remove",
|
|
55
|
-
Ke(
|
|
53
|
+
updated(s, a, e) {
|
|
54
|
+
const t = a.value || {}, o = a.arg || "remove", u = t.behavior || o, i = je(t);
|
|
55
|
+
Ke(s, e, i, u);
|
|
56
56
|
}
|
|
57
57
|
}, ma = {
|
|
58
|
-
mounted: (
|
|
59
|
-
|
|
58
|
+
mounted: (s, a) => {
|
|
59
|
+
s.addEventListener("keydown", (e) => {
|
|
60
60
|
e.key === "Enter" && a.value();
|
|
61
61
|
});
|
|
62
62
|
},
|
|
63
|
-
unmounted: (
|
|
64
|
-
|
|
63
|
+
unmounted: (s) => {
|
|
64
|
+
s.removeEventListener("keydown", () => {
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, Fe = {
|
|
68
68
|
auth: va,
|
|
69
69
|
submit: ma
|
|
70
|
-
},
|
|
71
|
-
t in
|
|
72
|
-
}),
|
|
73
|
-
const e =
|
|
70
|
+
}, Bl = (s, a) => ((a || Object.keys(Fe)).forEach((t) => {
|
|
71
|
+
t in Fe && s.directive(t, Fe[t]);
|
|
72
|
+
}), s), oe = (s, a) => {
|
|
73
|
+
const e = s.find((t) => t.key === a);
|
|
74
74
|
if (e)
|
|
75
75
|
return e;
|
|
76
|
-
for (const t of
|
|
76
|
+
for (const t of s)
|
|
77
77
|
if (t.children) {
|
|
78
78
|
const o = oe(t.children, a);
|
|
79
79
|
if (o)
|
|
80
80
|
return o;
|
|
81
81
|
}
|
|
82
|
-
}, Ce = (
|
|
82
|
+
}, Ce = (s, a, e) => {
|
|
83
83
|
const t = [], o = [];
|
|
84
|
-
return e || (e = [...
|
|
84
|
+
return e || (e = [...s]), e.length && e.forEach((u, i) => {
|
|
85
85
|
let p;
|
|
86
|
-
if (typeof
|
|
87
|
-
const
|
|
88
|
-
p =
|
|
86
|
+
if (typeof u == "string") {
|
|
87
|
+
const n = oe(s, u);
|
|
88
|
+
p = n ? { ...n } : { key: u, label: u };
|
|
89
89
|
} else {
|
|
90
|
-
const
|
|
91
|
-
p =
|
|
90
|
+
const n = oe(s, u.key);
|
|
91
|
+
p = n ? { ...n, ...u } : { ...u };
|
|
92
92
|
}
|
|
93
|
-
p.click || (p.click = (
|
|
94
|
-
|
|
93
|
+
p.click || (p.click = (n, c, f) => {
|
|
94
|
+
c && (c.rowData.value = f), p.formVisible ? (p.formVisible.value = !1, setTimeout(() => {
|
|
95
95
|
p.formVisible.value = !0;
|
|
96
96
|
}, 1)) : G.warning("未配置点击处理事件!");
|
|
97
97
|
}), a === 0 || i < a ? t.push(p) : o.push(p);
|
|
98
98
|
}), { buttons: t, menus: o };
|
|
99
|
-
}, te = (
|
|
99
|
+
}, te = (s, a) => s.disabled && typeof s.disabled == "function" ? s.disabled(a) : s.disabled, J = (s, a) => s.visible && typeof s.visible == "function" ? s.visible(a) : s.visible ?? !0, ha = (s, a) => {
|
|
100
100
|
a.reload.value = !0;
|
|
101
|
-
}, ga = (
|
|
101
|
+
}, ga = (s, a) => {
|
|
102
102
|
a.searchBar.value = !a.searchBar.value;
|
|
103
|
-
}, ba = (
|
|
103
|
+
}, ba = (s, a) => {
|
|
104
104
|
switch (a.tableSize.value) {
|
|
105
105
|
case "large":
|
|
106
106
|
a.tableSize.value = "middle";
|
|
@@ -112,23 +112,23 @@ const Ke = (r, a, e, t = "remove") => {
|
|
|
112
112
|
a.tableSize.value = "large";
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
|
-
}, ya = (
|
|
115
|
+
}, ya = (s, a) => {
|
|
116
116
|
a.selectable.value = !a.selectable.value, a.selectable.value || (a.selectKeys.value = [], a.selectRows.value = []);
|
|
117
|
-
},
|
|
117
|
+
}, xa = (s, a) => {
|
|
118
118
|
a.rowExpand.value = !a.rowExpand.value;
|
|
119
|
-
}, Ve = (
|
|
119
|
+
}, Ve = (s, a) => {
|
|
120
120
|
a.selectable.value = !a.selectable.value;
|
|
121
|
-
},
|
|
122
|
-
(!
|
|
123
|
-
},
|
|
121
|
+
}, W = (s, a, e, t, o) => {
|
|
122
|
+
(!s.confirm || o) && s.click && (a ? s.click(a, e, t) : s.click(null, e, t)), ka(s);
|
|
123
|
+
}, _a = (s, a) => {
|
|
124
124
|
a.selectable.value = !a.selectable.value;
|
|
125
|
-
},
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
}, ka = (
|
|
129
|
-
(
|
|
130
|
-
}, wa = (
|
|
131
|
-
a ? delete
|
|
125
|
+
}, ft = () => {
|
|
126
|
+
const s = Ue();
|
|
127
|
+
s.setFullscreen(!s.fullscreen);
|
|
128
|
+
}, ka = (s, a) => {
|
|
129
|
+
(s.icons || s.labels) && (s.iconStatus = s.iconStatus || 0, s.iconStatus += 1, s.labels && s.labels.length && (s.label = s.labels[s.iconStatus % s.labels.length]), s.icons && s.icons.length && (s.icon = s.icons[s.iconStatus % s.icons.length]));
|
|
130
|
+
}, wa = (s, a) => {
|
|
131
|
+
a ? delete s.visible : s.visible = !1;
|
|
132
132
|
}, Ye = [
|
|
133
133
|
{
|
|
134
134
|
key: "Reload",
|
|
@@ -164,7 +164,7 @@ const Ke = (r, a, e, t = "remove") => {
|
|
|
164
164
|
icon: "icon-row-collapse",
|
|
165
165
|
iconStatus: 0,
|
|
166
166
|
icons: ["icon-row-collapse", "icon-row-expand"],
|
|
167
|
-
click:
|
|
167
|
+
click: xa
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
key: "tool.export.excel",
|
|
@@ -191,7 +191,7 @@ const Ke = (r, a, e, t = "remove") => {
|
|
|
191
191
|
{
|
|
192
192
|
key: "tool.export.pdf.selected",
|
|
193
193
|
label: "选中的记录",
|
|
194
|
-
click:
|
|
194
|
+
click: _a
|
|
195
195
|
}
|
|
196
196
|
]
|
|
197
197
|
},
|
|
@@ -211,19 +211,19 @@ const Ke = (r, a, e, t = "remove") => {
|
|
|
211
211
|
icon: "icon-fullscreen",
|
|
212
212
|
iconStatus: 0,
|
|
213
213
|
icons: ["icon-fullscreen", "icon-exitscreen"],
|
|
214
|
-
click:
|
|
214
|
+
click: ft
|
|
215
215
|
}
|
|
216
|
-
], Ca = (
|
|
217
|
-
if (!
|
|
216
|
+
], Ca = (s) => {
|
|
217
|
+
if (!s.tools || s.tools.length > 0) {
|
|
218
218
|
const a = [];
|
|
219
|
-
return
|
|
219
|
+
return s.tools ? a.push(...s.tools) : a.push(...Ye), { tools: Ce(Ye, 0, a).buttons };
|
|
220
220
|
}
|
|
221
221
|
return {
|
|
222
222
|
tools: []
|
|
223
223
|
};
|
|
224
224
|
};
|
|
225
|
-
var Sa = /* @__PURE__ */ ((
|
|
226
|
-
class
|
|
225
|
+
var Sa = /* @__PURE__ */ ((s) => (s.SYS_CONFIG = "SYS_CONFIG_", s.APP_MENU = "APP_MENU_", s.DICT_TYPE = "DICT_TYPE_", s.HOST_INFO = "HOST_INFO_", s.APP_PERMITS = "APP_PERMITS_", s.USER_SETTINGS = "USER_SETTINGS_", s.DICT_DATA = "DICT_DATA_", s.COMMON_OPTIONS = "COMMON_OPTIONS_", s))(Sa || {});
|
|
226
|
+
class vt {
|
|
227
227
|
/**
|
|
228
228
|
* 设置缓存数据(带服务器时间)
|
|
229
229
|
*/
|
|
@@ -245,7 +245,7 @@ class ft {
|
|
|
245
245
|
*/
|
|
246
246
|
static getData(a) {
|
|
247
247
|
const e = ve.get({ key: a, storage: "local" });
|
|
248
|
-
return e &&
|
|
248
|
+
return e && vt.isTimedData(e) ? e.data : e ?? null;
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* 清除缓存
|
|
@@ -278,9 +278,9 @@ class ft {
|
|
|
278
278
|
return a && typeof a == "object" && "data" in a && "lastTime" in a && typeof a.lastTime == "number";
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
async function
|
|
281
|
+
async function zl() {
|
|
282
282
|
try {
|
|
283
|
-
const
|
|
283
|
+
const s = await Be(
|
|
284
284
|
{
|
|
285
285
|
api: "PLATFORM_API",
|
|
286
286
|
url: "/api/SysCacheSvr/getLastTime",
|
|
@@ -288,18 +288,18 @@ async function Ul() {
|
|
|
288
288
|
},
|
|
289
289
|
{}
|
|
290
290
|
);
|
|
291
|
-
if ((
|
|
292
|
-
const a =
|
|
291
|
+
if ((s == null ? void 0 : s.status) === ze.SUCCESS) {
|
|
292
|
+
const a = s.data;
|
|
293
293
|
Object.keys(a).forEach((e) => {
|
|
294
294
|
const t = a[e];
|
|
295
|
-
["local", "session"].forEach((
|
|
296
|
-
const i =
|
|
295
|
+
["local", "session"].forEach((u) => {
|
|
296
|
+
const i = u === "local" ? localStorage : sessionStorage;
|
|
297
297
|
for (let p = 0; p < i.length; p++) {
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
298
|
+
const n = i.key(p);
|
|
299
|
+
if (n && n.endsWith(e))
|
|
300
300
|
try {
|
|
301
|
-
const
|
|
302
|
-
|
|
301
|
+
const c = JSON.parse(i.getItem(n));
|
|
302
|
+
c && typeof c == "object" && "lastTime" in c && typeof c.lastTime == "number" && c.lastTime !== t && i.removeItem(n);
|
|
303
303
|
} catch {
|
|
304
304
|
continue;
|
|
305
305
|
}
|
|
@@ -307,12 +307,12 @@ async function Ul() {
|
|
|
307
307
|
});
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
} catch (
|
|
311
|
-
console.error("检查缓存更新失败",
|
|
310
|
+
} catch (s) {
|
|
311
|
+
console.error("检查缓存更新失败", s);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
const
|
|
315
|
-
const e = await
|
|
314
|
+
const Ml = async (s, a) => {
|
|
315
|
+
const e = await pt(s, a);
|
|
316
316
|
if (e.success)
|
|
317
317
|
return {
|
|
318
318
|
blobUrl: e.blobUrl,
|
|
@@ -321,9 +321,9 @@ const Nl = async (r, a) => {
|
|
|
321
321
|
// 不再返回blob对象,使用URL即可
|
|
322
322
|
};
|
|
323
323
|
throw new Error(e.error || "CSV转Excel失败");
|
|
324
|
-
},
|
|
324
|
+
}, Ol = async (s, a) => {
|
|
325
325
|
try {
|
|
326
|
-
const t = new TextDecoder("utf-8").decode(
|
|
326
|
+
const t = new TextDecoder("utf-8").decode(s), o = await pt(t, a);
|
|
327
327
|
return {
|
|
328
328
|
success: o.success,
|
|
329
329
|
blobUrl: o.blobUrl,
|
|
@@ -338,49 +338,49 @@ const Nl = async (r, a) => {
|
|
|
338
338
|
error: e instanceof Error ? e.message : "未知错误"
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
},
|
|
341
|
+
}, mt = (s) => s ? Array.isArray(s) ? s.join(".") : s : "", ht = (s) => s.map((a) => ({
|
|
342
342
|
label: a.title,
|
|
343
|
-
value:
|
|
344
|
-
})),
|
|
343
|
+
value: mt(a.dataIndex) || a.key || ""
|
|
344
|
+
})), gt = (s, a) => s.map((e, t) => {
|
|
345
345
|
const o = { ...e };
|
|
346
|
-
return a.forEach((
|
|
347
|
-
const i =
|
|
348
|
-
i &&
|
|
346
|
+
return a.forEach((u) => {
|
|
347
|
+
const i = mt(u.dataIndex) || u.key;
|
|
348
|
+
i && u.customRender && (o[i] = u.customRender({
|
|
349
349
|
text: e[i],
|
|
350
350
|
record: e,
|
|
351
351
|
index: t,
|
|
352
|
-
column:
|
|
352
|
+
column: u
|
|
353
353
|
}));
|
|
354
354
|
}), o;
|
|
355
|
-
}),
|
|
355
|
+
}), bt = async (s, a, e) => {
|
|
356
356
|
try {
|
|
357
357
|
const o = (await import("@json2csv/plainjs")).Parser, i = new o({ fields: a }).parse(e), p = new Blob([`\uFEFF${i}`], { type: "text/csv" });
|
|
358
|
-
fa(p,
|
|
358
|
+
fa(p, s);
|
|
359
359
|
} catch (t) {
|
|
360
360
|
console.error("导出失败:", t), G.error("文件导出失败,请稍后重试");
|
|
361
361
|
}
|
|
362
|
-
},
|
|
362
|
+
}, Al = async (s, a, e) => {
|
|
363
363
|
try {
|
|
364
|
-
const t =
|
|
365
|
-
await
|
|
364
|
+
const t = yt(s), o = a.filter((p) => p.visible !== !1 && p.export !== !1), u = ht(o), i = gt(e, o);
|
|
365
|
+
await bt(t, u, i);
|
|
366
366
|
} catch (t) {
|
|
367
367
|
console.error("导出失败:", t), G.error("文件导出失败,请稍后重试");
|
|
368
368
|
}
|
|
369
|
-
},
|
|
369
|
+
}, yt = (s) => {
|
|
370
370
|
const a = /\{([^}]+)\}/g;
|
|
371
|
-
return
|
|
372
|
-
},
|
|
371
|
+
return s.replace(a, (e, t) => Pe().format(t));
|
|
372
|
+
}, Rl = async (s, a, e, t) => {
|
|
373
373
|
try {
|
|
374
|
-
const o =
|
|
375
|
-
let p = e.page,
|
|
376
|
-
return t.api || (t.api = p.api), t.authorize === void 0 && (t.authorize = p.authorize), e.isGridLoading.value = !0, Be(t,
|
|
377
|
-
if (e.isGridLoading.value = !1, (
|
|
378
|
-
if (
|
|
379
|
-
let f =
|
|
380
|
-
const
|
|
381
|
-
await
|
|
374
|
+
const o = yt(s), u = a.filter((c) => c.visible !== !1), i = ht(u);
|
|
375
|
+
let p = e.page, n = e.gridQuery;
|
|
376
|
+
return t.api || (t.api = p.api), t.authorize === void 0 && (t.authorize = p.authorize), e.isGridLoading.value = !0, Be(t, n).then(async (c) => {
|
|
377
|
+
if (e.isGridLoading.value = !1, (c == null ? void 0 : c.status) === ze.SUCCESS) {
|
|
378
|
+
if (c.data) {
|
|
379
|
+
let f = c.data;
|
|
380
|
+
const r = gt(f, u);
|
|
381
|
+
await bt(o, i, r);
|
|
382
382
|
}
|
|
383
|
-
} else if ((
|
|
383
|
+
} else if ((c == null ? void 0 : c.errno) == kt) {
|
|
384
384
|
Le().logout(!1);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
@@ -388,12 +388,12 @@ const Nl = async (r, a) => {
|
|
|
388
388
|
} catch (o) {
|
|
389
389
|
console.error("导出失败:", o), G.error("文件导出失败,请稍后重试");
|
|
390
390
|
}
|
|
391
|
-
},
|
|
391
|
+
}, Kl = /* @__PURE__ */ T({
|
|
392
392
|
__name: "fullscreen",
|
|
393
|
-
setup(
|
|
393
|
+
setup(s) {
|
|
394
394
|
const a = Ue();
|
|
395
395
|
return (e, t) => (v(), b(K, {
|
|
396
|
-
onClick: pe(l(
|
|
396
|
+
onClick: pe(l(ft), ["stop"]),
|
|
397
397
|
icon: l(a).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
|
|
398
398
|
class: "w-[17px] h-[17px]"
|
|
399
399
|
}, null, 8, ["onClick", "icon"]));
|
|
@@ -407,21 +407,21 @@ const Nl = async (r, a) => {
|
|
|
407
407
|
size: {},
|
|
408
408
|
placement: {}
|
|
409
409
|
},
|
|
410
|
-
setup(
|
|
410
|
+
setup(s) {
|
|
411
411
|
const a = ne();
|
|
412
412
|
return (e, t) => (v(), b(l(Wt), {
|
|
413
413
|
placement: e.placement ?? "topRight"
|
|
414
414
|
}, {
|
|
415
415
|
content: h(() => [
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
L(e.$slots, "default", {}, () => [
|
|
417
|
+
F("div", {
|
|
418
418
|
class: E(["text-[14px]", [e.maxWidth]])
|
|
419
|
-
},
|
|
419
|
+
}, U(e.text), 3)
|
|
420
420
|
])
|
|
421
421
|
]),
|
|
422
422
|
default: h(() => [
|
|
423
|
-
|
|
424
|
-
S(K,
|
|
423
|
+
F("span", $a, [
|
|
424
|
+
S(K, N({
|
|
425
425
|
icon: "icon-question-circle",
|
|
426
426
|
class: ["text-[#888]", [e.size ? "w-" + e.size + " h-" + e.size : "w-5 h-5"]]
|
|
427
427
|
}, l(a)), null, 16, ["class"])
|
|
@@ -430,7 +430,7 @@ const Nl = async (r, a) => {
|
|
|
430
430
|
_: 3
|
|
431
431
|
}, 8, ["placement"]));
|
|
432
432
|
}
|
|
433
|
-
}),
|
|
433
|
+
}), jl = /* @__PURE__ */ T({
|
|
434
434
|
__name: "layoutIcon",
|
|
435
435
|
props: {
|
|
436
436
|
icon: {
|
|
@@ -440,21 +440,21 @@ const Nl = async (r, a) => {
|
|
|
440
440
|
type: Array
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
|
-
setup(
|
|
444
|
-
const a =
|
|
445
|
-
iconUrl: `${
|
|
443
|
+
setup(s) {
|
|
444
|
+
const a = s, t = wt({
|
|
445
|
+
iconUrl: `${Kt.MICROLAYOUT_ICONS}`,
|
|
446
446
|
monoColor: !0,
|
|
447
447
|
icon: a.icon,
|
|
448
448
|
icons: a.icons
|
|
449
449
|
});
|
|
450
|
-
return (o,
|
|
450
|
+
return (o, u) => s.icon || s.icons ? (v(), b(l(t), N({
|
|
451
451
|
key: 0,
|
|
452
|
-
icon:
|
|
453
|
-
icons:
|
|
452
|
+
icon: s.icon,
|
|
453
|
+
icons: s.icons,
|
|
454
454
|
class: ["align-middle"]
|
|
455
|
-
}, o.$attrs), null, 16, ["icon", "icons"])) :
|
|
455
|
+
}, o.$attrs), null, 16, ["icon", "icons"])) : _("", !0);
|
|
456
456
|
}
|
|
457
|
-
}),
|
|
457
|
+
}), Da = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, Vl = /* @__PURE__ */ T({
|
|
458
458
|
__name: "index",
|
|
459
459
|
props: {
|
|
460
460
|
saveText: {},
|
|
@@ -464,26 +464,26 @@ const Nl = async (r, a) => {
|
|
|
464
464
|
drawerSave: { type: Function },
|
|
465
465
|
drawerSaveAs: { type: Function }
|
|
466
466
|
},
|
|
467
|
-
setup(
|
|
468
|
-
const { useToken: a } =
|
|
469
|
-
|
|
470
|
-
() =>
|
|
471
|
-
(
|
|
472
|
-
t.value =
|
|
467
|
+
setup(s) {
|
|
468
|
+
const { useToken: a } = st, { token: e } = a(), t = y(!1), o = s, u = o.editorCtrl;
|
|
469
|
+
xe(ae.EditorControl, u), D(
|
|
470
|
+
() => u.visible.value,
|
|
471
|
+
(c) => {
|
|
472
|
+
t.value = c ?? !1;
|
|
473
473
|
}
|
|
474
474
|
), X(() => {
|
|
475
|
-
t.value =
|
|
475
|
+
t.value = u.visible.value ?? !1;
|
|
476
476
|
});
|
|
477
477
|
const i = () => {
|
|
478
|
-
o.drawerSave ? o.drawerSave() :
|
|
478
|
+
o.drawerSave ? o.drawerSave() : u && We(u);
|
|
479
479
|
}, p = () => {
|
|
480
|
-
o.drawerSaveAs ? o.drawerSaveAs() :
|
|
481
|
-
},
|
|
482
|
-
|
|
480
|
+
o.drawerSaveAs ? o.drawerSaveAs() : u && Ct(u);
|
|
481
|
+
}, n = () => {
|
|
482
|
+
St(u);
|
|
483
483
|
};
|
|
484
|
-
return (
|
|
484
|
+
return (c, f) => (v(), b(l(qt), {
|
|
485
485
|
open: t.value,
|
|
486
|
-
"onUpdate:open": f[0] || (f[0] = (
|
|
486
|
+
"onUpdate:open": f[0] || (f[0] = (r) => t.value = r),
|
|
487
487
|
"get-container": !1,
|
|
488
488
|
closable: !1,
|
|
489
489
|
"header-style": {
|
|
@@ -502,11 +502,11 @@ const Nl = async (r, a) => {
|
|
|
502
502
|
boxShadow: "rgba(0, 0, 0, 0.3) -2px 0px 8px"
|
|
503
503
|
},
|
|
504
504
|
width: "420px",
|
|
505
|
-
onClose:
|
|
505
|
+
onClose: n
|
|
506
506
|
}, {
|
|
507
507
|
extra: h(() => [
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
L(c.$slots, "extra", {}, () => [
|
|
509
|
+
F("div", Da, [
|
|
510
510
|
S(l(K), {
|
|
511
511
|
class: "top-[-2px] left-[2px] w-6 h-6",
|
|
512
512
|
icon: "icon-new",
|
|
@@ -515,49 +515,49 @@ const Nl = async (r, a) => {
|
|
|
515
515
|
clickable: "",
|
|
516
516
|
color: "#666",
|
|
517
517
|
position: [0, 0],
|
|
518
|
-
onClick:
|
|
518
|
+
onClick: n
|
|
519
519
|
})
|
|
520
520
|
])
|
|
521
521
|
])
|
|
522
522
|
]),
|
|
523
523
|
default: h(() => [
|
|
524
|
-
|
|
524
|
+
L(c.$slots, "default")
|
|
525
525
|
]),
|
|
526
526
|
footer: h(() => [
|
|
527
|
-
|
|
527
|
+
L(c.$slots, "footer", {}, () => [
|
|
528
528
|
S(l(ie), null, {
|
|
529
529
|
default: h(() => [
|
|
530
|
-
|
|
530
|
+
c.cancelText !== "" ? (v(), b(l(Y), {
|
|
531
531
|
key: 0,
|
|
532
|
-
onClick:
|
|
532
|
+
onClick: n
|
|
533
533
|
}, {
|
|
534
534
|
default: h(() => [
|
|
535
|
-
|
|
535
|
+
z(U(c.cancelText ?? "取消"), 1)
|
|
536
536
|
]),
|
|
537
537
|
_: 1
|
|
538
|
-
})) :
|
|
539
|
-
|
|
538
|
+
})) : _("", !0),
|
|
539
|
+
c.saveAsText !== "" && l(u).saveAsBtnVisible !== !1 ? (v(), b(l(Y), {
|
|
540
540
|
key: 1,
|
|
541
541
|
onClick: p,
|
|
542
542
|
type: "primary",
|
|
543
|
-
loading: l(
|
|
543
|
+
loading: l(u).isFormSaving.value
|
|
544
544
|
}, {
|
|
545
545
|
default: h(() => [
|
|
546
|
-
|
|
546
|
+
z(U(c.saveAsText ?? "另存为"), 1)
|
|
547
547
|
]),
|
|
548
548
|
_: 1
|
|
549
|
-
}, 8, ["loading"])) :
|
|
550
|
-
|
|
549
|
+
}, 8, ["loading"])) : _("", !0),
|
|
550
|
+
c.saveText !== "" && l(u).saveBtnVisible !== !1 ? (v(), b(l(Y), {
|
|
551
551
|
key: 2,
|
|
552
552
|
onClick: i,
|
|
553
553
|
type: "primary",
|
|
554
|
-
loading: l(
|
|
554
|
+
loading: l(u).isFormSaving.value
|
|
555
555
|
}, {
|
|
556
556
|
default: h(() => [
|
|
557
|
-
|
|
557
|
+
z(U(c.saveText ?? "保存"), 1)
|
|
558
558
|
]),
|
|
559
559
|
_: 1
|
|
560
|
-
}, 8, ["loading"])) :
|
|
560
|
+
}, 8, ["loading"])) : _("", !0)
|
|
561
561
|
]),
|
|
562
562
|
_: 1
|
|
563
563
|
})
|
|
@@ -566,18 +566,18 @@ const Nl = async (r, a) => {
|
|
|
566
566
|
_: 3
|
|
567
567
|
}, 8, ["open", "header-style"]));
|
|
568
568
|
}
|
|
569
|
-
}),
|
|
569
|
+
}), Yl = /* @__PURE__ */ T({
|
|
570
570
|
__name: "index",
|
|
571
571
|
props: {
|
|
572
572
|
labelWidth: {},
|
|
573
573
|
wrapperWidth: {},
|
|
574
574
|
editorCtrl: {}
|
|
575
575
|
},
|
|
576
|
-
setup(
|
|
577
|
-
const a =
|
|
578
|
-
return
|
|
579
|
-
const
|
|
580
|
-
return
|
|
576
|
+
setup(s) {
|
|
577
|
+
const a = s, e = a.editorCtrl ?? ge(ae.EditorControl, void 0);
|
|
578
|
+
return xe(ae.LabelWidth, a.labelWidth), (t, o) => {
|
|
579
|
+
const u = re("submit");
|
|
580
|
+
return q((v(), b(l(ot), {
|
|
581
581
|
"label-col": { flex: a.labelWidth ?? "85px" },
|
|
582
582
|
"wrapper-col": {
|
|
583
583
|
flex: a.wrapperWidth ?? "1 0 280px"
|
|
@@ -588,12 +588,12 @@ const Nl = async (r, a) => {
|
|
|
588
588
|
}
|
|
589
589
|
}, {
|
|
590
590
|
default: h(() => [
|
|
591
|
-
|
|
591
|
+
L(t.$slots, "default")
|
|
592
592
|
]),
|
|
593
593
|
_: 3
|
|
594
594
|
}, 8, ["label-col", "wrapper-col"])), [
|
|
595
595
|
[
|
|
596
|
-
|
|
596
|
+
u,
|
|
597
597
|
() => {
|
|
598
598
|
l(e) && l(We)(l(e));
|
|
599
599
|
}
|
|
@@ -601,10 +601,10 @@ const Nl = async (r, a) => {
|
|
|
601
601
|
]);
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
}),
|
|
604
|
+
}), Fa = {
|
|
605
605
|
key: 0,
|
|
606
606
|
class: "flex-grow"
|
|
607
|
-
},
|
|
607
|
+
}, Ia = { class: "w-8 mt-[-2px]" }, Wl = /* @__PURE__ */ T({
|
|
608
608
|
inheritAttrs: !1,
|
|
609
609
|
__name: "formItem",
|
|
610
610
|
props: {
|
|
@@ -615,61 +615,61 @@ const Nl = async (r, a) => {
|
|
|
615
615
|
nextLine: { type: Boolean },
|
|
616
616
|
bottomMargin: {}
|
|
617
617
|
},
|
|
618
|
-
setup(
|
|
619
|
-
const a =
|
|
618
|
+
setup(s) {
|
|
619
|
+
const a = s, e = ne(), t = ge(ae.EditorControl, void 0), o = ge(ae.LabelWidth, "85px") ?? "85px", u = qe(a, t), i = y(!1);
|
|
620
620
|
setTimeout(() => {
|
|
621
621
|
i.value = !0;
|
|
622
622
|
}, 30);
|
|
623
|
-
const p =
|
|
624
|
-
var
|
|
623
|
+
const p = j(() => {
|
|
624
|
+
var c;
|
|
625
625
|
if (!a.rule)
|
|
626
626
|
return !1;
|
|
627
|
-
const
|
|
628
|
-
return
|
|
627
|
+
const n = He(a.rule.split("."), (c = t == null ? void 0 : t.formRules) == null ? void 0 : c.value);
|
|
628
|
+
return n ? (n.required || (u.value.errClass = "", u.value.msg = ""), n.required ?? !0) : (Ht.error(`"${a.label}" 的验证规则 \`${a.rule}\` 不存在`), u.value.errClass = "text-[#ff4d4f]", u.value.msg = `规则 \`${a.rule}\` 不存在,请检查代码!`, !0);
|
|
629
629
|
});
|
|
630
|
-
return (
|
|
631
|
-
class: E(["relative",
|
|
630
|
+
return (n, c) => (v(), x("div", {
|
|
631
|
+
class: E(["relative", n.bottomMargin ? n.bottomMargin : "mb-1"])
|
|
632
632
|
}, [
|
|
633
|
-
i.value ? (v(), b(l(
|
|
633
|
+
i.value ? (v(), b(l(nt), N({
|
|
634
634
|
key: 0,
|
|
635
635
|
required: p.value,
|
|
636
|
-
class: ["relative", [
|
|
636
|
+
class: ["relative", [n.nextLine ? "mb-0" : n.rule ? "" : "mb-3"]]
|
|
637
637
|
}, l(e)), {
|
|
638
638
|
label: h(() => [
|
|
639
|
-
|
|
640
|
-
class: E([l(
|
|
641
|
-
},
|
|
639
|
+
F("span", {
|
|
640
|
+
class: E([l(u).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
641
|
+
}, U(n.label), 3)
|
|
642
642
|
]),
|
|
643
643
|
default: h(() => [
|
|
644
|
-
|
|
645
|
-
class: E(["flex items-center",
|
|
644
|
+
F("div", {
|
|
645
|
+
class: E(["flex items-center", n.width ? n.width : "w-full"])
|
|
646
646
|
}, [
|
|
647
|
-
|
|
648
|
-
|
|
647
|
+
n.nextLine ? _("", !0) : (v(), x("div", Fa, [
|
|
648
|
+
L(n.$slots, "default")
|
|
649
649
|
])),
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
650
|
+
F("div", Ia, [
|
|
651
|
+
L(n.$slots, "helper", {}, () => [
|
|
652
|
+
n.helper ? (v(), b(l(Ta), {
|
|
653
653
|
key: 0,
|
|
654
|
-
text:
|
|
655
|
-
}, null, 8, ["text"])) :
|
|
654
|
+
text: n.helper
|
|
655
|
+
}, null, 8, ["text"])) : _("", !0)
|
|
656
656
|
])
|
|
657
657
|
])
|
|
658
658
|
], 2)
|
|
659
659
|
]),
|
|
660
660
|
_: 3
|
|
661
|
-
}, 16, ["required", "class"])) :
|
|
662
|
-
|
|
661
|
+
}, 16, ["required", "class"])) : _("", !0),
|
|
662
|
+
n.nextLine ? (v(), x("div", {
|
|
663
663
|
key: 1,
|
|
664
|
-
class: E(["w-[95%] flex items-center relative", [
|
|
664
|
+
class: E(["w-[95%] flex items-center relative", [n.nextLine ? n.rule ? "mb-7" : "mb-3" : ""]])
|
|
665
665
|
}, [
|
|
666
|
-
|
|
667
|
-
], 2)) :
|
|
668
|
-
l(
|
|
666
|
+
L(n.$slots, "default")
|
|
667
|
+
], 2)) : _("", !0),
|
|
668
|
+
l(u).errClass ? (v(), x("span", {
|
|
669
669
|
key: 2,
|
|
670
|
-
style:
|
|
670
|
+
style: Me({ left: n.nextLine ? "2px" : l(o) }),
|
|
671
671
|
class: "absolute bottom-[3px] text-[12px] text-[#ff4d4fcc]"
|
|
672
|
-
},
|
|
672
|
+
}, U(l(u).msg), 5)) : _("", !0)
|
|
673
673
|
], 2));
|
|
674
674
|
}
|
|
675
675
|
}), Pa = /* @__PURE__ */ T({
|
|
@@ -678,8 +678,8 @@ const Nl = async (r, a) => {
|
|
|
678
678
|
record: {},
|
|
679
679
|
gridCtrl: {}
|
|
680
680
|
},
|
|
681
|
-
setup(
|
|
682
|
-
const a =
|
|
681
|
+
setup(s) {
|
|
682
|
+
const a = s, e = a.gridCtrl, t = j(() => ue.currentRoute.value.path), o = [
|
|
683
683
|
{
|
|
684
684
|
key: "Edit",
|
|
685
685
|
label: "",
|
|
@@ -703,13 +703,13 @@ const Nl = async (r, a) => {
|
|
|
703
703
|
confirmText: "是否删除此记录?",
|
|
704
704
|
click: () => Ge(e, a.record)
|
|
705
705
|
}
|
|
706
|
-
], { buttons:
|
|
707
|
-
if (typeof
|
|
708
|
-
return
|
|
709
|
-
if (typeof
|
|
710
|
-
return te(
|
|
706
|
+
], { buttons: u, menus: i } = Ce(o, 0, e.operates), p = (n) => {
|
|
707
|
+
if (typeof n.disabled == "boolean")
|
|
708
|
+
return n.disabled;
|
|
709
|
+
if (typeof n.disabled == "function")
|
|
710
|
+
return te(n, a.record) ?? !1;
|
|
711
711
|
if (a.record.hasOwnProperty(e.statusKey))
|
|
712
|
-
switch (
|
|
712
|
+
switch (n.key) {
|
|
713
713
|
case "Edit":
|
|
714
714
|
return !a.record[e.statusKey];
|
|
715
715
|
case "Delete":
|
|
@@ -717,7 +717,7 @@ const Nl = async (r, a) => {
|
|
|
717
717
|
}
|
|
718
718
|
return !1;
|
|
719
719
|
};
|
|
720
|
-
return (
|
|
720
|
+
return (n, c) => {
|
|
721
721
|
const f = re("auth");
|
|
722
722
|
return v(), b(l(be), { theme: {
|
|
723
723
|
token: {
|
|
@@ -727,80 +727,80 @@ const Nl = async (r, a) => {
|
|
|
727
727
|
default: h(() => [
|
|
728
728
|
S(l(ie), null, {
|
|
729
729
|
default: h(() => [
|
|
730
|
-
(v(!0),
|
|
731
|
-
key:
|
|
730
|
+
(v(!0), x(P, null, R(l(u), (r) => (v(), x(P, {
|
|
731
|
+
key: r.key
|
|
732
732
|
}, [
|
|
733
|
-
l(J)(
|
|
733
|
+
l(J)(r, a.record) ? (v(), b(l(it), {
|
|
734
734
|
key: 0,
|
|
735
|
-
disabled: p(
|
|
735
|
+
disabled: p(r) || !r.confirm,
|
|
736
736
|
cancelText: "否",
|
|
737
737
|
okText: "是",
|
|
738
|
-
title:
|
|
738
|
+
title: r.confirmText,
|
|
739
739
|
okButtonProps: { size: "small" },
|
|
740
740
|
cancelButtonProps: { size: "small" },
|
|
741
|
-
onConfirm: (m) => l(
|
|
741
|
+
onConfirm: (m) => l(W)(r, l(e).page, l(e), a.record, !0)
|
|
742
742
|
}, {
|
|
743
743
|
default: h(() => [
|
|
744
|
-
l(J)(
|
|
745
|
-
key:
|
|
746
|
-
icon:
|
|
747
|
-
danger:
|
|
748
|
-
disabled: p(
|
|
749
|
-
onClick: (m) => !p(
|
|
750
|
-
clickable: !p(
|
|
744
|
+
l(J)(r, a.record) ? q((v(), b(l(K), {
|
|
745
|
+
key: r.key,
|
|
746
|
+
icon: r.icon,
|
|
747
|
+
danger: r.danger,
|
|
748
|
+
disabled: p(r),
|
|
749
|
+
onClick: (m) => !p(r) && l(W)(r, l(e).page, l(e), a.record),
|
|
750
|
+
clickable: !p(r),
|
|
751
751
|
class: E([
|
|
752
752
|
"w-4 h-4",
|
|
753
|
-
|
|
754
|
-
p(
|
|
753
|
+
r.danger ? "text-red-500" : "text-gray-600",
|
|
754
|
+
p(r) ? "opacity-30 cursor-not-allowed" : "hover:text-gray-800"
|
|
755
755
|
])
|
|
756
756
|
}, null, 8, ["icon", "danger", "disabled", "onClick", "clickable", "class"])), [
|
|
757
|
-
[f, { url: t.value, role:
|
|
758
|
-
]) :
|
|
757
|
+
[f, { url: t.value, role: r.role, permit: r.permit }]
|
|
758
|
+
]) : _("", !0)
|
|
759
759
|
]),
|
|
760
760
|
_: 2
|
|
761
|
-
}, 1032, ["disabled", "title", "onConfirm"])) :
|
|
761
|
+
}, 1032, ["disabled", "title", "onConfirm"])) : _("", !0)
|
|
762
762
|
], 64))), 128)),
|
|
763
|
-
|
|
763
|
+
n.record[l(e).statusKey] == 1 ? (v(), b(l(be), {
|
|
764
764
|
key: 0,
|
|
765
765
|
autoInsertSpaceInButton: !1
|
|
766
766
|
}, {
|
|
767
767
|
default: h(() => [
|
|
768
|
-
l(i).length > 0 ? (v(), b(l(
|
|
768
|
+
l(i).length > 0 ? (v(), b(l(ut), {
|
|
769
769
|
key: 0,
|
|
770
770
|
size: "small"
|
|
771
771
|
}, {
|
|
772
772
|
overlay: h(() => [
|
|
773
773
|
S(l(ke), null, {
|
|
774
774
|
default: h(() => [
|
|
775
|
-
(v(!0),
|
|
776
|
-
key:
|
|
775
|
+
(v(!0), x(P, null, R(l(i), (r) => (v(), x(P, {
|
|
776
|
+
key: r.key
|
|
777
777
|
}, [
|
|
778
|
-
l(J)(
|
|
778
|
+
l(J)(r, a.record) ? q((v(), b(l(we), {
|
|
779
779
|
key: 0,
|
|
780
|
-
disabled: p(
|
|
781
|
-
onClick: (m) => l(
|
|
780
|
+
disabled: p(r),
|
|
781
|
+
onClick: (m) => l(W)(r, l(e).page, l(e), a.record)
|
|
782
782
|
}, {
|
|
783
783
|
default: h(() => [
|
|
784
|
-
|
|
784
|
+
z(U(r.label), 1)
|
|
785
785
|
]),
|
|
786
786
|
_: 2
|
|
787
787
|
}, 1032, ["disabled", "onClick"])), [
|
|
788
|
-
[f, { url: t.value, role:
|
|
789
|
-
]) :
|
|
788
|
+
[f, { url: t.value, role: r.role, permit: r.permit }]
|
|
789
|
+
]) : _("", !0)
|
|
790
790
|
], 64))), 128))
|
|
791
791
|
]),
|
|
792
792
|
_: 1
|
|
793
793
|
})
|
|
794
794
|
]),
|
|
795
795
|
default: h(() => [
|
|
796
|
-
|
|
796
|
+
c[0] || (c[0] = z(" 更多 "))
|
|
797
797
|
]),
|
|
798
798
|
_: 1,
|
|
799
799
|
__: [0]
|
|
800
|
-
})) :
|
|
800
|
+
})) : _("", !0)
|
|
801
801
|
]),
|
|
802
802
|
_: 1
|
|
803
|
-
})) :
|
|
803
|
+
})) : _("", !0)
|
|
804
804
|
]),
|
|
805
805
|
_: 1
|
|
806
806
|
})
|
|
@@ -814,89 +814,89 @@ const Nl = async (r, a) => {
|
|
|
814
814
|
props: {
|
|
815
815
|
gridCtrl: {}
|
|
816
816
|
},
|
|
817
|
-
setup(
|
|
818
|
-
const a =
|
|
819
|
-
|
|
817
|
+
setup(s) {
|
|
818
|
+
const a = s, e = a.gridCtrl, { tools: t } = Ca(a.gridCtrl), o = Ue();
|
|
819
|
+
D(
|
|
820
820
|
() => e.selectable.value,
|
|
821
821
|
(p) => {
|
|
822
822
|
oe(t, "tool.export.excel.selected") && (oe(t, "tool.export.excel.selected").disabled = !p), oe(t, "tool.export.pdf.selected") && (oe(t, "tool.export.pdf.selected").disabled = !p);
|
|
823
823
|
}
|
|
824
824
|
);
|
|
825
|
-
const
|
|
826
|
-
|
|
825
|
+
const u = y([]);
|
|
826
|
+
D(
|
|
827
827
|
() => e.columns.value,
|
|
828
828
|
(p) => {
|
|
829
|
-
|
|
829
|
+
u.value = Je(p, !0);
|
|
830
830
|
},
|
|
831
831
|
{ deep: !0, immediate: !0 }
|
|
832
832
|
);
|
|
833
833
|
const i = () => {
|
|
834
|
-
e.columns.value.splice(0, e.columns.value.length, ...
|
|
834
|
+
e.columns.value.splice(0, e.columns.value.length, ...u.value), o.setTableColumns(ue.currentRoute.value.path, e.columns.value);
|
|
835
835
|
};
|
|
836
|
-
return (p,
|
|
837
|
-
(v(!0),
|
|
838
|
-
key:
|
|
836
|
+
return (p, n) => (v(), x("div", Ea, [
|
|
837
|
+
(v(!0), x(P, null, R(l(t), (c, f) => (v(), x(P, {
|
|
838
|
+
key: c.key
|
|
839
839
|
}, [
|
|
840
|
-
l(J)(
|
|
840
|
+
l(J)(c) && c.dropdown ? (v(), b(l(Ee), {
|
|
841
841
|
key: 0,
|
|
842
842
|
placement: "bottomRight",
|
|
843
843
|
class: "p-0 rounded-none"
|
|
844
844
|
}, {
|
|
845
845
|
overlay: h(() => [
|
|
846
|
-
|
|
847
|
-
class: E(["min-w-[100px] bg-white rounded shadow-md p-4",
|
|
846
|
+
F("div", {
|
|
847
|
+
class: E(["min-w-[100px] bg-white rounded shadow-md p-4", c.dropdownClass])
|
|
848
848
|
}, [
|
|
849
|
-
|
|
849
|
+
c.dropdown === "headset" ? (v(), b(l(pa), {
|
|
850
850
|
key: 0,
|
|
851
|
-
modelValue:
|
|
852
|
-
"onUpdate:modelValue":
|
|
851
|
+
modelValue: u.value,
|
|
852
|
+
"onUpdate:modelValue": n[1] || (n[1] = (r) => u.value = r),
|
|
853
853
|
"item-key": "dataIndex",
|
|
854
854
|
onEnd: i,
|
|
855
855
|
handle: ".drag-handle"
|
|
856
856
|
}, {
|
|
857
857
|
default: h(() => [
|
|
858
|
-
(v(!0),
|
|
859
|
-
key:
|
|
860
|
-
onClick:
|
|
858
|
+
(v(!0), x(P, null, R(u.value, (r) => (v(), x("div", {
|
|
859
|
+
key: r.name,
|
|
860
|
+
onClick: n[0] || (n[0] = pe(() => {
|
|
861
861
|
}, ["stop"])),
|
|
862
862
|
class: "flex items-center mb-2 last:mb-0 select-none"
|
|
863
863
|
}, [
|
|
864
|
-
|
|
864
|
+
n[2] || (n[2] = F("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
|
|
865
865
|
S(l(Qt), {
|
|
866
|
-
checked:
|
|
866
|
+
checked: r.visible !== !1,
|
|
867
867
|
onChange: pe(
|
|
868
868
|
(m) => {
|
|
869
|
-
l(wa)(
|
|
869
|
+
l(wa)(r, m.target.checked);
|
|
870
870
|
},
|
|
871
871
|
["stop", "prevent"]
|
|
872
872
|
),
|
|
873
873
|
class: "text-gray-700 hover:text-gray-900 select-none"
|
|
874
874
|
}, {
|
|
875
875
|
default: h(() => [
|
|
876
|
-
|
|
876
|
+
z(U(r.title), 1)
|
|
877
877
|
]),
|
|
878
878
|
_: 2
|
|
879
879
|
}, 1032, ["checked", "onChange"])
|
|
880
880
|
]))), 128))
|
|
881
881
|
]),
|
|
882
882
|
_: 1
|
|
883
|
-
}, 8, ["modelValue"])) :
|
|
883
|
+
}, 8, ["modelValue"])) : _("", !0)
|
|
884
884
|
], 2)
|
|
885
885
|
]),
|
|
886
886
|
default: h(() => [
|
|
887
|
-
S(l(
|
|
887
|
+
S(l(Y), {
|
|
888
888
|
class: E([
|
|
889
889
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
890
890
|
f === 0 ? "rounded-l-[5px]" : "",
|
|
891
891
|
f === l(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
892
892
|
]),
|
|
893
|
-
disabled: l(te)(
|
|
894
|
-
tiptext:
|
|
895
|
-
onClick: (
|
|
893
|
+
disabled: l(te)(c),
|
|
894
|
+
tiptext: c.label,
|
|
895
|
+
onClick: (r) => l(W)(c, l(e).page, l(e))
|
|
896
896
|
}, {
|
|
897
897
|
default: h(() => [
|
|
898
898
|
S(l(K), {
|
|
899
|
-
icon:
|
|
899
|
+
icon: c.icon,
|
|
900
900
|
class: "w-[18px] h-[18.5px]",
|
|
901
901
|
clickable: ""
|
|
902
902
|
}, null, 8, ["icon"])
|
|
@@ -905,26 +905,26 @@ const Nl = async (r, a) => {
|
|
|
905
905
|
}, 1032, ["class", "disabled", "tiptext", "onClick"])
|
|
906
906
|
]),
|
|
907
907
|
_: 2
|
|
908
|
-
}, 1024)) : !
|
|
908
|
+
}, 1024)) : !c.children && l(J)(c) ? (v(), b(l(Y), {
|
|
909
909
|
key: 1,
|
|
910
910
|
class: E([
|
|
911
911
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
912
912
|
f === 0 ? "rounded-l-[5px]" : "",
|
|
913
913
|
f === l(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
914
914
|
]),
|
|
915
|
-
disabled: l(te)(
|
|
916
|
-
tiptext:
|
|
917
|
-
onClick: (
|
|
915
|
+
disabled: l(te)(c),
|
|
916
|
+
tiptext: c.label,
|
|
917
|
+
onClick: (r) => l(W)(c, l(e).page, l(e))
|
|
918
918
|
}, {
|
|
919
919
|
default: h(() => [
|
|
920
920
|
S(l(K), {
|
|
921
|
-
icon:
|
|
921
|
+
icon: c.icon,
|
|
922
922
|
class: "w-[18px] h-[18.5px]",
|
|
923
923
|
clickable: ""
|
|
924
924
|
}, null, 8, ["icon"])
|
|
925
925
|
]),
|
|
926
926
|
_: 2
|
|
927
|
-
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : l(J)(
|
|
927
|
+
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : l(J)(c) ? (v(), b(l(Ee), {
|
|
928
928
|
key: 2,
|
|
929
929
|
placement: "bottomRight",
|
|
930
930
|
class: "p-0 rounded-none"
|
|
@@ -932,12 +932,12 @@ const Nl = async (r, a) => {
|
|
|
932
932
|
overlay: h(() => [
|
|
933
933
|
S(l(ke), null, {
|
|
934
934
|
default: h(() => [
|
|
935
|
-
(v(!0),
|
|
936
|
-
key:
|
|
937
|
-
disabled: l(te)(
|
|
935
|
+
(v(!0), x(P, null, R(c.children, (r) => (v(), b(l(we), {
|
|
936
|
+
key: r.key,
|
|
937
|
+
disabled: l(te)(r)
|
|
938
938
|
}, {
|
|
939
939
|
default: h(() => [
|
|
940
|
-
|
|
940
|
+
z(U(r.label), 1)
|
|
941
941
|
]),
|
|
942
942
|
_: 2
|
|
943
943
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -946,16 +946,16 @@ const Nl = async (r, a) => {
|
|
|
946
946
|
}, 1024)
|
|
947
947
|
]),
|
|
948
948
|
default: h(() => [
|
|
949
|
-
S(l(
|
|
949
|
+
S(l(Y), {
|
|
950
950
|
class: E([
|
|
951
951
|
"!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
952
952
|
f === 0 ? "rounded-l-[5px]" : ""
|
|
953
953
|
]),
|
|
954
|
-
disabled: l(te)(
|
|
955
|
-
tiptext:
|
|
956
|
-
icon:
|
|
954
|
+
disabled: l(te)(c),
|
|
955
|
+
tiptext: c.label,
|
|
956
|
+
icon: c.icon,
|
|
957
957
|
iconProps: { class: "w-[19px] h-[19px]" },
|
|
958
|
-
onClick: (
|
|
958
|
+
onClick: (r) => l(W)(c, l(e).page, l(e))
|
|
959
959
|
}, {
|
|
960
960
|
default: h(() => [
|
|
961
961
|
S(l(K), {
|
|
@@ -967,18 +967,18 @@ const Nl = async (r, a) => {
|
|
|
967
967
|
}, 1032, ["class", "disabled", "tiptext", "icon", "onClick"])
|
|
968
968
|
]),
|
|
969
969
|
_: 2
|
|
970
|
-
}, 1024)) :
|
|
970
|
+
}, 1024)) : _("", !0)
|
|
971
971
|
], 64))), 128))
|
|
972
972
|
]));
|
|
973
973
|
}
|
|
974
|
-
}), Ua = { class: "flex justify-between mb-[10px]" }, Na = { key: 1 }, Ba = 3,
|
|
974
|
+
}), Ua = { class: "flex justify-between mb-[10px]" }, Na = { key: 1 }, Ba = 3, xt = /* @__PURE__ */ T({
|
|
975
975
|
__name: "index",
|
|
976
976
|
props: {
|
|
977
977
|
gridCtrl: {},
|
|
978
978
|
editorCtrl: {}
|
|
979
979
|
},
|
|
980
|
-
setup(
|
|
981
|
-
const a =
|
|
980
|
+
setup(s) {
|
|
981
|
+
const a = s, e = a.gridCtrl, t = e.page, o = a.editorCtrl, u = j(() => ue.currentRoute.value.path), i = [
|
|
982
982
|
{
|
|
983
983
|
key: "New",
|
|
984
984
|
label: "新增",
|
|
@@ -988,92 +988,92 @@ const Nl = async (r, a) => {
|
|
|
988
988
|
role: ["Super", "Admin"],
|
|
989
989
|
permit: ":new",
|
|
990
990
|
// 默认仅受权限码控制
|
|
991
|
-
click: () =>
|
|
991
|
+
click: () => $t(o)
|
|
992
992
|
}
|
|
993
|
-
], p = y([]),
|
|
994
|
-
return
|
|
993
|
+
], p = y([]), n = y([]);
|
|
994
|
+
return D(
|
|
995
995
|
() => {
|
|
996
|
-
var
|
|
997
|
-
return (
|
|
996
|
+
var c;
|
|
997
|
+
return (c = e.buttons) == null ? void 0 : c.value;
|
|
998
998
|
},
|
|
999
999
|
() => {
|
|
1000
|
-
var
|
|
1001
|
-
const { buttons:
|
|
1000
|
+
var r;
|
|
1001
|
+
const { buttons: c, menus: f } = Ce(
|
|
1002
1002
|
i,
|
|
1003
1003
|
e.flat !== void 0 ? e.flat : Ba,
|
|
1004
|
-
(
|
|
1004
|
+
(r = e.buttons) == null ? void 0 : r.value
|
|
1005
1005
|
);
|
|
1006
|
-
p.value.splice(0, p.value.length, ...
|
|
1006
|
+
p.value.splice(0, p.value.length, ...c), n.value.splice(0, n.value.length, ...f);
|
|
1007
1007
|
},
|
|
1008
1008
|
{
|
|
1009
1009
|
deep: !0,
|
|
1010
1010
|
immediate: !0
|
|
1011
1011
|
}
|
|
1012
|
-
), (
|
|
1013
|
-
const
|
|
1014
|
-
return v(),
|
|
1012
|
+
), (c, f) => {
|
|
1013
|
+
const r = re("auth");
|
|
1014
|
+
return v(), x("div", Ua, [
|
|
1015
1015
|
S(l(ie), null, {
|
|
1016
1016
|
default: h(() => [
|
|
1017
|
-
(v(!0),
|
|
1017
|
+
(v(!0), x(P, null, R(p.value, (m) => q((v(), b(l(Y), {
|
|
1018
1018
|
key: m.key,
|
|
1019
1019
|
type: m.type,
|
|
1020
1020
|
danger: m.danger,
|
|
1021
1021
|
disabled: l(te)(m),
|
|
1022
1022
|
icon: m.icon,
|
|
1023
|
-
onClick: (d) => l(
|
|
1023
|
+
onClick: (d) => l(W)(m, l(t), l(e))
|
|
1024
1024
|
}, {
|
|
1025
1025
|
default: h(() => [
|
|
1026
|
-
|
|
1026
|
+
z(U(m.label), 1)
|
|
1027
1027
|
]),
|
|
1028
1028
|
_: 2
|
|
1029
1029
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
1030
|
-
[
|
|
1030
|
+
[r, { url: u.value, role: m.role, permit: m.permit }]
|
|
1031
1031
|
])), 128)),
|
|
1032
|
-
|
|
1032
|
+
n.value.length > 0 ? (v(), b(l(Ee), { key: 0 }, {
|
|
1033
1033
|
overlay: h(() => [
|
|
1034
1034
|
S(l(ke), null, {
|
|
1035
1035
|
default: h(() => [
|
|
1036
|
-
(v(!0),
|
|
1036
|
+
(v(!0), x(P, null, R(n.value, (m) => q((v(), b(l(we), {
|
|
1037
1037
|
key: m.key,
|
|
1038
1038
|
disabled: l(te)(m),
|
|
1039
|
-
onClick: (d) => l(
|
|
1039
|
+
onClick: (d) => l(W)(m, l(t), l(e))
|
|
1040
1040
|
}, {
|
|
1041
1041
|
default: h(() => [
|
|
1042
|
-
|
|
1042
|
+
z(U(m.label), 1)
|
|
1043
1043
|
]),
|
|
1044
1044
|
_: 2
|
|
1045
1045
|
}, 1032, ["disabled", "onClick"])), [
|
|
1046
|
-
[
|
|
1046
|
+
[r, { url: u.value, role: m.role, permit: m.permit }]
|
|
1047
1047
|
])), 128))
|
|
1048
1048
|
]),
|
|
1049
1049
|
_: 1
|
|
1050
1050
|
})
|
|
1051
1051
|
]),
|
|
1052
1052
|
default: h(() => [
|
|
1053
|
-
S(l(
|
|
1053
|
+
S(l(Y), null, {
|
|
1054
1054
|
default: h(() => f[0] || (f[0] = [
|
|
1055
|
-
|
|
1055
|
+
z(" 更多操作 ")
|
|
1056
1056
|
])),
|
|
1057
1057
|
_: 1,
|
|
1058
1058
|
__: [0]
|
|
1059
1059
|
})
|
|
1060
1060
|
]),
|
|
1061
1061
|
_: 1
|
|
1062
|
-
})) :
|
|
1063
|
-
p.value.length === 0 &&
|
|
1062
|
+
})) : _("", !0),
|
|
1063
|
+
p.value.length === 0 && n.value.length === 0 ? (v(), x("span", Na)) : _("", !0)
|
|
1064
1064
|
]),
|
|
1065
1065
|
_: 1
|
|
1066
1066
|
}),
|
|
1067
1067
|
S(l(ie), { class: "mr-1" }, {
|
|
1068
1068
|
default: h(() => [
|
|
1069
|
-
(v(), b(
|
|
1069
|
+
(v(), b(lt(La), { "grid-ctrl": l(e) }, null, 8, ["grid-ctrl"]))
|
|
1070
1070
|
]),
|
|
1071
1071
|
_: 1
|
|
1072
1072
|
})
|
|
1073
1073
|
]);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
}),
|
|
1076
|
+
}), za = { class: "flex items-center justify-between" }, Ma = { class: "flex items-center space-x-2" }, ql = /* @__PURE__ */ T({
|
|
1077
1077
|
inheritAttrs: !1,
|
|
1078
1078
|
__name: "index",
|
|
1079
1079
|
props: {
|
|
@@ -1085,56 +1085,56 @@ const Nl = async (r, a) => {
|
|
|
1085
1085
|
titleField: { default: "Title" },
|
|
1086
1086
|
statusDisabled: {}
|
|
1087
1087
|
},
|
|
1088
|
-
setup(
|
|
1089
|
-
const a =
|
|
1088
|
+
setup(s) {
|
|
1089
|
+
const a = s, e = ne(), t = a.gridCtrl, o = j(() => ue.currentRoute.value.path);
|
|
1090
1090
|
t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
|
|
1091
|
-
const
|
|
1091
|
+
const u = y(t.pageSize.value), i = y(t.pageNo.value), p = y([]), n = y({
|
|
1092
1092
|
total: 0,
|
|
1093
1093
|
current: 1,
|
|
1094
|
-
pageSize:
|
|
1094
|
+
pageSize: u.value,
|
|
1095
1095
|
showTotal: (f) => `共 ${f} 条记录`,
|
|
1096
|
-
onChange: (f,
|
|
1097
|
-
|
|
1096
|
+
onChange: (f, r) => {
|
|
1097
|
+
n.value !== !1 && (n.value.current = f, n.value.pageSize = r), u.value = r, i.value = f, t && (t.pageNo.value = f, t.pageSize.value = r, t.remotePage && me(t));
|
|
1098
1098
|
},
|
|
1099
1099
|
...a.pagination === !1 ? {} : a.pagination
|
|
1100
1100
|
});
|
|
1101
|
-
a.pagination === !1 && (
|
|
1101
|
+
a.pagination === !1 && (n.value = !1), D(
|
|
1102
1102
|
() => t.tableData.value,
|
|
1103
1103
|
(f) => {
|
|
1104
|
-
f && (p.value = f,
|
|
1104
|
+
f && (p.value = f, n.value !== !1 && (n.value.total = t.total.value ?? 0, n.value.current = t.pageNo.value ?? 1, n.value.pageSize = t.pageSize.value ?? 10));
|
|
1105
1105
|
},
|
|
1106
1106
|
{ immediate: !0 }
|
|
1107
|
-
),
|
|
1107
|
+
), D(
|
|
1108
1108
|
() => a.listData,
|
|
1109
1109
|
(f) => {
|
|
1110
|
-
f && (p.value = f,
|
|
1110
|
+
f && (p.value = f, n.value !== !1 && (n.value.total = f.length, n.value.current = t.pageNo.value ?? 1, n.value.pageSize = t.pageSize.value ?? 10));
|
|
1111
1111
|
},
|
|
1112
1112
|
{ immediate: !0 }
|
|
1113
1113
|
);
|
|
1114
|
-
const
|
|
1115
|
-
return
|
|
1116
|
-
|
|
1114
|
+
const c = y(!1);
|
|
1115
|
+
return _e(() => {
|
|
1116
|
+
c.value && t && t.autoload && (t.reload.value = !0);
|
|
1117
1117
|
}), X(async () => {
|
|
1118
|
-
var f,
|
|
1119
|
-
|
|
1120
|
-
|
|
1118
|
+
var f, r, m, d, g;
|
|
1119
|
+
xe(ae.GridControl, t), t.page && ((f = t.gridUrl) != null && f.url) && (((r = t.gridUrl) == null ? void 0 : r.url) === ((m = t.page.urls.list) == null ? void 0 : m.url) && (t.remotePage = !1), ((d = t.gridUrl) == null ? void 0 : d.url) === ((g = t.page.urls.find) == null ? void 0 : g.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, n.value !== !1 && (n.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await me(t)).rows : p.value = await Xe(t)), setTimeout(() => {
|
|
1120
|
+
c.value = !0;
|
|
1121
1121
|
}, 50);
|
|
1122
|
-
}), (f,
|
|
1122
|
+
}), (f, r) => {
|
|
1123
1123
|
var d, g;
|
|
1124
1124
|
const m = re("auth");
|
|
1125
|
-
return v(),
|
|
1126
|
-
(d = l(t).buttons) != null && d.value.length || (g = l(t).tools) != null && g.length ? (v(), b(
|
|
1125
|
+
return v(), x(P, null, [
|
|
1126
|
+
(d = l(t).buttons) != null && d.value.length || (g = l(t).tools) != null && g.length ? (v(), b(xt, {
|
|
1127
1127
|
key: 0,
|
|
1128
1128
|
"grid-ctrl": l(t),
|
|
1129
1129
|
"editor-ctrl": l(t).editor
|
|
1130
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
1131
|
-
|
|
1130
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : _("", !0),
|
|
1131
|
+
c.value ? (v(), b(l(Gt), N({
|
|
1132
1132
|
key: 1,
|
|
1133
1133
|
class: "w-full min-h-[480px]",
|
|
1134
1134
|
grid: a.grid,
|
|
1135
1135
|
"data-source": p.value,
|
|
1136
1136
|
loading: l(t).isGridLoading.value,
|
|
1137
|
-
pagination:
|
|
1137
|
+
pagination: n.value
|
|
1138
1138
|
}, l(e)), {
|
|
1139
1139
|
renderItem: h(({ item: C }) => [
|
|
1140
1140
|
S(l(Jt), { class: "!m-0 !p-0" }, {
|
|
@@ -1145,15 +1145,15 @@ const Nl = async (r, a) => {
|
|
|
1145
1145
|
"body-style": { padding: "4px" }
|
|
1146
1146
|
}, {
|
|
1147
1147
|
title: h(() => [
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1148
|
+
F("div", za, [
|
|
1149
|
+
F("span", null, U(C[a.titleField]), 1),
|
|
1150
|
+
F("div", Ma, [
|
|
1151
|
+
q(S(Ze, {
|
|
1152
1152
|
checked: C[l(t).statusKey],
|
|
1153
|
-
"onUpdate:checked": (
|
|
1153
|
+
"onUpdate:checked": (I) => C[l(t).statusKey] = I,
|
|
1154
1154
|
disabled: f.statusDisabled ? f.statusDisabled(C) : !1,
|
|
1155
1155
|
data: l(Ne).EnableDisable,
|
|
1156
|
-
onClick: (
|
|
1156
|
+
onClick: (I) => l(et)(l(t), C),
|
|
1157
1157
|
size: "small",
|
|
1158
1158
|
class: E([
|
|
1159
1159
|
"relative mt-[3px] transform scale-[1.1]",
|
|
@@ -1171,7 +1171,7 @@ const Nl = async (r, a) => {
|
|
|
1171
1171
|
])
|
|
1172
1172
|
]),
|
|
1173
1173
|
default: h(() => [
|
|
1174
|
-
|
|
1174
|
+
L(f.$slots, "cardContent", { record: C })
|
|
1175
1175
|
]),
|
|
1176
1176
|
_: 2
|
|
1177
1177
|
}, 1024)
|
|
@@ -1180,14 +1180,14 @@ const Nl = async (r, a) => {
|
|
|
1180
1180
|
}, 1024)
|
|
1181
1181
|
]),
|
|
1182
1182
|
_: 3
|
|
1183
|
-
}, 16, ["grid", "data-source", "loading", "pagination"])) :
|
|
1183
|
+
}, 16, ["grid", "data-source", "loading", "pagination"])) : _("", !0)
|
|
1184
1184
|
], 64);
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
1187
|
}), Oa = { class: "w-1/3 relative mb-1" }, Aa = { class: "flex items-center w-[90%]" }, Ra = { class: "flex-grow pl-1" }, Ka = {
|
|
1188
1188
|
key: 0,
|
|
1189
1189
|
class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
|
|
1190
|
-
},
|
|
1190
|
+
}, Ie = /* @__PURE__ */ T({
|
|
1191
1191
|
inheritAttrs: !1,
|
|
1192
1192
|
__name: "searchItem",
|
|
1193
1193
|
props: {
|
|
@@ -1195,26 +1195,26 @@ const Nl = async (r, a) => {
|
|
|
1195
1195
|
width: {},
|
|
1196
1196
|
rule: {}
|
|
1197
1197
|
},
|
|
1198
|
-
setup(
|
|
1199
|
-
const a =
|
|
1198
|
+
setup(s) {
|
|
1199
|
+
const a = s, e = ne(), t = ge(ae.EditorControl, void 0), o = qe(a, t), u = j(() => {
|
|
1200
1200
|
var p;
|
|
1201
1201
|
if (!a.rule)
|
|
1202
1202
|
return !1;
|
|
1203
1203
|
const i = He(a.rule.split("."), (p = t == null ? void 0 : t.formRules) == null ? void 0 : p.value);
|
|
1204
1204
|
return i ? (i.required || (o.value.errClass = "", o.value.msg = ""), i.required ?? !0) : (G.error(`"${a.label}" 的验证规则 \`${a.rule}\` 不存在`), o.value.errClass = "text-[#ff4d4f]", o.value.msg = `规则 \`${a.rule}\` 不存在,请检查代码!`, !0);
|
|
1205
1205
|
});
|
|
1206
|
-
return (i, p) => (v(),
|
|
1207
|
-
S(l(
|
|
1208
|
-
required:
|
|
1206
|
+
return (i, p) => (v(), x("div", Oa, [
|
|
1207
|
+
S(l(nt), N({
|
|
1208
|
+
required: u.value,
|
|
1209
1209
|
class: "w-[90%] relative"
|
|
1210
1210
|
}, l(e), {
|
|
1211
1211
|
class: [i.rule ? "" : "mb-3", i.width],
|
|
1212
1212
|
labelCol: { span: 6 }
|
|
1213
|
-
}),
|
|
1213
|
+
}), rt({
|
|
1214
1214
|
default: h(() => [
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1215
|
+
F("div", Aa, [
|
|
1216
|
+
F("div", Ra, [
|
|
1217
|
+
L(i.$slots, "default")
|
|
1218
1218
|
])
|
|
1219
1219
|
])
|
|
1220
1220
|
]),
|
|
@@ -1223,17 +1223,17 @@ const Nl = async (r, a) => {
|
|
|
1223
1223
|
i.label ? {
|
|
1224
1224
|
name: "label",
|
|
1225
1225
|
fn: h(() => [
|
|
1226
|
-
|
|
1226
|
+
F("span", {
|
|
1227
1227
|
class: E([l(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
1228
|
-
},
|
|
1228
|
+
}, U(i.label), 3)
|
|
1229
1229
|
]),
|
|
1230
1230
|
key: "0"
|
|
1231
1231
|
} : void 0
|
|
1232
1232
|
]), 1040, ["required", "class"]),
|
|
1233
|
-
l(o).msg ? (v(),
|
|
1233
|
+
l(o).msg ? (v(), x("span", Ka, U(l(o).msg), 1)) : _("", !0)
|
|
1234
1234
|
]));
|
|
1235
1235
|
}
|
|
1236
|
-
}),
|
|
1236
|
+
}), Hl = /* @__PURE__ */ T({
|
|
1237
1237
|
__name: "index",
|
|
1238
1238
|
props: {
|
|
1239
1239
|
search: {},
|
|
@@ -1241,28 +1241,28 @@ const Nl = async (r, a) => {
|
|
|
1241
1241
|
likeFields: {}
|
|
1242
1242
|
},
|
|
1243
1243
|
emits: ["update:search", "onsearch", "onreset"],
|
|
1244
|
-
setup(
|
|
1245
|
-
const e =
|
|
1244
|
+
setup(s, { emit: a }) {
|
|
1245
|
+
const e = s, t = a, o = y(0), u = y(0), i = y(0), p = (d) => {
|
|
1246
1246
|
let g = 0;
|
|
1247
1247
|
for (let C = 0; C < d.length; C++)
|
|
1248
1248
|
typeof d[C].type == "object" && g++;
|
|
1249
1249
|
return g;
|
|
1250
|
-
},
|
|
1251
|
-
|
|
1250
|
+
}, n = jt(), c = () => {
|
|
1251
|
+
u.value = 0, i.value = 0, n.default && (u.value = p(n.default({}))), e.gridCtrl && e.gridCtrl.searchBar && n.control && (i.value = p(n.control({}))), o.value = 2 - (u.value + i.value) % 3;
|
|
1252
1252
|
};
|
|
1253
|
-
|
|
1253
|
+
D(
|
|
1254
1254
|
() => {
|
|
1255
1255
|
var d;
|
|
1256
1256
|
return (d = e.gridCtrl) == null ? void 0 : d.searchBar;
|
|
1257
1257
|
},
|
|
1258
1258
|
() => {
|
|
1259
|
-
|
|
1259
|
+
c();
|
|
1260
1260
|
}
|
|
1261
1261
|
);
|
|
1262
1262
|
const f = JSON.parse(JSON.stringify(e.search));
|
|
1263
1263
|
X(() => {
|
|
1264
1264
|
var g;
|
|
1265
|
-
|
|
1265
|
+
c();
|
|
1266
1266
|
let d = { ...e.search };
|
|
1267
1267
|
e.gridCtrl && (e.gridCtrl.gridQuery = {
|
|
1268
1268
|
...e.gridCtrl.gridQuery,
|
|
@@ -1272,7 +1272,7 @@ const Nl = async (r, a) => {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
});
|
|
1274
1274
|
});
|
|
1275
|
-
const
|
|
1275
|
+
const r = () => {
|
|
1276
1276
|
var g;
|
|
1277
1277
|
let d = { ...e.search };
|
|
1278
1278
|
if (e.likeFields)
|
|
@@ -1293,7 +1293,7 @@ const Nl = async (r, a) => {
|
|
|
1293
1293
|
};
|
|
1294
1294
|
return (d, g) => {
|
|
1295
1295
|
const C = re("submit");
|
|
1296
|
-
return
|
|
1296
|
+
return u.value + i.value > 0 ? q((v(), b(l(ot), {
|
|
1297
1297
|
key: 0,
|
|
1298
1298
|
"label-col": { flex: "60px" },
|
|
1299
1299
|
style: {
|
|
@@ -1303,19 +1303,19 @@ const Nl = async (r, a) => {
|
|
|
1303
1303
|
class: "flex mb-[10px]"
|
|
1304
1304
|
}, {
|
|
1305
1305
|
default: h(() => {
|
|
1306
|
-
var
|
|
1306
|
+
var I, B;
|
|
1307
1307
|
return [
|
|
1308
|
-
|
|
1309
|
-
(
|
|
1310
|
-
o.value >= 1 ? (v(), b(
|
|
1308
|
+
L(d.$slots, "default"),
|
|
1309
|
+
(I = d.gridCtrl) != null && I.searchBar ? L(d.$slots, "control", { key: 0 }) : _("", !0),
|
|
1310
|
+
o.value >= 1 ? (v(), b(Ie, {
|
|
1311
1311
|
key: 1,
|
|
1312
1312
|
class: "w-1/3"
|
|
1313
|
-
})) :
|
|
1314
|
-
o.value >= 2 ? (v(), b(
|
|
1313
|
+
})) : _("", !0),
|
|
1314
|
+
o.value >= 2 ? (v(), b(Ie, {
|
|
1315
1315
|
key: 2,
|
|
1316
1316
|
class: "w-1/3"
|
|
1317
|
-
})) :
|
|
1318
|
-
|
|
1317
|
+
})) : _("", !0),
|
|
1318
|
+
u.value || (B = d.gridCtrl) != null && B.searchBar ? (v(), b(Ie, {
|
|
1319
1319
|
key: 3,
|
|
1320
1320
|
class: "w-1/3 flex justify-end text-right pr-5",
|
|
1321
1321
|
"wrapper-col": { flex: "auto" }
|
|
@@ -1323,23 +1323,23 @@ const Nl = async (r, a) => {
|
|
|
1323
1323
|
default: h(() => [
|
|
1324
1324
|
S(l(ie), null, {
|
|
1325
1325
|
default: h(() => [
|
|
1326
|
-
S(l(
|
|
1326
|
+
S(l(Y), {
|
|
1327
1327
|
type: "primary",
|
|
1328
|
-
onClick:
|
|
1328
|
+
onClick: r,
|
|
1329
1329
|
icon: "icon-search"
|
|
1330
1330
|
}, {
|
|
1331
1331
|
default: h(() => g[0] || (g[0] = [
|
|
1332
|
-
|
|
1332
|
+
z("搜索")
|
|
1333
1333
|
])),
|
|
1334
1334
|
_: 1,
|
|
1335
1335
|
__: [0]
|
|
1336
1336
|
}),
|
|
1337
|
-
S(l(
|
|
1337
|
+
S(l(Y), {
|
|
1338
1338
|
onClick: m,
|
|
1339
1339
|
icon: "icon-reset"
|
|
1340
1340
|
}, {
|
|
1341
1341
|
default: h(() => g[1] || (g[1] = [
|
|
1342
|
-
|
|
1342
|
+
z("重置")
|
|
1343
1343
|
])),
|
|
1344
1344
|
_: 1,
|
|
1345
1345
|
__: [1]
|
|
@@ -1349,13 +1349,13 @@ const Nl = async (r, a) => {
|
|
|
1349
1349
|
})
|
|
1350
1350
|
]),
|
|
1351
1351
|
_: 1
|
|
1352
|
-
})) :
|
|
1352
|
+
})) : _("", !0)
|
|
1353
1353
|
];
|
|
1354
1354
|
}),
|
|
1355
1355
|
_: 3
|
|
1356
1356
|
})), [
|
|
1357
|
-
[C,
|
|
1358
|
-
]) :
|
|
1357
|
+
[C, r]
|
|
1358
|
+
]) : _("", !0);
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
}), ja = /* @__PURE__ */ T({
|
|
@@ -1364,8 +1364,8 @@ const Nl = async (r, a) => {
|
|
|
1364
1364
|
record: {},
|
|
1365
1365
|
gridCtrl: {}
|
|
1366
1366
|
},
|
|
1367
|
-
setup(
|
|
1368
|
-
const a =
|
|
1367
|
+
setup(s) {
|
|
1368
|
+
const a = s, e = a.gridCtrl, t = j(() => ue.currentRoute.value.path), o = [
|
|
1369
1369
|
{
|
|
1370
1370
|
key: "Edit",
|
|
1371
1371
|
label: "编辑",
|
|
@@ -1387,13 +1387,13 @@ const Nl = async (r, a) => {
|
|
|
1387
1387
|
confirmText: "是否删除此记录?",
|
|
1388
1388
|
click: () => Ge(e, a.record)
|
|
1389
1389
|
}
|
|
1390
|
-
], { buttons:
|
|
1391
|
-
if (typeof
|
|
1392
|
-
return
|
|
1393
|
-
if (typeof
|
|
1394
|
-
return te(
|
|
1390
|
+
], { buttons: u, menus: i } = Ce(o, 0, e.operates), p = (n) => {
|
|
1391
|
+
if (typeof n.disabled == "boolean")
|
|
1392
|
+
return n.disabled;
|
|
1393
|
+
if (typeof n.disabled == "function")
|
|
1394
|
+
return te(n, a.record) ?? !1;
|
|
1395
1395
|
if (a.record.hasOwnProperty(e.statusKey))
|
|
1396
|
-
switch (
|
|
1396
|
+
switch (n.key) {
|
|
1397
1397
|
case "Edit":
|
|
1398
1398
|
return !a.record[e.statusKey];
|
|
1399
1399
|
// 启用时可编辑,停用时不可编辑
|
|
@@ -1402,7 +1402,7 @@ const Nl = async (r, a) => {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
return !1;
|
|
1404
1404
|
};
|
|
1405
|
-
return (
|
|
1405
|
+
return (n, c) => {
|
|
1406
1406
|
const f = re("auth");
|
|
1407
1407
|
return v(), b(l(be), { theme: {
|
|
1408
1408
|
token: {
|
|
@@ -1412,83 +1412,83 @@ const Nl = async (r, a) => {
|
|
|
1412
1412
|
default: h(() => [
|
|
1413
1413
|
S(l(ie), null, {
|
|
1414
1414
|
default: h(() => [
|
|
1415
|
-
(v(!0),
|
|
1416
|
-
key:
|
|
1415
|
+
(v(!0), x(P, null, R(l(u), (r) => (v(), x(P, {
|
|
1416
|
+
key: r.key
|
|
1417
1417
|
}, [
|
|
1418
|
-
l(J)(
|
|
1418
|
+
l(J)(r, a.record) ? (v(), b(l(it), {
|
|
1419
1419
|
key: 0,
|
|
1420
|
-
disabled: p(
|
|
1420
|
+
disabled: p(r) || !r.confirm,
|
|
1421
1421
|
cancelText: "否",
|
|
1422
1422
|
okText: "是",
|
|
1423
|
-
title:
|
|
1423
|
+
title: r.confirmText,
|
|
1424
1424
|
okButtonProps: { size: "small" },
|
|
1425
1425
|
cancelButtonProps: { size: "small" },
|
|
1426
|
-
onConfirm: (m) => l(
|
|
1426
|
+
onConfirm: (m) => l(W)(r, l(e).page, l(e), a.record, !0)
|
|
1427
1427
|
}, {
|
|
1428
1428
|
default: h(() => [
|
|
1429
|
-
l(J)(
|
|
1430
|
-
key:
|
|
1431
|
-
type:
|
|
1432
|
-
danger:
|
|
1433
|
-
disabled: p(
|
|
1434
|
-
onClick: (m) => l(
|
|
1429
|
+
l(J)(r, a.record) ? q((v(), b(l(ct), {
|
|
1430
|
+
key: r.key,
|
|
1431
|
+
type: r.type ?? "text",
|
|
1432
|
+
danger: r.danger,
|
|
1433
|
+
disabled: p(r),
|
|
1434
|
+
onClick: (m) => l(W)(r, l(e).page, l(e), a.record),
|
|
1435
1435
|
size: "small",
|
|
1436
|
-
style:
|
|
1437
|
-
padding:
|
|
1436
|
+
style: Me({
|
|
1437
|
+
padding: r.type ?? "0px 4px"
|
|
1438
1438
|
})
|
|
1439
1439
|
}, {
|
|
1440
1440
|
default: h(() => [
|
|
1441
|
-
|
|
1441
|
+
z(U(r.label), 1)
|
|
1442
1442
|
]),
|
|
1443
1443
|
_: 2
|
|
1444
1444
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
1445
|
-
[f, { url: t.value, role:
|
|
1446
|
-
]) :
|
|
1445
|
+
[f, { url: t.value, role: r.role, permit: r.permit }]
|
|
1446
|
+
]) : _("", !0)
|
|
1447
1447
|
]),
|
|
1448
1448
|
_: 2
|
|
1449
|
-
}, 1032, ["disabled", "title", "onConfirm"])) :
|
|
1449
|
+
}, 1032, ["disabled", "title", "onConfirm"])) : _("", !0)
|
|
1450
1450
|
], 64))), 128)),
|
|
1451
|
-
|
|
1451
|
+
n.record[l(e).statusKey] == 1 ? (v(), b(l(be), {
|
|
1452
1452
|
key: 0,
|
|
1453
1453
|
autoInsertSpaceInButton: !1
|
|
1454
1454
|
}, {
|
|
1455
1455
|
default: h(() => [
|
|
1456
|
-
l(i).length > 0 ? (v(), b(l(
|
|
1456
|
+
l(i).length > 0 ? (v(), b(l(ut), {
|
|
1457
1457
|
key: 0,
|
|
1458
1458
|
size: "small"
|
|
1459
1459
|
}, {
|
|
1460
1460
|
overlay: h(() => [
|
|
1461
1461
|
S(l(ke), null, {
|
|
1462
1462
|
default: h(() => [
|
|
1463
|
-
(v(!0),
|
|
1464
|
-
key:
|
|
1463
|
+
(v(!0), x(P, null, R(l(i), (r) => (v(), x(P, {
|
|
1464
|
+
key: r.key
|
|
1465
1465
|
}, [
|
|
1466
|
-
l(J)(
|
|
1466
|
+
l(J)(r, a.record) ? q((v(), b(l(we), {
|
|
1467
1467
|
key: 0,
|
|
1468
|
-
disabled: p(
|
|
1469
|
-
onClick: (m) => l(
|
|
1468
|
+
disabled: p(r),
|
|
1469
|
+
onClick: (m) => l(W)(r, l(e).page, l(e), a.record)
|
|
1470
1470
|
}, {
|
|
1471
1471
|
default: h(() => [
|
|
1472
|
-
|
|
1472
|
+
z(U(r.label), 1)
|
|
1473
1473
|
]),
|
|
1474
1474
|
_: 2
|
|
1475
1475
|
}, 1032, ["disabled", "onClick"])), [
|
|
1476
|
-
[f, { url: t.value, role:
|
|
1477
|
-
]) :
|
|
1476
|
+
[f, { url: t.value, role: r.role, permit: r.permit }]
|
|
1477
|
+
]) : _("", !0)
|
|
1478
1478
|
], 64))), 128))
|
|
1479
1479
|
]),
|
|
1480
1480
|
_: 1
|
|
1481
1481
|
})
|
|
1482
1482
|
]),
|
|
1483
1483
|
default: h(() => [
|
|
1484
|
-
|
|
1484
|
+
c[0] || (c[0] = z(" 更多 "))
|
|
1485
1485
|
]),
|
|
1486
1486
|
_: 1,
|
|
1487
1487
|
__: [0]
|
|
1488
|
-
})) :
|
|
1488
|
+
})) : _("", !0)
|
|
1489
1489
|
]),
|
|
1490
1490
|
_: 1
|
|
1491
|
-
})) :
|
|
1491
|
+
})) : _("", !0)
|
|
1492
1492
|
]),
|
|
1493
1493
|
_: 1
|
|
1494
1494
|
})
|
|
@@ -1497,7 +1497,7 @@ const Nl = async (r, a) => {
|
|
|
1497
1497
|
});
|
|
1498
1498
|
};
|
|
1499
1499
|
}
|
|
1500
|
-
}),
|
|
1500
|
+
}), Ql = /* @__PURE__ */ T({
|
|
1501
1501
|
inheritAttrs: !1,
|
|
1502
1502
|
__name: "index",
|
|
1503
1503
|
props: {
|
|
@@ -1509,33 +1509,33 @@ const Nl = async (r, a) => {
|
|
|
1509
1509
|
scroll: {},
|
|
1510
1510
|
statusDisabled: {}
|
|
1511
1511
|
},
|
|
1512
|
-
setup(
|
|
1513
|
-
const a =
|
|
1512
|
+
setup(s) {
|
|
1513
|
+
const a = s, e = ne(), t = a.gridCtrl, o = j(() => ue.currentRoute.value.path);
|
|
1514
1514
|
t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
|
|
1515
|
-
const
|
|
1515
|
+
const u = y(t.pageSize.value), i = y(t.pageNo.value), p = y([]), n = y({
|
|
1516
1516
|
total: 0,
|
|
1517
1517
|
current: 1,
|
|
1518
|
-
pageSize:
|
|
1518
|
+
pageSize: u.value,
|
|
1519
1519
|
showTotal: (d) => `共 ${d} 条记录`,
|
|
1520
1520
|
onChange: (d, g) => {
|
|
1521
|
-
|
|
1521
|
+
n.value !== !1 && (n.value.current = d, n.value.pageSize = g), u.value = g, i.value = d, t && (t.pageNo.value = d, t.pageSize.value = g, t.remotePage && me(t));
|
|
1522
1522
|
},
|
|
1523
1523
|
...a.pagination === !1 ? {} : a.pagination
|
|
1524
1524
|
});
|
|
1525
|
-
a.pagination === !1 && (
|
|
1525
|
+
a.pagination === !1 && (n.value = !1), D(
|
|
1526
1526
|
() => t.tableData.value,
|
|
1527
1527
|
(d) => {
|
|
1528
|
-
d && (p.value = d,
|
|
1528
|
+
d && (p.value = d, n.value !== !1 && (n.value.total = t.total.value ?? 0, n.value.current = t.pageNo.value ?? 1, n.value.pageSize = t.pageSize.value ?? 10));
|
|
1529
1529
|
},
|
|
1530
1530
|
{ immediate: !0 }
|
|
1531
|
-
),
|
|
1531
|
+
), D(
|
|
1532
1532
|
() => a.tableData,
|
|
1533
1533
|
(d) => {
|
|
1534
|
-
d && (p.value = d,
|
|
1534
|
+
d && (p.value = d, n.value !== !1 && (n.value.total = d.length, n.value.current = t.pageNo.value ?? 1, n.value.pageSize = t.pageSize.value ?? 10));
|
|
1535
1535
|
},
|
|
1536
1536
|
{ immediate: !0 }
|
|
1537
1537
|
);
|
|
1538
|
-
const
|
|
1538
|
+
const c = y(t.columns.value), f = {
|
|
1539
1539
|
onChange: (d, g) => {
|
|
1540
1540
|
t && (t.selectKeys.value = d, t.selectRows.value = g);
|
|
1541
1541
|
},
|
|
@@ -1544,58 +1544,58 @@ const Nl = async (r, a) => {
|
|
|
1544
1544
|
disabled: d.Enabled === 0
|
|
1545
1545
|
}),
|
|
1546
1546
|
...a.rowSelection
|
|
1547
|
-
},
|
|
1548
|
-
|
|
1547
|
+
}, r = y(f);
|
|
1548
|
+
D(
|
|
1549
1549
|
() => t.selectable.value,
|
|
1550
1550
|
(d) => {
|
|
1551
|
-
t && (
|
|
1551
|
+
t && (r.value = d ? f : void 0);
|
|
1552
1552
|
},
|
|
1553
1553
|
{ immediate: !0 }
|
|
1554
|
-
),
|
|
1554
|
+
), D(
|
|
1555
1555
|
() => t.columns.value,
|
|
1556
1556
|
() => {
|
|
1557
|
-
|
|
1557
|
+
c.value = Je(t.columns.value);
|
|
1558
1558
|
},
|
|
1559
1559
|
{ deep: !0, immediate: !0 }
|
|
1560
1560
|
);
|
|
1561
1561
|
const m = y(!1);
|
|
1562
|
-
return
|
|
1562
|
+
return _e(() => {
|
|
1563
1563
|
m.value && t && t.autoload && (t.reload.value = !0);
|
|
1564
1564
|
}), X(async () => {
|
|
1565
|
-
var d, g, C,
|
|
1566
|
-
|
|
1565
|
+
var d, g, C, I, B;
|
|
1566
|
+
xe(ae.GridControl, t), t.page && ((d = t.gridUrl) != null && d.url) && (((g = t.gridUrl) == null ? void 0 : g.url) === ((C = t.page.urls.list) == null ? void 0 : C.url) && (t.remotePage = !1), ((I = t.gridUrl) == null ? void 0 : I.url) === ((B = t.page.urls.find) == null ? void 0 : B.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, n.value !== !1 && (n.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await me(t)).rows : p.value = await Xe(t)), setTimeout(() => {
|
|
1567
1567
|
m.value = !0;
|
|
1568
1568
|
}, 50);
|
|
1569
1569
|
}), (d, g) => {
|
|
1570
|
-
var
|
|
1570
|
+
var I, B;
|
|
1571
1571
|
const C = re("auth");
|
|
1572
|
-
return v(),
|
|
1573
|
-
(
|
|
1572
|
+
return v(), x(P, null, [
|
|
1573
|
+
(I = l(t).buttons) != null && I.value.length || (B = l(t).tools) != null && B.length ? (v(), b(xt, {
|
|
1574
1574
|
key: 0,
|
|
1575
1575
|
"grid-ctrl": l(t),
|
|
1576
1576
|
"editor-ctrl": l(t).editor
|
|
1577
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
1578
|
-
m.value ? (v(), b(l(
|
|
1577
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : _("", !0),
|
|
1578
|
+
m.value ? (v(), b(l(dt), N({
|
|
1579
1579
|
key: 1,
|
|
1580
1580
|
class: "w-full min-h-[480px]",
|
|
1581
1581
|
"row-key": a.primaryKey ?? l(t).primaryKey ?? "Id",
|
|
1582
1582
|
"data-source": p.value,
|
|
1583
1583
|
loading: l(t).isGridLoading.value,
|
|
1584
|
-
columns:
|
|
1585
|
-
pagination:
|
|
1586
|
-
"row-selection":
|
|
1584
|
+
columns: c.value,
|
|
1585
|
+
pagination: n.value,
|
|
1586
|
+
"row-selection": r.value,
|
|
1587
1587
|
scroll: a.scroll || { x: 700 },
|
|
1588
1588
|
size: l(t).tableSize.value,
|
|
1589
1589
|
bordered: ""
|
|
1590
1590
|
}, l(e)), {
|
|
1591
1591
|
bodyCell: h(($) => {
|
|
1592
|
-
var A,
|
|
1592
|
+
var A, Q;
|
|
1593
1593
|
return [
|
|
1594
|
-
|
|
1594
|
+
L(d.$slots, "bodyCell", {
|
|
1595
1595
|
column: $ == null ? void 0 : $.column,
|
|
1596
1596
|
record: $ == null ? void 0 : $.record
|
|
1597
1597
|
}),
|
|
1598
|
-
l(t) && ((A = $ == null ? void 0 : $.column) == null ? void 0 : A.dataIndex) === "enabled" ?
|
|
1598
|
+
l(t) && ((A = $ == null ? void 0 : $.column) == null ? void 0 : A.dataIndex) === "enabled" ? q((v(), b(Ze, {
|
|
1599
1599
|
key: 0,
|
|
1600
1600
|
checked: $.record[l(t).statusKey],
|
|
1601
1601
|
"onUpdate:checked": (Z) => $.record[l(t).statusKey] = Z,
|
|
@@ -1609,8 +1609,8 @@ const Nl = async (r, a) => {
|
|
|
1609
1609
|
loading: $ == null ? void 0 : $.record.isLoading
|
|
1610
1610
|
}, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
|
|
1611
1611
|
[C, { url: o.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
|
|
1612
|
-
]) :
|
|
1613
|
-
l(t) && ((
|
|
1612
|
+
]) : _("", !0),
|
|
1613
|
+
l(t) && ((Q = $ == null ? void 0 : $.column) == null ? void 0 : Q.dataIndex) === "operation" ? L(d.$slots, "operate", {
|
|
1614
1614
|
key: 1,
|
|
1615
1615
|
record: $ == null ? void 0 : $.record
|
|
1616
1616
|
}, () => [
|
|
@@ -1618,15 +1618,79 @@ const Nl = async (r, a) => {
|
|
|
1618
1618
|
record: $ == null ? void 0 : $.record,
|
|
1619
1619
|
"grid-ctrl": l(t)
|
|
1620
1620
|
}, null, 8, ["record", "grid-ctrl"])
|
|
1621
|
-
]) :
|
|
1621
|
+
]) : _("", !0)
|
|
1622
1622
|
];
|
|
1623
1623
|
}),
|
|
1624
1624
|
_: 3
|
|
1625
|
-
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) :
|
|
1625
|
+
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : _("", !0)
|
|
1626
1626
|
], 64);
|
|
1627
1627
|
};
|
|
1628
1628
|
}
|
|
1629
|
-
}), Va = { class: "flex items-center
|
|
1629
|
+
}), Va = { class: "flex items-center" }, Ya = {
|
|
1630
|
+
key: 0,
|
|
1631
|
+
class: "inline-flex [&>button]:ml-[-1px] first:[&>button]:ml-0"
|
|
1632
|
+
}, Wa = {
|
|
1633
|
+
key: 1,
|
|
1634
|
+
class: "w-[1px] h-[16px] bg-[#d9d9d9] mx-[8px]"
|
|
1635
|
+
}, Gl = /* @__PURE__ */ T({
|
|
1636
|
+
__name: "groupTools",
|
|
1637
|
+
props: {
|
|
1638
|
+
groupTools: {}
|
|
1639
|
+
},
|
|
1640
|
+
setup(s) {
|
|
1641
|
+
const a = (o) => {
|
|
1642
|
+
o.click && o.click({}, void 0, void 0);
|
|
1643
|
+
}, e = (o) => typeof o.visible == "boolean" ? o.visible : typeof o.visible == "function" ? o.visible({}) : !0, t = (o) => typeof o.disabled == "boolean" ? o.disabled : typeof o.disabled == "function" ? o.disabled({}) : !1;
|
|
1644
|
+
return (o, u) => (v(), x("div", Va, [
|
|
1645
|
+
(v(!0), x(P, null, R(o.groupTools, (i, p) => (v(), x(P, { key: p }, [
|
|
1646
|
+
i.type === "tools" ? (v(), x("div", Ya, [
|
|
1647
|
+
(v(!0), x(P, null, R(i.tools, (n, c) => {
|
|
1648
|
+
var f;
|
|
1649
|
+
return v(), x(P, {
|
|
1650
|
+
key: n.key
|
|
1651
|
+
}, [
|
|
1652
|
+
e(n) && !n.children ? (v(), b(l(Y), {
|
|
1653
|
+
key: 0,
|
|
1654
|
+
class: E([
|
|
1655
|
+
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
1656
|
+
c === 0 ? "rounded-l-[5px]" : "",
|
|
1657
|
+
c === (((f = i.tools) == null ? void 0 : f.length) || 0) - 1 ? "rounded-r-[5px]" : "",
|
|
1658
|
+
n.class || ""
|
|
1659
|
+
]),
|
|
1660
|
+
type: n.type,
|
|
1661
|
+
danger: n.danger,
|
|
1662
|
+
disabled: t(n),
|
|
1663
|
+
tiptext: n.label,
|
|
1664
|
+
onClick: (r) => a(n)
|
|
1665
|
+
}, {
|
|
1666
|
+
default: h(() => [
|
|
1667
|
+
n.icon ? (v(), b(l(K), {
|
|
1668
|
+
key: 0,
|
|
1669
|
+
icon: n.icon,
|
|
1670
|
+
class: "w-[18px] h-[18.5px]",
|
|
1671
|
+
clickable: ""
|
|
1672
|
+
}, null, 8, ["icon"])) : _("", !0),
|
|
1673
|
+
n.label ? (v(), x(P, { key: 1 }, [
|
|
1674
|
+
z(U(n.label), 1)
|
|
1675
|
+
], 64)) : _("", !0)
|
|
1676
|
+
]),
|
|
1677
|
+
_: 2
|
|
1678
|
+
}, 1032, ["class", "type", "danger", "disabled", "tiptext", "onClick"])) : n.component ? (v(), b(lt(n.component), N({
|
|
1679
|
+
key: 1,
|
|
1680
|
+
ref_for: !0
|
|
1681
|
+
}, n.props, {
|
|
1682
|
+
onClick: (r) => a(n)
|
|
1683
|
+
}), null, 16, ["onClick"])) : _("", !0)
|
|
1684
|
+
], 64);
|
|
1685
|
+
}), 128))
|
|
1686
|
+
])) : i.type === "split" ? (v(), x("div", Wa)) : i.type === "space" ? (v(), x("div", {
|
|
1687
|
+
key: 2,
|
|
1688
|
+
class: E(i.width ? i.width : "flex-1")
|
|
1689
|
+
}, null, 2)) : _("", !0)
|
|
1690
|
+
], 64))), 128))
|
|
1691
|
+
]));
|
|
1692
|
+
}
|
|
1693
|
+
}), qa = { class: "flex items-center gap-1" }, Ha = { class: "text-nowrap" }, Jl = /* @__PURE__ */ T({
|
|
1630
1694
|
__name: "index",
|
|
1631
1695
|
props: {
|
|
1632
1696
|
treeCtrl: {},
|
|
@@ -1634,50 +1698,50 @@ const Nl = async (r, a) => {
|
|
|
1634
1698
|
expandedKeys: {}
|
|
1635
1699
|
},
|
|
1636
1700
|
emits: ["select", "update:selectedKeys"],
|
|
1637
|
-
setup(
|
|
1638
|
-
const e =
|
|
1639
|
-
|
|
1701
|
+
setup(s, { emit: a }) {
|
|
1702
|
+
const e = s, t = ne(), o = e.treeCtrl, u = y([]);
|
|
1703
|
+
D(
|
|
1640
1704
|
() => o.data.value,
|
|
1641
1705
|
(f) => {
|
|
1642
1706
|
if (f) {
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
if (
|
|
1707
|
+
u.value = o.fieldMap ? he(o.fieldMap, f) : f;
|
|
1708
|
+
const r = Tt(u.value, p.value[0]);
|
|
1709
|
+
if (r) {
|
|
1646
1710
|
const m = {
|
|
1647
1711
|
event: "select",
|
|
1648
1712
|
node: {
|
|
1649
1713
|
// 根据你的TreeNode结构构建node对象
|
|
1650
|
-
key:
|
|
1651
|
-
title:
|
|
1714
|
+
key: r.key,
|
|
1715
|
+
title: r.title,
|
|
1652
1716
|
checked: !0,
|
|
1653
|
-
dataRef:
|
|
1717
|
+
dataRef: r
|
|
1654
1718
|
},
|
|
1655
1719
|
selected: !0,
|
|
1656
|
-
selectedNodes: [
|
|
1720
|
+
selectedNodes: [r]
|
|
1657
1721
|
};
|
|
1658
|
-
|
|
1722
|
+
c(p.value, m);
|
|
1659
1723
|
}
|
|
1660
1724
|
}
|
|
1661
1725
|
}
|
|
1662
1726
|
);
|
|
1663
1727
|
const i = a, p = y([]);
|
|
1664
|
-
|
|
1728
|
+
D(
|
|
1665
1729
|
() => e.selectedKeys,
|
|
1666
1730
|
(f) => {
|
|
1667
1731
|
f && (p.value = f);
|
|
1668
1732
|
},
|
|
1669
1733
|
{ immediate: !0 }
|
|
1670
1734
|
);
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1735
|
+
const n = y(["-"]);
|
|
1736
|
+
D(
|
|
1673
1737
|
() => e.expandedKeys,
|
|
1674
1738
|
(f) => {
|
|
1675
|
-
f && (
|
|
1739
|
+
f && (n.value = f);
|
|
1676
1740
|
},
|
|
1677
1741
|
{ immediate: !0 }
|
|
1678
1742
|
);
|
|
1679
|
-
const
|
|
1680
|
-
f.length === 0 && f.push(...p.value), f.length > 0 && (o.node.value =
|
|
1743
|
+
const c = (f, r) => {
|
|
1744
|
+
f.length === 0 && f.push(...p.value), f.length > 0 && (o.node.value = r == null ? void 0 : r.node.dataRef), p.value = f, i("update:selectedKeys", f), i("select", f, r);
|
|
1681
1745
|
};
|
|
1682
1746
|
return X(() => {
|
|
1683
1747
|
o.fieldMap || (o.fieldMap = {
|
|
@@ -1685,62 +1749,62 @@ const Nl = async (r, a) => {
|
|
|
1685
1749
|
key: "Id",
|
|
1686
1750
|
value: "Id",
|
|
1687
1751
|
icon: "Icon"
|
|
1688
|
-
}), o.data.value ?
|
|
1689
|
-
}), (f,
|
|
1752
|
+
}), o.data.value ? u.value = he(o.fieldMap, o.data.value) : o.autoload && tt(o);
|
|
1753
|
+
}), (f, r) => (v(), b(l(Zt), N({
|
|
1690
1754
|
class: "w-full",
|
|
1691
1755
|
"show-line": !0,
|
|
1692
|
-
"tree-data":
|
|
1693
|
-
"expanded-keys":
|
|
1694
|
-
"onUpdate:expandedKeys":
|
|
1756
|
+
"tree-data": u.value,
|
|
1757
|
+
"expanded-keys": n.value,
|
|
1758
|
+
"onUpdate:expandedKeys": r[0] || (r[0] = (m) => n.value = m),
|
|
1695
1759
|
"selected-keys": p.value,
|
|
1696
1760
|
loading: l(o).isTreeLoading,
|
|
1697
|
-
onSelect:
|
|
1761
|
+
onSelect: c
|
|
1698
1762
|
}, l(t)), {
|
|
1699
1763
|
title: h(({ key: m, label: d, icon: g }) => [
|
|
1700
|
-
|
|
1764
|
+
L(f.$slots, "title", {
|
|
1701
1765
|
label: d,
|
|
1702
1766
|
key: m,
|
|
1703
1767
|
icon: g
|
|
1704
1768
|
}, () => [
|
|
1705
|
-
|
|
1769
|
+
F("div", qa, [
|
|
1706
1770
|
S(l(K), { icon: g }, null, 8, ["icon"]),
|
|
1707
|
-
|
|
1771
|
+
F("span", Ha, U(d), 1)
|
|
1708
1772
|
])
|
|
1709
1773
|
])
|
|
1710
1774
|
]),
|
|
1711
1775
|
_: 3
|
|
1712
1776
|
}, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
|
|
1713
1777
|
}
|
|
1714
|
-
}),
|
|
1778
|
+
}), Xl = /* @__PURE__ */ se(Dt, [["__scopeId", "data-v-87722b44"]]), Qa = { class: "relative w-[248px] max-w-[248px]" }, Ga = {
|
|
1715
1779
|
key: 0,
|
|
1716
1780
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
1717
|
-
},
|
|
1781
|
+
}, Ja = /* @__PURE__ */ T({
|
|
1718
1782
|
inheritAttrs: !1,
|
|
1719
1783
|
__name: "index",
|
|
1720
|
-
props:
|
|
1784
|
+
props: Ft,
|
|
1721
1785
|
emits: ["change", "update:labels", "update:value"],
|
|
1722
|
-
setup(
|
|
1723
|
-
var C,
|
|
1724
|
-
const e =
|
|
1786
|
+
setup(s, { emit: a }) {
|
|
1787
|
+
var C, I, B;
|
|
1788
|
+
const e = s, t = ne(), o = H(), u = It(e.url, e), i = e.optionCtrl ?? u.optionCtrl;
|
|
1725
1789
|
i.inputFactory = Vt(o);
|
|
1726
1790
|
const p = y({
|
|
1727
1791
|
...i == null ? void 0 : i.url,
|
|
1728
1792
|
url: ((C = i == null ? void 0 : i.url) == null ? void 0 : C.url) || "",
|
|
1729
|
-
fieldMap: (i == null ? void 0 : i.fieldMap) || ((
|
|
1730
|
-
params: (i == null ? void 0 : i.params) || ((
|
|
1793
|
+
fieldMap: (i == null ? void 0 : i.fieldMap) || ((I = i == null ? void 0 : i.url) == null ? void 0 : I.fieldMap),
|
|
1794
|
+
params: (i == null ? void 0 : i.params) || ((B = i == null ? void 0 : i.url) == null ? void 0 : B.params),
|
|
1731
1795
|
loadingText: !1
|
|
1732
|
-
}), { editorCtrl:
|
|
1733
|
-
|
|
1796
|
+
}), { editorCtrl: n, errInfo: c, labelText: f } = o, r = y(t.placeholder);
|
|
1797
|
+
D(
|
|
1734
1798
|
() => p.value.loading,
|
|
1735
1799
|
($) => {
|
|
1736
|
-
$ ?
|
|
1800
|
+
$ ? r.value = "" : r.value || (r.value = "请选择" + f.value);
|
|
1737
1801
|
},
|
|
1738
1802
|
{ immediate: !0 }
|
|
1739
1803
|
);
|
|
1740
1804
|
const m = a;
|
|
1741
1805
|
o.inputEmit = m;
|
|
1742
1806
|
const d = y((i == null ? void 0 : i.options.value) || []);
|
|
1743
|
-
i &&
|
|
1807
|
+
i && D(
|
|
1744
1808
|
() => i.options.value,
|
|
1745
1809
|
($) => {
|
|
1746
1810
|
d.value = $ || [];
|
|
@@ -1752,10 +1816,10 @@ const Nl = async (r, a) => {
|
|
|
1752
1816
|
m("update:labels", []), m("update:value", []);
|
|
1753
1817
|
return;
|
|
1754
1818
|
}
|
|
1755
|
-
const
|
|
1756
|
-
m("update:labels", fe), m("update:value",
|
|
1819
|
+
const Q = A.map(($e) => $e.value), Z = Ut(i, e, Q), fe = Nt(Z);
|
|
1820
|
+
m("update:labels", fe), m("update:value", Q), c != null && c.value.errClass && n && le(n);
|
|
1757
1821
|
};
|
|
1758
|
-
return
|
|
1822
|
+
return _e(() => {
|
|
1759
1823
|
i && i.autoload && (i.reload.value = !0);
|
|
1760
1824
|
}), X(() => {
|
|
1761
1825
|
p.value && !p.value.fieldMap && (p.value.fieldMap = {
|
|
@@ -1763,19 +1827,19 @@ const Nl = async (r, a) => {
|
|
|
1763
1827
|
label: "Name",
|
|
1764
1828
|
value: "Id",
|
|
1765
1829
|
key: "Id"
|
|
1766
|
-
}), i &&
|
|
1830
|
+
}), i && Pt(i.autoload, i, e);
|
|
1767
1831
|
}), Yt(() => {
|
|
1768
|
-
i &&
|
|
1832
|
+
i && Et(i, e);
|
|
1769
1833
|
}), ($, A) => {
|
|
1770
|
-
var
|
|
1771
|
-
return v(),
|
|
1772
|
-
d.value.length ?
|
|
1773
|
-
S(l(
|
|
1774
|
-
A[0] || (A[0] =
|
|
1834
|
+
var Q;
|
|
1835
|
+
return v(), x("div", Qa, [
|
|
1836
|
+
d.value.length ? _("", !0) : (v(), x("div", Ga, [
|
|
1837
|
+
S(l(Lt), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
1838
|
+
A[0] || (A[0] = F("span", null, "数据加载中...", -1))
|
|
1775
1839
|
])),
|
|
1776
|
-
S(l(ea),
|
|
1840
|
+
S(l(ea), N({
|
|
1777
1841
|
options: d.value,
|
|
1778
|
-
class: [(
|
|
1842
|
+
class: [(Q = l(c)) == null ? void 0 : Q.errClass],
|
|
1779
1843
|
"allow-clear": !0,
|
|
1780
1844
|
placeholder: d.value.length > 0 ? "请选择" + l(f) : "",
|
|
1781
1845
|
onChange: g
|
|
@@ -1783,17 +1847,17 @@ const Nl = async (r, a) => {
|
|
|
1783
1847
|
]);
|
|
1784
1848
|
};
|
|
1785
1849
|
}
|
|
1786
|
-
}),
|
|
1850
|
+
}), Zl = /* @__PURE__ */ se(Ja, [["__scopeId", "data-v-51ddfce3"]]), er = /* @__PURE__ */ se(Bt, [["__scopeId", "data-v-249ea772"]]);
|
|
1787
1851
|
function ye() {
|
|
1788
|
-
return ye = Object.assign ? Object.assign.bind() : function(
|
|
1852
|
+
return ye = Object.assign ? Object.assign.bind() : function(s) {
|
|
1789
1853
|
for (var a = 1; a < arguments.length; a++) {
|
|
1790
1854
|
var e = arguments[a];
|
|
1791
|
-
for (var t in e) ({}).hasOwnProperty.call(e, t) && (
|
|
1855
|
+
for (var t in e) ({}).hasOwnProperty.call(e, t) && (s[t] = e[t]);
|
|
1792
1856
|
}
|
|
1793
|
-
return
|
|
1857
|
+
return s;
|
|
1794
1858
|
}, ye.apply(null, arguments);
|
|
1795
1859
|
}
|
|
1796
|
-
const
|
|
1860
|
+
const Xa = {
|
|
1797
1861
|
locale: "zh_CN",
|
|
1798
1862
|
today: "今天",
|
|
1799
1863
|
now: "此刻",
|
|
@@ -1820,7 +1884,7 @@ const Qa = {
|
|
|
1820
1884
|
nextDecade: "下一年代",
|
|
1821
1885
|
previousCentury: "上一世纪",
|
|
1822
1886
|
nextCentury: "下一世纪"
|
|
1823
|
-
},
|
|
1887
|
+
}, Za = {
|
|
1824
1888
|
placeholder: "请选择时间",
|
|
1825
1889
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
1826
1890
|
}, Se = {
|
|
@@ -1835,116 +1899,116 @@ const Qa = {
|
|
|
1835
1899
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
1836
1900
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
1837
1901
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
1838
|
-
},
|
|
1839
|
-
timePickerLocale: ye({},
|
|
1902
|
+
}, Xa),
|
|
1903
|
+
timePickerLocale: ye({}, Za)
|
|
1840
1904
|
};
|
|
1841
1905
|
Se.lang.ok = "确定";
|
|
1842
|
-
const
|
|
1906
|
+
const tr = /* @__PURE__ */ T({
|
|
1843
1907
|
__name: "index",
|
|
1844
1908
|
props: {
|
|
1845
1909
|
valueFormat: {}
|
|
1846
1910
|
},
|
|
1847
|
-
setup(
|
|
1848
|
-
const a =
|
|
1911
|
+
setup(s) {
|
|
1912
|
+
const a = s, { editorCtrl: e, labelText: t, errInfo: o } = H(), u = () => {
|
|
1849
1913
|
o != null && o.value.errClass && e && le(e);
|
|
1850
1914
|
}, i = y(a.valueFormat ?? "YYYY-MM-DD");
|
|
1851
|
-
return (p,
|
|
1852
|
-
var
|
|
1915
|
+
return (p, n) => {
|
|
1916
|
+
var c;
|
|
1853
1917
|
return v(), b(l(ta), {
|
|
1854
|
-
class: E(["w-full", [((
|
|
1918
|
+
class: E(["w-full", [((c = l(o)) == null ? void 0 : c.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
1855
1919
|
placeholder: "请选择" + l(t),
|
|
1856
1920
|
locale: l(Se),
|
|
1857
1921
|
valueFormat: i.value,
|
|
1858
|
-
onBlur:
|
|
1922
|
+
onBlur: u
|
|
1859
1923
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
1860
1924
|
};
|
|
1861
1925
|
}
|
|
1862
|
-
}),
|
|
1926
|
+
}), el = /* @__PURE__ */ T({
|
|
1863
1927
|
__name: "index",
|
|
1864
1928
|
props: {
|
|
1865
1929
|
value: {},
|
|
1866
1930
|
undefValue: { type: Boolean, default: !1 }
|
|
1867
1931
|
},
|
|
1868
1932
|
emits: ["update:value"],
|
|
1869
|
-
setup(
|
|
1870
|
-
const { editorCtrl: e, labelText: t, errInfo: o } =
|
|
1933
|
+
setup(s, { emit: a }) {
|
|
1934
|
+
const { editorCtrl: e, labelText: t, errInfo: o } = H(), u = () => {
|
|
1871
1935
|
o != null && o.value.errClass && e && le(e);
|
|
1872
|
-
}, i =
|
|
1873
|
-
|
|
1936
|
+
}, i = s, p = i.value === void 0 ? !0 : i.undefValue, n = a, c = y(i.value);
|
|
1937
|
+
D(
|
|
1874
1938
|
() => i.value,
|
|
1875
|
-
(
|
|
1876
|
-
|
|
1939
|
+
(r) => {
|
|
1940
|
+
c.value = r;
|
|
1877
1941
|
},
|
|
1878
1942
|
{ immediate: !0 }
|
|
1879
1943
|
// 立即同步初始值
|
|
1880
|
-
),
|
|
1881
|
-
() =>
|
|
1882
|
-
(
|
|
1883
|
-
if (
|
|
1884
|
-
|
|
1944
|
+
), D(
|
|
1945
|
+
() => c.value,
|
|
1946
|
+
(r) => {
|
|
1947
|
+
if (c.value === "") {
|
|
1948
|
+
n("update:value", void 0);
|
|
1885
1949
|
return;
|
|
1886
1950
|
}
|
|
1887
|
-
|
|
1951
|
+
n("update:value", r);
|
|
1888
1952
|
}
|
|
1889
1953
|
);
|
|
1890
1954
|
const f = () => {
|
|
1891
|
-
|
|
1955
|
+
c.value === "" && (c.value = p ? void 0 : null);
|
|
1892
1956
|
};
|
|
1893
|
-
return (
|
|
1957
|
+
return (r, m) => {
|
|
1894
1958
|
var d, g;
|
|
1895
|
-
return v(), b(l(de),
|
|
1959
|
+
return v(), b(l(de), N({
|
|
1896
1960
|
class: [
|
|
1897
1961
|
(d = l(o)) == null ? void 0 : d.errClass,
|
|
1898
|
-
((g = l(o)) == null ? void 0 : g.errClass) === "error" && !
|
|
1962
|
+
((g = l(o)) == null ? void 0 : g.errClass) === "error" && !r.$slots.addonBefore && !r.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
|
|
1899
1963
|
],
|
|
1900
|
-
value:
|
|
1901
|
-
"onUpdate:value": m[0] || (m[0] = (C) =>
|
|
1964
|
+
value: c.value,
|
|
1965
|
+
"onUpdate:value": m[0] || (m[0] = (C) => c.value = C),
|
|
1902
1966
|
autocomplete: "new-password",
|
|
1903
1967
|
"allow-clear": !0,
|
|
1904
1968
|
placeholder: "请输入" + l(t),
|
|
1905
|
-
onBlur:
|
|
1969
|
+
onBlur: u,
|
|
1906
1970
|
onChange: f
|
|
1907
|
-
},
|
|
1908
|
-
|
|
1971
|
+
}, r.$attrs), rt({ _: 2 }, [
|
|
1972
|
+
r.$slots.addonBefore ? {
|
|
1909
1973
|
name: "addonBefore",
|
|
1910
1974
|
fn: h(() => [
|
|
1911
|
-
|
|
1975
|
+
L(r.$slots, "addonBefore")
|
|
1912
1976
|
]),
|
|
1913
1977
|
key: "0"
|
|
1914
1978
|
} : void 0,
|
|
1915
|
-
|
|
1979
|
+
r.$slots.addonAfter ? {
|
|
1916
1980
|
name: "addonAfter",
|
|
1917
1981
|
fn: h(() => [
|
|
1918
|
-
|
|
1982
|
+
L(r.$slots, "addonAfter")
|
|
1919
1983
|
]),
|
|
1920
1984
|
key: "1"
|
|
1921
1985
|
} : void 0
|
|
1922
1986
|
]), 1040, ["class", "value", "placeholder"]);
|
|
1923
1987
|
};
|
|
1924
1988
|
}
|
|
1925
|
-
}),
|
|
1989
|
+
}), tl = /* @__PURE__ */ T({
|
|
1926
1990
|
__name: "inputIcon",
|
|
1927
1991
|
props: {
|
|
1928
1992
|
value: {}
|
|
1929
1993
|
},
|
|
1930
1994
|
emits: ["update:value"],
|
|
1931
|
-
setup(
|
|
1932
|
-
const e =
|
|
1933
|
-
return
|
|
1995
|
+
setup(s, { emit: a }) {
|
|
1996
|
+
const e = s, t = a, o = y(void 0);
|
|
1997
|
+
return D(
|
|
1934
1998
|
() => e.value,
|
|
1935
|
-
(
|
|
1936
|
-
o.value =
|
|
1999
|
+
(u) => {
|
|
2000
|
+
o.value = u ?? void 0;
|
|
1937
2001
|
},
|
|
1938
2002
|
{ immediate: !0 }
|
|
1939
|
-
),
|
|
2003
|
+
), D(
|
|
1940
2004
|
() => o.value,
|
|
1941
|
-
(
|
|
1942
|
-
t("update:value",
|
|
2005
|
+
(u) => {
|
|
2006
|
+
t("update:value", u);
|
|
1943
2007
|
}
|
|
1944
|
-
), (
|
|
2008
|
+
), (u, i) => (v(), b(el, N({
|
|
1945
2009
|
value: o.value,
|
|
1946
2010
|
"onUpdate:value": i[0] || (i[0] = (p) => o.value = p)
|
|
1947
|
-
},
|
|
2011
|
+
}, u.$attrs), {
|
|
1948
2012
|
addonBefore: h(() => [
|
|
1949
2013
|
S(l(K), {
|
|
1950
2014
|
class: "!w-4 !h-4",
|
|
@@ -1954,40 +2018,40 @@ const Jl = /* @__PURE__ */ T({
|
|
|
1954
2018
|
_: 1
|
|
1955
2019
|
}, 16, ["value"]));
|
|
1956
2020
|
}
|
|
1957
|
-
}),
|
|
2021
|
+
}), ar = /* @__PURE__ */ se(tl, [["__scopeId", "data-v-358b82ef"]]), lr = /* @__PURE__ */ T({
|
|
1958
2022
|
__name: "inputPassword",
|
|
1959
|
-
setup(
|
|
1960
|
-
const { editorCtrl: a, labelText: e, errInfo: t } =
|
|
2023
|
+
setup(s) {
|
|
2024
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = H(), o = () => {
|
|
1961
2025
|
t != null && t.value.errClass && a && le(a);
|
|
1962
2026
|
};
|
|
1963
|
-
return (
|
|
2027
|
+
return (u, i) => {
|
|
1964
2028
|
var p;
|
|
1965
|
-
return v(), b(l(aa),
|
|
2029
|
+
return v(), b(l(aa), N({
|
|
1966
2030
|
class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1967
2031
|
"allow-clear": !0,
|
|
1968
2032
|
autocomplete: "new-password",
|
|
1969
2033
|
placeholder: "请输入" + l(e),
|
|
1970
2034
|
onBlur: o
|
|
1971
|
-
},
|
|
2035
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1972
2036
|
};
|
|
1973
2037
|
}
|
|
1974
|
-
}),
|
|
2038
|
+
}), rr = /* @__PURE__ */ T({
|
|
1975
2039
|
__name: "inputNumber",
|
|
1976
|
-
setup(
|
|
1977
|
-
const { editorCtrl: a, labelText: e, errInfo: t } =
|
|
2040
|
+
setup(s) {
|
|
2041
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = H(), o = () => {
|
|
1978
2042
|
t != null && t.value.errClass && a && le(a);
|
|
1979
2043
|
};
|
|
1980
|
-
return (
|
|
2044
|
+
return (u, i) => {
|
|
1981
2045
|
var p;
|
|
1982
|
-
return v(), b(l(la),
|
|
2046
|
+
return v(), b(l(la), N({
|
|
1983
2047
|
class: [[((p = l(t)) == null ? void 0 : p.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
|
|
1984
2048
|
onBlur: o,
|
|
1985
2049
|
"allow-clear": !1,
|
|
1986
2050
|
placeholder: "请输入" + l(e)
|
|
1987
|
-
},
|
|
2051
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1988
2052
|
};
|
|
1989
2053
|
}
|
|
1990
|
-
}),
|
|
2054
|
+
}), al = { class: "flex flex-col gap-2" }, ll = { key: 1 }, sr = /* @__PURE__ */ T({
|
|
1991
2055
|
__name: "index",
|
|
1992
2056
|
props: {
|
|
1993
2057
|
value: {},
|
|
@@ -1998,66 +2062,66 @@ const Jl = /* @__PURE__ */ T({
|
|
|
1998
2062
|
valueHolder: {}
|
|
1999
2063
|
},
|
|
2000
2064
|
emits: ["update:value"],
|
|
2001
|
-
setup(
|
|
2002
|
-
const e =
|
|
2065
|
+
setup(s, { emit: a }) {
|
|
2066
|
+
const e = s, t = a, o = y(!(e.selectList && e.selectList.length > 0)), u = y([]);
|
|
2003
2067
|
let i = !1;
|
|
2004
2068
|
const p = () => {
|
|
2005
|
-
e.selectList && e.selectList.length > 0 ?
|
|
2069
|
+
e.selectList && e.selectList.length > 0 ? u.value = e.selectList.map((r) => ({
|
|
2006
2070
|
id: Date.now() + Math.random(),
|
|
2007
|
-
text:
|
|
2008
|
-
field:
|
|
2071
|
+
text: r.text,
|
|
2072
|
+
field: r.field,
|
|
2009
2073
|
// 如果value中有对应的field,使用value中的值,否则使用selectList中的默认值
|
|
2010
|
-
value: e.value[
|
|
2011
|
-
})) : e.value && Object.keys(e.value).length > 0 ?
|
|
2074
|
+
value: e.value[r.field] ?? r.value
|
|
2075
|
+
})) : e.value && Object.keys(e.value).length > 0 ? u.value = Object.entries(e.value).filter(([r]) => !e.ignoreList || !e.ignoreList.includes(r)).map(([r, m]) => ({
|
|
2012
2076
|
id: Date.now() + Math.random(),
|
|
2013
|
-
field:
|
|
2077
|
+
field: r,
|
|
2014
2078
|
value: m
|
|
2015
|
-
})) :
|
|
2079
|
+
})) : u.value = [];
|
|
2016
2080
|
};
|
|
2017
|
-
|
|
2081
|
+
D(
|
|
2018
2082
|
() => e.value,
|
|
2019
2083
|
() => {
|
|
2020
2084
|
i || p(), i = !1;
|
|
2021
2085
|
},
|
|
2022
2086
|
{ immediate: !0 }
|
|
2023
2087
|
);
|
|
2024
|
-
const
|
|
2025
|
-
let
|
|
2026
|
-
e.selectList && e.selectList.length > 0 ? (
|
|
2027
|
-
m.field && (
|
|
2028
|
-
})) : (
|
|
2088
|
+
const n = () => {
|
|
2089
|
+
let r;
|
|
2090
|
+
e.selectList && e.selectList.length > 0 ? (r = { ...e.value }, u.value.forEach((m) => {
|
|
2091
|
+
m.field && (r[m.field] = m.value);
|
|
2092
|
+
})) : (r = u.value.reduce(
|
|
2029
2093
|
(m, d) => (d.field && (m[d.field] = d.value), m),
|
|
2030
2094
|
{}
|
|
2031
2095
|
), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((m) => {
|
|
2032
|
-
e.value[m] !== void 0 && (
|
|
2033
|
-
})), i = !0, t("update:value",
|
|
2034
|
-
},
|
|
2035
|
-
|
|
2096
|
+
e.value[m] !== void 0 && (r[m] = e.value[m]);
|
|
2097
|
+
})), i = !0, t("update:value", r);
|
|
2098
|
+
}, c = () => {
|
|
2099
|
+
u.value.push({
|
|
2036
2100
|
id: Date.now() + Math.random(),
|
|
2037
2101
|
field: "",
|
|
2038
2102
|
value: ""
|
|
2039
2103
|
});
|
|
2040
2104
|
}, f = () => {
|
|
2041
|
-
|
|
2105
|
+
n();
|
|
2042
2106
|
};
|
|
2043
|
-
return (
|
|
2044
|
-
(v(!0),
|
|
2107
|
+
return (r, m) => (v(), x("div", al, [
|
|
2108
|
+
(v(!0), x(P, null, R(u.value, (d) => (v(), x("div", {
|
|
2045
2109
|
key: d.id,
|
|
2046
2110
|
class: "flex items-center gap-2"
|
|
2047
2111
|
}, [
|
|
2048
|
-
|
|
2049
|
-
class: E([
|
|
2112
|
+
F("div", {
|
|
2113
|
+
class: E([r.fieldWidth ? `w-[${r.fieldWidth}%]` : "w-[33%]"])
|
|
2050
2114
|
}, [
|
|
2051
|
-
!
|
|
2115
|
+
!r.selectList || r.selectList.length === 0 ? (v(), b(l(de), {
|
|
2052
2116
|
key: 0,
|
|
2053
2117
|
value: d.field,
|
|
2054
2118
|
"onUpdate:value": (g) => d.field = g,
|
|
2055
2119
|
title: d.text || d.field,
|
|
2056
2120
|
class: "w-full",
|
|
2057
|
-
placeholder: d.text ||
|
|
2121
|
+
placeholder: d.text || r.labelHolder || "配置名",
|
|
2058
2122
|
onInput: f,
|
|
2059
2123
|
disabled: !o.value
|
|
2060
|
-
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (v(),
|
|
2124
|
+
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (v(), x("div", ll, [
|
|
2061
2125
|
S(l(de), {
|
|
2062
2126
|
value: d.text,
|
|
2063
2127
|
"onUpdate:value": (g) => d.text = g,
|
|
@@ -2072,34 +2136,34 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2072
2136
|
}, null, 8, ["value", "onUpdate:value"])
|
|
2073
2137
|
]))
|
|
2074
2138
|
], 2),
|
|
2075
|
-
m[0] || (m[0] =
|
|
2076
|
-
|
|
2077
|
-
class: E([
|
|
2139
|
+
m[0] || (m[0] = F("div", { class: "w-[3%]" }, "=", -1)),
|
|
2140
|
+
F("div", {
|
|
2141
|
+
class: E([r.fieldWidth ? `w-[${97 - r.fieldWidth}%]` : "w-[64%]"])
|
|
2078
2142
|
}, [
|
|
2079
2143
|
S(l(de), {
|
|
2080
2144
|
value: d.value,
|
|
2081
2145
|
"onUpdate:value": (g) => d.value = g,
|
|
2082
|
-
placeholder:
|
|
2146
|
+
placeholder: r.valueHolder || "请输入" + d.text || "请输入配置值",
|
|
2083
2147
|
onInput: f,
|
|
2084
2148
|
title: d.value
|
|
2085
2149
|
}, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
|
|
2086
2150
|
], 2)
|
|
2087
2151
|
]))), 128)),
|
|
2088
|
-
o.value ? (v(), b(l(
|
|
2152
|
+
o.value ? (v(), b(l(ct), {
|
|
2089
2153
|
key: 0,
|
|
2090
|
-
onClick:
|
|
2154
|
+
onClick: c,
|
|
2091
2155
|
class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
|
|
2092
2156
|
size: "small"
|
|
2093
2157
|
}, {
|
|
2094
2158
|
default: h(() => m[1] || (m[1] = [
|
|
2095
|
-
|
|
2159
|
+
z(" 新增配置行 ")
|
|
2096
2160
|
])),
|
|
2097
2161
|
_: 1,
|
|
2098
2162
|
__: [1]
|
|
2099
|
-
})) :
|
|
2163
|
+
})) : _("", !0)
|
|
2100
2164
|
]));
|
|
2101
2165
|
}
|
|
2102
|
-
}),
|
|
2166
|
+
}), rl = /* @__PURE__ */ se(zt, [["__scopeId", "data-v-aa237552"]]), or = /* @__PURE__ */ T({
|
|
2103
2167
|
__name: "radioStatus",
|
|
2104
2168
|
props: {
|
|
2105
2169
|
/**
|
|
@@ -2126,14 +2190,14 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2126
2190
|
required: !1
|
|
2127
2191
|
}
|
|
2128
2192
|
},
|
|
2129
|
-
setup(
|
|
2130
|
-
const a =
|
|
2193
|
+
setup(s) {
|
|
2194
|
+
const a = s, e = y(JSON.parse(JSON.stringify(Ne.getOptions(a.dataKey))));
|
|
2131
2195
|
return a.all === !0 && e.value.unshift({
|
|
2132
2196
|
label: "全部",
|
|
2133
2197
|
value: a.allValue || [0, 1]
|
|
2134
|
-
}), (t, o) => (v(), b(
|
|
2198
|
+
}), (t, o) => (v(), b(rl, { data: e.value }, null, 8, ["data"]));
|
|
2135
2199
|
}
|
|
2136
|
-
}),
|
|
2200
|
+
}), nr = /* @__PURE__ */ T({
|
|
2137
2201
|
__name: "index",
|
|
2138
2202
|
props: {
|
|
2139
2203
|
startDate: {},
|
|
@@ -2141,43 +2205,43 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2141
2205
|
valueFormat: { default: "YYYY-MM-DD" }
|
|
2142
2206
|
},
|
|
2143
2207
|
emits: ["update:startDate", "update:endDate"],
|
|
2144
|
-
setup(
|
|
2145
|
-
const e =
|
|
2146
|
-
const
|
|
2147
|
-
if (!(!
|
|
2208
|
+
setup(s, { emit: a }) {
|
|
2209
|
+
const e = s, t = a, o = H(), { errInfo: u } = o, i = j(() => e.valueFormat), p = j(() => {
|
|
2210
|
+
const c = e.startDate, f = e.endDate;
|
|
2211
|
+
if (!(!c || !f))
|
|
2148
2212
|
try {
|
|
2149
|
-
const
|
|
2150
|
-
return !
|
|
2213
|
+
const r = Pe(c), m = Pe(f);
|
|
2214
|
+
return !r.isValid() || !m.isValid() ? void 0 : [r, m];
|
|
2151
2215
|
} catch {
|
|
2152
2216
|
return;
|
|
2153
2217
|
}
|
|
2154
|
-
}),
|
|
2155
|
-
if (!
|
|
2218
|
+
}), n = (c, f) => {
|
|
2219
|
+
if (!c || !f || f.length !== 2) {
|
|
2156
2220
|
t("update:startDate", null), t("update:endDate", null);
|
|
2157
2221
|
return;
|
|
2158
2222
|
}
|
|
2159
2223
|
t("update:startDate", f[0] || null), t("update:endDate", f[1] || null);
|
|
2160
2224
|
};
|
|
2161
|
-
return (
|
|
2162
|
-
var
|
|
2225
|
+
return (c, f) => {
|
|
2226
|
+
var r;
|
|
2163
2227
|
return v(), b(l(ra), {
|
|
2164
|
-
class: E([((
|
|
2228
|
+
class: E([((r = l(u)) == null ? void 0 : r.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
|
|
2165
2229
|
locale: l(Se),
|
|
2166
2230
|
"value-format": i.value,
|
|
2167
2231
|
value: p.value,
|
|
2168
|
-
onChange:
|
|
2232
|
+
onChange: n
|
|
2169
2233
|
}, null, 8, ["class", "locale", "value-format", "value"]);
|
|
2170
2234
|
};
|
|
2171
2235
|
}
|
|
2172
|
-
}),
|
|
2236
|
+
}), ir = /* @__PURE__ */ se(Mt, [["__scopeId", "data-v-b33df95f"]]), ur = /* @__PURE__ */ T({
|
|
2173
2237
|
__name: "index",
|
|
2174
|
-
setup(
|
|
2175
|
-
const { editorCtrl: a, labelText: e, errInfo: t } =
|
|
2238
|
+
setup(s) {
|
|
2239
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = H(), o = () => {
|
|
2176
2240
|
t != null && t.value.errClass && a && le(a);
|
|
2177
2241
|
};
|
|
2178
|
-
return (
|
|
2242
|
+
return (u, i) => {
|
|
2179
2243
|
var p;
|
|
2180
|
-
return v(), b(l(sa),
|
|
2244
|
+
return v(), b(l(sa), N({
|
|
2181
2245
|
class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2182
2246
|
"allow-clear": !0,
|
|
2183
2247
|
placeholder: "请输入" + l(e),
|
|
@@ -2186,30 +2250,30 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2186
2250
|
}, ["stop"]), ["enter", "native"])),
|
|
2187
2251
|
onKeydown: i[1] || (i[1] = Re(pe(() => {
|
|
2188
2252
|
}, ["stop"]), ["enter", "native"]))
|
|
2189
|
-
},
|
|
2253
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
2190
2254
|
};
|
|
2191
2255
|
}
|
|
2192
|
-
}),
|
|
2256
|
+
}), cr = /* @__PURE__ */ T({
|
|
2193
2257
|
__name: "index",
|
|
2194
2258
|
props: {
|
|
2195
2259
|
valueFormat: {}
|
|
2196
2260
|
},
|
|
2197
|
-
setup(
|
|
2198
|
-
const a =
|
|
2261
|
+
setup(s) {
|
|
2262
|
+
const a = s, { editorCtrl: e, labelText: t, errInfo: o } = H(), u = () => {
|
|
2199
2263
|
o != null && o.value.errClass && e && le(e);
|
|
2200
2264
|
}, i = y(a.valueFormat ?? "HH:mm");
|
|
2201
|
-
return (p,
|
|
2202
|
-
var
|
|
2265
|
+
return (p, n) => {
|
|
2266
|
+
var c;
|
|
2203
2267
|
return v(), b(l(oa), {
|
|
2204
|
-
class: E(["w-full", [((
|
|
2268
|
+
class: E(["w-full", [((c = l(o)) == null ? void 0 : c.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
2205
2269
|
placeholder: "请选择" + l(t),
|
|
2206
2270
|
locale: l(Se),
|
|
2207
2271
|
valueFormat: i.value,
|
|
2208
|
-
onBlur:
|
|
2272
|
+
onBlur: u
|
|
2209
2273
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
2210
2274
|
};
|
|
2211
2275
|
}
|
|
2212
|
-
}),
|
|
2276
|
+
}), sl = /* @__PURE__ */ T({
|
|
2213
2277
|
__name: "index",
|
|
2214
2278
|
props: {
|
|
2215
2279
|
autoload: { type: Boolean },
|
|
@@ -2218,46 +2282,46 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2218
2282
|
value: {}
|
|
2219
2283
|
},
|
|
2220
2284
|
emits: ["change", "update:value"],
|
|
2221
|
-
setup(
|
|
2222
|
-
const e =
|
|
2223
|
-
e.value && e.value.every((
|
|
2224
|
-
|
|
2225
|
-
}),
|
|
2285
|
+
setup(s, { emit: a }) {
|
|
2286
|
+
const e = s, t = y({ ...e.url }), { editorCtrl: o, labelText: u, errInfo: i } = H(), p = a, n = y([]), c = y([]);
|
|
2287
|
+
e.value && e.value.every((r) => {
|
|
2288
|
+
c.value.push(r.toString());
|
|
2289
|
+
}), D(
|
|
2226
2290
|
() => e.value,
|
|
2227
|
-
(
|
|
2228
|
-
|
|
2291
|
+
(r) => {
|
|
2292
|
+
r && (c.value = r);
|
|
2229
2293
|
}
|
|
2230
2294
|
);
|
|
2231
|
-
const f = (
|
|
2232
|
-
p("update:value",
|
|
2295
|
+
const f = (r) => {
|
|
2296
|
+
p("update:value", r), p("change", r), c.value = r, i != null && i.value.errClass && o && le(o);
|
|
2233
2297
|
};
|
|
2234
2298
|
return X(async () => {
|
|
2235
2299
|
if (t.value) {
|
|
2236
|
-
const
|
|
2237
|
-
if (t.value.api || (t.value.api =
|
|
2300
|
+
const r = o == null ? void 0 : o.page;
|
|
2301
|
+
if (t.value.api || (t.value.api = r == null ? void 0 : r.api), t.value.authorize === void 0 && (t.value.authorize = r == null ? void 0 : r.authorize), e.autoload) {
|
|
2238
2302
|
const m = await at(o, {
|
|
2239
2303
|
urlKey: "list",
|
|
2240
2304
|
url: { ...t.value, url: t.value.url },
|
|
2241
2305
|
loadingText: !1,
|
|
2242
2306
|
params: e.params
|
|
2243
2307
|
});
|
|
2244
|
-
|
|
2308
|
+
n.value = (m == null ? void 0 : m.data) ?? [];
|
|
2245
2309
|
}
|
|
2246
2310
|
}
|
|
2247
|
-
}), (
|
|
2311
|
+
}), (r, m) => {
|
|
2248
2312
|
var d;
|
|
2249
|
-
return v(), b(l(na),
|
|
2313
|
+
return v(), b(l(na), N({
|
|
2250
2314
|
class: ((d = l(i)) == null ? void 0 : d.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2251
|
-
placeholder: "请输入" + l(
|
|
2252
|
-
targetKeys:
|
|
2315
|
+
placeholder: "请输入" + l(u),
|
|
2316
|
+
targetKeys: c.value,
|
|
2253
2317
|
onChange: f
|
|
2254
|
-
},
|
|
2255
|
-
children: h(({ direction: g, disabled: C, filteredItems:
|
|
2256
|
-
|
|
2318
|
+
}, r.$attrs), {
|
|
2319
|
+
children: h(({ direction: g, disabled: C, filteredItems: I, onItemSelectAll: B, onItemSelect: $, selectedKeys: A }) => [
|
|
2320
|
+
L(r.$slots, "children", {
|
|
2257
2321
|
direction: g,
|
|
2258
2322
|
disabled: C,
|
|
2259
|
-
filteredItems:
|
|
2260
|
-
onItemSelectAll:
|
|
2323
|
+
filteredItems: I,
|
|
2324
|
+
onItemSelectAll: B,
|
|
2261
2325
|
onItemSelect: $,
|
|
2262
2326
|
selectedKeys: A
|
|
2263
2327
|
})
|
|
@@ -2266,7 +2330,7 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2266
2330
|
}, 16, ["class", "placeholder", "targetKeys"]);
|
|
2267
2331
|
};
|
|
2268
2332
|
}
|
|
2269
|
-
}),
|
|
2333
|
+
}), dr = /* @__PURE__ */ T({
|
|
2270
2334
|
__name: "transferTable",
|
|
2271
2335
|
props: {
|
|
2272
2336
|
/**
|
|
@@ -2292,64 +2356,64 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2292
2356
|
}
|
|
2293
2357
|
},
|
|
2294
2358
|
emits: ["update:value"],
|
|
2295
|
-
setup(
|
|
2296
|
-
const e =
|
|
2297
|
-
|
|
2298
|
-
() =>
|
|
2299
|
-
(
|
|
2300
|
-
t("update:value",
|
|
2359
|
+
setup(s, { emit: a }) {
|
|
2360
|
+
const e = s, t = a, o = y(e.autoload), u = y(e.value), i = y(e.gridCtrl.primaryKey);
|
|
2361
|
+
D(
|
|
2362
|
+
() => u.value,
|
|
2363
|
+
(c) => {
|
|
2364
|
+
t("update:value", c);
|
|
2301
2365
|
}
|
|
2302
|
-
),
|
|
2366
|
+
), D(
|
|
2303
2367
|
() => e.value,
|
|
2304
|
-
(
|
|
2305
|
-
|
|
2368
|
+
(c) => {
|
|
2369
|
+
c && (u.value = c);
|
|
2306
2370
|
}
|
|
2307
2371
|
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = y(!0), e.gridCtrl.buttons = y([]), e.gridCtrl.tools = [];
|
|
2308
|
-
const p = ({ disabled:
|
|
2372
|
+
const p = ({ disabled: c, selectedKeys: f, onItemSelectAll: r, onItemSelect: m }) => ({
|
|
2309
2373
|
getCheckboxProps: (d) => ({
|
|
2310
2374
|
// 控制是否禁止
|
|
2311
|
-
disabled:
|
|
2375
|
+
disabled: c || d.disabled
|
|
2312
2376
|
}),
|
|
2313
2377
|
onSelectAll(d, g) {
|
|
2314
|
-
const C = g.filter((
|
|
2315
|
-
|
|
2378
|
+
const C = g.filter((I) => !I.disabled).map(({ [i.value]: I }) => I);
|
|
2379
|
+
r(C, d);
|
|
2316
2380
|
},
|
|
2317
2381
|
onSelect({ [i.value]: d }, g) {
|
|
2318
2382
|
m(d, g);
|
|
2319
2383
|
},
|
|
2320
2384
|
selectedRowKeys: f
|
|
2321
|
-
}),
|
|
2385
|
+
}), n = y([]);
|
|
2322
2386
|
return X(async () => {
|
|
2323
2387
|
if (o.value) {
|
|
2324
|
-
const
|
|
2388
|
+
const c = await at(e.gridCtrl, {
|
|
2325
2389
|
urlKey: "list",
|
|
2326
2390
|
url: { ...e.gridCtrl.gridUrl, url: e.gridCtrl.gridUrl.url },
|
|
2327
2391
|
params: e.gridCtrl.gridQuery,
|
|
2328
2392
|
loadingText: !1
|
|
2329
2393
|
});
|
|
2330
|
-
|
|
2394
|
+
n.value = (c == null ? void 0 : c.data) ?? [];
|
|
2331
2395
|
}
|
|
2332
|
-
}), (
|
|
2333
|
-
"data-source":
|
|
2334
|
-
"row-key": (
|
|
2335
|
-
value:
|
|
2336
|
-
"onUpdate:value": f[0] || (f[0] = (
|
|
2396
|
+
}), (c, f) => (v(), b(sl, N({
|
|
2397
|
+
"data-source": n.value,
|
|
2398
|
+
"row-key": (r) => r[i.value],
|
|
2399
|
+
value: u.value,
|
|
2400
|
+
"onUpdate:value": f[0] || (f[0] = (r) => u.value = r),
|
|
2337
2401
|
"list-style": {
|
|
2338
2402
|
width: "300px",
|
|
2339
2403
|
height: "500px"
|
|
2340
2404
|
},
|
|
2341
2405
|
"show-select-all": !1,
|
|
2342
2406
|
"show-search": !0,
|
|
2343
|
-
"filter-option": (
|
|
2407
|
+
"filter-option": (r, m) => {
|
|
2344
2408
|
for (const d of e.gridCtrl.columns.value)
|
|
2345
|
-
if (m[d.dataIndex].toString().indexOf(
|
|
2409
|
+
if (m[d.dataIndex].toString().indexOf(r) !== -1)
|
|
2346
2410
|
return !0;
|
|
2347
2411
|
return !1;
|
|
2348
2412
|
}
|
|
2349
|
-
},
|
|
2350
|
-
children: h(({ filteredItems:
|
|
2351
|
-
S(l(
|
|
2352
|
-
columns:
|
|
2413
|
+
}, c.$attrs), {
|
|
2414
|
+
children: h(({ filteredItems: r, onItemSelectAll: m, onItemSelect: d, selectedKeys: g }) => [
|
|
2415
|
+
S(l(dt), {
|
|
2416
|
+
columns: s.gridCtrl.columns.value,
|
|
2353
2417
|
"row-key": i.value,
|
|
2354
2418
|
"row-selection": p({
|
|
2355
2419
|
disabled: !1,
|
|
@@ -2359,12 +2423,12 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2359
2423
|
}),
|
|
2360
2424
|
bordered: !1,
|
|
2361
2425
|
size: "small",
|
|
2362
|
-
"data-source":
|
|
2426
|
+
"data-source": r,
|
|
2363
2427
|
scroll: { x: 300 },
|
|
2364
2428
|
"custom-row": (C) => ({
|
|
2365
2429
|
onClick: () => {
|
|
2366
|
-
const
|
|
2367
|
-
d(
|
|
2430
|
+
const I = C[i.value];
|
|
2431
|
+
d(I, !g.includes(I));
|
|
2368
2432
|
}
|
|
2369
2433
|
})
|
|
2370
2434
|
}, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
|
|
@@ -2372,7 +2436,7 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2372
2436
|
_: 1
|
|
2373
2437
|
}, 16, ["data-source", "row-key", "value", "filter-option"]));
|
|
2374
2438
|
}
|
|
2375
|
-
}),
|
|
2439
|
+
}), ol = /* @__PURE__ */ T({
|
|
2376
2440
|
__name: "index",
|
|
2377
2441
|
props: {
|
|
2378
2442
|
multiple: {
|
|
@@ -2398,66 +2462,66 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2398
2462
|
}
|
|
2399
2463
|
},
|
|
2400
2464
|
emits: ["change", "update:value"],
|
|
2401
|
-
setup(
|
|
2402
|
-
const e =
|
|
2403
|
-
|
|
2404
|
-
const
|
|
2405
|
-
|
|
2465
|
+
setup(s, { emit: a }) {
|
|
2466
|
+
const e = s, t = e.value === void 0 ? !0 : e.undefValue, o = e.treeCtrl, u = H(), { errInfo: i, labelText: p } = u, n = a;
|
|
2467
|
+
u.inputEmit = n;
|
|
2468
|
+
const c = y([]), f = y();
|
|
2469
|
+
D(
|
|
2406
2470
|
() => e.value,
|
|
2407
2471
|
(d) => {
|
|
2408
2472
|
f.value = d;
|
|
2409
2473
|
},
|
|
2410
2474
|
{ immediate: !0 }
|
|
2411
|
-
),
|
|
2475
|
+
), D(
|
|
2412
2476
|
() => f.value,
|
|
2413
2477
|
(d) => {
|
|
2414
|
-
|
|
2478
|
+
n("update:value", d);
|
|
2415
2479
|
}
|
|
2416
|
-
),
|
|
2480
|
+
), D(
|
|
2417
2481
|
() => o.data.value,
|
|
2418
2482
|
(d) => {
|
|
2419
|
-
d && (
|
|
2483
|
+
d && (c.value = o.fieldMap ? he(o.fieldMap, d) : d);
|
|
2420
2484
|
},
|
|
2421
2485
|
{ immediate: !0 }
|
|
2422
2486
|
);
|
|
2423
|
-
const
|
|
2424
|
-
e.multiple ? f.value = d ?? [] : d == null ? f.value = t ? void 0 : null : f.value = d,
|
|
2487
|
+
const r = (d) => {
|
|
2488
|
+
e.multiple ? f.value = d ?? [] : d == null ? f.value = t ? void 0 : null : f.value = d, n("change", f.value);
|
|
2425
2489
|
};
|
|
2426
|
-
|
|
2490
|
+
_e(() => {
|
|
2427
2491
|
e.treeCtrl && e.treeCtrl.autoload && (e.treeCtrl.reload.value = !0);
|
|
2428
2492
|
}), X(() => {
|
|
2429
2493
|
o.fieldMap || (o.fieldMap = {
|
|
2430
2494
|
label: "Name",
|
|
2431
2495
|
key: "Id",
|
|
2432
2496
|
value: "Id"
|
|
2433
|
-
}), o.data.value ?
|
|
2497
|
+
}), o.data.value ? c.value = o.fieldMap ? he(o.fieldMap, o.data.value) : o.data.value : e.treeCtrl.autoload && tt(e.treeCtrl);
|
|
2434
2498
|
});
|
|
2435
2499
|
const m = () => {
|
|
2436
2500
|
f.value = t ? void 0 : null;
|
|
2437
2501
|
};
|
|
2438
2502
|
return (d, g) => {
|
|
2439
2503
|
var C;
|
|
2440
|
-
return v(), b(l(ia),
|
|
2504
|
+
return v(), b(l(ia), N({
|
|
2441
2505
|
class: [[(C = l(i)) == null ? void 0 : C.errClass], "w-full"],
|
|
2442
2506
|
"tree-line": "",
|
|
2443
|
-
multiple:
|
|
2507
|
+
multiple: s.multiple,
|
|
2444
2508
|
"tree-default-expanded-keys": ["-"],
|
|
2445
2509
|
value: f.value,
|
|
2446
|
-
"onUpdate:value": g[0] || (g[0] = (
|
|
2447
|
-
"tree-data":
|
|
2510
|
+
"onUpdate:value": g[0] || (g[0] = (I) => f.value = I),
|
|
2511
|
+
"tree-data": c.value,
|
|
2448
2512
|
placeholder: "请选择" + l(p),
|
|
2449
|
-
onChange:
|
|
2513
|
+
onChange: r,
|
|
2450
2514
|
onClear: m
|
|
2451
2515
|
}, d.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
|
|
2452
2516
|
};
|
|
2453
2517
|
}
|
|
2454
|
-
}),
|
|
2518
|
+
}), pr = /* @__PURE__ */ se(ol, [["__scopeId", "data-v-71d50074"]]), nl = { class: "w-full mt-1" }, il = { class: "flex flex-wrap gap-2" }, ul = ["onMouseenter"], cl = { class: "w-16 h-16 border border-solid border-gray-200 rounded overflow-hidden" }, dl = ["src"], pl = {
|
|
2455
2519
|
key: 0,
|
|
2456
2520
|
class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center gap-4 rounded"
|
|
2457
|
-
},
|
|
2521
|
+
}, fl = ["onClick"], vl = ["onClick"], ml = {
|
|
2458
2522
|
key: 0,
|
|
2459
2523
|
class: "w-16 h-16"
|
|
2460
|
-
},
|
|
2524
|
+
}, hl = /* @__PURE__ */ T({
|
|
2461
2525
|
__name: "imageList",
|
|
2462
2526
|
props: {
|
|
2463
2527
|
autoUpload: { type: Boolean, default: !1 },
|
|
@@ -2476,47 +2540,47 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2476
2540
|
showDelete: { type: Boolean, default: !0 }
|
|
2477
2541
|
},
|
|
2478
2542
|
emits: ["update:file-list"],
|
|
2479
|
-
setup(
|
|
2480
|
-
const e =
|
|
2481
|
-
var _;
|
|
2482
|
-
return (_ = e.fileExt) != null && _.length ? e.fileExt.map((k) => `.${k}`).join(",") : "";
|
|
2483
|
-
}), f = (_) => {
|
|
2543
|
+
setup(s, { emit: a }) {
|
|
2544
|
+
const e = s, t = H(), { errInfo: o } = t, u = y(e.fileList), i = y([]), p = y(), n = a, c = j(() => {
|
|
2484
2545
|
var k;
|
|
2546
|
+
return (k = e.fileExt) != null && k.length ? e.fileExt.map((w) => `.${w}`).join(",") : "";
|
|
2547
|
+
}), f = (k) => {
|
|
2548
|
+
var w;
|
|
2485
2549
|
if (e.fileExt && e.fileExt.length > 0) {
|
|
2486
|
-
const
|
|
2487
|
-
if (!e.fileExt.includes(
|
|
2550
|
+
const M = ((w = k.name.split(".").pop()) == null ? void 0 : w.toLowerCase()) || "";
|
|
2551
|
+
if (!e.fileExt.includes(M))
|
|
2488
2552
|
return G.error("文件类型不支持"), !1;
|
|
2489
2553
|
}
|
|
2490
|
-
return
|
|
2491
|
-
},
|
|
2492
|
-
const
|
|
2493
|
-
return
|
|
2494
|
-
}, d = (
|
|
2495
|
-
if (
|
|
2496
|
-
const
|
|
2497
|
-
let
|
|
2498
|
-
for (const
|
|
2499
|
-
if (!f(
|
|
2500
|
-
|
|
2554
|
+
return k.size / 1024 / 1024 > e.maxFileSize ? (G.error(`文件大小超过 ${e.maxFileSize}MB 限制`), !1) : !0;
|
|
2555
|
+
}, r = () => e.maxCount > 1 && u.value.length >= e.maxCount, m = (k) => {
|
|
2556
|
+
const w = k;
|
|
2557
|
+
return w.params || (w.params = {}), w.params.FileKey = w.name, e.parentPath && (w.params.FileKey = Oe.join("/", e.parentPath, w.name)), w;
|
|
2558
|
+
}, d = (k) => f(k) && e.autoUpload, g = async (k) => {
|
|
2559
|
+
if (k.length === 0) return;
|
|
2560
|
+
const w = [...u.value];
|
|
2561
|
+
let M = !1;
|
|
2562
|
+
for (const V of k) {
|
|
2563
|
+
if (!f(V)) {
|
|
2564
|
+
M = !0;
|
|
2501
2565
|
continue;
|
|
2502
2566
|
}
|
|
2503
|
-
const O = m(
|
|
2567
|
+
const O = m(V);
|
|
2504
2568
|
if (e.maxCount === 1) {
|
|
2505
|
-
|
|
2569
|
+
w.length = 0, w.push(O);
|
|
2506
2570
|
break;
|
|
2507
2571
|
}
|
|
2508
|
-
if (
|
|
2509
|
-
G.error(`最多上传 ${e.maxCount} 个文件`),
|
|
2572
|
+
if (r()) {
|
|
2573
|
+
G.error(`最多上传 ${e.maxCount} 个文件`), M = !0;
|
|
2510
2574
|
break;
|
|
2511
2575
|
}
|
|
2512
|
-
const ee =
|
|
2513
|
-
ee > -1 ?
|
|
2576
|
+
const ee = w.findIndex((De) => De.name === O.name);
|
|
2577
|
+
ee > -1 ? w[ee] = O : w.push(O);
|
|
2514
2578
|
}
|
|
2515
|
-
(!
|
|
2516
|
-
}, C = (
|
|
2517
|
-
i.value =
|
|
2518
|
-
},
|
|
2519
|
-
accept:
|
|
2579
|
+
(!M || w.length > 0) && (u.value = w), i.value = [];
|
|
2580
|
+
}, C = (k) => {
|
|
2581
|
+
i.value = k, g(k);
|
|
2582
|
+
}, I = j(() => ({
|
|
2583
|
+
accept: c.value,
|
|
2520
2584
|
multiple: e.maxCount !== 1,
|
|
2521
2585
|
fileList: i.value,
|
|
2522
2586
|
"onUpdate:fileList": C,
|
|
@@ -2525,87 +2589,87 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2525
2589
|
showUploadList: !1,
|
|
2526
2590
|
customRequest: async () => {
|
|
2527
2591
|
if (e.autoUpload && e.uploadUrl)
|
|
2528
|
-
for (const
|
|
2529
|
-
|
|
2592
|
+
for (const k of u.value)
|
|
2593
|
+
k.percent === 0 && await At(e.uploadUrl, k);
|
|
2530
2594
|
}
|
|
2531
2595
|
}));
|
|
2532
|
-
|
|
2596
|
+
D(
|
|
2533
2597
|
() => e.fileList,
|
|
2534
|
-
(
|
|
2535
|
-
|
|
2598
|
+
(k) => {
|
|
2599
|
+
u.value = k;
|
|
2536
2600
|
},
|
|
2537
2601
|
{ deep: !0, immediate: !0 }
|
|
2538
|
-
),
|
|
2539
|
-
() =>
|
|
2540
|
-
(
|
|
2541
|
-
|
|
2602
|
+
), D(
|
|
2603
|
+
() => u.value,
|
|
2604
|
+
(k) => {
|
|
2605
|
+
n("update:file-list", k);
|
|
2542
2606
|
},
|
|
2543
2607
|
{ deep: !0 }
|
|
2544
|
-
),
|
|
2608
|
+
), D(
|
|
2545
2609
|
() => e.parentPath,
|
|
2546
|
-
(
|
|
2547
|
-
|
|
2548
|
-
|
|
2610
|
+
(k) => {
|
|
2611
|
+
k && u.value.forEach((w) => {
|
|
2612
|
+
w.params.FileKey = Oe.join("/", k, w.fileName);
|
|
2549
2613
|
});
|
|
2550
2614
|
}
|
|
2551
2615
|
);
|
|
2552
|
-
const
|
|
2553
|
-
const
|
|
2554
|
-
$.value = fe(
|
|
2555
|
-
},
|
|
2556
|
-
const
|
|
2557
|
-
e.deleteUrl &&
|
|
2616
|
+
const B = y(!1), $ = y(""), A = (k) => {
|
|
2617
|
+
const w = u.value[k];
|
|
2618
|
+
$.value = fe(w), B.value = !0;
|
|
2619
|
+
}, Q = (k) => {
|
|
2620
|
+
const w = u.value[k];
|
|
2621
|
+
e.deleteUrl && w.minioFile && w.minioFile.Key ? Be(e.deleteUrl, {
|
|
2558
2622
|
Query: {
|
|
2559
|
-
FileKey:
|
|
2623
|
+
FileKey: w.minioFile.Key
|
|
2560
2624
|
}
|
|
2561
|
-
}).then((
|
|
2562
|
-
|
|
2563
|
-
}) :
|
|
2564
|
-
}, Z = y(/* @__PURE__ */ new Map()), fe = (
|
|
2565
|
-
if (
|
|
2566
|
-
return URL.createObjectURL(
|
|
2567
|
-
if (
|
|
2568
|
-
const
|
|
2569
|
-
return Z.value.has(
|
|
2625
|
+
}).then((M) => {
|
|
2626
|
+
M && M.status === ze.SUCCESS && (G.success("删除文件成功!"), u.value.splice(k, 1));
|
|
2627
|
+
}) : u.value.splice(k, 1);
|
|
2628
|
+
}, Z = y(/* @__PURE__ */ new Map()), fe = (k) => {
|
|
2629
|
+
if (k.originFileObj)
|
|
2630
|
+
return URL.createObjectURL(k.originFileObj);
|
|
2631
|
+
if (k.minioFile) {
|
|
2632
|
+
const w = k.minioFile.Key;
|
|
2633
|
+
return Z.value.has(w) ? Z.value.get(w) : ($e(k), "");
|
|
2570
2634
|
}
|
|
2571
2635
|
return "";
|
|
2572
|
-
}, $e = async (
|
|
2573
|
-
if (!
|
|
2574
|
-
const
|
|
2636
|
+
}, $e = async (k) => {
|
|
2637
|
+
if (!k.minioFile || !e.previewUrl) return;
|
|
2638
|
+
const w = k.minioFile.Key;
|
|
2575
2639
|
try {
|
|
2576
|
-
const
|
|
2640
|
+
const M = `${e.previewUrl.url}?FileKey=${encodeURIComponent(k.minioFile.Key)}`, V = Rt() ? await Ot.getToken() : Le().getToken(), O = await fetch(M, {
|
|
2577
2641
|
method: "GET",
|
|
2578
2642
|
headers: {
|
|
2579
|
-
Authorization: `Bearer ${
|
|
2643
|
+
Authorization: `Bearer ${V}`
|
|
2580
2644
|
}
|
|
2581
2645
|
});
|
|
2582
2646
|
if (O.ok) {
|
|
2583
|
-
const ee = await O.blob(),
|
|
2584
|
-
Z.value.set(
|
|
2647
|
+
const ee = await O.blob(), De = URL.createObjectURL(ee);
|
|
2648
|
+
Z.value.set(w, De);
|
|
2585
2649
|
} else
|
|
2586
2650
|
console.error("加载图片失败:", O.status);
|
|
2587
|
-
} catch (
|
|
2588
|
-
console.error("加载图片失败:",
|
|
2651
|
+
} catch (M) {
|
|
2652
|
+
console.error("加载图片失败:", M);
|
|
2589
2653
|
}
|
|
2590
|
-
}, _t =
|
|
2591
|
-
return (
|
|
2592
|
-
const
|
|
2593
|
-
return v(),
|
|
2594
|
-
|
|
2595
|
-
(v(!0),
|
|
2654
|
+
}, _t = j(() => u.value.length < e.maxCount), Te = y(-1);
|
|
2655
|
+
return (k, w) => {
|
|
2656
|
+
const M = re("auth");
|
|
2657
|
+
return v(), x("div", nl, [
|
|
2658
|
+
F("div", il, [
|
|
2659
|
+
(v(!0), x(P, null, R(u.value, (V, O) => (v(), x("div", {
|
|
2596
2660
|
key: O,
|
|
2597
2661
|
class: "relative image-item",
|
|
2598
2662
|
onMouseenter: (ee) => Te.value = O,
|
|
2599
|
-
onMouseleave:
|
|
2663
|
+
onMouseleave: w[0] || (w[0] = (ee) => Te.value = -1)
|
|
2600
2664
|
}, [
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
src: fe(
|
|
2665
|
+
F("div", cl, [
|
|
2666
|
+
F("img", {
|
|
2667
|
+
src: fe(V),
|
|
2604
2668
|
class: "w-full h-full object-cover"
|
|
2605
|
-
}, null, 8,
|
|
2669
|
+
}, null, 8, dl)
|
|
2606
2670
|
]),
|
|
2607
|
-
Te.value === O ? (v(),
|
|
2608
|
-
|
|
2671
|
+
Te.value === O ? (v(), x("div", pl, [
|
|
2672
|
+
k.previewUrl ? (v(), x("div", {
|
|
2609
2673
|
key: 0,
|
|
2610
2674
|
class: "flex items-center text-white cursor-pointer hover:text-blue-400",
|
|
2611
2675
|
onClick: (ee) => A(O)
|
|
@@ -2614,32 +2678,32 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2614
2678
|
icon: "icon-eye",
|
|
2615
2679
|
clickable: ""
|
|
2616
2680
|
}),
|
|
2617
|
-
|
|
2618
|
-
], 8,
|
|
2619
|
-
|
|
2681
|
+
w[1] || (w[1] = F("span", { class: "text-sm ml-1" }, "预览", -1))
|
|
2682
|
+
], 8, fl)) : _("", !0),
|
|
2683
|
+
k.showDelete !== !1 ? (v(), x("div", {
|
|
2620
2684
|
key: 1,
|
|
2621
2685
|
class: "flex items-center text-white cursor-pointer hover:text-red-400",
|
|
2622
|
-
onClick: (ee) =>
|
|
2686
|
+
onClick: (ee) => Q(O)
|
|
2623
2687
|
}, [
|
|
2624
2688
|
S(l(K), {
|
|
2625
2689
|
icon: "icon-new",
|
|
2626
2690
|
angle: 45,
|
|
2627
2691
|
clickable: ""
|
|
2628
2692
|
}),
|
|
2629
|
-
|
|
2630
|
-
], 8,
|
|
2631
|
-
])) :
|
|
2632
|
-
], 40,
|
|
2633
|
-
_t.value ? (v(),
|
|
2634
|
-
|
|
2693
|
+
w[2] || (w[2] = F("span", { class: "text-sm ml-1" }, "删除", -1))
|
|
2694
|
+
], 8, vl)) : _("", !0)
|
|
2695
|
+
])) : _("", !0)
|
|
2696
|
+
], 40, ul))), 128)),
|
|
2697
|
+
_t.value ? (v(), x("div", ml, [
|
|
2698
|
+
q((v(), b(l(ua), N({
|
|
2635
2699
|
ref_key: "fileUploader",
|
|
2636
2700
|
ref: p
|
|
2637
|
-
},
|
|
2701
|
+
}, I.value), {
|
|
2638
2702
|
default: h(() => {
|
|
2639
|
-
var
|
|
2703
|
+
var V;
|
|
2640
2704
|
return [
|
|
2641
|
-
|
|
2642
|
-
class: E(["w-16 h-16 border border-dashed border-gray-300 rounded flex items-center justify-center cursor-pointer hover:border-blue-500 transition-colors", [(
|
|
2705
|
+
F("div", {
|
|
2706
|
+
class: E(["w-16 h-16 border border-dashed border-gray-300 rounded flex items-center justify-center cursor-pointer hover:border-blue-500 transition-colors", [(V = l(o)) == null ? void 0 : V.errClass]])
|
|
2643
2707
|
}, [
|
|
2644
2708
|
S(l(K), {
|
|
2645
2709
|
icon: "icon-new",
|
|
@@ -2650,42 +2714,42 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2650
2714
|
}),
|
|
2651
2715
|
_: 1
|
|
2652
2716
|
}, 16)), [
|
|
2653
|
-
[
|
|
2717
|
+
[M, { role: ["Super", "Admin"], permit: ":imagelist:upload" }]
|
|
2654
2718
|
])
|
|
2655
|
-
])) :
|
|
2719
|
+
])) : _("", !0)
|
|
2656
2720
|
]),
|
|
2657
2721
|
S(l(ca), {
|
|
2658
|
-
preview: { visible:
|
|
2722
|
+
preview: { visible: B.value, onVisibleChange: (V) => B.value = V },
|
|
2659
2723
|
src: $.value,
|
|
2660
2724
|
style: { display: "none" }
|
|
2661
2725
|
}, null, 8, ["preview", "src"])
|
|
2662
2726
|
]);
|
|
2663
2727
|
};
|
|
2664
2728
|
}
|
|
2665
|
-
}),
|
|
2729
|
+
}), fr = /* @__PURE__ */ se(hl, [["__scopeId", "data-v-26d707cc"]]), gl = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, bl = { class: "flex w-full h-full min-h-full" }, yl = {
|
|
2666
2730
|
key: 0,
|
|
2667
2731
|
class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
|
|
2668
|
-
},
|
|
2732
|
+
}, xl = { class: "flex-1 h-full overflow-y-auto" }, vr = /* @__PURE__ */ T({
|
|
2669
2733
|
__name: "index",
|
|
2670
2734
|
props: {
|
|
2671
2735
|
left: { type: Boolean }
|
|
2672
2736
|
},
|
|
2673
|
-
setup(
|
|
2674
|
-
const { useToken: a } =
|
|
2675
|
-
return (t, o) => (v(),
|
|
2737
|
+
setup(s) {
|
|
2738
|
+
const { useToken: a } = st, { token: e } = a();
|
|
2739
|
+
return (t, o) => (v(), x("div", gl, [
|
|
2676
2740
|
S(l(da), {
|
|
2677
2741
|
class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
|
|
2678
|
-
style:
|
|
2742
|
+
style: Me({
|
|
2679
2743
|
backgroundColor: l(e).colorBgContainer
|
|
2680
2744
|
})
|
|
2681
2745
|
}, {
|
|
2682
2746
|
default: h(() => [
|
|
2683
|
-
|
|
2684
|
-
t.left ? (v(),
|
|
2685
|
-
|
|
2686
|
-
])) :
|
|
2687
|
-
|
|
2688
|
-
|
|
2747
|
+
F("div", bl, [
|
|
2748
|
+
t.left ? (v(), x("div", yl, [
|
|
2749
|
+
L(t.$slots, "left")
|
|
2750
|
+
])) : _("", !0),
|
|
2751
|
+
F("div", xl, [
|
|
2752
|
+
L(t.$slots, "default")
|
|
2689
2753
|
])
|
|
2690
2754
|
])
|
|
2691
2755
|
]),
|
|
@@ -2695,160 +2759,161 @@ const Jl = /* @__PURE__ */ T({
|
|
|
2695
2759
|
}
|
|
2696
2760
|
});
|
|
2697
2761
|
export {
|
|
2698
|
-
|
|
2699
|
-
|
|
2762
|
+
cs as Alert,
|
|
2763
|
+
Ss as AppIcon,
|
|
2700
2764
|
ue as AppRouter,
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2765
|
+
as as AsyncUploader,
|
|
2766
|
+
Xl as AutoComplete,
|
|
2767
|
+
$s as Breadcrumb,
|
|
2768
|
+
Y as Button,
|
|
2769
|
+
vt as Cache,
|
|
2706
2770
|
Sa as CacheKeys,
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2771
|
+
ss as CanPreviewFileExt,
|
|
2772
|
+
Zl as Cascader,
|
|
2773
|
+
er as Checkbox,
|
|
2774
|
+
vr as Content,
|
|
2775
|
+
tr as DatePicker,
|
|
2776
|
+
Ts as Datetime,
|
|
2777
|
+
Ns as Dialog,
|
|
2778
|
+
Vl as Drawer,
|
|
2779
|
+
gr as EventPrefix,
|
|
2780
|
+
Yl as Form,
|
|
2781
|
+
Wl as FormItem,
|
|
2782
|
+
Kl as Fullscreen,
|
|
2783
|
+
Gl as GroupTools,
|
|
2784
|
+
Ds as Header,
|
|
2785
|
+
Fs as HeaderExits,
|
|
2721
2786
|
Ta as Helper,
|
|
2722
|
-
|
|
2723
|
-
|
|
2787
|
+
br as ICONS_LIB,
|
|
2788
|
+
Is as Icon,
|
|
2724
2789
|
La as Icontool,
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2790
|
+
fr as ImageList,
|
|
2791
|
+
el as Input,
|
|
2792
|
+
ar as InputIcon,
|
|
2793
|
+
rr as InputNumber,
|
|
2794
|
+
lr as InputPassword,
|
|
2795
|
+
jl as LayoutIcon,
|
|
2796
|
+
ql as List,
|
|
2732
2797
|
Pa as ListOperate,
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2798
|
+
ds as Loading,
|
|
2799
|
+
Ps as Menu,
|
|
2800
|
+
Es as MenuTabs,
|
|
2801
|
+
Ot as MicroOpenApis,
|
|
2737
2802
|
Ne as OPTIONS,
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2803
|
+
Ft as OptionCommProps,
|
|
2804
|
+
Ls as ProjectIcon,
|
|
2805
|
+
sr as PropEditor,
|
|
2741
2806
|
ae as ProviderKeys,
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2807
|
+
rl as Radio,
|
|
2808
|
+
or as RadioStatus,
|
|
2809
|
+
nr as RangePicker,
|
|
2810
|
+
Hl as Search,
|
|
2811
|
+
Ie as SearchItem,
|
|
2812
|
+
ir as Select,
|
|
2748
2813
|
Ze as Switch,
|
|
2749
|
-
|
|
2814
|
+
Ql as Table,
|
|
2750
2815
|
ja as TableOperate,
|
|
2751
|
-
|
|
2752
|
-
|
|
2816
|
+
ur as Textarea,
|
|
2817
|
+
cr as TimePicker,
|
|
2753
2818
|
K as ToolIcon,
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2819
|
+
xt as Toolbar,
|
|
2820
|
+
ws as Tooltip,
|
|
2821
|
+
sl as Transfer,
|
|
2822
|
+
dr as TransferTable,
|
|
2823
|
+
Jl as Tree,
|
|
2824
|
+
pr as TreeSelect,
|
|
2825
|
+
os as UploadList,
|
|
2826
|
+
ls as UploadStatus,
|
|
2827
|
+
ps as appendExcelData,
|
|
2828
|
+
fs as checkExcelDuplicates,
|
|
2829
|
+
yr as checkIconsExpired,
|
|
2830
|
+
Lt as circleLoading,
|
|
2831
|
+
wt as createFromIconfont,
|
|
2832
|
+
vs as createMarkedExcelView,
|
|
2833
|
+
xr as crumbs,
|
|
2834
|
+
Ml as csvToExcelBlob,
|
|
2835
|
+
pt as csvToExcelView,
|
|
2836
|
+
ms as csvToNormalized,
|
|
2772
2837
|
Ye as defaultTools,
|
|
2773
|
-
|
|
2774
|
-
|
|
2838
|
+
_r as doDelete,
|
|
2839
|
+
kr as doExecute,
|
|
2775
2840
|
at as doQuery,
|
|
2776
|
-
|
|
2777
|
-
|
|
2841
|
+
wr as doSave,
|
|
2842
|
+
ns as donwloadFromMinio,
|
|
2778
2843
|
fa as downloadBlob,
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2844
|
+
Cr as eventBus,
|
|
2845
|
+
hs as excelToExcelView,
|
|
2846
|
+
gs as excelToNormalized,
|
|
2847
|
+
Rl as exportResults,
|
|
2848
|
+
Al as exportSelectedRows,
|
|
2784
2849
|
Je as filterColumns,
|
|
2785
2850
|
le as formValidate,
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2851
|
+
Sr as getFormDetail,
|
|
2852
|
+
$r as getIconTransform,
|
|
2853
|
+
Tr as getRecordDetail,
|
|
2854
|
+
Dr as getRuleTexts,
|
|
2855
|
+
Nt as getSelectedLabels,
|
|
2856
|
+
Fr as getSelectedValues,
|
|
2792
2857
|
oe as getToolByKey,
|
|
2793
2858
|
Ce as getToolGroup,
|
|
2794
2859
|
te as getToolStatus,
|
|
2795
2860
|
J as getToolVisible,
|
|
2796
2861
|
me as gridQueryFind,
|
|
2797
2862
|
Xe as gridQueryList,
|
|
2798
|
-
|
|
2863
|
+
Ir as gridRowUpdate,
|
|
2799
2864
|
et as gridStatusUpdate,
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2865
|
+
zl as initCacheCheck,
|
|
2866
|
+
Bl as initDirective,
|
|
2867
|
+
Pr as initMenu,
|
|
2868
|
+
Er as initPageFactory,
|
|
2869
|
+
Lr as initValidate,
|
|
2805
2870
|
ce as isEmpty,
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2871
|
+
Pt as loadOption,
|
|
2872
|
+
Ur as mergeColumns,
|
|
2873
|
+
bs as normalizedToExcelView,
|
|
2809
2874
|
wa as onColumnVisibleChanged,
|
|
2810
|
-
|
|
2875
|
+
St as onFormClose,
|
|
2811
2876
|
We as onFormSave,
|
|
2812
|
-
|
|
2813
|
-
|
|
2877
|
+
Ct as onFormSaveAs,
|
|
2878
|
+
ft as onFullscreenClick,
|
|
2814
2879
|
Ge as onGridRowDelete,
|
|
2815
2880
|
Qe as onGridRowEdit,
|
|
2816
|
-
|
|
2817
|
-
|
|
2881
|
+
Nr as onGridRowExpand,
|
|
2882
|
+
Ut as onOptionChanged,
|
|
2818
2883
|
ha as onReloadClick,
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2884
|
+
W as onToolClicked,
|
|
2885
|
+
$t as openNewForm,
|
|
2886
|
+
Br as outFormDataFields,
|
|
2887
|
+
zr as parseIcons,
|
|
2823
2888
|
Oe as path,
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2889
|
+
Mr as pendingNavigation,
|
|
2890
|
+
Or as pinia,
|
|
2891
|
+
is as previewFromMinio,
|
|
2892
|
+
Ol as processCsvFile,
|
|
2893
|
+
ys as processExcelFile,
|
|
2829
2894
|
tt as queryTree,
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2895
|
+
Ar as resetRules,
|
|
2896
|
+
Rr as routes,
|
|
2897
|
+
Kr as saveForm,
|
|
2898
|
+
jr as setFormData,
|
|
2899
|
+
Vr as showBreadcrumb,
|
|
2900
|
+
xs as toExcel,
|
|
2901
|
+
Et as unloadOption,
|
|
2902
|
+
Yr as uploadTempBtn,
|
|
2903
|
+
Wr as uploadTempOpener,
|
|
2904
|
+
qr as useAppInfo,
|
|
2905
|
+
Hr as useEditorFactory,
|
|
2841
2906
|
qe as useFormItemFactory,
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2907
|
+
Qr as useGridFactory,
|
|
2908
|
+
Gr as useHostInfo,
|
|
2909
|
+
H as useInputFactory,
|
|
2910
|
+
It as useOptionFactory,
|
|
2911
|
+
Jr as usePageFactory,
|
|
2912
|
+
Xr as usePageInfo,
|
|
2848
2913
|
Ue as useSettingInfo,
|
|
2849
2914
|
Ca as useToolFactory,
|
|
2850
|
-
|
|
2915
|
+
Zr as useTreeFactory,
|
|
2851
2916
|
Le as useUserInfo,
|
|
2852
|
-
|
|
2853
|
-
|
|
2917
|
+
es as validateData,
|
|
2918
|
+
_s as validateExcel
|
|
2854
2919
|
};
|