@skyfox2000/webui 1.3.4 → 1.3.6

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 (55) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/lib/assets/modules/{file-upload-BBlFaIXB.js → file-upload-DhPgqGdk.js} +50 -50
  3. package/lib/assets/modules/index-02J2AYth.js +377 -0
  4. package/lib/assets/modules/{index-m5rogIyM.js → index-C31q4LHC.js} +2 -2
  5. package/lib/assets/modules/{index-BG1SqSVl.js → index-CCpTizF9.js} +1 -1
  6. package/lib/assets/modules/{menuTabs-tPIz4a89.js → menuTabs-DyhSKN9r.js} +2 -2
  7. package/lib/assets/modules/{toolIcon-DwWoD9TN.js → toolIcon-CqM4gBIc.js} +1 -1
  8. package/lib/assets/modules/{uploadList-D_Z-Y2tw.js → uploadList-DAVjJkqz.js} +511 -476
  9. package/lib/assets/modules/{uploadList-Da7mQUNK.js → uploadList-ZajZKqaS.js} +4 -4
  10. package/lib/components/common/alert/index.vue.d.ts +13 -0
  11. package/lib/components/common/icon/helper.vue.d.ts +1 -0
  12. package/lib/components/common/index.d.ts +2 -0
  13. package/lib/components/content/form/formItem.vue.d.ts +1 -0
  14. package/lib/components/content/table/index.vue.d.ts +95 -4
  15. package/lib/components/form/input/index.vue.d.ts +4 -1
  16. package/lib/components/form/select/index.vue.d.ts +2 -0
  17. package/lib/components/form/treeSelect/index.vue.d.ts +11 -2
  18. package/lib/components/index.d.ts +1 -1
  19. package/lib/es/AceEditor/index.js +3 -3
  20. package/lib/es/BasicLayout/index.js +3 -3
  21. package/lib/es/Error403/index.js +1 -1
  22. package/lib/es/Error404/index.js +1 -1
  23. package/lib/es/ExcelForm/index.js +317 -274
  24. package/lib/es/UploadForm/index.js +4 -4
  25. package/lib/index.d.ts +1 -1
  26. package/lib/typings/form.d.ts +2 -2
  27. package/lib/typings/option.d.ts +2 -2
  28. package/lib/utils/excel-preview.d.ts +24 -0
  29. package/lib/utils/form-excel.d.ts +17 -4
  30. package/lib/utils/options.d.ts +2 -2
  31. package/lib/webui.css +1 -1
  32. package/lib/webui.es.js +759 -747
  33. package/package.json +1 -1
  34. package/src/components/common/alert/index.vue +76 -0
  35. package/src/components/common/icon/helper.vue +7 -1
  36. package/src/components/common/index.ts +4 -1
  37. package/src/components/common/loading/index.vue +1 -1
  38. package/src/components/content/dialog/excelForm.vue +343 -313
  39. package/src/components/content/form/formItem.vue +6 -2
  40. package/src/components/content/table/index.vue +9 -6
  41. package/src/components/form/autoComplete/index.vue +9 -3
  42. package/src/components/form/cascader/index.vue +8 -6
  43. package/src/components/form/input/index.vue +16 -3
  44. package/src/components/form/select/index.vue +5 -11
  45. package/src/components/form/treeSelect/index.vue +22 -17
  46. package/src/components/index.ts +1 -0
  47. package/src/index.ts +1 -0
  48. package/src/typings/form.d.ts +2 -2
  49. package/src/typings/option.d.ts +2 -2
  50. package/src/utils/excel-preview.ts +188 -0
  51. package/src/utils/file-upload.ts +0 -2
  52. package/src/utils/form-excel.ts +132 -126
  53. package/src/utils/options.ts +80 -22
  54. package/src/utils/table.ts +15 -2
  55. package/lib/assets/modules/index-4kDAt8nS.js +0 -333
@@ -1,23 +1,23 @@
1
1
  var da = Object.defineProperty;
2
2
  var ha = (e, t, a) => t in e ? da(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
- var F = (e, t, a) => ha(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { inject as X, ref as c, provide as Te, watch as I, toRaw as Ye, h as _, nextTick as ma, shallowRef as U, defineComponent as C, reactive as va, onMounted as ye, onUnmounted as ne, createBlock as Se, createCommentVNode as q, openBlock as A, unref as b, mergeProps as re, useAttrs as be, createElementBlock as L, createVNode as ee, withCtx as H, createTextVNode as Ie, toDisplayString as B, Fragment as ae, renderList as _e, normalizeClass as Xe, createElementVNode as ga } from "vue";
5
- import { Switch as ya, AutoComplete as Sa, CheckboxGroup as ba, Checkbox as Ia, RadioGroup as xa, Radio as Aa, Select as Ea, SelectOption as Oa } from "ant-design-vue";
6
- import { createPinia as Ra, defineStore as oe } from "pinia";
7
- import Ta from "pinia-plugin-persistedstate";
8
- import { combineParams as xe, EnvConfig as me, AppAction as qe, AppSource as Be, isMicroApp as ve, mainAppApis as $, isBaseMicroApp as wa } from "@skyfox2000/microbase";
9
- import { ResStatus as R, httpPost as Q, setToken as pe, fieldMapping as Pa, parseFieldTemplate as Me, API_HOST as we, SERVER_HOST as ka } from "@skyfox2000/fapi";
3
+ var $ = (e, t, a) => ha(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { inject as ae, ref as f, provide as Pe, watch as I, toRaw as Ye, h as _, nextTick as ma, shallowRef as H, defineComponent as W, reactive as va, onMounted as Se, onUnmounted as oe, createBlock as Ie, createCommentVNode as q, openBlock as E, unref as b, mergeProps as ie, useAttrs as xe, createElementBlock as L, createVNode as B, withCtx as D, createTextVNode as Ae, toDisplayString as z, Fragment as se, renderList as _e, normalizeClass as Xe, createElementVNode as ga } from "vue";
5
+ import { Switch as ya, AutoComplete as ba, Input as Sa, CheckboxGroup as Ia, Checkbox as xa, RadioGroup as Aa, Radio as Ea, Select as Oa, SelectOption as Ra } from "ant-design-vue";
6
+ import { createPinia as Ta, defineStore as le } from "pinia";
7
+ import wa from "pinia-plugin-persistedstate";
8
+ import { combineParams as Ee, EnvConfig as ve, AppAction as qe, AppSource as Be, isMicroApp as ge, mainAppApis as M, isBaseMicroApp as Pa } from "@skyfox2000/microbase";
9
+ import { ResStatus as R, httpPost as Q, setToken as de, fieldMapping as ka, parseFieldTemplate as ye, API_HOST as ke, SERVER_HOST as La } from "@skyfox2000/fapi";
10
10
  import x from "vue-m-message";
11
- import De from "async-validator";
12
- import { createRouter as La, createWebHashHistory as Fa } from "vue-router";
11
+ import Ue from "async-validator";
12
+ import { createRouter as $a, createWebHashHistory as Fa } from "vue-router";
13
13
  import "dayjs";
14
14
  import "vue-draggable-next";
15
- const Ma = Ra();
16
- Ma.use(Ta);
15
+ const Ma = Ta();
16
+ Ma.use(wa);
17
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
18
  const T = class T {
19
19
  };
20
- F(T, "dict", {}), F(T, "Keys", {
20
+ $(T, "dict", {}), $(T, "Keys", {
21
21
  EnableDisable: "EnableDisable",
22
22
  SuccessResult: "SuccessResult",
23
23
  YesNo: "YesNo",
@@ -27,25 +27,25 @@ F(T, "dict", {}), F(T, "Keys", {
27
27
  * @param key 名称
28
28
  * @returns
29
29
  */
30
- F(T, "getOptions", (t) => T.dict[t]), /**
30
+ $(T, "getOptions", (t) => T.dict[t]), /**
31
31
  * 静态选择项对象
32
32
  * @param key 名称
33
33
  * @param value 值
34
34
  * @returns
35
35
  */
36
- F(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
36
+ $(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
37
37
  * 设置静态选择项
38
38
  * @param key 名称
39
39
  * @param list 列表
40
40
  */
41
- F(T, "setOptions", (t, a) => {
41
+ $(T, "setOptions", (t, a) => {
42
42
  T.dict[t] = a;
43
43
  }), /**
44
44
  * 启用/停用选项
45
45
  * - 启用 1
46
46
  * - 停用 0
47
47
  */
48
- F(T, "EnableDisable", [
48
+ $(T, "EnableDisable", [
49
49
  {
50
50
  label: "启用",
51
51
  text: "✅ 启用",
@@ -61,7 +61,7 @@ F(T, "EnableDisable", [
61
61
  * - 成功 1
62
62
  * - 失败 0
63
63
  */
64
- F(T, "SuccessResult", [
64
+ $(T, "SuccessResult", [
65
65
  {
66
66
  label: "成功",
67
67
  text: "✅ 成功",
@@ -77,7 +77,7 @@ F(T, "SuccessResult", [
77
77
  * - 是 1
78
78
  * - 否 0
79
79
  */
80
- F(T, "YesNo", [
80
+ $(T, "YesNo", [
81
81
  {
82
82
  label: "是",
83
83
  text: "✅ 是",
@@ -93,7 +93,7 @@ F(T, "YesNo", [
93
93
  * - 男 M
94
94
  * - 女 F
95
95
  */
96
- F(T, "MaleFemale", [
96
+ $(T, "MaleFemale", [
97
97
  {
98
98
  label: "男",
99
99
  text: "男 👨",
@@ -105,12 +105,12 @@ F(T, "MaleFemale", [
105
105
  value: "F"
106
106
  }
107
107
  ]);
108
- let M = T;
109
- M.setOptions("EnableDisable", M.EnableDisable);
110
- M.setOptions("SuccessResult", M.SuccessResult);
111
- M.setOptions("YesNo", M.YesNo);
112
- M.setOptions("MaleFemale", M.MaleFemale);
113
- const ie = {
108
+ let F = T;
109
+ F.setOptions("EnableDisable", F.EnableDisable);
110
+ F.setOptions("SuccessResult", F.SuccessResult);
111
+ F.setOptions("YesNo", F.YesNo);
112
+ F.setOptions("MaleFemale", F.MaleFemale);
113
+ const ue = {
114
114
  /**
115
115
  * 选项数据接口
116
116
  */
@@ -141,8 +141,8 @@ const ie = {
141
141
  },
142
142
  /**
143
143
  * 输出字段转换控制
144
- * - Key:目的字段
145
- * - Value:源字段,支持模板 ${}
144
+ * - Key:目的字段,支持 "." 嵌套
145
+ * - Value:源字段,支持模板 ${} 或者 ${index} 或者 ${index}.${key}
146
146
  */
147
147
  outFields: {
148
148
  type: Object,
@@ -173,7 +173,7 @@ const ie = {
173
173
  type: Object,
174
174
  required: !1
175
175
  }
176
- }, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ae = (e, t) => {
176
+ }, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Oe = (e, t) => {
177
177
  var n;
178
178
  return {
179
179
  url: "",
@@ -182,7 +182,7 @@ const ie = {
182
182
  ...t.url,
183
183
  loadingText: t.loadingText
184
184
  };
185
- }, Ee = (e, t) => {
185
+ }, Re = (e, t) => {
186
186
  const a = e.page, s = t.url;
187
187
  if (!s || !s.url) {
188
188
  const o = `URL未设置: ${t.urlKey}`;
@@ -191,11 +191,11 @@ const ie = {
191
191
  s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
192
192
  let n = JSON.parse(JSON.stringify(t.params));
193
193
  return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), Q(s, n).then((o) => (t.loadingState && (t.loadingState.value = !1), o)).catch((o) => (t.loadingState && (t.loadingState.value = !1), null));
194
- }, Ue = (e, t) => {
194
+ }, De = (e, t) => {
195
195
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
196
- const a = Ae(e, t);
197
- return t.url = a, Ee(e, t);
198
- }, Pt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Ae(e, t), Ee(e, t).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && (t.hideErrorToast || x.success("执行成功!")), a))), Ze = (e, t = {}) => {
196
+ const a = Oe(e, t);
197
+ return t.url = a, Re(e, t);
198
+ }, kt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Oe(e, t), Re(e, t).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && (t.hideErrorToast || x.success("执行成功!")), a))), Ze = (e, t = {}) => {
199
199
  const a = t.primaryKey || "Id";
200
200
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
201
201
  return x.error("错误!无保存数据!"), Promise.resolve(null);
@@ -205,9 +205,9 @@ const ie = {
205
205
  loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
206
206
  };
207
207
  s.params.Query[a] = s.params.Data[a];
208
- const n = Ae(e, s);
209
- return s.url = n, Ee(e, s).then((o) => ((o == null ? void 0 : o.status) === R.SUCCESS && (t.hideErrorToast || x.success("保存成功!")), o));
210
- }, $a = (e, t, a = {}) => {
208
+ const n = Oe(e, s);
209
+ return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === R.SUCCESS && (t.hideErrorToast || x.success("保存成功!")), o));
210
+ }, Na = (e, t, a = {}) => {
211
211
  const s = a.primaryKey || "Id";
212
212
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
213
213
  const n = {
@@ -217,18 +217,18 @@ const ie = {
217
217
  };
218
218
  if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], P(n.params.Query) || P(n.params.Query[s]))
219
219
  return x.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
220
- const o = Ae(e, n);
221
- return n.url = o, Ee(e, n).then((r) => ((r == null ? void 0 : r.status) === R.SUCCESS && (a.hideErrorToast || x.success("删除成功!")), r));
222
- }, Na = (e, t) => Ue(e, {
220
+ const o = Oe(e, n);
221
+ return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === R.SUCCESS && (a.hideErrorToast || x.success("删除成功!")), r));
222
+ }, _a = (e, t) => De(e, {
223
223
  urlKey: "tree",
224
224
  params: {},
225
225
  loadingState: e.isTreeLoading,
226
226
  loadingText: !1,
227
- processParams: () => xe(e.treeQuery, t)
227
+ processParams: () => Ee(e.treeQuery, t)
228
228
  }).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
229
- let te;
230
- const kt = (e) => {
231
- te = new De({}), te.messages({
229
+ let ne;
230
+ const Lt = (e) => {
231
+ ne = new Ue({}), ne.messages({
232
232
  required: "${label}不能为空",
233
233
  types: {
234
234
  number: "${label}必须是数字"
@@ -254,39 +254,39 @@ const kt = (e) => {
254
254
  },
255
255
  ...e
256
256
  });
257
- }, Lt = (e) => {
257
+ }, $t = (e) => {
258
258
  if (!e || P(e))
259
259
  return [];
260
- const t = [], a = te.messages(), s = (o, r, l) => {
260
+ const t = [], a = ne.messages(), s = (o, r, l) => {
261
261
  const i = r.type;
262
262
  if (i && a.types && i in a.types) {
263
- const f = a.types[i];
264
- n(f, o, { type: i }, l);
263
+ const c = a.types[i];
264
+ n(c, o, { type: i }, l);
265
265
  }
266
266
  const u = ["string", "number", "array"];
267
- for (const f of u)
268
- if (i === f && a[f]) {
269
- const p = a[f], m = ["len", "min", "max", "range"];
267
+ for (const c of u)
268
+ if (i === c && a[c]) {
269
+ const p = a[c], m = ["len", "min", "max", "range"];
270
270
  for (const d of m)
271
271
  d === "range" && r.min != null && r.max != null && p.range ? n(p.range, o, { min: r.min, max: r.max }, l) : d !== "range" && r[d] != null && p[d] && n(p[d], o, { [d]: r[d] }, l);
272
272
  }
273
273
  if (r.required && a.required && n(a.required, o, {}, l), r.pattern && a.pattern && n(r.message, o, {}, l), r.enum && Array.isArray(r.enum) && a.enum) {
274
- const f = r.enum.join(", ");
275
- n(a.enum, o, { enum: f }, l);
274
+ const c = r.enum.join(", ");
275
+ n(a.enum, o, { enum: c }, l);
276
276
  }
277
277
  }, n = (o, r, l, i) => {
278
278
  if (o)
279
279
  try {
280
280
  let u;
281
281
  if (typeof o == "function") {
282
- const f = [r];
282
+ const c = [r];
283
283
  for (const p in l)
284
- f.push(l[p]);
285
- u = o.apply(null, f), u && i.push(u);
284
+ c.push(l[p]);
285
+ u = o.apply(null, c), u && i.push(u);
286
286
  } else {
287
287
  u = String(o);
288
- for (const f in l)
289
- u = u.replace(new RegExp(`\\$\\{${f}\\}`, "g"), l[f]);
288
+ for (const c in l)
289
+ u = u.replace(new RegExp(`\\$\\{${c}\\}`, "g"), l[c]);
290
290
  u = u.replace(/\$\{label\}/g, ""), u && i.push(u);
291
291
  }
292
292
  } catch (u) {
@@ -308,23 +308,23 @@ const kt = (e) => {
308
308
  rules: i
309
309
  });
310
310
  }), t;
311
- }, le = async (e) => {
311
+ }, ce = async (e) => {
312
312
  const t = e.formData.value, a = e.formRules.value;
313
- P(a) || (Ve(e), e.ruleValidator || (e.ruleValidator = new De({}), e.ruleValidator.messages(te.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
313
+ P(a) || (He(e), e.ruleValidator || (e.ruleValidator = new Ue({}), e.ruleValidator.messages(ne.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
314
314
  }).catch(({ fields: s }) => s));
315
- }, Ft = async (e, t, a) => (a || (a = new De({}), a.messages(te.messages()), a.define(t)), a.validate(e).then(() => {
316
- }).catch(({ fields: s }) => s)), Ve = (e) => {
315
+ }, Ft = async (e, t, a) => (a || (a = new Ue({}), a.messages(ne.messages()), a.define(t)), a.validate(e).then(() => {
316
+ }).catch(({ fields: s }) => s)), He = (e) => {
317
317
  e.ruleResults.value = void 0;
318
- }, z = () => {
319
- const e = X(N.EditorControl, void 0), t = c(X(N.LabelText, "")), a = c(X(N.RuleKey, "")), s = X(N.ErrInfo, void 0);
318
+ }, C = () => {
319
+ const e = ae(N.EditorControl, void 0), t = f(ae(N.LabelText, "")), a = f(ae(N.RuleKey, "")), s = ae(N.ErrInfo, void 0);
320
320
  return {
321
321
  editorCtrl: e,
322
322
  labelText: t,
323
323
  ruleKey: a,
324
324
  errInfo: s
325
325
  };
326
- }, _a = (e, t) => {
327
- let a = c({
326
+ }, Ua = (e, t) => {
327
+ let a = f({
328
328
  msg: "",
329
329
  errClass: ""
330
330
  });
@@ -349,7 +349,7 @@ const kt = (e) => {
349
349
  { deep: !0 }
350
350
  ), a;
351
351
  }, Da = (e, t, a) => {
352
- const s = c([]), n = c(""), o = c("");
352
+ const s = f([]), n = f(""), o = f("");
353
353
  if (!e.rule || !t || !a)
354
354
  return { msg: n, ruleErrors: s, errClass: o };
355
355
  e.rule.split("|").forEach((i) => {
@@ -358,8 +358,8 @@ const kt = (e) => {
358
358
  s.value.push(...a[i]);
359
359
  else {
360
360
  const u = [];
361
- for (let f in a)
362
- f !== i && f.startsWith(i + ".") && u.push(...a[f]);
361
+ for (let c in a)
362
+ c !== i && c.startsWith(i + ".") && u.push(...a[c]);
363
363
  u.length > 0 && s.value.push(...u);
364
364
  }
365
365
  });
@@ -368,30 +368,30 @@ const kt = (e) => {
368
368
  n.value && (n.value += " / "), n.value += i.message.replace("${label}", e.label ?? "");
369
369
  const u = t[i.field];
370
370
  if (u) {
371
- const f = n.value.match(l);
372
- f && f.forEach((p) => {
371
+ const c = n.value.match(l);
372
+ c && c.forEach((p) => {
373
373
  const m = p.replace("${", "").replace("}", "");
374
374
  n.value = n.value.replace(p, u[m] ?? "");
375
375
  });
376
376
  }
377
377
  }), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
378
378
  }, Mt = (e, t) => {
379
- Te(N.LabelText, e.label || ""), Te(N.RuleKey, e.rule || "");
380
- const a = _a(e, t);
381
- return Te(N.ErrInfo, a), a;
382
- }, $t = (e) => {
383
- ea(e);
379
+ Pe(N.LabelText, e.label || ""), Pe(N.RuleKey, e.rule || "");
380
+ const a = Ua(e, t);
381
+ return Pe(N.ErrInfo, a), a;
384
382
  }, Nt = (e) => {
383
+ ea(e);
384
+ }, _t = (e) => {
385
385
  const t = e.page, a = e.formData.value;
386
386
  a[e.primaryKey ?? t.primaryKey] = null, ea(e);
387
- }, _t = (e) => {
388
- He(e), e.visible.value = !1;
387
+ }, Ut = (e) => {
388
+ Ve(e), e.visible.value = !1;
389
389
  }, ea = async (e) => {
390
390
  var s;
391
391
  const t = e.page;
392
- if (e.isFormSaving.value = !0, Ve(e), e.beforeSave && e.beforeSave() === !1)
392
+ if (e.isFormSaving.value = !0, He(e), e.beforeSave && e.beforeSave() === !1)
393
393
  return e.isFormSaving.value = !1, Promise.resolve();
394
- if (e.formRules.value && await le(e), e.ruleResults.value)
394
+ if (e.formRules.value && await ce(e), e.ruleResults.value)
395
395
  return x.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
396
396
  const a = e.formData.value;
397
397
  return Ze(
@@ -418,11 +418,11 @@ const kt = (e) => {
418
418
  else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
419
419
  const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
420
420
  if (l && l.length > 2 && l[1] && l[2]) {
421
- const i = l[1], u = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
422
- if (f && u.length > 0) {
421
+ const i = l[1], u = l[2].replace(/Idx_/g, "").split("_"), c = e.formRules.value;
422
+ if (c && u.length > 0) {
423
423
  const p = {};
424
424
  u.forEach((m) => {
425
- f[m] && (p[m] = [
425
+ c[m] && (p[m] = [
426
426
  {
427
427
  field: m,
428
428
  fieldValue: i,
@@ -443,28 +443,28 @@ const kt = (e) => {
443
443
  return ia(a, { [n]: s[n] }, e.detailUrl).then((o) => {
444
444
  e.isFormLoading.value = !1, o && aa(e, o);
445
445
  });
446
- }, Ut = (e) => {
446
+ }, Ht = (e) => {
447
447
  const t = e.grid;
448
- t && (t.rowData.value = void 0), e && (He(e), e.visible && (e.visible.value = !1), setTimeout(() => {
448
+ t && (t.rowData.value = void 0), e && (Ve(e), e.visible && (e.visible.value = !1), setTimeout(() => {
449
449
  e.visible.value = !0;
450
450
  }, 1));
451
451
  }, aa = (e, t) => {
452
- He(e);
452
+ Ve(e);
453
453
  const a = { ...e.formData.value, ...t };
454
454
  e.formData.value = JSON.parse(JSON.stringify(a));
455
- }, He = (e) => {
456
- e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Ve(e);
457
- }, ge = "/login/", he = [], Ua = (e) => {
455
+ }, Ve = (e) => {
456
+ e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, He(e);
457
+ }, be = "/login/", me = [], Ha = (e) => {
458
458
  for (const t of e) {
459
- const a = he.findIndex((s) => s.path === t.path);
460
- a !== -1 && he.splice(a, 1), he.push(t), se.addRoute(t);
459
+ const a = me.findIndex((s) => s.path === t.path);
460
+ a !== -1 && me.splice(a, 1), me.push(t), re.addRoute(t);
461
461
  }
462
462
  }, ta = (e, t, a, s = "") => {
463
463
  const n = s + (s ? "/" : "") + e.path;
464
464
  t[n] = { ...e, parent: a }, e.children && e.children.forEach((o) => ta(o, t, e, n));
465
- }, se = La({
465
+ }, re = $a({
466
466
  history: Fa("/"),
467
- routes: he
467
+ routes: me
468
468
  }), Va = (e, t) => {
469
469
  var n, o;
470
470
  const a = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (o = e.meta) == null ? void 0 : o.permission;
@@ -472,9 +472,9 @@ const kt = (e) => {
472
472
  return a.length === 0 && !s;
473
473
  if (t) {
474
474
  const r = K();
475
- if (me.VITE_PERMISSION_MODE === "role")
475
+ if (ve.VITE_PERMISSION_MODE === "role")
476
476
  return a.length === 0 ? !0 : r.hasRole(a);
477
- if (me.VITE_PERMISSION_MODE === "permit") {
477
+ if (ve.VITE_PERMISSION_MODE === "permit") {
478
478
  if (a.length === 0 && !s)
479
479
  return !0;
480
480
  let l = !1, i = !1;
@@ -482,17 +482,17 @@ const kt = (e) => {
482
482
  }
483
483
  }
484
484
  return !1;
485
- }, Z = c(null);
486
- se.beforeEach((e, t, a) => {
485
+ }, te = f(null);
486
+ re.beforeEach((e, t, a) => {
487
487
  var l;
488
488
  const s = e;
489
- if (e.path.startsWith("/error/") || e.path.startsWith(ge))
489
+ if (e.path.startsWith("/error/") || e.path.startsWith(be))
490
490
  return a();
491
491
  const n = s.meta, r = ((n == null ? void 0 : n.roles) ?? []).length > 0 || ((l = n == null ? void 0 : n.permission) == null ? void 0 : l.length);
492
492
  if (e.path === "/") {
493
- const i = D();
493
+ const i = U();
494
494
  if (!i.menuLoaded) {
495
- Z.value = {
495
+ te.value = {
496
496
  to: e,
497
497
  next: (u) => {
498
498
  a({ path: u });
@@ -508,33 +508,33 @@ se.beforeEach((e, t, a) => {
508
508
  else {
509
509
  const i = K();
510
510
  if (!i.isLogin)
511
- a({ path: ge });
511
+ a({ path: be });
512
512
  else {
513
- if (!D().menuLoaded) {
514
- Z.value = {
513
+ if (!U().menuLoaded) {
514
+ te.value = {
515
515
  to: e,
516
516
  next: a
517
517
  };
518
518
  return;
519
519
  }
520
- const f = Va(s, i.isLogin);
520
+ const c = Va(s, i.isLogin);
521
521
  a();
522
522
  }
523
523
  }
524
524
  });
525
- const Ha = (e) => {
526
- if (Z.value) {
527
- const { to: t, next: a } = Z.value;
528
- Z.value = null, t.path === "/" ? a(e) : a(t.path);
525
+ const Ka = (e) => {
526
+ if (te.value) {
527
+ const { to: t, next: a } = te.value;
528
+ te.value = null, t.path === "/" ? a(e) : a(t.path);
529
529
  }
530
- }, Ka = (e) => {
530
+ }, Qa = (e) => {
531
531
  const t = Ke();
532
532
  if (t.TabEnabled) {
533
- if (Qa(e.key, t.TabPanes))
533
+ if (Ja(e.key, t.TabPanes))
534
534
  return;
535
535
  t.TabPanes.push(e);
536
536
  }
537
- }, Qa = (e, t) => t.find((a) => a.key === e), Ke = oe("pageInfo", {
537
+ }, Ja = (e, t) => t.find((a) => a.key === e), Ke = le("pageInfo", {
538
538
  state: () => ({
539
539
  TabActive: "",
540
540
  TabPanes: [],
@@ -547,7 +547,7 @@ const Ha = (e) => {
547
547
  */
548
548
  removeTabPane(e) {
549
549
  if (this.TabEnabled) {
550
- D().excludeComponent(e);
550
+ U().excludeComponent(e);
551
551
  let a = 0, s = [...this.TabPanes];
552
552
  for (let n = 0; n < s.length; n++)
553
553
  if (s[n].key === e) {
@@ -568,7 +568,7 @@ const Ha = (e) => {
568
568
  * @returns
569
569
  */
570
570
  async setTabActive(e) {
571
- let a = D().findRoute(e);
571
+ let a = U().findRoute(e);
572
572
  if (!a) return;
573
573
  const s = {
574
574
  key: e,
@@ -579,24 +579,24 @@ const Ha = (e) => {
579
579
  // 默认为true
580
580
  keepAlive: !(a.meta && !a.meta.keepAlive)
581
581
  };
582
- Ka(s), this.TabActive = e;
582
+ Qa(s), this.TabActive = e;
583
583
  }
584
584
  },
585
585
  persist: !1
586
- }), Ja = {
586
+ }), ja = {
587
587
  appList: {
588
588
  api: "PLATFORM_API",
589
589
  authorize: !0,
590
590
  url: "/api/RCTenanetOpSrv/getApps",
591
591
  loadingText: !1
592
592
  }
593
- }, Pe = /* @__PURE__ */ new Map(), Ga = (e) => {
593
+ }, Le = /* @__PURE__ */ new Map(), Ga = (e) => {
594
594
  const t = K(), { roles: a, permission: s } = e.meta || {};
595
595
  if (P(a) && P(s))
596
596
  return !0;
597
- if (me.VITE_PERMISSION_MODE === "role")
597
+ if (ve.VITE_PERMISSION_MODE === "role")
598
598
  return P(a) ? !0 : t.hasRole(a);
599
- if (me.VITE_PERMISSION_MODE === "permit") {
599
+ if (ve.VITE_PERMISSION_MODE === "permit") {
600
600
  let n = !1, o = !1;
601
601
  return P(a) || (n = t.hasRole(a)), t.isAdmin() ? n : (P(s) || (o = t.hasPermit(e.path, s)), n || o);
602
602
  }
@@ -616,7 +616,7 @@ const Ha = (e) => {
616
616
  return s;
617
617
  }
618
618
  }
619
- }, D = oe("appInfo", {
619
+ }, U = le("appInfo", {
620
620
  state: () => ({
621
621
  appInfo: {
622
622
  Id: "",
@@ -650,7 +650,7 @@ const Ha = (e) => {
650
650
  });
651
651
  },
652
652
  async getRemoteAppList() {
653
- return Q(Ja.appList, {
653
+ return Q(ja.appList, {
654
654
  Query: {
655
655
  AppCode: this.appInfo.AppCode,
656
656
  Enabled: 1
@@ -689,7 +689,7 @@ const Ha = (e) => {
689
689
  flattenRoutes: {},
690
690
  Routes: t ?? [],
691
691
  defaultPage: ""
692
- }), (!ve() || !wa()) && (await K().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
692
+ }), (!ge() || !Pa()) && (await K().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
693
693
  },
694
694
  /**
695
695
  * 设置当前应用路由信息
@@ -710,12 +710,12 @@ const Ha = (e) => {
710
710
  s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
711
711
  }), K().isLogin) {
712
712
  const a = sa(this.appInfo.Routes);
713
- if (Ua(a), this.appInfo.defaultPage = na(a) || "", this.appInfo.defaultPage) {
714
- if (this.menuLoaded = !0, $.value && $.value.mainAppPush) {
713
+ if (Ha(a), this.appInfo.defaultPage = na(a) || "", this.appInfo.defaultPage) {
714
+ if (this.menuLoaded = !0, M.value && M.value.mainAppPush) {
715
715
  const s = this.formatRoute(this.appInfo.defaultPage);
716
- $.value.mainAppPush(s);
716
+ M.value.mainAppPush(s);
717
717
  }
718
- Ha(this.appInfo.defaultPage);
718
+ Ka(this.appInfo.defaultPage);
719
719
  }
720
720
  }
721
721
  },
@@ -734,9 +734,9 @@ const Ha = (e) => {
734
734
  */
735
735
  push(e) {
736
736
  this.findRoute(e) && Ke().setTabActive(e), ma(() => {
737
- if (se.push({ path: e }), $.value && $.value.mainAppPush) {
737
+ if (re.push({ path: e }), M.value && M.value.mainAppPush) {
738
738
  const a = this.formatRoute(e);
739
- $.value.mainAppPush(a);
739
+ M.value.mainAppPush(a);
740
740
  }
741
741
  });
742
742
  },
@@ -755,7 +755,7 @@ const Ha = (e) => {
755
755
  * @returns 组件实例
756
756
  */
757
757
  cacheComponent(e, t) {
758
- let a = Pe.get(t.path);
758
+ let a = Le.get(t.path);
759
759
  if (!a)
760
760
  if (this.CachedComponents.includes(t.path))
761
761
  a = {
@@ -764,7 +764,7 @@ const Ha = (e) => {
764
764
  render() {
765
765
  return _(e);
766
766
  }
767
- }, Pe.set(t.path, a);
767
+ }, Le.set(t.path, a);
768
768
  else return e;
769
769
  return a;
770
770
  },
@@ -773,7 +773,7 @@ const Ha = (e) => {
773
773
  * @param path 路由地址
774
774
  */
775
775
  excludeComponent(e) {
776
- this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Pe.delete(e);
776
+ this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Le.delete(e);
777
777
  },
778
778
  /**
779
779
  * 路由路径层级查询,返回面包屑
@@ -804,7 +804,7 @@ const Ha = (e) => {
804
804
  }, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
805
805
  },
806
806
  logout() {
807
- this.clean(), se.push({ path: ge + "#/" }), ve() && $.value && $.value.mainAppPush && $.value.mainAppPush(ge + "#/");
807
+ this.clean(), re.push({ path: be + "#/" }), ge() && M.value && M.value.mainAppPush && M.value.mainAppPush(be + "#/");
808
808
  }
809
809
  },
810
810
  persist: !1
@@ -826,7 +826,7 @@ const Ha = (e) => {
826
826
  url: "/api/LoginSrv/logout",
827
827
  loadingText: "正在退出..."
828
828
  }
829
- }, ja = (e) => {
829
+ }, qa = (e) => {
830
830
  let t = {
831
831
  Option: {
832
832
  Mode: "MicroApp"
@@ -834,40 +834,40 @@ const Ha = (e) => {
834
834
  Query: e
835
835
  };
836
836
  return Q(Qe.login, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a : null);
837
- }, qa = (e) => {
837
+ }, Ba = (e) => {
838
838
  let t = {
839
839
  Query: {
840
840
  AppId: e
841
841
  }
842
842
  };
843
843
  return Q(Qe.auth, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a.data : (x.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
844
- }, Ba = () => {
844
+ }, za = () => {
845
845
  let e = {
846
846
  Option: {},
847
847
  Query: {}
848
848
  };
849
849
  return Q(Qe.logout, e).then((t) => (t == null ? void 0 : t.status) === R.SUCCESS ? t.data : null);
850
- }, za = (e) => {
850
+ }, Ca = (e) => {
851
851
  try {
852
852
  const a = JSON.parse(atob(e.split(".")[1])).exp;
853
853
  return Date.now() / 1e3 > a;
854
854
  } catch (t) {
855
855
  return console.error(ra, t), !0;
856
856
  }
857
- }, ke = (e, t) => e == "" ? (x.error(ze, {
857
+ }, $e = (e, t) => e == "" ? (x.error(ze, {
858
858
  duration: 3e3,
859
859
  onClose: t
860
- }), !1) : za(e) ? (x.error(ze, {
860
+ }), !1) : Ca(e) ? (x.error(ze, {
861
861
  duration: 3e3,
862
862
  onClose: t
863
- }), !1) : !0, Ca = (e) => {
863
+ }), !1) : !0, Wa = (e) => {
864
864
  try {
865
865
  const t = JSON.parse(atob(e.token.split(".")[1]));
866
866
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
867
867
  } catch (t) {
868
868
  return console.error(ra, t), !1;
869
869
  }
870
- }, k = c(""), Y = c(null), K = oe("userInfo", {
870
+ }, k = f(""), Z = f(null), K = le("userInfo", {
871
871
  state: () => ({
872
872
  isLogin: !1,
873
873
  userInfo: {
@@ -885,7 +885,7 @@ const Ha = (e) => {
885
885
  * 启动时初始化用户信息
886
886
  */
887
887
  init() {
888
- ve() || (this.token ? (ke(this.token, () => this.clean()), pe(this.token), k.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
888
+ ge() || (this.token ? ($e(this.token, () => this.clean()), de(this.token), k.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
889
889
  },
890
890
  /**
891
891
  * 登录操作
@@ -893,14 +893,14 @@ const Ha = (e) => {
893
893
  * @returns
894
894
  */
895
895
  async login(e, t) {
896
- const a = await ja(e);
896
+ const a = await qa(e);
897
897
  if (a) {
898
898
  const s = a;
899
899
  if (s.errno)
900
900
  return s;
901
901
  {
902
902
  const n = a.data;
903
- if (this.token = n.token, pe(this.token), this.isLogin = !0, Ca(n))
903
+ if (this.token = n.token, de(this.token), this.isLogin = !0, Wa(n))
904
904
  this.userInfo = {
905
905
  ...this.userInfo,
906
906
  ...n.UserInfo
@@ -909,7 +909,7 @@ const Ha = (e) => {
909
909
  x.error("用户信息解析失败");
910
910
  return;
911
911
  }
912
- t && D().toDefaultApp();
912
+ t && U().toDefaultApp();
913
913
  }
914
914
  }
915
915
  },
@@ -921,11 +921,11 @@ const Ha = (e) => {
921
921
  async getRolePermits(e) {
922
922
  if (!this.isLogin || !this.token)
923
923
  return !1;
924
- if (Y.value && Y.value.appId === e)
924
+ if (Z.value && Z.value.appId === e)
925
925
  return !0;
926
926
  try {
927
- const t = await qa(e);
928
- return t ? (Y.value = {
927
+ const t = await Ba(e);
928
+ return t ? (Z.value = {
929
929
  appId: e,
930
930
  permits: t.permits || [],
931
931
  lastTime: t.lastTime
@@ -950,7 +950,7 @@ const Ha = (e) => {
950
950
  */
951
951
  hasPermit(e, t) {
952
952
  var s;
953
- const a = Y.value;
953
+ const a = Z.value;
954
954
  return !a || !a.permits ? !1 : ((s = a.permits[e]) == null ? void 0 : s.includes(t)) ?? !1;
955
955
  },
956
956
  /**
@@ -967,21 +967,21 @@ const Ha = (e) => {
967
967
  * @param token 用户Token
968
968
  */
969
969
  setUserInfo(e, t) {
970
- if (!ke(t)) {
970
+ if (!$e(t)) {
971
971
  this.clean();
972
972
  return;
973
973
  }
974
974
  k.value || (k.value = e.UserLevel, this.userInfo = {
975
975
  ...this.userInfo,
976
976
  ...e
977
- }, this.token = t, pe(this.token), this.isLogin = !0);
977
+ }, this.token = t, de(this.token), this.isLogin = !0);
978
978
  },
979
979
  /**
980
980
  * 获取用户Token
981
981
  * @returns 用户Token
982
982
  */
983
983
  getToken() {
984
- return ke(this.token, () => {
984
+ return $e(this.token, () => {
985
985
  this.clean(), this.logout();
986
986
  }) ? this.token : "";
987
987
  },
@@ -1014,7 +1014,7 @@ const Ha = (e) => {
1014
1014
  Code: "",
1015
1015
  TenantId: "",
1016
1016
  UserLevel: ""
1017
- }, this.token = "", pe(this.token), this.isLogin = !1, Y.value = null, k.value = "", D().clean(), Promise.resolve();
1017
+ }, this.token = "", de(this.token), this.isLogin = !1, Z.value = null, k.value = "", U().clean(), Promise.resolve();
1018
1018
  },
1019
1019
  /**
1020
1020
  * 登出操作
@@ -1022,20 +1022,20 @@ const Ha = (e) => {
1022
1022
  */
1023
1023
  async logout() {
1024
1024
  try {
1025
- await Ba();
1025
+ await za();
1026
1026
  } catch (e) {
1027
1027
  console.error("调用登出接口失败", e);
1028
1028
  } finally {
1029
1029
  await this.clean(), setTimeout(async () => {
1030
1030
  x.success("已退出登录");
1031
1031
  }, 1e3), setTimeout(async () => {
1032
- D().logout();
1032
+ U().logout();
1033
1033
  }, 2e3);
1034
1034
  }
1035
1035
  return Promise.resolve();
1036
1036
  }
1037
1037
  },
1038
- persist: ve() ? !1 : {
1038
+ persist: ge() ? !1 : {
1039
1039
  key: "MICROAPP_USER_INFO",
1040
1040
  storage: localStorage,
1041
1041
  pick: ["token", "userInfo"],
@@ -1046,18 +1046,16 @@ const Ha = (e) => {
1046
1046
  }
1047
1047
  }), Vt = (e, t) => {
1048
1048
  const a = K();
1049
- return e.filter((s) => {
1050
- if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(se.currentRoute.value.path, s.permit))
1051
- return !1;
1049
+ return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(re.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
1052
1050
  if (!t) {
1053
- if (s.visible === !1)
1051
+ if (n.visible === !1)
1054
1052
  return !1;
1055
- if (typeof s.visible == "function")
1056
- return s.visible();
1053
+ if (typeof n.visible == "function")
1054
+ return n.visible();
1057
1055
  }
1058
1056
  return !0;
1059
1057
  });
1060
- }, Ht = (e, t) => {
1058
+ }, Kt = (e, t) => {
1061
1059
  const a = t == null ? void 0 : t.filter((s) => {
1062
1060
  const n = e.find(
1063
1061
  (o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
@@ -1065,17 +1063,17 @@ const Ha = (e) => {
1065
1063
  return n ? { ...s, ...n } : !1;
1066
1064
  });
1067
1065
  return [...a || [], ...e.filter((s) => !(a != null && a.includes(s)))];
1068
- }, Wa = (e) => (e.remotePage = !1, oa(e).then((t) => t.rows)), oa = (e) => {
1066
+ }, Ya = (e) => (e.remotePage = !1, oa(e).then((t) => t.rows)), oa = (e) => {
1069
1067
  e.gridQuery || (e.gridQuery = {});
1070
1068
  const t = e.remotePage ? "find" : "list";
1071
- return Ue(e, {
1069
+ return De(e, {
1072
1070
  urlKey: t,
1073
1071
  url: e.gridUrl,
1074
1072
  params: e.gridQuery,
1075
1073
  loadingState: e.isGridLoading,
1076
1074
  processParams: (a) => {
1077
1075
  var n;
1078
- return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), xe((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1076
+ return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Ee((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1079
1077
  }
1080
1078
  }).then((a) => {
1081
1079
  if ((a == null ? void 0 : a.status) === R.SUCCESS) {
@@ -1090,7 +1088,7 @@ const Ha = (e) => {
1090
1088
  rows: []
1091
1089
  };
1092
1090
  });
1093
- }, Ya = (e, t, a = {}) => Ze(e, {
1091
+ }, Xa = (e, t, a = {}) => Ze(e, {
1094
1092
  urlKey: "update",
1095
1093
  url: e.updateUrl,
1096
1094
  params: {
@@ -1101,37 +1099,37 @@ const Ha = (e) => {
1101
1099
  ...a
1102
1100
  }).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && setTimeout(() => {
1103
1101
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1104
- }, 50), s)), Kt = (e, t) => {
1102
+ }, 50), s)), Qt = (e, t) => {
1105
1103
  const a = {};
1106
- return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Ya(e, a, {
1104
+ return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Xa(e, a, {
1107
1105
  loadingText: !1,
1108
1106
  hideErrorToast: !0
1109
1107
  });
1110
- }, ia = async (e, t, a) => await Ue(e, {
1108
+ }, ia = async (e, t, a) => await De(e, {
1111
1109
  urlKey: "detail",
1112
1110
  url: a,
1113
1111
  params: t,
1114
1112
  loadingState: e.isGridLoading
1115
- }), Qt = (e, t) => {
1113
+ }), Jt = (e, t) => {
1116
1114
  const a = t;
1117
1115
  return ia(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1118
- }, Jt = (e, t) => {
1116
+ }, jt = (e, t) => {
1119
1117
  let a = e.editor;
1120
1118
  e.rowData.value = t, a && (aa(a, t), a.visible.value = !0);
1121
- }, Gt = (e, t) => $a(e, t, {
1119
+ }, Gt = (e, t) => Na(e, t, {
1122
1120
  url: e.deleteUrl,
1123
1121
  primaryKey: e.primaryKey
1124
1122
  }).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && setTimeout(() => {
1125
1123
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1126
1124
  }, 50), a));
1127
- var $e = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))($e || {});
1128
- class Xa {
1125
+ var Me = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(Me || {});
1126
+ class Za {
1129
1127
  constructor() {
1130
- F(this, "listeners", {});
1128
+ $(this, "listeners", {});
1131
1129
  }
1132
1130
  // 检查事件名是否符合前缀
1133
1131
  isValidPrefix(t) {
1134
- return Object.values($e).some((a) => t.startsWith(a + "."));
1132
+ return Object.values(Me).some((a) => t.startsWith(a + "."));
1135
1133
  }
1136
1134
  /**
1137
1135
  * 事件订阅
@@ -1140,7 +1138,7 @@ class Xa {
1140
1138
  */
1141
1139
  on(t, a) {
1142
1140
  if (!this.isValidPrefix(t)) {
1143
- console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values($e).join(", ")} 开头`);
1141
+ console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Me).join(", ")} 开头`);
1144
1142
  return;
1145
1143
  }
1146
1144
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
@@ -1171,12 +1169,12 @@ class Xa {
1171
1169
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1172
1170
  }
1173
1171
  }
1174
- const j = new Xa(), W = (e, t, a) => {
1172
+ const G = new Za(), Y = (e, t, a) => {
1175
1173
  if (t.inputFactory && (a != null && a.reloadEvent)) {
1176
1174
  const s = t.inputFactory.value;
1177
1175
  s.reloadHandler = (n, o) => {
1178
- Za(t.url, t, o);
1179
- }, j.on(a.reloadEvent, s.reloadHandler);
1176
+ et(t.url, t, o);
1177
+ }, G.on(a.reloadEvent, s.reloadHandler);
1180
1178
  }
1181
1179
  if (a != null && a.data)
1182
1180
  I(
@@ -1189,7 +1187,7 @@ const j = new Xa(), W = (e, t, a) => {
1189
1187
  else if (t.url && t.url.url)
1190
1188
  e && la(t.url, t, t.params ?? {});
1191
1189
  else {
1192
- const s = c(X(N.LabelText, ""));
1190
+ const s = f(ae(N.LabelText, ""));
1193
1191
  x.error("`" + s.value + "` 未配置选项数据!", {
1194
1192
  duration: 5e3
1195
1193
  });
@@ -1199,23 +1197,23 @@ const j = new Xa(), W = (e, t, a) => {
1199
1197
  const s = {
1200
1198
  ...e.fieldMap
1201
1199
  };
1202
- t = Pa(s, t);
1200
+ t = ka(s, t);
1203
1201
  }
1204
1202
  t = JSON.parse(JSON.stringify(t ?? [])), e.all && t.unshift({
1205
1203
  label: "全部",
1206
1204
  value: e.allValue ?? void 0
1207
1205
  }), e.options.value = t;
1208
- }, Za = (e, t, a) => {
1206
+ }, et = (e, t, a) => {
1209
1207
  Array.isArray(a) ? Je(t, a, !0) : la(e, t, a);
1210
- }, ue = (e, t) => {
1208
+ }, fe = (e, t) => {
1211
1209
  var a;
1212
- (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && j.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1210
+ (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && G.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1213
1211
  }, la = (e, t, a) => {
1214
- const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = xe(s, n, a);
1215
- et(e, t, t.fieldMap, o).then((r) => {
1212
+ const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = Ee(s, n, a);
1213
+ at(e, t, t.fieldMap, o).then((r) => {
1216
1214
  Je(t, r, !1);
1217
1215
  });
1218
- }, et = (e, t, a, s) => {
1216
+ }, at = (e, t, a, s) => {
1219
1217
  const { fieldMap: n, ...o } = e, l = {
1220
1218
  ...{
1221
1219
  url: "",
@@ -1230,10 +1228,27 @@ const j = new Xa(), W = (e, t, a) => {
1230
1228
  return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), t.optionQuery = s, t.isOptionLoading.value = !0, Q(l, s).then((i) => (i == null ? void 0 : i.status) === R.SUCCESS && i.data ? i.data : []).finally(() => {
1231
1229
  t.isOptionLoading.value = !1;
1232
1230
  });
1233
- }, at = (e, t) => {
1234
- if (e !== void 0)
1235
- return Array.isArray(e) ? t.filter((a) => e.includes(a.value)) : t.find((a) => a.value === e);
1236
- }, Le = (e, t, a) => {
1231
+ }, tt = (e, t, a) => {
1232
+ if (e === void 0) return;
1233
+ const s = (o) => {
1234
+ const r = { ...o };
1235
+ return a && o.children && o.children.length > 0 ? r.children = o.children.map((l) => s(l)) : delete r.children, r;
1236
+ }, n = (o, r) => {
1237
+ const l = [];
1238
+ for (const i of r)
1239
+ if (o.includes(i.value) && l.push(s(i)), i.children && i.children.length > 0) {
1240
+ const u = n(o, i.children);
1241
+ l.push(...u);
1242
+ }
1243
+ return l;
1244
+ };
1245
+ if (Array.isArray(e))
1246
+ return n(e, t);
1247
+ {
1248
+ const o = n([e], t);
1249
+ return o.length > 0 ? o[0] : void 0;
1250
+ }
1251
+ }, Te = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], ee = (e, t, a) => {
1237
1252
  const s = t.split(".");
1238
1253
  let n = e;
1239
1254
  for (let o = 0; o < s.length - 1; o++) {
@@ -1244,51 +1259,66 @@ const j = new Xa(), W = (e, t, a) => {
1244
1259
  }, ua = (e, t, a) => {
1245
1260
  if (a == null) {
1246
1261
  Object.entries(t).forEach(([s]) => {
1247
- Le(e, s, a);
1262
+ ee(e, s, a);
1248
1263
  });
1249
1264
  return;
1250
1265
  }
1251
- Array.isArray(a) || Object.entries(t).forEach(([s, n]) => {
1266
+ Array.isArray(a) ? Object.entries(t).forEach(([s, n]) => {
1267
+ var r;
1268
+ if (/^\$\{\d+\}/.test(n))
1269
+ try {
1270
+ const l = parseInt(((r = n.match(/\$\{(\d+)\}/)) == null ? void 0 : r[1]) ?? "0"), i = a[l], u = n.replace(/\$\{\d+\}\./, "");
1271
+ if (u && i) {
1272
+ const c = ye(u, i);
1273
+ ee(e, s, c);
1274
+ } else
1275
+ ee(e, s, i);
1276
+ } catch {
1277
+ console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
1278
+ }
1279
+ else
1280
+ console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
1281
+ }) : Object.entries(t).forEach(([s, n]) => {
1252
1282
  if (n.includes("${")) {
1253
- const o = Me(n, a);
1254
- Le(e, s, o);
1283
+ const o = ye(n, a);
1284
+ ee(e, s, o);
1255
1285
  } else
1256
- Le(e, s, a[n]);
1286
+ ee(e, s, a[n]);
1257
1287
  });
1258
- }, Oe = (e, t, a) => {
1288
+ }, we = (e, t, a) => {
1259
1289
  var o, r;
1260
1290
  const s = (o = e.inputFactory) == null ? void 0 : o.value;
1261
- s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && le(s.editorCtrl), e.selected.value = a;
1262
- const n = at(a, e.options.value);
1291
+ s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && ce(s.editorCtrl), e.selected.value = a;
1292
+ const n = tt(a, e.options.value);
1263
1293
  if (e.selectedOptions.value = n, t.formData && t.outFields && ua(t.formData, t.outFields, n), t.changeEvent) {
1264
1294
  const [l, i] = t.changeEvent;
1265
1295
  if (i)
1266
1296
  if (Array.isArray(l))
1267
1297
  l.every((u) => {
1268
- const f = Me(i, { selectedValues: a });
1298
+ const c = ye(i, { selectedValues: a });
1269
1299
  try {
1270
- const p = JSON.parse(f);
1271
- j.emit(u, p, a, n);
1300
+ const p = JSON.parse(c);
1301
+ G.emit(u, p, a, n);
1272
1302
  } catch (p) {
1273
- console.error("eventParamsValue: ", f, p);
1303
+ console.error("eventParamsValue: ", c, p);
1274
1304
  }
1275
1305
  });
1276
1306
  else {
1277
- const u = Me(i, { selectedValues: a });
1307
+ const u = ye(i, { selectedValues: a });
1278
1308
  try {
1279
- const f = JSON.parse(u);
1280
- j.emit(l, f, a, n);
1281
- } catch (f) {
1282
- console.error("eventParamsValue: ", u, f);
1309
+ const c = JSON.parse(u);
1310
+ G.emit(l, c, a, n);
1311
+ } catch (c) {
1312
+ console.error("eventParamsValue: ", u, c);
1283
1313
  }
1284
1314
  }
1285
1315
  else
1286
1316
  Array.isArray(l) ? l.every((u) => {
1287
- j.emit(u, n, a);
1288
- }) : j.emit(l, n, a);
1317
+ G.emit(u, n, a);
1318
+ }) : G.emit(l, n, a);
1289
1319
  }
1290
1320
  return s != null && s.inputEmit && s.inputEmit("change", a, n), n;
1291
- }, Re = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], y = {
1321
+ }, y = {
1292
1322
  PageOption: {
1293
1323
  primaryKey: "Id",
1294
1324
  statusKey: "Enabled"
@@ -1298,12 +1328,12 @@ const j = new Xa(), W = (e, t, a) => {
1298
1328
  primaryKey: "Id",
1299
1329
  statusKey: "Enabled",
1300
1330
  remotePage: !0,
1301
- tableSize: c("small"),
1302
- selectable: c(!1),
1303
- searchBar: c(!0),
1304
- pageSize: c(10),
1305
- rowExpand: c(!1),
1306
- buttons: c(["New"]),
1331
+ tableSize: f("small"),
1332
+ selectable: f(!1),
1333
+ searchBar: f(!0),
1334
+ pageSize: f(10),
1335
+ rowExpand: f(!1),
1336
+ buttons: f(["New"]),
1307
1337
  tools: ["Reload", "RowHeight", "TableHeadset"],
1308
1338
  operates: ["Edit", "Delete"]
1309
1339
  },
@@ -1326,7 +1356,7 @@ const j = new Xa(), W = (e, t, a) => {
1326
1356
  value: "Id"
1327
1357
  }
1328
1358
  }
1329
- }, jt = (e) => {
1359
+ }, qt = (e) => {
1330
1360
  y.PageOption = {
1331
1361
  ...y.PageOption,
1332
1362
  ...e.pageOption
@@ -1340,46 +1370,46 @@ const j = new Xa(), W = (e, t, a) => {
1340
1370
  ...y.TreeOption,
1341
1371
  ...e.treeOption
1342
1372
  };
1343
- }, tt = (e, t, a, s) => ({
1373
+ }, st = (e, t, a, s) => ({
1344
1374
  editorCtrl: {
1345
1375
  ...y.EditorOption,
1346
1376
  name: "",
1347
1377
  default: a ? JSON.parse(JSON.stringify(a)) : void 0,
1348
- visible: c(!1),
1378
+ visible: f(!1),
1349
1379
  page: t,
1350
- formData: c(a ? JSON.parse(JSON.stringify(a)) : void 0),
1351
- formRules: c(s),
1352
- ruleResults: c({}),
1353
- updateData: c(void 0),
1380
+ formData: f(a ? JSON.parse(JSON.stringify(a)) : void 0),
1381
+ formRules: f(s),
1382
+ ruleResults: f({}),
1383
+ updateData: f(void 0),
1354
1384
  saveUrl: e.urls.save,
1355
1385
  detailUrl: e.urls.detail,
1356
- isFormSaving: c(!1),
1357
- isFormLoading: c(!1)
1386
+ isFormSaving: f(!1),
1387
+ isFormLoading: f(!1)
1358
1388
  }
1359
- }), st = (e, t, a) => {
1389
+ }), nt = (e, t, a) => {
1360
1390
  const s = {
1361
1391
  ...y.GridOption,
1362
- tableSize: c(y.GridOption.tableSize.value),
1363
- selectable: c(y.GridOption.selectable.value),
1364
- searchBar: c(y.GridOption.searchBar.value),
1365
- pageSize: c(y.GridOption.pageSize.value),
1366
- rowExpand: c(y.GridOption.rowExpand.value),
1367
- buttons: c([...y.GridOption.buttons.value]),
1392
+ tableSize: f(y.GridOption.tableSize.value),
1393
+ selectable: f(y.GridOption.selectable.value),
1394
+ searchBar: f(y.GridOption.searchBar.value),
1395
+ pageSize: f(y.GridOption.pageSize.value),
1396
+ rowExpand: f(y.GridOption.rowExpand.value),
1397
+ buttons: f([...y.GridOption.buttons.value]),
1368
1398
  tools: [...y.GridOption.tools],
1369
1399
  operates: [...y.GridOption.operates],
1370
- columns: c(a || []),
1371
- reload: c(!1),
1372
- pageNo: c(1),
1373
- total: c(0),
1400
+ columns: f(a || []),
1401
+ reload: f(!1),
1402
+ pageNo: f(1),
1403
+ total: f(0),
1374
1404
  page: t,
1375
- selectKeys: c([]),
1376
- selectRows: c([]),
1377
- rowData: c(void 0),
1405
+ selectKeys: f([]),
1406
+ selectRows: f([]),
1407
+ rowData: f(void 0),
1378
1408
  gridQuery: {},
1379
- tableData: U(void 0),
1380
- expandRows: c({}),
1381
- isGridLoading: c(!1),
1382
- isGridSaving: c(!1),
1409
+ tableData: H(void 0),
1410
+ expandRows: f({}),
1411
+ isGridLoading: f(!1),
1412
+ isGridSaving: f(!1),
1383
1413
  gridUrl: e.urls.list || e.urls.find,
1384
1414
  updateUrl: e.urls.update,
1385
1415
  deleteUrl: e.urls.delete
@@ -1389,73 +1419,73 @@ const j = new Xa(), W = (e, t, a) => {
1389
1419
  (n) => {
1390
1420
  n && (setTimeout(() => {
1391
1421
  s.reload.value = !1;
1392
- }, 1), s.remotePage ? oa(s) : Wa(s));
1422
+ }, 1), s.remotePage ? oa(s) : Ya(s));
1393
1423
  }
1394
1424
  ), {
1395
1425
  gridCtrl: s
1396
1426
  };
1397
- }, qt = (e, t) => {
1427
+ }, Bt = (e, t) => {
1398
1428
  const a = {
1399
1429
  ...y.TreeOption,
1400
- reload: c(!1),
1430
+ reload: f(!1),
1401
1431
  page: t,
1402
- node: c(void 0),
1432
+ node: f(void 0),
1403
1433
  url: e.urls.tree,
1404
- data: U(void 0),
1405
- isTreeLoading: c(!1)
1434
+ data: H(void 0),
1435
+ isTreeLoading: f(!1)
1406
1436
  };
1407
1437
  return I(
1408
1438
  () => a.reload.value,
1409
1439
  (s) => {
1410
1440
  s && (setTimeout(() => {
1411
1441
  a.reload.value = !1;
1412
- }, 1), Na(a));
1442
+ }, 1), _a(a));
1413
1443
  }
1414
1444
  ), {
1415
1445
  treeCtrl: a
1416
1446
  };
1417
- }, ce = (e, t) => {
1447
+ }, pe = (e, t) => {
1418
1448
  const a = {
1419
1449
  ...y.OptionOption,
1420
1450
  url: e,
1421
- reload: c(!1),
1451
+ reload: f(!1),
1422
1452
  optionQuery: {},
1423
- data: U([]),
1424
- selected: c([]),
1425
- selectedOptions: c([]),
1426
- options: c([]),
1427
- isOptionLoading: c(!1)
1453
+ data: H([]),
1454
+ selected: f([]),
1455
+ selectedOptions: f([]),
1456
+ options: f([]),
1457
+ isOptionLoading: f(!1)
1428
1458
  };
1429
1459
  return I(
1430
1460
  () => a.reload.value,
1431
1461
  (s) => {
1432
1462
  s && (setTimeout(() => {
1433
1463
  a.reload.value = !1;
1434
- }, 1), W(!0, a, t));
1464
+ }, 1), Y(!0, a, t));
1435
1465
  }
1436
1466
  ), {
1437
1467
  optionCtrl: a
1438
1468
  };
1439
- }, Bt = (e, t, a) => {
1469
+ }, zt = (e, t, a) => {
1440
1470
  for (const r in e.urls)
1441
1471
  e.urls[r] && (e.urls[r].api || (e.urls[r].api = e.api), e.urls[r].authorize === void 0 && (e.urls[r].authorize = e.authorize));
1442
1472
  const s = {
1443
1473
  ...y.PageOption,
1444
1474
  ...e
1445
- }, { editorCtrl: n } = tt(e, s, t, a), { gridCtrl: o } = st(e, s);
1475
+ }, { editorCtrl: n } = st(e, s, t, a), { gridCtrl: o } = nt(e, s);
1446
1476
  return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
1447
1477
  pageCtrl: s,
1448
1478
  editorCtrl: n,
1449
1479
  gridCtrl: o
1450
1480
  };
1451
- }, nt = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Set(), V = c({}), zt = V, Ct = (e) => {
1481
+ }, rt = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Set(), V = f({}), Ct = V, Wt = (e) => {
1452
1482
  var n;
1453
1483
  if (!e.iconUrl) return Ne;
1454
- const t = c(!0), a = c("");
1484
+ const t = f(!0), a = f("");
1455
1485
  let s = !0;
1456
- return (n = e.icons) != null && n.length && (s = e.icons.every((o) => V.value[o] !== void 0)), (e.icon && !V.value[e.icon] || !s) && rt(e, t).then(() => {
1457
- lt(e.iconUrl, e.monoColor || !1), t.value = !0;
1458
- }), C({
1486
+ return (n = e.icons) != null && n.length && (s = e.icons.every((o) => V.value[o] !== void 0)), (e.icon && !V.value[e.icon] || !s) && ot(e, t).then(() => {
1487
+ ut(e.iconUrl, e.monoColor || !1), t.value = !0;
1488
+ }), W({
1459
1489
  props: {
1460
1490
  icon: {
1461
1491
  type: String
@@ -1482,33 +1512,33 @@ const j = new Xa(), W = (e, t, a) => {
1482
1512
  },
1483
1513
  emits: ["update:iconIndex"],
1484
1514
  setup(o, { emit: r }) {
1485
- const l = c(o.icon), i = c(0), u = () => {
1515
+ const l = f(o.icon), i = f(0), u = () => {
1486
1516
  o.icons && i.value++;
1487
1517
  };
1488
1518
  return I(
1489
1519
  () => o.iconIndex,
1490
- (f) => {
1491
- f !== void 0 && (i.value = f);
1520
+ (c) => {
1521
+ c !== void 0 && (i.value = c);
1492
1522
  },
1493
1523
  { immediate: !0 }
1494
1524
  ), I(
1495
1525
  () => i.value,
1496
- (f) => {
1497
- o.icons && (f >= o.icons.length && (i.value = 0), l.value = o.icons[i.value], de(a, l, l.value), r("update:iconIndex", i.value));
1526
+ (c) => {
1527
+ o.icons && (c >= o.icons.length && (i.value = 0), l.value = o.icons[i.value], he(a, l, l.value), r("update:iconIndex", i.value));
1498
1528
  },
1499
1529
  { immediate: !0 }
1500
1530
  ), I(
1501
1531
  () => V.value,
1502
1532
  () => {
1503
- de(a, l, l.value);
1533
+ he(a, l, l.value);
1504
1534
  },
1505
1535
  { deep: !0 }
1506
1536
  ), I(
1507
1537
  () => o.icon,
1508
- (f) => {
1509
- de(a, l, f);
1538
+ (c) => {
1539
+ he(a, l, c);
1510
1540
  }
1511
- ), de(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1541
+ ), he(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1512
1542
  },
1513
1543
  render() {
1514
1544
  if (!t.value)
@@ -1522,12 +1552,12 @@ const j = new Xa(), W = (e, t, a) => {
1522
1552
  style: {
1523
1553
  fill: "currentColor",
1524
1554
  cursor: this.$props.clickable ? "pointer" : "default",
1525
- transform: ct(this.angle, this.flip)
1555
+ transform: ft(this.angle, this.flip)
1526
1556
  }
1527
1557
  }) : _("div", { class: "w-[14px] h-[14px]" });
1528
1558
  }
1529
1559
  });
1530
- }, rt = (e, t) => {
1560
+ }, ot = (e, t) => {
1531
1561
  let a = e.iconUrl;
1532
1562
  if (!a)
1533
1563
  return console.error("图标库地址不能为空"), Promise.resolve();
@@ -1538,10 +1568,10 @@ const j = new Xa(), W = (e, t, a) => {
1538
1568
  return new Promise(async (o) => (ca(s.scriptContent), o()));
1539
1569
  t.value = !1;
1540
1570
  const n = new Promise(async (o) => {
1541
- await ot(a, e.monoColor || !1), o(), Fe.delete(a);
1571
+ await it(a, e.monoColor || !1), o(), Fe.delete(a);
1542
1572
  });
1543
1573
  return Fe.set(a, n), n;
1544
- }, ot = async (e, t) => {
1574
+ }, it = async (e, t) => {
1545
1575
  try {
1546
1576
  const a = await fetch(e);
1547
1577
  if (!a.ok) {
@@ -1554,7 +1584,7 @@ const j = new Xa(), W = (e, t, a) => {
1554
1584
  const o = s.match(n);
1555
1585
  if (o && o.length > 1) {
1556
1586
  let r = o[1];
1557
- it(e, r, t, s);
1587
+ lt(e, r, t, s);
1558
1588
  }
1559
1589
  ca(s);
1560
1590
  return;
@@ -1564,13 +1594,13 @@ const j = new Xa(), W = (e, t, a) => {
1564
1594
  }, ca = (e) => {
1565
1595
  const t = document.createElement("script");
1566
1596
  t.textContent = e, document.head.appendChild(t);
1567
- }, it = (e, t, a, s) => {
1597
+ }, lt = (e, t, a, s) => {
1568
1598
  let n = `icon_cache:${e}`;
1569
1599
  const o = {
1570
1600
  windowKey: t,
1571
1601
  monoColor: a,
1572
1602
  scriptContent: s,
1573
- expireTime: Date.now() + nt
1603
+ expireTime: Date.now() + rt
1574
1604
  // 缓存时间:7天
1575
1605
  };
1576
1606
  localStorage.setItem(n, JSON.stringify(o));
@@ -1585,14 +1615,14 @@ const j = new Xa(), W = (e, t, a) => {
1585
1615
  return console.error("解析缓存失败:", n), null;
1586
1616
  }
1587
1617
  return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
1588
- }, Wt = () => {
1618
+ }, Yt = () => {
1589
1619
  const e = Date.now();
1590
1620
  for (const t in localStorage)
1591
1621
  if (t.startsWith("icon_cache:")) {
1592
1622
  const a = localStorage.getItem(t);
1593
1623
  a && JSON.parse(a).expireTime < e && localStorage.removeItem(t);
1594
1624
  }
1595
- }, de = (e, t, a) => {
1625
+ }, he = (e, t, a) => {
1596
1626
  setTimeout(() => {
1597
1627
  t.value = a, t.value && (e.value = V.value[t.value]);
1598
1628
  }, 1);
@@ -1616,45 +1646,45 @@ const j = new Xa(), W = (e, t, a) => {
1616
1646
  fill: "currentColor"
1617
1647
  })
1618
1648
  ]
1619
- ), lt = (e, t) => {
1649
+ ), ut = (e, t) => {
1620
1650
  const a = fa(e);
1621
1651
  Object.keys(window).forEach((s) => {
1622
- s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ce.has(s) && (Ce.add(s), ut(s, t));
1652
+ s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ce.has(s) && (Ce.add(s), ct(s, t));
1623
1653
  });
1624
- }, ut = (e, t) => {
1654
+ }, ct = (e, t) => {
1625
1655
  const a = window[e], o = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
1626
1656
  for (const l of o) {
1627
- const i = l.id, u = Array.from(r).find((f) => f.id === i);
1628
- u && t && (u.innerHTML = l.innerHTML, u.querySelectorAll("*").forEach((f) => {
1629
- f.hasAttribute("fill") && f.removeAttribute("fill");
1657
+ const i = l.id, u = Array.from(r).find((c) => c.id === i);
1658
+ u && t && (u.innerHTML = l.innerHTML, u.querySelectorAll("*").forEach((c) => {
1659
+ c.hasAttribute("fill") && c.removeAttribute("fill");
1630
1660
  })), V.value[i] || (V.value[i] = _("svg", { fill: "currentColor" }, [_("use", { "xlink:href": `#${i}` })]));
1631
1661
  }
1632
- }, ct = (e, t) => {
1662
+ }, ft = (e, t) => {
1633
1663
  let a = "";
1634
1664
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1635
- }, Yt = (e, t, a, s) => {
1665
+ }, Xt = (e, t, a, s) => {
1636
1666
  pa(e, [], a, s).forEach((o) => t.push(o));
1637
1667
  }, pa = (e, t, a, s) => {
1638
- var r, l, i, u, f;
1668
+ var r, l, i, u, c;
1639
1669
  const n = [], o = K();
1640
1670
  for (const p of e) {
1641
1671
  if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (r = p.meta) == null ? void 0 : r.roles) != null && l.length && !o.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !o.hasPermit(p.meta.permission, ":page"))
1642
1672
  continue;
1643
1673
  const m = p.path.split("/");
1644
1674
  m.unshift(...t);
1645
- const d = pa(p.children || [], m, a, s), E = {
1675
+ const d = pa(p.children || [], m, a, s), A = {
1646
1676
  key: m.join("/"),
1647
1677
  label: ((u = p.name) == null ? void 0 : u.toString()) ?? "",
1648
- title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
1678
+ title: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
1649
1679
  icon: p.icon ? _(a, { ...s, icon: p.icon }) : void 0,
1650
1680
  children: d.length > 0 ? d : void 0
1651
1681
  };
1652
- (d.length > 0 || !p.children) && n.push(E);
1682
+ (d.length > 0 || !p.children) && n.push(A);
1653
1683
  }
1654
1684
  return n;
1655
- }, We = va([]), Xt = () => {
1685
+ }, We = va([]), Zt = () => {
1656
1686
  We.length = 0;
1657
- const e = D();
1687
+ const e = U();
1658
1688
  let a = Ke().TabActive;
1659
1689
  e.matchedRoutes(a).forEach((n, o) => {
1660
1690
  var l;
@@ -1665,7 +1695,7 @@ const j = new Xa(), W = (e, t, a) => {
1665
1695
  };
1666
1696
  We.push(r);
1667
1697
  });
1668
- }, ft = {
1698
+ }, pt = {
1669
1699
  host: {
1670
1700
  api: "SITEHOST_API",
1671
1701
  url: "/openapi/RCSiteHostSrv/get",
@@ -1677,7 +1707,7 @@ const j = new Xa(), W = (e, t, a) => {
1677
1707
  // 不显示错误
1678
1708
  hideErrorToast: !0
1679
1709
  }
1680
- }, Zt = oe("hostInfo", {
1710
+ }, es = le("hostInfo", {
1681
1711
  state: () => ({
1682
1712
  hostInfo: {
1683
1713
  Host: "",
@@ -1701,9 +1731,9 @@ const j = new Xa(), W = (e, t, a) => {
1701
1731
  return;
1702
1732
  }
1703
1733
  return new Promise((s) => {
1704
- we.SITEHOST_API || (we.SITEHOST_API = e);
1734
+ ke.SITEHOST_API || (ke.SITEHOST_API = e);
1705
1735
  const n = t || window.location.origin;
1706
- Q(ft.host, {
1736
+ Q(pt.host, {
1707
1737
  Query: {
1708
1738
  Host: n
1709
1739
  }
@@ -1724,9 +1754,9 @@ const j = new Xa(), W = (e, t, a) => {
1724
1754
  ...this.hostInfo,
1725
1755
  ...e
1726
1756
  }, this.hostInfo.API_HOST)
1727
- for (const t in this.hostInfo.API_HOST) we[t] = this.hostInfo.API_HOST[t];
1757
+ for (const t in this.hostInfo.API_HOST) ke[t] = this.hostInfo.API_HOST[t];
1728
1758
  if (this.hostInfo.SERVER_HOST)
1729
- for (const t in this.hostInfo.SERVER_HOST) ka[t] = this.hostInfo.SERVER_HOST[t];
1759
+ for (const t in this.hostInfo.SERVER_HOST) La[t] = this.hostInfo.SERVER_HOST[t];
1730
1760
  },
1731
1761
  getHostInfo() {
1732
1762
  return this.hostInfo;
@@ -1739,7 +1769,7 @@ const j = new Xa(), W = (e, t, a) => {
1739
1769
  // storage: localStorage,
1740
1770
  // pick: ['hostInfo'],
1741
1771
  // },
1742
- }), es = oe("settingInfo", {
1772
+ }), as = le("settingInfo", {
1743
1773
  state: () => ({
1744
1774
  fullscreen: !1,
1745
1775
  menuCollapse: !1,
@@ -1781,10 +1811,10 @@ const j = new Xa(), W = (e, t, a) => {
1781
1811
  }
1782
1812
  },
1783
1813
  persist: !1
1784
- }), as = /* @__PURE__ */ C({
1814
+ }), ts = /* @__PURE__ */ W({
1785
1815
  __name: "index",
1786
1816
  props: {
1787
- ...ie,
1817
+ ...ue,
1788
1818
  /**
1789
1819
  * 选择项数据
1790
1820
  */
@@ -1795,9 +1825,9 @@ const j = new Xa(), W = (e, t, a) => {
1795
1825
  },
1796
1826
  emits: ["change"],
1797
1827
  setup(e, { emit: t }) {
1798
- const a = e, s = z(), n = ce(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
1799
- o.inputFactory = U(s);
1800
- const r = c([]);
1828
+ const a = e, s = C(), n = pe(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
1829
+ o.inputFactory = H(s);
1830
+ const r = f([]);
1801
1831
  o && I(
1802
1832
  () => o.options.value,
1803
1833
  (p) => {
@@ -1805,20 +1835,20 @@ const j = new Xa(), W = (e, t, a) => {
1805
1835
  },
1806
1836
  { immediate: !0, deep: !0 }
1807
1837
  );
1808
- const l = t, { editorCtrl: i, errInfo: u } = z(), f = (p) => {
1809
- u != null && u.value.errClass && i && le(i), l("change", p);
1838
+ const l = t, { editorCtrl: i, errInfo: u } = C(), c = (p) => {
1839
+ u != null && u.value.errClass && i && ce(i), l("change", p);
1810
1840
  };
1811
- return ye(() => {
1841
+ return Se(() => {
1812
1842
  if (!a.data || a.data.length != 2) {
1813
1843
  console.error("Switch组件: ", a.data), x.error("Switch组件必须有且只有两个选项");
1814
1844
  return;
1815
1845
  }
1816
- o && W(o.autoload, o, a);
1817
- }), ne(() => {
1818
- o && ue(o, a);
1846
+ o && Y(o.autoload, o, a);
1847
+ }), oe(() => {
1848
+ o && fe(o, a);
1819
1849
  }), (p, m) => {
1820
1850
  var d;
1821
- return r.value.length === 2 ? (A(), Se(b(ya), re({
1851
+ return r.value.length === 2 ? (E(), Ie(b(ya), ie({
1822
1852
  key: 0,
1823
1853
  class: [
1824
1854
  ((d = b(u)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
@@ -1829,15 +1859,15 @@ const j = new Xa(), W = (e, t, a) => {
1829
1859
  checkedValue: r.value[0].value,
1830
1860
  unCheckedChildren: r.value[1].label,
1831
1861
  unCheckedValue: r.value[1].value,
1832
- onChange: f
1862
+ onChange: c
1833
1863
  }, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : q("", !0);
1834
1864
  };
1835
1865
  }
1836
- }), ts = /* @__PURE__ */ C({
1866
+ }), ss = /* @__PURE__ */ W({
1837
1867
  inheritAttrs: !1,
1838
1868
  __name: "index",
1839
1869
  props: {
1840
- ...ie,
1870
+ ...ue,
1841
1871
  value: {
1842
1872
  type: [String, Number, Array, null],
1843
1873
  default: void 0
@@ -1854,13 +1884,13 @@ const j = new Xa(), W = (e, t, a) => {
1854
1884
  },
1855
1885
  emits: ["update:value", "select", "change", "update:labels"],
1856
1886
  setup(e, { emit: t }) {
1857
- const a = e, s = be(), n = z(), o = ce(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1858
- r.inputFactory = U(n), r.fieldMap = {
1887
+ const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1888
+ r.inputFactory = H(n), r.fieldMap = {
1859
1889
  label: "Name",
1860
1890
  value: "Id",
1861
1891
  ...r == null ? void 0 : r.fieldMap
1862
1892
  };
1863
- const l = c((r == null ? void 0 : r.selected.value) || void 0);
1893
+ const l = f((r == null ? void 0 : r.selected.value) || void 0);
1864
1894
  I(
1865
1895
  () => a.value,
1866
1896
  () => {
@@ -1873,9 +1903,9 @@ const j = new Xa(), W = (e, t, a) => {
1873
1903
  a.autoClean && a.formData && a.outFields && v !== a.value && ua(a.formData, a.outFields, null);
1874
1904
  }
1875
1905
  );
1876
- const { editorCtrl: i, errInfo: u, labelText: f } = n, p = t;
1906
+ const { editorCtrl: i, errInfo: u, labelText: c } = n, p = t;
1877
1907
  n.inputEmit = p;
1878
- const m = c((r == null ? void 0 : r.options.value) || []);
1908
+ const m = f((r == null ? void 0 : r.options.value) || []);
1879
1909
  r && I(
1880
1910
  () => r.options.value,
1881
1911
  (v) => {
@@ -1890,43 +1920,48 @@ const j = new Xa(), W = (e, t, a) => {
1890
1920
  SearchField: "%" + v.trim() + "%"
1891
1921
  }
1892
1922
  };
1893
- r.params = xe(r.params, h), r && W(!0, r, a);
1894
- }, E = (v) => {
1895
- const w = Oe(r, a, v);
1923
+ r.params = Ee(r.params, h), r && Y(!0, r, a);
1924
+ }, A = (v) => {
1925
+ const w = we(r, a, v);
1896
1926
  p("update:value", v), p("select", v);
1897
- const h = Re(w);
1898
- p("update:labels", h), u != null && u.value.errClass && i && le(i);
1927
+ const h = Te(w);
1928
+ p("update:labels", h), u != null && u.value.errClass && i && ce(i);
1899
1929
  };
1900
- return ne(() => {
1901
- r && ue(r, a);
1930
+ return oe(() => {
1931
+ r && fe(r, a);
1902
1932
  }), (v, w) => {
1903
1933
  var h;
1904
- return A(), L("div", null, [
1905
- ee(b(Sa), re({
1934
+ return E(), L("div", null, [
1935
+ B(b(ba), ie({
1906
1936
  value: l.value,
1907
1937
  "onUpdate:value": w[0] || (w[0] = (S) => l.value = S),
1908
1938
  class: ["w-full", (h = b(u)) == null ? void 0 : h.errClass],
1909
1939
  options: m.value,
1910
- placeholder: "请输入并选择" + b(f),
1911
1940
  onSearch: d,
1912
- onSelect: E
1913
- }, b(s)), {
1914
- option: H(({ label: S }) => [
1915
- Ie(B(S), 1)
1941
+ onSelect: A
1942
+ }, b(s), { "allow-clear": !1 }), {
1943
+ option: D(({ label: S }) => [
1944
+ Ae(z(S), 1)
1945
+ ]),
1946
+ default: D(() => [
1947
+ B(b(Sa), {
1948
+ "allow-clear": "",
1949
+ placeholder: "请输入并选择" + b(c)
1950
+ }, null, 8, ["placeholder"])
1916
1951
  ]),
1917
1952
  _: 1
1918
- }, 16, ["value", "class", "options", "placeholder"])
1953
+ }, 16, ["value", "class", "options"])
1919
1954
  ]);
1920
1955
  };
1921
1956
  }
1922
- }), pt = { class: "min-h-[32px] pt-[5px]" }, dt = {
1957
+ }), dt = { class: "min-h-[32px] pt-[5px]" }, ht = {
1923
1958
  key: 1,
1924
1959
  class: "text-center text-gray-500"
1925
- }, ss = /* @__PURE__ */ C({
1960
+ }, ns = /* @__PURE__ */ W({
1926
1961
  inheritAttrs: !1,
1927
1962
  __name: "index",
1928
1963
  props: {
1929
- ...ie,
1964
+ ...ue,
1930
1965
  nodata: {
1931
1966
  type: String,
1932
1967
  default: ""
@@ -1943,47 +1978,47 @@ const j = new Xa(), W = (e, t, a) => {
1943
1978
  },
1944
1979
  emits: ["change", "update:labels"],
1945
1980
  setup(e, { emit: t }) {
1946
- var m, d, E;
1947
- const a = e, s = be(), n = z(), o = ce(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1948
- r.inputFactory = U(n);
1949
- const l = c({
1981
+ var m, d, A;
1982
+ const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1983
+ r.inputFactory = H(n);
1984
+ const l = f({
1950
1985
  ...r == null ? void 0 : r.url,
1951
1986
  url: ((m = r == null ? void 0 : r.url) == null ? void 0 : m.url) || "",
1952
1987
  fieldMap: (r == null ? void 0 : r.fieldMap) || ((d = r == null ? void 0 : r.url) == null ? void 0 : d.fieldMap),
1953
- params: (r == null ? void 0 : r.params) || ((E = r == null ? void 0 : r.url) == null ? void 0 : E.params),
1988
+ params: (r == null ? void 0 : r.params) || ((A = r == null ? void 0 : r.url) == null ? void 0 : A.params),
1954
1989
  loadingText: !1
1955
1990
  }), { errInfo: i } = n, u = t;
1956
1991
  n.inputEmit = u;
1957
- const f = c((r == null ? void 0 : r.options.value) || []);
1992
+ const c = f((r == null ? void 0 : r.options.value) || []);
1958
1993
  r && I(
1959
1994
  () => r.options.value,
1960
1995
  (v) => {
1961
- f.value = v || [];
1996
+ c.value = v || [];
1962
1997
  },
1963
1998
  { immediate: !0, deep: !0 }
1964
1999
  );
1965
2000
  const p = (v) => {
1966
- const h = Oe(r, a, v), S = Re(h);
2001
+ const h = we(r, a, v), S = Te(h);
1967
2002
  u("update:labels", S);
1968
2003
  };
1969
- return ye(() => {
2004
+ return Se(() => {
1970
2005
  l.value && !l.value.fieldMap && (l.value.fieldMap = {
1971
2006
  title: "Name",
1972
2007
  label: "Name",
1973
2008
  value: "Id",
1974
2009
  key: "Id"
1975
- }), r && W(r.autoload, r, a);
1976
- }), ne(() => {
1977
- r && ue(r, a);
1978
- }), (v, w) => (A(), L("div", pt, [
1979
- ee(b(ba), re({
2010
+ }), r && Y(r.autoload, r, a);
2011
+ }), oe(() => {
2012
+ r && fe(r, a);
2013
+ }), (v, w) => (E(), L("div", dt, [
2014
+ B(b(Ia), ie({
1980
2015
  onChange: p,
1981
2016
  class: "w-full mb-[-3px]"
1982
2017
  }, b(s)), {
1983
- default: H(() => [
1984
- f.value.length > 0 ? (A(!0), L(ae, { key: 0 }, _e(f.value, (h) => {
2018
+ default: D(() => [
2019
+ c.value.length > 0 ? (E(!0), L(se, { key: 0 }, _e(c.value, (h) => {
1985
2020
  var S;
1986
- return A(), Se(b(Ia), {
2021
+ return E(), Ie(b(xa), {
1987
2022
  key: h.value,
1988
2023
  value: h.value,
1989
2024
  disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
@@ -1994,25 +2029,25 @@ const j = new Xa(), W = (e, t, a) => {
1994
2029
  e.wrap ? `w-1/${a.wrap}` : ""
1995
2030
  ])
1996
2031
  }, {
1997
- default: H(() => [
1998
- Ie(B(h.label), 1)
2032
+ default: D(() => [
2033
+ Ae(z(h.label), 1)
1999
2034
  ]),
2000
2035
  _: 2
2001
2036
  }, 1032, ["value", "disabled", "class"]);
2002
- }), 128)) : e.nodata ? (A(), L("div", dt, B(e.nodata), 1)) : q("", !0)
2037
+ }), 128)) : e.nodata ? (E(), L("div", ht, z(e.nodata), 1)) : q("", !0)
2003
2038
  ]),
2004
2039
  _: 1
2005
2040
  }, 16)
2006
2041
  ]));
2007
2042
  }
2008
- }), ht = { class: "min-h-[32px] pt-1" }, mt = {
2043
+ }), mt = { class: "min-h-[32px] pt-1" }, vt = {
2009
2044
  key: 1,
2010
2045
  class: "text-center text-gray-500"
2011
- }, ns = /* @__PURE__ */ C({
2046
+ }, rs = /* @__PURE__ */ W({
2012
2047
  inheritAttrs: !1,
2013
2048
  __name: "index",
2014
2049
  props: {
2015
- ...ie,
2050
+ ...ue,
2016
2051
  value: {
2017
2052
  type: [String, Number, null, Array],
2018
2053
  default: void 0
@@ -2030,20 +2065,20 @@ const j = new Xa(), W = (e, t, a) => {
2030
2065
  },
2031
2066
  emits: ["change", "update:value", "update:labels"],
2032
2067
  setup(e, { emit: t }) {
2033
- var E, v, w;
2034
- const a = e, s = be(), n = z(), o = ce(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2035
- r.inputFactory = U(n);
2036
- const l = c({
2068
+ var A, v, w;
2069
+ const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2070
+ r.inputFactory = H(n);
2071
+ const l = f({
2037
2072
  ...r == null ? void 0 : r.url,
2038
- url: ((E = r == null ? void 0 : r.url) == null ? void 0 : E.url) || "",
2073
+ url: ((A = r == null ? void 0 : r.url) == null ? void 0 : A.url) || "",
2039
2074
  fieldMap: (r == null ? void 0 : r.fieldMap) || ((v = r == null ? void 0 : r.url) == null ? void 0 : v.fieldMap),
2040
2075
  params: (r == null ? void 0 : r.params) || ((w = r == null ? void 0 : r.url) == null ? void 0 : w.params),
2041
2076
  loadingText: !1
2042
- }), i = c(a.value), { errInfo: u } = n, f = c((r == null ? void 0 : r.options.value) || []), p = t;
2077
+ }), i = f(a.value), { errInfo: u } = n, c = f((r == null ? void 0 : r.options.value) || []), p = t;
2043
2078
  n.inputEmit = p, r && I(
2044
2079
  () => r.options.value,
2045
2080
  (h) => {
2046
- f.value = h || [];
2081
+ c.value = h || [];
2047
2082
  },
2048
2083
  { immediate: !0, deep: !0 }
2049
2084
  ), I(
@@ -2059,32 +2094,32 @@ const j = new Xa(), W = (e, t, a) => {
2059
2094
  }
2060
2095
  return h === S;
2061
2096
  }, d = (h) => {
2062
- const S = h.target.value, O = Oe(r, a, S), g = Re(O);
2097
+ const S = h.target.value, O = we(r, a, S), g = Te(O);
2063
2098
  p("update:labels", g);
2064
2099
  };
2065
- return ye(() => {
2100
+ return Se(() => {
2066
2101
  l.value && !l.value.fieldMap && (l.value.fieldMap = {
2067
2102
  label: "Name",
2068
2103
  value: "Id",
2069
2104
  key: "Id"
2070
- }), r && W(r.autoload, r, a);
2071
- }), ne(() => {
2072
- r && ue(r, a);
2073
- }), (h, S) => (A(), L("div", ht, [
2074
- ee(b(xa), re({
2105
+ }), r && Y(r.autoload, r, a);
2106
+ }), oe(() => {
2107
+ r && fe(r, a);
2108
+ }), (h, S) => (E(), L("div", mt, [
2109
+ B(b(Aa), ie({
2075
2110
  value: i.value,
2076
2111
  "onUpdate:value": S[0] || (S[0] = (O) => i.value = O),
2077
2112
  autocheck: !1,
2078
2113
  onChange: d,
2079
2114
  class: "w-full flex align-items flex-wrap mb-[-3px]"
2080
2115
  }, b(s)), {
2081
- default: H(() => [
2082
- f.value.length > 0 ? (A(!0), L(ae, { key: 0 }, _e(f.value, (O) => {
2116
+ default: D(() => [
2117
+ c.value.length > 0 ? (E(!0), L(se, { key: 0 }, _e(c.value, (O) => {
2083
2118
  var g;
2084
- return A(), L(ae, {
2119
+ return E(), L(se, {
2085
2120
  key: O.value
2086
2121
  }, [
2087
- O.visible !== !1 ? (A(), Se(b(Aa), {
2122
+ O.visible !== !1 ? (E(), Ie(b(Ea), {
2088
2123
  key: 0,
2089
2124
  checked: m(O.value, a.value),
2090
2125
  value: O.value,
@@ -2095,26 +2130,26 @@ const j = new Xa(), W = (e, t, a) => {
2095
2130
  e.wrap ? `w-1/${a.wrap}` : ""
2096
2131
  ])
2097
2132
  }, {
2098
- default: H(() => [
2099
- Ie(B(O.label), 1)
2133
+ default: D(() => [
2134
+ Ae(z(O.label), 1)
2100
2135
  ]),
2101
2136
  _: 2
2102
2137
  }, 1032, ["checked", "value", "class"])) : q("", !0)
2103
2138
  ], 64);
2104
- }), 128)) : e.nodata ? (A(), L("div", mt, B(e.nodata), 1)) : q("", !0)
2139
+ }), 128)) : e.nodata ? (E(), L("div", vt, z(e.nodata), 1)) : q("", !0)
2105
2140
  ]),
2106
2141
  _: 1
2107
2142
  }, 16, ["value"])
2108
2143
  ]));
2109
2144
  }
2110
- }), vt = {
2145
+ }), gt = {
2111
2146
  key: 0,
2112
2147
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
2113
- }, rs = /* @__PURE__ */ C({
2148
+ }, os = /* @__PURE__ */ W({
2114
2149
  inheritAttrs: !1,
2115
2150
  __name: "index",
2116
2151
  props: {
2117
- ...ie,
2152
+ ...ue,
2118
2153
  value: {
2119
2154
  type: [String, Number, Array, null],
2120
2155
  default: void 0
@@ -2134,20 +2169,20 @@ const j = new Xa(), W = (e, t, a) => {
2134
2169
  required: !1
2135
2170
  }
2136
2171
  },
2137
- emits: ["change", "update:value", "update:labels"],
2172
+ emits: ["change", "update:value", "update:label", "update:labels"],
2138
2173
  setup(e, { emit: t }) {
2139
2174
  var h, S, O;
2140
- const a = e, s = z(), { editorCtrl: n, errInfo: o, labelText: r } = s, l = ce(a.url, a), i = a.optionCtrl ?? l.optionCtrl;
2141
- i.inputFactory = U(s);
2142
- const u = be(), f = c({
2175
+ const a = e, s = C(), { editorCtrl: n, errInfo: o, labelText: r } = s, l = pe(a.url, a), i = a.optionCtrl ?? l.optionCtrl;
2176
+ i.inputFactory = H(s);
2177
+ const u = xe(), c = f({
2143
2178
  ...i == null ? void 0 : i.url,
2144
2179
  url: ((h = i == null ? void 0 : i.url) == null ? void 0 : h.url) || "",
2145
2180
  fieldMap: (i == null ? void 0 : i.fieldMap) || ((S = i == null ? void 0 : i.url) == null ? void 0 : S.fieldMap),
2146
2181
  params: (i == null ? void 0 : i.params) || ((O = i == null ? void 0 : i.url) == null ? void 0 : O.params),
2147
2182
  loadingText: !1
2148
- }), p = c(a.value), m = c(u.placeholder), d = c((i == null ? void 0 : i.selected.value) || void 0), E = t;
2149
- s.inputEmit = E;
2150
- const v = c((i == null ? void 0 : i.options.value) || []);
2183
+ }), p = f(a.value), m = f(u.placeholder), d = f((i == null ? void 0 : i.selected.value) || void 0), A = t;
2184
+ s.inputEmit = A;
2185
+ const v = f((i == null ? void 0 : i.options.value) || []);
2151
2186
  i && I(
2152
2187
  () => i.options.value,
2153
2188
  (g) => {
@@ -2156,8 +2191,8 @@ const j = new Xa(), W = (e, t, a) => {
2156
2191
  { immediate: !0, deep: !0 }
2157
2192
  );
2158
2193
  const w = (g) => {
2159
- const J = Oe(i, a, g), fe = Re(J);
2160
- d.value = g, E("update:labels", fe), E("change", g), o != null && o.value.errClass && n && le(n);
2194
+ const J = we(i, a, g), X = Te(J);
2195
+ d.value = g, A("update:labels", X), A("update:label", X.join(";")), A("change", g), o != null && o.value.errClass && n && ce(n);
2161
2196
  };
2162
2197
  return I(
2163
2198
  () => v.value,
@@ -2165,7 +2200,7 @@ const j = new Xa(), W = (e, t, a) => {
2165
2200
  g.length && P(a.value) && a.selectFirst ? d.value = g[0].value : d.value = a.value === null ? void 0 : a.value, g.length > 0 && d.value && w(d.value);
2166
2201
  }
2167
2202
  ), I(
2168
- () => f.value.loading,
2203
+ () => c.value.loading,
2169
2204
  (g) => {
2170
2205
  g ? m.value = "" : m.value || (m.value = "请选择" + r.value);
2171
2206
  },
@@ -2174,48 +2209,48 @@ const j = new Xa(), W = (e, t, a) => {
2174
2209
  () => d.value,
2175
2210
  (g) => {
2176
2211
  if (u.mode === "multiple" && P(g) && P(p.value)) {
2177
- E("update:value", p.value);
2212
+ A("update:value", p.value);
2178
2213
  return;
2179
2214
  }
2180
- E("update:value", g);
2215
+ A("update:value", g);
2181
2216
  }
2182
- ), ye(() => {
2183
- if (f.value && !f.value.fieldMap && (f.value.fieldMap = {
2217
+ ), Se(() => {
2218
+ if (c.value && !c.value.fieldMap && (c.value.fieldMap = {
2184
2219
  label: "Name",
2185
2220
  value: "Id",
2186
2221
  key: "Id"
2187
2222
  }), a.dataKey) {
2188
- const g = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
2223
+ const g = JSON.parse(JSON.stringify(F.getOptions(a.dataKey)));
2189
2224
  v.value = g;
2190
- } else i && W(i.autoload, i, a);
2191
- }), ne(() => {
2192
- i && ue(i, a);
2225
+ } else i && Y(i.autoload, i, a);
2226
+ }), oe(() => {
2227
+ i && fe(i, a);
2193
2228
  }), (g, J) => {
2194
- var fe, Ge, je;
2195
- return A(), L("div", null, [
2196
- (Ge = (fe = b(i)) == null ? void 0 : fe.url) != null && Ge.loading ? (A(), L("div", vt, [
2197
- ee(b(Ne), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2229
+ var X, je, Ge;
2230
+ return E(), L("div", null, [
2231
+ (je = (X = b(i)) == null ? void 0 : X.url) != null && je.loading ? (E(), L("div", gt, [
2232
+ B(b(Ne), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2198
2233
  J[1] || (J[1] = ga("span", null, "数据加载中...", -1))
2199
2234
  ])) : q("", !0),
2200
- ee(b(Ea), re({
2201
- class: [(je = b(o)) == null ? void 0 : je.errClass, "w-full"],
2235
+ B(b(Oa), ie({
2236
+ class: [(Ge = b(o)) == null ? void 0 : Ge.errClass, "w-full"],
2202
2237
  value: d.value,
2203
- "onUpdate:value": J[0] || (J[0] = (G) => d.value = G),
2238
+ "onUpdate:value": J[0] || (J[0] = (j) => d.value = j),
2204
2239
  "allow-clear": !0,
2205
2240
  onChange: w,
2206
2241
  placeholder: m.value,
2207
2242
  "label-in-value": !1
2208
2243
  }, b(u)), {
2209
- default: H(() => [
2210
- (A(!0), L(ae, null, _e(v.value, (G) => (A(), L(ae, {
2211
- key: G.value
2244
+ default: D(() => [
2245
+ (E(!0), L(se, null, _e(v.value, (j) => (E(), L(se, {
2246
+ key: j.value
2212
2247
  }, [
2213
- G.visible !== !1 ? (A(), Se(b(Oa), {
2248
+ j.visible !== !1 ? (E(), Ie(b(Ra), {
2214
2249
  key: 0,
2215
- value: G.value
2250
+ value: j.value
2216
2251
  }, {
2217
- default: H(() => [
2218
- Ie(B(G.label), 1)
2252
+ default: D(() => [
2253
+ Ae(z(j.label), 1)
2219
2254
  ]),
2220
2255
  _: 2
2221
2256
  }, 1032, ["value"])) : q("", !0)
@@ -2229,74 +2264,74 @@ const j = new Xa(), W = (e, t, a) => {
2229
2264
  });
2230
2265
  export {
2231
2266
  Ft as $,
2232
- ns as A,
2233
- rs as B,
2234
- Ue as C,
2235
- Ma as D,
2236
- jt as E,
2237
- tt as F,
2238
- st as G,
2239
- qt as H,
2240
- Bt as I,
2241
- at as J,
2242
- ua as K,
2243
- Oe as L,
2244
- Re as M,
2245
- zt as N,
2246
- M as O,
2267
+ ce as A,
2268
+ ns as B,
2269
+ rs as C,
2270
+ os as D,
2271
+ De as E,
2272
+ Ma as F,
2273
+ qt as G,
2274
+ st as H,
2275
+ nt as I,
2276
+ Bt as J,
2277
+ zt as K,
2278
+ tt as L,
2279
+ ua as M,
2280
+ Ct as N,
2281
+ F as O,
2247
2282
  N as P,
2248
- Wt as Q,
2249
- ut as R,
2250
- ct as S,
2251
- Yt as T,
2283
+ Yt as Q,
2284
+ ct as R,
2285
+ ft as S,
2286
+ Xt as T,
2252
2287
  We as U,
2253
- Xt as V,
2288
+ Zt as V,
2254
2289
  ea as W,
2255
2290
  Dt as X,
2256
2291
  aa as Y,
2257
- kt as Z,
2258
- as as _,
2259
- es as a,
2260
- Ve as a0,
2261
- Lt as a1,
2262
- Ht as a2,
2263
- Ya as a3,
2292
+ Lt as Z,
2293
+ ts as _,
2294
+ as as a,
2295
+ He as a0,
2296
+ $t as a1,
2297
+ Kt as a2,
2298
+ Xa as a3,
2264
2299
  ia as a4,
2265
- Qt as a5,
2266
- Pt as a6,
2300
+ Jt as a5,
2301
+ kt as a6,
2267
2302
  Ze as a7,
2268
- $a as a8,
2269
- $e as a9,
2270
- j as aa,
2271
- Z as ab,
2272
- he as ac,
2273
- D as ad,
2274
- Zt as ae,
2303
+ Na as a8,
2304
+ Me as a9,
2305
+ G as aa,
2306
+ te as ab,
2307
+ me as ac,
2308
+ U as ad,
2309
+ es as ae,
2275
2310
  Ke as af,
2276
- te as ag,
2277
- Nt as b,
2278
- Ct as c,
2279
- _t as d,
2311
+ ne as ag,
2312
+ _t as b,
2313
+ Wt as c,
2314
+ Ut as d,
2280
2315
  Mt as e,
2281
- Jt as f,
2316
+ jt as f,
2282
2317
  Gt as g,
2283
2318
  Vt as h,
2284
2319
  P as i,
2285
- Ut as j,
2320
+ Ht as j,
2286
2321
  oa as k,
2287
- Wa as l,
2288
- Kt as m,
2289
- ts as n,
2290
- $t as o,
2291
- ie as p,
2292
- Na as q,
2293
- se as r,
2294
- z as s,
2295
- ce as t,
2322
+ Ya as l,
2323
+ Qt as m,
2324
+ ss as n,
2325
+ Nt as o,
2326
+ ue as p,
2327
+ _a as q,
2328
+ re as r,
2329
+ C as s,
2330
+ pe as t,
2296
2331
  K as u,
2297
- W as v,
2298
- ue as w,
2332
+ Y as v,
2333
+ fe as w,
2299
2334
  Ne as x,
2300
- le as y,
2301
- ss as z
2335
+ we as y,
2336
+ Te as z
2302
2337
  };