@skyfox2000/webui 1.4.17 → 1.4.19
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/webui.es.js
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { u as Pe, i as
|
|
2
|
-
import { ac as
|
|
3
|
-
import { A as
|
|
1
|
+
import { u as Pe, i as Z, a as he, L as la, c as ra, P as q, o as Fe, b as sa, d as oa, e as Ne, g as Me, r as ce, f as na, h as ia, j as Oe, k as ua, l as we, m as ca, _ as da, n as pa, O as Be, p as fa, q as Ae, s as va, t as ma, v as L, w as ha, x as ga, y as ba, z as _a, A as xa, B as ya, C as Y, D as ka, E as wa, F as Ca, G as Le } from "./assets/modules/upload-template-KI-IFzyp.js";
|
|
2
|
+
import { ac as Nl, S as Ml, ae as Ol, T as Bl, X as Al, ab as Ll, a9 as Rl, aa as zl, ad as Ul, $ as Vl, V as Yl, a7 as Kl, a4 as Wl, Q as jl, a6 as ql, W as Hl, I as Ql, a1 as Gl, a5 as Jl, a8 as Xl, R as Zl, U as er, af as ar, H as tr, a3 as lr, ag as rr, Z as sr, a0 as or, Y as nr, al as ir, ak as ur, ah as cr, J as dr, K as pr, ai as fr, N as vr, aj as mr, M as hr, a2 as gr } from "./assets/modules/upload-template-KI-IFzyp.js";
|
|
3
|
+
import { A as _r, U as xr, p as yr } from "./assets/modules/file-upload-CNBcbAAZ.js";
|
|
4
4
|
import { EnvConfig as Ce } from "@skyfox2000/microbase";
|
|
5
|
-
import { FrontCache as
|
|
6
|
-
import
|
|
7
|
-
import { defineComponent as
|
|
5
|
+
import { FrontCache as oe, httpPost as Re, ResStatus as ze, SERVER_HOST as Sa, fieldMapping as ne } from "@skyfox2000/fapi";
|
|
6
|
+
import le from "vue-m-message";
|
|
7
|
+
import { defineComponent as S, createBlock as b, openBlock as m, withModifiers as ae, unref as r, useAttrs as X, withCtx as h, createElementVNode as D, createVNode as k, mergeProps as F, renderSlot as I, normalizeClass as E, toDisplayString as P, createCommentVNode as y, ref as _, provide as ge, watch as T, onMounted as K, createTextVNode as N, inject as ie, resolveDirective as re, withDirectives as H, computed as Q, createElementBlock as w, normalizeStyle as be, createSlots as Ue, useSlots as Ta, Fragment as O, renderList as z, resolveDynamicComponent as $a, onActivated as _e, shallowRef as Da, onUnmounted as Ia, withKeys as Se } from "vue";
|
|
8
8
|
import "async-validator";
|
|
9
9
|
import ve from "dayjs";
|
|
10
|
-
import { Popover as
|
|
11
|
-
import { VueDraggableNext as
|
|
12
|
-
import { d as
|
|
13
|
-
import { C as
|
|
14
|
-
import { c as
|
|
15
|
-
import { _ as
|
|
10
|
+
import { Popover as Ea, theme as Ve, Drawer as Pa, Space as te, Form as Ye, message as Fa, FormItem as Ke, ConfigProvider as Te, Popconfirm as Na, Button as We, DropdownButton as Ma, Menu as xe, MenuItem as ye, Dropdown as me, Checkbox as Oa, Table as je, Tree as Ba, Cascader as Aa, DatePicker as La, Input as ee, InputPassword as Ra, InputNumber as za, RangePicker as Ua, Textarea as Va, TimePicker as Ya, Transfer as Ka, TreeSelect as Wa, LayoutContent as ja } from "ant-design-vue";
|
|
11
|
+
import { VueDraggableNext as qa } from "vue-draggable-next";
|
|
12
|
+
import { d as Ha } from "./assets/modules/uploadList-DnFXg_B3.js";
|
|
13
|
+
import { C as wr, U as Cr, a as Sr, p as Tr } from "./assets/modules/uploadList-DnFXg_B3.js";
|
|
14
|
+
import { c as qe } from "./assets/modules/index-DOlO_4KL.js";
|
|
15
|
+
import { _ as Dr, h as Ir, b as Er, a as Pr, d as Fr, e as Nr, g as Mr, f as Or, n as Br, p as Ar, t as Lr, v as Rr } from "./assets/modules/index-DOlO_4KL.js";
|
|
16
16
|
import { _ as A } from "./assets/modules/index-D14BsF7C.js";
|
|
17
|
-
import { _ as
|
|
18
|
-
import { a as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
const $e = (
|
|
17
|
+
import { _ as U } from "./assets/modules/toolIcon-BnkqBipR.js";
|
|
18
|
+
import { a as Ur } from "./assets/modules/toolIcon-BnkqBipR.js";
|
|
19
|
+
import { _ as Yr, b as Kr, c as Wr, d as jr, e as qr, I as Hr, f as Qr, g as Gr, a as Jr } from "./assets/modules/menuTabs-CqAhoF--.js";
|
|
20
|
+
import { _ as Zr } from "./assets/modules/index-CDr74akE.js";
|
|
21
|
+
import { _ as G } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
22
|
+
const $e = (l, t, e, a = "remove") => {
|
|
23
23
|
if (!e)
|
|
24
24
|
if (a === "disable") {
|
|
25
25
|
const o = t.component;
|
|
26
|
-
o ? o.props.disabled = !0 : (t.el,
|
|
26
|
+
o ? o.props.disabled = !0 : (t.el, l.setAttribute("disabled", "disabled"), l.disabled = !0), l.classList.add("disabled");
|
|
27
27
|
} else {
|
|
28
|
-
const o = document.createComment("No Permission"),
|
|
29
|
-
if (
|
|
28
|
+
const o = document.createComment("No Permission"), u = l.parentNode;
|
|
29
|
+
if (u) {
|
|
30
30
|
const n = t.component;
|
|
31
|
-
n ? n.props.style = { display: "none" } :
|
|
31
|
+
n ? n.props.style = { display: "none" } : u.replaceChild(o, l);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, De = (l) => {
|
|
35
35
|
var n, p;
|
|
36
|
-
const t = Pe(), { url: e, role: a, permit: o } =
|
|
37
|
-
if (
|
|
36
|
+
const t = Pe(), { url: e, role: a, permit: o } = l;
|
|
37
|
+
if (Z(a) && Z(o))
|
|
38
38
|
return !0;
|
|
39
|
-
const
|
|
39
|
+
const u = e ?? ((p = (n = window.location.hash) == null ? void 0 : n.split("#")) == null ? void 0 : p[1]) ?? window.location.pathname;
|
|
40
40
|
if (Ce.VITE_PERMISSION_MODE === "role")
|
|
41
|
-
return
|
|
41
|
+
return Z(a) ? !0 : t.hasRole(a);
|
|
42
42
|
if (Ce.VITE_PERMISSION_MODE === "permit") {
|
|
43
43
|
let d = !1, i = !1;
|
|
44
|
-
return
|
|
44
|
+
return Z(a) || (d = t.hasRole(a)), t.isAdmin() ? d : (Z(o) || (i = t.hasPermit(u, o)), d || i);
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
|
-
},
|
|
48
|
-
mounted(
|
|
49
|
-
const a = t.value || {}, o = t.arg || "remove",
|
|
50
|
-
$e(
|
|
47
|
+
}, Qa = {
|
|
48
|
+
mounted(l, t, e) {
|
|
49
|
+
const a = t.value || {}, o = t.arg || "remove", u = a.behavior || o, n = De(a);
|
|
50
|
+
$e(l, e, n, u);
|
|
51
51
|
},
|
|
52
|
-
updated(
|
|
53
|
-
const a = t.value || {}, o = t.arg || "remove",
|
|
54
|
-
$e(
|
|
52
|
+
updated(l, t, e) {
|
|
53
|
+
const a = t.value || {}, o = t.arg || "remove", u = a.behavior || o, n = De(a);
|
|
54
|
+
$e(l, e, n, u);
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
mounted: (
|
|
58
|
-
|
|
56
|
+
}, Ga = {
|
|
57
|
+
mounted: (l, t) => {
|
|
58
|
+
l.addEventListener("keydown", (e) => {
|
|
59
59
|
e.key === "Enter" && t.value();
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
|
-
unmounted: (
|
|
63
|
-
|
|
62
|
+
unmounted: (l) => {
|
|
63
|
+
l.removeEventListener("keydown", () => {
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}, pe = {
|
|
67
|
-
auth:
|
|
68
|
-
submit:
|
|
69
|
-
},
|
|
70
|
-
a in pe &&
|
|
71
|
-
}),
|
|
72
|
-
const e =
|
|
67
|
+
auth: Qa,
|
|
68
|
+
submit: Ga
|
|
69
|
+
}, al = (l, t) => ((t || Object.keys(pe)).forEach((a) => {
|
|
70
|
+
a in pe && l.directive(a, pe[a]);
|
|
71
|
+
}), l), W = (l, t) => {
|
|
72
|
+
const e = l.find((a) => a.key === t);
|
|
73
73
|
if (e)
|
|
74
74
|
return e;
|
|
75
|
-
for (const a of
|
|
75
|
+
for (const a of l)
|
|
76
76
|
if (a.children) {
|
|
77
|
-
const o =
|
|
77
|
+
const o = W(a.children, t);
|
|
78
78
|
if (o)
|
|
79
79
|
return o;
|
|
80
80
|
}
|
|
81
|
-
}, ke = (
|
|
81
|
+
}, ke = (l, t, e) => {
|
|
82
82
|
const a = [], o = [];
|
|
83
|
-
return e || (e = [...
|
|
83
|
+
return e || (e = [...l]), e.length && e.forEach((u, n) => {
|
|
84
84
|
let p;
|
|
85
|
-
if (typeof
|
|
86
|
-
const d =
|
|
87
|
-
p = d ? { ...d } : { key:
|
|
85
|
+
if (typeof u == "string") {
|
|
86
|
+
const d = W(l, u);
|
|
87
|
+
p = d ? { ...d } : { key: u, label: u };
|
|
88
88
|
} else {
|
|
89
|
-
const d =
|
|
90
|
-
p = d ? { ...d, ...
|
|
89
|
+
const d = W(l, u.key);
|
|
90
|
+
p = d ? { ...d, ...u } : { ...u };
|
|
91
91
|
}
|
|
92
|
-
p.click || (p.click = (d, i,
|
|
93
|
-
i && (i.rowData.value =
|
|
92
|
+
p.click || (p.click = (d, i, f) => {
|
|
93
|
+
i && (i.rowData.value = f), p.formVisible ? (p.formVisible.value = !1, setTimeout(() => {
|
|
94
94
|
p.formVisible.value = !0;
|
|
95
|
-
}, 1)) :
|
|
95
|
+
}, 1)) : le.warning("未配置点击处理事件!");
|
|
96
96
|
}), t === 0 || n < t ? a.push(p) : o.push(p);
|
|
97
97
|
}), { buttons: a, menus: o };
|
|
98
|
-
},
|
|
98
|
+
}, j = (l, t) => l.disabled && typeof l.disabled == "function" ? l.disabled(t) : l.disabled, J = (l, t) => l.visible && typeof l.visible == "function" ? l.visible(t) : l.visible ?? !0, Ja = (l, t) => {
|
|
99
99
|
t.reload.value = !0;
|
|
100
|
-
},
|
|
100
|
+
}, Xa = (l, t) => {
|
|
101
101
|
t.searchBar.value = !t.searchBar.value;
|
|
102
|
-
},
|
|
102
|
+
}, Za = (l, t) => {
|
|
103
103
|
switch (t.tableSize.value) {
|
|
104
104
|
case "large":
|
|
105
105
|
t.tableSize.value = "middle";
|
|
@@ -111,29 +111,29 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
111
111
|
t.tableSize.value = "large";
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, et = (l, t) => {
|
|
115
115
|
t.selectable.value = !t.selectable.value, t.selectable.value || (t.selectKeys.value = [], t.selectRows.value = []);
|
|
116
|
-
},
|
|
116
|
+
}, at = (l, t) => {
|
|
117
117
|
t.rowExpand.value = !t.rowExpand.value;
|
|
118
|
-
},
|
|
118
|
+
}, Ie = (l, t) => {
|
|
119
119
|
t.selectable.value = !t.selectable.value;
|
|
120
|
-
},
|
|
121
|
-
(!
|
|
122
|
-
},
|
|
120
|
+
}, V = (l, t, e, a, o) => {
|
|
121
|
+
(!l.confirm || o) && l.click && (t ? l.click(t, e, a) : l.click(null, e, a)), lt(l);
|
|
122
|
+
}, tt = (l, t) => {
|
|
123
123
|
t.selectable.value = !t.selectable.value;
|
|
124
|
-
},
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
(
|
|
129
|
-
},
|
|
130
|
-
t ? delete
|
|
124
|
+
}, He = () => {
|
|
125
|
+
const l = he();
|
|
126
|
+
l.setFullscreen(!l.fullscreen);
|
|
127
|
+
}, lt = (l, t) => {
|
|
128
|
+
(l.icons || l.labels) && (l.iconStatus = l.iconStatus || 0, l.iconStatus += 1, l.labels && l.labels.length && (l.label = l.labels[l.iconStatus % l.labels.length]), l.icons && l.icons.length && (l.icon = l.icons[l.iconStatus % l.icons.length]));
|
|
129
|
+
}, rt = (l, t) => {
|
|
130
|
+
t ? delete l.visible : l.visible = !1;
|
|
131
131
|
}, Ee = [
|
|
132
132
|
{
|
|
133
133
|
key: "Reload",
|
|
134
134
|
label: "刷新表格",
|
|
135
135
|
icon: "icon-reload",
|
|
136
|
-
click:
|
|
136
|
+
click: Ja
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
key: "Query",
|
|
@@ -141,20 +141,20 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
141
141
|
labels: ["展开搜索栏", "折叠搜索栏"],
|
|
142
142
|
icon: "icon-search",
|
|
143
143
|
iconStatus: 0,
|
|
144
|
-
click:
|
|
144
|
+
click: Xa
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
key: "RowHeight",
|
|
148
148
|
label: "行高调整",
|
|
149
149
|
icon: "icon-row-height",
|
|
150
|
-
click:
|
|
150
|
+
click: Za
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
key: "tool.multiple.checkbox",
|
|
154
154
|
label: "显示多选框",
|
|
155
155
|
labels: ["显示多选框", "隐藏多选框"],
|
|
156
156
|
icon: "icon-checkbox",
|
|
157
|
-
click:
|
|
157
|
+
click: et
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
key: "tool.expand.rows",
|
|
@@ -163,7 +163,7 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
163
163
|
icon: "icon-row-collapse",
|
|
164
164
|
iconStatus: 0,
|
|
165
165
|
icons: ["icon-row-collapse", "icon-row-expand"],
|
|
166
|
-
click:
|
|
166
|
+
click: at
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
key: "tool.export.excel",
|
|
@@ -173,12 +173,12 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
173
173
|
{
|
|
174
174
|
key: "tool.export.excel.all",
|
|
175
175
|
label: "全部记录",
|
|
176
|
-
click:
|
|
176
|
+
click: Ie
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
key: "tool.export.excel.selected",
|
|
180
180
|
label: "选中的记录",
|
|
181
|
-
click:
|
|
181
|
+
click: Ie
|
|
182
182
|
}
|
|
183
183
|
]
|
|
184
184
|
},
|
|
@@ -190,7 +190,7 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
190
190
|
{
|
|
191
191
|
key: "tool.export.pdf.selected",
|
|
192
192
|
label: "选中的记录",
|
|
193
|
-
click:
|
|
193
|
+
click: tt
|
|
194
194
|
}
|
|
195
195
|
]
|
|
196
196
|
},
|
|
@@ -210,19 +210,19 @@ const $e = (r, t, e, a = "remove") => {
|
|
|
210
210
|
icon: "icon-fullscreen",
|
|
211
211
|
iconStatus: 0,
|
|
212
212
|
icons: ["icon-fullscreen", "icon-exitscreen"],
|
|
213
|
-
click:
|
|
213
|
+
click: He
|
|
214
214
|
}
|
|
215
|
-
],
|
|
216
|
-
if (!
|
|
215
|
+
], st = (l) => {
|
|
216
|
+
if (!l.tools || l.tools.length > 0) {
|
|
217
217
|
const t = [];
|
|
218
|
-
return
|
|
218
|
+
return l.tools ? t.push(...l.tools) : t.push(...Ee), { tools: ke(Ee, 0, t).buttons };
|
|
219
219
|
}
|
|
220
220
|
return {
|
|
221
221
|
tools: []
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
|
-
var
|
|
225
|
-
class
|
|
224
|
+
var ot = /* @__PURE__ */ ((l) => (l.SYS_CONFIG = "SYS_CONFIG_", l.APP_MENU = "APP_MENU_", l.DICT_TYPE = "DICT_TYPE_", l.HOST_INFO = "HOST_INFO_", l.APP_PERMITS = "APP_PERMITS_", l.USER_SETTINGS = "USER_SETTINGS_", l.DICT_DATA = "DICT_DATA_", l.COMMON_OPTIONS = "COMMON_OPTIONS_", l))(ot || {});
|
|
225
|
+
class Qe {
|
|
226
226
|
/**
|
|
227
227
|
* 设置缓存数据(带服务器时间)
|
|
228
228
|
*/
|
|
@@ -231,26 +231,26 @@ class Ge {
|
|
|
231
231
|
data: e,
|
|
232
232
|
lastTime: a
|
|
233
233
|
};
|
|
234
|
-
|
|
234
|
+
oe.set({ key: t, storage: "local" }, o);
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* 设置缓存数据
|
|
238
238
|
*/
|
|
239
239
|
static setData(t, e) {
|
|
240
|
-
|
|
240
|
+
oe.set({ key: t, storage: "local" }, e);
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
243
|
* 获取缓存数据
|
|
244
244
|
*/
|
|
245
245
|
static getData(t) {
|
|
246
|
-
const e =
|
|
247
|
-
return e &&
|
|
246
|
+
const e = oe.get({ key: t, storage: "local" });
|
|
247
|
+
return e && Qe.isTimedData(e) ? e.data : e ?? null;
|
|
248
248
|
}
|
|
249
249
|
/**
|
|
250
250
|
* 清除缓存
|
|
251
251
|
*/
|
|
252
252
|
static remove(t) {
|
|
253
|
-
|
|
253
|
+
oe.remove({ key: t, storage: "local" });
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
256
|
* 清理指定前缀的缓存 (基于 localStorage 实现,因为 FrontCache 未提供此方法)
|
|
@@ -277,9 +277,9 @@ class Ge {
|
|
|
277
277
|
return t && typeof t == "object" && "data" in t && "lastTime" in t && typeof t.lastTime == "number";
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
async function
|
|
280
|
+
async function tl() {
|
|
281
281
|
try {
|
|
282
|
-
const
|
|
282
|
+
const l = await Re(
|
|
283
283
|
{
|
|
284
284
|
api: "PLATFORM_API",
|
|
285
285
|
url: "/api/SysCacheSvr/getLastTime",
|
|
@@ -287,12 +287,12 @@ async function Xt() {
|
|
|
287
287
|
},
|
|
288
288
|
{}
|
|
289
289
|
);
|
|
290
|
-
if ((
|
|
291
|
-
const t =
|
|
290
|
+
if ((l == null ? void 0 : l.status) === ze.SUCCESS) {
|
|
291
|
+
const t = l.data;
|
|
292
292
|
Object.keys(t).forEach((e) => {
|
|
293
293
|
const a = t[e];
|
|
294
|
-
["local", "session"].forEach((
|
|
295
|
-
const n =
|
|
294
|
+
["local", "session"].forEach((u) => {
|
|
295
|
+
const n = u === "local" ? localStorage : sessionStorage;
|
|
296
296
|
for (let p = 0; p < n.length; p++) {
|
|
297
297
|
const d = n.key(p);
|
|
298
298
|
if (d && d.endsWith(e))
|
|
@@ -306,12 +306,12 @@ async function Xt() {
|
|
|
306
306
|
});
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
|
-
} catch (
|
|
310
|
-
console.error("检查缓存更新失败",
|
|
309
|
+
} catch (l) {
|
|
310
|
+
console.error("检查缓存更新失败", l);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
const e = await
|
|
313
|
+
const ll = async (l, t) => {
|
|
314
|
+
const e = await qe(l, t);
|
|
315
315
|
if (e.success)
|
|
316
316
|
return {
|
|
317
317
|
blobUrl: e.blobUrl,
|
|
@@ -320,9 +320,9 @@ const Zt = async (r, t) => {
|
|
|
320
320
|
// 不再返回blob对象,使用URL即可
|
|
321
321
|
};
|
|
322
322
|
throw new Error(e.error || "CSV转Excel失败");
|
|
323
|
-
},
|
|
323
|
+
}, rl = async (l, t) => {
|
|
324
324
|
try {
|
|
325
|
-
const a = new TextDecoder("utf-8").decode(
|
|
325
|
+
const a = new TextDecoder("utf-8").decode(l), o = await qe(a, t);
|
|
326
326
|
return {
|
|
327
327
|
success: o.success,
|
|
328
328
|
blobUrl: o.blobUrl,
|
|
@@ -337,73 +337,67 @@ const Zt = async (r, t) => {
|
|
|
337
337
|
error: e instanceof Error ? e.message : "未知错误"
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
},
|
|
340
|
+
}, Ge = (l) => l ? Array.isArray(l) ? l.join(".") : l : "", Je = (l) => l.map((t) => ({
|
|
341
|
+
label: t.title,
|
|
342
|
+
value: Ge(t.dataIndex) || t.key || ""
|
|
343
|
+
})), Xe = (l, t) => l.map((e, a) => {
|
|
344
|
+
const o = { ...e };
|
|
345
|
+
return t.forEach((u) => {
|
|
346
|
+
const n = Ge(u.dataIndex) || u.key;
|
|
347
|
+
n && u.customRender && (o[n] = u.customRender({
|
|
348
|
+
text: e[n],
|
|
349
|
+
record: e,
|
|
350
|
+
index: a,
|
|
351
|
+
column: u
|
|
352
|
+
}));
|
|
353
|
+
}), o;
|
|
354
|
+
}), Ze = async (l, t, e) => {
|
|
355
|
+
try {
|
|
356
|
+
const o = (await import("@json2csv/plainjs")).Parser, n = new o({ fields: t }).parse(e), p = new Blob([`\uFEFF${n}`], { type: "text/csv" });
|
|
357
|
+
Ha(p, l);
|
|
358
|
+
} catch (a) {
|
|
359
|
+
console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
|
|
360
|
+
}
|
|
361
|
+
}, sl = async (l, t, e) => {
|
|
341
362
|
try {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
value: f.dataIndex || f.key || ""
|
|
345
|
-
})), d = e.map((f, u) => {
|
|
346
|
-
const h = { ...f };
|
|
347
|
-
return n.forEach((_) => {
|
|
348
|
-
const S = _.dataIndex || _.key;
|
|
349
|
-
S && _.customRender && (h[S] = _.customRender({
|
|
350
|
-
text: f[S],
|
|
351
|
-
record: f,
|
|
352
|
-
index: u,
|
|
353
|
-
column: _
|
|
354
|
-
}));
|
|
355
|
-
}), h;
|
|
356
|
-
}), v = new o({ fields: p }).parse(d), s = new Blob([`\uFEFF${v}`], { type: "text/csv" });
|
|
357
|
-
qe(s, c);
|
|
363
|
+
const a = ea(l), o = t.filter((p) => p.visible !== !1 && p.export !== !1), u = Je(o), n = Xe(e, o);
|
|
364
|
+
await Ze(a, u, n);
|
|
358
365
|
} catch (a) {
|
|
359
|
-
console.error("导出失败:", a),
|
|
366
|
+
console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
|
|
360
367
|
}
|
|
361
|
-
},
|
|
368
|
+
}, ea = (l) => {
|
|
362
369
|
const t = /\{([^}]+)\}/g;
|
|
363
|
-
return
|
|
364
|
-
},
|
|
370
|
+
return l.replace(t, (e, a) => ve().format(a));
|
|
371
|
+
}, ol = async (l, t, e, a) => {
|
|
365
372
|
try {
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
const u = s.data.map((E, y) => {
|
|
375
|
-
const M = { ...E };
|
|
376
|
-
return p.forEach((O) => {
|
|
377
|
-
const z = O.dataIndex || O.key;
|
|
378
|
-
z && O.customRender && (M[z] = O.customRender({
|
|
379
|
-
text: E[z],
|
|
380
|
-
record: E,
|
|
381
|
-
index: y,
|
|
382
|
-
column: O
|
|
383
|
-
}));
|
|
384
|
-
}), M;
|
|
385
|
-
}), _ = new c({ fields: d }).parse(u), S = new Blob([`\uFEFF${_}`], { type: "text/csv" });
|
|
386
|
-
qe(S, n);
|
|
373
|
+
const o = ea(l), u = t.filter((i) => i.visible !== !1), n = Je(u);
|
|
374
|
+
let p = e.page, d = e.gridQuery;
|
|
375
|
+
return a.api || (a.api = p.api), a.authorize === void 0 && (a.authorize = p.authorize), e.isGridLoading.value = !0, Re(a, d).then(async (i) => {
|
|
376
|
+
if (e.isGridLoading.value = !1, (i == null ? void 0 : i.status) === ze.SUCCESS) {
|
|
377
|
+
if (i.data) {
|
|
378
|
+
let f = i.data;
|
|
379
|
+
const s = Xe(f, u);
|
|
380
|
+
await Ze(o, n, s);
|
|
387
381
|
}
|
|
388
|
-
} else if ((
|
|
382
|
+
} else if ((i == null ? void 0 : i.errno) == la) {
|
|
389
383
|
Pe().logout(!1);
|
|
390
384
|
return;
|
|
391
385
|
}
|
|
392
386
|
});
|
|
393
387
|
} catch (o) {
|
|
394
|
-
console.error("导出失败:", o),
|
|
388
|
+
console.error("导出失败:", o), le.error("文件导出失败,请稍后重试");
|
|
395
389
|
}
|
|
396
|
-
},
|
|
390
|
+
}, nl = /* @__PURE__ */ S({
|
|
397
391
|
__name: "fullscreen",
|
|
398
|
-
setup(
|
|
392
|
+
setup(l) {
|
|
399
393
|
const t = he();
|
|
400
|
-
return (e, a) => (m(), b(
|
|
401
|
-
onClick:
|
|
402
|
-
icon:
|
|
394
|
+
return (e, a) => (m(), b(U, {
|
|
395
|
+
onClick: ae(r(He), ["stop"]),
|
|
396
|
+
icon: r(t).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
|
|
403
397
|
class: "w-[17px] h-[17px]"
|
|
404
398
|
}, null, 8, ["onClick", "icon"]));
|
|
405
399
|
}
|
|
406
|
-
}),
|
|
400
|
+
}), nt = { class: "ml-2" }, it = /* @__PURE__ */ S({
|
|
407
401
|
inheritAttrs: !1,
|
|
408
402
|
__name: "helper",
|
|
409
403
|
props: {
|
|
@@ -412,30 +406,30 @@ const Zt = async (r, t) => {
|
|
|
412
406
|
size: {},
|
|
413
407
|
placement: {}
|
|
414
408
|
},
|
|
415
|
-
setup(
|
|
416
|
-
const t =
|
|
417
|
-
return (e, a) => (m(), b(
|
|
409
|
+
setup(l) {
|
|
410
|
+
const t = X();
|
|
411
|
+
return (e, a) => (m(), b(r(Ea), {
|
|
418
412
|
placement: e.placement ?? "topRight"
|
|
419
413
|
}, {
|
|
420
|
-
content:
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
class:
|
|
424
|
-
},
|
|
414
|
+
content: h(() => [
|
|
415
|
+
I(e.$slots, "default", {}, () => [
|
|
416
|
+
D("div", {
|
|
417
|
+
class: E(["text-[14px]", [e.maxWidth]])
|
|
418
|
+
}, P(e.text), 3)
|
|
425
419
|
])
|
|
426
420
|
]),
|
|
427
|
-
default:
|
|
428
|
-
|
|
429
|
-
|
|
421
|
+
default: h(() => [
|
|
422
|
+
D("span", nt, [
|
|
423
|
+
k(U, F({
|
|
430
424
|
icon: "icon-question-circle",
|
|
431
425
|
class: ["text-[#888]", [e.size ? "w-" + e.size + " h-" + e.size : "w-5 h-5"]]
|
|
432
|
-
},
|
|
426
|
+
}, r(t)), null, 16, ["class"])
|
|
433
427
|
])
|
|
434
428
|
]),
|
|
435
429
|
_: 3
|
|
436
430
|
}, 8, ["placement"]));
|
|
437
431
|
}
|
|
438
|
-
}),
|
|
432
|
+
}), il = /* @__PURE__ */ S({
|
|
439
433
|
__name: "layoutIcon",
|
|
440
434
|
props: {
|
|
441
435
|
icon: {
|
|
@@ -445,21 +439,21 @@ const Zt = async (r, t) => {
|
|
|
445
439
|
type: Array
|
|
446
440
|
}
|
|
447
441
|
},
|
|
448
|
-
setup(
|
|
449
|
-
const t =
|
|
450
|
-
iconUrl: `${
|
|
442
|
+
setup(l) {
|
|
443
|
+
const t = l, a = ra({
|
|
444
|
+
iconUrl: `${Sa.MICROLAYOUT_ICONS}`,
|
|
451
445
|
monoColor: !0,
|
|
452
446
|
icon: t.icon,
|
|
453
447
|
icons: t.icons
|
|
454
448
|
});
|
|
455
|
-
return (o,
|
|
449
|
+
return (o, u) => l.icon || l.icons ? (m(), b(r(a), F({
|
|
456
450
|
key: 0,
|
|
457
|
-
icon:
|
|
458
|
-
icons:
|
|
451
|
+
icon: l.icon,
|
|
452
|
+
icons: l.icons,
|
|
459
453
|
class: ["align-middle"]
|
|
460
|
-
}, o.$attrs), null, 16, ["icon", "icons"])) :
|
|
454
|
+
}, o.$attrs), null, 16, ["icon", "icons"])) : y("", !0);
|
|
461
455
|
}
|
|
462
|
-
}),
|
|
456
|
+
}), ut = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, ul = /* @__PURE__ */ S({
|
|
463
457
|
__name: "index",
|
|
464
458
|
props: {
|
|
465
459
|
saveText: {},
|
|
@@ -469,32 +463,32 @@ const Zt = async (r, t) => {
|
|
|
469
463
|
drawerSave: { type: Function },
|
|
470
464
|
drawerSaveAs: { type: Function }
|
|
471
465
|
},
|
|
472
|
-
setup(
|
|
473
|
-
const { useToken: t } = Ve, { token: e } = t(), a =
|
|
474
|
-
ge(
|
|
475
|
-
() =>
|
|
466
|
+
setup(l) {
|
|
467
|
+
const { useToken: t } = Ve, { token: e } = t(), a = _(!1), o = l, u = o.editorCtrl;
|
|
468
|
+
ge(q.EditorControl, u), T(
|
|
469
|
+
() => u.visible.value,
|
|
476
470
|
(i) => {
|
|
477
471
|
a.value = i ?? !1;
|
|
478
472
|
}
|
|
479
|
-
),
|
|
480
|
-
a.value =
|
|
473
|
+
), K(() => {
|
|
474
|
+
a.value = u.visible.value ?? !1;
|
|
481
475
|
});
|
|
482
476
|
const n = () => {
|
|
483
|
-
o.drawerSave ? o.drawerSave() :
|
|
477
|
+
o.drawerSave ? o.drawerSave() : u && Fe(u);
|
|
484
478
|
}, p = () => {
|
|
485
|
-
o.drawerSaveAs ? o.drawerSaveAs() :
|
|
479
|
+
o.drawerSaveAs ? o.drawerSaveAs() : u && sa(u);
|
|
486
480
|
}, d = () => {
|
|
487
|
-
|
|
481
|
+
oa(u);
|
|
488
482
|
};
|
|
489
|
-
return (i,
|
|
483
|
+
return (i, f) => (m(), b(r(Pa), {
|
|
490
484
|
open: a.value,
|
|
491
|
-
"onUpdate:open":
|
|
485
|
+
"onUpdate:open": f[0] || (f[0] = (s) => a.value = s),
|
|
492
486
|
"get-container": !1,
|
|
493
487
|
closable: !1,
|
|
494
488
|
"header-style": {
|
|
495
489
|
height: "40px",
|
|
496
490
|
padding: "10px 6px 10px 16px",
|
|
497
|
-
backgroundColor:
|
|
491
|
+
backgroundColor: r(e).colorBgLayout
|
|
498
492
|
},
|
|
499
493
|
"body-style": {
|
|
500
494
|
padding: "10px 16px"
|
|
@@ -509,10 +503,10 @@ const Zt = async (r, t) => {
|
|
|
509
503
|
width: "420px",
|
|
510
504
|
onClose: d
|
|
511
505
|
}, {
|
|
512
|
-
extra:
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
506
|
+
extra: h(() => [
|
|
507
|
+
I(i.$slots, "extra", {}, () => [
|
|
508
|
+
D("div", ut, [
|
|
509
|
+
k(r(U), {
|
|
516
510
|
class: "top-[-2px] left-[2px] w-6 h-6",
|
|
517
511
|
icon: "icon-new",
|
|
518
512
|
angle: 45,
|
|
@@ -525,44 +519,44 @@ const Zt = async (r, t) => {
|
|
|
525
519
|
])
|
|
526
520
|
])
|
|
527
521
|
]),
|
|
528
|
-
default:
|
|
529
|
-
|
|
522
|
+
default: h(() => [
|
|
523
|
+
I(i.$slots, "default")
|
|
530
524
|
]),
|
|
531
|
-
footer:
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
default:
|
|
535
|
-
i.cancelText !== "" ? (m(), b(
|
|
525
|
+
footer: h(() => [
|
|
526
|
+
I(i.$slots, "footer", {}, () => [
|
|
527
|
+
k(r(te), null, {
|
|
528
|
+
default: h(() => [
|
|
529
|
+
i.cancelText !== "" ? (m(), b(r(A), {
|
|
536
530
|
key: 0,
|
|
537
531
|
onClick: d
|
|
538
532
|
}, {
|
|
539
|
-
default:
|
|
540
|
-
|
|
533
|
+
default: h(() => [
|
|
534
|
+
N(P(i.cancelText ?? "取消"), 1)
|
|
541
535
|
]),
|
|
542
536
|
_: 1
|
|
543
|
-
})) :
|
|
544
|
-
i.saveAsText !== "" &&
|
|
537
|
+
})) : y("", !0),
|
|
538
|
+
i.saveAsText !== "" && r(u).saveAsBtnVisible !== !1 ? (m(), b(r(A), {
|
|
545
539
|
key: 1,
|
|
546
540
|
onClick: p,
|
|
547
541
|
type: "primary",
|
|
548
|
-
loading:
|
|
542
|
+
loading: r(u).isFormSaving.value
|
|
549
543
|
}, {
|
|
550
|
-
default:
|
|
551
|
-
|
|
544
|
+
default: h(() => [
|
|
545
|
+
N(P(i.saveAsText ?? "另存为"), 1)
|
|
552
546
|
]),
|
|
553
547
|
_: 1
|
|
554
|
-
}, 8, ["loading"])) :
|
|
555
|
-
i.saveText !== "" &&
|
|
548
|
+
}, 8, ["loading"])) : y("", !0),
|
|
549
|
+
i.saveText !== "" && r(u).saveBtnVisible !== !1 ? (m(), b(r(A), {
|
|
556
550
|
key: 2,
|
|
557
551
|
onClick: n,
|
|
558
552
|
type: "primary",
|
|
559
|
-
loading:
|
|
553
|
+
loading: r(u).isFormSaving.value
|
|
560
554
|
}, {
|
|
561
|
-
default:
|
|
562
|
-
|
|
555
|
+
default: h(() => [
|
|
556
|
+
N(P(i.saveText ?? "保存"), 1)
|
|
563
557
|
]),
|
|
564
558
|
_: 1
|
|
565
|
-
}, 8, ["loading"])) :
|
|
559
|
+
}, 8, ["loading"])) : y("", !0)
|
|
566
560
|
]),
|
|
567
561
|
_: 1
|
|
568
562
|
})
|
|
@@ -571,18 +565,18 @@ const Zt = async (r, t) => {
|
|
|
571
565
|
_: 3
|
|
572
566
|
}, 8, ["open", "header-style"]));
|
|
573
567
|
}
|
|
574
|
-
}),
|
|
568
|
+
}), cl = /* @__PURE__ */ S({
|
|
575
569
|
__name: "index",
|
|
576
570
|
props: {
|
|
577
571
|
labelWidth: {},
|
|
578
572
|
wrapperWidth: {},
|
|
579
573
|
editorCtrl: {}
|
|
580
574
|
},
|
|
581
|
-
setup(
|
|
582
|
-
const t =
|
|
583
|
-
return ge(
|
|
584
|
-
const
|
|
585
|
-
return
|
|
575
|
+
setup(l) {
|
|
576
|
+
const t = l, e = t.editorCtrl ?? ie(q.EditorControl, void 0);
|
|
577
|
+
return ge(q.LabelWidth, t.labelWidth), (a, o) => {
|
|
578
|
+
const u = re("submit");
|
|
579
|
+
return H((m(), b(r(Ye), {
|
|
586
580
|
"label-col": { flex: t.labelWidth ?? "85px" },
|
|
587
581
|
"wrapper-col": {
|
|
588
582
|
flex: t.wrapperWidth ?? "1 0 280px"
|
|
@@ -592,24 +586,24 @@ const Zt = async (r, t) => {
|
|
|
592
586
|
flexWrap: "wrap"
|
|
593
587
|
}
|
|
594
588
|
}, {
|
|
595
|
-
default:
|
|
596
|
-
|
|
589
|
+
default: h(() => [
|
|
590
|
+
I(a.$slots, "default")
|
|
597
591
|
]),
|
|
598
592
|
_: 3
|
|
599
593
|
}, 8, ["label-col", "wrapper-col"])), [
|
|
600
594
|
[
|
|
601
|
-
|
|
595
|
+
u,
|
|
602
596
|
() => {
|
|
603
|
-
|
|
597
|
+
r(e) && r(Fe)(r(e));
|
|
604
598
|
}
|
|
605
599
|
]
|
|
606
600
|
]);
|
|
607
601
|
};
|
|
608
602
|
}
|
|
609
|
-
}),
|
|
603
|
+
}), ct = {
|
|
610
604
|
key: 0,
|
|
611
605
|
class: "flex-grow"
|
|
612
|
-
},
|
|
606
|
+
}, dt = { class: "w-8 mt-[-2px]" }, dl = /* @__PURE__ */ S({
|
|
613
607
|
inheritAttrs: !1,
|
|
614
608
|
__name: "formItem",
|
|
615
609
|
props: {
|
|
@@ -620,67 +614,67 @@ const Zt = async (r, t) => {
|
|
|
620
614
|
nextLine: { type: Boolean },
|
|
621
615
|
bottomMargin: {}
|
|
622
616
|
},
|
|
623
|
-
setup(
|
|
624
|
-
const t =
|
|
617
|
+
setup(l) {
|
|
618
|
+
const t = l, e = X(), a = ie(q.EditorControl, void 0), o = ie(q.LabelWidth, "85px") ?? "85px", u = Ne(t, a), n = _(!1);
|
|
625
619
|
setTimeout(() => {
|
|
626
620
|
n.value = !0;
|
|
627
621
|
}, 30);
|
|
628
|
-
const p =
|
|
622
|
+
const p = Q(() => {
|
|
629
623
|
var i;
|
|
630
624
|
if (!t.rule)
|
|
631
625
|
return !1;
|
|
632
626
|
const d = Me(t.rule.split("."), (i = a == null ? void 0 : a.formRules) == null ? void 0 : i.value);
|
|
633
|
-
return d ? (d.required || (
|
|
627
|
+
return d ? (d.required || (u.value.errClass = "", u.value.msg = ""), d.required ?? !0) : (Fa.error(`"${t.label}" 的验证规则 \`${t.rule}\` 不存在`), u.value.errClass = "text-[#ff4d4f]", u.value.msg = `规则 \`${t.rule}\` 不存在,请检查代码!`, !0);
|
|
634
628
|
});
|
|
635
|
-
return (d, i) => (m(),
|
|
636
|
-
class:
|
|
629
|
+
return (d, i) => (m(), w("div", {
|
|
630
|
+
class: E(["relative", d.bottomMargin ? d.bottomMargin : "mb-1"])
|
|
637
631
|
}, [
|
|
638
|
-
n.value ? (m(), b(
|
|
632
|
+
n.value ? (m(), b(r(Ke), F({
|
|
639
633
|
key: 0,
|
|
640
634
|
required: p.value,
|
|
641
635
|
class: ["relative", [d.nextLine ? "mb-0" : d.rule ? "" : "mb-3"]]
|
|
642
|
-
},
|
|
643
|
-
label:
|
|
644
|
-
|
|
645
|
-
class:
|
|
646
|
-
},
|
|
636
|
+
}, r(e)), {
|
|
637
|
+
label: h(() => [
|
|
638
|
+
D("span", {
|
|
639
|
+
class: E([r(u).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
640
|
+
}, P(d.label), 3)
|
|
647
641
|
]),
|
|
648
|
-
default:
|
|
649
|
-
|
|
650
|
-
class:
|
|
642
|
+
default: h(() => [
|
|
643
|
+
D("div", {
|
|
644
|
+
class: E(["flex items-center", d.width ? d.width : "w-full"])
|
|
651
645
|
}, [
|
|
652
|
-
d.nextLine ?
|
|
653
|
-
|
|
646
|
+
d.nextLine ? y("", !0) : (m(), w("div", ct, [
|
|
647
|
+
I(d.$slots, "default")
|
|
654
648
|
])),
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
d.helper ? (m(), b(
|
|
649
|
+
D("div", dt, [
|
|
650
|
+
I(d.$slots, "helper", {}, () => [
|
|
651
|
+
d.helper ? (m(), b(r(it), {
|
|
658
652
|
key: 0,
|
|
659
653
|
text: d.helper
|
|
660
|
-
}, null, 8, ["text"])) :
|
|
654
|
+
}, null, 8, ["text"])) : y("", !0)
|
|
661
655
|
])
|
|
662
656
|
])
|
|
663
657
|
], 2)
|
|
664
658
|
]),
|
|
665
659
|
_: 3
|
|
666
|
-
}, 16, ["required", "class"])) :
|
|
667
|
-
d.nextLine ? (m(),
|
|
660
|
+
}, 16, ["required", "class"])) : y("", !0),
|
|
661
|
+
d.nextLine ? (m(), w("div", {
|
|
668
662
|
key: 1,
|
|
669
|
-
class:
|
|
663
|
+
class: E(["w-[95%] flex items-center relative", [d.nextLine ? d.rule ? "mb-7" : "mb-3" : ""]])
|
|
670
664
|
}, [
|
|
671
|
-
|
|
672
|
-
], 2)) :
|
|
673
|
-
|
|
665
|
+
I(d.$slots, "default")
|
|
666
|
+
], 2)) : y("", !0),
|
|
667
|
+
r(u).errClass ? (m(), w("span", {
|
|
674
668
|
key: 2,
|
|
675
|
-
style: be({ left: d.nextLine ? "2px" :
|
|
669
|
+
style: be({ left: d.nextLine ? "2px" : r(o) }),
|
|
676
670
|
class: "absolute bottom-[3px] text-[12px] text-[#ff4d4fcc]"
|
|
677
|
-
},
|
|
671
|
+
}, P(r(u).msg), 5)) : y("", !0)
|
|
678
672
|
], 2));
|
|
679
673
|
}
|
|
680
|
-
}),
|
|
674
|
+
}), pt = { class: "w-1/3 relative mb-1" }, ft = { class: "flex items-center w-[90%]" }, vt = { class: "flex-grow pl-1" }, mt = {
|
|
681
675
|
key: 0,
|
|
682
676
|
class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
|
|
683
|
-
}, fe = /* @__PURE__ */
|
|
677
|
+
}, fe = /* @__PURE__ */ S({
|
|
684
678
|
inheritAttrs: !1,
|
|
685
679
|
__name: "searchItem",
|
|
686
680
|
props: {
|
|
@@ -688,26 +682,26 @@ const Zt = async (r, t) => {
|
|
|
688
682
|
width: {},
|
|
689
683
|
rule: {}
|
|
690
684
|
},
|
|
691
|
-
setup(
|
|
692
|
-
const t =
|
|
685
|
+
setup(l) {
|
|
686
|
+
const t = l, e = X(), a = ie(q.EditorControl, void 0), o = Ne(t, a), u = Q(() => {
|
|
693
687
|
var p;
|
|
694
688
|
if (!t.rule)
|
|
695
689
|
return !1;
|
|
696
690
|
const n = Me(t.rule.split("."), (p = a == null ? void 0 : a.formRules) == null ? void 0 : p.value);
|
|
697
|
-
return n ? (n.required || (o.value.errClass = "", o.value.msg = ""), n.required ?? !0) : (
|
|
691
|
+
return n ? (n.required || (o.value.errClass = "", o.value.msg = ""), n.required ?? !0) : (le.error(`"${t.label}" 的验证规则 \`${t.rule}\` 不存在`), o.value.errClass = "text-[#ff4d4f]", o.value.msg = `规则 \`${t.rule}\` 不存在,请检查代码!`, !0);
|
|
698
692
|
});
|
|
699
|
-
return (n, p) => (m(),
|
|
700
|
-
|
|
701
|
-
required:
|
|
693
|
+
return (n, p) => (m(), w("div", pt, [
|
|
694
|
+
k(r(Ke), F({
|
|
695
|
+
required: u.value,
|
|
702
696
|
class: "w-[90%] relative"
|
|
703
|
-
},
|
|
697
|
+
}, r(e), {
|
|
704
698
|
class: [n.rule ? "" : "mb-3", n.width],
|
|
705
699
|
labelCol: { span: 6 }
|
|
706
700
|
}), Ue({
|
|
707
|
-
default:
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
701
|
+
default: h(() => [
|
|
702
|
+
D("div", ft, [
|
|
703
|
+
D("div", vt, [
|
|
704
|
+
I(n.$slots, "default")
|
|
711
705
|
])
|
|
712
706
|
])
|
|
713
707
|
]),
|
|
@@ -715,18 +709,18 @@ const Zt = async (r, t) => {
|
|
|
715
709
|
}, [
|
|
716
710
|
n.label ? {
|
|
717
711
|
name: "label",
|
|
718
|
-
fn:
|
|
719
|
-
|
|
720
|
-
class:
|
|
721
|
-
},
|
|
712
|
+
fn: h(() => [
|
|
713
|
+
D("span", {
|
|
714
|
+
class: E([r(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
715
|
+
}, P(n.label), 3)
|
|
722
716
|
]),
|
|
723
717
|
key: "0"
|
|
724
718
|
} : void 0
|
|
725
719
|
]), 1040, ["required", "class"]),
|
|
726
|
-
|
|
720
|
+
r(o).msg ? (m(), w("span", mt, P(r(o).msg), 1)) : y("", !0)
|
|
727
721
|
]));
|
|
728
722
|
}
|
|
729
|
-
}),
|
|
723
|
+
}), pl = /* @__PURE__ */ S({
|
|
730
724
|
__name: "index",
|
|
731
725
|
props: {
|
|
732
726
|
search: {},
|
|
@@ -734,59 +728,59 @@ const Zt = async (r, t) => {
|
|
|
734
728
|
likeFields: {}
|
|
735
729
|
},
|
|
736
730
|
emits: ["update:search", "onsearch", "onreset"],
|
|
737
|
-
setup(
|
|
738
|
-
const e =
|
|
739
|
-
let
|
|
740
|
-
for (let
|
|
741
|
-
typeof
|
|
742
|
-
return
|
|
743
|
-
}, d =
|
|
744
|
-
|
|
731
|
+
setup(l, { emit: t }) {
|
|
732
|
+
const e = l, a = t, o = _(0), u = _(0), n = _(0), p = (c) => {
|
|
733
|
+
let g = 0;
|
|
734
|
+
for (let C = 0; C < c.length; C++)
|
|
735
|
+
typeof c[C].type == "object" && g++;
|
|
736
|
+
return g;
|
|
737
|
+
}, d = Ta(), i = () => {
|
|
738
|
+
u.value = 0, n.value = 0, d.default && (u.value = p(d.default({}))), e.gridCtrl && e.gridCtrl.searchBar && d.control && (n.value = p(d.control({}))), o.value = 2 - (u.value + n.value) % 3;
|
|
745
739
|
};
|
|
746
|
-
|
|
740
|
+
T(
|
|
747
741
|
() => {
|
|
748
|
-
var
|
|
749
|
-
return (
|
|
742
|
+
var c;
|
|
743
|
+
return (c = e.gridCtrl) == null ? void 0 : c.searchBar;
|
|
750
744
|
},
|
|
751
745
|
() => {
|
|
752
746
|
i();
|
|
753
747
|
}
|
|
754
748
|
);
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
var
|
|
749
|
+
const f = JSON.parse(JSON.stringify(e.search));
|
|
750
|
+
K(() => {
|
|
751
|
+
var g;
|
|
758
752
|
i();
|
|
759
|
-
let
|
|
753
|
+
let c = { ...e.search };
|
|
760
754
|
e.gridCtrl && (e.gridCtrl.gridQuery = {
|
|
761
755
|
...e.gridCtrl.gridQuery,
|
|
762
756
|
Query: {
|
|
763
|
-
...(
|
|
764
|
-
...
|
|
757
|
+
...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
|
|
758
|
+
...c
|
|
765
759
|
}
|
|
766
760
|
});
|
|
767
761
|
});
|
|
768
762
|
const s = () => {
|
|
769
|
-
var
|
|
770
|
-
let
|
|
763
|
+
var g;
|
|
764
|
+
let c = { ...e.search };
|
|
771
765
|
if (e.likeFields)
|
|
772
|
-
for (const
|
|
773
|
-
|
|
766
|
+
for (const C of e.likeFields)
|
|
767
|
+
c[C] && (c[C] = { $like: "%" + c[C] + "%" });
|
|
774
768
|
e.gridCtrl && (e.gridCtrl.gridQuery = {
|
|
775
769
|
...e.gridCtrl.gridQuery,
|
|
776
770
|
Query: {
|
|
777
|
-
...(
|
|
778
|
-
...
|
|
771
|
+
...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
|
|
772
|
+
...c
|
|
779
773
|
}
|
|
780
|
-
}, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), a("onsearch",
|
|
781
|
-
},
|
|
782
|
-
const
|
|
783
|
-
for (const
|
|
784
|
-
|
|
785
|
-
a("update:search",
|
|
774
|
+
}, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), a("onsearch", c);
|
|
775
|
+
}, v = () => {
|
|
776
|
+
const c = JSON.parse(JSON.stringify(f));
|
|
777
|
+
for (const g in e.search)
|
|
778
|
+
c[g] === void 0 && (c[g] = void 0);
|
|
779
|
+
a("update:search", c), a("onreset");
|
|
786
780
|
};
|
|
787
|
-
return (
|
|
788
|
-
const
|
|
789
|
-
return
|
|
781
|
+
return (c, g) => {
|
|
782
|
+
const C = re("submit");
|
|
783
|
+
return u.value + n.value > 0 ? H((m(), b(r(Ye), {
|
|
790
784
|
key: 0,
|
|
791
785
|
"label-col": { flex: "60px" },
|
|
792
786
|
style: {
|
|
@@ -795,44 +789,44 @@ const Zt = async (r, t) => {
|
|
|
795
789
|
},
|
|
796
790
|
class: "flex mb-[10px]"
|
|
797
791
|
}, {
|
|
798
|
-
default:
|
|
799
|
-
var
|
|
792
|
+
default: h(() => {
|
|
793
|
+
var $, M;
|
|
800
794
|
return [
|
|
801
|
-
|
|
802
|
-
(
|
|
795
|
+
I(c.$slots, "default"),
|
|
796
|
+
($ = c.gridCtrl) != null && $.searchBar ? I(c.$slots, "control", { key: 0 }) : y("", !0),
|
|
803
797
|
o.value >= 1 ? (m(), b(fe, {
|
|
804
798
|
key: 1,
|
|
805
799
|
class: "w-1/3"
|
|
806
|
-
})) :
|
|
800
|
+
})) : y("", !0),
|
|
807
801
|
o.value >= 2 ? (m(), b(fe, {
|
|
808
802
|
key: 2,
|
|
809
803
|
class: "w-1/3"
|
|
810
|
-
})) :
|
|
811
|
-
|
|
804
|
+
})) : y("", !0),
|
|
805
|
+
u.value || (M = c.gridCtrl) != null && M.searchBar ? (m(), b(fe, {
|
|
812
806
|
key: 3,
|
|
813
807
|
class: "w-1/3 flex justify-end text-right pr-5",
|
|
814
808
|
"wrapper-col": { flex: "auto" }
|
|
815
809
|
}, {
|
|
816
|
-
default:
|
|
817
|
-
|
|
818
|
-
default:
|
|
819
|
-
|
|
810
|
+
default: h(() => [
|
|
811
|
+
k(r(te), null, {
|
|
812
|
+
default: h(() => [
|
|
813
|
+
k(r(A), {
|
|
820
814
|
type: "primary",
|
|
821
815
|
onClick: s,
|
|
822
816
|
icon: "icon-search"
|
|
823
817
|
}, {
|
|
824
|
-
default:
|
|
825
|
-
|
|
818
|
+
default: h(() => g[0] || (g[0] = [
|
|
819
|
+
N("搜索")
|
|
826
820
|
])),
|
|
827
821
|
_: 1,
|
|
828
822
|
__: [0]
|
|
829
823
|
}),
|
|
830
|
-
|
|
831
|
-
onClick:
|
|
824
|
+
k(r(A), {
|
|
825
|
+
onClick: v,
|
|
832
826
|
icon: "icon-reset"
|
|
833
827
|
}, {
|
|
834
|
-
default:
|
|
835
|
-
|
|
828
|
+
default: h(() => g[1] || (g[1] = [
|
|
829
|
+
N("重置")
|
|
836
830
|
])),
|
|
837
831
|
_: 1,
|
|
838
832
|
__: [1]
|
|
@@ -842,23 +836,23 @@ const Zt = async (r, t) => {
|
|
|
842
836
|
})
|
|
843
837
|
]),
|
|
844
838
|
_: 1
|
|
845
|
-
})) :
|
|
839
|
+
})) : y("", !0)
|
|
846
840
|
];
|
|
847
841
|
}),
|
|
848
842
|
_: 3
|
|
849
843
|
})), [
|
|
850
|
-
[
|
|
851
|
-
]) :
|
|
844
|
+
[C, s]
|
|
845
|
+
]) : y("", !0);
|
|
852
846
|
};
|
|
853
847
|
}
|
|
854
|
-
}),
|
|
848
|
+
}), ht = /* @__PURE__ */ S({
|
|
855
849
|
__name: "tableOperate",
|
|
856
850
|
props: {
|
|
857
851
|
record: {},
|
|
858
852
|
gridCtrl: {}
|
|
859
853
|
},
|
|
860
|
-
setup(
|
|
861
|
-
const t =
|
|
854
|
+
setup(l) {
|
|
855
|
+
const t = l, e = t.gridCtrl, a = Q(() => ce.currentRoute.value.path), o = [
|
|
862
856
|
{
|
|
863
857
|
key: "Edit",
|
|
864
858
|
label: "编辑",
|
|
@@ -866,7 +860,7 @@ const Zt = async (r, t) => {
|
|
|
866
860
|
visible: !0,
|
|
867
861
|
role: ["Super", "Admin"],
|
|
868
862
|
permit: ":edit",
|
|
869
|
-
click: () =>
|
|
863
|
+
click: () => na(e, t.record)
|
|
870
864
|
},
|
|
871
865
|
{
|
|
872
866
|
key: "Delete",
|
|
@@ -878,13 +872,13 @@ const Zt = async (r, t) => {
|
|
|
878
872
|
permit: ":delete",
|
|
879
873
|
confirm: !0,
|
|
880
874
|
confirmText: "是否删除此记录?",
|
|
881
|
-
click: () =>
|
|
875
|
+
click: () => ia(e, t.record)
|
|
882
876
|
}
|
|
883
|
-
], { buttons:
|
|
877
|
+
], { buttons: u, menus: n } = ke(o, 0, e.operates), p = (d) => {
|
|
884
878
|
if (typeof d.disabled == "boolean")
|
|
885
879
|
return d.disabled;
|
|
886
880
|
if (typeof d.disabled == "function")
|
|
887
|
-
return
|
|
881
|
+
return j(d, t.record) ?? !1;
|
|
888
882
|
if (t.record.hasOwnProperty("Enabled"))
|
|
889
883
|
switch (d.key) {
|
|
890
884
|
case "Edit":
|
|
@@ -895,19 +889,19 @@ const Zt = async (r, t) => {
|
|
|
895
889
|
return !1;
|
|
896
890
|
};
|
|
897
891
|
return (d, i) => {
|
|
898
|
-
const
|
|
899
|
-
return m(), b(
|
|
892
|
+
const f = re("auth");
|
|
893
|
+
return m(), b(r(Te), { theme: {
|
|
900
894
|
token: {
|
|
901
895
|
fontSize: 13
|
|
902
896
|
}
|
|
903
897
|
} }, {
|
|
904
|
-
default:
|
|
905
|
-
|
|
906
|
-
default:
|
|
907
|
-
(m(!0),
|
|
898
|
+
default: h(() => [
|
|
899
|
+
k(r(te), null, {
|
|
900
|
+
default: h(() => [
|
|
901
|
+
(m(!0), w(O, null, z(r(u), (s) => (m(), w(O, {
|
|
908
902
|
key: s.key
|
|
909
903
|
}, [
|
|
910
|
-
|
|
904
|
+
r(J)(s, t.record) ? (m(), b(r(Na), {
|
|
911
905
|
key: 0,
|
|
912
906
|
disabled: p(s) || !s.confirm,
|
|
913
907
|
cancelText: "否",
|
|
@@ -915,72 +909,72 @@ const Zt = async (r, t) => {
|
|
|
915
909
|
title: s.confirmText,
|
|
916
910
|
okButtonProps: { size: "small" },
|
|
917
911
|
cancelButtonProps: { size: "small" },
|
|
918
|
-
onConfirm: (
|
|
912
|
+
onConfirm: (v) => r(V)(s, r(e).page, r(e), t.record, !0)
|
|
919
913
|
}, {
|
|
920
|
-
default:
|
|
921
|
-
|
|
914
|
+
default: h(() => [
|
|
915
|
+
r(J)(s, t.record) ? H((m(), b(r(We), {
|
|
922
916
|
key: s.key,
|
|
923
917
|
type: s.type ?? "text",
|
|
924
918
|
danger: s.danger,
|
|
925
919
|
disabled: p(s),
|
|
926
|
-
onClick: (
|
|
920
|
+
onClick: (v) => r(V)(s, r(e).page, r(e), t.record),
|
|
927
921
|
size: "small",
|
|
928
922
|
style: be({
|
|
929
923
|
padding: s.type ?? "0px 4px"
|
|
930
924
|
})
|
|
931
925
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
|
|
926
|
+
default: h(() => [
|
|
927
|
+
N(P(s.label), 1)
|
|
934
928
|
]),
|
|
935
929
|
_: 2
|
|
936
930
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
937
|
-
[
|
|
938
|
-
]) :
|
|
931
|
+
[f, { url: a.value, role: s.role, permit: s.permit }]
|
|
932
|
+
]) : y("", !0)
|
|
939
933
|
]),
|
|
940
934
|
_: 2
|
|
941
|
-
}, 1032, ["disabled", "title", "onConfirm"])) :
|
|
935
|
+
}, 1032, ["disabled", "title", "onConfirm"])) : y("", !0)
|
|
942
936
|
], 64))), 128)),
|
|
943
|
-
d.record.Enabled == 1 ? (m(), b(
|
|
937
|
+
d.record.Enabled == 1 ? (m(), b(r(Te), {
|
|
944
938
|
key: 0,
|
|
945
939
|
autoInsertSpaceInButton: !1
|
|
946
940
|
}, {
|
|
947
|
-
default:
|
|
948
|
-
|
|
941
|
+
default: h(() => [
|
|
942
|
+
r(n).length > 0 ? (m(), b(r(Ma), {
|
|
949
943
|
key: 0,
|
|
950
944
|
size: "small"
|
|
951
945
|
}, {
|
|
952
|
-
overlay:
|
|
953
|
-
|
|
954
|
-
default:
|
|
955
|
-
(m(!0),
|
|
946
|
+
overlay: h(() => [
|
|
947
|
+
k(r(xe), null, {
|
|
948
|
+
default: h(() => [
|
|
949
|
+
(m(!0), w(O, null, z(r(n), (s) => (m(), w(O, {
|
|
956
950
|
key: s.key
|
|
957
951
|
}, [
|
|
958
|
-
|
|
952
|
+
r(J)(s, t.record) ? H((m(), b(r(ye), {
|
|
959
953
|
key: 0,
|
|
960
954
|
disabled: p(s),
|
|
961
|
-
onClick: (
|
|
955
|
+
onClick: (v) => r(V)(s, r(e).page, r(e), t.record)
|
|
962
956
|
}, {
|
|
963
|
-
default:
|
|
964
|
-
|
|
957
|
+
default: h(() => [
|
|
958
|
+
N(P(s.label), 1)
|
|
965
959
|
]),
|
|
966
960
|
_: 2
|
|
967
961
|
}, 1032, ["disabled", "onClick"])), [
|
|
968
|
-
[
|
|
969
|
-
]) :
|
|
962
|
+
[f, { url: a.value, role: s.role, permit: s.permit }]
|
|
963
|
+
]) : y("", !0)
|
|
970
964
|
], 64))), 128))
|
|
971
965
|
]),
|
|
972
966
|
_: 1
|
|
973
967
|
})
|
|
974
968
|
]),
|
|
975
|
-
default:
|
|
976
|
-
i[0] || (i[0] =
|
|
969
|
+
default: h(() => [
|
|
970
|
+
i[0] || (i[0] = N(" 更多 "))
|
|
977
971
|
]),
|
|
978
972
|
_: 1,
|
|
979
973
|
__: [0]
|
|
980
|
-
})) :
|
|
974
|
+
})) : y("", !0)
|
|
981
975
|
]),
|
|
982
976
|
_: 1
|
|
983
|
-
})) :
|
|
977
|
+
})) : y("", !0)
|
|
984
978
|
]),
|
|
985
979
|
_: 1
|
|
986
980
|
})
|
|
@@ -989,93 +983,93 @@ const Zt = async (r, t) => {
|
|
|
989
983
|
});
|
|
990
984
|
};
|
|
991
985
|
}
|
|
992
|
-
}),
|
|
986
|
+
}), gt = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, bt = /* @__PURE__ */ S({
|
|
993
987
|
__name: "icontool",
|
|
994
988
|
props: {
|
|
995
989
|
gridCtrl: {}
|
|
996
990
|
},
|
|
997
|
-
setup(
|
|
998
|
-
const t =
|
|
999
|
-
|
|
991
|
+
setup(l) {
|
|
992
|
+
const t = l, e = t.gridCtrl, { tools: a } = st(t.gridCtrl), o = he();
|
|
993
|
+
T(
|
|
1000
994
|
() => e.selectable.value,
|
|
1001
995
|
(p) => {
|
|
1002
|
-
|
|
996
|
+
W(a, "tool.export.excel.selected") && (W(a, "tool.export.excel.selected").disabled = !p), W(a, "tool.export.pdf.selected") && (W(a, "tool.export.pdf.selected").disabled = !p);
|
|
1003
997
|
}
|
|
1004
998
|
);
|
|
1005
|
-
const
|
|
1006
|
-
|
|
999
|
+
const u = _([]);
|
|
1000
|
+
T(
|
|
1007
1001
|
() => e.columns.value,
|
|
1008
1002
|
(p) => {
|
|
1009
|
-
|
|
1003
|
+
u.value = Oe(p, !0);
|
|
1010
1004
|
},
|
|
1011
1005
|
{ deep: !0, immediate: !0 }
|
|
1012
1006
|
);
|
|
1013
1007
|
const n = () => {
|
|
1014
|
-
e.columns.value.splice(0, e.columns.value.length, ...
|
|
1008
|
+
e.columns.value.splice(0, e.columns.value.length, ...u.value), o.setTableColumns(ce.currentRoute.value.path, e.columns.value);
|
|
1015
1009
|
};
|
|
1016
|
-
return (p, d) => (m(),
|
|
1017
|
-
(m(!0),
|
|
1010
|
+
return (p, d) => (m(), w("div", gt, [
|
|
1011
|
+
(m(!0), w(O, null, z(r(a), (i, f) => (m(), w(O, {
|
|
1018
1012
|
key: i.key
|
|
1019
1013
|
}, [
|
|
1020
|
-
|
|
1014
|
+
r(J)(i) && i.dropdown ? (m(), b(r(me), {
|
|
1021
1015
|
key: 0,
|
|
1022
1016
|
placement: "bottomRight",
|
|
1023
1017
|
class: "p-0 rounded-none"
|
|
1024
1018
|
}, {
|
|
1025
|
-
overlay:
|
|
1026
|
-
|
|
1027
|
-
class:
|
|
1019
|
+
overlay: h(() => [
|
|
1020
|
+
D("div", {
|
|
1021
|
+
class: E(["min-w-[100px] bg-white rounded shadow-md p-4", i.dropdownClass])
|
|
1028
1022
|
}, [
|
|
1029
|
-
i.dropdown === "headset" ? (m(), b(
|
|
1023
|
+
i.dropdown === "headset" ? (m(), b(r(qa), {
|
|
1030
1024
|
key: 0,
|
|
1031
|
-
modelValue:
|
|
1032
|
-
"onUpdate:modelValue": d[1] || (d[1] = (s) =>
|
|
1025
|
+
modelValue: u.value,
|
|
1026
|
+
"onUpdate:modelValue": d[1] || (d[1] = (s) => u.value = s),
|
|
1033
1027
|
"item-key": "dataIndex",
|
|
1034
1028
|
onEnd: n,
|
|
1035
1029
|
handle: ".drag-handle"
|
|
1036
1030
|
}, {
|
|
1037
|
-
default:
|
|
1038
|
-
(m(!0),
|
|
1031
|
+
default: h(() => [
|
|
1032
|
+
(m(!0), w(O, null, z(u.value, (s) => (m(), w("div", {
|
|
1039
1033
|
key: s.name,
|
|
1040
|
-
onClick: d[0] || (d[0] =
|
|
1034
|
+
onClick: d[0] || (d[0] = ae(() => {
|
|
1041
1035
|
}, ["stop"])),
|
|
1042
1036
|
class: "flex items-center mb-2 last:mb-0 select-none"
|
|
1043
1037
|
}, [
|
|
1044
|
-
d[2] || (d[2] =
|
|
1045
|
-
|
|
1038
|
+
d[2] || (d[2] = D("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
|
|
1039
|
+
k(r(Oa), {
|
|
1046
1040
|
checked: s.visible !== !1,
|
|
1047
|
-
onChange:
|
|
1048
|
-
(
|
|
1049
|
-
|
|
1041
|
+
onChange: ae(
|
|
1042
|
+
(v) => {
|
|
1043
|
+
r(rt)(s, v.target.checked);
|
|
1050
1044
|
},
|
|
1051
1045
|
["stop", "prevent"]
|
|
1052
1046
|
),
|
|
1053
1047
|
class: "text-gray-700 hover:text-gray-900 select-none"
|
|
1054
1048
|
}, {
|
|
1055
|
-
default:
|
|
1056
|
-
|
|
1049
|
+
default: h(() => [
|
|
1050
|
+
N(P(s.title), 1)
|
|
1057
1051
|
]),
|
|
1058
1052
|
_: 2
|
|
1059
1053
|
}, 1032, ["checked", "onChange"])
|
|
1060
1054
|
]))), 128))
|
|
1061
1055
|
]),
|
|
1062
1056
|
_: 1
|
|
1063
|
-
}, 8, ["modelValue"])) :
|
|
1057
|
+
}, 8, ["modelValue"])) : y("", !0)
|
|
1064
1058
|
], 2)
|
|
1065
1059
|
]),
|
|
1066
|
-
default:
|
|
1067
|
-
|
|
1068
|
-
class:
|
|
1060
|
+
default: h(() => [
|
|
1061
|
+
k(r(A), {
|
|
1062
|
+
class: E([
|
|
1069
1063
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
1070
|
-
|
|
1071
|
-
|
|
1064
|
+
f === 0 ? "rounded-l-[5px]" : "",
|
|
1065
|
+
f === r(a).length - 1 ? "rounded-r-[5px]" : ""
|
|
1072
1066
|
]),
|
|
1073
|
-
disabled:
|
|
1067
|
+
disabled: r(j)(i),
|
|
1074
1068
|
tiptext: i.label,
|
|
1075
|
-
onClick: (s) =>
|
|
1069
|
+
onClick: (s) => r(V)(i, r(e).page, r(e))
|
|
1076
1070
|
}, {
|
|
1077
|
-
default:
|
|
1078
|
-
|
|
1071
|
+
default: h(() => [
|
|
1072
|
+
k(r(U), {
|
|
1079
1073
|
icon: i.icon,
|
|
1080
1074
|
class: "w-[18px] h-[18.5px]",
|
|
1081
1075
|
clickable: ""
|
|
@@ -1085,39 +1079,39 @@ const Zt = async (r, t) => {
|
|
|
1085
1079
|
}, 1032, ["class", "disabled", "tiptext", "onClick"])
|
|
1086
1080
|
]),
|
|
1087
1081
|
_: 2
|
|
1088
|
-
}, 1024)) : !i.children &&
|
|
1082
|
+
}, 1024)) : !i.children && r(J)(i) ? (m(), b(r(A), {
|
|
1089
1083
|
key: 1,
|
|
1090
|
-
class:
|
|
1084
|
+
class: E([
|
|
1091
1085
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
1092
|
-
|
|
1093
|
-
|
|
1086
|
+
f === 0 ? "rounded-l-[5px]" : "",
|
|
1087
|
+
f === r(a).length - 1 ? "rounded-r-[5px]" : ""
|
|
1094
1088
|
]),
|
|
1095
|
-
disabled:
|
|
1089
|
+
disabled: r(j)(i),
|
|
1096
1090
|
tiptext: i.label,
|
|
1097
|
-
onClick: (s) =>
|
|
1091
|
+
onClick: (s) => r(V)(i, r(e).page, r(e))
|
|
1098
1092
|
}, {
|
|
1099
|
-
default:
|
|
1100
|
-
|
|
1093
|
+
default: h(() => [
|
|
1094
|
+
k(r(U), {
|
|
1101
1095
|
icon: i.icon,
|
|
1102
1096
|
class: "w-[18px] h-[18.5px]",
|
|
1103
1097
|
clickable: ""
|
|
1104
1098
|
}, null, 8, ["icon"])
|
|
1105
1099
|
]),
|
|
1106
1100
|
_: 2
|
|
1107
|
-
}, 1032, ["class", "disabled", "tiptext", "onClick"])) :
|
|
1101
|
+
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : r(J)(i) ? (m(), b(r(me), {
|
|
1108
1102
|
key: 2,
|
|
1109
1103
|
placement: "bottomRight",
|
|
1110
1104
|
class: "p-0 rounded-none"
|
|
1111
1105
|
}, {
|
|
1112
|
-
overlay:
|
|
1113
|
-
|
|
1114
|
-
default:
|
|
1115
|
-
(m(!0),
|
|
1106
|
+
overlay: h(() => [
|
|
1107
|
+
k(r(xe), null, {
|
|
1108
|
+
default: h(() => [
|
|
1109
|
+
(m(!0), w(O, null, z(i.children, (s) => (m(), b(r(ye), {
|
|
1116
1110
|
key: s.key,
|
|
1117
|
-
disabled:
|
|
1111
|
+
disabled: r(j)(s)
|
|
1118
1112
|
}, {
|
|
1119
|
-
default:
|
|
1120
|
-
|
|
1113
|
+
default: h(() => [
|
|
1114
|
+
N(P(s.label), 1)
|
|
1121
1115
|
]),
|
|
1122
1116
|
_: 2
|
|
1123
1117
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -1125,20 +1119,20 @@ const Zt = async (r, t) => {
|
|
|
1125
1119
|
_: 2
|
|
1126
1120
|
}, 1024)
|
|
1127
1121
|
]),
|
|
1128
|
-
default:
|
|
1129
|
-
|
|
1130
|
-
class:
|
|
1122
|
+
default: h(() => [
|
|
1123
|
+
k(r(A), {
|
|
1124
|
+
class: E([
|
|
1131
1125
|
"!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
1132
|
-
|
|
1126
|
+
f === 0 ? "rounded-l-[5px]" : ""
|
|
1133
1127
|
]),
|
|
1134
|
-
disabled:
|
|
1128
|
+
disabled: r(j)(i),
|
|
1135
1129
|
tiptext: i.label,
|
|
1136
1130
|
icon: i.icon,
|
|
1137
1131
|
iconProps: { class: "w-[19px] h-[19px]" },
|
|
1138
|
-
onClick: (s) =>
|
|
1132
|
+
onClick: (s) => r(V)(i, r(e).page, r(e))
|
|
1139
1133
|
}, {
|
|
1140
|
-
default:
|
|
1141
|
-
|
|
1134
|
+
default: h(() => [
|
|
1135
|
+
k(r(U), {
|
|
1142
1136
|
icon: "icon-down-arrow",
|
|
1143
1137
|
class: "w-[12px] h-[12px]"
|
|
1144
1138
|
})
|
|
@@ -1147,18 +1141,18 @@ const Zt = async (r, t) => {
|
|
|
1147
1141
|
}, 1032, ["class", "disabled", "tiptext", "icon", "onClick"])
|
|
1148
1142
|
]),
|
|
1149
1143
|
_: 2
|
|
1150
|
-
}, 1024)) :
|
|
1144
|
+
}, 1024)) : y("", !0)
|
|
1151
1145
|
], 64))), 128))
|
|
1152
1146
|
]));
|
|
1153
1147
|
}
|
|
1154
|
-
}),
|
|
1148
|
+
}), _t = { class: "flex justify-between mb-[10px]" }, xt = { key: 1 }, yt = 3, kt = /* @__PURE__ */ S({
|
|
1155
1149
|
__name: "index",
|
|
1156
1150
|
props: {
|
|
1157
1151
|
gridCtrl: {},
|
|
1158
1152
|
editorCtrl: {}
|
|
1159
1153
|
},
|
|
1160
|
-
setup(
|
|
1161
|
-
const t =
|
|
1154
|
+
setup(l) {
|
|
1155
|
+
const t = l, e = t.gridCtrl, a = e.page, o = t.editorCtrl, u = Q(() => ce.currentRoute.value.path), n = [
|
|
1162
1156
|
{
|
|
1163
1157
|
key: "New",
|
|
1164
1158
|
label: "新增",
|
|
@@ -1168,92 +1162,92 @@ const Zt = async (r, t) => {
|
|
|
1168
1162
|
role: ["Super", "Admin"],
|
|
1169
1163
|
permit: ":new",
|
|
1170
1164
|
// 默认仅受权限码控制
|
|
1171
|
-
click: () =>
|
|
1165
|
+
click: () => ua(o)
|
|
1172
1166
|
}
|
|
1173
|
-
], p =
|
|
1174
|
-
return
|
|
1167
|
+
], p = _([]), d = _([]);
|
|
1168
|
+
return T(
|
|
1175
1169
|
() => {
|
|
1176
1170
|
var i;
|
|
1177
1171
|
return (i = e.buttons) == null ? void 0 : i.value;
|
|
1178
1172
|
},
|
|
1179
1173
|
() => {
|
|
1180
1174
|
var s;
|
|
1181
|
-
const { buttons: i, menus:
|
|
1175
|
+
const { buttons: i, menus: f } = ke(
|
|
1182
1176
|
n,
|
|
1183
|
-
e.flat !== void 0 ? e.flat :
|
|
1177
|
+
e.flat !== void 0 ? e.flat : yt,
|
|
1184
1178
|
(s = e.buttons) == null ? void 0 : s.value
|
|
1185
1179
|
);
|
|
1186
|
-
p.value.splice(0, p.value.length, ...i), d.value.splice(0, d.value.length, ...
|
|
1180
|
+
p.value.splice(0, p.value.length, ...i), d.value.splice(0, d.value.length, ...f);
|
|
1187
1181
|
},
|
|
1188
1182
|
{
|
|
1189
1183
|
deep: !0,
|
|
1190
1184
|
immediate: !0
|
|
1191
1185
|
}
|
|
1192
|
-
), (i,
|
|
1186
|
+
), (i, f) => {
|
|
1193
1187
|
const s = re("auth");
|
|
1194
|
-
return m(),
|
|
1195
|
-
|
|
1196
|
-
default:
|
|
1197
|
-
(m(!0),
|
|
1198
|
-
key:
|
|
1199
|
-
type:
|
|
1200
|
-
danger:
|
|
1201
|
-
disabled:
|
|
1202
|
-
icon:
|
|
1203
|
-
onClick: (
|
|
1188
|
+
return m(), w("div", _t, [
|
|
1189
|
+
k(r(te), null, {
|
|
1190
|
+
default: h(() => [
|
|
1191
|
+
(m(!0), w(O, null, z(p.value, (v) => H((m(), b(r(A), {
|
|
1192
|
+
key: v.key,
|
|
1193
|
+
type: v.type,
|
|
1194
|
+
danger: v.danger,
|
|
1195
|
+
disabled: r(j)(v),
|
|
1196
|
+
icon: v.icon,
|
|
1197
|
+
onClick: (c) => r(V)(v, r(a), r(e))
|
|
1204
1198
|
}, {
|
|
1205
|
-
default:
|
|
1206
|
-
|
|
1199
|
+
default: h(() => [
|
|
1200
|
+
N(P(v.label), 1)
|
|
1207
1201
|
]),
|
|
1208
1202
|
_: 2
|
|
1209
1203
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
1210
|
-
[s, { url:
|
|
1204
|
+
[s, { url: u.value, role: v.role, permit: v.permit }]
|
|
1211
1205
|
])), 128)),
|
|
1212
|
-
d.value.length > 0 ? (m(), b(
|
|
1213
|
-
overlay:
|
|
1214
|
-
|
|
1215
|
-
default:
|
|
1216
|
-
(m(!0),
|
|
1217
|
-
key:
|
|
1218
|
-
disabled:
|
|
1219
|
-
onClick: (
|
|
1206
|
+
d.value.length > 0 ? (m(), b(r(me), { key: 0 }, {
|
|
1207
|
+
overlay: h(() => [
|
|
1208
|
+
k(r(xe), null, {
|
|
1209
|
+
default: h(() => [
|
|
1210
|
+
(m(!0), w(O, null, z(d.value, (v) => H((m(), b(r(ye), {
|
|
1211
|
+
key: v.key,
|
|
1212
|
+
disabled: r(j)(v),
|
|
1213
|
+
onClick: (c) => r(V)(v, r(a), r(e))
|
|
1220
1214
|
}, {
|
|
1221
|
-
default:
|
|
1222
|
-
|
|
1215
|
+
default: h(() => [
|
|
1216
|
+
N(P(v.label), 1)
|
|
1223
1217
|
]),
|
|
1224
1218
|
_: 2
|
|
1225
1219
|
}, 1032, ["disabled", "onClick"])), [
|
|
1226
|
-
[s, { url:
|
|
1220
|
+
[s, { url: u.value, role: v.role, permit: v.permit }]
|
|
1227
1221
|
])), 128))
|
|
1228
1222
|
]),
|
|
1229
1223
|
_: 1
|
|
1230
1224
|
})
|
|
1231
1225
|
]),
|
|
1232
|
-
default:
|
|
1233
|
-
|
|
1234
|
-
default:
|
|
1235
|
-
|
|
1226
|
+
default: h(() => [
|
|
1227
|
+
k(r(A), null, {
|
|
1228
|
+
default: h(() => f[0] || (f[0] = [
|
|
1229
|
+
N(" 更多操作 ")
|
|
1236
1230
|
])),
|
|
1237
1231
|
_: 1,
|
|
1238
1232
|
__: [0]
|
|
1239
1233
|
})
|
|
1240
1234
|
]),
|
|
1241
1235
|
_: 1
|
|
1242
|
-
})) :
|
|
1243
|
-
p.value.length === 0 && d.value.length === 0 ? (m(),
|
|
1236
|
+
})) : y("", !0),
|
|
1237
|
+
p.value.length === 0 && d.value.length === 0 ? (m(), w("span", xt)) : y("", !0)
|
|
1244
1238
|
]),
|
|
1245
1239
|
_: 1
|
|
1246
1240
|
}),
|
|
1247
|
-
|
|
1248
|
-
default:
|
|
1249
|
-
(m(), b(
|
|
1241
|
+
k(r(te), { class: "mr-1" }, {
|
|
1242
|
+
default: h(() => [
|
|
1243
|
+
(m(), b($a(bt), { "grid-ctrl": r(e) }, null, 8, ["grid-ctrl"]))
|
|
1250
1244
|
]),
|
|
1251
1245
|
_: 1
|
|
1252
1246
|
})
|
|
1253
1247
|
]);
|
|
1254
1248
|
};
|
|
1255
1249
|
}
|
|
1256
|
-
}),
|
|
1250
|
+
}), fl = /* @__PURE__ */ S({
|
|
1257
1251
|
inheritAttrs: !1,
|
|
1258
1252
|
__name: "index",
|
|
1259
1253
|
props: {
|
|
@@ -1265,124 +1259,124 @@ const Zt = async (r, t) => {
|
|
|
1265
1259
|
scroll: {},
|
|
1266
1260
|
statusDisabled: {}
|
|
1267
1261
|
},
|
|
1268
|
-
setup(
|
|
1269
|
-
const t =
|
|
1262
|
+
setup(l) {
|
|
1263
|
+
const t = l, e = X(), a = t.gridCtrl, o = Q(() => ce.currentRoute.value.path);
|
|
1270
1264
|
a && (a.pageNo.value = 1, a.total.value = 0, a.pageSize.value = a.pageSize.value);
|
|
1271
|
-
const
|
|
1265
|
+
const u = _(a.pageSize.value), n = _(a.pageNo.value), p = _([]), d = _({
|
|
1272
1266
|
total: 0,
|
|
1273
1267
|
current: 1,
|
|
1274
|
-
pageSize:
|
|
1275
|
-
showTotal: (
|
|
1276
|
-
onChange: (
|
|
1277
|
-
d.value !== !1 && (d.value.current =
|
|
1268
|
+
pageSize: u.value,
|
|
1269
|
+
showTotal: (c) => `共 ${c} 条记录`,
|
|
1270
|
+
onChange: (c, g) => {
|
|
1271
|
+
d.value !== !1 && (d.value.current = c, d.value.pageSize = g), u.value = g, n.value = c, a && (a.pageNo.value = c, a.pageSize.value = g, a.remotePage && we(a));
|
|
1278
1272
|
},
|
|
1279
1273
|
...t.pagination === !1 ? {} : t.pagination
|
|
1280
1274
|
});
|
|
1281
|
-
t.pagination === !1 && (d.value = !1),
|
|
1275
|
+
t.pagination === !1 && (d.value = !1), T(
|
|
1282
1276
|
() => a.tableData.value,
|
|
1283
|
-
(
|
|
1284
|
-
|
|
1277
|
+
(c) => {
|
|
1278
|
+
c && (p.value = c, d.value !== !1 && (d.value.total = a.total.value ?? 0, d.value.current = a.pageNo.value ?? 1, d.value.pageSize = a.pageSize.value ?? 10));
|
|
1285
1279
|
},
|
|
1286
1280
|
{ immediate: !0 }
|
|
1287
|
-
),
|
|
1281
|
+
), T(
|
|
1288
1282
|
() => t.tableData,
|
|
1289
|
-
(
|
|
1290
|
-
|
|
1283
|
+
(c) => {
|
|
1284
|
+
c && (p.value = c, d.value !== !1 && (d.value.total = c.length, d.value.current = a.pageNo.value ?? 1, d.value.pageSize = a.pageSize.value ?? 10));
|
|
1291
1285
|
},
|
|
1292
1286
|
{ immediate: !0 }
|
|
1293
1287
|
);
|
|
1294
|
-
const i =
|
|
1295
|
-
onChange: (
|
|
1296
|
-
a && (a.selectKeys.value =
|
|
1288
|
+
const i = _(a.columns.value), f = {
|
|
1289
|
+
onChange: (c, g) => {
|
|
1290
|
+
a && (a.selectKeys.value = c, a.selectRows.value = g);
|
|
1297
1291
|
},
|
|
1298
1292
|
columnWidth: "30px",
|
|
1299
|
-
getCheckboxProps: (
|
|
1300
|
-
disabled:
|
|
1293
|
+
getCheckboxProps: (c) => ({
|
|
1294
|
+
disabled: c.Enabled === 0
|
|
1301
1295
|
}),
|
|
1302
1296
|
...t.rowSelection
|
|
1303
|
-
}, s =
|
|
1304
|
-
|
|
1297
|
+
}, s = _(f);
|
|
1298
|
+
T(
|
|
1305
1299
|
() => a.selectable.value,
|
|
1306
|
-
(
|
|
1307
|
-
a && (s.value =
|
|
1300
|
+
(c) => {
|
|
1301
|
+
a && (s.value = c ? f : void 0);
|
|
1308
1302
|
},
|
|
1309
1303
|
{ immediate: !0 }
|
|
1310
|
-
),
|
|
1304
|
+
), T(
|
|
1311
1305
|
() => a.columns.value,
|
|
1312
1306
|
() => {
|
|
1313
1307
|
i.value = Oe(a.columns.value);
|
|
1314
1308
|
},
|
|
1315
1309
|
{ deep: !0, immediate: !0 }
|
|
1316
1310
|
);
|
|
1317
|
-
const
|
|
1318
|
-
return
|
|
1319
|
-
|
|
1320
|
-
}),
|
|
1321
|
-
var
|
|
1322
|
-
ge(
|
|
1323
|
-
|
|
1311
|
+
const v = _(!1);
|
|
1312
|
+
return _e(() => {
|
|
1313
|
+
v.value && a && a.autoload && (a.reload.value = !0);
|
|
1314
|
+
}), K(async () => {
|
|
1315
|
+
var c, g, C, $, M;
|
|
1316
|
+
ge(q.GridControl, a), a.page && ((c = a.gridUrl) != null && c.url) && (((g = a.gridUrl) == null ? void 0 : g.url) === ((C = a.page.urls.list) == null ? void 0 : C.url) && (a.remotePage = !1), (($ = a.gridUrl) == null ? void 0 : $.url) === ((M = a.page.urls.find) == null ? void 0 : M.url) && (a.remotePage = !0)), a.tableData.value ? (p.value = a.tableData.value, a.total.value = p.value.length, d.value !== !1 && (d.value.total = a.total.value ?? 0)) : a.autoload !== !1 && (a.remotePage ? p.value = (await we(a)).rows : p.value = await ca(a)), setTimeout(() => {
|
|
1317
|
+
v.value = !0;
|
|
1324
1318
|
}, 50);
|
|
1325
|
-
}), (
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1328
|
-
return m(),
|
|
1329
|
-
(
|
|
1319
|
+
}), (c, g) => {
|
|
1320
|
+
var $, M;
|
|
1321
|
+
const C = re("auth");
|
|
1322
|
+
return m(), w(O, null, [
|
|
1323
|
+
($ = r(a).buttons) != null && $.value.length || (M = r(a).tools) != null && M.length ? (m(), b(kt, {
|
|
1330
1324
|
key: 0,
|
|
1331
|
-
"grid-ctrl":
|
|
1332
|
-
"editor-ctrl":
|
|
1333
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
1334
|
-
|
|
1325
|
+
"grid-ctrl": r(a),
|
|
1326
|
+
"editor-ctrl": r(a).editor
|
|
1327
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : y("", !0),
|
|
1328
|
+
v.value ? (m(), b(r(je), F({
|
|
1335
1329
|
key: 1,
|
|
1336
1330
|
class: "w-full min-h-[480px]",
|
|
1337
|
-
"row-key": t.primaryKey ??
|
|
1331
|
+
"row-key": t.primaryKey ?? r(a).primaryKey ?? "Id",
|
|
1338
1332
|
"data-source": p.value,
|
|
1339
|
-
loading:
|
|
1333
|
+
loading: r(a).isGridLoading.value,
|
|
1340
1334
|
columns: i.value,
|
|
1341
1335
|
pagination: d.value,
|
|
1342
1336
|
"row-selection": s.value,
|
|
1343
1337
|
scroll: t.scroll || { x: 700 },
|
|
1344
|
-
size:
|
|
1338
|
+
size: r(a).tableSize.value,
|
|
1345
1339
|
bordered: ""
|
|
1346
|
-
},
|
|
1347
|
-
bodyCell:
|
|
1348
|
-
var
|
|
1340
|
+
}, r(e)), {
|
|
1341
|
+
bodyCell: h((x) => {
|
|
1342
|
+
var B, R;
|
|
1349
1343
|
return [
|
|
1350
|
-
|
|
1351
|
-
column:
|
|
1352
|
-
record:
|
|
1344
|
+
I(c.$slots, "bodyCell", {
|
|
1345
|
+
column: x == null ? void 0 : x.column,
|
|
1346
|
+
record: x == null ? void 0 : x.record
|
|
1353
1347
|
}),
|
|
1354
|
-
|
|
1348
|
+
r(a) && ((B = x == null ? void 0 : x.column) == null ? void 0 : B.dataIndex) === "enabled" ? H((m(), b(da, {
|
|
1355
1349
|
key: 0,
|
|
1356
|
-
checked:
|
|
1357
|
-
"onUpdate:checked": (
|
|
1358
|
-
disabled:
|
|
1359
|
-
data:
|
|
1360
|
-
onClick: (
|
|
1361
|
-
class:
|
|
1350
|
+
checked: x.record.Enabled,
|
|
1351
|
+
"onUpdate:checked": (se) => x.record.Enabled = se,
|
|
1352
|
+
disabled: c.statusDisabled ? c.statusDisabled(x.record) : !1,
|
|
1353
|
+
data: r(Be).EnableDisable,
|
|
1354
|
+
onClick: (se) => r(pa)(r(a), x.record),
|
|
1355
|
+
class: E([
|
|
1362
1356
|
"w-[58px]",
|
|
1363
|
-
|
|
1357
|
+
c.statusDisabled && c.statusDisabled(x.record) ? "cursor-not-allowed disabled" : ""
|
|
1364
1358
|
]),
|
|
1365
|
-
loading:
|
|
1359
|
+
loading: x == null ? void 0 : x.record.isLoading
|
|
1366
1360
|
}, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
|
|
1367
|
-
[
|
|
1368
|
-
]) :
|
|
1369
|
-
|
|
1361
|
+
[C, { url: o.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
|
|
1362
|
+
]) : y("", !0),
|
|
1363
|
+
r(a) && ((R = x == null ? void 0 : x.column) == null ? void 0 : R.dataIndex) === "operation" ? I(c.$slots, "operate", {
|
|
1370
1364
|
key: 1,
|
|
1371
|
-
record:
|
|
1365
|
+
record: x == null ? void 0 : x.record
|
|
1372
1366
|
}, () => [
|
|
1373
|
-
|
|
1374
|
-
record:
|
|
1375
|
-
"grid-ctrl":
|
|
1367
|
+
k(ht, {
|
|
1368
|
+
record: x == null ? void 0 : x.record,
|
|
1369
|
+
"grid-ctrl": r(a)
|
|
1376
1370
|
}, null, 8, ["record", "grid-ctrl"])
|
|
1377
|
-
]) :
|
|
1371
|
+
]) : y("", !0)
|
|
1378
1372
|
];
|
|
1379
1373
|
}),
|
|
1380
1374
|
_: 3
|
|
1381
|
-
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) :
|
|
1375
|
+
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : y("", !0)
|
|
1382
1376
|
], 64);
|
|
1383
1377
|
};
|
|
1384
1378
|
}
|
|
1385
|
-
}),
|
|
1379
|
+
}), wt = { class: "flex items-center gap-1" }, Ct = { class: "text-nowrap" }, vl = /* @__PURE__ */ S({
|
|
1386
1380
|
__name: "index",
|
|
1387
1381
|
props: {
|
|
1388
1382
|
treeCtrl: {},
|
|
@@ -1390,16 +1384,16 @@ const Zt = async (r, t) => {
|
|
|
1390
1384
|
expandedKeys: {}
|
|
1391
1385
|
},
|
|
1392
1386
|
emits: ["select", "update:selectedKeys"],
|
|
1393
|
-
setup(
|
|
1394
|
-
const e =
|
|
1395
|
-
|
|
1387
|
+
setup(l, { emit: t }) {
|
|
1388
|
+
const e = l, a = X(), o = e.treeCtrl, u = _([]);
|
|
1389
|
+
T(
|
|
1396
1390
|
() => o.data.value,
|
|
1397
|
-
(
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
const s =
|
|
1391
|
+
(f) => {
|
|
1392
|
+
if (f) {
|
|
1393
|
+
u.value = o.fieldMap ? ne(o.fieldMap, f) : f;
|
|
1394
|
+
const s = fa(u.value, p.value[0]);
|
|
1401
1395
|
if (s) {
|
|
1402
|
-
const
|
|
1396
|
+
const v = {
|
|
1403
1397
|
event: "select",
|
|
1404
1398
|
node: {
|
|
1405
1399
|
// 根据你的TreeNode结构构建node对象
|
|
@@ -1411,145 +1405,145 @@ const Zt = async (r, t) => {
|
|
|
1411
1405
|
selected: !0,
|
|
1412
1406
|
selectedNodes: [s]
|
|
1413
1407
|
};
|
|
1414
|
-
i(p.value,
|
|
1408
|
+
i(p.value, v);
|
|
1415
1409
|
}
|
|
1416
1410
|
}
|
|
1417
1411
|
}
|
|
1418
1412
|
);
|
|
1419
|
-
const n = t, p =
|
|
1420
|
-
|
|
1413
|
+
const n = t, p = _([]);
|
|
1414
|
+
T(
|
|
1421
1415
|
() => e.selectedKeys,
|
|
1422
|
-
(
|
|
1423
|
-
|
|
1416
|
+
(f) => {
|
|
1417
|
+
f && (p.value = f);
|
|
1424
1418
|
},
|
|
1425
1419
|
{ immediate: !0 }
|
|
1426
1420
|
);
|
|
1427
|
-
const d =
|
|
1428
|
-
|
|
1421
|
+
const d = _(["-"]);
|
|
1422
|
+
T(
|
|
1429
1423
|
() => e.expandedKeys,
|
|
1430
|
-
(
|
|
1431
|
-
|
|
1424
|
+
(f) => {
|
|
1425
|
+
f && (d.value = f);
|
|
1432
1426
|
},
|
|
1433
1427
|
{ immediate: !0 }
|
|
1434
1428
|
);
|
|
1435
|
-
const i = (
|
|
1436
|
-
|
|
1429
|
+
const i = (f, s) => {
|
|
1430
|
+
f.length === 0 && f.push(...p.value), f.length > 0 && (o.node.value = s == null ? void 0 : s.node.dataRef), p.value = f, n("update:selectedKeys", f), n("select", f, s);
|
|
1437
1431
|
};
|
|
1438
|
-
return
|
|
1432
|
+
return K(() => {
|
|
1439
1433
|
o.fieldMap || (o.fieldMap = {
|
|
1440
1434
|
label: "Name",
|
|
1441
1435
|
key: "Id",
|
|
1442
1436
|
value: "Id",
|
|
1443
1437
|
icon: "Icon"
|
|
1444
|
-
}), o.data.value ?
|
|
1445
|
-
}), (
|
|
1438
|
+
}), o.data.value ? u.value = ne(o.fieldMap, o.data.value) : o.autoload && Ae(o);
|
|
1439
|
+
}), (f, s) => (m(), b(r(Ba), F({
|
|
1446
1440
|
class: "w-full",
|
|
1447
1441
|
"show-line": !0,
|
|
1448
|
-
"tree-data":
|
|
1442
|
+
"tree-data": u.value,
|
|
1449
1443
|
"expanded-keys": d.value,
|
|
1450
|
-
"onUpdate:expandedKeys": s[0] || (s[0] = (
|
|
1444
|
+
"onUpdate:expandedKeys": s[0] || (s[0] = (v) => d.value = v),
|
|
1451
1445
|
"selected-keys": p.value,
|
|
1452
|
-
loading:
|
|
1446
|
+
loading: r(o).isTreeLoading,
|
|
1453
1447
|
onSelect: i
|
|
1454
|
-
},
|
|
1455
|
-
title:
|
|
1456
|
-
|
|
1457
|
-
label:
|
|
1458
|
-
key:
|
|
1459
|
-
icon:
|
|
1448
|
+
}, r(a)), {
|
|
1449
|
+
title: h(({ key: v, label: c, icon: g }) => [
|
|
1450
|
+
I(f.$slots, "title", {
|
|
1451
|
+
label: c,
|
|
1452
|
+
key: v,
|
|
1453
|
+
icon: g
|
|
1460
1454
|
}, () => [
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1455
|
+
D("div", wt, [
|
|
1456
|
+
k(r(U), { icon: g }, null, 8, ["icon"]),
|
|
1457
|
+
D("span", Ct, P(c), 1)
|
|
1464
1458
|
])
|
|
1465
1459
|
])
|
|
1466
1460
|
]),
|
|
1467
1461
|
_: 3
|
|
1468
1462
|
}, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
|
|
1469
1463
|
}
|
|
1470
|
-
}),
|
|
1464
|
+
}), ml = /* @__PURE__ */ G(va, [["__scopeId", "data-v-87722b44"]]), St = { class: "relative w-[248px] max-w-[248px]" }, Tt = {
|
|
1471
1465
|
key: 0,
|
|
1472
1466
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
1473
|
-
},
|
|
1467
|
+
}, $t = /* @__PURE__ */ S({
|
|
1474
1468
|
inheritAttrs: !1,
|
|
1475
1469
|
__name: "index",
|
|
1476
|
-
props:
|
|
1470
|
+
props: ma,
|
|
1477
1471
|
emits: ["change", "update:labels", "update:value"],
|
|
1478
|
-
setup(
|
|
1479
|
-
var
|
|
1480
|
-
const e =
|
|
1481
|
-
n.inputFactory =
|
|
1482
|
-
const p =
|
|
1472
|
+
setup(l, { emit: t }) {
|
|
1473
|
+
var C, $, M;
|
|
1474
|
+
const e = l, a = X(), o = L(), u = ha(e.url, e), n = e.optionCtrl ?? u.optionCtrl;
|
|
1475
|
+
n.inputFactory = Da(o);
|
|
1476
|
+
const p = _({
|
|
1483
1477
|
...n == null ? void 0 : n.url,
|
|
1484
|
-
url: ((
|
|
1485
|
-
fieldMap: (n == null ? void 0 : n.fieldMap) || ((
|
|
1486
|
-
params: (n == null ? void 0 : n.params) || ((
|
|
1478
|
+
url: ((C = n == null ? void 0 : n.url) == null ? void 0 : C.url) || "",
|
|
1479
|
+
fieldMap: (n == null ? void 0 : n.fieldMap) || (($ = n == null ? void 0 : n.url) == null ? void 0 : $.fieldMap),
|
|
1480
|
+
params: (n == null ? void 0 : n.params) || ((M = n == null ? void 0 : n.url) == null ? void 0 : M.params),
|
|
1487
1481
|
loadingText: !1
|
|
1488
|
-
}), { editorCtrl: d, errInfo: i, labelText:
|
|
1489
|
-
|
|
1482
|
+
}), { editorCtrl: d, errInfo: i, labelText: f } = o, s = _(a.placeholder);
|
|
1483
|
+
T(
|
|
1490
1484
|
() => p.value.loading,
|
|
1491
|
-
(
|
|
1492
|
-
|
|
1485
|
+
(x) => {
|
|
1486
|
+
x ? s.value = "" : s.value || (s.value = "请选择" + f.value);
|
|
1493
1487
|
},
|
|
1494
1488
|
{ immediate: !0 }
|
|
1495
1489
|
);
|
|
1496
|
-
const
|
|
1497
|
-
o.inputEmit =
|
|
1498
|
-
const
|
|
1499
|
-
n &&
|
|
1490
|
+
const v = t;
|
|
1491
|
+
o.inputEmit = v;
|
|
1492
|
+
const c = _((n == null ? void 0 : n.options.value) || []);
|
|
1493
|
+
n && T(
|
|
1500
1494
|
() => n.options.value,
|
|
1501
|
-
(
|
|
1502
|
-
|
|
1495
|
+
(x) => {
|
|
1496
|
+
c.value = x || [];
|
|
1503
1497
|
},
|
|
1504
1498
|
{ immediate: !0, deep: !0 }
|
|
1505
1499
|
);
|
|
1506
|
-
const
|
|
1507
|
-
if (!
|
|
1508
|
-
|
|
1500
|
+
const g = (x, B) => {
|
|
1501
|
+
if (!B || B.length === 0) {
|
|
1502
|
+
v("update:labels", []), v("update:value", []);
|
|
1509
1503
|
return;
|
|
1510
1504
|
}
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1505
|
+
const R = B.map((ta) => ta.value), se = xa(n, e, R), aa = ya(se);
|
|
1506
|
+
v("update:labels", aa), v("update:value", R), i != null && i.value.errClass && d && Y(d);
|
|
1513
1507
|
};
|
|
1514
|
-
return
|
|
1508
|
+
return _e(() => {
|
|
1515
1509
|
n && n.autoload && (n.reload.value = !0);
|
|
1516
|
-
}),
|
|
1510
|
+
}), K(() => {
|
|
1517
1511
|
p.value && !p.value.fieldMap && (p.value.fieldMap = {
|
|
1518
1512
|
title: "Name",
|
|
1519
1513
|
label: "Name",
|
|
1520
1514
|
value: "Id",
|
|
1521
1515
|
key: "Id"
|
|
1522
|
-
}), n &&
|
|
1523
|
-
}),
|
|
1524
|
-
n &&
|
|
1525
|
-
}), (
|
|
1526
|
-
var
|
|
1527
|
-
return m(),
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1516
|
+
}), n && ga(n.autoload, n, e);
|
|
1517
|
+
}), Ia(() => {
|
|
1518
|
+
n && ba(n, e);
|
|
1519
|
+
}), (x, B) => {
|
|
1520
|
+
var R;
|
|
1521
|
+
return m(), w("div", St, [
|
|
1522
|
+
c.value.length ? y("", !0) : (m(), w("div", Tt, [
|
|
1523
|
+
k(r(_a), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
1524
|
+
B[0] || (B[0] = D("span", null, "数据加载中...", -1))
|
|
1531
1525
|
])),
|
|
1532
|
-
|
|
1533
|
-
options:
|
|
1534
|
-
class: [(
|
|
1526
|
+
k(r(Aa), F({
|
|
1527
|
+
options: c.value,
|
|
1528
|
+
class: [(R = r(i)) == null ? void 0 : R.errClass],
|
|
1535
1529
|
"allow-clear": !0,
|
|
1536
|
-
placeholder:
|
|
1537
|
-
onChange:
|
|
1538
|
-
},
|
|
1530
|
+
placeholder: c.value.length > 0 ? "请选择" + r(f) : "",
|
|
1531
|
+
onChange: g
|
|
1532
|
+
}, r(a)), null, 16, ["options", "class", "placeholder"])
|
|
1539
1533
|
]);
|
|
1540
1534
|
};
|
|
1541
1535
|
}
|
|
1542
|
-
}),
|
|
1543
|
-
function
|
|
1544
|
-
return
|
|
1536
|
+
}), hl = /* @__PURE__ */ G($t, [["__scopeId", "data-v-51ddfce3"]]), gl = /* @__PURE__ */ G(ka, [["__scopeId", "data-v-249ea772"]]);
|
|
1537
|
+
function ue() {
|
|
1538
|
+
return ue = Object.assign ? Object.assign.bind() : function(l) {
|
|
1545
1539
|
for (var t = 1; t < arguments.length; t++) {
|
|
1546
1540
|
var e = arguments[t];
|
|
1547
|
-
for (var a in e) ({}).hasOwnProperty.call(e, a) && (
|
|
1541
|
+
for (var a in e) ({}).hasOwnProperty.call(e, a) && (l[a] = e[a]);
|
|
1548
1542
|
}
|
|
1549
|
-
return
|
|
1550
|
-
},
|
|
1543
|
+
return l;
|
|
1544
|
+
}, ue.apply(null, arguments);
|
|
1551
1545
|
}
|
|
1552
|
-
const
|
|
1546
|
+
const Dt = {
|
|
1553
1547
|
locale: "zh_CN",
|
|
1554
1548
|
today: "今天",
|
|
1555
1549
|
now: "此刻",
|
|
@@ -1576,11 +1570,11 @@ const Ct = {
|
|
|
1576
1570
|
nextDecade: "下一年代",
|
|
1577
1571
|
previousCentury: "上一世纪",
|
|
1578
1572
|
nextCentury: "下一世纪"
|
|
1579
|
-
},
|
|
1573
|
+
}, It = {
|
|
1580
1574
|
placeholder: "请选择时间",
|
|
1581
1575
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
1582
1576
|
}, de = {
|
|
1583
|
-
lang:
|
|
1577
|
+
lang: ue({
|
|
1584
1578
|
placeholder: "请选择日期",
|
|
1585
1579
|
yearPlaceholder: "请选择年份",
|
|
1586
1580
|
quarterPlaceholder: "请选择季度",
|
|
@@ -1591,49 +1585,49 @@ const Ct = {
|
|
|
1591
1585
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
1592
1586
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
1593
1587
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
1594
|
-
},
|
|
1595
|
-
timePickerLocale:
|
|
1588
|
+
}, Dt),
|
|
1589
|
+
timePickerLocale: ue({}, It)
|
|
1596
1590
|
};
|
|
1597
1591
|
de.lang.ok = "确定";
|
|
1598
|
-
const
|
|
1592
|
+
const bl = /* @__PURE__ */ S({
|
|
1599
1593
|
__name: "index",
|
|
1600
1594
|
props: {
|
|
1601
1595
|
valueFormat: {}
|
|
1602
1596
|
},
|
|
1603
|
-
setup(
|
|
1604
|
-
const t =
|
|
1605
|
-
o != null && o.value.errClass && e &&
|
|
1606
|
-
}, n =
|
|
1597
|
+
setup(l) {
|
|
1598
|
+
const t = l, { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
|
|
1599
|
+
o != null && o.value.errClass && e && Y(e);
|
|
1600
|
+
}, n = _(t.valueFormat ?? "YYYY-MM-DD");
|
|
1607
1601
|
return (p, d) => {
|
|
1608
1602
|
var i;
|
|
1609
|
-
return m(), b(
|
|
1610
|
-
class:
|
|
1611
|
-
placeholder: "请选择" +
|
|
1612
|
-
locale:
|
|
1603
|
+
return m(), b(r(La), {
|
|
1604
|
+
class: E(["w-full", [((i = r(o)) == null ? void 0 : i.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
1605
|
+
placeholder: "请选择" + r(a),
|
|
1606
|
+
locale: r(de),
|
|
1613
1607
|
valueFormat: n.value,
|
|
1614
|
-
onBlur:
|
|
1608
|
+
onBlur: u
|
|
1615
1609
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
1616
1610
|
};
|
|
1617
1611
|
}
|
|
1618
|
-
}),
|
|
1612
|
+
}), Et = /* @__PURE__ */ S({
|
|
1619
1613
|
__name: "index",
|
|
1620
1614
|
props: {
|
|
1621
1615
|
value: {},
|
|
1622
1616
|
undefValue: { type: Boolean, default: !1 }
|
|
1623
1617
|
},
|
|
1624
1618
|
emits: ["update:value"],
|
|
1625
|
-
setup(
|
|
1626
|
-
const { editorCtrl: e, labelText: a, errInfo: o } = L(),
|
|
1627
|
-
o != null && o.value.errClass && e &&
|
|
1628
|
-
}, n =
|
|
1629
|
-
|
|
1619
|
+
setup(l, { emit: t }) {
|
|
1620
|
+
const { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
|
|
1621
|
+
o != null && o.value.errClass && e && Y(e);
|
|
1622
|
+
}, n = l, p = n.value === void 0 ? !0 : n.undefValue, d = t, i = _(n.value);
|
|
1623
|
+
T(
|
|
1630
1624
|
() => n.value,
|
|
1631
1625
|
(s) => {
|
|
1632
1626
|
i.value = s;
|
|
1633
1627
|
},
|
|
1634
1628
|
{ immediate: !0 }
|
|
1635
1629
|
// 立即同步初始值
|
|
1636
|
-
),
|
|
1630
|
+
), T(
|
|
1637
1631
|
() => i.value,
|
|
1638
1632
|
(s) => {
|
|
1639
1633
|
if (i.value === "") {
|
|
@@ -1643,66 +1637,66 @@ const vl = /* @__PURE__ */ T({
|
|
|
1643
1637
|
d("update:value", s);
|
|
1644
1638
|
}
|
|
1645
1639
|
);
|
|
1646
|
-
const
|
|
1640
|
+
const f = () => {
|
|
1647
1641
|
i.value === "" && (i.value = p ? void 0 : null);
|
|
1648
1642
|
};
|
|
1649
|
-
return (s,
|
|
1650
|
-
var
|
|
1651
|
-
return m(), b(
|
|
1643
|
+
return (s, v) => {
|
|
1644
|
+
var c, g;
|
|
1645
|
+
return m(), b(r(ee), F({
|
|
1652
1646
|
class: [
|
|
1653
|
-
(
|
|
1654
|
-
((
|
|
1647
|
+
(c = r(o)) == null ? void 0 : c.errClass,
|
|
1648
|
+
((g = r(o)) == null ? void 0 : g.errClass) === "error" && !s.$slots.addonBefore && !s.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
|
|
1655
1649
|
],
|
|
1656
1650
|
value: i.value,
|
|
1657
|
-
"onUpdate:value":
|
|
1651
|
+
"onUpdate:value": v[0] || (v[0] = (C) => i.value = C),
|
|
1658
1652
|
autocomplete: "new-password",
|
|
1659
1653
|
"allow-clear": !0,
|
|
1660
|
-
placeholder: "请输入" +
|
|
1661
|
-
onBlur:
|
|
1662
|
-
onChange:
|
|
1654
|
+
placeholder: "请输入" + r(a),
|
|
1655
|
+
onBlur: u,
|
|
1656
|
+
onChange: f
|
|
1663
1657
|
}, s.$attrs), Ue({ _: 2 }, [
|
|
1664
1658
|
s.$slots.addonBefore ? {
|
|
1665
1659
|
name: "addonBefore",
|
|
1666
|
-
fn:
|
|
1667
|
-
|
|
1660
|
+
fn: h(() => [
|
|
1661
|
+
I(s.$slots, "addonBefore")
|
|
1668
1662
|
]),
|
|
1669
1663
|
key: "0"
|
|
1670
1664
|
} : void 0,
|
|
1671
1665
|
s.$slots.addonAfter ? {
|
|
1672
1666
|
name: "addonAfter",
|
|
1673
|
-
fn:
|
|
1674
|
-
|
|
1667
|
+
fn: h(() => [
|
|
1668
|
+
I(s.$slots, "addonAfter")
|
|
1675
1669
|
]),
|
|
1676
1670
|
key: "1"
|
|
1677
1671
|
} : void 0
|
|
1678
1672
|
]), 1040, ["class", "value", "placeholder"]);
|
|
1679
1673
|
};
|
|
1680
1674
|
}
|
|
1681
|
-
}),
|
|
1675
|
+
}), Pt = /* @__PURE__ */ S({
|
|
1682
1676
|
__name: "inputIcon",
|
|
1683
1677
|
props: {
|
|
1684
1678
|
value: {}
|
|
1685
1679
|
},
|
|
1686
1680
|
emits: ["update:value"],
|
|
1687
|
-
setup(
|
|
1688
|
-
const e =
|
|
1689
|
-
return
|
|
1681
|
+
setup(l, { emit: t }) {
|
|
1682
|
+
const e = l, a = t, o = _(void 0);
|
|
1683
|
+
return T(
|
|
1690
1684
|
() => e.value,
|
|
1691
|
-
(
|
|
1692
|
-
o.value =
|
|
1685
|
+
(u) => {
|
|
1686
|
+
o.value = u ?? void 0;
|
|
1693
1687
|
},
|
|
1694
1688
|
{ immediate: !0 }
|
|
1695
|
-
),
|
|
1689
|
+
), T(
|
|
1696
1690
|
() => o.value,
|
|
1697
|
-
(
|
|
1698
|
-
a("update:value",
|
|
1691
|
+
(u) => {
|
|
1692
|
+
a("update:value", u);
|
|
1699
1693
|
}
|
|
1700
|
-
), (
|
|
1694
|
+
), (u, n) => (m(), b(Et, F({
|
|
1701
1695
|
value: o.value,
|
|
1702
1696
|
"onUpdate:value": n[0] || (n[0] = (p) => o.value = p)
|
|
1703
|
-
},
|
|
1704
|
-
addonBefore:
|
|
1705
|
-
|
|
1697
|
+
}, u.$attrs), {
|
|
1698
|
+
addonBefore: h(() => [
|
|
1699
|
+
k(r(U), {
|
|
1706
1700
|
class: "!w-4 !h-4",
|
|
1707
1701
|
icon: o.value
|
|
1708
1702
|
}, null, 8, ["icon"])
|
|
@@ -1710,66 +1704,67 @@ const vl = /* @__PURE__ */ T({
|
|
|
1710
1704
|
_: 1
|
|
1711
1705
|
}, 16, ["value"]));
|
|
1712
1706
|
}
|
|
1713
|
-
}),
|
|
1707
|
+
}), _l = /* @__PURE__ */ G(Pt, [["__scopeId", "data-v-358b82ef"]]), xl = /* @__PURE__ */ S({
|
|
1714
1708
|
__name: "inputPassword",
|
|
1715
|
-
setup(
|
|
1709
|
+
setup(l) {
|
|
1716
1710
|
const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
|
|
1717
|
-
a != null && a.value.errClass && t &&
|
|
1711
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1718
1712
|
};
|
|
1719
|
-
return (
|
|
1713
|
+
return (u, n) => {
|
|
1720
1714
|
var p;
|
|
1721
|
-
return m(), b(
|
|
1722
|
-
class: ((p =
|
|
1715
|
+
return m(), b(r(Ra), F({
|
|
1716
|
+
class: ((p = r(a)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1723
1717
|
"allow-clear": !0,
|
|
1724
1718
|
autocomplete: "new-password",
|
|
1725
|
-
placeholder: "请输入" +
|
|
1719
|
+
placeholder: "请输入" + r(e),
|
|
1726
1720
|
onBlur: o
|
|
1727
|
-
},
|
|
1721
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1728
1722
|
};
|
|
1729
1723
|
}
|
|
1730
|
-
}),
|
|
1724
|
+
}), yl = /* @__PURE__ */ S({
|
|
1731
1725
|
__name: "inputNumber",
|
|
1732
|
-
setup(
|
|
1726
|
+
setup(l) {
|
|
1733
1727
|
const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
|
|
1734
|
-
a != null && a.value.errClass && t &&
|
|
1728
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1735
1729
|
};
|
|
1736
|
-
return (
|
|
1730
|
+
return (u, n) => {
|
|
1737
1731
|
var p;
|
|
1738
|
-
return m(), b(
|
|
1739
|
-
class: [[((p =
|
|
1732
|
+
return m(), b(r(za), F({
|
|
1733
|
+
class: [[((p = r(a)) == null ? void 0 : p.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
|
|
1740
1734
|
onBlur: o,
|
|
1741
1735
|
"allow-clear": !1,
|
|
1742
|
-
placeholder: "请输入" +
|
|
1743
|
-
},
|
|
1736
|
+
placeholder: "请输入" + r(e)
|
|
1737
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1744
1738
|
};
|
|
1745
1739
|
}
|
|
1746
|
-
}),
|
|
1740
|
+
}), Ft = { class: "flex flex-col gap-2" }, Nt = { key: 1 }, kl = /* @__PURE__ */ S({
|
|
1747
1741
|
__name: "index",
|
|
1748
1742
|
props: {
|
|
1749
1743
|
value: {},
|
|
1750
1744
|
selectList: {},
|
|
1745
|
+
ignoreList: {},
|
|
1751
1746
|
fieldWidth: {},
|
|
1752
1747
|
labelHolder: {},
|
|
1753
1748
|
valueHolder: {}
|
|
1754
1749
|
},
|
|
1755
1750
|
emits: ["update:value"],
|
|
1756
|
-
setup(
|
|
1757
|
-
const e =
|
|
1751
|
+
setup(l, { emit: t }) {
|
|
1752
|
+
const e = l, a = t, o = _(!(e.selectList && e.selectList.length > 0)), u = _([]);
|
|
1758
1753
|
let n = !1;
|
|
1759
1754
|
const p = () => {
|
|
1760
|
-
e.selectList && e.selectList.length > 0 ?
|
|
1755
|
+
e.selectList && e.selectList.length > 0 ? u.value = e.selectList.map((s) => ({
|
|
1761
1756
|
id: Date.now() + Math.random(),
|
|
1762
1757
|
text: s.text,
|
|
1763
1758
|
field: s.field,
|
|
1764
1759
|
// 如果value中有对应的field,使用value中的值,否则使用selectList中的默认值
|
|
1765
1760
|
value: e.value[s.field] ?? s.value
|
|
1766
|
-
})) : e.value && Object.keys(e.value).length > 0 ?
|
|
1761
|
+
})) : e.value && Object.keys(e.value).length > 0 ? u.value = Object.entries(e.value).filter(([s]) => !e.ignoreList || !e.ignoreList.includes(s)).map(([s, v]) => ({
|
|
1767
1762
|
id: Date.now() + Math.random(),
|
|
1768
1763
|
field: s,
|
|
1769
|
-
value:
|
|
1770
|
-
})) :
|
|
1764
|
+
value: v
|
|
1765
|
+
})) : u.value = [];
|
|
1771
1766
|
};
|
|
1772
|
-
|
|
1767
|
+
T(
|
|
1773
1768
|
() => e.value,
|
|
1774
1769
|
() => {
|
|
1775
1770
|
n || p(), n = !1;
|
|
@@ -1778,81 +1773,83 @@ const vl = /* @__PURE__ */ T({
|
|
|
1778
1773
|
);
|
|
1779
1774
|
const d = () => {
|
|
1780
1775
|
let s;
|
|
1781
|
-
e.selectList && e.selectList.length > 0 ? (s = { ...e.value },
|
|
1782
|
-
|
|
1783
|
-
})) : s =
|
|
1784
|
-
(
|
|
1776
|
+
e.selectList && e.selectList.length > 0 ? (s = { ...e.value }, u.value.forEach((v) => {
|
|
1777
|
+
v.field && (s[v.field] = v.value);
|
|
1778
|
+
})) : (s = u.value.reduce(
|
|
1779
|
+
(v, c) => (c.field && (v[c.field] = c.value), v),
|
|
1785
1780
|
{}
|
|
1786
|
-
),
|
|
1781
|
+
), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((v) => {
|
|
1782
|
+
e.value[v] !== void 0 && (s[v] = e.value[v]);
|
|
1783
|
+
})), n = !0, a("update:value", s);
|
|
1787
1784
|
}, i = () => {
|
|
1788
|
-
|
|
1785
|
+
u.value.push({
|
|
1789
1786
|
id: Date.now() + Math.random(),
|
|
1790
1787
|
field: "",
|
|
1791
1788
|
value: ""
|
|
1792
1789
|
});
|
|
1793
|
-
},
|
|
1790
|
+
}, f = () => {
|
|
1794
1791
|
d();
|
|
1795
1792
|
};
|
|
1796
|
-
return (s,
|
|
1797
|
-
(m(!0),
|
|
1798
|
-
key:
|
|
1793
|
+
return (s, v) => (m(), w("div", Ft, [
|
|
1794
|
+
(m(!0), w(O, null, z(u.value, (c) => (m(), w("div", {
|
|
1795
|
+
key: c.id,
|
|
1799
1796
|
class: "flex items-center gap-2"
|
|
1800
1797
|
}, [
|
|
1801
|
-
|
|
1802
|
-
class:
|
|
1798
|
+
D("div", {
|
|
1799
|
+
class: E([s.fieldWidth ? `w-[${s.fieldWidth}%]` : "w-[33%]"])
|
|
1803
1800
|
}, [
|
|
1804
|
-
!s.selectList || s.selectList.length === 0 ? (m(), b(
|
|
1801
|
+
!s.selectList || s.selectList.length === 0 ? (m(), b(r(ee), {
|
|
1805
1802
|
key: 0,
|
|
1806
|
-
value:
|
|
1807
|
-
"onUpdate:value": (
|
|
1808
|
-
title:
|
|
1803
|
+
value: c.field,
|
|
1804
|
+
"onUpdate:value": (g) => c.field = g,
|
|
1805
|
+
title: c.text || c.field,
|
|
1809
1806
|
class: "w-full",
|
|
1810
|
-
placeholder:
|
|
1811
|
-
onInput:
|
|
1807
|
+
placeholder: c.text || s.labelHolder || "配置名",
|
|
1808
|
+
onInput: f,
|
|
1812
1809
|
disabled: !o.value
|
|
1813
|
-
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (m(),
|
|
1814
|
-
|
|
1815
|
-
value:
|
|
1816
|
-
"onUpdate:value": (
|
|
1817
|
-
title:
|
|
1810
|
+
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (m(), w("div", Nt, [
|
|
1811
|
+
k(r(ee), {
|
|
1812
|
+
value: c.text,
|
|
1813
|
+
"onUpdate:value": (g) => c.text = g,
|
|
1814
|
+
title: c.text,
|
|
1818
1815
|
disabled: !0,
|
|
1819
1816
|
class: "w-[100%]"
|
|
1820
1817
|
}, null, 8, ["value", "onUpdate:value", "title"]),
|
|
1821
|
-
|
|
1818
|
+
k(r(ee), {
|
|
1822
1819
|
type: "hidden",
|
|
1823
|
-
value:
|
|
1824
|
-
"onUpdate:value": (
|
|
1820
|
+
value: c.field,
|
|
1821
|
+
"onUpdate:value": (g) => c.field = g
|
|
1825
1822
|
}, null, 8, ["value", "onUpdate:value"])
|
|
1826
1823
|
]))
|
|
1827
1824
|
], 2),
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
class:
|
|
1825
|
+
v[0] || (v[0] = D("div", { class: "w-[3%]" }, "=", -1)),
|
|
1826
|
+
D("div", {
|
|
1827
|
+
class: E([s.fieldWidth ? `w-[${97 - s.fieldWidth}%]` : "w-[64%]"])
|
|
1831
1828
|
}, [
|
|
1832
|
-
|
|
1833
|
-
value:
|
|
1834
|
-
"onUpdate:value": (
|
|
1835
|
-
placeholder: s.valueHolder || "请输入" +
|
|
1836
|
-
onInput:
|
|
1837
|
-
title:
|
|
1829
|
+
k(r(ee), {
|
|
1830
|
+
value: c.value,
|
|
1831
|
+
"onUpdate:value": (g) => c.value = g,
|
|
1832
|
+
placeholder: s.valueHolder || "请输入" + c.text || "请输入配置值",
|
|
1833
|
+
onInput: f,
|
|
1834
|
+
title: c.value
|
|
1838
1835
|
}, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
|
|
1839
1836
|
], 2)
|
|
1840
1837
|
]))), 128)),
|
|
1841
|
-
o.value ? (m(), b(
|
|
1838
|
+
o.value ? (m(), b(r(We), {
|
|
1842
1839
|
key: 0,
|
|
1843
1840
|
onClick: i,
|
|
1844
1841
|
class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
|
|
1845
1842
|
size: "small"
|
|
1846
1843
|
}, {
|
|
1847
|
-
default:
|
|
1848
|
-
|
|
1844
|
+
default: h(() => v[1] || (v[1] = [
|
|
1845
|
+
N(" 新增配置行 ")
|
|
1849
1846
|
])),
|
|
1850
1847
|
_: 1,
|
|
1851
1848
|
__: [1]
|
|
1852
|
-
})) :
|
|
1849
|
+
})) : y("", !0)
|
|
1853
1850
|
]));
|
|
1854
1851
|
}
|
|
1855
|
-
}),
|
|
1852
|
+
}), Mt = /* @__PURE__ */ G(wa, [["__scopeId", "data-v-aa237552"]]), wl = /* @__PURE__ */ S({
|
|
1856
1853
|
__name: "radioStatus",
|
|
1857
1854
|
props: {
|
|
1858
1855
|
/**
|
|
@@ -1879,14 +1876,14 @@ const vl = /* @__PURE__ */ T({
|
|
|
1879
1876
|
required: !1
|
|
1880
1877
|
}
|
|
1881
1878
|
},
|
|
1882
|
-
setup(
|
|
1883
|
-
const t =
|
|
1879
|
+
setup(l) {
|
|
1880
|
+
const t = l, e = _(JSON.parse(JSON.stringify(Be.getOptions(t.dataKey))));
|
|
1884
1881
|
return t.all === !0 && e.value.unshift({
|
|
1885
1882
|
label: "全部",
|
|
1886
1883
|
value: t.allValue || [0, 1]
|
|
1887
|
-
}), (a, o) => (m(), b(
|
|
1884
|
+
}), (a, o) => (m(), b(Mt, { data: e.value }, null, 8, ["data"]));
|
|
1888
1885
|
}
|
|
1889
|
-
}),
|
|
1886
|
+
}), Cl = /* @__PURE__ */ S({
|
|
1890
1887
|
__name: "index",
|
|
1891
1888
|
props: {
|
|
1892
1889
|
startDate: {},
|
|
@@ -1894,75 +1891,75 @@ const vl = /* @__PURE__ */ T({
|
|
|
1894
1891
|
valueFormat: { default: "YYYY-MM-DD" }
|
|
1895
1892
|
},
|
|
1896
1893
|
emits: ["update:startDate", "update:endDate"],
|
|
1897
|
-
setup(
|
|
1898
|
-
const e =
|
|
1899
|
-
const i = e.startDate,
|
|
1900
|
-
if (!(!i || !
|
|
1894
|
+
setup(l, { emit: t }) {
|
|
1895
|
+
const e = l, a = t, o = L(), { errInfo: u } = o, n = Q(() => e.valueFormat), p = Q(() => {
|
|
1896
|
+
const i = e.startDate, f = e.endDate;
|
|
1897
|
+
if (!(!i || !f))
|
|
1901
1898
|
try {
|
|
1902
|
-
const s = ve(i),
|
|
1903
|
-
return !s.isValid() || !
|
|
1899
|
+
const s = ve(i), v = ve(f);
|
|
1900
|
+
return !s.isValid() || !v.isValid() ? void 0 : [s, v];
|
|
1904
1901
|
} catch {
|
|
1905
1902
|
return;
|
|
1906
1903
|
}
|
|
1907
|
-
}), d = (i,
|
|
1908
|
-
if (!i || !
|
|
1904
|
+
}), d = (i, f) => {
|
|
1905
|
+
if (!i || !f || f.length !== 2) {
|
|
1909
1906
|
a("update:startDate", null), a("update:endDate", null);
|
|
1910
1907
|
return;
|
|
1911
1908
|
}
|
|
1912
|
-
a("update:startDate",
|
|
1909
|
+
a("update:startDate", f[0] || null), a("update:endDate", f[1] || null);
|
|
1913
1910
|
};
|
|
1914
|
-
return (i,
|
|
1911
|
+
return (i, f) => {
|
|
1915
1912
|
var s;
|
|
1916
|
-
return m(), b(
|
|
1917
|
-
class:
|
|
1918
|
-
locale:
|
|
1913
|
+
return m(), b(r(Ua), {
|
|
1914
|
+
class: E([((s = r(u)) == null ? void 0 : s.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
|
|
1915
|
+
locale: r(de),
|
|
1919
1916
|
"value-format": n.value,
|
|
1920
1917
|
value: p.value,
|
|
1921
1918
|
onChange: d
|
|
1922
1919
|
}, null, 8, ["class", "locale", "value-format", "value"]);
|
|
1923
1920
|
};
|
|
1924
1921
|
}
|
|
1925
|
-
}),
|
|
1922
|
+
}), Sl = /* @__PURE__ */ G(Ca, [["__scopeId", "data-v-b33df95f"]]), Tl = /* @__PURE__ */ S({
|
|
1926
1923
|
__name: "index",
|
|
1927
|
-
setup(
|
|
1924
|
+
setup(l) {
|
|
1928
1925
|
const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
|
|
1929
|
-
a != null && a.value.errClass && t &&
|
|
1926
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1930
1927
|
};
|
|
1931
|
-
return (
|
|
1928
|
+
return (u, n) => {
|
|
1932
1929
|
var p;
|
|
1933
|
-
return m(), b(
|
|
1934
|
-
class: ((p =
|
|
1930
|
+
return m(), b(r(Va), F({
|
|
1931
|
+
class: ((p = r(a)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1935
1932
|
"allow-clear": !0,
|
|
1936
|
-
placeholder: "请输入" +
|
|
1933
|
+
placeholder: "请输入" + r(e),
|
|
1937
1934
|
onBlur: o,
|
|
1938
|
-
onKeyup: n[0] || (n[0] = Se(
|
|
1935
|
+
onKeyup: n[0] || (n[0] = Se(ae(() => {
|
|
1939
1936
|
}, ["stop"]), ["enter", "native"])),
|
|
1940
|
-
onKeydown: n[1] || (n[1] = Se(
|
|
1937
|
+
onKeydown: n[1] || (n[1] = Se(ae(() => {
|
|
1941
1938
|
}, ["stop"]), ["enter", "native"]))
|
|
1942
|
-
},
|
|
1939
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1943
1940
|
};
|
|
1944
1941
|
}
|
|
1945
|
-
}),
|
|
1942
|
+
}), $l = /* @__PURE__ */ S({
|
|
1946
1943
|
__name: "index",
|
|
1947
1944
|
props: {
|
|
1948
1945
|
valueFormat: {}
|
|
1949
1946
|
},
|
|
1950
|
-
setup(
|
|
1951
|
-
const t =
|
|
1952
|
-
o != null && o.value.errClass && e &&
|
|
1953
|
-
}, n =
|
|
1947
|
+
setup(l) {
|
|
1948
|
+
const t = l, { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
|
|
1949
|
+
o != null && o.value.errClass && e && Y(e);
|
|
1950
|
+
}, n = _(t.valueFormat ?? "HH:mm");
|
|
1954
1951
|
return (p, d) => {
|
|
1955
1952
|
var i;
|
|
1956
|
-
return m(), b(
|
|
1957
|
-
class:
|
|
1958
|
-
placeholder: "请选择" +
|
|
1959
|
-
locale:
|
|
1953
|
+
return m(), b(r(Ya), {
|
|
1954
|
+
class: E(["w-full", [((i = r(o)) == null ? void 0 : i.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
1955
|
+
placeholder: "请选择" + r(a),
|
|
1956
|
+
locale: r(de),
|
|
1960
1957
|
valueFormat: n.value,
|
|
1961
|
-
onBlur:
|
|
1958
|
+
onBlur: u
|
|
1962
1959
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
1963
1960
|
};
|
|
1964
1961
|
}
|
|
1965
|
-
}),
|
|
1962
|
+
}), Ot = /* @__PURE__ */ S({
|
|
1966
1963
|
__name: "index",
|
|
1967
1964
|
props: {
|
|
1968
1965
|
autoload: { type: Boolean },
|
|
@@ -1971,55 +1968,55 @@ const vl = /* @__PURE__ */ T({
|
|
|
1971
1968
|
value: {}
|
|
1972
1969
|
},
|
|
1973
1970
|
emits: ["change", "update:value"],
|
|
1974
|
-
setup(
|
|
1975
|
-
const e =
|
|
1971
|
+
setup(l, { emit: t }) {
|
|
1972
|
+
const e = l, a = _({ ...e.url }), { editorCtrl: o, labelText: u, errInfo: n } = L(), p = t, d = _([]), i = _([]);
|
|
1976
1973
|
e.value && e.value.every((s) => {
|
|
1977
1974
|
i.value.push(s.toString());
|
|
1978
|
-
}),
|
|
1975
|
+
}), T(
|
|
1979
1976
|
() => e.value,
|
|
1980
1977
|
(s) => {
|
|
1981
1978
|
s && (i.value = s);
|
|
1982
1979
|
}
|
|
1983
1980
|
);
|
|
1984
|
-
const
|
|
1985
|
-
p("update:value", s), p("change", s), i.value = s, n != null && n.value.errClass && o &&
|
|
1981
|
+
const f = (s) => {
|
|
1982
|
+
p("update:value", s), p("change", s), i.value = s, n != null && n.value.errClass && o && Y(o);
|
|
1986
1983
|
};
|
|
1987
|
-
return
|
|
1984
|
+
return K(async () => {
|
|
1988
1985
|
if (a.value) {
|
|
1989
1986
|
const s = o == null ? void 0 : o.page;
|
|
1990
1987
|
if (a.value.api || (a.value.api = s == null ? void 0 : s.api), a.value.authorize === void 0 && (a.value.authorize = s == null ? void 0 : s.authorize), e.autoload) {
|
|
1991
|
-
const
|
|
1988
|
+
const v = await Le(o, {
|
|
1992
1989
|
urlKey: "list",
|
|
1993
1990
|
url: { ...a.value, url: a.value.url },
|
|
1994
1991
|
loadingText: !1,
|
|
1995
1992
|
params: e.params
|
|
1996
1993
|
});
|
|
1997
|
-
d.value = (
|
|
1994
|
+
d.value = (v == null ? void 0 : v.data) ?? [];
|
|
1998
1995
|
}
|
|
1999
1996
|
}
|
|
2000
|
-
}), (s,
|
|
2001
|
-
var
|
|
2002
|
-
return m(), b(
|
|
2003
|
-
class: ((
|
|
2004
|
-
placeholder: "请输入" +
|
|
1997
|
+
}), (s, v) => {
|
|
1998
|
+
var c;
|
|
1999
|
+
return m(), b(r(Ka), F({
|
|
2000
|
+
class: ((c = r(n)) == null ? void 0 : c.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2001
|
+
placeholder: "请输入" + r(u),
|
|
2005
2002
|
targetKeys: i.value,
|
|
2006
|
-
onChange:
|
|
2003
|
+
onChange: f
|
|
2007
2004
|
}, s.$attrs), {
|
|
2008
|
-
children:
|
|
2009
|
-
|
|
2010
|
-
direction:
|
|
2011
|
-
disabled:
|
|
2012
|
-
filteredItems:
|
|
2013
|
-
onItemSelectAll:
|
|
2014
|
-
onItemSelect:
|
|
2015
|
-
selectedKeys:
|
|
2005
|
+
children: h(({ direction: g, disabled: C, filteredItems: $, onItemSelectAll: M, onItemSelect: x, selectedKeys: B }) => [
|
|
2006
|
+
I(s.$slots, "children", {
|
|
2007
|
+
direction: g,
|
|
2008
|
+
disabled: C,
|
|
2009
|
+
filteredItems: $,
|
|
2010
|
+
onItemSelectAll: M,
|
|
2011
|
+
onItemSelect: x,
|
|
2012
|
+
selectedKeys: B
|
|
2016
2013
|
})
|
|
2017
2014
|
]),
|
|
2018
2015
|
_: 3
|
|
2019
2016
|
}, 16, ["class", "placeholder", "targetKeys"]);
|
|
2020
2017
|
};
|
|
2021
2018
|
}
|
|
2022
|
-
}),
|
|
2019
|
+
}), Dl = /* @__PURE__ */ S({
|
|
2023
2020
|
__name: "transferTable",
|
|
2024
2021
|
props: {
|
|
2025
2022
|
/**
|
|
@@ -2045,36 +2042,36 @@ const vl = /* @__PURE__ */ T({
|
|
|
2045
2042
|
}
|
|
2046
2043
|
},
|
|
2047
2044
|
emits: ["update:value"],
|
|
2048
|
-
setup(
|
|
2049
|
-
const e =
|
|
2050
|
-
|
|
2051
|
-
() =>
|
|
2045
|
+
setup(l, { emit: t }) {
|
|
2046
|
+
const e = l, a = t, o = _(e.autoload), u = _(e.value), n = _(e.gridCtrl.primaryKey);
|
|
2047
|
+
T(
|
|
2048
|
+
() => u.value,
|
|
2052
2049
|
(i) => {
|
|
2053
2050
|
a("update:value", i);
|
|
2054
2051
|
}
|
|
2055
|
-
),
|
|
2052
|
+
), T(
|
|
2056
2053
|
() => e.value,
|
|
2057
2054
|
(i) => {
|
|
2058
|
-
i && (
|
|
2055
|
+
i && (u.value = i);
|
|
2059
2056
|
}
|
|
2060
|
-
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable =
|
|
2061
|
-
const p = ({ disabled: i, selectedKeys:
|
|
2062
|
-
getCheckboxProps: (
|
|
2057
|
+
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = _(!0), e.gridCtrl.buttons = _([]), e.gridCtrl.tools = [];
|
|
2058
|
+
const p = ({ disabled: i, selectedKeys: f, onItemSelectAll: s, onItemSelect: v }) => ({
|
|
2059
|
+
getCheckboxProps: (c) => ({
|
|
2063
2060
|
// 控制是否禁止
|
|
2064
|
-
disabled: i ||
|
|
2061
|
+
disabled: i || c.disabled
|
|
2065
2062
|
}),
|
|
2066
|
-
onSelectAll(
|
|
2067
|
-
const
|
|
2068
|
-
s(
|
|
2063
|
+
onSelectAll(c, g) {
|
|
2064
|
+
const C = g.filter(($) => !$.disabled).map(({ [n.value]: $ }) => $);
|
|
2065
|
+
s(C, c);
|
|
2069
2066
|
},
|
|
2070
|
-
onSelect({ [n.value]:
|
|
2071
|
-
|
|
2067
|
+
onSelect({ [n.value]: c }, g) {
|
|
2068
|
+
v(c, g);
|
|
2072
2069
|
},
|
|
2073
|
-
selectedRowKeys:
|
|
2074
|
-
}), d =
|
|
2075
|
-
return
|
|
2070
|
+
selectedRowKeys: f
|
|
2071
|
+
}), d = _([]);
|
|
2072
|
+
return K(async () => {
|
|
2076
2073
|
if (o.value) {
|
|
2077
|
-
const i = await
|
|
2074
|
+
const i = await Le(e.gridCtrl, {
|
|
2078
2075
|
urlKey: "list",
|
|
2079
2076
|
url: { ...e.gridCtrl.gridUrl, url: e.gridCtrl.gridUrl.url },
|
|
2080
2077
|
params: e.gridCtrl.gridQuery,
|
|
@@ -2082,42 +2079,42 @@ const vl = /* @__PURE__ */ T({
|
|
|
2082
2079
|
});
|
|
2083
2080
|
d.value = (i == null ? void 0 : i.data) ?? [];
|
|
2084
2081
|
}
|
|
2085
|
-
}), (i,
|
|
2082
|
+
}), (i, f) => (m(), b(Ot, F({
|
|
2086
2083
|
"data-source": d.value,
|
|
2087
2084
|
"row-key": (s) => s[n.value],
|
|
2088
|
-
value:
|
|
2089
|
-
"onUpdate:value":
|
|
2085
|
+
value: u.value,
|
|
2086
|
+
"onUpdate:value": f[0] || (f[0] = (s) => u.value = s),
|
|
2090
2087
|
"list-style": {
|
|
2091
2088
|
width: "300px",
|
|
2092
2089
|
height: "500px"
|
|
2093
2090
|
},
|
|
2094
2091
|
"show-select-all": !1,
|
|
2095
2092
|
"show-search": !0,
|
|
2096
|
-
"filter-option": (s,
|
|
2097
|
-
for (const
|
|
2098
|
-
if (
|
|
2093
|
+
"filter-option": (s, v) => {
|
|
2094
|
+
for (const c of e.gridCtrl.columns.value)
|
|
2095
|
+
if (v[c.dataIndex].toString().indexOf(s) !== -1)
|
|
2099
2096
|
return !0;
|
|
2100
2097
|
return !1;
|
|
2101
2098
|
}
|
|
2102
2099
|
}, i.$attrs), {
|
|
2103
|
-
children:
|
|
2104
|
-
|
|
2105
|
-
columns:
|
|
2100
|
+
children: h(({ filteredItems: s, onItemSelectAll: v, onItemSelect: c, selectedKeys: g }) => [
|
|
2101
|
+
k(r(je), {
|
|
2102
|
+
columns: l.gridCtrl.columns.value,
|
|
2106
2103
|
"row-key": n.value,
|
|
2107
2104
|
"row-selection": p({
|
|
2108
2105
|
disabled: !1,
|
|
2109
|
-
selectedKeys:
|
|
2110
|
-
onItemSelectAll:
|
|
2111
|
-
onItemSelect:
|
|
2106
|
+
selectedKeys: g,
|
|
2107
|
+
onItemSelectAll: v,
|
|
2108
|
+
onItemSelect: c
|
|
2112
2109
|
}),
|
|
2113
2110
|
bordered: !1,
|
|
2114
2111
|
size: "small",
|
|
2115
2112
|
"data-source": s,
|
|
2116
2113
|
scroll: { x: 300 },
|
|
2117
|
-
"custom-row": (
|
|
2114
|
+
"custom-row": (C) => ({
|
|
2118
2115
|
onClick: () => {
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2116
|
+
const $ = C[n.value];
|
|
2117
|
+
c($, !g.includes($));
|
|
2121
2118
|
}
|
|
2122
2119
|
})
|
|
2123
2120
|
}, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
|
|
@@ -2125,7 +2122,7 @@ const vl = /* @__PURE__ */ T({
|
|
|
2125
2122
|
_: 1
|
|
2126
2123
|
}, 16, ["data-source", "row-key", "value", "filter-option"]));
|
|
2127
2124
|
}
|
|
2128
|
-
}),
|
|
2125
|
+
}), Bt = /* @__PURE__ */ S({
|
|
2129
2126
|
__name: "index",
|
|
2130
2127
|
props: {
|
|
2131
2128
|
multiple: {
|
|
@@ -2151,83 +2148,83 @@ const vl = /* @__PURE__ */ T({
|
|
|
2151
2148
|
}
|
|
2152
2149
|
},
|
|
2153
2150
|
emits: ["change", "update:value"],
|
|
2154
|
-
setup(
|
|
2155
|
-
const e =
|
|
2156
|
-
|
|
2157
|
-
const i =
|
|
2158
|
-
|
|
2151
|
+
setup(l, { emit: t }) {
|
|
2152
|
+
const e = l, a = e.value === void 0 ? !0 : e.undefValue, o = e.treeCtrl, u = L(), { errInfo: n, labelText: p } = u, d = t;
|
|
2153
|
+
u.inputEmit = d;
|
|
2154
|
+
const i = _([]), f = _();
|
|
2155
|
+
T(
|
|
2159
2156
|
() => e.value,
|
|
2160
|
-
(
|
|
2161
|
-
|
|
2157
|
+
(c) => {
|
|
2158
|
+
f.value = c;
|
|
2162
2159
|
},
|
|
2163
2160
|
{ immediate: !0 }
|
|
2164
|
-
),
|
|
2165
|
-
() =>
|
|
2166
|
-
(
|
|
2167
|
-
d("update:value",
|
|
2161
|
+
), T(
|
|
2162
|
+
() => f.value,
|
|
2163
|
+
(c) => {
|
|
2164
|
+
d("update:value", c);
|
|
2168
2165
|
}
|
|
2169
|
-
),
|
|
2166
|
+
), T(
|
|
2170
2167
|
() => o.data.value,
|
|
2171
|
-
(
|
|
2172
|
-
|
|
2168
|
+
(c) => {
|
|
2169
|
+
c && (i.value = o.fieldMap ? ne(o.fieldMap, c) : c);
|
|
2173
2170
|
},
|
|
2174
2171
|
{ immediate: !0 }
|
|
2175
2172
|
);
|
|
2176
|
-
const s = (
|
|
2177
|
-
e.multiple ?
|
|
2173
|
+
const s = (c) => {
|
|
2174
|
+
e.multiple ? f.value = c ?? [] : c == null ? f.value = a ? void 0 : null : f.value = c, d("change", f.value);
|
|
2178
2175
|
};
|
|
2179
|
-
|
|
2176
|
+
_e(() => {
|
|
2180
2177
|
e.treeCtrl && e.treeCtrl.autoload && (e.treeCtrl.reload.value = !0);
|
|
2181
|
-
}),
|
|
2178
|
+
}), K(() => {
|
|
2182
2179
|
o.fieldMap || (o.fieldMap = {
|
|
2183
2180
|
label: "Name",
|
|
2184
2181
|
key: "Id",
|
|
2185
2182
|
value: "Id"
|
|
2186
|
-
}), o.data.value ? i.value = o.fieldMap ?
|
|
2183
|
+
}), o.data.value ? i.value = o.fieldMap ? ne(o.fieldMap, o.data.value) : o.data.value : e.treeCtrl.autoload && Ae(e.treeCtrl);
|
|
2187
2184
|
});
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2185
|
+
const v = () => {
|
|
2186
|
+
f.value = a ? void 0 : null;
|
|
2190
2187
|
};
|
|
2191
|
-
return (
|
|
2192
|
-
var
|
|
2193
|
-
return m(), b(
|
|
2194
|
-
class: [[(
|
|
2188
|
+
return (c, g) => {
|
|
2189
|
+
var C;
|
|
2190
|
+
return m(), b(r(Wa), F({
|
|
2191
|
+
class: [[(C = r(n)) == null ? void 0 : C.errClass], "w-full"],
|
|
2195
2192
|
"tree-line": "",
|
|
2196
|
-
multiple:
|
|
2193
|
+
multiple: l.multiple,
|
|
2197
2194
|
"tree-default-expanded-keys": ["-"],
|
|
2198
|
-
value:
|
|
2199
|
-
"onUpdate:value":
|
|
2195
|
+
value: f.value,
|
|
2196
|
+
"onUpdate:value": g[0] || (g[0] = ($) => f.value = $),
|
|
2200
2197
|
"tree-data": i.value,
|
|
2201
|
-
placeholder: "请选择" +
|
|
2198
|
+
placeholder: "请选择" + r(p),
|
|
2202
2199
|
onChange: s,
|
|
2203
|
-
onClear:
|
|
2204
|
-
},
|
|
2200
|
+
onClear: v
|
|
2201
|
+
}, c.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
|
|
2205
2202
|
};
|
|
2206
2203
|
}
|
|
2207
|
-
}),
|
|
2204
|
+
}), Il = /* @__PURE__ */ G(Bt, [["__scopeId", "data-v-71d50074"]]), At = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, Lt = { class: "flex w-full h-full min-h-full" }, Rt = {
|
|
2208
2205
|
key: 0,
|
|
2209
2206
|
class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
|
|
2210
|
-
},
|
|
2207
|
+
}, zt = { class: "flex-1 h-full overflow-y-auto" }, El = /* @__PURE__ */ S({
|
|
2211
2208
|
__name: "index",
|
|
2212
2209
|
props: {
|
|
2213
2210
|
left: { type: Boolean }
|
|
2214
2211
|
},
|
|
2215
|
-
setup(
|
|
2212
|
+
setup(l) {
|
|
2216
2213
|
const { useToken: t } = Ve, { token: e } = t();
|
|
2217
|
-
return (a, o) => (m(),
|
|
2218
|
-
|
|
2214
|
+
return (a, o) => (m(), w("div", At, [
|
|
2215
|
+
k(r(ja), {
|
|
2219
2216
|
class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
|
|
2220
2217
|
style: be({
|
|
2221
|
-
backgroundColor:
|
|
2218
|
+
backgroundColor: r(e).colorBgContainer
|
|
2222
2219
|
})
|
|
2223
2220
|
}, {
|
|
2224
|
-
default:
|
|
2225
|
-
|
|
2226
|
-
a.left ? (m(),
|
|
2227
|
-
|
|
2228
|
-
])) :
|
|
2229
|
-
|
|
2230
|
-
|
|
2221
|
+
default: h(() => [
|
|
2222
|
+
D("div", Lt, [
|
|
2223
|
+
a.left ? (m(), w("div", Rt, [
|
|
2224
|
+
I(a.$slots, "left")
|
|
2225
|
+
])) : y("", !0),
|
|
2226
|
+
D("div", zt, [
|
|
2227
|
+
I(a.$slots, "default")
|
|
2231
2228
|
])
|
|
2232
2229
|
])
|
|
2233
2230
|
]),
|
|
@@ -2237,157 +2234,157 @@ const vl = /* @__PURE__ */ T({
|
|
|
2237
2234
|
}
|
|
2238
2235
|
});
|
|
2239
2236
|
export {
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2237
|
+
Dr as Alert,
|
|
2238
|
+
Yr as AppIcon,
|
|
2239
|
+
ce as AppRouter,
|
|
2240
|
+
_r as AsyncUploader,
|
|
2241
|
+
ml as AutoComplete,
|
|
2242
|
+
Kr as Breadcrumb,
|
|
2246
2243
|
A as Button,
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2244
|
+
Qe as Cache,
|
|
2245
|
+
ot as CacheKeys,
|
|
2246
|
+
wr as CanPreviewFileExt,
|
|
2247
|
+
hl as Cascader,
|
|
2248
|
+
gl as Checkbox,
|
|
2249
|
+
El as Content,
|
|
2250
|
+
bl as DatePicker,
|
|
2251
|
+
Wr as Datetime,
|
|
2252
|
+
Zr as Dialog,
|
|
2253
|
+
ul as Drawer,
|
|
2254
|
+
Nl as EventPrefix,
|
|
2255
|
+
cl as Form,
|
|
2256
|
+
dl as FormItem,
|
|
2257
|
+
nl as Fullscreen,
|
|
2258
|
+
jr as Header,
|
|
2259
|
+
qr as HeaderExits,
|
|
2260
|
+
it as Helper,
|
|
2261
|
+
Ml as ICONS_LIB,
|
|
2262
|
+
Hr as Icon,
|
|
2263
|
+
bt as Icontool,
|
|
2264
|
+
Et as Input,
|
|
2265
|
+
_l as InputIcon,
|
|
2266
|
+
yl as InputNumber,
|
|
2267
|
+
xl as InputPassword,
|
|
2268
|
+
il as LayoutIcon,
|
|
2269
|
+
Ir as Loading,
|
|
2270
|
+
Qr as Menu,
|
|
2271
|
+
Gr as MenuTabs,
|
|
2272
|
+
Ol as MicroOpenApis,
|
|
2276
2273
|
Be as OPTIONS,
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2274
|
+
ma as OptionCommProps,
|
|
2275
|
+
Jr as ProjectIcon,
|
|
2276
|
+
kl as PropEditor,
|
|
2277
|
+
q as ProviderKeys,
|
|
2278
|
+
Mt as Radio,
|
|
2279
|
+
wl as RadioStatus,
|
|
2280
|
+
Cl as RangePicker,
|
|
2281
|
+
pl as Search,
|
|
2285
2282
|
fe as SearchItem,
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2283
|
+
Sl as Select,
|
|
2284
|
+
da as Switch,
|
|
2285
|
+
fl as Table,
|
|
2286
|
+
ht as TableOperate,
|
|
2287
|
+
Tl as Textarea,
|
|
2288
|
+
$l as TimePicker,
|
|
2289
|
+
U as ToolIcon,
|
|
2290
|
+
kt as Toolbar,
|
|
2291
|
+
Ur as Tooltip,
|
|
2292
|
+
Ot as Transfer,
|
|
2293
|
+
Dl as TransferTable,
|
|
2294
|
+
vl as Tree,
|
|
2295
|
+
Il as TreeSelect,
|
|
2296
|
+
Cr as UploadList,
|
|
2297
|
+
xr as UploadStatus,
|
|
2298
|
+
Er as appendExcelData,
|
|
2299
|
+
Pr as checkExcelDuplicates,
|
|
2300
|
+
Bl as checkIconsExpired,
|
|
2301
|
+
_a as circleLoading,
|
|
2302
|
+
ra as createFromIconfont,
|
|
2303
|
+
Fr as createMarkedExcelView,
|
|
2304
|
+
Al as crumbs,
|
|
2305
|
+
ll as csvToExcelBlob,
|
|
2306
|
+
qe as csvToExcelView,
|
|
2307
|
+
Nr as csvToNormalized,
|
|
2311
2308
|
Ee as defaultTools,
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2309
|
+
Ll as doDelete,
|
|
2310
|
+
Rl as doExecute,
|
|
2311
|
+
Le as doQuery,
|
|
2312
|
+
zl as doSave,
|
|
2313
|
+
Sr as donwloadFromMinio,
|
|
2314
|
+
Ha as downloadBlob,
|
|
2315
|
+
Ul as eventBus,
|
|
2316
|
+
Mr as excelToExcelView,
|
|
2317
|
+
Or as excelToNormalized,
|
|
2318
|
+
ol as exportResults,
|
|
2319
|
+
sl as exportSelectedRows,
|
|
2323
2320
|
Oe as filterColumns,
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2321
|
+
Y as formValidate,
|
|
2322
|
+
Vl as getFormDetail,
|
|
2323
|
+
Yl as getIconTransform,
|
|
2324
|
+
Kl as getRecordDetail,
|
|
2325
|
+
Wl as getRuleTexts,
|
|
2326
|
+
ya as getSelectedLabels,
|
|
2327
|
+
jl as getSelectedValues,
|
|
2328
|
+
W as getToolByKey,
|
|
2332
2329
|
ke as getToolGroup,
|
|
2333
|
-
|
|
2334
|
-
|
|
2330
|
+
j as getToolStatus,
|
|
2331
|
+
J as getToolVisible,
|
|
2335
2332
|
we as gridQueryFind,
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2333
|
+
ca as gridQueryList,
|
|
2334
|
+
ql as gridRowUpdate,
|
|
2335
|
+
pa as gridStatusUpdate,
|
|
2336
|
+
tl as initCacheCheck,
|
|
2337
|
+
al as initDirective,
|
|
2338
|
+
Hl as initMenu,
|
|
2339
|
+
Ql as initPageFactory,
|
|
2340
|
+
Gl as initValidate,
|
|
2341
|
+
Z as isEmpty,
|
|
2342
|
+
ga as loadOption,
|
|
2343
|
+
Jl as mergeColumns,
|
|
2344
|
+
Br as normalizedToExcelView,
|
|
2345
|
+
rt as onColumnVisibleChanged,
|
|
2346
|
+
oa as onFormClose,
|
|
2350
2347
|
Fe as onFormSave,
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2348
|
+
sa as onFormSaveAs,
|
|
2349
|
+
He as onFullscreenClick,
|
|
2350
|
+
ia as onGridRowDelete,
|
|
2351
|
+
na as onGridRowEdit,
|
|
2352
|
+
Xl as onGridRowExpand,
|
|
2353
|
+
xa as onOptionChanged,
|
|
2354
|
+
Ja as onReloadClick,
|
|
2355
|
+
V as onToolClicked,
|
|
2356
|
+
ua as openNewForm,
|
|
2357
|
+
Zl as outFormDataFields,
|
|
2358
|
+
er as parseIcons,
|
|
2359
|
+
yr as path,
|
|
2360
|
+
ar as pendingNavigation,
|
|
2361
|
+
tr as pinia,
|
|
2362
|
+
Tr as previewFromMinio,
|
|
2363
|
+
rl as processCsvFile,
|
|
2364
|
+
Ar as processExcelFile,
|
|
2365
|
+
Ae as queryTree,
|
|
2366
|
+
lr as resetRules,
|
|
2367
|
+
rr as routes,
|
|
2368
|
+
sr as saveForm,
|
|
2369
|
+
or as setFormData,
|
|
2370
|
+
nr as showBreadcrumb,
|
|
2371
|
+
Lr as toExcel,
|
|
2372
|
+
ba as unloadOption,
|
|
2373
|
+
ir as uploadTempBtn,
|
|
2374
|
+
ur as uploadTempOpener,
|
|
2375
|
+
cr as useAppInfo,
|
|
2376
|
+
dr as useEditorFactory,
|
|
2380
2377
|
Ne as useFormItemFactory,
|
|
2381
|
-
|
|
2382
|
-
|
|
2378
|
+
pr as useGridFactory,
|
|
2379
|
+
fr as useHostInfo,
|
|
2383
2380
|
L as useInputFactory,
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2381
|
+
ha as useOptionFactory,
|
|
2382
|
+
vr as usePageFactory,
|
|
2383
|
+
mr as usePageInfo,
|
|
2387
2384
|
he as useSettingInfo,
|
|
2388
|
-
|
|
2389
|
-
|
|
2385
|
+
st as useToolFactory,
|
|
2386
|
+
hr as useTreeFactory,
|
|
2390
2387
|
Pe as useUserInfo,
|
|
2391
|
-
|
|
2392
|
-
|
|
2388
|
+
gr as validateData,
|
|
2389
|
+
Rr as validateExcel
|
|
2393
2390
|
};
|