easy-ep-ui 0.1.1 → 0.1.2

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 (101) hide show
  1. package/LICENSE +172 -0
  2. package/README.md +29 -14
  3. package/dist/easy-ep-ui.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/charts/BaseBar/index.d.ts +2 -0
  6. package/es/charts/BaseBar/src/index.vue.d.ts +45 -0
  7. package/es/charts/BaseLine/index.d.ts +2 -0
  8. package/es/charts/BaseLine/src/index.vue.d.ts +47 -0
  9. package/es/charts/BasePie/index.d.ts +2 -0
  10. package/es/charts/BasePie/src/index.vue.d.ts +41 -0
  11. package/es/charts/BaseRadar/index.d.ts +2 -0
  12. package/es/charts/BaseRadar/src/index.vue.d.ts +47 -0
  13. package/es/charts/config.d.ts +32 -0
  14. package/es/charts/index.d.ts +8 -0
  15. package/es/charts/useChart.d.ts +21 -0
  16. package/es/components/ee-dept-cascader/index.d.ts +2 -0
  17. package/es/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
  18. package/es/components/ee-dept-cascader/type.d.ts +39 -0
  19. package/es/components/ee-dict-select/src/index.vue.d.ts +19 -18
  20. package/es/components/ee-dict-select/type.d.ts +54 -0
  21. package/es/components/ee-form-dialog/src/index.vue.d.ts +108 -8
  22. package/es/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
  23. package/es/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
  24. package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +1 -0
  25. package/es/components/ee-form-table/src/constants.d.ts +2 -2
  26. package/es/components/ee-form-table/src/hooks/useCrud.d.ts +2 -0
  27. package/es/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
  28. package/es/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
  29. package/es/components/ee-form-table/src/index.vue.d.ts +13 -1
  30. package/es/components/ee-form-table/types.d.ts +41 -0
  31. package/es/components/ee-remote-select/index.d.ts +2 -0
  32. package/es/components/ee-remote-select/src/index.vue.d.ts +30 -0
  33. package/es/components/ee-remote-select/type.d.ts +53 -0
  34. package/es/components/ee-role-select/index.d.ts +2 -0
  35. package/es/components/ee-role-select/src/index.vue.d.ts +29 -0
  36. package/es/components/ee-role-select/type.d.ts +44 -0
  37. package/es/components/ee-search-bar/src/index.vue.d.ts +80 -10
  38. package/es/components/ee-status-tag/src/index.vue.d.ts +1 -1
  39. package/es/components/ee-user-select/index.d.ts +2 -0
  40. package/es/components/ee-user-select/src/index.vue.d.ts +29 -0
  41. package/es/components/ee-user-select/type.d.ts +46 -0
  42. package/es/hooks/index.d.ts +4 -0
  43. package/es/hooks/useRemoteSelectPagination.d.ts +68 -0
  44. package/es/hooks/useSelectEcho.d.ts +27 -0
  45. package/es/index.d.ts +49 -2
  46. package/es/index.mjs +2605 -966
  47. package/es/locale/en.d.ts +3 -0
  48. package/es/locale/index.d.ts +86 -0
  49. package/es/locale/useLocale.d.ts +13 -0
  50. package/es/locale/zh-cn.d.ts +3 -0
  51. package/es/style.css +1 -1
  52. package/es/utils/types.d.ts +39 -0
  53. package/lib/charts/BaseBar/index.d.ts +2 -0
  54. package/lib/charts/BaseBar/src/index.vue.d.ts +45 -0
  55. package/lib/charts/BaseLine/index.d.ts +2 -0
  56. package/lib/charts/BaseLine/src/index.vue.d.ts +47 -0
  57. package/lib/charts/BasePie/index.d.ts +2 -0
  58. package/lib/charts/BasePie/src/index.vue.d.ts +41 -0
  59. package/lib/charts/BaseRadar/index.d.ts +2 -0
  60. package/lib/charts/BaseRadar/src/index.vue.d.ts +47 -0
  61. package/lib/charts/config.d.ts +32 -0
  62. package/lib/charts/index.d.ts +8 -0
  63. package/lib/charts/useChart.d.ts +21 -0
  64. package/lib/components/ee-dept-cascader/index.d.ts +2 -0
  65. package/lib/components/ee-dept-cascader/src/index.vue.d.ts +26 -0
  66. package/lib/components/ee-dept-cascader/type.d.ts +39 -0
  67. package/lib/components/ee-dict-select/src/index.vue.d.ts +19 -18
  68. package/lib/components/ee-dict-select/type.d.ts +54 -0
  69. package/lib/components/ee-form-dialog/src/index.vue.d.ts +108 -8
  70. package/lib/components/ee-form-table/src/components/FormAuto.vue.d.ts +115 -0
  71. package/lib/components/ee-form-table/src/components/FormDrawer.vue.d.ts +280 -7
  72. package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +1 -0
  73. package/lib/components/ee-form-table/src/constants.d.ts +2 -2
  74. package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +2 -0
  75. package/lib/components/ee-form-table/src/hooks/useExport.d.ts +2 -0
  76. package/lib/components/ee-form-table/src/hooks/useForm.d.ts +4 -2
  77. package/lib/components/ee-form-table/src/index.vue.d.ts +13 -1
  78. package/lib/components/ee-form-table/types.d.ts +41 -0
  79. package/lib/components/ee-remote-select/index.d.ts +2 -0
  80. package/lib/components/ee-remote-select/src/index.vue.d.ts +30 -0
  81. package/lib/components/ee-remote-select/type.d.ts +53 -0
  82. package/lib/components/ee-role-select/index.d.ts +2 -0
  83. package/lib/components/ee-role-select/src/index.vue.d.ts +29 -0
  84. package/lib/components/ee-role-select/type.d.ts +44 -0
  85. package/lib/components/ee-search-bar/src/index.vue.d.ts +80 -10
  86. package/lib/components/ee-status-tag/src/index.vue.d.ts +1 -1
  87. package/lib/components/ee-user-select/index.d.ts +2 -0
  88. package/lib/components/ee-user-select/src/index.vue.d.ts +29 -0
  89. package/lib/components/ee-user-select/type.d.ts +46 -0
  90. package/lib/hooks/index.d.ts +4 -0
  91. package/lib/hooks/useRemoteSelectPagination.d.ts +68 -0
  92. package/lib/hooks/useSelectEcho.d.ts +27 -0
  93. package/lib/index.cjs +1 -1
  94. package/lib/index.d.ts +49 -2
  95. package/lib/locale/en.d.ts +3 -0
  96. package/lib/locale/index.d.ts +86 -0
  97. package/lib/locale/useLocale.d.ts +13 -0
  98. package/lib/locale/zh-cn.d.ts +3 -0
  99. package/lib/style.css +1 -1
  100. package/lib/utils/types.d.ts +39 -0
  101. package/package.json +5 -2
package/es/index.mjs CHANGED
@@ -1,59 +1,256 @@
1
- import { defineComponent as K, ref as T, computed as C, onMounted as Q, watch as ve, openBlock as i, createBlock as f, unref as t, mergeProps as R, withCtx as d, createElementBlock as D, Fragment as B, renderList as A, createTextVNode as S, toDisplayString as F, createVNode as w, resolveDynamicComponent as Re, createCommentVNode as P, createElementVNode as ue, reactive as Oe, renderSlot as I, normalizeClass as va, normalizeStyle as ba, createSlots as pa, normalizeProps as ya, guardReactiveProps as wa, isRef as Ca } from "vue";
2
- import { ElSelect as se, ElOption as de, ElTag as za, ElForm as be, ElRow as pe, ElCol as X, ElFormItem as Y, ElInput as Z, ElDatePicker as J, ElButton as E, ElDialog as ye, ElRadioGroup as Ie, ElRadio as we, ElCheckboxGroup as Ce, ElCheckbox as ze, ElSwitch as Va, ElMessageBox as Pe, ElMessage as L, ElInputNumber as ka, ElTooltip as xe, ElDrawer as Sa, ElTable as Da, ElTableColumn as te, ElEmpty as Ea, ElPagination as $a } from "element-plus";
3
- const le = /* @__PURE__ */ K({
1
+ import { inject as $e, ref as R, defineComponent as N, computed as D, onMounted as W, openBlock as s, createBlock as y, unref as a, mergeProps as F, withCtx as b, createElementBlock as V, Fragment as $, renderList as O, createTextVNode as U, toDisplayString as T, createVNode as P, resolveDynamicComponent as ha, createCommentVNode as A, createElementVNode as q, reactive as ga, watch as ee, renderSlot as H, normalizeClass as Wa, normalizeStyle as ja, createSlots as Ga, normalizeProps as Ze, guardReactiveProps as Je, isRef as Xa, shallowRef as Ya, nextTick as ge, onUnmounted as Qa } from "vue";
2
+ import { ElMessage as G, ElSelect as ae, ElOption as le, ElTag as Za, ElForm as Me, ElRow as Oe, ElCol as de, ElFormItem as ce, ElInput as ne, ElDatePicker as ie, ElButton as M, ElDialog as ea, ElRadioGroup as aa, ElRadio as Le, ElCheckboxGroup as Ie, ElCheckbox as Ne, ElSwitch as ba, ElMessageBox as ra, ElInputNumber as va, ElTooltip as na, ElDrawer as Ja, ElDescriptions as ia, ElDescriptionsItem as ua, ElTable as _a, ElTableColumn as Ce, ElEmpty as el, ElPagination as al, ElCascader as ll } from "element-plus";
3
+ import * as tl from "echarts";
4
+ const se = {
5
+ formTable: {
6
+ operation: "操作",
7
+ add: "新增",
8
+ edit: "编辑",
9
+ delete: "删除",
10
+ view: "查看",
11
+ import: "导入",
12
+ export: "导出",
13
+ batchDelete: "批量删除",
14
+ refresh: "刷新",
15
+ columnSetting: "列设置",
16
+ search: "查询",
17
+ reset: "重置",
18
+ expand: "展开",
19
+ collapse: "收起",
20
+ empty: "暂无数据",
21
+ confirm: "确定",
22
+ cancel: "取消",
23
+ close: "关闭",
24
+ confirmDelete: "确认删除",
25
+ confirmDeleteMsg: "确定要删除该条数据吗?",
26
+ confirmBatchDelete: "确认批量删除",
27
+ confirmBatchDeleteMsg: "确定要删除选中的 {count} 条数据吗?",
28
+ addTitle: "新增",
29
+ editTitle: "编辑",
30
+ viewTitle: "查看",
31
+ addSuccess: "新增成功",
32
+ editSuccess: "编辑成功",
33
+ deleteSuccess: "删除成功",
34
+ batchDeleteSuccess: "批量删除成功",
35
+ refreshSuccess: "刷新成功",
36
+ exportSuccess: "导出成功",
37
+ exportFail: "导出失败",
38
+ requestFailed: "请求失败",
39
+ deleteFailed: "删除失败",
40
+ batchDeleteFailed: "批量删除失败",
41
+ installXlsx: "请安装 xlsx 依赖: npm install xlsx",
42
+ exportFileName: "export.xlsx",
43
+ inputPlaceholder: "请输入{label}",
44
+ selectPlaceholder: "请选择{label}",
45
+ dateRangeTo: "至",
46
+ dateRangeStart: "开始日期",
47
+ dateRangeEnd: "结束日期"
48
+ },
49
+ searchBar: {
50
+ search: "搜索",
51
+ reset: "重置",
52
+ expand: "展开",
53
+ collapse: "收起",
54
+ inputPlaceholder: "请输入{label}",
55
+ selectPlaceholder: "请选择{label}",
56
+ dateRangeTo: "至",
57
+ dateRangeStart: "开始日期",
58
+ dateRangeEnd: "结束日期"
59
+ },
60
+ formDialog: {
61
+ confirm: "确定",
62
+ cancel: "取消",
63
+ title: "表单",
64
+ inputPlaceholder: "请输入{label}",
65
+ textareaPlaceholder: "请输入{label}",
66
+ selectPlaceholder: "请选择{label}",
67
+ datePickerPlaceholder: "请选择{label}"
68
+ },
69
+ remoteSelect: {
70
+ loading: "加载中...",
71
+ noMore: "没有更多数据了",
72
+ loadMore: "加载更多",
73
+ searchPlaceholder: "请输入关键词搜索",
74
+ requestFailed: "请求失败",
75
+ noData: "暂无数据"
76
+ }
77
+ }, pa = "eeLocale";
78
+ function j() {
79
+ const e = $e(pa, se);
80
+ function l(t, r, o) {
81
+ try {
82
+ const f = e[t];
83
+ let h = f == null ? void 0 : f[r];
84
+ if (h == null) {
85
+ const m = se[t];
86
+ h = m == null ? void 0 : m[r];
87
+ }
88
+ if (h == null) return r;
89
+ if (o)
90
+ for (const [m, S] of Object.entries(o))
91
+ h = h.replace(`{${m}}`, String(S));
92
+ return h;
93
+ } catch {
94
+ return r;
95
+ }
96
+ }
97
+ return { locale: e, t: l };
98
+ }
99
+ function Ke(e) {
100
+ const {
101
+ requestInstance: l,
102
+ apiUrl: t,
103
+ pageNumKey: r = "pageNum",
104
+ pageSizeKey: o = "pageSize",
105
+ pageSize: f = 20,
106
+ searchKey: h = "keyword",
107
+ extraParams: m = {},
108
+ labelField: S = "label",
109
+ valueField: g = "value",
110
+ debounceDelay: v = 300
111
+ } = e, n = l ?? $e(We);
112
+ if (!n)
113
+ throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
114
+ const d = n, { t: c } = j(), p = R(!1), u = R([]), x = R(!1), i = R(0);
115
+ let C = 1, E = "", Q = null;
116
+ async function te(k, Z = !0) {
117
+ Z && (C = 1, x.value = !1, k !== void 0 && (E = k)), p.value = !0;
118
+ try {
119
+ const Y = {
120
+ [r]: C,
121
+ [o]: f,
122
+ ...m
123
+ };
124
+ E && (Y[h] = E);
125
+ const me = await d.get(t, { params: Y }), we = ve(me.data).map((he) => ({
126
+ ...he,
127
+ label: he[S],
128
+ value: he[g]
129
+ }));
130
+ Z ? u.value = we : u.value = [...u.value, ...we], i.value = pe(me.data), u.value.length >= i.value && (x.value = !0);
131
+ } catch (Y) {
132
+ G.error((Y == null ? void 0 : Y.msg) || (Y == null ? void 0 : Y.message) || c("remoteSelect", "requestFailed")), Z && (u.value = []);
133
+ } finally {
134
+ p.value = !1;
135
+ }
136
+ }
137
+ function ve(k) {
138
+ return Array.isArray(k) ? k : k != null && k.rows ? k.rows : k != null && k.list ? k.list : k != null && k.records ? k.records : k != null && k.data ? Array.isArray(k.data) ? k.data : ve(k.data) : k != null && k.items ? k.items : [];
139
+ }
140
+ function pe(k) {
141
+ return k != null && k.total ? Number(k.total) : k != null && k.count ? Number(k.count) : Array.isArray(k) ? k.length : k != null && k.data && typeof k.data == "object" && !Array.isArray(k.data) ? pe(k.data) : 0;
142
+ }
143
+ async function je() {
144
+ p.value || x.value || (C++, await te(void 0, !1));
145
+ }
146
+ function Ge() {
147
+ E = "", C = 1, u.value = [], x.value = !1, i.value = 0;
148
+ }
149
+ function fe(k) {
150
+ E = k, Q && clearTimeout(Q), Q = setTimeout(() => {
151
+ te(E, !0);
152
+ }, v);
153
+ }
154
+ return {
155
+ /** 是否正在加载 */
156
+ loading: p,
157
+ /** 当前选项列表 */
158
+ options: u,
159
+ /** 是否没有更多数据 */
160
+ noMore: x,
161
+ loadData: te,
162
+ loadMore: je,
163
+ resetList: Ge,
164
+ onKeywordChange: fe
165
+ };
166
+ }
167
+ const ze = /* @__PURE__ */ N({
4
168
  name: "EeDictSelect",
5
169
  __name: "index",
6
170
  props: {
7
171
  modelValue: {},
8
- options: {},
9
- request: {},
10
- valueField: { default: "value" },
172
+ dictCode: {},
173
+ apiUrl: {},
174
+ detailEchoUrl: {},
175
+ mode: { default: "single" },
11
176
  labelField: { default: "label" },
177
+ valueField: { default: "value" },
178
+ searchKey: { default: "keyword" },
179
+ pageSize: { default: 50 },
180
+ extraParams: {},
181
+ requestInstance: {},
182
+ options: {},
183
+ placeholder: {},
184
+ clearable: { type: Boolean, default: !0 },
185
+ disabled: { type: Boolean },
186
+ readonly: { type: Boolean },
187
+ filterable: { type: Boolean, default: !0 },
12
188
  size: { default: "default" }
13
189
  },
14
- emits: ["update:modelValue", "change", "clear", "focus", "blur"],
15
- setup(e, { emit: n }) {
16
- const l = e, a = n, r = T(!1), m = T([]), p = C(() => (l.options ?? m.value).map((g) => ({
17
- value: String(g[l.valueField] ?? ""),
18
- label: String(g[l.labelField] ?? ""),
19
- disabled: g.disabled ?? !1
20
- })));
21
- async function V() {
22
- if (!l.options && l.request) {
23
- r.value = !0;
24
- try {
25
- m.value = await l.request();
26
- } finally {
27
- r.value = !1;
28
- }
29
- }
190
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
191
+ setup(e, { emit: l }) {
192
+ const t = e, r = l;
193
+ j();
194
+ const {
195
+ loading: o,
196
+ options: f,
197
+ loadData: h
198
+ } = Ke({
199
+ apiUrl: m(),
200
+ pageNumKey: "pageNum",
201
+ pageSizeKey: "pageSize",
202
+ pageSize: t.pageSize,
203
+ searchKey: t.searchKey,
204
+ extraParams: S(),
205
+ labelField: t.labelField,
206
+ valueField: t.valueField
207
+ });
208
+ function m() {
209
+ return t.apiUrl ? t.apiUrl : "/api/system/dict/data/list";
210
+ }
211
+ function S() {
212
+ const v = { ...t.extraParams || {} };
213
+ return t.dictCode && !t.apiUrl && (v.dictCode = t.dictCode), v;
30
214
  }
31
- return Q(V), ve(() => l.request, V), (k, g) => (i(), f(t(se), R(k.$attrs, {
215
+ const g = D(() => t.options ? t.options : f.value.map((v) => ({
216
+ value: v[t.valueField],
217
+ label: v[t.labelField],
218
+ disabled: v.disabled ?? !1
219
+ })));
220
+ return W(() => {
221
+ t.options || h(void 0, !0);
222
+ }), (v, n) => (s(), y(a(ae), F(v.$attrs, {
32
223
  "model-value": e.modelValue,
33
- loading: r.value,
224
+ loading: a(o),
225
+ multiple: e.mode === "multiple",
226
+ placeholder: e.placeholder,
227
+ clearable: e.clearable,
228
+ disabled: e.disabled,
229
+ readonly: e.readonly,
230
+ filterable: e.filterable,
34
231
  size: e.size,
35
- "onUpdate:modelValue": g[0] || (g[0] = (o) => a("update:modelValue", o)),
36
- onChange: g[1] || (g[1] = (o) => a("change", o)),
37
- onClear: g[2] || (g[2] = (o) => a("clear")),
38
- onFocus: g[3] || (g[3] = (o) => a("focus", o)),
39
- onBlur: g[4] || (g[4] = (o) => a("blur", o))
232
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => r("update:modelValue", d)),
233
+ onChange: n[1] || (n[1] = (d) => r("change", d)),
234
+ onClear: n[2] || (n[2] = (d) => r("clear")),
235
+ onBlur: n[3] || (n[3] = (d) => r("blur", d)),
236
+ onFocus: n[4] || (n[4] = (d) => r("focus", d))
40
237
  }), {
41
- default: d(() => [
42
- (i(!0), D(B, null, A(p.value, (o) => (i(), f(t(de), {
43
- key: o.value,
44
- label: o.label,
45
- value: o.value,
46
- disabled: o.disabled
238
+ default: b(() => [
239
+ (s(!0), V($, null, O(g.value, (d) => (s(), y(a(le), {
240
+ key: d.value,
241
+ label: d.label,
242
+ value: d.value,
243
+ disabled: d.disabled
47
244
  }, null, 8, ["label", "value", "disabled"]))), 128))
48
245
  ]),
49
246
  _: 1
50
- }, 16, ["model-value", "loading", "size"]));
247
+ }, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size"]));
51
248
  }
52
249
  });
53
- le.install = (e) => {
54
- e.component(le.name ?? "EeDictSelect", le);
250
+ ze.install = (e) => {
251
+ e.component(ze.name ?? "EeDictSelect", ze);
55
252
  };
56
- const oe = /* @__PURE__ */ K({
253
+ const xe = /* @__PURE__ */ N({
57
254
  name: "EeStatusTag",
58
255
  __name: "index",
59
256
  props: {
@@ -64,17 +261,17 @@ const oe = /* @__PURE__ */ K({
64
261
  defaultEffect: { default: "light" }
65
262
  },
66
263
  setup(e) {
67
- const n = e, l = C(() => n.mapping.find((a) => a.value === n.value));
68
- return (a, r) => {
69
- var m, p;
70
- return i(), f(t(za), R(a.$attrs, {
71
- type: ((m = l.value) == null ? void 0 : m.type) ?? e.defaultType,
72
- effect: ((p = l.value) == null ? void 0 : p.effect) ?? e.defaultEffect
264
+ const l = e, t = D(() => l.mapping.find((r) => r.value === l.value));
265
+ return (r, o) => {
266
+ var f, h;
267
+ return s(), y(a(Za), F(r.$attrs, {
268
+ type: ((f = t.value) == null ? void 0 : f.type) ?? e.defaultType,
269
+ effect: ((h = t.value) == null ? void 0 : h.effect) ?? e.defaultEffect
73
270
  }), {
74
- default: d(() => {
75
- var V;
271
+ default: b(() => {
272
+ var m;
76
273
  return [
77
- S(F(((V = l.value) == null ? void 0 : V.label) ?? e.fallbackLabel ?? e.value), 1)
274
+ U(T(((m = t.value) == null ? void 0 : m.label) ?? e.fallbackLabel ?? e.value), 1)
78
275
  ];
79
276
  }),
80
277
  _: 1
@@ -82,10 +279,10 @@ const oe = /* @__PURE__ */ K({
82
279
  };
83
280
  }
84
281
  });
85
- oe.install = (e) => {
86
- e.component(oe.name ?? "EeStatusTag", oe);
282
+ xe.install = (e) => {
283
+ e.component(xe.name ?? "EeStatusTag", xe);
87
284
  };
88
- const Pa = { class: "ee-search-bar" }, xa = /* @__PURE__ */ K({
285
+ const ol = { class: "ee-search-bar" }, rl = /* @__PURE__ */ N({
89
286
  name: "EeSearchBar",
90
287
  __name: "index",
91
288
  props: {
@@ -98,125 +295,125 @@ const Pa = { class: "ee-search-bar" }, xa = /* @__PURE__ */ K({
98
295
  size: { default: "default" }
99
296
  },
100
297
  emits: ["update:modelValue", "search", "reset"],
101
- setup(e, { emit: n }) {
102
- const l = e, a = n, r = T(), m = T(!1), p = C(() => {
103
- const u = 24 - V.value.reduce((c, b) => c + (b.span ?? 6), 0) % 24;
104
- return u === 24 ? 6 : u;
105
- }), V = C(() => !l.collapsible || m.value ? l.fields : l.fields.slice(0, l.collapsedCount));
106
- function k() {
107
- a("search", { ...l.modelValue });
108
- }
298
+ setup(e, { emit: l }) {
299
+ const { t } = j(), r = e, o = l, f = R(), h = R(!1), m = D(() => {
300
+ const d = 24 - S.value.reduce((c, p) => c + (p.span ?? 6), 0) % 24;
301
+ return d === 24 ? 6 : d;
302
+ }), S = D(() => !r.collapsible || h.value ? r.fields : r.fields.slice(0, r.collapsedCount));
109
303
  function g() {
110
- const o = {};
111
- l.fields.forEach((u) => {
112
- o[u.prop] = "";
113
- }), a("update:modelValue", o), a("reset");
304
+ o("search", { ...r.modelValue });
305
+ }
306
+ function v() {
307
+ const n = {};
308
+ r.fields.forEach((d) => {
309
+ n[d.prop] = "";
310
+ }), o("update:modelValue", n), o("reset");
114
311
  }
115
- return (o, u) => (i(), D("div", Pa, [
116
- w(t(be), R({
312
+ return (n, d) => (s(), V("div", ol, [
313
+ P(a(Me), F({
117
314
  ref_key: "formRef",
118
- ref: r,
315
+ ref: f,
119
316
  model: e.modelValue,
120
317
  inline: e.inline,
121
318
  "label-width": e.labelWidth,
122
319
  size: e.size
123
- }, o.$attrs), {
124
- default: d(() => [
125
- w(t(pe), null, {
126
- default: d(() => [
127
- (i(!0), D(B, null, A(V.value, (c) => (i(), f(t(X), {
320
+ }, n.$attrs), {
321
+ default: b(() => [
322
+ P(a(Oe), null, {
323
+ default: b(() => [
324
+ (s(!0), V($, null, O(S.value, (c) => (s(), y(a(de), {
128
325
  key: c.prop,
129
326
  span: c.span ?? 6
130
327
  }, {
131
- default: d(() => [
132
- w(t(Y), {
328
+ default: b(() => [
329
+ P(a(ce), {
133
330
  label: c.label,
134
331
  prop: c.prop
135
332
  }, {
136
- default: d(() => [
137
- (c.type ?? "input") === "input" ? (i(), f(t(Z), {
333
+ default: b(() => [
334
+ (c.type ?? "input") === "input" ? (s(), y(a(ne), {
138
335
  key: 0,
139
336
  modelValue: e.modelValue[c.prop],
140
- "onUpdate:modelValue": (b) => e.modelValue[c.prop] = b,
141
- placeholder: c.placeholder ?? `请输入${c.label}`,
337
+ "onUpdate:modelValue": (p) => e.modelValue[c.prop] = p,
338
+ placeholder: c.placeholder ?? a(t)("searchBar", "inputPlaceholder", { label: c.label }),
142
339
  clearable: ""
143
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "select" ? (i(), f(t(se), {
340
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "select" ? (s(), y(a(ae), {
144
341
  key: 1,
145
342
  modelValue: e.modelValue[c.prop],
146
- "onUpdate:modelValue": (b) => e.modelValue[c.prop] = b,
147
- placeholder: c.placeholder ?? `请选择${c.label}`,
343
+ "onUpdate:modelValue": (p) => e.modelValue[c.prop] = p,
344
+ placeholder: c.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: c.label }),
148
345
  clearable: ""
149
346
  }, {
150
- default: d(() => [
151
- (i(!0), D(B, null, A(c.options ?? [], (b) => (i(), f(t(de), {
152
- key: b.value,
153
- label: b.label,
154
- value: b.value
347
+ default: b(() => [
348
+ (s(!0), V($, null, O(c.options ?? [], (p) => (s(), y(a(le), {
349
+ key: p.value,
350
+ label: p.label,
351
+ value: p.value
155
352
  }, null, 8, ["label", "value"]))), 128))
156
353
  ]),
157
354
  _: 2
158
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "date" ? (i(), f(t(J), {
355
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "date" ? (s(), y(a(ie), {
159
356
  key: 2,
160
357
  modelValue: e.modelValue[c.prop],
161
- "onUpdate:modelValue": (b) => e.modelValue[c.prop] = b,
162
- placeholder: c.placeholder ?? `请选择${c.label}`,
358
+ "onUpdate:modelValue": (p) => e.modelValue[c.prop] = p,
359
+ placeholder: c.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: c.label }),
163
360
  style: { width: "100%" }
164
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "date-range" ? (i(), f(t(J), {
361
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : c.type === "date-range" ? (s(), y(a(ie), {
165
362
  key: 3,
166
363
  modelValue: e.modelValue[c.prop],
167
- "onUpdate:modelValue": (b) => e.modelValue[c.prop] = b,
364
+ "onUpdate:modelValue": (p) => e.modelValue[c.prop] = p,
168
365
  type: "daterange",
169
- "range-separator": c.placeholder ?? "",
170
- "start-placeholder": c.placeholder ?? "开始日期",
171
- "end-placeholder": c.placeholder ?? "结束日期",
366
+ "range-separator": a(t)("searchBar", "dateRangeTo"),
367
+ "start-placeholder": a(t)("searchBar", "dateRangeStart"),
368
+ "end-placeholder": a(t)("searchBar", "dateRangeEnd"),
172
369
  style: { width: "100%" }
173
- }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : c.component ? (i(), f(Re(c.component), {
370
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : c.component ? (s(), y(ha(c.component), {
174
371
  key: 4,
175
372
  modelValue: e.modelValue[c.prop],
176
- "onUpdate:modelValue": (b) => e.modelValue[c.prop] = b
177
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : P("", !0)
373
+ "onUpdate:modelValue": (p) => e.modelValue[c.prop] = p
374
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : A("", !0)
178
375
  ]),
179
376
  _: 2
180
377
  }, 1032, ["label", "prop"])
181
378
  ]),
182
379
  _: 2
183
380
  }, 1032, ["span"]))), 128)),
184
- w(t(X), { span: p.value }, {
185
- default: d(() => [
186
- w(t(Y), null, {
187
- default: d(() => [
188
- w(t(E), {
381
+ P(a(de), { span: m.value }, {
382
+ default: b(() => [
383
+ P(a(ce), null, {
384
+ default: b(() => [
385
+ P(a(M), {
189
386
  type: "primary",
190
387
  size: e.size,
191
388
  round: "",
192
- onClick: k
389
+ onClick: g
193
390
  }, {
194
- default: d(() => [...u[1] || (u[1] = [
195
- S(" 搜索 ", -1)
196
- ])]),
391
+ default: b(() => [
392
+ U(T(a(t)("searchBar", "search")), 1)
393
+ ]),
197
394
  _: 1
198
395
  }, 8, ["size"]),
199
- w(t(E), {
396
+ P(a(M), {
200
397
  size: e.size,
201
398
  round: "",
202
- onClick: g
399
+ onClick: v
203
400
  }, {
204
- default: d(() => [...u[2] || (u[2] = [
205
- S(" 重置 ", -1)
206
- ])]),
401
+ default: b(() => [
402
+ U(T(a(t)("searchBar", "reset")), 1)
403
+ ]),
207
404
  _: 1
208
405
  }, 8, ["size"]),
209
- e.collapsible && e.fields.length > e.collapsedCount ? (i(), f(t(E), {
406
+ e.collapsible && e.fields.length > e.collapsedCount ? (s(), y(a(M), {
210
407
  key: 0,
211
408
  text: "",
212
409
  size: e.size,
213
- onClick: u[0] || (u[0] = (c) => m.value = !m.value)
410
+ onClick: d[0] || (d[0] = (c) => h.value = !h.value)
214
411
  }, {
215
- default: d(() => [
216
- S(F(m.value ? "收起" : "展开"), 1)
412
+ default: b(() => [
413
+ U(T(h.value ? a(t)("searchBar", "collapse") : a(t)("searchBar", "expand")), 1)
217
414
  ]),
218
415
  _: 1
219
- }, 8, ["size"])) : P("", !0)
416
+ }, 8, ["size"])) : A("", !0)
220
417
  ]),
221
418
  _: 1
222
419
  })
@@ -231,21 +428,21 @@ const Pa = { class: "ee-search-bar" }, xa = /* @__PURE__ */ K({
231
428
  }, 16, ["model", "inline", "label-width", "size"])
232
429
  ]));
233
430
  }
234
- }), Ne = (e, n) => {
235
- const l = e.__vccOpts || e;
236
- for (const [a, r] of n)
237
- l[a] = r;
238
- return l;
239
- }, ne = /* @__PURE__ */ Ne(xa, [["__scopeId", "data-v-b65c74a4"]]);
240
- ne.install = (e) => {
241
- e.component(ne.name ?? "EeSearchBar", ne);
431
+ }), be = (e, l) => {
432
+ const t = e.__vccOpts || e;
433
+ for (const [r, o] of l)
434
+ t[r] = o;
435
+ return t;
436
+ }, De = /* @__PURE__ */ be(rl, [["__scopeId", "data-v-fe481020"]]);
437
+ De.install = (e) => {
438
+ e.component(De.name ?? "EeSearchBar", De);
242
439
  };
243
- const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
440
+ const nl = { class: "ee-form-dialog-footer" }, il = /* @__PURE__ */ N({
244
441
  name: "EeFormDialog",
245
442
  __name: "index",
246
443
  props: {
247
444
  modelValue: { type: Boolean },
248
- title: { default: "表单" },
445
+ title: { default: "" },
249
446
  formData: {},
250
447
  fields: {},
251
448
  rules: {},
@@ -255,10 +452,10 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
255
452
  size: { default: "default" }
256
453
  },
257
454
  emits: ["update:modelValue", "submit", "cancel"],
258
- setup(e, { emit: n }) {
259
- const l = e, a = n, r = T(), m = C(() => {
260
- const k = {};
261
- for (const g of Object.keys(l))
455
+ setup(e, { emit: l }) {
456
+ const { t } = j(), r = e, o = l, f = R(), h = D(() => {
457
+ const g = {};
458
+ for (const v of Object.keys(r))
262
459
  [
263
460
  "modelValue",
264
461
  "title",
@@ -268,150 +465,150 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
268
465
  "width",
269
466
  "labelWidth",
270
467
  "loading"
271
- ].includes(g) || (k[g] = l[g]);
272
- return k;
468
+ ].includes(v) || (g[v] = r[v]);
469
+ return g;
273
470
  });
274
- function p() {
275
- a("update:modelValue", !1), a("cancel");
471
+ function m() {
472
+ o("update:modelValue", !1), o("cancel");
276
473
  }
277
- async function V() {
278
- if (r.value)
474
+ async function S() {
475
+ if (f.value)
279
476
  try {
280
- await r.value.validate(), a("submit", { ...l.formData });
477
+ await f.value.validate(), o("submit", { ...r.formData });
281
478
  } catch {
282
479
  }
283
480
  }
284
- return (k, g) => (i(), f(t(ye), R(k.$attrs, {
481
+ return (g, v) => (s(), y(a(ea), F(g.$attrs, {
285
482
  "model-value": e.modelValue,
286
483
  title: e.title,
287
484
  width: e.width,
288
- "onUpdate:modelValue": g[0] || (g[0] = (o) => a("update:modelValue", o)),
289
- onClose: p
485
+ "onUpdate:modelValue": v[0] || (v[0] = (n) => o("update:modelValue", n)),
486
+ onClose: m
290
487
  }), {
291
- footer: d(() => [
292
- ue("span", Ta, [
293
- w(t(E), {
488
+ footer: b(() => [
489
+ q("span", nl, [
490
+ P(a(M), {
294
491
  size: e.size,
295
492
  round: "",
296
- onClick: p
493
+ onClick: m
297
494
  }, {
298
- default: d(() => [...g[1] || (g[1] = [
299
- S("取消", -1)
300
- ])]),
495
+ default: b(() => [
496
+ U(T(a(t)("formDialog", "cancel")), 1)
497
+ ]),
301
498
  _: 1
302
499
  }, 8, ["size"]),
303
- w(t(E), {
500
+ P(a(M), {
304
501
  type: "primary",
305
502
  size: e.size,
306
503
  round: "",
307
504
  loading: e.loading,
308
- onClick: V
505
+ onClick: S
309
506
  }, {
310
- default: d(() => [...g[2] || (g[2] = [
311
- S(" 确定 ", -1)
312
- ])]),
507
+ default: b(() => [
508
+ U(T(a(t)("formDialog", "confirm")), 1)
509
+ ]),
313
510
  _: 1
314
511
  }, 8, ["size", "loading"])
315
512
  ])
316
513
  ]),
317
- default: d(() => [
318
- w(t(be), R({
514
+ default: b(() => [
515
+ P(a(Me), F({
319
516
  ref_key: "formRef",
320
- ref: r,
517
+ ref: f,
321
518
  model: e.formData,
322
519
  rules: e.rules,
323
520
  "label-width": e.labelWidth,
324
521
  size: e.size
325
- }, m.value), {
326
- default: d(() => [
327
- w(t(pe), { gutter: 20 }, {
328
- default: d(() => [
329
- (i(!0), D(B, null, A(e.fields, (o) => (i(), f(t(X), {
330
- key: o.prop,
331
- span: o.span ?? 24
522
+ }, h.value), {
523
+ default: b(() => [
524
+ P(a(Oe), { gutter: 20 }, {
525
+ default: b(() => [
526
+ (s(!0), V($, null, O(e.fields, (n) => (s(), y(a(de), {
527
+ key: n.prop,
528
+ span: n.span ?? 24
332
529
  }, {
333
- default: d(() => [
334
- w(t(Y), {
335
- label: o.label,
336
- prop: o.prop
530
+ default: b(() => [
531
+ P(a(ce), {
532
+ label: n.label,
533
+ prop: n.prop
337
534
  }, {
338
- default: d(() => [
339
- (o.type ?? "input") === "input" ? (i(), f(t(Z), {
535
+ default: b(() => [
536
+ (n.type ?? "input") === "input" ? (s(), y(a(ne), {
340
537
  key: 0,
341
- modelValue: e.formData[o.prop],
342
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u,
343
- placeholder: o.placeholder ?? `请输入${o.label}`
344
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "textarea" ? (i(), f(t(Z), {
538
+ modelValue: e.formData[n.prop],
539
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d,
540
+ placeholder: n.placeholder ?? a(t)("formDialog", "inputPlaceholder", { label: n.label })
541
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "textarea" ? (s(), y(a(ne), {
345
542
  key: 1,
346
- modelValue: e.formData[o.prop],
347
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u,
543
+ modelValue: e.formData[n.prop],
544
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d,
348
545
  type: "textarea",
349
- placeholder: o.placeholder ?? `请输入${o.label}`,
546
+ placeholder: n.placeholder ?? a(t)("formDialog", "textareaPlaceholder", { label: n.label }),
350
547
  rows: 3
351
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "select" ? (i(), f(t(se), {
548
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "select" ? (s(), y(a(ae), {
352
549
  key: 2,
353
- modelValue: e.formData[o.prop],
354
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u,
355
- placeholder: o.placeholder ?? `请选择${o.label}`,
550
+ modelValue: e.formData[n.prop],
551
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d,
552
+ placeholder: n.placeholder ?? a(t)("formDialog", "selectPlaceholder", { label: n.label }),
356
553
  style: { width: "100%" }
357
554
  }, {
358
- default: d(() => [
359
- (i(!0), D(B, null, A(o.options ?? [], (u) => (i(), f(t(de), {
360
- key: u.value,
361
- label: u.label,
362
- value: u.value
555
+ default: b(() => [
556
+ (s(!0), V($, null, O(n.options ?? [], (d) => (s(), y(a(le), {
557
+ key: d.value,
558
+ label: d.label,
559
+ value: d.value
363
560
  }, null, 8, ["label", "value"]))), 128))
364
561
  ]),
365
562
  _: 2
366
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "radio" ? (i(), f(t(Ie), {
563
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "radio" ? (s(), y(a(aa), {
367
564
  key: 3,
368
- modelValue: e.formData[o.prop],
369
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u
565
+ modelValue: e.formData[n.prop],
566
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d
370
567
  }, {
371
- default: d(() => [
372
- (i(!0), D(B, null, A(o.options ?? [], (u) => (i(), f(t(we), {
373
- key: u.value,
374
- label: u.value
568
+ default: b(() => [
569
+ (s(!0), V($, null, O(n.options ?? [], (d) => (s(), y(a(Le), {
570
+ key: d.value,
571
+ label: d.value
375
572
  }, {
376
- default: d(() => [
377
- S(F(u.label), 1)
573
+ default: b(() => [
574
+ U(T(d.label), 1)
378
575
  ]),
379
576
  _: 2
380
577
  }, 1032, ["label"]))), 128))
381
578
  ]),
382
579
  _: 2
383
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : o.type === "checkbox" ? (i(), f(t(Ce), {
580
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "checkbox" ? (s(), y(a(Ie), {
384
581
  key: 4,
385
- modelValue: e.formData[o.prop],
386
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u
582
+ modelValue: e.formData[n.prop],
583
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d
387
584
  }, {
388
- default: d(() => [
389
- (i(!0), D(B, null, A(o.options ?? [], (u) => (i(), f(t(ze), {
390
- key: u.value,
391
- label: u.value
585
+ default: b(() => [
586
+ (s(!0), V($, null, O(n.options ?? [], (d) => (s(), y(a(Ne), {
587
+ key: d.value,
588
+ label: d.value
392
589
  }, {
393
- default: d(() => [
394
- S(F(u.label), 1)
590
+ default: b(() => [
591
+ U(T(d.label), 1)
395
592
  ]),
396
593
  _: 2
397
594
  }, 1032, ["label"]))), 128))
398
595
  ]),
399
596
  _: 2
400
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : o.type === "switch" ? (i(), f(t(Va), {
597
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "switch" ? (s(), y(a(ba), {
401
598
  key: 5,
402
- modelValue: e.formData[o.prop],
403
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u
404
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : o.type === "date" ? (i(), f(t(J), {
599
+ modelValue: e.formData[n.prop],
600
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d
601
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : n.type === "date" ? (s(), y(a(ie), {
405
602
  key: 6,
406
- modelValue: e.formData[o.prop],
407
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u,
408
- placeholder: o.placeholder ?? `请选择${o.label}`,
603
+ modelValue: e.formData[n.prop],
604
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d,
605
+ placeholder: n.placeholder ?? a(t)("formDialog", "datePickerPlaceholder", { label: n.label }),
409
606
  style: { width: "100%" }
410
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.component ? (i(), f(Re(o.component), {
607
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.component ? (s(), y(ha(n.component), {
411
608
  key: 7,
412
- modelValue: e.formData[o.prop],
413
- "onUpdate:modelValue": (u) => e.formData[o.prop] = u
414
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : P("", !0)
609
+ modelValue: e.formData[n.prop],
610
+ "onUpdate:modelValue": (d) => e.formData[n.prop] = d
611
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : A("", !0)
415
612
  ]),
416
613
  _: 2
417
614
  }, 1032, ["label", "prop"])
@@ -428,42 +625,45 @@ const Ta = { class: "ee-form-dialog-footer" }, Ua = /* @__PURE__ */ K({
428
625
  _: 1
429
626
  }, 16, ["model-value", "title", "width"]));
430
627
  }
431
- }), ie = /* @__PURE__ */ Ne(Ua, [["__scopeId", "data-v-560e642c"]]);
432
- ie.install = (e) => {
433
- e.component(ie.name ?? "EeFormDialog", ie);
628
+ }), ke = /* @__PURE__ */ be(il, [["__scopeId", "data-v-929d8568"]]);
629
+ ke.install = (e) => {
630
+ e.component(ke.name ?? "EeFormDialog", ke);
434
631
  };
435
- const Le = [10, 20, 50, 100], Fa = "total, sizes, prev, pager, next, jumper", Te = {
632
+ const ya = [10, 20, 50, 100], ul = "total, sizes, prev, pager, next, jumper", sa = {
436
633
  show: !0,
437
634
  cols: 3,
438
635
  maxRow: 2,
439
636
  foldable: !0,
440
637
  foldDefault: !0
441
- }, Ue = { show: !1 }, he = {
638
+ }, da = { show: !1 }, _e = {
442
639
  show: !0,
443
640
  pageSize: 20,
444
- pageSizes: Le,
641
+ pageSizes: ya,
445
642
  background: !0
446
- }, Ba = { show: !1 }, Fe = {
643
+ }, sl = { show: !1 }, dl = {
447
644
  show: !0,
448
645
  showView: !1,
449
646
  showEdit: !0,
450
647
  showDelete: !0,
451
648
  confirmDelete: !0,
452
- deleteConfirmTitle: "确认删除",
453
- deleteConfirmMessage: "确定要删除该条数据吗?"
454
- }, Be = { show: !1 }, Aa = {
649
+ deleteConfirmTitle: "",
650
+ deleteConfirmMessage: ""
651
+ }, ca = { show: !1 }, cl = {
455
652
  show: !0,
456
653
  showAdd: !1,
457
654
  showImport: !1,
458
655
  showExport: !1,
459
656
  showBatchDelete: !1
460
- }, Ae = { show: !1 }, Ra = {
657
+ }, fa = { show: !1 }, fl = {
461
658
  mode: "drawer",
462
659
  width: "40%",
463
660
  closeOnReset: !0,
464
- addTitle: "新增",
465
- editTitle: "编辑"
466
- }, Oa = [
661
+ addTitle: "",
662
+ editTitle: "",
663
+ viewTitle: "",
664
+ formCols: 2,
665
+ formLabelWidth: "80px"
666
+ }, ml = [
467
667
  "data",
468
668
  "loading",
469
669
  "size",
@@ -473,7 +673,7 @@ const Le = [10, 20, 50, 100], Fa = "total, sizes, prev, pager, next, jumper", Te
473
673
  "max-height",
474
674
  "highlight-current-row",
475
675
  "row-key"
476
- ], Ia = [
676
+ ], hl = [
477
677
  "prop",
478
678
  "label",
479
679
  "width",
@@ -486,352 +686,359 @@ const Le = [10, 20, 50, 100], Fa = "total, sizes, prev, pager, next, jumper", Te
486
686
  "dictKey",
487
687
  "slotName",
488
688
  "search",
689
+ "form",
489
690
  "auth",
490
691
  "children",
491
692
  "className"
492
693
  ];
493
- function Na(e) {
494
- const n = C(() => !!e.authChecker);
495
- function l(a) {
496
- return !a || !e.authChecker ? !0 : e.authChecker(a);
694
+ function gl(e) {
695
+ const l = D(() => !!e.authChecker);
696
+ function t(r) {
697
+ return !r || !e.authChecker ? !0 : e.authChecker(r);
497
698
  }
498
- return { authPass: l, authEnabled: n };
699
+ return { authPass: t, authEnabled: l };
499
700
  }
500
- function La(e) {
501
- function n(a, r) {
502
- var m;
503
- return a || (r && ((m = e.dictMap) != null && m[r]) ? e.dictMap[r] : []);
701
+ function bl(e) {
702
+ function l(r, o) {
703
+ var f;
704
+ return r || (o && ((f = e.dictMap) != null && f[o]) ? e.dictMap[o] : []);
504
705
  }
505
- function l(a, r) {
506
- var p;
507
- if (!a || !((p = e.dictMap) != null && p[a])) return String(r ?? "");
508
- const m = e.dictMap[a].find((V) => V.value === r);
509
- return (m == null ? void 0 : m.label) ?? String(r ?? "");
706
+ function t(r, o) {
707
+ var h;
708
+ if (!r || !((h = e.dictMap) != null && h[r])) return String(o ?? "");
709
+ const f = e.dictMap[r].find((m) => m.value === o);
710
+ return (f == null ? void 0 : f.label) ?? String(o ?? "");
510
711
  }
511
- return { resolvedDict: n, dictLabel: l };
712
+ return { resolvedDict: l, dictLabel: t };
512
713
  }
513
- function Ma(e) {
514
- const n = T(!0), l = Oe({}), a = C(() => e.searchConfig === !1 ? Ue : e.searchConfig === !0 ? { ...Te } : e.searchConfig ? { ...Te, ...e.searchConfig } : Ue), r = C(() => a.value.show), m = C(() => a.value.cols || 3), p = C(() => e.columns.filter((h) => {
515
- var z;
516
- return (z = h.search) == null ? void 0 : z.enable;
517
- }).map((h) => {
518
- const z = h.search;
714
+ function vl(e) {
715
+ const l = R(!0), t = ga({}), r = D(() => e.searchConfig === !1 ? da : e.searchConfig === !0 ? { ...sa } : e.searchConfig ? { ...sa, ...e.searchConfig } : da), o = D(() => r.value.show), f = D(() => r.value.cols || 3), h = D(() => e.columns.filter((i) => {
716
+ var C;
717
+ return (C = i.search) == null ? void 0 : C.enable;
718
+ }).map((i) => {
719
+ const C = i.search;
519
720
  return {
520
- ...z,
521
- prop: h.prop,
522
- label: h.label,
523
- field: z.field || h.prop,
524
- placeholder: z.placeholder || h.label,
525
- dictKey: h.dictKey,
526
- props: z.props || {}
721
+ ...C,
722
+ prop: i.prop,
723
+ label: i.label,
724
+ field: C.field || i.prop,
725
+ placeholder: C.placeholder || i.label,
726
+ dictKey: i.dictKey,
727
+ props: C.props || {}
527
728
  };
528
- })), V = C(() => a.value.maxRow || 2), k = C(() => m.value * V.value), g = C(
529
- () => a.value.foldable !== !1 && p.value.length > k.value
729
+ })), m = D(() => r.value.maxRow || 2), S = D(() => f.value * m.value), g = D(
730
+ () => r.value.foldable !== !1 && h.value.length > S.value
530
731
  );
531
- Q(() => {
532
- a.value.foldDefault !== !1 && (n.value = !1);
732
+ W(() => {
733
+ r.value.foldDefault !== !1 && (l.value = !1);
533
734
  });
534
- const o = C(() => !n.value && g.value ? p.value.slice(0, k.value) : p.value), u = C(() => 24 / m.value);
535
- function c() {
536
- p.value.forEach((h) => {
537
- l[h.field] = h.defaultValue ?? "";
735
+ const v = D(() => !l.value && g.value ? h.value.slice(0, S.value) : h.value), n = D(() => 24 / f.value);
736
+ function d() {
737
+ h.value.forEach((i) => {
738
+ t[i.field] = i.defaultValue ?? "";
538
739
  });
539
740
  }
540
- function b() {
541
- const h = {};
542
- return p.value.forEach((z) => {
543
- h[z.field] = z.defaultValue ?? "";
544
- }), h;
741
+ function c() {
742
+ const i = {};
743
+ return h.value.forEach((C) => {
744
+ i[C.field] = C.defaultValue ?? "";
745
+ }), i;
545
746
  }
546
- function O() {
547
- const h = {};
548
- for (const [z, N] of Object.entries(l))
549
- N !== "" && N !== null && N !== void 0 && (h[z] = N);
550
- return h;
747
+ function p() {
748
+ const i = {};
749
+ for (const [C, E] of Object.entries(t))
750
+ E !== "" && E !== null && E !== void 0 && (i[C] = E);
751
+ return i;
551
752
  }
552
- function M() {
553
- Object.assign(l, b());
753
+ function u() {
754
+ Object.assign(t, c());
554
755
  }
555
- function H() {
556
- n.value = !n.value;
756
+ function x() {
757
+ l.value = !l.value;
557
758
  }
558
759
  return {
559
- searchExpanded: n,
560
- searchParams: l,
561
- searchCfg: a,
562
- showSearch: r,
563
- searchCols: m,
564
- allSearchFields: p,
565
- visibleSearchFields: o,
760
+ searchExpanded: l,
761
+ searchParams: t,
762
+ searchCfg: r,
763
+ showSearch: o,
764
+ searchCols: f,
765
+ allSearchFields: h,
766
+ visibleSearchFields: v,
566
767
  showFoldBtn: g,
567
- actionColSpan: u,
568
- initSearchParams: c,
569
- getDefaultSearchParams: b,
570
- getActiveSearchParams: O,
571
- resetSearchParams: M,
572
- toggleFold: H
768
+ actionColSpan: n,
769
+ initSearchParams: d,
770
+ getDefaultSearchParams: c,
771
+ getActiveSearchParams: p,
772
+ resetSearchParams: u,
773
+ toggleFold: x
573
774
  };
574
775
  }
575
- function Ha(e) {
576
- const n = Oe({ current: 1, pageSize: 20, total: 0 }), l = C(() => e.pagination === !1 ? Ba : e.pagination === !0 ? { ...he } : e.pagination ? { ...he, ...e.pagination } : { ...he, show: !0 }), a = C(() => l.value.show !== !1), r = C(() => l.value.pageSizes || Le), m = C(
577
- () => l.value.layout || Fa
578
- ), p = C(() => l.value.background !== !1);
579
- Q(() => {
580
- e.pagination && typeof e.pagination == "object" && (e.pagination.pageSize && (n.pageSize = e.pagination.pageSize), e.pagination.total !== void 0 && (n.total = e.pagination.total));
581
- }), ve(
776
+ function pl(e) {
777
+ const l = ga({ current: 1, pageSize: 20, total: 0 }), t = D(() => e.pagination === !1 ? sl : e.pagination === !0 ? { ..._e } : e.pagination ? { ..._e, ...e.pagination } : { ..._e, show: !0 }), r = D(() => t.value.show !== !1), o = D(() => t.value.pageSizes || ya), f = D(
778
+ () => t.value.layout || ul
779
+ ), h = D(() => t.value.background !== !1);
780
+ W(() => {
781
+ e.pagination && typeof e.pagination == "object" && (e.pagination.pageSize && (l.pageSize = e.pagination.pageSize), e.pagination.total !== void 0 && (l.total = e.pagination.total));
782
+ }), ee(
582
783
  () => e.pagination,
583
- (o) => {
584
- typeof o == "object" && o && (o.total !== void 0 && (n.total = o.total), o.pageSize && (n.pageSize = o.pageSize));
784
+ (v) => {
785
+ typeof v == "object" && v && (v.total !== void 0 && (l.total = v.total), v.pageSize && (l.pageSize = v.pageSize));
585
786
  },
586
787
  { deep: !0 }
587
788
  );
588
- function V(o) {
589
- n.current = o;
789
+ function m(v) {
790
+ l.current = v;
590
791
  }
591
- function k(o) {
592
- n.pageSize = o;
792
+ function S(v) {
793
+ l.pageSize = v;
593
794
  }
594
795
  function g() {
595
- n.current = 1;
796
+ l.current = 1;
596
797
  }
597
798
  return {
598
- pageState: n,
599
- paginationCfg: l,
600
- showPagination: a,
601
- pageSizesComputed: r,
602
- paginationLayoutComputed: m,
603
- paginationBgComputed: p,
604
- setPage: V,
605
- setPageSize: k,
799
+ pageState: l,
800
+ paginationCfg: t,
801
+ showPagination: r,
802
+ pageSizesComputed: o,
803
+ paginationLayoutComputed: f,
804
+ paginationBgComputed: h,
805
+ setPage: m,
806
+ setPageSize: S,
606
807
  resetPage: g
607
808
  };
608
809
  }
609
- function Ga(e, n) {
610
- const l = T(), a = T([]), r = T(null), m = T(!1), p = T([]), V = C(() => ({
810
+ function yl(e, l) {
811
+ const t = R(), r = R([]), o = R(null), f = R(!1), h = R([]), m = D(() => ({
611
812
  show: !1,
612
813
  type: "multiple",
613
814
  reserveSelection: !1,
614
815
  ...e.selectionConfig
615
- })), k = C(() => ({
816
+ })), S = D(() => ({
616
817
  show: !1,
617
818
  ...e.columnSetting
618
- })), g = C(() => k.value.show), o = C(() => e.columns.filter((h) => h.prop));
619
- Q(() => {
620
- p.value = o.value.map((h) => h.prop);
621
- }), ve(
819
+ })), g = D(() => S.value.show), v = D(() => e.columns.filter((i) => i.prop));
820
+ W(() => {
821
+ h.value = v.value.map((i) => i.prop);
822
+ }), ee(
622
823
  () => e.columns,
623
824
  () => {
624
- p.value = [
825
+ h.value = [
625
826
  .../* @__PURE__ */ new Set([
626
- ...p.value.filter((h) => o.value.some((z) => z.prop === h)),
627
- ...o.value.map((h) => h.prop)
827
+ ...h.value.filter((i) => v.value.some((C) => C.prop === i)),
828
+ ...v.value.map((i) => i.prop)
628
829
  ])
629
830
  ];
630
831
  },
631
832
  { deep: !0 }
632
833
  );
633
- const u = C(
634
- () => o.value.filter(
635
- (h) => h.show !== !1 && p.value.includes(h.prop) && n.authPass(h.auth)
834
+ const n = D(
835
+ () => v.value.filter(
836
+ (i) => i.show !== !1 && h.value.includes(i.prop) && l.authPass(i.auth)
636
837
  )
637
- ), c = C(() => e.tableHeight || void 0), b = C(() => e.tableMaxHeight || void 0), O = C(() => e.autoHeight ? { minHeight: `calc(100vh - ${(typeof e.autoHeight == "object" ? e.autoHeight : {}).offset || 200}px)` } : {});
638
- function M(h) {
639
- a.value = h;
838
+ ), d = D(() => e.tableHeight || void 0), c = D(() => e.tableMaxHeight || void 0), p = D(() => e.autoHeight ? { minHeight: `calc(100vh - ${(typeof e.autoHeight == "object" ? e.autoHeight : {}).offset || 200}px)` } : {});
839
+ function u(i) {
840
+ r.value = i;
640
841
  }
641
- function H(h) {
642
- const z = e.rowKey || "id";
643
- r.value = h[z], a.value = [h];
842
+ function x(i) {
843
+ const C = e.rowKey || "id";
844
+ o.value = i[C], r.value = [i];
644
845
  }
645
846
  return {
646
- tableRef: l,
647
- selection: a,
648
- singleSelection: r,
649
- columnSettingVisible: m,
650
- checkedColumns: p,
651
- selectionCfg: V,
652
- columnSettingCfg: k,
847
+ tableRef: t,
848
+ selection: r,
849
+ singleSelection: o,
850
+ columnSettingVisible: f,
851
+ checkedColumns: h,
852
+ selectionCfg: m,
853
+ columnSettingCfg: S,
653
854
  showColumnSetting: g,
654
- allColumns: o,
655
- visibleColumns: u,
656
- tableComputedHeight: c,
657
- tableMaxHeightProp: b,
658
- tableWrapperStyle: O,
659
- handleSelectionChange: M,
660
- handleSingleSelect: H
855
+ allColumns: v,
856
+ visibleColumns: n,
857
+ tableComputedHeight: d,
858
+ tableMaxHeightProp: c,
859
+ tableWrapperStyle: p,
860
+ handleSelectionChange: u,
861
+ handleSingleSelect: x
661
862
  };
662
863
  }
663
- function ja(e, n) {
664
- const l = T([]), a = T(!1), r = C(() => {
665
- var u;
666
- return !!((u = e.crudConfig) != null && u.api.list);
864
+ function wl(e, l) {
865
+ const t = R([]), r = R(!1), o = D(() => {
866
+ var n;
867
+ return !!((n = e.crudConfig) != null && n.api.list);
667
868
  });
668
- async function m() {
669
- var u;
670
- if ((u = e.crudConfig) != null && u.api.list) {
671
- a.value = !0;
869
+ async function f() {
870
+ var n;
871
+ if ((n = e.crudConfig) != null && n.api.list) {
872
+ r.value = !0;
672
873
  try {
673
- const c = {
674
- page: n.pageState.current,
675
- pageSize: n.pageState.pageSize,
874
+ const d = {
875
+ page: l.pageState.current,
876
+ pageSize: l.pageState.pageSize,
676
877
  ...e.crudConfig.baseParams
677
- }, b = n.getActiveSearchParams();
678
- Object.assign(c, b);
679
- const O = await e.crudConfig.api.list(c);
680
- l.value = O.data || [], n.setTotal(O.total ?? 0);
681
- } catch (c) {
682
- n.emit("request-error", c), L.error((c == null ? void 0 : c.message) || "请求失败");
878
+ }, c = l.getActiveSearchParams();
879
+ Object.assign(d, c);
880
+ const p = await e.crudConfig.api.list(d);
881
+ t.value = p.data || [], l.setTotal(p.total ?? 0);
882
+ } catch (d) {
883
+ l.emit("request-error", d), G.error((d == null ? void 0 : d.message) || l.t("formTable", "requestFailed"));
683
884
  } finally {
684
- a.value = !1;
885
+ r.value = !1;
685
886
  }
686
887
  }
687
888
  }
688
- async function p() {
689
- n.resetPage(), await m();
889
+ async function h() {
890
+ l.resetPage(), await f();
690
891
  }
691
- async function V(u) {
692
- var c;
693
- if (!((c = e.crudConfig) != null && c.api.delete)) {
694
- n.emit("delete", u);
892
+ async function m(n) {
893
+ var d;
894
+ if (!((d = e.crudConfig) != null && d.api.delete)) {
895
+ l.emit("delete", n);
695
896
  return;
696
897
  }
697
- a.value = !0;
898
+ r.value = !0;
698
899
  try {
699
- const b = u[e.rowKey || "id"];
700
- await e.crudConfig.api.delete(b), L.success("删除成功"), n.emit("delete-success"), await m();
701
- } catch (b) {
702
- n.emit("request-error", b), L.error((b == null ? void 0 : b.message) || "删除失败");
900
+ const c = n[e.rowKey || "id"];
901
+ await e.crudConfig.api.delete(c), G.success(l.t("formTable", "deleteSuccess")), l.emit("delete-success"), await f();
902
+ } catch (c) {
903
+ l.emit("request-error", c), G.error((c == null ? void 0 : c.message) || l.t("formTable", "deleteFailed"));
703
904
  } finally {
704
- a.value = !1;
905
+ r.value = !1;
705
906
  }
706
907
  }
707
- async function k(u, c, b, O) {
708
- if (!c) {
709
- await V(u);
908
+ async function S(n, d, c, p) {
909
+ if (!d) {
910
+ await m(n);
710
911
  return;
711
912
  }
712
913
  try {
713
- await Pe.confirm(
714
- O || "确定要删除该条数据吗?",
715
- b || "确认删除",
716
- { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }
717
- ), await V(u);
914
+ const u = l.t("formTable", "confirm"), x = l.t("formTable", "cancel");
915
+ await ra.confirm(
916
+ p || l.t("formTable", "confirmDeleteMsg"),
917
+ c || l.t("formTable", "confirmDelete"),
918
+ { confirmButtonText: u, cancelButtonText: x, type: "warning" }
919
+ ), await m(n);
718
920
  } catch {
719
921
  }
720
922
  }
721
- async function g(u) {
722
- var c;
723
- if (!((c = e.crudConfig) != null && c.api.batchDelete)) {
724
- n.emit("batch-delete", u);
923
+ async function g(n) {
924
+ var d;
925
+ if (!((d = e.crudConfig) != null && d.api.batchDelete)) {
926
+ l.emit("batch-delete", n);
725
927
  return;
726
928
  }
727
- a.value = !0;
929
+ r.value = !0;
728
930
  try {
729
- await e.crudConfig.api.batchDelete(u), L.success("批量删除成功"), n.emit("batch-delete-success"), n.selection.value = [], await m();
730
- } catch (b) {
731
- n.emit("request-error", b), L.error((b == null ? void 0 : b.message) || "批量删除失败");
931
+ await e.crudConfig.api.batchDelete(n), G.success(l.t("formTable", "batchDeleteSuccess")), l.emit("batch-delete-success"), l.selection.value = [], await f();
932
+ } catch (c) {
933
+ l.emit("request-error", c), G.error((c == null ? void 0 : c.message) || l.t("formTable", "batchDeleteFailed"));
732
934
  } finally {
733
- a.value = !1;
935
+ r.value = !1;
734
936
  }
735
937
  }
736
- async function o() {
737
- const u = n.selection.value;
738
- if (u.length !== 0)
938
+ async function v() {
939
+ const n = l.selection.value;
940
+ if (n.length !== 0)
739
941
  try {
740
- await Pe.confirm(
741
- `确定要删除选中的 ${u.length} 条数据吗?`,
742
- "确认批量删除",
743
- { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }
942
+ const d = l.t("formTable", "confirm"), c = l.t("formTable", "cancel");
943
+ await ra.confirm(
944
+ l.t("formTable", "confirmBatchDeleteMsg", { count: n.length }),
945
+ l.t("formTable", "confirmBatchDelete"),
946
+ { confirmButtonText: d, cancelButtonText: c, type: "warning" }
744
947
  );
745
- const c = u.map((b) => b[e.rowKey || "id"]);
746
- await g(c);
948
+ const p = n.map((u) => u[e.rowKey || "id"]);
949
+ await g(p);
747
950
  } catch {
748
951
  }
749
952
  }
750
953
  return {
751
- internalData: l,
752
- loadingState: a,
753
- hasCrud: r,
754
- fetchData: m,
755
- refreshTable: p,
756
- doDelete: V,
757
- handleDelete: k,
954
+ internalData: t,
955
+ loadingState: r,
956
+ hasCrud: o,
957
+ fetchData: f,
958
+ refreshTable: h,
959
+ doDelete: m,
960
+ handleDelete: S,
758
961
  doBatchDelete: g,
759
- handleBatchDelete: o
962
+ handleBatchDelete: v
760
963
  };
761
964
  }
762
- function Ka(e) {
763
- const n = T(!1), l = T(!1), a = T(null), r = T({}), m = T(!1), p = {
764
- ...Ra,
965
+ function Sl(e) {
966
+ const l = R(!1), t = R("add"), r = R(null), o = R({}), f = R(!1), h = {
967
+ ...fl,
765
968
  ...e.drawerConfig
766
- }, V = p.mode || "drawer";
767
- function k() {
768
- l.value = !1, a.value = null, r.value = {}, n.value = !0;
969
+ }, m = h.mode || "drawer";
970
+ function S() {
971
+ t.value = "add", r.value = null, o.value = {}, l.value = !0;
972
+ }
973
+ function g(d) {
974
+ t.value = "edit", r.value = d, o.value = { ...d }, l.value = !0;
769
975
  }
770
- function g(u) {
771
- l.value = !0, a.value = u, r.value = { ...u }, n.value = !0;
976
+ function v(d) {
977
+ t.value = "view", r.value = d, o.value = { ...d }, l.value = !0;
772
978
  }
773
- function o() {
774
- n.value = !1;
979
+ function n() {
980
+ l.value = !1;
775
981
  }
776
982
  return {
777
- formVisible: n,
778
- isEditing: l,
779
- editingRow: a,
780
- formData: r,
781
- saving: m,
782
- drawerMode: V,
783
- drawerCfg: p,
784
- openAdd: k,
983
+ formVisible: l,
984
+ formMode: t,
985
+ editingRow: r,
986
+ formData: o,
987
+ saving: f,
988
+ drawerMode: m,
989
+ drawerCfg: h,
990
+ openAdd: S,
785
991
  openEdit: g,
786
- closeForm: o
992
+ openView: v,
993
+ closeForm: n
787
994
  };
788
995
  }
789
- function Wa(e, n) {
790
- const l = T(!1);
791
- async function a() {
792
- var r, m, p, V, k;
793
- l.value = !0, n.setLoading(!0);
996
+ function Cl(e, l) {
997
+ const t = R(!1);
998
+ async function r() {
999
+ var o, f, h, m, S;
1000
+ t.value = !0, l.setLoading(!0);
794
1001
  try {
795
1002
  const g = await import("xlsx").catch(() => null);
796
1003
  if (!g) {
797
- L.warning("请安装 xlsx 依赖: npm install xlsx");
1004
+ G.warning(l.t("formTable", "installXlsx"));
798
1005
  return;
799
1006
  }
800
- const o = ((r = e.exportConfig) == null ? void 0 : r.mode) || "current";
801
- let u;
802
- if (o === "all" && ((p = (m = e.crudConfig) == null ? void 0 : m.api) != null && p.list)) {
803
- const h = {
1007
+ const v = ((o = e.exportConfig) == null ? void 0 : o.mode) || "current";
1008
+ let n;
1009
+ if (v === "all" && ((h = (f = e.crudConfig) == null ? void 0 : f.api) != null && h.list)) {
1010
+ const i = {
804
1011
  page: 1,
805
1012
  pageSize: 99999,
806
1013
  ...e.crudConfig.baseParams
807
- }, z = n.getActiveSearchParams();
808
- Object.assign(h, z), u = (await e.crudConfig.api.list(h)).data || [];
1014
+ }, C = l.getActiveSearchParams();
1015
+ Object.assign(i, C), n = (await e.crudConfig.api.list(i)).data || [];
809
1016
  } else
810
- u = [...n.getCurrentData()];
811
- const c = ((V = e.exportConfig) == null ? void 0 : V.ignoreColumn) || [], b = n.visibleColumns.value.filter((h) => !c.includes(h.prop)).map((h) => ({ prop: h.prop, label: h.label })), O = [
812
- b.map((h) => h.label),
813
- ...u.map(
814
- (h) => b.map((z) => {
815
- var _;
816
- if (z.prop === "action") return "";
817
- const N = (_ = e.columns.find((ce) => ce.prop === z.prop)) == null ? void 0 : _.dictKey;
818
- return N ? n.dictLabel(N, h[z.prop]) : h[z.prop] ?? "";
1017
+ n = [...l.getCurrentData()];
1018
+ const d = ((m = e.exportConfig) == null ? void 0 : m.ignoreColumn) || [], c = l.visibleColumns.value.filter((i) => !d.includes(i.prop)).map((i) => ({ prop: i.prop, label: i.label })), p = [
1019
+ c.map((i) => i.label),
1020
+ ...n.map(
1021
+ (i) => c.map((C) => {
1022
+ var Q;
1023
+ if (C.prop === "action") return "";
1024
+ const E = (Q = e.columns.find((te) => te.prop === C.prop)) == null ? void 0 : Q.dictKey;
1025
+ return E ? l.dictLabel(E, i[C.prop]) : i[C.prop] ?? "";
819
1026
  })
820
1027
  )
821
- ], M = g.utils.aoa_to_sheet(O), H = g.utils.book_new();
822
- g.utils.book_append_sheet(H, M, "Sheet1"), g.writeFile(H, ((k = e.exportConfig) == null ? void 0 : k.fileName) || "export.xlsx"), L.success("导出成功");
1028
+ ], u = g.utils.aoa_to_sheet(p), x = g.utils.book_new();
1029
+ g.utils.book_append_sheet(x, u, "Sheet1"), g.writeFile(x, ((S = e.exportConfig) == null ? void 0 : S.fileName) || l.t("formTable", "exportFileName")), G.success(l.t("formTable", "exportSuccess"));
823
1030
  } catch (g) {
824
- L.error((g == null ? void 0 : g.message) || "导出失败");
1031
+ G.error((g == null ? void 0 : g.message) || l.t("formTable", "exportFail"));
825
1032
  } finally {
826
- n.setLoading(!1), l.value = !1;
1033
+ l.setLoading(!1), t.value = !1;
827
1034
  }
828
1035
  }
829
- return { handleExport: a, exporting: l };
1036
+ return { handleExport: r, exporting: t };
830
1037
  }
831
- const qa = {
1038
+ const zl = {
832
1039
  key: 0,
833
1040
  class: "ee-search-area"
834
- }, Xa = /* @__PURE__ */ K({
1041
+ }, xl = /* @__PURE__ */ N({
835
1042
  __name: "SearchArea",
836
1043
  props: {
837
1044
  showSearch: { type: Boolean },
@@ -846,163 +1053,164 @@ const qa = {
846
1053
  },
847
1054
  emits: ["search", "reset", "toggle-fold"],
848
1055
  setup(e) {
849
- return (n, l) => e.showSearch ? (i(), D("div", qa, [
850
- w(t(be), {
1056
+ const { t: l } = j();
1057
+ return (t, r) => e.showSearch ? (s(), V("div", zl, [
1058
+ P(a(Me), {
851
1059
  model: e.searchParams,
852
1060
  "label-width": "auto",
853
1061
  size: e.size
854
1062
  }, {
855
- default: d(() => [
856
- w(t(pe), { gutter: 12 }, {
857
- default: d(() => [
858
- (i(!0), D(B, null, A(e.visibleSearchFields, (a) => (i(), f(t(X), {
859
- key: String(a.prop),
1063
+ default: b(() => [
1064
+ P(a(Oe), { gutter: 12 }, {
1065
+ default: b(() => [
1066
+ (s(!0), V($, null, O(e.visibleSearchFields, (o) => (s(), y(a(de), {
1067
+ key: String(o.prop),
860
1068
  span: 24 / e.searchCols
861
1069
  }, {
862
- default: d(() => [
863
- w(t(Y), {
864
- label: String(a.label)
1070
+ default: b(() => [
1071
+ P(a(ce), {
1072
+ label: String(o.label)
865
1073
  }, {
866
- default: d(() => [
867
- a.type === "input" ? (i(), f(t(Z), R({
1074
+ default: b(() => [
1075
+ o.type === "input" ? (s(), y(a(ne), F({
868
1076
  key: 0,
869
- modelValue: e.searchParams[a.field],
870
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
871
- placeholder: String(a.placeholder || `请输入${a.label}`),
1077
+ modelValue: e.searchParams[o.field],
1078
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
1079
+ placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
872
1080
  clearable: ""
873
- }, { ref_for: !0 }, a.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : a.type === "number" ? (i(), f(t(ka), R({
1081
+ }, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "number" ? (s(), y(a(va), F({
874
1082
  key: 1,
875
- modelValue: e.searchParams[a.field],
876
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
877
- placeholder: String(a.placeholder || `请输入${a.label}`),
1083
+ modelValue: e.searchParams[o.field],
1084
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
1085
+ placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
878
1086
  style: { width: "100%" }
879
- }, { ref_for: !0 }, a.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : a.type === "select" ? (i(), f(t(se), R({
1087
+ }, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "select" ? (s(), y(a(ae), F({
880
1088
  key: 2,
881
- modelValue: e.searchParams[a.field],
882
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
883
- placeholder: String(a.placeholder || `请选择${a.label}`),
1089
+ modelValue: e.searchParams[o.field],
1090
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
1091
+ placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
884
1092
  clearable: "",
885
1093
  style: { width: "100%" }
886
- }, { ref_for: !0 }, a.props || {}), {
887
- default: d(() => {
888
- var r;
1094
+ }, { ref_for: !0 }, o.props || {}), {
1095
+ default: b(() => {
1096
+ var f;
889
1097
  return [
890
- (i(!0), D(B, null, A(e.resolveDict(
891
- (r = a.props) == null ? void 0 : r.options,
892
- a.dictKey
893
- ), (m) => (i(), f(t(de), {
894
- key: m.value,
895
- label: m.label,
896
- value: m.value
1098
+ (s(!0), V($, null, O(e.resolveDict(
1099
+ (f = o.props) == null ? void 0 : f.options,
1100
+ o.dictKey
1101
+ ), (h) => (s(), y(a(le), {
1102
+ key: h.value,
1103
+ label: h.label,
1104
+ value: h.value
897
1105
  }, null, 8, ["label", "value"]))), 128))
898
1106
  ];
899
1107
  }),
900
1108
  _: 2
901
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) : a.type === "radio" ? (i(), f(t(Ie), R({
1109
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "radio" ? (s(), y(a(aa), F({
902
1110
  key: 3,
903
- modelValue: e.searchParams[a.field],
904
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r
905
- }, { ref_for: !0 }, a.props || {}), {
906
- default: d(() => {
907
- var r;
1111
+ modelValue: e.searchParams[o.field],
1112
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f
1113
+ }, { ref_for: !0 }, o.props || {}), {
1114
+ default: b(() => {
1115
+ var f;
908
1116
  return [
909
- (i(!0), D(B, null, A(e.resolveDict(
910
- (r = a.props) == null ? void 0 : r.options,
911
- a.dictKey
912
- ), (m) => (i(), f(t(we), {
913
- key: m.value,
914
- value: m.value
1117
+ (s(!0), V($, null, O(e.resolveDict(
1118
+ (f = o.props) == null ? void 0 : f.options,
1119
+ o.dictKey
1120
+ ), (h) => (s(), y(a(Le), {
1121
+ key: h.value,
1122
+ value: h.value
915
1123
  }, {
916
- default: d(() => [
917
- S(F(m.label), 1)
1124
+ default: b(() => [
1125
+ U(T(h.label), 1)
918
1126
  ]),
919
1127
  _: 2
920
1128
  }, 1032, ["value"]))), 128))
921
1129
  ];
922
1130
  }),
923
1131
  _: 2
924
- }, 1040, ["modelValue", "onUpdate:modelValue"])) : a.type === "checkbox" ? (i(), f(t(Ce), R({
1132
+ }, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "checkbox" ? (s(), y(a(Ie), F({
925
1133
  key: 4,
926
- modelValue: e.searchParams[a.field],
927
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r
928
- }, { ref_for: !0 }, a.props || {}), {
929
- default: d(() => {
930
- var r;
1134
+ modelValue: e.searchParams[o.field],
1135
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f
1136
+ }, { ref_for: !0 }, o.props || {}), {
1137
+ default: b(() => {
1138
+ var f;
931
1139
  return [
932
- (i(!0), D(B, null, A(e.resolveDict(
933
- (r = a.props) == null ? void 0 : r.options,
934
- a.dictKey
935
- ), (m) => (i(), f(t(ze), {
936
- key: m.value,
937
- value: m.value,
938
- label: m.label
1140
+ (s(!0), V($, null, O(e.resolveDict(
1141
+ (f = o.props) == null ? void 0 : f.options,
1142
+ o.dictKey
1143
+ ), (h) => (s(), y(a(Ne), {
1144
+ key: h.value,
1145
+ value: h.value,
1146
+ label: h.label
939
1147
  }, null, 8, ["value", "label"]))), 128))
940
1148
  ];
941
1149
  }),
942
1150
  _: 2
943
- }, 1040, ["modelValue", "onUpdate:modelValue"])) : a.type === "date" ? (i(), f(t(J), R({
1151
+ }, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "date" ? (s(), y(a(ie), F({
944
1152
  key: 5,
945
- modelValue: e.searchParams[a.field],
946
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
947
- placeholder: String(a.placeholder || `请选择${a.label}`),
1153
+ modelValue: e.searchParams[o.field],
1154
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
1155
+ placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
948
1156
  style: { width: "100%" }
949
- }, { ref_for: !0 }, a.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : a.type === "date-range" ? (i(), f(t(J), R({
1157
+ }, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "date-range" ? (s(), y(a(ie), F({
950
1158
  key: 6,
951
- modelValue: e.searchParams[a.field],
952
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
1159
+ modelValue: e.searchParams[o.field],
1160
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
953
1161
  type: "daterange",
954
- "range-separator": "",
955
- "start-placeholder": "开始日期",
956
- "end-placeholder": "结束日期",
1162
+ "range-separator": a(l)("formTable", "dateRangeTo"),
1163
+ "start-placeholder": a(l)("formTable", "dateRangeStart"),
1164
+ "end-placeholder": a(l)("formTable", "dateRangeEnd"),
957
1165
  style: { width: "100%" }
958
- }, { ref_for: !0 }, a.props || {}), null, 16, ["modelValue", "onUpdate:modelValue"])) : a.type === "textarea" ? (i(), f(t(Z), R({
1166
+ }, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : o.type === "textarea" ? (s(), y(a(ne), F({
959
1167
  key: 7,
960
- modelValue: e.searchParams[a.field],
961
- "onUpdate:modelValue": (r) => e.searchParams[a.field] = r,
962
- placeholder: String(a.placeholder || `请输入${a.label}`),
1168
+ modelValue: e.searchParams[o.field],
1169
+ "onUpdate:modelValue": (f) => e.searchParams[o.field] = f,
1170
+ placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
963
1171
  type: "textarea"
964
- }, { ref_for: !0 }, a.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : P("", !0)
1172
+ }, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : A("", !0)
965
1173
  ]),
966
1174
  _: 2
967
1175
  }, 1032, ["label"])
968
1176
  ]),
969
1177
  _: 2
970
1178
  }, 1032, ["span"]))), 128)),
971
- w(t(X), { span: e.actionColSpan }, {
972
- default: d(() => [
973
- w(t(Y), null, {
974
- default: d(() => [
975
- w(t(E), {
1179
+ P(a(de), { span: e.actionColSpan }, {
1180
+ default: b(() => [
1181
+ P(a(ce), null, {
1182
+ default: b(() => [
1183
+ P(a(M), {
976
1184
  type: "primary",
977
1185
  round: "",
978
- onClick: l[0] || (l[0] = (a) => n.$emit("search"))
1186
+ onClick: r[0] || (r[0] = (o) => t.$emit("search"))
979
1187
  }, {
980
- default: d(() => [...l[3] || (l[3] = [
981
- S("查询", -1)
982
- ])]),
1188
+ default: b(() => [
1189
+ U(T(a(l)("formTable", "search")), 1)
1190
+ ]),
983
1191
  _: 1
984
1192
  }),
985
- w(t(E), {
1193
+ P(a(M), {
986
1194
  round: "",
987
- onClick: l[1] || (l[1] = (a) => n.$emit("reset"))
1195
+ onClick: r[1] || (r[1] = (o) => t.$emit("reset"))
988
1196
  }, {
989
- default: d(() => [...l[4] || (l[4] = [
990
- S("重置", -1)
991
- ])]),
1197
+ default: b(() => [
1198
+ U(T(a(l)("formTable", "reset")), 1)
1199
+ ]),
992
1200
  _: 1
993
1201
  }),
994
- e.showFoldBtn ? (i(), f(t(E), {
1202
+ e.showFoldBtn ? (s(), y(a(M), {
995
1203
  key: 0,
996
1204
  text: "",
997
1205
  size: e.size,
998
- onClick: l[2] || (l[2] = (a) => n.$emit("toggle-fold"))
1206
+ onClick: r[2] || (r[2] = (o) => t.$emit("toggle-fold"))
999
1207
  }, {
1000
- default: d(() => [
1001
- S(F(e.searchExpanded ? "收起" : "展开"), 1)
1208
+ default: b(() => [
1209
+ U(T(e.searchExpanded ? a(l)("formTable", "collapse") : a(l)("formTable", "expand")), 1)
1002
1210
  ]),
1003
1211
  _: 1
1004
- }, 8, ["size"])) : P("", !0),
1005
- I(n.$slots, "search-action", { params: e.searchParams })
1212
+ }, 8, ["size"])) : A("", !0),
1213
+ H(t.$slots, "search-action", { params: e.searchParams })
1006
1214
  ]),
1007
1215
  _: 3
1008
1216
  })
@@ -1015,214 +1223,575 @@ const qa = {
1015
1223
  ]),
1016
1224
  _: 3
1017
1225
  }, 8, ["model", "size"])
1018
- ])) : P("", !0);
1226
+ ])) : A("", !0);
1019
1227
  }
1020
- }), Ya = {
1228
+ });
1229
+ /*! Element Plus Icons Vue v2.3.2 */
1230
+ var Dl = /* @__PURE__ */ N({
1231
+ name: "Refresh",
1232
+ __name: "refresh",
1233
+ setup(e) {
1234
+ return (l, t) => (s(), V("svg", {
1235
+ xmlns: "http://www.w3.org/2000/svg",
1236
+ viewBox: "0 0 1024 1024"
1237
+ }, [
1238
+ q("path", {
1239
+ fill: "currentColor",
1240
+ d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
1241
+ })
1242
+ ]));
1243
+ }
1244
+ }), kl = Dl, Vl = /* @__PURE__ */ N({
1245
+ name: "Setting",
1246
+ __name: "setting",
1247
+ setup(e) {
1248
+ return (l, t) => (s(), V("svg", {
1249
+ xmlns: "http://www.w3.org/2000/svg",
1250
+ viewBox: "0 0 1024 1024"
1251
+ }, [
1252
+ q("path", {
1253
+ fill: "currentColor",
1254
+ d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
1255
+ })
1256
+ ]));
1257
+ }
1258
+ }), Tl = Vl;
1259
+ const El = {
1021
1260
  key: 0,
1022
1261
  class: "ee-toolbar"
1023
- }, Za = { class: "ee-toolbar-left" }, Ja = { class: "ee-toolbar-right" }, Qa = /* @__PURE__ */ K({
1262
+ }, Pl = { class: "ee-toolbar-left" }, Bl = { class: "ee-toolbar-right" }, Fl = /* @__PURE__ */ N({
1024
1263
  __name: "TableToolbar",
1025
1264
  props: {
1026
1265
  show: { type: Boolean },
1027
1266
  toolbarCfg: {},
1028
1267
  size: {},
1268
+ refreshing: { type: Boolean },
1029
1269
  deps: {}
1030
1270
  },
1031
1271
  emits: ["add", "import", "export", "batch-delete", "refresh", "column-setting"],
1032
1272
  setup(e) {
1033
- return (n, l) => e.show ? (i(), D("div", Ya, [
1034
- ue("div", Za, [
1035
- e.toolbarCfg.showAdd && e.deps.authPass(e.toolbarCfg.addAuth) ? (i(), f(t(E), {
1273
+ const { t: l } = j();
1274
+ return (t, r) => e.show ? (s(), V("div", El, [
1275
+ q("div", Pl, [
1276
+ e.toolbarCfg.showAdd && e.deps.authPass(e.toolbarCfg.addAuth) ? (s(), y(a(M), {
1036
1277
  key: 0,
1037
1278
  type: "primary",
1038
1279
  size: e.size,
1039
1280
  round: "",
1040
- onClick: l[0] || (l[0] = (a) => n.$emit("add"))
1281
+ onClick: r[0] || (r[0] = (o) => t.$emit("add"))
1041
1282
  }, {
1042
- default: d(() => [
1043
- S(F(e.toolbarCfg.addText || "新增"), 1)
1283
+ default: b(() => [
1284
+ U(T(e.toolbarCfg.addText || a(l)("formTable", "add")), 1)
1044
1285
  ]),
1045
1286
  _: 1
1046
- }, 8, ["size"])) : P("", !0),
1047
- e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (i(), f(t(E), {
1287
+ }, 8, ["size"])) : A("", !0),
1288
+ e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (s(), y(a(M), {
1048
1289
  key: 1,
1049
1290
  size: e.size,
1050
1291
  round: "",
1051
- onClick: l[1] || (l[1] = (a) => n.$emit("import"))
1292
+ onClick: r[1] || (r[1] = (o) => t.$emit("import"))
1052
1293
  }, {
1053
- default: d(() => [
1054
- S(F(e.toolbarCfg.importText || "导入"), 1)
1294
+ default: b(() => [
1295
+ U(T(e.toolbarCfg.importText || a(l)("formTable", "import")), 1)
1055
1296
  ]),
1056
1297
  _: 1
1057
- }, 8, ["size"])) : P("", !0),
1058
- e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (i(), f(t(E), {
1298
+ }, 8, ["size"])) : A("", !0),
1299
+ e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (s(), y(a(M), {
1059
1300
  key: 2,
1060
1301
  size: e.size,
1061
1302
  round: "",
1062
- onClick: l[2] || (l[2] = (a) => n.$emit("export"))
1303
+ onClick: r[2] || (r[2] = (o) => t.$emit("export"))
1063
1304
  }, {
1064
- default: d(() => [
1065
- S(F(e.toolbarCfg.exportText || "导出"), 1)
1305
+ default: b(() => [
1306
+ U(T(e.toolbarCfg.exportText || a(l)("formTable", "export")), 1)
1066
1307
  ]),
1067
1308
  _: 1
1068
- }, 8, ["size"])) : P("", !0),
1069
- e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (i(), f(t(E), {
1309
+ }, 8, ["size"])) : A("", !0),
1310
+ e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (s(), y(a(M), {
1070
1311
  key: 3,
1071
1312
  type: "danger",
1072
1313
  size: e.size,
1073
1314
  round: "",
1074
- onClick: l[3] || (l[3] = (a) => n.$emit("batch-delete"))
1315
+ onClick: r[3] || (r[3] = (o) => t.$emit("batch-delete"))
1075
1316
  }, {
1076
- default: d(() => [
1077
- S(F(e.toolbarCfg.batchDeleteText || "批量删除"), 1)
1317
+ default: b(() => [
1318
+ U(T(e.toolbarCfg.batchDeleteText || a(l)("formTable", "batchDelete")), 1)
1078
1319
  ]),
1079
1320
  _: 1
1080
- }, 8, ["size"])) : P("", !0),
1081
- (i(!0), D(B, null, A(e.toolbarCfg.customButtons || [], (a) => (i(), D(B, {
1082
- key: a.code
1321
+ }, 8, ["size"])) : A("", !0),
1322
+ (s(!0), V($, null, O(e.toolbarCfg.customButtons || [], (o) => (s(), V($, {
1323
+ key: o.code
1083
1324
  }, [
1084
- e.deps.authPass(a.auth) ? (i(), f(t(E), {
1325
+ e.deps.authPass(o.auth) ? (s(), y(a(M), {
1085
1326
  key: 0,
1086
- type: a.type,
1327
+ type: o.type,
1087
1328
  size: e.size,
1088
1329
  round: "",
1089
- onClick: a.handler
1330
+ onClick: o.handler
1090
1331
  }, {
1091
- default: d(() => [
1092
- S(F(a.text), 1)
1332
+ default: b(() => [
1333
+ U(T(o.text), 1)
1093
1334
  ]),
1094
1335
  _: 2
1095
- }, 1032, ["type", "size", "onClick"])) : P("", !0)
1336
+ }, 1032, ["type", "size", "onClick"])) : A("", !0)
1096
1337
  ], 64))), 128))
1097
1338
  ]),
1098
- ue("div", Ja, [
1099
- w(t(xe), { content: "刷新" }, {
1100
- default: d(() => [
1101
- w(t(E), {
1102
- icon: "Refresh",
1339
+ q("div", Bl, [
1340
+ P(a(na), {
1341
+ content: a(l)("formTable", "refresh")
1342
+ }, {
1343
+ default: b(() => [
1344
+ P(a(M), {
1345
+ icon: a(kl),
1103
1346
  size: e.size,
1347
+ loading: e.refreshing,
1104
1348
  circle: "",
1105
- onClick: l[4] || (l[4] = (a) => n.$emit("refresh"))
1106
- }, null, 8, ["size"])
1349
+ onClick: r[4] || (r[4] = (o) => t.$emit("refresh"))
1350
+ }, null, 8, ["icon", "size", "loading"])
1107
1351
  ]),
1108
1352
  _: 1
1109
- }),
1110
- e.deps.showColumnSetting ? (i(), f(t(xe), {
1353
+ }, 8, ["content"]),
1354
+ e.deps.showColumnSetting ? (s(), y(a(na), {
1111
1355
  key: 0,
1112
- content: "列设置"
1356
+ content: a(l)("formTable", "columnSetting")
1113
1357
  }, {
1114
- default: d(() => [
1115
- w(t(E), {
1116
- icon: "Setting",
1358
+ default: b(() => [
1359
+ P(a(M), {
1360
+ icon: a(Tl),
1117
1361
  size: e.size,
1118
1362
  circle: "",
1119
- onClick: l[5] || (l[5] = (a) => n.$emit("column-setting"))
1120
- }, null, 8, ["size"])
1363
+ onClick: r[5] || (r[5] = (o) => t.$emit("column-setting"))
1364
+ }, null, 8, ["icon", "size"])
1121
1365
  ]),
1122
1366
  _: 1
1123
- })) : P("", !0),
1124
- I(n.$slots, "toolbar-right")
1367
+ }, 8, ["content"])) : A("", !0),
1368
+ H(t.$slots, "toolbar-right")
1125
1369
  ])
1126
- ])) : P("", !0);
1370
+ ])) : A("", !0);
1371
+ }
1372
+ }), ma = /* @__PURE__ */ N({
1373
+ __name: "FormAuto",
1374
+ props: {
1375
+ formData: {},
1376
+ columns: {},
1377
+ formMode: {},
1378
+ formCols: {},
1379
+ formLabelWidth: {},
1380
+ size: {},
1381
+ dictMap: {}
1382
+ },
1383
+ setup(e, { expose: l }) {
1384
+ const { t } = j(), r = e, o = R();
1385
+ l({
1386
+ validate: () => {
1387
+ var c;
1388
+ return (c = o.value) == null ? void 0 : c.validate();
1389
+ },
1390
+ resetFields: () => {
1391
+ var c;
1392
+ return (c = o.value) == null ? void 0 : c.resetFields();
1393
+ }
1394
+ });
1395
+ const f = D(() => r.columns.filter((c) => !c.form || c.form.hide ? !1 : r.formMode === "add" ? c.form.add !== !1 : r.formMode === "edit" ? c.form.edit !== !1 : !1));
1396
+ function h(c) {
1397
+ var p;
1398
+ return ((p = c.form) == null ? void 0 : p.type) || "input";
1399
+ }
1400
+ function m(c) {
1401
+ var p;
1402
+ return ((p = c.form) == null ? void 0 : p.props) || {};
1403
+ }
1404
+ function S(c) {
1405
+ var u;
1406
+ if ((u = c.form) != null && u.placeholder) return c.form.placeholder;
1407
+ const p = h(c);
1408
+ return p === "select" || p === "date" || p === "date-range" ? t("formTable", "selectPlaceholder", { label: c.label }) : t("formTable", "inputPlaceholder", { label: c.label });
1409
+ }
1410
+ function g(c) {
1411
+ var p;
1412
+ return !!(r.formMode === "edit" && ((p = c.form) != null && p.readonly));
1413
+ }
1414
+ function v(c) {
1415
+ var u;
1416
+ const p = ((u = c.form) == null ? void 0 : u.colSpan) || 1;
1417
+ return Math.round(24 / r.formCols * p);
1418
+ }
1419
+ function n(c) {
1420
+ var p, u, x;
1421
+ return (p = c.form) != null && p.dictKey && ((u = r.dictMap) != null && u[c.form.dictKey]) ? r.dictMap[c.form.dictKey] : ((x = c.form) == null ? void 0 : x.options) || [];
1422
+ }
1423
+ function d(c) {
1424
+ var u, x;
1425
+ const p = (u = c.form) == null ? void 0 : u.rules;
1426
+ if ((x = c.form) != null && x.required) {
1427
+ const i = { required: !0, message: t("formTable", "inputPlaceholder", { label: c.label }), trigger: "blur" };
1428
+ return p ? [...p, i] : [i];
1429
+ }
1430
+ return p;
1431
+ }
1432
+ return (c, p) => (s(), y(a(Me), {
1433
+ ref_key: "formRef",
1434
+ ref: o,
1435
+ model: e.formData,
1436
+ "label-width": e.formLabelWidth,
1437
+ size: e.size,
1438
+ "label-position": "top"
1439
+ }, {
1440
+ default: b(() => [
1441
+ P(a(Oe), { gutter: 20 }, {
1442
+ default: b(() => [
1443
+ (s(!0), V($, null, O(f.value, (u) => (s(), y(a(de), {
1444
+ key: u.prop,
1445
+ span: v(u)
1446
+ }, {
1447
+ default: b(() => {
1448
+ var x;
1449
+ return [
1450
+ P(a(ce), {
1451
+ prop: u.prop,
1452
+ label: u.label,
1453
+ rules: d(u),
1454
+ required: (x = u.form) == null ? void 0 : x.required
1455
+ }, {
1456
+ default: b(() => [
1457
+ h(u) === "input" ? (s(), y(a(ne), F({
1458
+ key: 0,
1459
+ modelValue: e.formData[u.prop],
1460
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1461
+ }, { ref_for: !0 }, m(u), {
1462
+ placeholder: S(u),
1463
+ disabled: g(u),
1464
+ clearable: ""
1465
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "number" ? (s(), y(a(va), F({
1466
+ key: 1,
1467
+ modelValue: e.formData[u.prop],
1468
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1469
+ }, { ref_for: !0 }, m(u), {
1470
+ placeholder: S(u),
1471
+ disabled: g(u),
1472
+ style: { width: "100%" }
1473
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "select" ? (s(), y(a(ae), F({
1474
+ key: 2,
1475
+ modelValue: e.formData[u.prop],
1476
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1477
+ }, { ref_for: !0 }, m(u), {
1478
+ placeholder: S(u),
1479
+ disabled: g(u),
1480
+ clearable: "",
1481
+ style: { width: "100%" }
1482
+ }), {
1483
+ default: b(() => [
1484
+ (s(!0), V($, null, O(n(u), (i) => (s(), y(a(le), {
1485
+ key: i.value,
1486
+ label: i.label,
1487
+ value: i.value
1488
+ }, null, 8, ["label", "value"]))), 128))
1489
+ ]),
1490
+ _: 2
1491
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "radio" ? (s(), y(a(aa), F({
1492
+ key: 3,
1493
+ modelValue: e.formData[u.prop],
1494
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1495
+ }, { ref_for: !0 }, m(u), {
1496
+ disabled: g(u)
1497
+ }), {
1498
+ default: b(() => [
1499
+ (s(!0), V($, null, O(n(u), (i) => (s(), y(a(Le), {
1500
+ key: i.value,
1501
+ value: i.value
1502
+ }, {
1503
+ default: b(() => [
1504
+ U(T(i.label), 1)
1505
+ ]),
1506
+ _: 2
1507
+ }, 1032, ["value"]))), 128))
1508
+ ]),
1509
+ _: 2
1510
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(u) === "checkbox" ? (s(), y(a(Ie), F({
1511
+ key: 4,
1512
+ modelValue: e.formData[u.prop],
1513
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1514
+ }, { ref_for: !0 }, m(u), {
1515
+ disabled: g(u)
1516
+ }), {
1517
+ default: b(() => [
1518
+ (s(!0), V($, null, O(n(u), (i) => (s(), y(a(Ne), {
1519
+ key: i.value,
1520
+ value: i.value,
1521
+ label: i.label
1522
+ }, null, 8, ["value", "label"]))), 128))
1523
+ ]),
1524
+ _: 2
1525
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(u) === "date" ? (s(), y(a(ie), F({
1526
+ key: 5,
1527
+ modelValue: e.formData[u.prop],
1528
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1529
+ }, { ref_for: !0 }, m(u), {
1530
+ placeholder: S(u),
1531
+ disabled: g(u),
1532
+ style: { width: "100%" }
1533
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "date-range" ? (s(), y(a(ie), F({
1534
+ key: 6,
1535
+ modelValue: e.formData[u.prop],
1536
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i,
1537
+ type: "daterange"
1538
+ }, { ref_for: !0 }, m(u), {
1539
+ placeholder: S(u),
1540
+ disabled: g(u),
1541
+ style: { width: "100%" }
1542
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "textarea" ? (s(), y(a(ne), F({
1543
+ key: 7,
1544
+ modelValue: e.formData[u.prop],
1545
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i,
1546
+ type: "textarea"
1547
+ }, { ref_for: !0 }, m(u), {
1548
+ placeholder: S(u),
1549
+ disabled: g(u)
1550
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(u) === "switch" ? (s(), y(a(ba), F({
1551
+ key: 8,
1552
+ modelValue: e.formData[u.prop],
1553
+ "onUpdate:modelValue": (i) => e.formData[u.prop] = i
1554
+ }, { ref_for: !0 }, m(u), {
1555
+ disabled: g(u)
1556
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : A("", !0)
1557
+ ]),
1558
+ _: 2
1559
+ }, 1032, ["prop", "label", "rules", "required"])
1560
+ ];
1561
+ }),
1562
+ _: 2
1563
+ }, 1032, ["span"]))), 128))
1564
+ ]),
1565
+ _: 1
1566
+ })
1567
+ ]),
1568
+ _: 1
1569
+ }, 8, ["model", "label-width", "size"]));
1127
1570
  }
1128
- }), _a = /* @__PURE__ */ K({
1571
+ }), Rl = /* @__PURE__ */ N({
1129
1572
  __name: "FormDrawer",
1130
1573
  props: {
1131
1574
  visible: { type: Boolean },
1132
1575
  drawerMode: {},
1133
- isEditing: { type: Boolean },
1576
+ formMode: {},
1134
1577
  editingRow: {},
1135
1578
  formData: {},
1136
1579
  drawerCfg: {},
1580
+ columns: {},
1137
1581
  size: {},
1138
- saving: { type: Boolean }
1582
+ saving: { type: Boolean },
1583
+ dictMap: {}
1139
1584
  },
1140
1585
  emits: ["update:visible", "save"],
1141
- setup(e) {
1142
- return (n, l) => e.drawerMode === "drawer" ? (i(), f(t(Sa), {
1586
+ setup(e, { emit: l }) {
1587
+ const { t } = j(), r = e, o = l, f = R();
1588
+ async function h() {
1589
+ if (f.value)
1590
+ try {
1591
+ await f.value.validate();
1592
+ } catch {
1593
+ return;
1594
+ }
1595
+ o("save");
1596
+ }
1597
+ const m = D(() => r.formMode === "view" ? r.drawerCfg.viewTitle || t("formTable", "viewTitle") : r.formMode === "edit" ? r.drawerCfg.editTitle || t("formTable", "editTitle") : r.drawerCfg.addTitle || t("formTable", "addTitle")), S = D(() => {
1598
+ var g;
1599
+ return (g = r.columns) != null && g.length ? r.columns.map((v) => {
1600
+ const n = r.formData[v.prop];
1601
+ return {
1602
+ key: v.prop,
1603
+ label: v.label,
1604
+ value: n != null && n !== "" ? String(n) : "-",
1605
+ isEmpty: n == null || n === ""
1606
+ };
1607
+ }) : Object.keys(r.formData).map((v) => {
1608
+ const n = r.formData[v];
1609
+ return {
1610
+ key: v,
1611
+ label: v,
1612
+ value: n != null && n !== "" ? String(n) : "-",
1613
+ isEmpty: n == null || n === ""
1614
+ };
1615
+ });
1616
+ });
1617
+ return (g, v) => e.drawerMode === "drawer" ? (s(), y(a(Ja), {
1143
1618
  key: 0,
1144
1619
  "model-value": e.visible,
1145
- "onUpdate:modelValue": l[2] || (l[2] = (a) => n.$emit("update:visible", a)),
1146
- title: e.isEditing ? e.drawerCfg.editTitle || "编辑" : e.drawerCfg.addTitle || "新增",
1620
+ "onUpdate:modelValue": v[2] || (v[2] = (n) => g.$emit("update:visible", n)),
1621
+ title: m.value,
1147
1622
  size: e.drawerCfg.width || "40%",
1148
1623
  "destroy-on-close": e.drawerCfg.closeOnReset !== !1
1149
1624
  }, {
1150
- footer: d(() => [
1151
- w(t(E), {
1152
- size: e.size,
1153
- round: "",
1154
- onClick: l[0] || (l[0] = (a) => n.$emit("update:visible", !1))
1155
- }, {
1156
- default: d(() => [...l[6] || (l[6] = [
1157
- S("取消", -1)
1158
- ])]),
1159
- _: 1
1160
- }, 8, ["size"]),
1161
- w(t(E), {
1162
- type: "primary",
1625
+ footer: b(() => [
1626
+ e.formMode !== "view" ? (s(), V($, { key: 0 }, [
1627
+ P(a(M), {
1628
+ size: e.size,
1629
+ round: "",
1630
+ onClick: v[0] || (v[0] = (n) => g.$emit("update:visible", !1))
1631
+ }, {
1632
+ default: b(() => [
1633
+ U(T(a(t)("formTable", "cancel")), 1)
1634
+ ]),
1635
+ _: 1
1636
+ }, 8, ["size"]),
1637
+ P(a(M), {
1638
+ type: "primary",
1639
+ size: e.size,
1640
+ round: "",
1641
+ loading: e.saving,
1642
+ onClick: h
1643
+ }, {
1644
+ default: b(() => [
1645
+ U(T(a(t)("formTable", "confirm")), 1)
1646
+ ]),
1647
+ _: 1
1648
+ }, 8, ["size", "loading"])
1649
+ ], 64)) : (s(), y(a(M), {
1650
+ key: 1,
1163
1651
  size: e.size,
1164
1652
  round: "",
1165
- loading: e.saving,
1166
- onClick: l[1] || (l[1] = (a) => n.$emit("save"))
1653
+ onClick: v[1] || (v[1] = (n) => g.$emit("update:visible", !1))
1167
1654
  }, {
1168
- default: d(() => [...l[7] || (l[7] = [
1169
- S(" 确定 ", -1)
1170
- ])]),
1655
+ default: b(() => [
1656
+ U(T(a(t)("formTable", "close")), 1)
1657
+ ]),
1171
1658
  _: 1
1172
- }, 8, ["size", "loading"])
1659
+ }, 8, ["size"]))
1173
1660
  ]),
1174
- default: d(() => [
1175
- I(n.$slots, e.isEditing ? "edit-form" : "add-form", {
1661
+ default: b(() => [
1662
+ e.formMode !== "view" ? H(g.$slots, e.formMode + "-form", {
1663
+ key: 0,
1176
1664
  row: e.editingRow,
1177
1665
  formData: e.formData
1178
- })
1666
+ }, () => [
1667
+ P(ma, {
1668
+ ref_key: "formAutoRef",
1669
+ ref: f,
1670
+ "form-data": e.formData,
1671
+ columns: e.columns || [],
1672
+ "form-mode": e.formMode,
1673
+ "form-cols": e.drawerCfg.formCols || 2,
1674
+ "form-label-width": e.drawerCfg.formLabelWidth || "80px",
1675
+ size: e.size,
1676
+ "dict-map": e.dictMap
1677
+ }, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
1678
+ ]) : H(g.$slots, "view-form", {
1679
+ key: 1,
1680
+ row: e.editingRow,
1681
+ formData: e.formData
1682
+ }, () => [
1683
+ P(a(ia), {
1684
+ column: 1,
1685
+ border: ""
1686
+ }, {
1687
+ default: b(() => [
1688
+ (s(!0), V($, null, O(S.value, (n) => (s(), y(a(ua), {
1689
+ key: n.key,
1690
+ label: n.label
1691
+ }, {
1692
+ default: b(() => [
1693
+ U(T(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
1694
+ ]),
1695
+ _: 2
1696
+ }, 1032, ["label"]))), 128))
1697
+ ]),
1698
+ _: 1
1699
+ })
1700
+ ])
1179
1701
  ]),
1180
1702
  _: 3
1181
- }, 8, ["model-value", "title", "size", "destroy-on-close"])) : (i(), f(t(ye), {
1703
+ }, 8, ["model-value", "title", "size", "destroy-on-close"])) : (s(), y(a(ea), {
1182
1704
  key: 1,
1183
1705
  "model-value": e.visible,
1184
- "onUpdate:modelValue": l[5] || (l[5] = (a) => n.$emit("update:visible", a)),
1185
- title: e.isEditing ? e.drawerCfg.editTitle || "编辑" : e.drawerCfg.addTitle || "新增",
1706
+ "onUpdate:modelValue": v[5] || (v[5] = (n) => g.$emit("update:visible", n)),
1707
+ title: m.value,
1186
1708
  width: e.drawerCfg.width || "600px",
1187
1709
  "destroy-on-close": e.drawerCfg.closeOnReset !== !1
1188
1710
  }, {
1189
- footer: d(() => [
1190
- w(t(E), {
1191
- size: e.size,
1192
- round: "",
1193
- onClick: l[3] || (l[3] = (a) => n.$emit("update:visible", !1))
1194
- }, {
1195
- default: d(() => [...l[8] || (l[8] = [
1196
- S("取消", -1)
1197
- ])]),
1198
- _: 1
1199
- }, 8, ["size"]),
1200
- w(t(E), {
1201
- type: "primary",
1711
+ footer: b(() => [
1712
+ e.formMode !== "view" ? (s(), V($, { key: 0 }, [
1713
+ P(a(M), {
1714
+ size: e.size,
1715
+ round: "",
1716
+ onClick: v[3] || (v[3] = (n) => g.$emit("update:visible", !1))
1717
+ }, {
1718
+ default: b(() => [
1719
+ U(T(a(t)("formTable", "cancel")), 1)
1720
+ ]),
1721
+ _: 1
1722
+ }, 8, ["size"]),
1723
+ P(a(M), {
1724
+ type: "primary",
1725
+ size: e.size,
1726
+ round: "",
1727
+ loading: e.saving,
1728
+ onClick: h
1729
+ }, {
1730
+ default: b(() => [
1731
+ U(T(a(t)("formTable", "confirm")), 1)
1732
+ ]),
1733
+ _: 1
1734
+ }, 8, ["size", "loading"])
1735
+ ], 64)) : (s(), y(a(M), {
1736
+ key: 1,
1202
1737
  size: e.size,
1203
1738
  round: "",
1204
- loading: e.saving,
1205
- onClick: l[4] || (l[4] = (a) => n.$emit("save"))
1739
+ onClick: v[4] || (v[4] = (n) => g.$emit("update:visible", !1))
1206
1740
  }, {
1207
- default: d(() => [...l[9] || (l[9] = [
1208
- S(" 确定 ", -1)
1209
- ])]),
1741
+ default: b(() => [
1742
+ U(T(a(t)("formTable", "close")), 1)
1743
+ ]),
1210
1744
  _: 1
1211
- }, 8, ["size", "loading"])
1745
+ }, 8, ["size"]))
1212
1746
  ]),
1213
- default: d(() => [
1214
- I(n.$slots, e.isEditing ? "edit-form" : "add-form", {
1747
+ default: b(() => [
1748
+ e.formMode !== "view" ? H(g.$slots, e.formMode + "-form", {
1749
+ key: 0,
1215
1750
  row: e.editingRow,
1216
1751
  formData: e.formData
1217
- })
1752
+ }, () => [
1753
+ P(ma, {
1754
+ ref_key: "formAutoRef",
1755
+ ref: f,
1756
+ "form-data": e.formData,
1757
+ columns: e.columns || [],
1758
+ "form-mode": e.formMode,
1759
+ "form-cols": e.drawerCfg.formCols || 2,
1760
+ "form-label-width": e.drawerCfg.formLabelWidth || "80px",
1761
+ size: e.size,
1762
+ "dict-map": e.dictMap
1763
+ }, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
1764
+ ]) : H(g.$slots, "view-form", {
1765
+ key: 1,
1766
+ row: e.editingRow,
1767
+ formData: e.formData
1768
+ }, () => [
1769
+ P(a(ia), {
1770
+ column: 1,
1771
+ border: ""
1772
+ }, {
1773
+ default: b(() => [
1774
+ (s(!0), V($, null, O(S.value, (n) => (s(), y(a(ua), {
1775
+ key: n.key,
1776
+ label: n.label
1777
+ }, {
1778
+ default: b(() => [
1779
+ U(T(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
1780
+ ]),
1781
+ _: 2
1782
+ }, 1032, ["label"]))), 128))
1783
+ ]),
1784
+ _: 1
1785
+ })
1786
+ ])
1218
1787
  ]),
1219
1788
  _: 3
1220
1789
  }, 8, ["model-value", "title", "width", "destroy-on-close"]));
1221
1790
  }
1222
- }), et = { key: 0 }, at = { key: 1 }, tt = { key: 2 }, lt = {
1791
+ }), Ul = { key: 0 }, Al = { key: 1 }, $l = { key: 2 }, Ml = {
1223
1792
  key: 0,
1224
1793
  class: "ee-pagination"
1225
- }, re = /* @__PURE__ */ K({
1794
+ }, Ve = /* @__PURE__ */ N({
1226
1795
  name: "EeFormTable",
1227
1796
  __name: "index",
1228
1797
  props: {
@@ -1242,7 +1811,7 @@ const qa = {
1242
1811
  dictMap: {},
1243
1812
  authChecker: {},
1244
1813
  authMode: { default: "hide" },
1245
- emptyText: { default: "暂无数据" },
1814
+ emptyText: { default: "" },
1246
1815
  tableHeight: {},
1247
1816
  tableMaxHeight: {},
1248
1817
  size: { default: "default" },
@@ -1252,444 +1821,1514 @@ const qa = {
1252
1821
  rowKey: { default: "id" }
1253
1822
  },
1254
1823
  emits: ["search", "search-reset", "page-change", "selection-change", "current-change", "size-change", "sort-change", "row-click", "row-dblclick", "view", "add", "edit", "delete", "batch-delete", "import", "export", "add-success", "edit-success", "delete-success", "batch-delete-success", "request-error", "column-visible-change", "form-save"],
1255
- setup(e, { expose: n, emit: l }) {
1256
- const a = e, r = l, m = Na(a), p = La(a), {
1257
- searchExpanded: V,
1258
- searchParams: k,
1259
- showSearch: g,
1260
- searchCols: o,
1261
- visibleSearchFields: u,
1824
+ setup(e, { expose: l, emit: t }) {
1825
+ const { t: r } = j(), o = e, f = t, h = gl(o), m = bl(o), {
1826
+ searchExpanded: S,
1827
+ searchParams: g,
1828
+ showSearch: v,
1829
+ searchCols: n,
1830
+ visibleSearchFields: d,
1262
1831
  showFoldBtn: c,
1263
- actionColSpan: b,
1264
- initSearchParams: O,
1265
- getActiveSearchParams: M,
1266
- resetSearchParams: H,
1267
- toggleFold: h
1268
- } = Ma(a), {
1269
- pageState: z,
1270
- showPagination: N,
1271
- pageSizesComputed: _,
1272
- paginationLayoutComputed: ce,
1273
- paginationBgComputed: Me,
1274
- setPage: He,
1832
+ actionColSpan: p,
1833
+ initSearchParams: u,
1834
+ getActiveSearchParams: x,
1835
+ resetSearchParams: i,
1836
+ toggleFold: C
1837
+ } = vl(o), {
1838
+ pageState: E,
1839
+ showPagination: Q,
1840
+ pageSizesComputed: te,
1841
+ paginationLayoutComputed: ve,
1842
+ paginationBgComputed: pe,
1843
+ setPage: je,
1275
1844
  setPageSize: Ge,
1276
- resetPage: me
1277
- } = Ha(a), {
1278
- tableRef: Ve,
1279
- selection: ee,
1280
- singleSelection: je,
1281
- columnSettingVisible: ke,
1282
- checkedColumns: fe,
1283
- showColumnSetting: Ke,
1284
- allColumns: We,
1285
- visibleColumns: Se,
1286
- tableComputedHeight: qe,
1287
- tableMaxHeightProp: Xe,
1288
- tableWrapperStyle: Ye,
1289
- selectionCfg: W,
1290
- handleSelectionChange: Ze,
1291
- handleSingleSelect: Je
1292
- } = Ga(a, { authPass: m.authPass }), Qe = ja(a, {
1293
- searchParams: k,
1294
- getActiveSearchParams: M,
1295
- pageState: z,
1296
- resetPage: me,
1297
- setTotal: (v) => {
1298
- z.total = v;
1845
+ resetPage: fe
1846
+ } = pl(o), {
1847
+ tableRef: k,
1848
+ selection: Z,
1849
+ singleSelection: Y,
1850
+ columnSettingVisible: me,
1851
+ checkedColumns: ye,
1852
+ showColumnSetting: we,
1853
+ allColumns: he,
1854
+ visibleColumns: Xe,
1855
+ tableComputedHeight: wa,
1856
+ tableMaxHeightProp: Sa,
1857
+ tableWrapperStyle: Ca,
1858
+ selectionCfg: oe,
1859
+ handleSelectionChange: za,
1860
+ handleSingleSelect: xa
1861
+ } = yl(o, { authPass: h.authPass }), Da = wl(o, {
1862
+ searchParams: g,
1863
+ getActiveSearchParams: x,
1864
+ pageState: E,
1865
+ resetPage: fe,
1866
+ setTotal: (z) => {
1867
+ E.total = z;
1299
1868
  },
1300
- selection: ee,
1301
- emit: (v, ...y) => r(v, ...y)
1869
+ selection: Z,
1870
+ emit: (z, ...B) => f(z, ...B),
1871
+ t: r
1302
1872
  }), {
1303
- internalData: ge,
1304
- loadingState: De,
1305
- hasCrud: q,
1306
- fetchData: G,
1307
- refreshTable: Ee,
1308
- handleDelete: _e,
1309
- handleBatchDelete: ea
1310
- } = Qe, x = Ka(a), { handleExport: aa } = Wa(a, {
1311
- visibleColumns: Se,
1312
- getActiveSearchParams: M,
1313
- dictLabel: p.dictLabel,
1314
- internalData: ge,
1315
- fetchData: G,
1316
- setLoading: (v) => {
1317
- De.value = v;
1873
+ internalData: Ye,
1874
+ loadingState: la,
1875
+ hasCrud: ue,
1876
+ fetchData: J,
1877
+ refreshTable: ta,
1878
+ handleDelete: ka,
1879
+ handleBatchDelete: Va
1880
+ } = Da, L = Sl(o), Qe = R(!1), { handleExport: Ta } = Cl(o, {
1881
+ visibleColumns: Xe,
1882
+ getActiveSearchParams: x,
1883
+ dictLabel: m.dictLabel,
1884
+ internalData: Ye,
1885
+ fetchData: J,
1886
+ setLoading: (z) => {
1887
+ la.value = z;
1318
1888
  },
1319
- getCurrentData: () => a.data || ge.value
1320
- }), j = C(() => ({
1321
- visible: !!x.formVisible.value,
1322
- drawerMode: x.drawerMode,
1323
- isEditing: x.isEditing.value ?? !1,
1324
- editingRow: x.editingRow.value ?? null,
1325
- formData: x.formData.value ?? {},
1326
- drawerCfg: x.drawerCfg,
1327
- saving: x.saving.value ?? !1,
1328
- onVisibleChange: (v) => {
1329
- x.formVisible.value = v;
1889
+ getCurrentData: () => o.data || Ye.value,
1890
+ t: r
1891
+ }), _ = D(() => ({
1892
+ visible: !!L.formVisible.value,
1893
+ drawerMode: L.drawerMode,
1894
+ formMode: L.formMode.value || "add",
1895
+ editingRow: L.editingRow.value ?? null,
1896
+ formData: L.formData.value ?? {},
1897
+ drawerCfg: L.drawerCfg,
1898
+ saving: L.saving.value ?? !1,
1899
+ onVisibleChange: (z) => {
1900
+ L.formVisible.value = z;
1330
1901
  }
1331
- })), ae = C({
1332
- get: () => ke.value,
1333
- set: (v) => {
1334
- ke.value = v;
1902
+ })), Se = D({
1903
+ get: () => me.value,
1904
+ set: (z) => {
1905
+ me.value = z;
1335
1906
  }
1336
- }), U = C(() => a.actionConfig === !1 ? Be : a.actionConfig === !0 ? { ...Fe } : a.actionConfig ? { ...Fe, ...a.actionConfig } : Be), $e = C(() => {
1337
- if (a.toolbarConfig === !1) return Ae;
1338
- const v = { ...Aa };
1339
- return a.toolbarConfig === !0 ? { ...v, show: !0 } : a.toolbarConfig ? { ...v, ...a.toolbarConfig } : Ae;
1340
- }), ta = C(() => q.value ? ge.value : a.data || []), la = C(() => De.value || a.loading);
1341
- function oa() {
1342
- me();
1343
- const v = M();
1344
- r("search", v), q.value && G();
1907
+ }), K = D(() => {
1908
+ if (o.actionConfig === !1) return ca;
1909
+ const z = {
1910
+ ...dl,
1911
+ label: r("formTable", "operation"),
1912
+ viewText: r("formTable", "view"),
1913
+ editText: r("formTable", "edit"),
1914
+ deleteText: r("formTable", "delete"),
1915
+ deleteConfirmTitle: r("formTable", "confirmDelete"),
1916
+ deleteConfirmMessage: r("formTable", "confirmDeleteMsg")
1917
+ };
1918
+ return o.actionConfig === !0 ? z : o.actionConfig ? { ...z, ...o.actionConfig } : ca;
1919
+ }), oa = D(() => {
1920
+ if (o.toolbarConfig === !1) return fa;
1921
+ const z = { ...cl };
1922
+ return o.toolbarConfig === !0 ? { ...z, show: !0 } : o.toolbarConfig ? { ...z, ...o.toolbarConfig } : fa;
1923
+ }), Ea = D(() => ue.value ? Ye.value : o.data || []), Pa = D(() => la.value || o.loading);
1924
+ function Ba() {
1925
+ fe();
1926
+ const z = x();
1927
+ f("search", z), ue.value && J();
1928
+ }
1929
+ function Fa() {
1930
+ i(), f("search-reset"), ue.value ? J() : f("search", {});
1345
1931
  }
1346
- function na() {
1347
- H(), r("search-reset"), q.value ? G() : r("search", {});
1932
+ function Ra(z) {
1933
+ je(z), f("current-change", z), f("page-change", { currentPage: z, pageSize: E.pageSize }), ue.value && J();
1348
1934
  }
1349
- function ia(v) {
1350
- He(v), r("current-change", v), r("page-change", { currentPage: v, pageSize: z.pageSize }), q.value && G();
1935
+ function Ua(z) {
1936
+ Ge(z), fe(), f("size-change", z), f("page-change", { currentPage: 1, pageSize: z }), ue.value && J();
1351
1937
  }
1352
- function ra(v) {
1353
- Ge(v), me(), r("size-change", v), r("page-change", { currentPage: 1, pageSize: v }), q.value && G();
1938
+ function Aa() {
1939
+ var B;
1940
+ L.openAdd();
1941
+ const z = {};
1942
+ for (const w of o.columns)
1943
+ ((B = w.form) == null ? void 0 : B.defaultValue) !== void 0 && (z[w.prop] = w.form.defaultValue);
1944
+ L.formData.value = { ...z }, f("add");
1354
1945
  }
1355
- function ua() {
1356
- x.openAdd(), r("add");
1946
+ function $a(z) {
1947
+ L.openEdit(z), f("edit", z);
1357
1948
  }
1358
- function sa(v) {
1359
- x.openEdit(v), r("edit", v);
1949
+ function Ma(z) {
1950
+ L.openView(z), f("view", z);
1360
1951
  }
1361
- function da(v) {
1362
- _e(
1363
- v,
1364
- U.value.confirmDelete !== !1,
1365
- U.value.deleteConfirmTitle,
1366
- U.value.deleteConfirmMessage
1952
+ function Oa(z) {
1953
+ ka(
1954
+ z,
1955
+ K.value.confirmDelete !== !1,
1956
+ K.value.deleteConfirmTitle,
1957
+ K.value.deleteConfirmMessage
1367
1958
  );
1368
1959
  }
1369
- function ca() {
1370
- ea();
1960
+ function La() {
1961
+ Va();
1371
1962
  }
1372
- function ma() {
1373
- r("export"), aa();
1963
+ function Ia() {
1964
+ f("export"), Ta();
1374
1965
  }
1375
- async function fa() {
1376
- var v, y;
1377
- x.saving.value = !0;
1966
+ async function Na() {
1967
+ Qe.value = !0;
1378
1968
  try {
1379
- r("form-save", { ...x.formData.value }, x.isEditing.value ?? !1), x.isEditing.value && ((v = a.crudConfig) != null && v.api.edit) ? (await a.crudConfig.api.edit(x.formData.value), L.success("编辑成功"), r("edit-success")) : !x.isEditing.value && ((y = a.crudConfig) != null && y.api.add) && (await a.crudConfig.api.add(x.formData.value), L.success("新增成功"), r("add-success")), x.closeForm(), await G();
1380
- } catch (s) {
1381
- r("request-error", s);
1969
+ await ta(), G.success(r("formTable", "refreshSuccess"));
1382
1970
  } finally {
1383
- x.saving.value = !1;
1971
+ Qe.value = !1;
1384
1972
  }
1385
1973
  }
1386
- const ga = C(() => {
1387
- const v = {};
1388
- for (const y of Object.keys(a))
1389
- !Oa.includes(y) && !y.startsWith("on") && (v[y] = a[y]);
1390
- return v;
1974
+ async function Ka() {
1975
+ var z, B;
1976
+ L.saving.value = !0;
1977
+ try {
1978
+ f("form-save", { ...L.formData.value }, L.formMode.value === "edit"), L.formMode.value === "edit" && ((z = o.crudConfig) != null && z.api.edit) ? (await o.crudConfig.api.edit(L.formData.value), G.success(r("formTable", "editSuccess")), f("edit-success")) : L.formMode.value === "add" && ((B = o.crudConfig) != null && B.api.add) && (await o.crudConfig.api.add(L.formData.value), G.success(r("formTable", "addSuccess")), f("add-success")), L.closeForm(), await J();
1979
+ } catch (w) {
1980
+ f("request-error", w);
1981
+ } finally {
1982
+ L.saving.value = !1;
1983
+ }
1984
+ }
1985
+ const qa = D(() => {
1986
+ const z = {};
1987
+ for (const B of Object.keys(o))
1988
+ !ml.includes(B) && !B.startsWith("on") && (z[B] = o[B]);
1989
+ return z;
1391
1990
  });
1392
- function ha(v) {
1393
- const y = {};
1394
- for (const [s, $] of Object.entries(v))
1395
- Ia.includes(s) || (y[s] = $);
1396
- return y;
1991
+ function Ha(z) {
1992
+ const B = {};
1993
+ for (const [w, I] of Object.entries(z))
1994
+ hl.includes(w) || (B[w] = I);
1995
+ return B;
1397
1996
  }
1398
- return Q(() => {
1399
- O(), q.value && G();
1400
- }), n({
1401
- refresh: Ee,
1997
+ return W(() => {
1998
+ u(), ue.value && J();
1999
+ }), l({
2000
+ refresh: ta,
1402
2001
  /* 刷新表格 */
1403
- fetchData: G,
2002
+ fetchData: J,
1404
2003
  /* 手动请求数据 */
1405
- getSelection: () => ee.value,
2004
+ getSelection: () => Z.value,
1406
2005
  /* 获取选中行 */
1407
- tableRef: Ve
2006
+ tableRef: k
1408
2007
  /* el-table 引用 */
1409
- }), (v, y) => (i(), D("div", {
1410
- class: va(["ee-form-table", [`ee-size--${e.size}`, { "ee-stripe": e.stripe, "ee-border": e.border }]])
2008
+ }), (z, B) => (s(), V("div", {
2009
+ class: Wa(["ee-form-table", [`ee-size--${e.size}`, { "ee-stripe": e.stripe, "ee-border": e.border }]])
1411
2010
  }, [
1412
- w(Xa, {
1413
- "show-search": !!t(g),
1414
- "search-params": t(k),
1415
- "visible-search-fields": t(u),
1416
- "search-cols": t(o),
1417
- "action-col-span": t(b),
1418
- "show-fold-btn": !!t(c),
1419
- "search-expanded": !!t(V),
2011
+ P(xl, {
2012
+ "show-search": !!a(v),
2013
+ "search-params": a(g),
2014
+ "visible-search-fields": a(d),
2015
+ "search-cols": a(n),
2016
+ "action-col-span": a(p),
2017
+ "show-fold-btn": !!a(c),
2018
+ "search-expanded": !!a(S),
1420
2019
  size: e.size,
1421
- "resolve-dict": t(p).resolvedDict,
1422
- onSearch: oa,
1423
- onReset: na,
1424
- onToggleFold: t(h)
2020
+ "resolve-dict": a(m).resolvedDict,
2021
+ onSearch: Ba,
2022
+ onReset: Fa,
2023
+ onToggleFold: a(C)
1425
2024
  }, {
1426
- "search-action": d(({ params: s }) => [
1427
- I(v.$slots, "search-action", { params: s })
2025
+ "search-action": b(({ params: w }) => [
2026
+ H(z.$slots, "search-action", { params: w })
1428
2027
  ]),
1429
2028
  _: 3
1430
2029
  }, 8, ["show-search", "search-params", "visible-search-fields", "search-cols", "action-col-span", "show-fold-btn", "search-expanded", "size", "resolve-dict", "onToggleFold"]),
1431
- w(Qa, {
1432
- show: !!$e.value.show,
1433
- "toolbar-cfg": $e.value,
2030
+ P(Fl, {
2031
+ show: !!oa.value.show,
2032
+ "toolbar-cfg": oa.value,
1434
2033
  size: e.size,
2034
+ refreshing: Qe.value,
1435
2035
  deps: {
1436
- authPass: t(m).authPass,
1437
- selectionCount: t(ee).length,
1438
- showColumnSetting: !!t(Ke)
2036
+ authPass: a(h).authPass,
2037
+ selectionCount: a(Z).length,
2038
+ showColumnSetting: !!a(we)
1439
2039
  },
1440
- onAdd: ua,
1441
- onImport: y[0] || (y[0] = (s) => v.$emit("import")),
1442
- onExport: ma,
1443
- onBatchDelete: ca,
1444
- onRefresh: y[1] || (y[1] = (s) => t(Ee)()),
1445
- onColumnSetting: y[2] || (y[2] = (s) => ae.value = !0)
2040
+ onAdd: Aa,
2041
+ onImport: B[0] || (B[0] = (w) => z.$emit("import")),
2042
+ onExport: Ia,
2043
+ onBatchDelete: La,
2044
+ onRefresh: Na,
2045
+ onColumnSetting: B[1] || (B[1] = (w) => Se.value = !0)
1446
2046
  }, {
1447
- "toolbar-right": d(() => [
1448
- I(v.$slots, "toolbar-right")
2047
+ "toolbar-right": b(() => [
2048
+ H(z.$slots, "toolbar-right")
1449
2049
  ]),
1450
2050
  _: 3
1451
- }, 8, ["show", "toolbar-cfg", "size", "deps"]),
1452
- ue("div", {
2051
+ }, 8, ["show", "toolbar-cfg", "size", "refreshing", "deps"]),
2052
+ q("div", {
1453
2053
  class: "ee-table-wrapper",
1454
- style: ba(t(Ye))
2054
+ style: ja(a(Ca))
1455
2055
  }, [
1456
- w(t(Da), R({
2056
+ P(a(_a), F({
1457
2057
  ref_key: "tableRef",
1458
- ref: Ve,
1459
- data: ta.value,
1460
- loading: la.value,
2058
+ ref: k,
2059
+ data: Ea.value,
2060
+ loading: Pa.value,
1461
2061
  size: e.size,
1462
2062
  stripe: e.stripe,
1463
2063
  border: e.border,
1464
- height: t(qe),
1465
- "max-height": t(Xe),
2064
+ height: a(wa),
2065
+ "max-height": a(Sa),
1466
2066
  "highlight-current-row": e.highlightCurrentRow,
1467
2067
  "row-key": e.rowKey,
1468
- onSelectionChange: y[3] || (y[3] = (s) => {
1469
- t(Ze)(s), v.$emit("selection-change", s);
2068
+ onSelectionChange: B[2] || (B[2] = (w) => {
2069
+ a(za)(w), z.$emit("selection-change", w);
1470
2070
  }),
1471
- onRowClick: y[4] || (y[4] = (s) => v.$emit("row-click", s)),
1472
- onRowDblclick: y[5] || (y[5] = (s) => v.$emit("row-dblclick", s)),
1473
- onSortChange: y[6] || (y[6] = (s) => v.$emit("sort-change", s))
1474
- }, ga.value), {
1475
- empty: d(() => [
1476
- I(v.$slots, "empty", {}, () => [
1477
- w(t(Ea), {
1478
- description: e.emptyText || "暂无数据"
2071
+ onRowClick: B[3] || (B[3] = (w) => z.$emit("row-click", w)),
2072
+ onRowDblclick: B[4] || (B[4] = (w) => z.$emit("row-dblclick", w)),
2073
+ onSortChange: B[5] || (B[5] = (w) => z.$emit("sort-change", w))
2074
+ }, qa.value), {
2075
+ empty: b(() => [
2076
+ H(z.$slots, "empty", {}, () => [
2077
+ P(a(el), {
2078
+ description: e.emptyText || a(r)("formTable", "empty")
1479
2079
  }, null, 8, ["description"])
1480
2080
  ])
1481
2081
  ]),
1482
- default: d(() => [
1483
- t(W).show && t(W).type === "multiple" ? (i(), f(t(te), {
2082
+ default: b(() => [
2083
+ a(oe).show && a(oe).type === "multiple" ? (s(), y(a(Ce), {
1484
2084
  key: 0,
1485
2085
  type: "selection",
1486
2086
  width: "50",
1487
2087
  fixed: "left",
1488
- selectable: t(W).disabledRow ? (s) => !t(W).disabledRow(s) : void 0,
1489
- "reserve-selection": t(W).reserveSelection
1490
- }, null, 8, ["selectable", "reserve-selection"])) : P("", !0),
1491
- t(W).show && t(W).type === "single" ? (i(), f(t(te), {
2088
+ selectable: a(oe).disabledRow ? (w) => !a(oe).disabledRow(w) : void 0,
2089
+ "reserve-selection": a(oe).reserveSelection
2090
+ }, null, 8, ["selectable", "reserve-selection"])) : A("", !0),
2091
+ a(oe).show && a(oe).type === "single" ? (s(), y(a(Ce), {
1492
2092
  key: 1,
1493
2093
  width: "50",
1494
2094
  fixed: "left"
1495
2095
  }, {
1496
- default: d(({ row: s }) => [
1497
- w(t(we), {
1498
- "model-value": t(je) === s[e.rowKey || "id"],
1499
- value: s[e.rowKey || "id"],
2096
+ default: b(({ row: w }) => [
2097
+ P(a(Le), {
2098
+ "model-value": a(Y) === w[e.rowKey || "id"],
2099
+ value: w[e.rowKey || "id"],
1500
2100
  onChange: () => {
1501
- t(Je)(s), v.$emit("selection-change", t(ee));
2101
+ a(xa)(w), z.$emit("selection-change", a(Z));
1502
2102
  }
1503
2103
  }, null, 8, ["model-value", "value", "onChange"])
1504
2104
  ]),
1505
2105
  _: 1
1506
- })) : P("", !0),
1507
- (i(!0), D(B, null, A(t(Se), (s) => (i(), f(t(te), R({
1508
- key: s.prop,
1509
- prop: s.prop,
1510
- label: s.label,
1511
- width: s.width,
1512
- "min-width": s.minWidth,
1513
- fixed: s.fixed,
1514
- sortable: s.sortable,
1515
- align: s.align || "center",
1516
- "class-name": s.className
1517
- }, { ref_for: !0 }, ha(s)), {
1518
- default: d(($) => [
1519
- I(v.$slots, s.slotName || s.prop, {
1520
- row: $.row,
1521
- index: $.$index,
1522
- column: s
2106
+ })) : A("", !0),
2107
+ (s(!0), V($, null, O(a(Xe), (w) => (s(), y(a(Ce), F({
2108
+ key: w.prop,
2109
+ prop: w.prop,
2110
+ label: w.label,
2111
+ width: w.width,
2112
+ "min-width": w.minWidth,
2113
+ fixed: w.fixed,
2114
+ sortable: w.sortable,
2115
+ align: w.align || "center",
2116
+ "class-name": w.className
2117
+ }, { ref_for: !0 }, Ha(w)), {
2118
+ default: b((I) => [
2119
+ H(z.$slots, w.slotName || w.prop, {
2120
+ row: I.row,
2121
+ index: I.$index,
2122
+ column: w
1523
2123
  }, () => [
1524
- s.formatter ? (i(), D("span", et, F(s.formatter($.row, s, $.row[s.prop], $.$index)), 1)) : s.dictKey ? (i(), D("span", at, F(t(p).dictLabel(s.dictKey, $.row[s.prop])), 1)) : (i(), D("span", tt, F($.row[s.prop] ?? "-"), 1))
2124
+ w.formatter ? (s(), V("span", Ul, T(w.formatter(I.row, w, I.row[w.prop], I.$index)), 1)) : w.dictKey ? (s(), V("span", Al, T(a(m).dictLabel(w.dictKey, I.row[w.prop])), 1)) : (s(), V("span", $l, T(I.row[w.prop] ?? "-"), 1))
1525
2125
  ])
1526
2126
  ]),
1527
2127
  _: 2
1528
2128
  }, 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align", "class-name"]))), 128)),
1529
- U.value.show ? (i(), f(t(te), {
2129
+ K.value.show ? (s(), y(a(Ce), {
1530
2130
  key: 2,
1531
- label: U.value.label || "操作",
1532
- width: U.value.width,
1533
- fixed: U.value.fixed ?? "right",
1534
- align: U.value.align || "center"
2131
+ label: K.value.label || a(r)("formTable", "operation"),
2132
+ width: K.value.width,
2133
+ fixed: K.value.fixed ?? "right",
2134
+ align: K.value.align || "center"
1535
2135
  }, {
1536
- default: d(({ row: s }) => [
1537
- I(v.$slots, "action-before", { row: s }),
1538
- U.value.showView && t(m).authPass(U.value.viewAuth) ? (i(), f(t(E), {
2136
+ default: b(({ row: w }) => [
2137
+ H(z.$slots, "action-before", { row: w }),
2138
+ K.value.showView && a(h).authPass(K.value.viewAuth) ? (s(), y(a(M), {
1539
2139
  key: 0,
1540
2140
  type: "primary",
1541
2141
  link: "",
1542
2142
  size: e.size,
1543
- onClick: ($) => v.$emit("view", s)
2143
+ onClick: (I) => Ma(w)
1544
2144
  }, {
1545
- default: d(() => [
1546
- S(F(U.value.viewText || "查看"), 1)
2145
+ default: b(() => [
2146
+ U(T(K.value.viewText || a(r)("formTable", "view")), 1)
1547
2147
  ]),
1548
2148
  _: 1
1549
- }, 8, ["size", "onClick"])) : P("", !0),
1550
- U.value.showEdit && t(m).authPass(U.value.editAuth) ? (i(), f(t(E), {
2149
+ }, 8, ["size", "onClick"])) : A("", !0),
2150
+ K.value.showEdit && a(h).authPass(K.value.editAuth) ? (s(), y(a(M), {
1551
2151
  key: 1,
1552
2152
  type: "primary",
1553
2153
  link: "",
1554
2154
  size: e.size,
1555
- onClick: ($) => sa(s)
2155
+ onClick: (I) => $a(w)
1556
2156
  }, {
1557
- default: d(() => [
1558
- S(F(U.value.editText || "编辑"), 1)
2157
+ default: b(() => [
2158
+ U(T(K.value.editText || a(r)("formTable", "edit")), 1)
1559
2159
  ]),
1560
2160
  _: 1
1561
- }, 8, ["size", "onClick"])) : P("", !0),
1562
- U.value.showDelete && t(m).authPass(U.value.deleteAuth) ? (i(), f(t(E), {
2161
+ }, 8, ["size", "onClick"])) : A("", !0),
2162
+ K.value.showDelete && a(h).authPass(K.value.deleteAuth) ? (s(), y(a(M), {
1563
2163
  key: 2,
1564
2164
  type: "danger",
1565
2165
  link: "",
1566
2166
  size: e.size,
1567
- onClick: ($) => da(s)
2167
+ onClick: (I) => Oa(w)
1568
2168
  }, {
1569
- default: d(() => [
1570
- S(F(U.value.deleteText || "删除"), 1)
2169
+ default: b(() => [
2170
+ U(T(K.value.deleteText || a(r)("formTable", "delete")), 1)
1571
2171
  ]),
1572
2172
  _: 1
1573
- }, 8, ["size", "onClick"])) : P("", !0),
1574
- (i(!0), D(B, null, A(U.value.customButtons || [], ($) => (i(), D(B, {
1575
- key: $.code
2173
+ }, 8, ["size", "onClick"])) : A("", !0),
2174
+ (s(!0), V($, null, O(K.value.customButtons || [], (I) => (s(), V($, {
2175
+ key: I.code
1576
2176
  }, [
1577
- (!$.show || $.show(s)) && t(m).authPass($.auth) ? (i(), f(t(E), {
2177
+ (!I.show || I.show(w)) && a(h).authPass(I.auth) ? (s(), y(a(M), {
1578
2178
  key: 0,
1579
- type: $.type || "default",
2179
+ type: I.type || "default",
1580
2180
  link: "",
1581
2181
  size: e.size,
1582
- onClick: (it) => $.handler(s)
2182
+ onClick: (at) => I.handler(w)
1583
2183
  }, {
1584
- default: d(() => [
1585
- S(F($.text), 1)
2184
+ default: b(() => [
2185
+ U(T(I.text), 1)
1586
2186
  ]),
1587
2187
  _: 2
1588
- }, 1032, ["type", "size", "onClick"])) : P("", !0)
2188
+ }, 1032, ["type", "size", "onClick"])) : A("", !0)
1589
2189
  ], 64))), 128)),
1590
- I(v.$slots, "action", { row: s })
2190
+ H(z.$slots, "action", { row: w })
1591
2191
  ]),
1592
2192
  _: 3
1593
- }, 8, ["label", "width", "fixed", "align"])) : P("", !0)
2193
+ }, 8, ["label", "width", "fixed", "align"])) : A("", !0)
1594
2194
  ]),
1595
2195
  _: 3
1596
2196
  }, 16, ["data", "loading", "size", "stripe", "border", "height", "max-height", "highlight-current-row", "row-key"])
1597
2197
  ], 4),
1598
- t(N) ? (i(), D("div", lt, [
1599
- w(t($a), {
1600
- "current-page": t(z).current,
1601
- "onUpdate:currentPage": y[7] || (y[7] = (s) => t(z).current = s),
1602
- "page-size": t(z).pageSize,
1603
- "onUpdate:pageSize": y[8] || (y[8] = (s) => t(z).pageSize = s),
1604
- "page-sizes": t(_),
1605
- total: t(z).total,
1606
- layout: t(ce),
1607
- background: t(Me),
2198
+ a(Q) ? (s(), V("div", Ml, [
2199
+ P(a(al), {
2200
+ "current-page": a(E).current,
2201
+ "onUpdate:currentPage": B[6] || (B[6] = (w) => a(E).current = w),
2202
+ "page-size": a(E).pageSize,
2203
+ "onUpdate:pageSize": B[7] || (B[7] = (w) => a(E).pageSize = w),
2204
+ "page-sizes": a(te),
2205
+ total: a(E).total,
2206
+ layout: a(ve),
2207
+ background: a(pe),
1608
2208
  size: e.size,
1609
- onCurrentChange: ia,
1610
- onSizeChange: ra
2209
+ onCurrentChange: Ra,
2210
+ onSizeChange: Ua
1611
2211
  }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout", "background", "size"])
1612
- ])) : P("", !0),
1613
- w(_a, {
1614
- visible: j.value.visible,
1615
- "drawer-mode": j.value.drawerMode,
1616
- "is-editing": j.value.isEditing,
1617
- "editing-row": j.value.editingRow,
1618
- "form-data": j.value.formData,
1619
- "drawer-cfg": j.value.drawerCfg,
2212
+ ])) : A("", !0),
2213
+ P(Rl, {
2214
+ visible: _.value.visible,
2215
+ "drawer-mode": _.value.drawerMode,
2216
+ "form-mode": _.value.formMode,
2217
+ "editing-row": _.value.editingRow,
2218
+ "form-data": _.value.formData,
2219
+ "drawer-cfg": _.value.drawerCfg,
2220
+ columns: a(Xe),
1620
2221
  size: e.size,
1621
- saving: j.value.saving,
1622
- "onUpdate:visible": j.value.onVisibleChange,
1623
- onSave: fa
1624
- }, pa({ _: 2 }, [
1625
- A(["add-form", "edit-form"], (s) => ({
1626
- name: s,
1627
- fn: d(($) => [
1628
- I(v.$slots, s, ya(wa($)))
1629
- ])
1630
- }))
1631
- ]), 1032, ["visible", "drawer-mode", "is-editing", "editing-row", "form-data", "drawer-cfg", "size", "saving", "onUpdate:visible"]),
1632
- w(t(ye), {
1633
- modelValue: ae.value,
1634
- "onUpdate:modelValue": y[11] || (y[11] = (s) => ae.value = s),
1635
- title: "列设置",
2222
+ saving: _.value.saving,
2223
+ "dict-map": e.dictMap,
2224
+ "onUpdate:visible": _.value.onVisibleChange,
2225
+ onSave: Ka
2226
+ }, Ga({ _: 2 }, [
2227
+ z.$slots["add-form"] ? {
2228
+ name: "add-form",
2229
+ fn: b((w) => [
2230
+ H(z.$slots, "add-form", Ze(Je(w)))
2231
+ ]),
2232
+ key: "0"
2233
+ } : void 0,
2234
+ z.$slots["edit-form"] ? {
2235
+ name: "edit-form",
2236
+ fn: b((w) => [
2237
+ H(z.$slots, "edit-form", Ze(Je(w)))
2238
+ ]),
2239
+ key: "1"
2240
+ } : void 0,
2241
+ z.$slots["view-form"] ? {
2242
+ name: "view-form",
2243
+ fn: b((w) => [
2244
+ H(z.$slots, "view-form", Ze(Je(w)))
2245
+ ]),
2246
+ key: "2"
2247
+ } : void 0
2248
+ ]), 1032, ["visible", "drawer-mode", "form-mode", "editing-row", "form-data", "drawer-cfg", "columns", "size", "saving", "dict-map", "onUpdate:visible"]),
2249
+ P(a(ea), {
2250
+ modelValue: Se.value,
2251
+ "onUpdate:modelValue": B[10] || (B[10] = (w) => Se.value = w),
2252
+ title: a(r)("formTable", "columnSetting"),
1636
2253
  width: "400px",
1637
2254
  "close-on-click-modal": !1
1638
2255
  }, {
1639
- footer: d(() => [
1640
- w(t(E), {
2256
+ footer: b(() => [
2257
+ P(a(M), {
1641
2258
  size: e.size,
1642
2259
  round: "",
1643
- onClick: y[10] || (y[10] = (s) => ae.value = !1)
2260
+ onClick: B[9] || (B[9] = (w) => Se.value = !1)
1644
2261
  }, {
1645
- default: d(() => [...y[12] || (y[12] = [
1646
- S("关闭", -1)
1647
- ])]),
2262
+ default: b(() => [
2263
+ U(T(a(r)("formTable", "close")), 1)
2264
+ ]),
1648
2265
  _: 1
1649
2266
  }, 8, ["size"])
1650
2267
  ]),
1651
- default: d(() => [
1652
- w(t(Ce), {
1653
- modelValue: t(fe),
1654
- "onUpdate:modelValue": y[9] || (y[9] = (s) => Ca(fe) ? fe.value = s : null)
2268
+ default: b(() => [
2269
+ P(a(Ie), {
2270
+ modelValue: a(ye),
2271
+ "onUpdate:modelValue": B[8] || (B[8] = (w) => Xa(ye) ? ye.value = w : null)
1655
2272
  }, {
1656
- default: d(() => [
1657
- (i(!0), D(B, null, A(t(We), (s) => (i(), f(t(ze), {
1658
- key: s.prop,
1659
- value: s.prop,
1660
- label: s.label
2273
+ default: b(() => [
2274
+ (s(!0), V($, null, O(a(he), (w) => (s(), y(a(Ne), {
2275
+ key: w.prop,
2276
+ value: w.prop,
2277
+ label: w.label
1661
2278
  }, null, 8, ["value", "label"]))), 128))
1662
2279
  ]),
1663
2280
  _: 1
1664
2281
  }, 8, ["modelValue"])
1665
2282
  ]),
1666
2283
  _: 1
1667
- }, 8, ["modelValue"])
2284
+ }, 8, ["modelValue", "title"])
1668
2285
  ], 2));
1669
2286
  }
1670
2287
  });
1671
- re.install = (e) => {
1672
- e.component(re.name ?? "EeFormTable", re);
2288
+ Ve.install = (e) => {
2289
+ e.component(Ve.name ?? "EeFormTable", Ve);
2290
+ };
2291
+ const Ol = {
2292
+ key: 1,
2293
+ class: "ee-no-more"
2294
+ }, Ll = { class: "ee-loading-tip" }, Il = /* @__PURE__ */ N({
2295
+ name: "EeRemoteSelect",
2296
+ __name: "index",
2297
+ props: {
2298
+ modelValue: {},
2299
+ apiUrl: {},
2300
+ detailEchoUrl: {},
2301
+ mode: { default: "single" },
2302
+ labelField: { default: "label" },
2303
+ valueField: { default: "value" },
2304
+ searchKey: { default: "keyword" },
2305
+ pageNumKey: { default: "pageNum" },
2306
+ pageSizeKey: { default: "pageSize" },
2307
+ pageSize: { default: 20 },
2308
+ extraParams: {},
2309
+ requestInstance: {},
2310
+ placeholder: {},
2311
+ clearable: { type: Boolean, default: !0 },
2312
+ disabled: { type: Boolean },
2313
+ readonly: { type: Boolean },
2314
+ filterable: { type: Boolean, default: !0 },
2315
+ size: { default: "default" },
2316
+ options: {}
2317
+ },
2318
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
2319
+ setup(e, { emit: l }) {
2320
+ const t = e, r = l, { t: o } = j(), {
2321
+ loading: f,
2322
+ options: h,
2323
+ noMore: m,
2324
+ loadData: S,
2325
+ loadMore: g,
2326
+ resetList: v,
2327
+ onKeywordChange: n
2328
+ } = Ke({
2329
+ apiUrl: t.apiUrl,
2330
+ pageNumKey: t.pageNumKey,
2331
+ pageSizeKey: t.pageSizeKey,
2332
+ pageSize: t.pageSize,
2333
+ searchKey: t.searchKey,
2334
+ extraParams: t.extraParams,
2335
+ labelField: t.labelField,
2336
+ valueField: t.valueField
2337
+ });
2338
+ function d(x) {
2339
+ return {
2340
+ value: x[t.valueField],
2341
+ label: x[t.labelField],
2342
+ disabled: x.disabled ?? !1
2343
+ };
2344
+ }
2345
+ const c = D(() => t.options ? t.options.map(d) : h.value.map(d));
2346
+ async function p(x = !1) {
2347
+ t.options || await S(void 0, !0);
2348
+ }
2349
+ function u(x) {
2350
+ x && c.value.length === 0 && !t.options && p();
2351
+ }
2352
+ return W(() => {
2353
+ p();
2354
+ }), ee(() => t.apiUrl, () => {
2355
+ v(), p();
2356
+ }), (x, i) => (s(), y(a(ae), F(x.$attrs, {
2357
+ "model-value": e.modelValue,
2358
+ loading: a(f),
2359
+ multiple: e.mode === "multiple",
2360
+ placeholder: e.placeholder,
2361
+ clearable: e.clearable,
2362
+ disabled: e.disabled,
2363
+ readonly: e.readonly,
2364
+ filterable: e.filterable,
2365
+ size: e.size,
2366
+ remote: !t.options,
2367
+ "remote-method": t.options ? void 0 : a(n),
2368
+ "onUpdate:modelValue": i[1] || (i[1] = (C) => r("update:modelValue", C)),
2369
+ onChange: i[2] || (i[2] = (C) => r("change", C)),
2370
+ onClear: i[3] || (i[3] = (C) => r("clear")),
2371
+ onBlur: i[4] || (i[4] = (C) => r("blur", C)),
2372
+ onFocus: i[5] || (i[5] = (C) => r("focus", C)),
2373
+ onVisibleChange: u
2374
+ }), {
2375
+ loading: b(() => [
2376
+ q("div", Ll, [
2377
+ q("span", null, T(a(o)("remoteSelect", "loading")), 1)
2378
+ ])
2379
+ ]),
2380
+ default: b(() => [
2381
+ (s(!0), V($, null, O(c.value, (C) => (s(), y(a(le), {
2382
+ key: C.value,
2383
+ label: C.label,
2384
+ value: C.value,
2385
+ disabled: C.disabled
2386
+ }, null, 8, ["label", "value", "disabled"]))), 128)),
2387
+ !t.options && !a(m) && !a(f) && c.value.length > 0 ? (s(), V("div", {
2388
+ key: 0,
2389
+ class: "ee-load-more",
2390
+ onClick: i[0] || (i[0] = //@ts-ignore
2391
+ (...C) => a(g) && a(g)(...C))
2392
+ }, [
2393
+ q("span", null, T(a(o)("remoteSelect", "loadMore")), 1)
2394
+ ])) : A("", !0),
2395
+ !t.options && a(m) && c.value.length > 0 ? (s(), V("div", Ol, [
2396
+ q("span", null, T(a(o)("remoteSelect", "noMore")), 1)
2397
+ ])) : A("", !0)
2398
+ ]),
2399
+ _: 1
2400
+ }, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote", "remote-method"]));
2401
+ }
2402
+ }), Te = /* @__PURE__ */ be(Il, [["__scopeId", "data-v-21c5d143"]]);
2403
+ Te.install = (e) => {
2404
+ e.component(Te.name ?? "EeRemoteSelect", Te);
2405
+ };
2406
+ const Ee = /* @__PURE__ */ N({
2407
+ name: "EeDeptCascader",
2408
+ __name: "index",
2409
+ props: {
2410
+ modelValue: {},
2411
+ deptApiUrl: { default: "/api/system/dept/tree" },
2412
+ detailEchoUrl: { default: "/api/system/dept/detail" },
2413
+ labelField: { default: "label" },
2414
+ valueField: { default: "value" },
2415
+ childrenField: { default: "children" },
2416
+ showAllLevels: { type: Boolean, default: !0 },
2417
+ extraParams: {},
2418
+ requestInstance: {},
2419
+ placeholder: {},
2420
+ clearable: { type: Boolean, default: !0 },
2421
+ disabled: { type: Boolean },
2422
+ size: { default: "default" }
2423
+ },
2424
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "load-success"],
2425
+ setup(e, { emit: l }) {
2426
+ const t = e, r = l;
2427
+ function o(i) {
2428
+ r("update:modelValue", i);
2429
+ }
2430
+ function f(i) {
2431
+ r("change", i);
2432
+ }
2433
+ function h() {
2434
+ r("clear");
2435
+ }
2436
+ function m(i) {
2437
+ r("blur", i);
2438
+ }
2439
+ function S(i) {
2440
+ r("focus", i);
2441
+ }
2442
+ const g = t.requestInstance ?? $e(We);
2443
+ if (!g)
2444
+ throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
2445
+ const v = g, { t: n } = j(), d = R([]), c = R(!1), p = D(() => ({
2446
+ label: t.labelField,
2447
+ value: t.valueField,
2448
+ children: t.childrenField,
2449
+ multiple: !1,
2450
+ checkStrictly: !0
2451
+ }));
2452
+ async function u() {
2453
+ c.value = !0;
2454
+ try {
2455
+ const i = { ...t.extraParams || {} }, E = (await v.get(t.deptApiUrl, { params: i })).data, Q = Array.isArray(E) ? E : (E == null ? void 0 : E.data) ?? [];
2456
+ d.value = x(Q), r("load-success", d.value);
2457
+ } catch (i) {
2458
+ G.error((i == null ? void 0 : i.msg) || (i == null ? void 0 : i.message) || n("remoteSelect", "requestFailed")), d.value = [];
2459
+ } finally {
2460
+ c.value = !1;
2461
+ }
2462
+ }
2463
+ function x(i) {
2464
+ return i.map((C) => {
2465
+ const E = {
2466
+ ...C,
2467
+ label: C[t.labelField] ?? "",
2468
+ value: C[t.valueField] ?? ""
2469
+ };
2470
+ return C[t.childrenField] && Array.isArray(C[t.childrenField]) && C[t.childrenField].length > 0 && (E.children = x(C[t.childrenField])), E;
2471
+ });
2472
+ }
2473
+ return W(() => {
2474
+ u();
2475
+ }), (i, C) => (s(), y(a(ll), F(i.$attrs, {
2476
+ "model-value": e.modelValue,
2477
+ options: d.value,
2478
+ props: p.value,
2479
+ placeholder: e.placeholder,
2480
+ clearable: e.clearable,
2481
+ disabled: e.disabled,
2482
+ size: e.size,
2483
+ "show-all-levels": e.showAllLevels,
2484
+ "onUpdate:modelValue": C[0] || (C[0] = (E) => o(E)),
2485
+ onChange: C[1] || (C[1] = (E) => f(E)),
2486
+ onClear: C[2] || (C[2] = (E) => h()),
2487
+ onBlur: C[3] || (C[3] = (E) => m(E)),
2488
+ onFocus: C[4] || (C[4] = (E) => S(E))
2489
+ }), null, 16, ["model-value", "options", "props", "placeholder", "clearable", "disabled", "size", "show-all-levels"]));
2490
+ }
2491
+ });
2492
+ Ee.install = (e) => {
2493
+ e.component(Ee.name ?? "EeDeptCascader", Ee);
1673
2494
  };
1674
- const ot = [
1675
- le,
1676
- oe,
1677
- ne,
1678
- ie,
1679
- re
2495
+ const Nl = {
2496
+ key: 1,
2497
+ class: "ee-no-more"
2498
+ }, Kl = { class: "ee-loading-tip" }, ql = /* @__PURE__ */ N({
2499
+ name: "EeUserSelect",
2500
+ __name: "index",
2501
+ props: {
2502
+ modelValue: {},
2503
+ apiUrl: { default: "/api/system/user/page" },
2504
+ detailEchoUrl: { default: "/api/system/user/detail" },
2505
+ mode: { default: "single" },
2506
+ deptId: {},
2507
+ labelField: { default: "label" },
2508
+ valueField: { default: "value" },
2509
+ searchKey: { default: "keyword" },
2510
+ extraParams: {},
2511
+ requestInstance: {},
2512
+ placeholder: {},
2513
+ clearable: { type: Boolean, default: !0 },
2514
+ disabled: { type: Boolean },
2515
+ readonly: { type: Boolean },
2516
+ filterable: { type: Boolean, default: !0 },
2517
+ size: { default: "default" }
2518
+ },
2519
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
2520
+ setup(e, { emit: l }) {
2521
+ const t = e, r = l, { t: o } = j(), f = D(() => {
2522
+ const u = { ...t.extraParams || {} };
2523
+ return t.deptId !== void 0 && t.deptId !== null && t.deptId !== "" && (u.deptId = t.deptId), u;
2524
+ }), {
2525
+ loading: h,
2526
+ options: m,
2527
+ noMore: S,
2528
+ loadData: g,
2529
+ loadMore: v,
2530
+ resetList: n,
2531
+ onKeywordChange: d
2532
+ } = Ke({
2533
+ apiUrl: t.apiUrl,
2534
+ pageSizeKey: "pageSize",
2535
+ pageNumKey: "pageNum",
2536
+ pageSize: 20,
2537
+ searchKey: t.searchKey,
2538
+ extraParams: f.value,
2539
+ labelField: t.labelField,
2540
+ valueField: t.valueField
2541
+ }), c = D(() => m.value.map((u) => ({
2542
+ value: u[t.valueField],
2543
+ label: u[t.labelField],
2544
+ disabled: u.disabled ?? !1
2545
+ })));
2546
+ function p(u) {
2547
+ u && c.value.length === 0 && g(void 0, !0);
2548
+ }
2549
+ return W(() => {
2550
+ g(void 0, !0);
2551
+ }), ee(() => t.deptId, () => {
2552
+ n(), g(void 0, !0);
2553
+ }), (u, x) => (s(), y(a(ae), F(u.$attrs, {
2554
+ "model-value": e.modelValue,
2555
+ loading: a(h),
2556
+ multiple: e.mode === "multiple",
2557
+ placeholder: e.placeholder,
2558
+ clearable: e.clearable,
2559
+ disabled: e.disabled,
2560
+ readonly: e.readonly,
2561
+ filterable: e.filterable,
2562
+ size: e.size,
2563
+ remote: !0,
2564
+ "remote-method": a(d),
2565
+ "onUpdate:modelValue": x[1] || (x[1] = (i) => r("update:modelValue", i)),
2566
+ onChange: x[2] || (x[2] = (i) => r("change", i)),
2567
+ onClear: x[3] || (x[3] = (i) => r("clear")),
2568
+ onBlur: x[4] || (x[4] = (i) => r("blur", i)),
2569
+ onFocus: x[5] || (x[5] = (i) => r("focus", i)),
2570
+ onVisibleChange: p
2571
+ }), {
2572
+ loading: b(() => [
2573
+ q("div", Kl, [
2574
+ q("span", null, T(a(o)("remoteSelect", "loading")), 1)
2575
+ ])
2576
+ ]),
2577
+ default: b(() => [
2578
+ (s(!0), V($, null, O(c.value, (i) => (s(), y(a(le), {
2579
+ key: i.value,
2580
+ label: i.label,
2581
+ value: i.value,
2582
+ disabled: i.disabled
2583
+ }, null, 8, ["label", "value", "disabled"]))), 128)),
2584
+ !a(S) && !a(h) && c.value.length > 0 ? (s(), V("div", {
2585
+ key: 0,
2586
+ class: "ee-load-more",
2587
+ onClick: x[0] || (x[0] = //@ts-ignore
2588
+ (...i) => a(v) && a(v)(...i))
2589
+ }, [
2590
+ q("span", null, T(a(o)("remoteSelect", "loadMore")), 1)
2591
+ ])) : A("", !0),
2592
+ a(S) && c.value.length > 0 ? (s(), V("div", Nl, [
2593
+ q("span", null, T(a(o)("remoteSelect", "noMore")), 1)
2594
+ ])) : A("", !0)
2595
+ ]),
2596
+ _: 1
2597
+ }, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
2598
+ }
2599
+ }), Pe = /* @__PURE__ */ be(ql, [["__scopeId", "data-v-6e78b80d"]]);
2600
+ Pe.install = (e) => {
2601
+ e.component(Pe.name ?? "EeUserSelect", Pe);
2602
+ };
2603
+ const Hl = {
2604
+ key: 1,
2605
+ class: "ee-no-more"
2606
+ }, Wl = { class: "ee-loading-tip" }, jl = /* @__PURE__ */ N({
2607
+ name: "EeRoleSelect",
2608
+ __name: "index",
2609
+ props: {
2610
+ modelValue: {},
2611
+ apiUrl: { default: "/api/system/role/page" },
2612
+ detailEchoUrl: { default: "/api/system/role/detail" },
2613
+ mode: { default: "single" },
2614
+ labelField: { default: "label" },
2615
+ valueField: { default: "value" },
2616
+ searchKey: { default: "keyword" },
2617
+ extraParams: {},
2618
+ requestInstance: {},
2619
+ placeholder: {},
2620
+ clearable: { type: Boolean, default: !0 },
2621
+ disabled: { type: Boolean },
2622
+ readonly: { type: Boolean },
2623
+ filterable: { type: Boolean, default: !0 },
2624
+ size: { default: "default" }
2625
+ },
2626
+ emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
2627
+ setup(e, { emit: l }) {
2628
+ const t = e, r = l, { t: o } = j(), {
2629
+ loading: f,
2630
+ options: h,
2631
+ noMore: m,
2632
+ loadData: S,
2633
+ loadMore: g,
2634
+ onKeywordChange: v
2635
+ } = Ke({
2636
+ apiUrl: t.apiUrl,
2637
+ pageSizeKey: "pageSize",
2638
+ pageNumKey: "pageNum",
2639
+ pageSize: 20,
2640
+ searchKey: t.searchKey,
2641
+ extraParams: t.extraParams,
2642
+ labelField: t.labelField,
2643
+ valueField: t.valueField
2644
+ }), n = D(() => h.value.map((c) => ({
2645
+ value: c[t.valueField],
2646
+ label: c[t.labelField],
2647
+ disabled: c.disabled ?? !1
2648
+ })));
2649
+ function d(c) {
2650
+ c && n.value.length === 0 && S(void 0, !0);
2651
+ }
2652
+ return W(() => {
2653
+ S(void 0, !0);
2654
+ }), (c, p) => (s(), y(a(ae), F(c.$attrs, {
2655
+ "model-value": e.modelValue,
2656
+ loading: a(f),
2657
+ multiple: e.mode === "multiple",
2658
+ placeholder: e.placeholder,
2659
+ clearable: e.clearable,
2660
+ disabled: e.disabled,
2661
+ readonly: e.readonly,
2662
+ filterable: e.filterable,
2663
+ size: e.size,
2664
+ remote: !0,
2665
+ "remote-method": a(v),
2666
+ "onUpdate:modelValue": p[1] || (p[1] = (u) => r("update:modelValue", u)),
2667
+ onChange: p[2] || (p[2] = (u) => r("change", u)),
2668
+ onClear: p[3] || (p[3] = (u) => r("clear")),
2669
+ onBlur: p[4] || (p[4] = (u) => r("blur", u)),
2670
+ onFocus: p[5] || (p[5] = (u) => r("focus", u)),
2671
+ onVisibleChange: d
2672
+ }), {
2673
+ loading: b(() => [
2674
+ q("div", Wl, [
2675
+ q("span", null, T(a(o)("remoteSelect", "loading")), 1)
2676
+ ])
2677
+ ]),
2678
+ default: b(() => [
2679
+ (s(!0), V($, null, O(n.value, (u) => (s(), y(a(le), {
2680
+ key: u.value,
2681
+ label: u.label,
2682
+ value: u.value,
2683
+ disabled: u.disabled
2684
+ }, null, 8, ["label", "value", "disabled"]))), 128)),
2685
+ !a(m) && !a(f) && n.value.length > 0 ? (s(), V("div", {
2686
+ key: 0,
2687
+ class: "ee-load-more",
2688
+ onClick: p[0] || (p[0] = //@ts-ignore
2689
+ (...u) => a(g) && a(g)(...u))
2690
+ }, [
2691
+ q("span", null, T(a(o)("remoteSelect", "loadMore")), 1)
2692
+ ])) : A("", !0),
2693
+ a(m) && n.value.length > 0 ? (s(), V("div", Hl, [
2694
+ q("span", null, T(a(o)("remoteSelect", "noMore")), 1)
2695
+ ])) : A("", !0)
2696
+ ]),
2697
+ _: 1
2698
+ }, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
2699
+ }
2700
+ }), Be = /* @__PURE__ */ be(jl, [["__scopeId", "data-v-58cd12c9"]]);
2701
+ Be.install = (e) => {
2702
+ e.component(Be.name ?? "EeRoleSelect", Be);
2703
+ };
2704
+ const Gl = [
2705
+ "#409eff",
2706
+ "#67c23a",
2707
+ "#e6a23c",
2708
+ "#f56c6c",
2709
+ "#909399",
2710
+ "#8b5cf6",
2711
+ "#ec4899",
2712
+ "#06b6d4",
2713
+ "#f97316",
2714
+ "#6366f1"
2715
+ ], re = "PingFang SC, Microsoft YaHei, sans-serif", qe = {
2716
+ color: Gl,
2717
+ title: {
2718
+ textStyle: {
2719
+ fontSize: 16,
2720
+ fontWeight: 600,
2721
+ fontFamily: re,
2722
+ color: "#303133"
2723
+ },
2724
+ subtextStyle: {
2725
+ fontSize: 12,
2726
+ fontFamily: re,
2727
+ color: "#909399"
2728
+ },
2729
+ left: 0,
2730
+ top: 0
2731
+ },
2732
+ tooltip: {
2733
+ trigger: "axis",
2734
+ backgroundColor: "rgba(255, 255, 255, 0.95)",
2735
+ borderWidth: 0,
2736
+ borderRadius: 4,
2737
+ padding: [8, 12],
2738
+ textStyle: {
2739
+ fontSize: 12,
2740
+ fontFamily: re,
2741
+ color: "#303133"
2742
+ },
2743
+ extraCssText: "box-shadow: 0 2px 12px rgba(0,0,0,0.1);"
2744
+ },
2745
+ legend: {
2746
+ type: "plain",
2747
+ top: 30,
2748
+ left: 0,
2749
+ itemWidth: 14,
2750
+ itemHeight: 10,
2751
+ textStyle: {
2752
+ fontSize: 12,
2753
+ fontFamily: re,
2754
+ color: "#606266"
2755
+ }
2756
+ },
2757
+ grid: {
2758
+ top: 70,
2759
+ right: 20,
2760
+ bottom: 30,
2761
+ left: 50,
2762
+ containLabel: !0
2763
+ },
2764
+ xAxis: {
2765
+ type: "category",
2766
+ axisLine: {
2767
+ show: !0,
2768
+ lineStyle: {
2769
+ color: "#dcdfe6",
2770
+ width: 1
2771
+ }
2772
+ },
2773
+ axisTick: {
2774
+ alignWithLabel: !0
2775
+ },
2776
+ axisLabel: {
2777
+ fontSize: 11,
2778
+ fontFamily: re,
2779
+ color: "#909399"
2780
+ },
2781
+ splitLine: {
2782
+ show: !1
2783
+ }
2784
+ },
2785
+ yAxis: {
2786
+ type: "value",
2787
+ axisLine: {
2788
+ show: !1
2789
+ },
2790
+ axisTick: {
2791
+ show: !1
2792
+ },
2793
+ axisLabel: {
2794
+ fontSize: 11,
2795
+ fontFamily: re,
2796
+ color: "#909399"
2797
+ },
2798
+ splitLine: {
2799
+ show: !0,
2800
+ lineStyle: {
2801
+ color: "#ebeef5",
2802
+ type: "dashed"
2803
+ }
2804
+ }
2805
+ },
2806
+ series: {
2807
+ bar: {
2808
+ barMaxWidth: 40,
2809
+ itemStyle: {
2810
+ borderRadius: [2, 2, 0, 0]
2811
+ }
2812
+ },
2813
+ line: {
2814
+ lineStyle: {
2815
+ width: 2
2816
+ },
2817
+ itemStyle: {
2818
+ borderWidth: 2
2819
+ }
2820
+ },
2821
+ pie: {
2822
+ label: {
2823
+ fontSize: 12,
2824
+ fontFamily: re,
2825
+ color: "#606266"
2826
+ },
2827
+ labelLine: {
2828
+ lineStyle: {
2829
+ color: "#dcdfe6"
2830
+ }
2831
+ }
2832
+ },
2833
+ radar: {
2834
+ lineStyle: {
2835
+ width: 2
2836
+ },
2837
+ areaStyle: {
2838
+ opacity: 0.15
2839
+ }
2840
+ }
2841
+ }
2842
+ }, Xl = {
2843
+ text: "数据加载中...",
2844
+ color: "#409eff",
2845
+ textColor: "#909399",
2846
+ maskColor: "rgba(255, 255, 255, 0.8)",
2847
+ fontSize: 13
2848
+ };
2849
+ function X(e, l) {
2850
+ if (!l) return e;
2851
+ const t = { ...e };
2852
+ for (const r of Object.keys(l)) {
2853
+ const o = l[r];
2854
+ o != null && (Array.isArray(o) || Array.isArray(t[r]) ? t[r] = o : typeof o == "object" && typeof t[r] == "object" ? t[r] = X(t[r], o) : t[r] = o);
2855
+ }
2856
+ return t;
2857
+ }
2858
+ function He(e, l = {}) {
2859
+ const t = Ya(), r = R(!1);
2860
+ let o = null, f = null;
2861
+ function h() {
2862
+ e.value && (t.value && t.value.dispose(), t.value = tl.init(e.value), r.value = !0);
2863
+ }
2864
+ function m(d, c = !1) {
2865
+ t.value && t.value.setOption(d, { notMerge: c });
2866
+ }
2867
+ function S() {
2868
+ f && clearTimeout(f), f = setTimeout(() => {
2869
+ var d;
2870
+ (d = t.value) == null || d.resize();
2871
+ }, 200);
2872
+ }
2873
+ function g() {
2874
+ var d;
2875
+ (d = t.value) == null || d.showLoading("default", Xl);
2876
+ }
2877
+ function v() {
2878
+ var d;
2879
+ (d = t.value) == null || d.hideLoading();
2880
+ }
2881
+ function n() {
2882
+ o && (o.disconnect(), o = null), f && (clearTimeout(f), f = null), t.value && (t.value.dispose(), t.value = void 0), r.value = !1;
2883
+ }
2884
+ return W(() => {
2885
+ ge(() => {
2886
+ h(), l.isAutoResize !== !1 && e.value && (o = new ResizeObserver(() => S()), o.observe(e.value));
2887
+ });
2888
+ }), Qa(() => {
2889
+ n();
2890
+ }), {
2891
+ instance: t,
2892
+ isReady: r,
2893
+ setOption: m,
2894
+ handleResize: S,
2895
+ showLoading: g,
2896
+ hideLoading: v,
2897
+ destroy: n
2898
+ };
2899
+ }
2900
+ const Fe = /* @__PURE__ */ N({
2901
+ name: "EeBaseBar",
2902
+ __name: "index",
2903
+ props: {
2904
+ width: { default: "100%" },
2905
+ height: { default: "400px" },
2906
+ xAxisData: { default: () => [] },
2907
+ seriesData: { default: () => [] },
2908
+ isStack: { type: Boolean, default: !1 },
2909
+ barWidth: {},
2910
+ title: {},
2911
+ legendShow: { type: Boolean, default: !0 },
2912
+ tooltipShow: { type: Boolean, default: !0 },
2913
+ extraOption: {},
2914
+ isAutoResize: { type: Boolean, default: !0 }
2915
+ },
2916
+ setup(e) {
2917
+ const l = e, t = R(), { isReady: r, setOption: o, showLoading: f, hideLoading: h } = He(t, {
2918
+ isAutoResize: l.isAutoResize
2919
+ }), m = D(() => l.seriesData.map((g) => ({
2920
+ name: g.name,
2921
+ type: "bar",
2922
+ data: g.data,
2923
+ barWidth: l.barWidth,
2924
+ stack: l.isStack ? "total" : g.stack || void 0,
2925
+ itemStyle: g.color ? { color: g.color } : void 0
2926
+ }))), S = D(() => {
2927
+ let g = X({}, qe);
2928
+ return g = X(g, {
2929
+ tooltip: { show: l.tooltipShow, trigger: "axis" },
2930
+ legend: { show: l.legendShow, data: l.seriesData.map((v) => v.name) },
2931
+ title: l.title ? { text: l.title, show: !0 } : { show: !1 },
2932
+ grid: { top: l.title ? 70 : 40 },
2933
+ xAxis: { data: l.xAxisData },
2934
+ series: m.value
2935
+ }), l.extraOption && (g = X(g, l.extraOption)), g;
2936
+ });
2937
+ return ee(S, (g) => {
2938
+ r.value && o(g, !0);
2939
+ }, { deep: !0 }), W(() => {
2940
+ ge(() => {
2941
+ (l.xAxisData.length > 0 || l.seriesData.length > 0) && o(S.value, !0);
2942
+ });
2943
+ }), (g, v) => (s(), V("div", F({
2944
+ ref_key: "chartRef",
2945
+ ref: t,
2946
+ style: { width: e.width, height: e.height }
2947
+ }, g.$attrs), null, 16));
2948
+ }
2949
+ });
2950
+ Fe.install = (e) => {
2951
+ e.component(Fe.name ?? "EeBaseBar", Fe);
2952
+ };
2953
+ const Re = /* @__PURE__ */ N({
2954
+ name: "EeBaseLine",
2955
+ __name: "index",
2956
+ props: {
2957
+ width: { default: "100%" },
2958
+ height: { default: "400px" },
2959
+ xAxisData: { default: () => [] },
2960
+ seriesData: { default: () => [] },
2961
+ isSmooth: { type: Boolean, default: !1 },
2962
+ showSymbol: { type: Boolean, default: !0 },
2963
+ isArea: { type: Boolean, default: !1 },
2964
+ title: {},
2965
+ legendShow: { type: Boolean, default: !0 },
2966
+ tooltipShow: { type: Boolean, default: !0 },
2967
+ extraOption: {},
2968
+ isAutoResize: { type: Boolean, default: !0 }
2969
+ },
2970
+ setup(e) {
2971
+ const l = e, t = R(), { isReady: r, setOption: o } = He(t, {
2972
+ isAutoResize: l.isAutoResize
2973
+ }), f = D(() => l.seriesData.map((m) => ({
2974
+ name: m.name,
2975
+ type: "line",
2976
+ data: m.data,
2977
+ smooth: l.isSmooth,
2978
+ showSymbol: l.showSymbol,
2979
+ symbol: "circle",
2980
+ symbolSize: 6,
2981
+ lineStyle: m.color ? { color: m.color } : void 0,
2982
+ itemStyle: m.color ? { color: m.color } : void 0,
2983
+ areaStyle: l.isArea ? { opacity: 0.15 } : void 0
2984
+ }))), h = D(() => {
2985
+ let m = X({}, qe);
2986
+ return m = X(m, {
2987
+ tooltip: { show: l.tooltipShow, trigger: "axis" },
2988
+ legend: { show: l.legendShow, data: l.seriesData.map((S) => S.name) },
2989
+ title: l.title ? { text: l.title, show: !0 } : { show: !1 },
2990
+ grid: { top: l.title ? 70 : 40 },
2991
+ xAxis: { data: l.xAxisData },
2992
+ series: f.value
2993
+ }), l.extraOption && (m = X(m, l.extraOption)), m;
2994
+ });
2995
+ return ee(h, (m) => {
2996
+ r.value && o(m, !0);
2997
+ }, { deep: !0 }), W(() => {
2998
+ ge(() => {
2999
+ (l.xAxisData.length > 0 || l.seriesData.length > 0) && o(h.value, !0);
3000
+ });
3001
+ }), (m, S) => (s(), V("div", F({
3002
+ ref_key: "chartRef",
3003
+ ref: t,
3004
+ style: { width: e.width, height: e.height }
3005
+ }, m.$attrs), null, 16));
3006
+ }
3007
+ });
3008
+ Re.install = (e) => {
3009
+ e.component(Re.name ?? "EeBaseLine", Re);
3010
+ };
3011
+ const Ue = /* @__PURE__ */ N({
3012
+ name: "EeBasePie",
3013
+ __name: "index",
3014
+ props: {
3015
+ width: { default: "100%" },
3016
+ height: { default: "400px" },
3017
+ pieData: { default: () => [] },
3018
+ isRing: { type: Boolean, default: !1 },
3019
+ radius: {},
3020
+ labelShow: { type: Boolean, default: !0 },
3021
+ title: {},
3022
+ legendShow: { type: Boolean, default: !0 },
3023
+ tooltipShow: { type: Boolean, default: !0 },
3024
+ extraOption: {},
3025
+ isAutoResize: { type: Boolean, default: !0 }
3026
+ },
3027
+ setup(e) {
3028
+ const l = e, t = R(), { isReady: r, setOption: o } = He(t, {
3029
+ isAutoResize: l.isAutoResize
3030
+ }), f = D(() => l.radius ? l.radius : l.isRing ? ["40%", "60%"] : ["0%", "60%"]), h = D(() => {
3031
+ let m = X({}, qe);
3032
+ return m = X(m, {
3033
+ tooltip: { show: l.tooltipShow, trigger: "item" },
3034
+ legend: { show: l.legendShow, top: "bottom" },
3035
+ title: l.title ? { text: l.title, show: !0 } : { show: !1 },
3036
+ grid: void 0,
3037
+ xAxis: void 0,
3038
+ yAxis: void 0,
3039
+ series: [{
3040
+ type: "pie",
3041
+ radius: f.value,
3042
+ center: ["50%", "50%"],
3043
+ data: l.pieData,
3044
+ label: { show: l.labelShow },
3045
+ emphasis: {
3046
+ itemStyle: {
3047
+ shadowBlur: 10,
3048
+ shadowOffsetX: 0,
3049
+ shadowColor: "rgba(0, 0, 0, 0.15)"
3050
+ }
3051
+ }
3052
+ }]
3053
+ }), l.extraOption && (m = X(m, l.extraOption)), m;
3054
+ });
3055
+ return ee(h, (m) => {
3056
+ r.value && o(m, !0);
3057
+ }, { deep: !0 }), W(() => {
3058
+ ge(() => {
3059
+ l.pieData.length > 0 && o(h.value, !0);
3060
+ });
3061
+ }), (m, S) => (s(), V("div", F({
3062
+ ref_key: "chartRef",
3063
+ ref: t,
3064
+ style: { width: e.width, height: e.height }
3065
+ }, m.$attrs), null, 16));
3066
+ }
3067
+ });
3068
+ Ue.install = (e) => {
3069
+ e.component(Ue.name ?? "EeBasePie", Ue);
3070
+ };
3071
+ const Ae = /* @__PURE__ */ N({
3072
+ name: "EeBaseRadar",
3073
+ __name: "index",
3074
+ props: {
3075
+ width: { default: "100%" },
3076
+ height: { default: "400px" },
3077
+ indicator: { default: () => [] },
3078
+ seriesData: { default: () => [] },
3079
+ isFill: { type: Boolean, default: !0 },
3080
+ title: {},
3081
+ legendShow: { type: Boolean, default: !0 },
3082
+ tooltipShow: { type: Boolean, default: !0 },
3083
+ extraOption: {},
3084
+ isAutoResize: { type: Boolean, default: !0 }
3085
+ },
3086
+ setup(e) {
3087
+ const l = e, t = R(), { isReady: r, setOption: o } = He(t, {
3088
+ isAutoResize: l.isAutoResize
3089
+ }), f = D(() => l.seriesData.map((m) => ({
3090
+ name: m.name,
3091
+ type: "radar",
3092
+ data: [m.value],
3093
+ symbol: "none",
3094
+ lineStyle: m.color ? { color: m.color } : void 0,
3095
+ itemStyle: m.color ? { color: m.color } : void 0,
3096
+ areaStyle: l.isFill ? { opacity: 0.15 } : void 0
3097
+ }))), h = D(() => {
3098
+ let m = X({}, qe);
3099
+ return m = X(m, {
3100
+ tooltip: { show: l.tooltipShow, trigger: "item" },
3101
+ legend: { show: l.legendShow, data: l.seriesData.map((S) => S.name) },
3102
+ title: l.title ? { text: l.title, show: !0 } : { show: !1 },
3103
+ grid: void 0,
3104
+ xAxis: void 0,
3105
+ yAxis: void 0,
3106
+ radar: {
3107
+ indicator: l.indicator,
3108
+ radius: "65%",
3109
+ shape: "polygon",
3110
+ name: {
3111
+ textStyle: { fontSize: 12, color: "#606266" }
3112
+ },
3113
+ splitLine: { lineStyle: { color: "#ebeef5" } },
3114
+ splitArea: { areaStyle: { color: ["rgba(64,158,255,0.02)", "rgba(64,158,255,0.05)"] } },
3115
+ axisLine: { lineStyle: { color: "#dcdfe6" } }
3116
+ },
3117
+ series: f.value
3118
+ }), l.extraOption && (m = X(m, l.extraOption)), m;
3119
+ });
3120
+ return ee(h, (m) => {
3121
+ r.value && o(m, !0);
3122
+ }, { deep: !0 }), W(() => {
3123
+ ge(() => {
3124
+ l.indicator.length > 0 && l.seriesData.length > 0 && o(h.value, !0);
3125
+ });
3126
+ }), (m, S) => (s(), V("div", F({
3127
+ ref_key: "chartRef",
3128
+ ref: t,
3129
+ style: { width: e.width, height: e.height }
3130
+ }, m.$attrs), null, 16));
3131
+ }
3132
+ });
3133
+ Ae.install = (e) => {
3134
+ e.component(Ae.name ?? "EeBaseRadar", Ae);
3135
+ };
3136
+ const Yl = [
3137
+ Fe,
3138
+ Re,
3139
+ Ue,
3140
+ Ae
3141
+ ], Ql = {
3142
+ formTable: {
3143
+ operation: "Actions",
3144
+ add: "Add",
3145
+ edit: "Edit",
3146
+ delete: "Delete",
3147
+ view: "View",
3148
+ import: "Import",
3149
+ export: "Export",
3150
+ batchDelete: "Batch Delete",
3151
+ refresh: "Refresh",
3152
+ columnSetting: "Columns",
3153
+ search: "Search",
3154
+ reset: "Reset",
3155
+ expand: "Expand",
3156
+ collapse: "Collapse",
3157
+ empty: "No data",
3158
+ confirm: "OK",
3159
+ cancel: "Cancel",
3160
+ close: "Close",
3161
+ confirmDelete: "Confirm Delete",
3162
+ confirmDeleteMsg: "Are you sure you want to delete this item?",
3163
+ confirmBatchDelete: "Confirm Batch Delete",
3164
+ confirmBatchDeleteMsg: "Are you sure you want to delete the selected {count} items?",
3165
+ addTitle: "Add",
3166
+ editTitle: "Edit",
3167
+ viewTitle: "View",
3168
+ addSuccess: "Add successful",
3169
+ editSuccess: "Update successful",
3170
+ deleteSuccess: "Delete successful",
3171
+ batchDeleteSuccess: "Batch delete successful",
3172
+ refreshSuccess: "Refresh successful",
3173
+ exportSuccess: "Export successful",
3174
+ exportFail: "Export failed",
3175
+ requestFailed: "Request failed",
3176
+ deleteFailed: "Delete failed",
3177
+ batchDeleteFailed: "Batch delete failed",
3178
+ installXlsx: "Please install xlsx dependency: npm install xlsx",
3179
+ exportFileName: "export.xlsx",
3180
+ inputPlaceholder: "Please enter {label}",
3181
+ selectPlaceholder: "Please select {label}",
3182
+ dateRangeTo: "to",
3183
+ dateRangeStart: "Start date",
3184
+ dateRangeEnd: "End date"
3185
+ },
3186
+ searchBar: {
3187
+ search: "Search",
3188
+ reset: "Reset",
3189
+ expand: "Expand",
3190
+ collapse: "Collapse",
3191
+ inputPlaceholder: "Please enter {label}",
3192
+ selectPlaceholder: "Please select {label}",
3193
+ dateRangeTo: "to",
3194
+ dateRangeStart: "Start date",
3195
+ dateRangeEnd: "End date"
3196
+ },
3197
+ formDialog: {
3198
+ confirm: "OK",
3199
+ cancel: "Cancel",
3200
+ title: "Form",
3201
+ inputPlaceholder: "Please enter {label}",
3202
+ textareaPlaceholder: "Please enter {label}",
3203
+ selectPlaceholder: "Please select {label}",
3204
+ datePickerPlaceholder: "Please select {label}"
3205
+ },
3206
+ remoteSelect: {
3207
+ loading: "Loading...",
3208
+ noMore: "No more data",
3209
+ loadMore: "Load more",
3210
+ searchPlaceholder: "Please enter keyword",
3211
+ requestFailed: "Request failed",
3212
+ noData: "No data"
3213
+ }
3214
+ };
3215
+ function Zl(e, l) {
3216
+ if (!e) return l;
3217
+ const t = {};
3218
+ for (const r of ["formTable", "searchBar", "formDialog", "remoteSelect"])
3219
+ t[r] = { ...l[r], ...e[r] };
3220
+ return t;
3221
+ }
3222
+ function ot(e) {
3223
+ const {
3224
+ requestInstance: l,
3225
+ detailApiUrl: t,
3226
+ labelField: r = "label",
3227
+ valueField: o = "value",
3228
+ mode: f = "single"
3229
+ } = e, h = l ?? $e(We);
3230
+ if (!h)
3231
+ throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
3232
+ const m = h;
3233
+ j();
3234
+ const S = R("");
3235
+ function g(d) {
3236
+ return typeof d == "number" ? !0 : typeof d == "string" ? /^\d+(\.\d+)?$/.test(d.trim()) : !1;
3237
+ }
3238
+ async function v(d) {
3239
+ try {
3240
+ const p = (await m.get(t, { params: { id: d } })).data, u = (p == null ? void 0 : p.data) || p;
3241
+ return String(u ? u[r] ?? u[o] ?? "" : d);
3242
+ } catch {
3243
+ return String(d);
3244
+ }
3245
+ }
3246
+ async function n(d) {
3247
+ if (d == null || d === "") {
3248
+ S.value = f === "multiple" ? [] : "";
3249
+ return;
3250
+ }
3251
+ if (f === "multiple" && Array.isArray(d)) {
3252
+ if (d.length === 0) {
3253
+ S.value = [];
3254
+ return;
3255
+ }
3256
+ const c = d[0];
3257
+ if (g(c)) {
3258
+ const p = await Promise.all(d.map((u) => v(u)));
3259
+ S.value = p;
3260
+ } else
3261
+ S.value = d;
3262
+ } else {
3263
+ if (f === "multiple") {
3264
+ S.value = [];
3265
+ return;
3266
+ }
3267
+ const c = d;
3268
+ g(c) ? S.value = await v(c) : S.value = String(c);
3269
+ }
3270
+ }
3271
+ return {
3272
+ /** 当前回显文本(单选为 string,多选为 string[]) */
3273
+ echoText: S,
3274
+ echoValue: n
3275
+ };
3276
+ }
3277
+ const Jl = {
3278
+ "zh-cn": se,
3279
+ en: Ql
3280
+ }, We = "eeRequestInstance", _l = [
3281
+ ze,
3282
+ xe,
3283
+ De,
3284
+ ke,
3285
+ Ve,
3286
+ Te,
3287
+ Ee,
3288
+ Pe,
3289
+ Be,
3290
+ ...Yl
1680
3291
  ];
1681
- function nt(e) {
1682
- ot.forEach((n) => {
1683
- e.use(n);
3292
+ function et(e, l) {
3293
+ let t = se;
3294
+ l != null && l.locale && (typeof l.locale == "string" ? t = Jl[l.locale] || se : t = Zl(l.locale, se)), e.provide(pa, t), l != null && l.requestInstance && e.provide(We, l.requestInstance), e.provide("eeGlobalConfig", {
3295
+ size: l == null ? void 0 : l.size,
3296
+ formTable: l == null ? void 0 : l.formTable,
3297
+ searchBar: l == null ? void 0 : l.searchBar,
3298
+ formDialog: l == null ? void 0 : l.formDialog,
3299
+ dictSelect: l == null ? void 0 : l.dictSelect,
3300
+ statusTag: l == null ? void 0 : l.statusTag,
3301
+ remoteSelect: l == null ? void 0 : l.remoteSelect,
3302
+ deptCascader: l == null ? void 0 : l.deptCascader,
3303
+ userSelect: l == null ? void 0 : l.userSelect,
3304
+ roleSelect: l == null ? void 0 : l.roleSelect
3305
+ }), _l.forEach((r) => {
3306
+ e.use(r);
1684
3307
  });
1685
3308
  }
1686
- const st = { install: nt };
3309
+ const rt = { install: et };
1687
3310
  export {
1688
- le as EeDictSelect,
1689
- ie as EeFormDialog,
1690
- re as EeFormTable,
1691
- ne as EeSearchBar,
1692
- oe as EeStatusTag,
1693
- st as default,
1694
- nt as install
3311
+ pa as EE_LOCALE_KEY,
3312
+ We as EE_REQUEST_KEY,
3313
+ Fe as EeBaseBar,
3314
+ Re as EeBaseLine,
3315
+ Ue as EeBasePie,
3316
+ Ae as EeBaseRadar,
3317
+ Ee as EeDeptCascader,
3318
+ ze as EeDictSelect,
3319
+ ke as EeFormDialog,
3320
+ Ve as EeFormTable,
3321
+ Te as EeRemoteSelect,
3322
+ Be as EeRoleSelect,
3323
+ De as EeSearchBar,
3324
+ xe as EeStatusTag,
3325
+ Pe as EeUserSelect,
3326
+ qe as GLOBAL_CHART_CONFIG,
3327
+ X as deepMerge,
3328
+ rt as default,
3329
+ et as install,
3330
+ Zl as mergeLocale,
3331
+ He as useChart,
3332
+ Ke as useRemoteSelectPagination,
3333
+ ot as useSelectEcho
1695
3334
  };