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