@skyfox2000/webui 1.4.8 → 1.4.10

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 (30) hide show
  1. package/lib/assets/modules/{baseLayout-DIny49tw.js → baseLayout-DSVT_hCt.js} +3 -3
  2. package/lib/assets/modules/{file-upload-DHUBZlX4.js → file-upload-BefTs4CH.js} +1 -1
  3. package/lib/assets/modules/{index-CEffEFtI.js → index-C6BAsERS.js} +1 -1
  4. package/lib/assets/modules/{index-DyRjXb_O.js → index-Cwr2EDEI.js} +2 -2
  5. package/lib/assets/modules/{index-BIAdOoSj.js → index-DkMjvF98.js} +10 -10
  6. package/lib/assets/modules/{menuTabs-CCrFWIOl.js → menuTabs-D99nhxm_.js} +2 -2
  7. package/lib/assets/modules/{toolIcon-BGZR_aUI.js → toolIcon-DDp0EFRE.js} +1 -1
  8. package/lib/assets/modules/{uploadList-CMXuGRWT.js → upload-template-BK8iQQYz.js} +273 -263
  9. package/lib/assets/modules/uploadList-BfCPE5Gb.js +420 -0
  10. package/lib/es/AceEditor/index.js +3 -3
  11. package/lib/es/BasicLayout/index.js +2 -2
  12. package/lib/es/Error403/index.js +1 -1
  13. package/lib/es/Error404/index.js +1 -1
  14. package/lib/es/ExcelForm/index.js +16 -15
  15. package/lib/es/MenuLayout/index.js +2 -2
  16. package/lib/es/TemplateFile/index.js +61 -90
  17. package/lib/es/UploadForm/index.js +4 -4
  18. package/lib/index.d.ts +1 -0
  19. package/lib/utils/upload-template.d.ts +4 -0
  20. package/lib/webui.css +1 -1
  21. package/lib/webui.es.js +57 -53
  22. package/package.json +1 -1
  23. package/src/components/content/dialog/excelForm.vue +5 -0
  24. package/src/components/content/dialog/templateFile.vue +27 -79
  25. package/src/components/content/table/index.vue +1 -0
  26. package/src/components/form/propEditor/index.vue +21 -7
  27. package/src/components/form/upload/uploadList.vue +106 -38
  28. package/src/index.ts +2 -0
  29. package/src/utils/upload-template.ts +15 -0
  30. package/lib/assets/modules/uploadList-l4q5o65m.js +0 -400
@@ -1,18 +1,18 @@
1
1
  var ha = Object.defineProperty;
2
2
  var ma = (e, t, a) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
3
  var L = (e, t, a) => ma(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { ref as f, h as H, nextTick as va, inject as se, provide as Me, watch as g, toRaw as Ze, shallowRef as J, defineComponent as Z, reactive as ga, onMounted as Ie, onUnmounted as le, createBlock as Ae, createCommentVNode as z, openBlock as w, unref as b, mergeProps as ue, useAttrs as Ee, createElementBlock as $, createVNode as C, withCtx as Q, createTextVNode as xe, toDisplayString as Y, Fragment as oe, renderList as Ue, normalizeClass as ea, createElementVNode as ya } from "vue";
5
- import { Switch as Sa, AutoComplete as ba, Input as Ia, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as xa, Radio as wa, Select as Oa, SelectOption as Ra } from "ant-design-vue";
6
- import { createPinia as Ta, defineStore as ce } from "pinia";
4
+ import { ref as c, h as H, nextTick as va, inject as se, provide as Me, watch as g, toRaw as Ze, shallowRef as J, defineComponent as Z, reactive as ga, onMounted as Ie, onUnmounted as le, createBlock as Ae, createCommentVNode as z, openBlock as w, unref as S, mergeProps as ue, useAttrs as Ee, createElementBlock as $, createVNode as C, withCtx as Q, createTextVNode as xe, toDisplayString as Y, Fragment as oe, renderList as Ue, normalizeClass as ea, createElementVNode as ya } from "vue";
5
+ import { Switch as ba, AutoComplete as Sa, Input as Ia, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as xa, Radio as wa, Select as Oa, SelectOption as Ta } from "ant-design-vue";
6
+ import { createPinia as Ra, defineStore as ce } from "pinia";
7
7
  import Pa from "pinia-plugin-persistedstate";
8
- import { EnvConfig as Se, AppAction as Be, AppSource as ze, isMicroApp as V, isBaseMicroApp as ka, combineParams as fe } from "@skyfox2000/microbase";
9
- import { httpPost as q, ResStatus as T, setToken as ve, fieldMapping as La, parseFieldTemplate as be, API_HOST as $e, SERVER_HOST as Ma } from "@skyfox2000/fapi";
8
+ import { EnvConfig as be, AppAction as We, AppSource as ze, isMicroApp as V, isBaseMicroApp as ka, combineParams as fe } from "@skyfox2000/microbase";
9
+ import { httpPost as q, ResStatus as R, setToken as ve, fieldMapping as La, parseFieldTemplate as Se, API_HOST as $e, SERVER_HOST as Ma } from "@skyfox2000/fapi";
10
10
  import E from "vue-m-message";
11
11
  import { createRouter as $a, createWebHashHistory as Fa } from "vue-router";
12
12
  import He from "async-validator";
13
13
  import "dayjs";
14
14
  import "vue-draggable-next";
15
- const _a = Ta();
15
+ const _a = Ra();
16
16
  _a.use(Pa);
17
17
  var U = /* @__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))(U || {});
18
18
  const k = class k {
@@ -191,9 +191,9 @@ const pe = {
191
191
  return a.length === 0 && !s;
192
192
  if (t) {
193
193
  const r = _();
194
- if (Se.VITE_PERMISSION_MODE === "role")
194
+ if (be.VITE_PERMISSION_MODE === "role")
195
195
  return a.length === 0 ? !0 : r.hasRole(a);
196
- if (Se.VITE_PERMISSION_MODE === "permit") {
196
+ if (be.VITE_PERMISSION_MODE === "permit") {
197
197
  if (a.length === 0 && !s)
198
198
  return !0;
199
199
  let l = !1, u = !1;
@@ -201,7 +201,7 @@ const pe = {
201
201
  }
202
202
  }
203
203
  return !1;
204
- }, ne = f(null);
204
+ }, ne = c(null);
205
205
  we.beforeEach((e, t, a) => {
206
206
  var l;
207
207
  const s = e;
@@ -236,7 +236,7 @@ we.beforeEach((e, t, a) => {
236
236
  };
237
237
  return;
238
238
  }
239
- const c = Da(s, u.isLogin);
239
+ const f = Da(s, u.isLogin);
240
240
  a();
241
241
  }
242
242
  }
@@ -408,9 +408,9 @@ const re = {
408
408
  const t = _(), { roles: a, permission: s } = e.meta || {};
409
409
  if (F(a) && F(s))
410
410
  return !0;
411
- if (Se.VITE_PERMISSION_MODE === "role")
411
+ if (be.VITE_PERMISSION_MODE === "role")
412
412
  return F(a) ? !0 : t.hasRole(a);
413
- if (Se.VITE_PERMISSION_MODE === "permit") {
413
+ if (be.VITE_PERMISSION_MODE === "permit") {
414
414
  let n = !1, o = !1;
415
415
  return F(a) || (n = t.hasRole(a)), t.isAdmin() ? n : (F(s) || (o = t.hasPermit(e.path, s)), n || o);
416
416
  }
@@ -439,7 +439,7 @@ const re = {
439
439
  Version: "",
440
440
  Host: "",
441
441
  Source: ze.Manual,
442
- Action: Be.App,
442
+ Action: We.App,
443
443
  Path: "",
444
444
  Icon: "",
445
445
  Routes: [],
@@ -470,7 +470,7 @@ const re = {
470
470
  Enabled: 1
471
471
  }
472
472
  }).then((e) => {
473
- if ((e == null ? void 0 : e.status) === T.SUCCESS && e.data)
473
+ if ((e == null ? void 0 : e.status) === R.SUCCESS && e.data)
474
474
  this.appList.length = 0, this.appList.push(...e.data);
475
475
  else if ((e == null ? void 0 : e.errno) == Oe) {
476
476
  _().logout(!1);
@@ -613,7 +613,7 @@ const re = {
613
613
  Version: "",
614
614
  Host: "",
615
615
  Source: ze.Manual,
616
- Action: Be.App,
616
+ Action: We.App,
617
617
  Path: "",
618
618
  Icon: "",
619
619
  Routes: [],
@@ -652,7 +652,7 @@ const re = {
652
652
  },
653
653
  Query: e
654
654
  };
655
- return q(Ke.login, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a : null);
655
+ return q(Ke.login, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a : null);
656
656
  }, Ga = (e) => {
657
657
  let t = {
658
658
  Query: {
@@ -660,7 +660,7 @@ const re = {
660
660
  }
661
661
  };
662
662
  return q(Ke.auth, t).then((a) => {
663
- if ((a == null ? void 0 : a.status) === T.SUCCESS)
663
+ if ((a == null ? void 0 : a.status) === R.SUCCESS)
664
664
  return a.data;
665
665
  if ((a == null ? void 0 : a.errno) == Oe) {
666
666
  _().logout(!1);
@@ -673,15 +673,15 @@ const re = {
673
673
  Option: {},
674
674
  Query: {}
675
675
  };
676
- return q(Ke.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
677
- }, Wa = (e) => {
676
+ return q(Ke.logout, e).then((t) => (t == null ? void 0 : t.status) === R.SUCCESS ? t.data : null);
677
+ }, Ba = (e) => {
678
678
  try {
679
679
  const t = JSON.parse(atob(e.token.split(".")[1]));
680
680
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
681
681
  } catch (t) {
682
682
  return console.error(Ja, t), !1;
683
683
  }
684
- }, M = f(""), ae = f(null), _ = ce("userInfo", {
684
+ }, M = c(""), ae = c(null), _ = ce("userInfo", {
685
685
  state: () => ({
686
686
  isLogin: !1,
687
687
  userInfo: {
@@ -714,7 +714,7 @@ const re = {
714
714
  return s;
715
715
  {
716
716
  const n = a.data;
717
- if (this.token = n.token, ve(this.token), this.isLogin = !0, Wa(n))
717
+ if (this.token = n.token, ve(this.token), this.isLogin = !0, Ba(n))
718
718
  this.userInfo = {
719
719
  ...this.userInfo,
720
720
  ...n.UserInfo
@@ -855,7 +855,7 @@ const re = {
855
855
  e.store.init();
856
856
  }
857
857
  }
858
- }), Re = (e, t) => {
858
+ }), Te = (e, t) => {
859
859
  var n;
860
860
  const a = e.page;
861
861
  return {
@@ -865,7 +865,7 @@ const re = {
865
865
  ...t.url,
866
866
  loadingText: t.loadingText
867
867
  };
868
- }, Te = (e, t) => {
868
+ }, Re = (e, t) => {
869
869
  const a = e.page, s = t.url;
870
870
  if (!s || !s.url) {
871
871
  const o = `URL未设置: ${t.urlKey}`;
@@ -879,9 +879,9 @@ const re = {
879
879
  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 == null ? void 0 : o.errno) == Oe ? (_().logout(!1), null) : o)).catch((o) => (t.loadingState && (t.loadingState.value = !1), null));
880
880
  }, Qe = (e, t) => {
881
881
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
882
- const a = Re(e, t);
883
- return t.url = a, Te(e, t);
884
- }, Mt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Re(e, t), Te(e, t).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && (t.hideErrorToast || E.success("执行成功!")), a))), na = (e, t = {}) => {
882
+ const a = Te(e, t);
883
+ return t.url = a, Re(e, t);
884
+ }, $t = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Te(e, t), Re(e, t).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && (t.hideErrorToast || E.success("执行成功!")), a))), na = (e, t = {}) => {
885
885
  const a = t.primaryKey || "Id";
886
886
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
887
887
  return E.error("错误!无保存数据!"), Promise.resolve(null);
@@ -891,9 +891,9 @@ const re = {
891
891
  loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
892
892
  };
893
893
  s.params.Query[a] = s.params.Data[a];
894
- const n = Re(e, s);
895
- return s.url = n, Te(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || E.success("保存成功!")), o));
896
- }, Ba = (e, t, a = {}) => {
894
+ const n = Te(e, s);
895
+ return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === R.SUCCESS && (t.hideErrorToast || E.success("保存成功!")), o));
896
+ }, Wa = (e, t, a = {}) => {
897
897
  const s = a.primaryKey || "Id";
898
898
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
899
899
  const n = {
@@ -903,15 +903,15 @@ const re = {
903
903
  };
904
904
  if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], F(n.params.Query) || F(n.params.Query[s]))
905
905
  return E.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
906
- const o = Re(e, n);
907
- return n.url = o, Te(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || E.success("删除成功!")), r));
906
+ const o = Te(e, n);
907
+ return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === R.SUCCESS && (a.hideErrorToast || E.success("删除成功!")), r));
908
908
  }, za = (e, t) => Qe(e, {
909
909
  urlKey: "tree",
910
910
  params: {},
911
911
  loadingState: e.isTreeLoading,
912
912
  loadingText: !1,
913
913
  processParams: () => fe(e.treeQuery, t)
914
- }).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? (e.data.value = a.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((a == null ? void 0 : a.data) || []), [])), Ca = (e, t) => {
914
+ }).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? (e.data.value = a.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((a == null ? void 0 : a.data) || []), [])), Ca = (e, t) => {
915
915
  for (const a of e) {
916
916
  if (a.key === t) return a;
917
917
  if (a.children) {
@@ -922,7 +922,7 @@ const re = {
922
922
  return null;
923
923
  };
924
924
  let ie;
925
- const $t = (e) => {
925
+ const Ft = (e) => {
926
926
  ie = new He({}), ie.messages({
927
927
  required: "${label}不能为空",
928
928
  types: {
@@ -949,39 +949,39 @@ const $t = (e) => {
949
949
  },
950
950
  ...e
951
951
  });
952
- }, Ft = (e) => {
952
+ }, _t = (e) => {
953
953
  if (!e || F(e))
954
954
  return [];
955
955
  const t = [], a = ie.messages(), s = (o, r, l) => {
956
956
  const u = r.type;
957
957
  if (u && a.types && u in a.types) {
958
- const c = a.types[u];
959
- n(c, o, { type: u }, l);
958
+ const f = a.types[u];
959
+ n(f, o, { type: u }, l);
960
960
  }
961
961
  const i = ["string", "number", "array"];
962
- for (const c of i)
963
- if (u === c && a[c]) {
964
- const p = a[c], v = ["len", "min", "max", "range"];
962
+ for (const f of i)
963
+ if (u === f && a[f]) {
964
+ const p = a[f], v = ["len", "min", "max", "range"];
965
965
  for (const d of v)
966
966
  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);
967
967
  }
968
968
  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) {
969
- const c = r.enum.join(", ");
970
- n(a.enum, o, { enum: c }, l);
969
+ const f = r.enum.join(", ");
970
+ n(a.enum, o, { enum: f }, l);
971
971
  }
972
972
  }, n = (o, r, l, u) => {
973
973
  if (o)
974
974
  try {
975
975
  let i;
976
976
  if (typeof o == "function") {
977
- const c = [r];
977
+ const f = [r];
978
978
  for (const p in l)
979
- c.push(l[p]);
980
- i = o.apply(null, c), i && u.push(i);
979
+ f.push(l[p]);
980
+ i = o.apply(null, f), i && u.push(i);
981
981
  } else {
982
982
  i = String(o);
983
- for (const c in l)
984
- i = i.replace(new RegExp(`\\$\\{${c}\\}`, "g"), l[c]);
983
+ for (const f in l)
984
+ i = i.replace(new RegExp(`\\$\\{${f}\\}`, "g"), l[f]);
985
985
  i = i.replace(/\$\{label\}/g, ""), i && u.push(i);
986
986
  }
987
987
  } catch (i) {
@@ -1007,11 +1007,11 @@ const $t = (e) => {
1007
1007
  const t = e.formData.value, a = e.formRules.value;
1008
1008
  F(a) || (Je(e), e.ruleValidator || (e.ruleValidator = new He({}), e.ruleValidator.messages(ie.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
1009
1009
  }).catch(({ fields: s }) => s));
1010
- }, _t = async (e, t, a) => (a || (a = new He({}), a.messages(ie.messages()), a.define(t)), a.validate(e).then(() => {
1010
+ }, Nt = async (e, t, a) => (a || (a = new He({}), a.messages(ie.messages()), a.define(t)), a.validate(e).then(() => {
1011
1011
  }).catch(({ fields: s }) => s)), Je = (e) => {
1012
1012
  e.ruleResults.value = void 0;
1013
1013
  }, X = () => {
1014
- const e = se(U.EditorControl, void 0), t = f(se(U.LabelText, "")), a = f(se(U.RuleKey, "")), s = se(U.ErrInfo, void 0);
1014
+ const e = se(U.EditorControl, void 0), t = c(se(U.LabelText, "")), a = c(se(U.RuleKey, "")), s = se(U.ErrInfo, void 0);
1015
1015
  return {
1016
1016
  editorCtrl: e,
1017
1017
  labelText: t,
@@ -1019,7 +1019,7 @@ const $t = (e) => {
1019
1019
  errInfo: s
1020
1020
  };
1021
1021
  }, Ya = (e, t) => {
1022
- let a = f({
1022
+ let a = c({
1023
1023
  msg: "",
1024
1024
  errClass: ""
1025
1025
  });
@@ -1044,7 +1044,7 @@ const $t = (e) => {
1044
1044
  { deep: !0 }
1045
1045
  ), a;
1046
1046
  }, Xa = (e, t, a) => {
1047
- const s = f([]), n = f(""), o = f("");
1047
+ const s = c([]), n = c(""), o = c("");
1048
1048
  if (!e.rule || !t || !a)
1049
1049
  return { msg: n, ruleErrors: s, errClass: o };
1050
1050
  e.rule.split("|").forEach((u) => {
@@ -1053,8 +1053,8 @@ const $t = (e) => {
1053
1053
  s.value.push(...a[u]);
1054
1054
  else {
1055
1055
  const i = [];
1056
- for (let c in a)
1057
- c !== u && c.startsWith(u + ".") && i.push(...a[c]);
1056
+ for (let f in a)
1057
+ f !== u && f.startsWith(u + ".") && i.push(...a[f]);
1058
1058
  i.length > 0 && s.value.push(...i);
1059
1059
  }
1060
1060
  });
@@ -1063,23 +1063,23 @@ const $t = (e) => {
1063
1063
  n.value && (n.value += " / "), n.value += u.message.replace("${label}", e.label ?? "");
1064
1064
  const i = t[u.field];
1065
1065
  if (i) {
1066
- const c = n.value.match(l);
1067
- c && c.forEach((p) => {
1066
+ const f = n.value.match(l);
1067
+ f && f.forEach((p) => {
1068
1068
  const v = p.replace("${", "").replace("}", "");
1069
1069
  n.value = n.value.replace(p, i[v] ?? "");
1070
1070
  });
1071
1071
  }
1072
1072
  }), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
1073
- }, Nt = (e, t) => {
1073
+ }, Dt = (e, t) => {
1074
1074
  Me(U.LabelText, e.label || ""), Me(U.RuleKey, e.rule || "");
1075
1075
  const a = Ya(e, t);
1076
1076
  return Me(U.ErrInfo, a), a;
1077
- }, Dt = (e) => {
1078
- ra(e);
1079
1077
  }, Ut = (e) => {
1078
+ ra(e);
1079
+ }, Ht = (e) => {
1080
1080
  const t = e.page, a = e.formData.value;
1081
1081
  a[e.primaryKey ?? t.primaryKey] = null, ra(e);
1082
- }, Ht = (e) => {
1082
+ }, Vt = (e) => {
1083
1083
  je(e), e.visible.value = !1;
1084
1084
  }, ra = async (e) => {
1085
1085
  var s;
@@ -1108,16 +1108,16 @@ const $t = (e) => {
1108
1108
  }
1109
1109
  ).then((n) => {
1110
1110
  var o, r;
1111
- if ((n == null ? void 0 : n.status) === T.SUCCESS)
1111
+ if ((n == null ? void 0 : n.status) === R.SUCCESS)
1112
1112
  E.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
1113
1113
  else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
1114
1114
  const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
1115
1115
  if (l && l.length > 2 && l[1] && l[2]) {
1116
- const u = l[1], i = l[2].replace(/Idx_/g, "").split("_"), c = e.formRules.value;
1117
- if (c && i.length > 0) {
1116
+ const u = l[1], i = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
1117
+ if (f && i.length > 0) {
1118
1118
  const p = {};
1119
1119
  i.forEach((v) => {
1120
- c[v] && (p[v] = [
1120
+ f[v] && (p[v] = [
1121
1121
  {
1122
1122
  field: v,
1123
1123
  fieldValue: u,
@@ -1132,14 +1132,14 @@ const $t = (e) => {
1132
1132
  } else
1133
1133
  E.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
1134
1134
  });
1135
- }, Vt = async (e) => {
1135
+ }, Kt = async (e) => {
1136
1136
  const t = e.page, a = e.grid;
1137
1137
  e.isFormLoading.value = !0;
1138
1138
  const s = e.formData.value, n = e.primaryKey ?? t.primaryKey;
1139
1139
  return la(a, { [n]: s[n] }, e.detailUrl).then((o) => {
1140
1140
  e.isFormLoading.value = !1, o && oa(e, o);
1141
1141
  });
1142
- }, Kt = (e) => {
1142
+ }, Qt = (e) => {
1143
1143
  const t = e.grid;
1144
1144
  t && (t.rowData.value = void 0), e && (je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
1145
1145
  e.visible.value = !0;
@@ -1150,7 +1150,7 @@ const $t = (e) => {
1150
1150
  e.formData.value = JSON.parse(JSON.stringify(a));
1151
1151
  }, je = (e) => {
1152
1152
  e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Je(e);
1153
- }, Qt = (e, t) => {
1153
+ }, Jt = (e, t) => {
1154
1154
  const a = _();
1155
1155
  return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(we.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
1156
1156
  if (!t) {
@@ -1161,7 +1161,7 @@ const $t = (e) => {
1161
1161
  }
1162
1162
  return !0;
1163
1163
  });
1164
- }, Jt = (e, t) => {
1164
+ }, jt = (e, t) => {
1165
1165
  const a = t == null ? void 0 : t.filter((s) => {
1166
1166
  const n = e.find(
1167
1167
  (o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
@@ -1182,7 +1182,7 @@ const $t = (e) => {
1182
1182
  return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), fe((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1183
1183
  }
1184
1184
  }).then((a) => {
1185
- if ((a == null ? void 0 : a.status) === T.SUCCESS) {
1185
+ if ((a == null ? void 0 : a.status) === R.SUCCESS) {
1186
1186
  let s = a.data;
1187
1187
  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 = {
1188
1188
  total: e.total.value,
@@ -1206,9 +1206,9 @@ const $t = (e) => {
1206
1206
  },
1207
1207
  loadingState: e.isGridSaving,
1208
1208
  ...a
1209
- }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
1209
+ }).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && setTimeout(() => {
1210
1210
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1211
- }, 50), s)), jt = (e, t) => {
1211
+ }, 50), s)), Gt = (e, t) => {
1212
1212
  const a = {};
1213
1213
  return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], et(e, a, {
1214
1214
  loadingText: !1,
@@ -1219,16 +1219,16 @@ const $t = (e) => {
1219
1219
  url: a,
1220
1220
  params: t,
1221
1221
  loadingState: e.isGridLoading
1222
- }), Gt = (e, t) => {
1222
+ }), qt = (e, t) => {
1223
1223
  const a = t;
1224
- return la(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));
1225
- }, qt = (e, t) => {
1224
+ return la(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));
1225
+ }, Bt = (e, t) => {
1226
1226
  let a = e.editor;
1227
1227
  e.rowData.value = t, a && (oa(a, t), a.visible.value = !0);
1228
- }, Wt = (e, t) => Ba(e, t, {
1228
+ }, Wt = (e, t) => Wa(e, t, {
1229
1229
  url: e.deleteUrl,
1230
1230
  primaryKey: e.primaryKey
1231
- }).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && setTimeout(() => {
1231
+ }).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && setTimeout(() => {
1232
1232
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1233
1233
  }, 50), a));
1234
1234
  var Ne = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(Ne || {});
@@ -1278,12 +1278,12 @@ class at {
1278
1278
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1279
1279
  }
1280
1280
  }
1281
- const B = new at(), ee = (e, t, a) => {
1281
+ const W = new at(), ee = (e, t, a) => {
1282
1282
  if (t.inputFactory && (a != null && a.reloadEvent)) {
1283
1283
  const s = t.inputFactory.value;
1284
1284
  s.reloadHandler = (n, o) => {
1285
1285
  tt(t.url, t, o);
1286
- }, B.on(a.reloadEvent, s.reloadHandler);
1286
+ }, W.on(a.reloadEvent, s.reloadHandler);
1287
1287
  }
1288
1288
  if (a != null && a.data)
1289
1289
  g(
@@ -1296,7 +1296,7 @@ const B = new at(), ee = (e, t, a) => {
1296
1296
  else if (t.url && t.url.url)
1297
1297
  e && ua(t.url, t, t.params ?? {});
1298
1298
  else {
1299
- const s = f(se(U.LabelText, ""));
1299
+ const s = c(se(U.LabelText, ""));
1300
1300
  E.error("`" + s.value + "` 未配置选项数据!", {
1301
1301
  duration: 5e3
1302
1302
  });
@@ -1316,7 +1316,7 @@ const B = new at(), ee = (e, t, a) => {
1316
1316
  Array.isArray(a) ? Ge(t, a, !0) : ua(e, t, a);
1317
1317
  }, he = (e, t) => {
1318
1318
  var a;
1319
- (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && B.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1319
+ (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && W.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1320
1320
  }, ua = (e, t, a) => {
1321
1321
  const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = fe(s, n, a);
1322
1322
  st(e, t, t.fieldMap, o).then((r) => {
@@ -1335,7 +1335,7 @@ const B = new at(), ee = (e, t, a) => {
1335
1335
  ...o
1336
1336
  };
1337
1337
  return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), t.optionQuery = s, t.isOptionLoading.value = !0, q(l, s).then((u) => {
1338
- if ((u == null ? void 0 : u.status) === T.SUCCESS) {
1338
+ if ((u == null ? void 0 : u.status) === R.SUCCESS) {
1339
1339
  if (u.data)
1340
1340
  return u.data;
1341
1341
  } else if ((u == null ? void 0 : u.errno) == Oe) {
@@ -1387,8 +1387,8 @@ const B = new at(), ee = (e, t, a) => {
1387
1387
  try {
1388
1388
  const l = parseInt(((r = n.match(/\$\{(\d+)\}/)) == null ? void 0 : r[1]) ?? "0"), u = a[l], i = n.replace(/\$\{\d+\}\./, "");
1389
1389
  if (i && u) {
1390
- const c = be(i, u);
1391
- te(e, s, c);
1390
+ const f = Se(i, u);
1391
+ te(e, s, f);
1392
1392
  } else
1393
1393
  te(e, s, u);
1394
1394
  } catch {
@@ -1398,7 +1398,7 @@ const B = new at(), ee = (e, t, a) => {
1398
1398
  console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
1399
1399
  }) : Object.entries(t).forEach(([s, n]) => {
1400
1400
  if (n.includes("${")) {
1401
- const o = be(n, a);
1401
+ const o = Se(n, a);
1402
1402
  te(e, s, o);
1403
1403
  } else
1404
1404
  te(e, s, a[n]);
@@ -1413,30 +1413,30 @@ const B = new at(), ee = (e, t, a) => {
1413
1413
  if (u)
1414
1414
  if (Array.isArray(l))
1415
1415
  l.every((i) => {
1416
- const c = be(u, { selectedValues: a });
1416
+ const f = Se(u, { selectedValues: a });
1417
1417
  try {
1418
- const p = JSON.parse(c);
1419
- B.emit(i, p, a, n);
1418
+ const p = JSON.parse(f);
1419
+ W.emit(i, p, a, n);
1420
1420
  } catch (p) {
1421
- console.error("eventParamsValue: ", c, p);
1421
+ console.error("eventParamsValue: ", f, p);
1422
1422
  }
1423
1423
  });
1424
1424
  else {
1425
- const i = be(u, { selectedValues: a });
1425
+ const i = Se(u, { selectedValues: a });
1426
1426
  try {
1427
- const c = JSON.parse(i);
1428
- B.emit(l, c, a, n);
1429
- } catch (c) {
1430
- console.error("eventParamsValue: ", i, c);
1427
+ const f = JSON.parse(i);
1428
+ W.emit(l, f, a, n);
1429
+ } catch (f) {
1430
+ console.error("eventParamsValue: ", i, f);
1431
1431
  }
1432
1432
  }
1433
1433
  else
1434
1434
  Array.isArray(l) ? l.every((i) => {
1435
- B.emit(i, n, a);
1436
- }) : B.emit(l, n, a);
1435
+ W.emit(i, n, a);
1436
+ }) : W.emit(l, n, a);
1437
1437
  }
1438
1438
  return s != null && s.inputEmit && s.inputEmit("change", a, n), n;
1439
- }, S = {
1439
+ }, b = {
1440
1440
  PageOption: {
1441
1441
  primaryKey: "Id",
1442
1442
  statusKey: "Enabled"
@@ -1446,12 +1446,12 @@ const B = new at(), ee = (e, t, a) => {
1446
1446
  primaryKey: "Id",
1447
1447
  statusKey: "Enabled",
1448
1448
  remotePage: !0,
1449
- tableSize: f("small"),
1450
- selectable: f(!1),
1451
- searchBar: f(!0),
1452
- pageSize: f(10),
1453
- rowExpand: f(!1),
1454
- buttons: f(["New"]),
1449
+ tableSize: c("small"),
1450
+ selectable: c(!1),
1451
+ searchBar: c(!0),
1452
+ pageSize: c(10),
1453
+ rowExpand: c(!1),
1454
+ buttons: c(["New"]),
1455
1455
  tools: ["Reload", "RowHeight", "TableHeadset"],
1456
1456
  operates: ["Edit", "Delete"]
1457
1457
  },
@@ -1474,18 +1474,18 @@ const B = new at(), ee = (e, t, a) => {
1474
1474
  value: "Id"
1475
1475
  }
1476
1476
  }
1477
- }, Bt = (e) => {
1478
- S.PageOption = {
1479
- ...S.PageOption,
1477
+ }, zt = (e) => {
1478
+ b.PageOption = {
1479
+ ...b.PageOption,
1480
1480
  ...e.pageOption
1481
- }, S.GridOption = {
1482
- ...S.GridOption,
1481
+ }, b.GridOption = {
1482
+ ...b.GridOption,
1483
1483
  ...e.gridOption
1484
- }, S.EditorOption = {
1485
- ...S.EditorOption,
1484
+ }, b.EditorOption = {
1485
+ ...b.EditorOption,
1486
1486
  ...e.editorOptions
1487
- }, S.TreeOption = {
1488
- ...S.TreeOption,
1487
+ }, b.TreeOption = {
1488
+ ...b.TreeOption,
1489
1489
  ...e.treeOption
1490
1490
  };
1491
1491
  }, Le = (e) => {
@@ -1493,45 +1493,45 @@ const B = new at(), ee = (e, t, a) => {
1493
1493
  e.urls[t].api || (e.urls[t].api = e.api), e.urls[t].authorize === void 0 && (e.urls[t].authorize = e.authorize);
1494
1494
  }, rt = (e, t, a, s) => (Le(e), {
1495
1495
  editorCtrl: {
1496
- ...S.EditorOption,
1496
+ ...b.EditorOption,
1497
1497
  name: "",
1498
1498
  default: a ? JSON.parse(JSON.stringify(a)) : void 0,
1499
- visible: f(!1),
1499
+ visible: c(!1),
1500
1500
  page: t,
1501
- formData: f(a ? JSON.parse(JSON.stringify(a)) : void 0),
1502
- formRules: f(s),
1503
- ruleResults: f({}),
1504
- updateData: f(void 0),
1501
+ formData: c(a ? JSON.parse(JSON.stringify(a)) : void 0),
1502
+ formRules: c(s),
1503
+ ruleResults: c({}),
1504
+ updateData: c(void 0),
1505
1505
  saveUrl: e.urls.save,
1506
1506
  detailUrl: e.urls.detail,
1507
- isFormSaving: f(!1),
1508
- isFormLoading: f(!1)
1507
+ isFormSaving: c(!1),
1508
+ isFormLoading: c(!1)
1509
1509
  }
1510
1510
  }), ot = (e, t, a) => {
1511
1511
  Le(e);
1512
1512
  const s = {
1513
- ...S.GridOption,
1514
- tableSize: f(S.GridOption.tableSize.value),
1515
- selectable: f(S.GridOption.selectable.value),
1516
- searchBar: f(S.GridOption.searchBar.value),
1517
- pageSize: f(S.GridOption.pageSize.value),
1518
- rowExpand: f(S.GridOption.rowExpand.value),
1519
- buttons: f([...S.GridOption.buttons.value]),
1520
- tools: [...S.GridOption.tools],
1521
- operates: [...S.GridOption.operates],
1522
- columns: f(a || []),
1523
- reload: f(!1),
1524
- pageNo: f(1),
1525
- total: f(0),
1513
+ ...b.GridOption,
1514
+ tableSize: c(b.GridOption.tableSize.value),
1515
+ selectable: c(b.GridOption.selectable.value),
1516
+ searchBar: c(b.GridOption.searchBar.value),
1517
+ pageSize: c(b.GridOption.pageSize.value),
1518
+ rowExpand: c(b.GridOption.rowExpand.value),
1519
+ buttons: c([...b.GridOption.buttons.value]),
1520
+ tools: [...b.GridOption.tools],
1521
+ operates: [...b.GridOption.operates],
1522
+ columns: c(a || []),
1523
+ reload: c(!1),
1524
+ pageNo: c(1),
1525
+ total: c(0),
1526
1526
  page: t,
1527
- selectKeys: f([]),
1528
- selectRows: f([]),
1529
- rowData: f(void 0),
1527
+ selectKeys: c([]),
1528
+ selectRows: c([]),
1529
+ rowData: c(void 0),
1530
1530
  gridQuery: {},
1531
1531
  tableData: J(void 0),
1532
- expandRows: f({}),
1533
- isGridLoading: f(!1),
1534
- isGridSaving: f(!1),
1532
+ expandRows: c({}),
1533
+ isGridLoading: c(!1),
1534
+ isGridSaving: c(!1),
1535
1535
  gridUrl: e.urls.list || e.urls.find,
1536
1536
  updateUrl: e.urls.update,
1537
1537
  deleteUrl: e.urls.delete
@@ -1546,16 +1546,16 @@ const B = new at(), ee = (e, t, a) => {
1546
1546
  ), {
1547
1547
  gridCtrl: s
1548
1548
  };
1549
- }, zt = (e, t) => {
1549
+ }, Ct = (e, t) => {
1550
1550
  Le(e);
1551
1551
  const a = {
1552
- ...S.TreeOption,
1553
- reload: f(!1),
1552
+ ...b.TreeOption,
1553
+ reload: c(!1),
1554
1554
  page: t,
1555
- node: f(void 0),
1555
+ node: c(void 0),
1556
1556
  url: e.urls.tree,
1557
1557
  data: J(void 0),
1558
- isTreeLoading: f(!1)
1558
+ isTreeLoading: c(!1)
1559
1559
  };
1560
1560
  return g(
1561
1561
  () => a.reload.value,
@@ -1569,15 +1569,15 @@ const B = new at(), ee = (e, t, a) => {
1569
1569
  };
1570
1570
  }, me = (e, t) => {
1571
1571
  const a = {
1572
- ...S.OptionOption,
1572
+ ...b.OptionOption,
1573
1573
  url: e,
1574
- reload: f(!1),
1574
+ reload: c(!1),
1575
1575
  optionQuery: {},
1576
1576
  data: J([]),
1577
- selected: f([]),
1578
- selectedOptions: f([]),
1579
- options: f([]),
1580
- isOptionLoading: f(!1)
1577
+ selected: c([]),
1578
+ selectedOptions: c([]),
1579
+ options: c([]),
1580
+ isOptionLoading: c(!1)
1581
1581
  };
1582
1582
  return g(
1583
1583
  () => a.reload.value,
@@ -1589,10 +1589,10 @@ const B = new at(), ee = (e, t, a) => {
1589
1589
  ), {
1590
1590
  optionCtrl: a
1591
1591
  };
1592
- }, Ct = (e, t, a) => {
1592
+ }, Yt = (e, t, a) => {
1593
1593
  Le(e);
1594
1594
  const s = {
1595
- ...S.PageOption,
1595
+ ...b.PageOption,
1596
1596
  ...e
1597
1597
  }, { editorCtrl: n } = rt(e, s, t, a), { gridCtrl: o } = ot(e, s);
1598
1598
  return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
@@ -1600,10 +1600,10 @@ const B = new at(), ee = (e, t, a) => {
1600
1600
  editorCtrl: n,
1601
1601
  gridCtrl: o
1602
1602
  };
1603
- }, it = 7 * 24 * 60 * 60 * 1e3, _e = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), G = f({}), Yt = G, Xt = (e) => {
1603
+ }, it = 7 * 24 * 60 * 60 * 1e3, _e = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), G = c({}), Xt = G, Zt = (e) => {
1604
1604
  var n;
1605
1605
  if (!e.iconUrl) return De;
1606
- const t = f(!0), a = f("");
1606
+ const t = c(!0), a = c("");
1607
1607
  let s = !0;
1608
1608
  return (n = e.icons) != null && n.length && (s = e.icons.every((o) => G.value[o] !== void 0)), (e.icon && !G.value[e.icon] || !s) && lt(e, t).then(() => {
1609
1609
  ft(e.iconUrl, e.monoColor || !1), t.value = !0;
@@ -1634,19 +1634,19 @@ const B = new at(), ee = (e, t, a) => {
1634
1634
  },
1635
1635
  emits: ["update:iconIndex"],
1636
1636
  setup(o, { emit: r }) {
1637
- const l = f(o.icon), u = f(0), i = () => {
1637
+ const l = c(o.icon), u = c(0), i = () => {
1638
1638
  o.icons && u.value++;
1639
1639
  };
1640
1640
  return g(
1641
1641
  () => o.iconIndex,
1642
- (c) => {
1643
- c !== void 0 && (u.value = c);
1642
+ (f) => {
1643
+ f !== void 0 && (u.value = f);
1644
1644
  },
1645
1645
  { immediate: !0 }
1646
1646
  ), g(
1647
1647
  () => u.value,
1648
- (c) => {
1649
- o.icons && (c >= o.icons.length && (u.value = 0), l.value = o.icons[u.value], ge(a, l, l.value), r("update:iconIndex", u.value));
1648
+ (f) => {
1649
+ o.icons && (f >= o.icons.length && (u.value = 0), l.value = o.icons[u.value], ge(a, l, l.value), r("update:iconIndex", u.value));
1650
1650
  },
1651
1651
  { immediate: !0 }
1652
1652
  ), g(
@@ -1657,8 +1657,8 @@ const B = new at(), ee = (e, t, a) => {
1657
1657
  { deep: !0 }
1658
1658
  ), g(
1659
1659
  () => o.icon,
1660
- (c) => {
1661
- ge(a, l, c);
1660
+ (f) => {
1661
+ ge(a, l, f);
1662
1662
  }
1663
1663
  ), ge(a, l, l.value), { isLoaded: t, Icon: a, handleClick: i };
1664
1664
  },
@@ -1737,7 +1737,7 @@ const B = new at(), ee = (e, t, a) => {
1737
1737
  return console.error("解析缓存失败:", n), null;
1738
1738
  }
1739
1739
  return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
1740
- }, Zt = () => {
1740
+ }, es = () => {
1741
1741
  const e = Date.now();
1742
1742
  for (const t in localStorage)
1743
1743
  if (t.startsWith("icon_cache:")) {
@@ -1776,18 +1776,18 @@ const B = new at(), ee = (e, t, a) => {
1776
1776
  }, pt = (e, t) => {
1777
1777
  const a = window[e], o = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
1778
1778
  for (const l of o) {
1779
- const u = l.id, i = Array.from(r).find((c) => c.id === u);
1780
- i && t && (i.innerHTML = l.innerHTML, i.querySelectorAll("*").forEach((c) => {
1781
- c.hasAttribute("fill") && c.removeAttribute("fill");
1779
+ const u = l.id, i = Array.from(r).find((f) => f.id === u);
1780
+ i && t && (i.innerHTML = l.innerHTML, i.querySelectorAll("*").forEach((f) => {
1781
+ f.hasAttribute("fill") && f.removeAttribute("fill");
1782
1782
  })), G.value[u] || (G.value[u] = H("svg", { fill: "currentColor" }, [H("use", { "xlink:href": `#${u}` })]));
1783
1783
  }
1784
1784
  }, dt = (e, t) => {
1785
1785
  let a = "";
1786
1786
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1787
- }, es = (e, t, a, s) => {
1787
+ }, as = (e, t, a, s) => {
1788
1788
  da(e, [], a, s).forEach((o) => t.push(o));
1789
1789
  }, da = (e, t, a, s) => {
1790
- var r, l, u, i, c;
1790
+ var r, l, u, i, f;
1791
1791
  const n = [], o = _();
1792
1792
  for (const p of e) {
1793
1793
  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) && (u = p.meta) != null && u.permission && !o.hasPermit(p.meta.permission, ":page"))
@@ -1797,14 +1797,14 @@ const B = new at(), ee = (e, t, a) => {
1797
1797
  const d = da(p.children || [], v, a, s), O = {
1798
1798
  key: v.join("/"),
1799
1799
  label: ((i = p.name) == null ? void 0 : i.toString()) ?? "",
1800
- title: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
1800
+ title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
1801
1801
  icon: p.icon ? H(a, { ...s, icon: p.icon }) : void 0,
1802
1802
  children: d.length > 0 ? d : void 0
1803
1803
  };
1804
1804
  (d.length > 0 || !p.children) && n.push(O);
1805
1805
  }
1806
1806
  return n;
1807
- }, Xe = ga([]), as = () => {
1807
+ }, Xe = ga([]), ts = () => {
1808
1808
  Xe.length = 0;
1809
1809
  const e = K();
1810
1810
  let a = Ve().TabActive;
@@ -1829,7 +1829,7 @@ const B = new at(), ee = (e, t, a) => {
1829
1829
  // 不显示错误
1830
1830
  hideErrorToast: !0
1831
1831
  }
1832
- }, ts = ce("hostInfo", {
1832
+ }, ss = ce("hostInfo", {
1833
1833
  state: () => ({
1834
1834
  hostInfo: {
1835
1835
  Host: "",
@@ -1867,7 +1867,7 @@ const B = new at(), ee = (e, t, a) => {
1867
1867
  Host: n
1868
1868
  }
1869
1869
  }).then((o) => {
1870
- if ((o == null ? void 0 : o.status) === T.SUCCESS && o.data) {
1870
+ if ((o == null ? void 0 : o.status) === R.SUCCESS && o.data) {
1871
1871
  const r = o.data;
1872
1872
  this._setHostInfo(r);
1873
1873
  } else
@@ -1919,7 +1919,7 @@ const B = new at(), ee = (e, t, a) => {
1919
1919
  // storage: localStorage,
1920
1920
  // pick: ['hostInfo'],
1921
1921
  // },
1922
- }), ss = ce("settingInfo", {
1922
+ }), ns = ce("settingInfo", {
1923
1923
  state: () => ({
1924
1924
  fullscreen: !1,
1925
1925
  menuCollapse: !1,
@@ -1961,7 +1961,7 @@ const B = new at(), ee = (e, t, a) => {
1961
1961
  }
1962
1962
  },
1963
1963
  persist: !1
1964
- }), ns = /* @__PURE__ */ Z({
1964
+ }), rs = /* @__PURE__ */ Z({
1965
1965
  __name: "index",
1966
1966
  props: {
1967
1967
  ...pe,
@@ -1977,7 +1977,7 @@ const B = new at(), ee = (e, t, a) => {
1977
1977
  setup(e, { emit: t }) {
1978
1978
  const a = e, s = X(), n = me(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
1979
1979
  o.inputFactory = J(s);
1980
- const r = f([]);
1980
+ const r = c([]);
1981
1981
  o && g(
1982
1982
  () => o.options.value,
1983
1983
  (p) => {
@@ -1985,7 +1985,7 @@ const B = new at(), ee = (e, t, a) => {
1985
1985
  },
1986
1986
  { immediate: !0, deep: !0 }
1987
1987
  );
1988
- const l = t, { editorCtrl: u, errInfo: i } = X(), c = (p) => {
1988
+ const l = t, { editorCtrl: u, errInfo: i } = X(), f = (p) => {
1989
1989
  i != null && i.value.errClass && u && de(u), l("change", p);
1990
1990
  };
1991
1991
  return Ie(() => {
@@ -1998,10 +1998,10 @@ const B = new at(), ee = (e, t, a) => {
1998
1998
  o && he(o, a);
1999
1999
  }), (p, v) => {
2000
2000
  var d;
2001
- return r.value.length === 2 ? (w(), Ae(b(Sa), ue({
2001
+ return r.value.length === 2 ? (w(), Ae(S(ba), ue({
2002
2002
  key: 0,
2003
2003
  class: [
2004
- ((d = b(i)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
2004
+ ((d = S(i)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
2005
2005
  "bg-blue-300",
2006
2006
  "w-[58px]"
2007
2007
  ],
@@ -2009,11 +2009,11 @@ const B = new at(), ee = (e, t, a) => {
2009
2009
  checkedValue: r.value[0].value,
2010
2010
  unCheckedChildren: r.value[1].label,
2011
2011
  unCheckedValue: r.value[1].value,
2012
- onChange: c
2012
+ onChange: f
2013
2013
  }, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : z("", !0);
2014
2014
  };
2015
2015
  }
2016
- }), rs = /* @__PURE__ */ Z({
2016
+ }), os = /* @__PURE__ */ Z({
2017
2017
  inheritAttrs: !1,
2018
2018
  __name: "index",
2019
2019
  props: {
@@ -2040,7 +2040,7 @@ const B = new at(), ee = (e, t, a) => {
2040
2040
  value: "Id",
2041
2041
  ...r == null ? void 0 : r.fieldMap
2042
2042
  };
2043
- const l = f(void 0);
2043
+ const l = c(void 0);
2044
2044
  g(
2045
2045
  () => a.value,
2046
2046
  () => {
@@ -2053,9 +2053,9 @@ const B = new at(), ee = (e, t, a) => {
2053
2053
  a.autoClean && a.formData && a.outFields && y !== a.value && ca(a.formData, a.outFields, null);
2054
2054
  }
2055
2055
  );
2056
- const { editorCtrl: u, errInfo: i, labelText: c } = n, p = t;
2056
+ const { editorCtrl: u, errInfo: i, labelText: f } = n, p = t;
2057
2057
  n.inputEmit = p;
2058
- const v = f((r == null ? void 0 : r.options.value) || []);
2058
+ const v = c((r == null ? void 0 : r.options.value) || []);
2059
2059
  r && g(
2060
2060
  () => r.options.value,
2061
2061
  (y) => {
@@ -2082,21 +2082,21 @@ const B = new at(), ee = (e, t, a) => {
2082
2082
  }), (y, x) => {
2083
2083
  var h;
2084
2084
  return w(), $("div", null, [
2085
- C(b(ba), ue({
2085
+ C(S(Sa), ue({
2086
2086
  value: l.value,
2087
2087
  "onUpdate:value": x[0] || (x[0] = (I) => l.value = I),
2088
- class: ["w-full", (h = b(i)) == null ? void 0 : h.errClass],
2088
+ class: ["w-full", (h = S(i)) == null ? void 0 : h.errClass],
2089
2089
  options: v.value,
2090
2090
  onSearch: d,
2091
2091
  onSelect: O
2092
- }, b(s), { "allow-clear": !1 }), {
2092
+ }, S(s), { "allow-clear": !1 }), {
2093
2093
  option: Q(({ label: I }) => [
2094
2094
  xe(Y(I), 1)
2095
2095
  ]),
2096
2096
  default: Q(() => [
2097
- C(b(Ia), {
2097
+ C(S(Ia), {
2098
2098
  "allow-clear": "",
2099
- placeholder: "请输入并选择" + b(c)
2099
+ placeholder: "请输入并选择" + S(f)
2100
2100
  }, null, 8, ["placeholder"])
2101
2101
  ]),
2102
2102
  _: 1
@@ -2107,7 +2107,7 @@ const B = new at(), ee = (e, t, a) => {
2107
2107
  }), mt = { class: "min-h-[32px] pt-[5px]" }, vt = {
2108
2108
  key: 1,
2109
2109
  class: "text-center text-gray-500"
2110
- }, os = /* @__PURE__ */ Z({
2110
+ }, is = /* @__PURE__ */ Z({
2111
2111
  inheritAttrs: !1,
2112
2112
  __name: "index",
2113
2113
  props: {
@@ -2131,7 +2131,7 @@ const B = new at(), ee = (e, t, a) => {
2131
2131
  var v, d, O;
2132
2132
  const a = e, s = Ee(), n = X(), o = me(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2133
2133
  r.inputFactory = J(n);
2134
- const l = f({
2134
+ const l = c({
2135
2135
  ...r == null ? void 0 : r.url,
2136
2136
  url: ((v = r == null ? void 0 : r.url) == null ? void 0 : v.url) || "",
2137
2137
  fieldMap: (r == null ? void 0 : r.fieldMap) || ((d = r == null ? void 0 : r.url) == null ? void 0 : d.fieldMap),
@@ -2139,11 +2139,11 @@ const B = new at(), ee = (e, t, a) => {
2139
2139
  loadingText: !1
2140
2140
  }), { errInfo: u } = n, i = t;
2141
2141
  n.inputEmit = i;
2142
- const c = f((r == null ? void 0 : r.options.value) || []);
2142
+ const f = c((r == null ? void 0 : r.options.value) || []);
2143
2143
  r && g(
2144
2144
  () => r.options.value,
2145
2145
  (y) => {
2146
- c.value = y || [];
2146
+ f.value = y || [];
2147
2147
  },
2148
2148
  { immediate: !0, deep: !0 }
2149
2149
  );
@@ -2161,19 +2161,19 @@ const B = new at(), ee = (e, t, a) => {
2161
2161
  }), le(() => {
2162
2162
  r && he(r, a);
2163
2163
  }), (y, x) => (w(), $("div", mt, [
2164
- C(b(Aa), ue({
2164
+ C(S(Aa), ue({
2165
2165
  onChange: p,
2166
2166
  class: "w-full mb-[-3px]"
2167
- }, b(s)), {
2167
+ }, S(s)), {
2168
2168
  default: Q(() => [
2169
- c.value.length > 0 ? (w(!0), $(oe, { key: 0 }, Ue(c.value, (h) => {
2169
+ f.value.length > 0 ? (w(!0), $(oe, { key: 0 }, Ue(f.value, (h) => {
2170
2170
  var I;
2171
- return w(), Ae(b(Ea), {
2171
+ return w(), Ae(S(Ea), {
2172
2172
  key: h.value,
2173
2173
  value: h.value,
2174
2174
  disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
2175
2175
  class: ea([
2176
- ((I = b(u)) == null ? void 0 : I.errClass) === "error" ? "error !text-red-400" : "",
2176
+ ((I = S(u)) == null ? void 0 : I.errClass) === "error" ? "error !text-red-400" : "",
2177
2177
  "text-nowrap",
2178
2178
  "pb-1",
2179
2179
  e.wrap ? `w-1/${a.wrap}` : ""
@@ -2193,7 +2193,7 @@ const B = new at(), ee = (e, t, a) => {
2193
2193
  }), gt = { class: "min-h-[32px] pt-1" }, yt = {
2194
2194
  key: 1,
2195
2195
  class: "text-center text-gray-500"
2196
- }, is = /* @__PURE__ */ Z({
2196
+ }, ls = /* @__PURE__ */ Z({
2197
2197
  inheritAttrs: !1,
2198
2198
  __name: "index",
2199
2199
  props: {
@@ -2218,17 +2218,17 @@ const B = new at(), ee = (e, t, a) => {
2218
2218
  var O, y, x;
2219
2219
  const a = e, s = Ee(), n = X(), o = me(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2220
2220
  r.inputFactory = J(n);
2221
- const l = f({
2221
+ const l = c({
2222
2222
  ...r == null ? void 0 : r.url,
2223
2223
  url: ((O = r == null ? void 0 : r.url) == null ? void 0 : O.url) || "",
2224
2224
  fieldMap: (r == null ? void 0 : r.fieldMap) || ((y = r == null ? void 0 : r.url) == null ? void 0 : y.fieldMap),
2225
2225
  params: (r == null ? void 0 : r.params) || ((x = r == null ? void 0 : r.url) == null ? void 0 : x.params),
2226
2226
  loadingText: !1
2227
- }), u = f(a.value), { errInfo: i } = n, c = f((r == null ? void 0 : r.options.value) || []), p = t;
2227
+ }), u = c(a.value), { errInfo: i } = n, f = c((r == null ? void 0 : r.options.value) || []), p = t;
2228
2228
  n.inputEmit = p, r && g(
2229
2229
  () => r.options.value,
2230
2230
  (h) => {
2231
- c.value = h || [];
2231
+ f.value = h || [];
2232
2232
  },
2233
2233
  { immediate: !0, deep: !0 }
2234
2234
  ), g(
@@ -2244,12 +2244,12 @@ const B = new at(), ee = (e, t, a) => {
2244
2244
  );
2245
2245
  const v = (h, I) => {
2246
2246
  if (typeof h == "object" && typeof I == "object") {
2247
- const R = JSON.stringify(h) === JSON.stringify(I);
2248
- return R && (u.value = h), R;
2247
+ const T = JSON.stringify(h) === JSON.stringify(I);
2248
+ return T && (u.value = h), T;
2249
2249
  }
2250
2250
  return h === I;
2251
2251
  }, d = (h) => {
2252
- const I = h.target.value, R = ke(r, a, I), j = Pe(R);
2252
+ const I = h.target.value, T = ke(r, a, I), j = Pe(T);
2253
2253
  p("update:labels", j);
2254
2254
  };
2255
2255
  return Ie(() => {
@@ -2261,32 +2261,32 @@ const B = new at(), ee = (e, t, a) => {
2261
2261
  }), le(() => {
2262
2262
  r && he(r, a);
2263
2263
  }), (h, I) => (w(), $("div", gt, [
2264
- C(b(xa), ue({
2264
+ C(S(xa), ue({
2265
2265
  value: u.value,
2266
- "onUpdate:value": I[0] || (I[0] = (R) => u.value = R),
2266
+ "onUpdate:value": I[0] || (I[0] = (T) => u.value = T),
2267
2267
  autocheck: !1,
2268
2268
  onChange: d,
2269
2269
  class: "w-full flex align-items flex-wrap mb-[-3px]"
2270
- }, b(s)), {
2270
+ }, S(s)), {
2271
2271
  default: Q(() => [
2272
- c.value.length > 0 ? (w(!0), $(oe, { key: 0 }, Ue(c.value, (R) => {
2272
+ f.value.length > 0 ? (w(!0), $(oe, { key: 0 }, Ue(f.value, (T) => {
2273
2273
  var j;
2274
2274
  return w(), $(oe, {
2275
- key: R.value
2275
+ key: T.value
2276
2276
  }, [
2277
- R.visible !== !1 ? (w(), Ae(b(wa), {
2277
+ T.visible !== !1 ? (w(), Ae(S(wa), {
2278
2278
  key: 0,
2279
- checked: v(R.value, a.value),
2280
- value: R.value,
2279
+ checked: v(T.value, a.value),
2280
+ value: T.value,
2281
2281
  class: ea([
2282
- ((j = b(i)) == null ? void 0 : j.errClass) === "error" ? "error !text-red-400" : "",
2282
+ ((j = S(i)) == null ? void 0 : j.errClass) === "error" ? "error !text-red-400" : "",
2283
2283
  "text-nowrap",
2284
2284
  "pb-1",
2285
2285
  e.wrap ? `w-1/${a.wrap}` : ""
2286
2286
  ])
2287
2287
  }, {
2288
2288
  default: Q(() => [
2289
- xe(Y(R.label), 1)
2289
+ xe(Y(T.label), 1)
2290
2290
  ]),
2291
2291
  _: 2
2292
2292
  }, 1032, ["checked", "value", "class"])) : z("", !0)
@@ -2297,10 +2297,10 @@ const B = new at(), ee = (e, t, a) => {
2297
2297
  }, 16, ["value"])
2298
2298
  ]));
2299
2299
  }
2300
- }), St = {
2300
+ }), bt = {
2301
2301
  key: 0,
2302
2302
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
2303
- }, ls = /* @__PURE__ */ Z({
2303
+ }, us = /* @__PURE__ */ Z({
2304
2304
  inheritAttrs: !1,
2305
2305
  __name: "index",
2306
2306
  props: {
@@ -2335,21 +2335,21 @@ const B = new at(), ee = (e, t, a) => {
2335
2335
  },
2336
2336
  emits: ["change", "update:value", "update:label", "update:labels"],
2337
2337
  setup(e, { emit: t }) {
2338
- var I, R, j;
2338
+ var I, T, j;
2339
2339
  const a = e, s = a.value === void 0 ? !0 : a.undefValue, n = X(), { editorCtrl: o, errInfo: r, labelText: l } = n, u = me(a.url, a), i = a.optionCtrl ?? u.optionCtrl;
2340
2340
  i.inputFactory = J(n);
2341
- const c = Ee(), p = f({
2341
+ const f = Ee(), p = c({
2342
2342
  ...i == null ? void 0 : i.url,
2343
2343
  url: ((I = i == null ? void 0 : i.url) == null ? void 0 : I.url) || "",
2344
- fieldMap: (i == null ? void 0 : i.fieldMap) || ((R = i == null ? void 0 : i.url) == null ? void 0 : R.fieldMap),
2344
+ fieldMap: (i == null ? void 0 : i.fieldMap) || ((T = i == null ? void 0 : i.url) == null ? void 0 : T.fieldMap),
2345
2345
  params: (i == null ? void 0 : i.params) || ((j = i == null ? void 0 : i.url) == null ? void 0 : j.params),
2346
2346
  loadingText: !1
2347
- }), v = f(c.placeholder), d = f(i == null ? void 0 : i.selected.value), O = t;
2347
+ }), v = c(f.placeholder), d = c(i == null ? void 0 : i.selected.value), O = t;
2348
2348
  n.inputEmit = O;
2349
2349
  const y = (m) => {
2350
2350
  const P = ke(i, a, m), D = Pe(P);
2351
2351
  d.value = m, O("update:labels", D), O("update:label", D.join(";")), O("change", m, P), r != null && r.value.errClass && o && de(o);
2352
- }, x = f((i == null ? void 0 : i.options.value) || []), h = (m) => {
2352
+ }, x = c((i == null ? void 0 : i.options.value) || []), h = (m) => {
2353
2353
  if (m.length > 0 && F(a.value) && a.selectFirst)
2354
2354
  for (let P = 0; P < m.length; P++) {
2355
2355
  const D = m[P];
@@ -2410,31 +2410,31 @@ const B = new at(), ee = (e, t, a) => {
2410
2410
  }), le(() => {
2411
2411
  i && he(i, a);
2412
2412
  }), (m, P) => {
2413
- var D, qe, We;
2413
+ var D, qe, Be;
2414
2414
  return w(), $("div", null, [
2415
- (qe = (D = b(i)) == null ? void 0 : D.url) != null && qe.loading ? (w(), $("div", St, [
2416
- C(b(De), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2415
+ (qe = (D = S(i)) == null ? void 0 : D.url) != null && qe.loading ? (w(), $("div", bt, [
2416
+ C(S(De), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2417
2417
  P[1] || (P[1] = ya("span", null, "数据加载中...", -1))
2418
2418
  ])) : z("", !0),
2419
- C(b(Oa), ue({
2420
- class: [(We = b(r)) == null ? void 0 : We.errClass, "w-full"],
2419
+ C(S(Oa), ue({
2420
+ class: [(Be = S(r)) == null ? void 0 : Be.errClass, "w-full"],
2421
2421
  value: d.value,
2422
- "onUpdate:value": P[0] || (P[0] = (W) => d.value = W),
2422
+ "onUpdate:value": P[0] || (P[0] = (B) => d.value = B),
2423
2423
  "allow-clear": !0,
2424
2424
  onChange: y,
2425
2425
  placeholder: v.value,
2426
2426
  "label-in-value": !1
2427
- }, b(c)), {
2427
+ }, S(f)), {
2428
2428
  default: Q(() => [
2429
- (w(!0), $(oe, null, Ue(x.value, (W) => (w(), $(oe, {
2430
- key: W.value
2429
+ (w(!0), $(oe, null, Ue(x.value, (B) => (w(), $(oe, {
2430
+ key: B.value
2431
2431
  }, [
2432
- W.visible !== !1 ? (w(), Ae(b(Ra), {
2432
+ B.visible !== !1 ? (w(), Ae(S(Ta), {
2433
2433
  key: 0,
2434
- value: W.value
2434
+ value: B.value
2435
2435
  }, {
2436
2436
  default: Q(() => [
2437
- xe(Y(W.label), 1)
2437
+ xe(Y(B.label), 1)
2438
2438
  ]),
2439
2439
  _: 2
2440
2440
  }, 1032, ["value"])) : z("", !0)
@@ -2445,72 +2445,82 @@ const B = new at(), ee = (e, t, a) => {
2445
2445
  ]);
2446
2446
  };
2447
2447
  }
2448
- });
2448
+ }), St = c(!1), cs = {
2449
+ label: "模板管理",
2450
+ key: "uploadTemp",
2451
+ type: "primary",
2452
+ icon: "icon-download",
2453
+ click: () => {
2454
+ St.value = !0;
2455
+ }
2456
+ };
2449
2457
  export {
2450
2458
  oa as $,
2451
2459
  Pe as A,
2452
2460
  de as B,
2453
- os as C,
2454
- is as D,
2455
- ls as E,
2461
+ is as C,
2462
+ ls as D,
2463
+ us as E,
2456
2464
  Qe as F,
2457
2465
  _a as G,
2458
- Bt as H,
2466
+ zt as H,
2459
2467
  rt as I,
2460
2468
  ot as J,
2461
- zt as K,
2469
+ Ct as K,
2462
2470
  Oe as L,
2463
- Ct as M,
2471
+ Yt as M,
2464
2472
  nt as N,
2465
2473
  N as O,
2466
2474
  U as P,
2467
2475
  ca as Q,
2468
- Yt as R,
2469
- Zt as S,
2476
+ Xt as R,
2477
+ es as S,
2470
2478
  pt as T,
2471
2479
  dt as U,
2472
- es as V,
2480
+ as as V,
2473
2481
  Xe as W,
2474
- as as X,
2482
+ ts as X,
2475
2483
  ra as Y,
2476
- Vt as Z,
2477
- ns as _,
2478
- ss as a,
2479
- $t as a0,
2480
- _t as a1,
2484
+ Kt as Z,
2485
+ rs as _,
2486
+ ns as a,
2487
+ Ft as a0,
2488
+ Nt as a1,
2481
2489
  Je as a2,
2482
- Ft as a3,
2483
- Jt as a4,
2490
+ _t as a3,
2491
+ jt as a4,
2484
2492
  et as a5,
2485
2493
  la as a6,
2486
- Gt as a7,
2487
- Mt as a8,
2494
+ qt as a7,
2495
+ $t as a8,
2488
2496
  na as a9,
2489
- Ba as aa,
2497
+ Wa as aa,
2490
2498
  Ne as ab,
2491
- B as ac,
2499
+ W as ac,
2492
2500
  re as ad,
2493
2501
  ne as ae,
2494
2502
  ye as af,
2495
2503
  K as ag,
2496
- ts as ah,
2504
+ ss as ah,
2497
2505
  Ve as ai,
2498
- ie as aj,
2499
- Ut as b,
2500
- Xt as c,
2501
- Ht as d,
2502
- Nt as e,
2503
- qt as f,
2506
+ St as aj,
2507
+ cs as ak,
2508
+ ie as al,
2509
+ Ht as b,
2510
+ Zt as c,
2511
+ Vt as d,
2512
+ Dt as e,
2513
+ Bt as f,
2504
2514
  Wt as g,
2505
- Qt as h,
2515
+ Jt as h,
2506
2516
  F as i,
2507
- Kt as j,
2517
+ Qt as j,
2508
2518
  ia as k,
2509
2519
  Za as l,
2510
- jt as m,
2520
+ Gt as m,
2511
2521
  Ca as n,
2512
- Dt as o,
2513
- rs as p,
2522
+ Ut as o,
2523
+ os as p,
2514
2524
  za as q,
2515
2525
  we as r,
2516
2526
  pe as s,