@skyfox2000/webui 1.6.13 → 1.6.15
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-p7VibDY4.js → baseLayout-Cia1cG5l.js} +3 -3
- package/lib/assets/modules/{file-upload-D7C_mOmO.js → file-upload-D1gRZv8j.js} +1 -1
- package/lib/assets/modules/{index-BQN_a3GE.js → index-MgDOEHr_.js} +2 -2
- package/lib/assets/modules/{index-CEBo0bZK.js → index-Ye0JfNsM.js} +1 -1
- package/lib/assets/modules/{index-CWI8upr0.js → index-xnHQyu3E.js} +2 -2
- package/lib/assets/modules/{menuTabs-RYgm30Xy.js → menuTabs-C3imgUBh.js} +36 -36
- package/lib/assets/modules/{toolIcon-CUIeCTuV.js → toolIcon-DFf-Ttkx.js} +1 -1
- package/lib/assets/modules/{upload-template-Bl7C0exv.js → upload-template-BDrBVe4E.js} +1059 -1060
- package/lib/assets/modules/{uploadList-DIvGI7qL.js → uploadList-BreC8S8m.js} +4 -4
- 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 +52 -52
- package/lib/es/MenuLayout/index.js +2 -2
- package/lib/es/TemplateFile/index.js +4 -4
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/locales/default.en-US.d.ts +19 -19
- package/lib/locales/default.zh-CN.d.ts +2 -7
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1300 -1297
- package/package.json +1 -1
- package/src/components/content/table/index.vue +3 -0
- package/src/components/form/input/index.vue +3 -3
- package/src/components/form/input/inputNumber.vue +2 -3
- package/src/components/form/input/inputPassword.vue +2 -3
- package/src/components/form/propEditor/index.vue +4 -6
- package/src/components/form/radio/index.vue +1 -1
- package/src/components/form/switch/index.vue +20 -8
- package/src/components/form/textarea/index.vue +2 -4
- package/src/components/form/timePicker/index.vue +2 -3
- package/src/components/form/upload/imageList.vue +7 -9
- package/src/locales/default.en-US.ts +22 -24
- package/src/locales/default.zh-CN.ts +4 -14
package/lib/webui.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { I as
|
|
3
|
-
import { f as
|
|
4
|
-
import { A as
|
|
5
|
-
import { EnvConfig as Ee, isMicroApp as
|
|
6
|
-
import { FrontCache as
|
|
1
|
+
import { u as Be, i as fe, a as Ae, $ as g, L as St, c as Tt, P as oe, o as qe, b as $t, d as Dt, e as Qe, g as Je, r as pe, f as Xe, h as Ze, j as et, k as Ft, l as he, m as tt, _ as at, n as lt, O as ze, p as Pt, q as rt, s as Et, t as It, v as te, w as Lt, x as Ut, y as Mt, z as Nt, A as Rt, B as Bt, C as se, D as At, E as zt, F as Ot, G as ot, M as Kt } from "./assets/modules/upload-template-BDrBVe4E.js";
|
|
2
|
+
import { H as Kr, I as jr, J as Vr, K as Yr, N as Gr, Q as Wr, R as Hr, S as qr, T as Qr, U as Jr, V as Xr, W as Zr, X as eo, Y as to, Z as ao, a0 as lo, a1 as ro, a2 as oo, a3 as so, a4 as no, a5 as io, a6 as co, a7 as uo, a8 as po, a9 as fo, aa as vo, ab as mo, ac as go, ad as ho, ae as bo, af as xo, ag as yo, ah as wo, ai as ko, aj as _o, ak as Co, al as So, am as To, an as $o, ao as Do, ap as Fo, aq as Po, ar as Eo, as as Io, at as Lo } from "./assets/modules/upload-template-BDrBVe4E.js";
|
|
3
|
+
import { f as jt, p as Ve } from "./assets/modules/file-upload-D1gRZv8j.js";
|
|
4
|
+
import { A as Mo, U as No } from "./assets/modules/file-upload-D1gRZv8j.js";
|
|
5
|
+
import { EnvConfig as Ee, isMicroApp as Vt } from "@skyfox2000/microbase";
|
|
6
|
+
import { FrontCache as ge, httpPost as Oe, ResStatus as Ke, SERVER_HOST as Yt, fieldMapping as be } from "@skyfox2000/fapi";
|
|
7
7
|
import ae from "vue-m-message";
|
|
8
|
-
import { defineComponent as L, openBlock as
|
|
8
|
+
import { defineComponent as L, openBlock as c, createBlock as k, unref as l, withModifiers as me, useAttrs as ne, withCtx as y, createElementVNode as E, createVNode as D, mergeProps as N, renderSlot as z, normalizeClass as B, toDisplayString as I, createCommentVNode as C, ref as S, provide as _e, watch as M, onMounted as le, createTextVNode as j, inject as xe, resolveDirective as ie, withDirectives as Q, computed as K, createElementBlock as x, normalizeStyle as je, Fragment as U, renderList as Y, resolveDynamicComponent as st, onActivated as Ce, createSlots as nt, useSlots as Gt, vShow as Ie, shallowRef as Wt, onUnmounted as Ht, withKeys as Ye } from "vue";
|
|
9
9
|
import "async-validator";
|
|
10
|
-
import
|
|
11
|
-
import { Popover as
|
|
12
|
-
import { VueDraggableNext as
|
|
13
|
-
import { d as
|
|
14
|
-
import { C as
|
|
15
|
-
import { c as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as ee } from "./assets/modules/index-
|
|
18
|
-
import { _ as
|
|
19
|
-
import { a as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
10
|
+
import Ne from "dayjs";
|
|
11
|
+
import { Popover as qt, theme as it, Drawer as Qt, Space as de, Form as ct, message as Jt, FormItem as ut, ConfigProvider as ye, Popconfirm as dt, DropdownButton as pt, Menu as Se, MenuItem as Te, Dropdown as Re, Checkbox as Xt, List as Zt, ListItem as ea, Card as ta, Button as ft, Table as vt, Tree as aa, Cascader as la, DatePicker as ra, Input as ve, InputPassword as oa, InputNumber as sa, RangePicker as na, Textarea as ia, TimePicker as ca, Transfer as ua, TreeSelect as da, Upload as pa, Image as fa, LayoutContent as va } from "ant-design-vue";
|
|
12
|
+
import { VueDraggableNext as ma } from "vue-draggable-next";
|
|
13
|
+
import { d as ga } from "./assets/modules/uploadList-BreC8S8m.js";
|
|
14
|
+
import { C as Bo, U as Ao, a as zo, p as Oo } from "./assets/modules/uploadList-BreC8S8m.js";
|
|
15
|
+
import { c as mt } from "./assets/modules/index-MgDOEHr_.js";
|
|
16
|
+
import { _ as jo, a as Vo, b as Yo, d as Go, e as Wo, f as Ho, g as qo, h as Qo, n as Jo, p as Xo, t as Zo, v as es } from "./assets/modules/index-MgDOEHr_.js";
|
|
17
|
+
import { _ as ee } from "./assets/modules/index-Ye0JfNsM.js";
|
|
18
|
+
import { _ as G } from "./assets/modules/toolIcon-DFf-Ttkx.js";
|
|
19
|
+
import { a as as } from "./assets/modules/toolIcon-DFf-Ttkx.js";
|
|
20
|
+
import { _ as rs, a as os, b as ss, c as ns, d as is, I as cs, e as us, f as ds, g as ps } from "./assets/modules/menuTabs-C3imgUBh.js";
|
|
21
|
+
import { _ as vs } from "./assets/modules/index-xnHQyu3E.js";
|
|
22
22
|
import { _ as ce } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
23
|
-
const
|
|
23
|
+
const Ge = (r, a, e, t = "remove") => {
|
|
24
24
|
if (!e)
|
|
25
25
|
if (t === "disable") {
|
|
26
26
|
const s = a.component;
|
|
@@ -32,31 +32,31 @@ const We = (r, a, e, t = "remove") => {
|
|
|
32
32
|
o ? o.props.style = { display: "none" } : i.replaceChild(s, r);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
var o,
|
|
37
|
-
const a =
|
|
38
|
-
if (
|
|
35
|
+
}, We = (r) => {
|
|
36
|
+
var o, p;
|
|
37
|
+
const a = Be(), { url: e, role: t, permit: s } = r;
|
|
38
|
+
if (fe(t) && fe(s))
|
|
39
39
|
return !0;
|
|
40
|
-
const i = e ?? ((
|
|
40
|
+
const i = e ?? ((p = (o = window.location.hash) == null ? void 0 : o.split("#")) == null ? void 0 : p[1]) ?? window.location.pathname;
|
|
41
41
|
if (Ee.VITE_PERMISSION_MODE === "none")
|
|
42
42
|
return !0;
|
|
43
43
|
if (Ee.VITE_PERMISSION_MODE === "role")
|
|
44
|
-
return
|
|
44
|
+
return fe(t) ? !0 : a.hasRole(t);
|
|
45
45
|
if (Ee.VITE_PERMISSION_MODE === "permit") {
|
|
46
|
-
let
|
|
47
|
-
return
|
|
46
|
+
let d = !1, u = !1;
|
|
47
|
+
return fe(t) || (d = a.hasRole(t)), a.isAdmin() ? d : (fe(s) || (u = a.hasPermit(i, s)), d || u);
|
|
48
48
|
}
|
|
49
49
|
return !1;
|
|
50
|
-
},
|
|
50
|
+
}, ha = {
|
|
51
51
|
mounted(r, a, e) {
|
|
52
|
-
const t = a.value || {}, s = a.arg || "remove", i = t.behavior || s, o =
|
|
53
|
-
|
|
52
|
+
const t = a.value || {}, s = a.arg || "remove", i = t.behavior || s, o = We(t);
|
|
53
|
+
Ge(r, e, o, i);
|
|
54
54
|
},
|
|
55
55
|
updated(r, a, e) {
|
|
56
|
-
const t = a.value || {}, s = a.arg || "remove", i = t.behavior || s, o =
|
|
57
|
-
|
|
56
|
+
const t = a.value || {}, s = a.arg || "remove", i = t.behavior || s, o = We(t);
|
|
57
|
+
Ge(r, e, o, i);
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, ba = {
|
|
60
60
|
mounted: (r, a) => {
|
|
61
61
|
r.addEventListener("keydown", (e) => {
|
|
62
62
|
e.key === "Enter" && a.value();
|
|
@@ -66,11 +66,11 @@ const We = (r, a, e, t = "remove") => {
|
|
|
66
66
|
r.removeEventListener("keydown", () => {
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
},
|
|
70
|
-
auth:
|
|
71
|
-
submit:
|
|
72
|
-
},
|
|
73
|
-
t in
|
|
69
|
+
}, Le = {
|
|
70
|
+
auth: ha,
|
|
71
|
+
submit: ba
|
|
72
|
+
}, sr = (r, a) => ((a || Object.keys(Le)).forEach((t) => {
|
|
73
|
+
t in Le && r.directive(t, Le[t]);
|
|
74
74
|
}), r), ue = (r, a) => {
|
|
75
75
|
const e = r.find((t) => t.key === a);
|
|
76
76
|
if (e)
|
|
@@ -81,28 +81,28 @@ const We = (r, a, e, t = "remove") => {
|
|
|
81
81
|
if (s)
|
|
82
82
|
return s;
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, $e = (r, a, e) => {
|
|
85
85
|
const t = [], s = [];
|
|
86
86
|
return e || (e = [...r]), e.length && e.forEach((i, o) => {
|
|
87
|
-
let
|
|
87
|
+
let p;
|
|
88
88
|
if (typeof i == "string") {
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const d = ue(r, i);
|
|
90
|
+
p = d ? { ...d } : { key: i, label: i };
|
|
91
91
|
} else {
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const d = ue(r, i.key);
|
|
93
|
+
p = d ? { ...d, ...i } : { ...i };
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, 1)) : ae.warning(
|
|
99
|
-
}), a === 0 || o < a ? t.push(
|
|
95
|
+
p.click || (p.click = (d, u, v) => {
|
|
96
|
+
u && (u.rowData.value = v), p.formVisible ? (p.formVisible.value = !1, setTimeout(() => {
|
|
97
|
+
p.formVisible.value = !0;
|
|
98
|
+
}, 1)) : ae.warning(g("webui.utils.tools.noClickHandler"));
|
|
99
|
+
}), a === 0 || o < a ? t.push(p) : s.push(p);
|
|
100
100
|
}), { buttons: t, menus: s };
|
|
101
|
-
}, W = (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,
|
|
101
|
+
}, W = (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, xa = (r, a) => {
|
|
102
102
|
a.reload.value = !0;
|
|
103
|
-
},
|
|
103
|
+
}, ya = (r, a) => {
|
|
104
104
|
a.searchBar.value = !a.searchBar.value;
|
|
105
|
-
},
|
|
105
|
+
}, wa = (r, a) => {
|
|
106
106
|
switch (a.tableSize.value) {
|
|
107
107
|
case "large":
|
|
108
108
|
a.tableSize.value = "middle";
|
|
@@ -114,85 +114,85 @@ const We = (r, a, e, t = "remove") => {
|
|
|
114
114
|
a.tableSize.value = "large";
|
|
115
115
|
break;
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, ka = (r, a) => {
|
|
118
118
|
a.selectable.value = !a.selectable.value, a.selectable.value || (a.selectKeys.value = [], a.selectRows.value = []);
|
|
119
|
-
},
|
|
119
|
+
}, _a = (r, a) => {
|
|
120
120
|
a.rowExpand.value = !a.rowExpand.value;
|
|
121
|
-
},
|
|
121
|
+
}, He = (r, a) => {
|
|
122
122
|
a.selectable.value = !a.selectable.value;
|
|
123
123
|
}, X = (r, a, e, t, s) => {
|
|
124
|
-
(!r.confirm || s) && r.click && (a ? r.click(a, e, t) : r.click(null, e, t)),
|
|
125
|
-
},
|
|
124
|
+
(!r.confirm || s) && r.click && (a ? r.click(a, e, t) : r.click(null, e, t)), Sa(r);
|
|
125
|
+
}, Ca = (r, a) => {
|
|
126
126
|
a.selectable.value = !a.selectable.value;
|
|
127
|
-
},
|
|
128
|
-
const r =
|
|
127
|
+
}, gt = () => {
|
|
128
|
+
const r = Ae();
|
|
129
129
|
r.setFullscreen(!r.fullscreen);
|
|
130
|
-
},
|
|
130
|
+
}, Sa = (r, a) => {
|
|
131
131
|
(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]));
|
|
132
|
-
},
|
|
132
|
+
}, Ta = (r, a) => {
|
|
133
133
|
a ? delete r.visible : r.visible = !1;
|
|
134
|
-
},
|
|
135
|
-
|
|
134
|
+
}, we = [], nr = () => {
|
|
135
|
+
we.length > 0 || we.push({
|
|
136
136
|
key: "Reload",
|
|
137
|
-
label:
|
|
137
|
+
label: g("webui.utils.tools.refreshTable"),
|
|
138
138
|
icon: "icon-reload",
|
|
139
|
-
click:
|
|
139
|
+
click: xa
|
|
140
140
|
}, {
|
|
141
141
|
key: "Query",
|
|
142
|
-
label:
|
|
143
|
-
labels: [
|
|
142
|
+
label: g("webui.utils.tools.expandSearch"),
|
|
143
|
+
labels: [g("webui.utils.tools.expandSearch"), g("webui.utils.tools.collapseSearch")],
|
|
144
144
|
icon: "icon-search",
|
|
145
145
|
iconStatus: 0,
|
|
146
|
-
click:
|
|
146
|
+
click: ya
|
|
147
147
|
}, {
|
|
148
148
|
key: "RowHeight",
|
|
149
|
-
label:
|
|
149
|
+
label: g("webui.utils.tools.rowHeight"),
|
|
150
150
|
icon: "icon-row-height",
|
|
151
|
-
click:
|
|
151
|
+
click: wa
|
|
152
152
|
}, {
|
|
153
153
|
key: "tool.multiple.checkbox",
|
|
154
|
-
label:
|
|
155
|
-
labels: [
|
|
154
|
+
label: g("webui.utils.tools.showCheckbox"),
|
|
155
|
+
labels: [g("webui.utils.tools.showCheckbox"), g("webui.utils.tools.hideCheckbox")],
|
|
156
156
|
icon: "icon-checkbox",
|
|
157
|
-
click:
|
|
157
|
+
click: ka
|
|
158
158
|
}, {
|
|
159
159
|
key: "tool.expand.rows",
|
|
160
|
-
label:
|
|
161
|
-
labels: [
|
|
160
|
+
label: g("webui.utils.tools.expandRows"),
|
|
161
|
+
labels: [g("webui.utils.tools.expandRows"), g("webui.utils.tools.collapseRows")],
|
|
162
162
|
icon: "icon-row-collapse",
|
|
163
163
|
iconStatus: 0,
|
|
164
164
|
icons: ["icon-row-collapse", "icon-row-expand"],
|
|
165
|
-
click:
|
|
165
|
+
click: _a
|
|
166
166
|
}, {
|
|
167
167
|
key: "tool.export.excel",
|
|
168
|
-
label:
|
|
168
|
+
label: g("webui.utils.tools.exportExcel"),
|
|
169
169
|
icon: "icon-export-excel",
|
|
170
170
|
children: [
|
|
171
171
|
{
|
|
172
172
|
key: "tool.export.excel.all",
|
|
173
|
-
label:
|
|
174
|
-
click:
|
|
173
|
+
label: g("webui.utils.tools.exportAllRecords"),
|
|
174
|
+
click: He
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
key: "tool.export.excel.selected",
|
|
178
|
-
label:
|
|
179
|
-
click:
|
|
178
|
+
label: g("webui.utils.tools.exportSelectedRecords"),
|
|
179
|
+
click: He
|
|
180
180
|
}
|
|
181
181
|
]
|
|
182
182
|
}, {
|
|
183
183
|
key: "tool.export.pdf",
|
|
184
|
-
label:
|
|
184
|
+
label: g("webui.utils.tools.exportPDF"),
|
|
185
185
|
icon: "icon-export-pdf",
|
|
186
186
|
children: [
|
|
187
187
|
{
|
|
188
188
|
key: "tool.export.pdf.selected",
|
|
189
|
-
label:
|
|
190
|
-
click:
|
|
189
|
+
label: g("webui.utils.tools.exportSelectedRecords"),
|
|
190
|
+
click: Ca
|
|
191
191
|
}
|
|
192
192
|
]
|
|
193
193
|
}, {
|
|
194
194
|
key: "TableHeadset",
|
|
195
|
-
label:
|
|
195
|
+
label: g("webui.utils.tools.tableHeaderSettings"),
|
|
196
196
|
icon: "icon-headset",
|
|
197
197
|
dropdown: "headset",
|
|
198
198
|
click: () => {
|
|
@@ -200,24 +200,24 @@ const We = (r, a, e, t = "remove") => {
|
|
|
200
200
|
// 不设置点击事件
|
|
201
201
|
}, {
|
|
202
202
|
key: "Fullscreen",
|
|
203
|
-
label:
|
|
204
|
-
labels: [
|
|
203
|
+
label: g("webui.utils.tools.setFullscreen"),
|
|
204
|
+
labels: [g("webui.utils.tools.setFullscreen"), g("webui.utils.tools.exitFullscreen")],
|
|
205
205
|
icon: "icon-fullscreen",
|
|
206
206
|
iconStatus: 0,
|
|
207
207
|
icons: ["icon-fullscreen", "icon-exitscreen"],
|
|
208
|
-
click:
|
|
208
|
+
click: gt
|
|
209
209
|
});
|
|
210
|
-
},
|
|
210
|
+
}, $a = (r) => {
|
|
211
211
|
if (!r.tools || r.tools.length > 0) {
|
|
212
212
|
const a = [];
|
|
213
|
-
return r.tools ? a.push(...r.tools) : a.push(...
|
|
213
|
+
return r.tools ? a.push(...r.tools) : a.push(...we), { tools: $e(we, 0, a).buttons };
|
|
214
214
|
}
|
|
215
215
|
return {
|
|
216
216
|
tools: []
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
|
-
var
|
|
220
|
-
class
|
|
219
|
+
var Da = /* @__PURE__ */ ((r) => (r.SYS_CONFIG = "SYS_CONFIG_", r.APP_MENU = "APP_MENU_", r.DICT_TYPE = "DICT_TYPE_", r.HOST_INFO = "HOST_INFO_", r.APP_PERMITS = "APP_PERMITS_", r.USER_SETTINGS = "USER_SETTINGS_", r.DICT_DATA = "DICT_DATA_", r.COMMON_OPTIONS = "COMMON_OPTIONS_", r))(Da || {});
|
|
220
|
+
class ht {
|
|
221
221
|
/**
|
|
222
222
|
* 设置缓存数据(带服务器时间)
|
|
223
223
|
*/
|
|
@@ -226,26 +226,26 @@ class bt {
|
|
|
226
226
|
data: e,
|
|
227
227
|
lastTime: t
|
|
228
228
|
};
|
|
229
|
-
|
|
229
|
+
ge.set({ key: a, storage: "local" }, s);
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
232
|
* 设置缓存数据
|
|
233
233
|
*/
|
|
234
234
|
static setData(a, e) {
|
|
235
|
-
|
|
235
|
+
ge.set({ key: a, storage: "local" }, e);
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
* 获取缓存数据
|
|
239
239
|
*/
|
|
240
240
|
static getData(a) {
|
|
241
|
-
const e =
|
|
242
|
-
return e &&
|
|
241
|
+
const e = ge.get({ key: a, storage: "local" });
|
|
242
|
+
return e && ht.isTimedData(e) ? e.data : e ?? null;
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
245
|
* 清除缓存
|
|
246
246
|
*/
|
|
247
247
|
static remove(a) {
|
|
248
|
-
|
|
248
|
+
ge.remove({ key: a, storage: "local" });
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* 清理指定前缀的缓存 (基于 localStorage 实现,因为 FrontCache 未提供此方法)
|
|
@@ -272,9 +272,9 @@ class bt {
|
|
|
272
272
|
return a && typeof a == "object" && "data" in a && "lastTime" in a && typeof a.lastTime == "number";
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
async function
|
|
275
|
+
async function ir() {
|
|
276
276
|
try {
|
|
277
|
-
const r = await
|
|
277
|
+
const r = await Oe(
|
|
278
278
|
{
|
|
279
279
|
api: "PLATFORM_API",
|
|
280
280
|
url: "/api/SysCacheSvr/getLastTime",
|
|
@@ -282,18 +282,18 @@ async function ur() {
|
|
|
282
282
|
},
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
|
-
if ((r == null ? void 0 : r.status) ===
|
|
285
|
+
if ((r == null ? void 0 : r.status) === Ke.SUCCESS) {
|
|
286
286
|
const a = r.data;
|
|
287
287
|
Object.keys(a).forEach((e) => {
|
|
288
288
|
const t = a[e];
|
|
289
289
|
["local", "session"].forEach((i) => {
|
|
290
290
|
const o = i === "local" ? localStorage : sessionStorage;
|
|
291
|
-
for (let
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
291
|
+
for (let p = 0; p < o.length; p++) {
|
|
292
|
+
const d = o.key(p);
|
|
293
|
+
if (d && d.endsWith(e))
|
|
294
294
|
try {
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const u = JSON.parse(o.getItem(d));
|
|
296
|
+
u && typeof u == "object" && "lastTime" in u && typeof u.lastTime == "number" && u.lastTime !== t && o.removeItem(d);
|
|
297
297
|
} catch {
|
|
298
298
|
continue;
|
|
299
299
|
}
|
|
@@ -305,8 +305,8 @@ async function ur() {
|
|
|
305
305
|
console.error("检查缓存更新失败", r);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
const e = await
|
|
308
|
+
const cr = async (r, a) => {
|
|
309
|
+
const e = await mt(r, a);
|
|
310
310
|
if (e.success)
|
|
311
311
|
return {
|
|
312
312
|
blobUrl: e.blobUrl,
|
|
@@ -314,10 +314,10 @@ const dr = async (r, a) => {
|
|
|
314
314
|
blob: null
|
|
315
315
|
// 不再返回blob对象,使用URL即可
|
|
316
316
|
};
|
|
317
|
-
throw new Error(e.error ||
|
|
318
|
-
},
|
|
317
|
+
throw new Error(e.error || g("webui.utils.formCsv.csvToExcelFailed"));
|
|
318
|
+
}, ur = async (r, a) => {
|
|
319
319
|
try {
|
|
320
|
-
const t = new TextDecoder("utf-8").decode(r), s = await
|
|
320
|
+
const t = new TextDecoder("utf-8").decode(r), s = await mt(t, a);
|
|
321
321
|
return {
|
|
322
322
|
success: s.success,
|
|
323
323
|
blobUrl: s.blobUrl,
|
|
@@ -327,18 +327,18 @@ const dr = async (r, a) => {
|
|
|
327
327
|
// 保留原始CSV内容
|
|
328
328
|
};
|
|
329
329
|
} catch (e) {
|
|
330
|
-
return console.error(
|
|
330
|
+
return console.error(g("webui.utils.formCsv.csvProcessFailed") + ":", e), {
|
|
331
331
|
success: !1,
|
|
332
|
-
error: e instanceof Error ? e.message :
|
|
332
|
+
error: e instanceof Error ? e.message : g("webui.utils.formCsv.unknownError")
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
},
|
|
335
|
+
}, bt = (r) => r ? Array.isArray(r) ? r.join(".") : r : "", xt = (r) => r.map((a) => ({
|
|
336
336
|
label: a.title,
|
|
337
|
-
value:
|
|
338
|
-
})),
|
|
337
|
+
value: bt(a.dataIndex) || a.key || ""
|
|
338
|
+
})), yt = (r, a) => r.map((e, t) => {
|
|
339
339
|
const s = { ...e };
|
|
340
340
|
return a.forEach((i) => {
|
|
341
|
-
const o =
|
|
341
|
+
const o = bt(i.dataIndex) || i.key;
|
|
342
342
|
o && i.customRender && (s[o] = i.customRender({
|
|
343
343
|
text: e[o],
|
|
344
344
|
record: e,
|
|
@@ -346,53 +346,53 @@ const dr = async (r, a) => {
|
|
|
346
346
|
column: i
|
|
347
347
|
}));
|
|
348
348
|
}), s;
|
|
349
|
-
}),
|
|
349
|
+
}), wt = async (r, a, e) => {
|
|
350
350
|
try {
|
|
351
|
-
const s = (await import("@json2csv/plainjs")).Parser, o = new s({ fields: a }).parse(e),
|
|
352
|
-
|
|
351
|
+
const s = (await import("@json2csv/plainjs")).Parser, o = new s({ fields: a }).parse(e), p = new Blob([`\uFEFF${o}`], { type: "text/csv" });
|
|
352
|
+
ga(p, r);
|
|
353
353
|
} catch (t) {
|
|
354
|
-
console.error(
|
|
354
|
+
console.error(g("webui.utils.exportTable.exportFailed") + ":", t), ae.error(g("webui.utils.exportTable.fileExportFailed"));
|
|
355
355
|
}
|
|
356
|
-
},
|
|
356
|
+
}, dr = async (r, a, e) => {
|
|
357
357
|
try {
|
|
358
|
-
const t =
|
|
359
|
-
await
|
|
358
|
+
const t = kt(r), s = a.filter((p) => p.visible !== !1 && p.export !== !1), i = xt(s), o = yt(e, s);
|
|
359
|
+
await wt(t, i, o);
|
|
360
360
|
} catch (t) {
|
|
361
|
-
console.error(
|
|
361
|
+
console.error(g("webui.utils.exportTable.exportFailed") + ":", t), ae.error(g("webui.utils.exportTable.fileExportFailed"));
|
|
362
362
|
}
|
|
363
|
-
},
|
|
363
|
+
}, kt = (r) => {
|
|
364
364
|
const a = /\{([^}]+)\}/g;
|
|
365
|
-
return r.replace(a, (e, t) =>
|
|
366
|
-
},
|
|
365
|
+
return r.replace(a, (e, t) => Ne().format(t));
|
|
366
|
+
}, pr = async (r, a, e, t) => {
|
|
367
367
|
try {
|
|
368
|
-
const s =
|
|
369
|
-
let
|
|
370
|
-
return t.api || (t.api =
|
|
371
|
-
if (e.isGridLoading.value = !1, (
|
|
372
|
-
if (
|
|
373
|
-
let v =
|
|
374
|
-
const n =
|
|
375
|
-
await
|
|
368
|
+
const s = kt(r), i = a.filter((u) => u.visible !== !1), o = xt(i);
|
|
369
|
+
let p = e.page, d = e.gridQuery;
|
|
370
|
+
return t.api || (t.api = p.api), t.authorize === void 0 && (t.authorize = p.authorize), e.isGridLoading.value = !0, Oe(t, d).then(async (u) => {
|
|
371
|
+
if (e.isGridLoading.value = !1, (u == null ? void 0 : u.status) === Ke.SUCCESS) {
|
|
372
|
+
if (u.data) {
|
|
373
|
+
let v = u.data;
|
|
374
|
+
const n = yt(v, i);
|
|
375
|
+
await wt(s, o, n);
|
|
376
376
|
}
|
|
377
|
-
} else if ((
|
|
378
|
-
|
|
377
|
+
} else if ((u == null ? void 0 : u.errno) == St) {
|
|
378
|
+
Be().logout(!1);
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
} catch (s) {
|
|
383
|
-
console.error(
|
|
383
|
+
console.error(g("webui.utils.exportTable.exportFailed") + ":", s), ae.error(g("webui.utils.exportTable.fileExportFailed"));
|
|
384
384
|
}
|
|
385
|
-
},
|
|
385
|
+
}, fr = /* @__PURE__ */ L({
|
|
386
386
|
__name: "fullscreen",
|
|
387
387
|
setup(r) {
|
|
388
|
-
const a =
|
|
389
|
-
return (e, t) => (
|
|
390
|
-
onClick:
|
|
388
|
+
const a = Ae();
|
|
389
|
+
return (e, t) => (c(), k(G, {
|
|
390
|
+
onClick: me(l(gt), ["stop"]),
|
|
391
391
|
icon: l(a).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
|
|
392
392
|
class: "w-[17px] h-[17px]"
|
|
393
393
|
}, null, 8, ["onClick", "icon"]));
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), Fa = { class: "ml-2" }, Pa = /* @__PURE__ */ L({
|
|
396
396
|
inheritAttrs: !1,
|
|
397
397
|
__name: "helper",
|
|
398
398
|
props: {
|
|
@@ -403,19 +403,19 @@ const dr = async (r, a) => {
|
|
|
403
403
|
},
|
|
404
404
|
setup(r) {
|
|
405
405
|
const a = ne();
|
|
406
|
-
return (e, t) => (
|
|
406
|
+
return (e, t) => (c(), k(l(qt), {
|
|
407
407
|
placement: r.placement ?? "topRight"
|
|
408
408
|
}, {
|
|
409
|
-
content:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
class:
|
|
413
|
-
},
|
|
409
|
+
content: y(() => [
|
|
410
|
+
z(e.$slots, "default", {}, () => [
|
|
411
|
+
E("div", {
|
|
412
|
+
class: B(["text-[14px]", [r.maxWidth]])
|
|
413
|
+
}, I(r.text), 3)
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
|
-
default:
|
|
417
|
-
|
|
418
|
-
D(
|
|
416
|
+
default: y(() => [
|
|
417
|
+
E("span", Fa, [
|
|
418
|
+
D(G, N({
|
|
419
419
|
icon: "icon-question-circle",
|
|
420
420
|
class: ["text-[#888]", [r.size ? "w-" + r.size + " h-" + r.size : "w-5 h-5"]]
|
|
421
421
|
}, l(a)), null, 16, ["class"])
|
|
@@ -424,7 +424,7 @@ const dr = async (r, a) => {
|
|
|
424
424
|
_: 3
|
|
425
425
|
}, 8, ["placement"]));
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
427
|
+
}), vr = /* @__PURE__ */ L({
|
|
428
428
|
__name: "layoutIcon",
|
|
429
429
|
props: {
|
|
430
430
|
icon: {
|
|
@@ -435,20 +435,20 @@ const dr = async (r, a) => {
|
|
|
435
435
|
}
|
|
436
436
|
},
|
|
437
437
|
setup(r) {
|
|
438
|
-
const a = r, t =
|
|
439
|
-
iconUrl: `${
|
|
438
|
+
const a = r, t = Tt({
|
|
439
|
+
iconUrl: `${Yt.MICROLAYOUT_ICONS}`,
|
|
440
440
|
monoColor: !0,
|
|
441
441
|
icon: a.icon,
|
|
442
442
|
icons: a.icons
|
|
443
443
|
});
|
|
444
|
-
return (s, i) => r.icon || r.icons ? (
|
|
444
|
+
return (s, i) => r.icon || r.icons ? (c(), k(l(t), N({
|
|
445
445
|
key: 0,
|
|
446
446
|
icon: r.icon,
|
|
447
447
|
icons: r.icons,
|
|
448
448
|
class: ["align-middle"]
|
|
449
|
-
}, s.$attrs), null, 16, ["icon", "icons"])) :
|
|
449
|
+
}, s.$attrs), null, 16, ["icon", "icons"])) : C("", !0);
|
|
450
450
|
}
|
|
451
|
-
}),
|
|
451
|
+
}), Ea = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, mr = /* @__PURE__ */ L({
|
|
452
452
|
__name: "index",
|
|
453
453
|
props: {
|
|
454
454
|
saveText: {},
|
|
@@ -459,23 +459,23 @@ const dr = async (r, a) => {
|
|
|
459
459
|
drawerSaveAs: { type: Function }
|
|
460
460
|
},
|
|
461
461
|
setup(r) {
|
|
462
|
-
const { useToken: a } =
|
|
463
|
-
|
|
462
|
+
const { useToken: a } = it, { token: e } = a(), t = S(!1), s = r, i = s.editorCtrl;
|
|
463
|
+
_e(oe.EditorControl, i), M(
|
|
464
464
|
() => i.visible.value,
|
|
465
|
-
(
|
|
466
|
-
t.value =
|
|
465
|
+
(u) => {
|
|
466
|
+
t.value = u ?? !1;
|
|
467
467
|
}
|
|
468
468
|
), le(() => {
|
|
469
469
|
t.value = i.visible.value ?? !1;
|
|
470
470
|
});
|
|
471
471
|
const o = () => {
|
|
472
|
-
s.drawerSave ? s.drawerSave() : i &&
|
|
473
|
-
},
|
|
474
|
-
s.drawerSaveAs ? s.drawerSaveAs() : i &&
|
|
475
|
-
},
|
|
476
|
-
|
|
472
|
+
s.drawerSave ? s.drawerSave() : i && qe(i);
|
|
473
|
+
}, p = () => {
|
|
474
|
+
s.drawerSaveAs ? s.drawerSaveAs() : i && $t(i);
|
|
475
|
+
}, d = () => {
|
|
476
|
+
Dt(i);
|
|
477
477
|
};
|
|
478
|
-
return (
|
|
478
|
+
return (u, v) => (c(), k(l(Qt), {
|
|
479
479
|
open: t.value,
|
|
480
480
|
"onUpdate:open": v[0] || (v[0] = (n) => t.value = n),
|
|
481
481
|
"get-container": !1,
|
|
@@ -496,12 +496,12 @@ const dr = async (r, a) => {
|
|
|
496
496
|
boxShadow: "rgba(0, 0, 0, 0.3) -2px 0px 8px"
|
|
497
497
|
},
|
|
498
498
|
width: "420px",
|
|
499
|
-
onClose:
|
|
499
|
+
onClose: d
|
|
500
500
|
}, {
|
|
501
|
-
extra:
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
D(l(
|
|
501
|
+
extra: y(() => [
|
|
502
|
+
z(u.$slots, "extra", {}, () => [
|
|
503
|
+
E("div", Ea, [
|
|
504
|
+
D(l(G), {
|
|
505
505
|
class: "top-[-2px] left-[2px] w-6 h-6",
|
|
506
506
|
icon: "icon-new",
|
|
507
507
|
angle: 45,
|
|
@@ -509,49 +509,49 @@ const dr = async (r, a) => {
|
|
|
509
509
|
clickable: "",
|
|
510
510
|
color: "#666",
|
|
511
511
|
position: [0, 0],
|
|
512
|
-
onClick:
|
|
512
|
+
onClick: d
|
|
513
513
|
})
|
|
514
514
|
])
|
|
515
515
|
])
|
|
516
516
|
]),
|
|
517
|
-
default:
|
|
518
|
-
|
|
517
|
+
default: y(() => [
|
|
518
|
+
z(u.$slots, "default")
|
|
519
519
|
]),
|
|
520
|
-
footer:
|
|
521
|
-
|
|
522
|
-
D(l(
|
|
523
|
-
default:
|
|
524
|
-
r.cancelText !== "" ? (
|
|
520
|
+
footer: y(() => [
|
|
521
|
+
z(u.$slots, "footer", {}, () => [
|
|
522
|
+
D(l(de), null, {
|
|
523
|
+
default: y(() => [
|
|
524
|
+
r.cancelText !== "" ? (c(), k(l(ee), {
|
|
525
525
|
key: 0,
|
|
526
|
-
onClick:
|
|
526
|
+
onClick: d
|
|
527
527
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
528
|
+
default: y(() => [
|
|
529
|
+
j(I(r.cancelText ?? l(g)("webui.common.cancel")), 1)
|
|
530
530
|
]),
|
|
531
531
|
_: 1
|
|
532
|
-
})) :
|
|
533
|
-
r.saveAsText !== "" && l(i).saveAsBtnVisible !== !1 ? (
|
|
532
|
+
})) : C("", !0),
|
|
533
|
+
r.saveAsText !== "" && l(i).saveAsBtnVisible !== !1 ? (c(), k(l(ee), {
|
|
534
534
|
key: 1,
|
|
535
|
-
onClick:
|
|
535
|
+
onClick: p,
|
|
536
536
|
type: "primary",
|
|
537
537
|
loading: l(i).isFormSaving.value
|
|
538
538
|
}, {
|
|
539
|
-
default:
|
|
540
|
-
|
|
539
|
+
default: y(() => [
|
|
540
|
+
j(I(r.saveAsText ?? l(g)("webui.common.saveAs")), 1)
|
|
541
541
|
]),
|
|
542
542
|
_: 1
|
|
543
|
-
}, 8, ["loading"])) :
|
|
544
|
-
r.saveText !== "" && l(i).saveBtnVisible !== !1 ? (
|
|
543
|
+
}, 8, ["loading"])) : C("", !0),
|
|
544
|
+
r.saveText !== "" && l(i).saveBtnVisible !== !1 ? (c(), k(l(ee), {
|
|
545
545
|
key: 2,
|
|
546
546
|
onClick: o,
|
|
547
547
|
type: "primary",
|
|
548
548
|
loading: l(i).isFormSaving.value
|
|
549
549
|
}, {
|
|
550
|
-
default:
|
|
551
|
-
|
|
550
|
+
default: y(() => [
|
|
551
|
+
j(I(r.saveText ?? l(g)("webui.common.save")), 1)
|
|
552
552
|
]),
|
|
553
553
|
_: 1
|
|
554
|
-
}, 8, ["loading"])) :
|
|
554
|
+
}, 8, ["loading"])) : C("", !0)
|
|
555
555
|
]),
|
|
556
556
|
_: 1
|
|
557
557
|
})
|
|
@@ -560,7 +560,7 @@ const dr = async (r, a) => {
|
|
|
560
560
|
_: 3
|
|
561
561
|
}, 8, ["open", "header-style"]));
|
|
562
562
|
}
|
|
563
|
-
}),
|
|
563
|
+
}), gr = /* @__PURE__ */ L({
|
|
564
564
|
__name: "index",
|
|
565
565
|
props: {
|
|
566
566
|
labelWidth: {},
|
|
@@ -568,10 +568,10 @@ const dr = async (r, a) => {
|
|
|
568
568
|
editorCtrl: {}
|
|
569
569
|
},
|
|
570
570
|
setup(r) {
|
|
571
|
-
const a = r, e = a.editorCtrl ??
|
|
572
|
-
return
|
|
571
|
+
const a = r, e = a.editorCtrl ?? xe(oe.EditorControl, void 0);
|
|
572
|
+
return _e(oe.LabelWidth, a.labelWidth), (t, s) => {
|
|
573
573
|
const i = ie("submit");
|
|
574
|
-
return Q((
|
|
574
|
+
return Q((c(), k(l(ct), {
|
|
575
575
|
"label-col": { flex: a.labelWidth ?? "85px" },
|
|
576
576
|
"wrapper-col": {
|
|
577
577
|
flex: a.wrapperWidth ?? "1 0 280px"
|
|
@@ -581,24 +581,24 @@ const dr = async (r, a) => {
|
|
|
581
581
|
flexWrap: "wrap"
|
|
582
582
|
}
|
|
583
583
|
}, {
|
|
584
|
-
default:
|
|
585
|
-
|
|
584
|
+
default: y(() => [
|
|
585
|
+
z(t.$slots, "default")
|
|
586
586
|
]),
|
|
587
587
|
_: 3
|
|
588
588
|
}, 8, ["label-col", "wrapper-col"])), [
|
|
589
589
|
[
|
|
590
590
|
i,
|
|
591
591
|
() => {
|
|
592
|
-
l(e) && l(
|
|
592
|
+
l(e) && l(qe)(l(e));
|
|
593
593
|
}
|
|
594
594
|
]
|
|
595
595
|
]);
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
}),
|
|
598
|
+
}), Ia = {
|
|
599
599
|
key: 0,
|
|
600
600
|
class: "flex-grow"
|
|
601
|
-
},
|
|
601
|
+
}, La = { class: "w-8 mt-[-2px]" }, hr = /* @__PURE__ */ L({
|
|
602
602
|
inheritAttrs: !1,
|
|
603
603
|
__name: "formItem",
|
|
604
604
|
props: {
|
|
@@ -610,70 +610,70 @@ const dr = async (r, a) => {
|
|
|
610
610
|
bottomMargin: {}
|
|
611
611
|
},
|
|
612
612
|
setup(r) {
|
|
613
|
-
const a = r, e = ne(), t =
|
|
613
|
+
const a = r, e = ne(), t = xe(oe.EditorControl, void 0), s = xe(oe.LabelWidth, "85px") ?? "85px", i = Qe(a, t), o = S(!1);
|
|
614
614
|
setTimeout(() => {
|
|
615
615
|
o.value = !0;
|
|
616
616
|
}, 30);
|
|
617
|
-
const
|
|
618
|
-
var
|
|
617
|
+
const p = K(() => {
|
|
618
|
+
var u;
|
|
619
619
|
if (!a.rule)
|
|
620
620
|
return !1;
|
|
621
|
-
const
|
|
622
|
-
return
|
|
621
|
+
const d = Je(a.rule.split("."), (u = t == null ? void 0 : t.formRules) == null ? void 0 : u.value);
|
|
622
|
+
return d ? (d.required || (i.value.errClass = "", i.value.msg = ""), d.required ?? !0) : (Jt.error(g("webui.components.content.formItem.validationRuleNotFound", { label: a.label, rule: a.rule })), i.value.errClass = "text-[#ff4d4f]", i.value.msg = g("webui.components.content.formItem.validationRuleNotFound", { label: a.label, rule: a.rule }), !0);
|
|
623
623
|
});
|
|
624
|
-
return (
|
|
625
|
-
class:
|
|
624
|
+
return (d, u) => (c(), x("div", {
|
|
625
|
+
class: B(["relative", r.bottomMargin ? r.bottomMargin : "mb-1"])
|
|
626
626
|
}, [
|
|
627
|
-
o.value ? (
|
|
627
|
+
o.value ? (c(), k(l(ut), N({
|
|
628
628
|
key: 0,
|
|
629
|
-
required:
|
|
629
|
+
required: p.value,
|
|
630
630
|
class: ["relative", [r.nextLine ? "mb-0" : r.rule ? "" : "mb-3"]]
|
|
631
631
|
}, l(e)), {
|
|
632
|
-
label:
|
|
633
|
-
|
|
634
|
-
class:
|
|
635
|
-
},
|
|
632
|
+
label: y(() => [
|
|
633
|
+
E("span", {
|
|
634
|
+
class: B([l(i).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
635
|
+
}, I(r.label), 3)
|
|
636
636
|
]),
|
|
637
|
-
default:
|
|
638
|
-
|
|
639
|
-
class:
|
|
637
|
+
default: y(() => [
|
|
638
|
+
E("div", {
|
|
639
|
+
class: B(["flex items-center", r.width ? r.width : "w-full"])
|
|
640
640
|
}, [
|
|
641
|
-
r.nextLine ?
|
|
642
|
-
|
|
641
|
+
r.nextLine ? C("", !0) : (c(), x("div", Ia, [
|
|
642
|
+
z(d.$slots, "default")
|
|
643
643
|
])),
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
r.helper ? (
|
|
644
|
+
E("div", La, [
|
|
645
|
+
z(d.$slots, "helper", {}, () => [
|
|
646
|
+
r.helper ? (c(), k(l(Pa), {
|
|
647
647
|
key: 0,
|
|
648
648
|
text: r.helper
|
|
649
|
-
}, null, 8, ["text"])) :
|
|
649
|
+
}, null, 8, ["text"])) : C("", !0)
|
|
650
650
|
])
|
|
651
651
|
])
|
|
652
652
|
], 2)
|
|
653
653
|
]),
|
|
654
654
|
_: 3
|
|
655
|
-
}, 16, ["required", "class"])) :
|
|
656
|
-
r.nextLine ? (
|
|
655
|
+
}, 16, ["required", "class"])) : C("", !0),
|
|
656
|
+
r.nextLine ? (c(), x("div", {
|
|
657
657
|
key: 1,
|
|
658
|
-
class:
|
|
658
|
+
class: B(["w-[95%] flex items-center relative", [r.nextLine ? r.rule ? "mb-7" : "mb-3" : ""]])
|
|
659
659
|
}, [
|
|
660
|
-
|
|
661
|
-
], 2)) :
|
|
662
|
-
l(i).errClass ? (
|
|
660
|
+
z(d.$slots, "default")
|
|
661
|
+
], 2)) : C("", !0),
|
|
662
|
+
l(i).errClass ? (c(), x("span", {
|
|
663
663
|
key: 2,
|
|
664
|
-
style:
|
|
664
|
+
style: je({ left: r.nextLine ? "2px" : l(s) }),
|
|
665
665
|
class: "absolute bottom-[3px] text-[12px] text-[#ff4d4fcc]"
|
|
666
|
-
},
|
|
666
|
+
}, I(l(i).msg), 5)) : C("", !0)
|
|
667
667
|
], 2));
|
|
668
668
|
}
|
|
669
|
-
}),
|
|
669
|
+
}), Ua = /* @__PURE__ */ L({
|
|
670
670
|
__name: "listOperate",
|
|
671
671
|
props: {
|
|
672
672
|
record: {},
|
|
673
673
|
gridCtrl: {}
|
|
674
674
|
},
|
|
675
675
|
setup(r) {
|
|
676
|
-
const a = r, e = a.gridCtrl, t =
|
|
676
|
+
const a = r, e = a.gridCtrl, t = K(() => pe.currentRoute.value.path), s = [
|
|
677
677
|
{
|
|
678
678
|
key: "Edit",
|
|
679
679
|
label: "",
|
|
@@ -682,7 +682,7 @@ const dr = async (r, a) => {
|
|
|
682
682
|
visible: !0,
|
|
683
683
|
role: ["Super", "Admin"],
|
|
684
684
|
permit: ":edit",
|
|
685
|
-
click: () =>
|
|
685
|
+
click: () => Xe(e, a.record)
|
|
686
686
|
},
|
|
687
687
|
{
|
|
688
688
|
key: "Delete",
|
|
@@ -694,16 +694,16 @@ const dr = async (r, a) => {
|
|
|
694
694
|
role: ["Super", "Admin"],
|
|
695
695
|
permit: ":delete",
|
|
696
696
|
confirm: !0,
|
|
697
|
-
confirmText:
|
|
698
|
-
click: () =>
|
|
697
|
+
confirmText: g("webui.components.content.table.confirmDelete"),
|
|
698
|
+
click: () => Ze(e, a.record)
|
|
699
699
|
}
|
|
700
|
-
], { buttons: i, menus: o } =
|
|
701
|
-
if (typeof
|
|
702
|
-
return
|
|
703
|
-
if (typeof
|
|
704
|
-
return W(
|
|
700
|
+
], { buttons: i, menus: o } = $e(s, 0, e.operates), p = (d) => {
|
|
701
|
+
if (typeof d.disabled == "boolean")
|
|
702
|
+
return d.disabled;
|
|
703
|
+
if (typeof d.disabled == "function")
|
|
704
|
+
return W(d, a.record) ?? !1;
|
|
705
705
|
if (a.record.hasOwnProperty(e.statusKey))
|
|
706
|
-
switch (
|
|
706
|
+
switch (d.key) {
|
|
707
707
|
case "Edit":
|
|
708
708
|
return !a.record[e.statusKey];
|
|
709
709
|
case "Delete":
|
|
@@ -711,89 +711,89 @@ const dr = async (r, a) => {
|
|
|
711
711
|
}
|
|
712
712
|
return !1;
|
|
713
713
|
};
|
|
714
|
-
return (
|
|
714
|
+
return (d, u) => {
|
|
715
715
|
const v = ie("auth");
|
|
716
|
-
return
|
|
716
|
+
return c(), k(l(ye), { theme: {
|
|
717
717
|
token: {
|
|
718
718
|
fontSize: 13
|
|
719
719
|
}
|
|
720
720
|
} }, {
|
|
721
|
-
default:
|
|
722
|
-
D(l(
|
|
723
|
-
default:
|
|
724
|
-
(
|
|
721
|
+
default: y(() => [
|
|
722
|
+
D(l(de), null, {
|
|
723
|
+
default: y(() => [
|
|
724
|
+
(c(!0), x(U, null, Y(l(i), (n) => (c(), x(U, {
|
|
725
725
|
key: n.key
|
|
726
726
|
}, [
|
|
727
|
-
l(J)(n, a.record) ? (
|
|
727
|
+
l(J)(n, a.record) ? (c(), k(l(dt), {
|
|
728
728
|
key: 0,
|
|
729
|
-
disabled:
|
|
730
|
-
cancelText: l(
|
|
731
|
-
okText: l(
|
|
729
|
+
disabled: p(n) || !n.confirm,
|
|
730
|
+
cancelText: l(g)("webui.common.no"),
|
|
731
|
+
okText: l(g)("webui.common.yes"),
|
|
732
732
|
title: n.confirmText,
|
|
733
733
|
okButtonProps: { size: "small" },
|
|
734
734
|
cancelButtonProps: { size: "small" },
|
|
735
735
|
onConfirm: (m) => l(X)(n, l(e).page, l(e), a.record, !0)
|
|
736
736
|
}, {
|
|
737
|
-
default:
|
|
738
|
-
l(J)(n, a.record) ? Q((
|
|
737
|
+
default: y(() => [
|
|
738
|
+
l(J)(n, a.record) ? Q((c(), k(l(G), {
|
|
739
739
|
key: n.key,
|
|
740
740
|
icon: n.icon,
|
|
741
741
|
danger: n.danger,
|
|
742
|
-
disabled:
|
|
743
|
-
onClick: (m) => !
|
|
744
|
-
clickable: !
|
|
745
|
-
class:
|
|
742
|
+
disabled: p(n),
|
|
743
|
+
onClick: (m) => !p(n) && l(X)(n, l(e).page, l(e), a.record),
|
|
744
|
+
clickable: !p(n),
|
|
745
|
+
class: B([
|
|
746
746
|
"w-4 h-4",
|
|
747
747
|
n.danger ? "text-red-500" : "text-gray-600",
|
|
748
|
-
|
|
748
|
+
p(n) ? "opacity-30 cursor-not-allowed" : "hover:text-gray-800"
|
|
749
749
|
])
|
|
750
750
|
}, null, 8, ["icon", "danger", "disabled", "onClick", "clickable", "class"])), [
|
|
751
751
|
[v, { url: t.value, role: n.role, permit: n.permit }]
|
|
752
|
-
]) :
|
|
752
|
+
]) : C("", !0)
|
|
753
753
|
]),
|
|
754
754
|
_: 2
|
|
755
|
-
}, 1032, ["disabled", "cancelText", "okText", "title", "onConfirm"])) :
|
|
755
|
+
}, 1032, ["disabled", "cancelText", "okText", "title", "onConfirm"])) : C("", !0)
|
|
756
756
|
], 64))), 128)),
|
|
757
|
-
r.record[l(e).statusKey] == 1 ? (
|
|
757
|
+
r.record[l(e).statusKey] == 1 ? (c(), k(l(ye), {
|
|
758
758
|
key: 0,
|
|
759
759
|
autoInsertSpaceInButton: !1
|
|
760
760
|
}, {
|
|
761
|
-
default:
|
|
762
|
-
l(o).length > 0 ? (
|
|
761
|
+
default: y(() => [
|
|
762
|
+
l(o).length > 0 ? (c(), k(l(pt), {
|
|
763
763
|
key: 0,
|
|
764
764
|
size: "small"
|
|
765
765
|
}, {
|
|
766
|
-
overlay:
|
|
767
|
-
D(l(
|
|
768
|
-
default:
|
|
769
|
-
(
|
|
766
|
+
overlay: y(() => [
|
|
767
|
+
D(l(Se), null, {
|
|
768
|
+
default: y(() => [
|
|
769
|
+
(c(!0), x(U, null, Y(l(o), (n) => (c(), x(U, {
|
|
770
770
|
key: n.key
|
|
771
771
|
}, [
|
|
772
|
-
l(J)(n, a.record) ? Q((
|
|
772
|
+
l(J)(n, a.record) ? Q((c(), k(l(Te), {
|
|
773
773
|
key: 0,
|
|
774
|
-
disabled:
|
|
774
|
+
disabled: p(n),
|
|
775
775
|
onClick: (m) => l(X)(n, l(e).page, l(e), a.record)
|
|
776
776
|
}, {
|
|
777
|
-
default:
|
|
778
|
-
|
|
777
|
+
default: y(() => [
|
|
778
|
+
j(I(n.label), 1)
|
|
779
779
|
]),
|
|
780
780
|
_: 2
|
|
781
781
|
}, 1032, ["disabled", "onClick"])), [
|
|
782
782
|
[v, { url: t.value, role: n.role, permit: n.permit }]
|
|
783
|
-
]) :
|
|
783
|
+
]) : C("", !0)
|
|
784
784
|
], 64))), 128))
|
|
785
785
|
]),
|
|
786
786
|
_: 1
|
|
787
787
|
})
|
|
788
788
|
]),
|
|
789
|
-
default:
|
|
790
|
-
|
|
789
|
+
default: y(() => [
|
|
790
|
+
j(I(l(g)("webui.components.content.table.more")) + " ", 1)
|
|
791
791
|
]),
|
|
792
792
|
_: 1
|
|
793
|
-
})) :
|
|
793
|
+
})) : C("", !0)
|
|
794
794
|
]),
|
|
795
795
|
_: 1
|
|
796
|
-
})) :
|
|
796
|
+
})) : C("", !0)
|
|
797
797
|
]),
|
|
798
798
|
_: 1
|
|
799
799
|
})
|
|
@@ -802,94 +802,94 @@ const dr = async (r, a) => {
|
|
|
802
802
|
});
|
|
803
803
|
};
|
|
804
804
|
}
|
|
805
|
-
}),
|
|
805
|
+
}), Ma = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, Na = /* @__PURE__ */ L({
|
|
806
806
|
__name: "icontool",
|
|
807
807
|
props: {
|
|
808
808
|
gridCtrl: {}
|
|
809
809
|
},
|
|
810
810
|
setup(r) {
|
|
811
|
-
const a = r, e = a.gridCtrl, { tools: t } =
|
|
811
|
+
const a = r, e = a.gridCtrl, { tools: t } = $a(a.gridCtrl), s = Ae();
|
|
812
812
|
M(
|
|
813
813
|
() => e.selectable.value,
|
|
814
|
-
(
|
|
815
|
-
ue(t, "tool.export.excel.selected") && (ue(t, "tool.export.excel.selected").disabled = !
|
|
814
|
+
(p) => {
|
|
815
|
+
ue(t, "tool.export.excel.selected") && (ue(t, "tool.export.excel.selected").disabled = !p), ue(t, "tool.export.pdf.selected") && (ue(t, "tool.export.pdf.selected").disabled = !p);
|
|
816
816
|
}
|
|
817
817
|
);
|
|
818
|
-
const i =
|
|
818
|
+
const i = S([]);
|
|
819
819
|
M(
|
|
820
820
|
() => e.columns.value,
|
|
821
|
-
(
|
|
822
|
-
i.value =
|
|
821
|
+
(p) => {
|
|
822
|
+
i.value = et(p, !0);
|
|
823
823
|
},
|
|
824
824
|
{ deep: !0, immediate: !0 }
|
|
825
825
|
);
|
|
826
826
|
const o = () => {
|
|
827
|
-
e.columns.value.splice(0, e.columns.value.length, ...i.value), s.setTableColumns(
|
|
827
|
+
e.columns.value.splice(0, e.columns.value.length, ...i.value), s.setTableColumns(pe.currentRoute.value.path, e.columns.value);
|
|
828
828
|
};
|
|
829
|
-
return (
|
|
830
|
-
(
|
|
831
|
-
key:
|
|
829
|
+
return (p, d) => (c(), x("div", Ma, [
|
|
830
|
+
(c(!0), x(U, null, Y(l(t), (u, v) => (c(), x(U, {
|
|
831
|
+
key: u.key
|
|
832
832
|
}, [
|
|
833
|
-
l(J)(
|
|
833
|
+
l(J)(u) && u.dropdown ? (c(), k(l(Re), {
|
|
834
834
|
key: 0,
|
|
835
835
|
placement: "bottomRight",
|
|
836
836
|
class: "p-0 rounded-none"
|
|
837
837
|
}, {
|
|
838
|
-
overlay:
|
|
839
|
-
|
|
840
|
-
class:
|
|
838
|
+
overlay: y(() => [
|
|
839
|
+
E("div", {
|
|
840
|
+
class: B(["min-w-[100px] bg-white rounded shadow-md p-4", u.dropdownClass])
|
|
841
841
|
}, [
|
|
842
|
-
|
|
842
|
+
u.dropdown === "headset" ? (c(), k(l(ma), {
|
|
843
843
|
key: 0,
|
|
844
844
|
modelValue: i.value,
|
|
845
|
-
"onUpdate:modelValue":
|
|
845
|
+
"onUpdate:modelValue": d[1] || (d[1] = (n) => i.value = n),
|
|
846
846
|
"item-key": "dataIndex",
|
|
847
847
|
onEnd: o,
|
|
848
848
|
handle: ".drag-handle"
|
|
849
849
|
}, {
|
|
850
|
-
default:
|
|
851
|
-
(
|
|
850
|
+
default: y(() => [
|
|
851
|
+
(c(!0), x(U, null, Y(i.value, (n) => (c(), x("div", {
|
|
852
852
|
key: n.name,
|
|
853
|
-
onClick:
|
|
853
|
+
onClick: d[0] || (d[0] = me(() => {
|
|
854
854
|
}, ["stop"])),
|
|
855
855
|
class: "flex items-center mb-2 last:mb-0 select-none"
|
|
856
856
|
}, [
|
|
857
|
-
|
|
858
|
-
D(l(
|
|
857
|
+
d[2] || (d[2] = E("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
|
|
858
|
+
D(l(Xt), {
|
|
859
859
|
checked: n.visible !== !1,
|
|
860
|
-
onChange:
|
|
860
|
+
onChange: me(
|
|
861
861
|
(m) => {
|
|
862
|
-
l(
|
|
862
|
+
l(Ta)(n, m.target.checked);
|
|
863
863
|
},
|
|
864
864
|
["stop", "prevent"]
|
|
865
865
|
),
|
|
866
866
|
class: "text-gray-700 hover:text-gray-900 select-none"
|
|
867
867
|
}, {
|
|
868
|
-
default:
|
|
869
|
-
|
|
868
|
+
default: y(() => [
|
|
869
|
+
j(I(n.title), 1)
|
|
870
870
|
]),
|
|
871
871
|
_: 2
|
|
872
872
|
}, 1032, ["checked", "onChange"])
|
|
873
873
|
]))), 128))
|
|
874
874
|
]),
|
|
875
875
|
_: 1
|
|
876
|
-
}, 8, ["modelValue"])) :
|
|
876
|
+
}, 8, ["modelValue"])) : C("", !0)
|
|
877
877
|
], 2)
|
|
878
878
|
]),
|
|
879
|
-
default:
|
|
879
|
+
default: y(() => [
|
|
880
880
|
D(l(ee), {
|
|
881
|
-
class:
|
|
881
|
+
class: B([
|
|
882
882
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
883
883
|
v === 0 ? "rounded-l-[5px]" : "",
|
|
884
884
|
v === l(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
885
885
|
]),
|
|
886
|
-
disabled: l(W)(
|
|
887
|
-
tiptext:
|
|
888
|
-
onClick: (n) => l(X)(
|
|
886
|
+
disabled: l(W)(u),
|
|
887
|
+
tiptext: u.label,
|
|
888
|
+
onClick: (n) => l(X)(u, l(e).page, l(e))
|
|
889
889
|
}, {
|
|
890
|
-
default:
|
|
891
|
-
D(l(
|
|
892
|
-
icon:
|
|
890
|
+
default: y(() => [
|
|
891
|
+
D(l(G), {
|
|
892
|
+
icon: u.icon,
|
|
893
893
|
class: "w-[18px] h-[18.5px]",
|
|
894
894
|
clickable: ""
|
|
895
895
|
}, null, 8, ["icon"])
|
|
@@ -898,39 +898,39 @@ const dr = async (r, a) => {
|
|
|
898
898
|
}, 1032, ["class", "disabled", "tiptext", "onClick"])
|
|
899
899
|
]),
|
|
900
900
|
_: 2
|
|
901
|
-
}, 1024)) : !
|
|
901
|
+
}, 1024)) : !u.children && l(J)(u) ? (c(), k(l(ee), {
|
|
902
902
|
key: 1,
|
|
903
|
-
class:
|
|
903
|
+
class: B([
|
|
904
904
|
"px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
905
905
|
v === 0 ? "rounded-l-[5px]" : "",
|
|
906
906
|
v === l(t).length - 1 ? "rounded-r-[5px]" : ""
|
|
907
907
|
]),
|
|
908
|
-
disabled: l(W)(
|
|
909
|
-
tiptext:
|
|
910
|
-
onClick: (n) => l(X)(
|
|
908
|
+
disabled: l(W)(u),
|
|
909
|
+
tiptext: u.label,
|
|
910
|
+
onClick: (n) => l(X)(u, l(e).page, l(e))
|
|
911
911
|
}, {
|
|
912
|
-
default:
|
|
913
|
-
D(l(
|
|
914
|
-
icon:
|
|
912
|
+
default: y(() => [
|
|
913
|
+
D(l(G), {
|
|
914
|
+
icon: u.icon,
|
|
915
915
|
class: "w-[18px] h-[18.5px]",
|
|
916
916
|
clickable: ""
|
|
917
917
|
}, null, 8, ["icon"])
|
|
918
918
|
]),
|
|
919
919
|
_: 2
|
|
920
|
-
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : l(J)(
|
|
920
|
+
}, 1032, ["class", "disabled", "tiptext", "onClick"])) : l(J)(u) ? (c(), k(l(Re), {
|
|
921
921
|
key: 2,
|
|
922
922
|
placement: "bottomRight",
|
|
923
923
|
class: "p-0 rounded-none"
|
|
924
924
|
}, {
|
|
925
|
-
overlay:
|
|
926
|
-
D(l(
|
|
927
|
-
default:
|
|
928
|
-
(
|
|
925
|
+
overlay: y(() => [
|
|
926
|
+
D(l(Se), null, {
|
|
927
|
+
default: y(() => [
|
|
928
|
+
(c(!0), x(U, null, Y(u.children, (n) => (c(), k(l(Te), {
|
|
929
929
|
key: n.key,
|
|
930
930
|
disabled: l(W)(n)
|
|
931
931
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
|
|
932
|
+
default: y(() => [
|
|
933
|
+
j(I(n.label), 1)
|
|
934
934
|
]),
|
|
935
935
|
_: 2
|
|
936
936
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -938,20 +938,20 @@ const dr = async (r, a) => {
|
|
|
938
938
|
_: 2
|
|
939
939
|
}, 1024)
|
|
940
940
|
]),
|
|
941
|
-
default:
|
|
941
|
+
default: y(() => [
|
|
942
942
|
D(l(ee), {
|
|
943
|
-
class:
|
|
943
|
+
class: B([
|
|
944
944
|
"!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
|
|
945
945
|
v === 0 ? "rounded-l-[5px]" : ""
|
|
946
946
|
]),
|
|
947
|
-
disabled: l(W)(
|
|
948
|
-
tiptext:
|
|
949
|
-
icon:
|
|
947
|
+
disabled: l(W)(u),
|
|
948
|
+
tiptext: u.label,
|
|
949
|
+
icon: u.icon,
|
|
950
950
|
iconProps: { class: "w-[19px] h-[19px]" },
|
|
951
|
-
onClick: (n) => l(X)(
|
|
951
|
+
onClick: (n) => l(X)(u, l(e).page, l(e))
|
|
952
952
|
}, {
|
|
953
|
-
default:
|
|
954
|
-
D(l(
|
|
953
|
+
default: y(() => [
|
|
954
|
+
D(l(G), {
|
|
955
955
|
icon: "icon-down-arrow",
|
|
956
956
|
class: "w-[12px] h-[12px]"
|
|
957
957
|
})
|
|
@@ -960,79 +960,79 @@ const dr = async (r, a) => {
|
|
|
960
960
|
}, 8, ["class", "disabled", "tiptext", "icon", "onClick"])
|
|
961
961
|
]),
|
|
962
962
|
_: 2
|
|
963
|
-
}, 1024)) :
|
|
963
|
+
}, 1024)) : C("", !0)
|
|
964
964
|
], 64))), 128))
|
|
965
965
|
]));
|
|
966
966
|
}
|
|
967
|
-
}),
|
|
967
|
+
}), Ra = { class: "flex justify-between mb-[10px]" }, Ba = { key: 1 }, Aa = 3, _t = /* @__PURE__ */ L({
|
|
968
968
|
__name: "index",
|
|
969
969
|
props: {
|
|
970
970
|
gridCtrl: {},
|
|
971
971
|
editorCtrl: {}
|
|
972
972
|
},
|
|
973
973
|
setup(r) {
|
|
974
|
-
const a = r, e = a.gridCtrl, t = e.page, s = a.editorCtrl, i =
|
|
974
|
+
const a = r, e = a.gridCtrl, t = e.page, s = a.editorCtrl, i = K(() => pe.currentRoute.value.path), o = [
|
|
975
975
|
{
|
|
976
976
|
key: "New",
|
|
977
|
-
label:
|
|
977
|
+
label: g("webui.common.add"),
|
|
978
978
|
type: "primary",
|
|
979
979
|
icon: "icon-new",
|
|
980
980
|
danger: !0,
|
|
981
981
|
role: ["Super", "Admin"],
|
|
982
982
|
permit: ":new",
|
|
983
983
|
// 默认仅受权限码控制
|
|
984
|
-
click: () =>
|
|
984
|
+
click: () => Ft(s)
|
|
985
985
|
}
|
|
986
|
-
],
|
|
986
|
+
], p = S([]), d = S([]);
|
|
987
987
|
return M(
|
|
988
988
|
() => {
|
|
989
|
-
var
|
|
990
|
-
return (
|
|
989
|
+
var u;
|
|
990
|
+
return (u = e.buttons) == null ? void 0 : u.value;
|
|
991
991
|
},
|
|
992
992
|
() => {
|
|
993
993
|
var n;
|
|
994
|
-
const { buttons:
|
|
994
|
+
const { buttons: u, menus: v } = $e(
|
|
995
995
|
o,
|
|
996
|
-
e.flat !== void 0 ? e.flat :
|
|
996
|
+
e.flat !== void 0 ? e.flat : Aa,
|
|
997
997
|
(n = e.buttons) == null ? void 0 : n.value
|
|
998
998
|
);
|
|
999
|
-
|
|
999
|
+
p.value.splice(0, p.value.length, ...u), d.value.splice(0, d.value.length, ...v);
|
|
1000
1000
|
},
|
|
1001
1001
|
{
|
|
1002
1002
|
deep: !0,
|
|
1003
1003
|
immediate: !0
|
|
1004
1004
|
}
|
|
1005
|
-
), (
|
|
1005
|
+
), (u, v) => {
|
|
1006
1006
|
const n = ie("auth");
|
|
1007
|
-
return
|
|
1008
|
-
D(l(
|
|
1009
|
-
default:
|
|
1010
|
-
(
|
|
1007
|
+
return c(), x("div", Ra, [
|
|
1008
|
+
D(l(de), null, {
|
|
1009
|
+
default: y(() => [
|
|
1010
|
+
(c(!0), x(U, null, Y(p.value, (m) => Q((c(), k(l(ee), {
|
|
1011
1011
|
key: m.key,
|
|
1012
1012
|
type: m.type,
|
|
1013
1013
|
danger: m.danger,
|
|
1014
1014
|
disabled: l(W)(m),
|
|
1015
1015
|
icon: m.icon,
|
|
1016
|
-
onClick: (
|
|
1016
|
+
onClick: (f) => l(X)(m, l(t), l(e))
|
|
1017
1017
|
}, {
|
|
1018
|
-
default:
|
|
1019
|
-
|
|
1018
|
+
default: y(() => [
|
|
1019
|
+
j(I(m.label), 1)
|
|
1020
1020
|
]),
|
|
1021
1021
|
_: 2
|
|
1022
1022
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
1023
1023
|
[n, { url: i.value, role: m.role, permit: m.permit }]
|
|
1024
1024
|
])), 128)),
|
|
1025
|
-
|
|
1026
|
-
overlay:
|
|
1027
|
-
D(l(
|
|
1028
|
-
default:
|
|
1029
|
-
(
|
|
1025
|
+
d.value.length > 0 ? (c(), k(l(Re), { key: 0 }, {
|
|
1026
|
+
overlay: y(() => [
|
|
1027
|
+
D(l(Se), null, {
|
|
1028
|
+
default: y(() => [
|
|
1029
|
+
(c(!0), x(U, null, Y(d.value, (m) => Q((c(), k(l(Te), {
|
|
1030
1030
|
key: m.key,
|
|
1031
1031
|
disabled: l(W)(m),
|
|
1032
|
-
onClick: (
|
|
1032
|
+
onClick: (f) => l(X)(m, l(t), l(e))
|
|
1033
1033
|
}, {
|
|
1034
|
-
default:
|
|
1035
|
-
|
|
1034
|
+
default: y(() => [
|
|
1035
|
+
j(I(m.label), 1)
|
|
1036
1036
|
]),
|
|
1037
1037
|
_: 2
|
|
1038
1038
|
}, 1032, ["disabled", "onClick"])), [
|
|
@@ -1042,30 +1042,30 @@ const dr = async (r, a) => {
|
|
|
1042
1042
|
_: 1
|
|
1043
1043
|
})
|
|
1044
1044
|
]),
|
|
1045
|
-
default:
|
|
1045
|
+
default: y(() => [
|
|
1046
1046
|
D(l(ee), null, {
|
|
1047
|
-
default:
|
|
1048
|
-
|
|
1047
|
+
default: y(() => [
|
|
1048
|
+
j(I(l(g)("webui.common.moreActions")), 1)
|
|
1049
1049
|
]),
|
|
1050
1050
|
_: 1
|
|
1051
1051
|
})
|
|
1052
1052
|
]),
|
|
1053
1053
|
_: 1
|
|
1054
|
-
})) :
|
|
1055
|
-
|
|
1054
|
+
})) : C("", !0),
|
|
1055
|
+
p.value.length === 0 && d.value.length === 0 ? (c(), x("span", Ba)) : C("", !0)
|
|
1056
1056
|
]),
|
|
1057
1057
|
_: 1
|
|
1058
1058
|
}),
|
|
1059
|
-
D(l(
|
|
1060
|
-
default:
|
|
1061
|
-
(
|
|
1059
|
+
D(l(de), { class: "mr-1" }, {
|
|
1060
|
+
default: y(() => [
|
|
1061
|
+
(c(), k(st(Na), { "grid-ctrl": l(e) }, null, 8, ["grid-ctrl"]))
|
|
1062
1062
|
]),
|
|
1063
1063
|
_: 1
|
|
1064
1064
|
})
|
|
1065
1065
|
]);
|
|
1066
1066
|
};
|
|
1067
1067
|
}
|
|
1068
|
-
}),
|
|
1068
|
+
}), za = { class: "flex items-center justify-between" }, Oa = { class: "flex items-center space-x-2" }, br = /* @__PURE__ */ L({
|
|
1069
1069
|
inheritAttrs: !1,
|
|
1070
1070
|
__name: "index",
|
|
1071
1071
|
props: {
|
|
@@ -1078,92 +1078,92 @@ const dr = async (r, a) => {
|
|
|
1078
1078
|
statusDisabled: {}
|
|
1079
1079
|
},
|
|
1080
1080
|
setup(r) {
|
|
1081
|
-
const a = r, e = ne(), t = a.gridCtrl, s =
|
|
1081
|
+
const a = r, e = ne(), t = a.gridCtrl, s = K(() => pe.currentRoute.value.path);
|
|
1082
1082
|
t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
|
|
1083
|
-
const i =
|
|
1083
|
+
const i = S(t.pageSize.value), o = S(t.pageNo.value), p = S([]), d = S({
|
|
1084
1084
|
total: 0,
|
|
1085
1085
|
current: 1,
|
|
1086
1086
|
pageSize: i.value,
|
|
1087
|
-
showTotal: (v) =>
|
|
1087
|
+
showTotal: (v) => g("webui.common.total", [v]),
|
|
1088
1088
|
onChange: (v, n) => {
|
|
1089
|
-
|
|
1089
|
+
d.value !== !1 && (d.value.current = v, d.value.pageSize = n), i.value = n, o.value = v, t && (t.pageNo.value = v, t.pageSize.value = n, t.remotePage && he(t));
|
|
1090
1090
|
},
|
|
1091
1091
|
...a.pagination === !1 ? {} : a.pagination
|
|
1092
1092
|
});
|
|
1093
|
-
a.pagination === !1 && (
|
|
1093
|
+
a.pagination === !1 && (d.value = !1), M(
|
|
1094
1094
|
() => t.tableData.value,
|
|
1095
1095
|
(v) => {
|
|
1096
|
-
v && (
|
|
1096
|
+
v && (p.value = v, d.value !== !1 && (d.value.total = t.total.value ?? 0, d.value.current = t.pageNo.value ?? 1, d.value.pageSize = t.pageSize.value ?? 10));
|
|
1097
1097
|
},
|
|
1098
1098
|
{ immediate: !0 }
|
|
1099
1099
|
), M(
|
|
1100
1100
|
() => a.listData,
|
|
1101
1101
|
(v) => {
|
|
1102
|
-
v && (
|
|
1102
|
+
v && (p.value = v, d.value !== !1 && (d.value.total = v.length, d.value.current = t.pageNo.value ?? 1, d.value.pageSize = t.pageSize.value ?? 10));
|
|
1103
1103
|
},
|
|
1104
1104
|
{ immediate: !0 }
|
|
1105
1105
|
);
|
|
1106
|
-
const
|
|
1107
|
-
return
|
|
1108
|
-
|
|
1109
|
-
}),
|
|
1110
|
-
var v, n, m,
|
|
1111
|
-
t.page && ((v = t.gridUrl) != null && v.url) && (((n = t.gridUrl) == null ? void 0 : n.url) === ((m = t.page.urls.list) == null ? void 0 : m.url) && (t.remotePage = !1), ((
|
|
1112
|
-
|
|
1106
|
+
const u = S(!1);
|
|
1107
|
+
return Ce(() => {
|
|
1108
|
+
u.value && t && t.autoload && (t.reload.value = !0);
|
|
1109
|
+
}), _e(oe.GridControl, t), le(async () => {
|
|
1110
|
+
var v, n, m, f, w;
|
|
1111
|
+
t.page && ((v = t.gridUrl) != null && v.url) && (((n = t.gridUrl) == null ? void 0 : n.url) === ((m = t.page.urls.list) == null ? void 0 : m.url) && (t.remotePage = !1), ((f = t.gridUrl) == null ? void 0 : f.url) === ((w = t.page.urls.find) == null ? void 0 : w.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, d.value !== !1 && (d.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await he(t)).rows : p.value = await tt(t)), setTimeout(() => {
|
|
1112
|
+
u.value = !0;
|
|
1113
1113
|
}, 50);
|
|
1114
1114
|
}), (v, n) => {
|
|
1115
|
-
var
|
|
1115
|
+
var f, w;
|
|
1116
1116
|
const m = ie("auth");
|
|
1117
|
-
return
|
|
1118
|
-
(
|
|
1117
|
+
return c(), x(U, null, [
|
|
1118
|
+
(f = l(t).buttons) != null && f.value.length || (w = l(t).tools) != null && w.length ? (c(), k(_t, {
|
|
1119
1119
|
key: 0,
|
|
1120
1120
|
"grid-ctrl": l(t),
|
|
1121
1121
|
"editor-ctrl": l(t).editor
|
|
1122
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
1123
|
-
|
|
1122
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : C("", !0),
|
|
1123
|
+
u.value ? (c(), k(l(Zt), N({
|
|
1124
1124
|
key: 1,
|
|
1125
1125
|
class: "w-full min-h-[480px]",
|
|
1126
1126
|
grid: a.grid,
|
|
1127
|
-
"data-source":
|
|
1127
|
+
"data-source": p.value,
|
|
1128
1128
|
loading: l(t).isGridLoading.value,
|
|
1129
|
-
pagination:
|
|
1129
|
+
pagination: d.value
|
|
1130
1130
|
}, l(e)), {
|
|
1131
|
-
renderItem:
|
|
1132
|
-
D(l(
|
|
1133
|
-
default:
|
|
1134
|
-
D(l(
|
|
1131
|
+
renderItem: y(({ item: $ }) => [
|
|
1132
|
+
D(l(ea), { class: "!m-0 !p-0" }, {
|
|
1133
|
+
default: y(() => [
|
|
1134
|
+
D(l(ta), {
|
|
1135
1135
|
class: "!m-0",
|
|
1136
1136
|
"head-style": { fontSize: "14px", padding: "8px", minHeight: "36px", height: "36px" },
|
|
1137
1137
|
"body-style": { padding: "4px" }
|
|
1138
1138
|
}, {
|
|
1139
|
-
title:
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
Q(D(
|
|
1144
|
-
checked:
|
|
1145
|
-
"onUpdate:checked": (_) =>
|
|
1146
|
-
disabled: r.statusDisabled ? r.statusDisabled(
|
|
1147
|
-
data: l(
|
|
1148
|
-
onClick: (_) => l(
|
|
1139
|
+
title: y(() => [
|
|
1140
|
+
E("div", za, [
|
|
1141
|
+
E("span", null, I($[a.titleField]), 1),
|
|
1142
|
+
E("div", Oa, [
|
|
1143
|
+
Q(D(at, {
|
|
1144
|
+
checked: $[l(t).statusKey],
|
|
1145
|
+
"onUpdate:checked": (_) => $[l(t).statusKey] = _,
|
|
1146
|
+
disabled: r.statusDisabled ? r.statusDisabled($) : !1,
|
|
1147
|
+
data: l(ze).EnableDisable,
|
|
1148
|
+
onClick: (_) => l(lt)(l(t), $),
|
|
1149
1149
|
size: "small",
|
|
1150
|
-
class:
|
|
1150
|
+
class: B([
|
|
1151
1151
|
"relative mt-[3px] transform scale-[1.1]",
|
|
1152
|
-
r.statusDisabled && r.statusDisabled(
|
|
1152
|
+
r.statusDisabled && r.statusDisabled($) ? "cursor-not-allowed disabled" : ""
|
|
1153
1153
|
]),
|
|
1154
|
-
loading:
|
|
1154
|
+
loading: $.isLoading
|
|
1155
1155
|
}, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"]), [
|
|
1156
1156
|
[m, { url: s.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
|
|
1157
1157
|
]),
|
|
1158
|
-
D(
|
|
1159
|
-
record:
|
|
1158
|
+
D(Ua, {
|
|
1159
|
+
record: $,
|
|
1160
1160
|
"grid-ctrl": l(t)
|
|
1161
1161
|
}, null, 8, ["record", "grid-ctrl"])
|
|
1162
1162
|
])
|
|
1163
1163
|
])
|
|
1164
1164
|
]),
|
|
1165
|
-
default:
|
|
1166
|
-
|
|
1165
|
+
default: y(() => [
|
|
1166
|
+
z(v.$slots, "cardContent", { record: $ })
|
|
1167
1167
|
]),
|
|
1168
1168
|
_: 2
|
|
1169
1169
|
}, 1024)
|
|
@@ -1172,14 +1172,14 @@ const dr = async (r, a) => {
|
|
|
1172
1172
|
}, 1024)
|
|
1173
1173
|
]),
|
|
1174
1174
|
_: 3
|
|
1175
|
-
}, 16, ["grid", "data-source", "loading", "pagination"])) :
|
|
1175
|
+
}, 16, ["grid", "data-source", "loading", "pagination"])) : C("", !0)
|
|
1176
1176
|
], 64);
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
}),
|
|
1179
|
+
}), Ka = { class: "w-1/3 relative mb-1" }, ja = { class: "flex items-center w-[90%]" }, Va = { class: "flex-grow pl-1" }, Ya = {
|
|
1180
1180
|
key: 0,
|
|
1181
1181
|
class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
|
|
1182
|
-
},
|
|
1182
|
+
}, Ue = /* @__PURE__ */ L({
|
|
1183
1183
|
inheritAttrs: !1,
|
|
1184
1184
|
__name: "searchItem",
|
|
1185
1185
|
props: {
|
|
@@ -1188,25 +1188,25 @@ const dr = async (r, a) => {
|
|
|
1188
1188
|
rule: {}
|
|
1189
1189
|
},
|
|
1190
1190
|
setup(r) {
|
|
1191
|
-
const a = r, e = ne(), t =
|
|
1192
|
-
var
|
|
1191
|
+
const a = r, e = ne(), t = xe(oe.EditorControl, void 0), s = Qe(a, t), i = K(() => {
|
|
1192
|
+
var p;
|
|
1193
1193
|
if (!a.rule)
|
|
1194
1194
|
return !1;
|
|
1195
|
-
const o =
|
|
1196
|
-
return o ? (o.required || (s.value.errClass = "", s.value.msg = ""), o.required ?? !0) : (ae.error(
|
|
1195
|
+
const o = Je(a.rule.split("."), (p = t == null ? void 0 : t.formRules) == null ? void 0 : p.value);
|
|
1196
|
+
return o ? (o.required || (s.value.errClass = "", s.value.msg = ""), o.required ?? !0) : (ae.error(g("webui.components.content.searchItem.validationRuleNotFound", { label: a.label, rule: a.rule })), s.value.errClass = "text-[#ff4d4f]", s.value.msg = g("webui.components.content.searchItem.validationRuleNotFound", { label: a.label, rule: a.rule }), !0);
|
|
1197
1197
|
});
|
|
1198
|
-
return (o,
|
|
1199
|
-
D(l(
|
|
1198
|
+
return (o, p) => (c(), x("div", Ka, [
|
|
1199
|
+
D(l(ut), N({
|
|
1200
1200
|
required: i.value,
|
|
1201
1201
|
class: "w-[90%] relative"
|
|
1202
1202
|
}, l(e), {
|
|
1203
1203
|
class: [r.rule ? "" : "mb-3", r.width],
|
|
1204
1204
|
labelCol: { span: 6 }
|
|
1205
|
-
}),
|
|
1206
|
-
default:
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1205
|
+
}), nt({
|
|
1206
|
+
default: y(() => [
|
|
1207
|
+
E("div", ja, [
|
|
1208
|
+
E("div", Va, [
|
|
1209
|
+
z(o.$slots, "default")
|
|
1210
1210
|
])
|
|
1211
1211
|
])
|
|
1212
1212
|
]),
|
|
@@ -1214,18 +1214,18 @@ const dr = async (r, a) => {
|
|
|
1214
1214
|
}, [
|
|
1215
1215
|
r.label ? {
|
|
1216
1216
|
name: "label",
|
|
1217
|
-
fn:
|
|
1218
|
-
|
|
1219
|
-
class:
|
|
1220
|
-
},
|
|
1217
|
+
fn: y(() => [
|
|
1218
|
+
E("span", {
|
|
1219
|
+
class: B([l(s).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
1220
|
+
}, I(r.label), 3)
|
|
1221
1221
|
]),
|
|
1222
1222
|
key: "0"
|
|
1223
1223
|
} : void 0
|
|
1224
1224
|
]), 1040, ["required", "class"]),
|
|
1225
|
-
l(s).msg ? (
|
|
1225
|
+
l(s).msg ? (c(), x("span", Ya, I(l(s).msg), 1)) : C("", !0)
|
|
1226
1226
|
]));
|
|
1227
1227
|
}
|
|
1228
|
-
}),
|
|
1228
|
+
}), xr = /* @__PURE__ */ L({
|
|
1229
1229
|
__name: "index",
|
|
1230
1230
|
props: {
|
|
1231
1231
|
search: {},
|
|
@@ -1234,58 +1234,58 @@ const dr = async (r, a) => {
|
|
|
1234
1234
|
},
|
|
1235
1235
|
emits: ["update:search", "onsearch", "onreset"],
|
|
1236
1236
|
setup(r, { emit: a }) {
|
|
1237
|
-
const e = r, t = a, s =
|
|
1238
|
-
let
|
|
1239
|
-
for (let
|
|
1240
|
-
typeof
|
|
1241
|
-
return
|
|
1242
|
-
},
|
|
1243
|
-
i.value = 0, o.value = 0,
|
|
1237
|
+
const e = r, t = a, s = S(0), i = S(0), o = S(0), p = (f) => {
|
|
1238
|
+
let w = 0;
|
|
1239
|
+
for (let $ = 0; $ < f.length; $++)
|
|
1240
|
+
typeof f[$].type == "object" && w++;
|
|
1241
|
+
return w;
|
|
1242
|
+
}, d = Gt(), u = () => {
|
|
1243
|
+
i.value = 0, o.value = 0, d.default && (i.value = p(d.default({}))), e.gridCtrl && e.gridCtrl.searchBar && d.control && (o.value = p(d.control({}))), s.value = 2 - (i.value + o.value) % 3;
|
|
1244
1244
|
};
|
|
1245
1245
|
M(
|
|
1246
1246
|
() => {
|
|
1247
|
-
var
|
|
1248
|
-
return (
|
|
1247
|
+
var f;
|
|
1248
|
+
return (f = e.gridCtrl) == null ? void 0 : f.searchBar;
|
|
1249
1249
|
},
|
|
1250
1250
|
() => {
|
|
1251
|
-
|
|
1251
|
+
u();
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
1254
|
const v = JSON.parse(JSON.stringify(e.search));
|
|
1255
1255
|
le(() => {
|
|
1256
|
-
var
|
|
1257
|
-
|
|
1258
|
-
let
|
|
1256
|
+
var w;
|
|
1257
|
+
u();
|
|
1258
|
+
let f = { ...e.search };
|
|
1259
1259
|
e.gridCtrl && (e.gridCtrl.gridQuery = {
|
|
1260
1260
|
...e.gridCtrl.gridQuery,
|
|
1261
1261
|
Query: {
|
|
1262
|
-
...(
|
|
1263
|
-
...
|
|
1262
|
+
...(w = e.gridCtrl.gridQuery) == null ? void 0 : w.Query,
|
|
1263
|
+
...f
|
|
1264
1264
|
}
|
|
1265
1265
|
});
|
|
1266
1266
|
});
|
|
1267
1267
|
const n = () => {
|
|
1268
|
-
var
|
|
1269
|
-
let
|
|
1268
|
+
var w;
|
|
1269
|
+
let f = { ...e.search };
|
|
1270
1270
|
if (e.likeFields)
|
|
1271
|
-
for (const
|
|
1272
|
-
|
|
1271
|
+
for (const $ of e.likeFields)
|
|
1272
|
+
f[$] && (f[$] = { $like: "%" + f[$] + "%" });
|
|
1273
1273
|
e.gridCtrl && (e.gridCtrl.gridQuery = {
|
|
1274
1274
|
...e.gridCtrl.gridQuery,
|
|
1275
1275
|
Query: {
|
|
1276
|
-
...(
|
|
1277
|
-
...
|
|
1276
|
+
...(w = e.gridCtrl.gridQuery) == null ? void 0 : w.Query,
|
|
1277
|
+
...f
|
|
1278
1278
|
}
|
|
1279
|
-
}, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), t("onsearch",
|
|
1279
|
+
}, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), t("onsearch", f);
|
|
1280
1280
|
}, m = () => {
|
|
1281
|
-
const
|
|
1282
|
-
for (const
|
|
1283
|
-
|
|
1284
|
-
t("update:search",
|
|
1281
|
+
const f = JSON.parse(JSON.stringify(v));
|
|
1282
|
+
for (const w in e.search)
|
|
1283
|
+
f[w] === void 0 && (f[w] = void 0);
|
|
1284
|
+
t("update:search", f), t("onreset");
|
|
1285
1285
|
};
|
|
1286
|
-
return (
|
|
1287
|
-
const
|
|
1288
|
-
return i.value + o.value > 0 ? Q((
|
|
1286
|
+
return (f, w) => {
|
|
1287
|
+
const $ = ie("submit");
|
|
1288
|
+
return i.value + o.value > 0 ? Q((c(), k(l(ct), {
|
|
1289
1289
|
key: 0,
|
|
1290
1290
|
"label-col": { flex: "60px" },
|
|
1291
1291
|
style: {
|
|
@@ -1294,34 +1294,34 @@ const dr = async (r, a) => {
|
|
|
1294
1294
|
},
|
|
1295
1295
|
class: "flex mb-[10px]"
|
|
1296
1296
|
}, {
|
|
1297
|
-
default:
|
|
1298
|
-
var _,
|
|
1297
|
+
default: y(() => {
|
|
1298
|
+
var _, T;
|
|
1299
1299
|
return [
|
|
1300
|
-
|
|
1301
|
-
(_ = r.gridCtrl) != null && _.searchBar ?
|
|
1302
|
-
s.value >= 1 ? (
|
|
1300
|
+
z(f.$slots, "default"),
|
|
1301
|
+
(_ = r.gridCtrl) != null && _.searchBar ? z(f.$slots, "control", { key: 0 }) : C("", !0),
|
|
1302
|
+
s.value >= 1 ? (c(), k(Ue, {
|
|
1303
1303
|
key: 1,
|
|
1304
1304
|
class: "w-1/3"
|
|
1305
|
-
})) :
|
|
1306
|
-
s.value >= 2 ? (
|
|
1305
|
+
})) : C("", !0),
|
|
1306
|
+
s.value >= 2 ? (c(), k(Ue, {
|
|
1307
1307
|
key: 2,
|
|
1308
1308
|
class: "w-1/3"
|
|
1309
|
-
})) :
|
|
1310
|
-
i.value || (
|
|
1309
|
+
})) : C("", !0),
|
|
1310
|
+
i.value || (T = r.gridCtrl) != null && T.searchBar ? (c(), k(Ue, {
|
|
1311
1311
|
key: 3,
|
|
1312
1312
|
class: "w-1/3 flex justify-end text-right pr-5",
|
|
1313
1313
|
"wrapper-col": { flex: "auto" }
|
|
1314
1314
|
}, {
|
|
1315
|
-
default:
|
|
1316
|
-
D(l(
|
|
1317
|
-
default:
|
|
1315
|
+
default: y(() => [
|
|
1316
|
+
D(l(de), null, {
|
|
1317
|
+
default: y(() => [
|
|
1318
1318
|
D(l(ee), {
|
|
1319
1319
|
type: "primary",
|
|
1320
1320
|
onClick: n,
|
|
1321
1321
|
icon: "icon-search"
|
|
1322
1322
|
}, {
|
|
1323
|
-
default:
|
|
1324
|
-
|
|
1323
|
+
default: y(() => [
|
|
1324
|
+
j(I(l(g)("webui.common.search")), 1)
|
|
1325
1325
|
]),
|
|
1326
1326
|
_: 1
|
|
1327
1327
|
}),
|
|
@@ -1329,8 +1329,8 @@ const dr = async (r, a) => {
|
|
|
1329
1329
|
onClick: m,
|
|
1330
1330
|
icon: "icon-reset"
|
|
1331
1331
|
}, {
|
|
1332
|
-
default:
|
|
1333
|
-
|
|
1332
|
+
default: y(() => [
|
|
1333
|
+
j(I(l(g)("webui.common.reset")), 1)
|
|
1334
1334
|
]),
|
|
1335
1335
|
_: 1
|
|
1336
1336
|
})
|
|
@@ -1339,51 +1339,51 @@ const dr = async (r, a) => {
|
|
|
1339
1339
|
})
|
|
1340
1340
|
]),
|
|
1341
1341
|
_: 1
|
|
1342
|
-
})) :
|
|
1342
|
+
})) : C("", !0)
|
|
1343
1343
|
];
|
|
1344
1344
|
}),
|
|
1345
1345
|
_: 3
|
|
1346
1346
|
})), [
|
|
1347
|
-
[
|
|
1348
|
-
]) :
|
|
1347
|
+
[$, n]
|
|
1348
|
+
]) : C("", !0);
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
}),
|
|
1351
|
+
}), Ga = /* @__PURE__ */ L({
|
|
1352
1352
|
__name: "tableOperate",
|
|
1353
1353
|
props: {
|
|
1354
1354
|
record: {},
|
|
1355
1355
|
gridCtrl: {}
|
|
1356
1356
|
},
|
|
1357
1357
|
setup(r) {
|
|
1358
|
-
const a = r, e = a.gridCtrl, t =
|
|
1358
|
+
const a = r, e = a.gridCtrl, t = K(() => pe.currentRoute.value.path), s = [
|
|
1359
1359
|
{
|
|
1360
1360
|
key: "Edit",
|
|
1361
|
-
label:
|
|
1361
|
+
label: g("webui.common.edit"),
|
|
1362
1362
|
type: "primary",
|
|
1363
1363
|
visible: !0,
|
|
1364
1364
|
role: ["Super", "Admin"],
|
|
1365
1365
|
permit: ":edit",
|
|
1366
|
-
click: () =>
|
|
1366
|
+
click: () => Xe(e, a.record)
|
|
1367
1367
|
},
|
|
1368
1368
|
{
|
|
1369
1369
|
key: "Delete",
|
|
1370
|
-
label:
|
|
1370
|
+
label: g("webui.common.delete"),
|
|
1371
1371
|
type: "primary",
|
|
1372
1372
|
visible: !0,
|
|
1373
1373
|
danger: !0,
|
|
1374
1374
|
role: ["Super", "Admin"],
|
|
1375
1375
|
permit: ":delete",
|
|
1376
1376
|
confirm: !0,
|
|
1377
|
-
confirmText:
|
|
1378
|
-
click: () =>
|
|
1377
|
+
confirmText: g("webui.components.content.table.confirmDelete"),
|
|
1378
|
+
click: () => Ze(e, a.record)
|
|
1379
1379
|
}
|
|
1380
|
-
], { buttons: i, menus: o } =
|
|
1381
|
-
if (typeof
|
|
1382
|
-
return
|
|
1383
|
-
if (typeof
|
|
1384
|
-
return W(
|
|
1380
|
+
], { buttons: i, menus: o } = $e(s, 0, e.operates), p = (d) => {
|
|
1381
|
+
if (typeof d.disabled == "boolean")
|
|
1382
|
+
return d.disabled;
|
|
1383
|
+
if (typeof d.disabled == "function")
|
|
1384
|
+
return W(d, a.record) ?? !1;
|
|
1385
1385
|
if (a.record.hasOwnProperty(e.statusKey))
|
|
1386
|
-
switch (
|
|
1386
|
+
switch (d.key) {
|
|
1387
1387
|
case "Edit":
|
|
1388
1388
|
return !a.record[e.statusKey];
|
|
1389
1389
|
// 启用时可编辑,停用时不可编辑
|
|
@@ -1392,92 +1392,92 @@ const dr = async (r, a) => {
|
|
|
1392
1392
|
}
|
|
1393
1393
|
return !1;
|
|
1394
1394
|
};
|
|
1395
|
-
return (
|
|
1395
|
+
return (d, u) => {
|
|
1396
1396
|
const v = ie("auth");
|
|
1397
|
-
return
|
|
1397
|
+
return c(), k(l(ye), { theme: {
|
|
1398
1398
|
token: {
|
|
1399
1399
|
fontSize: 13
|
|
1400
1400
|
}
|
|
1401
1401
|
} }, {
|
|
1402
|
-
default:
|
|
1403
|
-
D(l(
|
|
1404
|
-
default:
|
|
1405
|
-
(
|
|
1402
|
+
default: y(() => [
|
|
1403
|
+
D(l(de), null, {
|
|
1404
|
+
default: y(() => [
|
|
1405
|
+
(c(!0), x(U, null, Y(l(i), (n) => (c(), x(U, {
|
|
1406
1406
|
key: n.key
|
|
1407
1407
|
}, [
|
|
1408
|
-
l(J)(n, a.record) ? (
|
|
1408
|
+
l(J)(n, a.record) ? (c(), k(l(dt), {
|
|
1409
1409
|
key: 0,
|
|
1410
|
-
disabled:
|
|
1411
|
-
cancelText: l(
|
|
1412
|
-
okText: l(
|
|
1410
|
+
disabled: p(n) || !n.confirm,
|
|
1411
|
+
cancelText: l(g)("webui.common.no"),
|
|
1412
|
+
okText: l(g)("webui.common.yes"),
|
|
1413
1413
|
title: n.confirmText,
|
|
1414
1414
|
okButtonProps: { size: "small" },
|
|
1415
1415
|
cancelButtonProps: { size: "small" },
|
|
1416
1416
|
onConfirm: (m) => l(X)(n, l(e).page, l(e), a.record, !0)
|
|
1417
1417
|
}, {
|
|
1418
|
-
default:
|
|
1419
|
-
l(J)(n, a.record) ? Q((
|
|
1418
|
+
default: y(() => [
|
|
1419
|
+
l(J)(n, a.record) ? Q((c(), k(l(ft), {
|
|
1420
1420
|
key: n.key,
|
|
1421
1421
|
type: n.type ?? "text",
|
|
1422
1422
|
danger: n.danger,
|
|
1423
|
-
disabled:
|
|
1423
|
+
disabled: p(n),
|
|
1424
1424
|
onClick: (m) => l(X)(n, l(e).page, l(e), a.record),
|
|
1425
1425
|
size: "small",
|
|
1426
|
-
style:
|
|
1426
|
+
style: je({
|
|
1427
1427
|
padding: n.type ?? "0px 4px"
|
|
1428
1428
|
})
|
|
1429
1429
|
}, {
|
|
1430
|
-
default:
|
|
1431
|
-
|
|
1430
|
+
default: y(() => [
|
|
1431
|
+
j(I(n.label), 1)
|
|
1432
1432
|
]),
|
|
1433
1433
|
_: 2
|
|
1434
1434
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
1435
1435
|
[v, { url: t.value, role: n.role, permit: n.permit }]
|
|
1436
|
-
]) :
|
|
1436
|
+
]) : C("", !0)
|
|
1437
1437
|
]),
|
|
1438
1438
|
_: 2
|
|
1439
|
-
}, 1032, ["disabled", "cancelText", "okText", "title", "onConfirm"])) :
|
|
1439
|
+
}, 1032, ["disabled", "cancelText", "okText", "title", "onConfirm"])) : C("", !0)
|
|
1440
1440
|
], 64))), 128)),
|
|
1441
|
-
r.record[l(e).statusKey] == 1 ? (
|
|
1441
|
+
r.record[l(e).statusKey] == 1 ? (c(), k(l(ye), {
|
|
1442
1442
|
key: 0,
|
|
1443
1443
|
autoInsertSpaceInButton: !1
|
|
1444
1444
|
}, {
|
|
1445
|
-
default:
|
|
1446
|
-
l(o).length > 0 ? (
|
|
1445
|
+
default: y(() => [
|
|
1446
|
+
l(o).length > 0 ? (c(), k(l(pt), {
|
|
1447
1447
|
key: 0,
|
|
1448
1448
|
size: "small"
|
|
1449
1449
|
}, {
|
|
1450
|
-
overlay:
|
|
1451
|
-
D(l(
|
|
1452
|
-
default:
|
|
1453
|
-
(
|
|
1450
|
+
overlay: y(() => [
|
|
1451
|
+
D(l(Se), null, {
|
|
1452
|
+
default: y(() => [
|
|
1453
|
+
(c(!0), x(U, null, Y(l(o), (n) => (c(), x(U, {
|
|
1454
1454
|
key: n.key
|
|
1455
1455
|
}, [
|
|
1456
|
-
l(J)(n, a.record) ? Q((
|
|
1456
|
+
l(J)(n, a.record) ? Q((c(), k(l(Te), {
|
|
1457
1457
|
key: 0,
|
|
1458
|
-
disabled:
|
|
1458
|
+
disabled: p(n),
|
|
1459
1459
|
onClick: (m) => l(X)(n, l(e).page, l(e), a.record)
|
|
1460
1460
|
}, {
|
|
1461
|
-
default:
|
|
1462
|
-
|
|
1461
|
+
default: y(() => [
|
|
1462
|
+
j(I(n.label), 1)
|
|
1463
1463
|
]),
|
|
1464
1464
|
_: 2
|
|
1465
1465
|
}, 1032, ["disabled", "onClick"])), [
|
|
1466
1466
|
[v, { url: t.value, role: n.role, permit: n.permit }]
|
|
1467
|
-
]) :
|
|
1467
|
+
]) : C("", !0)
|
|
1468
1468
|
], 64))), 128))
|
|
1469
1469
|
]),
|
|
1470
1470
|
_: 1
|
|
1471
1471
|
})
|
|
1472
1472
|
]),
|
|
1473
|
-
default:
|
|
1474
|
-
|
|
1473
|
+
default: y(() => [
|
|
1474
|
+
j(I(l(g)("webui.components.content.table.more")) + " ", 1)
|
|
1475
1475
|
]),
|
|
1476
1476
|
_: 1
|
|
1477
|
-
})) :
|
|
1477
|
+
})) : C("", !0)
|
|
1478
1478
|
]),
|
|
1479
1479
|
_: 1
|
|
1480
|
-
})) :
|
|
1480
|
+
})) : C("", !0)
|
|
1481
1481
|
]),
|
|
1482
1482
|
_: 1
|
|
1483
1483
|
})
|
|
@@ -1486,7 +1486,7 @@ const dr = async (r, a) => {
|
|
|
1486
1486
|
});
|
|
1487
1487
|
};
|
|
1488
1488
|
}
|
|
1489
|
-
}),
|
|
1489
|
+
}), yr = /* @__PURE__ */ L({
|
|
1490
1490
|
inheritAttrs: !1,
|
|
1491
1491
|
__name: "index",
|
|
1492
1492
|
props: {
|
|
@@ -1499,126 +1499,129 @@ const dr = async (r, a) => {
|
|
|
1499
1499
|
statusDisabled: {}
|
|
1500
1500
|
},
|
|
1501
1501
|
setup(r) {
|
|
1502
|
-
const a = r, e = ne(), t = a.gridCtrl, s =
|
|
1502
|
+
const a = r, e = ne(), t = a.gridCtrl, s = K(() => pe.currentRoute.value.path);
|
|
1503
1503
|
t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
|
|
1504
|
-
const i =
|
|
1504
|
+
const i = S(t.pageSize.value), o = S(t.pageNo.value), p = S([]), d = S({
|
|
1505
1505
|
total: 0,
|
|
1506
1506
|
current: 1,
|
|
1507
1507
|
pageSize: i.value,
|
|
1508
|
-
showTotal: (
|
|
1509
|
-
onChange: (
|
|
1510
|
-
|
|
1508
|
+
showTotal: (f) => g("webui.common.total", [f]),
|
|
1509
|
+
onChange: (f, w) => {
|
|
1510
|
+
d.value !== !1 && (d.value.current = f, d.value.pageSize = w), i.value = w, o.value = f, t && (t.pageNo.value = f, t.pageSize.value = w, t.remotePage && he(t));
|
|
1511
1511
|
},
|
|
1512
1512
|
...a.pagination === !1 ? {} : a.pagination
|
|
1513
1513
|
});
|
|
1514
|
-
a.pagination === !1 && (
|
|
1514
|
+
a.pagination === !1 && (d.value = !1), M(
|
|
1515
1515
|
() => t.tableData.value,
|
|
1516
|
-
(
|
|
1517
|
-
|
|
1516
|
+
(f) => {
|
|
1517
|
+
f && (p.value = f, d.value !== !1 && (d.value.total = t.total.value ?? 0, d.value.current = t.pageNo.value ?? 1, d.value.pageSize = t.pageSize.value ?? 10));
|
|
1518
1518
|
},
|
|
1519
1519
|
{ immediate: !0 }
|
|
1520
1520
|
), M(
|
|
1521
1521
|
() => a.tableData,
|
|
1522
|
-
(
|
|
1523
|
-
|
|
1522
|
+
(f) => {
|
|
1523
|
+
f && (p.value = f, d.value !== !1 && (d.value.total = f.length, d.value.current = t.pageNo.value ?? 1, d.value.pageSize = t.pageSize.value ?? 10));
|
|
1524
1524
|
},
|
|
1525
1525
|
{ immediate: !0 }
|
|
1526
1526
|
);
|
|
1527
|
-
const
|
|
1528
|
-
onChange: (
|
|
1529
|
-
t && (t.selectKeys.value =
|
|
1527
|
+
const u = S(t.columns.value), v = {
|
|
1528
|
+
onChange: (f, w) => {
|
|
1529
|
+
t && (t.selectKeys.value = f, t.selectRows.value = w);
|
|
1530
1530
|
},
|
|
1531
1531
|
columnWidth: "30px",
|
|
1532
|
-
getCheckboxProps: (
|
|
1533
|
-
disabled:
|
|
1532
|
+
getCheckboxProps: (f) => ({
|
|
1533
|
+
disabled: f.Enabled === 0
|
|
1534
1534
|
}),
|
|
1535
1535
|
...a.rowSelection
|
|
1536
|
-
}, n =
|
|
1536
|
+
}, n = S(v);
|
|
1537
1537
|
M(
|
|
1538
1538
|
() => t.selectable.value,
|
|
1539
|
-
(
|
|
1540
|
-
t && (n.value =
|
|
1539
|
+
(f) => {
|
|
1540
|
+
t && (n.value = f ? v : void 0);
|
|
1541
1541
|
},
|
|
1542
1542
|
{ immediate: !0 }
|
|
1543
1543
|
), M(
|
|
1544
1544
|
() => t.columns.value,
|
|
1545
1545
|
() => {
|
|
1546
|
-
|
|
1546
|
+
u.value = et(t.columns.value);
|
|
1547
1547
|
},
|
|
1548
1548
|
{ deep: !0, immediate: !0 }
|
|
1549
1549
|
);
|
|
1550
|
-
const m =
|
|
1551
|
-
return
|
|
1550
|
+
const m = S(!1);
|
|
1551
|
+
return Ce(() => {
|
|
1552
1552
|
m.value && t && t.autoload && (t.reload.value = !0);
|
|
1553
|
-
}),
|
|
1554
|
-
var
|
|
1555
|
-
t.page && ((
|
|
1553
|
+
}), _e(oe.GridControl, t), le(async () => {
|
|
1554
|
+
var f, w, $, _, T;
|
|
1555
|
+
t.page && ((f = t.gridUrl) != null && f.url) && (((w = t.gridUrl) == null ? void 0 : w.url) === (($ = t.page.urls.list) == null ? void 0 : $.url) && (t.remotePage = !1), ((_ = t.gridUrl) == null ? void 0 : _.url) === ((T = t.page.urls.find) == null ? void 0 : T.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, d.value !== !1 && (d.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await he(t)).rows : p.value = await tt(t)), setTimeout(() => {
|
|
1556
1556
|
m.value = !0;
|
|
1557
1557
|
}, 50);
|
|
1558
|
-
}), (
|
|
1559
|
-
var _,
|
|
1560
|
-
const
|
|
1561
|
-
return
|
|
1562
|
-
(_ = l(t).buttons) != null && _.value.length || (
|
|
1558
|
+
}), (f, w) => {
|
|
1559
|
+
var _, T;
|
|
1560
|
+
const $ = ie("auth");
|
|
1561
|
+
return c(), x(U, null, [
|
|
1562
|
+
(_ = l(t).buttons) != null && _.value.length || (T = l(t).tools) != null && T.length ? (c(), k(_t, {
|
|
1563
1563
|
key: 0,
|
|
1564
1564
|
"grid-ctrl": l(t),
|
|
1565
1565
|
"editor-ctrl": l(t).editor
|
|
1566
|
-
}, null, 8, ["grid-ctrl", "editor-ctrl"])) :
|
|
1567
|
-
m.value ? (
|
|
1566
|
+
}, null, 8, ["grid-ctrl", "editor-ctrl"])) : C("", !0),
|
|
1567
|
+
m.value ? (c(), k(l(vt), N({
|
|
1568
1568
|
key: 1,
|
|
1569
1569
|
class: "w-full min-h-[480px]",
|
|
1570
1570
|
"row-key": a.primaryKey ?? l(t).primaryKey ?? "Id",
|
|
1571
|
-
"data-source":
|
|
1571
|
+
"data-source": p.value,
|
|
1572
1572
|
loading: l(t).isGridLoading.value,
|
|
1573
|
-
columns:
|
|
1574
|
-
pagination:
|
|
1573
|
+
columns: u.value,
|
|
1574
|
+
pagination: d.value,
|
|
1575
1575
|
"row-selection": n.value,
|
|
1576
1576
|
scroll: a.scroll || { x: 700 },
|
|
1577
1577
|
size: l(t).tableSize.value,
|
|
1578
1578
|
bordered: ""
|
|
1579
1579
|
}, l(e)), {
|
|
1580
|
-
|
|
1581
|
-
|
|
1580
|
+
emptyText: y(() => [
|
|
1581
|
+
j(I(l(g)("webui.common.noData")), 1)
|
|
1582
|
+
]),
|
|
1583
|
+
bodyCell: y((h) => {
|
|
1584
|
+
var b, R;
|
|
1582
1585
|
return [
|
|
1583
|
-
|
|
1584
|
-
column:
|
|
1585
|
-
record:
|
|
1586
|
+
z(f.$slots, "bodyCell", {
|
|
1587
|
+
column: h == null ? void 0 : h.column,
|
|
1588
|
+
record: h == null ? void 0 : h.record
|
|
1586
1589
|
}),
|
|
1587
|
-
l(t) && ((b =
|
|
1590
|
+
l(t) && ((b = h == null ? void 0 : h.column) == null ? void 0 : b.dataIndex) === "enabled" ? Q((c(), k(at, {
|
|
1588
1591
|
key: 0,
|
|
1589
|
-
checked:
|
|
1590
|
-
"onUpdate:checked": (
|
|
1591
|
-
disabled: r.statusDisabled ? r.statusDisabled(
|
|
1592
|
-
data: l(
|
|
1593
|
-
onClick: (
|
|
1594
|
-
class:
|
|
1592
|
+
checked: h.record[l(t).statusKey],
|
|
1593
|
+
"onUpdate:checked": (V) => h.record[l(t).statusKey] = V,
|
|
1594
|
+
disabled: r.statusDisabled ? r.statusDisabled(h.record) : !1,
|
|
1595
|
+
data: l(ze).EnableDisable,
|
|
1596
|
+
onClick: (V) => l(lt)(l(t), h.record),
|
|
1597
|
+
class: B([
|
|
1595
1598
|
"w-[58px]",
|
|
1596
|
-
r.statusDisabled && r.statusDisabled(
|
|
1599
|
+
r.statusDisabled && r.statusDisabled(h.record) ? "cursor-not-allowed disabled" : ""
|
|
1597
1600
|
]),
|
|
1598
|
-
loading:
|
|
1601
|
+
loading: h == null ? void 0 : h.record.isLoading
|
|
1599
1602
|
}, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
|
|
1600
|
-
[
|
|
1601
|
-
]) :
|
|
1602
|
-
l(t) && ((
|
|
1603
|
+
[$, { url: s.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
|
|
1604
|
+
]) : C("", !0),
|
|
1605
|
+
l(t) && ((R = h == null ? void 0 : h.column) == null ? void 0 : R.dataIndex) === "operation" ? z(f.$slots, "operate", {
|
|
1603
1606
|
key: 1,
|
|
1604
|
-
record:
|
|
1607
|
+
record: h == null ? void 0 : h.record
|
|
1605
1608
|
}, () => [
|
|
1606
|
-
D(
|
|
1607
|
-
record:
|
|
1609
|
+
D(Ga, {
|
|
1610
|
+
record: h == null ? void 0 : h.record,
|
|
1608
1611
|
"grid-ctrl": l(t)
|
|
1609
1612
|
}, null, 8, ["record", "grid-ctrl"])
|
|
1610
|
-
]) :
|
|
1613
|
+
]) : C("", !0)
|
|
1611
1614
|
];
|
|
1612
1615
|
}),
|
|
1613
1616
|
_: 3
|
|
1614
|
-
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) :
|
|
1617
|
+
}, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : C("", !0)
|
|
1615
1618
|
], 64);
|
|
1616
1619
|
};
|
|
1617
1620
|
}
|
|
1618
|
-
}),
|
|
1621
|
+
}), Wa = { class: "flex items-center" }, Ha = ["onClick"], qa = {
|
|
1619
1622
|
key: 1,
|
|
1620
1623
|
class: "w-[1px] h-[16px] bg-[#d9d9d9] mx-[8px]"
|
|
1621
|
-
},
|
|
1624
|
+
}, Me = /* @__PURE__ */ L({
|
|
1622
1625
|
__name: "groupTools",
|
|
1623
1626
|
props: {
|
|
1624
1627
|
groupTools: {},
|
|
@@ -1628,28 +1631,28 @@ const dr = async (r, a) => {
|
|
|
1628
1631
|
const a = (e, t) => {
|
|
1629
1632
|
t.mode === "toggle" && (t.selected = t.selected === e.key ? void 0 : e.key), X(e), e.click && typeof e.click == "function" && e.click(e);
|
|
1630
1633
|
};
|
|
1631
|
-
return (e, t) => (
|
|
1632
|
-
(
|
|
1633
|
-
s.type === "tools" ? (
|
|
1634
|
+
return (e, t) => (c(), x("div", Wa, [
|
|
1635
|
+
(c(!0), x(U, null, Y(r.groupTools, (s, i) => (c(), x(U, { key: i }, [
|
|
1636
|
+
s.type === "tools" ? (c(), x("div", {
|
|
1634
1637
|
key: 0,
|
|
1635
|
-
class:
|
|
1638
|
+
class: B([
|
|
1636
1639
|
"inline-flex",
|
|
1637
1640
|
r.groupClass || "",
|
|
1638
1641
|
s.class || ""
|
|
1639
1642
|
])
|
|
1640
1643
|
}, [
|
|
1641
|
-
(
|
|
1642
|
-
var
|
|
1643
|
-
return
|
|
1644
|
+
(c(!0), x(U, null, Y(s.tools, (o, p) => {
|
|
1645
|
+
var d, u;
|
|
1646
|
+
return c(), x(U, {
|
|
1644
1647
|
key: o.key
|
|
1645
1648
|
}, [
|
|
1646
|
-
l(J)(o) && !o.children && !o.component ? (
|
|
1649
|
+
l(J)(o) && !o.children && !o.component ? (c(), k(l(ee), N({
|
|
1647
1650
|
key: 0,
|
|
1648
1651
|
class: [
|
|
1649
1652
|
s.mode === "toggle" && s.selected === o.key ? "px-[8px] py-[2px] relative border-[#1890ff] bg-[#1890ff] text-white rounded-none" : "px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666]",
|
|
1650
1653
|
"hover:z-10 hover:border-[#666]",
|
|
1651
|
-
|
|
1652
|
-
|
|
1654
|
+
p === 0 ? "rounded-l-[5px] ml-0" : "-ml-[1px]",
|
|
1655
|
+
p === (((d = s.tools) == null ? void 0 : d.length) || 0) - 1 ? "rounded-r-[5px]" : "",
|
|
1653
1656
|
o.class || "",
|
|
1654
1657
|
o.display === "icon" ? "px-[6px]" : "",
|
|
1655
1658
|
o.display === "text" ? "px-[8px]" : ""
|
|
@@ -1661,52 +1664,52 @@ const dr = async (r, a) => {
|
|
|
1661
1664
|
}, { ref_for: !0 }, o.props, {
|
|
1662
1665
|
onClick: (v) => a(o, s)
|
|
1663
1666
|
}), {
|
|
1664
|
-
default:
|
|
1665
|
-
o.display === "icon" && o.icon ? (
|
|
1667
|
+
default: y(() => [
|
|
1668
|
+
o.display === "icon" && o.icon ? (c(), k(l(G), N({
|
|
1666
1669
|
key: 0,
|
|
1667
1670
|
icon: o.icon,
|
|
1668
1671
|
class: ["w-[18px] h-[18.5px]", o.iconClass]
|
|
1669
|
-
}, { ref_for: !0 }, o.iconProps, { clickable: "" }), null, 16, ["icon", "class"])) : o.display === "text" && o.label ? (
|
|
1670
|
-
|
|
1671
|
-
], 64)) : (
|
|
1672
|
-
o.icon ? (
|
|
1672
|
+
}, { ref_for: !0 }, o.iconProps, { clickable: "" }), null, 16, ["icon", "class"])) : o.display === "text" && o.label ? (c(), x(U, { key: 1 }, [
|
|
1673
|
+
j(I(o.label), 1)
|
|
1674
|
+
], 64)) : (c(), x(U, { key: 2 }, [
|
|
1675
|
+
o.icon ? (c(), k(l(G), N({
|
|
1673
1676
|
key: 0,
|
|
1674
1677
|
icon: o.icon,
|
|
1675
1678
|
class: ["w-[18px] h-[18.5px] mr-[4px]", o.iconClass]
|
|
1676
|
-
}, { ref_for: !0 }, o.iconProps, { clickable: "" }), null, 16, ["icon", "class"])) :
|
|
1677
|
-
o.label ? (
|
|
1678
|
-
|
|
1679
|
-
], 64)) :
|
|
1679
|
+
}, { ref_for: !0 }, o.iconProps, { clickable: "" }), null, 16, ["icon", "class"])) : C("", !0),
|
|
1680
|
+
o.label ? (c(), x(U, { key: 1 }, [
|
|
1681
|
+
j(I(o.label), 1)
|
|
1682
|
+
], 64)) : C("", !0)
|
|
1680
1683
|
], 64))
|
|
1681
1684
|
]),
|
|
1682
1685
|
_: 2
|
|
1683
|
-
}, 1040, ["class", "type", "danger", "disabled", "tiptext", "onClick"])) : o.component ? (
|
|
1686
|
+
}, 1040, ["class", "type", "danger", "disabled", "tiptext", "onClick"])) : o.component ? (c(), x("div", {
|
|
1684
1687
|
key: 1,
|
|
1685
|
-
class:
|
|
1688
|
+
class: B([
|
|
1686
1689
|
s.mode === "toggle" && s.selected === o.key ? "p-0 relative border-[#1890ff] bg-[#1890ff] text-white rounded-none flex justify-center items-center" : "p-0 relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] flex justify-center items-center",
|
|
1687
1690
|
"hover:z-10 hover:border-[#666]",
|
|
1688
|
-
|
|
1689
|
-
|
|
1691
|
+
p === 0 ? "rounded-l-[5px] ml-0" : "-ml-[1px]",
|
|
1692
|
+
p === (((u = s.tools) == null ? void 0 : u.length) || 0) - 1 ? "rounded-r-[5px]" : "",
|
|
1690
1693
|
o.class || "",
|
|
1691
1694
|
l(W)(o) ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1692
1695
|
]),
|
|
1693
1696
|
onClick: (v) => !l(W)(o) && a(o, s)
|
|
1694
1697
|
}, [
|
|
1695
|
-
(
|
|
1698
|
+
(c(), k(st(o.component), N({ ref_for: !0 }, {
|
|
1696
1699
|
...o.props,
|
|
1697
1700
|
disabled: l(W)(o)
|
|
1698
1701
|
}), null, 16))
|
|
1699
|
-
], 10,
|
|
1702
|
+
], 10, Ha)) : C("", !0)
|
|
1700
1703
|
], 64);
|
|
1701
1704
|
}), 128))
|
|
1702
|
-
], 2)) : s.type === "split" ? (
|
|
1705
|
+
], 2)) : s.type === "split" ? (c(), x("div", qa)) : s.type === "space" ? (c(), x("div", {
|
|
1703
1706
|
key: 2,
|
|
1704
|
-
class:
|
|
1705
|
-
}, null, 2)) :
|
|
1707
|
+
class: B(s.width ? s.width : "flex-1")
|
|
1708
|
+
}, null, 2)) : C("", !0)
|
|
1706
1709
|
], 64))), 128))
|
|
1707
1710
|
]));
|
|
1708
1711
|
}
|
|
1709
|
-
}),
|
|
1712
|
+
}), Qa = { class: "flex items-center gap-1" }, Ja = { class: "text-nowrap" }, wr = /* @__PURE__ */ L({
|
|
1710
1713
|
__name: "index",
|
|
1711
1714
|
props: {
|
|
1712
1715
|
treeCtrl: {},
|
|
@@ -1715,13 +1718,13 @@ const dr = async (r, a) => {
|
|
|
1715
1718
|
},
|
|
1716
1719
|
emits: ["select", "update:selectedKeys"],
|
|
1717
1720
|
setup(r, { emit: a }) {
|
|
1718
|
-
const e = r, t = ne(), s = e.treeCtrl, i =
|
|
1721
|
+
const e = r, t = ne(), s = e.treeCtrl, i = S([]);
|
|
1719
1722
|
M(
|
|
1720
1723
|
() => s.data.value,
|
|
1721
1724
|
(v) => {
|
|
1722
1725
|
if (v) {
|
|
1723
|
-
i.value = s.fieldMap ?
|
|
1724
|
-
const n =
|
|
1726
|
+
i.value = s.fieldMap ? be(s.fieldMap, v) : v;
|
|
1727
|
+
const n = Pt(i.value, p.value[0]);
|
|
1725
1728
|
if (n) {
|
|
1726
1729
|
const m = {
|
|
1727
1730
|
event: "select",
|
|
@@ -1735,29 +1738,29 @@ const dr = async (r, a) => {
|
|
|
1735
1738
|
selected: !0,
|
|
1736
1739
|
selectedNodes: [n]
|
|
1737
1740
|
};
|
|
1738
|
-
p
|
|
1741
|
+
u(p.value, m);
|
|
1739
1742
|
}
|
|
1740
1743
|
}
|
|
1741
1744
|
}
|
|
1742
1745
|
);
|
|
1743
|
-
const o = a,
|
|
1746
|
+
const o = a, p = S([]);
|
|
1744
1747
|
M(
|
|
1745
1748
|
() => e.selectedKeys,
|
|
1746
1749
|
(v) => {
|
|
1747
|
-
v && (
|
|
1750
|
+
v && (p.value = v);
|
|
1748
1751
|
},
|
|
1749
1752
|
{ immediate: !0 }
|
|
1750
1753
|
);
|
|
1751
|
-
const
|
|
1754
|
+
const d = S(["-"]);
|
|
1752
1755
|
M(
|
|
1753
1756
|
() => e.expandedKeys,
|
|
1754
1757
|
(v) => {
|
|
1755
|
-
v && (
|
|
1758
|
+
v && (d.value = v);
|
|
1756
1759
|
},
|
|
1757
1760
|
{ immediate: !0 }
|
|
1758
1761
|
);
|
|
1759
|
-
const
|
|
1760
|
-
v.length === 0 && v.push(...
|
|
1762
|
+
const u = (v, n) => {
|
|
1763
|
+
v.length === 0 && v.push(...p.value), v.length > 0 && (s.node.value = n == null ? void 0 : n.node.dataRef), p.value = v, o("update:selectedKeys", v), o("select", v, n);
|
|
1761
1764
|
};
|
|
1762
1765
|
return le(() => {
|
|
1763
1766
|
s.fieldMap || (s.fieldMap = {
|
|
@@ -1765,54 +1768,54 @@ const dr = async (r, a) => {
|
|
|
1765
1768
|
key: "Id",
|
|
1766
1769
|
value: "Id",
|
|
1767
1770
|
icon: "Icon"
|
|
1768
|
-
}), s.data.value ? i.value =
|
|
1769
|
-
}), (v, n) => (
|
|
1771
|
+
}), s.data.value ? i.value = be(s.fieldMap, s.data.value) : s.autoload && rt(s);
|
|
1772
|
+
}), (v, n) => (c(), k(l(aa), N({
|
|
1770
1773
|
class: "w-full",
|
|
1771
1774
|
"show-line": !0,
|
|
1772
1775
|
"tree-data": i.value,
|
|
1773
|
-
"expanded-keys":
|
|
1774
|
-
"onUpdate:expandedKeys": n[0] || (n[0] = (m) =>
|
|
1775
|
-
"selected-keys":
|
|
1776
|
+
"expanded-keys": d.value,
|
|
1777
|
+
"onUpdate:expandedKeys": n[0] || (n[0] = (m) => d.value = m),
|
|
1778
|
+
"selected-keys": p.value,
|
|
1776
1779
|
loading: l(s).isTreeLoading,
|
|
1777
|
-
onSelect:
|
|
1780
|
+
onSelect: u
|
|
1778
1781
|
}, l(t)), {
|
|
1779
|
-
title:
|
|
1780
|
-
|
|
1781
|
-
label:
|
|
1782
|
+
title: y(({ key: m, label: f, icon: w }) => [
|
|
1783
|
+
z(v.$slots, "title", {
|
|
1784
|
+
label: f,
|
|
1782
1785
|
key: m,
|
|
1783
|
-
icon:
|
|
1786
|
+
icon: w
|
|
1784
1787
|
}, () => [
|
|
1785
|
-
|
|
1786
|
-
D(l(
|
|
1787
|
-
|
|
1788
|
+
E("div", Qa, [
|
|
1789
|
+
D(l(G), { icon: w }, null, 8, ["icon"]),
|
|
1790
|
+
E("span", Ja, I(f), 1)
|
|
1788
1791
|
])
|
|
1789
1792
|
])
|
|
1790
1793
|
]),
|
|
1791
1794
|
_: 3
|
|
1792
1795
|
}, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
|
|
1793
1796
|
}
|
|
1794
|
-
}),
|
|
1797
|
+
}), Xa = { class: "relative h-full" }, Za = {
|
|
1795
1798
|
key: 0,
|
|
1796
1799
|
class: "h-full flex flex-col"
|
|
1797
|
-
},
|
|
1800
|
+
}, el = { class: "px-3 pt-3 pb-2 flex items-center justify-end gap-2" }, tl = {
|
|
1798
1801
|
key: 0,
|
|
1799
1802
|
class: "px-3 pt-3 pb-2"
|
|
1800
|
-
},
|
|
1803
|
+
}, al = { class: "flex-1 overflow-y-auto px-4 pb-4" }, ll = ["onClick"], rl = {
|
|
1801
1804
|
key: 1,
|
|
1802
1805
|
class: "text-xs font-semibold text-gray-700 mb-2 px-3 py-2 bg-gradient-to-r from-gray-50 to-gray-100 rounded-lg"
|
|
1803
|
-
},
|
|
1806
|
+
}, ol = { key: 2 }, sl = {
|
|
1804
1807
|
key: 0,
|
|
1805
1808
|
class: "grid grid-cols-3 gap-1.5 px-1"
|
|
1806
|
-
},
|
|
1809
|
+
}, nl = ["title", "draggable", "onClick", "onDragstart"], il = { class: "text-xs text-gray-700 font-medium text-center leading-tight truncate w-full group-hover:text-gray-900" }, cl = {
|
|
1807
1810
|
key: 1,
|
|
1808
1811
|
class: "space-y-1.5"
|
|
1809
|
-
},
|
|
1812
|
+
}, ul = ["title", "draggable", "onClick", "onDragstart"], dl = { class: "flex-1 min-w-0" }, pl = { class: "font-medium text-gray-900 text-sm group-hover:text-gray-950 text-center" }, fl = {
|
|
1810
1813
|
key: 0,
|
|
1811
1814
|
class: "text-xs text-gray-600 mt-0.5 truncate group-hover:text-gray-700 text-center"
|
|
1812
|
-
},
|
|
1815
|
+
}, vl = {
|
|
1813
1816
|
key: 1,
|
|
1814
1817
|
class: "relative h-full"
|
|
1815
|
-
},
|
|
1818
|
+
}, ml = { class: "pt-4 pb-2 flex justify-center" }, gl = { class: "overflow-y-auto flex flex-col items-center gap-3 pb-4" }, hl = ["title", "draggable", "onClick", "onDragstart"], kr = /* @__PURE__ */ L({
|
|
1816
1819
|
__name: "index",
|
|
1817
1820
|
props: {
|
|
1818
1821
|
tools: {},
|
|
@@ -1833,7 +1836,7 @@ const dr = async (r, a) => {
|
|
|
1833
1836
|
dragConfig: {}
|
|
1834
1837
|
},
|
|
1835
1838
|
setup(r) {
|
|
1836
|
-
const a = r, e =
|
|
1839
|
+
const a = r, e = S(""), t = S({}), s = K(() => Array.isArray(a.tools) && a.tools.length > 0 && "tools" in a.tools[0]), i = K(() => {
|
|
1837
1840
|
if (!a.tools || !Array.isArray(a.tools))
|
|
1838
1841
|
return [];
|
|
1839
1842
|
if (s.value)
|
|
@@ -1841,40 +1844,40 @@ const dr = async (r, a) => {
|
|
|
1841
1844
|
const _ = a.tools;
|
|
1842
1845
|
return [{
|
|
1843
1846
|
id: "default-group",
|
|
1844
|
-
name:
|
|
1847
|
+
name: g("webui.components.content.toolpanel.tool"),
|
|
1845
1848
|
tools: _
|
|
1846
1849
|
}];
|
|
1847
|
-
}), o =
|
|
1850
|
+
}), o = K(() => {
|
|
1848
1851
|
if (!e.value.trim())
|
|
1849
1852
|
return i.value;
|
|
1850
|
-
const _ = e.value.toLowerCase(),
|
|
1851
|
-
...
|
|
1852
|
-
tools:
|
|
1853
|
-
var
|
|
1854
|
-
const
|
|
1855
|
-
return
|
|
1853
|
+
const _ = e.value.toLowerCase(), T = i.value.map((h) => ({
|
|
1854
|
+
...h,
|
|
1855
|
+
tools: h.tools.filter((b) => {
|
|
1856
|
+
var O, A;
|
|
1857
|
+
const R = (O = b.label) == null ? void 0 : O.toLowerCase().includes(_), V = (A = b.description) == null ? void 0 : A.toLowerCase().includes(_);
|
|
1858
|
+
return R || V;
|
|
1856
1859
|
})
|
|
1857
|
-
})).filter((
|
|
1858
|
-
if (e.value.trim() &&
|
|
1859
|
-
const
|
|
1860
|
+
})).filter((h) => h.tools.length > 0);
|
|
1861
|
+
if (e.value.trim() && T.length > 0) {
|
|
1862
|
+
const h = T.flatMap((b) => b.tools);
|
|
1860
1863
|
return [{
|
|
1861
1864
|
id: "search-results",
|
|
1862
|
-
name:
|
|
1863
|
-
tools:
|
|
1865
|
+
name: g("webui.components.content.toolpanel.searchResult"),
|
|
1866
|
+
tools: h
|
|
1864
1867
|
}];
|
|
1865
1868
|
}
|
|
1866
|
-
return
|
|
1867
|
-
}),
|
|
1869
|
+
return T;
|
|
1870
|
+
}), p = K(() => a.collapsed ? a.width.collapsed : a.width.expanded), d = K(() => a.showModeToggle ? [{
|
|
1868
1871
|
type: "tools",
|
|
1869
1872
|
mode: "toggle",
|
|
1870
1873
|
selected: a.mode,
|
|
1871
1874
|
tools: [
|
|
1872
1875
|
{
|
|
1873
1876
|
key: "list",
|
|
1874
|
-
label:
|
|
1877
|
+
label: g("webui.components.content.toolpanel.list"),
|
|
1875
1878
|
icon: "icon-datalist",
|
|
1876
1879
|
display: "icon",
|
|
1877
|
-
tiptext:
|
|
1880
|
+
tiptext: g("webui.components.content.toolpanel.listView"),
|
|
1878
1881
|
click: () => {
|
|
1879
1882
|
var _;
|
|
1880
1883
|
(_ = a.onModeChange) == null || _.call(a, "list");
|
|
@@ -1882,26 +1885,26 @@ const dr = async (r, a) => {
|
|
|
1882
1885
|
},
|
|
1883
1886
|
{
|
|
1884
1887
|
key: "grid",
|
|
1885
|
-
label:
|
|
1888
|
+
label: g("webui.components.content.toolpanel.grid"),
|
|
1886
1889
|
icon: "icon-icon-list",
|
|
1887
1890
|
display: "icon",
|
|
1888
|
-
tiptext:
|
|
1891
|
+
tiptext: g("webui.components.content.toolpanel.gridView"),
|
|
1889
1892
|
click: () => {
|
|
1890
1893
|
var _;
|
|
1891
1894
|
(_ = a.onModeChange) == null || _.call(a, "grid");
|
|
1892
1895
|
}
|
|
1893
1896
|
}
|
|
1894
1897
|
]
|
|
1895
|
-
}] : []),
|
|
1898
|
+
}] : []), u = K(() => [{
|
|
1896
1899
|
type: "tools",
|
|
1897
1900
|
mode: "normal",
|
|
1898
1901
|
tools: [
|
|
1899
1902
|
{
|
|
1900
1903
|
key: "collapse",
|
|
1901
|
-
label: a.collapsed ?
|
|
1904
|
+
label: a.collapsed ? g("webui.components.content.toolpanel.expand") : g("webui.components.content.toolpanel.collapse"),
|
|
1902
1905
|
icon: "icon-menu",
|
|
1903
1906
|
display: "icon",
|
|
1904
|
-
tiptext: a.collapsed ?
|
|
1907
|
+
tiptext: a.collapsed ? g("webui.components.content.toolpanel.expandPanel") : g("webui.components.content.toolpanel.collapsePanel"),
|
|
1905
1908
|
// 添加特殊的点击处理
|
|
1906
1909
|
click: () => {
|
|
1907
1910
|
var _;
|
|
@@ -1911,258 +1914,258 @@ const dr = async (r, a) => {
|
|
|
1911
1914
|
]
|
|
1912
1915
|
}]), v = (_) => t.value[_] ?? !1, n = (_) => {
|
|
1913
1916
|
if (!a.allowGroupCollapse) return;
|
|
1914
|
-
const
|
|
1917
|
+
const T = !t.value[_];
|
|
1915
1918
|
t.value = {
|
|
1916
1919
|
...t.value,
|
|
1917
|
-
[_]:
|
|
1918
|
-
}, console.log("切换分组折叠状态:", _,
|
|
1919
|
-
}, m = (_,
|
|
1920
|
-
var
|
|
1921
|
-
W(_) || (X(_), (
|
|
1922
|
-
},
|
|
1923
|
-
var
|
|
1924
|
-
e.value = _, (
|
|
1925
|
-
},
|
|
1926
|
-
var
|
|
1927
|
-
(b = (
|
|
1928
|
-
},
|
|
1929
|
-
var
|
|
1930
|
-
(
|
|
1920
|
+
[_]: T
|
|
1921
|
+
}, console.log("切换分组折叠状态:", _, T);
|
|
1922
|
+
}, m = (_, T) => {
|
|
1923
|
+
var h;
|
|
1924
|
+
W(_) || (X(_), (h = a.onToolClick) == null || h.call(a, _, T));
|
|
1925
|
+
}, f = (_) => {
|
|
1926
|
+
var T;
|
|
1927
|
+
e.value = _, (T = a.onSearch) == null || T.call(a, _);
|
|
1928
|
+
}, w = (_, T) => {
|
|
1929
|
+
var h, b;
|
|
1930
|
+
(b = (h = a.dragConfig) == null ? void 0 : h.onDragStart) == null || b.call(h, _, T);
|
|
1931
|
+
}, $ = (_) => {
|
|
1932
|
+
var T, h;
|
|
1933
|
+
(h = (T = a.dragConfig) == null ? void 0 : T.onDragEnd) == null || h.call(T, _);
|
|
1931
1934
|
};
|
|
1932
|
-
return (_,
|
|
1933
|
-
|
|
1934
|
-
class:
|
|
1935
|
+
return (_, T) => (c(), x("div", Xa, [
|
|
1936
|
+
E("div", {
|
|
1937
|
+
class: B(["h-full bg-white border-r border-gray-200 transition-all duration-300 ease-in-out shadow-sm", p.value])
|
|
1935
1938
|
}, [
|
|
1936
|
-
a.collapsed ? (
|
|
1937
|
-
|
|
1938
|
-
D(
|
|
1939
|
-
"group-tools":
|
|
1939
|
+
a.collapsed ? (c(), x("div", vl, [
|
|
1940
|
+
E("div", ml, [
|
|
1941
|
+
D(Me, {
|
|
1942
|
+
"group-tools": u.value
|
|
1940
1943
|
}, null, 8, ["group-tools"])
|
|
1941
1944
|
]),
|
|
1942
|
-
|
|
1943
|
-
(
|
|
1944
|
-
key:
|
|
1945
|
+
E("div", gl, [
|
|
1946
|
+
(c(!0), x(U, null, Y(o.value, (h) => (c(), x("div", {
|
|
1947
|
+
key: h.id,
|
|
1945
1948
|
class: "flex flex-col items-center gap-2"
|
|
1946
1949
|
}, [
|
|
1947
|
-
(
|
|
1948
|
-
var
|
|
1949
|
-
return Q((
|
|
1950
|
+
(c(!0), x(U, null, Y(h.tools, (b) => {
|
|
1951
|
+
var R, V;
|
|
1952
|
+
return Q((c(), x("div", N({
|
|
1950
1953
|
key: b.key,
|
|
1951
1954
|
title: `${b.label}${b.description ? ": " + b.description : ""}`,
|
|
1952
1955
|
class: ["w-12 h-12 flex items-center justify-center bg-gray-50 border border-gray-400 rounded-lg shadow-sm hover:border-blue-500 hover:shadow-md hover:bg-blue-50 transition-all duration-200 cursor-move group", [
|
|
1953
1956
|
l(W)(b) ? "opacity-50 cursor-not-allowed bg-gray-200" : "hover:scale-110",
|
|
1954
1957
|
b.class || "",
|
|
1955
|
-
(
|
|
1958
|
+
(R = r.dragConfig) != null && R.draggable ? "cursor-move" : ""
|
|
1956
1959
|
]],
|
|
1957
|
-
draggable: (
|
|
1958
|
-
onClick: (
|
|
1959
|
-
onDragstart: (
|
|
1960
|
-
onDragend:
|
|
1960
|
+
draggable: (V = r.dragConfig) == null ? void 0 : V.draggable,
|
|
1961
|
+
onClick: (O) => b.click ? b.click(b, O) : m(b, O),
|
|
1962
|
+
onDragstart: (O) => w(O, b),
|
|
1963
|
+
onDragend: T[5] || (T[5] = (O) => $(O))
|
|
1961
1964
|
}, { ref_for: !0 }, r.dragConfig), [
|
|
1962
|
-
b.icon ? (
|
|
1965
|
+
b.icon ? (c(), k(l(G), N({
|
|
1963
1966
|
key: 0,
|
|
1964
1967
|
icon: b.icon,
|
|
1965
1968
|
class: ["w-7 h-7 text-blue-600 group-hover:text-blue-700 transition-colors", b.iconClass]
|
|
1966
|
-
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) :
|
|
1967
|
-
], 16,
|
|
1968
|
-
[
|
|
1969
|
+
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) : C("", !0)
|
|
1970
|
+
], 16, hl)), [
|
|
1971
|
+
[Ie, l(J)(b)]
|
|
1969
1972
|
]);
|
|
1970
1973
|
}), 128))
|
|
1971
1974
|
]))), 128))
|
|
1972
1975
|
])
|
|
1973
|
-
])) : (
|
|
1974
|
-
|
|
1975
|
-
r.showModeToggle ? (
|
|
1976
|
+
])) : (c(), x("div", Za, [
|
|
1977
|
+
E("div", el, [
|
|
1978
|
+
r.showModeToggle ? (c(), k(Me, {
|
|
1976
1979
|
key: 0,
|
|
1977
|
-
"group-tools":
|
|
1978
|
-
}, null, 8, ["group-tools"])) :
|
|
1979
|
-
D(
|
|
1980
|
-
"group-tools":
|
|
1980
|
+
"group-tools": d.value
|
|
1981
|
+
}, null, 8, ["group-tools"])) : C("", !0),
|
|
1982
|
+
D(Me, {
|
|
1983
|
+
"group-tools": u.value
|
|
1981
1984
|
}, null, 8, ["group-tools"])
|
|
1982
1985
|
]),
|
|
1983
|
-
r.showSearch ? (
|
|
1984
|
-
D(l(
|
|
1986
|
+
r.showSearch ? (c(), x("div", tl, [
|
|
1987
|
+
D(l(Ct), {
|
|
1985
1988
|
value: e.value,
|
|
1986
1989
|
"onUpdate:value": [
|
|
1987
|
-
|
|
1988
|
-
|
|
1990
|
+
T[0] || (T[0] = (h) => e.value = h),
|
|
1991
|
+
T[1] || (T[1] = (h) => f(h))
|
|
1989
1992
|
],
|
|
1990
|
-
placeholder: l(
|
|
1993
|
+
placeholder: l(g)("webui.components.content.toolpanel.searchPlaceholder"),
|
|
1991
1994
|
"allow-clear": "",
|
|
1992
1995
|
size: "small",
|
|
1993
1996
|
class: "w-full",
|
|
1994
|
-
onPressEnter:
|
|
1997
|
+
onPressEnter: T[2] || (T[2] = (h) => f(h.target.value))
|
|
1995
1998
|
}, null, 8, ["value", "placeholder"])
|
|
1996
|
-
])) :
|
|
1997
|
-
|
|
1998
|
-
(
|
|
1999
|
-
key:
|
|
1999
|
+
])) : C("", !0),
|
|
2000
|
+
E("div", al, [
|
|
2001
|
+
(c(!0), x(U, null, Y(o.value, (h) => (c(), x("div", {
|
|
2002
|
+
key: h.id,
|
|
2000
2003
|
class: "mb-4 last:mb-0"
|
|
2001
2004
|
}, [
|
|
2002
|
-
r.allowGroupCollapse &&
|
|
2005
|
+
r.allowGroupCollapse && h.id !== "search-results" && h.id !== "default-group" ? (c(), x("div", {
|
|
2003
2006
|
key: 0,
|
|
2004
2007
|
class: "flex items-center justify-between text-xs font-semibold text-gray-700 mb-2 px-3 py-2 bg-gradient-to-r from-gray-50 to-gray-100 rounded-lg cursor-pointer hover:from-gray-100 hover:to-gray-200 transition-all",
|
|
2005
|
-
onClick: (b) => n(
|
|
2008
|
+
onClick: (b) => n(h.id)
|
|
2006
2009
|
}, [
|
|
2007
|
-
|
|
2008
|
-
D(l(
|
|
2009
|
-
icon: v(
|
|
2010
|
+
E("span", null, I(h.name), 1),
|
|
2011
|
+
D(l(G), {
|
|
2012
|
+
icon: v(h.id) ? "icon-chevron-right" : "icon-chevron-down",
|
|
2010
2013
|
class: "w-3.5 h-3.5 transition-transform duration-200"
|
|
2011
2014
|
}, null, 8, ["icon"])
|
|
2012
|
-
], 8,
|
|
2013
|
-
!v(
|
|
2014
|
-
a.mode === "grid" ? (
|
|
2015
|
-
(
|
|
2016
|
-
var
|
|
2017
|
-
return Q((
|
|
2015
|
+
], 8, ll)) : h.id !== "search-results" && h.id !== "default-group" ? (c(), x("h3", rl, I(h.name), 1)) : C("", !0),
|
|
2016
|
+
!v(h.id) || h.id === "search-results" || h.id === "default-group" ? (c(), x("div", ol, [
|
|
2017
|
+
a.mode === "grid" ? (c(), x("div", sl, [
|
|
2018
|
+
(c(!0), x(U, null, Y(h.tools, (b) => {
|
|
2019
|
+
var R, V, O;
|
|
2020
|
+
return Q((c(), x("div", N({
|
|
2018
2021
|
key: b.key,
|
|
2019
2022
|
title: `${b.label}${b.description ? ": " + b.description : ""}`,
|
|
2020
2023
|
class: ["aspect-square flex flex-col items-center justify-center p-1.5 bg-gray-50 border border-solid border-gray-200 rounded-lg shadow-sm hover:border-blue-300 hover:shadow-lg hover:bg-blue-50 transition-all duration-200 cursor-move group", [
|
|
2021
2024
|
l(W)(b) ? "opacity-50 cursor-not-allowed bg-gray-200" : "hover:scale-105",
|
|
2022
2025
|
b.class || "",
|
|
2023
|
-
(
|
|
2026
|
+
(R = r.dragConfig) != null && R.draggable ? "cursor-move" : ""
|
|
2024
2027
|
]],
|
|
2025
|
-
draggable: (
|
|
2026
|
-
onClick: (
|
|
2027
|
-
onDragstart: (
|
|
2028
|
-
onDragend:
|
|
2028
|
+
draggable: (V = r.dragConfig) == null ? void 0 : V.draggable,
|
|
2029
|
+
onClick: (A) => b.click ? b.click(b, A) : m(b, A),
|
|
2030
|
+
onDragstart: (A) => w(A, b),
|
|
2031
|
+
onDragend: T[3] || (T[3] = (A) => $(A))
|
|
2029
2032
|
}, { ref_for: !0 }, r.dragConfig), [
|
|
2030
|
-
b.icon ? (
|
|
2033
|
+
b.icon ? (c(), k(l(G), N({
|
|
2031
2034
|
key: 0,
|
|
2032
2035
|
icon: b.icon,
|
|
2033
2036
|
class: ["w-9 h-9 mb-1 text-blue-600 group-hover:text-blue-700 transition-colors flex-shrink-0 !cursor-move", [
|
|
2034
2037
|
b.iconClass,
|
|
2035
|
-
(
|
|
2038
|
+
(O = r.dragConfig) != null && O.draggable ? "cursor-move" : ""
|
|
2036
2039
|
]]
|
|
2037
|
-
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) :
|
|
2038
|
-
|
|
2039
|
-
], 16,
|
|
2040
|
-
[
|
|
2040
|
+
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) : C("", !0),
|
|
2041
|
+
E("span", il, I(b.label), 1)
|
|
2042
|
+
], 16, nl)), [
|
|
2043
|
+
[Ie, l(J)(b)]
|
|
2041
2044
|
]);
|
|
2042
2045
|
}), 128))
|
|
2043
|
-
])) : (
|
|
2044
|
-
(
|
|
2045
|
-
var
|
|
2046
|
-
return Q((
|
|
2046
|
+
])) : (c(), x("div", cl, [
|
|
2047
|
+
(c(!0), x(U, null, Y(h.tools, (b) => {
|
|
2048
|
+
var R, V, O;
|
|
2049
|
+
return Q((c(), x("div", N({
|
|
2047
2050
|
key: b.key,
|
|
2048
2051
|
title: `${b.label}${b.description ? ": " + b.description : ""}`,
|
|
2049
2052
|
class: ["flex items-center px-2.5 py-2 bg-gray-50 border border-gray-200 border-solid rounded-lg shadow-sm hover:border-blue-500 hover:shadow-md hover:bg-blue-50 transition-all duration-200 group", [
|
|
2050
2053
|
l(W)(b) ? "opacity-50 cursor-not-allowed bg-gray-200" : "hover:scale-[1.02]",
|
|
2051
2054
|
b.class || "",
|
|
2052
|
-
(
|
|
2055
|
+
(R = r.dragConfig) != null && R.draggable ? "cursor-move" : ""
|
|
2053
2056
|
]],
|
|
2054
|
-
draggable: (
|
|
2055
|
-
onClick: (
|
|
2056
|
-
onDragstart: (
|
|
2057
|
-
onDragend:
|
|
2057
|
+
draggable: (V = r.dragConfig) == null ? void 0 : V.draggable,
|
|
2058
|
+
onClick: (A) => b.click ? b.click(b, A) : m(b, A),
|
|
2059
|
+
onDragstart: (A) => w(A, b),
|
|
2060
|
+
onDragend: T[4] || (T[4] = (A) => $(A))
|
|
2058
2061
|
}, { ref_for: !0 }, r.dragConfig), [
|
|
2059
|
-
b.icon ? (
|
|
2062
|
+
b.icon ? (c(), k(l(G), N({
|
|
2060
2063
|
key: 0,
|
|
2061
2064
|
icon: b.icon,
|
|
2062
2065
|
class: ["w-7 h-7 mr-2.5 flex-shrink-0 text-blue-600 group-hover:text-blue-700 transition-colors", [
|
|
2063
2066
|
b.iconClass,
|
|
2064
|
-
(
|
|
2067
|
+
(O = r.dragConfig) != null && O.draggable ? "!cursor-move" : ""
|
|
2065
2068
|
]]
|
|
2066
|
-
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) :
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
b.description ? (
|
|
2069
|
+
}, { ref_for: !0 }, b.iconProps), null, 16, ["icon", "class"])) : C("", !0),
|
|
2070
|
+
E("div", dl, [
|
|
2071
|
+
E("div", pl, I(b.label), 1),
|
|
2072
|
+
b.description ? (c(), x("div", fl, I(b.description), 1)) : C("", !0)
|
|
2070
2073
|
])
|
|
2071
|
-
], 16,
|
|
2072
|
-
[
|
|
2074
|
+
], 16, ul)), [
|
|
2075
|
+
[Ie, l(J)(b)]
|
|
2073
2076
|
]);
|
|
2074
2077
|
}), 128))
|
|
2075
2078
|
]))
|
|
2076
|
-
])) :
|
|
2079
|
+
])) : C("", !0)
|
|
2077
2080
|
]))), 128))
|
|
2078
2081
|
])
|
|
2079
2082
|
]))
|
|
2080
2083
|
], 2)
|
|
2081
2084
|
]));
|
|
2082
2085
|
}
|
|
2083
|
-
}),
|
|
2086
|
+
}), _r = /* @__PURE__ */ ce(Et, [["__scopeId", "data-v-1f5736dd"]]), bl = { class: "relative w-[248px] max-w-[248px]" }, xl = {
|
|
2084
2087
|
key: 0,
|
|
2085
2088
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
2086
|
-
},
|
|
2089
|
+
}, yl = /* @__PURE__ */ L({
|
|
2087
2090
|
inheritAttrs: !1,
|
|
2088
2091
|
__name: "index",
|
|
2089
|
-
props:
|
|
2092
|
+
props: It,
|
|
2090
2093
|
emits: ["change", "update:labels", "update:value"],
|
|
2091
2094
|
setup(r, { emit: a }) {
|
|
2092
|
-
var
|
|
2093
|
-
const e = r, t = ne(), s = te(), i =
|
|
2094
|
-
o.inputFactory =
|
|
2095
|
-
const
|
|
2095
|
+
var $, _, T;
|
|
2096
|
+
const e = r, t = ne(), s = te(), i = Lt(e.url, e), o = e.optionCtrl ?? i.optionCtrl;
|
|
2097
|
+
o.inputFactory = Wt(s);
|
|
2098
|
+
const p = S({
|
|
2096
2099
|
...o == null ? void 0 : o.url,
|
|
2097
|
-
url: ((
|
|
2100
|
+
url: (($ = o == null ? void 0 : o.url) == null ? void 0 : $.url) || "",
|
|
2098
2101
|
fieldMap: (o == null ? void 0 : o.fieldMap) || ((_ = o == null ? void 0 : o.url) == null ? void 0 : _.fieldMap),
|
|
2099
|
-
params: (o == null ? void 0 : o.params) || ((
|
|
2102
|
+
params: (o == null ? void 0 : o.params) || ((T = o == null ? void 0 : o.url) == null ? void 0 : T.params),
|
|
2100
2103
|
loadingText: !1
|
|
2101
|
-
}), { editorCtrl:
|
|
2104
|
+
}), { editorCtrl: d, errInfo: u, labelText: v } = s, n = S(t.placeholder);
|
|
2102
2105
|
M(
|
|
2103
|
-
() =>
|
|
2104
|
-
(
|
|
2105
|
-
|
|
2106
|
+
() => p.value.loading,
|
|
2107
|
+
(h) => {
|
|
2108
|
+
h ? n.value = "" : n.value || (n.value = g("webui.components.form.cascader.pleaseSelect", [v.value]));
|
|
2106
2109
|
},
|
|
2107
2110
|
{ immediate: !0 }
|
|
2108
2111
|
);
|
|
2109
2112
|
const m = a;
|
|
2110
2113
|
s.inputEmit = m;
|
|
2111
|
-
const
|
|
2114
|
+
const f = S((o == null ? void 0 : o.options.value) || []);
|
|
2112
2115
|
o && M(
|
|
2113
2116
|
() => o.options.value,
|
|
2114
|
-
(
|
|
2115
|
-
|
|
2117
|
+
(h) => {
|
|
2118
|
+
f.value = h || [];
|
|
2116
2119
|
},
|
|
2117
2120
|
{ immediate: !0, deep: !0 }
|
|
2118
2121
|
);
|
|
2119
|
-
const
|
|
2122
|
+
const w = (h, b) => {
|
|
2120
2123
|
if (!b || b.length === 0) {
|
|
2121
2124
|
m("update:labels", []), m("update:value", []);
|
|
2122
2125
|
return;
|
|
2123
2126
|
}
|
|
2124
|
-
const
|
|
2125
|
-
m("update:labels",
|
|
2127
|
+
const R = b.map((A) => A.value), V = Rt(o, e, R), O = Bt(V);
|
|
2128
|
+
m("update:labels", O), m("update:value", R), u != null && u.value.errClass && d && se(d);
|
|
2126
2129
|
};
|
|
2127
|
-
return
|
|
2130
|
+
return Ce(() => {
|
|
2128
2131
|
o && o.autoload && (o.reload.value = !0);
|
|
2129
2132
|
}), le(() => {
|
|
2130
|
-
|
|
2133
|
+
p.value && !p.value.fieldMap && (p.value.fieldMap = {
|
|
2131
2134
|
title: "Name",
|
|
2132
2135
|
label: "Name",
|
|
2133
2136
|
value: "Id",
|
|
2134
2137
|
key: "Id"
|
|
2135
|
-
}), o &&
|
|
2136
|
-
}),
|
|
2137
|
-
o &&
|
|
2138
|
-
}), (
|
|
2139
|
-
var
|
|
2140
|
-
return
|
|
2141
|
-
|
|
2142
|
-
D(l(
|
|
2143
|
-
|
|
2138
|
+
}), o && Ut(o.autoload, o, e);
|
|
2139
|
+
}), Ht(() => {
|
|
2140
|
+
o && Mt(o, e);
|
|
2141
|
+
}), (h, b) => {
|
|
2142
|
+
var R;
|
|
2143
|
+
return c(), x("div", bl, [
|
|
2144
|
+
f.value.length ? C("", !0) : (c(), x("div", xl, [
|
|
2145
|
+
D(l(Nt), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2146
|
+
E("span", null, I(l(g)("webui.components.form.cascader.loading")), 1)
|
|
2144
2147
|
])),
|
|
2145
|
-
D(l(
|
|
2146
|
-
options:
|
|
2147
|
-
class: [(
|
|
2148
|
+
D(l(la), N({
|
|
2149
|
+
options: f.value,
|
|
2150
|
+
class: [(R = l(u)) == null ? void 0 : R.errClass],
|
|
2148
2151
|
"allow-clear": !0,
|
|
2149
|
-
placeholder:
|
|
2150
|
-
onChange:
|
|
2152
|
+
placeholder: f.value.length > 0 ? l(g)("webui.components.form.cascader.pleaseSelect", [l(v)]) : "",
|
|
2153
|
+
onChange: w
|
|
2151
2154
|
}, l(t)), null, 16, ["options", "class", "placeholder"])
|
|
2152
2155
|
]);
|
|
2153
2156
|
};
|
|
2154
2157
|
}
|
|
2155
|
-
}),
|
|
2156
|
-
function
|
|
2157
|
-
return
|
|
2158
|
+
}), Cr = /* @__PURE__ */ ce(yl, [["__scopeId", "data-v-9293618e"]]), Sr = /* @__PURE__ */ ce(At, [["__scopeId", "data-v-b16e9e97"]]);
|
|
2159
|
+
function ke() {
|
|
2160
|
+
return ke = Object.assign ? Object.assign.bind() : function(r) {
|
|
2158
2161
|
for (var a = 1; a < arguments.length; a++) {
|
|
2159
2162
|
var e = arguments[a];
|
|
2160
2163
|
for (var t in e) ({}).hasOwnProperty.call(e, t) && (r[t] = e[t]);
|
|
2161
2164
|
}
|
|
2162
2165
|
return r;
|
|
2163
|
-
},
|
|
2166
|
+
}, ke.apply(null, arguments);
|
|
2164
2167
|
}
|
|
2165
|
-
const
|
|
2168
|
+
const wl = {
|
|
2166
2169
|
locale: "zh_CN",
|
|
2167
2170
|
today: "今天",
|
|
2168
2171
|
now: "此刻",
|
|
@@ -2189,11 +2192,11 @@ const _l = {
|
|
|
2189
2192
|
nextDecade: "下一年代",
|
|
2190
2193
|
previousCentury: "上一世纪",
|
|
2191
2194
|
nextCentury: "下一世纪"
|
|
2192
|
-
},
|
|
2195
|
+
}, kl = {
|
|
2193
2196
|
placeholder: "请选择时间",
|
|
2194
2197
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
2195
|
-
},
|
|
2196
|
-
lang:
|
|
2198
|
+
}, De = {
|
|
2199
|
+
lang: ke({
|
|
2197
2200
|
placeholder: "请选择日期",
|
|
2198
2201
|
yearPlaceholder: "请选择年份",
|
|
2199
2202
|
quarterPlaceholder: "请选择季度",
|
|
@@ -2204,11 +2207,11 @@ const _l = {
|
|
|
2204
2207
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
2205
2208
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
2206
2209
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
2207
|
-
},
|
|
2208
|
-
timePickerLocale:
|
|
2210
|
+
}, wl),
|
|
2211
|
+
timePickerLocale: ke({}, kl)
|
|
2209
2212
|
};
|
|
2210
|
-
|
|
2211
|
-
const
|
|
2213
|
+
De.lang.ok = "确定";
|
|
2214
|
+
const Tr = /* @__PURE__ */ L({
|
|
2212
2215
|
__name: "index",
|
|
2213
2216
|
props: {
|
|
2214
2217
|
valueFormat: {}
|
|
@@ -2216,19 +2219,19 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2216
2219
|
setup(r) {
|
|
2217
2220
|
const a = r, { editorCtrl: e, labelText: t, errInfo: s } = te(), i = () => {
|
|
2218
2221
|
s != null && s.value.errClass && e && se(e);
|
|
2219
|
-
}, o =
|
|
2220
|
-
return (
|
|
2221
|
-
var
|
|
2222
|
-
return
|
|
2223
|
-
class:
|
|
2224
|
-
placeholder: l(
|
|
2225
|
-
locale: l(
|
|
2222
|
+
}, o = S(a.valueFormat ?? "YYYY-MM-DD");
|
|
2223
|
+
return (p, d) => {
|
|
2224
|
+
var u;
|
|
2225
|
+
return c(), k(l(ra), {
|
|
2226
|
+
class: B(["w-full", [((u = l(s)) == null ? void 0 : u.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
2227
|
+
placeholder: l(g)("webui.components.form.datePicker.pleaseSelect", [l(t)]),
|
|
2228
|
+
locale: l(De),
|
|
2226
2229
|
valueFormat: o.value,
|
|
2227
2230
|
onBlur: i
|
|
2228
2231
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
2229
2232
|
};
|
|
2230
2233
|
}
|
|
2231
|
-
}),
|
|
2234
|
+
}), Ct = /* @__PURE__ */ L({
|
|
2232
2235
|
__name: "index",
|
|
2233
2236
|
props: {
|
|
2234
2237
|
value: {},
|
|
@@ -2236,72 +2239,72 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2236
2239
|
},
|
|
2237
2240
|
emits: ["update:value", "blur", "change"],
|
|
2238
2241
|
setup(r, { emit: a }) {
|
|
2239
|
-
const {
|
|
2240
|
-
const { onBlur:
|
|
2241
|
-
return
|
|
2242
|
-
}),
|
|
2243
|
-
|
|
2244
|
-
},
|
|
2242
|
+
const { editorCtrl: e, labelText: t, errInfo: s } = te(), i = r, o = i.value === void 0 ? !0 : i.undefValue, p = a, d = K(() => {
|
|
2243
|
+
const { onBlur: m, onChange: f, ...w } = ne();
|
|
2244
|
+
return w;
|
|
2245
|
+
}), u = (m) => {
|
|
2246
|
+
s != null && s.value.errClass && e && se(e), p("blur", m);
|
|
2247
|
+
}, v = S(i.value);
|
|
2245
2248
|
M(
|
|
2246
|
-
() =>
|
|
2247
|
-
(
|
|
2248
|
-
|
|
2249
|
+
() => i.value,
|
|
2250
|
+
(m) => {
|
|
2251
|
+
v.value = m;
|
|
2249
2252
|
},
|
|
2250
2253
|
{ immediate: !0 }
|
|
2251
2254
|
// 立即同步初始值
|
|
2252
2255
|
), M(
|
|
2253
|
-
() =>
|
|
2254
|
-
(
|
|
2255
|
-
if (
|
|
2256
|
-
|
|
2256
|
+
() => v.value,
|
|
2257
|
+
(m) => {
|
|
2258
|
+
if (v.value === "") {
|
|
2259
|
+
p("update:value", void 0);
|
|
2257
2260
|
return;
|
|
2258
2261
|
}
|
|
2259
|
-
|
|
2262
|
+
p("update:value", m);
|
|
2260
2263
|
}
|
|
2261
2264
|
);
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2265
|
+
const n = (m) => {
|
|
2266
|
+
v.value === "" && (v.value = o ? void 0 : null), p("change", m);
|
|
2264
2267
|
};
|
|
2265
|
-
return (
|
|
2266
|
-
var
|
|
2267
|
-
return
|
|
2268
|
+
return (m, f) => {
|
|
2269
|
+
var w, $;
|
|
2270
|
+
return c(), k(l(ve), N({
|
|
2268
2271
|
class: [
|
|
2269
|
-
(
|
|
2270
|
-
((
|
|
2272
|
+
(w = l(s)) == null ? void 0 : w.errClass,
|
|
2273
|
+
(($ = l(s)) == null ? void 0 : $.errClass) === "error" && !m.$slots.addonBefore && !m.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
|
|
2271
2274
|
],
|
|
2272
|
-
value:
|
|
2273
|
-
"onUpdate:value":
|
|
2275
|
+
value: v.value,
|
|
2276
|
+
"onUpdate:value": f[0] || (f[0] = (_) => v.value = _),
|
|
2274
2277
|
autocomplete: "new-password",
|
|
2275
2278
|
"allow-clear": !0,
|
|
2276
|
-
placeholder: l(
|
|
2277
|
-
onBlur:
|
|
2278
|
-
onChange:
|
|
2279
|
-
},
|
|
2280
|
-
|
|
2279
|
+
placeholder: l(g)("webui.common.placeholder", [l(t)]),
|
|
2280
|
+
onBlur: u,
|
|
2281
|
+
onChange: n
|
|
2282
|
+
}, d.value), nt({ _: 2 }, [
|
|
2283
|
+
m.$slots.addonBefore ? {
|
|
2281
2284
|
name: "addonBefore",
|
|
2282
|
-
fn:
|
|
2283
|
-
|
|
2285
|
+
fn: y(() => [
|
|
2286
|
+
z(m.$slots, "addonBefore")
|
|
2284
2287
|
]),
|
|
2285
2288
|
key: "0"
|
|
2286
2289
|
} : void 0,
|
|
2287
|
-
|
|
2290
|
+
m.$slots.addonAfter ? {
|
|
2288
2291
|
name: "addonAfter",
|
|
2289
|
-
fn:
|
|
2290
|
-
|
|
2292
|
+
fn: y(() => [
|
|
2293
|
+
z(m.$slots, "addonAfter")
|
|
2291
2294
|
]),
|
|
2292
2295
|
key: "1"
|
|
2293
2296
|
} : void 0
|
|
2294
2297
|
]), 1040, ["class", "value", "placeholder"]);
|
|
2295
2298
|
};
|
|
2296
2299
|
}
|
|
2297
|
-
}),
|
|
2300
|
+
}), _l = /* @__PURE__ */ L({
|
|
2298
2301
|
__name: "inputIcon",
|
|
2299
2302
|
props: {
|
|
2300
2303
|
value: {}
|
|
2301
2304
|
},
|
|
2302
2305
|
emits: ["update:value"],
|
|
2303
2306
|
setup(r, { emit: a }) {
|
|
2304
|
-
const e = r, t = a, s =
|
|
2307
|
+
const e = r, t = a, s = S(void 0);
|
|
2305
2308
|
return M(
|
|
2306
2309
|
() => e.value,
|
|
2307
2310
|
(i) => {
|
|
@@ -2313,12 +2316,12 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2313
2316
|
(i) => {
|
|
2314
2317
|
t("update:value", i);
|
|
2315
2318
|
}
|
|
2316
|
-
), (i, o) => (
|
|
2319
|
+
), (i, o) => (c(), k(Ct, N({
|
|
2317
2320
|
value: s.value,
|
|
2318
|
-
"onUpdate:value": o[0] || (o[0] = (
|
|
2321
|
+
"onUpdate:value": o[0] || (o[0] = (p) => s.value = p)
|
|
2319
2322
|
}, i.$attrs), {
|
|
2320
|
-
addonBefore:
|
|
2321
|
-
D(l(
|
|
2323
|
+
addonBefore: y(() => [
|
|
2324
|
+
D(l(G), {
|
|
2322
2325
|
class: "!w-4 !h-4",
|
|
2323
2326
|
icon: s.value
|
|
2324
2327
|
}, null, 8, ["icon"])
|
|
@@ -2326,40 +2329,40 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2326
2329
|
_: 1
|
|
2327
2330
|
}, 16, ["value"]));
|
|
2328
2331
|
}
|
|
2329
|
-
}),
|
|
2332
|
+
}), $r = /* @__PURE__ */ ce(_l, [["__scopeId", "data-v-358b82ef"]]), Dr = /* @__PURE__ */ L({
|
|
2330
2333
|
__name: "inputPassword",
|
|
2331
2334
|
setup(r) {
|
|
2332
|
-
const { editorCtrl: a, labelText: e, errInfo: t } = te(),
|
|
2335
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = te(), s = () => {
|
|
2333
2336
|
t != null && t.value.errClass && a && se(a);
|
|
2334
2337
|
};
|
|
2335
|
-
return (
|
|
2336
|
-
var
|
|
2337
|
-
return
|
|
2338
|
-
class: ((
|
|
2338
|
+
return (i, o) => {
|
|
2339
|
+
var p;
|
|
2340
|
+
return c(), k(l(oa), N({
|
|
2341
|
+
class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2339
2342
|
"allow-clear": !0,
|
|
2340
2343
|
autocomplete: "new-password",
|
|
2341
|
-
placeholder: l(
|
|
2342
|
-
onBlur:
|
|
2343
|
-
},
|
|
2344
|
+
placeholder: l(g)("webui.common.placeholder", [l(e)]),
|
|
2345
|
+
onBlur: s
|
|
2346
|
+
}, i.$attrs), null, 16, ["class", "placeholder"]);
|
|
2344
2347
|
};
|
|
2345
2348
|
}
|
|
2346
|
-
}),
|
|
2349
|
+
}), Fr = /* @__PURE__ */ L({
|
|
2347
2350
|
__name: "inputNumber",
|
|
2348
2351
|
setup(r) {
|
|
2349
|
-
const { editorCtrl: a, labelText: e, errInfo: t } = te(),
|
|
2352
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = te(), s = () => {
|
|
2350
2353
|
t != null && t.value.errClass && a && se(a);
|
|
2351
2354
|
};
|
|
2352
|
-
return (
|
|
2353
|
-
var
|
|
2354
|
-
return
|
|
2355
|
-
class: [[((
|
|
2356
|
-
onBlur:
|
|
2355
|
+
return (i, o) => {
|
|
2356
|
+
var p;
|
|
2357
|
+
return c(), k(l(sa), N({
|
|
2358
|
+
class: [[((p = l(t)) == null ? void 0 : p.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
|
|
2359
|
+
onBlur: s,
|
|
2357
2360
|
"allow-clear": !1,
|
|
2358
|
-
placeholder: l(
|
|
2359
|
-
},
|
|
2361
|
+
placeholder: l(g)("webui.common.placeholder", [l(e)])
|
|
2362
|
+
}, i.$attrs), null, 16, ["class", "placeholder"]);
|
|
2360
2363
|
};
|
|
2361
2364
|
}
|
|
2362
|
-
}),
|
|
2365
|
+
}), Cl = { class: "flex flex-col gap-2" }, Sl = { key: 1 }, Pr = /* @__PURE__ */ L({
|
|
2363
2366
|
__name: "index",
|
|
2364
2367
|
props: {
|
|
2365
2368
|
value: {},
|
|
@@ -2371,106 +2374,106 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2371
2374
|
},
|
|
2372
2375
|
emits: ["update:value"],
|
|
2373
2376
|
setup(r, { emit: a }) {
|
|
2374
|
-
const e = r, t = a, s =
|
|
2377
|
+
const e = r, t = a, s = S(!(e.selectList && e.selectList.length > 0)), i = S([]);
|
|
2375
2378
|
let o = !1;
|
|
2376
|
-
const
|
|
2377
|
-
e.selectList && e.selectList.length > 0 ? i.value = e.selectList.map((
|
|
2379
|
+
const p = () => {
|
|
2380
|
+
e.selectList && e.selectList.length > 0 ? i.value = e.selectList.map((n) => ({
|
|
2378
2381
|
id: Date.now() + Math.random(),
|
|
2379
|
-
text:
|
|
2380
|
-
field:
|
|
2382
|
+
text: n.text,
|
|
2383
|
+
field: n.field,
|
|
2381
2384
|
// 如果value中有对应的field,使用value中的值,否则使用selectList中的默认值
|
|
2382
|
-
value: e.value[
|
|
2383
|
-
})) : e.value && Object.keys(e.value).length > 0 ? i.value = Object.entries(e.value).filter(([
|
|
2385
|
+
value: e.value[n.field] ?? n.value
|
|
2386
|
+
})) : e.value && Object.keys(e.value).length > 0 ? i.value = Object.entries(e.value).filter(([n]) => !e.ignoreList || !e.ignoreList.includes(n)).map(([n, m]) => ({
|
|
2384
2387
|
id: Date.now() + Math.random(),
|
|
2385
|
-
field:
|
|
2386
|
-
value:
|
|
2388
|
+
field: n,
|
|
2389
|
+
value: m
|
|
2387
2390
|
})) : i.value = [];
|
|
2388
2391
|
};
|
|
2389
2392
|
M(
|
|
2390
2393
|
() => e.value,
|
|
2391
2394
|
() => {
|
|
2392
|
-
o ||
|
|
2395
|
+
o || p(), o = !1;
|
|
2393
2396
|
},
|
|
2394
2397
|
{ immediate: !0 }
|
|
2395
2398
|
);
|
|
2396
|
-
const
|
|
2397
|
-
let
|
|
2398
|
-
e.selectList && e.selectList.length > 0 ? (
|
|
2399
|
-
|
|
2400
|
-
})) : (
|
|
2401
|
-
(
|
|
2399
|
+
const d = () => {
|
|
2400
|
+
let n;
|
|
2401
|
+
e.selectList && e.selectList.length > 0 ? (n = { ...e.value }, i.value.forEach((m) => {
|
|
2402
|
+
m.field && (n[m.field] = m.value);
|
|
2403
|
+
})) : (n = i.value.reduce(
|
|
2404
|
+
(m, f) => (f.field && (m[f.field] = f.value), m),
|
|
2402
2405
|
{}
|
|
2403
|
-
), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((
|
|
2404
|
-
e.value[
|
|
2405
|
-
})), o = !0, t("update:value",
|
|
2406
|
-
},
|
|
2406
|
+
), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((m) => {
|
|
2407
|
+
e.value[m] !== void 0 && (n[m] = e.value[m]);
|
|
2408
|
+
})), o = !0, t("update:value", n);
|
|
2409
|
+
}, u = () => {
|
|
2407
2410
|
i.value.push({
|
|
2408
2411
|
id: Date.now() + Math.random(),
|
|
2409
2412
|
field: "",
|
|
2410
2413
|
value: ""
|
|
2411
2414
|
});
|
|
2412
|
-
},
|
|
2413
|
-
|
|
2415
|
+
}, v = () => {
|
|
2416
|
+
d();
|
|
2414
2417
|
};
|
|
2415
|
-
return (
|
|
2416
|
-
(
|
|
2417
|
-
key:
|
|
2418
|
+
return (n, m) => (c(), x("div", Cl, [
|
|
2419
|
+
(c(!0), x(U, null, Y(i.value, (f) => (c(), x("div", {
|
|
2420
|
+
key: f.id,
|
|
2418
2421
|
class: "flex items-center gap-2"
|
|
2419
2422
|
}, [
|
|
2420
|
-
|
|
2421
|
-
class:
|
|
2423
|
+
E("div", {
|
|
2424
|
+
class: B([r.fieldWidth ? `w-[${r.fieldWidth}%]` : "w-[33%]"])
|
|
2422
2425
|
}, [
|
|
2423
|
-
!r.selectList || r.selectList.length === 0 ? (
|
|
2426
|
+
!r.selectList || r.selectList.length === 0 ? (c(), k(l(ve), {
|
|
2424
2427
|
key: 0,
|
|
2425
|
-
value:
|
|
2426
|
-
"onUpdate:value": (
|
|
2427
|
-
title:
|
|
2428
|
+
value: f.field,
|
|
2429
|
+
"onUpdate:value": (w) => f.field = w,
|
|
2430
|
+
title: f.text || f.field,
|
|
2428
2431
|
class: "w-full",
|
|
2429
|
-
placeholder:
|
|
2430
|
-
onInput:
|
|
2432
|
+
placeholder: f.text || r.labelHolder || l(g)("webui.components.form.propEditor.configName"),
|
|
2433
|
+
onInput: v,
|
|
2431
2434
|
disabled: !s.value
|
|
2432
|
-
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (
|
|
2433
|
-
D(l(
|
|
2434
|
-
value:
|
|
2435
|
-
"onUpdate:value": (
|
|
2436
|
-
title:
|
|
2435
|
+
}, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (c(), x("div", Sl, [
|
|
2436
|
+
D(l(ve), {
|
|
2437
|
+
value: f.text,
|
|
2438
|
+
"onUpdate:value": (w) => f.text = w,
|
|
2439
|
+
title: f.text,
|
|
2437
2440
|
disabled: !0,
|
|
2438
2441
|
class: "w-[100%]"
|
|
2439
2442
|
}, null, 8, ["value", "onUpdate:value", "title"]),
|
|
2440
|
-
D(l(
|
|
2443
|
+
D(l(ve), {
|
|
2441
2444
|
type: "hidden",
|
|
2442
|
-
value:
|
|
2443
|
-
"onUpdate:value": (
|
|
2445
|
+
value: f.field,
|
|
2446
|
+
"onUpdate:value": (w) => f.field = w
|
|
2444
2447
|
}, null, 8, ["value", "onUpdate:value"])
|
|
2445
2448
|
]))
|
|
2446
2449
|
], 2),
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
class:
|
|
2450
|
+
m[0] || (m[0] = E("div", { class: "w-[3%]" }, "=", -1)),
|
|
2451
|
+
E("div", {
|
|
2452
|
+
class: B([r.fieldWidth ? `w-[${97 - r.fieldWidth}%]` : "w-[64%]"])
|
|
2450
2453
|
}, [
|
|
2451
|
-
D(l(
|
|
2452
|
-
value:
|
|
2453
|
-
"onUpdate:value": (
|
|
2454
|
-
placeholder: r.valueHolder || l(
|
|
2455
|
-
onInput:
|
|
2456
|
-
title:
|
|
2454
|
+
D(l(ve), {
|
|
2455
|
+
value: f.value,
|
|
2456
|
+
"onUpdate:value": (w) => f.value = w,
|
|
2457
|
+
placeholder: r.valueHolder || l(g)("webui.common.placeholder", [f.text || l(g)("webui.components.form.propEditor.configValue")]),
|
|
2458
|
+
onInput: v,
|
|
2459
|
+
title: f.value
|
|
2457
2460
|
}, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
|
|
2458
2461
|
], 2)
|
|
2459
2462
|
]))), 128)),
|
|
2460
|
-
s.value ? (
|
|
2463
|
+
s.value ? (c(), k(l(ft), {
|
|
2461
2464
|
key: 0,
|
|
2462
|
-
onClick:
|
|
2465
|
+
onClick: u,
|
|
2463
2466
|
class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
|
|
2464
2467
|
size: "small"
|
|
2465
2468
|
}, {
|
|
2466
|
-
default:
|
|
2467
|
-
|
|
2469
|
+
default: y(() => [
|
|
2470
|
+
j(I(l(g)("webui.components.form.propEditor.addConfigRow")), 1)
|
|
2468
2471
|
]),
|
|
2469
2472
|
_: 1
|
|
2470
|
-
})) :
|
|
2473
|
+
})) : C("", !0)
|
|
2471
2474
|
]));
|
|
2472
2475
|
}
|
|
2473
|
-
}),
|
|
2476
|
+
}), Tl = /* @__PURE__ */ ce(zt, [["__scopeId", "data-v-d8787745"]]), Er = /* @__PURE__ */ L({
|
|
2474
2477
|
__name: "radioStatus",
|
|
2475
2478
|
props: {
|
|
2476
2479
|
/**
|
|
@@ -2498,13 +2501,13 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2498
2501
|
}
|
|
2499
2502
|
},
|
|
2500
2503
|
setup(r) {
|
|
2501
|
-
const a = r, e =
|
|
2504
|
+
const a = r, e = S(JSON.parse(JSON.stringify(ze.getOptions(a.dataKey))));
|
|
2502
2505
|
return a.all === !0 && e.value.unshift({
|
|
2503
|
-
label:
|
|
2506
|
+
label: g("webui.components.form.radio.all"),
|
|
2504
2507
|
value: a.allValue || [0, 1]
|
|
2505
|
-
}), (t, s) => (
|
|
2508
|
+
}), (t, s) => (c(), k(Tl, { data: e.value }, null, 8, ["data"]));
|
|
2506
2509
|
}
|
|
2507
|
-
}),
|
|
2510
|
+
}), Ir = /* @__PURE__ */ L({
|
|
2508
2511
|
__name: "index",
|
|
2509
2512
|
props: {
|
|
2510
2513
|
startDate: {},
|
|
@@ -2513,74 +2516,74 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2513
2516
|
},
|
|
2514
2517
|
emits: ["update:startDate", "update:endDate"],
|
|
2515
2518
|
setup(r, { emit: a }) {
|
|
2516
|
-
const e = r, t = a, s = te(), { errInfo: i } = s, o =
|
|
2517
|
-
const
|
|
2518
|
-
if (!(!
|
|
2519
|
+
const e = r, t = a, s = te(), { errInfo: i } = s, o = K(() => e.valueFormat), p = K(() => {
|
|
2520
|
+
const u = e.startDate, v = e.endDate;
|
|
2521
|
+
if (!(!u || !v))
|
|
2519
2522
|
try {
|
|
2520
|
-
const n =
|
|
2523
|
+
const n = Ne(u), m = Ne(v);
|
|
2521
2524
|
return !n.isValid() || !m.isValid() ? void 0 : [n, m];
|
|
2522
2525
|
} catch {
|
|
2523
2526
|
return;
|
|
2524
2527
|
}
|
|
2525
|
-
}),
|
|
2526
|
-
if (!
|
|
2528
|
+
}), d = (u, v) => {
|
|
2529
|
+
if (!u || !v || v.length !== 2) {
|
|
2527
2530
|
t("update:startDate", null), t("update:endDate", null);
|
|
2528
2531
|
return;
|
|
2529
2532
|
}
|
|
2530
2533
|
t("update:startDate", v[0] || null), t("update:endDate", v[1] || null);
|
|
2531
2534
|
};
|
|
2532
|
-
return (
|
|
2535
|
+
return (u, v) => {
|
|
2533
2536
|
var n;
|
|
2534
|
-
return
|
|
2535
|
-
class:
|
|
2536
|
-
locale: l(
|
|
2537
|
+
return c(), k(l(na), {
|
|
2538
|
+
class: B([((n = l(i)) == null ? void 0 : n.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
|
|
2539
|
+
locale: l(De),
|
|
2537
2540
|
"value-format": o.value,
|
|
2538
|
-
value:
|
|
2539
|
-
onChange:
|
|
2541
|
+
value: p.value,
|
|
2542
|
+
onChange: d
|
|
2540
2543
|
}, null, 8, ["class", "locale", "value-format", "value"]);
|
|
2541
2544
|
};
|
|
2542
2545
|
}
|
|
2543
|
-
}),
|
|
2546
|
+
}), Lr = /* @__PURE__ */ ce(Ot, [["__scopeId", "data-v-fdcb011d"]]), Ur = /* @__PURE__ */ L({
|
|
2544
2547
|
__name: "index",
|
|
2545
2548
|
setup(r) {
|
|
2546
|
-
const {
|
|
2547
|
-
|
|
2549
|
+
const { editorCtrl: a, labelText: e, errInfo: t } = te(), s = () => {
|
|
2550
|
+
t != null && t.value.errClass && a && se(a);
|
|
2548
2551
|
};
|
|
2549
|
-
return (
|
|
2550
|
-
var
|
|
2551
|
-
return
|
|
2552
|
-
class: ((
|
|
2552
|
+
return (i, o) => {
|
|
2553
|
+
var p;
|
|
2554
|
+
return c(), k(l(ia), N({
|
|
2555
|
+
class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2553
2556
|
"allow-clear": !0,
|
|
2554
|
-
placeholder: l(
|
|
2555
|
-
onBlur:
|
|
2556
|
-
onKeyup:
|
|
2557
|
+
placeholder: l(g)("webui.common.placeholder", [l(e)]),
|
|
2558
|
+
onBlur: s,
|
|
2559
|
+
onKeyup: o[0] || (o[0] = Ye(me(() => {
|
|
2557
2560
|
}, ["stop"]), ["enter", "native"])),
|
|
2558
|
-
onKeydown:
|
|
2561
|
+
onKeydown: o[1] || (o[1] = Ye(me(() => {
|
|
2559
2562
|
}, ["stop"]), ["enter", "native"]))
|
|
2560
|
-
},
|
|
2563
|
+
}, i.$attrs), null, 16, ["class", "placeholder"]);
|
|
2561
2564
|
};
|
|
2562
2565
|
}
|
|
2563
|
-
}),
|
|
2566
|
+
}), Mr = /* @__PURE__ */ L({
|
|
2564
2567
|
__name: "index",
|
|
2565
2568
|
props: {
|
|
2566
2569
|
valueFormat: {}
|
|
2567
2570
|
},
|
|
2568
2571
|
setup(r) {
|
|
2569
|
-
const a = r, { editorCtrl: e, labelText: t, errInfo: s } = te(),
|
|
2572
|
+
const a = r, { editorCtrl: e, labelText: t, errInfo: s } = te(), i = () => {
|
|
2570
2573
|
s != null && s.value.errClass && e && se(e);
|
|
2571
|
-
},
|
|
2572
|
-
return (
|
|
2573
|
-
var
|
|
2574
|
-
return
|
|
2575
|
-
class:
|
|
2576
|
-
placeholder: l(
|
|
2577
|
-
locale: l(
|
|
2578
|
-
valueFormat:
|
|
2579
|
-
onBlur:
|
|
2574
|
+
}, o = S(a.valueFormat ?? "HH:mm");
|
|
2575
|
+
return (p, d) => {
|
|
2576
|
+
var u;
|
|
2577
|
+
return c(), k(l(ca), {
|
|
2578
|
+
class: B(["w-full", [((u = l(s)) == null ? void 0 : u.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
|
|
2579
|
+
placeholder: l(g)("webui.common.pleaseSelect") + l(t),
|
|
2580
|
+
locale: l(De),
|
|
2581
|
+
valueFormat: o.value,
|
|
2582
|
+
onBlur: i
|
|
2580
2583
|
}, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
|
|
2581
2584
|
};
|
|
2582
2585
|
}
|
|
2583
|
-
}),
|
|
2586
|
+
}), $l = /* @__PURE__ */ L({
|
|
2584
2587
|
__name: "index",
|
|
2585
2588
|
props: {
|
|
2586
2589
|
autoload: { type: Boolean },
|
|
@@ -2590,46 +2593,46 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2590
2593
|
},
|
|
2591
2594
|
emits: ["change", "update:value"],
|
|
2592
2595
|
setup(r, { emit: a }) {
|
|
2593
|
-
const e = r, t =
|
|
2596
|
+
const e = r, t = S({ ...e.url }), { editorCtrl: s, labelText: i, errInfo: o } = te(), p = a, d = S([]), u = S([]);
|
|
2594
2597
|
e.value && e.value.every((n) => {
|
|
2595
|
-
|
|
2598
|
+
u.value.push(n.toString());
|
|
2596
2599
|
}), M(
|
|
2597
2600
|
() => e.value,
|
|
2598
2601
|
(n) => {
|
|
2599
|
-
n && (
|
|
2602
|
+
n && (u.value = n);
|
|
2600
2603
|
}
|
|
2601
2604
|
);
|
|
2602
2605
|
const v = (n) => {
|
|
2603
|
-
|
|
2606
|
+
p("update:value", n), p("change", n), u.value = n, o != null && o.value.errClass && s && se(s);
|
|
2604
2607
|
};
|
|
2605
2608
|
return le(async () => {
|
|
2606
2609
|
if (t.value) {
|
|
2607
2610
|
const n = s == null ? void 0 : s.page;
|
|
2608
2611
|
if (t.value.api || (t.value.api = n == null ? void 0 : n.api), t.value.authorize === void 0 && (t.value.authorize = n == null ? void 0 : n.authorize), e.autoload) {
|
|
2609
|
-
const m = await
|
|
2612
|
+
const m = await ot(s, {
|
|
2610
2613
|
urlKey: "list",
|
|
2611
2614
|
url: { ...t.value, url: t.value.url },
|
|
2612
2615
|
loadingText: !1,
|
|
2613
2616
|
params: e.params
|
|
2614
2617
|
});
|
|
2615
|
-
|
|
2618
|
+
d.value = (m == null ? void 0 : m.data) ?? [];
|
|
2616
2619
|
}
|
|
2617
2620
|
}
|
|
2618
2621
|
}), (n, m) => {
|
|
2619
|
-
var
|
|
2620
|
-
return
|
|
2621
|
-
class: ((
|
|
2622
|
-
placeholder: l(
|
|
2623
|
-
targetKeys:
|
|
2622
|
+
var f;
|
|
2623
|
+
return c(), k(l(ua), N({
|
|
2624
|
+
class: ((f = l(o)) == null ? void 0 : f.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
|
|
2625
|
+
placeholder: l(g)("webui.components.form.transfer.pleaseInput", [l(i)]),
|
|
2626
|
+
targetKeys: u.value,
|
|
2624
2627
|
onChange: v
|
|
2625
2628
|
}, n.$attrs), {
|
|
2626
|
-
children:
|
|
2627
|
-
|
|
2628
|
-
direction:
|
|
2629
|
-
disabled:
|
|
2629
|
+
children: y(({ direction: w, disabled: $, filteredItems: _, onItemSelectAll: T, onItemSelect: h, selectedKeys: b }) => [
|
|
2630
|
+
z(n.$slots, "children", {
|
|
2631
|
+
direction: w,
|
|
2632
|
+
disabled: $,
|
|
2630
2633
|
filteredItems: _,
|
|
2631
|
-
onItemSelectAll:
|
|
2632
|
-
onItemSelect:
|
|
2634
|
+
onItemSelectAll: T,
|
|
2635
|
+
onItemSelect: h,
|
|
2633
2636
|
selectedKeys: b
|
|
2634
2637
|
})
|
|
2635
2638
|
]),
|
|
@@ -2637,7 +2640,7 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2637
2640
|
}, 16, ["class", "placeholder", "targetKeys"]);
|
|
2638
2641
|
};
|
|
2639
2642
|
}
|
|
2640
|
-
}),
|
|
2643
|
+
}), Nr = /* @__PURE__ */ L({
|
|
2641
2644
|
__name: "transferTable",
|
|
2642
2645
|
props: {
|
|
2643
2646
|
/**
|
|
@@ -2664,44 +2667,44 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2664
2667
|
},
|
|
2665
2668
|
emits: ["update:value"],
|
|
2666
2669
|
setup(r, { emit: a }) {
|
|
2667
|
-
const e = r, t = a, s =
|
|
2670
|
+
const e = r, t = a, s = S(e.autoload), i = S(e.value), o = S(e.gridCtrl.primaryKey);
|
|
2668
2671
|
M(
|
|
2669
2672
|
() => i.value,
|
|
2670
|
-
(
|
|
2671
|
-
t("update:value",
|
|
2673
|
+
(u) => {
|
|
2674
|
+
t("update:value", u);
|
|
2672
2675
|
}
|
|
2673
2676
|
), M(
|
|
2674
2677
|
() => e.value,
|
|
2675
|
-
(
|
|
2676
|
-
|
|
2678
|
+
(u) => {
|
|
2679
|
+
u && (i.value = u);
|
|
2677
2680
|
}
|
|
2678
|
-
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable =
|
|
2679
|
-
const
|
|
2680
|
-
getCheckboxProps: (
|
|
2681
|
+
), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = S(!0), e.gridCtrl.buttons = S([]), e.gridCtrl.tools = [];
|
|
2682
|
+
const p = ({ disabled: u, selectedKeys: v, onItemSelectAll: n, onItemSelect: m }) => ({
|
|
2683
|
+
getCheckboxProps: (f) => ({
|
|
2681
2684
|
// 控制是否禁止
|
|
2682
|
-
disabled:
|
|
2685
|
+
disabled: u || f.disabled
|
|
2683
2686
|
}),
|
|
2684
|
-
onSelectAll(
|
|
2685
|
-
const
|
|
2686
|
-
n(
|
|
2687
|
+
onSelectAll(f, w) {
|
|
2688
|
+
const $ = w.filter((_) => !_.disabled).map(({ [o.value]: _ }) => _);
|
|
2689
|
+
n($, f);
|
|
2687
2690
|
},
|
|
2688
|
-
onSelect({ [o.value]:
|
|
2689
|
-
m(
|
|
2691
|
+
onSelect({ [o.value]: f }, w) {
|
|
2692
|
+
m(f, w);
|
|
2690
2693
|
},
|
|
2691
2694
|
selectedRowKeys: v
|
|
2692
|
-
}),
|
|
2695
|
+
}), d = S([]);
|
|
2693
2696
|
return le(async () => {
|
|
2694
2697
|
if (s.value) {
|
|
2695
|
-
const
|
|
2698
|
+
const u = await ot(e.gridCtrl, {
|
|
2696
2699
|
urlKey: "list",
|
|
2697
2700
|
url: { ...e.gridCtrl.gridUrl, url: e.gridCtrl.gridUrl.url },
|
|
2698
2701
|
params: e.gridCtrl.gridQuery,
|
|
2699
2702
|
loadingText: !1
|
|
2700
2703
|
});
|
|
2701
|
-
|
|
2704
|
+
d.value = (u == null ? void 0 : u.data) ?? [];
|
|
2702
2705
|
}
|
|
2703
|
-
}), (
|
|
2704
|
-
"data-source":
|
|
2706
|
+
}), (u, v) => (c(), k($l, N({
|
|
2707
|
+
"data-source": d.value,
|
|
2705
2708
|
"row-key": (n) => n[o.value],
|
|
2706
2709
|
value: i.value,
|
|
2707
2710
|
"onUpdate:value": v[0] || (v[0] = (n) => i.value = n),
|
|
@@ -2712,30 +2715,30 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2712
2715
|
"show-select-all": !1,
|
|
2713
2716
|
"show-search": !0,
|
|
2714
2717
|
"filter-option": (n, m) => {
|
|
2715
|
-
for (const
|
|
2716
|
-
if (m[
|
|
2718
|
+
for (const f of e.gridCtrl.columns.value)
|
|
2719
|
+
if (m[f.dataIndex].toString().indexOf(n) !== -1)
|
|
2717
2720
|
return !0;
|
|
2718
2721
|
return !1;
|
|
2719
2722
|
}
|
|
2720
|
-
},
|
|
2721
|
-
children:
|
|
2722
|
-
D(l(
|
|
2723
|
+
}, u.$attrs), {
|
|
2724
|
+
children: y(({ filteredItems: n, onItemSelectAll: m, onItemSelect: f, selectedKeys: w }) => [
|
|
2725
|
+
D(l(vt), {
|
|
2723
2726
|
columns: r.gridCtrl.columns.value,
|
|
2724
2727
|
"row-key": o.value,
|
|
2725
|
-
"row-selection":
|
|
2728
|
+
"row-selection": p({
|
|
2726
2729
|
disabled: !1,
|
|
2727
|
-
selectedKeys:
|
|
2730
|
+
selectedKeys: w,
|
|
2728
2731
|
onItemSelectAll: m,
|
|
2729
|
-
onItemSelect:
|
|
2732
|
+
onItemSelect: f
|
|
2730
2733
|
}),
|
|
2731
2734
|
bordered: !1,
|
|
2732
2735
|
size: "small",
|
|
2733
2736
|
"data-source": n,
|
|
2734
2737
|
scroll: { x: 300 },
|
|
2735
|
-
"custom-row": (
|
|
2738
|
+
"custom-row": ($) => ({
|
|
2736
2739
|
onClick: () => {
|
|
2737
|
-
const _ =
|
|
2738
|
-
|
|
2740
|
+
const _ = $[o.value];
|
|
2741
|
+
f(_, !w.includes(_));
|
|
2739
2742
|
}
|
|
2740
2743
|
})
|
|
2741
2744
|
}, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
|
|
@@ -2743,7 +2746,7 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2743
2746
|
_: 1
|
|
2744
2747
|
}, 16, ["data-source", "row-key", "value", "filter-option"]));
|
|
2745
2748
|
}
|
|
2746
|
-
}),
|
|
2749
|
+
}), Dl = /* @__PURE__ */ L({
|
|
2747
2750
|
__name: "index",
|
|
2748
2751
|
props: {
|
|
2749
2752
|
multiple: {
|
|
@@ -2770,65 +2773,65 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2770
2773
|
},
|
|
2771
2774
|
emits: ["change", "update:value"],
|
|
2772
2775
|
setup(r, { emit: a }) {
|
|
2773
|
-
const e = r, t = e.value === void 0 ? !0 : e.undefValue, s = e.treeCtrl, i = te(), { errInfo: o, labelText:
|
|
2774
|
-
i.inputEmit =
|
|
2775
|
-
const
|
|
2776
|
+
const e = r, t = e.value === void 0 ? !0 : e.undefValue, s = e.treeCtrl, i = te(), { errInfo: o, labelText: p } = i, d = a;
|
|
2777
|
+
i.inputEmit = d;
|
|
2778
|
+
const u = S([]), v = S();
|
|
2776
2779
|
M(
|
|
2777
2780
|
() => e.value,
|
|
2778
|
-
(
|
|
2779
|
-
v.value =
|
|
2781
|
+
(f) => {
|
|
2782
|
+
v.value = f;
|
|
2780
2783
|
},
|
|
2781
2784
|
{ immediate: !0 }
|
|
2782
2785
|
), M(
|
|
2783
2786
|
() => v.value,
|
|
2784
|
-
(
|
|
2785
|
-
|
|
2787
|
+
(f) => {
|
|
2788
|
+
d("update:value", f);
|
|
2786
2789
|
}
|
|
2787
2790
|
), M(
|
|
2788
2791
|
() => s.data.value,
|
|
2789
|
-
(
|
|
2790
|
-
|
|
2792
|
+
(f) => {
|
|
2793
|
+
f && (u.value = s.fieldMap ? be(s.fieldMap, f) : f);
|
|
2791
2794
|
},
|
|
2792
2795
|
{ immediate: !0 }
|
|
2793
2796
|
);
|
|
2794
|
-
const n = (
|
|
2795
|
-
e.multiple ? v.value =
|
|
2797
|
+
const n = (f) => {
|
|
2798
|
+
e.multiple ? v.value = f ?? [] : f == null ? v.value = t ? void 0 : null : v.value = f, d("change", v.value);
|
|
2796
2799
|
};
|
|
2797
|
-
|
|
2800
|
+
Ce(() => {
|
|
2798
2801
|
e.treeCtrl && e.treeCtrl.autoload && (e.treeCtrl.reload.value = !0);
|
|
2799
2802
|
}), le(() => {
|
|
2800
2803
|
s.fieldMap || (s.fieldMap = {
|
|
2801
2804
|
label: "Name",
|
|
2802
2805
|
key: "Id",
|
|
2803
2806
|
value: "Id"
|
|
2804
|
-
}), s.data.value ?
|
|
2807
|
+
}), s.data.value ? u.value = s.fieldMap ? be(s.fieldMap, s.data.value) : s.data.value : e.treeCtrl.autoload && rt(e.treeCtrl);
|
|
2805
2808
|
});
|
|
2806
2809
|
const m = () => {
|
|
2807
2810
|
v.value = t ? void 0 : null;
|
|
2808
2811
|
};
|
|
2809
|
-
return (
|
|
2810
|
-
var
|
|
2811
|
-
return
|
|
2812
|
-
class: [[(
|
|
2812
|
+
return (f, w) => {
|
|
2813
|
+
var $;
|
|
2814
|
+
return c(), k(l(da), N({
|
|
2815
|
+
class: [[($ = l(o)) == null ? void 0 : $.errClass], "w-full"],
|
|
2813
2816
|
"tree-line": "",
|
|
2814
2817
|
multiple: r.multiple,
|
|
2815
2818
|
"tree-default-expanded-keys": ["-"],
|
|
2816
2819
|
value: v.value,
|
|
2817
|
-
"onUpdate:value":
|
|
2818
|
-
"tree-data":
|
|
2819
|
-
placeholder: l(
|
|
2820
|
+
"onUpdate:value": w[0] || (w[0] = (_) => v.value = _),
|
|
2821
|
+
"tree-data": u.value,
|
|
2822
|
+
placeholder: l(g)("webui.components.form.treeSelect.pleaseSelect", [l(p)]),
|
|
2820
2823
|
onChange: n,
|
|
2821
2824
|
onClear: m
|
|
2822
|
-
},
|
|
2825
|
+
}, f.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
|
|
2823
2826
|
};
|
|
2824
2827
|
}
|
|
2825
|
-
}),
|
|
2828
|
+
}), Rr = /* @__PURE__ */ ce(Dl, [["__scopeId", "data-v-d88b9e8a"]]), Fl = { class: "w-full mt-1" }, Pl = { class: "flex flex-wrap gap-2" }, El = ["onMouseenter"], Il = { class: "w-16 h-16 border border-solid border-gray-200 rounded overflow-hidden" }, Ll = ["src"], Ul = {
|
|
2826
2829
|
key: 0,
|
|
2827
2830
|
class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center gap-4 rounded"
|
|
2828
|
-
},
|
|
2831
|
+
}, Ml = ["onClick"], Nl = { class: "text-sm ml-1" }, Rl = ["onClick"], Bl = { class: "text-sm ml-1" }, Al = {
|
|
2829
2832
|
key: 0,
|
|
2830
2833
|
class: "w-16 h-16"
|
|
2831
|
-
},
|
|
2834
|
+
}, zl = /* @__PURE__ */ L({
|
|
2832
2835
|
__name: "imageList",
|
|
2833
2836
|
props: {
|
|
2834
2837
|
autoUpload: { type: Boolean, default: !1 },
|
|
@@ -2848,168 +2851,168 @@ const Dr = /* @__PURE__ */ L({
|
|
|
2848
2851
|
},
|
|
2849
2852
|
emits: ["update:file-list"],
|
|
2850
2853
|
setup(r, { emit: a }) {
|
|
2851
|
-
const e = r, t = te(), { errInfo: s } = t,
|
|
2854
|
+
const e = r, t = te(), { errInfo: s } = t, i = S(e.fileList), o = S([]), p = a, d = K(() => {
|
|
2852
2855
|
var F;
|
|
2853
2856
|
return (F = e.fileExt) != null && F.length ? e.fileExt.map((P) => `.${P}`).join(",") : "";
|
|
2854
|
-
}),
|
|
2857
|
+
}), u = (F) => {
|
|
2855
2858
|
var P;
|
|
2856
2859
|
if (e.fileExt && e.fileExt.length > 0) {
|
|
2857
2860
|
const H = ((P = F.name.split(".").pop()) == null ? void 0 : P.toLowerCase()) || "";
|
|
2858
2861
|
if (!e.fileExt.includes(H))
|
|
2859
|
-
return ae.error(
|
|
2862
|
+
return ae.error(g("webui.components.form.upload.unsupportedFileType")), !1;
|
|
2860
2863
|
}
|
|
2861
|
-
return F.size / 1024 / 1024 > e.maxFileSize ? (ae.error(
|
|
2862
|
-
},
|
|
2864
|
+
return F.size / 1024 / 1024 > e.maxFileSize ? (ae.error(g("webui.components.form.upload.fileSizeExceeded", [e.maxFileSize])), !1) : !0;
|
|
2865
|
+
}, v = () => e.maxCount > 1 && i.value.length >= e.maxCount, n = (F) => {
|
|
2863
2866
|
const P = F;
|
|
2864
|
-
return P.params || (P.params = {}), P.params.FileKey = P.name, e.parentPath && (P.params.FileKey =
|
|
2865
|
-
},
|
|
2867
|
+
return P.params || (P.params = {}), P.params.FileKey = P.name, e.parentPath && (P.params.FileKey = Ve.join("/", e.parentPath, P.name)), P;
|
|
2868
|
+
}, m = (F) => u(F) && e.autoUpload, f = async (F) => {
|
|
2866
2869
|
if (F.length === 0) return;
|
|
2867
|
-
const P = [...
|
|
2870
|
+
const P = [...i.value];
|
|
2868
2871
|
let H = !1;
|
|
2869
2872
|
for (const Z of F) {
|
|
2870
|
-
if (!
|
|
2873
|
+
if (!u(Z)) {
|
|
2871
2874
|
H = !0;
|
|
2872
2875
|
continue;
|
|
2873
2876
|
}
|
|
2874
|
-
const q =
|
|
2877
|
+
const q = n(Z);
|
|
2875
2878
|
if (e.maxCount === 1) {
|
|
2876
2879
|
P.length = 0, P.push(q);
|
|
2877
2880
|
break;
|
|
2878
2881
|
}
|
|
2879
|
-
if (
|
|
2880
|
-
ae.error(
|
|
2882
|
+
if (v()) {
|
|
2883
|
+
ae.error(g("webui.components.form.upload.maxFileCount", [e.maxCount])), H = !0;
|
|
2881
2884
|
break;
|
|
2882
2885
|
}
|
|
2883
|
-
const re = P.findIndex((
|
|
2886
|
+
const re = P.findIndex((Pe) => Pe.name === q.name);
|
|
2884
2887
|
re > -1 ? P[re] = q : P.push(q);
|
|
2885
2888
|
}
|
|
2886
|
-
(!H || P.length > 0) && (
|
|
2887
|
-
},
|
|
2888
|
-
|
|
2889
|
-
},
|
|
2890
|
-
accept:
|
|
2889
|
+
(!H || P.length > 0) && (i.value = P), o.value = [];
|
|
2890
|
+
}, w = (F) => {
|
|
2891
|
+
o.value = F, f(F);
|
|
2892
|
+
}, $ = K(() => ({
|
|
2893
|
+
accept: d.value,
|
|
2891
2894
|
multiple: e.maxCount !== 1,
|
|
2892
|
-
fileList:
|
|
2893
|
-
"onUpdate:fileList":
|
|
2894
|
-
beforeUpload:
|
|
2895
|
+
fileList: o.value,
|
|
2896
|
+
"onUpdate:fileList": w,
|
|
2897
|
+
beforeUpload: m,
|
|
2895
2898
|
listType: "text",
|
|
2896
2899
|
showUploadList: !1,
|
|
2897
2900
|
customRequest: async () => {
|
|
2898
2901
|
if (e.autoUpload && e.uploadUrl)
|
|
2899
|
-
for (const F of
|
|
2900
|
-
F.percent === 0 && await
|
|
2902
|
+
for (const F of i.value)
|
|
2903
|
+
F.percent === 0 && await jt(e.uploadUrl, F);
|
|
2901
2904
|
}
|
|
2902
2905
|
}));
|
|
2903
2906
|
M(
|
|
2904
2907
|
() => e.fileList,
|
|
2905
2908
|
(F) => {
|
|
2906
|
-
|
|
2909
|
+
i.value = F;
|
|
2907
2910
|
},
|
|
2908
2911
|
{ deep: !0, immediate: !0 }
|
|
2909
2912
|
), M(
|
|
2910
|
-
() =>
|
|
2913
|
+
() => i.value,
|
|
2911
2914
|
(F) => {
|
|
2912
|
-
|
|
2915
|
+
p("update:file-list", F);
|
|
2913
2916
|
},
|
|
2914
2917
|
{ deep: !0 }
|
|
2915
2918
|
), M(
|
|
2916
2919
|
() => e.parentPath,
|
|
2917
2920
|
(F) => {
|
|
2918
|
-
F &&
|
|
2919
|
-
P.params.FileKey =
|
|
2921
|
+
F && i.value.forEach((P) => {
|
|
2922
|
+
P.params.FileKey = Ve.join("/", F, P.fileName);
|
|
2920
2923
|
});
|
|
2921
2924
|
}
|
|
2922
2925
|
);
|
|
2923
|
-
const
|
|
2924
|
-
const P =
|
|
2925
|
-
|
|
2926
|
-
},
|
|
2927
|
-
const P =
|
|
2928
|
-
e.deleteUrl && P.minioFile && P.minioFile.Key ?
|
|
2926
|
+
const _ = S(!1), T = S(""), h = (F) => {
|
|
2927
|
+
const P = i.value[F];
|
|
2928
|
+
T.value = V(P), _.value = !0;
|
|
2929
|
+
}, b = (F) => {
|
|
2930
|
+
const P = i.value[F];
|
|
2931
|
+
e.deleteUrl && P.minioFile && P.minioFile.Key ? Oe(e.deleteUrl, {
|
|
2929
2932
|
Query: {
|
|
2930
2933
|
FileKey: P.minioFile.Key
|
|
2931
2934
|
}
|
|
2932
2935
|
}).then((H) => {
|
|
2933
|
-
H && H.status ===
|
|
2934
|
-
}) :
|
|
2935
|
-
},
|
|
2936
|
+
H && H.status === Ke.SUCCESS && (ae.success(g("webui.common.success")), i.value.splice(F, 1));
|
|
2937
|
+
}) : i.value.splice(F, 1);
|
|
2938
|
+
}, R = S(/* @__PURE__ */ new Map()), V = (F) => {
|
|
2936
2939
|
if (F.originFileObj)
|
|
2937
2940
|
return URL.createObjectURL(F.originFileObj);
|
|
2938
2941
|
if (F.minioFile) {
|
|
2939
2942
|
const P = F.minioFile.Key;
|
|
2940
|
-
return
|
|
2943
|
+
return R.value.has(P) ? R.value.get(P) : (O(F), "");
|
|
2941
2944
|
}
|
|
2942
2945
|
return "";
|
|
2943
|
-
},
|
|
2946
|
+
}, O = async (F) => {
|
|
2944
2947
|
if (!F.minioFile || !e.previewUrl) return;
|
|
2945
2948
|
const P = F.minioFile.Key;
|
|
2946
2949
|
try {
|
|
2947
|
-
const H = `${e.previewUrl.url}?FileKey=${encodeURIComponent(F.minioFile.Key)}`, Z =
|
|
2950
|
+
const H = `${e.previewUrl.url}?FileKey=${encodeURIComponent(F.minioFile.Key)}`, Z = Vt() ? await Kt.getToken() : Be().getToken(), q = await fetch(H, {
|
|
2948
2951
|
method: "GET",
|
|
2949
2952
|
headers: {
|
|
2950
2953
|
Authorization: `Bearer ${Z}`
|
|
2951
2954
|
}
|
|
2952
2955
|
});
|
|
2953
2956
|
if (q.ok) {
|
|
2954
|
-
const re = await q.blob(),
|
|
2955
|
-
|
|
2957
|
+
const re = await q.blob(), Pe = URL.createObjectURL(re);
|
|
2958
|
+
R.value.set(P, Pe);
|
|
2956
2959
|
} else
|
|
2957
2960
|
console.error("加载图片失败:", q.status);
|
|
2958
2961
|
} catch (H) {
|
|
2959
2962
|
console.error("加载图片失败:", H);
|
|
2960
2963
|
}
|
|
2961
|
-
},
|
|
2964
|
+
}, A = K(() => i.value.length < e.maxCount), Fe = S(-1);
|
|
2962
2965
|
return (F, P) => {
|
|
2963
2966
|
const H = ie("auth");
|
|
2964
|
-
return
|
|
2965
|
-
|
|
2966
|
-
(
|
|
2967
|
+
return c(), x("div", Fl, [
|
|
2968
|
+
E("div", Pl, [
|
|
2969
|
+
(c(!0), x(U, null, Y(i.value, (Z, q) => (c(), x("div", {
|
|
2967
2970
|
key: q,
|
|
2968
2971
|
class: "relative image-item",
|
|
2969
|
-
onMouseenter: (re) =>
|
|
2970
|
-
onMouseleave: P[0] || (P[0] = (re) =>
|
|
2972
|
+
onMouseenter: (re) => Fe.value = q,
|
|
2973
|
+
onMouseleave: P[0] || (P[0] = (re) => Fe.value = -1)
|
|
2971
2974
|
}, [
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
src:
|
|
2975
|
+
E("div", Il, [
|
|
2976
|
+
E("img", {
|
|
2977
|
+
src: V(Z),
|
|
2975
2978
|
class: "w-full h-full object-cover"
|
|
2976
|
-
}, null, 8,
|
|
2979
|
+
}, null, 8, Ll)
|
|
2977
2980
|
]),
|
|
2978
|
-
|
|
2979
|
-
r.previewUrl ? (
|
|
2981
|
+
Fe.value === q ? (c(), x("div", Ul, [
|
|
2982
|
+
r.previewUrl ? (c(), x("div", {
|
|
2980
2983
|
key: 0,
|
|
2981
2984
|
class: "flex items-center text-white cursor-pointer hover:text-blue-400",
|
|
2982
|
-
onClick: (re) =>
|
|
2985
|
+
onClick: (re) => h(q)
|
|
2983
2986
|
}, [
|
|
2984
|
-
D(l(
|
|
2987
|
+
D(l(G), {
|
|
2985
2988
|
icon: "icon-eye",
|
|
2986
2989
|
clickable: ""
|
|
2987
2990
|
}),
|
|
2988
|
-
|
|
2989
|
-
], 8,
|
|
2990
|
-
r.showDelete !== !1 ? (
|
|
2991
|
+
E("span", Nl, I(l(g)("webui.components.form.upload.preview")), 1)
|
|
2992
|
+
], 8, Ml)) : C("", !0),
|
|
2993
|
+
r.showDelete !== !1 ? (c(), x("div", {
|
|
2991
2994
|
key: 1,
|
|
2992
2995
|
class: "flex items-center text-white cursor-pointer hover:text-red-400",
|
|
2993
|
-
onClick: (re) =>
|
|
2996
|
+
onClick: (re) => b(q)
|
|
2994
2997
|
}, [
|
|
2995
|
-
D(l(
|
|
2998
|
+
D(l(G), {
|
|
2996
2999
|
icon: "icon-new",
|
|
2997
3000
|
angle: 45,
|
|
2998
3001
|
clickable: ""
|
|
2999
3002
|
}),
|
|
3000
|
-
|
|
3001
|
-
], 8,
|
|
3002
|
-
])) :
|
|
3003
|
-
], 40,
|
|
3004
|
-
|
|
3005
|
-
Q((
|
|
3006
|
-
default:
|
|
3003
|
+
E("span", Bl, I(l(g)("webui.components.form.upload.delete")), 1)
|
|
3004
|
+
], 8, Rl)) : C("", !0)
|
|
3005
|
+
])) : C("", !0)
|
|
3006
|
+
], 40, El))), 128)),
|
|
3007
|
+
A.value ? (c(), x("div", Al, [
|
|
3008
|
+
Q((c(), k(l(pa), N({ ref: "fileUploader" }, $.value), {
|
|
3009
|
+
default: y(() => {
|
|
3007
3010
|
var Z;
|
|
3008
3011
|
return [
|
|
3009
|
-
|
|
3010
|
-
class:
|
|
3012
|
+
E("div", {
|
|
3013
|
+
class: B(["w-16 h-16 border border-dashed border-gray-300 rounded flex items-center justify-center cursor-pointer hover:border-blue-500 transition-colors", [(Z = l(s)) == null ? void 0 : Z.errClass]])
|
|
3011
3014
|
}, [
|
|
3012
|
-
D(l(
|
|
3015
|
+
D(l(G), {
|
|
3013
3016
|
icon: "icon-new",
|
|
3014
3017
|
class: "text-gray-400 w-10 h-10"
|
|
3015
3018
|
})
|
|
@@ -3020,40 +3023,40 @@ const Dr = /* @__PURE__ */ L({
|
|
|
3020
3023
|
}, 16)), [
|
|
3021
3024
|
[H, { role: ["Super", "Admin"], permit: ":imagelist:upload" }]
|
|
3022
3025
|
])
|
|
3023
|
-
])) :
|
|
3026
|
+
])) : C("", !0)
|
|
3024
3027
|
]),
|
|
3025
|
-
D(l(
|
|
3026
|
-
preview: { visible:
|
|
3027
|
-
src:
|
|
3028
|
+
D(l(fa), {
|
|
3029
|
+
preview: { visible: _.value, onVisibleChange: (Z) => _.value = Z },
|
|
3030
|
+
src: T.value,
|
|
3028
3031
|
style: { display: "none" }
|
|
3029
3032
|
}, null, 8, ["preview", "src"])
|
|
3030
3033
|
]);
|
|
3031
3034
|
};
|
|
3032
3035
|
}
|
|
3033
|
-
}),
|
|
3036
|
+
}), Br = /* @__PURE__ */ ce(zl, [["__scopeId", "data-v-d31b5811"]]), Ol = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, Kl = { class: "flex w-full h-full min-h-full" }, jl = {
|
|
3034
3037
|
key: 0,
|
|
3035
3038
|
class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
|
|
3036
|
-
},
|
|
3039
|
+
}, Vl = { class: "flex-1 h-full overflow-y-auto" }, Ar = /* @__PURE__ */ L({
|
|
3037
3040
|
__name: "index",
|
|
3038
3041
|
props: {
|
|
3039
3042
|
left: { type: Boolean }
|
|
3040
3043
|
},
|
|
3041
3044
|
setup(r) {
|
|
3042
|
-
const { useToken: a } =
|
|
3043
|
-
return (t, s) => (
|
|
3044
|
-
D(l(
|
|
3045
|
+
const { useToken: a } = it, { token: e } = a();
|
|
3046
|
+
return (t, s) => (c(), x("div", Ol, [
|
|
3047
|
+
D(l(va), {
|
|
3045
3048
|
class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
|
|
3046
|
-
style:
|
|
3049
|
+
style: je({
|
|
3047
3050
|
backgroundColor: l(e).colorBgContainer
|
|
3048
3051
|
})
|
|
3049
3052
|
}, {
|
|
3050
|
-
default:
|
|
3051
|
-
|
|
3052
|
-
r.left ? (
|
|
3053
|
-
|
|
3054
|
-
])) :
|
|
3055
|
-
|
|
3056
|
-
|
|
3053
|
+
default: y(() => [
|
|
3054
|
+
E("div", Kl, [
|
|
3055
|
+
r.left ? (c(), x("div", jl, [
|
|
3056
|
+
z(t.$slots, "left")
|
|
3057
|
+
])) : C("", !0),
|
|
3058
|
+
E("div", Vl, [
|
|
3059
|
+
z(t.$slots, "default")
|
|
3057
3060
|
])
|
|
3058
3061
|
])
|
|
3059
3062
|
]),
|
|
@@ -3063,171 +3066,171 @@ const Dr = /* @__PURE__ */ L({
|
|
|
3063
3066
|
}
|
|
3064
3067
|
});
|
|
3065
3068
|
export {
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3069
|
+
g as $t,
|
|
3070
|
+
jo as Alert,
|
|
3071
|
+
rs as AppIcon,
|
|
3072
|
+
pe as AppRouter,
|
|
3073
|
+
Mo as AsyncUploader,
|
|
3074
|
+
_r as AutoComplete,
|
|
3075
|
+
os as Breadcrumb,
|
|
3073
3076
|
ee as Button,
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3077
|
+
ht as Cache,
|
|
3078
|
+
Da as CacheKeys,
|
|
3079
|
+
Bo as CanPreviewFileExt,
|
|
3080
|
+
Cr as Cascader,
|
|
3081
|
+
Sr as Checkbox,
|
|
3082
|
+
Ar as Content,
|
|
3083
|
+
Tr as DatePicker,
|
|
3084
|
+
ss as Datetime,
|
|
3085
|
+
vs as Dialog,
|
|
3086
|
+
mr as Drawer,
|
|
3087
|
+
Kr as EventPrefix,
|
|
3088
|
+
gr as Form,
|
|
3089
|
+
hr as FormItem,
|
|
3090
|
+
fr as Fullscreen,
|
|
3091
|
+
Me as GroupTools,
|
|
3092
|
+
ns as Header,
|
|
3093
|
+
is as HeaderExits,
|
|
3094
|
+
Pa as Helper,
|
|
3095
|
+
jr as ICONS_LIB,
|
|
3096
|
+
cs as Icon,
|
|
3097
|
+
Na as Icontool,
|
|
3098
|
+
Br as ImageList,
|
|
3099
|
+
Ct as Input,
|
|
3100
|
+
$r as InputIcon,
|
|
3101
|
+
Fr as InputNumber,
|
|
3102
|
+
Dr as InputPassword,
|
|
3103
|
+
vr as LayoutIcon,
|
|
3104
|
+
br as List,
|
|
3105
|
+
Ua as ListOperate,
|
|
3106
|
+
Vo as Loading,
|
|
3107
|
+
us as Menu,
|
|
3108
|
+
ds as MenuTabs,
|
|
3109
|
+
Kt as MicroOpenApis,
|
|
3110
|
+
ze as OPTIONS,
|
|
3111
|
+
It as OptionCommProps,
|
|
3112
|
+
ps as ProjectIcon,
|
|
3113
|
+
Pr as PropEditor,
|
|
3111
3114
|
oe as ProviderKeys,
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3115
|
+
Tl as Radio,
|
|
3116
|
+
Er as RadioStatus,
|
|
3117
|
+
Ir as RangePicker,
|
|
3118
|
+
xr as Search,
|
|
3119
|
+
Ue as SearchItem,
|
|
3120
|
+
Lr as Select,
|
|
3121
|
+
at as Switch,
|
|
3122
|
+
yr as Table,
|
|
3123
|
+
Ga as TableOperate,
|
|
3124
|
+
Ur as Textarea,
|
|
3125
|
+
Mr as TimePicker,
|
|
3126
|
+
G as ToolIcon,
|
|
3127
|
+
kr as ToolPanel,
|
|
3128
|
+
_t as Toolbar,
|
|
3129
|
+
as as Tooltip,
|
|
3130
|
+
$l as Transfer,
|
|
3131
|
+
Nr as TransferTable,
|
|
3132
|
+
wr as Tree,
|
|
3133
|
+
Rr as TreeSelect,
|
|
3134
|
+
Ao as UploadList,
|
|
3135
|
+
No as UploadStatus,
|
|
3136
|
+
Yo as appendExcelData,
|
|
3137
|
+
Go as checkExcelDuplicates,
|
|
3138
|
+
Vr as checkIconsExpired,
|
|
3139
|
+
Nt as circleLoading,
|
|
3140
|
+
Tt as createFromIconfont,
|
|
3141
|
+
Wo as createMarkedExcelView,
|
|
3142
|
+
Yr as crumbs,
|
|
3143
|
+
cr as csvToExcelBlob,
|
|
3144
|
+
mt as csvToExcelView,
|
|
3145
|
+
Ho as csvToNormalized,
|
|
3146
|
+
we as defaultTools,
|
|
3147
|
+
Gr as doDelete,
|
|
3148
|
+
Wr as doExecute,
|
|
3149
|
+
ot as doQuery,
|
|
3150
|
+
Hr as doSave,
|
|
3151
|
+
zo as donwloadFromMinio,
|
|
3152
|
+
ga as downloadBlob,
|
|
3153
|
+
qr as eventBus,
|
|
3154
|
+
qo as excelToExcelView,
|
|
3155
|
+
Qo as excelToNormalized,
|
|
3156
|
+
pr as exportResults,
|
|
3157
|
+
dr as exportSelectedRows,
|
|
3158
|
+
et as filterColumns,
|
|
3156
3159
|
se as formValidate,
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3160
|
+
Qr as getAvailableLanguages,
|
|
3161
|
+
Jr as getFormDetail,
|
|
3162
|
+
Xr as getIconTransform,
|
|
3163
|
+
Zr as getLang,
|
|
3164
|
+
eo as getRecordDetail,
|
|
3165
|
+
to as getRuleTexts,
|
|
3166
|
+
Bt as getSelectedLabels,
|
|
3167
|
+
ao as getSelectedValues,
|
|
3165
3168
|
ue as getToolByKey,
|
|
3166
|
-
|
|
3169
|
+
$e as getToolGroup,
|
|
3167
3170
|
W as getToolStatus,
|
|
3168
3171
|
J as getToolVisible,
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3172
|
+
lo as getValidator,
|
|
3173
|
+
he as gridQueryFind,
|
|
3174
|
+
tt as gridQueryList,
|
|
3175
|
+
ro as gridRowUpdate,
|
|
3176
|
+
lt as gridStatusUpdate,
|
|
3177
|
+
oo as i18n,
|
|
3178
|
+
ir as initCacheCheck,
|
|
3179
|
+
sr as initDirective,
|
|
3180
|
+
so as initLang,
|
|
3181
|
+
no as initMenu,
|
|
3182
|
+
io as initPageFactory,
|
|
3183
|
+
co as initStores,
|
|
3184
|
+
nr as initTools,
|
|
3185
|
+
uo as initValidate,
|
|
3186
|
+
fe as isEmpty,
|
|
3187
|
+
Ut as loadOption,
|
|
3188
|
+
po as mergeColumns,
|
|
3189
|
+
Jo as normalizedToExcelView,
|
|
3190
|
+
Ta as onColumnVisibleChanged,
|
|
3191
|
+
Dt as onFormClose,
|
|
3192
|
+
qe as onFormSave,
|
|
3193
|
+
$t as onFormSaveAs,
|
|
3194
|
+
gt as onFullscreenClick,
|
|
3195
|
+
Ze as onGridRowDelete,
|
|
3196
|
+
Xe as onGridRowEdit,
|
|
3197
|
+
fo as onGridRowExpand,
|
|
3198
|
+
Rt as onOptionChanged,
|
|
3199
|
+
xa as onReloadClick,
|
|
3197
3200
|
X as onToolClicked,
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3201
|
+
Ft as openNewForm,
|
|
3202
|
+
vo as outFormDataFields,
|
|
3203
|
+
mo as parseIcons,
|
|
3204
|
+
Ve as path,
|
|
3205
|
+
go as pendingNavigation,
|
|
3206
|
+
ho as pinia,
|
|
3207
|
+
Oo as previewFromMinio,
|
|
3208
|
+
ur as processCsvFile,
|
|
3209
|
+
Xo as processExcelFile,
|
|
3210
|
+
rt as queryTree,
|
|
3211
|
+
bo as resetRules,
|
|
3212
|
+
xo as routes,
|
|
3213
|
+
yo as saveForm,
|
|
3214
|
+
wo as setFormData,
|
|
3215
|
+
ko as setLang,
|
|
3216
|
+
_o as showBreadcrumb,
|
|
3217
|
+
Zo as toExcel,
|
|
3218
|
+
Mt as unloadOption,
|
|
3219
|
+
Co as uploadTempBtn,
|
|
3220
|
+
So as uploadTempOpener,
|
|
3221
|
+
To as useAppInfo,
|
|
3222
|
+
$o as useEditorFactory,
|
|
3223
|
+
Qe as useFormItemFactory,
|
|
3224
|
+
Do as useGridFactory,
|
|
3225
|
+
Fo as useHostInfo,
|
|
3223
3226
|
te as useInputFactory,
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3227
|
+
Lt as useOptionFactory,
|
|
3228
|
+
Po as usePageFactory,
|
|
3229
|
+
Eo as usePageInfo,
|
|
3230
|
+
Ae as useSettingInfo,
|
|
3231
|
+
$a as useToolFactory,
|
|
3232
|
+
Io as useTreeFactory,
|
|
3233
|
+
Be as useUserInfo,
|
|
3234
|
+
Lo as validateData,
|
|
3235
|
+
es as validateExcel
|
|
3233
3236
|
};
|