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