@skyfox2000/webui 1.3.19 → 1.3.21

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