@skyfox2000/webui 1.4.17 → 1.4.18
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/utils/export-table.d.ts +1 -1
- package/lib/webui.es.js +1087 -1093
- package/package.json +1 -1
- package/src/utils/export-table.ts +91 -70
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 R, 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 Re } 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 Rl, a9 as Ll, 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 Le, 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 v, 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 Ra, Input as ee, InputPassword as La, 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 Rr, v as Lr } 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
|
-
const
|
|
26
|
-
|
|
25
|
+
const s = t.component;
|
|
26
|
+
s ? s.props.disabled = !0 : (t.el, l.setAttribute("disabled", "disabled"), l.disabled = !0), l.classList.add("disabled");
|
|
27
27
|
} else {
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
28
|
+
const s = 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(s, l);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, De = (l) => {
|
|
35
35
|
var n, p;
|
|
36
|
-
const t = Pe(), { url: e, role: a, permit:
|
|
37
|
-
if (
|
|
36
|
+
const t = Pe(), { url: e, role: a, permit: s } = l;
|
|
37
|
+
if (Z(a) && Z(s))
|
|
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(s) || (i = t.hasPermit(u, s)), d || i);
|
|
45
45
|
}
|
|
46
46
|
return !1;
|
|
47
|
-
},
|
|
48
|
-
mounted(
|
|
49
|
-
const a = t.value || {},
|
|
50
|
-
$e(
|
|
47
|
+
}, Qa = {
|
|
48
|
+
mounted(l, t, e) {
|
|
49
|
+
const a = t.value || {}, s = t.arg || "remove", u = a.behavior || s, n = De(a);
|
|
50
|
+
$e(l, e, n, u);
|
|
51
51
|
},
|
|
52
|
-
updated(
|
|
53
|
-
const a = t.value || {},
|
|
54
|
-
$e(
|
|
52
|
+
updated(l, t, e) {
|
|
53
|
+
const a = t.value || {}, s = t.arg || "remove", u = a.behavior || s, 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
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
77
|
+
const s = W(a.children, t);
|
|
78
|
+
if (s)
|
|
79
|
+
return s;
|
|
80
80
|
}
|
|
81
|
-
}, ke = (
|
|
82
|
-
const a = [],
|
|
83
|
-
return e || (e = [...
|
|
81
|
+
}, ke = (l, t, e) => {
|
|
82
|
+
const a = [], s = [];
|
|
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)) :
|
|
96
|
-
}), t === 0 || n < t ? a.push(p) :
|
|
97
|
-
}), { buttons: a, menus:
|
|
98
|
-
},
|
|
95
|
+
}, 1)) : le.warning("未配置点击处理事件!");
|
|
96
|
+
}), t === 0 || n < t ? a.push(p) : s.push(p);
|
|
97
|
+
}), { buttons: a, menus: s };
|
|
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, s) => {
|
|
121
|
+
(!l.confirm || s) && 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,47 +210,47 @@ 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
|
*/
|
|
229
229
|
static setWithServerTime(t, e, a) {
|
|
230
|
-
const
|
|
230
|
+
const s = {
|
|
231
231
|
data: e,
|
|
232
232
|
lastTime: a
|
|
233
233
|
};
|
|
234
|
-
|
|
234
|
+
oe.set({ key: t, storage: "local" }, s);
|
|
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 Le(
|
|
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,14 +320,14 @@ 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), s = await qe(a, t);
|
|
326
326
|
return {
|
|
327
|
-
success:
|
|
328
|
-
blobUrl:
|
|
329
|
-
fileName:
|
|
330
|
-
error:
|
|
327
|
+
success: s.success,
|
|
328
|
+
blobUrl: s.blobUrl,
|
|
329
|
+
fileName: s.fileName,
|
|
330
|
+
error: s.error,
|
|
331
331
|
csvContent: a
|
|
332
332
|
// 保留原始CSV内容
|
|
333
333
|
};
|
|
@@ -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 s = { ...e };
|
|
345
|
+
return t.forEach((u) => {
|
|
346
|
+
const n = Ge(u.dataIndex) || u.key;
|
|
347
|
+
n && u.customRender && (s[n] = u.customRender({
|
|
348
|
+
text: e[n],
|
|
349
|
+
record: e,
|
|
350
|
+
index: a,
|
|
351
|
+
column: u
|
|
352
|
+
}));
|
|
353
|
+
}), s;
|
|
354
|
+
}), Ze = async (l, t, e) => {
|
|
341
355
|
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);
|
|
356
|
+
const s = (await import("@json2csv/plainjs")).Parser, n = new s({ fields: t }).parse(e), p = new Blob([`\uFEFF${n}`], { type: "text/csv" });
|
|
357
|
+
Ha(p, l);
|
|
358
358
|
} catch (a) {
|
|
359
|
-
console.error("导出失败:", a),
|
|
359
|
+
console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
|
|
360
360
|
}
|
|
361
|
-
},
|
|
361
|
+
}, sl = async (l, t, e) => {
|
|
362
|
+
try {
|
|
363
|
+
const a = ea(l), s = t.filter((p) => p.visible !== !1 && p.export !== !1), u = Je(s), n = Xe(e, s);
|
|
364
|
+
await Ze(a, u, n);
|
|
365
|
+
} catch (a) {
|
|
366
|
+
console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
|
|
367
|
+
}
|
|
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 s = 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, Le(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 o = Xe(f, u);
|
|
380
|
+
await Ze(s, n, o);
|
|
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
|
-
} catch (
|
|
394
|
-
console.error("导出失败:",
|
|
387
|
+
} catch (s) {
|
|
388
|
+
console.error("导出失败:", s), 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) => (
|
|
401
|
-
onClick:
|
|
402
|
-
icon:
|
|
394
|
+
return (e, a) => (v(), 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) => (
|
|
409
|
+
setup(l) {
|
|
410
|
+
const t = X();
|
|
411
|
+
return (e, a) => (v(), 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 (
|
|
449
|
+
return (s, u) => l.icon || l.icons ? (v(), 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
|
-
},
|
|
454
|
+
}, s.$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), s = l, u = s.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
|
-
|
|
477
|
+
s.drawerSave ? s.drawerSave() : u && Fe(u);
|
|
484
478
|
}, p = () => {
|
|
485
|
-
|
|
479
|
+
s.drawerSaveAs ? s.drawerSaveAs() : u && sa(u);
|
|
486
480
|
}, d = () => {
|
|
487
|
-
|
|
481
|
+
oa(u);
|
|
488
482
|
};
|
|
489
|
-
return (i,
|
|
483
|
+
return (i, f) => (v(), b(r(Pa), {
|
|
490
484
|
open: a.value,
|
|
491
|
-
"onUpdate:open":
|
|
485
|
+
"onUpdate:open": f[0] || (f[0] = (o) => a.value = o),
|
|
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 !== "" ? (
|
|
525
|
+
footer: h(() => [
|
|
526
|
+
I(i.$slots, "footer", {}, () => [
|
|
527
|
+
k(r(te), null, {
|
|
528
|
+
default: h(() => [
|
|
529
|
+
i.cancelText !== "" ? (v(), 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 ? (v(), 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 ? (v(), 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, s) => {
|
|
578
|
+
const u = re("submit");
|
|
579
|
+
return H((v(), 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), s = 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) => (
|
|
636
|
-
class:
|
|
629
|
+
return (d, i) => (v(), w("div", {
|
|
630
|
+
class: E(["relative", d.bottomMargin ? d.bottomMargin : "mb-1"])
|
|
637
631
|
}, [
|
|
638
|
-
n.value ? (
|
|
632
|
+
n.value ? (v(), 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) : (v(), w("div", ct, [
|
|
647
|
+
I(d.$slots, "default")
|
|
654
648
|
])),
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
d.helper ? (
|
|
649
|
+
D("div", dt, [
|
|
650
|
+
I(d.$slots, "helper", {}, () => [
|
|
651
|
+
d.helper ? (v(), 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 ? (
|
|
660
|
+
}, 16, ["required", "class"])) : y("", !0),
|
|
661
|
+
d.nextLine ? (v(), 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 ? (v(), w("span", {
|
|
674
668
|
key: 2,
|
|
675
|
-
style: be({ left: d.nextLine ? "2px" :
|
|
669
|
+
style: be({ left: d.nextLine ? "2px" : r(s) }),
|
|
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), s = 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 || (
|
|
691
|
+
return n ? (n.required || (s.value.errClass = "", s.value.msg = ""), n.required ?? !0) : (le.error(`"${t.label}" 的验证规则 \`${t.rule}\` 不存在`), s.value.errClass = "text-[#ff4d4f]", s.value.msg = `规则 \`${t.rule}\` 不存在,请检查代码!`, !0);
|
|
698
692
|
});
|
|
699
|
-
return (n, p) => (
|
|
700
|
-
|
|
701
|
-
required:
|
|
693
|
+
return (n, p) => (v(), 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(s).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(s).msg ? (v(), w("span", mt, P(r(s).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, s = _(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({}))), s.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
|
-
const
|
|
769
|
-
var
|
|
770
|
-
let
|
|
762
|
+
const o = () => {
|
|
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
|
+
}, m = () => {
|
|
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((v(), 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
|
-
(
|
|
803
|
-
|
|
795
|
+
I(c.$slots, "default"),
|
|
796
|
+
($ = c.gridCtrl) != null && $.searchBar ? I(c.$slots, "control", { key: 0 }) : y("", !0),
|
|
797
|
+
s.value >= 1 ? (v(), b(fe, {
|
|
804
798
|
key: 1,
|
|
805
799
|
class: "w-1/3"
|
|
806
|
-
})) :
|
|
807
|
-
|
|
800
|
+
})) : y("", !0),
|
|
801
|
+
s.value >= 2 ? (v(), 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 ? (v(), 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
|
-
onClick:
|
|
815
|
+
onClick: o,
|
|
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: m,
|
|
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, o]
|
|
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), s = [
|
|
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(s, 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,92 +889,92 @@ const Zt = async (r, t) => {
|
|
|
895
889
|
return !1;
|
|
896
890
|
};
|
|
897
891
|
return (d, i) => {
|
|
898
|
-
const
|
|
899
|
-
return
|
|
892
|
+
const f = re("auth");
|
|
893
|
+
return v(), b(r(Te), { theme: {
|
|
900
894
|
token: {
|
|
901
895
|
fontSize: 13
|
|
902
896
|
}
|
|
903
897
|
} }, {
|
|
904
|
-
default:
|
|
905
|
-
|
|
906
|
-
default:
|
|
907
|
-
(
|
|
908
|
-
key:
|
|
898
|
+
default: h(() => [
|
|
899
|
+
k(r(te), null, {
|
|
900
|
+
default: h(() => [
|
|
901
|
+
(v(!0), w(O, null, z(r(u), (o) => (v(), w(O, {
|
|
902
|
+
key: o.key
|
|
909
903
|
}, [
|
|
910
|
-
|
|
904
|
+
r(J)(o, t.record) ? (v(), b(r(Na), {
|
|
911
905
|
key: 0,
|
|
912
|
-
disabled: p(
|
|
906
|
+
disabled: p(o) || !o.confirm,
|
|
913
907
|
cancelText: "否",
|
|
914
908
|
okText: "是",
|
|
915
|
-
title:
|
|
909
|
+
title: o.confirmText,
|
|
916
910
|
okButtonProps: { size: "small" },
|
|
917
911
|
cancelButtonProps: { size: "small" },
|
|
918
|
-
onConfirm: (
|
|
912
|
+
onConfirm: (m) => r(V)(o, r(e).page, r(e), t.record, !0)
|
|
919
913
|
}, {
|
|
920
|
-
default:
|
|
921
|
-
|
|
922
|
-
key:
|
|
923
|
-
type:
|
|
924
|
-
danger:
|
|
925
|
-
disabled: p(
|
|
926
|
-
onClick: (
|
|
914
|
+
default: h(() => [
|
|
915
|
+
r(J)(o, t.record) ? H((v(), b(r(We), {
|
|
916
|
+
key: o.key,
|
|
917
|
+
type: o.type ?? "text",
|
|
918
|
+
danger: o.danger,
|
|
919
|
+
disabled: p(o),
|
|
920
|
+
onClick: (m) => r(V)(o, r(e).page, r(e), t.record),
|
|
927
921
|
size: "small",
|
|
928
922
|
style: be({
|
|
929
|
-
padding:
|
|
923
|
+
padding: o.type ?? "0px 4px"
|
|
930
924
|
})
|
|
931
925
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
|
|
926
|
+
default: h(() => [
|
|
927
|
+
N(P(o.label), 1)
|
|
934
928
|
]),
|
|
935
929
|
_: 2
|
|
936
930
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
937
|
-
[
|
|
938
|
-
]) :
|
|
931
|
+
[f, { url: a.value, role: o.role, permit: o.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 ? (
|
|
937
|
+
d.record.Enabled == 1 ? (v(), b(r(Te), {
|
|
944
938
|
key: 0,
|
|
945
939
|
autoInsertSpaceInButton: !1
|
|
946
940
|
}, {
|
|
947
|
-
default:
|
|
948
|
-
|
|
941
|
+
default: h(() => [
|
|
942
|
+
r(n).length > 0 ? (v(), b(r(Ma), {
|
|
949
943
|
key: 0,
|
|
950
944
|
size: "small"
|
|
951
945
|
}, {
|
|
952
|
-
overlay:
|
|
953
|
-
|
|
954
|
-
default:
|
|
955
|
-
(
|
|
956
|
-
key:
|
|
946
|
+
overlay: h(() => [
|
|
947
|
+
k(r(xe), null, {
|
|
948
|
+
default: h(() => [
|
|
949
|
+
(v(!0), w(O, null, z(r(n), (o) => (v(), w(O, {
|
|
950
|
+
key: o.key
|
|
957
951
|
}, [
|
|
958
|
-
|
|
952
|
+
r(J)(o, t.record) ? H((v(), b(r(ye), {
|
|
959
953
|
key: 0,
|
|
960
|
-
disabled: p(
|
|
961
|
-
onClick: (
|
|
954
|
+
disabled: p(o),
|
|
955
|
+
onClick: (m) => r(V)(o, r(e).page, r(e), t.record)
|
|
962
956
|
}, {
|
|
963
|
-
default:
|
|
964
|
-
|
|
957
|
+
default: h(() => [
|
|
958
|
+
N(P(o.label), 1)
|
|
965
959
|
]),
|
|
966
960
|
_: 2
|
|
967
961
|
}, 1032, ["disabled", "onClick"])), [
|
|
968
|
-
[
|
|
969
|
-
]) :
|
|
962
|
+
[f, { url: a.value, role: o.role, permit: o.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), s = 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), s.setTableColumns(ce.currentRoute.value.path, e.columns.value);
|
|
1015
1009
|
};
|
|
1016
|
-
return (p, d) => (
|
|
1017
|
-
(
|
|
1010
|
+
return (p, d) => (v(), w("div", gt, [
|
|
1011
|
+
(v(!0), w(O, null, z(r(a), (i, f) => (v(), w(O, {
|
|
1018
1012
|
key: i.key
|
|
1019
1013
|
}, [
|
|
1020
|
-
|
|
1014
|
+
r(J)(i) && i.dropdown ? (v(), 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" ? (
|
|
1023
|
+
i.dropdown === "headset" ? (v(), b(r(qa), {
|
|
1030
1024
|
key: 0,
|
|
1031
|
-
modelValue:
|
|
1032
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
1025
|
+
modelValue: u.value,
|
|
1026
|
+
"onUpdate:modelValue": d[1] || (d[1] = (o) => u.value = o),
|
|
1033
1027
|
"item-key": "dataIndex",
|
|
1034
1028
|
onEnd: n,
|
|
1035
1029
|
handle: ".drag-handle"
|
|
1036
1030
|
}, {
|
|
1037
|
-
default:
|
|
1038
|
-
(
|
|
1039
|
-
key:
|
|
1040
|
-
onClick: d[0] || (d[0] =
|
|
1031
|
+
default: h(() => [
|
|
1032
|
+
(v(!0), w(O, null, z(u.value, (o) => (v(), w("div", {
|
|
1033
|
+
key: o.name,
|
|
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
|
-
|
|
1046
|
-
checked:
|
|
1047
|
-
onChange:
|
|
1048
|
-
(
|
|
1049
|
-
|
|
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), {
|
|
1040
|
+
checked: o.visible !== !1,
|
|
1041
|
+
onChange: ae(
|
|
1042
|
+
(m) => {
|
|
1043
|
+
r(rt)(o, m.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(o.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: (
|
|
1069
|
+
onClick: (o) => 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) ? (v(), 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: (
|
|
1091
|
+
onClick: (o) => 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) ? (v(), 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
|
-
(
|
|
1116
|
-
key:
|
|
1117
|
-
disabled:
|
|
1106
|
+
overlay: h(() => [
|
|
1107
|
+
k(r(xe), null, {
|
|
1108
|
+
default: h(() => [
|
|
1109
|
+
(v(!0), w(O, null, z(i.children, (o) => (v(), b(r(ye), {
|
|
1110
|
+
key: o.key,
|
|
1111
|
+
disabled: r(j)(o)
|
|
1118
1112
|
}, {
|
|
1119
|
-
default:
|
|
1120
|
-
|
|
1113
|
+
default: h(() => [
|
|
1114
|
+
N(P(o.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: (
|
|
1132
|
+
onClick: (o) => 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, s = 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(s)
|
|
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
|
-
var
|
|
1181
|
-
const { buttons: i, menus:
|
|
1174
|
+
var o;
|
|
1175
|
+
const { buttons: i, menus: f } = ke(
|
|
1182
1176
|
n,
|
|
1183
|
-
e.flat !== void 0 ? e.flat :
|
|
1184
|
-
(
|
|
1177
|
+
e.flat !== void 0 ? e.flat : yt,
|
|
1178
|
+
(o = e.buttons) == null ? void 0 : o.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,
|
|
1193
|
-
const
|
|
1194
|
-
return
|
|
1195
|
-
|
|
1196
|
-
default:
|
|
1197
|
-
(
|
|
1198
|
-
key:
|
|
1199
|
-
type:
|
|
1200
|
-
danger:
|
|
1201
|
-
disabled:
|
|
1202
|
-
icon:
|
|
1203
|
-
onClick: (
|
|
1186
|
+
), (i, f) => {
|
|
1187
|
+
const o = re("auth");
|
|
1188
|
+
return v(), w("div", _t, [
|
|
1189
|
+
k(r(te), null, {
|
|
1190
|
+
default: h(() => [
|
|
1191
|
+
(v(!0), w(O, null, z(p.value, (m) => H((v(), b(r(A), {
|
|
1192
|
+
key: m.key,
|
|
1193
|
+
type: m.type,
|
|
1194
|
+
danger: m.danger,
|
|
1195
|
+
disabled: r(j)(m),
|
|
1196
|
+
icon: m.icon,
|
|
1197
|
+
onClick: (c) => r(V)(m, r(a), r(e))
|
|
1204
1198
|
}, {
|
|
1205
|
-
default:
|
|
1206
|
-
|
|
1199
|
+
default: h(() => [
|
|
1200
|
+
N(P(m.label), 1)
|
|
1207
1201
|
]),
|
|
1208
1202
|
_: 2
|
|
1209
1203
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
1210
|
-
[
|
|
1204
|
+
[o, { url: u.value, role: m.role, permit: m.permit }]
|
|
1211
1205
|
])), 128)),
|
|
1212
|
-
d.value.length > 0 ? (
|
|
1213
|
-
overlay:
|
|
1214
|
-
|
|
1215
|
-
default:
|
|
1216
|
-
(
|
|
1217
|
-
key:
|
|
1218
|
-
disabled:
|
|
1219
|
-
onClick: (
|
|
1206
|
+
d.value.length > 0 ? (v(), b(r(me), { key: 0 }, {
|
|
1207
|
+
overlay: h(() => [
|
|
1208
|
+
k(r(xe), null, {
|
|
1209
|
+
default: h(() => [
|
|
1210
|
+
(v(!0), w(O, null, z(d.value, (m) => H((v(), b(r(ye), {
|
|
1211
|
+
key: m.key,
|
|
1212
|
+
disabled: r(j)(m),
|
|
1213
|
+
onClick: (c) => r(V)(m, r(a), r(e))
|
|
1220
1214
|
}, {
|
|
1221
|
-
default:
|
|
1222
|
-
|
|
1215
|
+
default: h(() => [
|
|
1216
|
+
N(P(m.label), 1)
|
|
1223
1217
|
]),
|
|
1224
1218
|
_: 2
|
|
1225
1219
|
}, 1032, ["disabled", "onClick"])), [
|
|
1226
|
-
[
|
|
1220
|
+
[o, { url: u.value, role: m.role, permit: m.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 ? (
|
|
1236
|
+
})) : y("", !0),
|
|
1237
|
+
p.value.length === 0 && d.value.length === 0 ? (v(), w("span", xt)) : y("", !0)
|
|
1244
1238
|
]),
|
|
1245
1239
|
_: 1
|
|
1246
1240
|
}),
|
|
1247
|
-
|
|
1248
|
-
default:
|
|
1249
|
-
(
|
|
1241
|
+
k(r(te), { class: "mr-1" }, {
|
|
1242
|
+
default: h(() => [
|
|
1243
|
+
(v(), 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, s = 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
|
-
},
|
|
1304
|
-
|
|
1297
|
+
}, o = _(f);
|
|
1298
|
+
T(
|
|
1305
1299
|
() => a.selectable.value,
|
|
1306
|
-
(
|
|
1307
|
-
a && (
|
|
1300
|
+
(c) => {
|
|
1301
|
+
a && (o.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 m = _(!1);
|
|
1312
|
+
return _e(() => {
|
|
1313
|
+
m.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
|
+
m.value = !0;
|
|
1324
1318
|
}, 50);
|
|
1325
|
-
}), (
|
|
1326
|
-
var
|
|
1327
|
-
const
|
|
1328
|
-
return
|
|
1329
|
-
(
|
|
1319
|
+
}), (c, g) => {
|
|
1320
|
+
var $, M;
|
|
1321
|
+
const C = re("auth");
|
|
1322
|
+
return v(), w(O, null, [
|
|
1323
|
+
($ = r(a).buttons) != null && $.value.length || (M = r(a).tools) != null && M.length ? (v(), 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
|
+
m.value ? (v(), 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
|
-
"row-selection":
|
|
1336
|
+
"row-selection": o.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, L;
|
|
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((v(), 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: s.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
|
|
1362
|
+
]) : y("", !0),
|
|
1363
|
+
r(a) && ((L = x == null ? void 0 : x.column) == null ? void 0 : L.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,166 +1384,166 @@ const Zt = async (r, t) => {
|
|
|
1390
1384
|
expandedKeys: {}
|
|
1391
1385
|
},
|
|
1392
1386
|
emits: ["select", "update:selectedKeys"],
|
|
1393
|
-
setup(
|
|
1394
|
-
const e =
|
|
1395
|
-
|
|
1396
|
-
() =>
|
|
1397
|
-
(
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
const
|
|
1401
|
-
if (
|
|
1402
|
-
const
|
|
1387
|
+
setup(l, { emit: t }) {
|
|
1388
|
+
const e = l, a = X(), s = e.treeCtrl, u = _([]);
|
|
1389
|
+
T(
|
|
1390
|
+
() => s.data.value,
|
|
1391
|
+
(f) => {
|
|
1392
|
+
if (f) {
|
|
1393
|
+
u.value = s.fieldMap ? ne(s.fieldMap, f) : f;
|
|
1394
|
+
const o = fa(u.value, p.value[0]);
|
|
1395
|
+
if (o) {
|
|
1396
|
+
const m = {
|
|
1403
1397
|
event: "select",
|
|
1404
1398
|
node: {
|
|
1405
1399
|
// 根据你的TreeNode结构构建node对象
|
|
1406
|
-
key:
|
|
1407
|
-
title:
|
|
1400
|
+
key: o.key,
|
|
1401
|
+
title: o.title,
|
|
1408
1402
|
checked: !0,
|
|
1409
|
-
dataRef:
|
|
1403
|
+
dataRef: o
|
|
1410
1404
|
},
|
|
1411
1405
|
selected: !0,
|
|
1412
|
-
selectedNodes: [
|
|
1406
|
+
selectedNodes: [o]
|
|
1413
1407
|
};
|
|
1414
|
-
i(p.value,
|
|
1408
|
+
i(p.value, m);
|
|
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, o) => {
|
|
1430
|
+
f.length === 0 && f.push(...p.value), f.length > 0 && (s.node.value = o == null ? void 0 : o.node.dataRef), p.value = f, n("update:selectedKeys", f), n("select", f, o);
|
|
1437
1431
|
};
|
|
1438
|
-
return
|
|
1439
|
-
|
|
1432
|
+
return K(() => {
|
|
1433
|
+
s.fieldMap || (s.fieldMap = {
|
|
1440
1434
|
label: "Name",
|
|
1441
1435
|
key: "Id",
|
|
1442
1436
|
value: "Id",
|
|
1443
1437
|
icon: "Icon"
|
|
1444
|
-
}),
|
|
1445
|
-
}), (
|
|
1438
|
+
}), s.data.value ? u.value = ne(s.fieldMap, s.data.value) : s.autoload && Ae(s);
|
|
1439
|
+
}), (f, o) => (v(), 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":
|
|
1444
|
+
"onUpdate:expandedKeys": o[0] || (o[0] = (m) => d.value = m),
|
|
1451
1445
|
"selected-keys": p.value,
|
|
1452
|
-
loading:
|
|
1446
|
+
loading: r(s).isTreeLoading,
|
|
1453
1447
|
onSelect: i
|
|
1454
|
-
},
|
|
1455
|
-
title:
|
|
1456
|
-
|
|
1457
|
-
label:
|
|
1458
|
-
key:
|
|
1459
|
-
icon:
|
|
1448
|
+
}, r(a)), {
|
|
1449
|
+
title: h(({ key: m, label: c, icon: g }) => [
|
|
1450
|
+
I(f.$slots, "title", {
|
|
1451
|
+
label: c,
|
|
1452
|
+
key: m,
|
|
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(), s = R(), u = ha(e.url, e), n = e.optionCtrl ?? u.optionCtrl;
|
|
1475
|
+
n.inputFactory = Da(s);
|
|
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 } = s, o = _(a.placeholder);
|
|
1483
|
+
T(
|
|
1490
1484
|
() => p.value.loading,
|
|
1491
|
-
(
|
|
1492
|
-
|
|
1485
|
+
(x) => {
|
|
1486
|
+
x ? o.value = "" : o.value || (o.value = "请选择" + f.value);
|
|
1493
1487
|
},
|
|
1494
1488
|
{ immediate: !0 }
|
|
1495
1489
|
);
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1498
|
-
const
|
|
1499
|
-
n &&
|
|
1490
|
+
const m = t;
|
|
1491
|
+
s.inputEmit = m;
|
|
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
|
+
m("update:labels", []), m("update:value", []);
|
|
1509
1503
|
return;
|
|
1510
1504
|
}
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1505
|
+
const L = B.map((ta) => ta.value), se = xa(n, e, L), aa = ya(se);
|
|
1506
|
+
m("update:labels", aa), m("update:value", L), 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
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1516
|
+
}), n && ga(n.autoload, n, e);
|
|
1517
|
+
}), Ia(() => {
|
|
1518
|
+
n && ba(n, e);
|
|
1519
|
+
}), (x, B) => {
|
|
1520
|
+
var L;
|
|
1521
|
+
return v(), w("div", St, [
|
|
1522
|
+
c.value.length ? y("", !0) : (v(), 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: [(L = r(i)) == null ? void 0 : L.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,159 +1585,159 @@ 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
|
-
|
|
1606
|
-
}, n =
|
|
1597
|
+
setup(l) {
|
|
1598
|
+
const t = l, { editorCtrl: e, labelText: a, errInfo: s } = R(), u = () => {
|
|
1599
|
+
s != null && s.value.errClass && e && Y(e);
|
|
1600
|
+
}, n = _(t.valueFormat ?? "YYYY-MM-DD");
|
|
1607
1601
|
return (p, d) => {
|
|
1608
1602
|
var i;
|
|
1609
|
-
return
|
|
1610
|
-
class:
|
|
1611
|
-
placeholder: "请选择" +
|
|
1612
|
-
locale:
|
|
1603
|
+
return v(), b(r(Ra), {
|
|
1604
|
+
class: E(["w-full", [((i = r(s)) == 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:
|
|
1627
|
-
|
|
1628
|
-
}, n =
|
|
1629
|
-
|
|
1619
|
+
setup(l, { emit: t }) {
|
|
1620
|
+
const { editorCtrl: e, labelText: a, errInfo: s } = R(), u = () => {
|
|
1621
|
+
s != null && s.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
|
-
(
|
|
1632
|
-
i.value =
|
|
1625
|
+
(o) => {
|
|
1626
|
+
i.value = o;
|
|
1633
1627
|
},
|
|
1634
1628
|
{ immediate: !0 }
|
|
1635
1629
|
// 立即同步初始值
|
|
1636
|
-
),
|
|
1630
|
+
), T(
|
|
1637
1631
|
() => i.value,
|
|
1638
|
-
(
|
|
1632
|
+
(o) => {
|
|
1639
1633
|
if (i.value === "") {
|
|
1640
1634
|
d("update:value", void 0);
|
|
1641
1635
|
return;
|
|
1642
1636
|
}
|
|
1643
|
-
d("update:value",
|
|
1637
|
+
d("update:value", o);
|
|
1644
1638
|
}
|
|
1645
1639
|
);
|
|
1646
|
-
const
|
|
1640
|
+
const f = () => {
|
|
1647
1641
|
i.value === "" && (i.value = p ? void 0 : null);
|
|
1648
1642
|
};
|
|
1649
|
-
return (
|
|
1650
|
-
var
|
|
1651
|
-
return
|
|
1643
|
+
return (o, m) => {
|
|
1644
|
+
var c, g;
|
|
1645
|
+
return v(), b(r(ee), F({
|
|
1652
1646
|
class: [
|
|
1653
|
-
(
|
|
1654
|
-
((
|
|
1647
|
+
(c = r(s)) == null ? void 0 : c.errClass,
|
|
1648
|
+
((g = r(s)) == null ? void 0 : g.errClass) === "error" && !o.$slots.addonBefore && !o.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
|
|
1655
1649
|
],
|
|
1656
1650
|
value: i.value,
|
|
1657
|
-
"onUpdate:value":
|
|
1651
|
+
"onUpdate:value": m[0] || (m[0] = (C) => i.value = C),
|
|
1658
1652
|
autocomplete: "new-password",
|
|
1659
1653
|
"allow-clear": !0,
|
|
1660
|
-
placeholder: "请输入" +
|
|
1661
|
-
onBlur:
|
|
1662
|
-
onChange:
|
|
1663
|
-
},
|
|
1664
|
-
|
|
1654
|
+
placeholder: "请输入" + r(a),
|
|
1655
|
+
onBlur: u,
|
|
1656
|
+
onChange: f
|
|
1657
|
+
}, o.$attrs), Ue({ _: 2 }, [
|
|
1658
|
+
o.$slots.addonBefore ? {
|
|
1665
1659
|
name: "addonBefore",
|
|
1666
|
-
fn:
|
|
1667
|
-
|
|
1660
|
+
fn: h(() => [
|
|
1661
|
+
I(o.$slots, "addonBefore")
|
|
1668
1662
|
]),
|
|
1669
1663
|
key: "0"
|
|
1670
1664
|
} : void 0,
|
|
1671
|
-
|
|
1665
|
+
o.$slots.addonAfter ? {
|
|
1672
1666
|
name: "addonAfter",
|
|
1673
|
-
fn:
|
|
1674
|
-
|
|
1667
|
+
fn: h(() => [
|
|
1668
|
+
I(o.$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, s = _(void 0);
|
|
1683
|
+
return T(
|
|
1690
1684
|
() => e.value,
|
|
1691
|
-
(
|
|
1692
|
-
|
|
1685
|
+
(u) => {
|
|
1686
|
+
s.value = u ?? void 0;
|
|
1693
1687
|
},
|
|
1694
1688
|
{ immediate: !0 }
|
|
1695
|
-
),
|
|
1696
|
-
() =>
|
|
1697
|
-
(
|
|
1698
|
-
a("update:value",
|
|
1689
|
+
), T(
|
|
1690
|
+
() => s.value,
|
|
1691
|
+
(u) => {
|
|
1692
|
+
a("update:value", u);
|
|
1699
1693
|
}
|
|
1700
|
-
), (
|
|
1701
|
-
value:
|
|
1702
|
-
"onUpdate:value": n[0] || (n[0] = (p) =>
|
|
1703
|
-
},
|
|
1704
|
-
addonBefore:
|
|
1705
|
-
|
|
1694
|
+
), (u, n) => (v(), b(Et, F({
|
|
1695
|
+
value: s.value,
|
|
1696
|
+
"onUpdate:value": n[0] || (n[0] = (p) => s.value = p)
|
|
1697
|
+
}, u.$attrs), {
|
|
1698
|
+
addonBefore: h(() => [
|
|
1699
|
+
k(r(U), {
|
|
1706
1700
|
class: "!w-4 !h-4",
|
|
1707
|
-
icon:
|
|
1701
|
+
icon: s.value
|
|
1708
1702
|
}, null, 8, ["icon"])
|
|
1709
1703
|
]),
|
|
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(
|
|
1716
|
-
const { editorCtrl: t, labelText: e, errInfo: a } =
|
|
1717
|
-
a != null && a.value.errClass && t &&
|
|
1709
|
+
setup(l) {
|
|
1710
|
+
const { editorCtrl: t, labelText: e, errInfo: a } = R(), s = () => {
|
|
1711
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1718
1712
|
};
|
|
1719
|
-
return (
|
|
1713
|
+
return (u, n) => {
|
|
1720
1714
|
var p;
|
|
1721
|
-
return
|
|
1722
|
-
class: ((p =
|
|
1715
|
+
return v(), b(r(La), 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: "请输入" +
|
|
1726
|
-
onBlur:
|
|
1727
|
-
},
|
|
1719
|
+
placeholder: "请输入" + r(e),
|
|
1720
|
+
onBlur: s
|
|
1721
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1728
1722
|
};
|
|
1729
1723
|
}
|
|
1730
|
-
}),
|
|
1724
|
+
}), yl = /* @__PURE__ */ S({
|
|
1731
1725
|
__name: "inputNumber",
|
|
1732
|
-
setup(
|
|
1733
|
-
const { editorCtrl: t, labelText: e, errInfo: a } =
|
|
1734
|
-
a != null && a.value.errClass && t &&
|
|
1726
|
+
setup(l) {
|
|
1727
|
+
const { editorCtrl: t, labelText: e, errInfo: a } = R(), s = () => {
|
|
1728
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1735
1729
|
};
|
|
1736
|
-
return (
|
|
1730
|
+
return (u, n) => {
|
|
1737
1731
|
var p;
|
|
1738
|
-
return
|
|
1739
|
-
class: [[((p =
|
|
1740
|
-
onBlur:
|
|
1732
|
+
return v(), 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%]"],
|
|
1734
|
+
onBlur: s,
|
|
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: {},
|
|
@@ -1753,23 +1747,23 @@ const vl = /* @__PURE__ */ T({
|
|
|
1753
1747
|
valueHolder: {}
|
|
1754
1748
|
},
|
|
1755
1749
|
emits: ["update:value"],
|
|
1756
|
-
setup(
|
|
1757
|
-
const e =
|
|
1750
|
+
setup(l, { emit: t }) {
|
|
1751
|
+
const e = l, a = t, s = _(!(e.selectList && e.selectList.length > 0)), u = _([]);
|
|
1758
1752
|
let n = !1;
|
|
1759
1753
|
const p = () => {
|
|
1760
|
-
e.selectList && e.selectList.length > 0 ?
|
|
1754
|
+
e.selectList && e.selectList.length > 0 ? u.value = e.selectList.map((o) => ({
|
|
1761
1755
|
id: Date.now() + Math.random(),
|
|
1762
|
-
text:
|
|
1763
|
-
field:
|
|
1756
|
+
text: o.text,
|
|
1757
|
+
field: o.field,
|
|
1764
1758
|
// 如果value中有对应的field,使用value中的值,否则使用selectList中的默认值
|
|
1765
|
-
value: e.value[
|
|
1766
|
-
})) : e.value && Object.keys(e.value).length > 0 ?
|
|
1759
|
+
value: e.value[o.field] ?? o.value
|
|
1760
|
+
})) : e.value && Object.keys(e.value).length > 0 ? u.value = Object.entries(e.value).map(([o, m]) => ({
|
|
1767
1761
|
id: Date.now() + Math.random(),
|
|
1768
|
-
field:
|
|
1769
|
-
value:
|
|
1770
|
-
})) :
|
|
1762
|
+
field: o,
|
|
1763
|
+
value: m
|
|
1764
|
+
})) : u.value = [];
|
|
1771
1765
|
};
|
|
1772
|
-
|
|
1766
|
+
T(
|
|
1773
1767
|
() => e.value,
|
|
1774
1768
|
() => {
|
|
1775
1769
|
n || p(), n = !1;
|
|
@@ -1777,82 +1771,82 @@ const vl = /* @__PURE__ */ T({
|
|
|
1777
1771
|
{ immediate: !0 }
|
|
1778
1772
|
);
|
|
1779
1773
|
const d = () => {
|
|
1780
|
-
let
|
|
1781
|
-
e.selectList && e.selectList.length > 0 ? (
|
|
1782
|
-
|
|
1783
|
-
})) :
|
|
1784
|
-
(
|
|
1774
|
+
let o;
|
|
1775
|
+
e.selectList && e.selectList.length > 0 ? (o = { ...e.value }, u.value.forEach((m) => {
|
|
1776
|
+
m.field && (o[m.field] = m.value);
|
|
1777
|
+
})) : o = u.value.reduce(
|
|
1778
|
+
(m, c) => (c.field && (m[c.field] = c.value), m),
|
|
1785
1779
|
{}
|
|
1786
|
-
), n = !0, a("update:value",
|
|
1780
|
+
), n = !0, a("update:value", o);
|
|
1787
1781
|
}, i = () => {
|
|
1788
|
-
|
|
1782
|
+
u.value.push({
|
|
1789
1783
|
id: Date.now() + Math.random(),
|
|
1790
1784
|
field: "",
|
|
1791
1785
|
value: ""
|
|
1792
1786
|
});
|
|
1793
|
-
},
|
|
1787
|
+
}, f = () => {
|
|
1794
1788
|
d();
|
|
1795
1789
|
};
|
|
1796
|
-
return (
|
|
1797
|
-
(
|
|
1798
|
-
key:
|
|
1790
|
+
return (o, m) => (v(), w("div", Ft, [
|
|
1791
|
+
(v(!0), w(O, null, z(u.value, (c) => (v(), w("div", {
|
|
1792
|
+
key: c.id,
|
|
1799
1793
|
class: "flex items-center gap-2"
|
|
1800
1794
|
}, [
|
|
1801
|
-
|
|
1802
|
-
class:
|
|
1795
|
+
D("div", {
|
|
1796
|
+
class: E([o.fieldWidth ? `w-[${o.fieldWidth}%]` : "w-[33%]"])
|
|
1803
1797
|
}, [
|
|
1804
|
-
!
|
|
1798
|
+
!o.selectList || o.selectList.length === 0 ? (v(), b(r(ee), {
|
|
1805
1799
|
key: 0,
|
|
1806
|
-
value:
|
|
1807
|
-
"onUpdate:value": (
|
|
1808
|
-
title:
|
|
1800
|
+
value: c.field,
|
|
1801
|
+
"onUpdate:value": (g) => c.field = g,
|
|
1802
|
+
title: c.text || c.field,
|
|
1809
1803
|
class: "w-full",
|
|
1810
|
-
placeholder:
|
|
1811
|
-
onInput:
|
|
1812
|
-
disabled: !
|
|
1813
|
-
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (
|
|
1814
|
-
|
|
1815
|
-
value:
|
|
1816
|
-
"onUpdate:value": (
|
|
1817
|
-
title:
|
|
1804
|
+
placeholder: c.text || o.labelHolder || "配置名",
|
|
1805
|
+
onInput: f,
|
|
1806
|
+
disabled: !s.value
|
|
1807
|
+
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (v(), w("div", Nt, [
|
|
1808
|
+
k(r(ee), {
|
|
1809
|
+
value: c.text,
|
|
1810
|
+
"onUpdate:value": (g) => c.text = g,
|
|
1811
|
+
title: c.text,
|
|
1818
1812
|
disabled: !0,
|
|
1819
1813
|
class: "w-[100%]"
|
|
1820
1814
|
}, null, 8, ["value", "onUpdate:value", "title"]),
|
|
1821
|
-
|
|
1815
|
+
k(r(ee), {
|
|
1822
1816
|
type: "hidden",
|
|
1823
|
-
value:
|
|
1824
|
-
"onUpdate:value": (
|
|
1817
|
+
value: c.field,
|
|
1818
|
+
"onUpdate:value": (g) => c.field = g
|
|
1825
1819
|
}, null, 8, ["value", "onUpdate:value"])
|
|
1826
1820
|
]))
|
|
1827
1821
|
], 2),
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
class:
|
|
1822
|
+
m[0] || (m[0] = D("div", { class: "w-[3%]" }, "=", -1)),
|
|
1823
|
+
D("div", {
|
|
1824
|
+
class: E([o.fieldWidth ? `w-[${97 - o.fieldWidth}%]` : "w-[64%]"])
|
|
1831
1825
|
}, [
|
|
1832
|
-
|
|
1833
|
-
value:
|
|
1834
|
-
"onUpdate:value": (
|
|
1835
|
-
placeholder:
|
|
1836
|
-
onInput:
|
|
1837
|
-
title:
|
|
1826
|
+
k(r(ee), {
|
|
1827
|
+
value: c.value,
|
|
1828
|
+
"onUpdate:value": (g) => c.value = g,
|
|
1829
|
+
placeholder: o.valueHolder || "请输入" + c.text || "请输入配置值",
|
|
1830
|
+
onInput: f,
|
|
1831
|
+
title: c.value
|
|
1838
1832
|
}, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
|
|
1839
1833
|
], 2)
|
|
1840
1834
|
]))), 128)),
|
|
1841
|
-
|
|
1835
|
+
s.value ? (v(), b(r(We), {
|
|
1842
1836
|
key: 0,
|
|
1843
1837
|
onClick: i,
|
|
1844
1838
|
class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
|
|
1845
1839
|
size: "small"
|
|
1846
1840
|
}, {
|
|
1847
|
-
default:
|
|
1848
|
-
|
|
1841
|
+
default: h(() => m[1] || (m[1] = [
|
|
1842
|
+
N(" 新增配置行 ")
|
|
1849
1843
|
])),
|
|
1850
1844
|
_: 1,
|
|
1851
1845
|
__: [1]
|
|
1852
|
-
})) :
|
|
1846
|
+
})) : y("", !0)
|
|
1853
1847
|
]));
|
|
1854
1848
|
}
|
|
1855
|
-
}),
|
|
1849
|
+
}), Mt = /* @__PURE__ */ G(wa, [["__scopeId", "data-v-aa237552"]]), wl = /* @__PURE__ */ S({
|
|
1856
1850
|
__name: "radioStatus",
|
|
1857
1851
|
props: {
|
|
1858
1852
|
/**
|
|
@@ -1879,14 +1873,14 @@ const vl = /* @__PURE__ */ T({
|
|
|
1879
1873
|
required: !1
|
|
1880
1874
|
}
|
|
1881
1875
|
},
|
|
1882
|
-
setup(
|
|
1883
|
-
const t =
|
|
1876
|
+
setup(l) {
|
|
1877
|
+
const t = l, e = _(JSON.parse(JSON.stringify(Be.getOptions(t.dataKey))));
|
|
1884
1878
|
return t.all === !0 && e.value.unshift({
|
|
1885
1879
|
label: "全部",
|
|
1886
1880
|
value: t.allValue || [0, 1]
|
|
1887
|
-
}), (a,
|
|
1881
|
+
}), (a, s) => (v(), b(Mt, { data: e.value }, null, 8, ["data"]));
|
|
1888
1882
|
}
|
|
1889
|
-
}),
|
|
1883
|
+
}), Cl = /* @__PURE__ */ S({
|
|
1890
1884
|
__name: "index",
|
|
1891
1885
|
props: {
|
|
1892
1886
|
startDate: {},
|
|
@@ -1894,75 +1888,75 @@ const vl = /* @__PURE__ */ T({
|
|
|
1894
1888
|
valueFormat: { default: "YYYY-MM-DD" }
|
|
1895
1889
|
},
|
|
1896
1890
|
emits: ["update:startDate", "update:endDate"],
|
|
1897
|
-
setup(
|
|
1898
|
-
const e =
|
|
1899
|
-
const i = e.startDate,
|
|
1900
|
-
if (!(!i || !
|
|
1891
|
+
setup(l, { emit: t }) {
|
|
1892
|
+
const e = l, a = t, s = R(), { errInfo: u } = s, n = Q(() => e.valueFormat), p = Q(() => {
|
|
1893
|
+
const i = e.startDate, f = e.endDate;
|
|
1894
|
+
if (!(!i || !f))
|
|
1901
1895
|
try {
|
|
1902
|
-
const
|
|
1903
|
-
return !
|
|
1896
|
+
const o = ve(i), m = ve(f);
|
|
1897
|
+
return !o.isValid() || !m.isValid() ? void 0 : [o, m];
|
|
1904
1898
|
} catch {
|
|
1905
1899
|
return;
|
|
1906
1900
|
}
|
|
1907
|
-
}), d = (i,
|
|
1908
|
-
if (!i || !
|
|
1901
|
+
}), d = (i, f) => {
|
|
1902
|
+
if (!i || !f || f.length !== 2) {
|
|
1909
1903
|
a("update:startDate", null), a("update:endDate", null);
|
|
1910
1904
|
return;
|
|
1911
1905
|
}
|
|
1912
|
-
a("update:startDate",
|
|
1906
|
+
a("update:startDate", f[0] || null), a("update:endDate", f[1] || null);
|
|
1913
1907
|
};
|
|
1914
|
-
return (i,
|
|
1915
|
-
var
|
|
1916
|
-
return
|
|
1917
|
-
class:
|
|
1918
|
-
locale:
|
|
1908
|
+
return (i, f) => {
|
|
1909
|
+
var o;
|
|
1910
|
+
return v(), b(r(Ua), {
|
|
1911
|
+
class: E([((o = r(u)) == null ? void 0 : o.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
|
|
1912
|
+
locale: r(de),
|
|
1919
1913
|
"value-format": n.value,
|
|
1920
1914
|
value: p.value,
|
|
1921
1915
|
onChange: d
|
|
1922
1916
|
}, null, 8, ["class", "locale", "value-format", "value"]);
|
|
1923
1917
|
};
|
|
1924
1918
|
}
|
|
1925
|
-
}),
|
|
1919
|
+
}), Sl = /* @__PURE__ */ G(Ca, [["__scopeId", "data-v-b33df95f"]]), Tl = /* @__PURE__ */ S({
|
|
1926
1920
|
__name: "index",
|
|
1927
|
-
setup(
|
|
1928
|
-
const { editorCtrl: t, labelText: e, errInfo: a } =
|
|
1929
|
-
a != null && a.value.errClass && t &&
|
|
1921
|
+
setup(l) {
|
|
1922
|
+
const { editorCtrl: t, labelText: e, errInfo: a } = R(), s = () => {
|
|
1923
|
+
a != null && a.value.errClass && t && Y(t);
|
|
1930
1924
|
};
|
|
1931
|
-
return (
|
|
1925
|
+
return (u, n) => {
|
|
1932
1926
|
var p;
|
|
1933
|
-
return
|
|
1934
|
-
class: ((p =
|
|
1927
|
+
return v(), b(r(Va), F({
|
|
1928
|
+
class: ((p = r(a)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1935
1929
|
"allow-clear": !0,
|
|
1936
|
-
placeholder: "请输入" +
|
|
1937
|
-
onBlur:
|
|
1938
|
-
onKeyup: n[0] || (n[0] = Se(
|
|
1930
|
+
placeholder: "请输入" + r(e),
|
|
1931
|
+
onBlur: s,
|
|
1932
|
+
onKeyup: n[0] || (n[0] = Se(ae(() => {
|
|
1939
1933
|
}, ["stop"]), ["enter", "native"])),
|
|
1940
|
-
onKeydown: n[1] || (n[1] = Se(
|
|
1934
|
+
onKeydown: n[1] || (n[1] = Se(ae(() => {
|
|
1941
1935
|
}, ["stop"]), ["enter", "native"]))
|
|
1942
|
-
},
|
|
1936
|
+
}, u.$attrs), null, 16, ["class", "placeholder"]);
|
|
1943
1937
|
};
|
|
1944
1938
|
}
|
|
1945
|
-
}),
|
|
1939
|
+
}), $l = /* @__PURE__ */ S({
|
|
1946
1940
|
__name: "index",
|
|
1947
1941
|
props: {
|
|
1948
1942
|
valueFormat: {}
|
|
1949
1943
|
},
|
|
1950
|
-
setup(
|
|
1951
|
-
const t =
|
|
1952
|
-
|
|
1953
|
-
}, n =
|
|
1944
|
+
setup(l) {
|
|
1945
|
+
const t = l, { editorCtrl: e, labelText: a, errInfo: s } = R(), u = () => {
|
|
1946
|
+
s != null && s.value.errClass && e && Y(e);
|
|
1947
|
+
}, n = _(t.valueFormat ?? "HH:mm");
|
|
1954
1948
|
return (p, d) => {
|
|
1955
1949
|
var i;
|
|
1956
|
-
return
|
|
1957
|
-
class:
|
|
1958
|
-
placeholder: "请选择" +
|
|
1959
|
-
locale:
|
|
1950
|
+
return v(), b(r(Ya), {
|
|
1951
|
+
class: E(["w-full", [((i = r(s)) == null ? void 0 : i.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
1952
|
+
placeholder: "请选择" + r(a),
|
|
1953
|
+
locale: r(de),
|
|
1960
1954
|
valueFormat: n.value,
|
|
1961
|
-
onBlur:
|
|
1955
|
+
onBlur: u
|
|
1962
1956
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
1963
1957
|
};
|
|
1964
1958
|
}
|
|
1965
|
-
}),
|
|
1959
|
+
}), Ot = /* @__PURE__ */ S({
|
|
1966
1960
|
__name: "index",
|
|
1967
1961
|
props: {
|
|
1968
1962
|
autoload: { type: Boolean },
|
|
@@ -1971,55 +1965,55 @@ const vl = /* @__PURE__ */ T({
|
|
|
1971
1965
|
value: {}
|
|
1972
1966
|
},
|
|
1973
1967
|
emits: ["change", "update:value"],
|
|
1974
|
-
setup(
|
|
1975
|
-
const e =
|
|
1976
|
-
e.value && e.value.every((
|
|
1977
|
-
i.value.push(
|
|
1978
|
-
}),
|
|
1968
|
+
setup(l, { emit: t }) {
|
|
1969
|
+
const e = l, a = _({ ...e.url }), { editorCtrl: s, labelText: u, errInfo: n } = R(), p = t, d = _([]), i = _([]);
|
|
1970
|
+
e.value && e.value.every((o) => {
|
|
1971
|
+
i.value.push(o.toString());
|
|
1972
|
+
}), T(
|
|
1979
1973
|
() => e.value,
|
|
1980
|
-
(
|
|
1981
|
-
|
|
1974
|
+
(o) => {
|
|
1975
|
+
o && (i.value = o);
|
|
1982
1976
|
}
|
|
1983
1977
|
);
|
|
1984
|
-
const
|
|
1985
|
-
p("update:value",
|
|
1978
|
+
const f = (o) => {
|
|
1979
|
+
p("update:value", o), p("change", o), i.value = o, n != null && n.value.errClass && s && Y(s);
|
|
1986
1980
|
};
|
|
1987
|
-
return
|
|
1981
|
+
return K(async () => {
|
|
1988
1982
|
if (a.value) {
|
|
1989
|
-
const
|
|
1990
|
-
if (a.value.api || (a.value.api =
|
|
1991
|
-
const
|
|
1983
|
+
const o = s == null ? void 0 : s.page;
|
|
1984
|
+
if (a.value.api || (a.value.api = o == null ? void 0 : o.api), a.value.authorize === void 0 && (a.value.authorize = o == null ? void 0 : o.authorize), e.autoload) {
|
|
1985
|
+
const m = await Re(s, {
|
|
1992
1986
|
urlKey: "list",
|
|
1993
1987
|
url: { ...a.value, url: a.value.url },
|
|
1994
1988
|
loadingText: !1,
|
|
1995
1989
|
params: e.params
|
|
1996
1990
|
});
|
|
1997
|
-
d.value = (
|
|
1991
|
+
d.value = (m == null ? void 0 : m.data) ?? [];
|
|
1998
1992
|
}
|
|
1999
1993
|
}
|
|
2000
|
-
}), (
|
|
2001
|
-
var
|
|
2002
|
-
return
|
|
2003
|
-
class: ((
|
|
2004
|
-
placeholder: "请输入" +
|
|
1994
|
+
}), (o, m) => {
|
|
1995
|
+
var c;
|
|
1996
|
+
return v(), b(r(Ka), F({
|
|
1997
|
+
class: ((c = r(n)) == null ? void 0 : c.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
1998
|
+
placeholder: "请输入" + r(u),
|
|
2005
1999
|
targetKeys: i.value,
|
|
2006
|
-
onChange:
|
|
2007
|
-
},
|
|
2008
|
-
children:
|
|
2009
|
-
|
|
2010
|
-
direction:
|
|
2011
|
-
disabled:
|
|
2012
|
-
filteredItems:
|
|
2013
|
-
onItemSelectAll:
|
|
2014
|
-
onItemSelect:
|
|
2015
|
-
selectedKeys:
|
|
2000
|
+
onChange: f
|
|
2001
|
+
}, o.$attrs), {
|
|
2002
|
+
children: h(({ direction: g, disabled: C, filteredItems: $, onItemSelectAll: M, onItemSelect: x, selectedKeys: B }) => [
|
|
2003
|
+
I(o.$slots, "children", {
|
|
2004
|
+
direction: g,
|
|
2005
|
+
disabled: C,
|
|
2006
|
+
filteredItems: $,
|
|
2007
|
+
onItemSelectAll: M,
|
|
2008
|
+
onItemSelect: x,
|
|
2009
|
+
selectedKeys: B
|
|
2016
2010
|
})
|
|
2017
2011
|
]),
|
|
2018
2012
|
_: 3
|
|
2019
2013
|
}, 16, ["class", "placeholder", "targetKeys"]);
|
|
2020
2014
|
};
|
|
2021
2015
|
}
|
|
2022
|
-
}),
|
|
2016
|
+
}), Dl = /* @__PURE__ */ S({
|
|
2023
2017
|
__name: "transferTable",
|
|
2024
2018
|
props: {
|
|
2025
2019
|
/**
|
|
@@ -2045,36 +2039,36 @@ const vl = /* @__PURE__ */ T({
|
|
|
2045
2039
|
}
|
|
2046
2040
|
},
|
|
2047
2041
|
emits: ["update:value"],
|
|
2048
|
-
setup(
|
|
2049
|
-
const e =
|
|
2050
|
-
|
|
2051
|
-
() =>
|
|
2042
|
+
setup(l, { emit: t }) {
|
|
2043
|
+
const e = l, a = t, s = _(e.autoload), u = _(e.value), n = _(e.gridCtrl.primaryKey);
|
|
2044
|
+
T(
|
|
2045
|
+
() => u.value,
|
|
2052
2046
|
(i) => {
|
|
2053
2047
|
a("update:value", i);
|
|
2054
2048
|
}
|
|
2055
|
-
),
|
|
2049
|
+
), T(
|
|
2056
2050
|
() => e.value,
|
|
2057
2051
|
(i) => {
|
|
2058
|
-
i && (
|
|
2052
|
+
i && (u.value = i);
|
|
2059
2053
|
}
|
|
2060
|
-
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable =
|
|
2061
|
-
const p = ({ disabled: i, selectedKeys:
|
|
2062
|
-
getCheckboxProps: (
|
|
2054
|
+
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = _(!0), e.gridCtrl.buttons = _([]), e.gridCtrl.tools = [];
|
|
2055
|
+
const p = ({ disabled: i, selectedKeys: f, onItemSelectAll: o, onItemSelect: m }) => ({
|
|
2056
|
+
getCheckboxProps: (c) => ({
|
|
2063
2057
|
// 控制是否禁止
|
|
2064
|
-
disabled: i ||
|
|
2058
|
+
disabled: i || c.disabled
|
|
2065
2059
|
}),
|
|
2066
|
-
onSelectAll(
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2060
|
+
onSelectAll(c, g) {
|
|
2061
|
+
const C = g.filter(($) => !$.disabled).map(({ [n.value]: $ }) => $);
|
|
2062
|
+
o(C, c);
|
|
2069
2063
|
},
|
|
2070
|
-
onSelect({ [n.value]:
|
|
2071
|
-
|
|
2064
|
+
onSelect({ [n.value]: c }, g) {
|
|
2065
|
+
m(c, g);
|
|
2072
2066
|
},
|
|
2073
|
-
selectedRowKeys:
|
|
2074
|
-
}), d =
|
|
2075
|
-
return
|
|
2076
|
-
if (
|
|
2077
|
-
const i = await
|
|
2067
|
+
selectedRowKeys: f
|
|
2068
|
+
}), d = _([]);
|
|
2069
|
+
return K(async () => {
|
|
2070
|
+
if (s.value) {
|
|
2071
|
+
const i = await Re(e.gridCtrl, {
|
|
2078
2072
|
urlKey: "list",
|
|
2079
2073
|
url: { ...e.gridCtrl.gridUrl, url: e.gridCtrl.gridUrl.url },
|
|
2080
2074
|
params: e.gridCtrl.gridQuery,
|
|
@@ -2082,42 +2076,42 @@ const vl = /* @__PURE__ */ T({
|
|
|
2082
2076
|
});
|
|
2083
2077
|
d.value = (i == null ? void 0 : i.data) ?? [];
|
|
2084
2078
|
}
|
|
2085
|
-
}), (i,
|
|
2079
|
+
}), (i, f) => (v(), b(Ot, F({
|
|
2086
2080
|
"data-source": d.value,
|
|
2087
|
-
"row-key": (
|
|
2088
|
-
value:
|
|
2089
|
-
"onUpdate:value":
|
|
2081
|
+
"row-key": (o) => o[n.value],
|
|
2082
|
+
value: u.value,
|
|
2083
|
+
"onUpdate:value": f[0] || (f[0] = (o) => u.value = o),
|
|
2090
2084
|
"list-style": {
|
|
2091
2085
|
width: "300px",
|
|
2092
2086
|
height: "500px"
|
|
2093
2087
|
},
|
|
2094
2088
|
"show-select-all": !1,
|
|
2095
2089
|
"show-search": !0,
|
|
2096
|
-
"filter-option": (
|
|
2097
|
-
for (const
|
|
2098
|
-
if (
|
|
2090
|
+
"filter-option": (o, m) => {
|
|
2091
|
+
for (const c of e.gridCtrl.columns.value)
|
|
2092
|
+
if (m[c.dataIndex].toString().indexOf(o) !== -1)
|
|
2099
2093
|
return !0;
|
|
2100
2094
|
return !1;
|
|
2101
2095
|
}
|
|
2102
2096
|
}, i.$attrs), {
|
|
2103
|
-
children:
|
|
2104
|
-
|
|
2105
|
-
columns:
|
|
2097
|
+
children: h(({ filteredItems: o, onItemSelectAll: m, onItemSelect: c, selectedKeys: g }) => [
|
|
2098
|
+
k(r(je), {
|
|
2099
|
+
columns: l.gridCtrl.columns.value,
|
|
2106
2100
|
"row-key": n.value,
|
|
2107
2101
|
"row-selection": p({
|
|
2108
2102
|
disabled: !1,
|
|
2109
|
-
selectedKeys:
|
|
2110
|
-
onItemSelectAll:
|
|
2111
|
-
onItemSelect:
|
|
2103
|
+
selectedKeys: g,
|
|
2104
|
+
onItemSelectAll: m,
|
|
2105
|
+
onItemSelect: c
|
|
2112
2106
|
}),
|
|
2113
2107
|
bordered: !1,
|
|
2114
2108
|
size: "small",
|
|
2115
|
-
"data-source":
|
|
2109
|
+
"data-source": o,
|
|
2116
2110
|
scroll: { x: 300 },
|
|
2117
|
-
"custom-row": (
|
|
2111
|
+
"custom-row": (C) => ({
|
|
2118
2112
|
onClick: () => {
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2113
|
+
const $ = C[n.value];
|
|
2114
|
+
c($, !g.includes($));
|
|
2121
2115
|
}
|
|
2122
2116
|
})
|
|
2123
2117
|
}, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
|
|
@@ -2125,7 +2119,7 @@ const vl = /* @__PURE__ */ T({
|
|
|
2125
2119
|
_: 1
|
|
2126
2120
|
}, 16, ["data-source", "row-key", "value", "filter-option"]));
|
|
2127
2121
|
}
|
|
2128
|
-
}),
|
|
2122
|
+
}), Bt = /* @__PURE__ */ S({
|
|
2129
2123
|
__name: "index",
|
|
2130
2124
|
props: {
|
|
2131
2125
|
multiple: {
|
|
@@ -2151,83 +2145,83 @@ const vl = /* @__PURE__ */ T({
|
|
|
2151
2145
|
}
|
|
2152
2146
|
},
|
|
2153
2147
|
emits: ["change", "update:value"],
|
|
2154
|
-
setup(
|
|
2155
|
-
const e =
|
|
2156
|
-
|
|
2157
|
-
const i =
|
|
2158
|
-
|
|
2148
|
+
setup(l, { emit: t }) {
|
|
2149
|
+
const e = l, a = e.value === void 0 ? !0 : e.undefValue, s = e.treeCtrl, u = R(), { errInfo: n, labelText: p } = u, d = t;
|
|
2150
|
+
u.inputEmit = d;
|
|
2151
|
+
const i = _([]), f = _();
|
|
2152
|
+
T(
|
|
2159
2153
|
() => e.value,
|
|
2160
|
-
(
|
|
2161
|
-
|
|
2154
|
+
(c) => {
|
|
2155
|
+
f.value = c;
|
|
2162
2156
|
},
|
|
2163
2157
|
{ immediate: !0 }
|
|
2164
|
-
),
|
|
2165
|
-
() =>
|
|
2166
|
-
(
|
|
2167
|
-
d("update:value",
|
|
2158
|
+
), T(
|
|
2159
|
+
() => f.value,
|
|
2160
|
+
(c) => {
|
|
2161
|
+
d("update:value", c);
|
|
2168
2162
|
}
|
|
2169
|
-
),
|
|
2170
|
-
() =>
|
|
2171
|
-
(
|
|
2172
|
-
|
|
2163
|
+
), T(
|
|
2164
|
+
() => s.data.value,
|
|
2165
|
+
(c) => {
|
|
2166
|
+
c && (i.value = s.fieldMap ? ne(s.fieldMap, c) : c);
|
|
2173
2167
|
},
|
|
2174
2168
|
{ immediate: !0 }
|
|
2175
2169
|
);
|
|
2176
|
-
const
|
|
2177
|
-
e.multiple ?
|
|
2170
|
+
const o = (c) => {
|
|
2171
|
+
e.multiple ? f.value = c ?? [] : c == null ? f.value = a ? void 0 : null : f.value = c, d("change", f.value);
|
|
2178
2172
|
};
|
|
2179
|
-
|
|
2173
|
+
_e(() => {
|
|
2180
2174
|
e.treeCtrl && e.treeCtrl.autoload && (e.treeCtrl.reload.value = !0);
|
|
2181
|
-
}),
|
|
2182
|
-
|
|
2175
|
+
}), K(() => {
|
|
2176
|
+
s.fieldMap || (s.fieldMap = {
|
|
2183
2177
|
label: "Name",
|
|
2184
2178
|
key: "Id",
|
|
2185
2179
|
value: "Id"
|
|
2186
|
-
}),
|
|
2180
|
+
}), s.data.value ? i.value = s.fieldMap ? ne(s.fieldMap, s.data.value) : s.data.value : e.treeCtrl.autoload && Ae(e.treeCtrl);
|
|
2187
2181
|
});
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2182
|
+
const m = () => {
|
|
2183
|
+
f.value = a ? void 0 : null;
|
|
2190
2184
|
};
|
|
2191
|
-
return (
|
|
2192
|
-
var
|
|
2193
|
-
return
|
|
2194
|
-
class: [[(
|
|
2185
|
+
return (c, g) => {
|
|
2186
|
+
var C;
|
|
2187
|
+
return v(), b(r(Wa), F({
|
|
2188
|
+
class: [[(C = r(n)) == null ? void 0 : C.errClass], "w-full"],
|
|
2195
2189
|
"tree-line": "",
|
|
2196
|
-
multiple:
|
|
2190
|
+
multiple: l.multiple,
|
|
2197
2191
|
"tree-default-expanded-keys": ["-"],
|
|
2198
|
-
value:
|
|
2199
|
-
"onUpdate:value":
|
|
2192
|
+
value: f.value,
|
|
2193
|
+
"onUpdate:value": g[0] || (g[0] = ($) => f.value = $),
|
|
2200
2194
|
"tree-data": i.value,
|
|
2201
|
-
placeholder: "请选择" +
|
|
2202
|
-
onChange:
|
|
2203
|
-
onClear:
|
|
2204
|
-
},
|
|
2195
|
+
placeholder: "请选择" + r(p),
|
|
2196
|
+
onChange: o,
|
|
2197
|
+
onClear: m
|
|
2198
|
+
}, c.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
|
|
2205
2199
|
};
|
|
2206
2200
|
}
|
|
2207
|
-
}),
|
|
2201
|
+
}), Il = /* @__PURE__ */ G(Bt, [["__scopeId", "data-v-71d50074"]]), At = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, Rt = { class: "flex w-full h-full min-h-full" }, Lt = {
|
|
2208
2202
|
key: 0,
|
|
2209
2203
|
class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
|
|
2210
|
-
},
|
|
2204
|
+
}, zt = { class: "flex-1 h-full overflow-y-auto" }, El = /* @__PURE__ */ S({
|
|
2211
2205
|
__name: "index",
|
|
2212
2206
|
props: {
|
|
2213
2207
|
left: { type: Boolean }
|
|
2214
2208
|
},
|
|
2215
|
-
setup(
|
|
2209
|
+
setup(l) {
|
|
2216
2210
|
const { useToken: t } = Ve, { token: e } = t();
|
|
2217
|
-
return (a,
|
|
2218
|
-
|
|
2211
|
+
return (a, s) => (v(), w("div", At, [
|
|
2212
|
+
k(r(ja), {
|
|
2219
2213
|
class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
|
|
2220
2214
|
style: be({
|
|
2221
|
-
backgroundColor:
|
|
2215
|
+
backgroundColor: r(e).colorBgContainer
|
|
2222
2216
|
})
|
|
2223
2217
|
}, {
|
|
2224
|
-
default:
|
|
2225
|
-
|
|
2226
|
-
a.left ? (
|
|
2227
|
-
|
|
2228
|
-
])) :
|
|
2229
|
-
|
|
2230
|
-
|
|
2218
|
+
default: h(() => [
|
|
2219
|
+
D("div", Rt, [
|
|
2220
|
+
a.left ? (v(), w("div", Lt, [
|
|
2221
|
+
I(a.$slots, "left")
|
|
2222
|
+
])) : y("", !0),
|
|
2223
|
+
D("div", zt, [
|
|
2224
|
+
I(a.$slots, "default")
|
|
2231
2225
|
])
|
|
2232
2226
|
])
|
|
2233
2227
|
]),
|
|
@@ -2237,157 +2231,157 @@ const vl = /* @__PURE__ */ T({
|
|
|
2237
2231
|
}
|
|
2238
2232
|
});
|
|
2239
2233
|
export {
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2234
|
+
Dr as Alert,
|
|
2235
|
+
Yr as AppIcon,
|
|
2236
|
+
ce as AppRouter,
|
|
2237
|
+
_r as AsyncUploader,
|
|
2238
|
+
ml as AutoComplete,
|
|
2239
|
+
Kr as Breadcrumb,
|
|
2246
2240
|
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
|
-
|
|
2241
|
+
Qe as Cache,
|
|
2242
|
+
ot as CacheKeys,
|
|
2243
|
+
wr as CanPreviewFileExt,
|
|
2244
|
+
hl as Cascader,
|
|
2245
|
+
gl as Checkbox,
|
|
2246
|
+
El as Content,
|
|
2247
|
+
bl as DatePicker,
|
|
2248
|
+
Wr as Datetime,
|
|
2249
|
+
Zr as Dialog,
|
|
2250
|
+
ul as Drawer,
|
|
2251
|
+
Nl as EventPrefix,
|
|
2252
|
+
cl as Form,
|
|
2253
|
+
dl as FormItem,
|
|
2254
|
+
nl as Fullscreen,
|
|
2255
|
+
jr as Header,
|
|
2256
|
+
qr as HeaderExits,
|
|
2257
|
+
it as Helper,
|
|
2258
|
+
Ml as ICONS_LIB,
|
|
2259
|
+
Hr as Icon,
|
|
2260
|
+
bt as Icontool,
|
|
2261
|
+
Et as Input,
|
|
2262
|
+
_l as InputIcon,
|
|
2263
|
+
yl as InputNumber,
|
|
2264
|
+
xl as InputPassword,
|
|
2265
|
+
il as LayoutIcon,
|
|
2266
|
+
Ir as Loading,
|
|
2267
|
+
Qr as Menu,
|
|
2268
|
+
Gr as MenuTabs,
|
|
2269
|
+
Ol as MicroOpenApis,
|
|
2276
2270
|
Be as OPTIONS,
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2271
|
+
ma as OptionCommProps,
|
|
2272
|
+
Jr as ProjectIcon,
|
|
2273
|
+
kl as PropEditor,
|
|
2274
|
+
q as ProviderKeys,
|
|
2275
|
+
Mt as Radio,
|
|
2276
|
+
wl as RadioStatus,
|
|
2277
|
+
Cl as RangePicker,
|
|
2278
|
+
pl as Search,
|
|
2285
2279
|
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
|
-
|
|
2280
|
+
Sl as Select,
|
|
2281
|
+
da as Switch,
|
|
2282
|
+
fl as Table,
|
|
2283
|
+
ht as TableOperate,
|
|
2284
|
+
Tl as Textarea,
|
|
2285
|
+
$l as TimePicker,
|
|
2286
|
+
U as ToolIcon,
|
|
2287
|
+
kt as Toolbar,
|
|
2288
|
+
Ur as Tooltip,
|
|
2289
|
+
Ot as Transfer,
|
|
2290
|
+
Dl as TransferTable,
|
|
2291
|
+
vl as Tree,
|
|
2292
|
+
Il as TreeSelect,
|
|
2293
|
+
Cr as UploadList,
|
|
2294
|
+
xr as UploadStatus,
|
|
2295
|
+
Er as appendExcelData,
|
|
2296
|
+
Pr as checkExcelDuplicates,
|
|
2297
|
+
Bl as checkIconsExpired,
|
|
2298
|
+
_a as circleLoading,
|
|
2299
|
+
ra as createFromIconfont,
|
|
2300
|
+
Fr as createMarkedExcelView,
|
|
2301
|
+
Al as crumbs,
|
|
2302
|
+
ll as csvToExcelBlob,
|
|
2303
|
+
qe as csvToExcelView,
|
|
2304
|
+
Nr as csvToNormalized,
|
|
2311
2305
|
Ee as defaultTools,
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2306
|
+
Rl as doDelete,
|
|
2307
|
+
Ll as doExecute,
|
|
2308
|
+
Re as doQuery,
|
|
2309
|
+
zl as doSave,
|
|
2310
|
+
Sr as donwloadFromMinio,
|
|
2311
|
+
Ha as downloadBlob,
|
|
2312
|
+
Ul as eventBus,
|
|
2313
|
+
Mr as excelToExcelView,
|
|
2314
|
+
Or as excelToNormalized,
|
|
2315
|
+
ol as exportResults,
|
|
2316
|
+
sl as exportSelectedRows,
|
|
2323
2317
|
Oe as filterColumns,
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2318
|
+
Y as formValidate,
|
|
2319
|
+
Vl as getFormDetail,
|
|
2320
|
+
Yl as getIconTransform,
|
|
2321
|
+
Kl as getRecordDetail,
|
|
2322
|
+
Wl as getRuleTexts,
|
|
2323
|
+
ya as getSelectedLabels,
|
|
2324
|
+
jl as getSelectedValues,
|
|
2325
|
+
W as getToolByKey,
|
|
2332
2326
|
ke as getToolGroup,
|
|
2333
|
-
|
|
2334
|
-
|
|
2327
|
+
j as getToolStatus,
|
|
2328
|
+
J as getToolVisible,
|
|
2335
2329
|
we as gridQueryFind,
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2330
|
+
ca as gridQueryList,
|
|
2331
|
+
ql as gridRowUpdate,
|
|
2332
|
+
pa as gridStatusUpdate,
|
|
2333
|
+
tl as initCacheCheck,
|
|
2334
|
+
al as initDirective,
|
|
2335
|
+
Hl as initMenu,
|
|
2336
|
+
Ql as initPageFactory,
|
|
2337
|
+
Gl as initValidate,
|
|
2338
|
+
Z as isEmpty,
|
|
2339
|
+
ga as loadOption,
|
|
2340
|
+
Jl as mergeColumns,
|
|
2341
|
+
Br as normalizedToExcelView,
|
|
2342
|
+
rt as onColumnVisibleChanged,
|
|
2343
|
+
oa as onFormClose,
|
|
2350
2344
|
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
|
-
|
|
2345
|
+
sa as onFormSaveAs,
|
|
2346
|
+
He as onFullscreenClick,
|
|
2347
|
+
ia as onGridRowDelete,
|
|
2348
|
+
na as onGridRowEdit,
|
|
2349
|
+
Xl as onGridRowExpand,
|
|
2350
|
+
xa as onOptionChanged,
|
|
2351
|
+
Ja as onReloadClick,
|
|
2352
|
+
V as onToolClicked,
|
|
2353
|
+
ua as openNewForm,
|
|
2354
|
+
Zl as outFormDataFields,
|
|
2355
|
+
er as parseIcons,
|
|
2356
|
+
yr as path,
|
|
2357
|
+
ar as pendingNavigation,
|
|
2358
|
+
tr as pinia,
|
|
2359
|
+
Tr as previewFromMinio,
|
|
2360
|
+
rl as processCsvFile,
|
|
2361
|
+
Ar as processExcelFile,
|
|
2362
|
+
Ae as queryTree,
|
|
2363
|
+
lr as resetRules,
|
|
2364
|
+
rr as routes,
|
|
2365
|
+
sr as saveForm,
|
|
2366
|
+
or as setFormData,
|
|
2367
|
+
nr as showBreadcrumb,
|
|
2368
|
+
Rr as toExcel,
|
|
2369
|
+
ba as unloadOption,
|
|
2370
|
+
ir as uploadTempBtn,
|
|
2371
|
+
ur as uploadTempOpener,
|
|
2372
|
+
cr as useAppInfo,
|
|
2373
|
+
dr as useEditorFactory,
|
|
2380
2374
|
Ne as useFormItemFactory,
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2375
|
+
pr as useGridFactory,
|
|
2376
|
+
fr as useHostInfo,
|
|
2377
|
+
R as useInputFactory,
|
|
2378
|
+
ha as useOptionFactory,
|
|
2379
|
+
vr as usePageFactory,
|
|
2380
|
+
mr as usePageInfo,
|
|
2387
2381
|
he as useSettingInfo,
|
|
2388
|
-
|
|
2389
|
-
|
|
2382
|
+
st as useToolFactory,
|
|
2383
|
+
hr as useTreeFactory,
|
|
2390
2384
|
Pe as useUserInfo,
|
|
2391
|
-
|
|
2392
|
-
|
|
2385
|
+
gr as validateData,
|
|
2386
|
+
Lr as validateExcel
|
|
2393
2387
|
};
|