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