vue3-curd 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,47 +1,47 @@
1
- import { ElTag as na, ElImage as Be, ElIcon as Ye, ElTable as Ja, ElTableColumn as Xa, ElCheckbox as sa, ElSwitch as ca, ElTooltip as Za, ElButton as De, ElLoadingDirective as et, ElPagination as at, ElUpload as Me, ElLink as tt, ElDialog as ua, ElInput as Re, ElForm as ia, ElRow as da, ElCol as pa, ElFormItem as fa, ElInputNumber as lt, ElSelect as ha, ElOption as ma, ElDatePicker as ya, ElCheckboxGroup as ot, ElRadioGroup as rt, ElRadio as nt, ElTreeSelect as ga, ElColorPicker as st, ElCard as ba, ElLoading as va, ElMessage as we, ElMessageBox as _e, ElNotification as Ee } from "element-plus/es";
2
- import { defineComponent as pe, computed as J, createElementBlock as T, openBlock as s, normalizeClass as je, unref as r, createElementVNode as re, toDisplayString as M, Fragment as z, renderList as Q, createBlock as h, createCommentVNode as Z, withCtx as b, createTextVNode as L, ref as I, watch as Ve, normalizeStyle as he, createVNode as K, getCurrentInstance as me, toRaw as Oe, onMounted as He, resolveDirective as ka, withDirectives as de, renderSlot as Pe, withModifiers as ct, nextTick as Ie, TransitionGroup as ut, useCssVars as it, resolveComponent as dt, isRef as $e, vShow as pt, reactive as ft, createSlots as xe, withKeys as Qe, normalizeProps as Ge, guardReactiveProps as Je } from "vue";
3
- import { createTypes as ht } from "vue-types";
1
+ import { ElTag as ua, ElImage as Ye, ElIcon as Me, ElTable as Za, ElTableColumn as et, ElCheckbox as ia, ElSwitch as da, ElTooltip as at, ElButton as De, ElLoadingDirective as tt, ElPagination as lt, ElUpload as Re, ElLink as ot, ElDialog as pa, ElInput as je, ElForm as fa, ElRow as ha, ElCol as ma, ElFormItem as ya, ElInputNumber as rt, ElSelect as ga, ElOption as ba, ElDatePicker as va, ElCheckboxGroup as nt, ElRadioGroup as st, ElRadio as ct, ElTreeSelect as ka, ElColorPicker as ut, ElCard as _a, ElLoading as wa, ElMessage as we, ElMessageBox as _e, ElNotification as Ee } from "element-plus/es";
2
+ import { defineComponent as pe, computed as J, createElementBlock as T, openBlock as s, normalizeClass as He, unref as r, createElementVNode as re, toDisplayString as M, Fragment as z, renderList as Q, createBlock as h, createCommentVNode as Z, withCtx as b, createTextVNode as L, ref as I, watch as Ve, normalizeStyle as fe, createVNode as K, getCurrentInstance as he, toRaw as Oe, onMounted as Fe, resolveDirective as Va, withDirectives as de, renderSlot as Pe, withModifiers as it, nextTick as Ie, TransitionGroup as dt, useCssVars as pt, resolveComponent as ft, isRef as $e, vShow as ht, reactive as mt, createSlots as xe, withKeys as Xe, normalizeProps as Ze, guardReactiveProps as ea } from "vue";
3
+ import { createTypes as yt } from "vue-types";
4
4
  import { PictureFilled as Le } from "@element-plus/icons-vue";
5
- import mt from "axios";
6
- import { compressAccurately as yt } from "image-conversion";
7
- import { defineStore as _a } from "pinia";
5
+ import gt from "axios";
6
+ import { compressAccurately as bt } from "image-conversion";
7
+ import { defineStore as Sa } from "pinia";
8
8
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
9
- import { Quill as gt, QuillEditor as bt } from "@vueup/vue-quill";
10
- import { useI18n as wa } from "vue-i18n";
11
- import vt from "dayjs";
12
- import kt from "file-saver";
13
- const oe = ht({
9
+ import { Quill as vt, QuillEditor as kt } from "@vueup/vue-quill";
10
+ import { useI18n as $a } from "vue-i18n";
11
+ import _t from "dayjs";
12
+ import wt from "file-saver";
13
+ const oe = yt({
14
14
  func: void 0,
15
15
  bool: void 0,
16
16
  string: void 0,
17
17
  number: void 0,
18
18
  object: void 0,
19
19
  integer: void 0
20
- }), _t = ["xlink:href", "fill"], wt = /* @__PURE__ */ pe({
20
+ }), Vt = ["xlink:href", "fill"], St = /* @__PURE__ */ pe({
21
21
  __name: "index",
22
22
  props: {
23
23
  iconClass: oe.string.isRequired,
24
24
  className: oe.string.def(""),
25
25
  color: oe.string.def("")
26
26
  },
27
- setup(a) {
28
- const l = a, t = J(() => `#icon-${l.iconClass}`), e = J(() => l.className ? `svg-icon ${l.className}` : "svg-icon");
27
+ setup(e) {
28
+ const l = e, t = J(() => `#icon-${l.iconClass}`), a = J(() => l.className ? `svg-icon ${l.className}` : "svg-icon");
29
29
  return (c, o) => (s(), T("svg", {
30
- class: je(r(e)),
30
+ class: He(r(a)),
31
31
  "aria-hidden": "true"
32
32
  }, [
33
33
  re("use", {
34
34
  "xlink:href": r(t),
35
- fill: a.color
36
- }, null, 8, _t)
35
+ fill: e.color
36
+ }, null, 8, Vt)
37
37
  ], 2));
38
38
  }
39
- }), be = (a, l) => {
40
- const t = a.__vccOpts || a;
41
- for (const [e, c] of l)
42
- t[e] = c;
39
+ }), be = (e, l) => {
40
+ const t = e.__vccOpts || e;
41
+ for (const [a, c] of l)
42
+ t[a] = c;
43
43
  return t;
44
- }, Fe = /* @__PURE__ */ be(wt, [["__scopeId", "data-v-ed552a8d"]]), Va = /* @__PURE__ */ pe({
44
+ }, Ne = /* @__PURE__ */ be(St, [["__scopeId", "data-v-ed552a8d"]]), Da = /* @__PURE__ */ pe({
45
45
  __name: "index",
46
46
  props: {
47
47
  options: {
@@ -58,28 +58,28 @@ const oe = ht({
58
58
  default: "、"
59
59
  }
60
60
  },
61
- setup(a) {
62
- const l = a, t = J(() => {
63
- const e = l.value;
64
- if (e === "" || e === null || typeof e > "u")
61
+ setup(e) {
62
+ const l = e, t = J(() => {
63
+ const a = l.value;
64
+ if (a === "" || a === null || typeof a > "u")
65
65
  return "";
66
66
  const c = (o) => {
67
67
  var y;
68
- const u = (y = l.options) == null ? void 0 : y.find((f) => f.value == o || f.label == o);
69
- return (u == null ? void 0 : u.label) ?? "";
68
+ const i = (y = l.options) == null ? void 0 : y.find((f) => f.value == o || f.label == o);
69
+ return (i == null ? void 0 : i.label) ?? "";
70
70
  };
71
- if (Array.isArray(e))
72
- return e.map((o) => c(o)).filter(Boolean).join(l.separator);
73
- if (typeof e == "string") {
71
+ if (Array.isArray(a))
72
+ return a.map((o) => c(o)).filter(Boolean).join(l.separator);
73
+ if (typeof a == "string") {
74
74
  let o = [];
75
- if (e.indexOf(",") > -1 ? o = e.split(",") : e.indexOf("、") > -1 && (o = e.split("、")), o.length > 0)
76
- return o.map((u) => c(u)).filter(Boolean).join(l.separator);
75
+ if (a.indexOf(",") > -1 ? o = a.split(",") : a.indexOf("、") > -1 && (o = a.split("、")), o.length > 0)
76
+ return o.map((i) => c(i)).filter(Boolean).join(l.separator);
77
77
  }
78
- return c(e) || e;
78
+ return c(a) || a;
79
79
  });
80
- return (e, c) => (s(), T("span", null, M(r(t)), 1));
80
+ return (a, c) => (s(), T("span", null, M(r(t)), 1));
81
81
  }
82
- }), Vt = /* @__PURE__ */ pe({
82
+ }), $t = /* @__PURE__ */ pe({
83
83
  __name: "index",
84
84
  props: {
85
85
  options: {
@@ -91,37 +91,37 @@ const oe = ht({
91
91
  default: ""
92
92
  }
93
93
  },
94
- setup(a) {
95
- const l = a, t = J(() => {
96
- const e = l.value;
97
- if (e === "" || e === null || typeof e > "u")
94
+ setup(e) {
95
+ const l = e, t = J(() => {
96
+ const a = l.value;
97
+ if (a === "" || a === null || typeof a > "u")
98
98
  return "";
99
- if (Array.isArray(e)) {
99
+ if (Array.isArray(a)) {
100
100
  const c = [];
101
101
  return l.options.map((o) => {
102
- (e.indexOf(o.value) > -1 || e.indexOf(o.label) > -1) && c.push(o);
102
+ (a.indexOf(o.value) > -1 || a.indexOf(o.label) > -1) && c.push(o);
103
103
  }), c;
104
- } else if (typeof e == "string") {
104
+ } else if (typeof a == "string") {
105
105
  let c = [];
106
- if (e.indexOf(",") > -1 ? c = e.split(",") : e.indexOf("、") > -1 && (c = e.split("、")), c.length > 0) {
106
+ if (a.indexOf(",") > -1 ? c = a.split(",") : a.indexOf("、") > -1 && (c = a.split("、")), c.length > 0) {
107
107
  const o = [];
108
- return l.options.map((u) => {
109
- (c.indexOf(u.value) > -1 || c.indexOf(u.label) > -1) && o.push(u);
108
+ return l.options.map((i) => {
109
+ (c.indexOf(i.value) > -1 || c.indexOf(i.label) > -1) && o.push(i);
110
110
  }), o;
111
111
  }
112
112
  }
113
- return l.options.find((c) => c.value == e || c.label == e) || e;
113
+ return l.options.find((c) => c.value == a || c.label == a) || a;
114
114
  });
115
- return (e, c) => {
116
- const o = na;
117
- return Array.isArray(r(t)) ? (s(!0), T(z, { key: 0 }, Q(r(t), (u) => (s(), T(z, null, [
118
- u.label ? (s(), h(o, {
115
+ return (a, c) => {
116
+ const o = ua;
117
+ return Array.isArray(r(t)) ? (s(!0), T(z, { key: 0 }, Q(r(t), (i) => (s(), T(z, null, [
118
+ i.label ? (s(), h(o, {
119
119
  "disable-transitions": !0,
120
- key: u.value,
121
- type: u.elTagType || "primary"
120
+ key: i.value,
121
+ type: i.elTagType || "primary"
122
122
  }, {
123
123
  default: b(() => [
124
- L(M(u.label), 1)
124
+ L(M(i.label), 1)
125
125
  ]),
126
126
  _: 2
127
127
  }, 1032, ["type"])) : Z("", !0)
@@ -139,34 +139,34 @@ const oe = ht({
139
139
  ], 64));
140
140
  };
141
141
  }
142
- }), Sa = /* @__PURE__ */ be(Vt, [["__scopeId", "data-v-9a5060d2"]]);
143
- let Ue = null, $a = () => ({}), Ne = "";
144
- const St = () => {
145
- const a = mt.create({ baseURL: Ne, timeout: 5e4 });
146
- return a.interceptors.response.use(
142
+ }), Ca = /* @__PURE__ */ be($t, [["__scopeId", "data-v-9a5060d2"]]);
143
+ let Ue = null, Ta = () => ({}), Ke = "";
144
+ const Dt = () => {
145
+ const e = gt.create({ baseURL: Ke, timeout: 5e4 });
146
+ return e.interceptors.response.use(
147
147
  (l) => l.data,
148
148
  (l) => Promise.reject(l)
149
- ), a;
150
- }, ke = () => (Ue || (Ue = St()), Ue), $t = (a) => {
151
- Ue = a;
152
- }, Ke = () => $a(), Dt = (a) => {
153
- $a = a;
154
- }, We = () => Ne, Ct = (a) => {
155
- Ne = a || "";
149
+ ), e;
150
+ }, ke = () => (Ue || (Ue = Dt()), Ue), Ct = (e) => {
151
+ Ue = e;
152
+ }, We = () => Ta(), Tt = (e) => {
153
+ Ta = e;
154
+ }, qe = () => Ke, Et = (e) => {
155
+ Ke = e || "";
156
156
  };
157
- function qe(a) {
157
+ function Qe(e) {
158
158
  return ke()({
159
- url: "/resource/oss/listByIds/" + a,
159
+ url: "/resource/oss/listByIds/" + e,
160
160
  method: "get"
161
161
  });
162
162
  }
163
- function Da(a) {
163
+ function Ea(e) {
164
164
  return ke()({
165
- url: "/resource/oss/" + a,
165
+ url: "/resource/oss/" + e,
166
166
  method: "delete"
167
167
  });
168
168
  }
169
- const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
169
+ const Ut = { class: "image-slot" }, At = { key: 1 }, Ot = /* @__PURE__ */ pe({
170
170
  __name: "index",
171
171
  props: {
172
172
  modelValue: [String, Object, Array, Number],
@@ -179,37 +179,37 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
179
179
  default: ""
180
180
  }
181
181
  },
182
- setup(a) {
183
- const l = a, t = I(""), e = J(() => t.value ? t.value.split(",")[0] : void 0), c = J(() => {
182
+ setup(e) {
183
+ const l = e, t = I(""), a = J(() => t.value ? t.value.split(",")[0] : void 0), c = J(() => {
184
184
  if (!t.value) return;
185
- const u = t.value.split(","), y = [];
186
- return u.forEach((f) => y.push(f)), y;
185
+ const i = t.value.split(","), y = [];
186
+ return i.forEach((f) => y.push(f)), y;
187
187
  }), o = J(() => {
188
- const u = l.width;
189
- return typeof u == "string" ? u : `${u}px`;
188
+ const i = l.width;
189
+ return typeof i == "string" ? i : `${i}px`;
190
190
  });
191
191
  return J(() => {
192
- const u = l.height;
193
- return typeof u == "string" ? u : `${u}px`;
194
- }), Ve(() => l.modelValue, async (u) => {
195
- if (u) {
192
+ const i = l.height;
193
+ return typeof i == "string" ? i : `${i}px`;
194
+ }), Ve(() => l.modelValue, async (i) => {
195
+ if (i) {
196
196
  let y;
197
- Array.isArray(u) ? y = u : y = (await qe(u)).data, t.value = y.map((f) => f.url).join(",");
197
+ Array.isArray(i) ? y = i : y = (await Qe(i)).data, t.value = y.map((f) => f.url).join(",");
198
198
  } else t.value = "";
199
- }, { immediate: !0, deep: !0 }), (u, y) => {
200
- const f = Ye, w = Be;
199
+ }, { immediate: !0, deep: !0 }), (i, y) => {
200
+ const f = Me, V = Ye;
201
201
  return s(), T("div", null, [
202
- r(e) ? (s(), h(w, {
202
+ r(a) ? (s(), h(V, {
203
203
  key: 0,
204
- src: `${r(e)}`,
204
+ src: `${r(a)}`,
205
205
  fit: "scale-down",
206
206
  loading: "lazy",
207
- style: he(`width:${r(o)};height:${r(o)};`),
207
+ style: fe(`width:${r(o)};height:${r(o)};`),
208
208
  "preview-src-list": r(c),
209
209
  "preview-teleported": ""
210
210
  }, {
211
211
  error: b(() => [
212
- re("div", Tt, [
212
+ re("div", Ut, [
213
213
  K(f, null, {
214
214
  default: b(() => [
215
215
  K(r(Le))
@@ -219,10 +219,10 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
219
219
  ])
220
220
  ]),
221
221
  _: 1
222
- }, 8, ["src", "style", "preview-src-list"])) : (s(), T("div", Et, [
222
+ }, 8, ["src", "style", "preview-src-list"])) : (s(), T("div", At, [
223
223
  re("div", {
224
224
  class: "image-slot",
225
- style: he(`width:${r(o)};height:${r(o)};`)
225
+ style: fe(`width:${r(o)};height:${r(o)};`)
226
226
  }, [
227
227
  K(f, null, {
228
228
  default: b(() => [
@@ -235,7 +235,7 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
235
235
  ]);
236
236
  };
237
237
  }
238
- }), Ca = /* @__PURE__ */ be(Ut, [["__scopeId", "data-v-dc163acb"]]), At = { class: "image-slot" }, Ot = /* @__PURE__ */ pe({
238
+ }), Ua = /* @__PURE__ */ be(Ot, [["__scopeId", "data-v-dc163acb"]]), Pt = { class: "image-slot" }, It = /* @__PURE__ */ pe({
239
239
  __name: "index",
240
240
  props: {
241
241
  data: {
@@ -251,26 +251,26 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
251
251
  default: 60
252
252
  }
253
253
  },
254
- setup(a) {
255
- const l = a, t = J(
254
+ setup(e) {
255
+ const l = e, t = J(
256
256
  () => typeof l.width == "string" ? l.width : `${l.width}px`
257
- ), e = J(
257
+ ), a = J(
258
258
  () => typeof l.height == "string" ? l.height : `${l.height}px`
259
259
  );
260
260
  return (c, o) => {
261
- const u = Ye, y = Be, f = Fe;
261
+ const i = Me, y = Ye, f = Ne;
262
262
  return s(), T("span", null, [
263
- [".jpg", ".png", ".jpeg"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(y, {
263
+ [".jpg", ".png", ".jpeg"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(y, {
264
264
  key: 0,
265
- src: a.data.url,
265
+ src: e.data.url,
266
266
  fit: "cover",
267
- "preview-src-list": [a.data.url],
268
- style: he(`width:${r(t)};height:${r(e)};`),
267
+ "preview-src-list": [e.data.url],
268
+ style: fe(`width:${r(t)};height:${r(a)};`),
269
269
  "preview-teleported": ""
270
270
  }, {
271
271
  error: b(() => [
272
- re("div", At, [
273
- K(u, null, {
272
+ re("div", Pt, [
273
+ K(i, null, {
274
274
  default: b(() => [
275
275
  K(r(Le))
276
276
  ]),
@@ -279,49 +279,49 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
279
279
  ])
280
280
  ]),
281
281
  _: 1
282
- }, 8, ["src", "preview-src-list", "style"])) : [".xls", ".xlsx", ".csv"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(f, {
282
+ }, 8, ["src", "preview-src-list", "style"])) : [".xls", ".xlsx", ".csv"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(f, {
283
283
  key: 1,
284
284
  "icon-class": "excel",
285
- style: he(`width:${r(t)};height:${r(e)};`)
286
- }, null, 8, ["style"])) : [".doc", ".docx"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(f, {
285
+ style: fe(`width:${r(t)};height:${r(a)};`)
286
+ }, null, 8, ["style"])) : [".doc", ".docx"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(f, {
287
287
  key: 2,
288
288
  "icon-class": "word",
289
- style: he(`width:${r(t)};height:${r(e)};`)
290
- }, null, 8, ["style"])) : [".pdf"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(f, {
289
+ style: fe(`width:${r(t)};height:${r(a)};`)
290
+ }, null, 8, ["style"])) : [".pdf"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(f, {
291
291
  key: 3,
292
292
  "icon-class": "pdf",
293
- style: he(`width:${r(t)};height:${r(e)};`)
294
- }, null, 8, ["style"])) : [".tet"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(f, {
293
+ style: fe(`width:${r(t)};height:${r(a)};`)
294
+ }, null, 8, ["style"])) : [".tet"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(f, {
295
295
  key: 4,
296
296
  "icon-class": "tet",
297
- style: he(`width:${r(t)};height:${r(e)};`)
298
- }, null, 8, ["style"])) : [".zip"].indexOf(a.data.fileSuffix) > -1 ? (s(), h(f, {
297
+ style: fe(`width:${r(t)};height:${r(a)};`)
298
+ }, null, 8, ["style"])) : [".zip"].indexOf(e.data.fileSuffix) > -1 ? (s(), h(f, {
299
299
  key: 5,
300
300
  "icon-class": "zip",
301
- style: he(`width:${r(t)};height:${r(e)};`)
301
+ style: fe(`width:${r(t)};height:${r(a)};`)
302
302
  }, null, 8, ["style"])) : (s(), h(f, {
303
303
  key: 6,
304
304
  "icon-class": "unknown",
305
- style: he(`width:${r(t)};height:${r(e)};`)
305
+ style: fe(`width:${r(t)};height:${r(a)};`)
306
306
  }, null, 8, ["style"]))
307
307
  ]);
308
308
  };
309
309
  }
310
- }), Ta = /* @__PURE__ */ be(Ot, [["__scopeId", "data-v-a3763021"]]), Ea = {
310
+ }), Aa = /* @__PURE__ */ be(It, [["__scopeId", "data-v-a3763021"]]), Oa = {
311
311
  bool: [
312
312
  { label: "是", value: "1" },
313
313
  { label: "否", value: "0" },
314
314
  { label: "是", value: "True" },
315
315
  { label: "否", value: "False" }
316
316
  ]
317
- }, Pt = [
317
+ }, xt = [
318
318
  { prop: "createTime", width: "165px" },
319
319
  { prop: "createBy", width: "100px" },
320
320
  { prop: "orderNum", width: "80px" },
321
321
  { prop: "sort", width: "80px" },
322
322
  { prop: "code", width: "120px" },
323
323
  { prop: "updateTime", width: "165px" }
324
- ], It = [10, 15, 20, 30, 50, 100], Xe = {
324
+ ], Lt = [10, 15, 20, 30, 50, 100], aa = {
325
325
  pageSize: 15,
326
326
  pageNum: 1,
327
327
  total: 0,
@@ -330,37 +330,37 @@ const Tt = { class: "image-slot" }, Et = { key: 1 }, Ut = /* @__PURE__ */ pe({
330
330
  }, Ae = {
331
331
  FULL: "total, sizes, prev, pager, next",
332
332
  SIMPLE: "total"
333
- }, Ze = 30, xt = 28;
334
- function ze(a) {
335
- if (!a) return {};
333
+ }, ta = 30, zt = 28;
334
+ function ze(e) {
335
+ if (!e) return {};
336
336
  const l = {};
337
- for (const t in a) {
338
- const e = a[t];
339
- e !== "" && e !== null && e !== void 0 && (!Array.isArray(e) || e.length > 0) && (l[t] = e);
337
+ for (const t in e) {
338
+ const a = e[t];
339
+ a !== "" && a !== null && a !== void 0 && (!Array.isArray(a) || a.length > 0) && (l[t] = a);
340
340
  }
341
341
  return l;
342
342
  }
343
- function Lt(a) {
344
- if (a.width) return String(a.width);
345
- const l = Pt.find((t) => t.prop === a.prop);
346
- return l ? l.width : a.prop.includes("time") ? "100px" : "auto";
343
+ function Bt(e) {
344
+ if (e.width) return String(e.width);
345
+ const l = xt.find((t) => t.prop === e.prop);
346
+ return l ? l.width : e.prop.includes("time") ? "100px" : "auto";
347
347
  }
348
- function zt(a, l) {
348
+ function Yt(e, l) {
349
349
  if (!l.prop) return "";
350
350
  let t;
351
- if (l.prop.includes(".") ? t = l.prop.split(".").reduce((c, o) => c == null ? void 0 : c[o], a) : t = a[l.prop], t != null) {
352
- const e = l.prefix || "", c = l.suffix || "";
353
- return `${e}${t}${c}`;
351
+ if (l.prop.includes(".") ? t = l.prop.split(".").reduce((c, o) => c == null ? void 0 : c[o], e) : t = e[l.prop], t != null) {
352
+ const a = l.prefix || "", c = l.suffix || "";
353
+ return `${a}${t}${c}`;
354
354
  }
355
355
  return "";
356
356
  }
357
- function Bt(a) {
358
- a.forEach((l) => {
357
+ function Mt(e) {
358
+ e.forEach((l) => {
359
359
  l.form || (l.form = { order: 100 }), l.form.order == null && (l.form.order = 100), !l.form.type && l.type && (l.form.type = l.type), !l.form.prop && l.prop && (l.form.prop = l.prop), l.search && !l.search.dictType && l.dictType && (l.search.dictType = l.dictType), !l.form.dictType && l.dictType && (l.form.dictType = l.dictType), !l.form.inactiveValue && l.inactiveValue && (l.form.inactiveValue = l.inactiveValue), !l.form.activeValue && l.activeValue && (l.form.activeValue = l.activeValue), l.form.type === "checkbox" && (l.label = ""), l.search && (l.search.prop = l.search.prop ?? l.prop);
360
360
  });
361
361
  }
362
- function Yt(a) {
363
- a.forEach((l) => {
362
+ function Rt(e) {
363
+ e.forEach((l) => {
364
364
  if (!l.form) return;
365
365
  const t = l.form.rules || [];
366
366
  l.form.required && t.push({
@@ -370,69 +370,69 @@ function Yt(a) {
370
370
  }), l.form.rules = t.length > 0 ? t : void 0;
371
371
  });
372
372
  }
373
- function Ua(a, l = "order") {
374
- return [...a].sort((t, e) => {
373
+ function Pa(e, l = "order") {
374
+ return [...e].sort((t, a) => {
375
375
  const c = (y, f) => {
376
- const w = f.split(".");
376
+ const V = f.split(".");
377
377
  let p = y;
378
- for (const R of w)
378
+ for (const R of V)
379
379
  p = p == null ? void 0 : p[R];
380
380
  return p ?? 100;
381
- }, o = c(t, l), u = c(e, l);
382
- return o - u;
381
+ }, o = c(t, l), i = c(a, l);
382
+ return o - i;
383
383
  });
384
384
  }
385
- function Mt(a, l, t) {
386
- return a.filter((e) => !(e.canEdit === !1 || t && e.canUpdate === !1 || !t && e.canCreate === !1));
385
+ function jt(e, l, t) {
386
+ return e.filter((a) => !(a.canEdit === !1 || t && a.canUpdate === !1 || !t && a.canCreate === !1));
387
387
  }
388
- function Rt(a, l) {
388
+ function Ht(e, l) {
389
389
  if (!l.show) return !0;
390
390
  for (const t in l.show)
391
- if (l.show[t].includes(a[t]))
391
+ if (l.show[t].includes(e[t]))
392
392
  return !0;
393
393
  return !1;
394
394
  }
395
- function jt(a, l) {
395
+ function Ft(e, l) {
396
396
  if (!l.disable && !l.enable) return !1;
397
397
  for (const t in l.disable)
398
- if (l.disable[t].includes(a[t]))
398
+ if (l.disable[t].includes(e[t]))
399
399
  return !0;
400
400
  for (const t in l.enable)
401
- if (!l.enable[t].includes(a[t]))
401
+ if (!l.enable[t].includes(e[t]))
402
402
  return !0;
403
403
  return !1;
404
404
  }
405
- function Ht(a, l, t, e) {
406
- l && l[0] && l[1] && (a[t] = `${l[0]},${l[1]}`, e == null || e.addDateRange(a, l, t));
405
+ function Nt(e, l, t, a) {
406
+ l && l[0] && l[1] && (e[t] = `${l[0]},${l[1]}`, a == null || a.addDateRange(e, l, t));
407
407
  }
408
- function Ft(a) {
409
- const { proxy: l } = me(), t = I([]), e = I(!1), c = I([]), o = I({}), u = I(), y = I({
410
- ...Xe,
411
- pageSize: a.initialPageSize ?? Xe.pageSize
412
- }), f = I(It), w = I(Ae.FULL), p = async () => {
408
+ function Kt(e) {
409
+ const { proxy: l } = he(), t = I([]), a = I(!1), c = I([]), o = I({}), i = I(), y = I({
410
+ ...aa,
411
+ pageSize: e.initialPageSize ?? aa.pageSize
412
+ }), f = I(Lt), V = I(Ae.FULL), p = async () => {
413
413
  var U;
414
- if (!a.listApi) {
415
- a.data ? t.value = Array.isArray(a.data) ? a.data : ((U = a.data) == null ? void 0 : U.value) || [] : t.value = [];
414
+ if (!e.listApi) {
415
+ e.data ? t.value = Array.isArray(e.data) ? e.data : ((U = e.data) == null ? void 0 : U.value) || [] : t.value = [];
416
416
  return;
417
417
  }
418
- e.value = !0;
418
+ a.value = !0;
419
419
  try {
420
- const k = await R(null), E = await a.listApi(k);
421
- a.afterQuery && await a.afterQuery(E);
420
+ const k = await R(null), E = await e.listApi(k);
421
+ e.afterQuery && await e.afterQuery(E);
422
422
  let O = E.rows || E.data;
423
- a.treeProps && (O = l == null ? void 0 : l.handleTree(E.data, a.rowKey)), t.value = O, y.value.total = E.total;
423
+ e.treeProps && (O = l == null ? void 0 : l.handleTree(E.data, e.rowKey)), t.value = O, y.value.total = E.total;
424
424
  const W = E.total / y.value.pageSize <= 1;
425
- w.value = W ? Ae.SIMPLE : Ae.FULL, l == null || l.$forceUpdate();
425
+ V.value = W ? Ae.SIMPLE : Ae.FULL, l == null || l.$forceUpdate();
426
426
  } catch (k) {
427
427
  console.error("Query failed:", k);
428
428
  } finally {
429
- e.value = !1;
429
+ a.value = !1;
430
430
  }
431
431
  }, R = async (U) => {
432
432
  U && (o.value = ze(U));
433
- let k = a.queryParams || {};
434
- if (a.beforeQuery) {
435
- const E = await a.beforeQuery({});
433
+ let k = e.queryParams || {};
434
+ if (e.beforeQuery) {
435
+ const E = await e.beforeQuery({});
436
436
  k = {
437
437
  ...y.value,
438
438
  ...k,
@@ -455,22 +455,22 @@ function Ft(a) {
455
455
  }, H = (U) => {
456
456
  U.order && (y.value.orderByColumn = U.prop, y.value.isAsc = U.order), p();
457
457
  }, X = (U) => {
458
- c.value = U, a.selectionChange && a.selectionChange(U);
458
+ c.value = U, e.selectionChange && e.selectionChange(U);
459
459
  }, ee = () => {
460
- const U = a.queryParams || {};
461
- U.orderByColumn && (y.value.orderByColumn = U.orderByColumn, u.value = {
460
+ const U = e.queryParams || {};
461
+ U.orderByColumn && (y.value.orderByColumn = U.orderByColumn, i.value = {
462
462
  prop: U.orderByColumn,
463
463
  order: U.isAsc === "asc" ? "ascending" : "descending"
464
464
  }), U.isAsc && (y.value.isAsc = U.isAsc);
465
465
  };
466
466
  return {
467
467
  listData: t,
468
- loading: e,
468
+ loading: a,
469
469
  multipleSelection: c,
470
470
  pageOptions: y,
471
471
  listSize: f,
472
- pagingLayout: w,
473
- defaultSort: u,
472
+ pagingLayout: V,
473
+ defaultSort: i,
474
474
  executeQuery: p,
475
475
  getQueryParams: R,
476
476
  refreshTable: D,
@@ -483,55 +483,55 @@ function Ft(a) {
483
483
  }
484
484
  };
485
485
  }
486
- function Aa() {
487
- const { proxy: a } = me(), l = async (o) => {
488
- for (const u of o)
489
- if (u.type === "dictTag" || u.type === "dictText") {
490
- const y = await (a == null ? void 0 : a.useOneDict(u.dictType));
491
- u.data = Oe(y);
492
- } else if (u.type === "commonDictTag" || u.type === "commonDictText") {
493
- const y = await (a == null ? void 0 : a.useOneCommonDict(u.dictType));
494
- u.data = Oe(y);
486
+ function Ia() {
487
+ const { proxy: e } = he(), l = async (o) => {
488
+ for (const i of o)
489
+ if (i.type === "dictTag" || i.type === "dictText") {
490
+ const y = await (e == null ? void 0 : e.useOneDict(i.dictType));
491
+ i.data = Oe(y);
492
+ } else if (i.type === "commonDictTag" || i.type === "commonDictText") {
493
+ const y = await (e == null ? void 0 : e.useOneCommonDict(i.dictType));
494
+ i.data = Oe(y);
495
495
  }
496
496
  }, t = async (o) => {
497
497
  if (!o.search) return;
498
498
  switch (o.search.type) {
499
499
  case "selectApi":
500
- o.search.api ? await e(o) : console.error(`${o.prop}中search对象未设置api参数`);
500
+ o.search.api ? await a(o) : console.error(`${o.prop}中search对象未设置api参数`);
501
501
  break;
502
502
  case "treeSelectApi":
503
503
  o.search.api ? await c(o) : console.error(`${o.prop}中search对象未设置api参数`);
504
504
  break;
505
505
  case "selectCommonDict":
506
- o.search.data = await (a == null ? void 0 : a.useOneCommonDict(o.search.dictType));
506
+ o.search.data = await (e == null ? void 0 : e.useOneCommonDict(o.search.dictType));
507
507
  break;
508
508
  case "selectDict":
509
- o.search.data = await (a == null ? void 0 : a.useOneDict(o.search.dictType));
509
+ o.search.data = await (e == null ? void 0 : e.useOneDict(o.search.dictType));
510
510
  break;
511
511
  }
512
- }, e = async (o) => {
512
+ }, a = async (o) => {
513
513
  var y;
514
514
  if (!((y = o.search) != null && y.api)) return;
515
- const u = {
515
+ const i = {
516
516
  pageNum: 1,
517
517
  pageSize: 1e3,
518
518
  filedName: o.prop,
519
519
  ...o.search.apiParams || {}
520
520
  };
521
521
  try {
522
- const f = await o.search.api(u);
522
+ const f = await o.search.api(i);
523
523
  o.search.data = f.data || f.rows;
524
524
  } catch (f) {
525
525
  console.error(`Failed to load API data for ${o.prop}:`, f);
526
526
  }
527
527
  }, c = async (o) => {
528
- var u;
529
- if ((u = o.search) != null && u.api)
528
+ var i;
529
+ if ((i = o.search) != null && i.api)
530
530
  try {
531
531
  const y = await o.search.api({ pageNum: 1, pageSize: 1e3 });
532
532
  if (o.search.data = y.data || y.rows || y, o.search.data && Array.isArray(o.search.data)) {
533
- const w = (o.search.props || { value: "id", label: "label", children: "children" }).value || "id";
534
- o.search.defaultExpandedKeys = o.search.data.map((p) => p[w]);
533
+ const V = (o.search.props || { value: "id", label: "label", children: "children" }).value || "id";
534
+ o.search.defaultExpandedKeys = o.search.data.map((p) => p[V]);
535
535
  }
536
536
  } catch (y) {
537
537
  console.error(`Failed to load tree API data for ${o.prop}:`, y);
@@ -540,29 +540,48 @@ function Aa() {
540
540
  return {
541
541
  initColumnDicts: l,
542
542
  initSearchDicts: t,
543
- initSelectApi: e
543
+ initSelectApi: a
544
544
  };
545
545
  }
546
- const Nt = {
546
+ let Ge = () => !0, xa = () => !0;
547
+ const Wt = (e) => {
548
+ e.hasPermi && (Ge = e.hasPermi), e.hasRoles && (xa = e.hasRoles);
549
+ }, Be = (e) => {
550
+ if (e == null) return !0;
551
+ const l = Array.isArray(e) ? e : [e];
552
+ return l.length === 0 ? !0 : Ge(l);
553
+ }, qt = {
554
+ mounted(e, l) {
555
+ var a;
556
+ const { value: t } = l;
557
+ t != null && Array.isArray(t) && t.length > 0 && (Ge(t) || (a = e.parentNode) == null || a.removeChild(e));
558
+ }
559
+ }, Qt = {
560
+ mounted(e, l) {
561
+ var a;
562
+ const { value: t } = l;
563
+ t != null && Array.isArray(t) && t.length > 0 && (xa(t) || (a = e.parentNode) == null || a.removeChild(e));
564
+ }
565
+ }, Gt = {
547
566
  key: 2,
548
567
  class: "image-style"
549
- }, Kt = {
568
+ }, Jt = {
550
569
  key: 3,
551
570
  class: "image-style"
552
- }, Wt = {
571
+ }, Xt = {
553
572
  key: 8,
554
573
  class: "color-cell"
555
- }, qt = { style: { margin: "20px 0px" } }, Qt = /* @__PURE__ */ pe({
574
+ }, Zt = { style: { margin: "20px 0px" } }, el = /* @__PURE__ */ pe({
556
575
  __name: "curdTable",
557
576
  props: {
558
577
  dataSource: {},
559
578
  maxHeight: {}
560
579
  },
561
580
  emits: ["actionEvent", "selectionChange", "rowClick"],
562
- setup(a, { expose: l, emit: t }) {
563
- const { proxy: e } = me(), c = t, o = a, u = J(() => o.dataSource.maxHeight ?? o.maxHeight), y = I(), {
581
+ setup(e, { expose: l, emit: t }) {
582
+ const { proxy: a } = he(), c = t, o = e, i = J(() => o.dataSource.maxHeight ?? o.maxHeight), y = I(), {
564
583
  listData: f,
565
- loading: w,
584
+ loading: V,
566
585
  multipleSelection: p,
567
586
  pageOptions: R,
568
587
  listSize: D,
@@ -571,101 +590,101 @@ const Nt = {
571
590
  refreshTable: H,
572
591
  handlePageChange: X,
573
592
  handleSizeChange: ee,
574
- handleSortChange: S,
593
+ handleSortChange: $,
575
594
  handleSelectionChange: U,
576
595
  initData: k,
577
596
  getQueryParams: E
578
- } = Ft(o.dataSource), { initColumnDicts: O } = Aa(), W = I(Ea), V = ($) => $ == null ? void 0 : $[o.dataSource.rowKey], d = J(() => o.dataSource.actions ? o.dataSource.actions.filter(
579
- ($) => $.action !== "create" && $.action !== "back" && (!$.position || $.position === "table")
580
- ) : []), C = ($) => {
597
+ } = Kt(o.dataSource), { initColumnDicts: O } = Ia(), W = I(Oa), S = (w) => w == null ? void 0 : w[o.dataSource.rowKey], d = J(() => o.dataSource.actions ? o.dataSource.actions.filter(
598
+ (w) => w.action !== "create" && w.action !== "back" && (!w.position || w.position === "table") && Be(w.permission)
599
+ ) : []), C = (w) => {
581
600
  var N;
582
- return !((N = o.dataSource.disabledCheckedRowKeys) != null && N.includes(V($)));
601
+ return !((N = o.dataSource.disabledCheckedRowKeys) != null && N.includes(S(w)));
583
602
  }, A = J(() => {
584
- const $ = o.dataSource.actionColumnWidth;
585
- if ($ != null && $ !== "")
586
- return typeof $ == "number" ? `${$}px` : $;
587
- let N = d.value.length * xt;
588
- return N < Ze && (N = Ze), `${N + 40}px`;
589
- }), F = ($, N) => Rt($, N), G = ($, N) => jt($, N), se = ($) => Lt($), _ = ($) => {
603
+ const w = o.dataSource.actionColumnWidth;
604
+ if (w != null && w !== "")
605
+ return typeof w == "number" ? `${w}px` : w;
606
+ let N = d.value.length * zt;
607
+ return N < ta && (N = ta), `${N + 40}px`;
608
+ }), F = (w, N) => Ht(w, N), G = (w, N) => Ft(w, N), se = (w) => Bt(w), _ = (w) => Be(w == null ? void 0 : w.permission), x = (w) => {
590
609
  var ae;
591
- const N = $.align || o.dataSource.align;
592
- return N || (((ae = $.label) == null ? void 0 : ae.indexOf("時間")) > -1 || !1 || $.type == "dictTag" || $.type == "image" || $.type == "switch" ? "center" : "left");
593
- }, x = ($, N) => {
594
- const ae = e == null ? void 0 : e.useDict($.dictType)[$.dictType];
610
+ const N = w.align || o.dataSource.align;
611
+ return N || (((ae = w.label) == null ? void 0 : ae.indexOf("時間")) > -1 || !1 || w.type == "dictTag" || w.type == "image" || w.type == "switch" ? "center" : "left");
612
+ }, q = (w, N) => {
613
+ const ae = a == null ? void 0 : a.useDict(w.dictType)[w.dictType];
595
614
  if (ae != null) {
596
- const le = N[$.prop], te = ae.filter((ge) => ge.value == le);
615
+ const le = N[w.prop], te = ae.filter((ge) => ge.value == le);
597
616
  return te.length == 0 ? "" : te[0].label;
598
- } else console.error($.dictType + " 字典不存在");
599
- }, q = ($, N) => {
600
- const ae = W.value[$.dictType];
617
+ } else console.error(w.dictType + " 字典不存在");
618
+ }, Y = (w, N) => {
619
+ const ae = W.value[w.dictType];
601
620
  if (ae != null) {
602
- const le = N[$.prop], te = ae.find((ge) => ge.value == le);
621
+ const le = N[w.prop], te = ae.find((ge) => ge.value == le);
603
622
  return te == null ? "" : te.label;
604
- } else console.error($.dictType + " 字典不存在");
605
- }, Y = ($, N) => {
606
- if ($.data != null) {
607
- const ae = N[$.prop], le = $.data.find((te) => te.value == ae);
623
+ } else console.error(w.dictType + " 字典不存在");
624
+ }, ne = (w, N) => {
625
+ if (w.data != null) {
626
+ const ae = N[w.prop], le = w.data.find((te) => te.value == ae);
608
627
  return le == null ? "" : le.label;
609
628
  } else console.error("未配置data屬性");
610
- }, ne = ($, N) => {
611
- if ($.data != null) {
612
- const ae = N[$.prop], le = $.data.find((te) => te.value == ae);
629
+ }, ue = (w, N) => {
630
+ if (w.data != null) {
631
+ const ae = N[w.prop], le = w.data.find((te) => te.value == ae);
613
632
  return le == null ? "info" : le.tagType;
614
633
  } else console.error("未配置data屬性");
615
- }, ue = ($, N) => zt($, N), ye = ($) => {
616
- const N = Array.isArray($) ? $ : [];
634
+ }, me = (w, N) => Yt(w, N), ce = (w) => {
635
+ const N = Array.isArray(w) ? w : [];
617
636
  U(N), c("selectionChange", N);
618
- }, ce = ($, N, ae) => {
637
+ }, ye = (w, N, ae) => {
619
638
  var le, te;
620
- return (te = (le = o.dataSource).rowClick) == null ? void 0 : te.call(le, $, N, ae);
621
- }, fe = ($, N) => c("actionEvent", $, N), i = () => p.value, m = async () => {
639
+ return (te = (le = o.dataSource).rowClick) == null ? void 0 : te.call(le, w, N, ae);
640
+ }, u = (w, N) => c("actionEvent", w, N), m = () => p.value, n = async () => {
622
641
  var N, ae;
623
642
  if (!o.dataSource.showSelection || !((N = o.dataSource.checkedRowKeys) != null && N.length)) return;
624
643
  await Ie();
625
- const $ = y.value;
626
- if ($ != null && $.toggleRowSelection)
644
+ const w = y.value;
645
+ if (w != null && w.toggleRowSelection)
627
646
  for (const le of f.value) {
628
- const te = V(le);
647
+ const te = S(le);
629
648
  if (te == null) continue;
630
649
  const ge = String(te);
631
- (ae = o.dataSource.checkedRowKeys) != null && ae.includes(ge) && $.toggleRowSelection(le, !0);
650
+ (ae = o.dataSource.checkedRowKeys) != null && ae.includes(ge) && w.toggleRowSelection(le, !0);
632
651
  }
633
- }, n = async () => {
652
+ }, g = async () => {
634
653
  var N, ae;
635
654
  if (!o.dataSource.showSelection || !((N = o.dataSource.disabledCheckedRowKeys) != null && N.length)) return;
636
655
  await Ie();
637
- const $ = y.value;
638
- if ($ != null && $.toggleRowSelection)
656
+ const w = y.value;
657
+ if (w != null && w.toggleRowSelection)
639
658
  for (const le of f.value) {
640
- const te = V(le);
659
+ const te = S(le);
641
660
  if (te == null) continue;
642
661
  const ge = String(te);
643
- (ae = o.dataSource.disabledCheckedRowKeys) != null && ae.includes(ge) && $.toggleRowSelection(le, !0);
662
+ (ae = o.dataSource.disabledCheckedRowKeys) != null && ae.includes(ge) && w.toggleRowSelection(le, !0);
644
663
  }
645
- }, g = async () => {
646
- await O(o.dataSource.columns), await k(), await n(), await m();
664
+ }, Je = async () => {
665
+ await O(o.dataSource.columns), await k(), await g(), await n();
647
666
  };
648
- return He(() => g()), l({ refreshTable: H, getSelection: i, initData: g, getQueryParams: E }), ($, N) => {
649
- const ae = Xa, le = Be, te = sa, ge = ca, Se = na, Fa = Sa, Na = Va, Ka = Fe, Ce = De, Wa = Za, qa = Ja, Qa = at, Te = ka("hasPermi"), Ga = et;
667
+ return Fe(() => Je()), l({ refreshTable: H, getSelection: m, initData: Je, getQueryParams: E }), (w, N) => {
668
+ const ae = et, le = Ye, te = ia, ge = da, Se = ua, Ka = Ca, Wa = Da, qa = Ne, Ce = De, Qa = at, Ga = Za, Ja = lt, Te = Va("hasPermi"), Xa = tt;
650
669
  return s(), T("div", null, [
651
- de((s(), h(qa, {
670
+ de((s(), h(Ga, {
652
671
  ref_key: "curdTableRef",
653
672
  ref: y,
654
673
  data: r(f),
655
674
  "row-key": o.dataSource.rowKey,
656
- "element-loading-text": $.$t("數據加載中..."),
675
+ "element-loading-text": w.$t("數據加載中..."),
657
676
  stripe: "",
658
677
  "tree-props": o.dataSource.treeProps,
659
678
  "default-sort": r(P),
660
- onSelectionChange: ye,
661
- onSortChange: r(S),
662
- onRowClick: ce,
679
+ onSelectionChange: ce,
680
+ onSortChange: r($),
681
+ onRowClick: ye,
663
682
  "default-expand-all": o.dataSource.treeDefaultExpandAll ?? !1,
664
- "max-height": r(u),
683
+ "max-height": r(i),
665
684
  "highlight-current-row": ""
666
685
  }, {
667
686
  empty: b(() => [
668
- re("div", qt, M($.$t("未查詢到數據")), 1)
687
+ re("div", Zt, M(w.$t("未查詢到數據")), 1)
669
688
  ]),
670
689
  default: b(() => [
671
690
  o.dataSource.showSelection ? (s(), h(ae, {
@@ -685,51 +704,51 @@ const Nt = {
685
704
  (s(!0), T(z, null, Q(o.dataSource.columns, (v) => (s(), T(z, {
686
705
  key: v.prop || v.key
687
706
  }, [
688
- v.width !== 0 ? (s(), h(ae, {
707
+ v.width !== 0 && _(v) ? (s(), h(ae, {
689
708
  key: 0,
690
709
  label: v.label,
691
710
  width: se(v),
692
711
  "min-width": v.minWidth,
693
712
  prop: v.prop,
694
- align: _(v),
713
+ align: x(v),
695
714
  sortable: v.sort ? "custom" : !1,
696
715
  "show-overflow-tooltip": v.showOverflowTooltip || !0,
697
716
  fixed: v.fixed
698
717
  }, {
699
718
  default: b(({ row: B }) => [
700
- v.slot ? Pe($.$slots, v.slot, {
719
+ v.slot ? Pe(w.$slots, v.slot, {
701
720
  key: 0,
702
721
  row: B,
703
722
  column: v,
704
723
  value: B[v.prop]
705
- }, void 0, !0) : v.type === "image" && B[v.prop] ? (s(), h(Ca, {
724
+ }, void 0, !0) : v.type === "image" && B[v.prop] ? (s(), h(Ua, {
706
725
  key: 1,
707
726
  modelValue: B[v.prop],
708
727
  "onUpdate:modelValue": (ie) => B[v.prop] = ie,
709
728
  class: "image-preview",
710
729
  width: 24,
711
730
  height: 24
712
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "networkImage" ? (s(), T("view", Nt, [
731
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "networkImage" ? (s(), T("view", Gt, [
713
732
  K(le, {
714
733
  src: B[v.prop],
715
734
  fit: "cover",
716
735
  style: { height: "24px" }
717
736
  }, null, 8, ["src"])
718
- ])) : v.type === "imageUrl" ? (s(), T("view", Kt, [
737
+ ])) : v.type === "imageUrl" ? (s(), T("view", Jt, [
719
738
  K(le, {
720
739
  src: B[v.prop],
721
740
  fit: "cover",
722
741
  style: { height: "24px" }
723
742
  }, null, 8, ["src"])
724
743
  ])) : v.type === "date" ? (s(), T(z, { key: 4 }, [
725
- L(M($.parseTime(B[v.prop], "{y}-{m}-{d}")), 1)
744
+ L(M(w.parseTime(B[v.prop], "{y}-{m}-{d}")), 1)
726
745
  ], 64)) : v.type === "timestamp" ? (s(), T(z, { key: 5 }, [
727
- L(M($.parseTime(B[v.prop])), 1)
746
+ L(M(w.parseTime(B[v.prop])), 1)
728
747
  ], 64)) : v.type === "bool" ? (s(), h(te, {
729
748
  key: 6,
730
749
  modelValue: B[v.prop],
731
750
  "onUpdate:modelValue": (ie) => B[v.prop] = ie,
732
- onClick: N[0] || (N[0] = ct(() => {
751
+ onClick: N[0] || (N[0] = it(() => {
733
752
  }, ["stop", "prevent"]))
734
753
  }, null, 8, ["modelValue", "onUpdate:modelValue"])) : v.type === "switch" ? (s(), h(ge, {
735
754
  key: 7,
@@ -739,21 +758,21 @@ const Nt = {
739
758
  "inactive-value": v.inactiveValue || "1",
740
759
  size: "small",
741
760
  "before-change": () => !1
742
- }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : v.type === "color" ? (s(), T("div", Wt, [
761
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"])) : v.type === "color" ? (s(), T("div", Xt, [
743
762
  re("div", {
744
763
  class: "color-cell-item",
745
- style: he({ backgroundColor: B[v.prop] || "#ffffff" })
764
+ style: fe({ backgroundColor: B[v.prop] || "#ffffff" })
746
765
  }, null, 4)
747
766
  ])) : v.type === "fromDict" ? (s(), T(z, { key: 9 }, [
748
- L(M(x(v, B)), 1)
767
+ L(M(q(v, B)), 1)
749
768
  ], 64)) : v.type === "fromDataTag" ? (s(), h(Se, {
750
769
  key: 10,
751
- type: ne(v, B),
770
+ type: ue(v, B),
752
771
  effect: v.tagEffect ?? "light",
753
772
  class: "el-column-tag"
754
773
  }, {
755
774
  default: b(() => [
756
- L(M(Y(v, B)), 1)
775
+ L(M(ne(v, B)), 1)
757
776
  ]),
758
777
  _: 2
759
778
  }, 1032, ["type", "effect"])) : v.type === "localDict" ? (s(), h(Se, {
@@ -763,7 +782,7 @@ const Nt = {
763
782
  class: "el-column-tag"
764
783
  }, {
765
784
  default: b(() => [
766
- L(M(q(
785
+ L(M(Y(
767
786
  v,
768
787
  B
769
788
  )), 1)
@@ -802,24 +821,24 @@ const Nt = {
802
821
  L(M(ie[v.tagLabel]), 1)
803
822
  ]),
804
823
  _: 2
805
- }, 1032, ["type", "effect"]))), 128)) : v.type === "dictTag" || v.type === "commonDictTag" ? (s(), h(Fa, {
824
+ }, 1032, ["type", "effect"]))), 128)) : v.type === "dictTag" || v.type === "commonDictTag" ? (s(), h(Ka, {
806
825
  key: 15,
807
826
  options: v.data || [],
808
827
  value: B[v.prop]
809
- }, null, 8, ["options", "value"])) : v.type === "dictText" || v.type === "commonDictText" ? (s(), h(Na, {
828
+ }, null, 8, ["options", "value"])) : v.type === "dictText" || v.type === "commonDictText" ? (s(), h(Wa, {
810
829
  key: 16,
811
830
  options: v.data || [],
812
831
  value: B[v.prop]
813
- }, null, 8, ["options", "value"])) : v.type === "svg" ? (s(), h(Ka, {
832
+ }, null, 8, ["options", "value"])) : v.type === "svg" ? (s(), h(qa, {
814
833
  key: 17,
815
834
  "icon-class": B.icon
816
- }, null, 8, ["icon-class"])) : v.type === "ossFile" ? (s(), h(Ta, {
835
+ }, null, 8, ["icon-class"])) : v.type === "ossFile" ? (s(), h(Aa, {
817
836
  key: 18,
818
837
  data: B,
819
838
  width: 32,
820
839
  height: 32
821
840
  }, null, 8, ["data"])) : (s(), T(z, { key: 19 }, [
822
- L(M(ue(B, v)), 1)
841
+ L(M(me(B, v)), 1)
823
842
  ], 64))
824
843
  ]),
825
844
  _: 2
@@ -829,11 +848,11 @@ const Nt = {
829
848
  key: 2,
830
849
  align: "center",
831
850
  fixed: "right",
832
- label: $.$t("操作"),
851
+ label: w.$t("操作"),
833
852
  width: r(A)
834
853
  }, {
835
854
  default: b(({ row: v }) => [
836
- (s(!0), T(z, null, Q(r(d), (B) => (s(), h(Wa, {
855
+ (s(!0), T(z, null, Q(r(d), (B) => (s(), h(Qa, {
837
856
  content: B.text,
838
857
  placement: "top",
839
858
  key: B.action
@@ -845,7 +864,7 @@ const Nt = {
845
864
  link: "",
846
865
  type: "primary",
847
866
  icon: "Edit",
848
- onClick: (ie) => fe(B, v),
867
+ onClick: (ie) => u(B, v),
849
868
  disabled: G(v, B)
850
869
  }, null, 8, ["onClick", "disabled"])), [
851
870
  [Te, B.permission || null]
@@ -854,7 +873,7 @@ const Nt = {
854
873
  link: "",
855
874
  type: "primary",
856
875
  icon: "Delete",
857
- onClick: (ie) => fe(B, v),
876
+ onClick: (ie) => u(B, v),
858
877
  disabled: G(v, B)
859
878
  }, null, 8, ["onClick", "disabled"])), [
860
879
  [Te, B.permission || null]
@@ -863,7 +882,7 @@ const Nt = {
863
882
  link: "",
864
883
  type: "primary",
865
884
  icon: "View",
866
- onClick: (ie) => fe(B, v),
885
+ onClick: (ie) => u(B, v),
867
886
  disabled: G(v, B)
868
887
  }, null, 8, ["onClick", "disabled"])), [
869
888
  [Te, B.permission || null]
@@ -872,7 +891,7 @@ const Nt = {
872
891
  link: "",
873
892
  type: "primary",
874
893
  icon: B.icon,
875
- onClick: (ie) => fe(B, v),
894
+ onClick: (ie) => u(B, v),
876
895
  disabled: G(v, B)
877
896
  }, null, 8, ["icon", "onClick", "disabled"])), [
878
897
  [Te, B.permission || null]
@@ -887,9 +906,9 @@ const Nt = {
887
906
  ]),
888
907
  _: 3
889
908
  }, 8, ["data", "row-key", "element-loading-text", "tree-props", "default-sort", "onSortChange", "default-expand-all", "max-height"])), [
890
- [Ga, r(w)]
909
+ [Xa, r(V)]
891
910
  ]),
892
- o.dataSource.paging !== !1 ? (s(), h(Qa, {
911
+ o.dataSource.paging !== !1 ? (s(), h(Ja, {
893
912
  key: 0,
894
913
  class: "paging",
895
914
  background: "",
@@ -905,10 +924,10 @@ const Nt = {
905
924
  ]);
906
925
  };
907
926
  }
908
- }), ea = /* @__PURE__ */ be(Qt, [["__scopeId", "data-v-9b07eb1a"]]), Gt = { class: "upload-file" }, Jt = {
927
+ }), la = /* @__PURE__ */ be(el, [["__scopeId", "data-v-c59f4080"]]), al = { class: "upload-file" }, tl = {
909
928
  key: 0,
910
929
  class: "el-upload__tip"
911
- }, Xt = { style: { color: "#f56c6c" } }, Zt = { style: { color: "#f56c6c" } }, el = { class: "el-icon-document" }, al = { class: "ele-upload-list__item-content-action" }, tl = /* @__PURE__ */ pe({
930
+ }, ll = { style: { color: "#f56c6c" } }, ol = { style: { color: "#f56c6c" } }, rl = { class: "el-icon-document" }, nl = { class: "ele-upload-list__item-content-action" }, sl = /* @__PURE__ */ pe({
912
931
  __name: "index",
913
932
  props: {
914
933
  modelValue: [String, Object, Array],
@@ -924,15 +943,15 @@ const Nt = {
924
943
  showFileList: oe.bool.def(!0)
925
944
  },
926
945
  emits: ["update:modelValue"],
927
- setup(a, { emit: l }) {
928
- const t = a, { proxy: e } = me(), c = l, o = I(0), u = I([]), y = We(), f = I(y + "/resource/oss/upload"), w = I(Ke()), p = I([]), R = J(
946
+ setup(e, { emit: l }) {
947
+ const t = e, { proxy: a } = he(), c = l, o = I(0), i = I([]), y = qe(), f = I(y + "/resource/oss/upload"), V = I(We()), p = I([]), R = J(
929
948
  () => t.showTip && (t.fileType || t.fileSize)
930
949
  ), D = I();
931
950
  Ve(() => t.modelValue, async (E) => {
932
951
  if (E) {
933
952
  if (!t.showFileList) return;
934
953
  let O = 1, W = [];
935
- Array.isArray(E) ? W = E : W = (await qe(E)).data.map((d) => ({ name: d.originalName, url: d.url, ossId: d.ossId })), p.value = W.map((V) => (V = { name: V.name, url: V.url, ossId: V.ossId }, V.uid = V.uid || (/* @__PURE__ */ new Date()).getTime() + O++, V));
954
+ Array.isArray(E) ? W = E : W = (await Qe(E)).data.map((d) => ({ name: d.originalName, url: d.url, ossId: d.ossId })), p.value = W.map((S) => (S = { name: S.name, url: S.url, ossId: S.ossId }, S.uid = S.uid || (/* @__PURE__ */ new Date()).getTime() + O++, S));
936
955
  } else
937
956
  return p.value = [], [];
938
957
  }, { deep: !0, immediate: !0 });
@@ -940,41 +959,41 @@ const Nt = {
940
959
  if (t.fileType.length) {
941
960
  const O = E.name.split("."), W = O[O.length - 1];
942
961
  if (!(t.fileType.indexOf(W) >= 0))
943
- return e == null || e.$modal.msgError(`文件格式不正確, 請上傳${t.fileType.join("/")}格式文件!`), !1;
962
+ return a == null || a.$modal.msgError(`文件格式不正確, 請上傳${t.fileType.join("/")}格式文件!`), !1;
944
963
  }
945
- return t.fileSize && !(E.size / 1024 / 1024 < t.fileSize) ? (e == null || e.$modal.msgError(`上傳文件大小不超過 ${t.fileSize} MB!`), !1) : (e == null || e.$modal.loading("正在上傳文件,請稍等..."), o.value++, !0);
964
+ return t.fileSize && !(E.size / 1024 / 1024 < t.fileSize) ? (a == null || a.$modal.msgError(`上傳文件大小不超過 ${t.fileSize} MB!`), !1) : (a == null || a.$modal.loading("正在上傳文件,請稍等..."), o.value++, !0);
946
965
  }, P = () => {
947
- e == null || e.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 个!`);
966
+ a == null || a.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 个!`);
948
967
  }, H = () => {
949
- e == null || e.$modal.msgError("上傳文件失敗");
968
+ a == null || a.$modal.msgError("上傳文件失敗");
950
969
  }, X = (E, O) => {
951
970
  var W;
952
- E.code === 200 ? (u.value.push({ name: E.data.fileName, url: E.data.url, ossId: E.data.ossId }), S()) : (o.value--, e == null || e.$modal.closeLoading(), e == null || e.$modal.msgError(E.msg), (W = D.value) == null || W.handleRemove(O), S());
971
+ E.code === 200 ? (i.value.push({ name: E.data.fileName, url: E.data.url, ossId: E.data.ossId }), $()) : (o.value--, a == null || a.$modal.closeLoading(), a == null || a.$modal.msgError(E.msg), (W = D.value) == null || W.handleRemove(O), $());
953
972
  }, ee = (E) => {
954
973
  const O = p.value[E].ossId;
955
- Da(O), p.value.splice(E, 1), c("update:modelValue", k(p.value));
956
- }, S = () => {
957
- o.value > 0 && u.value.length === o.value && (p.value = p.value.filter((E) => E.url !== void 0).concat(u.value), u.value = [], o.value = 0, c("update:modelValue", k(p.value)), e == null || e.$modal.closeLoading());
974
+ Ea(O), p.value.splice(E, 1), c("update:modelValue", k(p.value));
975
+ }, $ = () => {
976
+ o.value > 0 && i.value.length === o.value && (p.value = p.value.filter((E) => E.url !== void 0).concat(i.value), i.value = [], o.value = 0, c("update:modelValue", k(p.value)), a == null || a.$modal.closeLoading());
958
977
  }, U = (E) => E.lastIndexOf("/") > -1 ? E.slice(E.lastIndexOf("/") + 1) : E, k = (E, O) => {
959
978
  let W = "";
960
- return O = O || ",", E.forEach((V) => {
961
- V.ossId && (W += V.ossId + O);
979
+ return O = O || ",", E.forEach((S) => {
980
+ S.ossId && (W += S.ossId + O);
962
981
  }), W != "" ? W.substring(0, W.length - 1) : "";
963
982
  };
964
983
  return (E, O) => {
965
- const W = De, V = Me, d = tt;
966
- return s(), T("div", Gt, [
967
- K(V, {
984
+ const W = De, S = Re, d = ot;
985
+ return s(), T("div", al, [
986
+ K(S, {
968
987
  multiple: "",
969
988
  action: r(f),
970
989
  "before-upload": j,
971
990
  "file-list": r(p),
972
- limit: a.limit,
991
+ limit: e.limit,
973
992
  "on-error": H,
974
993
  "on-exceed": P,
975
994
  "on-success": X,
976
995
  "show-file-list": !1,
977
- headers: r(w),
996
+ headers: r(V),
978
997
  class: "upload-file-uploader",
979
998
  ref_key: "fileUploadRef",
980
999
  ref: D
@@ -989,19 +1008,19 @@ const Nt = {
989
1008
  ]),
990
1009
  _: 1
991
1010
  }, 8, ["action", "file-list", "limit", "headers"]),
992
- r(R) ? (s(), T("div", Jt, [
1011
+ r(R) ? (s(), T("div", tl, [
993
1012
  O[3] || (O[3] = L(" 請上傳 ")),
994
- a.fileSize ? (s(), T(z, { key: 0 }, [
1013
+ e.fileSize ? (s(), T(z, { key: 0 }, [
995
1014
  O[1] || (O[1] = L(" 大小不超過 ")),
996
- re("b", Xt, M(a.fileSize) + "MB", 1)
1015
+ re("b", ll, M(e.fileSize) + "MB", 1)
997
1016
  ], 64)) : Z("", !0),
998
- a.fileType ? (s(), T(z, { key: 1 }, [
1017
+ e.fileType ? (s(), T(z, { key: 1 }, [
999
1018
  O[2] || (O[2] = L(" 格式為 ")),
1000
- re("b", Zt, M(a.fileType.join("/")), 1)
1019
+ re("b", ol, M(e.fileType.join("/")), 1)
1001
1020
  ], 64)) : Z("", !0),
1002
1021
  O[4] || (O[4] = L(" 的文件 "))
1003
1022
  ])) : Z("", !0),
1004
- a.showFileList ? (s(), h(ut, {
1023
+ e.showFileList ? (s(), h(dt, {
1005
1024
  key: 1,
1006
1025
  class: "upload-file-list el-upload-list el-upload-list--text",
1007
1026
  name: "el-fade-in-linear",
@@ -1018,11 +1037,11 @@ const Nt = {
1018
1037
  target: "_blank"
1019
1038
  }, {
1020
1039
  default: b(() => [
1021
- re("span", el, M(U(C.name)), 1)
1040
+ re("span", rl, M(U(C.name)), 1)
1022
1041
  ]),
1023
1042
  _: 2
1024
1043
  }, 1032, ["href"]),
1025
- re("div", al, [
1044
+ re("div", nl, [
1026
1045
  K(d, {
1027
1046
  underline: !1,
1028
1047
  onClick: (F) => ee(A),
@@ -1041,10 +1060,10 @@ const Nt = {
1041
1060
  ]);
1042
1061
  };
1043
1062
  }
1044
- }), Oa = /* @__PURE__ */ be(tl, [["__scopeId", "data-v-027e6121"]]), ll = {
1063
+ }), La = /* @__PURE__ */ be(sl, [["__scopeId", "data-v-027e6121"]]), cl = {
1045
1064
  key: 0,
1046
1065
  class: "el-upload__tip"
1047
- }, ol = { style: { color: "#f56c6c" } }, rl = { style: { color: "#f56c6c" } }, nl = { style: { color: "#f56c6c" } }, sl = ["src"], cl = /* @__PURE__ */ pe({
1066
+ }, ul = { style: { color: "#f56c6c" } }, il = { style: { color: "#f56c6c" } }, dl = { style: { color: "#f56c6c" } }, pl = ["src"], fl = /* @__PURE__ */ pe({
1048
1067
  __name: "index",
1049
1068
  props: {
1050
1069
  modelValue: {
@@ -1075,17 +1094,17 @@ const Nt = {
1075
1094
  height: oe.string.def("148px")
1076
1095
  },
1077
1096
  emits: ["update:modelValue"],
1078
- setup(a, { emit: l }) {
1079
- it((V) => ({
1097
+ setup(e, { emit: l }) {
1098
+ pt((S) => ({
1080
1099
  "9d14746a": t.height
1081
1100
  }));
1082
- const t = a, { proxy: e } = me(), c = l, o = I(0), u = I([]), y = I(""), f = I(!1), w = We(), p = I(w + "/resource/oss/upload"), R = I(Ke()), D = I([]), j = J(() => t.isShowTip && (t.fileType || t.fileSize || t.imageSize)), P = I(), H = J(() => t.fileType.map((V) => `.${V}`).join(","));
1101
+ const t = e, { proxy: a } = he(), c = l, o = I(0), i = I([]), y = I(""), f = I(!1), V = qe(), p = I(V + "/resource/oss/upload"), R = I(We()), D = I([]), j = J(() => t.isShowTip && (t.fileType || t.fileSize || t.imageSize)), P = I(), H = J(() => t.fileType.map((S) => `.${S}`).join(","));
1083
1102
  Ve(
1084
1103
  () => t.modelValue,
1085
- async (V) => {
1086
- if (V) {
1104
+ async (S) => {
1105
+ if (S) {
1087
1106
  let d = [];
1088
- Array.isArray(V) ? d = V : d = (await qe(V)).data, D.value = d.map((C) => {
1107
+ Array.isArray(S) ? d = S : d = (await Qe(S)).data, D.value = d.map((C) => {
1089
1108
  let A;
1090
1109
  return typeof C == "string" ? A = { name: C, url: C } : A = { name: C.ossId, url: C.url, ossId: C.ossId }, A;
1091
1110
  });
@@ -1094,49 +1113,49 @@ const Nt = {
1094
1113
  },
1095
1114
  { deep: !0, immediate: !0 }
1096
1115
  );
1097
- const X = (V) => {
1116
+ const X = (S) => {
1098
1117
  let d = !1;
1099
1118
  if (t.fileType.length) {
1100
1119
  let C = "";
1101
- V.name.lastIndexOf(".") > -1 && (C = V.name.slice(V.name.lastIndexOf(".") + 1)), d = t.fileType.some((A) => !!(V.type.indexOf(A) > -1 || C && C.indexOf(A) > -1));
1120
+ S.name.lastIndexOf(".") > -1 && (C = S.name.slice(S.name.lastIndexOf(".") + 1)), d = t.fileType.some((A) => !!(S.type.indexOf(A) > -1 || C && C.indexOf(A) > -1));
1102
1121
  } else
1103
- d = V.type.indexOf("image") > -1;
1122
+ d = S.type.indexOf("image") > -1;
1104
1123
  if (!d)
1105
- return e == null || e.$modal.msgError(`文件格式不正確, 請上傳${t.fileType.join("/")}圖片格式文件!`), !1;
1106
- if (V.name.includes(","))
1107
- return e == null || e.$modal.msgError("文件名不正確,不能包含英文逗號!"), !1;
1108
- if (t.fileSize && !(V.size / 1024 / 1024 < t.fileSize))
1109
- return e == null || e.$modal.msgError(`上傳圖片大小不能超過 ${t.fileSize} MB!`), !1;
1110
- if (t.compressSupport && V.size / 1024 > t.compressTargetSize)
1111
- return e == null || e.$modal.loading("正在上傳圖片,請稍候..."), o.value++, yt(V, t.compressTargetSize);
1112
- e == null || e.$modal.loading("正在上傳圖片,請稍候..."), o.value++;
1124
+ return a == null || a.$modal.msgError(`文件格式不正確, 請上傳${t.fileType.join("/")}圖片格式文件!`), !1;
1125
+ if (S.name.includes(","))
1126
+ return a == null || a.$modal.msgError("文件名不正確,不能包含英文逗號!"), !1;
1127
+ if (t.fileSize && !(S.size / 1024 / 1024 < t.fileSize))
1128
+ return a == null || a.$modal.msgError(`上傳圖片大小不能超過 ${t.fileSize} MB!`), !1;
1129
+ if (t.compressSupport && S.size / 1024 > t.compressTargetSize)
1130
+ return a == null || a.$modal.loading("正在上傳圖片,請稍候..."), o.value++, bt(S, t.compressTargetSize);
1131
+ a == null || a.$modal.loading("正在上傳圖片,請稍候..."), o.value++;
1113
1132
  }, ee = () => {
1114
- e == null || e.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 個!`);
1115
- }, S = (V, d) => {
1133
+ a == null || a.$modal.msgError(`上傳文件數量不能超過 ${t.limit} 個!`);
1134
+ }, $ = (S, d) => {
1116
1135
  var C;
1117
- V.code === 200 ? (u.value.push({ name: V.data.fileName, url: V.data.url, ossId: V.data.ossId }), k()) : (o.value--, e == null || e.$modal.closeLoading(), e == null || e.$modal.msgError(V.msg), (C = P.value) == null || C.handleRemove(d), k());
1118
- }, U = (V) => {
1119
- const d = D.value.map((C) => C.name).indexOf(V.name);
1120
- if (d > -1 && u.value.length === o.value) {
1136
+ S.code === 200 ? (i.value.push({ name: S.data.fileName, url: S.data.url, ossId: S.data.ossId }), k()) : (o.value--, a == null || a.$modal.closeLoading(), a == null || a.$modal.msgError(S.msg), (C = P.value) == null || C.handleRemove(d), k());
1137
+ }, U = (S) => {
1138
+ const d = D.value.map((C) => C.name).indexOf(S.name);
1139
+ if (d > -1 && i.value.length === o.value) {
1121
1140
  const C = D.value[d].ossId;
1122
- return Da(C), D.value.splice(d, 1), c("update:modelValue", W(D.value)), !1;
1141
+ return Ea(C), D.value.splice(d, 1), c("update:modelValue", W(D.value)), !1;
1123
1142
  }
1124
1143
  return !0;
1125
1144
  }, k = () => {
1126
- o.value > 0 && u.value.length === o.value && (D.value = D.value.filter((V) => V.url !== void 0).concat(u.value), u.value = [], o.value = 0, c("update:modelValue", W(D.value)), e == null || e.$modal.closeLoading());
1145
+ o.value > 0 && i.value.length === o.value && (D.value = D.value.filter((S) => S.url !== void 0).concat(i.value), i.value = [], o.value = 0, c("update:modelValue", W(D.value)), a == null || a.$modal.closeLoading());
1127
1146
  }, E = () => {
1128
- e == null || e.$modal.msgError("上傳圖片失敗"), e == null || e.$modal.closeLoading();
1129
- }, O = (V) => {
1130
- y.value = V.url, f.value = !0;
1131
- }, W = (V, d) => {
1147
+ a == null || a.$modal.msgError("上傳圖片失敗"), a == null || a.$modal.closeLoading();
1148
+ }, O = (S) => {
1149
+ y.value = S.url, f.value = !0;
1150
+ }, W = (S, d) => {
1132
1151
  let C = "";
1133
1152
  d = d || ",";
1134
- for (const A in V)
1135
- V[A].ossId !== void 0 && V[A].url.indexOf("blob:") !== 0 && (C += V[A].ossId + d);
1153
+ for (const A in S)
1154
+ S[A].ossId !== void 0 && S[A].url.indexOf("blob:") !== 0 && (C += S[A].ossId + d);
1136
1155
  return C != "" ? C.substring(0, C.length - 1) : "";
1137
1156
  };
1138
- return (V, d) => {
1139
- const C = dt("plus"), A = Ye, F = Me, G = ua;
1157
+ return (S, d) => {
1158
+ const C = ft("plus"), A = Me, F = Re, G = pa;
1140
1159
  return s(), T("div", null, [
1141
1160
  K(F, {
1142
1161
  ref_key: "imageUploadRef",
@@ -1144,9 +1163,9 @@ const Nt = {
1144
1163
  multiple: "",
1145
1164
  action: r(p),
1146
1165
  "list-type": "picture-card",
1147
- "on-success": S,
1166
+ "on-success": $,
1148
1167
  "before-upload": X,
1149
- limit: a.limit,
1168
+ limit: e.limit,
1150
1169
  accept: r(H),
1151
1170
  "on-error": E,
1152
1171
  "on-exceed": ee,
@@ -1155,7 +1174,7 @@ const Nt = {
1155
1174
  headers: r(R),
1156
1175
  "file-list": r(D),
1157
1176
  "on-preview": O,
1158
- class: je({ hide: r(D).length >= a.limit })
1177
+ class: He({ hide: r(D).length >= e.limit })
1159
1178
  }, {
1160
1179
  default: b(() => [
1161
1180
  K(A, { class: "avatar-uploader-icon" }, {
@@ -1167,25 +1186,25 @@ const Nt = {
1167
1186
  ]),
1168
1187
  _: 1
1169
1188
  }, 8, ["action", "limit", "accept", "headers", "file-list", "class"]),
1170
- r(j) ? (s(), T("div", ll, [
1189
+ r(j) ? (s(), T("div", cl, [
1171
1190
  d[4] || (d[4] = L(" 請上傳 ")),
1172
- a.fileSize ? (s(), T(z, { key: 0 }, [
1191
+ e.fileSize ? (s(), T(z, { key: 0 }, [
1173
1192
  d[1] || (d[1] = L(" 大小不超過 ")),
1174
- re("b", ol, M(a.fileSize) + "MB", 1)
1193
+ re("b", ul, M(e.fileSize) + "MB", 1)
1175
1194
  ], 64)) : Z("", !0),
1176
- a.fileType ? (s(), T(z, { key: 1 }, [
1177
- a.fileSize ? (s(), T(z, { key: 0 }, [
1195
+ e.fileType ? (s(), T(z, { key: 1 }, [
1196
+ e.fileSize ? (s(), T(z, { key: 0 }, [
1178
1197
  L("、")
1179
1198
  ], 64)) : Z("", !0),
1180
1199
  d[2] || (d[2] = L("格式為 ")),
1181
- re("b", rl, M(a.fileType.join("/")), 1)
1200
+ re("b", il, M(e.fileType.join("/")), 1)
1182
1201
  ], 64)) : Z("", !0),
1183
- a.imageSize ? (s(), T(z, { key: 2 }, [
1184
- a.fileSize || a.fileType ? (s(), T(z, { key: 0 }, [
1202
+ e.imageSize ? (s(), T(z, { key: 2 }, [
1203
+ e.fileSize || e.fileType ? (s(), T(z, { key: 0 }, [
1185
1204
  L("。")
1186
1205
  ], 64)) : Z("", !0),
1187
1206
  d[3] || (d[3] = L("建議尺寸 ")),
1188
- re("b", nl, M(a.imageSize), 1)
1207
+ re("b", dl, M(e.imageSize), 1)
1189
1208
  ], 64)) : Z("", !0),
1190
1209
  d[5] || (d[5] = L(" 的文件 "))
1191
1210
  ])) : Z("", !0),
@@ -1200,75 +1219,75 @@ const Nt = {
1200
1219
  re("img", {
1201
1220
  src: r(y),
1202
1221
  style: { display: "block", "max-width": "100%", margin: "0 auto" }
1203
- }, null, 8, sl)
1222
+ }, null, 8, pl)
1204
1223
  ]),
1205
1224
  _: 1
1206
1225
  }, 8, ["modelValue"])
1207
1226
  ]);
1208
1227
  };
1209
1228
  }
1210
- }), Pa = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-c17cf859"]]), ul = (a) => ke()({
1229
+ }), za = /* @__PURE__ */ be(fl, [["__scopeId", "data-v-c17cf859"]]), hl = (e) => ke()({
1211
1230
  url: "/app/translation/getByName",
1212
1231
  method: "post",
1213
1232
  headers: {
1214
1233
  repeatSubmit: !1
1215
1234
  },
1216
- data: { name: a }
1217
- }), il = (a) => ke()({
1235
+ data: { name: e }
1236
+ }), ml = (e) => ke()({
1218
1237
  url: "/app/translation/batchAdd",
1219
1238
  method: "post",
1220
- data: a
1221
- }), aa = _a("translation", () => {
1222
- const a = I([]);
1239
+ data: e
1240
+ }), oa = Sa("translation", () => {
1241
+ const e = I([]);
1223
1242
  return {
1224
- translation: a,
1243
+ translation: e,
1225
1244
  getTranslation: (c) => {
1226
1245
  if (c == null && c == "")
1227
1246
  return null;
1228
1247
  try {
1229
- for (let o = 0; o < a.value.length; o++)
1230
- if (a.value[o].key == c)
1231
- return a.value[o].value;
1248
+ for (let o = 0; o < e.value.length; o++)
1249
+ if (e.value[o].key == c)
1250
+ return e.value[o].value;
1232
1251
  } catch {
1233
1252
  return null;
1234
1253
  }
1235
1254
  return null;
1236
1255
  },
1237
1256
  setTranslation: (c, o) => {
1238
- c !== null && c !== "" && a.value.push({
1257
+ c !== null && c !== "" && e.value.push({
1239
1258
  key: c,
1240
1259
  value: o
1241
1260
  });
1242
1261
  },
1243
1262
  clearTranslation: () => {
1244
- a.value = [];
1263
+ e.value = [];
1245
1264
  }
1246
1265
  };
1247
- }), dl = async (a) => {
1248
- const l = I({}), t = aa().getTranslation(a);
1266
+ }), yl = async (e) => {
1267
+ const l = I({}), t = oa().getTranslation(e);
1249
1268
  if (t)
1250
- l.value[a] = t;
1269
+ l.value[e] = t;
1251
1270
  else {
1252
- const { data: e } = await ul(a);
1253
- l.value[a] = e, aa().setTranslation(a, e);
1271
+ const { data: a } = await hl(e);
1272
+ l.value[e] = a, oa().setTranslation(e, a);
1254
1273
  }
1255
1274
  return l.value;
1256
- }, pl = { style: { width: "100%" } }, fl = { style: { "margin-bottom": "2px" } }, Ia = /* @__PURE__ */ pe({
1275
+ }, gl = { style: { width: "100%" } }, bl = { style: { "margin-bottom": "2px" } }, Ba = /* @__PURE__ */ pe({
1257
1276
  __name: "index",
1258
1277
  props: ["modelValue", "placeholder", "disabled", "type", "rows", "showWordLimit", "maxlength"],
1259
1278
  emits: ["update:modelValue", "focus"],
1260
- setup(a, { expose: l, emit: t }) {
1261
- const e = t, c = a, o = I([{ name: "繁體", id: "zhHk", selected: !0, text: "" }, { name: "簡體", id: "zhCn", selected: !1, text: "" }, { name: "英文", id: "enUs", selected: !1, text: "" }]), u = I(!1), y = I(!1), f = (P, H) => {
1262
- P.text = H, P.id == "zhHk" && e("update:modelValue", H);
1263
- }, w = async (P) => {
1279
+ setup(e, { expose: l, emit: t }) {
1280
+ const a = t, c = e, o = I([{ name: "繁體", id: "zhHk", selected: !0, text: "" }, { name: "簡體", id: "zhCn", selected: !1, text: "" }, { name: "英文", id: "enUs", selected: !1, text: "" }]), i = I(!1), y = I(!1), f = (P, H) => {
1281
+ P.text = H, P.id == "zhHk" && a("update:modelValue", H);
1282
+ }, V = async (P) => {
1264
1283
  P.id == "zhHk" && await p();
1265
1284
  }, p = async () => {
1266
- if (u.value) return;
1285
+ if (i.value) return;
1267
1286
  const P = o.value[0].text;
1268
1287
  if (P != "") {
1269
- u.value = !0;
1270
- const H = await dl(P);
1271
- if (u.value = !1, H[P] != null) {
1288
+ i.value = !0;
1289
+ const H = await yl(P);
1290
+ if (i.value = !1, H[P] != null) {
1272
1291
  for (let X = 0; X < o.value.length; X++)
1273
1292
  if (!o.value[X].text) {
1274
1293
  const ee = o.value[X];
@@ -1281,7 +1300,7 @@ const Nt = {
1281
1300
  }, D = () => {
1282
1301
  const P = { name: o.value[0].text };
1283
1302
  return o.value.forEach((H) => P[H.id] = H.text), P;
1284
- }, j = () => e("focus");
1303
+ }, j = () => a("focus");
1285
1304
  return Ve(() => c.modelValue, (P) => {
1286
1305
  if (P) {
1287
1306
  const H = o.value.filter((X) => X.selected)[0];
@@ -1291,42 +1310,42 @@ const Nt = {
1291
1310
  immediate: !0,
1292
1311
  deep: !0
1293
1312
  }), l({ getTranslate: D }), (P, H) => {
1294
- const X = De, ee = Re;
1295
- return s(), T("div", pl, [
1296
- re("div", fl, [
1297
- (s(!0), T(z, null, Q(r(o), (S) => (s(), h(X, {
1313
+ const X = De, ee = je;
1314
+ return s(), T("div", gl, [
1315
+ re("div", bl, [
1316
+ (s(!0), T(z, null, Q(r(o), ($) => (s(), h(X, {
1298
1317
  size: "small",
1299
- key: S.id,
1300
- type: S.selected ? "primary" : "default",
1301
- onClick: (U) => R(S),
1318
+ key: $.id,
1319
+ type: $.selected ? "primary" : "default",
1320
+ onClick: (U) => R($),
1302
1321
  style: { "margin-right": "-8px" }
1303
1322
  }, {
1304
1323
  default: b(() => [
1305
- L(M(S.name), 1)
1324
+ L(M($.name), 1)
1306
1325
  ]),
1307
1326
  _: 2
1308
1327
  }, 1032, ["type", "onClick"]))), 128))
1309
1328
  ]),
1310
- (s(!0), T(z, null, Q(r(o), (S) => de((s(), h(ee, {
1311
- key: S.id,
1312
- modelValue: S.text,
1313
- "onUpdate:modelValue": (U) => S.text = U,
1329
+ (s(!0), T(z, null, Q(r(o), ($) => de((s(), h(ee, {
1330
+ key: $.id,
1331
+ modelValue: $.text,
1332
+ "onUpdate:modelValue": (U) => $.text = U,
1314
1333
  type: c.type,
1315
- placeholder: c.placeholder + "(" + S.name + ")",
1334
+ placeholder: c.placeholder + "(" + $.name + ")",
1316
1335
  disabled: c.disabled,
1317
1336
  rows: c.rows,
1318
1337
  "show-word-limit": c.showWordLimit,
1319
1338
  maxlength: c.maxlength,
1320
- onInput: (U) => f(S, U),
1321
- onBlur: (U) => w(S),
1339
+ onInput: (U) => f($, U),
1340
+ onBlur: (U) => V($),
1322
1341
  onFocus: H[0] || (H[0] = (U) => j())
1323
1342
  }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "disabled", "rows", "show-word-limit", "maxlength", "onInput", "onBlur"])), [
1324
- [pt, S.selected]
1343
+ [ht, $.selected]
1325
1344
  ])), 128))
1326
1345
  ]);
1327
1346
  };
1328
1347
  }
1329
- }), hl = { class: "editor" }, xa = /* @__PURE__ */ pe({
1348
+ }), vl = { class: "editor" }, Ya = /* @__PURE__ */ pe({
1330
1349
  __name: "index",
1331
1350
  props: {
1332
1351
  /* 编辑器的内容 */
@@ -1343,11 +1362,11 @@ const Nt = {
1343
1362
  type: oe.string.def("url")
1344
1363
  },
1345
1364
  emits: ["update:modelValue"],
1346
- setup(a) {
1347
- const l = a, { proxy: t } = me(), e = ft({
1348
- headers: Ke(),
1349
- url: We() + "/resource/oss/upload"
1350
- }), c = I(), o = I(), u = I({
1365
+ setup(e) {
1366
+ const l = e, { proxy: t } = he(), a = mt({
1367
+ headers: We(),
1368
+ url: qe() + "/resource/oss/upload"
1369
+ }), c = I(), o = I(), i = I({
1351
1370
  theme: "snow",
1352
1371
  bounds: document.body,
1353
1372
  debug: "warn",
@@ -1378,7 +1397,7 @@ const Nt = {
1378
1397
  ],
1379
1398
  handlers: {
1380
1399
  image: (D) => {
1381
- D ? o.value.click() : gt.format("image", !0);
1400
+ D ? o.value.click() : vt.format("image", !0);
1382
1401
  }
1383
1402
  }
1384
1403
  }
@@ -1396,7 +1415,7 @@ const Nt = {
1396
1415
  },
1397
1416
  { immediate: !0 }
1398
1417
  );
1399
- const w = (D) => {
1418
+ const V = (D) => {
1400
1419
  if (D.code === 200) {
1401
1420
  const j = Oe(c.value).getQuill(), P = j.selection.savedRange.index;
1402
1421
  j.insertEmbed(P, "image", D.data.url), j.setSelection(P + 1), t == null || t.$modal.closeLoading();
@@ -1406,19 +1425,19 @@ const Nt = {
1406
1425
  t == null || t.$modal.msgError("上传文件失败");
1407
1426
  };
1408
1427
  return (D, j) => {
1409
- const P = Me;
1428
+ const P = Re;
1410
1429
  return s(), T(z, null, [
1411
1430
  re("div", null, [
1412
- a.type === "url" ? (s(), h(P, {
1431
+ e.type === "url" ? (s(), h(P, {
1413
1432
  key: 0,
1414
- action: r(e).url,
1433
+ action: r(a).url,
1415
1434
  "before-upload": p,
1416
- "on-success": w,
1435
+ "on-success": V,
1417
1436
  "on-error": R,
1418
1437
  class: "editor-img-uploader",
1419
1438
  name: "file",
1420
1439
  "show-file-list": !1,
1421
- headers: r(e).headers
1440
+ headers: r(a).headers
1422
1441
  }, {
1423
1442
  default: b(() => [
1424
1443
  re("i", {
@@ -1429,15 +1448,15 @@ const Nt = {
1429
1448
  _: 1
1430
1449
  }, 8, ["action", "headers"])) : Z("", !0)
1431
1450
  ]),
1432
- re("div", hl, [
1433
- K(r(bt), {
1451
+ re("div", vl, [
1452
+ K(r(kt), {
1434
1453
  ref_key: "quillEditorRef",
1435
1454
  ref: c,
1436
1455
  content: r(f),
1437
1456
  "onUpdate:content": j[0] || (j[0] = (H) => $e(f) ? f.value = H : null),
1438
1457
  "content-type": "html",
1439
- options: r(u),
1440
- style: he(r(y)),
1458
+ options: r(i),
1459
+ style: fe(r(y)),
1441
1460
  onTextChange: j[1] || (j[1] = (H) => D.$emit("update:modelValue", r(f)))
1442
1461
  }, null, 8, ["content", "options", "style"])
1443
1462
  ])
@@ -1445,118 +1464,118 @@ const Nt = {
1445
1464
  };
1446
1465
  }
1447
1466
  });
1448
- function ml(a, l) {
1449
- if (arguments.length === 0 || !a)
1467
+ function kl(e, l) {
1468
+ if (arguments.length === 0 || !e)
1450
1469
  return null;
1451
1470
  const t = l || "{y}-{m}-{d} {h}:{i}:{s}";
1452
- let e;
1453
- typeof a == "object" ? e = a : (typeof a == "string" && /^[0-9]+$/.test(a) ? a = parseInt(a) : typeof a == "string" && (a = a.replace(new RegExp(/-/gm), "/").replace("T", " ").replace(new RegExp(/\.[\d]{3}/gm), "")), typeof a == "number" && a.toString().length === 10 && (a = a * 1e3), e = new Date(a));
1471
+ let a;
1472
+ typeof e == "object" ? a = e : (typeof e == "string" && /^[0-9]+$/.test(e) ? e = parseInt(e) : typeof e == "string" && (e = e.replace(new RegExp(/-/gm), "/").replace("T", " ").replace(new RegExp(/\.[\d]{3}/gm), "")), typeof e == "number" && e.toString().length === 10 && (e = e * 1e3), a = new Date(e));
1454
1473
  const c = {
1455
- y: e.getFullYear(),
1456
- m: e.getMonth() + 1,
1457
- d: e.getDate(),
1458
- h: e.getHours(),
1459
- i: e.getMinutes(),
1460
- s: e.getSeconds(),
1461
- a: e.getDay()
1474
+ y: a.getFullYear(),
1475
+ m: a.getMonth() + 1,
1476
+ d: a.getDate(),
1477
+ h: a.getHours(),
1478
+ i: a.getMinutes(),
1479
+ s: a.getSeconds(),
1480
+ a: a.getDay()
1462
1481
  };
1463
- return t.replace(/{(y|m|d|h|i|s|a)+}/g, (o, u) => {
1464
- let y = c[u];
1465
- return u === "a" ? ["日", "一", "二", "三", "四", "五", "六"][y] : (o.length > 0 && y < 10 && (y = "0" + y), y || 0);
1482
+ return t.replace(/{(y|m|d|h|i|s|a)+}/g, (o, i) => {
1483
+ let y = c[i];
1484
+ return i === "a" ? ["日", "一", "二", "三", "四", "五", "六"][y] : (o.length > 0 && y < 10 && (y = "0" + y), y || 0);
1466
1485
  });
1467
1486
  }
1468
- const yl = (a, l, t) => {
1469
- const e = a;
1470
- return e.params = typeof e.params == "object" && e.params !== null && !Array.isArray(e.params) ? e.params : {}, l = Array.isArray(l) ? l : [], l[0] && l[0].length == 10 && (l[0] = l[0] + " 00:00:00", l[1] = l[1] + " 23:59:59"), typeof t > "u" ? (e.params.beginTime = l[0], e.params.endTime = l[1]) : (t = t.charAt(0).toUpperCase() + t.slice(1), e.params["begin" + t] = l[0], e.params["end" + t] = l[1]), e;
1471
- }, gl = (a, l) => {
1487
+ const _l = (e, l, t) => {
1488
+ const a = e;
1489
+ return a.params = typeof a.params == "object" && a.params !== null && !Array.isArray(a.params) ? a.params : {}, l = Array.isArray(l) ? l : [], l[0] && l[0].length == 10 && (l[0] = l[0] + " 00:00:00", l[1] = l[1] + " 23:59:59"), typeof t > "u" ? (a.params.beginTime = l[0], a.params.endTime = l[1]) : (t = t.charAt(0).toUpperCase() + t.slice(1), a.params["begin" + t] = l[0], a.params["end" + t] = l[1]), a;
1490
+ }, wl = (e, l) => {
1472
1491
  if (l === void 0)
1473
1492
  return "";
1474
1493
  const t = [];
1475
- return Object.keys(a).some((e) => {
1476
- if (a[e].value == "" + l)
1477
- return t.push(a[e].label), !0;
1494
+ return Object.keys(e).some((a) => {
1495
+ if (e[a].value == "" + l)
1496
+ return t.push(e[a].label), !0;
1478
1497
  }), t.length === 0 && t.push(l), t.join("");
1479
- }, bl = (a, l, t) => {
1498
+ }, Vl = (e, l, t) => {
1480
1499
  if (l === void 0 || l.length === 0)
1481
1500
  return "";
1482
1501
  Array.isArray(l) && (l = l.join(","));
1483
- const e = [], c = t === void 0 ? "," : t, o = l.split(c);
1484
- return Object.keys(l.split(c)).some((u) => {
1502
+ const a = [], c = t === void 0 ? "," : t, o = l.split(c);
1503
+ return Object.keys(l.split(c)).some((i) => {
1485
1504
  let y = !1;
1486
- Object.keys(a).some((f) => {
1487
- a[f].value == "" + o[u] && (e.push(a[f].label + c), y = !0);
1488
- }), y || e.push(o[u] + c);
1489
- }), e.join("").substring(0, e.join("").length - 1);
1490
- }, vl = (a, l, t, e) => {
1505
+ Object.keys(e).some((f) => {
1506
+ e[f].value == "" + o[i] && (a.push(e[f].label + c), y = !0);
1507
+ }), y || a.push(o[i] + c);
1508
+ }), a.join("").substring(0, a.join("").length - 1);
1509
+ }, Sl = (e, l, t, a) => {
1491
1510
  const c = {
1492
1511
  id: l || "id",
1493
1512
  parentId: t || "parentId",
1494
- childrenList: e || "children"
1495
- }, o = {}, u = [];
1496
- for (const y of a) {
1513
+ childrenList: a || "children"
1514
+ }, o = {}, i = [];
1515
+ for (const y of e) {
1497
1516
  const f = y[c.id];
1498
1517
  o[f] = y, y[c.childrenList] || (y[c.childrenList] = []);
1499
1518
  }
1500
- for (const y of a) {
1501
- const f = y[c.parentId], w = o[f];
1502
- w ? w[c.childrenList].push(y) : u.push(y);
1519
+ for (const y of e) {
1520
+ const f = y[c.parentId], V = o[f];
1521
+ V ? V[c.childrenList].push(y) : i.push(y);
1503
1522
  }
1504
- return u;
1505
- }, kl = (a) => {
1523
+ return i;
1524
+ }, $l = (e) => {
1506
1525
  let l = "";
1507
- for (const t of Object.keys(a)) {
1508
- const e = a[t], c = encodeURIComponent(t) + "=";
1509
- if (e !== null && e !== "" && typeof e < "u")
1510
- if (typeof e == "object") {
1511
- for (const o of Object.keys(e))
1512
- if (e[o] !== null && e[o] !== "" && typeof e[o] < "u") {
1513
- const u = t + "[" + o + "]", y = encodeURIComponent(u) + "=";
1514
- l += y + encodeURIComponent(e[o]) + "&";
1526
+ for (const t of Object.keys(e)) {
1527
+ const a = e[t], c = encodeURIComponent(t) + "=";
1528
+ if (a !== null && a !== "" && typeof a < "u")
1529
+ if (typeof a == "object") {
1530
+ for (const o of Object.keys(a))
1531
+ if (a[o] !== null && a[o] !== "" && typeof a[o] < "u") {
1532
+ const i = t + "[" + o + "]", y = encodeURIComponent(i) + "=";
1533
+ l += y + encodeURIComponent(a[o]) + "&";
1515
1534
  }
1516
1535
  } else
1517
- l += c + encodeURIComponent(e) + "&";
1536
+ l += c + encodeURIComponent(a) + "&";
1518
1537
  }
1519
1538
  return l;
1520
- }, _l = (a) => a.type !== "application/json", La = (a) => {
1521
- if (!a && typeof a != "object")
1539
+ }, Dl = (e) => e.type !== "application/json", Ma = (e) => {
1540
+ if (!e && typeof e != "object")
1522
1541
  throw new Error("error arguments", "deepClone");
1523
- const l = a.constructor === Array ? [] : {};
1524
- return Object.keys(a).forEach((t) => {
1525
- a[t] && typeof a[t] == "object" ? l[t] = La(a[t]) : l[t] = a[t];
1542
+ const l = e.constructor === Array ? [] : {};
1543
+ return Object.keys(e).forEach((t) => {
1544
+ e[t] && typeof e[t] == "object" ? l[t] = Ma(e[t]) : l[t] = e[t];
1526
1545
  }), l;
1527
1546
  };
1528
- function wl(a, l) {
1529
- const { proxy: t } = me(), e = I({}), c = async (f) => {
1530
- const w = f.form;
1531
- if (!w) return "";
1532
- switch (w.type) {
1547
+ function Cl(e, l) {
1548
+ const { proxy: t } = he(), a = I({}), c = async (f) => {
1549
+ const V = f.form;
1550
+ if (!V) return "";
1551
+ switch (V.type) {
1533
1552
  case "checkboxGroup":
1534
1553
  case "checkboxDict":
1535
1554
  return [];
1536
1555
  case "treeSelectApi":
1537
- if (w.api) {
1538
- const p = await w.api({ pageNum: 1, pageSize: 1e3, ...w.apiParams });
1539
- if (w.data = p.rows || p.data, w.data && Array.isArray(w.data) && !Array.isArray(w.defaultExpandedKeys) && w.autoExpandFirstLevel !== !1) {
1540
- const R = w.props || { value: "id" }, D = w.valueKey || R.value || "id";
1541
- w.defaultExpandedKeys = w.data.map((j) => j[D]);
1556
+ if (V.api) {
1557
+ const p = await V.api({ pageNum: 1, pageSize: 1e3, ...V.apiParams });
1558
+ if (V.data = p.rows || p.data, V.data && Array.isArray(V.data) && !Array.isArray(V.defaultExpandedKeys) && V.autoExpandFirstLevel !== !1) {
1559
+ const R = V.props || { value: "id" }, D = V.valueKey || R.value || "id";
1560
+ V.defaultExpandedKeys = V.data.map((j) => j[D]);
1542
1561
  }
1543
1562
  }
1544
1563
  return "";
1545
1564
  case "radioApi":
1546
1565
  case "selectApi":
1547
- if (w.api) {
1548
- const p = await w.api({ pageNum: 1, pageSize: 1e3, ...w.apiParams });
1549
- w.data = p.rows || p.data;
1566
+ if (V.api) {
1567
+ const p = await V.api({ pageNum: 1, pageSize: 1e3, ...V.apiParams });
1568
+ V.data = p.rows || p.data;
1550
1569
  }
1551
1570
  return "";
1552
1571
  case "checkboxCommonDict":
1553
- return w.data = await (t == null ? void 0 : t.useOneCommonDict(w.dictType)), [];
1572
+ return V.data = await (t == null ? void 0 : t.useOneCommonDict(V.dictType)), [];
1554
1573
  case "radioCommonDict":
1555
1574
  case "selectCommonDict":
1556
- return w.data = await (t == null ? void 0 : t.useOneCommonDict(w.dictType)), "";
1575
+ return V.data = await (t == null ? void 0 : t.useOneCommonDict(V.dictType)), "";
1557
1576
  case "radioDict":
1558
1577
  case "selectDict":
1559
- return w.data = await (t == null ? void 0 : t.useOneDict(w.dictType)), "";
1578
+ return V.data = await (t == null ? void 0 : t.useOneDict(V.dictType)), "";
1560
1579
  case "daterange":
1561
1580
  case "timerange":
1562
1581
  return [];
@@ -1565,19 +1584,19 @@ function wl(a, l) {
1565
1584
  }
1566
1585
  }, o = async (f) => {
1567
1586
  var D;
1568
- let w = {};
1569
- const p = a.columns, R = f !== void 0 ? f : l;
1587
+ let V = {};
1588
+ const p = e.columns, R = f !== void 0 ? f : l;
1570
1589
  for (const j of p) {
1571
1590
  const P = ((D = j.form) == null ? void 0 : D.prop) || j.prop;
1572
- w[P] = await c(j);
1591
+ V[P] = await c(j);
1573
1592
  }
1574
1593
  if (R && typeof R == "object") {
1575
- const j = La(R);
1576
- w = { ...w, ...j };
1594
+ const j = Ma(R);
1595
+ V = { ...V, ...j };
1577
1596
  }
1578
- a.initEditData && a.initEditData(w), a.beforeInitEdit && a.beforeInitEdit(w), u(w), e.value = w;
1579
- }, u = (f) => {
1580
- a.columns.forEach((p) => {
1597
+ e.initEditData && e.initEditData(V), e.beforeInitEdit && e.beforeInitEdit(V), i(V), a.value = V;
1598
+ }, i = (f) => {
1599
+ e.columns.forEach((p) => {
1581
1600
  var j, P, H, X, ee;
1582
1601
  const R = (j = p.form) == null ? void 0 : j.type, D = ((P = p.form) == null ? void 0 : P.prop) || p.prop;
1583
1602
  switch (R) {
@@ -1591,35 +1610,35 @@ function wl(a, l) {
1591
1610
  break;
1592
1611
  case "daterange":
1593
1612
  case "timerange":
1594
- const S = (X = p.form) == null ? void 0 : X.rangeBeginProp, U = (ee = p.form) == null ? void 0 : ee.rangeEndProp;
1595
- S && U && f[S] && f[U] ? f[D] = [f[S], f[U]] : typeof f[D] == "string" && f[D].includes(",") ? f[D] = f[D].split(",") : (!f[D] || !Array.isArray(f[D])) && (f[D] = f[D] || []);
1613
+ const $ = (X = p.form) == null ? void 0 : X.rangeBeginProp, U = (ee = p.form) == null ? void 0 : ee.rangeEndProp;
1614
+ $ && U && f[$] && f[U] ? f[D] = [f[$], f[U]] : typeof f[D] == "string" && f[D].includes(",") ? f[D] = f[D].split(",") : (!f[D] || !Array.isArray(f[D])) && (f[D] = f[D] || []);
1596
1615
  break;
1597
1616
  }
1598
1617
  });
1599
1618
  };
1600
1619
  return {
1601
- formData: e,
1620
+ formData: a,
1602
1621
  initFormData: o,
1603
1622
  prepareSaveData: async (f) => {
1604
- const w = { ...e.value, ...f };
1605
- if (a.columns.forEach((p) => {
1623
+ const V = { ...a.value, ...f };
1624
+ if (e.columns.forEach((p) => {
1606
1625
  var j, P, H, X;
1607
1626
  const R = (j = p.form) == null ? void 0 : j.type, D = ((P = p.form) == null ? void 0 : P.prop) || p.prop;
1608
- if ((R === "daterange" || R === "timerange") && Array.isArray(w[D])) {
1609
- const ee = w[D], S = (H = p.form) == null ? void 0 : H.rangeBeginProp, U = (X = p.form) == null ? void 0 : X.rangeEndProp;
1610
- S && U && ee.length >= 2 && (w[S] = ee[0], w[U] = ee[1]);
1627
+ if ((R === "daterange" || R === "timerange") && Array.isArray(V[D])) {
1628
+ const ee = V[D], $ = (H = p.form) == null ? void 0 : H.rangeBeginProp, U = (X = p.form) == null ? void 0 : X.rangeEndProp;
1629
+ $ && U && ee.length >= 2 && (V[$] = ee[0], V[U] = ee[1]);
1611
1630
  }
1612
- }), delete w.orderByColumn, delete w.isAsc, a.beforeSave) {
1613
- const p = await a.beforeSave(w);
1631
+ }), delete V.orderByColumn, delete V.isAsc, e.beforeSave) {
1632
+ const p = await e.beforeSave(V);
1614
1633
  if (p === !1) return !1;
1615
- p && typeof p == "object" ? Object.assign(f, p) : Object.assign(f, w);
1634
+ p && typeof p == "object" ? Object.assign(f, p) : Object.assign(f, V);
1616
1635
  } else
1617
- Object.assign(f, w);
1636
+ Object.assign(f, V);
1618
1637
  return !0;
1619
1638
  }
1620
1639
  };
1621
1640
  }
1622
- const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ */ pe({
1641
+ const Tl = { key: 20 }, El = { class: "color-picker-tips" }, Ul = /* @__PURE__ */ pe({
1623
1642
  __name: "curdEdit",
1624
1643
  props: {
1625
1644
  dataSource: {},
@@ -1628,43 +1647,43 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1628
1647
  modelValue: { type: Boolean }
1629
1648
  },
1630
1649
  emits: ["close", "actionEvent"],
1631
- setup(a, { emit: l }) {
1632
- const { t } = wa(), { proxy: e } = me(), c = a, o = I(!1), u = I(), y = l, f = I(), w = I(Ea), { formData: p, initFormData: R, prepareSaveData: D } = wl(
1650
+ setup(e, { emit: l }) {
1651
+ const { t } = $a(), { proxy: a } = he(), c = e, o = I(!1), i = I(), y = l, f = I(), V = I(Oa), { formData: p, initFormData: R, prepareSaveData: D } = Cl(
1633
1652
  c.dataSource,
1634
1653
  c.editData
1635
1654
  ), j = J(() => {
1636
- const E = !!c.editData[c.dataSource.rowKey], O = Mt(c.dataSource.columns, E, E);
1637
- return Ua(O, "form.order");
1655
+ const E = !!c.editData[c.dataSource.rowKey], O = jt(c.dataSource.columns, E, E);
1656
+ return Pa(O, "form.order");
1638
1657
  }), P = J(() => c.dataSource.formInline || !1), H = (k) => {
1639
1658
  if (Array.isArray(k.defaultExpandedKeys))
1640
1659
  return k.defaultExpandedKeys;
1641
1660
  if (k.autoExpandFirstLevel === !1)
1642
1661
  return [];
1643
1662
  const E = k.data || [], O = k.props || { value: "id" }, W = k.valueKey || O.value || "id";
1644
- return Array.isArray(E) ? E.map((V) => V[W]).filter((V) => V !== void 0) : [];
1645
- }, X = () => Yt(c.dataSource.columns), ee = () => {
1663
+ return Array.isArray(E) ? E.map((S) => S[W]).filter((S) => S !== void 0) : [];
1664
+ }, X = () => Rt(c.dataSource.columns), ee = () => {
1646
1665
  var k;
1647
1666
  (k = f.value) == null || k.validate(async (E) => {
1648
- var O, W, V, d, C;
1667
+ var O, W, S, d, C;
1649
1668
  if (!E) return !1;
1650
1669
  try {
1651
1670
  const A = { ...c.dataSource.queryParams || {} };
1652
1671
  if (await D(A) === !1) return !1;
1653
- c.editData[c.dataSource.rowKey] ? await ((W = (O = c.dataSource).updateApi) == null ? void 0 : W.call(O, A)) : await ((d = (V = c.dataSource).addApi) == null ? void 0 : d.call(V, A)), await S(), U(!0), e == null || e.$modal.msgSuccess(t("數據存儲成功")), (C = f.value) == null || C.resetFields();
1672
+ c.editData[c.dataSource.rowKey] ? await ((W = (O = c.dataSource).updateApi) == null ? void 0 : W.call(O, A)) : await ((d = (S = c.dataSource).addApi) == null ? void 0 : d.call(S, A)), await $(), U(!0), a == null || a.$modal.msgSuccess(t("數據存儲成功")), (C = f.value) == null || C.resetFields();
1654
1673
  } catch (A) {
1655
1674
  console.error("Save failed:", A);
1656
1675
  }
1657
1676
  return !1;
1658
1677
  });
1659
- }, S = async () => {
1660
- const k = u.value;
1678
+ }, $ = async () => {
1679
+ const k = i.value;
1661
1680
  if (k != null) {
1662
1681
  const E = [];
1663
1682
  for (let O = 0; O < k.length; O++) {
1664
1683
  const W = k[O].getTranslate();
1665
1684
  E.push(W);
1666
1685
  }
1667
- await il(E);
1686
+ await ml(E);
1668
1687
  }
1669
1688
  }, U = (k = !1) => {
1670
1689
  var E;
@@ -1673,7 +1692,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1673
1692
  return Ve(() => c.modelValue, (k) => {
1674
1693
  k && (X(), R(c.editData)), o.value = k;
1675
1694
  }), (k, E) => {
1676
- const O = lt, W = ma, V = ha, d = ya, C = Pa, A = Oa, F = Re, G = sa, se = ot, _ = ca, x = nt, q = rt, Y = ga, ne = st, ue = fa, ye = pa, ce = da, fe = ia, i = De, m = ua;
1695
+ const O = rt, W = ba, S = ga, d = va, C = za, A = La, F = je, G = ia, se = nt, _ = da, x = ct, q = st, Y = ka, ne = ut, ue = ya, me = ma, ce = ha, ye = fa, u = De, m = pa;
1677
1696
  return s(), h(m, {
1678
1697
  title: c.action.title || c.action.text,
1679
1698
  modelValue: r(o),
@@ -1686,7 +1705,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1686
1705
  }, {
1687
1706
  footer: b(() => [
1688
1707
  re("div", null, [
1689
- K(i, {
1708
+ K(u, {
1690
1709
  onClick: E[0] || (E[0] = (n) => U(!1))
1691
1710
  }, {
1692
1711
  default: b(() => [
@@ -1694,7 +1713,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1694
1713
  ]),
1695
1714
  _: 1
1696
1715
  }),
1697
- K(i, {
1716
+ K(u, {
1698
1717
  type: "primary",
1699
1718
  onClick: ee
1700
1719
  }, {
@@ -1706,7 +1725,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1706
1725
  ])
1707
1726
  ]),
1708
1727
  default: b(() => [
1709
- K(fe, {
1728
+ K(ye, {
1710
1729
  model: r(p),
1711
1730
  ref_key: "curdFormRef",
1712
1731
  ref: f,
@@ -1717,7 +1736,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1717
1736
  default: b(() => [
1718
1737
  K(ce, { gutter: 20 }, {
1719
1738
  default: b(() => [
1720
- (s(!0), T(z, null, Q(r(j), (n) => (s(), h(ye, {
1739
+ (s(!0), T(z, null, Q(r(j), (n) => (s(), h(me, {
1721
1740
  span: n.form.inline === !1 ? 24 : r(P) ? 12 : 24,
1722
1741
  key: n.prop,
1723
1742
  class: "el-p"
@@ -1739,7 +1758,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1739
1758
  min: n.form.min,
1740
1759
  max: n.form.max,
1741
1760
  placeholder: k.$t("請輸入")
1742
- }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder"])) : n.form.type === "select" ? (s(), h(V, {
1761
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder"])) : n.form.type === "select" ? (s(), h(S, {
1743
1762
  key: 1,
1744
1763
  multiple: n.form.multiple,
1745
1764
  style: { width: "100%" },
@@ -1756,7 +1775,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1756
1775
  }, null, 8, ["label", "value"]))), 128))
1757
1776
  ]),
1758
1777
  _: 2
1759
- }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectDict" ? (s(), h(V, {
1778
+ }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectDict" ? (s(), h(S, {
1760
1779
  key: 2,
1761
1780
  multiple: n.form.multiple,
1762
1781
  style: { width: "100%" },
@@ -1773,7 +1792,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1773
1792
  }, null, 8, ["label", "value"]))), 128))
1774
1793
  ]),
1775
1794
  _: 2
1776
- }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectCommonDict" ? (s(), h(V, {
1795
+ }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectCommonDict" ? (s(), h(S, {
1777
1796
  key: 3,
1778
1797
  multiple: n.form.multiple,
1779
1798
  style: { width: "100%" },
@@ -1790,7 +1809,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1790
1809
  }, null, 8, ["label", "value"]))), 128))
1791
1810
  ]),
1792
1811
  _: 2
1793
- }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectApi" ? (s(), h(V, {
1812
+ }, 1032, ["multiple", "modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : n.form.type === "selectApi" ? (s(), h(S, {
1794
1813
  key: 4,
1795
1814
  multiple: n.form.multiple,
1796
1815
  style: { width: "100%" },
@@ -1954,7 +1973,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1954
1973
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g
1955
1974
  }, {
1956
1975
  default: b(() => [
1957
- (s(!0), T(z, null, Q(r(w)[n.form.dictType], (g) => (s(), h(x, {
1976
+ (s(!0), T(z, null, Q(r(V)[n.form.dictType], (g) => (s(), h(x, {
1958
1977
  key: g.value,
1959
1978
  label: g.value
1960
1979
  }, {
@@ -1970,29 +1989,29 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
1970
1989
  label: n.label,
1971
1990
  modelValue: r(p)[n.form.prop || n.prop],
1972
1991
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g
1973
- }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : n.form.type === "color" ? (s(), T("div", Vl, [
1992
+ }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])) : n.form.type === "color" ? (s(), T("div", Tl, [
1974
1993
  K(ne, {
1975
1994
  modelValue: r(p)[n.form.prop || n.prop],
1976
1995
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g
1977
1996
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
1978
- re("span", Sl, M(k.$t("需点击选择器中的确定按钮")), 1)
1997
+ re("span", El, M(k.$t("需点击选择器中的确定按钮")), 1)
1979
1998
  ])) : n.form.type === "inputNumber" ? (s(), h(O, {
1980
1999
  key: 21,
1981
2000
  min: n.form.min || 0,
1982
2001
  modelValue: r(p)[n.form.prop || n.prop],
1983
2002
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g,
1984
2003
  step: 1
1985
- }, null, 8, ["min", "modelValue", "onUpdate:modelValue"])) : n.form.type === "richtext" ? (s(), h(xa, {
2004
+ }, null, 8, ["min", "modelValue", "onUpdate:modelValue"])) : n.form.type === "richtext" ? (s(), h(Ya, {
1986
2005
  key: 22,
1987
2006
  modelValue: r(p)[n.form.prop || n.prop],
1988
2007
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g,
1989
2008
  height: n.form.max || 320,
1990
2009
  "min-height": n.form.min || 220
1991
2010
  }, null, 8, ["modelValue", "onUpdate:modelValue", "height", "min-height"])) : (s(), T(z, { key: 23 }, [
1992
- n.form.translate === !0 ? (s(), h(Ia, {
2011
+ n.form.translate === !0 ? (s(), h(Ba, {
1993
2012
  ref_for: !0,
1994
2013
  ref_key: "translateInputRef",
1995
- ref: u,
2014
+ ref: i,
1996
2015
  key: r(p)[k.dataSource.rowKey],
1997
2016
  modelValue: r(p)[n.form.prop || n.prop],
1998
2017
  "onUpdate:modelValue": (g) => r(p)[n.form.prop || n.prop] = g,
@@ -2046,64 +2065,66 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2046
2065
  }, 8, ["title", "modelValue", "width"]);
2047
2066
  };
2048
2067
  }
2049
- }), ta = /* @__PURE__ */ be($l, [["__scopeId", "data-v-03727126"]]), Dl = {
2068
+ }), ra = /* @__PURE__ */ be(Ul, [["__scopeId", "data-v-03727126"]]), Al = {
2050
2069
  key: 1,
2051
2070
  class: "curd-search-card",
2052
2071
  style: { "margin-bottom": "0px !important" }
2053
- }, Cl = {
2072
+ }, Ol = {
2054
2073
  key: 2,
2055
2074
  class: "curd-search-card"
2056
- }, Tl = /* @__PURE__ */ pe({
2075
+ }, Pl = /* @__PURE__ */ pe({
2057
2076
  __name: "curdSearch",
2058
2077
  props: {
2059
2078
  dataSource: {},
2060
2079
  selectedCount: { default: 0 }
2061
2080
  },
2062
2081
  emits: ["actionEvent"],
2063
- setup(a, { expose: l, emit: t }) {
2064
- const { t: e } = wa(), { proxy: c } = me(), o = t, u = a, y = J(() => {
2065
- const d = u.dataSource.actions;
2082
+ setup(e, { expose: l, emit: t }) {
2083
+ const { t: a } = $a(), { proxy: c } = he(), o = t, i = e, y = J(() => {
2084
+ const d = i.dataSource.actions;
2066
2085
  return d == null ? [] : d.filter((A) => A.position === "top" || A.action === "create" || A.action === "back").map((A) => {
2067
2086
  const F = { ...A };
2068
2087
  return F.action === "create" ? (F.cssType = "primary", F.icon = "Plus") : F.action === "back" && (F.icon = "ArrowLeft"), F;
2069
2088
  });
2070
- }), f = J(() => y.value.find((d) => d.action === "create") ?? null), w = J(() => {
2089
+ }), f = J(() => y.value.find((d) => d.action === "create") ?? null), V = J(() => {
2071
2090
  var d;
2072
- return ((d = u.dataSource.actions) == null ? void 0 : d.find((C) => C.action === "delete")) ?? null;
2091
+ return ((d = i.dataSource.actions) == null ? void 0 : d.find((C) => C.action === "delete")) ?? null;
2073
2092
  }), p = J(() => y.value.filter((d) => d.action !== "create")), R = (d) => {
2074
2093
  o("actionEvent", d);
2075
- }, D = J(() => u.dataSource.searchColumnsPerRow ?? 4), j = J(() => Math.floor(24 / D.value)), P = J(() => u.dataSource.showSearchCard ?? !0), H = J(() => {
2076
- if (u.dataSource.searchActionColSpan != null)
2077
- return u.dataSource.searchActionColSpan;
2094
+ }, D = J(() => i.dataSource.searchColumnsPerRow ?? 4), j = J(() => Math.floor(24 / D.value)), P = J(() => i.dataSource.showSearchCard ?? !0), H = J(() => {
2095
+ if (i.dataSource.searchActionColSpan != null)
2096
+ return i.dataSource.searchActionColSpan;
2078
2097
  const d = U.value.length % D.value, A = 24 - (d === 0 ? D.value : d) * j.value;
2079
2098
  return A <= 0 ? 24 : A;
2080
- }), X = J(() => U.value.length % D.value === 0 ? "15px !important" : "0px !important"), { initSearchDicts: ee } = Aa(), S = I({}), U = I([]), k = () => {
2099
+ }), X = J(() => U.value.length % D.value === 0 ? "15px !important" : "0px !important"), { initSearchDicts: ee } = Ia(), $ = I({}), U = I([]), k = () => {
2081
2100
  o("actionEvent", { action: "filter" });
2082
2101
  }, E = async () => {
2083
2102
  try {
2084
2103
  let d = O();
2085
- if (d = { ...u.dataSource.queryParams || {}, ...d }, u.dataSource.beforeExport && await u.dataSource.beforeExport(d) === !1)
2104
+ if (d = { ...i.dataSource.queryParams || {}, ...d }, i.dataSource.beforeExport && await i.dataSource.beforeExport(d) === !1)
2086
2105
  return;
2087
- const C = vt().format("YYYYMMDDHHmmss");
2088
- let A = u.dataSource.exportFileName ? `${u.dataSource.exportFileName}` : "export";
2089
- A += `_${C}.xlsx`, c == null || c.download(u.dataSource.exportUrl, d, A);
2106
+ const C = _t().format("YYYYMMDDHHmmss");
2107
+ let A = i.dataSource.exportFileName ? `${i.dataSource.exportFileName}` : "export";
2108
+ A += `_${C}.xlsx`, c == null || c.download(i.dataSource.exportUrl, d, A);
2090
2109
  } catch (d) {
2091
- console.error("Export failed:", d), c == null || c.$modal.msgError(e("導出失敗"));
2110
+ console.error("Export failed:", d), c == null || c.$modal.msgError(a("導出失敗"));
2092
2111
  }
2093
2112
  }, O = () => {
2094
- const d = { ...S.value };
2113
+ const d = { ...$.value };
2095
2114
  return U.value.forEach((C) => {
2096
2115
  var A, F;
2097
2116
  if (((A = C.search) == null ? void 0 : A.type) === "daterange" || ((F = C.search) == null ? void 0 : F.type) === "timerange") {
2098
2117
  const G = d[C.search.prop];
2099
- G && G[0] && G[1] && Ht(d, G, C.search.prop, c), delete d[C.search.prop];
2118
+ G && G[0] && G[1] && Nt(d, G, C.search.prop, c), delete d[C.search.prop];
2100
2119
  }
2101
2120
  }), ze(d);
2102
2121
  }, W = async () => {
2103
- await V(), o("actionEvent", { action: "filter" }, {});
2104
- }, V = async () => {
2105
- const d = u.dataSource.columns.filter((A) => A.search);
2106
- U.value = Ua(
2122
+ await S(), o("actionEvent", { action: "filter" }, {});
2123
+ }, S = async () => {
2124
+ const d = i.dataSource.columns.filter(
2125
+ (A) => A.search && Be(A.search.permission ?? A.permission)
2126
+ );
2127
+ U.value = Pa(
2107
2128
  d.map((A, F) => (A.search.order || (A.search.order = F + 100), A)),
2108
2129
  "search.order"
2109
2130
  ), await Ie();
@@ -2114,12 +2135,12 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2114
2135
  const G = F.search.prop || "", se = F.search.type || "";
2115
2136
  se === "daterange" || se === "timerange" ? C[G] = F.search.default ? F.search.default.split(",") : [] : ((se === "selectApi" || se === "treeSelectApi" || se === "selectDict") && await ee(F), C[G] = F.search.default);
2116
2137
  }
2117
- S.value = C;
2138
+ $.value = C;
2118
2139
  };
2119
- return He(() => V()), l({ initData: V, getQueryParams: O }), (d, C) => {
2120
- var fe;
2121
- const A = ya, F = ma, G = ha, se = ga, _ = Re, x = fa, q = pa, Y = De, ne = da, ue = ia, ye = ba, ce = ka("hasPermi");
2122
- return r(U).length > 0 && r(P) ? (s(), h(ye, {
2140
+ return Fe(() => S()), l({ initData: S, getQueryParams: O }), (d, C) => {
2141
+ var ye;
2142
+ const A = va, F = ba, G = ga, se = ka, _ = je, x = ya, q = ma, Y = De, ne = ha, ue = fa, me = _a, ce = Va("hasPermi");
2143
+ return r(U).length > 0 && r(P) ? (s(), h(me, {
2123
2144
  key: 0,
2124
2145
  class: "curd-search-card",
2125
2146
  shadow: "hover",
@@ -2128,29 +2149,29 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2128
2149
  }, {
2129
2150
  default: b(() => [
2130
2151
  K(ue, {
2131
- model: r(S),
2152
+ model: r($),
2132
2153
  inline: !0,
2133
- "label-width": u.dataSource.searchLabelWidth || 68
2154
+ "label-width": i.dataSource.searchLabelWidth || 68
2134
2155
  }, {
2135
2156
  default: b(() => [
2136
2157
  K(ne, { gutter: 20 }, {
2137
2158
  default: b(() => [
2138
- (s(!0), T(z, null, Q(r(U), (i) => (s(), h(q, {
2159
+ (s(!0), T(z, null, Q(r(U), (u) => (s(), h(q, {
2139
2160
  span: r(j),
2140
- key: i.search.prop
2161
+ key: u.search.prop
2141
2162
  }, {
2142
2163
  default: b(() => [
2143
2164
  K(x, {
2144
- label: i.label,
2145
- name: i.search.prop,
2165
+ label: u.label,
2166
+ name: u.search.prop,
2146
2167
  style: { width: "100%" },
2147
- "label-width": i.search.labelWidth
2168
+ "label-width": u.search.labelWidth
2148
2169
  }, {
2149
2170
  default: b(() => [
2150
- i.search.type === "daterange" ? (s(), h(A, {
2171
+ u.search.type === "daterange" ? (s(), h(A, {
2151
2172
  key: 0,
2152
- modelValue: r(S)[i.search.prop],
2153
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2173
+ modelValue: r($)[u.search.prop],
2174
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2154
2175
  type: "daterange",
2155
2176
  format: "YYYY-MM-DD",
2156
2177
  "value-format": "YYYY-MM-DD",
@@ -2160,10 +2181,10 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2160
2181
  style: { width: "100%" },
2161
2182
  clearable: "",
2162
2183
  onChange: k
2163
- }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : i.search.type === "timerange" ? (s(), h(A, {
2184
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(), h(A, {
2164
2185
  key: 1,
2165
- modelValue: r(S)[i.search.prop],
2166
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2186
+ modelValue: r($)[u.search.prop],
2187
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2167
2188
  type: "datetimerange",
2168
2189
  format: "YYYY-MM-DD HH:mm",
2169
2190
  "value-format": "YYYY-MM-DD HH:mm:ss",
@@ -2173,107 +2194,107 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2173
2194
  style: { width: "100%" },
2174
2195
  clearable: "",
2175
2196
  onChange: k
2176
- }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : i.search.type === "selectApi" ? (s(), h(G, {
2197
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(), h(G, {
2177
2198
  key: 2,
2178
- modelValue: r(S)[i.search.prop],
2179
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2199
+ modelValue: r($)[u.search.prop],
2200
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2180
2201
  placeholder: d.$t("請選擇"),
2181
2202
  style: { width: "100%" },
2182
2203
  clearable: "",
2183
2204
  onChange: k,
2184
- filterable: i.search.filterable ?? !0
2205
+ filterable: u.search.filterable ?? !0
2185
2206
  }, {
2186
2207
  default: b(() => [
2187
- (s(!0), T(z, null, Q(i.search.data, (m) => (s(), h(F, {
2188
- key: m[i.search.value],
2189
- label: m[i.search.label],
2190
- value: m[i.search.value]
2208
+ (s(!0), T(z, null, Q(u.search.data, (m) => (s(), h(F, {
2209
+ key: m[u.search.value],
2210
+ label: m[u.search.label],
2211
+ value: m[u.search.value]
2191
2212
  }, null, 8, ["label", "value"]))), 128))
2192
2213
  ]),
2193
2214
  _: 2
2194
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectData" ? (s(), h(G, {
2215
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(), h(G, {
2195
2216
  key: 3,
2196
- modelValue: r(S)[i.search.prop],
2197
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2217
+ modelValue: r($)[u.search.prop],
2218
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2198
2219
  placeholder: d.$t("請選擇"),
2199
2220
  style: { width: "100%" },
2200
2221
  clearable: "",
2201
2222
  onChange: k,
2202
- filterable: i.search.filterable ?? !0
2223
+ filterable: u.search.filterable ?? !0
2203
2224
  }, {
2204
2225
  default: b(() => [
2205
- (s(!0), T(z, null, Q(i.search.data, (m) => (s(), h(F, {
2206
- key: m[i.search.value],
2207
- label: m[i.search.label],
2208
- value: m[i.search.value]
2226
+ (s(!0), T(z, null, Q(u.search.data, (m) => (s(), h(F, {
2227
+ key: m[u.search.value],
2228
+ label: m[u.search.label],
2229
+ value: m[u.search.value]
2209
2230
  }, null, 8, ["label", "value"]))), 128))
2210
2231
  ]),
2211
2232
  _: 2
2212
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectDict" ? (s(), h(G, {
2233
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(), h(G, {
2213
2234
  key: 4,
2214
- modelValue: r(S)[i.search.prop],
2215
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2235
+ modelValue: r($)[u.search.prop],
2236
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2216
2237
  placeholder: d.$t("請選擇"),
2217
2238
  style: { width: "100%" },
2218
2239
  clearable: "",
2219
2240
  onChange: k,
2220
- filterable: i.search.filterable ?? !0
2241
+ filterable: u.search.filterable ?? !0
2221
2242
  }, {
2222
2243
  default: b(() => [
2223
- (s(!0), T(z, null, Q(i.search.data || [], (m) => (s(), h(F, {
2224
- key: m[i.search.value] || m.value,
2225
- label: m[i.search.label] || m.label,
2226
- value: m[i.search.value] || m.value
2244
+ (s(!0), T(z, null, Q(u.search.data || [], (m) => (s(), h(F, {
2245
+ key: m[u.search.value] || m.value,
2246
+ label: m[u.search.label] || m.label,
2247
+ value: m[u.search.value] || m.value
2227
2248
  }, null, 8, ["label", "value"]))), 128))
2228
2249
  ]),
2229
2250
  _: 2
2230
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectCommonDict" ? (s(), h(G, {
2251
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(), h(G, {
2231
2252
  key: 5,
2232
- modelValue: r(S)[i.search.prop],
2233
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2253
+ modelValue: r($)[u.search.prop],
2254
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2234
2255
  placeholder: d.$t("請選擇"),
2235
2256
  style: { width: "100%" },
2236
2257
  clearable: "",
2237
2258
  onChange: k,
2238
- filterable: i.search.filterable ?? !0
2259
+ filterable: u.search.filterable ?? !0
2239
2260
  }, {
2240
2261
  default: b(() => [
2241
- (s(!0), T(z, null, Q(i.search.data || [], (m) => (s(), h(F, {
2242
- key: m[i.search.value] || m.value,
2243
- label: m[i.search.label] || m.label,
2244
- value: m[i.search.value] || m.value
2262
+ (s(!0), T(z, null, Q(u.search.data || [], (m) => (s(), h(F, {
2263
+ key: m[u.search.value] || m.value,
2264
+ label: m[u.search.label] || m.label,
2265
+ value: m[u.search.value] || m.value
2245
2266
  }, null, 8, ["label", "value"]))), 128))
2246
2267
  ]),
2247
2268
  _: 2
2248
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "treeSelectApi" ? (s(), h(se, {
2269
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(), h(se, {
2249
2270
  key: 6,
2250
- modelValue: r(S)[i.search.prop],
2251
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2252
- data: i.search.data,
2253
- props: i.search.props,
2254
- "value-key": i.search.valueKey,
2255
- "default-expanded-keys": i.search.defaultExpandedKeys,
2271
+ modelValue: r($)[u.search.prop],
2272
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2273
+ data: u.search.data,
2274
+ props: u.search.props,
2275
+ "value-key": u.search.valueKey,
2276
+ "default-expanded-keys": u.search.defaultExpandedKeys,
2256
2277
  placeholder: d.$t("請選擇"),
2257
2278
  style: { width: "100%" },
2258
2279
  "check-strictly": "",
2259
2280
  clearable: "",
2260
2281
  onChange: k
2261
- }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : i.search.type === "number" ? (s(), h(_, {
2282
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(), h(_, {
2262
2283
  key: 7,
2263
2284
  type: "number",
2264
- modelValue: r(S)[i.search.prop],
2265
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2285
+ modelValue: r($)[u.search.prop],
2286
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2266
2287
  placeholder: d.$t("請輸入"),
2267
2288
  style: { width: "100%" },
2268
2289
  clearable: ""
2269
2290
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(), h(_, {
2270
2291
  key: 8,
2271
2292
  type: "text",
2272
- modelValue: r(S)[i.search.prop],
2273
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2293
+ modelValue: r($)[u.search.prop],
2294
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2274
2295
  style: { width: "100%" },
2275
2296
  placeholder: d.$t("請輸入"),
2276
- onKeyup: Qe(k, ["enter"]),
2297
+ onKeyup: Xe(k, ["enter"]),
2277
2298
  clearable: ""
2278
2299
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
2279
2300
  ]),
@@ -2284,7 +2305,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2284
2305
  }, 1032, ["span"]))), 128)),
2285
2306
  K(q, { span: r(H) }, {
2286
2307
  default: b(() => {
2287
- var i;
2308
+ var u;
2288
2309
  return [
2289
2310
  K(Y, {
2290
2311
  onClick: k,
@@ -2318,7 +2339,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2318
2339
  }, 8, ["type", "icon"])), [
2319
2340
  [ce, r(f).permission || null]
2320
2341
  ]) : Z("", !0),
2321
- u.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2342
+ i.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2322
2343
  key: 1,
2323
2344
  type: "danger",
2324
2345
  icon: "Delete",
@@ -2331,9 +2352,9 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2331
2352
  ]),
2332
2353
  _: 1
2333
2354
  }, 8, ["disabled"])), [
2334
- [ce, ((i = r(w)) == null ? void 0 : i.permission) || null]
2355
+ [ce, ((u = r(V)) == null ? void 0 : u.permission) || null]
2335
2356
  ]) : Z("", !0),
2336
- u.dataSource.exportUrl ? (s(), h(Y, {
2357
+ i.dataSource.exportUrl ? (s(), h(Y, {
2337
2358
  key: 2,
2338
2359
  type: "primary",
2339
2360
  icon: "Download",
@@ -2341,7 +2362,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2341
2362
  onClick: E
2342
2363
  }, {
2343
2364
  default: b(() => [
2344
- L(M(u.dataSource.exportButtonName || d.$t("導出")), 1)
2365
+ L(M(i.dataSource.exportButtonName || d.$t("導出")), 1)
2345
2366
  ]),
2346
2367
  _: 1
2347
2368
  })) : Z("", !0),
@@ -2371,31 +2392,31 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2371
2392
  }, 8, ["model", "label-width"])
2372
2393
  ]),
2373
2394
  _: 1
2374
- }, 8, ["body-style"])) : r(U).length > 0 && !r(P) ? (s(), T("div", Dl, [
2395
+ }, 8, ["body-style"])) : r(U).length > 0 && !r(P) ? (s(), T("div", Al, [
2375
2396
  K(ue, {
2376
- model: r(S),
2397
+ model: r($),
2377
2398
  inline: !0,
2378
- "label-width": u.dataSource.searchLabelWidth || 68
2399
+ "label-width": i.dataSource.searchLabelWidth || 68
2379
2400
  }, {
2380
2401
  default: b(() => [
2381
2402
  K(ne, { gutter: 20 }, {
2382
2403
  default: b(() => [
2383
- (s(!0), T(z, null, Q(r(U), (i) => (s(), h(q, {
2404
+ (s(!0), T(z, null, Q(r(U), (u) => (s(), h(q, {
2384
2405
  span: r(j),
2385
- key: i.search.prop
2406
+ key: u.search.prop
2386
2407
  }, {
2387
2408
  default: b(() => [
2388
2409
  K(x, {
2389
- label: i.label,
2390
- name: i.search.prop,
2410
+ label: u.label,
2411
+ name: u.search.prop,
2391
2412
  style: { width: "100%" },
2392
- "label-width": i.search.labelWidth
2413
+ "label-width": u.search.labelWidth
2393
2414
  }, {
2394
2415
  default: b(() => [
2395
- i.search.type === "daterange" ? (s(), h(A, {
2416
+ u.search.type === "daterange" ? (s(), h(A, {
2396
2417
  key: 0,
2397
- modelValue: r(S)[i.search.prop],
2398
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2418
+ modelValue: r($)[u.search.prop],
2419
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2399
2420
  type: "daterange",
2400
2421
  format: "YYYY-MM-DD",
2401
2422
  "value-format": "YYYY-MM-DD",
@@ -2405,10 +2426,10 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2405
2426
  style: { width: "100%" },
2406
2427
  clearable: "",
2407
2428
  onChange: k
2408
- }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : i.search.type === "timerange" ? (s(), h(A, {
2429
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "timerange" ? (s(), h(A, {
2409
2430
  key: 1,
2410
- modelValue: r(S)[i.search.prop],
2411
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2431
+ modelValue: r($)[u.search.prop],
2432
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2412
2433
  type: "datetimerange",
2413
2434
  format: "YYYY-MM-DD HH:mm",
2414
2435
  "value-format": "YYYY-MM-DD HH:mm:ss",
@@ -2418,107 +2439,107 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2418
2439
  style: { width: "100%" },
2419
2440
  clearable: "",
2420
2441
  onChange: k
2421
- }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : i.search.type === "selectApi" ? (s(), h(G, {
2442
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : u.search.type === "selectApi" ? (s(), h(G, {
2422
2443
  key: 2,
2423
- modelValue: r(S)[i.search.prop],
2424
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2444
+ modelValue: r($)[u.search.prop],
2445
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2425
2446
  placeholder: d.$t("請選擇"),
2426
2447
  style: { width: "100%" },
2427
2448
  clearable: "",
2428
2449
  onChange: k,
2429
- filterable: i.search.filterable ?? !0
2450
+ filterable: u.search.filterable ?? !0
2430
2451
  }, {
2431
2452
  default: b(() => [
2432
- (s(!0), T(z, null, Q(i.search.data, (m) => (s(), h(F, {
2433
- key: m[i.search.value],
2434
- label: m[i.search.label],
2435
- value: m[i.search.value]
2453
+ (s(!0), T(z, null, Q(u.search.data, (m) => (s(), h(F, {
2454
+ key: m[u.search.value],
2455
+ label: m[u.search.label],
2456
+ value: m[u.search.value]
2436
2457
  }, null, 8, ["label", "value"]))), 128))
2437
2458
  ]),
2438
2459
  _: 2
2439
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectData" ? (s(), h(G, {
2460
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectData" ? (s(), h(G, {
2440
2461
  key: 3,
2441
- modelValue: r(S)[i.search.prop],
2442
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2462
+ modelValue: r($)[u.search.prop],
2463
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2443
2464
  placeholder: d.$t("請選擇"),
2444
2465
  style: { width: "100%" },
2445
2466
  clearable: "",
2446
2467
  onChange: k,
2447
- filterable: i.search.filterable ?? !0
2468
+ filterable: u.search.filterable ?? !0
2448
2469
  }, {
2449
2470
  default: b(() => [
2450
- (s(!0), T(z, null, Q(i.search.data, (m) => (s(), h(F, {
2451
- key: m[i.search.value],
2452
- label: m[i.search.label],
2453
- value: m[i.search.value]
2471
+ (s(!0), T(z, null, Q(u.search.data, (m) => (s(), h(F, {
2472
+ key: m[u.search.value],
2473
+ label: m[u.search.label],
2474
+ value: m[u.search.value]
2454
2475
  }, null, 8, ["label", "value"]))), 128))
2455
2476
  ]),
2456
2477
  _: 2
2457
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectDict" ? (s(), h(G, {
2478
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectDict" ? (s(), h(G, {
2458
2479
  key: 4,
2459
- modelValue: r(S)[i.search.prop],
2460
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2480
+ modelValue: r($)[u.search.prop],
2481
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2461
2482
  placeholder: d.$t("請選擇"),
2462
2483
  style: { width: "100%" },
2463
2484
  clearable: "",
2464
2485
  onChange: k,
2465
- filterable: i.search.filterable ?? !0
2486
+ filterable: u.search.filterable ?? !0
2466
2487
  }, {
2467
2488
  default: b(() => [
2468
- (s(!0), T(z, null, Q(i.search.data || [], (m) => (s(), h(F, {
2469
- key: m[i.search.value] || m.value,
2470
- label: m[i.search.label] || m.label,
2471
- value: m[i.search.value] || m.value
2489
+ (s(!0), T(z, null, Q(u.search.data || [], (m) => (s(), h(F, {
2490
+ key: m[u.search.value] || m.value,
2491
+ label: m[u.search.label] || m.label,
2492
+ value: m[u.search.value] || m.value
2472
2493
  }, null, 8, ["label", "value"]))), 128))
2473
2494
  ]),
2474
2495
  _: 2
2475
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "selectCommonDict" ? (s(), h(G, {
2496
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "selectCommonDict" ? (s(), h(G, {
2476
2497
  key: 5,
2477
- modelValue: r(S)[i.search.prop],
2478
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2498
+ modelValue: r($)[u.search.prop],
2499
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2479
2500
  placeholder: d.$t("請選擇"),
2480
2501
  style: { width: "100%" },
2481
2502
  clearable: "",
2482
2503
  onChange: k,
2483
- filterable: i.search.filterable ?? !0
2504
+ filterable: u.search.filterable ?? !0
2484
2505
  }, {
2485
2506
  default: b(() => [
2486
- (s(!0), T(z, null, Q(i.search.data || [], (m) => (s(), h(F, {
2487
- key: m[i.search.value] || m.value,
2488
- label: m[i.search.label] || m.label,
2489
- value: m[i.search.value] || m.value
2507
+ (s(!0), T(z, null, Q(u.search.data || [], (m) => (s(), h(F, {
2508
+ key: m[u.search.value] || m.value,
2509
+ label: m[u.search.label] || m.label,
2510
+ value: m[u.search.value] || m.value
2490
2511
  }, null, 8, ["label", "value"]))), 128))
2491
2512
  ]),
2492
2513
  _: 2
2493
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : i.search.type === "treeSelectApi" ? (s(), h(se, {
2514
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable"])) : u.search.type === "treeSelectApi" ? (s(), h(se, {
2494
2515
  key: 6,
2495
- modelValue: r(S)[i.search.prop],
2496
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2497
- data: i.search.data,
2498
- props: i.search.props,
2499
- "value-key": i.search.valueKey,
2500
- "default-expanded-keys": i.search.defaultExpandedKeys,
2516
+ modelValue: r($)[u.search.prop],
2517
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2518
+ data: u.search.data,
2519
+ props: u.search.props,
2520
+ "value-key": u.search.valueKey,
2521
+ "default-expanded-keys": u.search.defaultExpandedKeys,
2501
2522
  placeholder: d.$t("請選擇"),
2502
2523
  style: { width: "100%" },
2503
2524
  "check-strictly": "",
2504
2525
  clearable: "",
2505
2526
  onChange: k
2506
- }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : i.search.type === "number" ? (s(), h(_, {
2527
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "props", "value-key", "default-expanded-keys", "placeholder"])) : u.search.type === "number" ? (s(), h(_, {
2507
2528
  key: 7,
2508
2529
  type: "number",
2509
- modelValue: r(S)[i.search.prop],
2510
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2530
+ modelValue: r($)[u.search.prop],
2531
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2511
2532
  placeholder: d.$t("請輸入"),
2512
2533
  style: { width: "100%" },
2513
2534
  clearable: ""
2514
2535
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (s(), h(_, {
2515
2536
  key: 8,
2516
2537
  type: "text",
2517
- modelValue: r(S)[i.search.prop],
2518
- "onUpdate:modelValue": (m) => r(S)[i.search.prop] = m,
2538
+ modelValue: r($)[u.search.prop],
2539
+ "onUpdate:modelValue": (m) => r($)[u.search.prop] = m,
2519
2540
  style: { width: "100%" },
2520
2541
  placeholder: d.$t("請輸入"),
2521
- onKeyup: Qe(k, ["enter"]),
2542
+ onKeyup: Xe(k, ["enter"]),
2522
2543
  clearable: ""
2523
2544
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]))
2524
2545
  ]),
@@ -2529,7 +2550,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2529
2550
  }, 1032, ["span"]))), 128)),
2530
2551
  K(q, { span: r(H) }, {
2531
2552
  default: b(() => {
2532
- var i;
2553
+ var u;
2533
2554
  return [
2534
2555
  K(Y, {
2535
2556
  onClick: k,
@@ -2563,7 +2584,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2563
2584
  }, 8, ["type", "icon"])), [
2564
2585
  [ce, r(f).permission || null]
2565
2586
  ]) : Z("", !0),
2566
- u.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2587
+ i.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2567
2588
  key: 1,
2568
2589
  type: "danger",
2569
2590
  icon: "Delete",
@@ -2576,9 +2597,9 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2576
2597
  ]),
2577
2598
  _: 1
2578
2599
  }, 8, ["disabled"])), [
2579
- [ce, ((i = r(w)) == null ? void 0 : i.permission) || null]
2600
+ [ce, ((u = r(V)) == null ? void 0 : u.permission) || null]
2580
2601
  ]) : Z("", !0),
2581
- u.dataSource.exportUrl ? (s(), h(Y, {
2602
+ i.dataSource.exportUrl ? (s(), h(Y, {
2582
2603
  key: 2,
2583
2604
  type: "primary",
2584
2605
  icon: "Download",
@@ -2614,13 +2635,13 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2614
2635
  ]),
2615
2636
  _: 1
2616
2637
  }, 8, ["model", "label-width"])
2617
- ])) : r(y).length > 0 ? (s(), T("div", Cl, [
2638
+ ])) : r(y).length > 0 ? (s(), T("div", Ol, [
2618
2639
  r(f) ? de((s(), h(Y, {
2619
2640
  key: 0,
2620
2641
  type: r(f).cssType,
2621
2642
  icon: r(f).icon,
2622
2643
  plain: "",
2623
- onClick: C[4] || (C[4] = (i) => R(r(f)))
2644
+ onClick: C[4] || (C[4] = (u) => R(r(f)))
2624
2645
  }, {
2625
2646
  default: b(() => [
2626
2647
  L(M(r(f).text || d.$t("新增")), 1)
@@ -2629,22 +2650,22 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2629
2650
  }, 8, ["type", "icon"])), [
2630
2651
  [ce, r(f).permission || null]
2631
2652
  ]) : Z("", !0),
2632
- u.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2653
+ i.dataSource.showBatchDeleteButton ? de((s(), h(Y, {
2633
2654
  key: 1,
2634
2655
  type: "danger",
2635
2656
  icon: "Delete",
2636
2657
  plain: "",
2637
2658
  disabled: d.selectedCount === 0,
2638
- onClick: C[5] || (C[5] = (i) => o("actionEvent", { action: "batchDelete" }))
2659
+ onClick: C[5] || (C[5] = (u) => o("actionEvent", { action: "batchDelete" }))
2639
2660
  }, {
2640
2661
  default: b(() => [
2641
2662
  L(M(d.$t("批量刪除")), 1)
2642
2663
  ]),
2643
2664
  _: 1
2644
2665
  }, 8, ["disabled"])), [
2645
- [ce, ((fe = r(w)) == null ? void 0 : fe.permission) || null]
2666
+ [ce, ((ye = r(V)) == null ? void 0 : ye.permission) || null]
2646
2667
  ]) : Z("", !0),
2647
- u.dataSource.exportUrl ? (s(), h(Y, {
2668
+ i.dataSource.exportUrl ? (s(), h(Y, {
2648
2669
  key: 2,
2649
2670
  type: "primary",
2650
2671
  icon: "Download",
@@ -2652,28 +2673,28 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2652
2673
  onClick: E
2653
2674
  }, {
2654
2675
  default: b(() => [
2655
- L(M(u.dataSource.exportButtonName || d.$t("導出")), 1)
2676
+ L(M(i.dataSource.exportButtonName || d.$t("導出")), 1)
2656
2677
  ]),
2657
2678
  _: 1
2658
2679
  })) : Z("", !0),
2659
- (s(!0), T(z, null, Q(r(p), (i) => de((s(), h(Y, {
2660
- key: i.text,
2661
- onClick: (m) => R(i),
2662
- type: i.cssType,
2663
- icon: i.icon,
2680
+ (s(!0), T(z, null, Q(r(p), (u) => de((s(), h(Y, {
2681
+ key: u.text,
2682
+ onClick: (m) => R(u),
2683
+ type: u.cssType,
2684
+ icon: u.icon,
2664
2685
  plain: ""
2665
2686
  }, {
2666
2687
  default: b(() => [
2667
- L(M(d.$t(i.text)), 1)
2688
+ L(M(d.$t(u.text)), 1)
2668
2689
  ]),
2669
2690
  _: 2
2670
2691
  }, 1032, ["onClick", "type", "icon"])), [
2671
- [ce, i.permission || null]
2692
+ [ce, u.permission || null]
2672
2693
  ])), 128))
2673
2694
  ])) : Z("", !0);
2674
2695
  };
2675
2696
  }
2676
- }), El = /* @__PURE__ */ be(Tl, [["__scopeId", "data-v-2299b60d"]]), za = {
2697
+ }), Il = /* @__PURE__ */ be(Pl, [["__scopeId", "data-v-fbfbd6fe"]]), Ra = {
2677
2698
  // ============ 搜索欄 ============
2678
2699
  查詢: "查询",
2679
2700
  清空: "清空",
@@ -2706,7 +2727,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2706
2727
  請先勾選要刪除的數據: "请先勾选要删除的数据",
2707
2728
  數據存儲成功: "数据存储成功",
2708
2729
  導出失敗: "导出失败"
2709
- }, Ba = {
2730
+ }, ja = {
2710
2731
  // ============ 搜索欄 ============
2711
2732
  查詢: "查詢",
2712
2733
  清空: "清空",
@@ -2739,7 +2760,7 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2739
2760
  請先勾選要刪除的數據: "請先勾選要刪除的數據",
2740
2761
  數據存儲成功: "數據存儲成功",
2741
2762
  導出失敗: "導出失敗"
2742
- }, Ya = {
2763
+ }, Ha = {
2743
2764
  // ============ Search bar ============
2744
2765
  查詢: "Search",
2745
2766
  清空: "Clear",
@@ -2773,31 +2794,31 @@ const Vl = { key: 20 }, Sl = { class: "color-picker-tips" }, $l = /* @__PURE__ *
2773
2794
  數據存儲成功: "Data saved successfully",
2774
2795
  導出失敗: "Export failed"
2775
2796
  };
2776
- let la = !1;
2777
- const Ul = {
2778
- zh_CN: za,
2779
- zh_HK: Ba,
2780
- en_US: Ya
2797
+ let na = !1;
2798
+ const xl = {
2799
+ zh_CN: Ra,
2800
+ zh_HK: ja,
2801
+ en_US: Ha
2781
2802
  };
2782
- function Al() {
2783
- if (!la)
2803
+ function Ll() {
2804
+ if (!na)
2784
2805
  try {
2785
- const a = me();
2786
- if (!a) return;
2787
- const t = a.appContext.app.config.globalProperties.$i18n;
2806
+ const e = he();
2807
+ if (!e) return;
2808
+ const t = e.appContext.app.config.globalProperties.$i18n;
2788
2809
  if (t) {
2789
- const e = t.global || t;
2790
- for (const [c, o] of Object.entries(Ul))
2791
- if (e && typeof e.mergeLocaleMessage == "function" && e.mergeLocaleMessage(c, o), e && e.messages) {
2792
- const u = e.messages[c] || {};
2793
- e.messages[c] = { ...o, ...u };
2810
+ const a = t.global || t;
2811
+ for (const [c, o] of Object.entries(xl))
2812
+ if (a && typeof a.mergeLocaleMessage == "function" && a.mergeLocaleMessage(c, o), a && a.messages) {
2813
+ const i = a.messages[c] || {};
2814
+ a.messages[c] = { ...o, ...i };
2794
2815
  }
2795
- la = !0;
2816
+ na = !0;
2796
2817
  }
2797
2818
  } catch {
2798
2819
  }
2799
2820
  }
2800
- const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2821
+ const zl = { key: 1 }, Bl = /* @__PURE__ */ pe({
2801
2822
  __name: "index",
2802
2823
  props: {
2803
2824
  dataSource: {},
@@ -2807,10 +2828,10 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2807
2828
  maxHeight: {}
2808
2829
  },
2809
2830
  emits: ["actionEvent", "beforeQuery"],
2810
- setup(a, { expose: l, emit: t }) {
2811
- const { proxy: e } = me(), c = t, o = a, u = J(
2831
+ setup(e, { expose: l, emit: t }) {
2832
+ const { proxy: a } = he(), c = t, o = e, i = J(
2812
2833
  () => o.dataSource.maxHeight != null ? void 0 : o.maxHeight
2813
- ), y = I(!1), f = I({}), w = I({}), p = I(), R = I(), D = I(0), j = J(() => {
2834
+ ), y = I(!1), f = I({}), V = I({}), p = I(), R = I(), D = I(0), j = J(() => {
2814
2835
  const _ = (o.dataSource.columns || []).map((x) => x.slot).filter((x) => !!x);
2815
2836
  return Array.from(new Set(_));
2816
2837
  }), P = (_) => {
@@ -2823,7 +2844,7 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2823
2844
  }, ee = async () => {
2824
2845
  var _;
2825
2846
  return await ((_ = p.value) == null ? void 0 : _.initData());
2826
- }, S = () => {
2847
+ }, $ = () => {
2827
2848
  var _;
2828
2849
  return (_ = R.value) == null ? void 0 : _.initData();
2829
2850
  }, U = async (_, x) => {
@@ -2838,14 +2859,14 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2838
2859
  update: () => E(_, x),
2839
2860
  delete: () => O(_, x),
2840
2861
  batchDelete: () => W(),
2841
- create: () => V(_, x),
2862
+ create: () => S(_, x),
2842
2863
  view: () => C(_, x),
2843
2864
  filter: () => A(),
2844
2865
  back: () => se()
2845
2866
  }[_.action];
2846
2867
  Y ? Y() : c("actionEvent", _, x);
2847
2868
  }, E = async (_, x) => {
2848
- o.dataSource.beforeUpdate && await o.dataSource.beforeUpdate(x) === !1 || (f.value = x, w.value = _, y.value = !0);
2869
+ o.dataSource.beforeUpdate && await o.dataSource.beforeUpdate(x) === !1 || (f.value = x, V.value = _, y.value = !0);
2849
2870
  }, O = async (_, x) => {
2850
2871
  var q, Y, ne;
2851
2872
  try {
@@ -2853,36 +2874,36 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2853
2874
  return;
2854
2875
  const ue = x[o.dataSource.rowKey];
2855
2876
  if (!ue) {
2856
- e == null || e.$modal.msgError(e == null ? void 0 : e.$t("rowKey参数不正确"));
2877
+ a == null || a.$modal.msgError(a == null ? void 0 : a.$t("rowKey参数不正确"));
2857
2878
  return;
2858
2879
  }
2859
- const ye = _.confirm || _.confirmText || (e == null ? void 0 : e.$t("確認刪除此數據嗎?"));
2860
- await (e == null ? void 0 : e.$modal.confirm(ye)), await ((Y = (q = o.dataSource).deleteApi) == null ? void 0 : Y.call(q, ue)), e == null || e.$modal.msgSuccess(e == null ? void 0 : e.$t("刪除成功")), (ne = p.value) == null || ne.refreshTable();
2880
+ const me = _.confirm || _.confirmText || (a == null ? void 0 : a.$t("確認刪除此數據嗎?"));
2881
+ await (a == null ? void 0 : a.$modal.confirm(me)), await ((Y = (q = o.dataSource).deleteApi) == null ? void 0 : Y.call(q, ue)), a == null || a.$modal.msgSuccess(a == null ? void 0 : a.$t("刪除成功")), (ne = p.value) == null || ne.refreshTable();
2861
2882
  } catch (ue) {
2862
2883
  ue !== "cancel" && console.error("Delete failed:", ue);
2863
2884
  }
2864
2885
  }, W = async () => {
2865
- var q, Y, ne, ue, ye;
2886
+ var q, Y, ne, ue, me;
2866
2887
  if (!o.dataSource.deleteApi) {
2867
- e == null || e.$modal.msgError(e == null ? void 0 : e.$t("deleteApi 方法未設置"));
2888
+ a == null || a.$modal.msgError(a == null ? void 0 : a.$t("deleteApi 方法未設置"));
2868
2889
  return;
2869
2890
  }
2870
2891
  const _ = ((Y = (q = p.value) == null ? void 0 : q.getSelection) == null ? void 0 : Y.call(q)) ?? [];
2871
2892
  if (!_.length) {
2872
- e == null || e.$modal.msgWarning(e == null ? void 0 : e.$t("請先勾選要刪除的數據"));
2893
+ a == null || a.$modal.msgWarning(a == null ? void 0 : a.$t("請先勾選要刪除的數據"));
2873
2894
  return;
2874
2895
  }
2875
- await (e == null ? void 0 : e.$modal.confirm(e == null ? void 0 : e.$t("確認刪除選中的 {count} 條數據嗎?", { count: _.length })));
2896
+ await (a == null ? void 0 : a.$modal.confirm(a == null ? void 0 : a.$t("確認刪除選中的 {count} 條數據嗎?", { count: _.length })));
2876
2897
  const x = [];
2877
2898
  for (const ce of _) {
2878
2899
  if (o.dataSource.beforeDelete && await o.dataSource.beforeDelete(ce) === !1)
2879
2900
  continue;
2880
- const fe = ce[o.dataSource.rowKey];
2881
- fe != null && x.push(fe);
2901
+ const ye = ce[o.dataSource.rowKey];
2902
+ ye != null && x.push(ye);
2882
2903
  }
2883
- x.length && (await ((ue = (ne = o.dataSource).deleteApi) == null ? void 0 : ue.call(ne, x)), e == null || e.$modal.msgSuccess(e == null ? void 0 : e.$t("刪除成功")), (ye = p.value) == null || ye.refreshTable());
2884
- }, V = async (_, x) => {
2885
- o.dataSource.beforeCreate && await o.dataSource.beforeCreate(x || {}) === !1 || (f.value = x || {}, w.value = _, y.value = !0);
2904
+ x.length && (await ((ue = (ne = o.dataSource).deleteApi) == null ? void 0 : ue.call(ne, x)), a == null || a.$modal.msgSuccess(a == null ? void 0 : a.$t("刪除成功")), (me = p.value) == null || me.refreshTable());
2905
+ }, S = async (_, x) => {
2906
+ o.dataSource.beforeCreate && await o.dataSource.beforeCreate(x || {}) === !1 || (f.value = x || {}, V.value = _, y.value = !0);
2886
2907
  }, d = async (_ = {}) => {
2887
2908
  const x = _ && (Object.prototype.hasOwnProperty.call(_, "data") || Object.prototype.hasOwnProperty.call(_, "title") || Object.prototype.hasOwnProperty.call(_, "text") || Object.prototype.hasOwnProperty.call(_, "width") || Object.prototype.hasOwnProperty.call(_, "labelWidth") || Object.prototype.hasOwnProperty.call(_, "labelPosition")), q = x ? _.data || {} : _ || {}, Y = {
2888
2909
  action: "create",
@@ -2894,7 +2915,7 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2894
2915
  labelPosition: _.labelPosition
2895
2916
  } : {}
2896
2917
  };
2897
- await V(Y, q);
2918
+ await S(Y, q);
2898
2919
  }, C = (_, x) => {
2899
2920
  let q = _.url;
2900
2921
  const Y = _.pm;
@@ -2902,7 +2923,7 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2902
2923
  const ne = q.includes("?") ? "&" : "?";
2903
2924
  q += `${ne}${Y}=${x[Y]}`;
2904
2925
  }
2905
- e == null || e.$router.push(q);
2926
+ a == null || a.$router.push(q);
2906
2927
  }, A = () => {
2907
2928
  var x, q;
2908
2929
  const _ = (x = R.value) == null ? void 0 : x.getQueryParams();
@@ -2913,15 +2934,15 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2913
2934
  }, G = () => {
2914
2935
  var _;
2915
2936
  return (_ = p.value) == null ? void 0 : _.getSelection();
2916
- }, se = () => e == null ? void 0 : e.$router.back();
2917
- return He(() => {
2918
- Al(), Bt(o.dataSource.columns);
2919
- }), l({ refreshTable: X, initSearch: S, initTable: ee, openCreate: d, getQueryParams: F, getSelection: G }), (_, x) => {
2920
- const q = ba;
2937
+ }, se = () => a == null ? void 0 : a.$router.back();
2938
+ return Fe(() => {
2939
+ Ll(), Mt(o.dataSource.columns);
2940
+ }), l({ refreshTable: X, initSearch: $, initTable: ee, openCreate: d, getQueryParams: F, getSelection: G }), (_, x) => {
2941
+ const q = _a;
2921
2942
  return s(), T("div", {
2922
- class: je({ "p-3": _.showPadding })
2943
+ class: He({ "p-3": _.showPadding })
2923
2944
  }, [
2924
- K(El, {
2945
+ K(Il, {
2925
2946
  dataSource: o.dataSource,
2926
2947
  selectedCount: r(D),
2927
2948
  ref_key: "curdSearchRef",
@@ -2934,206 +2955,190 @@ const Ol = { key: 1 }, Pl = /* @__PURE__ */ pe({
2934
2955
  shadow: "hover"
2935
2956
  }, {
2936
2957
  default: b(() => [
2937
- K(ea, {
2958
+ K(la, {
2938
2959
  ref_key: "curdTableRef",
2939
2960
  ref: p,
2940
2961
  onActionEvent: U,
2941
2962
  onSelectionChange: P,
2942
2963
  dataSource: o.dataSource,
2943
- maxHeight: r(u)
2964
+ maxHeight: r(i)
2944
2965
  }, xe({ _: 2 }, [
2945
2966
  Q(r(j), (Y) => ({
2946
2967
  name: Y,
2947
2968
  fn: b((ne) => [
2948
- Pe(_.$slots, Y, Ge(Je(ne)))
2969
+ Pe(_.$slots, Y, Ze(ea(ne)))
2949
2970
  ])
2950
2971
  }))
2951
2972
  ]), 1032, ["dataSource", "maxHeight"]),
2952
- K(ta, {
2973
+ K(ra, {
2953
2974
  onClose: H,
2954
2975
  modelValue: r(y),
2955
2976
  "onUpdate:modelValue": x[0] || (x[0] = (Y) => $e(y) ? y.value = Y : null),
2956
2977
  dataSource: o.dataSource,
2957
- action: r(w),
2978
+ action: r(V),
2958
2979
  editData: r(f)
2959
2980
  }, null, 8, ["modelValue", "dataSource", "action", "editData"])
2960
2981
  ]),
2961
2982
  _: 3
2962
- }, 8, ["body-style"])) : (s(), T("div", Ol, [
2963
- K(ea, {
2983
+ }, 8, ["body-style"])) : (s(), T("div", zl, [
2984
+ K(la, {
2964
2985
  ref_key: "curdTableRef",
2965
2986
  ref: p,
2966
2987
  onActionEvent: U,
2967
2988
  onSelectionChange: P,
2968
2989
  dataSource: o.dataSource,
2969
- maxHeight: r(u)
2990
+ maxHeight: r(i)
2970
2991
  }, xe({ _: 2 }, [
2971
2992
  Q(r(j), (Y) => ({
2972
2993
  name: Y,
2973
2994
  fn: b((ne) => [
2974
- Pe(_.$slots, Y, Ge(Je(ne)))
2995
+ Pe(_.$slots, Y, Ze(ea(ne)))
2975
2996
  ])
2976
2997
  }))
2977
2998
  ]), 1032, ["dataSource", "maxHeight"]),
2978
- K(ta, {
2999
+ K(ra, {
2979
3000
  onClose: H,
2980
3001
  modelValue: r(y),
2981
3002
  "onUpdate:modelValue": x[1] || (x[1] = (Y) => $e(y) ? y.value = Y : null),
2982
3003
  dataSource: o.dataSource,
2983
- action: r(w),
3004
+ action: r(V),
2984
3005
  editData: r(f)
2985
3006
  }, null, 8, ["modelValue", "dataSource", "action", "editData"])
2986
3007
  ]))
2987
3008
  ], 2);
2988
3009
  };
2989
3010
  }
2990
- });
2991
- let Ma = () => !0, Ra = () => !0;
2992
- const Il = (a) => {
2993
- a.hasPermi && (Ma = a.hasPermi), a.hasRoles && (Ra = a.hasRoles);
2994
- }, xl = {
2995
- mounted(a, l) {
2996
- var e;
2997
- const { value: t } = l;
2998
- t != null && Array.isArray(t) && t.length > 0 && (Ma(t) || (e = a.parentNode) == null || e.removeChild(a));
2999
- }
3000
- }, Ll = {
3001
- mounted(a, l) {
3002
- var e;
3003
- const { value: t } = l;
3004
- t != null && Array.isArray(t) && t.length > 0 && (Ra(t) || (e = a.parentNode) == null || e.removeChild(a));
3005
- }
3006
- }, oa = {
3011
+ }), sa = {
3007
3012
  401: "认证失败,无法访问系统资源",
3008
3013
  403: "当前操作没有权限",
3009
3014
  404: "访问资源不存在",
3010
3015
  default: "系统未知错误,请反馈给管理员"
3011
3016
  };
3012
- function zl(a, l, t) {
3013
- const e = va.service({
3017
+ function Yl(e, l, t) {
3018
+ const a = wa.service({
3014
3019
  text: "正在下載數據,請稍後",
3015
3020
  background: "rgba(0, 0, 0, 0.7)"
3016
3021
  });
3017
- return ke().post(a, l, {
3018
- transformRequest: [(c) => kl(c)],
3022
+ return ke().post(e, l, {
3023
+ transformRequest: [(c) => $l(c)],
3019
3024
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
3020
3025
  responseType: "blob"
3021
3026
  }).then(async (c) => {
3022
- if (_l(c)) {
3023
- const u = new Blob([c]);
3024
- kt.saveAs(u, t);
3027
+ if (Dl(c)) {
3028
+ const i = new Blob([c]);
3029
+ wt.saveAs(i, t);
3025
3030
  } else {
3026
- const u = await new Blob([c]).text(), y = JSON.parse(u), f = oa[y.code] || y.msg || oa.default;
3031
+ const i = await new Blob([c]).text(), y = JSON.parse(i), f = sa[y.code] || y.msg || sa.default;
3027
3032
  we.error(f);
3028
3033
  }
3029
- e.close();
3034
+ a.close();
3030
3035
  }).catch((c) => {
3031
- console.error(c), we.error("下载文件出现错误,请联系管理员!"), e.close();
3036
+ console.error(c), we.error("下载文件出现错误,请联系管理员!"), a.close();
3032
3037
  });
3033
3038
  }
3034
- let ra;
3035
- const Bl = {
3039
+ let ca;
3040
+ const Ml = {
3036
3041
  // 消息提示
3037
- msg(a) {
3038
- we.info(a);
3042
+ msg(e) {
3043
+ we.info(e);
3039
3044
  },
3040
3045
  // 错误消息
3041
- msgError(a) {
3042
- we.error(a);
3046
+ msgError(e) {
3047
+ we.error(e);
3043
3048
  },
3044
3049
  // 成功消息
3045
- msgSuccess(a) {
3046
- we.success(a);
3050
+ msgSuccess(e) {
3051
+ we.success(e);
3047
3052
  },
3048
3053
  // 警告消息
3049
- msgWarning(a) {
3050
- we.warning(a);
3054
+ msgWarning(e) {
3055
+ we.warning(e);
3051
3056
  },
3052
3057
  // 弹出提示
3053
- alert(a) {
3054
- _e.alert(a, "系統提示");
3058
+ alert(e) {
3059
+ _e.alert(e, "系統提示");
3055
3060
  },
3056
3061
  // 错误提示
3057
- alertError(a) {
3058
- _e.alert(a, "系統提示", { type: "error" });
3062
+ alertError(e) {
3063
+ _e.alert(e, "系統提示", { type: "error" });
3059
3064
  },
3060
3065
  // 成功提示
3061
- alertSuccess(a) {
3062
- _e.alert(a, "系統提示", { type: "success" });
3066
+ alertSuccess(e) {
3067
+ _e.alert(e, "系統提示", { type: "success" });
3063
3068
  },
3064
3069
  // 警告提示
3065
- alertWarning(a) {
3066
- _e.alert(a, "系統提示", { type: "warning" });
3070
+ alertWarning(e) {
3071
+ _e.alert(e, "系統提示", { type: "warning" });
3067
3072
  },
3068
3073
  // 通知提示
3069
- notify(a) {
3070
- Ee.info(a);
3074
+ notify(e) {
3075
+ Ee.info(e);
3071
3076
  },
3072
3077
  // 错误通知
3073
- notifyError(a) {
3074
- Ee.error(a);
3078
+ notifyError(e) {
3079
+ Ee.error(e);
3075
3080
  },
3076
3081
  // 成功通知
3077
- notifySuccess(a) {
3078
- Ee.success(a);
3082
+ notifySuccess(e) {
3083
+ Ee.success(e);
3079
3084
  },
3080
3085
  // 警告通知
3081
- notifyWarning(a) {
3082
- Ee.warning(a);
3086
+ notifyWarning(e) {
3087
+ Ee.warning(e);
3083
3088
  },
3084
3089
  // 确认窗体
3085
- confirm(a) {
3086
- return _e.confirm(a, "系統提示", {
3090
+ confirm(e) {
3091
+ return _e.confirm(e, "系統提示", {
3087
3092
  confirmButtonText: "確認",
3088
3093
  cancelButtonText: "取消",
3089
3094
  type: "warning"
3090
3095
  });
3091
3096
  },
3092
3097
  // 提交内容
3093
- prompt(a, l, t = "") {
3094
- return _e.prompt(a, l || "系統提示", {
3098
+ prompt(e, l, t = "") {
3099
+ return _e.prompt(e, l || "系統提示", {
3095
3100
  confirmButtonText: "確認",
3096
3101
  cancelButtonText: "取消",
3097
3102
  type: "warning",
3098
3103
  inputType: t,
3099
- inputPlaceholder: a
3104
+ inputPlaceholder: e
3100
3105
  });
3101
3106
  },
3102
3107
  // 打开遮罩层
3103
- loading(a) {
3104
- ra = va.service({
3108
+ loading(e) {
3109
+ ca = wa.service({
3105
3110
  lock: !0,
3106
- text: a,
3111
+ text: e,
3107
3112
  background: "rgba(0, 0, 0, 0.7)"
3108
3113
  });
3109
3114
  },
3110
3115
  // 关闭遮罩层
3111
3116
  closeLoading() {
3112
- ra.close();
3117
+ ca.close();
3113
3118
  }
3114
3119
  };
3115
- function ja(a) {
3120
+ function Fa(e) {
3116
3121
  return ke()({
3117
- url: "/system/dict/data/type/" + a,
3122
+ url: "/system/dict/data/type/" + e,
3118
3123
  method: "get"
3119
3124
  });
3120
3125
  }
3121
- function Ha(a) {
3126
+ function Na(e) {
3122
3127
  return ke()({
3123
- url: "/system/common/dict/data/type/" + a,
3128
+ url: "/system/common/dict/data/type/" + e,
3124
3129
  method: "get"
3125
3130
  });
3126
3131
  }
3127
- const ve = _a("dict", () => {
3128
- const a = I(/* @__PURE__ */ new Map());
3132
+ const ve = Sa("dict", () => {
3133
+ const e = I(/* @__PURE__ */ new Map());
3129
3134
  return {
3130
- dict: a,
3131
- getDict: (o) => o && a.value.get(o) || null,
3132
- setDict: (o, u) => {
3135
+ dict: e,
3136
+ getDict: (o) => o && e.value.get(o) || null,
3137
+ setDict: (o, i) => {
3133
3138
  if (!o)
3134
3139
  return !1;
3135
3140
  try {
3136
- return a.value.set(o, u), !0;
3141
+ return e.value.set(o, i), !0;
3137
3142
  } catch (y) {
3138
3143
  return console.error("Error in setDict:", y), !1;
3139
3144
  }
@@ -3142,135 +3147,136 @@ const ve = _a("dict", () => {
3142
3147
  if (!o)
3143
3148
  return !1;
3144
3149
  try {
3145
- return a.value.delete(o);
3146
- } catch (u) {
3147
- return console.error("Error in removeDict:", u), !1;
3150
+ return e.value.delete(o);
3151
+ } catch (i) {
3152
+ return console.error("Error in removeDict:", i), !1;
3148
3153
  }
3149
3154
  },
3150
3155
  cleanDict: () => {
3151
- a.value.clear();
3156
+ e.value.clear();
3152
3157
  }
3153
3158
  };
3154
- }), Yl = (...a) => {
3159
+ }), Rl = (...e) => {
3155
3160
  const l = I({});
3156
- return a.forEach(async (t) => {
3161
+ return e.forEach(async (t) => {
3157
3162
  l.value[t] = [];
3158
- const e = ve().getDict(t);
3159
- e ? l.value[t] = e : await ja(t).then((c) => {
3163
+ const a = ve().getDict(t);
3164
+ a ? l.value[t] = a : await Fa(t).then((c) => {
3160
3165
  l.value[t] = c.data.map(
3161
3166
  (o) => ({ label: o.dictLabel, value: o.dictValue, elTagType: o.listClass, elTagClass: o.cssClass })
3162
3167
  ), ve().setDict(t, l.value[t]);
3163
3168
  });
3164
3169
  }), l.value;
3165
- }, Ml = async (a) => {
3166
- const l = ve().getDict(a);
3170
+ }, jl = async (e) => {
3171
+ const l = ve().getDict(e);
3167
3172
  if (l && l.length > 0) return l;
3168
3173
  {
3169
- const e = (await ja(a)).data.map(
3174
+ const a = (await Fa(e)).data.map(
3170
3175
  (c) => ({ label: c.dictLabel, value: c.dictValue, elTagType: c.listClass, elTagClass: c.cssClass, remark: c.remark })
3171
3176
  );
3172
- return ve().setDict(a, e), e;
3177
+ return ve().setDict(e, a), a;
3173
3178
  }
3174
- }, Rl = (...a) => {
3179
+ }, Hl = (...e) => {
3175
3180
  const l = I({});
3176
- return a.forEach(async (t) => {
3181
+ return e.forEach(async (t) => {
3177
3182
  l.value[t] = [];
3178
- const e = ve().getDict(t);
3179
- e && e.length > 0 ? l.value[t] = e : await Ha(t).then((c) => {
3183
+ const a = ve().getDict(t);
3184
+ a && a.length > 0 ? l.value[t] = a : await Na(t).then((c) => {
3180
3185
  l.value[t] = c.data.map(
3181
3186
  (o) => ({ label: o.dictLabel, value: o.dictValue, elTagType: o.listClass, elTagClass: o.cssClass, remark: o.remark })
3182
3187
  ), ve().setDict(t, l.value[t]);
3183
3188
  });
3184
3189
  }), l.value;
3185
- }, jl = async (a) => {
3186
- const l = ve().getDict(a);
3190
+ }, Fl = async (e) => {
3191
+ const l = ve().getDict(e);
3187
3192
  if (l && l.length > 0) return l;
3188
3193
  {
3189
- const e = (await Ha(a)).data.map((c) => ({ label: c.dictLabel, value: c.dictValue, elTagType: c.listClass, elTagClass: c.cssClass }));
3190
- return ve().setDict(a, e), e;
3194
+ const a = (await Na(e)).data.map((c) => ({ label: c.dictLabel, value: c.dictValue, elTagType: c.listClass, elTagClass: c.cssClass }));
3195
+ return ve().setDict(e, a), a;
3191
3196
  }
3192
- }, Hl = {
3193
- beforeMount(a, { value: l, arg: t }) {
3197
+ }, Nl = {
3198
+ beforeMount(e, { value: l, arg: t }) {
3194
3199
  if (t === "callback")
3195
- a.$copyCallback = l;
3200
+ e.$copyCallback = l;
3196
3201
  else {
3197
- a.$copyValue = l;
3198
- const e = () => {
3199
- Fl(a.$copyValue), a.$copyCallback && a.$copyCallback(a.$copyValue);
3202
+ e.$copyValue = l;
3203
+ const a = () => {
3204
+ Kl(e.$copyValue), e.$copyCallback && e.$copyCallback(e.$copyValue);
3200
3205
  };
3201
- a.addEventListener("click", e), a.$destroyCopy = () => a.removeEventListener("click", e);
3206
+ e.addEventListener("click", a), e.$destroyCopy = () => e.removeEventListener("click", a);
3202
3207
  }
3203
3208
  }
3204
3209
  };
3205
- function Fl(a, { target: l = document.body } = {}) {
3206
- const t = document.createElement("textarea"), e = document.activeElement;
3207
- t.value = a, t.setAttribute("readonly", ""), t.style.contain = "strict", t.style.position = "absolute", t.style.left = "-9999px", t.style.fontSize = "12pt";
3210
+ function Kl(e, { target: l = document.body } = {}) {
3211
+ const t = document.createElement("textarea"), a = document.activeElement;
3212
+ t.value = e, t.setAttribute("readonly", ""), t.style.contain = "strict", t.style.position = "absolute", t.style.left = "-9999px", t.style.fontSize = "12pt";
3208
3213
  const c = document.getSelection();
3209
3214
  let o;
3210
- c && (o = (c == null ? void 0 : c.rangeCount) > 0 && c.getRangeAt(0)), l.append(t), t.select(), t.selectionStart = 0, t.selectionEnd = a.length;
3211
- let u = !1;
3215
+ c && (o = (c == null ? void 0 : c.rangeCount) > 0 && c.getRangeAt(0)), l.append(t), t.select(), t.selectionStart = 0, t.selectionEnd = e.length;
3216
+ let i = !1;
3212
3217
  try {
3213
- u = document.execCommand("copy");
3218
+ i = document.execCommand("copy");
3214
3219
  } catch (y) {
3215
3220
  console.error(y);
3216
3221
  }
3217
- return t.remove(), o && (c == null || c.removeAllRanges(), c == null || c.addRange(o)), e && e.focus(), u;
3222
+ return t.remove(), o && (c == null || c.removeAllRanges(), c == null || c.addRange(o)), a && a.focus(), i;
3218
3223
  }
3219
- const Nl = {
3220
- zh_CN: za,
3221
- zh_HK: Ba,
3222
- en_US: Ya
3223
- }, Kl = {
3224
- Curd: Pl,
3225
- DictTag: Sa,
3226
- DictText: Va,
3227
- SvgIcon: Fe,
3228
- OssImagePreview: Ca,
3229
- OssFile: Ta,
3230
- Editor: xa,
3231
- TranslateInput: Ia,
3232
- ImageUpload: Pa,
3233
- FileUpload: Oa
3234
- }, Wl = (a, l = {}) => {
3235
- l.baseUrl != null && Ct(l.baseUrl), l.request && $t(l.request), l.globalHeaders && Dt(l.globalHeaders), (l.hasPermi || l.hasRoles) && Il(l);
3224
+ const Wl = {
3225
+ zh_CN: Ra,
3226
+ zh_HK: ja,
3227
+ en_US: Ha
3228
+ }, ql = {
3229
+ Curd: Bl,
3230
+ DictTag: Ca,
3231
+ DictText: Da,
3232
+ SvgIcon: Ne,
3233
+ OssImagePreview: Ua,
3234
+ OssFile: Aa,
3235
+ Editor: Ya,
3236
+ TranslateInput: Ba,
3237
+ ImageUpload: za,
3238
+ FileUpload: La
3239
+ }, Ql = (e, l = {}) => {
3240
+ l.baseUrl != null && Et(l.baseUrl), l.request && Ct(l.request), l.globalHeaders && Tt(l.globalHeaders), (l.hasPermi || l.hasRoles) && Wt(l);
3236
3241
  try {
3237
- const e = a.config.globalProperties.$i18n;
3238
- if (e) {
3239
- const c = e.global || e;
3240
- for (const [o, u] of Object.entries(Nl))
3241
- if (c && typeof c.mergeLocaleMessage == "function" && c.mergeLocaleMessage(o, u), c && c.messages) {
3242
+ const a = e.config.globalProperties.$i18n;
3243
+ if (a) {
3244
+ const c = a.global || a;
3245
+ for (const [o, i] of Object.entries(Wl))
3246
+ if (c && typeof c.mergeLocaleMessage == "function" && c.mergeLocaleMessage(o, i), c && c.messages) {
3242
3247
  const y = c.messages[o] || {};
3243
- c.messages[o] = { ...u, ...y };
3248
+ c.messages[o] = { ...i, ...y };
3244
3249
  }
3245
3250
  }
3246
3251
  } catch {
3247
3252
  }
3248
- for (const [e, c] of Object.entries(Kl))
3249
- a.component(e, c);
3250
- const t = a.config.globalProperties;
3251
- t.$modal = Bl, t.download = zl, t.useDict = Yl, t.useOneDict = Ml, t.useOneCommonDict = jl, t.useCommonDict = Rl, t.parseTime = ml, t.addDateRange = yl, t.handleTree = vl, t.selectDictLabel = gl, t.selectDictLabels = bl, a.directive("hasPermi", xl), a.directive("hasRoles", Ll), a.directive("copyText", Hl);
3252
- }, no = { install: Wl };
3253
+ for (const [a, c] of Object.entries(ql))
3254
+ e.component(a, c);
3255
+ const t = e.config.globalProperties;
3256
+ t.$modal = Ml, t.download = Yl, t.useDict = Rl, t.useOneDict = jl, t.useOneCommonDict = Fl, t.useCommonDict = Hl, t.parseTime = kl, t.addDateRange = _l, t.handleTree = Sl, t.selectDictLabel = wl, t.selectDictLabels = Vl, e.directive("hasPermi", qt), e.directive("hasRoles", Qt), e.directive("copyText", Nl);
3257
+ }, co = { install: Ql };
3253
3258
  export {
3254
- Pl as Curd,
3255
- Sa as DictTag,
3256
- Va as DictText,
3257
- xa as Editor,
3258
- Oa as FileUpload,
3259
- Pa as ImageUpload,
3260
- Ta as OssFile,
3261
- Ca as OssImagePreview,
3262
- Fe as SvgIcon,
3263
- Ia as TranslateInput,
3264
- no as default,
3265
- zl as download,
3266
- We as getBaseUrl,
3267
- Ke as getGlobalHeaders,
3259
+ Bl as Curd,
3260
+ Ca as DictTag,
3261
+ Da as DictText,
3262
+ Ya as Editor,
3263
+ La as FileUpload,
3264
+ za as ImageUpload,
3265
+ Aa as OssFile,
3266
+ Ua as OssImagePreview,
3267
+ Ne as SvgIcon,
3268
+ Ba as TranslateInput,
3269
+ co as default,
3270
+ Yl as download,
3271
+ qe as getBaseUrl,
3272
+ We as getGlobalHeaders,
3268
3273
  ke as getRequest,
3269
- Wl as install,
3270
- Nl as messages,
3271
- Ct as setBaseUrl,
3272
- Dt as setGlobalHeaders,
3273
- Il as setPermissionChecker,
3274
- $t as setRequest
3274
+ Be as hasPermission,
3275
+ Ql as install,
3276
+ Wl as messages,
3277
+ Et as setBaseUrl,
3278
+ Tt as setGlobalHeaders,
3279
+ Wt as setPermissionChecker,
3280
+ Ct as setRequest
3275
3281
  };
3276
3282
  //# sourceMappingURL=vue3-curd.es.js.map