@skyfox2000/webui 1.2.7 → 1.2.9

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 (74) hide show
  1. package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  2. package/lib/assets/modules/file-upload-BYIvmkmy.js +204 -0
  3. package/lib/assets/modules/form-excel-BUX2QW11.js +235 -0
  4. package/lib/assets/modules/{index-BZvwPKou.js → index-DcRkhkn2.js} +1 -1
  5. package/lib/assets/modules/index-jl5Ie2tZ.js +112 -0
  6. package/lib/assets/modules/{menuTabs-izaFx0kk.js → menuTabs-DY1XBq16.js} +134 -139
  7. package/lib/assets/modules/{toolIcon-66dclHit.js → toolIcon-BDIOj_3l.js} +1 -1
  8. package/lib/assets/modules/uploadList-BPG5whz7.js +369 -0
  9. package/lib/assets/modules/{index-CKMDsqve.js → uploadList-D2Ux4h1N.js} +553 -513
  10. package/lib/components/common/index.d.ts +2 -0
  11. package/lib/components/common/loading/index.vue.d.ts +3 -0
  12. package/lib/components/content/dialog/index.vue.d.ts +1 -0
  13. package/lib/components/content/drawer/index.vue.d.ts +2 -0
  14. package/lib/components/content/form/formItem.vue.d.ts +2 -0
  15. package/lib/components/form/autoComplete/index.vue.d.ts +41 -4
  16. package/lib/components/form/cascader/index.vue.d.ts +13 -2
  17. package/lib/components/form/checkbox/index.vue.d.ts +13 -2
  18. package/lib/components/form/index.d.ts +1 -0
  19. package/lib/components/form/propEditor/index.vue.d.ts +10 -1
  20. package/lib/components/form/radio/index.vue.d.ts +13 -2
  21. package/lib/components/form/select/index.vue.d.ts +13 -2
  22. package/lib/components/form/upload/uploadList.vue.d.ts +14 -3
  23. package/lib/components/index.d.ts +2 -2
  24. package/lib/es/AceEditor/index.js +3 -3
  25. package/lib/es/BasicLayout/index.js +15 -15
  26. package/lib/es/Error403/index.js +1 -1
  27. package/lib/es/Error404/index.js +1 -1
  28. package/lib/es/ExcelForm/index.js +4 -4
  29. package/lib/es/UploadForm/index.js +60 -87
  30. package/lib/index.d.ts +3 -3
  31. package/lib/typings/form.d.ts +18 -2
  32. package/lib/typings/option.d.ts +16 -2
  33. package/lib/typings/page.d.ts +1 -0
  34. package/lib/utils/file-upload.d.ts +4 -2
  35. package/lib/utils/form-excel.d.ts +3 -0
  36. package/lib/utils/main-openapis.d.ts +0 -1
  37. package/lib/webui.css +1 -1
  38. package/lib/webui.es.js +1088 -1064
  39. package/package.json +1 -1
  40. package/scripts/userInput.py +2 -0
  41. package/src/components/common/index.ts +3 -0
  42. package/src/components/common/loading/index.vue +11 -0
  43. package/src/components/content/dialog/index.vue +15 -8
  44. package/src/components/content/dialog/uploadForm.vue +38 -79
  45. package/src/components/content/drawer/index.vue +26 -6
  46. package/src/components/content/form/formItem.vue +21 -5
  47. package/src/components/content/form/index.vue +4 -2
  48. package/src/components/content/search/searchItem.vue +1 -1
  49. package/src/components/form/autoComplete/index.vue +12 -4
  50. package/src/components/form/cascader/index.vue +1 -1
  51. package/src/components/form/datePicker/index.vue +1 -1
  52. package/src/components/form/index.ts +1 -0
  53. package/src/components/form/input/inputIcon.vue +1 -1
  54. package/src/components/form/propEditor/index.vue +113 -33
  55. package/src/components/form/select/index.vue +27 -17
  56. package/src/components/form/upload/uploadList.vue +174 -34
  57. package/src/components/index.ts +13 -1
  58. package/src/directives/permission.ts +11 -11
  59. package/src/index.ts +4 -10
  60. package/src/stores/appInfo.ts +6 -6
  61. package/src/typings/form.d.ts +18 -2
  62. package/src/typings/option.d.ts +16 -2
  63. package/src/typings/page.d.ts +1 -0
  64. package/src/utils/download.ts +1 -1
  65. package/src/utils/eventbus.ts +1 -1
  66. package/src/utils/file-upload.ts +75 -14
  67. package/src/utils/form-excel.ts +50 -1
  68. package/src/utils/form-validate.ts +18 -1
  69. package/src/utils/form.ts +3 -1
  70. package/src/utils/options.ts +38 -12
  71. package/lib/assets/modules/file-upload-D4bA7go8.js +0 -179
  72. package/lib/assets/modules/form-excel-DL2_SNiS.js +0 -211
  73. package/lib/assets/modules/index-D16E7UbH.js +0 -111
  74. package/lib/assets/modules/uploadList-Dw6eRrJT.js +0 -210
@@ -1,23 +1,23 @@
1
- var la = Object.defineProperty;
2
- var ia = (e, t, a) => t in e ? la(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
- var k = (e, t, a) => ia(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { inject as G, ref as u, provide as ye, watch as R, toRaw as Qe, h as C, nextTick as ua, shallowRef as Ve, defineComponent as X, reactive as ca, useAttrs as ne, onMounted as oe, onUnmounted as le, createElementBlock as O, openBlock as A, createVNode as j, unref as x, mergeProps as ie, withCtx as Q, createCommentVNode as B, Fragment as J, renderList as Te, createBlock as Re, normalizeClass as Ge, createTextVNode as we, toDisplayString as z, createElementVNode as fa } from "vue";
5
- import { AutoComplete as pa, CheckboxGroup as da, Checkbox as ha, RadioGroup as ma, Radio as va, Select as ga, SelectOption as ya } from "ant-design-vue";
6
- import { createPinia as ba, defineStore as Z } from "pinia";
7
- import Sa from "pinia-plugin-persistedstate";
8
- import { combineParams as Pe, EnvConfig as te, AppAction as Ue, AppSource as Ce, isMicroApp as Ne, mainAppApis as D, isBaseMicroApp as Ia } from "@skyfox2000/microbase";
9
- import { ResStatus as E, httpPost as K, setToken as be, fieldMapping as xa, parseFieldTemplate as Aa, API_HOST as Se, SERVER_HOST as Ea } from "@skyfox2000/fapi";
10
- import S from "vue-m-message";
11
- import Oe from "async-validator";
1
+ var ia = Object.defineProperty;
2
+ var ua = (e, t, a) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
+ var k = (e, t, a) => ua(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { inject as j, ref as c, provide as ye, watch as E, toRaw as je, h as F, nextTick as ca, shallowRef as qe, defineComponent as ee, reactive as fa, useAttrs as oe, onMounted as le, onUnmounted as ie, createElementBlock as O, openBlock as x, createVNode as J, unref as A, mergeProps as ue, withCtx as Q, createCommentVNode as B, Fragment as z, renderList as Pe, createBlock as we, normalizeClass as Je, createTextVNode as Oe, toDisplayString as W, createElementVNode as pa } from "vue";
5
+ import { AutoComplete as da, CheckboxGroup as ha, Checkbox as ma, RadioGroup as va, Radio as ga, Select as ya, SelectOption as ba } from "ant-design-vue";
6
+ import { createPinia as Sa, defineStore as ae } from "pinia";
7
+ import Ia from "pinia-plugin-persistedstate";
8
+ import { combineParams as ke, EnvConfig as re, AppAction as Ce, AppSource as _e, isMicroApp as Ke, mainAppApis as D, isBaseMicroApp as Aa } from "@skyfox2000/microbase";
9
+ import { ResStatus as T, httpPost as H, setToken as be, fieldMapping as xa, parseFieldTemplate as Ee, API_HOST as Se, SERVER_HOST as Ea } from "@skyfox2000/fapi";
10
+ import I from "vue-m-message";
11
+ import Le from "async-validator";
12
12
  import { createRouter as Ta, createWebHashHistory as Ra } from "vue-router";
13
13
  import "dayjs";
14
14
  import "vue-draggable-next";
15
- const wa = ba();
16
- wa.use(Sa);
17
- var U = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(U || {});
18
- const T = class T {
15
+ const Pa = Sa();
16
+ Pa.use(Ia);
17
+ var N = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.LabelWidth = "FormItem.LabelWidth", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(N || {});
18
+ const R = class R {
19
19
  };
20
- k(T, "dict", {}), k(T, "Keys", {
20
+ k(R, "dict", {}), k(R, "Keys", {
21
21
  EnableDisable: "EnableDisable",
22
22
  SuccessResult: "SuccessResult",
23
23
  YesNo: "YesNo",
@@ -27,25 +27,25 @@ k(T, "dict", {}), k(T, "Keys", {
27
27
  * @param key 名称
28
28
  * @returns
29
29
  */
30
- k(T, "getOptions", (t) => T.dict[t]), /**
30
+ k(R, "getOptions", (t) => R.dict[t]), /**
31
31
  * 静态选择项对象
32
32
  * @param key 名称
33
33
  * @param value 值
34
34
  * @returns
35
35
  */
36
- k(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
36
+ k(R, "getOptionItem", (t, a) => R.dict[t].find((s) => s.value === a)), /**
37
37
  * 设置静态选择项
38
38
  * @param key 名称
39
39
  * @param list 列表
40
40
  */
41
- k(T, "setOptions", (t, a) => {
42
- T.dict[t] = a;
41
+ k(R, "setOptions", (t, a) => {
42
+ R.dict[t] = a;
43
43
  }), /**
44
44
  * 启用/停用选项
45
45
  * - 启用 1
46
46
  * - 停用 0
47
47
  */
48
- k(T, "EnableDisable", [
48
+ k(R, "EnableDisable", [
49
49
  {
50
50
  label: "启用",
51
51
  text: "✅ 启用",
@@ -61,7 +61,7 @@ k(T, "EnableDisable", [
61
61
  * - 成功 1
62
62
  * - 失败 0
63
63
  */
64
- k(T, "SuccessResult", [
64
+ k(R, "SuccessResult", [
65
65
  {
66
66
  label: "成功",
67
67
  text: "✅ 成功",
@@ -77,7 +77,7 @@ k(T, "SuccessResult", [
77
77
  * - 是 1
78
78
  * - 否 0
79
79
  */
80
- k(T, "YesNo", [
80
+ k(R, "YesNo", [
81
81
  {
82
82
  label: "是",
83
83
  text: "✅ 是",
@@ -93,7 +93,7 @@ k(T, "YesNo", [
93
93
  * - 男 M
94
94
  * - 女 F
95
95
  */
96
- k(T, "MaleFemale", [
96
+ k(R, "MaleFemale", [
97
97
  {
98
98
  label: "男",
99
99
  text: "男 👨",
@@ -105,12 +105,12 @@ k(T, "MaleFemale", [
105
105
  value: "F"
106
106
  }
107
107
  ]);
108
- let M = T;
108
+ let M = R;
109
109
  M.setOptions("EnableDisable", M.EnableDisable);
110
110
  M.setOptions("SuccessResult", M.SuccessResult);
111
111
  M.setOptions("YesNo", M.YesNo);
112
112
  M.setOptions("MaleFemale", M.MaleFemale);
113
- const ue = {
113
+ const ce = {
114
114
  /**
115
115
  * 自动接口加载数据
116
116
  * - 默认为true
@@ -152,6 +152,14 @@ const ue = {
152
152
  type: Object,
153
153
  required: !1
154
154
  },
155
+ /**
156
+ * 重载接口,默认false
157
+ */
158
+ reload: {
159
+ type: Boolean,
160
+ required: !1,
161
+ default: !1
162
+ },
155
163
  /**
156
164
  * 接口自定义QOD参数
157
165
  */
@@ -197,12 +205,13 @@ const ue = {
197
205
  * - eventBus.emit(changeEvent, { Q参数 } | 数据[])
198
206
  * - 数据组仅用于联动显示
199
207
  * - 其它情况使用Query参数
208
+ * - 第一个参数为事件名,第二个参数为事件参数模板,支持模板 ${selectedValues}
200
209
  */
201
210
  changeEvent: {
202
- type: [String, Array],
211
+ type: Array,
203
212
  required: !1
204
213
  }
205
- }, w = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, ce = (e, t) => {
214
+ }, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, fe = (e, t) => {
206
215
  var r;
207
216
  return {
208
217
  url: "",
@@ -211,7 +220,7 @@ const ue = {
211
220
  ...t.url,
212
221
  loadingText: t.loadingText
213
222
  };
214
- }, fe = (e, t) => {
223
+ }, pe = (e, t) => {
215
224
  const a = e.page, s = t.url;
216
225
  if (!s || !s.url) {
217
226
  const n = `URL未设置: ${t.urlKey}`;
@@ -219,24 +228,24 @@ const ue = {
219
228
  }
220
229
  s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
221
230
  let r = JSON.parse(JSON.stringify(t.params));
222
- return t.processParams && (r = t.processParams(r)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), K(s, r).then((n) => (t.loadingState && (t.loadingState.value = !1), n)).catch((n) => (t.loadingState && (t.loadingState.value = !1), null));
223
- }, ke = (e, t) => {
231
+ return t.processParams && (r = t.processParams(r)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), H(s, r).then((n) => (t.loadingState && (t.loadingState.value = !1), n)).catch((n) => (t.loadingState && (t.loadingState.value = !1), null));
232
+ }, Me = (e, t) => {
224
233
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
225
- const a = ce(e, t);
226
- return t.url = a, fe(e, t);
227
- }, At = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = ce(e, t), fe(e, t).then((a) => ((a == null ? void 0 : a.status) === E.SUCCESS && (t.hideErrorToast || S.success("执行成功!")), a))), qe = (e, t = {}) => {
234
+ const a = fe(e, t);
235
+ return t.url = a, pe(e, t);
236
+ }, xt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = fe(e, t), pe(e, t).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && (t.hideErrorToast || I.success("执行成功!")), a))), Be = (e, t = {}) => {
228
237
  const a = t.primaryKey || "Id";
229
238
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
230
- return S.error("错误!无保存数据!"), Promise.resolve(null);
239
+ return I.error("错误!无保存数据!"), Promise.resolve(null);
231
240
  const s = {
232
241
  ...t,
233
242
  urlKey: t.urlKey || "save",
234
243
  loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
235
244
  };
236
245
  s.params.Query[a] = s.params.Data[a];
237
- const r = ce(e, s);
238
- return s.url = r, fe(e, s).then((n) => ((n == null ? void 0 : n.status) === E.SUCCESS && (t.hideErrorToast || S.success("保存成功!")), n));
239
- }, Pa = (e, t, a = {}) => {
246
+ const r = fe(e, s);
247
+ return s.url = r, pe(e, s).then((n) => ((n == null ? void 0 : n.status) === T.SUCCESS && (t.hideErrorToast || I.success("保存成功!")), n));
248
+ }, wa = (e, t, a = {}) => {
240
249
  const s = a.primaryKey || "Id";
241
250
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
242
251
  const r = {
@@ -244,20 +253,20 @@ const ue = {
244
253
  urlKey: "delete",
245
254
  loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据删除中..."
246
255
  };
247
- if (Array.isArray(t) ? r.params.Query[s] = t : r.params.Query[s] = t[s], w(r.params.Query) || w(r.params.Query[s]))
248
- return S.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
249
- const n = ce(e, r);
250
- return r.url = n, fe(e, r).then((o) => ((o == null ? void 0 : o.status) === E.SUCCESS && (a.hideErrorToast || S.success("删除成功!")), o));
251
- }, Oa = (e, t) => ke(e, {
256
+ if (Array.isArray(t) ? r.params.Query[s] = t : r.params.Query[s] = t[s], P(r.params.Query) || P(r.params.Query[s]))
257
+ return I.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
258
+ const n = fe(e, r);
259
+ return r.url = n, pe(e, r).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (a.hideErrorToast || I.success("删除成功!")), o));
260
+ }, Oa = (e, t) => Me(e, {
252
261
  urlKey: "tree",
253
262
  params: {},
254
263
  loadingState: e.isTreeLoading,
255
264
  loadingText: !1,
256
- processParams: () => Pe(e.treeQuery, t)
257
- }).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
258
- let W;
265
+ processParams: () => ke(e.treeQuery, t)
266
+ }).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
267
+ let Y;
259
268
  const Et = (e) => {
260
- W = new Oe({}), W.messages({
269
+ Y = new Le({}), Y.messages({
261
270
  required: "${label}不能为空",
262
271
  types: {
263
272
  number: "${label}必须是数字"
@@ -284,20 +293,20 @@ const Et = (e) => {
284
293
  ...e
285
294
  });
286
295
  }, Tt = (e) => {
287
- if (!e || w(e))
296
+ if (!e || P(e))
288
297
  return [];
289
- const t = [], a = W.messages(), s = (n, o, l) => {
298
+ const t = [], a = Y.messages(), s = (n, o, l) => {
290
299
  const i = o.type;
291
300
  if (i && a.types && i in a.types) {
292
301
  const f = a.types[i];
293
302
  r(f, n, { type: i }, l);
294
303
  }
295
- const c = ["string", "number", "array"];
296
- for (const f of c)
304
+ const u = ["string", "number", "array"];
305
+ for (const f of u)
297
306
  if (i === f && a[f]) {
298
307
  const p = a[f], v = ["len", "min", "max", "range"];
299
- for (const g of v)
300
- g === "range" && o.min != null && o.max != null && p.range ? r(p.range, n, { min: o.min, max: o.max }, l) : g !== "range" && o[g] != null && p[g] && r(p[g], n, { [g]: o[g] }, l);
308
+ for (const h of v)
309
+ h === "range" && o.min != null && o.max != null && p.range ? r(p.range, n, { min: o.min, max: o.max }, l) : h !== "range" && o[h] != null && p[h] && r(p[h], n, { [h]: o[h] }, l);
301
310
  }
302
311
  if (o.required && a.required && r(a.required, n, {}, l), o.pattern && a.pattern && r(o.message, n, {}, l), o.enum && Array.isArray(o.enum) && a.enum) {
303
312
  const f = o.enum.join(", ");
@@ -306,30 +315,30 @@ const Et = (e) => {
306
315
  }, r = (n, o, l, i) => {
307
316
  if (n)
308
317
  try {
309
- let c;
318
+ let u;
310
319
  if (typeof n == "function") {
311
320
  const f = [o];
312
321
  for (const p in l)
313
322
  f.push(l[p]);
314
- c = n.apply(null, f), c && i.push(c);
323
+ u = n.apply(null, f), u && i.push(u);
315
324
  } else {
316
- c = String(n);
325
+ u = String(n);
317
326
  for (const f in l)
318
- c = c.replace(new RegExp(`\\$\\{${f}\\}`, "g"), l[f]);
319
- c = c.replace(/\$\{label\}/g, ""), c && i.push(c);
327
+ u = u.replace(new RegExp(`\\$\\{${f}\\}`, "g"), l[f]);
328
+ u = u.replace(/\$\{label\}/g, ""), u && i.push(u);
320
329
  }
321
- } catch (c) {
322
- console.error("格式化验证消息出错:", c);
330
+ } catch (u) {
331
+ console.error("格式化验证消息出错:", u);
323
332
  }
324
333
  };
325
334
  return Object.keys(e).forEach((n) => {
326
335
  const o = e[n], l = [];
327
336
  try {
328
- s(n, o, l), Array.isArray(o) && o.forEach((c) => {
329
- c && typeof c == "object" && s(n, c, l);
337
+ s(n, o, l), Array.isArray(o) && o.forEach((u) => {
338
+ u && typeof u == "object" && s(n, u, l);
330
339
  }), o && typeof o == "object" && "fields" in o;
331
- } catch (c) {
332
- console.error("处理验证规则出错:", c);
340
+ } catch (u) {
341
+ console.error("处理验证规则出错:", u);
333
342
  }
334
343
  const i = Array.from(new Set(l));
335
344
  n && i.length > 0 && t.push({
@@ -337,15 +346,15 @@ const Et = (e) => {
337
346
  rules: i
338
347
  });
339
348
  }), t;
340
- }, pe = async (e) => {
349
+ }, de = async (e) => {
341
350
  const t = e.formData.value, a = e.formRules.value;
342
- w(a) || (Le(e), e.ruleValidator || (e.ruleValidator = new Oe({}), e.ruleValidator.messages(W.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
351
+ P(a) || ($e(e), e.ruleValidator || (e.ruleValidator = new Le({}), e.ruleValidator.messages(Y.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
343
352
  }).catch(({ fields: s }) => s));
344
- }, Rt = async (e, t, a) => (a || (a = new Oe({}), a.messages(W.messages()), a.define(t)), a.validate(e).then(() => {
345
- }).catch(({ fields: s }) => s)), Le = (e) => {
353
+ }, Rt = async (e, t, a) => (a || (a = new Le({}), a.messages(Y.messages()), a.define(t)), a.validate(e).then(() => {
354
+ }).catch(({ fields: s }) => s)), $e = (e) => {
346
355
  e.ruleResults.value = void 0;
347
- }, de = () => {
348
- const e = G(U.EditorControl, void 0), t = u(G(U.LabelText, "")), a = u(G(U.RuleKey, "")), s = G(U.ErrInfo, void 0);
356
+ }, he = () => {
357
+ const e = j(N.EditorControl, void 0), t = c(j(N.LabelText, "")), a = c(j(N.RuleKey, "")), s = j(N.ErrInfo, void 0);
349
358
  return {
350
359
  editorCtrl: e,
351
360
  labelText: t,
@@ -353,24 +362,24 @@ const Et = (e) => {
353
362
  errInfo: s
354
363
  };
355
364
  }, ka = (e, t) => {
356
- let a = u({
365
+ let a = c({
357
366
  msg: "",
358
367
  errClass: ""
359
368
  });
360
369
  if (!e.label || !e.rule)
361
370
  return a;
362
371
  const s = t == null ? void 0 : t.ruleResults;
363
- return R(
372
+ return E(
364
373
  () => s == null ? void 0 : s.value,
365
374
  (r) => {
366
- if (a.value.errClass = "", a.value.msg = "", !w(r)) {
375
+ if (a.value.errClass = "", a.value.msg = "", !P(r)) {
367
376
  const n = La(
368
377
  {
369
378
  label: e.label,
370
379
  rule: e.rule
371
380
  },
372
381
  t == null ? void 0 : t.formRules.value,
373
- Qe(r)
382
+ je(r)
374
383
  );
375
384
  a.value.errClass = n.errClass.value, a.value.msg = n.msg.value;
376
385
  }
@@ -378,7 +387,7 @@ const Et = (e) => {
378
387
  { deep: !0 }
379
388
  ), a;
380
389
  }, La = (e, t, a) => {
381
- const s = u([]), r = u(""), n = u("");
390
+ const s = c([]), r = c(""), n = c("");
382
391
  if (!e.rule || !t || !a)
383
392
  return { msg: r, ruleErrors: s, errClass: n };
384
393
  e.rule.split("|").forEach((i) => {
@@ -386,44 +395,44 @@ const Et = (e) => {
386
395
  if (a[i])
387
396
  s.value.push(...a[i]);
388
397
  else {
389
- const c = [];
398
+ const u = [];
390
399
  for (let f in a)
391
- f !== i && f.startsWith(i + ".") && c.push(...a[f]);
392
- c.length > 0 && s.value.push(...c);
400
+ f !== i && f.startsWith(i + ".") && u.push(...a[f]);
401
+ u.length > 0 && s.value.push(...u);
393
402
  }
394
403
  });
395
404
  const l = /\${\w+}/g;
396
405
  return s.value.forEach((i) => {
397
406
  r.value && (r.value += " / "), r.value += i.message.replace("${label}", e.label ?? "");
398
- const c = t[i.field];
399
- if (c) {
407
+ const u = t[i.field];
408
+ if (u) {
400
409
  const f = r.value.match(l);
401
410
  f && f.forEach((p) => {
402
411
  const v = p.replace("${", "").replace("}", "");
403
- r.value = r.value.replace(p, c[v] ?? "");
412
+ r.value = r.value.replace(p, u[v] ?? "");
404
413
  });
405
414
  }
406
415
  }), s.value.length > 0 && (n.value = "error"), { msg: r, ruleErrors: s, errClass: n };
407
- }, wt = (e, t) => {
408
- ye(U.LabelText, e.label || ""), ye(U.RuleKey, e.rule || "");
416
+ }, Pt = (e, t) => {
417
+ ye(N.LabelText, e.label || ""), ye(N.RuleKey, e.rule || "");
409
418
  const a = ka(e, t);
410
- return ye(U.ErrInfo, a), a;
411
- }, Pt = (e) => {
412
- je(e);
419
+ return ye(N.ErrInfo, a), a;
420
+ }, wt = (e) => {
421
+ ze(e);
413
422
  }, Ot = (e) => {
414
423
  const t = e.page, a = e.formData.value;
415
- a[e.primaryKey ?? t.primaryKey] = null, je(e);
424
+ a[e.primaryKey ?? t.primaryKey] = null, ze(e);
416
425
  }, kt = (e) => {
417
- e.visible.value = !1;
418
- }, je = async (e) => {
426
+ De(e), e.visible.value = !1;
427
+ }, ze = async (e) => {
419
428
  var s;
420
429
  const t = e.page;
421
- if (e.isFormSaving.value = !0, Le(e), e.beforeSave && e.beforeSave() === !1)
430
+ if (e.isFormSaving.value = !0, $e(e), e.beforeSave && e.beforeSave() === !1)
422
431
  return e.isFormSaving.value = !1, Promise.resolve();
423
- if (e.formRules.value && await pe(e), e.ruleResults.value)
424
- return S.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
432
+ if (e.formRules.value && await de(e), e.ruleResults.value)
433
+ return I.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
425
434
  const a = e.formData.value;
426
- return qe(
435
+ return Be(
427
436
  {
428
437
  page: t,
429
438
  // 转换为AnyControl接口
@@ -442,15 +451,15 @@ const Et = (e) => {
442
451
  }
443
452
  ).then((r) => {
444
453
  var n, o;
445
- if ((r == null ? void 0 : r.status) === E.SUCCESS)
446
- S.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
454
+ if ((r == null ? void 0 : r.status) === T.SUCCESS)
455
+ I.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
447
456
  else if (r != null && r.msg && ((n = r == null ? void 0 : r.msg) == null ? void 0 : n.indexOf("Duplicate entry")) > -1) {
448
457
  const l = (o = r == null ? void 0 : r.msg) == null ? void 0 : o.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
449
458
  if (l && l.length > 2 && l[1] && l[2]) {
450
- const i = l[1], c = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
451
- if (f && c.length > 0) {
459
+ const i = l[1], u = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
460
+ if (f && u.length > 0) {
452
461
  const p = {};
453
- c.forEach((v) => {
462
+ u.forEach((v) => {
454
463
  f[v] && (p[v] = [
455
464
  {
456
465
  field: v,
@@ -460,48 +469,50 @@ const Et = (e) => {
460
469
  ]);
461
470
  }), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
462
471
  }
463
- S.error(`保存失败!数据 \`${i}\` 已存在!`);
464
- } else S.error((r == null ? void 0 : r.msg) ?? "保存失败!");
472
+ I.error(`保存失败!数据 \`${i}\` 已存在!`);
473
+ } else I.error((r == null ? void 0 : r.msg) ?? "保存失败!");
465
474
  } else
466
- S.error((r == null ? void 0 : r.msg) ?? "保存失败!");
475
+ I.error((r == null ? void 0 : r.msg) ?? "保存失败!");
467
476
  });
468
477
  }, Lt = async (e) => {
469
478
  const t = e.page, a = e.grid;
470
479
  e.isFormLoading.value = !0;
471
480
  const s = e.formData.value, r = e.primaryKey ?? t.primaryKey;
472
- return ea(a, { [r]: s[r] }, e.detailUrl).then((n) => {
473
- e.isFormLoading.value = !1, n && Be(e, n);
481
+ return ta(a, { [r]: s[r] }, e.detailUrl).then((n) => {
482
+ e.isFormLoading.value = !1, n && We(e, n);
474
483
  });
475
484
  }, Mt = (e) => {
476
485
  const t = e.grid;
477
- t && (t.rowData.value = void 0), e && (Je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
486
+ t && (t.rowData.value = void 0), e && (De(e), e.visible && (e.visible.value = !1), setTimeout(() => {
478
487
  e.visible.value = !0;
479
488
  }, 1));
480
- }, Be = (e, t) => {
481
- Je(e), e.formData.value = { ...e.formData.value, ...t };
482
- }, Je = (e) => {
483
- e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Le(e);
484
- }, se = "/login/", ae = [], Ma = (e) => {
489
+ }, We = (e, t) => {
490
+ De(e);
491
+ const a = { ...e.formData.value, ...t };
492
+ e.formData.value = JSON.parse(JSON.stringify(a));
493
+ }, De = (e) => {
494
+ e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, $e(e);
495
+ }, ne = "/login/", se = [], Ma = (e) => {
485
496
  for (const t of e) {
486
- const a = ae.findIndex((s) => s.path === t.path);
487
- a !== -1 && ae.splice(a, 1), ae.push(t), Y.addRoute(t);
497
+ const a = se.findIndex((s) => s.path === t.path);
498
+ a !== -1 && se.splice(a, 1), se.push(t), X.addRoute(t);
488
499
  }
489
- }, ze = (e, t, a, s = "") => {
500
+ }, Ye = (e, t, a, s = "") => {
490
501
  const r = s + (s ? "/" : "") + e.path;
491
- t[r] = { ...e, parent: a }, e.children && e.children.forEach((n) => ze(n, t, e, r));
492
- }, Y = Ta({
502
+ t[r] = { ...e, parent: a }, e.children && e.children.forEach((n) => Ye(n, t, e, r));
503
+ }, X = Ta({
493
504
  history: Ra("/"),
494
- routes: ae
505
+ routes: se
495
506
  }), $a = (e, t) => {
496
507
  var r, n;
497
508
  const a = ((r = e.meta) == null ? void 0 : r.roles) ?? [], s = (n = e.meta) == null ? void 0 : n.permission;
498
509
  if (!t)
499
510
  return a.length === 0 && !s;
500
511
  if (t) {
501
- const o = _();
502
- if (te.VITE_PERMISSION_MODE === "role")
512
+ const o = K();
513
+ if (re.VITE_PERMISSION_MODE === "role")
503
514
  return a.length === 0 ? !0 : o.hasRole(a);
504
- if (te.VITE_PERMISSION_MODE === "permit") {
515
+ if (re.VITE_PERMISSION_MODE === "permit") {
505
516
  if (a.length === 0 && !s)
506
517
  return !0;
507
518
  let l = !1, i = !1;
@@ -509,20 +520,20 @@ const Et = (e) => {
509
520
  }
510
521
  }
511
522
  return !1;
512
- }, q = u(null);
513
- Y.beforeEach((e, t, a) => {
523
+ }, q = c(null);
524
+ X.beforeEach((e, t, a) => {
514
525
  var l;
515
526
  const s = e;
516
- if (e.path.startsWith("/error/") || e.path.startsWith(se))
527
+ if (e.path.startsWith("/error/") || e.path.startsWith(ne))
517
528
  return a();
518
529
  const r = s.meta, o = ((r == null ? void 0 : r.roles) ?? []).length > 0 || ((l = r == null ? void 0 : r.permission) == null ? void 0 : l.length);
519
530
  if (e.path === "/") {
520
- const i = N();
531
+ const i = C();
521
532
  if (!i.menuLoaded) {
522
533
  q.value = {
523
534
  to: e,
524
- next: (c) => {
525
- a({ path: c });
535
+ next: (u) => {
536
+ a({ path: u });
526
537
  }
527
538
  };
528
539
  return;
@@ -533,11 +544,11 @@ Y.beforeEach((e, t, a) => {
533
544
  if (!o)
534
545
  a();
535
546
  else {
536
- const i = _();
547
+ const i = K();
537
548
  if (!i.isLogin)
538
- a({ path: se });
549
+ a({ path: ne });
539
550
  else {
540
- if (!N().menuLoaded) {
551
+ if (!C().menuLoaded) {
541
552
  q.value = {
542
553
  to: e,
543
554
  next: a
@@ -554,14 +565,14 @@ const Da = (e) => {
554
565
  const { to: t, next: a } = q.value;
555
566
  q.value = null, t.path === "/" ? a(e) : a(t.path);
556
567
  }
557
- }, Ua = (e) => {
558
- const t = Me();
568
+ }, Na = (e) => {
569
+ const t = Ne();
559
570
  if (t.TabEnabled) {
560
- if (Ca(e.key, t.TabPanes))
571
+ if (Fa(e.key, t.TabPanes))
561
572
  return;
562
573
  t.TabPanes.push(e);
563
574
  }
564
- }, Ca = (e, t) => t.find((a) => a.key === e), Me = Z("pageInfo", {
575
+ }, Fa = (e, t) => t.find((a) => a.key === e), Ne = ae("pageInfo", {
565
576
  state: () => ({
566
577
  TabActive: "",
567
578
  TabPanes: [],
@@ -574,7 +585,7 @@ const Da = (e) => {
574
585
  */
575
586
  removeTabPane(e) {
576
587
  if (this.TabEnabled) {
577
- N().excludeComponent(e);
588
+ C().excludeComponent(e);
578
589
  let a = 0, s = [...this.TabPanes];
579
590
  for (let r = 0; r < s.length; r++)
580
591
  if (s[r].key === e) {
@@ -595,7 +606,7 @@ const Da = (e) => {
595
606
  * @returns
596
607
  */
597
608
  async setTabActive(e) {
598
- let a = N().findRoute(e);
609
+ let a = C().findRoute(e);
599
610
  if (!a) return;
600
611
  const s = {
601
612
  key: e,
@@ -606,44 +617,44 @@ const Da = (e) => {
606
617
  // 默认为true
607
618
  keepAlive: !(a.meta && !a.meta.keepAlive)
608
619
  };
609
- Ua(s), this.TabActive = e;
620
+ Na(s), this.TabActive = e;
610
621
  }
611
622
  },
612
623
  persist: !1
613
- }), Na = {
624
+ }), Ua = {
614
625
  appList: {
615
626
  api: "PLATFORM_API",
616
627
  authorize: !0,
617
628
  url: "/api/RCTenanetOpSrv/getApps",
618
629
  loadingText: !1
619
630
  }
620
- }, Ie = /* @__PURE__ */ new Map(), Fa = (e) => {
621
- const t = _(), { roles: a, permission: s } = e.meta || {};
622
- if (w(a) && w(s))
631
+ }, Ie = /* @__PURE__ */ new Map(), Ca = (e) => {
632
+ const t = K(), { roles: a, permission: s } = e.meta || {};
633
+ if (P(a) && P(s))
623
634
  return !0;
624
- if (te.VITE_PERMISSION_MODE === "role")
625
- return !w(a) && a ? t.hasRole(a) : !0;
626
- if (te.VITE_PERMISSION_MODE === "permit") {
635
+ if (re.VITE_PERMISSION_MODE === "role")
636
+ return P(a) ? !0 : t.hasRole(a);
637
+ if (re.VITE_PERMISSION_MODE === "permit") {
627
638
  let r = !1, n = !1;
628
- return !w(a) && a && (r = t.hasRole(a)), t.isAdmin() ? r : (!w(s) && s && (n = t.hasPermit(e.path, s)), r || n);
639
+ return P(a) || (r = t.hasRole(a)), t.isAdmin() ? r : (P(s) || (n = t.hasPermit(e.path, s)), r || n);
629
640
  }
630
641
  return !1;
631
- }, We = (e) => e.map((t) => {
642
+ }, Xe = (e) => e.map((t) => {
632
643
  const a = { ...t };
633
- return Fa(a) ? (a.children && (a.children = We(a.children)), a) : null;
634
- }).filter(Boolean), Ye = (e, t = "") => {
644
+ return Ca(a) ? (a.children && (a.children = Xe(a.children)), a) : null;
645
+ }).filter(Boolean), Ze = (e, t = "") => {
635
646
  for (const a of e) {
636
647
  if (!a.children && !a.redirect) {
637
648
  let s = t + a.path;
638
649
  return s.startsWith("/") || (s = "/" + s), s;
639
650
  }
640
651
  if (a.children && a.children.length > 0 && a.path !== "/error" && a.path !== "/login" && a.path !== "/:page(.*)") {
641
- const s = Ye(a.children, t + a.path + "/");
652
+ const s = Ze(a.children, t + a.path + "/");
642
653
  if (s)
643
654
  return s;
644
655
  }
645
656
  }
646
- }, N = Z("appInfo", {
657
+ }, C = ae("appInfo", {
647
658
  state: () => ({
648
659
  appInfo: {
649
660
  Id: "",
@@ -651,8 +662,8 @@ const Da = (e) => {
651
662
  AppCode: "",
652
663
  Version: "",
653
664
  Host: "",
654
- Source: Ce.Manual,
655
- Action: Ue.App,
665
+ Source: _e.Manual,
666
+ Action: Ce.App,
656
667
  Path: "",
657
668
  Icon: "",
658
669
  Routes: [],
@@ -677,18 +688,18 @@ const Da = (e) => {
677
688
  });
678
689
  },
679
690
  async getRemoteAppList() {
680
- return K(Na.appList, {
691
+ return H(Ua.appList, {
681
692
  Query: {
682
693
  AppCode: this.appInfo.AppCode,
683
694
  Enabled: 1
684
695
  }
685
696
  }).then((e) => {
686
- (e == null ? void 0 : e.status) === E.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
697
+ (e == null ? void 0 : e.status) === T.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
687
698
  });
688
699
  },
689
700
  async toDefaultApp(e) {
690
701
  if (this.appList.length === 0 && await this.loadAppList(), this.appList.length === 0) {
691
- S.error("加载应用列表失败");
702
+ I.error("加载应用列表失败");
692
703
  return;
693
704
  }
694
705
  let t = "";
@@ -716,7 +727,7 @@ const Da = (e) => {
716
727
  flattenRoutes: {},
717
728
  Routes: t ?? [],
718
729
  defaultPage: ""
719
- }), (!Ne() || !Ia()) && (await _().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
730
+ }), (!Ke() || !Aa()) && (await K().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
720
731
  },
721
732
  /**
722
733
  * 设置当前应用路由信息
@@ -731,13 +742,13 @@ const Da = (e) => {
731
742
  };
732
743
  const t = this.appInfo.flattenRoutes;
733
744
  for (const a of e)
734
- ze(a, t, void 0);
745
+ Ye(a, t, void 0);
735
746
  if (Object.keys(t).forEach((a) => {
736
747
  const s = t[a];
737
748
  s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
738
- }), _().isLogin) {
739
- const a = We(this.appInfo.Routes);
740
- if (Ma(a), this.appInfo.defaultPage = Ye(a) || "", this.appInfo.defaultPage) {
749
+ }), K().isLogin) {
750
+ const a = Xe(this.appInfo.Routes);
751
+ if (Ma(a), this.appInfo.defaultPage = Ze(a) || "", this.appInfo.defaultPage) {
741
752
  if (this.menuLoaded = !0, D.value && D.value.mainAppPush) {
742
753
  const s = this.formatRoute(this.appInfo.defaultPage);
743
754
  D.value.mainAppPush(s);
@@ -760,8 +771,8 @@ const Da = (e) => {
760
771
  * @param path 路由地址
761
772
  */
762
773
  push(e) {
763
- this.findRoute(e) && Me().setTabActive(e), ua(() => {
764
- if (Y.push({ path: e }), D.value && D.value.mainAppPush) {
774
+ this.findRoute(e) && Ne().setTabActive(e), ca(() => {
775
+ if (X.push({ path: e }), D.value && D.value.mainAppPush) {
765
776
  const a = this.formatRoute(e);
766
777
  D.value.mainAppPush(a);
767
778
  }
@@ -789,7 +800,7 @@ const Da = (e) => {
789
800
  // 设置组件包装器的名称为路由路径
790
801
  name: t.path,
791
802
  render() {
792
- return C(e);
803
+ return F(e);
793
804
  }
794
805
  }, Ie.set(t.path, a);
795
806
  else return e;
@@ -820,8 +831,8 @@ const Da = (e) => {
820
831
  AppCode: "",
821
832
  Version: "",
822
833
  Host: "",
823
- Source: Ce.Manual,
824
- Action: Ue.App,
834
+ Source: _e.Manual,
835
+ Action: Ce.App,
825
836
  Path: "",
826
837
  Icon: "",
827
838
  Routes: [],
@@ -831,11 +842,11 @@ const Da = (e) => {
831
842
  }, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
832
843
  },
833
844
  logout() {
834
- this.clean(), Y.push({ path: se + "#/" }), Ne() && D.value && D.value.mainAppPush && D.value.mainAppPush(se + "#/");
845
+ this.clean(), X.push({ path: ne + "#/" }), Ke() && D.value && D.value.mainAppPush && D.value.mainAppPush(ne + "#/");
835
846
  }
836
847
  },
837
848
  persist: !1
838
- }), Xe = "Token解析失败", Fe = "登录过期,请重新登录", $e = {
849
+ }), ea = "Token解析失败", He = "登录过期,请重新登录", Fe = {
839
850
  login: {
840
851
  api: "PLATFORM_API",
841
852
  url: "/openapi/LoginSrv/login",
@@ -860,41 +871,41 @@ const Da = (e) => {
860
871
  },
861
872
  Query: e
862
873
  };
863
- return K($e.login, t).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? a : null);
874
+ return H(Fe.login, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a : null);
864
875
  }, Ka = (e) => {
865
876
  let t = {
866
877
  Query: {
867
878
  AppId: e
868
879
  }
869
880
  };
870
- return K($e.auth, t).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? a.data : (S.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
881
+ return H(Fe.auth, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a.data : (I.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
871
882
  }, Ha = () => {
872
883
  let e = {
873
884
  Option: {},
874
885
  Query: {}
875
886
  };
876
- return K($e.logout, e).then((t) => (t == null ? void 0 : t.status) === E.SUCCESS ? t.data : null);
877
- }, Qa = (e) => {
887
+ return H(Fe.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
888
+ }, Va = (e) => {
878
889
  try {
879
890
  const a = JSON.parse(atob(e.split(".")[1])).exp;
880
891
  return Date.now() / 1e3 > a;
881
892
  } catch (t) {
882
- return console.error(Xe, t), !0;
893
+ return console.error(ea, t), !0;
883
894
  }
884
- }, _e = (e, t) => e == "" ? (S.error(Fe, {
895
+ }, Ve = (e, t) => e == "" ? (I.error(He, {
885
896
  duration: 3e3,
886
897
  onClose: t
887
- }), !1) : Qa(e) ? (S.error(Fe, {
898
+ }), !1) : Va(e) ? (I.error(He, {
888
899
  duration: 3e3,
889
900
  onClose: t
890
- }), !1) : !0, Va = (e) => {
901
+ }), !1) : !0, Qa = (e) => {
891
902
  try {
892
903
  const t = JSON.parse(atob(e.token.split(".")[1]));
893
904
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
894
905
  } catch (t) {
895
- return console.error(Xe, t), !1;
906
+ return console.error(ea, t), !1;
896
907
  }
897
- }, L = u(""), V = u(null), _ = Z("userInfo", {
908
+ }, L = c(""), G = c(null), K = ae("userInfo", {
898
909
  state: () => ({
899
910
  isLogin: !1,
900
911
  userInfo: {
@@ -921,16 +932,16 @@ const Da = (e) => {
921
932
  return s;
922
933
  {
923
934
  const r = a.data;
924
- if (this.token = r.token, be(this.token), this.isLogin = !0, Va(r))
935
+ if (this.token = r.token, be(this.token), this.isLogin = !0, Qa(r))
925
936
  this.userInfo = {
926
937
  ...this.userInfo,
927
938
  ...r.UserInfo
928
939
  }, L.value = r.UserInfo.UserLevel;
929
940
  else {
930
- S.error("用户信息解析失败");
941
+ I.error("用户信息解析失败");
931
942
  return;
932
943
  }
933
- t && N().toDefaultApp();
944
+ t && C().toDefaultApp();
934
945
  }
935
946
  }
936
947
  },
@@ -942,11 +953,11 @@ const Da = (e) => {
942
953
  async getRolePermits(e) {
943
954
  if (!this.isLogin || !this.token)
944
955
  return !1;
945
- if (V.value && V.value.appId === e)
956
+ if (G.value && G.value.appId === e)
946
957
  return !0;
947
958
  try {
948
959
  const t = await Ka(e);
949
- return t ? (V.value = {
960
+ return t ? (G.value = {
950
961
  appId: e,
951
962
  permits: t.permits || [],
952
963
  lastTime: t.lastTime
@@ -971,7 +982,7 @@ const Da = (e) => {
971
982
  */
972
983
  hasPermit(e, t) {
973
984
  var s;
974
- const a = V.value;
985
+ const a = G.value;
975
986
  return !a || !a.permits ? !1 : ((s = a.permits[e]) == null ? void 0 : s.includes(t)) ?? !1;
976
987
  },
977
988
  /**
@@ -988,7 +999,7 @@ const Da = (e) => {
988
999
  * @param token 用户Token
989
1000
  */
990
1001
  setUserInfo(e, t) {
991
- if (!_e(t)) {
1002
+ if (!Ve(t)) {
992
1003
  this.clean();
993
1004
  return;
994
1005
  }
@@ -1002,7 +1013,7 @@ const Da = (e) => {
1002
1013
  * @returns 用户Token
1003
1014
  */
1004
1015
  getToken() {
1005
- return _e(this.token, () => {
1016
+ return Ve(this.token, () => {
1006
1017
  this.clean(), this.logout();
1007
1018
  }) ? this.token : "";
1008
1019
  },
@@ -1035,7 +1046,7 @@ const Da = (e) => {
1035
1046
  Code: "",
1036
1047
  TenantId: "",
1037
1048
  UserLevel: ""
1038
- }, this.token = "", be(this.token), this.isLogin = !1, V.value = null, L.value = "", N().clean(), Promise.resolve();
1049
+ }, this.token = "", be(this.token), this.isLogin = !1, G.value = null, L.value = "", C().clean(), Promise.resolve();
1039
1050
  },
1040
1051
  /**
1041
1052
  * 登出操作
@@ -1048,9 +1059,9 @@ const Da = (e) => {
1048
1059
  console.error("调用登出接口失败", e);
1049
1060
  } finally {
1050
1061
  await this.clean(), setTimeout(async () => {
1051
- S.success("已退出登录");
1062
+ I.success("已退出登录");
1052
1063
  }, 1e3), setTimeout(async () => {
1053
- N().logout();
1064
+ C().logout();
1054
1065
  }, 2e3);
1055
1066
  }
1056
1067
  return Promise.resolve();
@@ -1058,9 +1069,9 @@ const Da = (e) => {
1058
1069
  },
1059
1070
  persist: !1
1060
1071
  }), $t = (e, t) => {
1061
- const a = _();
1072
+ const a = K();
1062
1073
  return e.filter((s) => {
1063
- if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(Y.currentRoute.value.path, s.permit))
1074
+ if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(X.currentRoute.value.path, s.permit))
1064
1075
  return !1;
1065
1076
  if (!t) {
1066
1077
  if (s.visible === !1)
@@ -1078,20 +1089,20 @@ const Da = (e) => {
1078
1089
  return r ? { ...s, ...r } : !1;
1079
1090
  });
1080
1091
  return [...a || [], ...e.filter((s) => !(a != null && a.includes(s)))];
1081
- }, Ga = (e) => (e.remotePage = !1, Ze(e).then((t) => t.rows)), Ze = (e) => {
1092
+ }, Ga = (e) => (e.remotePage = !1, aa(e).then((t) => t.rows)), aa = (e) => {
1082
1093
  e.gridQuery || (e.gridQuery = {});
1083
1094
  const t = e.remotePage ? "find" : "list";
1084
- return ke(e, {
1095
+ return Me(e, {
1085
1096
  urlKey: t,
1086
1097
  url: e.gridUrl,
1087
1098
  params: e.gridQuery,
1088
1099
  loadingState: e.isGridLoading,
1089
1100
  processParams: (a) => {
1090
1101
  var r;
1091
- return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Pe((r = e.gridUrl) == null ? void 0 : r.params, a, e.gridQuery);
1102
+ return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), ke((r = e.gridUrl) == null ? void 0 : r.params, a, e.gridQuery);
1092
1103
  }
1093
1104
  }).then((a) => {
1094
- if ((a == null ? void 0 : a.status) === E.SUCCESS) {
1105
+ if ((a == null ? void 0 : a.status) === T.SUCCESS) {
1095
1106
  let s = a.data;
1096
1107
  return s.rows ? (e.tableData.value = s.rows, e.total.value = s.total) : (e.tableData.value = a.data, e.total.value = a.data.length, s = {
1097
1108
  total: e.total.value,
@@ -1103,7 +1114,7 @@ const Da = (e) => {
1103
1114
  rows: []
1104
1115
  };
1105
1116
  });
1106
- }, qa = (e, t, a = {}) => qe(e, {
1117
+ }, ja = (e, t, a = {}) => Be(e, {
1107
1118
  urlKey: "update",
1108
1119
  url: e.updateUrl,
1109
1120
  params: {
@@ -1112,29 +1123,29 @@ const Da = (e) => {
1112
1123
  },
1113
1124
  loadingState: e.isGridSaving,
1114
1125
  ...a
1115
- }).then((s) => ((s == null ? void 0 : s.status) === E.SUCCESS && setTimeout(() => {
1126
+ }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
1116
1127
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1117
- }, 50), s)), Ut = (e, t) => {
1128
+ }, 50), s)), Nt = (e, t) => {
1118
1129
  const a = {};
1119
- return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], qa(e, a, {
1130
+ return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], ja(e, a, {
1120
1131
  loadingText: !1,
1121
1132
  hideErrorToast: !0
1122
1133
  });
1123
- }, ea = async (e, t, a) => await ke(e, {
1134
+ }, ta = async (e, t, a) => await Me(e, {
1124
1135
  urlKey: "detail",
1125
1136
  url: a,
1126
1137
  params: t,
1127
1138
  loadingState: e.isGridLoading
1128
- }), Ct = (e, t) => {
1139
+ }), Ft = (e, t) => {
1129
1140
  const a = t;
1130
- return ea(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === E.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1131
- }, Nt = (e, t) => {
1141
+ return ta(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1142
+ }, Ut = (e, t) => {
1132
1143
  let a = e.editor;
1133
- e.rowData.value = t, a && (Be(a, t), a.visible.value = !0);
1134
- }, Ft = (e, t) => Pa(e, t, {
1144
+ e.rowData.value = t, a && (We(a, t), a.visible.value = !0);
1145
+ }, Ct = (e, t) => wa(e, t, {
1135
1146
  url: e.deleteUrl,
1136
1147
  primaryKey: e.primaryKey
1137
- }).then((a) => ((a == null ? void 0 : a.status) === E.SUCCESS && setTimeout(() => {
1148
+ }).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && setTimeout(() => {
1138
1149
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1139
1150
  }, 50), a)), y = {
1140
1151
  PageOption: {
@@ -1146,12 +1157,12 @@ const Da = (e) => {
1146
1157
  primaryKey: "Id",
1147
1158
  statusKey: "Enabled",
1148
1159
  remotePage: !0,
1149
- tableSize: u("small"),
1150
- selectable: u(!1),
1151
- searchBar: u(!0),
1152
- pageSize: u(10),
1153
- rowExpand: u(!1),
1154
- buttons: u(["New"]),
1160
+ tableSize: c("small"),
1161
+ selectable: c(!1),
1162
+ searchBar: c(!0),
1163
+ pageSize: c(10),
1164
+ rowExpand: c(!1),
1165
+ buttons: c(["New"]),
1155
1166
  tools: ["Reload", "RowHeight", "TableHeadset"],
1156
1167
  operates: ["Edit", "Delete"]
1157
1168
  },
@@ -1179,56 +1190,56 @@ const Da = (e) => {
1179
1190
  ...y.TreeOption,
1180
1191
  ...e.treeOption
1181
1192
  };
1182
- }, ja = (e, t, a, s) => ({
1193
+ }, qa = (e, t, a, s) => ({
1183
1194
  editorCtrl: {
1184
1195
  ...y.EditorOption,
1185
1196
  name: "",
1186
1197
  default: a ? JSON.parse(JSON.stringify(a)) : void 0,
1187
- visible: u(!1),
1198
+ visible: c(!1),
1188
1199
  page: t,
1189
- formData: u(a ? JSON.parse(JSON.stringify(a)) : void 0),
1190
- formRules: u(s),
1191
- ruleResults: u({}),
1192
- updateData: u(void 0),
1200
+ formData: c(a ? JSON.parse(JSON.stringify(a)) : void 0),
1201
+ formRules: c(s),
1202
+ ruleResults: c({}),
1203
+ updateData: c(void 0),
1193
1204
  saveUrl: e.urls.save,
1194
1205
  detailUrl: e.urls.detail,
1195
- isFormSaving: u(!1),
1196
- isFormLoading: u(!1)
1206
+ isFormSaving: c(!1),
1207
+ isFormLoading: c(!1)
1197
1208
  }
1198
- }), Ba = (e, t, a) => {
1209
+ }), Ja = (e, t, a) => {
1199
1210
  const s = {
1200
1211
  ...y.GridOption,
1201
- tableSize: u(y.GridOption.tableSize.value),
1202
- selectable: u(y.GridOption.selectable.value),
1203
- searchBar: u(y.GridOption.searchBar.value),
1204
- pageSize: u(y.GridOption.pageSize.value),
1205
- rowExpand: u(y.GridOption.rowExpand.value),
1206
- buttons: u([...y.GridOption.buttons.value]),
1212
+ tableSize: c(y.GridOption.tableSize.value),
1213
+ selectable: c(y.GridOption.selectable.value),
1214
+ searchBar: c(y.GridOption.searchBar.value),
1215
+ pageSize: c(y.GridOption.pageSize.value),
1216
+ rowExpand: c(y.GridOption.rowExpand.value),
1217
+ buttons: c([...y.GridOption.buttons.value]),
1207
1218
  tools: [...y.GridOption.tools],
1208
1219
  operates: [...y.GridOption.operates],
1209
- columns: u(a || []),
1210
- reload: u(!1),
1211
- pageNo: u(1),
1212
- total: u(0),
1220
+ columns: c(a || []),
1221
+ reload: c(!1),
1222
+ pageNo: c(1),
1223
+ total: c(0),
1213
1224
  page: t,
1214
- selectKeys: u([]),
1215
- selectRows: u([]),
1216
- rowData: u(void 0),
1225
+ selectKeys: c([]),
1226
+ selectRows: c([]),
1227
+ rowData: c(void 0),
1217
1228
  gridQuery: {},
1218
- tableData: Ve(void 0),
1219
- expandRows: u({}),
1220
- isGridLoading: u(!1),
1221
- isGridSaving: u(!1),
1229
+ tableData: qe(void 0),
1230
+ expandRows: c({}),
1231
+ isGridLoading: c(!1),
1232
+ isGridSaving: c(!1),
1222
1233
  gridUrl: e.urls.list || e.urls.find,
1223
1234
  updateUrl: e.urls.update,
1224
1235
  deleteUrl: e.urls.delete
1225
1236
  };
1226
- return R(
1237
+ return E(
1227
1238
  () => s.reload.value,
1228
1239
  (r) => {
1229
1240
  r && (setTimeout(() => {
1230
1241
  s.reload.value = !1;
1231
- }, 1), s.remotePage ? Ze(s) : Ga(s));
1242
+ }, 1), s.remotePage ? aa(s) : Ga(s));
1232
1243
  }
1233
1244
  ), {
1234
1245
  gridCtrl: s
@@ -1236,14 +1247,14 @@ const Da = (e) => {
1236
1247
  }, Kt = (e, t) => {
1237
1248
  const a = {
1238
1249
  ...y.TreeOption,
1239
- reload: u(!1),
1250
+ reload: c(!1),
1240
1251
  page: t,
1241
- node: u(void 0),
1252
+ node: c(void 0),
1242
1253
  url: e.urls.tree,
1243
- data: Ve(void 0),
1244
- isTreeLoading: u(!1)
1254
+ data: qe(void 0),
1255
+ isTreeLoading: c(!1)
1245
1256
  };
1246
- return R(
1257
+ return E(
1247
1258
  () => a.reload.value,
1248
1259
  (s) => {
1249
1260
  s && (setTimeout(() => {
@@ -1259,21 +1270,21 @@ const Da = (e) => {
1259
1270
  const s = {
1260
1271
  ...y.PageOption,
1261
1272
  ...e
1262
- }, { editorCtrl: r } = ja(e, s, t, a), { gridCtrl: n } = Ba(e, s);
1273
+ }, { editorCtrl: r } = qa(e, s, t, a), { gridCtrl: n } = Ja(e, s);
1263
1274
  return s.editor = r, s.grid = n, n.editor = r, n.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], r.grid = n, {
1264
1275
  pageCtrl: s,
1265
1276
  editorCtrl: r,
1266
1277
  gridCtrl: n
1267
1278
  };
1268
1279
  };
1269
- var aa = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(aa || {});
1270
- class Ja {
1280
+ var Te = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(Te || {});
1281
+ class Ba {
1271
1282
  constructor() {
1272
1283
  k(this, "listeners", {});
1273
1284
  }
1274
1285
  // 检查事件名是否符合前缀
1275
1286
  isValidPrefix(t) {
1276
- return Object.values(aa).some((a) => t.startsWith(a + "."));
1287
+ return Object.values(Te).some((a) => t.startsWith(a + "."));
1277
1288
  }
1278
1289
  /**
1279
1290
  * 事件订阅
@@ -1282,7 +1293,7 @@ class Ja {
1282
1293
  */
1283
1294
  on(t, a) {
1284
1295
  if (!this.isValidPrefix(t)) {
1285
- console.error(`事件前缀不正确: ${t}`);
1296
+ console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Te).join(", ")} 开头`);
1286
1297
  return;
1287
1298
  }
1288
1299
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
@@ -1313,26 +1324,26 @@ class Ja {
1313
1324
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1314
1325
  }
1315
1326
  }
1316
- const re = new Ja(), he = (e, t, a, s, r, n) => {
1327
+ const V = new Ba(), Z = (e, t, a, s, r, n) => {
1317
1328
  if (s && t.reloadEvent && (s.reloadHandler = (o, l) => {
1318
1329
  za(r, t, l, a);
1319
- }, re.on(t.reloadEvent, s.reloadHandler)), t.data)
1320
- R(
1330
+ }, V.on(t.reloadEvent, s.reloadHandler)), t.data)
1331
+ E(
1321
1332
  () => t.data,
1322
1333
  () => {
1323
- De(t, t.data, a, !0);
1334
+ Ue(t, t.data, a, !0);
1324
1335
  },
1325
1336
  { deep: !0, immediate: !0 }
1326
1337
  );
1327
1338
  else if (r && r.url)
1328
- e !== !1 && ta(r, t, n ?? {}, a);
1339
+ e !== !1 && sa(r, t, n ?? {}, a);
1329
1340
  else {
1330
- const o = u(G(U.LabelText, ""));
1331
- S.error("`" + o.value + "` 未配置选项数据!", {
1341
+ const o = c(j(N.LabelText, ""));
1342
+ I.error("`" + o.value + "` 未配置选项数据!", {
1332
1343
  duration: 5e3
1333
1344
  });
1334
1345
  }
1335
- }, De = (e, t, a, s) => {
1346
+ }, Ue = (e, t, a, s) => {
1336
1347
  if (!t || t.length === 0) {
1337
1348
  a.value = [];
1338
1349
  return;
@@ -1348,13 +1359,13 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1348
1359
  value: void 0
1349
1360
  }), a.value = t;
1350
1361
  }, za = (e, t, a, s) => {
1351
- Array.isArray(a) ? De(t, a, s, !0) : ta(e, t, { Query: a }, s);
1362
+ Array.isArray(a) ? Ue(t, a, s, !0) : sa(e, t, a, s);
1352
1363
  }, me = (e, t) => {
1353
- t && e.reloadEvent && t.reloadHandler && re.off(e.reloadEvent, t.reloadHandler);
1354
- }, ta = (e, t, a, s) => {
1355
- const r = Pe(e.params, a, t.params);
1364
+ t && e.reloadEvent && t.reloadHandler && V.off(e.reloadEvent, t.reloadHandler);
1365
+ }, sa = (e, t, a, s) => {
1366
+ const r = ke(e.params, t.params, a);
1356
1367
  Wa(e, t.fieldMap, r).then((n) => {
1357
- De(t, n, s, !1);
1368
+ Ue(t, n, s, !1);
1358
1369
  });
1359
1370
  }, Wa = (e, t, a) => {
1360
1371
  const { fieldMap: s, ...r } = e, o = {
@@ -1368,11 +1379,11 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1368
1379
  },
1369
1380
  ...r
1370
1381
  };
1371
- return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), K(o, a).then((l) => (l == null ? void 0 : l.status) === E.SUCCESS && l.data ? l.data : []);
1382
+ return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), H(o, a).then((l) => (l == null ? void 0 : l.status) === T.SUCCESS && l.data ? l.data : []);
1372
1383
  }, Ya = (e, t) => {
1373
1384
  if (e !== void 0)
1374
1385
  return Array.isArray(e) ? t.filter((a) => e.includes(a.value)) : t.find((a) => a.value === e);
1375
- }, xe = (e, t, a) => {
1386
+ }, Ae = (e, t, a) => {
1376
1387
  const s = t.split(".");
1377
1388
  let r = e;
1378
1389
  for (let n = 0; n < s.length - 1; n++) {
@@ -1380,35 +1391,60 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1380
1391
  r[o] || (r[o] = {}), r = r[o];
1381
1392
  }
1382
1393
  r[s[s.length - 1]] = a;
1383
- }, sa = (e, t, a) => {
1394
+ }, ra = (e, t, a) => {
1384
1395
  if (a == null) {
1385
1396
  Object.entries(t).forEach(([s]) => {
1386
- xe(e, s, a);
1397
+ Ae(e, s, a);
1387
1398
  });
1388
1399
  return;
1389
1400
  }
1390
1401
  Array.isArray(a) || Object.entries(t).forEach(([s, r]) => {
1391
1402
  if (r.includes("${")) {
1392
- const n = Aa(r, a);
1393
- xe(e, s, n);
1403
+ const n = Ee(r, a);
1404
+ Ae(e, s, n);
1394
1405
  } else
1395
- xe(e, s, a[r]);
1406
+ Ae(e, s, a[r]);
1396
1407
  });
1397
1408
  }, ve = (e, t, a, s) => {
1398
1409
  var n;
1399
- s.editorCtrl && ((n = s.errInfo) != null && n.value.errClass) && pe(s.editorCtrl);
1410
+ s.editorCtrl && ((n = s.errInfo) != null && n.value.errClass) && de(s.editorCtrl);
1400
1411
  const r = Ya(t, a.value);
1401
- return e.formData && e.outFields && sa(e.formData, e.outFields, r), e.changeEvent && (Array.isArray(e.changeEvent) ? e.changeEvent.every((o) => {
1402
- re.emit(o, t, r);
1403
- }) : re.emit(e.changeEvent, t, r)), s.inputEmit && s.inputEmit("change", t, r), r;
1404
- }, ge = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, Ae = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), F = u({}), Qt = F, Vt = (e) => {
1412
+ if (e.formData && e.outFields && ra(e.formData, e.outFields, r), e.changeEvent) {
1413
+ const [o, l] = e.changeEvent;
1414
+ if (l)
1415
+ if (Array.isArray(o))
1416
+ o.every((i) => {
1417
+ const u = Ee(l, { selectedValues: t });
1418
+ try {
1419
+ const f = JSON.parse(u);
1420
+ V.emit(i, f, t, r);
1421
+ } catch (f) {
1422
+ console.error("eventParamsValue: ", u, f);
1423
+ }
1424
+ });
1425
+ else {
1426
+ const i = Ee(l, { selectedValues: t });
1427
+ try {
1428
+ const u = JSON.parse(i);
1429
+ V.emit(o, u, t, r);
1430
+ } catch (u) {
1431
+ console.error("eventParamsValue: ", i, u);
1432
+ }
1433
+ }
1434
+ else
1435
+ Array.isArray(o) ? o.every((i) => {
1436
+ V.emit(i, r, t);
1437
+ }) : V.emit(o, r, t);
1438
+ }
1439
+ return s.inputEmit && s.inputEmit("change", t, r), r;
1440
+ }, ge = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, xe = /* @__PURE__ */ new Map(), Qe = /* @__PURE__ */ new Set(), _ = c({}), Vt = _, Qt = (e) => {
1405
1441
  var r;
1406
- if (!e.iconUrl) return Ee;
1407
- const t = u(!0), a = u("");
1442
+ if (!e.iconUrl) return Re;
1443
+ const t = c(!0), a = c("");
1408
1444
  let s = !0;
1409
- return (r = e.icons) != null && r.length && (s = e.icons.every((n) => F.value[n] !== void 0)), (e.icon && !F.value[e.icon] || !s) && Za(e, t).then(() => {
1445
+ return (r = e.icons) != null && r.length && (s = e.icons.every((n) => _.value[n] !== void 0)), (e.icon && !_.value[e.icon] || !s) && Za(e, t).then(() => {
1410
1446
  tt(e.iconUrl, e.monoColor || !1), t.value = !0;
1411
- }), X({
1447
+ }), ee({
1412
1448
  props: {
1413
1449
  icon: {
1414
1450
  type: String
@@ -1435,41 +1471,41 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1435
1471
  },
1436
1472
  emits: ["update:iconIndex"],
1437
1473
  setup(n, { emit: o }) {
1438
- const l = u(n.icon), i = u(0), c = () => {
1474
+ const l = c(n.icon), i = c(0), u = () => {
1439
1475
  n.icons && i.value++;
1440
1476
  };
1441
- return R(
1477
+ return E(
1442
1478
  () => n.iconIndex,
1443
1479
  (f) => {
1444
1480
  f !== void 0 && (i.value = f);
1445
1481
  },
1446
1482
  { immediate: !0 }
1447
- ), R(
1483
+ ), E(
1448
1484
  () => i.value,
1449
1485
  (f) => {
1450
- n.icons && (f >= n.icons.length && (i.value = 0), l.value = n.icons[i.value], ee(a, l, l.value), o("update:iconIndex", i.value));
1486
+ n.icons && (f >= n.icons.length && (i.value = 0), l.value = n.icons[i.value], te(a, l, l.value), o("update:iconIndex", i.value));
1451
1487
  },
1452
1488
  { immediate: !0 }
1453
- ), R(
1454
- () => F.value,
1489
+ ), E(
1490
+ () => _.value,
1455
1491
  () => {
1456
- ee(a, l, l.value);
1492
+ te(a, l, l.value);
1457
1493
  },
1458
1494
  { deep: !0 }
1459
- ), R(
1495
+ ), E(
1460
1496
  () => n.icon,
1461
1497
  (f) => {
1462
- ee(a, l, f);
1498
+ te(a, l, f);
1463
1499
  }
1464
- ), ee(a, l, l.value), { isLoaded: t, Icon: a, handleClick: c };
1500
+ ), te(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1465
1501
  },
1466
1502
  render() {
1467
1503
  if (!t.value)
1468
- return Ee;
1504
+ return Re;
1469
1505
  let n = this.class, o = "";
1470
1506
  Array.isArray(n) ? o = n.join(" ") : typeof n == "string" && (o = n);
1471
1507
  let l = [o];
1472
- return !/\bw-/.test(o) && !/$w-/.test(o) && l.push("w-4"), !/\bh-/.test(o) && !/$h-/.test(o) && l.push("h-4"), a.value ? C(Qe(a.value), {
1508
+ return !/\bw-/.test(o) && !/$w-/.test(o) && l.push("w-4"), !/\bh-/.test(o) && !/$h-/.test(o) && l.push("h-4"), a.value ? F(je(a.value), {
1473
1509
  onClick: this.$props.clickable ? this.handleClick : void 0,
1474
1510
  class: `${l.join(" ")}`,
1475
1511
  style: {
@@ -1477,28 +1513,28 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1477
1513
  cursor: this.$props.clickable ? "pointer" : "default",
1478
1514
  transform: rt(this.angle, this.flip)
1479
1515
  }
1480
- }) : C("div", { class: "w-[14px] h-[14px]" });
1516
+ }) : F("div", { class: "w-[14px] h-[14px]" });
1481
1517
  }
1482
1518
  });
1483
1519
  }, Za = (e, t) => {
1484
1520
  let a = e.iconUrl;
1485
1521
  if (!a)
1486
1522
  return console.error("图标库地址不能为空"), Promise.resolve();
1487
- if (Ae.has(a))
1523
+ if (xe.has(a))
1488
1524
  return Promise.resolve();
1489
- const s = na(a);
1525
+ const s = oa(a);
1490
1526
  if (s)
1491
- return new Promise(async (n) => (ra(s.scriptContent), n()));
1527
+ return new Promise(async (n) => (na(s.scriptContent), n()));
1492
1528
  t.value = !1;
1493
1529
  const r = new Promise(async (n) => {
1494
- await et(a, e.monoColor || !1), n(), Ae.delete(a);
1530
+ await et(a, e.monoColor || !1), n(), xe.delete(a);
1495
1531
  });
1496
- return Ae.set(a, r), r;
1532
+ return xe.set(a, r), r;
1497
1533
  }, et = async (e, t) => {
1498
1534
  try {
1499
1535
  const a = await fetch(e);
1500
1536
  if (!a.ok) {
1501
- S.error("网络异常,无法加载图标库!");
1537
+ I.error("网络异常,无法加载图标库!");
1502
1538
  return;
1503
1539
  }
1504
1540
  let s = await a.text();
@@ -1509,12 +1545,12 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1509
1545
  let o = n[1];
1510
1546
  at(e, o, t, s);
1511
1547
  }
1512
- ra(s);
1548
+ na(s);
1513
1549
  return;
1514
1550
  } catch (a) {
1515
1551
  return console.error("网络异常,无法加载图标库:", a), null;
1516
1552
  }
1517
- }, ra = (e) => {
1553
+ }, na = (e) => {
1518
1554
  const t = document.createElement("script");
1519
1555
  t.textContent = e, document.head.appendChild(t);
1520
1556
  }, at = (e, t, a, s) => {
@@ -1527,7 +1563,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1527
1563
  // 缓存时间:7天
1528
1564
  };
1529
1565
  localStorage.setItem(r, JSON.stringify(n));
1530
- }, na = (e) => {
1566
+ }, oa = (e) => {
1531
1567
  let t = `icon_cache:${e}`;
1532
1568
  const a = localStorage.getItem(t);
1533
1569
  if (!a) return null;
@@ -1545,15 +1581,15 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1545
1581
  const a = localStorage.getItem(t);
1546
1582
  a && JSON.parse(a).expireTime < e && localStorage.removeItem(t);
1547
1583
  }
1548
- }, ee = (e, t, a) => {
1584
+ }, te = (e, t, a) => {
1549
1585
  setTimeout(() => {
1550
- t.value = a, t.value && (e.value = F.value[t.value]);
1586
+ t.value = a, t.value && (e.value = _.value[t.value]);
1551
1587
  }, 1);
1552
- }, Ee = C(
1588
+ }, Re = F(
1553
1589
  "svg",
1554
1590
  { class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
1555
1591
  [
1556
- C("circle", {
1592
+ F("circle", {
1557
1593
  cx: "25",
1558
1594
  cy: "25",
1559
1595
  r: "20",
@@ -1562,7 +1598,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1562
1598
  style: { strokeWidth: "3 !important" }
1563
1599
  // 强制应用线宽
1564
1600
  }),
1565
- C("circle", {
1601
+ F("circle", {
1566
1602
  cx: "25",
1567
1603
  cy: "6",
1568
1604
  r: "6",
@@ -1570,45 +1606,45 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1570
1606
  })
1571
1607
  ]
1572
1608
  ), tt = (e, t) => {
1573
- const a = na(e);
1609
+ const a = oa(e);
1574
1610
  Object.keys(window).forEach((s) => {
1575
- s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ke.has(s) && (Ke.add(s), st(s, t));
1611
+ s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Qe.has(s) && (Qe.add(s), st(s, t));
1576
1612
  });
1577
1613
  }, st = (e, t) => {
1578
1614
  const a = window[e], n = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), o = document.querySelectorAll("symbol");
1579
1615
  for (const l of n) {
1580
- const i = l.id, c = Array.from(o).find((f) => f.id === i);
1581
- c && t && (c.innerHTML = l.innerHTML, c.querySelectorAll("*").forEach((f) => {
1616
+ const i = l.id, u = Array.from(o).find((f) => f.id === i);
1617
+ u && t && (u.innerHTML = l.innerHTML, u.querySelectorAll("*").forEach((f) => {
1582
1618
  f.hasAttribute("fill") && f.removeAttribute("fill");
1583
- })), F.value[i] || (F.value[i] = C("svg", { fill: "currentColor" }, [C("use", { "xlink:href": `#${i}` })]));
1619
+ })), _.value[i] || (_.value[i] = F("svg", { fill: "currentColor" }, [F("use", { "xlink:href": `#${i}` })]));
1584
1620
  }
1585
1621
  }, rt = (e, t) => {
1586
1622
  let a = "";
1587
1623
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1588
- }, qt = (e, t, a, s) => {
1589
- oa(e, [], a, s).forEach((n) => t.push(n));
1590
- }, oa = (e, t, a, s) => {
1591
- var o, l, i, c, f;
1592
- const r = [], n = _();
1624
+ }, jt = (e, t, a, s) => {
1625
+ la(e, [], a, s).forEach((n) => t.push(n));
1626
+ }, la = (e, t, a, s) => {
1627
+ var o, l, i, u, f;
1628
+ const r = [], n = K();
1593
1629
  for (const p of e) {
1594
1630
  if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (o = p.meta) == null ? void 0 : o.roles) != null && l.length && !n.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !n.hasPermit(p.meta.permission, ":page"))
1595
1631
  continue;
1596
1632
  const v = p.path.split("/");
1597
1633
  v.unshift(...t);
1598
- const g = oa(p.children || [], v, a, s), P = {
1634
+ const h = la(p.children || [], v, a, s), w = {
1599
1635
  key: v.join("/"),
1600
- label: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
1636
+ label: ((u = p.name) == null ? void 0 : u.toString()) ?? "",
1601
1637
  title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
1602
- icon: p.icon ? C(a, { ...s, icon: p.icon }) : void 0,
1603
- children: g.length > 0 ? g : void 0
1638
+ icon: p.icon ? F(a, { ...s, icon: p.icon }) : void 0,
1639
+ children: h.length > 0 ? h : void 0
1604
1640
  };
1605
- (g.length > 0 || !p.children) && r.push(P);
1641
+ (h.length > 0 || !p.children) && r.push(w);
1606
1642
  }
1607
1643
  return r;
1608
- }, He = ca([]), jt = () => {
1609
- He.length = 0;
1610
- const e = N();
1611
- let a = Me().TabActive;
1644
+ }, Ge = fa([]), qt = () => {
1645
+ Ge.length = 0;
1646
+ const e = C();
1647
+ let a = Ne().TabActive;
1612
1648
  e.matchedRoutes(a).forEach((r, n) => {
1613
1649
  var l;
1614
1650
  const o = {
@@ -1616,7 +1652,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1616
1652
  path: r.path,
1617
1653
  breadcrumbName: ((l = r.name) == null ? void 0 : l.toString()) ?? ""
1618
1654
  };
1619
- He.push(o);
1655
+ Ge.push(o);
1620
1656
  });
1621
1657
  }, nt = {
1622
1658
  host: {
@@ -1630,7 +1666,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1630
1666
  // 不显示错误
1631
1667
  hideErrorToast: !0
1632
1668
  }
1633
- }, Bt = Z("hostInfo", {
1669
+ }, Jt = ae("hostInfo", {
1634
1670
  state: () => ({
1635
1671
  hostInfo: {
1636
1672
  Host: "",
@@ -1656,12 +1692,12 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1656
1692
  return new Promise((s) => {
1657
1693
  Se.SITEHOST_API || (Se.SITEHOST_API = e);
1658
1694
  const r = t || window.location.origin;
1659
- K(nt.host, {
1695
+ H(nt.host, {
1660
1696
  Query: {
1661
1697
  Host: r
1662
1698
  }
1663
1699
  }).then((n) => {
1664
- if ((n == null ? void 0 : n.status) === E.SUCCESS && n.data) {
1700
+ if ((n == null ? void 0 : n.status) === T.SUCCESS && n.data) {
1665
1701
  const o = n.data;
1666
1702
  this._setHostInfo(o);
1667
1703
  }
@@ -1692,7 +1728,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1692
1728
  // storage: localStorage,
1693
1729
  // pick: ['hostInfo'],
1694
1730
  // },
1695
- }), Jt = Z("settingInfo", {
1731
+ }), Bt = ae("settingInfo", {
1696
1732
  state: () => ({
1697
1733
  fullscreen: !1,
1698
1734
  menuCollapse: !1,
@@ -1734,11 +1770,11 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1734
1770
  }
1735
1771
  },
1736
1772
  persist: !1
1737
- }), zt = /* @__PURE__ */ X({
1773
+ }), zt = /* @__PURE__ */ ee({
1738
1774
  inheritAttrs: !1,
1739
1775
  __name: "index",
1740
1776
  props: {
1741
- ...ue,
1777
+ ...ce,
1742
1778
  autoload: {
1743
1779
  type: Boolean,
1744
1780
  default: !1
@@ -1752,7 +1788,7 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1752
1788
  * - 模糊查询
1753
1789
  */
1754
1790
  searchField: {
1755
- type: String
1791
+ type: [String, Array]
1756
1792
  },
1757
1793
  /**
1758
1794
  * 自定义查询参数
@@ -1772,78 +1808,82 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1772
1808
  },
1773
1809
  emits: ["update:value", "select", "change", "update:labels"],
1774
1810
  setup(e, { emit: t }) {
1775
- var P, h, b;
1776
- const a = e, s = ne(), r = u({
1811
+ var w, m, b;
1812
+ const a = e, s = oe(), r = c({
1777
1813
  ...a.url,
1778
- url: ((P = a.url) == null ? void 0 : P.url) || "",
1779
- fieldMap: a.fieldMap || ((h = a.url) == null ? void 0 : h.fieldMap),
1814
+ url: ((w = a.url) == null ? void 0 : w.url) || "",
1815
+ fieldMap: a.fieldMap || ((m = a.url) == null ? void 0 : m.fieldMap),
1780
1816
  params: a.params || ((b = a.url) == null ? void 0 : b.params),
1781
1817
  loadingText: !1
1782
- }), n = u(void 0);
1783
- R(
1818
+ }), n = c(void 0);
1819
+ E(
1784
1820
  () => a.value,
1785
1821
  () => {
1786
1822
  n.value = a.value;
1787
1823
  },
1788
1824
  { immediate: !0 }
1789
- ), R(
1825
+ ), E(
1790
1826
  () => n.value,
1791
- (m) => {
1792
- a.autoClean && a.formData && a.outFields && m !== a.value && sa(a.formData, a.outFields, null);
1827
+ (g) => {
1828
+ a.autoClean && a.formData && a.outFields && g !== a.value && ra(a.formData, a.outFields, null);
1793
1829
  }
1794
1830
  );
1795
- const o = de(), { editorCtrl: l, errInfo: i, labelText: c } = o, f = t;
1831
+ const o = he(), { editorCtrl: l, errInfo: i, labelText: u } = o, f = t;
1796
1832
  o.inputEmit = f;
1797
- const p = u([]), v = (m) => {
1833
+ const p = c([]), v = (g) => {
1798
1834
  var $;
1799
- if (p.value = [], m === "") return;
1800
- let d = m.trim(), I = {
1835
+ if (p.value = [], g === "") return;
1836
+ let d = g.trim(), S = {
1801
1837
  ...r.value.params,
1802
1838
  Query: {
1803
1839
  ...($ = r.value.params) == null ? void 0 : $.Query
1804
1840
  }
1805
1841
  };
1806
- a.searchField && (I.Query[a.searchField] = {
1842
+ a.searchField && (Array.isArray(a.searchField) ? a.searchField.forEach((U) => {
1843
+ S.Query[U] = {
1844
+ $like: "%" + d + "%"
1845
+ };
1846
+ }) : S.Query[a.searchField] = {
1807
1847
  $like: "%" + d + "%"
1808
- }), a.onsearch && a.onsearch(d, I), he(!0, a, p, o, r.value, I);
1809
- }, g = (m) => {
1810
- const d = ve(a, m, p, o);
1811
- f("update:value", m), f("select", m);
1812
- const I = ge(d);
1813
- f("update:labels", I), i != null && i.value.errClass && l && pe(l);
1848
+ }), a.onsearch && a.onsearch(d, S), Z(!0, a, p, o, r.value, S);
1849
+ }, h = (g) => {
1850
+ const d = ve(a, g, p, o);
1851
+ f("update:value", g), f("select", g);
1852
+ const S = ge(d);
1853
+ f("update:labels", S), i != null && i.value.errClass && l && de(l);
1814
1854
  };
1815
- return oe(() => {
1855
+ return le(() => {
1816
1856
  r.value && !r.value.fieldMap && (r.value.fieldMap = {
1817
1857
  title: "Name",
1818
1858
  label: "Name",
1819
1859
  value: "Name",
1820
1860
  key: "Id"
1821
1861
  });
1822
- }), le(() => {
1862
+ }), ie(() => {
1823
1863
  me(a, o);
1824
- }), (m, d) => {
1825
- var I;
1826
- return A(), O("div", null, [
1827
- j(x(pa), ie({
1864
+ }), (g, d) => {
1865
+ var S;
1866
+ return x(), O("div", null, [
1867
+ J(A(da), ue({
1828
1868
  value: n.value,
1829
1869
  "onUpdate:value": d[0] || (d[0] = ($) => n.value = $),
1830
- class: [(I = x(i)) == null ? void 0 : I.errClass, "error w-full"],
1870
+ class: [(S = A(i)) == null ? void 0 : S.errClass, "error w-full"],
1831
1871
  options: p.value,
1832
1872
  onSearch: v,
1833
- onSelect: g,
1834
- placeholder: a.url && !a.url.loading ? "请输入并选择" + x(c) : ""
1835
- }, x(s)), null, 16, ["value", "class", "options", "placeholder"])
1873
+ onSelect: h,
1874
+ placeholder: a.url && !a.url.loading ? "请输入并选择" + A(u) : ""
1875
+ }, A(s)), null, 16, ["value", "class", "options", "placeholder"])
1836
1876
  ]);
1837
1877
  };
1838
1878
  }
1839
1879
  }), ot = { class: "min-h-[32px] pt-[5px]" }, lt = {
1840
1880
  key: 1,
1841
1881
  class: "text-center text-gray-500"
1842
- }, Wt = /* @__PURE__ */ X({
1882
+ }, Wt = /* @__PURE__ */ ee({
1843
1883
  inheritAttrs: !1,
1844
1884
  __name: "index",
1845
1885
  props: {
1846
- ...ue,
1886
+ ...ce,
1847
1887
  nodata: {
1848
1888
  type: String,
1849
1889
  default: ""
@@ -1861,52 +1901,52 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1861
1901
  emits: ["change", "update:labels"],
1862
1902
  setup(e, { emit: t }) {
1863
1903
  var f, p, v;
1864
- const a = e, s = ne(), r = u({
1904
+ const a = e, s = oe(), r = c({
1865
1905
  ...a.url,
1866
1906
  url: ((f = a.url) == null ? void 0 : f.url) || "",
1867
1907
  fieldMap: a.fieldMap || ((p = a.url) == null ? void 0 : p.fieldMap),
1868
1908
  params: a.params || ((v = a.url) == null ? void 0 : v.params),
1869
1909
  loadingText: !1
1870
- }), n = de(), { errInfo: o } = n, l = t;
1910
+ }), n = he(), { errInfo: o } = n, l = t;
1871
1911
  n.inputEmit = l;
1872
- const i = u([]), c = (g) => {
1873
- const h = ve(a, g, i, n), b = ge(h);
1912
+ const i = c([]), u = (h) => {
1913
+ const m = ve(a, h, i, n), b = ge(m);
1874
1914
  l("update:labels", b);
1875
1915
  };
1876
- return oe(() => {
1916
+ return le(() => {
1877
1917
  r.value && !r.value.fieldMap && (r.value.fieldMap = {
1878
1918
  title: "Name",
1879
1919
  label: "Name",
1880
1920
  value: "Id",
1881
1921
  key: "Id"
1882
- }), he(a.autoload, a, i, n, r.value, r.value.params);
1883
- }), le(() => {
1922
+ }), Z(a.autoload, a, i, n, r.value, r.value.params);
1923
+ }), ie(() => {
1884
1924
  me(a, n);
1885
- }), (g, P) => (A(), O("div", ot, [
1886
- j(x(da), ie({
1887
- onChange: c,
1925
+ }), (h, w) => (x(), O("div", ot, [
1926
+ J(A(ha), ue({
1927
+ onChange: u,
1888
1928
  class: "w-full mb-[-3px]"
1889
- }, x(s)), {
1929
+ }, A(s)), {
1890
1930
  default: Q(() => [
1891
- i.value.length > 0 ? (A(!0), O(J, { key: 0 }, Te(i.value, (h) => {
1931
+ i.value.length > 0 ? (x(!0), O(z, { key: 0 }, Pe(i.value, (m) => {
1892
1932
  var b;
1893
- return A(), Re(x(ha), {
1894
- key: h.value,
1895
- value: h.value,
1896
- disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
1897
- class: Ge([
1898
- ((b = x(o)) == null ? void 0 : b.errClass) === "error" ? "error !text-red-400" : "",
1933
+ return x(), we(A(ma), {
1934
+ key: m.value,
1935
+ value: m.value,
1936
+ disabled: m.disabled || m.value && e.disabledItems && e.disabledItems.indexOf(m.value.toString()) > -1,
1937
+ class: Je([
1938
+ ((b = A(o)) == null ? void 0 : b.errClass) === "error" ? "error !text-red-400" : "",
1899
1939
  "text-nowrap",
1900
1940
  "pb-1",
1901
1941
  e.wrap ? `w-1/${a.wrap}` : ""
1902
1942
  ])
1903
1943
  }, {
1904
1944
  default: Q(() => [
1905
- we(z(h.label), 1)
1945
+ Oe(W(m.label), 1)
1906
1946
  ]),
1907
1947
  _: 2
1908
1948
  }, 1032, ["value", "disabled", "class"]);
1909
- }), 128)) : e.nodata ? (A(), O("div", lt, z(e.nodata), 1)) : B("", !0)
1949
+ }), 128)) : e.nodata ? (x(), O("div", lt, W(e.nodata), 1)) : B("", !0)
1910
1950
  ]),
1911
1951
  _: 1
1912
1952
  }, 16)
@@ -1915,11 +1955,11 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1915
1955
  }), it = { class: "min-h-[32px] pt-1" }, ut = {
1916
1956
  key: 1,
1917
1957
  class: "text-center text-gray-500"
1918
- }, Yt = /* @__PURE__ */ X({
1958
+ }, Yt = /* @__PURE__ */ ee({
1919
1959
  inheritAttrs: !1,
1920
1960
  __name: "index",
1921
1961
  props: {
1922
- ...ue,
1962
+ ...ce,
1923
1963
  value: {
1924
1964
  type: [String, Number, null, Array],
1925
1965
  default: void 0
@@ -1937,71 +1977,71 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
1937
1977
  },
1938
1978
  emits: ["change", "update:value", "update:labels"],
1939
1979
  setup(e, { emit: t }) {
1940
- var v, g, P;
1941
- const a = e, s = ne(), r = u({
1980
+ var v, h, w;
1981
+ const a = e, s = oe(), r = c({
1942
1982
  ...a.url,
1943
1983
  url: ((v = a.url) == null ? void 0 : v.url) || "",
1944
- fieldMap: a.fieldMap || ((g = a.url) == null ? void 0 : g.fieldMap),
1945
- params: a.params || ((P = a.url) == null ? void 0 : P.params),
1984
+ fieldMap: a.fieldMap || ((h = a.url) == null ? void 0 : h.fieldMap),
1985
+ params: a.params || ((w = a.url) == null ? void 0 : w.params),
1946
1986
  loadingText: !1
1947
- }), n = u(a.value), o = de(), { errInfo: l } = o, i = u([]), c = t;
1948
- o.inputEmit = c, R(
1987
+ }), n = c(a.value), o = he(), { errInfo: l } = o, i = c([]), u = t;
1988
+ o.inputEmit = u, E(
1949
1989
  () => n.value,
1950
- (h) => {
1951
- c("update:value", h);
1990
+ (m) => {
1991
+ u("update:value", m);
1952
1992
  }
1953
1993
  );
1954
- const f = (h, b) => {
1955
- if (typeof h == "object" && typeof b == "object") {
1956
- const m = JSON.stringify(h) === JSON.stringify(b);
1957
- return m && (n.value = h), m;
1994
+ const f = (m, b) => {
1995
+ if (typeof m == "object" && typeof b == "object") {
1996
+ const g = JSON.stringify(m) === JSON.stringify(b);
1997
+ return g && (n.value = m), g;
1958
1998
  }
1959
- return h === b;
1960
- }, p = (h) => {
1961
- const b = h.target.value, m = ve(a, b, i, o), d = ge(m);
1962
- c("update:labels", d);
1999
+ return m === b;
2000
+ }, p = (m) => {
2001
+ const b = m.target.value, g = ve(a, b, i, o), d = ge(g);
2002
+ u("update:labels", d);
1963
2003
  };
1964
- return oe(() => {
1965
- var h;
2004
+ return le(() => {
2005
+ var m;
1966
2006
  r.value && !r.value.fieldMap && (r.value.fieldMap = {
1967
2007
  label: "Name",
1968
2008
  value: "Id",
1969
2009
  key: "Id"
1970
- }), he(a.autoload, a, i, o, r.value, (h = r.value) == null ? void 0 : h.params);
1971
- }), le(() => {
2010
+ }), Z(a.autoload, a, i, o, r.value, (m = r.value) == null ? void 0 : m.params);
2011
+ }), ie(() => {
1972
2012
  me(a, o);
1973
- }), (h, b) => (A(), O("div", it, [
1974
- j(x(ma), ie({
2013
+ }), (m, b) => (x(), O("div", it, [
2014
+ J(A(va), ue({
1975
2015
  value: n.value,
1976
- "onUpdate:value": b[0] || (b[0] = (m) => n.value = m),
2016
+ "onUpdate:value": b[0] || (b[0] = (g) => n.value = g),
1977
2017
  autocheck: !1,
1978
2018
  onChange: p,
1979
2019
  class: "w-full flex align-items flex-wrap mb-[-3px]"
1980
- }, x(s)), {
2020
+ }, A(s)), {
1981
2021
  default: Q(() => [
1982
- i.value.length > 0 ? (A(!0), O(J, { key: 0 }, Te(i.value, (m) => {
2022
+ i.value.length > 0 ? (x(!0), O(z, { key: 0 }, Pe(i.value, (g) => {
1983
2023
  var d;
1984
- return A(), O(J, {
1985
- key: m.value
2024
+ return x(), O(z, {
2025
+ key: g.value
1986
2026
  }, [
1987
- m.visible !== !1 ? (A(), Re(x(va), {
2027
+ g.visible !== !1 ? (x(), we(A(ga), {
1988
2028
  key: 0,
1989
- checked: f(m.value, a.value),
1990
- value: m.value,
1991
- class: Ge([
1992
- ((d = x(l)) == null ? void 0 : d.errClass) === "error" ? "error !text-red-400" : "",
2029
+ checked: f(g.value, a.value),
2030
+ value: g.value,
2031
+ class: Je([
2032
+ ((d = A(l)) == null ? void 0 : d.errClass) === "error" ? "error !text-red-400" : "",
1993
2033
  "text-nowrap",
1994
2034
  "pb-1",
1995
2035
  e.wrap ? `w-1/${a.wrap}` : ""
1996
2036
  ])
1997
2037
  }, {
1998
2038
  default: Q(() => [
1999
- we(z(m.label), 1)
2039
+ Oe(W(g.label), 1)
2000
2040
  ]),
2001
2041
  _: 2
2002
2042
  }, 1032, ["checked", "value", "class"])) : B("", !0)
2003
2043
  ], 64);
2004
- }), 128)) : e.nodata ? (A(), O("div", ut, z(e.nodata), 1)) : B("", !0)
2044
+ }), 128)) : e.nodata ? (x(), O("div", ut, W(e.nodata), 1)) : B("", !0)
2005
2045
  ]),
2006
2046
  _: 1
2007
2047
  }, 16, ["value"])
@@ -2010,11 +2050,11 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
2010
2050
  }), ct = {
2011
2051
  key: 0,
2012
2052
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
2013
- }, Xt = /* @__PURE__ */ X({
2053
+ }, Xt = /* @__PURE__ */ ee({
2014
2054
  inheritAttrs: !1,
2015
2055
  __name: "index",
2016
2056
  props: {
2017
- ...ue,
2057
+ ...ce,
2018
2058
  value: {
2019
2059
  type: [String, Number, Array, null],
2020
2060
  default: void 0
@@ -2052,83 +2092,83 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
2052
2092
  },
2053
2093
  emits: ["change", "update:value", "update:labels"],
2054
2094
  setup(e, { emit: t }) {
2055
- var h, b, m;
2056
- const a = e, s = ne(), r = u({
2095
+ var m, b, g;
2096
+ const a = e, s = oe(), r = c({
2057
2097
  ...a.url,
2058
- url: ((h = a.url) == null ? void 0 : h.url) || "",
2098
+ url: ((m = a.url) == null ? void 0 : m.url) || "",
2059
2099
  fieldMap: a.fieldMap || ((b = a.url) == null ? void 0 : b.fieldMap),
2060
- params: a.params || ((m = a.url) == null ? void 0 : m.params),
2100
+ params: a.params || ((g = a.url) == null ? void 0 : g.params),
2061
2101
  loadingText: !1
2062
- }), n = de(), { editorCtrl: o, errInfo: l, labelText: i } = n, c = u(void 0), f = t;
2063
- n.inputEmit = f;
2064
- const p = u([]);
2065
- R(
2066
- () => p.value,
2102
+ }), n = he(), { editorCtrl: o, errInfo: l, labelText: i } = n, u = c(a.value), f = c(s.placeholder), p = c(void 0), v = t;
2103
+ n.inputEmit = v;
2104
+ const h = c([]), w = (d) => {
2105
+ const S = ve(a, d, h, n), $ = ge(S);
2106
+ p.value = d, v("update:labels", $), v("change", d), l != null && l.value.errClass && o && de(o);
2107
+ };
2108
+ return E(
2109
+ () => h.value,
2067
2110
  (d) => {
2068
- d.length > 0 && w(a.value) && a.selectFirst ? (c.value = d[0].value, P(d[0].value)) : c.value = a.value === null ? void 0 : a.value;
2111
+ d.length && P(a.value) && a.selectFirst ? p.value = d[0].value : p.value = a.value === null ? void 0 : a.value, d.length > 0 && p.value && w(p.value);
2069
2112
  }
2070
- );
2071
- const v = u(s.placeholder);
2072
- R(
2113
+ ), E(
2073
2114
  () => r.value.loading,
2074
2115
  (d) => {
2075
- d ? v.value = "" : v.value || (v.value = "请选择" + i.value);
2116
+ d ? f.value = "" : f.value || (f.value = "请选择" + i.value);
2076
2117
  },
2077
2118
  { immediate: !0 }
2078
- );
2079
- const g = u(a.value);
2080
- R(
2081
- () => c.value,
2119
+ ), E(
2120
+ () => p.value,
2082
2121
  (d) => {
2083
- if (s.mode === "multiple" && w(d) && w(g.value)) {
2084
- f("update:value", g.value);
2122
+ if (s.mode === "multiple" && P(d) && P(u.value)) {
2123
+ v("update:value", u.value);
2085
2124
  return;
2086
2125
  }
2087
- f("update:value", d);
2126
+ v("update:value", d);
2088
2127
  }
2089
- );
2090
- const P = (d) => {
2091
- const I = ve(a, d, p, n), $ = ge(I);
2092
- c.value = d, f("update:labels", $), f("change", d), l != null && l.value.errClass && o && pe(o);
2093
- };
2094
- return oe(() => {
2128
+ ), E(
2129
+ () => a.params,
2130
+ (d) => {
2131
+ Z(!0, a, h, n, r.value, d);
2132
+ },
2133
+ { deep: !0 }
2134
+ ), le(() => {
2095
2135
  var d;
2096
2136
  if (r.value && !r.value.fieldMap && (r.value.fieldMap = {
2097
2137
  label: "Name",
2098
2138
  value: "Id",
2099
2139
  key: "Id"
2100
2140
  }), a.dataKey) {
2101
- const I = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
2102
- p.value = I;
2103
- } else he(a.autoload, a, p, n, r.value, (d = r.value) == null ? void 0 : d.params);
2104
- }), le(() => {
2141
+ const S = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
2142
+ h.value = S;
2143
+ } else Z(a.autoload, a, h, n, r.value, (d = r.value) == null ? void 0 : d.params);
2144
+ }), ie(() => {
2105
2145
  me(a, n);
2106
- }), (d, I) => {
2146
+ }), (d, S) => {
2107
2147
  var $;
2108
- return A(), O("div", null, [
2109
- a.url && a.url.loading === !0 ? (A(), O("div", ct, [
2110
- j(x(Ee), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2111
- I[1] || (I[1] = fa("span", null, "数据加载中...", -1))
2148
+ return x(), O("div", null, [
2149
+ a.url && a.url.loading === !0 ? (x(), O("div", ct, [
2150
+ J(A(Re), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2151
+ S[1] || (S[1] = pa("span", null, "数据加载中...", -1))
2112
2152
  ])) : B("", !0),
2113
- j(x(ga), ie({
2114
- class: [($ = x(l)) == null ? void 0 : $.errClass, "w-full"],
2115
- value: c.value,
2116
- "onUpdate:value": I[0] || (I[0] = (H) => c.value = H),
2153
+ J(A(ya), ue({
2154
+ class: [($ = A(l)) == null ? void 0 : $.errClass, "w-full"],
2155
+ value: p.value,
2156
+ "onUpdate:value": S[0] || (S[0] = (U) => p.value = U),
2117
2157
  "allow-clear": !0,
2118
- onChange: P,
2119
- placeholder: v.value,
2158
+ onChange: w,
2159
+ placeholder: f.value,
2120
2160
  "label-in-value": !1
2121
- }, x(s)), {
2161
+ }, A(s)), {
2122
2162
  default: Q(() => [
2123
- (A(!0), O(J, null, Te(p.value, (H) => (A(), O(J, {
2124
- key: H.value
2163
+ (x(!0), O(z, null, Pe(h.value, (U) => (x(), O(z, {
2164
+ key: U.value
2125
2165
  }, [
2126
- H.visible !== !1 ? (A(), Re(x(ya), {
2166
+ U.visible !== !1 ? (x(), we(A(ba), {
2127
2167
  key: 0,
2128
- value: H.value
2168
+ value: U.value
2129
2169
  }, {
2130
2170
  default: Q(() => [
2131
- we(z(H.label), 1)
2171
+ Oe(W(U.label), 1)
2132
2172
  ]),
2133
2173
  _: 2
2134
2174
  }, 1032, ["value"])) : B("", !0)
@@ -2142,71 +2182,71 @@ const re = new Ja(), he = (e, t, a, s, r, n) => {
2142
2182
  });
2143
2183
  export {
2144
2184
  Tt as $,
2145
- ke as A,
2146
- wa as B,
2185
+ Me as A,
2186
+ Pa as B,
2147
2187
  _t as C,
2148
- ja as D,
2149
- Ba as E,
2188
+ qa as D,
2189
+ Ja as E,
2150
2190
  Kt as F,
2151
2191
  Ht as G,
2152
2192
  Ya as H,
2153
- sa as I,
2193
+ ra as I,
2154
2194
  ve as J,
2155
2195
  ge as K,
2156
- Qt as L,
2196
+ Vt as L,
2157
2197
  Gt as M,
2158
2198
  st as N,
2159
2199
  M as O,
2160
- U as P,
2200
+ N as P,
2161
2201
  rt as Q,
2162
- qt as R,
2163
- He as S,
2164
- jt as T,
2165
- je as U,
2202
+ jt as R,
2203
+ Ge as S,
2204
+ qt as T,
2205
+ ze as U,
2166
2206
  Lt as V,
2167
- Be as W,
2207
+ We as W,
2168
2208
  Et as X,
2169
2209
  Rt as Y,
2170
- Le as Z,
2210
+ $e as Z,
2171
2211
  zt as _,
2172
- Jt as a,
2212
+ Bt as a,
2173
2213
  Dt as a0,
2174
- qa as a1,
2175
- ea as a2,
2176
- Ct as a3,
2177
- At as a4,
2178
- qe as a5,
2179
- Pa as a6,
2180
- aa as a7,
2181
- re as a8,
2214
+ ja as a1,
2215
+ ta as a2,
2216
+ Ft as a3,
2217
+ xt as a4,
2218
+ Be as a5,
2219
+ wa as a6,
2220
+ Te as a7,
2221
+ V as a8,
2182
2222
  q as a9,
2183
- ae as aa,
2184
- N as ab,
2185
- Bt as ac,
2186
- Me as ad,
2187
- W as ae,
2223
+ se as aa,
2224
+ C as ab,
2225
+ Jt as ac,
2226
+ Ne as ad,
2227
+ Y as ae,
2188
2228
  Ot as b,
2189
- Vt as c,
2190
- Pt as d,
2191
- wt as e,
2192
- Nt as f,
2193
- Ft as g,
2229
+ Qt as c,
2230
+ kt as d,
2231
+ Pt as e,
2232
+ Ut as f,
2233
+ Ct as g,
2194
2234
  $t as h,
2195
- w as i,
2235
+ P as i,
2196
2236
  Mt as j,
2197
- de as k,
2198
- he as l,
2199
- me as m,
2200
- pe as n,
2201
- kt as o,
2202
- Ze as p,
2203
- Ga as q,
2204
- Y as r,
2205
- Ut as s,
2206
- Oa as t,
2207
- _ as u,
2208
- ue as v,
2209
- Ee as w,
2237
+ aa as k,
2238
+ Ga as l,
2239
+ Nt as m,
2240
+ ce as n,
2241
+ wt as o,
2242
+ he as p,
2243
+ Oa as q,
2244
+ X as r,
2245
+ Z as s,
2246
+ me as t,
2247
+ K as u,
2248
+ Re as v,
2249
+ de as w,
2210
2250
  Wt as x,
2211
2251
  Yt as y,
2212
2252
  Xt as z