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