@skyfox2000/webui 1.4.19 → 1.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/lib/assets/modules/{baseLayout-D3_NxEzk.js → baseLayout-BcSEYvus.js} +3 -3
  2. package/lib/assets/modules/{file-upload-CNBcbAAZ.js → file-upload-D11e2io7.js} +5 -5
  3. package/lib/assets/modules/{index-CDr74akE.js → index-CO9_YadW.js} +2 -2
  4. package/lib/assets/modules/{index-D14BsF7C.js → index-ClMWx3tg.js} +1 -1
  5. package/lib/assets/modules/{index-DOlO_4KL.js → index-voAmrZ30.js} +2 -2
  6. package/lib/assets/modules/{menuTabs-CqAhoF--.js → menuTabs-C9wkt-m9.js} +16 -16
  7. package/lib/assets/modules/{toolIcon-BnkqBipR.js → toolIcon-9zQ4jiFD.js} +1 -1
  8. package/lib/assets/modules/{upload-template-KI-IFzyp.js → upload-template-CM0O990W.js} +395 -378
  9. package/lib/assets/modules/uploadList-DhkFSkqE.js +466 -0
  10. package/lib/components/content/index.d.ts +4 -0
  11. package/lib/components/content/list/index.vue.d.ts +126 -0
  12. package/lib/components/content/list/listOperate.vue.d.ts +18 -0
  13. package/lib/components/form/index.d.ts +2 -0
  14. package/lib/components/form/switch/index.vue.d.ts +11 -1
  15. package/lib/components/form/upload/imageList.vue.d.ts +486 -0
  16. package/lib/components/form/upload/uploadList.vue.d.ts +449 -1
  17. package/lib/components/index.d.ts +2 -2
  18. package/lib/const/options.d.ts +4 -2
  19. package/lib/es/AceEditor/index.js +3 -3
  20. package/lib/es/BasicLayout/index.js +2 -2
  21. package/lib/es/Error403/index.js +1 -1
  22. package/lib/es/Error404/index.js +1 -1
  23. package/lib/es/ExcelForm/index.js +5 -5
  24. package/lib/es/MenuLayout/index.js +2 -2
  25. package/lib/es/TemplateFile/index.js +4 -4
  26. package/lib/es/UploadForm/index.js +70 -56
  27. package/lib/index.d.ts +1 -1
  28. package/lib/typings/upload.d.ts +10 -0
  29. package/lib/webui.css +1 -1
  30. package/lib/webui.es.js +1671 -1207
  31. package/package.json +1 -1
  32. package/src/components/content/dialog/uploadForm.vue +96 -13
  33. package/src/components/content/index.ts +5 -0
  34. package/src/components/content/list/index.vue +198 -0
  35. package/src/components/content/list/listOperate.vue +122 -0
  36. package/src/components/content/table/index.vue +1 -1
  37. package/src/components/content/table/tableOperate.vue +19 -37
  38. package/src/components/form/index.ts +3 -0
  39. package/src/components/form/switch/index.vue +27 -14
  40. package/src/components/form/upload/imageList.vue +386 -0
  41. package/src/components/form/upload/uploadList.vue +46 -3
  42. package/src/components/index.ts +3 -0
  43. package/src/const/options.ts +11 -1
  44. package/src/index.ts +3 -0
  45. package/src/typings/upload.d.ts +10 -0
  46. package/lib/assets/modules/uploadList-DnFXg_B3.js +0 -423
package/lib/webui.es.js CHANGED
@@ -1,139 +1,140 @@
1
- import { u as Pe, i as Z, a as he, L as la, c as ra, P as q, o as Fe, b as sa, d as oa, e as Ne, g as Me, r as ce, f as na, h as ia, j as Oe, k as ua, l as we, m as ca, _ as da, n as pa, O as Be, p as fa, q as Ae, s as va, t as ma, v as L, w as ha, x as ga, y as ba, z as _a, A as xa, B as ya, C as Y, D as ka, E as wa, F as Ca, G as Le } from "./assets/modules/upload-template-KI-IFzyp.js";
2
- import { ac as Nl, S as Ml, ae as Ol, T as Bl, X as Al, ab as Ll, a9 as Rl, aa as zl, ad as Ul, $ as Vl, V as Yl, a7 as Kl, a4 as Wl, Q as jl, a6 as ql, W as Hl, I as Ql, a1 as Gl, a5 as Jl, a8 as Xl, R as Zl, U as er, af as ar, H as tr, a3 as lr, ag as rr, Z as sr, a0 as or, Y as nr, al as ir, ak as ur, ah as cr, J as dr, K as pr, ai as fr, N as vr, aj as mr, M as hr, a2 as gr } from "./assets/modules/upload-template-KI-IFzyp.js";
3
- import { A as _r, U as xr, p as yr } from "./assets/modules/file-upload-CNBcbAAZ.js";
4
- import { EnvConfig as Ce } from "@skyfox2000/microbase";
5
- import { FrontCache as oe, httpPost as Re, ResStatus as ze, SERVER_HOST as Sa, fieldMapping as ne } from "@skyfox2000/fapi";
6
- import le from "vue-m-message";
7
- import { defineComponent as S, createBlock as b, openBlock as m, withModifiers as ae, unref as r, useAttrs as X, withCtx as h, createElementVNode as D, createVNode as k, mergeProps as F, renderSlot as I, normalizeClass as E, toDisplayString as P, createCommentVNode as y, ref as _, provide as ge, watch as T, onMounted as K, createTextVNode as N, inject as ie, resolveDirective as re, withDirectives as H, computed as Q, createElementBlock as w, normalizeStyle as be, createSlots as Ue, useSlots as Ta, Fragment as O, renderList as z, resolveDynamicComponent as $a, onActivated as _e, shallowRef as Da, onUnmounted as Ia, withKeys as Se } from "vue";
1
+ import { u as Le, i as ce, a as Ue, L as xt, c as kt, P as ae, o as We, b as wt, d as Ct, e as qe, g as He, r as ue, f as Qe, h as Ge, j as Je, k as St, l as me, m as Xe, _ as Ze, n as et, O as Ne, p as $t, q as tt, s as Tt, t as It, v as q, w as Dt, x as Ft, y as Pt, z as Et, A as Lt, B as Ut, C as le, D as Nt, E as Bt, F as Mt, G as at, M as zt } from "./assets/modules/upload-template-CM0O990W.js";
2
+ import { ad as fr, T as vr, U as mr, Y as hr, ac as gr, aa as br, ab as yr, ae as _r, a0 as xr, W as kr, a8 as wr, a5 as Cr, R as Sr, a7 as $r, X as Tr, I as Ir, a2 as Dr, a6 as Fr, a9 as Pr, S as Er, V as Lr, af as Ur, H as Nr, a4 as Br, ag as Mr, $ as zr, a1 as Or, Z as Ar, al as Rr, ak as Kr, ah as jr, J as Vr, K as Yr, ai as Wr, Q as qr, aj as Hr, N as Qr, a3 as Gr } from "./assets/modules/upload-template-CM0O990W.js";
3
+ import { f as Ot, p as Oe } from "./assets/modules/file-upload-D11e2io7.js";
4
+ import { A as Xr, U as Zr } from "./assets/modules/file-upload-D11e2io7.js";
5
+ import { EnvConfig as Ae, isMicroApp as At } from "@skyfox2000/microbase";
6
+ import { FrontCache as ve, httpPost as Be, ResStatus as Me, SERVER_HOST as Rt, fieldMapping as he } from "@skyfox2000/fapi";
7
+ import G from "vue-m-message";
8
+ import { defineComponent as T, createBlock as b, openBlock as v, withModifiers as pe, unref as l, useAttrs as ne, withCtx as h, createElementVNode as D, createVNode as S, mergeProps as B, renderSlot as P, normalizeClass as E, toDisplayString as N, createCommentVNode as x, ref as y, provide as _e, watch as I, onMounted as X, createTextVNode as M, inject as ge, resolveDirective as re, withDirectives as W, computed as R, createElementBlock as w, normalizeStyle as ze, Fragment as L, renderList as V, resolveDynamicComponent as Kt, onActivated as xe, createSlots as lt, useSlots as jt, shallowRef as Vt, onUnmounted as Yt, withKeys as Re } from "vue";
8
9
  import "async-validator";
9
- import ve from "dayjs";
10
- import { Popover as Ea, theme as Ve, Drawer as Pa, Space as te, Form as Ye, message as Fa, FormItem as Ke, ConfigProvider as Te, Popconfirm as Na, Button as We, DropdownButton as Ma, Menu as xe, MenuItem as ye, Dropdown as me, Checkbox as Oa, Table as je, Tree as Ba, Cascader as Aa, DatePicker as La, Input as ee, InputPassword as Ra, InputNumber as za, RangePicker as Ua, Textarea as Va, TimePicker as Ya, Transfer as Ka, TreeSelect as Wa, LayoutContent as ja } from "ant-design-vue";
11
- import { VueDraggableNext as qa } from "vue-draggable-next";
12
- import { d as Ha } from "./assets/modules/uploadList-DnFXg_B3.js";
13
- import { C as wr, U as Cr, a as Sr, p as Tr } from "./assets/modules/uploadList-DnFXg_B3.js";
14
- import { c as qe } from "./assets/modules/index-DOlO_4KL.js";
15
- import { _ as Dr, h as Ir, b as Er, a as Pr, d as Fr, e as Nr, g as Mr, f as Or, n as Br, p as Ar, t as Lr, v as Rr } from "./assets/modules/index-DOlO_4KL.js";
16
- import { _ as A } from "./assets/modules/index-D14BsF7C.js";
17
- import { _ as U } from "./assets/modules/toolIcon-BnkqBipR.js";
18
- import { a as Ur } from "./assets/modules/toolIcon-BnkqBipR.js";
19
- import { _ as Yr, b as Kr, c as Wr, d as jr, e as qr, I as Hr, f as Qr, g as Gr, a as Jr } from "./assets/modules/menuTabs-CqAhoF--.js";
20
- import { _ as Zr } from "./assets/modules/index-CDr74akE.js";
21
- import { _ as G } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
22
- const $e = (l, t, e, a = "remove") => {
10
+ import Pe from "dayjs";
11
+ import { Popover as Wt, theme as rt, Drawer as qt, Space as ie, Form as st, message as Ht, FormItem as ot, ConfigProvider as be, Popconfirm as nt, DropdownButton as it, Menu as ke, MenuItem as we, Dropdown as Ee, Checkbox as Qt, List as Gt, ListItem as Jt, Card as Xt, Button as ut, Table as ct, Tree as Zt, Cascader as ea, DatePicker as ta, Input as de, InputPassword as aa, InputNumber as la, RangePicker as ra, Textarea as sa, TimePicker as oa, Transfer as na, TreeSelect as ia, Upload as ua, Image as ca, LayoutContent as da } from "ant-design-vue";
12
+ import { VueDraggableNext as pa } from "vue-draggable-next";
13
+ import { d as fa } from "./assets/modules/uploadList-DhkFSkqE.js";
14
+ import { C as ts, U as as, a as ls, p as rs } from "./assets/modules/uploadList-DhkFSkqE.js";
15
+ import { c as dt } from "./assets/modules/index-voAmrZ30.js";
16
+ import { _ as os, h as ns, b as is, a as us, d as cs, e as ds, g as ps, f as fs, n as vs, p as ms, t as hs, v as gs } from "./assets/modules/index-voAmrZ30.js";
17
+ import { _ as Q } from "./assets/modules/index-ClMWx3tg.js";
18
+ import { _ as K } from "./assets/modules/toolIcon-9zQ4jiFD.js";
19
+ import { a as ys } from "./assets/modules/toolIcon-9zQ4jiFD.js";
20
+ import { _ as xs, b as ks, c as ws, d as Cs, e as Ss, I as $s, f as Ts, g as Is, a as Ds } from "./assets/modules/menuTabs-C9wkt-m9.js";
21
+ import { _ as Ps } from "./assets/modules/index-CO9_YadW.js";
22
+ import { _ as se } from "./assets/modules/_plugin-vue_export-helper-CHgC5LLL.js";
23
+ const Ke = (r, a, e, t = "remove") => {
23
24
  if (!e)
24
- if (a === "disable") {
25
- const o = t.component;
26
- o ? o.props.disabled = !0 : (t.el, l.setAttribute("disabled", "disabled"), l.disabled = !0), l.classList.add("disabled");
25
+ if (t === "disable") {
26
+ const o = a.component;
27
+ o ? o.props.disabled = !0 : (a.el, r.setAttribute("disabled", "disabled"), r.disabled = !0), r.classList.add("disabled");
27
28
  } else {
28
- const o = document.createComment("No Permission"), u = l.parentNode;
29
- if (u) {
30
- const n = t.component;
31
- n ? n.props.style = { display: "none" } : u.replaceChild(o, l);
29
+ const o = document.createComment("No Permission"), n = r.parentNode;
30
+ if (n) {
31
+ const i = a.component;
32
+ i ? i.props.style = { display: "none" } : n.replaceChild(o, r);
32
33
  }
33
34
  }
34
- }, De = (l) => {
35
- var n, p;
36
- const t = Pe(), { url: e, role: a, permit: o } = l;
37
- if (Z(a) && Z(o))
35
+ }, je = (r) => {
36
+ var i, p;
37
+ const a = Le(), { url: e, role: t, permit: o } = r;
38
+ if (ce(t) && ce(o))
38
39
  return !0;
39
- const u = e ?? ((p = (n = window.location.hash) == null ? void 0 : n.split("#")) == null ? void 0 : p[1]) ?? window.location.pathname;
40
- if (Ce.VITE_PERMISSION_MODE === "role")
41
- return Z(a) ? !0 : t.hasRole(a);
42
- if (Ce.VITE_PERMISSION_MODE === "permit") {
43
- let d = !1, i = !1;
44
- return Z(a) || (d = t.hasRole(a)), t.isAdmin() ? d : (Z(o) || (i = t.hasPermit(u, o)), d || i);
40
+ const n = e ?? ((p = (i = window.location.hash) == null ? void 0 : i.split("#")) == null ? void 0 : p[1]) ?? window.location.pathname;
41
+ if (Ae.VITE_PERMISSION_MODE === "role")
42
+ return ce(t) ? !0 : a.hasRole(t);
43
+ if (Ae.VITE_PERMISSION_MODE === "permit") {
44
+ let c = !1, u = !1;
45
+ return ce(t) || (c = a.hasRole(t)), a.isAdmin() ? c : (ce(o) || (u = a.hasPermit(n, o)), c || u);
45
46
  }
46
47
  return !1;
47
- }, Qa = {
48
- mounted(l, t, e) {
49
- const a = t.value || {}, o = t.arg || "remove", u = a.behavior || o, n = De(a);
50
- $e(l, e, n, u);
48
+ }, va = {
49
+ mounted(r, a, e) {
50
+ const t = a.value || {}, o = a.arg || "remove", n = t.behavior || o, i = je(t);
51
+ Ke(r, e, i, n);
51
52
  },
52
- updated(l, t, e) {
53
- const a = t.value || {}, o = t.arg || "remove", u = a.behavior || o, n = De(a);
54
- $e(l, e, n, u);
53
+ updated(r, a, e) {
54
+ const t = a.value || {}, o = a.arg || "remove", n = t.behavior || o, i = je(t);
55
+ Ke(r, e, i, n);
55
56
  }
56
- }, Ga = {
57
- mounted: (l, t) => {
58
- l.addEventListener("keydown", (e) => {
59
- e.key === "Enter" && t.value();
57
+ }, ma = {
58
+ mounted: (r, a) => {
59
+ r.addEventListener("keydown", (e) => {
60
+ e.key === "Enter" && a.value();
60
61
  });
61
62
  },
62
- unmounted: (l) => {
63
- l.removeEventListener("keydown", () => {
63
+ unmounted: (r) => {
64
+ r.removeEventListener("keydown", () => {
64
65
  });
65
66
  }
66
- }, pe = {
67
- auth: Qa,
68
- submit: Ga
69
- }, al = (l, t) => ((t || Object.keys(pe)).forEach((a) => {
70
- a in pe && l.directive(a, pe[a]);
71
- }), l), W = (l, t) => {
72
- const e = l.find((a) => a.key === t);
67
+ }, De = {
68
+ auth: va,
69
+ submit: ma
70
+ }, Ll = (r, a) => ((a || Object.keys(De)).forEach((t) => {
71
+ t in De && r.directive(t, De[t]);
72
+ }), r), oe = (r, a) => {
73
+ const e = r.find((t) => t.key === a);
73
74
  if (e)
74
75
  return e;
75
- for (const a of l)
76
- if (a.children) {
77
- const o = W(a.children, t);
76
+ for (const t of r)
77
+ if (t.children) {
78
+ const o = oe(t.children, a);
78
79
  if (o)
79
80
  return o;
80
81
  }
81
- }, ke = (l, t, e) => {
82
- const a = [], o = [];
83
- return e || (e = [...l]), e.length && e.forEach((u, n) => {
82
+ }, Ce = (r, a, e) => {
83
+ const t = [], o = [];
84
+ return e || (e = [...r]), e.length && e.forEach((n, i) => {
84
85
  let p;
85
- if (typeof u == "string") {
86
- const d = W(l, u);
87
- p = d ? { ...d } : { key: u, label: u };
86
+ if (typeof n == "string") {
87
+ const c = oe(r, n);
88
+ p = c ? { ...c } : { key: n, label: n };
88
89
  } else {
89
- const d = W(l, u.key);
90
- p = d ? { ...d, ...u } : { ...u };
90
+ const c = oe(r, n.key);
91
+ p = c ? { ...c, ...n } : { ...n };
91
92
  }
92
- p.click || (p.click = (d, i, f) => {
93
- i && (i.rowData.value = f), p.formVisible ? (p.formVisible.value = !1, setTimeout(() => {
93
+ p.click || (p.click = (c, u, f) => {
94
+ u && (u.rowData.value = f), p.formVisible ? (p.formVisible.value = !1, setTimeout(() => {
94
95
  p.formVisible.value = !0;
95
- }, 1)) : le.warning("未配置点击处理事件!");
96
- }), t === 0 || n < t ? a.push(p) : o.push(p);
97
- }), { buttons: a, menus: o };
98
- }, j = (l, t) => l.disabled && typeof l.disabled == "function" ? l.disabled(t) : l.disabled, J = (l, t) => l.visible && typeof l.visible == "function" ? l.visible(t) : l.visible ?? !0, Ja = (l, t) => {
99
- t.reload.value = !0;
100
- }, Xa = (l, t) => {
101
- t.searchBar.value = !t.searchBar.value;
102
- }, Za = (l, t) => {
103
- switch (t.tableSize.value) {
96
+ }, 1)) : G.warning("未配置点击处理事件!");
97
+ }), a === 0 || i < a ? t.push(p) : o.push(p);
98
+ }), { buttons: t, menus: o };
99
+ }, te = (r, a) => r.disabled && typeof r.disabled == "function" ? r.disabled(a) : r.disabled, J = (r, a) => r.visible && typeof r.visible == "function" ? r.visible(a) : r.visible ?? !0, ha = (r, a) => {
100
+ a.reload.value = !0;
101
+ }, ga = (r, a) => {
102
+ a.searchBar.value = !a.searchBar.value;
103
+ }, ba = (r, a) => {
104
+ switch (a.tableSize.value) {
104
105
  case "large":
105
- t.tableSize.value = "middle";
106
+ a.tableSize.value = "middle";
106
107
  break;
107
108
  case "middle":
108
- t.tableSize.value = "small";
109
+ a.tableSize.value = "small";
109
110
  break;
110
111
  case "small":
111
- t.tableSize.value = "large";
112
+ a.tableSize.value = "large";
112
113
  break;
113
114
  }
114
- }, et = (l, t) => {
115
- t.selectable.value = !t.selectable.value, t.selectable.value || (t.selectKeys.value = [], t.selectRows.value = []);
116
- }, at = (l, t) => {
117
- t.rowExpand.value = !t.rowExpand.value;
118
- }, Ie = (l, t) => {
119
- t.selectable.value = !t.selectable.value;
120
- }, V = (l, t, e, a, o) => {
121
- (!l.confirm || o) && l.click && (t ? l.click(t, e, a) : l.click(null, e, a)), lt(l);
122
- }, tt = (l, t) => {
123
- t.selectable.value = !t.selectable.value;
124
- }, He = () => {
125
- const l = he();
126
- l.setFullscreen(!l.fullscreen);
127
- }, lt = (l, t) => {
128
- (l.icons || l.labels) && (l.iconStatus = l.iconStatus || 0, l.iconStatus += 1, l.labels && l.labels.length && (l.label = l.labels[l.iconStatus % l.labels.length]), l.icons && l.icons.length && (l.icon = l.icons[l.iconStatus % l.icons.length]));
129
- }, rt = (l, t) => {
130
- t ? delete l.visible : l.visible = !1;
131
- }, Ee = [
115
+ }, ya = (r, a) => {
116
+ a.selectable.value = !a.selectable.value, a.selectable.value || (a.selectKeys.value = [], a.selectRows.value = []);
117
+ }, _a = (r, a) => {
118
+ a.rowExpand.value = !a.rowExpand.value;
119
+ }, Ve = (r, a) => {
120
+ a.selectable.value = !a.selectable.value;
121
+ }, Y = (r, a, e, t, o) => {
122
+ (!r.confirm || o) && r.click && (a ? r.click(a, e, t) : r.click(null, e, t)), ka(r);
123
+ }, xa = (r, a) => {
124
+ a.selectable.value = !a.selectable.value;
125
+ }, pt = () => {
126
+ const r = Ue();
127
+ r.setFullscreen(!r.fullscreen);
128
+ }, ka = (r, a) => {
129
+ (r.icons || r.labels) && (r.iconStatus = r.iconStatus || 0, r.iconStatus += 1, r.labels && r.labels.length && (r.label = r.labels[r.iconStatus % r.labels.length]), r.icons && r.icons.length && (r.icon = r.icons[r.iconStatus % r.icons.length]));
130
+ }, wa = (r, a) => {
131
+ a ? delete r.visible : r.visible = !1;
132
+ }, Ye = [
132
133
  {
133
134
  key: "Reload",
134
135
  label: "刷新表格",
135
136
  icon: "icon-reload",
136
- click: Ja
137
+ click: ha
137
138
  },
138
139
  {
139
140
  key: "Query",
@@ -141,20 +142,20 @@ const $e = (l, t, e, a = "remove") => {
141
142
  labels: ["展开搜索栏", "折叠搜索栏"],
142
143
  icon: "icon-search",
143
144
  iconStatus: 0,
144
- click: Xa
145
+ click: ga
145
146
  },
146
147
  {
147
148
  key: "RowHeight",
148
149
  label: "行高调整",
149
150
  icon: "icon-row-height",
150
- click: Za
151
+ click: ba
151
152
  },
152
153
  {
153
154
  key: "tool.multiple.checkbox",
154
155
  label: "显示多选框",
155
156
  labels: ["显示多选框", "隐藏多选框"],
156
157
  icon: "icon-checkbox",
157
- click: et
158
+ click: ya
158
159
  },
159
160
  {
160
161
  key: "tool.expand.rows",
@@ -163,7 +164,7 @@ const $e = (l, t, e, a = "remove") => {
163
164
  icon: "icon-row-collapse",
164
165
  iconStatus: 0,
165
166
  icons: ["icon-row-collapse", "icon-row-expand"],
166
- click: at
167
+ click: _a
167
168
  },
168
169
  {
169
170
  key: "tool.export.excel",
@@ -173,12 +174,12 @@ const $e = (l, t, e, a = "remove") => {
173
174
  {
174
175
  key: "tool.export.excel.all",
175
176
  label: "全部记录",
176
- click: Ie
177
+ click: Ve
177
178
  },
178
179
  {
179
180
  key: "tool.export.excel.selected",
180
181
  label: "选中的记录",
181
- click: Ie
182
+ click: Ve
182
183
  }
183
184
  ]
184
185
  },
@@ -190,7 +191,7 @@ const $e = (l, t, e, a = "remove") => {
190
191
  {
191
192
  key: "tool.export.pdf.selected",
192
193
  label: "选中的记录",
193
- click: tt
194
+ click: xa
194
195
  }
195
196
  ]
196
197
  },
@@ -210,76 +211,76 @@ const $e = (l, t, e, a = "remove") => {
210
211
  icon: "icon-fullscreen",
211
212
  iconStatus: 0,
212
213
  icons: ["icon-fullscreen", "icon-exitscreen"],
213
- click: He
214
+ click: pt
214
215
  }
215
- ], st = (l) => {
216
- if (!l.tools || l.tools.length > 0) {
217
- const t = [];
218
- return l.tools ? t.push(...l.tools) : t.push(...Ee), { tools: ke(Ee, 0, t).buttons };
216
+ ], Ca = (r) => {
217
+ if (!r.tools || r.tools.length > 0) {
218
+ const a = [];
219
+ return r.tools ? a.push(...r.tools) : a.push(...Ye), { tools: Ce(Ye, 0, a).buttons };
219
220
  }
220
221
  return {
221
222
  tools: []
222
223
  };
223
224
  };
224
- var ot = /* @__PURE__ */ ((l) => (l.SYS_CONFIG = "SYS_CONFIG_", l.APP_MENU = "APP_MENU_", l.DICT_TYPE = "DICT_TYPE_", l.HOST_INFO = "HOST_INFO_", l.APP_PERMITS = "APP_PERMITS_", l.USER_SETTINGS = "USER_SETTINGS_", l.DICT_DATA = "DICT_DATA_", l.COMMON_OPTIONS = "COMMON_OPTIONS_", l))(ot || {});
225
- class Qe {
225
+ var Sa = /* @__PURE__ */ ((r) => (r.SYS_CONFIG = "SYS_CONFIG_", r.APP_MENU = "APP_MENU_", r.DICT_TYPE = "DICT_TYPE_", r.HOST_INFO = "HOST_INFO_", r.APP_PERMITS = "APP_PERMITS_", r.USER_SETTINGS = "USER_SETTINGS_", r.DICT_DATA = "DICT_DATA_", r.COMMON_OPTIONS = "COMMON_OPTIONS_", r))(Sa || {});
226
+ class ft {
226
227
  /**
227
228
  * 设置缓存数据(带服务器时间)
228
229
  */
229
- static setWithServerTime(t, e, a) {
230
+ static setWithServerTime(a, e, t) {
230
231
  const o = {
231
232
  data: e,
232
- lastTime: a
233
+ lastTime: t
233
234
  };
234
- oe.set({ key: t, storage: "local" }, o);
235
+ ve.set({ key: a, storage: "local" }, o);
235
236
  }
236
237
  /**
237
238
  * 设置缓存数据
238
239
  */
239
- static setData(t, e) {
240
- oe.set({ key: t, storage: "local" }, e);
240
+ static setData(a, e) {
241
+ ve.set({ key: a, storage: "local" }, e);
241
242
  }
242
243
  /**
243
244
  * 获取缓存数据
244
245
  */
245
- static getData(t) {
246
- const e = oe.get({ key: t, storage: "local" });
247
- return e && Qe.isTimedData(e) ? e.data : e ?? null;
246
+ static getData(a) {
247
+ const e = ve.get({ key: a, storage: "local" });
248
+ return e && ft.isTimedData(e) ? e.data : e ?? null;
248
249
  }
249
250
  /**
250
251
  * 清除缓存
251
252
  */
252
- static remove(t) {
253
- oe.remove({ key: t, storage: "local" });
253
+ static remove(a) {
254
+ ve.remove({ key: a, storage: "local" });
254
255
  }
255
256
  /**
256
257
  * 清理指定前缀的缓存 (基于 localStorage 实现,因为 FrontCache 未提供此方法)
257
258
  */
258
- static clearByPrefix(t) {
259
+ static clearByPrefix(a) {
259
260
  for (let e = 0; e < localStorage.length; e++) {
260
- const a = localStorage.key(e);
261
- a && a.startsWith("frontCache::" + t) && localStorage.removeItem(a);
261
+ const t = localStorage.key(e);
262
+ t && t.startsWith("frontCache::" + a) && localStorage.removeItem(t);
262
263
  }
263
264
  }
264
265
  /**
265
266
  * 清理所有缓存
266
267
  */
267
268
  static clearAll() {
268
- for (let t = localStorage.length - 1; t >= 0; t--) {
269
- const e = localStorage.key(t);
269
+ for (let a = localStorage.length - 1; a >= 0; a--) {
270
+ const e = localStorage.key(a);
270
271
  e && e.startsWith("frontCache::") && localStorage.removeItem(e);
271
272
  }
272
273
  }
273
274
  /**
274
275
  * 判断是否是带时间戳的数据
275
276
  */
276
- static isTimedData(t) {
277
- return t && typeof t == "object" && "data" in t && "lastTime" in t && typeof t.lastTime == "number";
277
+ static isTimedData(a) {
278
+ return a && typeof a == "object" && "data" in a && "lastTime" in a && typeof a.lastTime == "number";
278
279
  }
279
280
  }
280
- async function tl() {
281
+ async function Ul() {
281
282
  try {
282
- const l = await Re(
283
+ const r = await Be(
283
284
  {
284
285
  api: "PLATFORM_API",
285
286
  url: "/api/SysCacheSvr/getLastTime",
@@ -287,18 +288,18 @@ async function tl() {
287
288
  },
288
289
  {}
289
290
  );
290
- if ((l == null ? void 0 : l.status) === ze.SUCCESS) {
291
- const t = l.data;
292
- Object.keys(t).forEach((e) => {
293
- const a = t[e];
294
- ["local", "session"].forEach((u) => {
295
- const n = u === "local" ? localStorage : sessionStorage;
296
- for (let p = 0; p < n.length; p++) {
297
- const d = n.key(p);
298
- if (d && d.endsWith(e))
291
+ if ((r == null ? void 0 : r.status) === Me.SUCCESS) {
292
+ const a = r.data;
293
+ Object.keys(a).forEach((e) => {
294
+ const t = a[e];
295
+ ["local", "session"].forEach((n) => {
296
+ const i = n === "local" ? localStorage : sessionStorage;
297
+ for (let p = 0; p < i.length; p++) {
298
+ const c = i.key(p);
299
+ if (c && c.endsWith(e))
299
300
  try {
300
- const i = JSON.parse(n.getItem(d));
301
- i && typeof i == "object" && "lastTime" in i && typeof i.lastTime == "number" && i.lastTime !== a && n.removeItem(d);
301
+ const u = JSON.parse(i.getItem(c));
302
+ u && typeof u == "object" && "lastTime" in u && typeof u.lastTime == "number" && u.lastTime !== t && i.removeItem(c);
302
303
  } catch {
303
304
  continue;
304
305
  }
@@ -306,12 +307,12 @@ async function tl() {
306
307
  });
307
308
  });
308
309
  }
309
- } catch (l) {
310
- console.error("检查缓存更新失败", l);
310
+ } catch (r) {
311
+ console.error("检查缓存更新失败", r);
311
312
  }
312
313
  }
313
- const ll = async (l, t) => {
314
- const e = await qe(l, t);
314
+ const Nl = async (r, a) => {
315
+ const e = await dt(r, a);
315
316
  if (e.success)
316
317
  return {
317
318
  blobUrl: e.blobUrl,
@@ -320,15 +321,15 @@ const ll = async (l, t) => {
320
321
  // 不再返回blob对象,使用URL即可
321
322
  };
322
323
  throw new Error(e.error || "CSV转Excel失败");
323
- }, rl = async (l, t) => {
324
+ }, Bl = async (r, a) => {
324
325
  try {
325
- const a = new TextDecoder("utf-8").decode(l), o = await qe(a, t);
326
+ const t = new TextDecoder("utf-8").decode(r), o = await dt(t, a);
326
327
  return {
327
328
  success: o.success,
328
329
  blobUrl: o.blobUrl,
329
330
  fileName: o.fileName,
330
331
  error: o.error,
331
- csvContent: a
332
+ csvContent: t
332
333
  // 保留原始CSV内容
333
334
  };
334
335
  } catch (e) {
@@ -337,67 +338,67 @@ const ll = async (l, t) => {
337
338
  error: e instanceof Error ? e.message : "未知错误"
338
339
  };
339
340
  }
340
- }, Ge = (l) => l ? Array.isArray(l) ? l.join(".") : l : "", Je = (l) => l.map((t) => ({
341
- label: t.title,
342
- value: Ge(t.dataIndex) || t.key || ""
343
- })), Xe = (l, t) => l.map((e, a) => {
341
+ }, vt = (r) => r ? Array.isArray(r) ? r.join(".") : r : "", mt = (r) => r.map((a) => ({
342
+ label: a.title,
343
+ value: vt(a.dataIndex) || a.key || ""
344
+ })), ht = (r, a) => r.map((e, t) => {
344
345
  const o = { ...e };
345
- return t.forEach((u) => {
346
- const n = Ge(u.dataIndex) || u.key;
347
- n && u.customRender && (o[n] = u.customRender({
348
- text: e[n],
346
+ return a.forEach((n) => {
347
+ const i = vt(n.dataIndex) || n.key;
348
+ i && n.customRender && (o[i] = n.customRender({
349
+ text: e[i],
349
350
  record: e,
350
- index: a,
351
- column: u
351
+ index: t,
352
+ column: n
352
353
  }));
353
354
  }), o;
354
- }), Ze = async (l, t, e) => {
355
+ }), gt = async (r, a, e) => {
355
356
  try {
356
- const o = (await import("@json2csv/plainjs")).Parser, n = new o({ fields: t }).parse(e), p = new Blob([`\uFEFF${n}`], { type: "text/csv" });
357
- Ha(p, l);
358
- } catch (a) {
359
- console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
357
+ const o = (await import("@json2csv/plainjs")).Parser, i = new o({ fields: a }).parse(e), p = new Blob([`\uFEFF${i}`], { type: "text/csv" });
358
+ fa(p, r);
359
+ } catch (t) {
360
+ console.error("导出失败:", t), G.error("文件导出失败,请稍后重试");
360
361
  }
361
- }, sl = async (l, t, e) => {
362
+ }, Ml = async (r, a, e) => {
362
363
  try {
363
- const a = ea(l), o = t.filter((p) => p.visible !== !1 && p.export !== !1), u = Je(o), n = Xe(e, o);
364
- await Ze(a, u, n);
365
- } catch (a) {
366
- console.error("导出失败:", a), le.error("文件导出失败,请稍后重试");
364
+ const t = bt(r), o = a.filter((p) => p.visible !== !1 && p.export !== !1), n = mt(o), i = ht(e, o);
365
+ await gt(t, n, i);
366
+ } catch (t) {
367
+ console.error("导出失败:", t), G.error("文件导出失败,请稍后重试");
367
368
  }
368
- }, ea = (l) => {
369
- const t = /\{([^}]+)\}/g;
370
- return l.replace(t, (e, a) => ve().format(a));
371
- }, ol = async (l, t, e, a) => {
369
+ }, bt = (r) => {
370
+ const a = /\{([^}]+)\}/g;
371
+ return r.replace(a, (e, t) => Pe().format(t));
372
+ }, zl = async (r, a, e, t) => {
372
373
  try {
373
- const o = ea(l), u = t.filter((i) => i.visible !== !1), n = Je(u);
374
- let p = e.page, d = e.gridQuery;
375
- return a.api || (a.api = p.api), a.authorize === void 0 && (a.authorize = p.authorize), e.isGridLoading.value = !0, Re(a, d).then(async (i) => {
376
- if (e.isGridLoading.value = !1, (i == null ? void 0 : i.status) === ze.SUCCESS) {
377
- if (i.data) {
378
- let f = i.data;
379
- const s = Xe(f, u);
380
- await Ze(o, n, s);
374
+ const o = bt(r), n = a.filter((u) => u.visible !== !1), i = mt(n);
375
+ let p = e.page, c = e.gridQuery;
376
+ return t.api || (t.api = p.api), t.authorize === void 0 && (t.authorize = p.authorize), e.isGridLoading.value = !0, Be(t, c).then(async (u) => {
377
+ if (e.isGridLoading.value = !1, (u == null ? void 0 : u.status) === Me.SUCCESS) {
378
+ if (u.data) {
379
+ let f = u.data;
380
+ const s = ht(f, n);
381
+ await gt(o, i, s);
381
382
  }
382
- } else if ((i == null ? void 0 : i.errno) == la) {
383
- Pe().logout(!1);
383
+ } else if ((u == null ? void 0 : u.errno) == xt) {
384
+ Le().logout(!1);
384
385
  return;
385
386
  }
386
387
  });
387
388
  } catch (o) {
388
- console.error("导出失败:", o), le.error("文件导出失败,请稍后重试");
389
+ console.error("导出失败:", o), G.error("文件导出失败,请稍后重试");
389
390
  }
390
- }, nl = /* @__PURE__ */ S({
391
+ }, Ol = /* @__PURE__ */ T({
391
392
  __name: "fullscreen",
392
- setup(l) {
393
- const t = he();
394
- return (e, a) => (m(), b(U, {
395
- onClick: ae(r(He), ["stop"]),
396
- icon: r(t).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
393
+ setup(r) {
394
+ const a = Ue();
395
+ return (e, t) => (v(), b(K, {
396
+ onClick: pe(l(pt), ["stop"]),
397
+ icon: l(a).fullscreen ? "icon-exitscreen" : "icon-fullscreen",
397
398
  class: "w-[17px] h-[17px]"
398
399
  }, null, 8, ["onClick", "icon"]));
399
400
  }
400
- }), nt = { class: "ml-2" }, it = /* @__PURE__ */ S({
401
+ }), $a = { class: "ml-2" }, Ta = /* @__PURE__ */ T({
401
402
  inheritAttrs: !1,
402
403
  __name: "helper",
403
404
  props: {
@@ -406,30 +407,30 @@ const ll = async (l, t) => {
406
407
  size: {},
407
408
  placement: {}
408
409
  },
409
- setup(l) {
410
- const t = X();
411
- return (e, a) => (m(), b(r(Ea), {
410
+ setup(r) {
411
+ const a = ne();
412
+ return (e, t) => (v(), b(l(Wt), {
412
413
  placement: e.placement ?? "topRight"
413
414
  }, {
414
415
  content: h(() => [
415
- I(e.$slots, "default", {}, () => [
416
+ P(e.$slots, "default", {}, () => [
416
417
  D("div", {
417
418
  class: E(["text-[14px]", [e.maxWidth]])
418
- }, P(e.text), 3)
419
+ }, N(e.text), 3)
419
420
  ])
420
421
  ]),
421
422
  default: h(() => [
422
- D("span", nt, [
423
- k(U, F({
423
+ D("span", $a, [
424
+ S(K, B({
424
425
  icon: "icon-question-circle",
425
426
  class: ["text-[#888]", [e.size ? "w-" + e.size + " h-" + e.size : "w-5 h-5"]]
426
- }, r(t)), null, 16, ["class"])
427
+ }, l(a)), null, 16, ["class"])
427
428
  ])
428
429
  ]),
429
430
  _: 3
430
431
  }, 8, ["placement"]));
431
432
  }
432
- }), il = /* @__PURE__ */ S({
433
+ }), Al = /* @__PURE__ */ T({
433
434
  __name: "layoutIcon",
434
435
  props: {
435
436
  icon: {
@@ -439,21 +440,21 @@ const ll = async (l, t) => {
439
440
  type: Array
440
441
  }
441
442
  },
442
- setup(l) {
443
- const t = l, a = ra({
444
- iconUrl: `${Sa.MICROLAYOUT_ICONS}`,
443
+ setup(r) {
444
+ const a = r, t = kt({
445
+ iconUrl: `${Rt.MICROLAYOUT_ICONS}`,
445
446
  monoColor: !0,
446
- icon: t.icon,
447
- icons: t.icons
447
+ icon: a.icon,
448
+ icons: a.icons
448
449
  });
449
- return (o, u) => l.icon || l.icons ? (m(), b(r(a), F({
450
+ return (o, n) => r.icon || r.icons ? (v(), b(l(t), B({
450
451
  key: 0,
451
- icon: l.icon,
452
- icons: l.icons,
452
+ icon: r.icon,
453
+ icons: r.icons,
453
454
  class: ["align-middle"]
454
- }, o.$attrs), null, 16, ["icon", "icons"])) : y("", !0);
455
+ }, o.$attrs), null, 16, ["icon", "icons"])) : x("", !0);
455
456
  }
456
- }), ut = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, ul = /* @__PURE__ */ S({
457
+ }), Ia = { class: "hover:bg-gray-200 w-[24px] h-[24px] rounded-md" }, Rl = /* @__PURE__ */ T({
457
458
  __name: "index",
458
459
  props: {
459
460
  saveText: {},
@@ -463,32 +464,32 @@ const ll = async (l, t) => {
463
464
  drawerSave: { type: Function },
464
465
  drawerSaveAs: { type: Function }
465
466
  },
466
- setup(l) {
467
- const { useToken: t } = Ve, { token: e } = t(), a = _(!1), o = l, u = o.editorCtrl;
468
- ge(q.EditorControl, u), T(
469
- () => u.visible.value,
470
- (i) => {
471
- a.value = i ?? !1;
467
+ setup(r) {
468
+ const { useToken: a } = rt, { token: e } = a(), t = y(!1), o = r, n = o.editorCtrl;
469
+ _e(ae.EditorControl, n), I(
470
+ () => n.visible.value,
471
+ (u) => {
472
+ t.value = u ?? !1;
472
473
  }
473
- ), K(() => {
474
- a.value = u.visible.value ?? !1;
474
+ ), X(() => {
475
+ t.value = n.visible.value ?? !1;
475
476
  });
476
- const n = () => {
477
- o.drawerSave ? o.drawerSave() : u && Fe(u);
477
+ const i = () => {
478
+ o.drawerSave ? o.drawerSave() : n && We(n);
478
479
  }, p = () => {
479
- o.drawerSaveAs ? o.drawerSaveAs() : u && sa(u);
480
- }, d = () => {
481
- oa(u);
480
+ o.drawerSaveAs ? o.drawerSaveAs() : n && wt(n);
481
+ }, c = () => {
482
+ Ct(n);
482
483
  };
483
- return (i, f) => (m(), b(r(Pa), {
484
- open: a.value,
485
- "onUpdate:open": f[0] || (f[0] = (s) => a.value = s),
484
+ return (u, f) => (v(), b(l(qt), {
485
+ open: t.value,
486
+ "onUpdate:open": f[0] || (f[0] = (s) => t.value = s),
486
487
  "get-container": !1,
487
488
  closable: !1,
488
489
  "header-style": {
489
490
  height: "40px",
490
491
  padding: "10px 6px 10px 16px",
491
- backgroundColor: r(e).colorBgLayout
492
+ backgroundColor: l(e).colorBgLayout
492
493
  },
493
494
  "body-style": {
494
495
  padding: "10px 16px"
@@ -501,12 +502,12 @@ const ll = async (l, t) => {
501
502
  boxShadow: "rgba(0, 0, 0, 0.3) -2px 0px 8px"
502
503
  },
503
504
  width: "420px",
504
- onClose: d
505
+ onClose: c
505
506
  }, {
506
507
  extra: h(() => [
507
- I(i.$slots, "extra", {}, () => [
508
- D("div", ut, [
509
- k(r(U), {
508
+ P(u.$slots, "extra", {}, () => [
509
+ D("div", Ia, [
510
+ S(l(K), {
510
511
  class: "top-[-2px] left-[2px] w-6 h-6",
511
512
  icon: "icon-new",
512
513
  angle: 45,
@@ -514,49 +515,49 @@ const ll = async (l, t) => {
514
515
  clickable: "",
515
516
  color: "#666",
516
517
  position: [0, 0],
517
- onClick: d
518
+ onClick: c
518
519
  })
519
520
  ])
520
521
  ])
521
522
  ]),
522
523
  default: h(() => [
523
- I(i.$slots, "default")
524
+ P(u.$slots, "default")
524
525
  ]),
525
526
  footer: h(() => [
526
- I(i.$slots, "footer", {}, () => [
527
- k(r(te), null, {
527
+ P(u.$slots, "footer", {}, () => [
528
+ S(l(ie), null, {
528
529
  default: h(() => [
529
- i.cancelText !== "" ? (m(), b(r(A), {
530
+ u.cancelText !== "" ? (v(), b(l(Q), {
530
531
  key: 0,
531
- onClick: d
532
+ onClick: c
532
533
  }, {
533
534
  default: h(() => [
534
- N(P(i.cancelText ?? "取消"), 1)
535
+ M(N(u.cancelText ?? "取消"), 1)
535
536
  ]),
536
537
  _: 1
537
- })) : y("", !0),
538
- i.saveAsText !== "" && r(u).saveAsBtnVisible !== !1 ? (m(), b(r(A), {
538
+ })) : x("", !0),
539
+ u.saveAsText !== "" && l(n).saveAsBtnVisible !== !1 ? (v(), b(l(Q), {
539
540
  key: 1,
540
541
  onClick: p,
541
542
  type: "primary",
542
- loading: r(u).isFormSaving.value
543
+ loading: l(n).isFormSaving.value
543
544
  }, {
544
545
  default: h(() => [
545
- N(P(i.saveAsText ?? "另存为"), 1)
546
+ M(N(u.saveAsText ?? "另存为"), 1)
546
547
  ]),
547
548
  _: 1
548
- }, 8, ["loading"])) : y("", !0),
549
- i.saveText !== "" && r(u).saveBtnVisible !== !1 ? (m(), b(r(A), {
549
+ }, 8, ["loading"])) : x("", !0),
550
+ u.saveText !== "" && l(n).saveBtnVisible !== !1 ? (v(), b(l(Q), {
550
551
  key: 2,
551
- onClick: n,
552
+ onClick: i,
552
553
  type: "primary",
553
- loading: r(u).isFormSaving.value
554
+ loading: l(n).isFormSaving.value
554
555
  }, {
555
556
  default: h(() => [
556
- N(P(i.saveText ?? "保存"), 1)
557
+ M(N(u.saveText ?? "保存"), 1)
557
558
  ]),
558
559
  _: 1
559
- }, 8, ["loading"])) : y("", !0)
560
+ }, 8, ["loading"])) : x("", !0)
560
561
  ]),
561
562
  _: 1
562
563
  })
@@ -565,21 +566,21 @@ const ll = async (l, t) => {
565
566
  _: 3
566
567
  }, 8, ["open", "header-style"]));
567
568
  }
568
- }), cl = /* @__PURE__ */ S({
569
+ }), Kl = /* @__PURE__ */ T({
569
570
  __name: "index",
570
571
  props: {
571
572
  labelWidth: {},
572
573
  wrapperWidth: {},
573
574
  editorCtrl: {}
574
575
  },
575
- setup(l) {
576
- const t = l, e = t.editorCtrl ?? ie(q.EditorControl, void 0);
577
- return ge(q.LabelWidth, t.labelWidth), (a, o) => {
578
- const u = re("submit");
579
- return H((m(), b(r(Ye), {
580
- "label-col": { flex: t.labelWidth ?? "85px" },
576
+ setup(r) {
577
+ const a = r, e = a.editorCtrl ?? ge(ae.EditorControl, void 0);
578
+ return _e(ae.LabelWidth, a.labelWidth), (t, o) => {
579
+ const n = re("submit");
580
+ return W((v(), b(l(st), {
581
+ "label-col": { flex: a.labelWidth ?? "85px" },
581
582
  "wrapper-col": {
582
- flex: t.wrapperWidth ?? "1 0 280px"
583
+ flex: a.wrapperWidth ?? "1 0 280px"
583
584
  },
584
585
  style: {
585
586
  display: "flex",
@@ -587,23 +588,23 @@ const ll = async (l, t) => {
587
588
  }
588
589
  }, {
589
590
  default: h(() => [
590
- I(a.$slots, "default")
591
+ P(t.$slots, "default")
591
592
  ]),
592
593
  _: 3
593
594
  }, 8, ["label-col", "wrapper-col"])), [
594
595
  [
595
- u,
596
+ n,
596
597
  () => {
597
- r(e) && r(Fe)(r(e));
598
+ l(e) && l(We)(l(e));
598
599
  }
599
600
  ]
600
601
  ]);
601
602
  };
602
603
  }
603
- }), ct = {
604
+ }), Da = {
604
605
  key: 0,
605
606
  class: "flex-grow"
606
- }, dt = { class: "w-8 mt-[-2px]" }, dl = /* @__PURE__ */ S({
607
+ }, Fa = { class: "w-8 mt-[-2px]" }, jl = /* @__PURE__ */ T({
607
608
  inheritAttrs: !1,
608
609
  __name: "formItem",
609
610
  props: {
@@ -614,294 +615,122 @@ const ll = async (l, t) => {
614
615
  nextLine: { type: Boolean },
615
616
  bottomMargin: {}
616
617
  },
617
- setup(l) {
618
- const t = l, e = X(), a = ie(q.EditorControl, void 0), o = ie(q.LabelWidth, "85px") ?? "85px", u = Ne(t, a), n = _(!1);
618
+ setup(r) {
619
+ const a = r, e = ne(), t = ge(ae.EditorControl, void 0), o = ge(ae.LabelWidth, "85px") ?? "85px", n = qe(a, t), i = y(!1);
619
620
  setTimeout(() => {
620
- n.value = !0;
621
+ i.value = !0;
621
622
  }, 30);
622
- const p = Q(() => {
623
- var i;
624
- if (!t.rule)
623
+ const p = R(() => {
624
+ var u;
625
+ if (!a.rule)
625
626
  return !1;
626
- const d = Me(t.rule.split("."), (i = a == null ? void 0 : a.formRules) == null ? void 0 : i.value);
627
- return d ? (d.required || (u.value.errClass = "", u.value.msg = ""), d.required ?? !0) : (Fa.error(`"${t.label}" 的验证规则 \`${t.rule}\` 不存在`), u.value.errClass = "text-[#ff4d4f]", u.value.msg = `规则 \`${t.rule}\` 不存在,请检查代码!`, !0);
627
+ const c = He(a.rule.split("."), (u = t == null ? void 0 : t.formRules) == null ? void 0 : u.value);
628
+ return c ? (c.required || (n.value.errClass = "", n.value.msg = ""), c.required ?? !0) : (Ht.error(`"${a.label}" 的验证规则 \`${a.rule}\` 不存在`), n.value.errClass = "text-[#ff4d4f]", n.value.msg = `规则 \`${a.rule}\` 不存在,请检查代码!`, !0);
628
629
  });
629
- return (d, i) => (m(), w("div", {
630
- class: E(["relative", d.bottomMargin ? d.bottomMargin : "mb-1"])
630
+ return (c, u) => (v(), w("div", {
631
+ class: E(["relative", c.bottomMargin ? c.bottomMargin : "mb-1"])
631
632
  }, [
632
- n.value ? (m(), b(r(Ke), F({
633
+ i.value ? (v(), b(l(ot), B({
633
634
  key: 0,
634
635
  required: p.value,
635
- class: ["relative", [d.nextLine ? "mb-0" : d.rule ? "" : "mb-3"]]
636
- }, r(e)), {
636
+ class: ["relative", [c.nextLine ? "mb-0" : c.rule ? "" : "mb-3"]]
637
+ }, l(e)), {
637
638
  label: h(() => [
638
639
  D("span", {
639
- class: E([r(u).errClass ? "text-[#ff4d4f]" : "", "w-full"])
640
- }, P(d.label), 3)
640
+ class: E([l(n).errClass ? "text-[#ff4d4f]" : "", "w-full"])
641
+ }, N(c.label), 3)
641
642
  ]),
642
643
  default: h(() => [
643
644
  D("div", {
644
- class: E(["flex items-center", d.width ? d.width : "w-full"])
645
+ class: E(["flex items-center", c.width ? c.width : "w-full"])
645
646
  }, [
646
- d.nextLine ? y("", !0) : (m(), w("div", ct, [
647
- I(d.$slots, "default")
647
+ c.nextLine ? x("", !0) : (v(), w("div", Da, [
648
+ P(c.$slots, "default")
648
649
  ])),
649
- D("div", dt, [
650
- I(d.$slots, "helper", {}, () => [
651
- d.helper ? (m(), b(r(it), {
650
+ D("div", Fa, [
651
+ P(c.$slots, "helper", {}, () => [
652
+ c.helper ? (v(), b(l(Ta), {
652
653
  key: 0,
653
- text: d.helper
654
- }, null, 8, ["text"])) : y("", !0)
654
+ text: c.helper
655
+ }, null, 8, ["text"])) : x("", !0)
655
656
  ])
656
657
  ])
657
658
  ], 2)
658
659
  ]),
659
660
  _: 3
660
- }, 16, ["required", "class"])) : y("", !0),
661
- d.nextLine ? (m(), w("div", {
661
+ }, 16, ["required", "class"])) : x("", !0),
662
+ c.nextLine ? (v(), w("div", {
662
663
  key: 1,
663
- class: E(["w-[95%] flex items-center relative", [d.nextLine ? d.rule ? "mb-7" : "mb-3" : ""]])
664
+ class: E(["w-[95%] flex items-center relative", [c.nextLine ? c.rule ? "mb-7" : "mb-3" : ""]])
664
665
  }, [
665
- I(d.$slots, "default")
666
- ], 2)) : y("", !0),
667
- r(u).errClass ? (m(), w("span", {
666
+ P(c.$slots, "default")
667
+ ], 2)) : x("", !0),
668
+ l(n).errClass ? (v(), w("span", {
668
669
  key: 2,
669
- style: be({ left: d.nextLine ? "2px" : r(o) }),
670
+ style: ze({ left: c.nextLine ? "2px" : l(o) }),
670
671
  class: "absolute bottom-[3px] text-[12px] text-[#ff4d4fcc]"
671
- }, P(r(u).msg), 5)) : y("", !0)
672
+ }, N(l(n).msg), 5)) : x("", !0)
672
673
  ], 2));
673
674
  }
674
- }), pt = { class: "w-1/3 relative mb-1" }, ft = { class: "flex items-center w-[90%]" }, vt = { class: "flex-grow pl-1" }, mt = {
675
- key: 0,
676
- class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
677
- }, fe = /* @__PURE__ */ S({
678
- inheritAttrs: !1,
679
- __name: "searchItem",
680
- props: {
681
- label: {},
682
- width: {},
683
- rule: {}
684
- },
685
- setup(l) {
686
- const t = l, e = X(), a = ie(q.EditorControl, void 0), o = Ne(t, a), u = Q(() => {
687
- var p;
688
- if (!t.rule)
689
- return !1;
690
- const n = Me(t.rule.split("."), (p = a == null ? void 0 : a.formRules) == null ? void 0 : p.value);
691
- return n ? (n.required || (o.value.errClass = "", o.value.msg = ""), n.required ?? !0) : (le.error(`"${t.label}" 的验证规则 \`${t.rule}\` 不存在`), o.value.errClass = "text-[#ff4d4f]", o.value.msg = `规则 \`${t.rule}\` 不存在,请检查代码!`, !0);
692
- });
693
- return (n, p) => (m(), w("div", pt, [
694
- k(r(Ke), F({
695
- required: u.value,
696
- class: "w-[90%] relative"
697
- }, r(e), {
698
- class: [n.rule ? "" : "mb-3", n.width],
699
- labelCol: { span: 6 }
700
- }), Ue({
701
- default: h(() => [
702
- D("div", ft, [
703
- D("div", vt, [
704
- I(n.$slots, "default")
705
- ])
706
- ])
707
- ]),
708
- _: 2
709
- }, [
710
- n.label ? {
711
- name: "label",
712
- fn: h(() => [
713
- D("span", {
714
- class: E([r(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
715
- }, P(n.label), 3)
716
- ]),
717
- key: "0"
718
- } : void 0
719
- ]), 1040, ["required", "class"]),
720
- r(o).msg ? (m(), w("span", mt, P(r(o).msg), 1)) : y("", !0)
721
- ]));
722
- }
723
- }), pl = /* @__PURE__ */ S({
724
- __name: "index",
725
- props: {
726
- search: {},
727
- gridCtrl: {},
728
- likeFields: {}
729
- },
730
- emits: ["update:search", "onsearch", "onreset"],
731
- setup(l, { emit: t }) {
732
- const e = l, a = t, o = _(0), u = _(0), n = _(0), p = (c) => {
733
- let g = 0;
734
- for (let C = 0; C < c.length; C++)
735
- typeof c[C].type == "object" && g++;
736
- return g;
737
- }, d = Ta(), i = () => {
738
- u.value = 0, n.value = 0, d.default && (u.value = p(d.default({}))), e.gridCtrl && e.gridCtrl.searchBar && d.control && (n.value = p(d.control({}))), o.value = 2 - (u.value + n.value) % 3;
739
- };
740
- T(
741
- () => {
742
- var c;
743
- return (c = e.gridCtrl) == null ? void 0 : c.searchBar;
744
- },
745
- () => {
746
- i();
747
- }
748
- );
749
- const f = JSON.parse(JSON.stringify(e.search));
750
- K(() => {
751
- var g;
752
- i();
753
- let c = { ...e.search };
754
- e.gridCtrl && (e.gridCtrl.gridQuery = {
755
- ...e.gridCtrl.gridQuery,
756
- Query: {
757
- ...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
758
- ...c
759
- }
760
- });
761
- });
762
- const s = () => {
763
- var g;
764
- let c = { ...e.search };
765
- if (e.likeFields)
766
- for (const C of e.likeFields)
767
- c[C] && (c[C] = { $like: "%" + c[C] + "%" });
768
- e.gridCtrl && (e.gridCtrl.gridQuery = {
769
- ...e.gridCtrl.gridQuery,
770
- Query: {
771
- ...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
772
- ...c
773
- }
774
- }, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), a("onsearch", c);
775
- }, v = () => {
776
- const c = JSON.parse(JSON.stringify(f));
777
- for (const g in e.search)
778
- c[g] === void 0 && (c[g] = void 0);
779
- a("update:search", c), a("onreset");
780
- };
781
- return (c, g) => {
782
- const C = re("submit");
783
- return u.value + n.value > 0 ? H((m(), b(r(Ye), {
784
- key: 0,
785
- "label-col": { flex: "60px" },
786
- style: {
787
- flexWrap: "wrap",
788
- borderBottom: "1px solid #e9e9e9"
789
- },
790
- class: "flex mb-[10px]"
791
- }, {
792
- default: h(() => {
793
- var $, M;
794
- return [
795
- I(c.$slots, "default"),
796
- ($ = c.gridCtrl) != null && $.searchBar ? I(c.$slots, "control", { key: 0 }) : y("", !0),
797
- o.value >= 1 ? (m(), b(fe, {
798
- key: 1,
799
- class: "w-1/3"
800
- })) : y("", !0),
801
- o.value >= 2 ? (m(), b(fe, {
802
- key: 2,
803
- class: "w-1/3"
804
- })) : y("", !0),
805
- u.value || (M = c.gridCtrl) != null && M.searchBar ? (m(), b(fe, {
806
- key: 3,
807
- class: "w-1/3 flex justify-end text-right pr-5",
808
- "wrapper-col": { flex: "auto" }
809
- }, {
810
- default: h(() => [
811
- k(r(te), null, {
812
- default: h(() => [
813
- k(r(A), {
814
- type: "primary",
815
- onClick: s,
816
- icon: "icon-search"
817
- }, {
818
- default: h(() => g[0] || (g[0] = [
819
- N("搜索")
820
- ])),
821
- _: 1,
822
- __: [0]
823
- }),
824
- k(r(A), {
825
- onClick: v,
826
- icon: "icon-reset"
827
- }, {
828
- default: h(() => g[1] || (g[1] = [
829
- N("重置")
830
- ])),
831
- _: 1,
832
- __: [1]
833
- })
834
- ]),
835
- _: 1
836
- })
837
- ]),
838
- _: 1
839
- })) : y("", !0)
840
- ];
841
- }),
842
- _: 3
843
- })), [
844
- [C, s]
845
- ]) : y("", !0);
846
- };
847
- }
848
- }), ht = /* @__PURE__ */ S({
849
- __name: "tableOperate",
675
+ }), Pa = /* @__PURE__ */ T({
676
+ __name: "listOperate",
850
677
  props: {
851
678
  record: {},
852
679
  gridCtrl: {}
853
680
  },
854
- setup(l) {
855
- const t = l, e = t.gridCtrl, a = Q(() => ce.currentRoute.value.path), o = [
681
+ setup(r) {
682
+ const a = r, e = a.gridCtrl, t = R(() => ue.currentRoute.value.path), o = [
856
683
  {
857
684
  key: "Edit",
858
- label: "编辑",
859
- type: "primary",
685
+ label: "",
686
+ icon: "icon-edit",
687
+ type: "text",
860
688
  visible: !0,
861
689
  role: ["Super", "Admin"],
862
690
  permit: ":edit",
863
- click: () => na(e, t.record)
691
+ click: () => Qe(e, a.record)
864
692
  },
865
693
  {
866
694
  key: "Delete",
867
- label: "删除",
868
- type: "primary",
695
+ label: "",
696
+ icon: "icon-delete",
697
+ type: "text",
869
698
  visible: !0,
870
699
  danger: !0,
871
700
  role: ["Super", "Admin"],
872
701
  permit: ":delete",
873
702
  confirm: !0,
874
703
  confirmText: "是否删除此记录?",
875
- click: () => ia(e, t.record)
704
+ click: () => Ge(e, a.record)
876
705
  }
877
- ], { buttons: u, menus: n } = ke(o, 0, e.operates), p = (d) => {
878
- if (typeof d.disabled == "boolean")
879
- return d.disabled;
880
- if (typeof d.disabled == "function")
881
- return j(d, t.record) ?? !1;
882
- if (t.record.hasOwnProperty("Enabled"))
883
- switch (d.key) {
706
+ ], { buttons: n, menus: i } = Ce(o, 0, e.operates), p = (c) => {
707
+ if (typeof c.disabled == "boolean")
708
+ return c.disabled;
709
+ if (typeof c.disabled == "function")
710
+ return te(c, a.record) ?? !1;
711
+ if (a.record.hasOwnProperty(e.statusKey))
712
+ switch (c.key) {
884
713
  case "Edit":
885
- return !t.record.Enabled;
714
+ return !a.record[e.statusKey];
886
715
  case "Delete":
887
- return !!t.record.Enabled;
716
+ return !!a.record[e.statusKey];
888
717
  }
889
718
  return !1;
890
719
  };
891
- return (d, i) => {
720
+ return (c, u) => {
892
721
  const f = re("auth");
893
- return m(), b(r(Te), { theme: {
722
+ return v(), b(l(be), { theme: {
894
723
  token: {
895
724
  fontSize: 13
896
725
  }
897
726
  } }, {
898
727
  default: h(() => [
899
- k(r(te), null, {
728
+ S(l(ie), null, {
900
729
  default: h(() => [
901
- (m(!0), w(O, null, z(r(u), (s) => (m(), w(O, {
730
+ (v(!0), w(L, null, V(l(n), (s) => (v(), w(L, {
902
731
  key: s.key
903
732
  }, [
904
- r(J)(s, t.record) ? (m(), b(r(Na), {
733
+ l(J)(s, a.record) ? (v(), b(l(nt), {
905
734
  key: 0,
906
735
  disabled: p(s) || !s.confirm,
907
736
  cancelText: "否",
@@ -909,72 +738,69 @@ const ll = async (l, t) => {
909
738
  title: s.confirmText,
910
739
  okButtonProps: { size: "small" },
911
740
  cancelButtonProps: { size: "small" },
912
- onConfirm: (v) => r(V)(s, r(e).page, r(e), t.record, !0)
741
+ onConfirm: (m) => l(Y)(s, l(e).page, l(e), a.record, !0)
913
742
  }, {
914
743
  default: h(() => [
915
- r(J)(s, t.record) ? H((m(), b(r(We), {
744
+ l(J)(s, a.record) ? W((v(), b(l(K), {
916
745
  key: s.key,
917
- type: s.type ?? "text",
746
+ icon: s.icon,
918
747
  danger: s.danger,
919
748
  disabled: p(s),
920
- onClick: (v) => r(V)(s, r(e).page, r(e), t.record),
921
- size: "small",
922
- style: be({
923
- padding: s.type ?? "0px 4px"
924
- })
925
- }, {
926
- default: h(() => [
927
- N(P(s.label), 1)
928
- ]),
929
- _: 2
930
- }, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
931
- [f, { url: a.value, role: s.role, permit: s.permit }]
932
- ]) : y("", !0)
749
+ onClick: (m) => !p(s) && l(Y)(s, l(e).page, l(e), a.record),
750
+ clickable: !p(s),
751
+ class: E([
752
+ "w-4 h-4",
753
+ s.danger ? "text-red-500" : "text-gray-600",
754
+ p(s) ? "opacity-30 cursor-not-allowed" : "hover:text-gray-800"
755
+ ])
756
+ }, null, 8, ["icon", "danger", "disabled", "onClick", "clickable", "class"])), [
757
+ [f, { url: t.value, role: s.role, permit: s.permit }]
758
+ ]) : x("", !0)
933
759
  ]),
934
760
  _: 2
935
- }, 1032, ["disabled", "title", "onConfirm"])) : y("", !0)
761
+ }, 1032, ["disabled", "title", "onConfirm"])) : x("", !0)
936
762
  ], 64))), 128)),
937
- d.record.Enabled == 1 ? (m(), b(r(Te), {
763
+ c.record[l(e).statusKey] == 1 ? (v(), b(l(be), {
938
764
  key: 0,
939
765
  autoInsertSpaceInButton: !1
940
766
  }, {
941
767
  default: h(() => [
942
- r(n).length > 0 ? (m(), b(r(Ma), {
768
+ l(i).length > 0 ? (v(), b(l(it), {
943
769
  key: 0,
944
770
  size: "small"
945
771
  }, {
946
772
  overlay: h(() => [
947
- k(r(xe), null, {
773
+ S(l(ke), null, {
948
774
  default: h(() => [
949
- (m(!0), w(O, null, z(r(n), (s) => (m(), w(O, {
775
+ (v(!0), w(L, null, V(l(i), (s) => (v(), w(L, {
950
776
  key: s.key
951
777
  }, [
952
- r(J)(s, t.record) ? H((m(), b(r(ye), {
778
+ l(J)(s, a.record) ? W((v(), b(l(we), {
953
779
  key: 0,
954
780
  disabled: p(s),
955
- onClick: (v) => r(V)(s, r(e).page, r(e), t.record)
781
+ onClick: (m) => l(Y)(s, l(e).page, l(e), a.record)
956
782
  }, {
957
783
  default: h(() => [
958
- N(P(s.label), 1)
784
+ M(N(s.label), 1)
959
785
  ]),
960
786
  _: 2
961
787
  }, 1032, ["disabled", "onClick"])), [
962
- [f, { url: a.value, role: s.role, permit: s.permit }]
963
- ]) : y("", !0)
788
+ [f, { url: t.value, role: s.role, permit: s.permit }]
789
+ ]) : x("", !0)
964
790
  ], 64))), 128))
965
791
  ]),
966
792
  _: 1
967
793
  })
968
794
  ]),
969
795
  default: h(() => [
970
- i[0] || (i[0] = N(" 更多 "))
796
+ u[0] || (u[0] = M(" 更多 "))
971
797
  ]),
972
798
  _: 1,
973
799
  __: [0]
974
- })) : y("", !0)
800
+ })) : x("", !0)
975
801
  ]),
976
802
  _: 1
977
- })) : y("", !0)
803
+ })) : x("", !0)
978
804
  ]),
979
805
  _: 1
980
806
  })
@@ -983,94 +809,94 @@ const ll = async (l, t) => {
983
809
  });
984
810
  };
985
811
  }
986
- }), gt = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, bt = /* @__PURE__ */ S({
812
+ }), Ea = { class: "inline-flex [&>div]:ml-[-1px] first:[&>div]:ml-0" }, La = /* @__PURE__ */ T({
987
813
  __name: "icontool",
988
814
  props: {
989
815
  gridCtrl: {}
990
816
  },
991
- setup(l) {
992
- const t = l, e = t.gridCtrl, { tools: a } = st(t.gridCtrl), o = he();
993
- T(
817
+ setup(r) {
818
+ const a = r, e = a.gridCtrl, { tools: t } = Ca(a.gridCtrl), o = Ue();
819
+ I(
994
820
  () => e.selectable.value,
995
821
  (p) => {
996
- W(a, "tool.export.excel.selected") && (W(a, "tool.export.excel.selected").disabled = !p), W(a, "tool.export.pdf.selected") && (W(a, "tool.export.pdf.selected").disabled = !p);
822
+ oe(t, "tool.export.excel.selected") && (oe(t, "tool.export.excel.selected").disabled = !p), oe(t, "tool.export.pdf.selected") && (oe(t, "tool.export.pdf.selected").disabled = !p);
997
823
  }
998
824
  );
999
- const u = _([]);
1000
- T(
825
+ const n = y([]);
826
+ I(
1001
827
  () => e.columns.value,
1002
828
  (p) => {
1003
- u.value = Oe(p, !0);
829
+ n.value = Je(p, !0);
1004
830
  },
1005
831
  { deep: !0, immediate: !0 }
1006
832
  );
1007
- const n = () => {
1008
- e.columns.value.splice(0, e.columns.value.length, ...u.value), o.setTableColumns(ce.currentRoute.value.path, e.columns.value);
833
+ const i = () => {
834
+ e.columns.value.splice(0, e.columns.value.length, ...n.value), o.setTableColumns(ue.currentRoute.value.path, e.columns.value);
1009
835
  };
1010
- return (p, d) => (m(), w("div", gt, [
1011
- (m(!0), w(O, null, z(r(a), (i, f) => (m(), w(O, {
1012
- key: i.key
836
+ return (p, c) => (v(), w("div", Ea, [
837
+ (v(!0), w(L, null, V(l(t), (u, f) => (v(), w(L, {
838
+ key: u.key
1013
839
  }, [
1014
- r(J)(i) && i.dropdown ? (m(), b(r(me), {
840
+ l(J)(u) && u.dropdown ? (v(), b(l(Ee), {
1015
841
  key: 0,
1016
842
  placement: "bottomRight",
1017
843
  class: "p-0 rounded-none"
1018
844
  }, {
1019
845
  overlay: h(() => [
1020
846
  D("div", {
1021
- class: E(["min-w-[100px] bg-white rounded shadow-md p-4", i.dropdownClass])
847
+ class: E(["min-w-[100px] bg-white rounded shadow-md p-4", u.dropdownClass])
1022
848
  }, [
1023
- i.dropdown === "headset" ? (m(), b(r(qa), {
849
+ u.dropdown === "headset" ? (v(), b(l(pa), {
1024
850
  key: 0,
1025
- modelValue: u.value,
1026
- "onUpdate:modelValue": d[1] || (d[1] = (s) => u.value = s),
851
+ modelValue: n.value,
852
+ "onUpdate:modelValue": c[1] || (c[1] = (s) => n.value = s),
1027
853
  "item-key": "dataIndex",
1028
- onEnd: n,
854
+ onEnd: i,
1029
855
  handle: ".drag-handle"
1030
856
  }, {
1031
857
  default: h(() => [
1032
- (m(!0), w(O, null, z(u.value, (s) => (m(), w("div", {
858
+ (v(!0), w(L, null, V(n.value, (s) => (v(), w("div", {
1033
859
  key: s.name,
1034
- onClick: d[0] || (d[0] = ae(() => {
860
+ onClick: c[0] || (c[0] = pe(() => {
1035
861
  }, ["stop"])),
1036
862
  class: "flex items-center mb-2 last:mb-0 select-none"
1037
863
  }, [
1038
- d[2] || (d[2] = D("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
1039
- k(r(Oa), {
864
+ c[2] || (c[2] = D("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
865
+ S(l(Qt), {
1040
866
  checked: s.visible !== !1,
1041
- onChange: ae(
1042
- (v) => {
1043
- r(rt)(s, v.target.checked);
867
+ onChange: pe(
868
+ (m) => {
869
+ l(wa)(s, m.target.checked);
1044
870
  },
1045
871
  ["stop", "prevent"]
1046
872
  ),
1047
873
  class: "text-gray-700 hover:text-gray-900 select-none"
1048
874
  }, {
1049
875
  default: h(() => [
1050
- N(P(s.title), 1)
876
+ M(N(s.title), 1)
1051
877
  ]),
1052
878
  _: 2
1053
879
  }, 1032, ["checked", "onChange"])
1054
880
  ]))), 128))
1055
881
  ]),
1056
882
  _: 1
1057
- }, 8, ["modelValue"])) : y("", !0)
883
+ }, 8, ["modelValue"])) : x("", !0)
1058
884
  ], 2)
1059
885
  ]),
1060
886
  default: h(() => [
1061
- k(r(A), {
887
+ S(l(Q), {
1062
888
  class: E([
1063
889
  "px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
1064
890
  f === 0 ? "rounded-l-[5px]" : "",
1065
- f === r(a).length - 1 ? "rounded-r-[5px]" : ""
891
+ f === l(t).length - 1 ? "rounded-r-[5px]" : ""
1066
892
  ]),
1067
- disabled: r(j)(i),
1068
- tiptext: i.label,
1069
- onClick: (s) => r(V)(i, r(e).page, r(e))
893
+ disabled: l(te)(u),
894
+ tiptext: u.label,
895
+ onClick: (s) => l(Y)(u, l(e).page, l(e))
1070
896
  }, {
1071
897
  default: h(() => [
1072
- k(r(U), {
1073
- icon: i.icon,
898
+ S(l(K), {
899
+ icon: u.icon,
1074
900
  class: "w-[18px] h-[18.5px]",
1075
901
  clickable: ""
1076
902
  }, null, 8, ["icon"])
@@ -1079,39 +905,39 @@ const ll = async (l, t) => {
1079
905
  }, 1032, ["class", "disabled", "tiptext", "onClick"])
1080
906
  ]),
1081
907
  _: 2
1082
- }, 1024)) : !i.children && r(J)(i) ? (m(), b(r(A), {
908
+ }, 1024)) : !u.children && l(J)(u) ? (v(), b(l(Q), {
1083
909
  key: 1,
1084
910
  class: E([
1085
911
  "px-[8px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
1086
912
  f === 0 ? "rounded-l-[5px]" : "",
1087
- f === r(a).length - 1 ? "rounded-r-[5px]" : ""
913
+ f === l(t).length - 1 ? "rounded-r-[5px]" : ""
1088
914
  ]),
1089
- disabled: r(j)(i),
1090
- tiptext: i.label,
1091
- onClick: (s) => r(V)(i, r(e).page, r(e))
915
+ disabled: l(te)(u),
916
+ tiptext: u.label,
917
+ onClick: (s) => l(Y)(u, l(e).page, l(e))
1092
918
  }, {
1093
919
  default: h(() => [
1094
- k(r(U), {
1095
- icon: i.icon,
920
+ S(l(K), {
921
+ icon: u.icon,
1096
922
  class: "w-[18px] h-[18.5px]",
1097
923
  clickable: ""
1098
924
  }, null, 8, ["icon"])
1099
925
  ]),
1100
926
  _: 2
1101
- }, 1032, ["class", "disabled", "tiptext", "onClick"])) : r(J)(i) ? (m(), b(r(me), {
927
+ }, 1032, ["class", "disabled", "tiptext", "onClick"])) : l(J)(u) ? (v(), b(l(Ee), {
1102
928
  key: 2,
1103
929
  placement: "bottomRight",
1104
930
  class: "p-0 rounded-none"
1105
931
  }, {
1106
932
  overlay: h(() => [
1107
- k(r(xe), null, {
933
+ S(l(ke), null, {
1108
934
  default: h(() => [
1109
- (m(!0), w(O, null, z(i.children, (s) => (m(), b(r(ye), {
935
+ (v(!0), w(L, null, V(u.children, (s) => (v(), b(l(we), {
1110
936
  key: s.key,
1111
- disabled: r(j)(s)
937
+ disabled: l(te)(s)
1112
938
  }, {
1113
939
  default: h(() => [
1114
- N(P(s.label), 1)
940
+ M(N(s.label), 1)
1115
941
  ]),
1116
942
  _: 2
1117
943
  }, 1032, ["disabled"]))), 128))
@@ -1120,19 +946,19 @@ const ll = async (l, t) => {
1120
946
  }, 1024)
1121
947
  ]),
1122
948
  default: h(() => [
1123
- k(r(A), {
949
+ S(l(Q), {
1124
950
  class: E([
1125
951
  "!w-[46px] px-[5px] py-[2px] relative border-[#ccc] bg-[#fcfcfc] rounded-none text-[#666] hover:z-10",
1126
952
  f === 0 ? "rounded-l-[5px]" : ""
1127
953
  ]),
1128
- disabled: r(j)(i),
1129
- tiptext: i.label,
1130
- icon: i.icon,
954
+ disabled: l(te)(u),
955
+ tiptext: u.label,
956
+ icon: u.icon,
1131
957
  iconProps: { class: "w-[19px] h-[19px]" },
1132
- onClick: (s) => r(V)(i, r(e).page, r(e))
958
+ onClick: (s) => l(Y)(u, l(e).page, l(e))
1133
959
  }, {
1134
960
  default: h(() => [
1135
- k(r(U), {
961
+ S(l(K), {
1136
962
  icon: "icon-down-arrow",
1137
963
  class: "w-[12px] h-[12px]"
1138
964
  })
@@ -1141,18 +967,18 @@ const ll = async (l, t) => {
1141
967
  }, 1032, ["class", "disabled", "tiptext", "icon", "onClick"])
1142
968
  ]),
1143
969
  _: 2
1144
- }, 1024)) : y("", !0)
970
+ }, 1024)) : x("", !0)
1145
971
  ], 64))), 128))
1146
972
  ]));
1147
973
  }
1148
- }), _t = { class: "flex justify-between mb-[10px]" }, xt = { key: 1 }, yt = 3, kt = /* @__PURE__ */ S({
974
+ }), Ua = { class: "flex justify-between mb-[10px]" }, Na = { key: 1 }, Ba = 3, yt = /* @__PURE__ */ T({
1149
975
  __name: "index",
1150
976
  props: {
1151
977
  gridCtrl: {},
1152
978
  editorCtrl: {}
1153
979
  },
1154
- setup(l) {
1155
- const t = l, e = t.gridCtrl, a = e.page, o = t.editorCtrl, u = Q(() => ce.currentRoute.value.path), n = [
980
+ setup(r) {
981
+ const a = r, e = a.gridCtrl, t = e.page, o = a.editorCtrl, n = R(() => ue.currentRoute.value.path), i = [
1156
982
  {
1157
983
  key: "New",
1158
984
  label: "新增",
@@ -1162,92 +988,516 @@ const ll = async (l, t) => {
1162
988
  role: ["Super", "Admin"],
1163
989
  permit: ":new",
1164
990
  // 默认仅受权限码控制
1165
- click: () => ua(o)
991
+ click: () => St(o)
1166
992
  }
1167
- ], p = _([]), d = _([]);
1168
- return T(
993
+ ], p = y([]), c = y([]);
994
+ return I(
1169
995
  () => {
1170
- var i;
1171
- return (i = e.buttons) == null ? void 0 : i.value;
996
+ var u;
997
+ return (u = e.buttons) == null ? void 0 : u.value;
1172
998
  },
1173
999
  () => {
1174
1000
  var s;
1175
- const { buttons: i, menus: f } = ke(
1176
- n,
1177
- e.flat !== void 0 ? e.flat : yt,
1001
+ const { buttons: u, menus: f } = Ce(
1002
+ i,
1003
+ e.flat !== void 0 ? e.flat : Ba,
1178
1004
  (s = e.buttons) == null ? void 0 : s.value
1179
1005
  );
1180
- p.value.splice(0, p.value.length, ...i), d.value.splice(0, d.value.length, ...f);
1006
+ p.value.splice(0, p.value.length, ...u), c.value.splice(0, c.value.length, ...f);
1181
1007
  },
1182
1008
  {
1183
1009
  deep: !0,
1184
1010
  immediate: !0
1185
1011
  }
1186
- ), (i, f) => {
1012
+ ), (u, f) => {
1187
1013
  const s = re("auth");
1188
- return m(), w("div", _t, [
1189
- k(r(te), null, {
1014
+ return v(), w("div", Ua, [
1015
+ S(l(ie), null, {
1190
1016
  default: h(() => [
1191
- (m(!0), w(O, null, z(p.value, (v) => H((m(), b(r(A), {
1192
- key: v.key,
1193
- type: v.type,
1194
- danger: v.danger,
1195
- disabled: r(j)(v),
1196
- icon: v.icon,
1197
- onClick: (c) => r(V)(v, r(a), r(e))
1017
+ (v(!0), w(L, null, V(p.value, (m) => W((v(), b(l(Q), {
1018
+ key: m.key,
1019
+ type: m.type,
1020
+ danger: m.danger,
1021
+ disabled: l(te)(m),
1022
+ icon: m.icon,
1023
+ onClick: (d) => l(Y)(m, l(t), l(e))
1198
1024
  }, {
1199
1025
  default: h(() => [
1200
- N(P(v.label), 1)
1026
+ M(N(m.label), 1)
1201
1027
  ]),
1202
1028
  _: 2
1203
1029
  }, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
1204
- [s, { url: u.value, role: v.role, permit: v.permit }]
1030
+ [s, { url: n.value, role: m.role, permit: m.permit }]
1205
1031
  ])), 128)),
1206
- d.value.length > 0 ? (m(), b(r(me), { key: 0 }, {
1032
+ c.value.length > 0 ? (v(), b(l(Ee), { key: 0 }, {
1207
1033
  overlay: h(() => [
1208
- k(r(xe), null, {
1034
+ S(l(ke), null, {
1209
1035
  default: h(() => [
1210
- (m(!0), w(O, null, z(d.value, (v) => H((m(), b(r(ye), {
1211
- key: v.key,
1212
- disabled: r(j)(v),
1213
- onClick: (c) => r(V)(v, r(a), r(e))
1036
+ (v(!0), w(L, null, V(c.value, (m) => W((v(), b(l(we), {
1037
+ key: m.key,
1038
+ disabled: l(te)(m),
1039
+ onClick: (d) => l(Y)(m, l(t), l(e))
1214
1040
  }, {
1215
1041
  default: h(() => [
1216
- N(P(v.label), 1)
1042
+ M(N(m.label), 1)
1217
1043
  ]),
1218
1044
  _: 2
1219
1045
  }, 1032, ["disabled", "onClick"])), [
1220
- [s, { url: u.value, role: v.role, permit: v.permit }]
1046
+ [s, { url: n.value, role: m.role, permit: m.permit }]
1221
1047
  ])), 128))
1222
1048
  ]),
1223
1049
  _: 1
1224
1050
  })
1225
1051
  ]),
1226
1052
  default: h(() => [
1227
- k(r(A), null, {
1053
+ S(l(Q), null, {
1228
1054
  default: h(() => f[0] || (f[0] = [
1229
- N(" 更多操作 ")
1055
+ M(" 更多操作 ")
1230
1056
  ])),
1231
1057
  _: 1,
1232
1058
  __: [0]
1233
1059
  })
1234
1060
  ]),
1235
1061
  _: 1
1236
- })) : y("", !0),
1237
- p.value.length === 0 && d.value.length === 0 ? (m(), w("span", xt)) : y("", !0)
1062
+ })) : x("", !0),
1063
+ p.value.length === 0 && c.value.length === 0 ? (v(), w("span", Na)) : x("", !0)
1238
1064
  ]),
1239
1065
  _: 1
1240
1066
  }),
1241
- k(r(te), { class: "mr-1" }, {
1067
+ S(l(ie), { class: "mr-1" }, {
1242
1068
  default: h(() => [
1243
- (m(), b($a(bt), { "grid-ctrl": r(e) }, null, 8, ["grid-ctrl"]))
1069
+ (v(), b(Kt(La), { "grid-ctrl": l(e) }, null, 8, ["grid-ctrl"]))
1244
1070
  ]),
1245
1071
  _: 1
1246
1072
  })
1247
1073
  ]);
1248
1074
  };
1249
1075
  }
1250
- }), fl = /* @__PURE__ */ S({
1076
+ }), Ma = { class: "flex items-center justify-between" }, za = { class: "flex items-center space-x-2" }, Vl = /* @__PURE__ */ T({
1077
+ inheritAttrs: !1,
1078
+ __name: "index",
1079
+ props: {
1080
+ gridCtrl: {},
1081
+ primaryKey: {},
1082
+ listData: {},
1083
+ grid: { default: () => ({ gutter: 16, column: 4 }) },
1084
+ pagination: { type: [Boolean, Object], default: void 0 },
1085
+ titleField: { default: "Title" },
1086
+ statusDisabled: {}
1087
+ },
1088
+ setup(r) {
1089
+ const a = r, e = ne(), t = a.gridCtrl, o = R(() => ue.currentRoute.value.path);
1090
+ t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
1091
+ const n = y(t.pageSize.value), i = y(t.pageNo.value), p = y([]), c = y({
1092
+ total: 0,
1093
+ current: 1,
1094
+ pageSize: n.value,
1095
+ showTotal: (f) => `共 ${f} 条记录`,
1096
+ onChange: (f, s) => {
1097
+ c.value !== !1 && (c.value.current = f, c.value.pageSize = s), n.value = s, i.value = f, t && (t.pageNo.value = f, t.pageSize.value = s, t.remotePage && me(t));
1098
+ },
1099
+ ...a.pagination === !1 ? {} : a.pagination
1100
+ });
1101
+ a.pagination === !1 && (c.value = !1), I(
1102
+ () => t.tableData.value,
1103
+ (f) => {
1104
+ f && (p.value = f, c.value !== !1 && (c.value.total = t.total.value ?? 0, c.value.current = t.pageNo.value ?? 1, c.value.pageSize = t.pageSize.value ?? 10));
1105
+ },
1106
+ { immediate: !0 }
1107
+ ), I(
1108
+ () => a.listData,
1109
+ (f) => {
1110
+ f && (p.value = f, c.value !== !1 && (c.value.total = f.length, c.value.current = t.pageNo.value ?? 1, c.value.pageSize = t.pageSize.value ?? 10));
1111
+ },
1112
+ { immediate: !0 }
1113
+ );
1114
+ const u = y(!1);
1115
+ return xe(() => {
1116
+ u.value && t && t.autoload && (t.reload.value = !0);
1117
+ }), X(async () => {
1118
+ var f, s, m, d, g;
1119
+ _e(ae.GridControl, t), t.page && ((f = t.gridUrl) != null && f.url) && (((s = t.gridUrl) == null ? void 0 : s.url) === ((m = t.page.urls.list) == null ? void 0 : m.url) && (t.remotePage = !1), ((d = t.gridUrl) == null ? void 0 : d.url) === ((g = t.page.urls.find) == null ? void 0 : g.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, c.value !== !1 && (c.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await me(t)).rows : p.value = await Xe(t)), setTimeout(() => {
1120
+ u.value = !0;
1121
+ }, 50);
1122
+ }), (f, s) => {
1123
+ var d, g;
1124
+ const m = re("auth");
1125
+ return v(), w(L, null, [
1126
+ (d = l(t).buttons) != null && d.value.length || (g = l(t).tools) != null && g.length ? (v(), b(yt, {
1127
+ key: 0,
1128
+ "grid-ctrl": l(t),
1129
+ "editor-ctrl": l(t).editor
1130
+ }, null, 8, ["grid-ctrl", "editor-ctrl"])) : x("", !0),
1131
+ u.value ? (v(), b(l(Gt), B({
1132
+ key: 1,
1133
+ class: "w-full min-h-[480px]",
1134
+ grid: a.grid,
1135
+ "data-source": p.value,
1136
+ loading: l(t).isGridLoading.value,
1137
+ pagination: c.value
1138
+ }, l(e)), {
1139
+ renderItem: h(({ item: C }) => [
1140
+ S(l(Jt), { class: "!m-0 !p-0" }, {
1141
+ default: h(() => [
1142
+ S(l(Xt), {
1143
+ class: "!m-0",
1144
+ "head-style": { fontSize: "14px", padding: "8px", minHeight: "36px", height: "36px" },
1145
+ "body-style": { padding: "4px" }
1146
+ }, {
1147
+ title: h(() => [
1148
+ D("div", Ma, [
1149
+ D("span", null, N(C[a.titleField]), 1),
1150
+ D("div", za, [
1151
+ W(S(Ze, {
1152
+ checked: C[l(t).statusKey],
1153
+ "onUpdate:checked": (F) => C[l(t).statusKey] = F,
1154
+ disabled: f.statusDisabled ? f.statusDisabled(C) : !1,
1155
+ data: l(Ne).EnableDisable,
1156
+ onClick: (F) => l(et)(l(t), C),
1157
+ size: "small",
1158
+ class: E([
1159
+ "relative mt-[3px] transform scale-[1.1]",
1160
+ f.statusDisabled && f.statusDisabled(C) ? "cursor-not-allowed disabled" : ""
1161
+ ]),
1162
+ loading: C.isLoading
1163
+ }, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"]), [
1164
+ [m, { url: o.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
1165
+ ]),
1166
+ S(Pa, {
1167
+ record: C,
1168
+ "grid-ctrl": l(t)
1169
+ }, null, 8, ["record", "grid-ctrl"])
1170
+ ])
1171
+ ])
1172
+ ]),
1173
+ default: h(() => [
1174
+ P(f.$slots, "cardContent", { record: C })
1175
+ ]),
1176
+ _: 2
1177
+ }, 1024)
1178
+ ]),
1179
+ _: 2
1180
+ }, 1024)
1181
+ ]),
1182
+ _: 3
1183
+ }, 16, ["grid", "data-source", "loading", "pagination"])) : x("", !0)
1184
+ ], 64);
1185
+ };
1186
+ }
1187
+ }), Oa = { class: "w-1/3 relative mb-1" }, Aa = { class: "flex items-center w-[90%]" }, Ra = { class: "flex-grow pl-1" }, Ka = {
1188
+ key: 0,
1189
+ class: "absolute bottom-[3px] left-[85px] text-[12px] text-[#ff4d4fcc] block"
1190
+ }, Fe = /* @__PURE__ */ T({
1191
+ inheritAttrs: !1,
1192
+ __name: "searchItem",
1193
+ props: {
1194
+ label: {},
1195
+ width: {},
1196
+ rule: {}
1197
+ },
1198
+ setup(r) {
1199
+ const a = r, e = ne(), t = ge(ae.EditorControl, void 0), o = qe(a, t), n = R(() => {
1200
+ var p;
1201
+ if (!a.rule)
1202
+ return !1;
1203
+ const i = He(a.rule.split("."), (p = t == null ? void 0 : t.formRules) == null ? void 0 : p.value);
1204
+ return i ? (i.required || (o.value.errClass = "", o.value.msg = ""), i.required ?? !0) : (G.error(`"${a.label}" 的验证规则 \`${a.rule}\` 不存在`), o.value.errClass = "text-[#ff4d4f]", o.value.msg = `规则 \`${a.rule}\` 不存在,请检查代码!`, !0);
1205
+ });
1206
+ return (i, p) => (v(), w("div", Oa, [
1207
+ S(l(ot), B({
1208
+ required: n.value,
1209
+ class: "w-[90%] relative"
1210
+ }, l(e), {
1211
+ class: [i.rule ? "" : "mb-3", i.width],
1212
+ labelCol: { span: 6 }
1213
+ }), lt({
1214
+ default: h(() => [
1215
+ D("div", Aa, [
1216
+ D("div", Ra, [
1217
+ P(i.$slots, "default")
1218
+ ])
1219
+ ])
1220
+ ]),
1221
+ _: 2
1222
+ }, [
1223
+ i.label ? {
1224
+ name: "label",
1225
+ fn: h(() => [
1226
+ D("span", {
1227
+ class: E([l(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
1228
+ }, N(i.label), 3)
1229
+ ]),
1230
+ key: "0"
1231
+ } : void 0
1232
+ ]), 1040, ["required", "class"]),
1233
+ l(o).msg ? (v(), w("span", Ka, N(l(o).msg), 1)) : x("", !0)
1234
+ ]));
1235
+ }
1236
+ }), Yl = /* @__PURE__ */ T({
1237
+ __name: "index",
1238
+ props: {
1239
+ search: {},
1240
+ gridCtrl: {},
1241
+ likeFields: {}
1242
+ },
1243
+ emits: ["update:search", "onsearch", "onreset"],
1244
+ setup(r, { emit: a }) {
1245
+ const e = r, t = a, o = y(0), n = y(0), i = y(0), p = (d) => {
1246
+ let g = 0;
1247
+ for (let C = 0; C < d.length; C++)
1248
+ typeof d[C].type == "object" && g++;
1249
+ return g;
1250
+ }, c = jt(), u = () => {
1251
+ n.value = 0, i.value = 0, c.default && (n.value = p(c.default({}))), e.gridCtrl && e.gridCtrl.searchBar && c.control && (i.value = p(c.control({}))), o.value = 2 - (n.value + i.value) % 3;
1252
+ };
1253
+ I(
1254
+ () => {
1255
+ var d;
1256
+ return (d = e.gridCtrl) == null ? void 0 : d.searchBar;
1257
+ },
1258
+ () => {
1259
+ u();
1260
+ }
1261
+ );
1262
+ const f = JSON.parse(JSON.stringify(e.search));
1263
+ X(() => {
1264
+ var g;
1265
+ u();
1266
+ let d = { ...e.search };
1267
+ e.gridCtrl && (e.gridCtrl.gridQuery = {
1268
+ ...e.gridCtrl.gridQuery,
1269
+ Query: {
1270
+ ...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
1271
+ ...d
1272
+ }
1273
+ });
1274
+ });
1275
+ const s = () => {
1276
+ var g;
1277
+ let d = { ...e.search };
1278
+ if (e.likeFields)
1279
+ for (const C of e.likeFields)
1280
+ d[C] && (d[C] = { $like: "%" + d[C] + "%" });
1281
+ e.gridCtrl && (e.gridCtrl.gridQuery = {
1282
+ ...e.gridCtrl.gridQuery,
1283
+ Query: {
1284
+ ...(g = e.gridCtrl.gridQuery) == null ? void 0 : g.Query,
1285
+ ...d
1286
+ }
1287
+ }, e.gridCtrl.pageNo.value = 1, e.gridCtrl.reload.value = !0), t("onsearch", d);
1288
+ }, m = () => {
1289
+ const d = JSON.parse(JSON.stringify(f));
1290
+ for (const g in e.search)
1291
+ d[g] === void 0 && (d[g] = void 0);
1292
+ t("update:search", d), t("onreset");
1293
+ };
1294
+ return (d, g) => {
1295
+ const C = re("submit");
1296
+ return n.value + i.value > 0 ? W((v(), b(l(st), {
1297
+ key: 0,
1298
+ "label-col": { flex: "60px" },
1299
+ style: {
1300
+ flexWrap: "wrap",
1301
+ borderBottom: "1px solid #e9e9e9"
1302
+ },
1303
+ class: "flex mb-[10px]"
1304
+ }, {
1305
+ default: h(() => {
1306
+ var F, U;
1307
+ return [
1308
+ P(d.$slots, "default"),
1309
+ (F = d.gridCtrl) != null && F.searchBar ? P(d.$slots, "control", { key: 0 }) : x("", !0),
1310
+ o.value >= 1 ? (v(), b(Fe, {
1311
+ key: 1,
1312
+ class: "w-1/3"
1313
+ })) : x("", !0),
1314
+ o.value >= 2 ? (v(), b(Fe, {
1315
+ key: 2,
1316
+ class: "w-1/3"
1317
+ })) : x("", !0),
1318
+ n.value || (U = d.gridCtrl) != null && U.searchBar ? (v(), b(Fe, {
1319
+ key: 3,
1320
+ class: "w-1/3 flex justify-end text-right pr-5",
1321
+ "wrapper-col": { flex: "auto" }
1322
+ }, {
1323
+ default: h(() => [
1324
+ S(l(ie), null, {
1325
+ default: h(() => [
1326
+ S(l(Q), {
1327
+ type: "primary",
1328
+ onClick: s,
1329
+ icon: "icon-search"
1330
+ }, {
1331
+ default: h(() => g[0] || (g[0] = [
1332
+ M("搜索")
1333
+ ])),
1334
+ _: 1,
1335
+ __: [0]
1336
+ }),
1337
+ S(l(Q), {
1338
+ onClick: m,
1339
+ icon: "icon-reset"
1340
+ }, {
1341
+ default: h(() => g[1] || (g[1] = [
1342
+ M("重置")
1343
+ ])),
1344
+ _: 1,
1345
+ __: [1]
1346
+ })
1347
+ ]),
1348
+ _: 1
1349
+ })
1350
+ ]),
1351
+ _: 1
1352
+ })) : x("", !0)
1353
+ ];
1354
+ }),
1355
+ _: 3
1356
+ })), [
1357
+ [C, s]
1358
+ ]) : x("", !0);
1359
+ };
1360
+ }
1361
+ }), ja = /* @__PURE__ */ T({
1362
+ __name: "tableOperate",
1363
+ props: {
1364
+ record: {},
1365
+ gridCtrl: {}
1366
+ },
1367
+ setup(r) {
1368
+ const a = r, e = a.gridCtrl, t = R(() => ue.currentRoute.value.path), o = [
1369
+ {
1370
+ key: "Edit",
1371
+ label: "编辑",
1372
+ type: "primary",
1373
+ visible: !0,
1374
+ role: ["Super", "Admin"],
1375
+ permit: ":edit",
1376
+ click: () => Qe(e, a.record)
1377
+ },
1378
+ {
1379
+ key: "Delete",
1380
+ label: "删除",
1381
+ type: "primary",
1382
+ visible: !0,
1383
+ danger: !0,
1384
+ role: ["Super", "Admin"],
1385
+ permit: ":delete",
1386
+ confirm: !0,
1387
+ confirmText: "是否删除此记录?",
1388
+ click: () => Ge(e, a.record)
1389
+ }
1390
+ ], { buttons: n, menus: i } = Ce(o, 0, e.operates), p = (c) => {
1391
+ if (typeof c.disabled == "boolean")
1392
+ return c.disabled;
1393
+ if (typeof c.disabled == "function")
1394
+ return te(c, a.record) ?? !1;
1395
+ if (a.record.hasOwnProperty(e.statusKey))
1396
+ switch (c.key) {
1397
+ case "Edit":
1398
+ return !a.record[e.statusKey];
1399
+ // 启用时可编辑,停用时不可编辑
1400
+ case "Delete":
1401
+ return !!a.record[e.statusKey];
1402
+ }
1403
+ return !1;
1404
+ };
1405
+ return (c, u) => {
1406
+ const f = re("auth");
1407
+ return v(), b(l(be), { theme: {
1408
+ token: {
1409
+ fontSize: 13
1410
+ }
1411
+ } }, {
1412
+ default: h(() => [
1413
+ S(l(ie), null, {
1414
+ default: h(() => [
1415
+ (v(!0), w(L, null, V(l(n), (s) => (v(), w(L, {
1416
+ key: s.key
1417
+ }, [
1418
+ l(J)(s, a.record) ? (v(), b(l(nt), {
1419
+ key: 0,
1420
+ disabled: p(s) || !s.confirm,
1421
+ cancelText: "否",
1422
+ okText: "是",
1423
+ title: s.confirmText,
1424
+ okButtonProps: { size: "small" },
1425
+ cancelButtonProps: { size: "small" },
1426
+ onConfirm: (m) => l(Y)(s, l(e).page, l(e), a.record, !0)
1427
+ }, {
1428
+ default: h(() => [
1429
+ l(J)(s, a.record) ? W((v(), b(l(ut), {
1430
+ key: s.key,
1431
+ type: s.type ?? "text",
1432
+ danger: s.danger,
1433
+ disabled: p(s),
1434
+ onClick: (m) => l(Y)(s, l(e).page, l(e), a.record),
1435
+ size: "small",
1436
+ style: ze({
1437
+ padding: s.type ?? "0px 4px"
1438
+ })
1439
+ }, {
1440
+ default: h(() => [
1441
+ M(N(s.label), 1)
1442
+ ]),
1443
+ _: 2
1444
+ }, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
1445
+ [f, { url: t.value, role: s.role, permit: s.permit }]
1446
+ ]) : x("", !0)
1447
+ ]),
1448
+ _: 2
1449
+ }, 1032, ["disabled", "title", "onConfirm"])) : x("", !0)
1450
+ ], 64))), 128)),
1451
+ c.record[l(e).statusKey] == 1 ? (v(), b(l(be), {
1452
+ key: 0,
1453
+ autoInsertSpaceInButton: !1
1454
+ }, {
1455
+ default: h(() => [
1456
+ l(i).length > 0 ? (v(), b(l(it), {
1457
+ key: 0,
1458
+ size: "small"
1459
+ }, {
1460
+ overlay: h(() => [
1461
+ S(l(ke), null, {
1462
+ default: h(() => [
1463
+ (v(!0), w(L, null, V(l(i), (s) => (v(), w(L, {
1464
+ key: s.key
1465
+ }, [
1466
+ l(J)(s, a.record) ? W((v(), b(l(we), {
1467
+ key: 0,
1468
+ disabled: p(s),
1469
+ onClick: (m) => l(Y)(s, l(e).page, l(e), a.record)
1470
+ }, {
1471
+ default: h(() => [
1472
+ M(N(s.label), 1)
1473
+ ]),
1474
+ _: 2
1475
+ }, 1032, ["disabled", "onClick"])), [
1476
+ [f, { url: t.value, role: s.role, permit: s.permit }]
1477
+ ]) : x("", !0)
1478
+ ], 64))), 128))
1479
+ ]),
1480
+ _: 1
1481
+ })
1482
+ ]),
1483
+ default: h(() => [
1484
+ u[0] || (u[0] = M(" 更多 "))
1485
+ ]),
1486
+ _: 1,
1487
+ __: [0]
1488
+ })) : x("", !0)
1489
+ ]),
1490
+ _: 1
1491
+ })) : x("", !0)
1492
+ ]),
1493
+ _: 1
1494
+ })
1495
+ ]),
1496
+ _: 1
1497
+ });
1498
+ };
1499
+ }
1500
+ }), Wl = /* @__PURE__ */ T({
1251
1501
  inheritAttrs: !1,
1252
1502
  __name: "index",
1253
1503
  props: {
@@ -1259,124 +1509,124 @@ const ll = async (l, t) => {
1259
1509
  scroll: {},
1260
1510
  statusDisabled: {}
1261
1511
  },
1262
- setup(l) {
1263
- const t = l, e = X(), a = t.gridCtrl, o = Q(() => ce.currentRoute.value.path);
1264
- a && (a.pageNo.value = 1, a.total.value = 0, a.pageSize.value = a.pageSize.value);
1265
- const u = _(a.pageSize.value), n = _(a.pageNo.value), p = _([]), d = _({
1512
+ setup(r) {
1513
+ const a = r, e = ne(), t = a.gridCtrl, o = R(() => ue.currentRoute.value.path);
1514
+ t && (t.pageNo.value = 1, t.total.value = 0, t.pageSize.value = t.pageSize.value);
1515
+ const n = y(t.pageSize.value), i = y(t.pageNo.value), p = y([]), c = y({
1266
1516
  total: 0,
1267
1517
  current: 1,
1268
- pageSize: u.value,
1269
- showTotal: (c) => `共 ${c} 条记录`,
1270
- onChange: (c, g) => {
1271
- d.value !== !1 && (d.value.current = c, d.value.pageSize = g), u.value = g, n.value = c, a && (a.pageNo.value = c, a.pageSize.value = g, a.remotePage && we(a));
1518
+ pageSize: n.value,
1519
+ showTotal: (d) => `共 ${d} 条记录`,
1520
+ onChange: (d, g) => {
1521
+ c.value !== !1 && (c.value.current = d, c.value.pageSize = g), n.value = g, i.value = d, t && (t.pageNo.value = d, t.pageSize.value = g, t.remotePage && me(t));
1272
1522
  },
1273
- ...t.pagination === !1 ? {} : t.pagination
1523
+ ...a.pagination === !1 ? {} : a.pagination
1274
1524
  });
1275
- t.pagination === !1 && (d.value = !1), T(
1276
- () => a.tableData.value,
1277
- (c) => {
1278
- c && (p.value = c, d.value !== !1 && (d.value.total = a.total.value ?? 0, d.value.current = a.pageNo.value ?? 1, d.value.pageSize = a.pageSize.value ?? 10));
1525
+ a.pagination === !1 && (c.value = !1), I(
1526
+ () => t.tableData.value,
1527
+ (d) => {
1528
+ d && (p.value = d, c.value !== !1 && (c.value.total = t.total.value ?? 0, c.value.current = t.pageNo.value ?? 1, c.value.pageSize = t.pageSize.value ?? 10));
1279
1529
  },
1280
1530
  { immediate: !0 }
1281
- ), T(
1282
- () => t.tableData,
1283
- (c) => {
1284
- c && (p.value = c, d.value !== !1 && (d.value.total = c.length, d.value.current = a.pageNo.value ?? 1, d.value.pageSize = a.pageSize.value ?? 10));
1531
+ ), I(
1532
+ () => a.tableData,
1533
+ (d) => {
1534
+ d && (p.value = d, c.value !== !1 && (c.value.total = d.length, c.value.current = t.pageNo.value ?? 1, c.value.pageSize = t.pageSize.value ?? 10));
1285
1535
  },
1286
1536
  { immediate: !0 }
1287
1537
  );
1288
- const i = _(a.columns.value), f = {
1289
- onChange: (c, g) => {
1290
- a && (a.selectKeys.value = c, a.selectRows.value = g);
1538
+ const u = y(t.columns.value), f = {
1539
+ onChange: (d, g) => {
1540
+ t && (t.selectKeys.value = d, t.selectRows.value = g);
1291
1541
  },
1292
1542
  columnWidth: "30px",
1293
- getCheckboxProps: (c) => ({
1294
- disabled: c.Enabled === 0
1543
+ getCheckboxProps: (d) => ({
1544
+ disabled: d.Enabled === 0
1295
1545
  }),
1296
- ...t.rowSelection
1297
- }, s = _(f);
1298
- T(
1299
- () => a.selectable.value,
1300
- (c) => {
1301
- a && (s.value = c ? f : void 0);
1546
+ ...a.rowSelection
1547
+ }, s = y(f);
1548
+ I(
1549
+ () => t.selectable.value,
1550
+ (d) => {
1551
+ t && (s.value = d ? f : void 0);
1302
1552
  },
1303
1553
  { immediate: !0 }
1304
- ), T(
1305
- () => a.columns.value,
1554
+ ), I(
1555
+ () => t.columns.value,
1306
1556
  () => {
1307
- i.value = Oe(a.columns.value);
1557
+ u.value = Je(t.columns.value);
1308
1558
  },
1309
1559
  { deep: !0, immediate: !0 }
1310
1560
  );
1311
- const v = _(!1);
1312
- return _e(() => {
1313
- v.value && a && a.autoload && (a.reload.value = !0);
1314
- }), K(async () => {
1315
- var c, g, C, $, M;
1316
- ge(q.GridControl, a), a.page && ((c = a.gridUrl) != null && c.url) && (((g = a.gridUrl) == null ? void 0 : g.url) === ((C = a.page.urls.list) == null ? void 0 : C.url) && (a.remotePage = !1), (($ = a.gridUrl) == null ? void 0 : $.url) === ((M = a.page.urls.find) == null ? void 0 : M.url) && (a.remotePage = !0)), a.tableData.value ? (p.value = a.tableData.value, a.total.value = p.value.length, d.value !== !1 && (d.value.total = a.total.value ?? 0)) : a.autoload !== !1 && (a.remotePage ? p.value = (await we(a)).rows : p.value = await ca(a)), setTimeout(() => {
1317
- v.value = !0;
1561
+ const m = y(!1);
1562
+ return xe(() => {
1563
+ m.value && t && t.autoload && (t.reload.value = !0);
1564
+ }), X(async () => {
1565
+ var d, g, C, F, U;
1566
+ _e(ae.GridControl, t), t.page && ((d = t.gridUrl) != null && d.url) && (((g = t.gridUrl) == null ? void 0 : g.url) === ((C = t.page.urls.list) == null ? void 0 : C.url) && (t.remotePage = !1), ((F = t.gridUrl) == null ? void 0 : F.url) === ((U = t.page.urls.find) == null ? void 0 : U.url) && (t.remotePage = !0)), t.tableData.value ? (p.value = t.tableData.value, t.total.value = p.value.length, c.value !== !1 && (c.value.total = t.total.value ?? 0)) : t.autoload !== !1 && (t.remotePage ? p.value = (await me(t)).rows : p.value = await Xe(t)), setTimeout(() => {
1567
+ m.value = !0;
1318
1568
  }, 50);
1319
- }), (c, g) => {
1320
- var $, M;
1569
+ }), (d, g) => {
1570
+ var F, U;
1321
1571
  const C = re("auth");
1322
- return m(), w(O, null, [
1323
- ($ = r(a).buttons) != null && $.value.length || (M = r(a).tools) != null && M.length ? (m(), b(kt, {
1572
+ return v(), w(L, null, [
1573
+ (F = l(t).buttons) != null && F.value.length || (U = l(t).tools) != null && U.length ? (v(), b(yt, {
1324
1574
  key: 0,
1325
- "grid-ctrl": r(a),
1326
- "editor-ctrl": r(a).editor
1327
- }, null, 8, ["grid-ctrl", "editor-ctrl"])) : y("", !0),
1328
- v.value ? (m(), b(r(je), F({
1575
+ "grid-ctrl": l(t),
1576
+ "editor-ctrl": l(t).editor
1577
+ }, null, 8, ["grid-ctrl", "editor-ctrl"])) : x("", !0),
1578
+ m.value ? (v(), b(l(ct), B({
1329
1579
  key: 1,
1330
1580
  class: "w-full min-h-[480px]",
1331
- "row-key": t.primaryKey ?? r(a).primaryKey ?? "Id",
1581
+ "row-key": a.primaryKey ?? l(t).primaryKey ?? "Id",
1332
1582
  "data-source": p.value,
1333
- loading: r(a).isGridLoading.value,
1334
- columns: i.value,
1335
- pagination: d.value,
1583
+ loading: l(t).isGridLoading.value,
1584
+ columns: u.value,
1585
+ pagination: c.value,
1336
1586
  "row-selection": s.value,
1337
- scroll: t.scroll || { x: 700 },
1338
- size: r(a).tableSize.value,
1587
+ scroll: a.scroll || { x: 700 },
1588
+ size: l(t).tableSize.value,
1339
1589
  bordered: ""
1340
- }, r(e)), {
1341
- bodyCell: h((x) => {
1342
- var B, R;
1590
+ }, l(e)), {
1591
+ bodyCell: h(($) => {
1592
+ var A, H;
1343
1593
  return [
1344
- I(c.$slots, "bodyCell", {
1345
- column: x == null ? void 0 : x.column,
1346
- record: x == null ? void 0 : x.record
1594
+ P(d.$slots, "bodyCell", {
1595
+ column: $ == null ? void 0 : $.column,
1596
+ record: $ == null ? void 0 : $.record
1347
1597
  }),
1348
- r(a) && ((B = x == null ? void 0 : x.column) == null ? void 0 : B.dataIndex) === "enabled" ? H((m(), b(da, {
1598
+ l(t) && ((A = $ == null ? void 0 : $.column) == null ? void 0 : A.dataIndex) === "enabled" ? W((v(), b(Ze, {
1349
1599
  key: 0,
1350
- checked: x.record.Enabled,
1351
- "onUpdate:checked": (se) => x.record.Enabled = se,
1352
- disabled: c.statusDisabled ? c.statusDisabled(x.record) : !1,
1353
- data: r(Be).EnableDisable,
1354
- onClick: (se) => r(pa)(r(a), x.record),
1600
+ checked: $.record[l(t).statusKey],
1601
+ "onUpdate:checked": (Z) => $.record[l(t).statusKey] = Z,
1602
+ disabled: d.statusDisabled ? d.statusDisabled($.record) : !1,
1603
+ data: l(Ne).EnableDisable,
1604
+ onClick: (Z) => l(et)(l(t), $.record),
1355
1605
  class: E([
1356
1606
  "w-[58px]",
1357
- c.statusDisabled && c.statusDisabled(x.record) ? "cursor-not-allowed disabled" : ""
1607
+ d.statusDisabled && d.statusDisabled($.record) ? "cursor-not-allowed disabled" : ""
1358
1608
  ]),
1359
- loading: x == null ? void 0 : x.record.isLoading
1609
+ loading: $ == null ? void 0 : $.record.isLoading
1360
1610
  }, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
1361
1611
  [C, { url: o.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
1362
- ]) : y("", !0),
1363
- r(a) && ((R = x == null ? void 0 : x.column) == null ? void 0 : R.dataIndex) === "operation" ? I(c.$slots, "operate", {
1612
+ ]) : x("", !0),
1613
+ l(t) && ((H = $ == null ? void 0 : $.column) == null ? void 0 : H.dataIndex) === "operation" ? P(d.$slots, "operate", {
1364
1614
  key: 1,
1365
- record: x == null ? void 0 : x.record
1615
+ record: $ == null ? void 0 : $.record
1366
1616
  }, () => [
1367
- k(ht, {
1368
- record: x == null ? void 0 : x.record,
1369
- "grid-ctrl": r(a)
1617
+ S(ja, {
1618
+ record: $ == null ? void 0 : $.record,
1619
+ "grid-ctrl": l(t)
1370
1620
  }, null, 8, ["record", "grid-ctrl"])
1371
- ]) : y("", !0)
1621
+ ]) : x("", !0)
1372
1622
  ];
1373
1623
  }),
1374
1624
  _: 3
1375
- }, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : y("", !0)
1625
+ }, 16, ["row-key", "data-source", "loading", "columns", "pagination", "row-selection", "scroll", "size"])) : x("", !0)
1376
1626
  ], 64);
1377
1627
  };
1378
1628
  }
1379
- }), wt = { class: "flex items-center gap-1" }, Ct = { class: "text-nowrap" }, vl = /* @__PURE__ */ S({
1629
+ }), Va = { class: "flex items-center gap-1" }, Ya = { class: "text-nowrap" }, ql = /* @__PURE__ */ T({
1380
1630
  __name: "index",
1381
1631
  props: {
1382
1632
  treeCtrl: {},
@@ -1384,16 +1634,16 @@ const ll = async (l, t) => {
1384
1634
  expandedKeys: {}
1385
1635
  },
1386
1636
  emits: ["select", "update:selectedKeys"],
1387
- setup(l, { emit: t }) {
1388
- const e = l, a = X(), o = e.treeCtrl, u = _([]);
1389
- T(
1637
+ setup(r, { emit: a }) {
1638
+ const e = r, t = ne(), o = e.treeCtrl, n = y([]);
1639
+ I(
1390
1640
  () => o.data.value,
1391
1641
  (f) => {
1392
1642
  if (f) {
1393
- u.value = o.fieldMap ? ne(o.fieldMap, f) : f;
1394
- const s = fa(u.value, p.value[0]);
1643
+ n.value = o.fieldMap ? he(o.fieldMap, f) : f;
1644
+ const s = $t(n.value, p.value[0]);
1395
1645
  if (s) {
1396
- const v = {
1646
+ const m = {
1397
1647
  event: "select",
1398
1648
  node: {
1399
1649
  // 根据你的TreeNode结构构建node对象
@@ -1405,145 +1655,145 @@ const ll = async (l, t) => {
1405
1655
  selected: !0,
1406
1656
  selectedNodes: [s]
1407
1657
  };
1408
- i(p.value, v);
1658
+ u(p.value, m);
1409
1659
  }
1410
1660
  }
1411
1661
  }
1412
1662
  );
1413
- const n = t, p = _([]);
1414
- T(
1663
+ const i = a, p = y([]);
1664
+ I(
1415
1665
  () => e.selectedKeys,
1416
1666
  (f) => {
1417
1667
  f && (p.value = f);
1418
1668
  },
1419
1669
  { immediate: !0 }
1420
1670
  );
1421
- const d = _(["-"]);
1422
- T(
1671
+ const c = y(["-"]);
1672
+ I(
1423
1673
  () => e.expandedKeys,
1424
1674
  (f) => {
1425
- f && (d.value = f);
1675
+ f && (c.value = f);
1426
1676
  },
1427
1677
  { immediate: !0 }
1428
1678
  );
1429
- const i = (f, s) => {
1430
- f.length === 0 && f.push(...p.value), f.length > 0 && (o.node.value = s == null ? void 0 : s.node.dataRef), p.value = f, n("update:selectedKeys", f), n("select", f, s);
1679
+ const u = (f, s) => {
1680
+ f.length === 0 && f.push(...p.value), f.length > 0 && (o.node.value = s == null ? void 0 : s.node.dataRef), p.value = f, i("update:selectedKeys", f), i("select", f, s);
1431
1681
  };
1432
- return K(() => {
1682
+ return X(() => {
1433
1683
  o.fieldMap || (o.fieldMap = {
1434
1684
  label: "Name",
1435
1685
  key: "Id",
1436
1686
  value: "Id",
1437
1687
  icon: "Icon"
1438
- }), o.data.value ? u.value = ne(o.fieldMap, o.data.value) : o.autoload && Ae(o);
1439
- }), (f, s) => (m(), b(r(Ba), F({
1688
+ }), o.data.value ? n.value = he(o.fieldMap, o.data.value) : o.autoload && tt(o);
1689
+ }), (f, s) => (v(), b(l(Zt), B({
1440
1690
  class: "w-full",
1441
1691
  "show-line": !0,
1442
- "tree-data": u.value,
1443
- "expanded-keys": d.value,
1444
- "onUpdate:expandedKeys": s[0] || (s[0] = (v) => d.value = v),
1692
+ "tree-data": n.value,
1693
+ "expanded-keys": c.value,
1694
+ "onUpdate:expandedKeys": s[0] || (s[0] = (m) => c.value = m),
1445
1695
  "selected-keys": p.value,
1446
- loading: r(o).isTreeLoading,
1447
- onSelect: i
1448
- }, r(a)), {
1449
- title: h(({ key: v, label: c, icon: g }) => [
1450
- I(f.$slots, "title", {
1451
- label: c,
1452
- key: v,
1696
+ loading: l(o).isTreeLoading,
1697
+ onSelect: u
1698
+ }, l(t)), {
1699
+ title: h(({ key: m, label: d, icon: g }) => [
1700
+ P(f.$slots, "title", {
1701
+ label: d,
1702
+ key: m,
1453
1703
  icon: g
1454
1704
  }, () => [
1455
- D("div", wt, [
1456
- k(r(U), { icon: g }, null, 8, ["icon"]),
1457
- D("span", Ct, P(c), 1)
1705
+ D("div", Va, [
1706
+ S(l(K), { icon: g }, null, 8, ["icon"]),
1707
+ D("span", Ya, N(d), 1)
1458
1708
  ])
1459
1709
  ])
1460
1710
  ]),
1461
1711
  _: 3
1462
1712
  }, 16, ["tree-data", "expanded-keys", "selected-keys", "loading"]));
1463
1713
  }
1464
- }), ml = /* @__PURE__ */ G(va, [["__scopeId", "data-v-87722b44"]]), St = { class: "relative w-[248px] max-w-[248px]" }, Tt = {
1714
+ }), Hl = /* @__PURE__ */ se(Tt, [["__scopeId", "data-v-87722b44"]]), Wa = { class: "relative w-[248px] max-w-[248px]" }, qa = {
1465
1715
  key: 0,
1466
1716
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
1467
- }, $t = /* @__PURE__ */ S({
1717
+ }, Ha = /* @__PURE__ */ T({
1468
1718
  inheritAttrs: !1,
1469
1719
  __name: "index",
1470
- props: ma,
1720
+ props: It,
1471
1721
  emits: ["change", "update:labels", "update:value"],
1472
- setup(l, { emit: t }) {
1473
- var C, $, M;
1474
- const e = l, a = X(), o = L(), u = ha(e.url, e), n = e.optionCtrl ?? u.optionCtrl;
1475
- n.inputFactory = Da(o);
1476
- const p = _({
1477
- ...n == null ? void 0 : n.url,
1478
- url: ((C = n == null ? void 0 : n.url) == null ? void 0 : C.url) || "",
1479
- fieldMap: (n == null ? void 0 : n.fieldMap) || (($ = n == null ? void 0 : n.url) == null ? void 0 : $.fieldMap),
1480
- params: (n == null ? void 0 : n.params) || ((M = n == null ? void 0 : n.url) == null ? void 0 : M.params),
1722
+ setup(r, { emit: a }) {
1723
+ var C, F, U;
1724
+ const e = r, t = ne(), o = q(), n = Dt(e.url, e), i = e.optionCtrl ?? n.optionCtrl;
1725
+ i.inputFactory = Vt(o);
1726
+ const p = y({
1727
+ ...i == null ? void 0 : i.url,
1728
+ url: ((C = i == null ? void 0 : i.url) == null ? void 0 : C.url) || "",
1729
+ fieldMap: (i == null ? void 0 : i.fieldMap) || ((F = i == null ? void 0 : i.url) == null ? void 0 : F.fieldMap),
1730
+ params: (i == null ? void 0 : i.params) || ((U = i == null ? void 0 : i.url) == null ? void 0 : U.params),
1481
1731
  loadingText: !1
1482
- }), { editorCtrl: d, errInfo: i, labelText: f } = o, s = _(a.placeholder);
1483
- T(
1732
+ }), { editorCtrl: c, errInfo: u, labelText: f } = o, s = y(t.placeholder);
1733
+ I(
1484
1734
  () => p.value.loading,
1485
- (x) => {
1486
- x ? s.value = "" : s.value || (s.value = "请选择" + f.value);
1735
+ ($) => {
1736
+ $ ? s.value = "" : s.value || (s.value = "请选择" + f.value);
1487
1737
  },
1488
1738
  { immediate: !0 }
1489
1739
  );
1490
- const v = t;
1491
- o.inputEmit = v;
1492
- const c = _((n == null ? void 0 : n.options.value) || []);
1493
- n && T(
1494
- () => n.options.value,
1495
- (x) => {
1496
- c.value = x || [];
1740
+ const m = a;
1741
+ o.inputEmit = m;
1742
+ const d = y((i == null ? void 0 : i.options.value) || []);
1743
+ i && I(
1744
+ () => i.options.value,
1745
+ ($) => {
1746
+ d.value = $ || [];
1497
1747
  },
1498
1748
  { immediate: !0, deep: !0 }
1499
1749
  );
1500
- const g = (x, B) => {
1501
- if (!B || B.length === 0) {
1502
- v("update:labels", []), v("update:value", []);
1750
+ const g = ($, A) => {
1751
+ if (!A || A.length === 0) {
1752
+ m("update:labels", []), m("update:value", []);
1503
1753
  return;
1504
1754
  }
1505
- const R = B.map((ta) => ta.value), se = xa(n, e, R), aa = ya(se);
1506
- v("update:labels", aa), v("update:value", R), i != null && i.value.errClass && d && Y(d);
1755
+ const H = A.map(($e) => $e.value), Z = Lt(i, e, H), fe = Ut(Z);
1756
+ m("update:labels", fe), m("update:value", H), u != null && u.value.errClass && c && le(c);
1507
1757
  };
1508
- return _e(() => {
1509
- n && n.autoload && (n.reload.value = !0);
1510
- }), K(() => {
1758
+ return xe(() => {
1759
+ i && i.autoload && (i.reload.value = !0);
1760
+ }), X(() => {
1511
1761
  p.value && !p.value.fieldMap && (p.value.fieldMap = {
1512
1762
  title: "Name",
1513
1763
  label: "Name",
1514
1764
  value: "Id",
1515
1765
  key: "Id"
1516
- }), n && ga(n.autoload, n, e);
1517
- }), Ia(() => {
1518
- n && ba(n, e);
1519
- }), (x, B) => {
1520
- var R;
1521
- return m(), w("div", St, [
1522
- c.value.length ? y("", !0) : (m(), w("div", Tt, [
1523
- k(r(_a), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
1524
- B[0] || (B[0] = D("span", null, "数据加载中...", -1))
1766
+ }), i && Ft(i.autoload, i, e);
1767
+ }), Yt(() => {
1768
+ i && Pt(i, e);
1769
+ }), ($, A) => {
1770
+ var H;
1771
+ return v(), w("div", Wa, [
1772
+ d.value.length ? x("", !0) : (v(), w("div", qa, [
1773
+ S(l(Et), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
1774
+ A[0] || (A[0] = D("span", null, "数据加载中...", -1))
1525
1775
  ])),
1526
- k(r(Aa), F({
1527
- options: c.value,
1528
- class: [(R = r(i)) == null ? void 0 : R.errClass],
1776
+ S(l(ea), B({
1777
+ options: d.value,
1778
+ class: [(H = l(u)) == null ? void 0 : H.errClass],
1529
1779
  "allow-clear": !0,
1530
- placeholder: c.value.length > 0 ? "请选择" + r(f) : "",
1780
+ placeholder: d.value.length > 0 ? "请选择" + l(f) : "",
1531
1781
  onChange: g
1532
- }, r(a)), null, 16, ["options", "class", "placeholder"])
1782
+ }, l(t)), null, 16, ["options", "class", "placeholder"])
1533
1783
  ]);
1534
1784
  };
1535
1785
  }
1536
- }), hl = /* @__PURE__ */ G($t, [["__scopeId", "data-v-51ddfce3"]]), gl = /* @__PURE__ */ G(ka, [["__scopeId", "data-v-249ea772"]]);
1537
- function ue() {
1538
- return ue = Object.assign ? Object.assign.bind() : function(l) {
1539
- for (var t = 1; t < arguments.length; t++) {
1540
- var e = arguments[t];
1541
- for (var a in e) ({}).hasOwnProperty.call(e, a) && (l[a] = e[a]);
1786
+ }), Ql = /* @__PURE__ */ se(Ha, [["__scopeId", "data-v-51ddfce3"]]), Gl = /* @__PURE__ */ se(Nt, [["__scopeId", "data-v-249ea772"]]);
1787
+ function ye() {
1788
+ return ye = Object.assign ? Object.assign.bind() : function(r) {
1789
+ for (var a = 1; a < arguments.length; a++) {
1790
+ var e = arguments[a];
1791
+ for (var t in e) ({}).hasOwnProperty.call(e, t) && (r[t] = e[t]);
1542
1792
  }
1543
- return l;
1544
- }, ue.apply(null, arguments);
1793
+ return r;
1794
+ }, ye.apply(null, arguments);
1545
1795
  }
1546
- const Dt = {
1796
+ const Qa = {
1547
1797
  locale: "zh_CN",
1548
1798
  today: "今天",
1549
1799
  now: "此刻",
@@ -1570,11 +1820,11 @@ const Dt = {
1570
1820
  nextDecade: "下一年代",
1571
1821
  previousCentury: "上一世纪",
1572
1822
  nextCentury: "下一世纪"
1573
- }, It = {
1823
+ }, Ga = {
1574
1824
  placeholder: "请选择时间",
1575
1825
  rangePlaceholder: ["开始时间", "结束时间"]
1576
- }, de = {
1577
- lang: ue({
1826
+ }, Se = {
1827
+ lang: ye({
1578
1828
  placeholder: "请选择日期",
1579
1829
  yearPlaceholder: "请选择年份",
1580
1830
  quarterPlaceholder: "请选择季度",
@@ -1585,118 +1835,118 @@ const Dt = {
1585
1835
  rangeMonthPlaceholder: ["开始月份", "结束月份"],
1586
1836
  rangeQuarterPlaceholder: ["开始季度", "结束季度"],
1587
1837
  rangeWeekPlaceholder: ["开始周", "结束周"]
1588
- }, Dt),
1589
- timePickerLocale: ue({}, It)
1838
+ }, Qa),
1839
+ timePickerLocale: ye({}, Ga)
1590
1840
  };
1591
- de.lang.ok = "确定";
1592
- const bl = /* @__PURE__ */ S({
1841
+ Se.lang.ok = "确定";
1842
+ const Jl = /* @__PURE__ */ T({
1593
1843
  __name: "index",
1594
1844
  props: {
1595
1845
  valueFormat: {}
1596
1846
  },
1597
- setup(l) {
1598
- const t = l, { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
1599
- o != null && o.value.errClass && e && Y(e);
1600
- }, n = _(t.valueFormat ?? "YYYY-MM-DD");
1601
- return (p, d) => {
1602
- var i;
1603
- return m(), b(r(La), {
1604
- class: E(["w-full", [((i = r(o)) == null ? void 0 : i.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
1605
- placeholder: "请选择" + r(a),
1606
- locale: r(de),
1607
- valueFormat: n.value,
1608
- onBlur: u
1847
+ setup(r) {
1848
+ const a = r, { editorCtrl: e, labelText: t, errInfo: o } = q(), n = () => {
1849
+ o != null && o.value.errClass && e && le(e);
1850
+ }, i = y(a.valueFormat ?? "YYYY-MM-DD");
1851
+ return (p, c) => {
1852
+ var u;
1853
+ return v(), b(l(ta), {
1854
+ class: E(["w-full", [((u = l(o)) == null ? void 0 : u.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
1855
+ placeholder: "请选择" + l(t),
1856
+ locale: l(Se),
1857
+ valueFormat: i.value,
1858
+ onBlur: n
1609
1859
  }, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
1610
1860
  };
1611
1861
  }
1612
- }), Et = /* @__PURE__ */ S({
1862
+ }), Ja = /* @__PURE__ */ T({
1613
1863
  __name: "index",
1614
1864
  props: {
1615
1865
  value: {},
1616
1866
  undefValue: { type: Boolean, default: !1 }
1617
1867
  },
1618
1868
  emits: ["update:value"],
1619
- setup(l, { emit: t }) {
1620
- const { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
1621
- o != null && o.value.errClass && e && Y(e);
1622
- }, n = l, p = n.value === void 0 ? !0 : n.undefValue, d = t, i = _(n.value);
1623
- T(
1624
- () => n.value,
1869
+ setup(r, { emit: a }) {
1870
+ const { editorCtrl: e, labelText: t, errInfo: o } = q(), n = () => {
1871
+ o != null && o.value.errClass && e && le(e);
1872
+ }, i = r, p = i.value === void 0 ? !0 : i.undefValue, c = a, u = y(i.value);
1873
+ I(
1874
+ () => i.value,
1625
1875
  (s) => {
1626
- i.value = s;
1876
+ u.value = s;
1627
1877
  },
1628
1878
  { immediate: !0 }
1629
1879
  // 立即同步初始值
1630
- ), T(
1631
- () => i.value,
1880
+ ), I(
1881
+ () => u.value,
1632
1882
  (s) => {
1633
- if (i.value === "") {
1634
- d("update:value", void 0);
1883
+ if (u.value === "") {
1884
+ c("update:value", void 0);
1635
1885
  return;
1636
1886
  }
1637
- d("update:value", s);
1887
+ c("update:value", s);
1638
1888
  }
1639
1889
  );
1640
1890
  const f = () => {
1641
- i.value === "" && (i.value = p ? void 0 : null);
1891
+ u.value === "" && (u.value = p ? void 0 : null);
1642
1892
  };
1643
- return (s, v) => {
1644
- var c, g;
1645
- return m(), b(r(ee), F({
1893
+ return (s, m) => {
1894
+ var d, g;
1895
+ return v(), b(l(de), B({
1646
1896
  class: [
1647
- (c = r(o)) == null ? void 0 : c.errClass,
1648
- ((g = r(o)) == null ? void 0 : g.errClass) === "error" && !s.$slots.addonBefore && !s.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
1897
+ (d = l(o)) == null ? void 0 : d.errClass,
1898
+ ((g = l(o)) == null ? void 0 : g.errClass) === "error" && !s.$slots.addonBefore && !s.$slots.addonAfter ? "!border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""
1649
1899
  ],
1650
- value: i.value,
1651
- "onUpdate:value": v[0] || (v[0] = (C) => i.value = C),
1900
+ value: u.value,
1901
+ "onUpdate:value": m[0] || (m[0] = (C) => u.value = C),
1652
1902
  autocomplete: "new-password",
1653
1903
  "allow-clear": !0,
1654
- placeholder: "请输入" + r(a),
1655
- onBlur: u,
1904
+ placeholder: "请输入" + l(t),
1905
+ onBlur: n,
1656
1906
  onChange: f
1657
- }, s.$attrs), Ue({ _: 2 }, [
1907
+ }, s.$attrs), lt({ _: 2 }, [
1658
1908
  s.$slots.addonBefore ? {
1659
1909
  name: "addonBefore",
1660
1910
  fn: h(() => [
1661
- I(s.$slots, "addonBefore")
1911
+ P(s.$slots, "addonBefore")
1662
1912
  ]),
1663
1913
  key: "0"
1664
1914
  } : void 0,
1665
1915
  s.$slots.addonAfter ? {
1666
1916
  name: "addonAfter",
1667
1917
  fn: h(() => [
1668
- I(s.$slots, "addonAfter")
1918
+ P(s.$slots, "addonAfter")
1669
1919
  ]),
1670
1920
  key: "1"
1671
1921
  } : void 0
1672
1922
  ]), 1040, ["class", "value", "placeholder"]);
1673
1923
  };
1674
1924
  }
1675
- }), Pt = /* @__PURE__ */ S({
1925
+ }), Xa = /* @__PURE__ */ T({
1676
1926
  __name: "inputIcon",
1677
1927
  props: {
1678
1928
  value: {}
1679
1929
  },
1680
1930
  emits: ["update:value"],
1681
- setup(l, { emit: t }) {
1682
- const e = l, a = t, o = _(void 0);
1683
- return T(
1931
+ setup(r, { emit: a }) {
1932
+ const e = r, t = a, o = y(void 0);
1933
+ return I(
1684
1934
  () => e.value,
1685
- (u) => {
1686
- o.value = u ?? void 0;
1935
+ (n) => {
1936
+ o.value = n ?? void 0;
1687
1937
  },
1688
1938
  { immediate: !0 }
1689
- ), T(
1939
+ ), I(
1690
1940
  () => o.value,
1691
- (u) => {
1692
- a("update:value", u);
1941
+ (n) => {
1942
+ t("update:value", n);
1693
1943
  }
1694
- ), (u, n) => (m(), b(Et, F({
1944
+ ), (n, i) => (v(), b(Ja, B({
1695
1945
  value: o.value,
1696
- "onUpdate:value": n[0] || (n[0] = (p) => o.value = p)
1697
- }, u.$attrs), {
1946
+ "onUpdate:value": i[0] || (i[0] = (p) => o.value = p)
1947
+ }, n.$attrs), {
1698
1948
  addonBefore: h(() => [
1699
- k(r(U), {
1949
+ S(l(K), {
1700
1950
  class: "!w-4 !h-4",
1701
1951
  icon: o.value
1702
1952
  }, null, 8, ["icon"])
@@ -1704,40 +1954,40 @@ const bl = /* @__PURE__ */ S({
1704
1954
  _: 1
1705
1955
  }, 16, ["value"]));
1706
1956
  }
1707
- }), _l = /* @__PURE__ */ G(Pt, [["__scopeId", "data-v-358b82ef"]]), xl = /* @__PURE__ */ S({
1957
+ }), Xl = /* @__PURE__ */ se(Xa, [["__scopeId", "data-v-358b82ef"]]), Zl = /* @__PURE__ */ T({
1708
1958
  __name: "inputPassword",
1709
- setup(l) {
1710
- const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
1711
- a != null && a.value.errClass && t && Y(t);
1959
+ setup(r) {
1960
+ const { editorCtrl: a, labelText: e, errInfo: t } = q(), o = () => {
1961
+ t != null && t.value.errClass && a && le(a);
1712
1962
  };
1713
- return (u, n) => {
1963
+ return (n, i) => {
1714
1964
  var p;
1715
- return m(), b(r(Ra), F({
1716
- class: ((p = r(a)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
1965
+ return v(), b(l(aa), B({
1966
+ class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
1717
1967
  "allow-clear": !0,
1718
1968
  autocomplete: "new-password",
1719
- placeholder: "请输入" + r(e),
1969
+ placeholder: "请输入" + l(e),
1720
1970
  onBlur: o
1721
- }, u.$attrs), null, 16, ["class", "placeholder"]);
1971
+ }, n.$attrs), null, 16, ["class", "placeholder"]);
1722
1972
  };
1723
1973
  }
1724
- }), yl = /* @__PURE__ */ S({
1974
+ }), er = /* @__PURE__ */ T({
1725
1975
  __name: "inputNumber",
1726
- setup(l) {
1727
- const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
1728
- a != null && a.value.errClass && t && Y(t);
1976
+ setup(r) {
1977
+ const { editorCtrl: a, labelText: e, errInfo: t } = q(), o = () => {
1978
+ t != null && t.value.errClass && a && le(a);
1729
1979
  };
1730
- return (u, n) => {
1980
+ return (n, i) => {
1731
1981
  var p;
1732
- return m(), b(r(za), F({
1733
- class: [[((p = r(a)) == null ? void 0 : p.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
1982
+ return v(), b(l(la), B({
1983
+ class: [[((p = l(t)) == null ? void 0 : p.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""], "w-[50%]"],
1734
1984
  onBlur: o,
1735
1985
  "allow-clear": !1,
1736
- placeholder: "请输入" + r(e)
1737
- }, u.$attrs), null, 16, ["class", "placeholder"]);
1986
+ placeholder: "请输入" + l(e)
1987
+ }, n.$attrs), null, 16, ["class", "placeholder"]);
1738
1988
  };
1739
1989
  }
1740
- }), Ft = { class: "flex flex-col gap-2" }, Nt = { key: 1 }, kl = /* @__PURE__ */ S({
1990
+ }), Za = { class: "flex flex-col gap-2" }, el = { key: 1 }, tr = /* @__PURE__ */ T({
1741
1991
  __name: "index",
1742
1992
  props: {
1743
1993
  value: {},
@@ -1748,108 +1998,108 @@ const bl = /* @__PURE__ */ S({
1748
1998
  valueHolder: {}
1749
1999
  },
1750
2000
  emits: ["update:value"],
1751
- setup(l, { emit: t }) {
1752
- const e = l, a = t, o = _(!(e.selectList && e.selectList.length > 0)), u = _([]);
1753
- let n = !1;
2001
+ setup(r, { emit: a }) {
2002
+ const e = r, t = a, o = y(!(e.selectList && e.selectList.length > 0)), n = y([]);
2003
+ let i = !1;
1754
2004
  const p = () => {
1755
- e.selectList && e.selectList.length > 0 ? u.value = e.selectList.map((s) => ({
2005
+ e.selectList && e.selectList.length > 0 ? n.value = e.selectList.map((s) => ({
1756
2006
  id: Date.now() + Math.random(),
1757
2007
  text: s.text,
1758
2008
  field: s.field,
1759
2009
  // 如果value中有对应的field,使用value中的值,否则使用selectList中的默认值
1760
2010
  value: e.value[s.field] ?? s.value
1761
- })) : e.value && Object.keys(e.value).length > 0 ? u.value = Object.entries(e.value).filter(([s]) => !e.ignoreList || !e.ignoreList.includes(s)).map(([s, v]) => ({
2011
+ })) : e.value && Object.keys(e.value).length > 0 ? n.value = Object.entries(e.value).filter(([s]) => !e.ignoreList || !e.ignoreList.includes(s)).map(([s, m]) => ({
1762
2012
  id: Date.now() + Math.random(),
1763
2013
  field: s,
1764
- value: v
1765
- })) : u.value = [];
2014
+ value: m
2015
+ })) : n.value = [];
1766
2016
  };
1767
- T(
2017
+ I(
1768
2018
  () => e.value,
1769
2019
  () => {
1770
- n || p(), n = !1;
2020
+ i || p(), i = !1;
1771
2021
  },
1772
2022
  { immediate: !0 }
1773
2023
  );
1774
- const d = () => {
2024
+ const c = () => {
1775
2025
  let s;
1776
- e.selectList && e.selectList.length > 0 ? (s = { ...e.value }, u.value.forEach((v) => {
1777
- v.field && (s[v.field] = v.value);
1778
- })) : (s = u.value.reduce(
1779
- (v, c) => (c.field && (v[c.field] = c.value), v),
2026
+ e.selectList && e.selectList.length > 0 ? (s = { ...e.value }, n.value.forEach((m) => {
2027
+ m.field && (s[m.field] = m.value);
2028
+ })) : (s = n.value.reduce(
2029
+ (m, d) => (d.field && (m[d.field] = d.value), m),
1780
2030
  {}
1781
- ), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((v) => {
1782
- e.value[v] !== void 0 && (s[v] = e.value[v]);
1783
- })), n = !0, a("update:value", s);
1784
- }, i = () => {
1785
- u.value.push({
2031
+ ), e.ignoreList && e.ignoreList.length > 0 && e.ignoreList.forEach((m) => {
2032
+ e.value[m] !== void 0 && (s[m] = e.value[m]);
2033
+ })), i = !0, t("update:value", s);
2034
+ }, u = () => {
2035
+ n.value.push({
1786
2036
  id: Date.now() + Math.random(),
1787
2037
  field: "",
1788
2038
  value: ""
1789
2039
  });
1790
2040
  }, f = () => {
1791
- d();
2041
+ c();
1792
2042
  };
1793
- return (s, v) => (m(), w("div", Ft, [
1794
- (m(!0), w(O, null, z(u.value, (c) => (m(), w("div", {
1795
- key: c.id,
2043
+ return (s, m) => (v(), w("div", Za, [
2044
+ (v(!0), w(L, null, V(n.value, (d) => (v(), w("div", {
2045
+ key: d.id,
1796
2046
  class: "flex items-center gap-2"
1797
2047
  }, [
1798
2048
  D("div", {
1799
2049
  class: E([s.fieldWidth ? `w-[${s.fieldWidth}%]` : "w-[33%]"])
1800
2050
  }, [
1801
- !s.selectList || s.selectList.length === 0 ? (m(), b(r(ee), {
2051
+ !s.selectList || s.selectList.length === 0 ? (v(), b(l(de), {
1802
2052
  key: 0,
1803
- value: c.field,
1804
- "onUpdate:value": (g) => c.field = g,
1805
- title: c.text || c.field,
2053
+ value: d.field,
2054
+ "onUpdate:value": (g) => d.field = g,
2055
+ title: d.text || d.field,
1806
2056
  class: "w-full",
1807
- placeholder: c.text || s.labelHolder || "配置名",
2057
+ placeholder: d.text || s.labelHolder || "配置名",
1808
2058
  onInput: f,
1809
2059
  disabled: !o.value
1810
- }, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (m(), w("div", Nt, [
1811
- k(r(ee), {
1812
- value: c.text,
1813
- "onUpdate:value": (g) => c.text = g,
1814
- title: c.text,
2060
+ }, null, 8, ["value", "onUpdate:value", "title", "placeholder", "disabled"])) : (v(), w("div", el, [
2061
+ S(l(de), {
2062
+ value: d.text,
2063
+ "onUpdate:value": (g) => d.text = g,
2064
+ title: d.text,
1815
2065
  disabled: !0,
1816
2066
  class: "w-[100%]"
1817
2067
  }, null, 8, ["value", "onUpdate:value", "title"]),
1818
- k(r(ee), {
2068
+ S(l(de), {
1819
2069
  type: "hidden",
1820
- value: c.field,
1821
- "onUpdate:value": (g) => c.field = g
2070
+ value: d.field,
2071
+ "onUpdate:value": (g) => d.field = g
1822
2072
  }, null, 8, ["value", "onUpdate:value"])
1823
2073
  ]))
1824
2074
  ], 2),
1825
- v[0] || (v[0] = D("div", { class: "w-[3%]" }, "=", -1)),
2075
+ m[0] || (m[0] = D("div", { class: "w-[3%]" }, "=", -1)),
1826
2076
  D("div", {
1827
2077
  class: E([s.fieldWidth ? `w-[${97 - s.fieldWidth}%]` : "w-[64%]"])
1828
2078
  }, [
1829
- k(r(ee), {
1830
- value: c.value,
1831
- "onUpdate:value": (g) => c.value = g,
1832
- placeholder: s.valueHolder || "请输入" + c.text || "请输入配置值",
2079
+ S(l(de), {
2080
+ value: d.value,
2081
+ "onUpdate:value": (g) => d.value = g,
2082
+ placeholder: s.valueHolder || "请输入" + d.text || "请输入配置值",
1833
2083
  onInput: f,
1834
- title: c.value
2084
+ title: d.value
1835
2085
  }, null, 8, ["value", "onUpdate:value", "placeholder", "title"])
1836
2086
  ], 2)
1837
2087
  ]))), 128)),
1838
- o.value ? (m(), b(r(We), {
2088
+ o.value ? (v(), b(l(ut), {
1839
2089
  key: 0,
1840
- onClick: i,
2090
+ onClick: u,
1841
2091
  class: "mt-1 w-[80px] !text-[12px] text-[#666] bg-[#e6f7ff] border-[#b3e0ff] hover:bg-[#b3e0ff] hover:border-[#8abeff]",
1842
2092
  size: "small"
1843
2093
  }, {
1844
- default: h(() => v[1] || (v[1] = [
1845
- N(" 新增配置行 ")
2094
+ default: h(() => m[1] || (m[1] = [
2095
+ M(" 新增配置行 ")
1846
2096
  ])),
1847
2097
  _: 1,
1848
2098
  __: [1]
1849
- })) : y("", !0)
2099
+ })) : x("", !0)
1850
2100
  ]));
1851
2101
  }
1852
- }), Mt = /* @__PURE__ */ G(wa, [["__scopeId", "data-v-aa237552"]]), wl = /* @__PURE__ */ S({
2102
+ }), tl = /* @__PURE__ */ se(Bt, [["__scopeId", "data-v-aa237552"]]), ar = /* @__PURE__ */ T({
1853
2103
  __name: "radioStatus",
1854
2104
  props: {
1855
2105
  /**
@@ -1876,14 +2126,14 @@ const bl = /* @__PURE__ */ S({
1876
2126
  required: !1
1877
2127
  }
1878
2128
  },
1879
- setup(l) {
1880
- const t = l, e = _(JSON.parse(JSON.stringify(Be.getOptions(t.dataKey))));
1881
- return t.all === !0 && e.value.unshift({
2129
+ setup(r) {
2130
+ const a = r, e = y(JSON.parse(JSON.stringify(Ne.getOptions(a.dataKey))));
2131
+ return a.all === !0 && e.value.unshift({
1882
2132
  label: "全部",
1883
- value: t.allValue || [0, 1]
1884
- }), (a, o) => (m(), b(Mt, { data: e.value }, null, 8, ["data"]));
2133
+ value: a.allValue || [0, 1]
2134
+ }), (t, o) => (v(), b(tl, { data: e.value }, null, 8, ["data"]));
1885
2135
  }
1886
- }), Cl = /* @__PURE__ */ S({
2136
+ }), lr = /* @__PURE__ */ T({
1887
2137
  __name: "index",
1888
2138
  props: {
1889
2139
  startDate: {},
@@ -1891,75 +2141,75 @@ const bl = /* @__PURE__ */ S({
1891
2141
  valueFormat: { default: "YYYY-MM-DD" }
1892
2142
  },
1893
2143
  emits: ["update:startDate", "update:endDate"],
1894
- setup(l, { emit: t }) {
1895
- const e = l, a = t, o = L(), { errInfo: u } = o, n = Q(() => e.valueFormat), p = Q(() => {
1896
- const i = e.startDate, f = e.endDate;
1897
- if (!(!i || !f))
2144
+ setup(r, { emit: a }) {
2145
+ const e = r, t = a, o = q(), { errInfo: n } = o, i = R(() => e.valueFormat), p = R(() => {
2146
+ const u = e.startDate, f = e.endDate;
2147
+ if (!(!u || !f))
1898
2148
  try {
1899
- const s = ve(i), v = ve(f);
1900
- return !s.isValid() || !v.isValid() ? void 0 : [s, v];
2149
+ const s = Pe(u), m = Pe(f);
2150
+ return !s.isValid() || !m.isValid() ? void 0 : [s, m];
1901
2151
  } catch {
1902
2152
  return;
1903
2153
  }
1904
- }), d = (i, f) => {
1905
- if (!i || !f || f.length !== 2) {
1906
- a("update:startDate", null), a("update:endDate", null);
2154
+ }), c = (u, f) => {
2155
+ if (!u || !f || f.length !== 2) {
2156
+ t("update:startDate", null), t("update:endDate", null);
1907
2157
  return;
1908
2158
  }
1909
- a("update:startDate", f[0] || null), a("update:endDate", f[1] || null);
2159
+ t("update:startDate", f[0] || null), t("update:endDate", f[1] || null);
1910
2160
  };
1911
- return (i, f) => {
2161
+ return (u, f) => {
1912
2162
  var s;
1913
- return m(), b(r(Ua), {
1914
- class: E([((s = r(u)) == null ? void 0 : s.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
1915
- locale: r(de),
1916
- "value-format": n.value,
2163
+ return v(), b(l(ra), {
2164
+ class: E([((s = l(n)) == null ? void 0 : s.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "", "w-full"]),
2165
+ locale: l(Se),
2166
+ "value-format": i.value,
1917
2167
  value: p.value,
1918
- onChange: d
2168
+ onChange: c
1919
2169
  }, null, 8, ["class", "locale", "value-format", "value"]);
1920
2170
  };
1921
2171
  }
1922
- }), Sl = /* @__PURE__ */ G(Ca, [["__scopeId", "data-v-b33df95f"]]), Tl = /* @__PURE__ */ S({
2172
+ }), rr = /* @__PURE__ */ se(Mt, [["__scopeId", "data-v-b33df95f"]]), sr = /* @__PURE__ */ T({
1923
2173
  __name: "index",
1924
- setup(l) {
1925
- const { editorCtrl: t, labelText: e, errInfo: a } = L(), o = () => {
1926
- a != null && a.value.errClass && t && Y(t);
2174
+ setup(r) {
2175
+ const { editorCtrl: a, labelText: e, errInfo: t } = q(), o = () => {
2176
+ t != null && t.value.errClass && a && le(a);
1927
2177
  };
1928
- return (u, n) => {
2178
+ return (n, i) => {
1929
2179
  var p;
1930
- return m(), b(r(Va), F({
1931
- class: ((p = r(a)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
2180
+ return v(), b(l(sa), B({
2181
+ class: ((p = l(t)) == null ? void 0 : p.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
1932
2182
  "allow-clear": !0,
1933
- placeholder: "请输入" + r(e),
2183
+ placeholder: "请输入" + l(e),
1934
2184
  onBlur: o,
1935
- onKeyup: n[0] || (n[0] = Se(ae(() => {
2185
+ onKeyup: i[0] || (i[0] = Re(pe(() => {
1936
2186
  }, ["stop"]), ["enter", "native"])),
1937
- onKeydown: n[1] || (n[1] = Se(ae(() => {
2187
+ onKeydown: i[1] || (i[1] = Re(pe(() => {
1938
2188
  }, ["stop"]), ["enter", "native"]))
1939
- }, u.$attrs), null, 16, ["class", "placeholder"]);
2189
+ }, n.$attrs), null, 16, ["class", "placeholder"]);
1940
2190
  };
1941
2191
  }
1942
- }), $l = /* @__PURE__ */ S({
2192
+ }), or = /* @__PURE__ */ T({
1943
2193
  __name: "index",
1944
2194
  props: {
1945
2195
  valueFormat: {}
1946
2196
  },
1947
- setup(l) {
1948
- const t = l, { editorCtrl: e, labelText: a, errInfo: o } = L(), u = () => {
1949
- o != null && o.value.errClass && e && Y(e);
1950
- }, n = _(t.valueFormat ?? "HH:mm");
1951
- return (p, d) => {
1952
- var i;
1953
- return m(), b(r(Ya), {
1954
- class: E(["w-full", [((i = r(o)) == null ? void 0 : i.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
1955
- placeholder: "请选择" + r(a),
1956
- locale: r(de),
1957
- valueFormat: n.value,
1958
- onBlur: u
2197
+ setup(r) {
2198
+ const a = r, { editorCtrl: e, labelText: t, errInfo: o } = q(), n = () => {
2199
+ o != null && o.value.errClass && e && le(e);
2200
+ }, i = y(a.valueFormat ?? "HH:mm");
2201
+ return (p, c) => {
2202
+ var u;
2203
+ return v(), b(l(oa), {
2204
+ class: E(["w-full", [((u = l(o)) == null ? void 0 : u.errClass) === "error" ? "error !border-red-300 shadow-[0_0_3px_0px_#ff4d4f]" : ""]]),
2205
+ placeholder: "请选择" + l(t),
2206
+ locale: l(Se),
2207
+ valueFormat: i.value,
2208
+ onBlur: n
1959
2209
  }, null, 8, ["class", "placeholder", "locale", "valueFormat"]);
1960
2210
  };
1961
2211
  }
1962
- }), Ot = /* @__PURE__ */ S({
2212
+ }), al = /* @__PURE__ */ T({
1963
2213
  __name: "index",
1964
2214
  props: {
1965
2215
  autoload: { type: Boolean },
@@ -1968,55 +2218,55 @@ const bl = /* @__PURE__ */ S({
1968
2218
  value: {}
1969
2219
  },
1970
2220
  emits: ["change", "update:value"],
1971
- setup(l, { emit: t }) {
1972
- const e = l, a = _({ ...e.url }), { editorCtrl: o, labelText: u, errInfo: n } = L(), p = t, d = _([]), i = _([]);
2221
+ setup(r, { emit: a }) {
2222
+ const e = r, t = y({ ...e.url }), { editorCtrl: o, labelText: n, errInfo: i } = q(), p = a, c = y([]), u = y([]);
1973
2223
  e.value && e.value.every((s) => {
1974
- i.value.push(s.toString());
1975
- }), T(
2224
+ u.value.push(s.toString());
2225
+ }), I(
1976
2226
  () => e.value,
1977
2227
  (s) => {
1978
- s && (i.value = s);
2228
+ s && (u.value = s);
1979
2229
  }
1980
2230
  );
1981
2231
  const f = (s) => {
1982
- p("update:value", s), p("change", s), i.value = s, n != null && n.value.errClass && o && Y(o);
2232
+ p("update:value", s), p("change", s), u.value = s, i != null && i.value.errClass && o && le(o);
1983
2233
  };
1984
- return K(async () => {
1985
- if (a.value) {
2234
+ return X(async () => {
2235
+ if (t.value) {
1986
2236
  const s = o == null ? void 0 : o.page;
1987
- if (a.value.api || (a.value.api = s == null ? void 0 : s.api), a.value.authorize === void 0 && (a.value.authorize = s == null ? void 0 : s.authorize), e.autoload) {
1988
- const v = await Le(o, {
2237
+ if (t.value.api || (t.value.api = s == null ? void 0 : s.api), t.value.authorize === void 0 && (t.value.authorize = s == null ? void 0 : s.authorize), e.autoload) {
2238
+ const m = await at(o, {
1989
2239
  urlKey: "list",
1990
- url: { ...a.value, url: a.value.url },
2240
+ url: { ...t.value, url: t.value.url },
1991
2241
  loadingText: !1,
1992
2242
  params: e.params
1993
2243
  });
1994
- d.value = (v == null ? void 0 : v.data) ?? [];
2244
+ c.value = (m == null ? void 0 : m.data) ?? [];
1995
2245
  }
1996
2246
  }
1997
- }), (s, v) => {
1998
- var c;
1999
- return m(), b(r(Ka), F({
2000
- class: ((c = r(n)) == null ? void 0 : c.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
2001
- placeholder: "请输入" + r(u),
2002
- targetKeys: i.value,
2247
+ }), (s, m) => {
2248
+ var d;
2249
+ return v(), b(l(na), B({
2250
+ class: ((d = l(i)) == null ? void 0 : d.errClass) === "error" ? ["error", "!border-red-300", "shadow-[0_0_3px_0px_#ff4d4f]"] : "",
2251
+ placeholder: "请输入" + l(n),
2252
+ targetKeys: u.value,
2003
2253
  onChange: f
2004
2254
  }, s.$attrs), {
2005
- children: h(({ direction: g, disabled: C, filteredItems: $, onItemSelectAll: M, onItemSelect: x, selectedKeys: B }) => [
2006
- I(s.$slots, "children", {
2255
+ children: h(({ direction: g, disabled: C, filteredItems: F, onItemSelectAll: U, onItemSelect: $, selectedKeys: A }) => [
2256
+ P(s.$slots, "children", {
2007
2257
  direction: g,
2008
2258
  disabled: C,
2009
- filteredItems: $,
2010
- onItemSelectAll: M,
2011
- onItemSelect: x,
2012
- selectedKeys: B
2259
+ filteredItems: F,
2260
+ onItemSelectAll: U,
2261
+ onItemSelect: $,
2262
+ selectedKeys: A
2013
2263
  })
2014
2264
  ]),
2015
2265
  _: 3
2016
2266
  }, 16, ["class", "placeholder", "targetKeys"]);
2017
2267
  };
2018
2268
  }
2019
- }), Dl = /* @__PURE__ */ S({
2269
+ }), nr = /* @__PURE__ */ T({
2020
2270
  __name: "transferTable",
2021
2271
  props: {
2022
2272
  /**
@@ -2042,70 +2292,70 @@ const bl = /* @__PURE__ */ S({
2042
2292
  }
2043
2293
  },
2044
2294
  emits: ["update:value"],
2045
- setup(l, { emit: t }) {
2046
- const e = l, a = t, o = _(e.autoload), u = _(e.value), n = _(e.gridCtrl.primaryKey);
2047
- T(
2048
- () => u.value,
2049
- (i) => {
2050
- a("update:value", i);
2295
+ setup(r, { emit: a }) {
2296
+ const e = r, t = a, o = y(e.autoload), n = y(e.value), i = y(e.gridCtrl.primaryKey);
2297
+ I(
2298
+ () => n.value,
2299
+ (u) => {
2300
+ t("update:value", u);
2051
2301
  }
2052
- ), T(
2302
+ ), I(
2053
2303
  () => e.value,
2054
- (i) => {
2055
- i && (u.value = i);
2304
+ (u) => {
2305
+ u && (n.value = u);
2056
2306
  }
2057
- ), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = _(!0), e.gridCtrl.buttons = _([]), e.gridCtrl.tools = [];
2058
- const p = ({ disabled: i, selectedKeys: f, onItemSelectAll: s, onItemSelect: v }) => ({
2059
- getCheckboxProps: (c) => ({
2307
+ ), e.gridCtrl.autoload = !1, e.gridCtrl.remotePage = !1, e.gridCtrl.selectable = y(!0), e.gridCtrl.buttons = y([]), e.gridCtrl.tools = [];
2308
+ const p = ({ disabled: u, selectedKeys: f, onItemSelectAll: s, onItemSelect: m }) => ({
2309
+ getCheckboxProps: (d) => ({
2060
2310
  // 控制是否禁止
2061
- disabled: i || c.disabled
2311
+ disabled: u || d.disabled
2062
2312
  }),
2063
- onSelectAll(c, g) {
2064
- const C = g.filter(($) => !$.disabled).map(({ [n.value]: $ }) => $);
2065
- s(C, c);
2313
+ onSelectAll(d, g) {
2314
+ const C = g.filter((F) => !F.disabled).map(({ [i.value]: F }) => F);
2315
+ s(C, d);
2066
2316
  },
2067
- onSelect({ [n.value]: c }, g) {
2068
- v(c, g);
2317
+ onSelect({ [i.value]: d }, g) {
2318
+ m(d, g);
2069
2319
  },
2070
2320
  selectedRowKeys: f
2071
- }), d = _([]);
2072
- return K(async () => {
2321
+ }), c = y([]);
2322
+ return X(async () => {
2073
2323
  if (o.value) {
2074
- const i = await Le(e.gridCtrl, {
2324
+ const u = await at(e.gridCtrl, {
2075
2325
  urlKey: "list",
2076
2326
  url: { ...e.gridCtrl.gridUrl, url: e.gridCtrl.gridUrl.url },
2077
2327
  params: e.gridCtrl.gridQuery,
2078
2328
  loadingText: !1
2079
2329
  });
2080
- d.value = (i == null ? void 0 : i.data) ?? [];
2330
+ c.value = (u == null ? void 0 : u.data) ?? [];
2081
2331
  }
2082
- }), (i, f) => (m(), b(Ot, F({
2083
- "data-source": d.value,
2084
- "row-key": (s) => s[n.value],
2085
- value: u.value,
2086
- "onUpdate:value": f[0] || (f[0] = (s) => u.value = s),
2332
+ }), (u, f) => (v(), b(al, B({
2333
+ "data-source": c.value,
2334
+ "row-key": (s) => s[i.value],
2335
+ value: n.value,
2336
+ "onUpdate:value": f[0] || (f[0] = (s) => n.value = s),
2087
2337
  "list-style": {
2088
2338
  width: "300px",
2089
2339
  height: "500px"
2090
2340
  },
2091
2341
  "show-select-all": !1,
2092
2342
  "show-search": !0,
2093
- "filter-option": (s, v) => {
2094
- for (const c of e.gridCtrl.columns.value)
2095
- if (v[c.dataIndex].toString().indexOf(s) !== -1)
2343
+ "filter-option": (s, m) => {
2344
+ for (const d of e.gridCtrl.columns.value)
2345
+ if (m[d.dataIndex].toString().indexOf(s) !== -1)
2096
2346
  return !0;
2097
2347
  return !1;
2098
2348
  }
2099
- }, i.$attrs), {
2100
- children: h(({ filteredItems: s, onItemSelectAll: v, onItemSelect: c, selectedKeys: g }) => [
2101
- k(r(je), {
2102
- columns: l.gridCtrl.columns.value,
2103
- "row-key": n.value,
2349
+ }, u.$attrs), {
2350
+ children: h(({ filteredItems: s, onItemSelectAll: m, onItemSelect: d, selectedKeys: g }) => [
2351
+ S(l(ct), {
2352
+ columns: r.gridCtrl.columns.value,
2353
+ "row-key": i.value,
2104
2354
  "row-selection": p({
2105
2355
  disabled: !1,
2106
2356
  selectedKeys: g,
2107
- onItemSelectAll: v,
2108
- onItemSelect: c
2357
+ onItemSelectAll: m,
2358
+ onItemSelect: d
2109
2359
  }),
2110
2360
  bordered: !1,
2111
2361
  size: "small",
@@ -2113,8 +2363,8 @@ const bl = /* @__PURE__ */ S({
2113
2363
  scroll: { x: 300 },
2114
2364
  "custom-row": (C) => ({
2115
2365
  onClick: () => {
2116
- const $ = C[n.value];
2117
- c($, !g.includes($));
2366
+ const F = C[i.value];
2367
+ d(F, !g.includes(F));
2118
2368
  }
2119
2369
  })
2120
2370
  }, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
@@ -2122,7 +2372,7 @@ const bl = /* @__PURE__ */ S({
2122
2372
  _: 1
2123
2373
  }, 16, ["data-source", "row-key", "value", "filter-option"]));
2124
2374
  }
2125
- }), Bt = /* @__PURE__ */ S({
2375
+ }), ll = /* @__PURE__ */ T({
2126
2376
  __name: "index",
2127
2377
  props: {
2128
2378
  multiple: {
@@ -2148,83 +2398,294 @@ const bl = /* @__PURE__ */ S({
2148
2398
  }
2149
2399
  },
2150
2400
  emits: ["change", "update:value"],
2151
- setup(l, { emit: t }) {
2152
- const e = l, a = e.value === void 0 ? !0 : e.undefValue, o = e.treeCtrl, u = L(), { errInfo: n, labelText: p } = u, d = t;
2153
- u.inputEmit = d;
2154
- const i = _([]), f = _();
2155
- T(
2401
+ setup(r, { emit: a }) {
2402
+ const e = r, t = e.value === void 0 ? !0 : e.undefValue, o = e.treeCtrl, n = q(), { errInfo: i, labelText: p } = n, c = a;
2403
+ n.inputEmit = c;
2404
+ const u = y([]), f = y();
2405
+ I(
2156
2406
  () => e.value,
2157
- (c) => {
2158
- f.value = c;
2407
+ (d) => {
2408
+ f.value = d;
2159
2409
  },
2160
2410
  { immediate: !0 }
2161
- ), T(
2411
+ ), I(
2162
2412
  () => f.value,
2163
- (c) => {
2164
- d("update:value", c);
2413
+ (d) => {
2414
+ c("update:value", d);
2165
2415
  }
2166
- ), T(
2416
+ ), I(
2167
2417
  () => o.data.value,
2168
- (c) => {
2169
- c && (i.value = o.fieldMap ? ne(o.fieldMap, c) : c);
2418
+ (d) => {
2419
+ d && (u.value = o.fieldMap ? he(o.fieldMap, d) : d);
2170
2420
  },
2171
2421
  { immediate: !0 }
2172
2422
  );
2173
- const s = (c) => {
2174
- e.multiple ? f.value = c ?? [] : c == null ? f.value = a ? void 0 : null : f.value = c, d("change", f.value);
2423
+ const s = (d) => {
2424
+ e.multiple ? f.value = d ?? [] : d == null ? f.value = t ? void 0 : null : f.value = d, c("change", f.value);
2175
2425
  };
2176
- _e(() => {
2426
+ xe(() => {
2177
2427
  e.treeCtrl && e.treeCtrl.autoload && (e.treeCtrl.reload.value = !0);
2178
- }), K(() => {
2428
+ }), X(() => {
2179
2429
  o.fieldMap || (o.fieldMap = {
2180
2430
  label: "Name",
2181
2431
  key: "Id",
2182
2432
  value: "Id"
2183
- }), o.data.value ? i.value = o.fieldMap ? ne(o.fieldMap, o.data.value) : o.data.value : e.treeCtrl.autoload && Ae(e.treeCtrl);
2433
+ }), o.data.value ? u.value = o.fieldMap ? he(o.fieldMap, o.data.value) : o.data.value : e.treeCtrl.autoload && tt(e.treeCtrl);
2184
2434
  });
2185
- const v = () => {
2186
- f.value = a ? void 0 : null;
2435
+ const m = () => {
2436
+ f.value = t ? void 0 : null;
2187
2437
  };
2188
- return (c, g) => {
2438
+ return (d, g) => {
2189
2439
  var C;
2190
- return m(), b(r(Wa), F({
2191
- class: [[(C = r(n)) == null ? void 0 : C.errClass], "w-full"],
2440
+ return v(), b(l(ia), B({
2441
+ class: [[(C = l(i)) == null ? void 0 : C.errClass], "w-full"],
2192
2442
  "tree-line": "",
2193
- multiple: l.multiple,
2443
+ multiple: r.multiple,
2194
2444
  "tree-default-expanded-keys": ["-"],
2195
2445
  value: f.value,
2196
- "onUpdate:value": g[0] || (g[0] = ($) => f.value = $),
2197
- "tree-data": i.value,
2198
- placeholder: "请选择" + r(p),
2446
+ "onUpdate:value": g[0] || (g[0] = (F) => f.value = F),
2447
+ "tree-data": u.value,
2448
+ placeholder: "请选择" + l(p),
2199
2449
  onChange: s,
2200
- onClear: v
2201
- }, c.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
2450
+ onClear: m
2451
+ }, d.$attrs), null, 16, ["class", "multiple", "value", "tree-data", "placeholder"]);
2452
+ };
2453
+ }
2454
+ }), ir = /* @__PURE__ */ se(ll, [["__scopeId", "data-v-71d50074"]]), rl = { class: "w-full mt-1" }, sl = { class: "flex flex-wrap gap-2" }, ol = ["onMouseenter"], nl = { class: "w-16 h-16 border border-solid border-gray-200 rounded overflow-hidden" }, il = ["src"], ul = {
2455
+ key: 0,
2456
+ class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center gap-4 rounded"
2457
+ }, cl = ["onClick"], dl = ["onClick"], pl = {
2458
+ key: 0,
2459
+ class: "w-16 h-16"
2460
+ }, fl = /* @__PURE__ */ T({
2461
+ __name: "imageList",
2462
+ props: {
2463
+ autoUpload: { type: Boolean, default: !1 },
2464
+ uploadUrl: {},
2465
+ previewUrl: {},
2466
+ deleteUrl: {},
2467
+ fileList: { default: () => [] },
2468
+ placeholder: { default: "" },
2469
+ fileExt: {},
2470
+ maxFileSize: { default: 20 },
2471
+ maxCount: { default: 5 },
2472
+ maxCountTip: { type: Boolean, default: !1 },
2473
+ maxFileSizeTip: { type: Boolean, default: !0 },
2474
+ fileExtTip: { type: Boolean, default: !0 },
2475
+ parentPath: {},
2476
+ showDelete: { type: Boolean, default: !0 }
2477
+ },
2478
+ emits: ["update:file-list"],
2479
+ setup(r, { emit: a }) {
2480
+ const e = r, t = q(), { errInfo: o } = t, n = y(e.fileList), i = y([]), p = y(), c = a, u = R(() => {
2481
+ var _;
2482
+ return (_ = e.fileExt) != null && _.length ? e.fileExt.map((k) => `.${k}`).join(",") : "";
2483
+ }), f = (_) => {
2484
+ var k;
2485
+ if (e.fileExt && e.fileExt.length > 0) {
2486
+ const z = ((k = _.name.split(".").pop()) == null ? void 0 : k.toLowerCase()) || "";
2487
+ if (!e.fileExt.includes(z))
2488
+ return G.error("文件类型不支持"), !1;
2489
+ }
2490
+ return _.size / 1024 / 1024 > e.maxFileSize ? (G.error(`文件大小超过 ${e.maxFileSize}MB 限制`), !1) : !0;
2491
+ }, s = () => e.maxCount > 1 && n.value.length >= e.maxCount, m = (_) => {
2492
+ const k = _;
2493
+ return k.params || (k.params = {}), k.params.FileKey = k.name, e.parentPath && (k.params.FileKey = Oe.join("/", e.parentPath, k.name)), k;
2494
+ }, d = (_) => f(_) && e.autoUpload, g = async (_) => {
2495
+ if (_.length === 0) return;
2496
+ const k = [...n.value];
2497
+ let z = !1;
2498
+ for (const j of _) {
2499
+ if (!f(j)) {
2500
+ z = !0;
2501
+ continue;
2502
+ }
2503
+ const O = m(j);
2504
+ if (e.maxCount === 1) {
2505
+ k.length = 0, k.push(O);
2506
+ break;
2507
+ }
2508
+ if (s()) {
2509
+ G.error(`最多上传 ${e.maxCount} 个文件`), z = !0;
2510
+ break;
2511
+ }
2512
+ const ee = k.findIndex((Ie) => Ie.name === O.name);
2513
+ ee > -1 ? k[ee] = O : k.push(O);
2514
+ }
2515
+ (!z || k.length > 0) && (n.value = k), i.value = [];
2516
+ }, C = (_) => {
2517
+ i.value = _, g(_);
2518
+ }, F = R(() => ({
2519
+ accept: u.value,
2520
+ multiple: e.maxCount !== 1,
2521
+ fileList: i.value,
2522
+ "onUpdate:fileList": C,
2523
+ beforeUpload: d,
2524
+ listType: "text",
2525
+ showUploadList: !1,
2526
+ customRequest: async () => {
2527
+ if (e.autoUpload && e.uploadUrl)
2528
+ for (const _ of n.value)
2529
+ _.percent === 0 && await Ot(e.uploadUrl, _);
2530
+ }
2531
+ }));
2532
+ I(
2533
+ () => e.fileList,
2534
+ (_) => {
2535
+ n.value = _;
2536
+ },
2537
+ { deep: !0, immediate: !0 }
2538
+ ), I(
2539
+ () => n.value,
2540
+ (_) => {
2541
+ c("update:file-list", _);
2542
+ },
2543
+ { deep: !0 }
2544
+ ), I(
2545
+ () => e.parentPath,
2546
+ (_) => {
2547
+ _ && n.value.forEach((k) => {
2548
+ k.params.FileKey = Oe.join("/", _, k.fileName);
2549
+ });
2550
+ }
2551
+ );
2552
+ const U = y(!1), $ = y(""), A = (_) => {
2553
+ const k = n.value[_];
2554
+ $.value = fe(k), U.value = !0;
2555
+ }, H = (_) => {
2556
+ const k = n.value[_];
2557
+ e.deleteUrl && k.minioFile && k.minioFile.Key ? Be(e.deleteUrl, {
2558
+ Query: {
2559
+ FileKey: k.minioFile.Key
2560
+ }
2561
+ }).then((z) => {
2562
+ z && z.status === Me.SUCCESS && (G.success("删除文件成功!"), n.value.splice(_, 1));
2563
+ }) : n.value.splice(_, 1);
2564
+ }, Z = y(/* @__PURE__ */ new Map()), fe = (_) => {
2565
+ if (_.originFileObj)
2566
+ return URL.createObjectURL(_.originFileObj);
2567
+ if (_.minioFile) {
2568
+ const k = _.minioFile.Key;
2569
+ return Z.value.has(k) ? Z.value.get(k) : ($e(_), "");
2570
+ }
2571
+ return "";
2572
+ }, $e = async (_) => {
2573
+ if (!_.minioFile || !e.previewUrl) return;
2574
+ const k = _.minioFile.Key;
2575
+ try {
2576
+ const z = `${e.previewUrl.url}?FileKey=${encodeURIComponent(_.minioFile.Key)}`, j = At() ? await zt.getToken() : Le().getToken(), O = await fetch(z, {
2577
+ method: "GET",
2578
+ headers: {
2579
+ Authorization: `Bearer ${j}`
2580
+ }
2581
+ });
2582
+ if (O.ok) {
2583
+ const ee = await O.blob(), Ie = URL.createObjectURL(ee);
2584
+ Z.value.set(k, Ie);
2585
+ } else
2586
+ console.error("加载图片失败:", O.status);
2587
+ } catch (z) {
2588
+ console.error("加载图片失败:", z);
2589
+ }
2590
+ }, _t = R(() => n.value.length < e.maxCount), Te = y(-1);
2591
+ return (_, k) => {
2592
+ const z = re("auth");
2593
+ return v(), w("div", rl, [
2594
+ D("div", sl, [
2595
+ (v(!0), w(L, null, V(n.value, (j, O) => (v(), w("div", {
2596
+ key: O,
2597
+ class: "relative image-item",
2598
+ onMouseenter: (ee) => Te.value = O,
2599
+ onMouseleave: k[0] || (k[0] = (ee) => Te.value = -1)
2600
+ }, [
2601
+ D("div", nl, [
2602
+ D("img", {
2603
+ src: fe(j),
2604
+ class: "w-full h-full object-cover"
2605
+ }, null, 8, il)
2606
+ ]),
2607
+ Te.value === O ? (v(), w("div", ul, [
2608
+ _.previewUrl ? (v(), w("div", {
2609
+ key: 0,
2610
+ class: "flex items-center text-white cursor-pointer hover:text-blue-400",
2611
+ onClick: (ee) => A(O)
2612
+ }, [
2613
+ S(l(K), {
2614
+ icon: "icon-eye",
2615
+ clickable: ""
2616
+ }),
2617
+ k[1] || (k[1] = D("span", { class: "text-sm ml-1" }, "预览", -1))
2618
+ ], 8, cl)) : x("", !0),
2619
+ _.showDelete !== !1 ? (v(), w("div", {
2620
+ key: 1,
2621
+ class: "flex items-center text-white cursor-pointer hover:text-red-400",
2622
+ onClick: (ee) => H(O)
2623
+ }, [
2624
+ S(l(K), {
2625
+ icon: "icon-new",
2626
+ angle: 45,
2627
+ clickable: ""
2628
+ }),
2629
+ k[2] || (k[2] = D("span", { class: "text-sm ml-1" }, "删除", -1))
2630
+ ], 8, dl)) : x("", !0)
2631
+ ])) : x("", !0)
2632
+ ], 40, ol))), 128)),
2633
+ _t.value ? (v(), w("div", pl, [
2634
+ W((v(), b(l(ua), B({
2635
+ ref_key: "fileUploader",
2636
+ ref: p
2637
+ }, F.value), {
2638
+ default: h(() => {
2639
+ var j;
2640
+ return [
2641
+ D("div", {
2642
+ class: E(["w-16 h-16 border border-dashed border-gray-300 rounded flex items-center justify-center cursor-pointer hover:border-blue-500 transition-colors", [(j = l(o)) == null ? void 0 : j.errClass]])
2643
+ }, [
2644
+ S(l(K), {
2645
+ icon: "icon-new",
2646
+ class: "text-gray-400 w-10 h-10"
2647
+ })
2648
+ ], 2)
2649
+ ];
2650
+ }),
2651
+ _: 1
2652
+ }, 16)), [
2653
+ [z, { role: ["Super", "Admin"], permit: ":imagelist:upload" }]
2654
+ ])
2655
+ ])) : x("", !0)
2656
+ ]),
2657
+ S(l(ca), {
2658
+ preview: { visible: U.value, onVisibleChange: (j) => U.value = j },
2659
+ src: $.value,
2660
+ style: { display: "none" }
2661
+ }, null, 8, ["preview", "src"])
2662
+ ]);
2202
2663
  };
2203
2664
  }
2204
- }), Il = /* @__PURE__ */ G(Bt, [["__scopeId", "data-v-71d50074"]]), At = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, Lt = { class: "flex w-full h-full min-h-full" }, Rt = {
2665
+ }), ur = /* @__PURE__ */ se(fl, [["__scopeId", "data-v-26d707cc"]]), vl = { class: "relative h-[calc(100vh-80px)] overflow-y-auto" }, ml = { class: "flex w-full h-full min-h-full" }, hl = {
2205
2666
  key: 0,
2206
2667
  class: "w-1/4 pr-4 min-h-full min-w-[170px] max-w-[200px]"
2207
- }, zt = { class: "flex-1 h-full overflow-y-auto" }, El = /* @__PURE__ */ S({
2668
+ }, gl = { class: "flex-1 h-full overflow-y-auto" }, cr = /* @__PURE__ */ T({
2208
2669
  __name: "index",
2209
2670
  props: {
2210
2671
  left: { type: Boolean }
2211
2672
  },
2212
- setup(l) {
2213
- const { useToken: t } = Ve, { token: e } = t();
2214
- return (a, o) => (m(), w("div", At, [
2215
- k(r(ja), {
2673
+ setup(r) {
2674
+ const { useToken: a } = rt, { token: e } = a();
2675
+ return (t, o) => (v(), w("div", vl, [
2676
+ S(l(da), {
2216
2677
  class: "m-[10px] p-[10px] h-[calc(100vh-100px)] !min-h-[calc(100vh-100px)]",
2217
- style: be({
2218
- backgroundColor: r(e).colorBgContainer
2678
+ style: ze({
2679
+ backgroundColor: l(e).colorBgContainer
2219
2680
  })
2220
2681
  }, {
2221
2682
  default: h(() => [
2222
- D("div", Lt, [
2223
- a.left ? (m(), w("div", Rt, [
2224
- I(a.$slots, "left")
2225
- ])) : y("", !0),
2226
- D("div", zt, [
2227
- I(a.$slots, "default")
2683
+ D("div", ml, [
2684
+ t.left ? (v(), w("div", hl, [
2685
+ P(t.$slots, "left")
2686
+ ])) : x("", !0),
2687
+ D("div", gl, [
2688
+ P(t.$slots, "default")
2228
2689
  ])
2229
2690
  ])
2230
2691
  ]),
@@ -2234,157 +2695,160 @@ const bl = /* @__PURE__ */ S({
2234
2695
  }
2235
2696
  });
2236
2697
  export {
2237
- Dr as Alert,
2238
- Yr as AppIcon,
2239
- ce as AppRouter,
2240
- _r as AsyncUploader,
2241
- ml as AutoComplete,
2242
- Kr as Breadcrumb,
2243
- A as Button,
2244
- Qe as Cache,
2245
- ot as CacheKeys,
2246
- wr as CanPreviewFileExt,
2247
- hl as Cascader,
2248
- gl as Checkbox,
2249
- El as Content,
2250
- bl as DatePicker,
2251
- Wr as Datetime,
2252
- Zr as Dialog,
2253
- ul as Drawer,
2254
- Nl as EventPrefix,
2255
- cl as Form,
2256
- dl as FormItem,
2257
- nl as Fullscreen,
2258
- jr as Header,
2259
- qr as HeaderExits,
2260
- it as Helper,
2261
- Ml as ICONS_LIB,
2262
- Hr as Icon,
2263
- bt as Icontool,
2264
- Et as Input,
2265
- _l as InputIcon,
2266
- yl as InputNumber,
2267
- xl as InputPassword,
2268
- il as LayoutIcon,
2269
- Ir as Loading,
2270
- Qr as Menu,
2271
- Gr as MenuTabs,
2272
- Ol as MicroOpenApis,
2273
- Be as OPTIONS,
2274
- ma as OptionCommProps,
2275
- Jr as ProjectIcon,
2276
- kl as PropEditor,
2277
- q as ProviderKeys,
2278
- Mt as Radio,
2279
- wl as RadioStatus,
2280
- Cl as RangePicker,
2281
- pl as Search,
2282
- fe as SearchItem,
2283
- Sl as Select,
2284
- da as Switch,
2285
- fl as Table,
2286
- ht as TableOperate,
2287
- Tl as Textarea,
2288
- $l as TimePicker,
2289
- U as ToolIcon,
2290
- kt as Toolbar,
2291
- Ur as Tooltip,
2292
- Ot as Transfer,
2293
- Dl as TransferTable,
2294
- vl as Tree,
2295
- Il as TreeSelect,
2296
- Cr as UploadList,
2297
- xr as UploadStatus,
2298
- Er as appendExcelData,
2299
- Pr as checkExcelDuplicates,
2300
- Bl as checkIconsExpired,
2301
- _a as circleLoading,
2302
- ra as createFromIconfont,
2303
- Fr as createMarkedExcelView,
2304
- Al as crumbs,
2305
- ll as csvToExcelBlob,
2306
- qe as csvToExcelView,
2307
- Nr as csvToNormalized,
2308
- Ee as defaultTools,
2309
- Ll as doDelete,
2310
- Rl as doExecute,
2311
- Le as doQuery,
2312
- zl as doSave,
2313
- Sr as donwloadFromMinio,
2314
- Ha as downloadBlob,
2315
- Ul as eventBus,
2316
- Mr as excelToExcelView,
2317
- Or as excelToNormalized,
2318
- ol as exportResults,
2319
- sl as exportSelectedRows,
2320
- Oe as filterColumns,
2321
- Y as formValidate,
2322
- Vl as getFormDetail,
2323
- Yl as getIconTransform,
2324
- Kl as getRecordDetail,
2325
- Wl as getRuleTexts,
2326
- ya as getSelectedLabels,
2327
- jl as getSelectedValues,
2328
- W as getToolByKey,
2329
- ke as getToolGroup,
2330
- j as getToolStatus,
2698
+ os as Alert,
2699
+ xs as AppIcon,
2700
+ ue as AppRouter,
2701
+ Xr as AsyncUploader,
2702
+ Hl as AutoComplete,
2703
+ ks as Breadcrumb,
2704
+ Q as Button,
2705
+ ft as Cache,
2706
+ Sa as CacheKeys,
2707
+ ts as CanPreviewFileExt,
2708
+ Ql as Cascader,
2709
+ Gl as Checkbox,
2710
+ cr as Content,
2711
+ Jl as DatePicker,
2712
+ ws as Datetime,
2713
+ Ps as Dialog,
2714
+ Rl as Drawer,
2715
+ fr as EventPrefix,
2716
+ Kl as Form,
2717
+ jl as FormItem,
2718
+ Ol as Fullscreen,
2719
+ Cs as Header,
2720
+ Ss as HeaderExits,
2721
+ Ta as Helper,
2722
+ vr as ICONS_LIB,
2723
+ $s as Icon,
2724
+ La as Icontool,
2725
+ ur as ImageList,
2726
+ Ja as Input,
2727
+ Xl as InputIcon,
2728
+ er as InputNumber,
2729
+ Zl as InputPassword,
2730
+ Al as LayoutIcon,
2731
+ Vl as List,
2732
+ Pa as ListOperate,
2733
+ ns as Loading,
2734
+ Ts as Menu,
2735
+ Is as MenuTabs,
2736
+ zt as MicroOpenApis,
2737
+ Ne as OPTIONS,
2738
+ It as OptionCommProps,
2739
+ Ds as ProjectIcon,
2740
+ tr as PropEditor,
2741
+ ae as ProviderKeys,
2742
+ tl as Radio,
2743
+ ar as RadioStatus,
2744
+ lr as RangePicker,
2745
+ Yl as Search,
2746
+ Fe as SearchItem,
2747
+ rr as Select,
2748
+ Ze as Switch,
2749
+ Wl as Table,
2750
+ ja as TableOperate,
2751
+ sr as Textarea,
2752
+ or as TimePicker,
2753
+ K as ToolIcon,
2754
+ yt as Toolbar,
2755
+ ys as Tooltip,
2756
+ al as Transfer,
2757
+ nr as TransferTable,
2758
+ ql as Tree,
2759
+ ir as TreeSelect,
2760
+ as as UploadList,
2761
+ Zr as UploadStatus,
2762
+ is as appendExcelData,
2763
+ us as checkExcelDuplicates,
2764
+ mr as checkIconsExpired,
2765
+ Et as circleLoading,
2766
+ kt as createFromIconfont,
2767
+ cs as createMarkedExcelView,
2768
+ hr as crumbs,
2769
+ Nl as csvToExcelBlob,
2770
+ dt as csvToExcelView,
2771
+ ds as csvToNormalized,
2772
+ Ye as defaultTools,
2773
+ gr as doDelete,
2774
+ br as doExecute,
2775
+ at as doQuery,
2776
+ yr as doSave,
2777
+ ls as donwloadFromMinio,
2778
+ fa as downloadBlob,
2779
+ _r as eventBus,
2780
+ ps as excelToExcelView,
2781
+ fs as excelToNormalized,
2782
+ zl as exportResults,
2783
+ Ml as exportSelectedRows,
2784
+ Je as filterColumns,
2785
+ le as formValidate,
2786
+ xr as getFormDetail,
2787
+ kr as getIconTransform,
2788
+ wr as getRecordDetail,
2789
+ Cr as getRuleTexts,
2790
+ Ut as getSelectedLabels,
2791
+ Sr as getSelectedValues,
2792
+ oe as getToolByKey,
2793
+ Ce as getToolGroup,
2794
+ te as getToolStatus,
2331
2795
  J as getToolVisible,
2332
- we as gridQueryFind,
2333
- ca as gridQueryList,
2334
- ql as gridRowUpdate,
2335
- pa as gridStatusUpdate,
2336
- tl as initCacheCheck,
2337
- al as initDirective,
2338
- Hl as initMenu,
2339
- Ql as initPageFactory,
2340
- Gl as initValidate,
2341
- Z as isEmpty,
2342
- ga as loadOption,
2343
- Jl as mergeColumns,
2344
- Br as normalizedToExcelView,
2345
- rt as onColumnVisibleChanged,
2346
- oa as onFormClose,
2347
- Fe as onFormSave,
2348
- sa as onFormSaveAs,
2349
- He as onFullscreenClick,
2350
- ia as onGridRowDelete,
2351
- na as onGridRowEdit,
2352
- Xl as onGridRowExpand,
2353
- xa as onOptionChanged,
2354
- Ja as onReloadClick,
2355
- V as onToolClicked,
2356
- ua as openNewForm,
2357
- Zl as outFormDataFields,
2358
- er as parseIcons,
2359
- yr as path,
2360
- ar as pendingNavigation,
2361
- tr as pinia,
2362
- Tr as previewFromMinio,
2363
- rl as processCsvFile,
2364
- Ar as processExcelFile,
2365
- Ae as queryTree,
2366
- lr as resetRules,
2367
- rr as routes,
2368
- sr as saveForm,
2369
- or as setFormData,
2370
- nr as showBreadcrumb,
2371
- Lr as toExcel,
2372
- ba as unloadOption,
2373
- ir as uploadTempBtn,
2374
- ur as uploadTempOpener,
2375
- cr as useAppInfo,
2376
- dr as useEditorFactory,
2377
- Ne as useFormItemFactory,
2378
- pr as useGridFactory,
2379
- fr as useHostInfo,
2380
- L as useInputFactory,
2381
- ha as useOptionFactory,
2382
- vr as usePageFactory,
2383
- mr as usePageInfo,
2384
- he as useSettingInfo,
2385
- st as useToolFactory,
2386
- hr as useTreeFactory,
2387
- Pe as useUserInfo,
2388
- gr as validateData,
2389
- Rr as validateExcel
2796
+ me as gridQueryFind,
2797
+ Xe as gridQueryList,
2798
+ $r as gridRowUpdate,
2799
+ et as gridStatusUpdate,
2800
+ Ul as initCacheCheck,
2801
+ Ll as initDirective,
2802
+ Tr as initMenu,
2803
+ Ir as initPageFactory,
2804
+ Dr as initValidate,
2805
+ ce as isEmpty,
2806
+ Ft as loadOption,
2807
+ Fr as mergeColumns,
2808
+ vs as normalizedToExcelView,
2809
+ wa as onColumnVisibleChanged,
2810
+ Ct as onFormClose,
2811
+ We as onFormSave,
2812
+ wt as onFormSaveAs,
2813
+ pt as onFullscreenClick,
2814
+ Ge as onGridRowDelete,
2815
+ Qe as onGridRowEdit,
2816
+ Pr as onGridRowExpand,
2817
+ Lt as onOptionChanged,
2818
+ ha as onReloadClick,
2819
+ Y as onToolClicked,
2820
+ St as openNewForm,
2821
+ Er as outFormDataFields,
2822
+ Lr as parseIcons,
2823
+ Oe as path,
2824
+ Ur as pendingNavigation,
2825
+ Nr as pinia,
2826
+ rs as previewFromMinio,
2827
+ Bl as processCsvFile,
2828
+ ms as processExcelFile,
2829
+ tt as queryTree,
2830
+ Br as resetRules,
2831
+ Mr as routes,
2832
+ zr as saveForm,
2833
+ Or as setFormData,
2834
+ Ar as showBreadcrumb,
2835
+ hs as toExcel,
2836
+ Pt as unloadOption,
2837
+ Rr as uploadTempBtn,
2838
+ Kr as uploadTempOpener,
2839
+ jr as useAppInfo,
2840
+ Vr as useEditorFactory,
2841
+ qe as useFormItemFactory,
2842
+ Yr as useGridFactory,
2843
+ Wr as useHostInfo,
2844
+ q as useInputFactory,
2845
+ Dt as useOptionFactory,
2846
+ qr as usePageFactory,
2847
+ Hr as usePageInfo,
2848
+ Ue as useSettingInfo,
2849
+ Ca as useToolFactory,
2850
+ Qr as useTreeFactory,
2851
+ Le as useUserInfo,
2852
+ Gr as validateData,
2853
+ gs as validateExcel
2390
2854
  };