@skyfox2000/webui 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- var da = Object.defineProperty;
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 $ = (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";
1
+ var ha = Object.defineProperty;
2
+ var ma = (e, t, a) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
+ var $ = (e, t, a) => ma(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { inject as te, ref as f, provide as ke, watch as I, toRaw as Xe, h as D, nextTick as va, shallowRef as K, defineComponent as X, reactive as ga, onMounted as Ie, onUnmounted as ie, createBlock as xe, createCommentVNode as C, openBlock as O, unref as b, mergeProps as le, useAttrs as Ae, createElementBlock as L, createVNode as z, withCtx as V, createTextVNode as Ee, toDisplayString as W, Fragment as ne, renderList as Ue, normalizeClass as Ze, createElementVNode as ya } from "vue";
5
+ import { Switch as ba, AutoComplete as Sa, Input as Ia, CheckboxGroup as xa, Checkbox as Aa, RadioGroup as Ea, Radio as Oa, Select as Ra, SelectOption as Ta } from "ant-design-vue";
6
+ import { createPinia as wa, defineStore as ue } from "pinia";
7
+ import Pa from "pinia-plugin-persistedstate";
8
+ import { combineParams as Oe, EnvConfig as ge, AppAction as Be, AppSource as Ce, isMicroApp as ye, mainAppApis as _, isBaseMicroApp as ka } from "@skyfox2000/microbase";
9
+ import { ResStatus as T, httpPost as G, setToken as he, fieldMapping as La, parseFieldTemplate as be, API_HOST as Le, SERVER_HOST as $a } from "@skyfox2000/fapi";
10
10
  import x from "vue-m-message";
11
- import Ue from "async-validator";
12
- import { createRouter as $a, createWebHashHistory as Fa } from "vue-router";
11
+ import De from "async-validator";
12
+ import { createRouter as Fa, createWebHashHistory as Ma } from "vue-router";
13
13
  import "dayjs";
14
14
  import "vue-draggable-next";
15
- const Ma = Ta();
16
- Ma.use(wa);
17
- var N = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.LabelWidth = "FormItem.LabelWidth", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(N || {});
18
- const T = class T {
15
+ const Na = wa();
16
+ Na.use(Pa);
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
+ const w = class w {
19
19
  };
20
- $(T, "dict", {}), $(T, "Keys", {
20
+ $(w, "dict", {}), $(w, "Keys", {
21
21
  EnableDisable: "EnableDisable",
22
22
  SuccessResult: "SuccessResult",
23
23
  YesNo: "YesNo",
@@ -27,25 +27,25 @@ $(T, "dict", {}), $(T, "Keys", {
27
27
  * @param key 名称
28
28
  * @returns
29
29
  */
30
- $(T, "getOptions", (t) => T.dict[t]), /**
30
+ $(w, "getOptions", (t) => w.dict[t]), /**
31
31
  * 静态选择项对象
32
32
  * @param key 名称
33
33
  * @param value 值
34
34
  * @returns
35
35
  */
36
- $(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
36
+ $(w, "getOptionItem", (t, a) => w.dict[t].find((s) => s.value === a)), /**
37
37
  * 设置静态选择项
38
38
  * @param key 名称
39
39
  * @param list 列表
40
40
  */
41
- $(T, "setOptions", (t, a) => {
42
- T.dict[t] = a;
41
+ $(w, "setOptions", (t, a) => {
42
+ w.dict[t] = a;
43
43
  }), /**
44
44
  * 启用/停用选项
45
45
  * - 启用 1
46
46
  * - 停用 0
47
47
  */
48
- $(T, "EnableDisable", [
48
+ $(w, "EnableDisable", [
49
49
  {
50
50
  label: "启用",
51
51
  text: "✅ 启用",
@@ -61,7 +61,7 @@ $(T, "EnableDisable", [
61
61
  * - 成功 1
62
62
  * - 失败 0
63
63
  */
64
- $(T, "SuccessResult", [
64
+ $(w, "SuccessResult", [
65
65
  {
66
66
  label: "成功",
67
67
  text: "✅ 成功",
@@ -77,7 +77,7 @@ $(T, "SuccessResult", [
77
77
  * - 是 1
78
78
  * - 否 0
79
79
  */
80
- $(T, "YesNo", [
80
+ $(w, "YesNo", [
81
81
  {
82
82
  label: "是",
83
83
  text: "✅ 是",
@@ -93,7 +93,7 @@ $(T, "YesNo", [
93
93
  * - 男 M
94
94
  * - 女 F
95
95
  */
96
- $(T, "MaleFemale", [
96
+ $(w, "MaleFemale", [
97
97
  {
98
98
  label: "男",
99
99
  text: "男 👨",
@@ -105,12 +105,12 @@ $(T, "MaleFemale", [
105
105
  value: "F"
106
106
  }
107
107
  ]);
108
- let F = T;
108
+ let F = w;
109
109
  F.setOptions("EnableDisable", F.EnableDisable);
110
110
  F.setOptions("SuccessResult", F.SuccessResult);
111
111
  F.setOptions("YesNo", F.YesNo);
112
112
  F.setOptions("MaleFemale", F.MaleFemale);
113
- const ue = {
113
+ const ce = {
114
114
  /**
115
115
  * 选项数据接口
116
116
  */
@@ -173,7 +173,7 @@ const ue = {
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, Oe = (e, t) => {
176
+ }, P = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Re = (e, t) => {
177
177
  var n;
178
178
  const a = e.page;
179
179
  return {
@@ -183,7 +183,7 @@ const ue = {
183
183
  ...t.url,
184
184
  loadingText: t.loadingText
185
185
  };
186
- }, Re = (e, t) => {
186
+ }, Te = (e, t) => {
187
187
  const a = e.page, s = t.url;
188
188
  if (!s || !s.url) {
189
189
  const o = `URL未设置: ${t.urlKey}`;
@@ -191,12 +191,12 @@ const ue = {
191
191
  }
192
192
  s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
193
193
  let n = JSON.parse(JSON.stringify(t.params));
194
- 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));
195
- }, De = (e, t) => {
194
+ return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), G(s, n).then((o) => (t.loadingState && (t.loadingState.value = !1), o)).catch((o) => (t.loadingState && (t.loadingState.value = !1), null));
195
+ }, He = (e, t) => {
196
196
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
197
- const a = Oe(e, t);
198
- return t.url = a, Re(e, t);
199
- }, 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 = {}) => {
197
+ const a = Re(e, t);
198
+ return t.url = a, Te(e, t);
199
+ }, Lt = (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 || x.success("执行成功!")), a))), ea = (e, t = {}) => {
200
200
  const a = t.primaryKey || "Id";
201
201
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
202
202
  return x.error("错误!无保存数据!"), Promise.resolve(null);
@@ -206,9 +206,9 @@ const ue = {
206
206
  loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
207
207
  };
208
208
  s.params.Query[a] = s.params.Data[a];
209
- const n = Oe(e, s);
210
- return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === R.SUCCESS && (t.hideErrorToast || x.success("保存成功!")), o));
211
- }, Na = (e, t, a = {}) => {
209
+ const n = Re(e, s);
210
+ return s.url = n, Te(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || x.success("保存成功!")), o));
211
+ }, _a = (e, t, a = {}) => {
212
212
  const s = a.primaryKey || "Id";
213
213
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
214
214
  const n = {
@@ -218,18 +218,18 @@ const ue = {
218
218
  };
219
219
  if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], P(n.params.Query) || P(n.params.Query[s]))
220
220
  return x.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
221
- const o = Oe(e, n);
222
- return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === R.SUCCESS && (a.hideErrorToast || x.success("删除成功!")), r));
223
- }, _a = (e, t) => De(e, {
221
+ const o = Re(e, n);
222
+ return n.url = o, Te(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || x.success("删除成功!")), r));
223
+ }, Ua = (e, t) => He(e, {
224
224
  urlKey: "tree",
225
225
  params: {},
226
226
  loadingState: e.isTreeLoading,
227
227
  loadingText: !1,
228
- processParams: () => Ee(e.treeQuery, t)
229
- }).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
230
- let ne;
231
- const Lt = (e) => {
232
- ne = new Ue({}), ne.messages({
228
+ processParams: () => Oe(e.treeQuery, t)
229
+ }).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
230
+ let re;
231
+ const $t = (e) => {
232
+ re = new De({}), re.messages({
233
233
  required: "${label}不能为空",
234
234
  types: {
235
235
  number: "${label}必须是数字"
@@ -255,10 +255,10 @@ const Lt = (e) => {
255
255
  },
256
256
  ...e
257
257
  });
258
- }, $t = (e) => {
258
+ }, Ft = (e) => {
259
259
  if (!e || P(e))
260
260
  return [];
261
- const t = [], a = ne.messages(), s = (o, r, l) => {
261
+ const t = [], a = re.messages(), s = (o, r, l) => {
262
262
  const i = r.type;
263
263
  if (i && a.types && i in a.types) {
264
264
  const c = a.types[i];
@@ -309,22 +309,22 @@ const Lt = (e) => {
309
309
  rules: i
310
310
  });
311
311
  }), t;
312
- }, ce = async (e) => {
312
+ }, fe = async (e) => {
313
313
  const t = e.formData.value, a = e.formRules.value;
314
- 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
+ P(a) || (Ve(e), e.ruleValidator || (e.ruleValidator = new De({}), e.ruleValidator.messages(re.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
315
315
  }).catch(({ fields: s }) => s));
316
- }, Ft = async (e, t, a) => (a || (a = new Ue({}), a.messages(ne.messages()), a.define(t)), a.validate(e).then(() => {
317
- }).catch(({ fields: s }) => s)), He = (e) => {
316
+ }, Mt = async (e, t, a) => (a || (a = new De({}), a.messages(re.messages()), a.define(t)), a.validate(e).then(() => {
317
+ }).catch(({ fields: s }) => s)), Ve = (e) => {
318
318
  e.ruleResults.value = void 0;
319
- }, C = () => {
320
- const e = ae(N.EditorControl, void 0), t = f(ae(N.LabelText, "")), a = f(ae(N.RuleKey, "")), s = ae(N.ErrInfo, void 0);
319
+ }, Y = () => {
320
+ const e = te(U.EditorControl, void 0), t = f(te(U.LabelText, "")), a = f(te(U.RuleKey, "")), s = te(U.ErrInfo, void 0);
321
321
  return {
322
322
  editorCtrl: e,
323
323
  labelText: t,
324
324
  ruleKey: a,
325
325
  errInfo: s
326
326
  };
327
- }, Ua = (e, t) => {
327
+ }, Da = (e, t) => {
328
328
  let a = f({
329
329
  msg: "",
330
330
  errClass: ""
@@ -336,20 +336,20 @@ const Lt = (e) => {
336
336
  () => s == null ? void 0 : s.value,
337
337
  (n) => {
338
338
  if (a.value.errClass = "", a.value.msg = "", !P(n)) {
339
- const o = Da(
339
+ const o = Ha(
340
340
  {
341
341
  label: e.label,
342
342
  rule: e.rule
343
343
  },
344
344
  t == null ? void 0 : t.formRules.value,
345
- Ye(n)
345
+ Xe(n)
346
346
  );
347
347
  a.value.errClass = o.errClass.value, a.value.msg = o.msg.value;
348
348
  }
349
349
  },
350
350
  { deep: !0 }
351
351
  ), a;
352
- }, Da = (e, t, a) => {
352
+ }, Ha = (e, t, a) => {
353
353
  const s = f([]), n = f(""), o = f("");
354
354
  if (!e.rule || !t || !a)
355
355
  return { msg: n, ruleErrors: s, errClass: o };
@@ -376,26 +376,26 @@ const Lt = (e) => {
376
376
  });
377
377
  }
378
378
  }), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
379
- }, Mt = (e, t) => {
380
- Pe(N.LabelText, e.label || ""), Pe(N.RuleKey, e.rule || "");
381
- const a = Ua(e, t);
382
- return Pe(N.ErrInfo, a), a;
383
- }, Nt = (e) => {
384
- ea(e);
379
+ }, Nt = (e, t) => {
380
+ ke(U.LabelText, e.label || ""), ke(U.RuleKey, e.rule || "");
381
+ const a = Da(e, t);
382
+ return ke(U.ErrInfo, a), a;
385
383
  }, _t = (e) => {
386
- const t = e.page, a = e.formData.value;
387
- a[e.primaryKey ?? t.primaryKey] = null, ea(e);
384
+ aa(e);
388
385
  }, Ut = (e) => {
389
- Ve(e), e.visible.value = !1;
390
- }, ea = async (e) => {
386
+ const t = e.page, a = e.formData.value;
387
+ a[e.primaryKey ?? t.primaryKey] = null, aa(e);
388
+ }, Dt = (e) => {
389
+ Ke(e), e.visible.value = !1;
390
+ }, aa = async (e) => {
391
391
  var s;
392
392
  const t = e.page;
393
- if (e.isFormSaving.value = !0, He(e), e.beforeSave && e.beforeSave() === !1)
393
+ if (e.isFormSaving.value = !0, Ve(e), e.beforeSave && e.beforeSave() === !1)
394
394
  return e.isFormSaving.value = !1, Promise.resolve();
395
- if (e.formRules.value && await ce(e), e.ruleResults.value)
395
+ if (e.formRules.value && await fe(e), e.ruleResults.value)
396
396
  return x.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
397
397
  const a = e.formData.value;
398
- return Ze(
398
+ return ea(
399
399
  {
400
400
  page: t,
401
401
  // 转换为AnyControl接口
@@ -414,7 +414,7 @@ const Lt = (e) => {
414
414
  }
415
415
  ).then((n) => {
416
416
  var o, r;
417
- if ((n == null ? void 0 : n.status) === R.SUCCESS)
417
+ if ((n == null ? void 0 : n.status) === T.SUCCESS)
418
418
  x.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
419
419
  else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
420
420
  const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
@@ -437,45 +437,45 @@ const Lt = (e) => {
437
437
  } else
438
438
  x.error((n == null ? void 0 : n.msg) ?? "保存失败!");
439
439
  });
440
- }, Dt = async (e) => {
440
+ }, Ht = async (e) => {
441
441
  const t = e.page, a = e.grid;
442
442
  e.isFormLoading.value = !0;
443
443
  const s = e.formData.value, n = e.primaryKey ?? t.primaryKey;
444
- return ia(a, { [n]: s[n] }, e.detailUrl).then((o) => {
445
- e.isFormLoading.value = !1, o && aa(e, o);
444
+ return la(a, { [n]: s[n] }, e.detailUrl).then((o) => {
445
+ e.isFormLoading.value = !1, o && ta(e, o);
446
446
  });
447
- }, Ht = (e) => {
447
+ }, Vt = (e) => {
448
448
  const t = e.grid;
449
- t && (t.rowData.value = void 0), e && (Ve(e), e.visible && (e.visible.value = !1), setTimeout(() => {
449
+ t && (t.rowData.value = void 0), e && (Ke(e), e.visible && (e.visible.value = !1), setTimeout(() => {
450
450
  e.visible.value = !0;
451
451
  }, 1));
452
- }, aa = (e, t) => {
453
- Ve(e);
452
+ }, ta = (e, t) => {
453
+ Ke(e);
454
454
  const a = { ...e.formData.value, ...t };
455
455
  e.formData.value = JSON.parse(JSON.stringify(a));
456
- }, Ve = (e) => {
457
- e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, He(e);
458
- }, be = "/login/", me = [], Ha = (e) => {
456
+ }, Ke = (e) => {
457
+ e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Ve(e);
458
+ }, Se = "/login/", ve = [], Va = (e) => {
459
459
  for (const t of e) {
460
- const a = me.findIndex((s) => s.path === t.path);
461
- a !== -1 && me.splice(a, 1), me.push(t), re.addRoute(t);
460
+ const a = ve.findIndex((s) => s.path === t.path);
461
+ a !== -1 && ve.splice(a, 1), ve.push(t), oe.addRoute(t);
462
462
  }
463
- }, ta = (e, t, a, s = "") => {
463
+ }, sa = (e, t, a, s = "") => {
464
464
  const n = s + (s ? "/" : "") + e.path;
465
- t[n] = { ...e, parent: a }, e.children && e.children.forEach((o) => ta(o, t, e, n));
466
- }, re = $a({
467
- history: Fa("/"),
468
- routes: me
469
- }), Va = (e, t) => {
465
+ t[n] = { ...e, parent: a }, e.children && e.children.forEach((o) => sa(o, t, e, n));
466
+ }, oe = Fa({
467
+ history: Ma("/"),
468
+ routes: ve
469
+ }), Ka = (e, t) => {
470
470
  var n, o;
471
471
  const a = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (o = e.meta) == null ? void 0 : o.permission;
472
472
  if (!t)
473
473
  return a.length === 0 && !s;
474
474
  if (t) {
475
- const r = K();
476
- if (ve.VITE_PERMISSION_MODE === "role")
475
+ const r = j();
476
+ if (ge.VITE_PERMISSION_MODE === "role")
477
477
  return a.length === 0 ? !0 : r.hasRole(a);
478
- if (ve.VITE_PERMISSION_MODE === "permit") {
478
+ if (ge.VITE_PERMISSION_MODE === "permit") {
479
479
  if (a.length === 0 && !s)
480
480
  return !0;
481
481
  let l = !1, i = !1;
@@ -483,17 +483,17 @@ const Lt = (e) => {
483
483
  }
484
484
  }
485
485
  return !1;
486
- }, te = f(null);
487
- re.beforeEach((e, t, a) => {
486
+ }, se = f(null);
487
+ oe.beforeEach((e, t, a) => {
488
488
  var l;
489
489
  const s = e;
490
- if (e.path.startsWith("/error/") || e.path.startsWith(be))
490
+ if (e.path.startsWith("/error/") || e.path.startsWith(Se))
491
491
  return a();
492
492
  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);
493
493
  if (e.path === "/") {
494
- const i = U();
494
+ const i = H();
495
495
  if (!i.menuLoaded) {
496
- te.value = {
496
+ se.value = {
497
497
  to: e,
498
498
  next: (u) => {
499
499
  a({ path: u });
@@ -507,35 +507,35 @@ re.beforeEach((e, t, a) => {
507
507
  if (!r)
508
508
  a();
509
509
  else {
510
- const i = K();
510
+ const i = j();
511
511
  if (!i.isLogin)
512
- a({ path: be });
512
+ a({ path: Se });
513
513
  else {
514
- if (!U().menuLoaded) {
515
- te.value = {
514
+ if (!H().menuLoaded) {
515
+ se.value = {
516
516
  to: e,
517
517
  next: a
518
518
  };
519
519
  return;
520
520
  }
521
- const c = Va(s, i.isLogin);
521
+ const c = Ka(s, i.isLogin);
522
522
  a();
523
523
  }
524
524
  }
525
525
  });
526
- const Ka = (e) => {
527
- if (te.value) {
528
- const { to: t, next: a } = te.value;
529
- te.value = null, t.path === "/" ? a(e) : a(t.path);
526
+ const Qa = (e) => {
527
+ if (se.value) {
528
+ const { to: t, next: a } = se.value;
529
+ se.value = null, t.path === "/" ? a(e) : a(t.path);
530
530
  }
531
- }, Qa = (e) => {
532
- const t = Ke();
531
+ }, Ja = (e) => {
532
+ const t = Qe();
533
533
  if (t.TabEnabled) {
534
- if (Ja(e.key, t.TabPanes))
534
+ if (ja(e.key, t.TabPanes))
535
535
  return;
536
536
  t.TabPanes.push(e);
537
537
  }
538
- }, Ja = (e, t) => t.find((a) => a.key === e), Ke = le("pageInfo", {
538
+ }, ja = (e, t) => t.find((a) => a.key === e), Qe = ue("pageInfo", {
539
539
  state: () => ({
540
540
  TabActive: "",
541
541
  TabPanes: [],
@@ -548,7 +548,7 @@ const Ka = (e) => {
548
548
  */
549
549
  removeTabPane(e) {
550
550
  if (this.TabEnabled) {
551
- U().excludeComponent(e);
551
+ H().excludeComponent(e);
552
552
  let a = 0, s = [...this.TabPanes];
553
553
  for (let n = 0; n < s.length; n++)
554
554
  if (s[n].key === e) {
@@ -569,7 +569,7 @@ const Ka = (e) => {
569
569
  * @returns
570
570
  */
571
571
  async setTabActive(e) {
572
- let a = U().findRoute(e);
572
+ let a = H().findRoute(e);
573
573
  if (!a) return;
574
574
  const s = {
575
575
  key: e,
@@ -580,44 +580,44 @@ const Ka = (e) => {
580
580
  // 默认为true
581
581
  keepAlive: !(a.meta && !a.meta.keepAlive)
582
582
  };
583
- Qa(s), this.TabActive = e;
583
+ Ja(s), this.TabActive = e;
584
584
  }
585
585
  },
586
586
  persist: !1
587
- }), ja = {
587
+ }), Ga = {
588
588
  appList: {
589
589
  api: "PLATFORM_API",
590
590
  authorize: !0,
591
591
  url: "/api/RCTenanetOpSrv/getApps",
592
592
  loadingText: !1
593
593
  }
594
- }, Le = /* @__PURE__ */ new Map(), Ga = (e) => {
595
- const t = K(), { roles: a, permission: s } = e.meta || {};
594
+ }, $e = /* @__PURE__ */ new Map(), qa = (e) => {
595
+ const t = j(), { roles: a, permission: s } = e.meta || {};
596
596
  if (P(a) && P(s))
597
597
  return !0;
598
- if (ve.VITE_PERMISSION_MODE === "role")
598
+ if (ge.VITE_PERMISSION_MODE === "role")
599
599
  return P(a) ? !0 : t.hasRole(a);
600
- if (ve.VITE_PERMISSION_MODE === "permit") {
600
+ if (ge.VITE_PERMISSION_MODE === "permit") {
601
601
  let n = !1, o = !1;
602
602
  return P(a) || (n = t.hasRole(a)), t.isAdmin() ? n : (P(s) || (o = t.hasPermit(e.path, s)), n || o);
603
603
  }
604
604
  return !1;
605
- }, sa = (e) => e.map((t) => {
605
+ }, na = (e) => e.map((t) => {
606
606
  const a = { ...t };
607
- return Ga(a) ? (a.children && (a.children = sa(a.children)), a) : null;
608
- }).filter(Boolean), na = (e, t = "") => {
607
+ return qa(a) ? (a.children && (a.children = na(a.children)), a) : null;
608
+ }).filter(Boolean), ra = (e, t = "") => {
609
609
  for (const a of e) {
610
610
  if (!a.children && !a.redirect) {
611
611
  let s = t + a.path;
612
612
  return s.startsWith("/") || (s = "/" + s), s;
613
613
  }
614
614
  if (a.children && a.children.length > 0 && a.path !== "/error" && a.path !== "/login" && a.path !== "/:page(.*)") {
615
- const s = na(a.children, t + a.path + "/");
615
+ const s = ra(a.children, t + a.path + "/");
616
616
  if (s)
617
617
  return s;
618
618
  }
619
619
  }
620
- }, U = le("appInfo", {
620
+ }, H = ue("appInfo", {
621
621
  state: () => ({
622
622
  appInfo: {
623
623
  Id: "",
@@ -625,8 +625,8 @@ const Ka = (e) => {
625
625
  AppCode: "",
626
626
  Version: "",
627
627
  Host: "",
628
- Source: Be.Manual,
629
- Action: qe.App,
628
+ Source: Ce.Manual,
629
+ Action: Be.App,
630
630
  Path: "",
631
631
  Icon: "",
632
632
  Routes: [],
@@ -651,13 +651,13 @@ const Ka = (e) => {
651
651
  });
652
652
  },
653
653
  async getRemoteAppList() {
654
- return Q(ja.appList, {
654
+ return G(Ga.appList, {
655
655
  Query: {
656
656
  AppCode: this.appInfo.AppCode,
657
657
  Enabled: 1
658
658
  }
659
659
  }).then((e) => {
660
- (e == null ? void 0 : e.status) === R.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
660
+ (e == null ? void 0 : e.status) === T.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
661
661
  });
662
662
  },
663
663
  async toDefaultApp(e) {
@@ -690,7 +690,7 @@ const Ka = (e) => {
690
690
  flattenRoutes: {},
691
691
  Routes: t ?? [],
692
692
  defaultPage: ""
693
- }), (!ge() || !Pa()) && (await K().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
693
+ }), (!ye() || !ka()) && (await j().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
694
694
  },
695
695
  /**
696
696
  * 设置当前应用路由信息
@@ -705,18 +705,18 @@ const Ka = (e) => {
705
705
  };
706
706
  const t = this.appInfo.flattenRoutes;
707
707
  for (const a of e)
708
- ta(a, t, void 0);
708
+ sa(a, t, void 0);
709
709
  if (Object.keys(t).forEach((a) => {
710
710
  const s = t[a];
711
711
  s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
712
- }), K().isLogin) {
713
- const a = sa(this.appInfo.Routes);
714
- if (Ha(a), this.appInfo.defaultPage = na(a) || "", this.appInfo.defaultPage) {
715
- if (this.menuLoaded = !0, M.value && M.value.mainAppPush) {
712
+ }), j().isLogin) {
713
+ const a = na(this.appInfo.Routes);
714
+ if (Va(a), this.appInfo.defaultPage = ra(a) || "", this.appInfo.defaultPage) {
715
+ if (this.menuLoaded = !0, _.value && _.value.mainAppPush) {
716
716
  const s = this.formatRoute(this.appInfo.defaultPage);
717
- M.value.mainAppPush(s);
717
+ _.value.mainAppPush(s);
718
718
  }
719
- Ka(this.appInfo.defaultPage);
719
+ Qa(this.appInfo.defaultPage);
720
720
  }
721
721
  }
722
722
  },
@@ -734,10 +734,10 @@ const Ka = (e) => {
734
734
  * @param path 路由地址
735
735
  */
736
736
  push(e) {
737
- this.findRoute(e) && Ke().setTabActive(e), ma(() => {
738
- if (re.push({ path: e }), M.value && M.value.mainAppPush) {
737
+ this.findRoute(e) && Qe().setTabActive(e), va(() => {
738
+ if (oe.push({ path: e }), _.value && _.value.mainAppPush) {
739
739
  const a = this.formatRoute(e);
740
- M.value.mainAppPush(a);
740
+ _.value.mainAppPush(a);
741
741
  }
742
742
  });
743
743
  },
@@ -756,16 +756,16 @@ const Ka = (e) => {
756
756
  * @returns 组件实例
757
757
  */
758
758
  cacheComponent(e, t) {
759
- let a = Le.get(t.path);
759
+ let a = $e.get(t.path);
760
760
  if (!a)
761
761
  if (this.CachedComponents.includes(t.path))
762
762
  a = {
763
763
  // 设置组件包装器的名称为路由路径
764
764
  name: t.path,
765
765
  render() {
766
- return _(e);
766
+ return D(e);
767
767
  }
768
- }, Le.set(t.path, a);
768
+ }, $e.set(t.path, a);
769
769
  else return e;
770
770
  return a;
771
771
  },
@@ -774,7 +774,7 @@ const Ka = (e) => {
774
774
  * @param path 路由地址
775
775
  */
776
776
  excludeComponent(e) {
777
- this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Le.delete(e);
777
+ this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), $e.delete(e);
778
778
  },
779
779
  /**
780
780
  * 路由路径层级查询,返回面包屑
@@ -794,8 +794,8 @@ const Ka = (e) => {
794
794
  AppCode: "",
795
795
  Version: "",
796
796
  Host: "",
797
- Source: Be.Manual,
798
- Action: qe.App,
797
+ Source: Ce.Manual,
798
+ Action: Be.App,
799
799
  Path: "",
800
800
  Icon: "",
801
801
  Routes: [],
@@ -805,11 +805,11 @@ const Ka = (e) => {
805
805
  }, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
806
806
  },
807
807
  logout() {
808
- this.clean(), re.push({ path: be + "#/" }), ge() && M.value && M.value.mainAppPush && M.value.mainAppPush(be + "#/");
808
+ this.clean(), oe.push({ path: Se + "#/" }), ye() && _.value && _.value.mainAppPush && _.value.mainAppPush(Se + "#/");
809
809
  }
810
810
  },
811
811
  persist: !1
812
- }), ra = "Token解析失败", ze = "登录过期,请重新登录", Qe = {
812
+ }), oa = "Token解析失败", ze = "登录过期,请重新登录", Je = {
813
813
  login: {
814
814
  api: "PLATFORM_API",
815
815
  url: "/openapi/LoginSrv/login",
@@ -827,48 +827,48 @@ const Ka = (e) => {
827
827
  url: "/api/LoginSrv/logout",
828
828
  loadingText: "正在退出..."
829
829
  }
830
- }, qa = (e) => {
830
+ }, Ba = (e) => {
831
831
  let t = {
832
832
  Option: {
833
833
  Mode: "MicroApp"
834
834
  },
835
835
  Query: e
836
836
  };
837
- return Q(Qe.login, t).then((a) => (a == null ? void 0 : a.status) === R.SUCCESS ? a : null);
838
- }, Ba = (e) => {
837
+ return G(Je.login, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a : null);
838
+ }, Ca = (e) => {
839
839
  let t = {
840
840
  Query: {
841
841
  AppId: e
842
842
  }
843
843
  };
844
- 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
+ return G(Je.auth, t).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? a.data : (x.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
845
845
  }, za = () => {
846
846
  let e = {
847
847
  Option: {},
848
848
  Query: {}
849
849
  };
850
- return Q(Qe.logout, e).then((t) => (t == null ? void 0 : t.status) === R.SUCCESS ? t.data : null);
851
- }, Ca = (e) => {
850
+ return G(Je.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
851
+ }, Wa = (e) => {
852
852
  try {
853
853
  const a = JSON.parse(atob(e.split(".")[1])).exp;
854
854
  return Date.now() / 1e3 > a;
855
855
  } catch (t) {
856
- return console.error(ra, t), !0;
856
+ return console.error(oa, t), !0;
857
857
  }
858
- }, $e = (e, t) => e == "" ? (x.error(ze, {
858
+ }, Fe = (e, t) => e == "" ? (x.error(ze, {
859
859
  duration: 3e3,
860
860
  onClose: t
861
- }), !1) : Ca(e) ? (x.error(ze, {
861
+ }), !1) : Wa(e) ? (x.error(ze, {
862
862
  duration: 3e3,
863
863
  onClose: t
864
- }), !1) : !0, Wa = (e) => {
864
+ }), !1) : !0, Ya = (e) => {
865
865
  try {
866
866
  const t = JSON.parse(atob(e.token.split(".")[1]));
867
867
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
868
868
  } catch (t) {
869
- return console.error(ra, t), !1;
869
+ return console.error(oa, t), !1;
870
870
  }
871
- }, k = f(""), Z = f(null), K = le("userInfo", {
871
+ }, k = f(""), ee = f(null), j = ue("userInfo", {
872
872
  state: () => ({
873
873
  isLogin: !1,
874
874
  userInfo: {
@@ -886,7 +886,7 @@ const Ka = (e) => {
886
886
  * 启动时初始化用户信息
887
887
  */
888
888
  init() {
889
- ge() || (this.token ? ($e(this.token, () => this.clean()), de(this.token), k.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
889
+ ye() || (this.token ? (Fe(this.token, () => this.clean()), he(this.token), k.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
890
890
  },
891
891
  /**
892
892
  * 登录操作
@@ -894,14 +894,14 @@ const Ka = (e) => {
894
894
  * @returns
895
895
  */
896
896
  async login(e, t) {
897
- const a = await qa(e);
897
+ const a = await Ba(e);
898
898
  if (a) {
899
899
  const s = a;
900
900
  if (s.errno)
901
901
  return s;
902
902
  {
903
903
  const n = a.data;
904
- if (this.token = n.token, de(this.token), this.isLogin = !0, Wa(n))
904
+ if (this.token = n.token, he(this.token), this.isLogin = !0, Ya(n))
905
905
  this.userInfo = {
906
906
  ...this.userInfo,
907
907
  ...n.UserInfo
@@ -910,7 +910,7 @@ const Ka = (e) => {
910
910
  x.error("用户信息解析失败");
911
911
  return;
912
912
  }
913
- t && U().toDefaultApp();
913
+ t && H().toDefaultApp();
914
914
  }
915
915
  }
916
916
  },
@@ -922,11 +922,11 @@ const Ka = (e) => {
922
922
  async getRolePermits(e) {
923
923
  if (!this.isLogin || !this.token)
924
924
  return !1;
925
- if (Z.value && Z.value.appId === e)
925
+ if (ee.value && ee.value.appId === e)
926
926
  return !0;
927
927
  try {
928
- const t = await Ba(e);
929
- return t ? (Z.value = {
928
+ const t = await Ca(e);
929
+ return t ? (ee.value = {
930
930
  appId: e,
931
931
  permits: t.permits || [],
932
932
  lastTime: t.lastTime
@@ -951,7 +951,7 @@ const Ka = (e) => {
951
951
  */
952
952
  hasPermit(e, t) {
953
953
  var s;
954
- const a = Z.value;
954
+ const a = ee.value;
955
955
  return !a || !a.permits ? !1 : ((s = a.permits[e]) == null ? void 0 : s.includes(t)) ?? !1;
956
956
  },
957
957
  /**
@@ -968,21 +968,21 @@ const Ka = (e) => {
968
968
  * @param token 用户Token
969
969
  */
970
970
  setUserInfo(e, t) {
971
- if (!$e(t)) {
971
+ if (!Fe(t)) {
972
972
  this.clean();
973
973
  return;
974
974
  }
975
975
  k.value || (k.value = e.UserLevel, this.userInfo = {
976
976
  ...this.userInfo,
977
977
  ...e
978
- }, this.token = t, de(this.token), this.isLogin = !0);
978
+ }, this.token = t, he(this.token), this.isLogin = !0);
979
979
  },
980
980
  /**
981
981
  * 获取用户Token
982
982
  * @returns 用户Token
983
983
  */
984
984
  getToken() {
985
- return $e(this.token, () => {
985
+ return Fe(this.token, () => {
986
986
  this.clean(), this.logout();
987
987
  }) ? this.token : "";
988
988
  },
@@ -1015,7 +1015,7 @@ const Ka = (e) => {
1015
1015
  Code: "",
1016
1016
  TenantId: "",
1017
1017
  UserLevel: ""
1018
- }, this.token = "", de(this.token), this.isLogin = !1, Z.value = null, k.value = "", U().clean(), Promise.resolve();
1018
+ }, this.token = "", he(this.token), this.isLogin = !1, ee.value = null, k.value = "", H().clean(), Promise.resolve();
1019
1019
  },
1020
1020
  /**
1021
1021
  * 登出操作
@@ -1030,13 +1030,13 @@ const Ka = (e) => {
1030
1030
  await this.clean(), setTimeout(async () => {
1031
1031
  x.success("已退出登录");
1032
1032
  }, 1e3), setTimeout(async () => {
1033
- U().logout();
1033
+ H().logout();
1034
1034
  }, 2e3);
1035
1035
  }
1036
1036
  return Promise.resolve();
1037
1037
  }
1038
1038
  },
1039
- persist: ge() ? !1 : {
1039
+ persist: ye() ? !1 : {
1040
1040
  key: "MICROAPP_USER_INFO",
1041
1041
  storage: localStorage,
1042
1042
  pick: ["token", "userInfo"],
@@ -1045,9 +1045,9 @@ const Ka = (e) => {
1045
1045
  e.store.init();
1046
1046
  }
1047
1047
  }
1048
- }), Vt = (e, t) => {
1049
- const a = K();
1050
- 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) => {
1048
+ }), Kt = (e, t) => {
1049
+ const a = j();
1050
+ return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(oe.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
1051
1051
  if (!t) {
1052
1052
  if (n.visible === !1)
1053
1053
  return !1;
@@ -1056,7 +1056,7 @@ const Ka = (e) => {
1056
1056
  }
1057
1057
  return !0;
1058
1058
  });
1059
- }, Kt = (e, t) => {
1059
+ }, Qt = (e, t) => {
1060
1060
  const a = t == null ? void 0 : t.filter((s) => {
1061
1061
  const n = e.find(
1062
1062
  (o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
@@ -1064,20 +1064,20 @@ const Ka = (e) => {
1064
1064
  return n ? { ...s, ...n } : !1;
1065
1065
  });
1066
1066
  return [...a || [], ...e.filter((s) => !(a != null && a.includes(s)))];
1067
- }, Ya = (e) => (e.remotePage = !1, oa(e).then((t) => t.rows)), oa = (e) => {
1067
+ }, Xa = (e) => (e.remotePage = !1, ia(e).then((t) => t.rows)), ia = (e) => {
1068
1068
  e.gridQuery || (e.gridQuery = {});
1069
1069
  const t = e.remotePage ? "find" : "list";
1070
- return De(e, {
1070
+ return He(e, {
1071
1071
  urlKey: t,
1072
1072
  url: e.gridUrl,
1073
1073
  params: e.gridQuery,
1074
1074
  loadingState: e.isGridLoading,
1075
1075
  processParams: (a) => {
1076
1076
  var n;
1077
- 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);
1077
+ return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Oe((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1078
1078
  }
1079
1079
  }).then((a) => {
1080
- if ((a == null ? void 0 : a.status) === R.SUCCESS) {
1080
+ if ((a == null ? void 0 : a.status) === T.SUCCESS) {
1081
1081
  let s = a.data;
1082
1082
  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 = {
1083
1083
  total: e.total.value,
@@ -1089,7 +1089,7 @@ const Ka = (e) => {
1089
1089
  rows: []
1090
1090
  };
1091
1091
  });
1092
- }, Xa = (e, t, a = {}) => Ze(e, {
1092
+ }, Za = (e, t, a = {}) => ea(e, {
1093
1093
  urlKey: "update",
1094
1094
  url: e.updateUrl,
1095
1095
  params: {
@@ -1098,39 +1098,39 @@ const Ka = (e) => {
1098
1098
  },
1099
1099
  loadingState: e.isGridSaving,
1100
1100
  ...a
1101
- }).then((s) => ((s == null ? void 0 : s.status) === R.SUCCESS && setTimeout(() => {
1101
+ }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
1102
1102
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1103
- }, 50), s)), Qt = (e, t) => {
1103
+ }, 50), s)), Jt = (e, t) => {
1104
1104
  const a = {};
1105
- return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Xa(e, a, {
1105
+ return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Za(e, a, {
1106
1106
  loadingText: !1,
1107
1107
  hideErrorToast: !0
1108
1108
  });
1109
- }, ia = async (e, t, a) => await De(e, {
1109
+ }, la = async (e, t, a) => await He(e, {
1110
1110
  urlKey: "detail",
1111
1111
  url: a,
1112
1112
  params: t,
1113
1113
  loadingState: e.isGridLoading
1114
- }), Jt = (e, t) => {
1114
+ }), jt = (e, t) => {
1115
1115
  const a = t;
1116
- 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));
1117
- }, jt = (e, t) => {
1116
+ 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));
1117
+ }, Gt = (e, t) => {
1118
1118
  let a = e.editor;
1119
- e.rowData.value = t, a && (aa(a, t), a.visible.value = !0);
1120
- }, Gt = (e, t) => Na(e, t, {
1119
+ e.rowData.value = t, a && (ta(a, t), a.visible.value = !0);
1120
+ }, qt = (e, t) => _a(e, t, {
1121
1121
  url: e.deleteUrl,
1122
1122
  primaryKey: e.primaryKey
1123
- }).then((a) => ((a == null ? void 0 : a.status) === R.SUCCESS && setTimeout(() => {
1123
+ }).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && setTimeout(() => {
1124
1124
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1125
1125
  }, 50), a));
1126
- 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 || {});
1127
- class Za {
1126
+ 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 || {});
1127
+ class et {
1128
1128
  constructor() {
1129
1129
  $(this, "listeners", {});
1130
1130
  }
1131
1131
  // 检查事件名是否符合前缀
1132
1132
  isValidPrefix(t) {
1133
- return Object.values(Me).some((a) => t.startsWith(a + "."));
1133
+ return Object.values(Ne).some((a) => t.startsWith(a + "."));
1134
1134
  }
1135
1135
  /**
1136
1136
  * 事件订阅
@@ -1139,7 +1139,7 @@ class Za {
1139
1139
  */
1140
1140
  on(t, a) {
1141
1141
  if (!this.isValidPrefix(t)) {
1142
- console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Me).join(", ")} 开头`);
1142
+ console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Ne).join(", ")} 开头`);
1143
1143
  return;
1144
1144
  }
1145
1145
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
@@ -1170,51 +1170,51 @@ class Za {
1170
1170
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1171
1171
  }
1172
1172
  }
1173
- const G = new Za(), Y = (e, t, a) => {
1173
+ const B = new et(), Z = (e, t, a) => {
1174
1174
  if (t.inputFactory && (a != null && a.reloadEvent)) {
1175
1175
  const s = t.inputFactory.value;
1176
1176
  s.reloadHandler = (n, o) => {
1177
- et(t.url, t, o);
1178
- }, G.on(a.reloadEvent, s.reloadHandler);
1177
+ at(t.url, t, o);
1178
+ }, B.on(a.reloadEvent, s.reloadHandler);
1179
1179
  }
1180
1180
  if (a != null && a.data)
1181
1181
  I(
1182
1182
  () => a.data,
1183
1183
  () => {
1184
- Je(t, a.data, !0);
1184
+ je(t, a.data, !0);
1185
1185
  },
1186
1186
  { deep: !0, immediate: !0 }
1187
1187
  );
1188
1188
  else if (t.url && t.url.url)
1189
- e && la(t.url, t, t.params ?? {});
1189
+ e && ua(t.url, t, t.params ?? {});
1190
1190
  else {
1191
- const s = f(ae(N.LabelText, ""));
1191
+ const s = f(te(U.LabelText, ""));
1192
1192
  x.error("`" + s.value + "` 未配置选项数据!", {
1193
1193
  duration: 5e3
1194
1194
  });
1195
1195
  }
1196
- }, Je = (e, t, a) => {
1196
+ }, je = (e, t, a) => {
1197
1197
  if (a) {
1198
1198
  const s = {
1199
1199
  ...e.fieldMap
1200
1200
  };
1201
- t = ka(s, t);
1201
+ t = La(s, t);
1202
1202
  }
1203
1203
  t = JSON.parse(JSON.stringify(t ?? [])), e.all && t.unshift({
1204
1204
  label: "全部",
1205
1205
  value: e.allValue ?? void 0
1206
1206
  }), e.options.value = t;
1207
- }, et = (e, t, a) => {
1208
- Array.isArray(a) ? Je(t, a, !0) : la(e, t, a);
1209
- }, fe = (e, t) => {
1207
+ }, at = (e, t, a) => {
1208
+ Array.isArray(a) ? je(t, a, !0) : ua(e, t, a);
1209
+ }, pe = (e, t) => {
1210
1210
  var a;
1211
- (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && G.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1212
- }, la = (e, t, a) => {
1213
- const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = Ee(s, n, a);
1214
- at(e, t, t.fieldMap, o).then((r) => {
1215
- Je(t, r, !1);
1211
+ (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && B.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1212
+ }, ua = (e, t, a) => {
1213
+ const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = Oe(s, n, a);
1214
+ tt(e, t, t.fieldMap, o).then((r) => {
1215
+ je(t, r, !1);
1216
1216
  });
1217
- }, at = (e, t, a, s) => {
1217
+ }, tt = (e, t, a, s) => {
1218
1218
  const { fieldMap: n, ...o } = e, l = {
1219
1219
  ...{
1220
1220
  url: "",
@@ -1226,10 +1226,10 @@ const G = new Za(), Y = (e, t, a) => {
1226
1226
  },
1227
1227
  ...o
1228
1228
  };
1229
- 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(() => {
1229
+ return l.loadingText = !1, s || (s = {}), s.Query || (s.Query = {}), t.optionQuery = s, t.isOptionLoading.value = !0, G(l, s).then((i) => (i == null ? void 0 : i.status) === T.SUCCESS && i.data ? i.data : []).finally(() => {
1230
1230
  t.isOptionLoading.value = !1;
1231
1231
  });
1232
- }, tt = (e, t, a) => {
1232
+ }, st = (e, t, a) => {
1233
1233
  if (e === void 0) return;
1234
1234
  const s = (o) => {
1235
1235
  const r = { ...o };
@@ -1249,7 +1249,7 @@ const G = new Za(), Y = (e, t, a) => {
1249
1249
  const o = n([e], t);
1250
1250
  return o.length > 0 ? o[0] : void 0;
1251
1251
  }
1252
- }, Te = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], ee = (e, t, a) => {
1252
+ }, we = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], ae = (e, t, a) => {
1253
1253
  const s = t.split(".");
1254
1254
  let n = e;
1255
1255
  for (let o = 0; o < s.length - 1; o++) {
@@ -1257,10 +1257,10 @@ const G = new Za(), Y = (e, t, a) => {
1257
1257
  n[r] || (n[r] = {}), n = n[r];
1258
1258
  }
1259
1259
  n[s[s.length - 1]] = a;
1260
- }, ua = (e, t, a) => {
1260
+ }, ca = (e, t, a) => {
1261
1261
  if (a == null) {
1262
1262
  Object.entries(t).forEach(([s]) => {
1263
- ee(e, s, a);
1263
+ ae(e, s, a);
1264
1264
  });
1265
1265
  return;
1266
1266
  }
@@ -1270,10 +1270,10 @@ const G = new Za(), Y = (e, t, a) => {
1270
1270
  try {
1271
1271
  const l = parseInt(((r = n.match(/\$\{(\d+)\}/)) == null ? void 0 : r[1]) ?? "0"), i = a[l], u = n.replace(/\$\{\d+\}\./, "");
1272
1272
  if (u && i) {
1273
- const c = ye(u, i);
1274
- ee(e, s, c);
1273
+ const c = be(u, i);
1274
+ ae(e, s, c);
1275
1275
  } else
1276
- ee(e, s, i);
1276
+ ae(e, s, i);
1277
1277
  } catch {
1278
1278
  console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
1279
1279
  }
@@ -1281,42 +1281,42 @@ const G = new Za(), Y = (e, t, a) => {
1281
1281
  console.error("outFields 格式错误:" + n, "必须是 ${index} 或者 ${index}.${key}");
1282
1282
  }) : Object.entries(t).forEach(([s, n]) => {
1283
1283
  if (n.includes("${")) {
1284
- const o = ye(n, a);
1285
- ee(e, s, o);
1284
+ const o = be(n, a);
1285
+ ae(e, s, o);
1286
1286
  } else
1287
- ee(e, s, a[n]);
1287
+ ae(e, s, a[n]);
1288
1288
  });
1289
- }, we = (e, t, a) => {
1289
+ }, Pe = (e, t, a) => {
1290
1290
  var o, r;
1291
1291
  const s = (o = e.inputFactory) == null ? void 0 : o.value;
1292
- s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && ce(s.editorCtrl), e.selected.value = a;
1293
- const n = tt(a, e.options.value);
1294
- if (e.selectedOptions.value = n, t.formData && t.outFields && ua(t.formData, t.outFields, n), t.changeEvent) {
1292
+ s != null && s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && fe(s.editorCtrl), e.selected.value = a;
1293
+ const n = st(a, e.options.value);
1294
+ if (e.selectedOptions.value = n, t.formData && t.outFields && ca(t.formData, t.outFields, n), t.changeEvent) {
1295
1295
  const [l, i] = t.changeEvent;
1296
1296
  if (i)
1297
1297
  if (Array.isArray(l))
1298
1298
  l.every((u) => {
1299
- const c = ye(i, { selectedValues: a });
1299
+ const c = be(i, { selectedValues: a });
1300
1300
  try {
1301
1301
  const p = JSON.parse(c);
1302
- G.emit(u, p, a, n);
1302
+ B.emit(u, p, a, n);
1303
1303
  } catch (p) {
1304
1304
  console.error("eventParamsValue: ", c, p);
1305
1305
  }
1306
1306
  });
1307
1307
  else {
1308
- const u = ye(i, { selectedValues: a });
1308
+ const u = be(i, { selectedValues: a });
1309
1309
  try {
1310
1310
  const c = JSON.parse(u);
1311
- G.emit(l, c, a, n);
1311
+ B.emit(l, c, a, n);
1312
1312
  } catch (c) {
1313
1313
  console.error("eventParamsValue: ", u, c);
1314
1314
  }
1315
1315
  }
1316
1316
  else
1317
1317
  Array.isArray(l) ? l.every((u) => {
1318
- G.emit(u, n, a);
1319
- }) : G.emit(l, n, a);
1318
+ B.emit(u, n, a);
1319
+ }) : B.emit(l, n, a);
1320
1320
  }
1321
1321
  return s != null && s.inputEmit && s.inputEmit("change", a, n), n;
1322
1322
  }, y = {
@@ -1357,7 +1357,7 @@ const G = new Za(), Y = (e, t, a) => {
1357
1357
  value: "Id"
1358
1358
  }
1359
1359
  }
1360
- }, qt = (e) => {
1360
+ }, Bt = (e) => {
1361
1361
  y.PageOption = {
1362
1362
  ...y.PageOption,
1363
1363
  ...e.pageOption
@@ -1371,7 +1371,7 @@ const G = new Za(), Y = (e, t, a) => {
1371
1371
  ...y.TreeOption,
1372
1372
  ...e.treeOption
1373
1373
  };
1374
- }, st = (e, t, a, s) => ({
1374
+ }, nt = (e, t, a, s) => ({
1375
1375
  editorCtrl: {
1376
1376
  ...y.EditorOption,
1377
1377
  name: "",
@@ -1387,7 +1387,7 @@ const G = new Za(), Y = (e, t, a) => {
1387
1387
  isFormSaving: f(!1),
1388
1388
  isFormLoading: f(!1)
1389
1389
  }
1390
- }), nt = (e, t, a) => {
1390
+ }), rt = (e, t, a) => {
1391
1391
  const s = {
1392
1392
  ...y.GridOption,
1393
1393
  tableSize: f(y.GridOption.tableSize.value),
@@ -1407,7 +1407,7 @@ const G = new Za(), Y = (e, t, a) => {
1407
1407
  selectRows: f([]),
1408
1408
  rowData: f(void 0),
1409
1409
  gridQuery: {},
1410
- tableData: H(void 0),
1410
+ tableData: K(void 0),
1411
1411
  expandRows: f({}),
1412
1412
  isGridLoading: f(!1),
1413
1413
  isGridSaving: f(!1),
@@ -1420,19 +1420,19 @@ const G = new Za(), Y = (e, t, a) => {
1420
1420
  (n) => {
1421
1421
  n && (setTimeout(() => {
1422
1422
  s.reload.value = !1;
1423
- }, 1), s.remotePage ? oa(s) : Ya(s));
1423
+ }, 1), s.remotePage ? ia(s) : Xa(s));
1424
1424
  }
1425
1425
  ), {
1426
1426
  gridCtrl: s
1427
1427
  };
1428
- }, Bt = (e, t) => {
1428
+ }, Ct = (e, t) => {
1429
1429
  const a = {
1430
1430
  ...y.TreeOption,
1431
1431
  reload: f(!1),
1432
1432
  page: t,
1433
1433
  node: f(void 0),
1434
1434
  url: e.urls.tree,
1435
- data: H(void 0),
1435
+ data: K(void 0),
1436
1436
  isTreeLoading: f(!1)
1437
1437
  };
1438
1438
  return I(
@@ -1440,18 +1440,18 @@ const G = new Za(), Y = (e, t, a) => {
1440
1440
  (s) => {
1441
1441
  s && (setTimeout(() => {
1442
1442
  a.reload.value = !1;
1443
- }, 1), _a(a));
1443
+ }, 1), Ua(a));
1444
1444
  }
1445
1445
  ), {
1446
1446
  treeCtrl: a
1447
1447
  };
1448
- }, pe = (e, t) => {
1448
+ }, de = (e, t) => {
1449
1449
  const a = {
1450
1450
  ...y.OptionOption,
1451
1451
  url: e,
1452
1452
  reload: f(!1),
1453
1453
  optionQuery: {},
1454
- data: H([]),
1454
+ data: K([]),
1455
1455
  selected: f([]),
1456
1456
  selectedOptions: f([]),
1457
1457
  options: f([]),
@@ -1462,7 +1462,7 @@ const G = new Za(), Y = (e, t, a) => {
1462
1462
  (s) => {
1463
1463
  s && (setTimeout(() => {
1464
1464
  a.reload.value = !1;
1465
- }, 1), Y(!0, a, t));
1465
+ }, 1), Z(!0, a, t));
1466
1466
  }
1467
1467
  ), {
1468
1468
  optionCtrl: a
@@ -1473,20 +1473,20 @@ const G = new Za(), Y = (e, t, a) => {
1473
1473
  const s = {
1474
1474
  ...y.PageOption,
1475
1475
  ...e
1476
- }, { editorCtrl: n } = st(e, s, t, a), { gridCtrl: o } = nt(e, s);
1476
+ }, { editorCtrl: n } = nt(e, s, t, a), { gridCtrl: o } = rt(e, s);
1477
1477
  return s.editor = n, s.grid = o, o.editor = n, o.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], n.grid = o, {
1478
1478
  pageCtrl: s,
1479
1479
  editorCtrl: n,
1480
1480
  gridCtrl: o
1481
1481
  };
1482
- }, rt = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Set(), V = f({}), Ct = V, Wt = (e) => {
1482
+ }, ot = 7 * 24 * 60 * 60 * 1e3, Me = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Set(), J = f({}), Wt = J, Yt = (e) => {
1483
1483
  var n;
1484
- if (!e.iconUrl) return Ne;
1484
+ if (!e.iconUrl) return _e;
1485
1485
  const t = f(!0), a = f("");
1486
1486
  let s = !0;
1487
- 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(() => {
1488
- ut(e.iconUrl, e.monoColor || !1), t.value = !0;
1489
- }), W({
1487
+ return (n = e.icons) != null && n.length && (s = e.icons.every((o) => J.value[o] !== void 0)), (e.icon && !J.value[e.icon] || !s) && it(e, t).then(() => {
1488
+ ct(e.iconUrl, e.monoColor || !1), t.value = !0;
1489
+ }), X({
1490
1490
  props: {
1491
1491
  icon: {
1492
1492
  type: String
@@ -1525,54 +1525,54 @@ const G = new Za(), Y = (e, t, a) => {
1525
1525
  ), I(
1526
1526
  () => i.value,
1527
1527
  (c) => {
1528
- 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));
1528
+ o.icons && (c >= o.icons.length && (i.value = 0), l.value = o.icons[i.value], me(a, l, l.value), r("update:iconIndex", i.value));
1529
1529
  },
1530
1530
  { immediate: !0 }
1531
1531
  ), I(
1532
- () => V.value,
1532
+ () => J.value,
1533
1533
  () => {
1534
- he(a, l, l.value);
1534
+ me(a, l, l.value);
1535
1535
  },
1536
1536
  { deep: !0 }
1537
1537
  ), I(
1538
1538
  () => o.icon,
1539
1539
  (c) => {
1540
- he(a, l, c);
1540
+ me(a, l, c);
1541
1541
  }
1542
- ), he(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1542
+ ), me(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1543
1543
  },
1544
1544
  render() {
1545
1545
  if (!t.value)
1546
- return Ne;
1546
+ return _e;
1547
1547
  let o = this.class, r = "";
1548
1548
  Array.isArray(o) ? r = o.join(" ") : typeof o == "string" && (r = o);
1549
1549
  let l = [r];
1550
- return !/\bw-/.test(r) && !/$w-/.test(r) && l.push("w-4"), !/\bh-/.test(r) && !/$h-/.test(r) && l.push("h-4"), a.value ? _(Ye(a.value), {
1550
+ return !/\bw-/.test(r) && !/$w-/.test(r) && l.push("w-4"), !/\bh-/.test(r) && !/$h-/.test(r) && l.push("h-4"), a.value ? D(Xe(a.value), {
1551
1551
  onClick: this.$props.clickable ? this.handleClick : void 0,
1552
1552
  class: `${l.join(" ")}`,
1553
1553
  style: {
1554
1554
  fill: "currentColor",
1555
1555
  cursor: this.$props.clickable ? "pointer" : "default",
1556
- transform: ft(this.angle, this.flip)
1556
+ transform: pt(this.angle, this.flip)
1557
1557
  }
1558
- }) : _("div", { class: "w-[14px] h-[14px]" });
1558
+ }) : D("div", { class: "w-[14px] h-[14px]" });
1559
1559
  }
1560
1560
  });
1561
- }, ot = (e, t) => {
1561
+ }, it = (e, t) => {
1562
1562
  let a = e.iconUrl;
1563
1563
  if (!a)
1564
1564
  return console.error("图标库地址不能为空"), Promise.resolve();
1565
- if (Fe.has(a))
1565
+ if (Me.has(a))
1566
1566
  return Promise.resolve();
1567
- const s = fa(a);
1567
+ const s = pa(a);
1568
1568
  if (s)
1569
- return new Promise(async (o) => (ca(s.scriptContent), o()));
1569
+ return new Promise(async (o) => (fa(s.scriptContent), o()));
1570
1570
  t.value = !1;
1571
1571
  const n = new Promise(async (o) => {
1572
- await it(a, e.monoColor || !1), o(), Fe.delete(a);
1572
+ await lt(a, e.monoColor || !1), o(), Me.delete(a);
1573
1573
  });
1574
- return Fe.set(a, n), n;
1575
- }, it = async (e, t) => {
1574
+ return Me.set(a, n), n;
1575
+ }, lt = async (e, t) => {
1576
1576
  try {
1577
1577
  const a = await fetch(e);
1578
1578
  if (!a.ok) {
@@ -1585,27 +1585,27 @@ const G = new Za(), Y = (e, t, a) => {
1585
1585
  const o = s.match(n);
1586
1586
  if (o && o.length > 1) {
1587
1587
  let r = o[1];
1588
- lt(e, r, t, s);
1588
+ ut(e, r, t, s);
1589
1589
  }
1590
- ca(s);
1590
+ fa(s);
1591
1591
  return;
1592
1592
  } catch (a) {
1593
1593
  return console.error("网络异常,无法加载图标库:", a), null;
1594
1594
  }
1595
- }, ca = (e) => {
1595
+ }, fa = (e) => {
1596
1596
  const t = document.createElement("script");
1597
1597
  t.textContent = e, document.head.appendChild(t);
1598
- }, lt = (e, t, a, s) => {
1598
+ }, ut = (e, t, a, s) => {
1599
1599
  let n = `icon_cache:${e}`;
1600
1600
  const o = {
1601
1601
  windowKey: t,
1602
1602
  monoColor: a,
1603
1603
  scriptContent: s,
1604
- expireTime: Date.now() + rt
1604
+ expireTime: Date.now() + ot
1605
1605
  // 缓存时间:7天
1606
1606
  };
1607
1607
  localStorage.setItem(n, JSON.stringify(o));
1608
- }, fa = (e) => {
1608
+ }, pa = (e) => {
1609
1609
  let t = `icon_cache:${e}`;
1610
1610
  const a = localStorage.getItem(t);
1611
1611
  if (!a) return null;
@@ -1616,22 +1616,22 @@ const G = new Za(), Y = (e, t, a) => {
1616
1616
  return console.error("解析缓存失败:", n), null;
1617
1617
  }
1618
1618
  return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
1619
- }, Yt = () => {
1619
+ }, Xt = () => {
1620
1620
  const e = Date.now();
1621
1621
  for (const t in localStorage)
1622
1622
  if (t.startsWith("icon_cache:")) {
1623
1623
  const a = localStorage.getItem(t);
1624
1624
  a && JSON.parse(a).expireTime < e && localStorage.removeItem(t);
1625
1625
  }
1626
- }, he = (e, t, a) => {
1626
+ }, me = (e, t, a) => {
1627
1627
  setTimeout(() => {
1628
- t.value = a, t.value && (e.value = V.value[t.value]);
1628
+ t.value = a, t.value && (e.value = J.value[t.value]);
1629
1629
  }, 1);
1630
- }, Ne = _(
1630
+ }, _e = D(
1631
1631
  "svg",
1632
1632
  { class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
1633
1633
  [
1634
- _("circle", {
1634
+ D("circle", {
1635
1635
  cx: "25",
1636
1636
  cy: "25",
1637
1637
  r: "20",
@@ -1640,53 +1640,53 @@ const G = new Za(), Y = (e, t, a) => {
1640
1640
  style: { strokeWidth: "3 !important" }
1641
1641
  // 强制应用线宽
1642
1642
  }),
1643
- _("circle", {
1643
+ D("circle", {
1644
1644
  cx: "25",
1645
1645
  cy: "6",
1646
1646
  r: "6",
1647
1647
  fill: "currentColor"
1648
1648
  })
1649
1649
  ]
1650
- ), ut = (e, t) => {
1651
- const a = fa(e);
1650
+ ), ct = (e, t) => {
1651
+ const a = pa(e);
1652
1652
  Object.keys(window).forEach((s) => {
1653
- s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ce.has(s) && (Ce.add(s), ct(s, t));
1653
+ s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !We.has(s) && (We.add(s), ft(s, t));
1654
1654
  });
1655
- }, ct = (e, t) => {
1655
+ }, ft = (e, t) => {
1656
1656
  const a = window[e], o = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), r = document.querySelectorAll("symbol");
1657
1657
  for (const l of o) {
1658
1658
  const i = l.id, u = Array.from(r).find((c) => c.id === i);
1659
1659
  u && t && (u.innerHTML = l.innerHTML, u.querySelectorAll("*").forEach((c) => {
1660
1660
  c.hasAttribute("fill") && c.removeAttribute("fill");
1661
- })), V.value[i] || (V.value[i] = _("svg", { fill: "currentColor" }, [_("use", { "xlink:href": `#${i}` })]));
1661
+ })), J.value[i] || (J.value[i] = D("svg", { fill: "currentColor" }, [D("use", { "xlink:href": `#${i}` })]));
1662
1662
  }
1663
- }, ft = (e, t) => {
1663
+ }, pt = (e, t) => {
1664
1664
  let a = "";
1665
1665
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1666
- }, Xt = (e, t, a, s) => {
1667
- pa(e, [], a, s).forEach((o) => t.push(o));
1668
- }, pa = (e, t, a, s) => {
1666
+ }, Zt = (e, t, a, s) => {
1667
+ da(e, [], a, s).forEach((o) => t.push(o));
1668
+ }, da = (e, t, a, s) => {
1669
1669
  var r, l, i, u, c;
1670
- const n = [], o = K();
1670
+ const n = [], o = j();
1671
1671
  for (const p of e) {
1672
1672
  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"))
1673
1673
  continue;
1674
1674
  const m = p.path.split("/");
1675
1675
  m.unshift(...t);
1676
- const d = pa(p.children || [], m, a, s), A = {
1676
+ const d = da(p.children || [], m, a, s), A = {
1677
1677
  key: m.join("/"),
1678
1678
  label: ((u = p.name) == null ? void 0 : u.toString()) ?? "",
1679
1679
  title: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
1680
- icon: p.icon ? _(a, { ...s, icon: p.icon }) : void 0,
1680
+ icon: p.icon ? D(a, { ...s, icon: p.icon }) : void 0,
1681
1681
  children: d.length > 0 ? d : void 0
1682
1682
  };
1683
1683
  (d.length > 0 || !p.children) && n.push(A);
1684
1684
  }
1685
1685
  return n;
1686
- }, We = va([]), Zt = () => {
1687
- We.length = 0;
1688
- const e = U();
1689
- let a = Ke().TabActive;
1686
+ }, Ye = ga([]), es = () => {
1687
+ Ye.length = 0;
1688
+ const e = H();
1689
+ let a = Qe().TabActive;
1690
1690
  e.matchedRoutes(a).forEach((n, o) => {
1691
1691
  var l;
1692
1692
  const r = {
@@ -1694,9 +1694,9 @@ const G = new Za(), Y = (e, t, a) => {
1694
1694
  path: n.path,
1695
1695
  breadcrumbName: ((l = n.name) == null ? void 0 : l.toString()) ?? ""
1696
1696
  };
1697
- We.push(r);
1697
+ Ye.push(r);
1698
1698
  });
1699
- }, pt = {
1699
+ }, dt = {
1700
1700
  host: {
1701
1701
  api: "SITEHOST_API",
1702
1702
  url: "/openapi/RCSiteHostSrv/get",
@@ -1708,7 +1708,7 @@ const G = new Za(), Y = (e, t, a) => {
1708
1708
  // 不显示错误
1709
1709
  hideErrorToast: !0
1710
1710
  }
1711
- }, es = le("hostInfo", {
1711
+ }, as = ue("hostInfo", {
1712
1712
  state: () => ({
1713
1713
  hostInfo: {
1714
1714
  Host: "",
@@ -1732,14 +1732,14 @@ const G = new Za(), Y = (e, t, a) => {
1732
1732
  return;
1733
1733
  }
1734
1734
  return new Promise((s) => {
1735
- ke.SITEHOST_API || (ke.SITEHOST_API = e);
1735
+ Le.SITEHOST_API || (Le.SITEHOST_API = e);
1736
1736
  const n = t || window.location.origin;
1737
- Q(pt.host, {
1737
+ G(dt.host, {
1738
1738
  Query: {
1739
1739
  Host: n
1740
1740
  }
1741
1741
  }).then((o) => {
1742
- if ((o == null ? void 0 : o.status) === R.SUCCESS && o.data) {
1742
+ if ((o == null ? void 0 : o.status) === T.SUCCESS && o.data) {
1743
1743
  const r = o.data;
1744
1744
  this._setHostInfo(r);
1745
1745
  }
@@ -1755,9 +1755,9 @@ const G = new Za(), Y = (e, t, a) => {
1755
1755
  ...this.hostInfo,
1756
1756
  ...e
1757
1757
  }, this.hostInfo.API_HOST)
1758
- for (const t in this.hostInfo.API_HOST) ke[t] = this.hostInfo.API_HOST[t];
1758
+ for (const t in this.hostInfo.API_HOST) Le[t] = this.hostInfo.API_HOST[t];
1759
1759
  if (this.hostInfo.SERVER_HOST)
1760
- for (const t in this.hostInfo.SERVER_HOST) La[t] = this.hostInfo.SERVER_HOST[t];
1760
+ for (const t in this.hostInfo.SERVER_HOST) $a[t] = this.hostInfo.SERVER_HOST[t];
1761
1761
  },
1762
1762
  getHostInfo() {
1763
1763
  return this.hostInfo;
@@ -1770,7 +1770,7 @@ const G = new Za(), Y = (e, t, a) => {
1770
1770
  // storage: localStorage,
1771
1771
  // pick: ['hostInfo'],
1772
1772
  // },
1773
- }), as = le("settingInfo", {
1773
+ }), ts = ue("settingInfo", {
1774
1774
  state: () => ({
1775
1775
  fullscreen: !1,
1776
1776
  menuCollapse: !1,
@@ -1812,10 +1812,10 @@ const G = new Za(), Y = (e, t, a) => {
1812
1812
  }
1813
1813
  },
1814
1814
  persist: !1
1815
- }), ts = /* @__PURE__ */ W({
1815
+ }), ss = /* @__PURE__ */ X({
1816
1816
  __name: "index",
1817
1817
  props: {
1818
- ...ue,
1818
+ ...ce,
1819
1819
  /**
1820
1820
  * 选择项数据
1821
1821
  */
@@ -1826,8 +1826,8 @@ const G = new Za(), Y = (e, t, a) => {
1826
1826
  },
1827
1827
  emits: ["change"],
1828
1828
  setup(e, { emit: t }) {
1829
- const a = e, s = C(), n = pe(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
1830
- o.inputFactory = H(s);
1829
+ const a = e, s = Y(), n = de(a.url, a), o = a.optionCtrl ?? n.optionCtrl;
1830
+ o.inputFactory = K(s);
1831
1831
  const r = f([]);
1832
1832
  o && I(
1833
1833
  () => o.options.value,
@@ -1836,20 +1836,20 @@ const G = new Za(), Y = (e, t, a) => {
1836
1836
  },
1837
1837
  { immediate: !0, deep: !0 }
1838
1838
  );
1839
- const l = t, { editorCtrl: i, errInfo: u } = C(), c = (p) => {
1840
- u != null && u.value.errClass && i && ce(i), l("change", p);
1839
+ const l = t, { editorCtrl: i, errInfo: u } = Y(), c = (p) => {
1840
+ u != null && u.value.errClass && i && fe(i), l("change", p);
1841
1841
  };
1842
- return Se(() => {
1842
+ return Ie(() => {
1843
1843
  if (!a.data || a.data.length != 2) {
1844
1844
  console.error("Switch组件: ", a.data), x.error("Switch组件必须有且只有两个选项");
1845
1845
  return;
1846
1846
  }
1847
- o && Y(o.autoload, o, a);
1848
- }), oe(() => {
1849
- o && fe(o, a);
1847
+ o && Z(o.autoload, o, a);
1848
+ }), ie(() => {
1849
+ o && pe(o, a);
1850
1850
  }), (p, m) => {
1851
1851
  var d;
1852
- return r.value.length === 2 ? (E(), Ie(b(ya), ie({
1852
+ return r.value.length === 2 ? (O(), xe(b(ba), le({
1853
1853
  key: 0,
1854
1854
  class: [
1855
1855
  ((d = b(u)) == null ? void 0 : d.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : "",
@@ -1861,14 +1861,14 @@ const G = new Za(), Y = (e, t, a) => {
1861
1861
  unCheckedChildren: r.value[1].label,
1862
1862
  unCheckedValue: r.value[1].value,
1863
1863
  onChange: c
1864
- }, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : q("", !0);
1864
+ }, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : C("", !0);
1865
1865
  };
1866
1866
  }
1867
- }), ss = /* @__PURE__ */ W({
1867
+ }), ns = /* @__PURE__ */ X({
1868
1868
  inheritAttrs: !1,
1869
1869
  __name: "index",
1870
1870
  props: {
1871
- ...ue,
1871
+ ...ce,
1872
1872
  value: {
1873
1873
  type: [String, Number, Array, null],
1874
1874
  default: void 0
@@ -1885,13 +1885,13 @@ const G = new Za(), Y = (e, t, a) => {
1885
1885
  },
1886
1886
  emits: ["update:value", "select", "change", "update:labels"],
1887
1887
  setup(e, { emit: t }) {
1888
- const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1889
- r.inputFactory = H(n), r.fieldMap = {
1888
+ const a = e, s = Ae(), n = Y(), o = de(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1889
+ r.inputFactory = K(n), r.fieldMap = {
1890
1890
  label: "Name",
1891
1891
  value: "Id",
1892
1892
  ...r == null ? void 0 : r.fieldMap
1893
1893
  };
1894
- const l = f((r == null ? void 0 : r.selected.value) || void 0);
1894
+ const l = f(void 0);
1895
1895
  I(
1896
1896
  () => a.value,
1897
1897
  () => {
@@ -1900,8 +1900,8 @@ const G = new Za(), Y = (e, t, a) => {
1900
1900
  { immediate: !0 }
1901
1901
  ), I(
1902
1902
  () => l.value,
1903
- (v) => {
1904
- a.autoClean && a.formData && a.outFields && v !== a.value && ua(a.formData, a.outFields, null);
1903
+ (g) => {
1904
+ a.autoClean && a.formData && a.outFields && g !== a.value && ca(a.formData, a.outFields, null);
1905
1905
  }
1906
1906
  );
1907
1907
  const { editorCtrl: i, errInfo: u, labelText: c } = n, p = t;
@@ -1909,43 +1909,43 @@ const G = new Za(), Y = (e, t, a) => {
1909
1909
  const m = f((r == null ? void 0 : r.options.value) || []);
1910
1910
  r && I(
1911
1911
  () => r.options.value,
1912
- (v) => {
1913
- m.value = v || [];
1912
+ (g) => {
1913
+ m.value = g || [];
1914
1914
  },
1915
1915
  { immediate: !0, deep: !0 }
1916
1916
  );
1917
- const d = (v) => {
1918
- if (m.value = [], v === "") return;
1917
+ const d = (g) => {
1918
+ if (m.value = [], g === "") return;
1919
1919
  let h = {
1920
1920
  Query: {
1921
- SearchField: "%" + v.trim() + "%"
1921
+ SearchField: "%" + g.trim() + "%"
1922
1922
  }
1923
1923
  };
1924
- r.params = Ee(r.params, h), r && Y(!0, r, a);
1925
- }, A = (v) => {
1926
- const w = we(r, a, v);
1927
- p("update:value", v), p("select", v);
1928
- const h = Te(w);
1929
- p("update:labels", h), u != null && u.value.errClass && i && ce(i);
1924
+ r.params = Oe(r.params, h), r && Z(!0, r, a);
1925
+ }, A = (g) => {
1926
+ const E = Pe(r, a, g);
1927
+ p("update:value", g), p("select", g);
1928
+ const h = we(E);
1929
+ p("update:labels", h), u != null && u.value.errClass && i && fe(i);
1930
1930
  };
1931
- return oe(() => {
1932
- r && fe(r, a);
1933
- }), (v, w) => {
1931
+ return ie(() => {
1932
+ r && pe(r, a);
1933
+ }), (g, E) => {
1934
1934
  var h;
1935
- return E(), L("div", null, [
1936
- B(b(ba), ie({
1935
+ return O(), L("div", null, [
1936
+ z(b(Sa), le({
1937
1937
  value: l.value,
1938
- "onUpdate:value": w[0] || (w[0] = (S) => l.value = S),
1938
+ "onUpdate:value": E[0] || (E[0] = (S) => l.value = S),
1939
1939
  class: ["w-full", (h = b(u)) == null ? void 0 : h.errClass],
1940
1940
  options: m.value,
1941
1941
  onSearch: d,
1942
1942
  onSelect: A
1943
1943
  }, b(s), { "allow-clear": !1 }), {
1944
- option: D(({ label: S }) => [
1945
- Ae(z(S), 1)
1944
+ option: V(({ label: S }) => [
1945
+ Ee(W(S), 1)
1946
1946
  ]),
1947
- default: D(() => [
1948
- B(b(Sa), {
1947
+ default: V(() => [
1948
+ z(b(Ia), {
1949
1949
  "allow-clear": "",
1950
1950
  placeholder: "请输入并选择" + b(c)
1951
1951
  }, null, 8, ["placeholder"])
@@ -1955,14 +1955,14 @@ const G = new Za(), Y = (e, t, a) => {
1955
1955
  ]);
1956
1956
  };
1957
1957
  }
1958
- }), dt = { class: "min-h-[32px] pt-[5px]" }, ht = {
1958
+ }), ht = { class: "min-h-[32px] pt-[5px]" }, mt = {
1959
1959
  key: 1,
1960
1960
  class: "text-center text-gray-500"
1961
- }, ns = /* @__PURE__ */ W({
1961
+ }, rs = /* @__PURE__ */ X({
1962
1962
  inheritAttrs: !1,
1963
1963
  __name: "index",
1964
1964
  props: {
1965
- ...ue,
1965
+ ...ce,
1966
1966
  nodata: {
1967
1967
  type: String,
1968
1968
  default: ""
@@ -1980,8 +1980,8 @@ const G = new Za(), Y = (e, t, a) => {
1980
1980
  emits: ["change", "update:labels"],
1981
1981
  setup(e, { emit: t }) {
1982
1982
  var m, d, A;
1983
- const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1984
- r.inputFactory = H(n);
1983
+ const a = e, s = Ae(), n = Y(), o = de(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
1984
+ r.inputFactory = K(n);
1985
1985
  const l = f({
1986
1986
  ...r == null ? void 0 : r.url,
1987
1987
  url: ((m = r == null ? void 0 : r.url) == null ? void 0 : m.url) || "",
@@ -1993,62 +1993,62 @@ const G = new Za(), Y = (e, t, a) => {
1993
1993
  const c = f((r == null ? void 0 : r.options.value) || []);
1994
1994
  r && I(
1995
1995
  () => r.options.value,
1996
- (v) => {
1997
- c.value = v || [];
1996
+ (g) => {
1997
+ c.value = g || [];
1998
1998
  },
1999
1999
  { immediate: !0, deep: !0 }
2000
2000
  );
2001
- const p = (v) => {
2002
- const h = we(r, a, v), S = Te(h);
2001
+ const p = (g) => {
2002
+ const h = Pe(r, a, g), S = we(h);
2003
2003
  u("update:labels", S);
2004
2004
  };
2005
- return Se(() => {
2005
+ return Ie(() => {
2006
2006
  l.value && !l.value.fieldMap && (l.value.fieldMap = {
2007
2007
  title: "Name",
2008
2008
  label: "Name",
2009
2009
  value: "Id",
2010
2010
  key: "Id"
2011
- }), r && Y(r.autoload, r, a);
2012
- }), oe(() => {
2013
- r && fe(r, a);
2014
- }), (v, w) => (E(), L("div", dt, [
2015
- B(b(Ia), ie({
2011
+ }), r && Z(r.autoload, r, a);
2012
+ }), ie(() => {
2013
+ r && pe(r, a);
2014
+ }), (g, E) => (O(), L("div", ht, [
2015
+ z(b(xa), le({
2016
2016
  onChange: p,
2017
2017
  class: "w-full mb-[-3px]"
2018
2018
  }, b(s)), {
2019
- default: D(() => [
2020
- c.value.length > 0 ? (E(!0), L(se, { key: 0 }, _e(c.value, (h) => {
2019
+ default: V(() => [
2020
+ c.value.length > 0 ? (O(!0), L(ne, { key: 0 }, Ue(c.value, (h) => {
2021
2021
  var S;
2022
- return E(), Ie(b(xa), {
2022
+ return O(), xe(b(Aa), {
2023
2023
  key: h.value,
2024
2024
  value: h.value,
2025
2025
  disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
2026
- class: Xe([
2026
+ class: Ze([
2027
2027
  ((S = b(i)) == null ? void 0 : S.errClass) === "error" ? "error !text-red-400" : "",
2028
2028
  "text-nowrap",
2029
2029
  "pb-1",
2030
2030
  e.wrap ? `w-1/${a.wrap}` : ""
2031
2031
  ])
2032
2032
  }, {
2033
- default: D(() => [
2034
- Ae(z(h.label), 1)
2033
+ default: V(() => [
2034
+ Ee(W(h.label), 1)
2035
2035
  ]),
2036
2036
  _: 2
2037
2037
  }, 1032, ["value", "disabled", "class"]);
2038
- }), 128)) : e.nodata ? (E(), L("div", ht, z(e.nodata), 1)) : q("", !0)
2038
+ }), 128)) : e.nodata ? (O(), L("div", mt, W(e.nodata), 1)) : C("", !0)
2039
2039
  ]),
2040
2040
  _: 1
2041
2041
  }, 16)
2042
2042
  ]));
2043
2043
  }
2044
- }), mt = { class: "min-h-[32px] pt-1" }, vt = {
2044
+ }), vt = { class: "min-h-[32px] pt-1" }, gt = {
2045
2045
  key: 1,
2046
2046
  class: "text-center text-gray-500"
2047
- }, rs = /* @__PURE__ */ W({
2047
+ }, os = /* @__PURE__ */ X({
2048
2048
  inheritAttrs: !1,
2049
2049
  __name: "index",
2050
2050
  props: {
2051
- ...ue,
2051
+ ...ce,
2052
2052
  value: {
2053
2053
  type: [String, Number, null, Array],
2054
2054
  default: void 0
@@ -2066,14 +2066,14 @@ const G = new Za(), Y = (e, t, a) => {
2066
2066
  },
2067
2067
  emits: ["change", "update:value", "update:labels"],
2068
2068
  setup(e, { emit: t }) {
2069
- var A, v, w;
2070
- const a = e, s = xe(), n = C(), o = pe(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2071
- r.inputFactory = H(n);
2069
+ var A, g, E;
2070
+ const a = e, s = Ae(), n = Y(), o = de(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2071
+ r.inputFactory = K(n);
2072
2072
  const l = f({
2073
2073
  ...r == null ? void 0 : r.url,
2074
2074
  url: ((A = r == null ? void 0 : r.url) == null ? void 0 : A.url) || "",
2075
- fieldMap: (r == null ? void 0 : r.fieldMap) || ((v = r == null ? void 0 : r.url) == null ? void 0 : v.fieldMap),
2076
- params: (r == null ? void 0 : r.params) || ((w = r == null ? void 0 : r.url) == null ? void 0 : w.params),
2075
+ fieldMap: (r == null ? void 0 : r.fieldMap) || ((g = r == null ? void 0 : r.url) == null ? void 0 : g.fieldMap),
2076
+ params: (r == null ? void 0 : r.params) || ((E = r == null ? void 0 : r.url) == null ? void 0 : E.params),
2077
2077
  loadingText: !1
2078
2078
  }), i = f(a.value), { errInfo: u } = n, c = f((r == null ? void 0 : r.options.value) || []), p = t;
2079
2079
  n.inputEmit = p, r && I(
@@ -2090,67 +2090,67 @@ const G = new Za(), Y = (e, t, a) => {
2090
2090
  );
2091
2091
  const m = (h, S) => {
2092
2092
  if (typeof h == "object" && typeof S == "object") {
2093
- const O = JSON.stringify(h) === JSON.stringify(S);
2094
- return O && (i.value = h), O;
2093
+ const R = JSON.stringify(h) === JSON.stringify(S);
2094
+ return R && (i.value = h), R;
2095
2095
  }
2096
2096
  return h === S;
2097
2097
  }, d = (h) => {
2098
- const S = h.target.value, O = we(r, a, S), g = Te(O);
2099
- p("update:labels", g);
2098
+ const S = h.target.value, R = Pe(r, a, S), Q = we(R);
2099
+ p("update:labels", Q);
2100
2100
  };
2101
- return Se(() => {
2101
+ return Ie(() => {
2102
2102
  l.value && !l.value.fieldMap && (l.value.fieldMap = {
2103
2103
  label: "Name",
2104
2104
  value: "Id",
2105
2105
  key: "Id"
2106
- }), r && Y(r.autoload, r, a);
2107
- }), oe(() => {
2108
- r && fe(r, a);
2109
- }), (h, S) => (E(), L("div", mt, [
2110
- B(b(Aa), ie({
2106
+ }), r && Z(r.autoload, r, a);
2107
+ }), ie(() => {
2108
+ r && pe(r, a);
2109
+ }), (h, S) => (O(), L("div", vt, [
2110
+ z(b(Ea), le({
2111
2111
  value: i.value,
2112
- "onUpdate:value": S[0] || (S[0] = (O) => i.value = O),
2112
+ "onUpdate:value": S[0] || (S[0] = (R) => i.value = R),
2113
2113
  autocheck: !1,
2114
2114
  onChange: d,
2115
2115
  class: "w-full flex align-items flex-wrap mb-[-3px]"
2116
2116
  }, b(s)), {
2117
- default: D(() => [
2118
- c.value.length > 0 ? (E(!0), L(se, { key: 0 }, _e(c.value, (O) => {
2119
- var g;
2120
- return E(), L(se, {
2121
- key: O.value
2117
+ default: V(() => [
2118
+ c.value.length > 0 ? (O(!0), L(ne, { key: 0 }, Ue(c.value, (R) => {
2119
+ var Q;
2120
+ return O(), L(ne, {
2121
+ key: R.value
2122
2122
  }, [
2123
- O.visible !== !1 ? (E(), Ie(b(Ea), {
2123
+ R.visible !== !1 ? (O(), xe(b(Oa), {
2124
2124
  key: 0,
2125
- checked: m(O.value, a.value),
2126
- value: O.value,
2127
- class: Xe([
2128
- ((g = b(u)) == null ? void 0 : g.errClass) === "error" ? "error !text-red-400" : "",
2125
+ checked: m(R.value, a.value),
2126
+ value: R.value,
2127
+ class: Ze([
2128
+ ((Q = b(u)) == null ? void 0 : Q.errClass) === "error" ? "error !text-red-400" : "",
2129
2129
  "text-nowrap",
2130
2130
  "pb-1",
2131
2131
  e.wrap ? `w-1/${a.wrap}` : ""
2132
2132
  ])
2133
2133
  }, {
2134
- default: D(() => [
2135
- Ae(z(O.label), 1)
2134
+ default: V(() => [
2135
+ Ee(W(R.label), 1)
2136
2136
  ]),
2137
2137
  _: 2
2138
- }, 1032, ["checked", "value", "class"])) : q("", !0)
2138
+ }, 1032, ["checked", "value", "class"])) : C("", !0)
2139
2139
  ], 64);
2140
- }), 128)) : e.nodata ? (E(), L("div", vt, z(e.nodata), 1)) : q("", !0)
2140
+ }), 128)) : e.nodata ? (O(), L("div", gt, W(e.nodata), 1)) : C("", !0)
2141
2141
  ]),
2142
2142
  _: 1
2143
2143
  }, 16, ["value"])
2144
2144
  ]));
2145
2145
  }
2146
- }), gt = {
2146
+ }), yt = {
2147
2147
  key: 0,
2148
2148
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
2149
- }, os = /* @__PURE__ */ W({
2149
+ }, is = /* @__PURE__ */ X({
2150
2150
  inheritAttrs: !1,
2151
2151
  __name: "index",
2152
2152
  props: {
2153
- ...ue,
2153
+ ...ce,
2154
2154
  value: {
2155
2155
  type: [String, Number, Array, null],
2156
2156
  default: void 0
@@ -2172,89 +2172,101 @@ const G = new Za(), Y = (e, t, a) => {
2172
2172
  },
2173
2173
  emits: ["change", "update:value", "update:label", "update:labels"],
2174
2174
  setup(e, { emit: t }) {
2175
- var h, S, O;
2176
- const a = e, s = C(), { editorCtrl: n, errInfo: o, labelText: r } = s, l = pe(a.url, a), i = a.optionCtrl ?? l.optionCtrl;
2177
- i.inputFactory = H(s);
2178
- const u = xe(), c = f({
2175
+ var S, R, Q;
2176
+ const a = e, s = Y(), { editorCtrl: n, errInfo: o, labelText: r } = s, l = de(a.url, a), i = a.optionCtrl ?? l.optionCtrl;
2177
+ i.inputFactory = K(s);
2178
+ const u = Ae(), c = f({
2179
2179
  ...i == null ? void 0 : i.url,
2180
- url: ((h = i == null ? void 0 : i.url) == null ? void 0 : h.url) || "",
2181
- fieldMap: (i == null ? void 0 : i.fieldMap) || ((S = i == null ? void 0 : i.url) == null ? void 0 : S.fieldMap),
2182
- params: (i == null ? void 0 : i.params) || ((O = i == null ? void 0 : i.url) == null ? void 0 : O.params),
2180
+ url: ((S = i == null ? void 0 : i.url) == null ? void 0 : S.url) || "",
2181
+ fieldMap: (i == null ? void 0 : i.fieldMap) || ((R = i == null ? void 0 : i.url) == null ? void 0 : R.fieldMap),
2182
+ params: (i == null ? void 0 : i.params) || ((Q = i == null ? void 0 : i.url) == null ? void 0 : Q.params),
2183
2183
  loadingText: !1
2184
2184
  }), p = f(a.value), m = f(u.placeholder), d = f((i == null ? void 0 : i.selected.value) || void 0), A = t;
2185
2185
  s.inputEmit = A;
2186
- const v = f((i == null ? void 0 : i.options.value) || []);
2187
- i && I(
2186
+ const g = (v) => {
2187
+ const M = Pe(i, a, v), N = we(M);
2188
+ d.value = v, A("update:labels", N), A("update:label", N.join(";")), A("change", v), o != null && o.value.errClass && n && fe(n);
2189
+ }, E = f((i == null ? void 0 : i.options.value) || []), h = (v) => {
2190
+ if (v.length > 0 && P(a.value) && a.selectFirst)
2191
+ for (let M = 0; M < v.length; M++) {
2192
+ const N = v[M];
2193
+ if (N.disabled === void 0 || N.disabled === !1) {
2194
+ d.value = N.value;
2195
+ break;
2196
+ }
2197
+ }
2198
+ else v.length > 0 && (d.value = a.value === null ? void 0 : a.value);
2199
+ v.length > 0 && d.value !== void 0 && g(d.value);
2200
+ };
2201
+ return i && I(
2188
2202
  () => i.options.value,
2189
- (g) => {
2190
- v.value = g || [];
2203
+ (v) => {
2204
+ E.value = v || [];
2191
2205
  },
2192
2206
  { immediate: !0, deep: !0 }
2193
- );
2194
- const w = (g) => {
2195
- const J = we(i, a, g), X = Te(J);
2196
- d.value = g, A("update:labels", X), A("update:label", X.join(";")), A("change", g), o != null && o.value.errClass && n && ce(n);
2197
- };
2198
- return I(
2199
- () => v.value,
2200
- (g) => {
2201
- 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);
2207
+ ), I(
2208
+ () => E.value,
2209
+ (v) => {
2210
+ h(v);
2202
2211
  }
2203
2212
  ), I(
2204
2213
  () => c.value.loading,
2205
- (g) => {
2206
- g ? m.value = "" : m.value || (m.value = "请选择" + r.value);
2214
+ (v) => {
2215
+ v ? m.value = "" : m.value || (m.value = "请选择" + r.value);
2207
2216
  },
2208
2217
  { immediate: !0 }
2209
2218
  ), I(
2210
2219
  () => d.value,
2211
- (g) => {
2212
- if (u.mode === "multiple" && P(g) && P(p.value)) {
2220
+ (v) => {
2221
+ if (u.mode === "multiple" && P(v) && P(p.value)) {
2213
2222
  A("update:value", p.value);
2214
2223
  return;
2215
2224
  }
2216
- A("update:value", g);
2225
+ A("update:value", v);
2217
2226
  }
2218
- ), Se(() => {
2227
+ ), Ie(() => {
2219
2228
  if (c.value && !c.value.fieldMap && (c.value.fieldMap = {
2220
2229
  label: "Name",
2221
2230
  value: "Id",
2222
2231
  key: "Id"
2223
2232
  }), a.dataKey) {
2224
- const g = JSON.parse(JSON.stringify(F.getOptions(a.dataKey)));
2225
- v.value = g;
2226
- } else i && Y(i.autoload, i, a);
2227
- }), oe(() => {
2228
- i && fe(i, a);
2229
- }), (g, J) => {
2230
- var X, je, Ge;
2231
- return E(), L("div", null, [
2232
- (je = (X = b(i)) == null ? void 0 : X.url) != null && je.loading ? (E(), L("div", gt, [
2233
- B(b(Ne), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2234
- J[1] || (J[1] = ga("span", null, "数据加载中...", -1))
2235
- ])) : q("", !0),
2236
- B(b(Oa), ie({
2237
- class: [(Ge = b(o)) == null ? void 0 : Ge.errClass, "w-full"],
2233
+ const v = JSON.parse(JSON.stringify(F.getOptions(a.dataKey)));
2234
+ E.value = v, h(v);
2235
+ } else if (i) {
2236
+ const v = i.options.value || [];
2237
+ v.length > 0 ? (E.value = v, h(v)) : Z(i.autoload, i, a);
2238
+ }
2239
+ }), ie(() => {
2240
+ i && pe(i, a);
2241
+ }), (v, M) => {
2242
+ var N, Ge, qe;
2243
+ return O(), L("div", null, [
2244
+ (Ge = (N = b(i)) == null ? void 0 : N.url) != null && Ge.loading ? (O(), L("div", yt, [
2245
+ z(b(_e), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2246
+ M[1] || (M[1] = ya("span", null, "数据加载中...", -1))
2247
+ ])) : C("", !0),
2248
+ z(b(Ra), le({
2249
+ class: [(qe = b(o)) == null ? void 0 : qe.errClass, "w-full"],
2238
2250
  value: d.value,
2239
- "onUpdate:value": J[0] || (J[0] = (j) => d.value = j),
2251
+ "onUpdate:value": M[0] || (M[0] = (q) => d.value = q),
2240
2252
  "allow-clear": !0,
2241
- onChange: w,
2253
+ onChange: g,
2242
2254
  placeholder: m.value,
2243
2255
  "label-in-value": !1
2244
2256
  }, b(u)), {
2245
- default: D(() => [
2246
- (E(!0), L(se, null, _e(v.value, (j) => (E(), L(se, {
2247
- key: j.value
2257
+ default: V(() => [
2258
+ (O(!0), L(ne, null, Ue(E.value, (q) => (O(), L(ne, {
2259
+ key: q.value
2248
2260
  }, [
2249
- j.visible !== !1 ? (E(), Ie(b(Ra), {
2261
+ q.visible !== !1 ? (O(), xe(b(Ta), {
2250
2262
  key: 0,
2251
- value: j.value
2263
+ value: q.value
2252
2264
  }, {
2253
- default: D(() => [
2254
- Ae(z(j.label), 1)
2265
+ default: V(() => [
2266
+ Ee(W(q.label), 1)
2255
2267
  ]),
2256
2268
  _: 2
2257
- }, 1032, ["value"])) : q("", !0)
2269
+ }, 1032, ["value"])) : C("", !0)
2258
2270
  ], 64))), 128))
2259
2271
  ]),
2260
2272
  _: 1
@@ -2264,75 +2276,75 @@ const G = new Za(), Y = (e, t, a) => {
2264
2276
  }
2265
2277
  });
2266
2278
  export {
2267
- Ft as $,
2268
- ce as A,
2269
- ns as B,
2270
- rs as C,
2271
- os as D,
2272
- De as E,
2273
- Ma as F,
2274
- qt as G,
2275
- st as H,
2276
- nt as I,
2277
- Bt as J,
2279
+ Mt as $,
2280
+ fe as A,
2281
+ rs as B,
2282
+ os as C,
2283
+ is as D,
2284
+ He as E,
2285
+ Na as F,
2286
+ Bt as G,
2287
+ nt as H,
2288
+ rt as I,
2289
+ Ct as J,
2278
2290
  zt as K,
2279
- tt as L,
2280
- ua as M,
2281
- Ct as N,
2291
+ st as L,
2292
+ ca as M,
2293
+ Wt as N,
2282
2294
  F as O,
2283
- N as P,
2284
- Yt as Q,
2285
- ct as R,
2286
- ft as S,
2287
- Xt as T,
2288
- We as U,
2289
- Zt as V,
2290
- ea as W,
2291
- Dt as X,
2292
- aa as Y,
2293
- Lt as Z,
2294
- ts as _,
2295
- as as a,
2296
- He as a0,
2297
- $t as a1,
2298
- Kt as a2,
2299
- Xa as a3,
2300
- ia as a4,
2301
- Jt as a5,
2302
- kt as a6,
2303
- Ze as a7,
2304
- Na as a8,
2305
- Me as a9,
2306
- G as aa,
2307
- te as ab,
2308
- me as ac,
2309
- U as ad,
2310
- es as ae,
2311
- Ke as af,
2312
- ne as ag,
2313
- _t as b,
2314
- Wt as c,
2315
- Ut as d,
2316
- Mt as e,
2317
- jt as f,
2318
- Gt as g,
2319
- Vt as h,
2295
+ U as P,
2296
+ Xt as Q,
2297
+ ft as R,
2298
+ pt as S,
2299
+ Zt as T,
2300
+ Ye as U,
2301
+ es as V,
2302
+ aa as W,
2303
+ Ht as X,
2304
+ ta as Y,
2305
+ $t as Z,
2306
+ ss as _,
2307
+ ts as a,
2308
+ Ve as a0,
2309
+ Ft as a1,
2310
+ Qt as a2,
2311
+ Za as a3,
2312
+ la as a4,
2313
+ jt as a5,
2314
+ Lt as a6,
2315
+ ea as a7,
2316
+ _a as a8,
2317
+ Ne as a9,
2318
+ B as aa,
2319
+ se as ab,
2320
+ ve as ac,
2321
+ H as ad,
2322
+ as as ae,
2323
+ Qe as af,
2324
+ re as ag,
2325
+ Ut as b,
2326
+ Yt as c,
2327
+ Dt as d,
2328
+ Nt as e,
2329
+ Gt as f,
2330
+ qt as g,
2331
+ Kt as h,
2320
2332
  P as i,
2321
- Ht as j,
2322
- oa as k,
2323
- Ya as l,
2324
- Qt as m,
2325
- ss as n,
2326
- Nt as o,
2327
- ue as p,
2328
- _a as q,
2329
- re as r,
2330
- C as s,
2331
- pe as t,
2332
- K as u,
2333
- Y as v,
2334
- fe as w,
2335
- Ne as x,
2336
- we as y,
2337
- Te as z
2333
+ Vt as j,
2334
+ ia as k,
2335
+ Xa as l,
2336
+ Jt as m,
2337
+ ns as n,
2338
+ _t as o,
2339
+ ce as p,
2340
+ Ua as q,
2341
+ oe as r,
2342
+ Y as s,
2343
+ de as t,
2344
+ j as u,
2345
+ Z as v,
2346
+ pe as w,
2347
+ _e as x,
2348
+ Pe as y,
2349
+ we as z
2338
2350
  };