@skyfox2000/webui 1.3.6 → 1.3.8

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