joy-admin-components 0.1.32 → 0.1.35

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,37 +1,38 @@
1
- import { ElForm as Se, ElRow as xe, ElCol as Te, dayjs as re } from "element-plus";
2
- import { defineComponent as ce, ref as F, onMounted as ue, h as X, mergeModels as ie, useAttrs as De, useModel as Oe, computed as J, resolveComponent as x, openBlock as w, createBlock as D, mergeProps as W, unref as B, withCtx as T, renderSlot as Y, createVNode as E, createTextVNode as R, toDisplayString as H, createCommentVNode as P, createElementBlock as A, Fragment as te, renderList as fe, withModifiers as ne, nextTick as de, createElementVNode as M, resolveDynamicComponent as he, withKeys as ze, normalizeStyle as Ee, normalizeClass as oe, reactive as ee, onUnmounted as Ue } from "vue";
3
- import { difference as Ie, debounce as ge, cloneDeep as Ve } from "lodash";
4
- import { useI18n as ae } from "vue-i18n";
5
- import V from "crypto-js";
6
- import { saveAs as Fe } from "file-saver";
7
- import me from "exceljs";
8
- import pe from "dayjs";
9
- const vt = ce({
1
+ import { ElForm as Ee, ElRow as ze, ElCol as Fe, dayjs as ie } from "element-plus";
2
+ import { defineComponent as fe, ref as T, onMounted as de, h as ee, mergeModels as ce, useAttrs as Ae, useModel as Ve, computed as q, resolveComponent as x, openBlock as $, createBlock as O, mergeProps as J, unref as R, withCtx as D, renderSlot as Y, createVNode as F, createTextVNode as B, toDisplayString as H, createCommentVNode as j, createElementBlock as L, Fragment as oe, renderList as he, withModifiers as ae, nextTick as ge, createElementVNode as M, resolveDynamicComponent as pe, withKeys as Ie, normalizeStyle as Ue, normalizeClass as re, reactive as te, onUnmounted as Le, watch as me, toValue as Me } from "vue";
3
+ import { difference as Ye, debounce as ve, cloneDeep as je } from "lodash";
4
+ import { useI18n as W } from "vue-i18n";
5
+ import I from "crypto-js";
6
+ import { saveAs as Pe } from "file-saver";
7
+ import ye from "exceljs";
8
+ import be from "dayjs";
9
+ import { createNamespacedHelpers as le, useStore as Ce, mapState as Re, mapGetters as Be, mapActions as He } from "vuex";
10
+ const Dt = fe({
10
11
  name: "LayOutForm",
11
12
  setup(n, { slots: e, attrs: t, emit: o }) {
12
- const a = F(null), c = () => e.default ? e.default().filter((u) => u.type !== Symbol.for("v-cmt")).map((u) => u.type === Symbol.for("v-fgt") ? u.children : u).flat().map(
13
+ const a = T(null), l = () => e.default ? e.default().filter((u) => u.type !== Symbol.for("v-cmt")).map((u) => u.type === Symbol.for("v-fgt") ? u.children : u).flat().map(
13
14
  (u) => {
14
- var r;
15
- return X(
16
- Te,
17
- { span: ((r = u.props) == null ? void 0 : r.span) || 24 },
15
+ var s;
16
+ return ee(
17
+ Fe,
18
+ { span: ((s = u.props) == null ? void 0 : s.span) || 24 },
18
19
  {
19
20
  default: () => u
20
21
  }
21
22
  );
22
23
  }
23
24
  ) : null;
24
- ue(() => {
25
+ de(() => {
25
26
  o("ref", a.value);
26
27
  });
27
- function l() {
28
- return X(
29
- Se,
28
+ function r() {
29
+ return ee(
30
+ Ee,
30
31
  { ...t, ref: a },
31
- () => X(xe, { gutter: t.gutter ?? 20 }, { default: () => c() })
32
+ () => ee(ze, { gutter: t.gutter ?? 20 }, { default: () => l() })
32
33
  );
33
34
  }
34
- return l;
35
+ return r;
35
36
  }
36
37
  });
37
38
  const K = (n, e) => {
@@ -39,9 +40,9 @@ const K = (n, e) => {
39
40
  for (const [o, a] of e)
40
41
  t[o] = a;
41
42
  return t;
42
- }, Le = {
43
+ }, Ne = {
43
44
  __name: "index",
44
- props: /* @__PURE__ */ ie({
45
+ props: /* @__PURE__ */ ce({
45
46
  api: {
46
47
  type: Function
47
48
  },
@@ -79,116 +80,116 @@ const K = (n, e) => {
79
80
  modelValue: {},
80
81
  modelModifiers: {}
81
82
  }),
82
- emits: /* @__PURE__ */ ie(["success", "change"], ["update:modelValue"]),
83
+ emits: /* @__PURE__ */ ce(["success", "change"], ["update:modelValue"]),
83
84
  setup(n, { emit: e }) {
84
- const t = n, o = De(), { t: a, locale: c } = ae(), l = Oe(n, "modelValue"), u = J({
85
+ const t = n, o = Ae(), { t: a, locale: l } = W(), r = Ve(n, "modelValue"), u = q({
85
86
  get() {
86
- if (o.multiple == null || l.value == null)
87
+ if (o.multiple == null || r.value == null)
87
88
  return !1;
88
- let f = t.data ? t.data : v.value, i = Ie(
89
- f.map((m) => o["value-key"] ? m : m[t.labelValue.value]),
90
- l.value
89
+ let f = t.data ? t.data : m.value, i = Ye(
90
+ f.map((p) => o["value-key"] ? p : p[t.labelValue.value]),
91
+ r.value
91
92
  ).length == 0;
92
- return l.value.length == f.length && i;
93
+ return r.value.length == f.length && i;
93
94
  },
94
95
  set(f) {
95
96
  return f;
96
97
  }
97
- }), r = e, v = F([]), p = async () => {
98
+ }), s = e, m = T([]), v = async () => {
98
99
  const { data: f } = await t.api();
99
- v.value = [...f], r("success", v);
100
+ m.value = [...f], s("success", m);
100
101
  };
101
- t.api && p();
102
- const k = t.labelValue.label.split("-"), d = (f) => {
103
- if (k.length == 1) {
102
+ t.api && v();
103
+ const _ = t.labelValue.label.split("-"), g = (f) => {
104
+ if (_.length == 1) {
104
105
  if (t.changeLocal)
105
106
  return a(f[t.labelValue.label]);
106
- let i = c.value == "en_us" ? f[t.labelValue.labelEn || "i18nName"] : f[t.labelValue.label];
107
+ let i = l.value == "en_us" ? f[t.labelValue.labelEn || "i18nName"] : f[t.labelValue.label];
107
108
  return i = i || f[t.labelValue.label], i;
108
109
  } else {
109
110
  let i = [];
110
- return k.forEach((m) => {
111
- i.push(f[m]);
111
+ return _.forEach((p) => {
112
+ i.push(f[p]);
112
113
  }), i.join("-");
113
114
  }
114
115
  };
115
- function b(f) {
116
- let i = t.data ? t.data : v.value;
117
- l.value = f ? i.map((m) => o["value-key"] ? m : m[t.labelValue.value]) : [], de(() => {
118
- r("change", l.value);
116
+ function y(f) {
117
+ let i = t.data ? t.data : m.value;
118
+ r.value = f ? i.map((p) => o["value-key"] ? p : p[t.labelValue.value]) : [], ge(() => {
119
+ s("change", r.value);
119
120
  });
120
121
  }
121
- function h(f) {
122
- t.optionClick && t.optionClick(f), t.optionClick && r("change", o["value-key"] ? f : f[t.labelValue.value]);
122
+ function d(f) {
123
+ t.optionClick && t.optionClick(f), t.optionClick && s("change", o["value-key"] ? f : f[t.labelValue.value]);
123
124
  }
124
- function s(f) {
125
- r("change", f);
125
+ function c(f) {
126
+ s("change", f);
126
127
  }
127
- function g(f) {
128
- return o.multiple != null && o.multiple != !1 && t.maxLimit > 0 ? l.value.length >= t.maxLimit && !l.value.includes(f[t.labelValue.value]) : o.multiple != null && o.multiple != !1 && t.minLimit > 0 ? l.value.length <= t.minLimit && l.value.includes(f[t.labelValue.value]) : !1;
128
+ function h(f) {
129
+ return o.multiple != null && o.multiple != !1 && t.maxLimit > 0 ? r.value.length >= t.maxLimit && !r.value.includes(f[t.labelValue.value]) : o.multiple != null && o.multiple != !1 && t.minLimit > 0 ? r.value.length <= t.minLimit && r.value.includes(f[t.labelValue.value]) : !1;
129
130
  }
130
131
  return (f, i) => {
131
- const m = x("el-checkbox"), $ = x("el-option"), C = x("el-select");
132
- return w(), D(C, W({
133
- modelValue: l.value,
134
- "onUpdate:modelValue": i[1] || (i[1] = (S) => l.value = S)
135
- }, B(o), {
132
+ const p = x("el-checkbox"), k = x("el-option"), C = x("el-select");
133
+ return $(), O(C, J({
134
+ modelValue: r.value,
135
+ "onUpdate:modelValue": i[1] || (i[1] = (S) => r.value = S)
136
+ }, R(o), {
136
137
  filterable: "",
137
138
  "collapse-tags": "",
138
139
  "collapse-tags-tooltip": "",
139
140
  clearable: "",
140
- onClear: s,
141
- onChange: s
141
+ onClear: c,
142
+ onChange: c
142
143
  }), {
143
- default: T(() => [
144
- B(o).multiple != null && B(o).multiple != !1 && n.showCheckAll ? Y(f.$slots, "header", { key: 0 }, () => [
145
- E(m, {
144
+ default: D(() => [
145
+ R(o).multiple != null && R(o).multiple != !1 && n.showCheckAll ? Y(f.$slots, "header", { key: 0 }, () => [
146
+ F(p, {
146
147
  class: "mgl20",
147
148
  modelValue: u.value,
148
149
  "onUpdate:modelValue": i[0] || (i[0] = (S) => u.value = S),
149
- onChange: b
150
+ onChange: y
150
151
  }, {
151
- default: T(() => [
152
- R(H(f.$t("quan-xuan")), 1)
152
+ default: D(() => [
153
+ B(H(f.$t("quan-xuan")), 1)
153
154
  ]),
154
155
  _: 1
155
156
  }, 8, ["modelValue"])
156
- ], !0) : P("", !0),
157
- (w(!0), A(te, null, fe(n.data ? n.data : v.value, (S, O) => (w(), D($, {
158
- key: O,
159
- disabled: g(S),
160
- label: d(S),
161
- onClick: ne((U) => h(S), ["stop"]),
162
- value: B(o)["value-key"] ? S : S[n.labelValue.value]
157
+ ], !0) : j("", !0),
158
+ ($(!0), L(oe, null, he(n.data ? n.data : m.value, (S, E) => ($(), O(k, {
159
+ key: E,
160
+ disabled: h(S),
161
+ label: g(S),
162
+ onClick: ae((A) => d(S), ["stop"]),
163
+ value: R(o)["value-key"] ? S : S[n.labelValue.value]
163
164
  }, null, 8, ["disabled", "label", "onClick", "value"]))), 128))
164
165
  ]),
165
166
  _: 3
166
167
  }, 16, ["modelValue"]);
167
168
  };
168
169
  }
169
- }, Ae = /* @__PURE__ */ K(Le, [["__scopeId", "data-v-02dd2f72"]]), yt = {
170
+ }, qe = /* @__PURE__ */ K(Ne, [["__scopeId", "data-v-02dd2f72"]]), Ot = {
170
171
  __name: "index",
171
172
  emits: ["ok", "no"],
172
173
  setup(n, { emit: e }) {
173
- const t = e, o = ge(() => {
174
+ const t = e, o = ve(() => {
174
175
  t("ok");
175
176
  }, 500);
176
177
  function a() {
177
178
  t("no");
178
179
  }
179
- return (c, l) => {
180
- const u = x("el-link"), r = x("el-popconfirm");
181
- return w(), D(r, W(c.$attrs, {
182
- onConfirm: B(o),
180
+ return (l, r) => {
181
+ const u = x("el-link"), s = x("el-popconfirm");
182
+ return $(), O(s, J(l.$attrs, {
183
+ onConfirm: R(o),
183
184
  onCancel: a
184
185
  }), {
185
- reference: T(() => [
186
- E(u, {
186
+ reference: D(() => [
187
+ F(u, {
187
188
  underline: "never",
188
- type: c.$attrs.type
189
+ type: l.$attrs.type
189
190
  }, {
190
- default: T(() => [
191
- Y(c.$slots, "default")
191
+ default: D(() => [
192
+ Y(l.$slots, "default")
192
193
  ]),
193
194
  _: 3
194
195
  }, 8, ["type"])
@@ -198,7 +199,7 @@ const K = (n, e) => {
198
199
  };
199
200
  }
200
201
  };
201
- const Me = ["accept"], Ye = {
202
+ const Ke = ["accept"], Ze = {
202
203
  __name: "index",
203
204
  props: {
204
205
  accept: {
@@ -212,21 +213,21 @@ const Me = ["accept"], Ye = {
212
213
  },
213
214
  emits: ["fileChange"],
214
215
  setup(n, { emit: e }) {
215
- const t = e, o = F(null);
216
- function a(c) {
217
- let l = c.target.files[0];
218
- t("fileChange", l), o.value.value = null;
216
+ const t = e, o = T(null);
217
+ function a(l) {
218
+ let r = l.target.files[0];
219
+ t("fileChange", r), o.value.value = null;
219
220
  }
220
- return (c, l) => {
221
+ return (l, r) => {
221
222
  const u = x("el-button");
222
- return w(), A("span", null, [
223
- E(u, {
223
+ return $(), L("span", null, [
224
+ F(u, {
224
225
  loading: n.loading,
225
226
  class: "mgr10",
226
- onClick: l[0] || (l[0] = (r) => o.value.click())
227
+ onClick: r[0] || (r[0] = (s) => o.value.click())
227
228
  }, {
228
- default: T(() => [
229
- R(H(c.$t("dao-ru")), 1)
229
+ default: D(() => [
230
+ B(H(l.$t("dao-ru")), 1)
230
231
  ]),
231
232
  _: 1
232
233
  }, 8, ["loading"]),
@@ -237,12 +238,12 @@ const Me = ["accept"], Ye = {
237
238
  accept: n.accept,
238
239
  style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
239
240
  type: "file"
240
- }, null, 40, Me)
241
+ }, null, 40, Ke)
241
242
  ]);
242
243
  };
243
244
  }
244
- }, Ct = /* @__PURE__ */ K(Ye, [["__scopeId", "data-v-5f1449ad"]]);
245
- const Pe = ce({
245
+ }, Et = /* @__PURE__ */ K(Ze, [["__scopeId", "data-v-5f1449ad"]]);
246
+ const Ge = fe({
246
247
  props: {
247
248
  name: {
248
249
  tyepe: String,
@@ -250,17 +251,17 @@ const Pe = ce({
250
251
  }
251
252
  }
252
253
  });
253
- function je(n, e, t, o, a, c) {
254
- const l = x("el-icon");
255
- return w(), D(l, { class: "cmp-icon" }, {
256
- default: T(() => [
257
- (w(), D(he(n.name)))
254
+ function Je(n, e, t, o, a, l) {
255
+ const r = x("el-icon");
256
+ return $(), O(r, { class: "cmp-icon" }, {
257
+ default: D(() => [
258
+ ($(), O(pe(n.name)))
258
259
  ]),
259
260
  _: 1
260
261
  });
261
262
  }
262
- const ve = /* @__PURE__ */ K(Pe, [["render", je], ["__scopeId", "data-v-733f9daa"]]);
263
- const Be = { key: 0 }, Re = { class: "btns" }, He = { class: "left" }, Ne = { class: "right" }, Ke = {
263
+ const _e = /* @__PURE__ */ K(Ge, [["render", Je], ["__scopeId", "data-v-733f9daa"]]);
264
+ const We = { key: 0 }, Qe = { class: "btns" }, Xe = { class: "left" }, et = { class: "right" }, tt = {
264
265
  __name: "index",
265
266
  props: {
266
267
  form: {
@@ -270,71 +271,71 @@ const Be = { key: 0 }, Re = { class: "btns" }, He = { class: "left" }, Ne = { cl
270
271
  },
271
272
  emits: ["confirm", "reset"],
272
273
  setup(n, { emit: e }) {
273
- const t = e, o = F(!0), a = F(null), { t: c } = ae(), l = J(() => o.value ? c("guan-bi") : c("zhan-kai"));
274
+ const t = e, o = T(!0), a = T(null), { t: l } = W(), r = q(() => o.value ? l("guan-bi") : l("zhan-kai"));
274
275
  function u() {
275
276
  t("confirm");
276
277
  }
277
- function r() {
278
+ function s() {
278
279
  t("reset");
279
280
  }
280
- function v() {
281
+ function m() {
281
282
  t("confirm");
282
283
  }
283
- return (p, k) => {
284
- const d = x("el-input"), b = x("el-date-picker"), h = x("el-form-item"), s = x("el-form"), g = x("el-link"), f = x("el-button");
285
- return w(), A("div", {
284
+ return (v, _) => {
285
+ const g = x("el-input"), y = x("el-date-picker"), d = x("el-form-item"), c = x("el-form"), h = x("el-link"), f = x("el-button");
286
+ return $(), L("div", {
286
287
  class: "searchBar-container mgt10 mgb10",
287
- onKeydown: ze(u, ["enter"])
288
+ onKeydown: Ie(u, ["enter"])
288
289
  }, [
289
290
  M("div", {
290
291
  class: "searchBar",
291
- style: Ee({ height: o.value ? "auto" : "42px" })
292
+ style: Ue({ height: o.value ? "auto" : "42px" })
292
293
  }, [
293
- E(s, {
294
+ F(c, {
294
295
  inline: "",
295
296
  model: n.form.data
296
297
  }, {
297
- default: T(() => [
298
- (w(!0), A(te, null, fe(n.form.items.filter((i) => !i.hidden), (i) => (w(), A(te, {
298
+ default: D(() => [
299
+ ($(!0), L(oe, null, he(n.form.items.filter((i) => !i.hidden), (i) => ($(), L(oe, {
299
300
  key: i.key
300
301
  }, [
301
- i.type == "br" ? (w(), A("br", Be)) : (w(), D(h, {
302
+ i.type == "br" ? ($(), L("br", We)) : ($(), O(d, {
302
303
  key: 1,
303
304
  label: i.name
304
305
  }, {
305
- default: T(() => {
306
- var m, $;
306
+ default: D(() => {
307
+ var p, k;
307
308
  return [
308
- i.type === "input" ? (w(), D(d, {
309
+ i.type === "input" ? ($(), O(g, {
309
310
  key: 0,
310
311
  modelValue: i.value,
311
312
  "onUpdate:modelValue": (C) => i.value = C,
312
- class: oe(((m = i.option) == null ? void 0 : m.class) || "w150"),
313
- placeholder: p.$t("qing-shu-ru"),
313
+ class: re(((p = i.option) == null ? void 0 : p.class) || "w150"),
314
+ placeholder: v.$t("qing-shu-ru"),
314
315
  clearable: ""
315
- }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : i.type === "custom" ? (w(), D(he(i.render), { key: 1 })) : P("", !0),
316
- i.type === "select" ? (w(), D(Ae, W({
316
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : i.type === "custom" ? ($(), O(pe(i.render), { key: 1 })) : j("", !0),
317
+ i.type === "select" ? ($(), O(qe, J({
317
318
  key: 2,
318
- class: (($ = i.option) == null ? void 0 : $.class) || "w150",
319
+ class: ((k = i.option) == null ? void 0 : k.class) || "w150",
319
320
  modelValue: i.value,
320
321
  "onUpdate:modelValue": (C) => i.value = C
321
322
  }, { ref_for: !0 }, i.option, {
322
323
  onChange: u,
323
324
  onClear: u
324
- }), null, 16, ["class", "modelValue", "onUpdate:modelValue"])) : P("", !0),
325
- i.type === "date" ? (w(), D(b, {
325
+ }), null, 16, ["class", "modelValue", "onUpdate:modelValue"])) : j("", !0),
326
+ i.type === "date" ? ($(), O(y, {
326
327
  key: 3,
327
- class: oe({ datetimerange: "w300", daterange: "w200" }[i.dateType] || "w100"),
328
+ class: re({ datetimerange: "w300", daterange: "w200" }[i.dateType] || "w100"),
328
329
  modelValue: i.value,
329
330
  "onUpdate:modelValue": (C) => i.value = C,
330
331
  "value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[i.dateType] || "YYYY-MM-DD",
331
332
  type: i.dateType || "date",
332
333
  onFocus: (C) => a.value = i,
333
- onChange: (C) => v(),
334
- placeholder: p.$t("qing-xuan-ze"),
335
- "start-placeholder": p.$t("kai-shi-shi-jian"),
336
- "end-placeholder": p.$t("jie-shu-shi-jian")
337
- }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : P("", !0)
334
+ onChange: (C) => m(),
335
+ placeholder: v.$t("qing-xuan-ze"),
336
+ "start-placeholder": v.$t("kai-shi-shi-jian"),
337
+ "end-placeholder": v.$t("jie-shu-shi-jian")
338
+ }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : j("", !0)
338
339
  ];
339
340
  }),
340
341
  _: 2
@@ -344,70 +345,70 @@ const Be = { key: 0 }, Re = { class: "btns" }, He = { class: "left" }, Ne = { cl
344
345
  _: 1
345
346
  }, 8, ["model"])
346
347
  ], 4),
347
- M("div", Re, [
348
- M("div", He, [
349
- Y(p.$slots, "table-header-left", {}, void 0, !0)
348
+ M("div", Qe, [
349
+ M("div", Xe, [
350
+ Y(v.$slots, "table-header-left", {}, void 0, !0)
350
351
  ]),
351
- M("div", Ne, [
352
- E(g, {
352
+ M("div", et, [
353
+ F(h, {
353
354
  underline: "never",
354
355
  class: "mgr10",
355
- onClick: k[0] || (k[0] = (i) => o.value = !o.value)
356
+ onClick: _[0] || (_[0] = (i) => o.value = !o.value)
356
357
  }, {
357
- default: T(() => [
358
- E(ve, {
358
+ default: D(() => [
359
+ F(_e, {
359
360
  name: o.value ? "ArrowUp" : "ArrowDown"
360
361
  }, null, 8, ["name"]),
361
- R(" " + H(l.value), 1)
362
+ B(" " + H(r.value), 1)
362
363
  ]),
363
364
  _: 1
364
365
  }),
365
- E(f, {
366
+ F(f, {
366
367
  type: "primary",
367
368
  onClick: u
368
369
  }, {
369
- default: T(() => [
370
- R(H(p.$t("shai-xuan")), 1)
370
+ default: D(() => [
371
+ B(H(v.$t("shai-xuan")), 1)
371
372
  ]),
372
373
  _: 1
373
374
  }),
374
- E(f, {
375
+ F(f, {
375
376
  type: "primary",
376
- onClick: r
377
+ onClick: s
377
378
  }, {
378
- default: T(() => [
379
- R(H(p.$t("chong-zhi")), 1)
379
+ default: D(() => [
380
+ B(H(v.$t("chong-zhi")), 1)
380
381
  ]),
381
382
  _: 1
382
383
  }),
383
- Y(p.$slots, "btn", {}, void 0, !0)
384
+ Y(v.$slots, "btn", {}, void 0, !0)
384
385
  ])
385
386
  ])
386
387
  ], 32);
387
388
  };
388
389
  }
389
- }, qe = /* @__PURE__ */ K(Ke, [["__scopeId", "data-v-f3f60f9c"]]);
390
- function Ze(n) {
390
+ }, nt = /* @__PURE__ */ K(tt, [["__scopeId", "data-v-f3f60f9c"]]);
391
+ function ot(n) {
391
392
  return n ? Array.isArray(n) ? n : n.split(",").map((e) => e.trim()).filter(Boolean) : [];
392
393
  }
393
- function Z(n) {
394
+ function G(n) {
394
395
  let e = {};
395
396
  return n.forEach((t) => {
396
- const { key: o, type: a, option: c = {}, value: l, dateType: u, toArr: r } = t;
397
- if (a == "input" && (c != null && c.multiple))
398
- e[o] = Ze(l);
397
+ const { key: o, type: a, option: l = {}, value: r, dateType: u, toArr: s } = t;
398
+ if (a == "input" && (l != null && l.multiple))
399
+ e[o] = ot(r);
399
400
  else if (a == "date")
400
401
  if (u.includes("range")) {
401
- const [v, p] = o;
402
- let [k, d] = l || [];
403
- k && u == "daterange" && (k = re(k).format("YYYY-MM-DD 00:00:00"), d = re(d).format("YYYY-MM-DD 23:59:59")), e[v] = k, e[p] = d;
402
+ const [m, v] = o;
403
+ let [_, g] = r || [];
404
+ _ && u == "daterange" && (_ = ie(_).format("YYYY-MM-DD 00:00:00"), g = ie(g).format("YYYY-MM-DD 23:59:59")), e[m] = _, e[v] = g;
404
405
  } else
405
- e[o] = l;
406
+ e[o] = r;
406
407
  else
407
- a == "select" ? e[o] = r ? [l] : l : e[o] = l;
408
+ a == "select" ? e[o] = s ? [r] : r : e[o] = r;
408
409
  }), e;
409
410
  }
410
- const Je = { class: "center" }, We = {
411
+ const at = { class: "center" }, rt = {
411
412
  __name: "index",
412
413
  props: {
413
414
  // 表格id 本地存储列设置时使用
@@ -447,70 +448,70 @@ const Je = { class: "center" }, We = {
447
448
  }
448
449
  },
449
450
  setup(n, { expose: e }) {
450
- const { t, locale: o } = ae(), a = n, c = F(!1), l = F([]), u = Ve(a.searchForm.items), r = ee({
451
+ const { t, locale: o } = W(), a = n, l = T(!1), r = T([]), u = je(a.searchForm.items), s = te({
451
452
  pageNo: 1,
452
453
  pageSize: 10,
453
454
  total: 0
454
- }), v = F(null), p = F(450), k = ge(() => {
455
- de(() => {
456
- if (!v.value)
455
+ }), m = T(null), v = T(450), _ = ve(() => {
456
+ ge(() => {
457
+ if (!m.value)
457
458
  return;
458
- const _ = v.value.getBoundingClientRect(), z = window.innerHeight, L = _.top, j = 100, G = z - L - j, Q = 200;
459
- p.value = Math.max(G, Q);
459
+ const w = m.value.getBoundingClientRect(), z = window.innerHeight, U = w.top, P = 100, Q = z - U - P, X = 200;
460
+ v.value = Math.max(Q, X);
460
461
  });
461
- }, 100), d = () => {
462
- k();
462
+ }, 100), g = () => {
463
+ _();
463
464
  };
464
- ue(() => {
465
- k(), window.addEventListener("resize", d);
466
- }), Ue(() => {
467
- window.removeEventListener("resize", d);
465
+ de(() => {
466
+ _(), window.addEventListener("resize", g);
467
+ }), Le(() => {
468
+ window.removeEventListener("resize", g);
468
469
  });
469
- const b = J(() => C.value.height || p.value);
470
- async function h(y) {
471
- const { dataFormat: _ } = a.tableConfig;
472
- c.value = !0;
473
- const { code: z, data: L = {} } = await a.api(y).finally(() => {
474
- c.value = !1, a.searchForm.selections = [];
470
+ const y = q(() => C.value.height || v.value);
471
+ async function d(b) {
472
+ const { dataFormat: w } = a.tableConfig;
473
+ l.value = !0;
474
+ const { code: z, data: U = {} } = await a.api(b).finally(() => {
475
+ l.value = !1, a.searchForm.selections = [];
475
476
  });
476
477
  if (z == 200) {
477
- let j = L.rows || [];
478
- l.value = _ ? _(j) : j, r.total = L.totalRows || 0;
478
+ let P = U.rows || [];
479
+ r.value = w ? w(P) : P, s.total = U.totalRows || 0;
479
480
  }
480
481
  }
481
- function s(y = {}) {
482
- h({ ...r, ...Z(a.searchForm.items), ...y });
482
+ function c(b = {}) {
483
+ d({ ...s, ...G(a.searchForm.items), ...b });
483
484
  }
484
- async function g() {
485
- const { reset: y } = a.tableConfig;
486
- a.searchForm.items.forEach((_) => {
487
- const z = u.find((L) => L.key == _.key);
488
- z && (_.value = z.value);
489
- }), y && await y(), s();
485
+ async function h() {
486
+ const { reset: b } = a.tableConfig;
487
+ a.searchForm.items.forEach((w) => {
488
+ const z = u.find((U) => U.key == w.key);
489
+ z && (w.value = z.value);
490
+ }), b && await b(), c();
490
491
  }
491
- a.api && a.immediate && s();
492
+ a.api && a.immediate && c();
492
493
  function f() {
493
- return { ...r, ...Z(a.searchForm.items) };
494
+ return { ...s, ...G(a.searchForm.items) };
494
495
  }
495
- const i = F(null);
496
- e({ tableRef: i, getList: s, getPrm: f, calculateTableHeight: k });
497
- const m = ee({
496
+ const i = T(null);
497
+ e({ tableRef: i, getList: c, getPrm: f, calculateTableHeight: _ });
498
+ const p = te({
498
499
  storage: !0
499
- }), $ = ee({
500
+ }), k = te({
500
501
  drag: !0,
501
502
  resizable: !0,
502
503
  maxFixedSize: 0
503
- }), C = J(() => {
504
+ }), C = q(() => {
504
505
  const {
505
- customConfig: y,
506
- columnConfig: _,
506
+ customConfig: b,
507
+ columnConfig: w,
507
508
  ...z
508
509
  } = a.tableConfig;
509
510
  return {
510
511
  headerAlign: "left",
511
512
  align: "center",
512
- customConfig: { ...m, ...y },
513
- "column-config": { ...$, ..._ },
513
+ customConfig: { ...p, ...b },
514
+ "column-config": { ...k, ...w },
514
515
  // 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
515
516
  "virtual-x-config": {
516
517
  enabled: !1,
@@ -520,124 +521,124 @@ const Je = { class: "center" }, We = {
520
521
  "virtual-y-config": { enabled: !0, gt: 100 },
521
522
  ...z
522
523
  };
523
- }), S = (y) => {
524
- r.pageNo = y, h({ ...r, ...Z(a.searchForm.items) });
525
- }, O = (y) => {
526
- r.pageSize = y, r.pageNo = 1, h({ ...r, ...Z(a.searchForm.items) });
524
+ }), S = (b) => {
525
+ s.pageNo = b, d({ ...s, ...G(a.searchForm.items) });
526
+ }, E = (b) => {
527
+ s.pageSize = b, s.pageNo = 1, d({ ...s, ...G(a.searchForm.items) });
527
528
  };
528
- function U() {
529
- const y = i.value.getCheckboxRecords();
530
- a.searchForm.selections = y;
529
+ function A() {
530
+ const b = i.value.getCheckboxRecords();
531
+ a.searchForm.selections = b;
531
532
  }
532
- const I = (y) => {
533
- const _ = i.value;
534
- if (_) {
535
- _.toggleCheckboxRow(y);
533
+ const V = (b) => {
534
+ const w = i.value;
535
+ if (w) {
536
+ w.toggleCheckboxRow(b);
536
537
  const z = i.value.getCheckboxRecords();
537
538
  a.searchForm.selections = z;
538
539
  }
539
540
  };
540
- return (y, _) => {
541
- const z = x("el-button"), L = x("el-checkbox"), j = x("el-text"), G = x("vxe-column"), Q = x("VxeTable"), ke = x("el-pagination");
542
- return w(), A("div", {
543
- class: oe({ box: n.searchForm.showShadow })
541
+ return (b, w) => {
542
+ const z = x("el-button"), U = x("el-checkbox"), P = x("el-text"), Q = x("vxe-column"), X = x("VxeTable"), Te = x("el-pagination");
543
+ return $(), L("div", {
544
+ class: re({ box: n.searchForm.showShadow })
544
545
  }, [
545
- n.searchForm.showSearch ? (w(), D(qe, {
546
+ n.searchForm.showSearch ? ($(), O(nt, {
546
547
  key: 0,
547
548
  form: n.searchForm,
548
- onReset: g,
549
- onConfirm: _[1] || (_[1] = (N) => s())
549
+ onReset: h,
550
+ onConfirm: w[1] || (w[1] = (N) => c())
550
551
  }, {
551
- btn: T(() => [
552
- Y(y.$slots, "search-bar-btn", {}, void 0, !0),
553
- E(z, {
552
+ btn: D(() => [
553
+ Y(b.$slots, "search-bar-btn", {}, void 0, !0),
554
+ F(z, {
554
555
  round: "",
555
- onClick: _[0] || (_[0] = (N) => i.value.openCustom())
556
+ onClick: w[0] || (w[0] = (N) => i.value.openCustom())
556
557
  }, {
557
- default: T(() => [
558
- E(ve, { name: "Tools" })
558
+ default: D(() => [
559
+ F(_e, { name: "Tools" })
559
560
  ]),
560
561
  _: 1
561
562
  })
562
563
  ]),
563
564
  _: 3
564
- }, 8, ["form"])) : P("", !0),
565
- Y(y.$slots, "table-header-left", {}, void 0, !0),
565
+ }, 8, ["form"])) : j("", !0),
566
+ Y(b.$slots, "table-header-left", {}, void 0, !0),
566
567
  M("div", {
567
568
  ref_key: "tableContentRef",
568
- ref: v
569
+ ref: m
569
570
  }, [
570
- E(Q, W({
571
+ F(X, J({
571
572
  id: n.id,
572
573
  ref_key: "tableRef",
573
574
  ref: i,
574
- loading: n.loading || c.value,
575
- data: n.api ? l.value : n.data
575
+ loading: n.loading || l.value,
576
+ data: n.api ? r.value : n.data
576
577
  }, C.value, {
577
- height: b.value,
578
- onCheckboxChange: U,
579
- onCheckboxAll: U,
578
+ height: y.value,
579
+ onCheckboxChange: A,
580
+ onCheckboxAll: A,
580
581
  border: ""
581
582
  }), {
582
- default: T(() => [
583
- n.searchForm.showCheckBox ? (w(), D(G, {
583
+ default: D(() => [
584
+ n.searchForm.showCheckBox ? ($(), O(Q, {
584
585
  key: 0,
585
586
  type: "checkbox",
586
- width: B(o) == "zh_cn" ? 80 : 150,
587
+ width: R(o) == "zh_cn" ? 80 : 150,
587
588
  fixed: "left",
588
- title: y.$t("xu-hao")
589
+ title: b.$t("xu-hao")
589
590
  }, {
590
- checkbox: T(({ rowIndex: N, row: le, checked: we, disabled: q, indeterminate: st }) => [
591
- M("div", Je, [
592
- we ? (w(), D(L, {
591
+ checkbox: D(({ rowIndex: N, row: se, checked: De, disabled: Z, indeterminate: yt }) => [
592
+ M("div", at, [
593
+ De ? ($(), O(U, {
593
594
  key: 0,
594
595
  checked: !0,
595
- disabled: q,
596
+ disabled: Z,
596
597
  size: "default",
597
- onClick: ne(($e) => !q && I(le), ["stop"])
598
- }, null, 8, ["disabled", "onClick"])) : (w(), D(L, {
598
+ onClick: ae((Oe) => !Z && V(se), ["stop"])
599
+ }, null, 8, ["disabled", "onClick"])) : ($(), O(U, {
599
600
  key: 1,
600
- disabled: q,
601
+ disabled: Z,
601
602
  checked: !1,
602
603
  size: "default",
603
- onClick: ne(($e) => !q && I(le), ["stop"])
604
+ onClick: ae((Oe) => !Z && V(se), ["stop"])
604
605
  }, null, 8, ["disabled", "onClick"])),
605
- E(j, {
606
+ F(P, {
606
607
  type: "info",
607
608
  class: "mgl5"
608
609
  }, {
609
- default: T(() => [
610
- R(H(N + 1), 1)
610
+ default: D(() => [
611
+ B(H(N + 1), 1)
611
612
  ]),
612
613
  _: 2
613
614
  }, 1024)
614
615
  ])
615
616
  ]),
616
617
  _: 1
617
- }, 8, ["width", "title"])) : P("", !0),
618
- Y(y.$slots, "default", {}, void 0, !0)
618
+ }, 8, ["width", "title"])) : j("", !0),
619
+ Y(b.$slots, "default", {}, void 0, !0)
619
620
  ]),
620
621
  _: 3
621
622
  }, 16, ["id", "loading", "data", "height"])
622
623
  ], 512),
623
- n.searchForm.showPage ? (w(), D(ke, {
624
+ n.searchForm.showPage ? ($(), O(Te, {
624
625
  key: 1,
625
- "current-page": r.pageNo,
626
- "onUpdate:currentPage": _[2] || (_[2] = (N) => r.pageNo = N),
626
+ "current-page": s.pageNo,
627
+ "onUpdate:currentPage": w[2] || (w[2] = (N) => s.pageNo = N),
627
628
  class: "myPagination mgt10",
628
629
  background: "",
629
630
  layout: "total, sizes, prev, pager, next",
630
- total: r.total,
631
- "page-size": r.pageSize,
631
+ total: s.total,
632
+ "page-size": s.pageSize,
632
633
  "page-sizes": [10, 50, 100, 500],
633
634
  onCurrentChange: S,
634
- onSizeChange: O
635
- }, null, 8, ["current-page", "total", "page-size"])) : P("", !0)
635
+ onSizeChange: E
636
+ }, null, 8, ["current-page", "total", "page-size"])) : j("", !0)
636
637
  ], 2);
637
638
  };
638
639
  }
639
- }, bt = /* @__PURE__ */ K(We, [["__scopeId", "data-v-7b74503d"]]);
640
- function _t(n, e = {}) {
640
+ }, zt = /* @__PURE__ */ K(rt, [["__scopeId", "data-v-7b74503d"]]);
641
+ function Ft(n, e = {}) {
641
642
  const t = {
642
643
  inForm: !0,
643
644
  required: !0,
@@ -646,294 +647,294 @@ function _t(n, e = {}) {
646
647
  phone: /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
647
648
  password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
648
649
  email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
649
- }[n], { inForm: a, value: c, required: l, msg: u = "请输入正确内容" } = t;
650
- return a ? function(r, v, p) {
651
- if (l) {
652
- o.test(v) ? p() : p(new Error(u));
650
+ }[n], { inForm: a, value: l, required: r, msg: u = "请输入正确内容" } = t;
651
+ return a ? function(s, m, v) {
652
+ if (r) {
653
+ o.test(m) ? v() : v(new Error(u));
653
654
  return;
654
655
  }
655
- v && !o.test(v) ? p(new Error(u)) : p();
656
- } : o.test(c);
656
+ m && !o.test(m) ? v(new Error(u)) : v();
657
+ } : o.test(l);
657
658
  }
658
- const kt = {
659
+ const At = {
659
660
  //加密
660
661
  encrypt(n, e) {
661
662
  e = e || "1CFEC667A1E6D42DC12565AAAA460494";
662
- var t = V.enc.Utf8.parse(e), o = V.enc.Utf8.parse(n), a = V.AES.encrypt(o, t, {
663
- mode: V.mode.ECB,
664
- padding: V.pad.Pkcs7
663
+ var t = I.enc.Utf8.parse(e), o = I.enc.Utf8.parse(n), a = I.AES.encrypt(o, t, {
664
+ mode: I.mode.ECB,
665
+ padding: I.pad.Pkcs7
665
666
  });
666
667
  return a.toString();
667
668
  },
668
669
  //解密
669
670
  decrypt(n, e) {
670
671
  e = e || "1CFEC667A1E6D42DC12565AAAA460494";
671
- var t = V.enc.Utf8.parse(e), o = V.AES.decrypt(n, t, {
672
- mode: V.mode.ECB,
673
- padding: V.pad.Pkcs7
672
+ var t = I.enc.Utf8.parse(e), o = I.AES.decrypt(n, t, {
673
+ mode: I.mode.ECB,
674
+ padding: I.pad.Pkcs7
674
675
  });
675
- return V.enc.Utf8.stringify(o).toString();
676
+ return I.enc.Utf8.stringify(o).toString();
676
677
  }
677
678
  };
678
- var ye = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
679
- function Ce(n) {
679
+ var ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
680
+ function we(n) {
680
681
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
681
682
  }
682
- var be = { exports: {} };
683
+ var $e = { exports: {} };
683
684
  (function(n, e) {
684
685
  (function(t, o) {
685
686
  n.exports = o();
686
- })(ye, function() {
687
+ })(ke, function() {
687
688
  var t = "minute", o = /[+-]\d\d(?::?\d\d)?/g, a = /([+-]|\d\d)/g;
688
- return function(c, l, u) {
689
- var r = l.prototype;
690
- u.utc = function(s) {
691
- var g = { date: s, utc: !0, args: arguments };
692
- return new l(g);
693
- }, r.utc = function(s) {
694
- var g = u(this.toDate(), { locale: this.$L, utc: !0 });
695
- return s ? g.add(this.utcOffset(), t) : g;
696
- }, r.local = function() {
689
+ return function(l, r, u) {
690
+ var s = r.prototype;
691
+ u.utc = function(c) {
692
+ var h = { date: c, utc: !0, args: arguments };
693
+ return new r(h);
694
+ }, s.utc = function(c) {
695
+ var h = u(this.toDate(), { locale: this.$L, utc: !0 });
696
+ return c ? h.add(this.utcOffset(), t) : h;
697
+ }, s.local = function() {
697
698
  return u(this.toDate(), { locale: this.$L, utc: !1 });
698
699
  };
699
- var v = r.parse;
700
- r.parse = function(s) {
701
- s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), v.call(this, s);
700
+ var m = s.parse;
701
+ s.parse = function(c) {
702
+ c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), m.call(this, c);
702
703
  };
703
- var p = r.init;
704
- r.init = function() {
704
+ var v = s.init;
705
+ s.init = function() {
705
706
  if (this.$u) {
706
- var s = this.$d;
707
- this.$y = s.getUTCFullYear(), this.$M = s.getUTCMonth(), this.$D = s.getUTCDate(), this.$W = s.getUTCDay(), this.$H = s.getUTCHours(), this.$m = s.getUTCMinutes(), this.$s = s.getUTCSeconds(), this.$ms = s.getUTCMilliseconds();
707
+ var c = this.$d;
708
+ this.$y = c.getUTCFullYear(), this.$M = c.getUTCMonth(), this.$D = c.getUTCDate(), this.$W = c.getUTCDay(), this.$H = c.getUTCHours(), this.$m = c.getUTCMinutes(), this.$s = c.getUTCSeconds(), this.$ms = c.getUTCMilliseconds();
708
709
  } else
709
- p.call(this);
710
+ v.call(this);
710
711
  };
711
- var k = r.utcOffset;
712
- r.utcOffset = function(s, g) {
712
+ var _ = s.utcOffset;
713
+ s.utcOffset = function(c, h) {
713
714
  var f = this.$utils().u;
714
- if (f(s))
715
- return this.$u ? 0 : f(this.$offset) ? k.call(this) : this.$offset;
716
- if (typeof s == "string" && (s = function(C) {
715
+ if (f(c))
716
+ return this.$u ? 0 : f(this.$offset) ? _.call(this) : this.$offset;
717
+ if (typeof c == "string" && (c = function(C) {
717
718
  C === void 0 && (C = "");
718
719
  var S = C.match(o);
719
720
  if (!S)
720
721
  return null;
721
- var O = ("" + S[0]).match(a) || ["-", 0, 0], U = O[0], I = 60 * +O[1] + +O[2];
722
- return I === 0 ? 0 : U === "+" ? I : -I;
723
- }(s), s === null))
722
+ var E = ("" + S[0]).match(a) || ["-", 0, 0], A = E[0], V = 60 * +E[1] + +E[2];
723
+ return V === 0 ? 0 : A === "+" ? V : -V;
724
+ }(c), c === null))
724
725
  return this;
725
- var i = Math.abs(s) <= 16 ? 60 * s : s;
726
+ var i = Math.abs(c) <= 16 ? 60 * c : c;
726
727
  if (i === 0)
727
- return this.utc(g);
728
- var m = this.clone();
729
- if (g)
730
- return m.$offset = i, m.$u = !1, m;
731
- var $ = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
732
- return (m = this.local().add(i + $, t)).$offset = i, m.$x.$localOffset = $, m;
728
+ return this.utc(h);
729
+ var p = this.clone();
730
+ if (h)
731
+ return p.$offset = i, p.$u = !1, p;
732
+ var k = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
733
+ return (p = this.local().add(i + k, t)).$offset = i, p.$x.$localOffset = k, p;
733
734
  };
734
- var d = r.format;
735
- r.format = function(s) {
736
- var g = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
737
- return d.call(this, g);
738
- }, r.valueOf = function() {
739
- var s = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
740
- return this.$d.valueOf() - 6e4 * s;
741
- }, r.isUTC = function() {
735
+ var g = s.format;
736
+ s.format = function(c) {
737
+ var h = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
738
+ return g.call(this, h);
739
+ }, s.valueOf = function() {
740
+ var c = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
741
+ return this.$d.valueOf() - 6e4 * c;
742
+ }, s.isUTC = function() {
742
743
  return !!this.$u;
743
- }, r.toISOString = function() {
744
+ }, s.toISOString = function() {
744
745
  return this.toDate().toISOString();
745
- }, r.toString = function() {
746
+ }, s.toString = function() {
746
747
  return this.toDate().toUTCString();
747
748
  };
748
- var b = r.toDate;
749
- r.toDate = function(s) {
750
- return s === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : b.call(this);
749
+ var y = s.toDate;
750
+ s.toDate = function(c) {
751
+ return c === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
751
752
  };
752
- var h = r.diff;
753
- r.diff = function(s, g, f) {
754
- if (s && this.$u === s.$u)
755
- return h.call(this, s, g, f);
756
- var i = this.local(), m = u(s).local();
757
- return h.call(i, m, g, f);
753
+ var d = s.diff;
754
+ s.diff = function(c, h, f) {
755
+ if (c && this.$u === c.$u)
756
+ return d.call(this, c, h, f);
757
+ var i = this.local(), p = u(c).local();
758
+ return d.call(i, p, h, f);
758
759
  };
759
760
  };
760
761
  });
761
- })(be);
762
- var Ge = be.exports;
763
- const Qe = /* @__PURE__ */ Ce(Ge);
764
- var _e = { exports: {} };
762
+ })($e);
763
+ var lt = $e.exports;
764
+ const st = /* @__PURE__ */ we(lt);
765
+ var Se = { exports: {} };
765
766
  (function(n, e) {
766
767
  (function(t, o) {
767
768
  n.exports = o();
768
- })(ye, function() {
769
+ })(ke, function() {
769
770
  var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
770
- return function(a, c, l) {
771
- var u, r = function(d, b, h) {
772
- h === void 0 && (h = {});
773
- var s = new Date(d), g = function(f, i) {
771
+ return function(a, l, r) {
772
+ var u, s = function(g, y, d) {
773
+ d === void 0 && (d = {});
774
+ var c = new Date(g), h = function(f, i) {
774
775
  i === void 0 && (i = {});
775
- var m = i.timeZoneName || "short", $ = f + "|" + m, C = o[$];
776
- return C || (C = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: f, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: m }), o[$] = C), C;
777
- }(b, h);
778
- return g.formatToParts(s);
779
- }, v = function(d, b) {
780
- for (var h = r(d, b), s = [], g = 0; g < h.length; g += 1) {
781
- var f = h[g], i = f.type, m = f.value, $ = t[i];
782
- $ >= 0 && (s[$] = parseInt(m, 10));
776
+ var p = i.timeZoneName || "short", k = f + "|" + p, C = o[k];
777
+ return C || (C = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: f, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: p }), o[k] = C), C;
778
+ }(y, d);
779
+ return h.formatToParts(c);
780
+ }, m = function(g, y) {
781
+ for (var d = s(g, y), c = [], h = 0; h < d.length; h += 1) {
782
+ var f = d[h], i = f.type, p = f.value, k = t[i];
783
+ k >= 0 && (c[k] = parseInt(p, 10));
783
784
  }
784
- var C = s[3], S = C === 24 ? 0 : C, O = s[0] + "-" + s[1] + "-" + s[2] + " " + S + ":" + s[4] + ":" + s[5] + ":000", U = +d;
785
- return (l.utc(O).valueOf() - (U -= U % 1e3)) / 6e4;
786
- }, p = c.prototype;
787
- p.tz = function(d, b) {
788
- d === void 0 && (d = u);
789
- var h, s = this.utcOffset(), g = this.toDate(), f = g.toLocaleString("en-US", { timeZone: d }), i = Math.round((g - new Date(f)) / 1e3 / 60), m = 15 * -Math.round(g.getTimezoneOffset() / 15) - i;
790
- if (!Number(m))
791
- h = this.utcOffset(0, b);
792
- else if (h = l(f, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(m, !0), b) {
793
- var $ = h.utcOffset();
794
- h = h.add(s - $, "minute");
785
+ var C = c[3], S = C === 24 ? 0 : C, E = c[0] + "-" + c[1] + "-" + c[2] + " " + S + ":" + c[4] + ":" + c[5] + ":000", A = +g;
786
+ return (r.utc(E).valueOf() - (A -= A % 1e3)) / 6e4;
787
+ }, v = l.prototype;
788
+ v.tz = function(g, y) {
789
+ g === void 0 && (g = u);
790
+ var d, c = this.utcOffset(), h = this.toDate(), f = h.toLocaleString("en-US", { timeZone: g }), i = Math.round((h - new Date(f)) / 1e3 / 60), p = 15 * -Math.round(h.getTimezoneOffset() / 15) - i;
791
+ if (!Number(p))
792
+ d = this.utcOffset(0, y);
793
+ else if (d = r(f, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(p, !0), y) {
794
+ var k = d.utcOffset();
795
+ d = d.add(c - k, "minute");
795
796
  }
796
- return h.$x.$timezone = d, h;
797
- }, p.offsetName = function(d) {
798
- var b = this.$x.$timezone || l.tz.guess(), h = r(this.valueOf(), b, { timeZoneName: d }).find(function(s) {
799
- return s.type.toLowerCase() === "timezonename";
797
+ return d.$x.$timezone = g, d;
798
+ }, v.offsetName = function(g) {
799
+ var y = this.$x.$timezone || r.tz.guess(), d = s(this.valueOf(), y, { timeZoneName: g }).find(function(c) {
800
+ return c.type.toLowerCase() === "timezonename";
800
801
  });
801
- return h && h.value;
802
+ return d && d.value;
802
803
  };
803
- var k = p.startOf;
804
- p.startOf = function(d, b) {
804
+ var _ = v.startOf;
805
+ v.startOf = function(g, y) {
805
806
  if (!this.$x || !this.$x.$timezone)
806
- return k.call(this, d, b);
807
- var h = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
808
- return k.call(h, d, b).tz(this.$x.$timezone, !0);
809
- }, l.tz = function(d, b, h) {
810
- var s = h && b, g = h || b || u, f = v(+l(), g);
811
- if (typeof d != "string")
812
- return l(d).tz(g);
813
- var i = function(S, O, U) {
814
- var I = S - 60 * O * 1e3, y = v(I, U);
815
- if (O === y)
816
- return [I, O];
817
- var _ = v(I -= 60 * (y - O) * 1e3, U);
818
- return y === _ ? [I, y] : [S - 60 * Math.min(y, _) * 1e3, Math.max(y, _)];
819
- }(l.utc(d, s).valueOf(), f, g), m = i[0], $ = i[1], C = l(m).utcOffset($);
820
- return C.$x.$timezone = g, C;
821
- }, l.tz.guess = function() {
807
+ return _.call(this, g, y);
808
+ var d = r(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
809
+ return _.call(d, g, y).tz(this.$x.$timezone, !0);
810
+ }, r.tz = function(g, y, d) {
811
+ var c = d && y, h = d || y || u, f = m(+r(), h);
812
+ if (typeof g != "string")
813
+ return r(g).tz(h);
814
+ var i = function(S, E, A) {
815
+ var V = S - 60 * E * 1e3, b = m(V, A);
816
+ if (E === b)
817
+ return [V, E];
818
+ var w = m(V -= 60 * (b - E) * 1e3, A);
819
+ return b === w ? [V, b] : [S - 60 * Math.min(b, w) * 1e3, Math.max(b, w)];
820
+ }(r.utc(g, c).valueOf(), f, h), p = i[0], k = i[1], C = r(p).utcOffset(k);
821
+ return C.$x.$timezone = h, C;
822
+ }, r.tz.guess = function() {
822
823
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
823
- }, l.tz.setDefault = function(d) {
824
- u = d;
824
+ }, r.tz.setDefault = function(g) {
825
+ u = g;
825
826
  };
826
827
  };
827
828
  });
828
- })(_e);
829
- var Xe = _e.exports;
830
- const et = /* @__PURE__ */ Ce(Xe);
831
- pe.extend(Qe);
832
- pe.extend(et);
833
- async function wt(n, e) {
829
+ })(Se);
830
+ var it = Se.exports;
831
+ const ct = /* @__PURE__ */ we(it);
832
+ be.extend(st);
833
+ be.extend(ct);
834
+ async function Vt(n, e) {
834
835
  const { fields: t, range: o = 1 } = e;
835
836
  if (!t)
836
837
  throw new Error("请输入列字段映射");
837
- let a = new me.Workbook();
838
+ let a = new ye.Workbook();
838
839
  await a.xlsx.load(n);
839
- const c = {};
840
- return a.eachSheet(function(l, u) {
841
- const r = [];
842
- l.eachRow(function(v, p) {
843
- if (p > o) {
844
- let k = {}, d = !0;
845
- Object.keys(t).forEach((b) => {
846
- const h = v.getCell(t[b]).value;
847
- k[b] = h, h && (d = !1);
848
- }), d || r.push(k);
840
+ const l = {};
841
+ return a.eachSheet(function(r, u) {
842
+ const s = [];
843
+ r.eachRow(function(m, v) {
844
+ if (v > o) {
845
+ let _ = {}, g = !0;
846
+ Object.keys(t).forEach((y) => {
847
+ const d = m.getCell(t[y]).value;
848
+ _[y] = d, d && (g = !1);
849
+ }), g || s.push(_);
849
850
  }
850
- }), c[l._name] = r;
851
- }), a = null, c;
851
+ }), l[r._name] = s;
852
+ }), a = null, l;
852
853
  }
853
- const tt = {
854
+ const ut = {
854
855
  columnWidth: 30
855
856
  };
856
- async function $t(n, e, t = [], o = {}) {
857
+ async function It(n, e, t = [], o = {}) {
857
858
  if (!n || !e)
858
859
  return;
859
- const { columnStyle: a } = o, { columnWidth: c } = tt;
860
- e.forEach((r) => {
861
- r.width = r.width ? r.width : c;
860
+ const { columnStyle: a } = o, { columnWidth: l } = ut;
861
+ e.forEach((s) => {
862
+ s.width = s.width ? s.width : l;
862
863
  });
863
- const { workbook: l, worksheet: u } = nt();
864
- u.columns = e, u.addRows(t), a && await ot(l, u, a);
864
+ const { workbook: r, worksheet: u } = ft();
865
+ u.columns = e, u.addRows(t), a && await dt(r, u, a);
865
866
  try {
866
- const r = await l.xlsx.writeBuffer(), v = new File([r], n, {
867
+ const s = await r.xlsx.writeBuffer(), m = new File([s], n, {
867
868
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
868
869
  });
869
- Fe(v);
870
- } catch (r) {
871
- console.log(r);
870
+ Pe(m);
871
+ } catch (s) {
872
+ console.log(s);
872
873
  }
873
874
  }
874
- function nt() {
875
- const n = new me.Workbook();
875
+ function ft() {
876
+ const n = new ye.Workbook();
876
877
  n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date();
877
878
  const e = n.addWorksheet("Sheet1");
878
879
  return { workbook: n, worksheet: e };
879
880
  }
880
- async function ot(n, e, t) {
881
+ async function dt(n, e, t) {
881
882
  const o = Object.keys(t);
882
883
  for (const a of o) {
883
- const c = t[a], { type: l } = c;
884
- switch (l) {
884
+ const l = t[a], { type: r } = l;
885
+ switch (r) {
885
886
  case "IMG":
886
- await at(n, e, a);
887
+ await ht(n, e, a);
887
888
  break;
888
889
  }
889
890
  }
890
891
  }
891
- async function at(n, e, t, o) {
892
- const a = e.getColumn(t), c = a.values;
893
- e.getColumn(t).width = 20, e.eachRow((l, u) => {
894
- u > 1 && (l.height = 40);
892
+ async function ht(n, e, t, o) {
893
+ const a = e.getColumn(t), l = a.values;
894
+ e.getColumn(t).width = 20, e.eachRow((r, u) => {
895
+ u > 1 && (r.height = 40);
895
896
  });
896
- for (let l = 0, u = c.length; l < u; l++) {
897
- if (l < 2)
897
+ for (let r = 0, u = l.length; r < u; r++) {
898
+ if (r < 2)
898
899
  continue;
899
- let r = c[l];
900
- r && (e.getCell(a.letter + l).value = "", await lt(n, e, r, {
900
+ let s = l[r];
901
+ s && (e.getCell(a.letter + r).value = "", await gt(n, e, s, {
901
902
  width: 100,
902
903
  height: 50,
903
904
  col: a._number - 1,
904
- row: l - 1
905
+ row: r - 1
905
906
  }));
906
907
  }
907
908
  }
908
- async function lt(n, e, t, o) {
909
- const { col: a, row: c, width: l, height: u } = o, { success: r, base64: v } = await rt(t, 0.3);
910
- if (r) {
911
- const p = n.addImage({
912
- base64: v,
909
+ async function gt(n, e, t, o) {
910
+ const { col: a, row: l, width: r, height: u } = o, { success: s, base64: m } = await pt(t, 0.3);
911
+ if (s) {
912
+ const v = n.addImage({
913
+ base64: m,
913
914
  extension: "jpeg"
914
915
  });
915
- e.addImage(p, {
916
- tl: { col: a, row: c },
917
- ext: { width: l, height: u }
916
+ e.addImage(v, {
917
+ tl: { col: a, row: l },
918
+ ext: { width: r, height: u }
918
919
  });
919
920
  }
920
921
  }
921
- function rt(n, e = 1) {
922
+ function pt(n, e = 1) {
922
923
  const t = new Image();
923
924
  return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((o, a) => {
924
925
  t.onload = () => {
925
- const c = document.createElement("canvas");
926
- c.width = t.width, c.height = t.height, c.getContext("2d").drawImage(t, 0, 0, c.width, c.height), o({
926
+ const l = document.createElement("canvas");
927
+ l.width = t.width, l.height = t.height, l.getContext("2d").drawImage(t, 0, 0, l.width, l.height), o({
927
928
  success: !0,
928
929
  //canvas.toDataURL的方法将图片的绝对路径转换为base64编码
929
- base64: c.toDataURL("image/jpeg", e)
930
+ base64: l.toDataURL("image/jpeg", e)
930
931
  });
931
932
  }, t.onerror = () => {
932
933
  o({ success: !1 });
933
934
  };
934
935
  });
935
936
  }
936
- function it(n) {
937
+ function mt(n) {
937
938
  if (n < 26)
938
939
  return String.fromCharCode(65 + n);
939
940
  {
@@ -941,7 +942,7 @@ function it(n) {
941
942
  return e + t;
942
943
  }
943
944
  }
944
- class St {
945
+ class Ut {
945
946
  constructor(e = {}) {
946
947
  this.config = {
947
948
  clientCode: e.clientCode || "one-portal",
@@ -1147,35 +1148,35 @@ class St {
1147
1148
  return this.config[e];
1148
1149
  }
1149
1150
  }
1150
- function xt(n) {
1151
+ function Lt(n) {
1151
1152
  return new Promise((e) => {
1152
1153
  setTimeout(() => {
1153
1154
  e();
1154
1155
  }, n);
1155
1156
  });
1156
1157
  }
1157
- function Tt(n) {
1158
+ function Mt(n) {
1158
1159
  return JSON.parse(JSON.stringify(n));
1159
1160
  }
1160
- function Dt(n) {
1161
- let e = [], t = {}, o = (a, c) => Object.prototype.hasOwnProperty.call(a, c);
1161
+ function Yt(n) {
1162
+ let e = [], t = {}, o = (a, l) => Object.prototype.hasOwnProperty.call(a, l);
1162
1163
  for (const a of n) {
1163
1164
  t[a.id] = {
1164
1165
  ...a,
1165
1166
  // 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
1166
1167
  children: o(t, a.id) ? t[a.id].children : []
1167
1168
  };
1168
- const c = t[a.id];
1169
- a.pid == -1 ? e.push(c) : (o(t, a.pid) || (t[a.pid] = {
1169
+ const l = t[a.id];
1170
+ a.pid == -1 ? e.push(l) : (o(t, a.pid) || (t[a.pid] = {
1170
1171
  children: []
1171
- }), t[a.pid].children.push(c));
1172
+ }), t[a.pid].children.push(l));
1172
1173
  }
1173
1174
  return e;
1174
1175
  }
1175
- function Ot(n, e = " ") {
1176
+ function jt(n, e = " ") {
1176
1177
  return n ? n.split(e).filter((t) => t.trim()) : [];
1177
1178
  }
1178
- class se {
1179
+ class ue {
1179
1180
  constructor(e, t = ["label", "value", "labelEn"]) {
1180
1181
  this.list = e, this.map = new Map(
1181
1182
  e.map((o) => {
@@ -1213,64 +1214,162 @@ class se {
1213
1214
  return this.map.has(e);
1214
1215
  }
1215
1216
  }
1216
- function zt(n, e = [], t = "i18nName") {
1217
+ function Pt(n, e = [], t = "i18nName") {
1217
1218
  if (n.length == 0)
1218
- return new se([]);
1219
+ return new ue([]);
1219
1220
  if (e.length < 2)
1220
1221
  throw new Error("keys 长度必须大于2 默认前两位为 label value ");
1221
1222
  let o = n.map((a) => {
1222
- let c = {};
1223
- return t && (c.labelEn = a[t]), e.forEach((l, u) => {
1224
- u === 0 ? c.label = a[l] : u === 1 ? c.value = a[l] : c[l] = a[l];
1225
- }), c;
1223
+ let l = {};
1224
+ return t && (l.labelEn = a[t]), e.forEach((r, u) => {
1225
+ u === 0 ? l.label = a[r] : u === 1 ? l.value = a[r] : l[r] = a[r];
1226
+ }), l;
1226
1227
  });
1227
- return new se(o);
1228
+ return new ue(o);
1228
1229
  }
1229
- function Et(n) {
1230
+ function Rt(n) {
1230
1231
  return n ? n.replace(/<[^>]+>/g, "") : "";
1231
1232
  }
1232
- function Ut(n) {
1233
+ function Bt(n) {
1233
1234
  return n ? (n.includes("\\\\u") && (n = n.replace(/\\/g, "")), n.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
1234
1235
  }
1235
- function It(n, e = 10) {
1236
+ function Ht(n, e = 10) {
1236
1237
  let t = 1048576 * e;
1237
1238
  return !(n.size > t);
1238
1239
  }
1239
- function Vt(n) {
1240
+ function Nt(n) {
1240
1241
  return Array.from(10).fill(0).map((t, o) => n + "_" + o);
1241
1242
  }
1242
- function Ft(n) {
1243
+ function qt(n) {
1243
1244
  let e = {};
1244
1245
  return n.map((t, o) => {
1245
- let { key: a, option: c, type: l } = t, u = it(o);
1246
- c ? e[a] = `${u}---option` : l === "image" ? e[a] = `${u}---image` : e[a] = u;
1246
+ let { key: a, option: l, type: r } = t, u = mt(o);
1247
+ l ? e[a] = `${u}---option` : r === "image" ? e[a] = `${u}---image` : e[a] = u;
1247
1248
  }), e;
1248
1249
  }
1249
- function Lt(n, e) {
1250
+ function Kt(n, e) {
1250
1251
  return e.split(".").reduce((t, o) => t && t[o], n);
1251
1252
  }
1253
+ function Zt(n, e = {}) {
1254
+ const o = Object.assign({
1255
+ manual: !1,
1256
+ // 手动执行
1257
+ log: !1,
1258
+ params: null,
1259
+ format: null
1260
+ }, e), { manual: a, log: l, params: r = {}, cb: u, format: s } = o, m = T([]), v = T(!1), _ = (g) => {
1261
+ const y = g || r;
1262
+ v.value = !0, n(y).then((d) => {
1263
+ const { code: c, data: h, msg: f } = d;
1264
+ if (u) {
1265
+ const { records: i, rows: p } = h || {}, k = i || p ? i || p : h;
1266
+ m.value = ne(k, s), u(d);
1267
+ }
1268
+ if (h) {
1269
+ if (h.records != null || h.rows != null) {
1270
+ const { records: i, rows: p, total: k = 0 } = h || {};
1271
+ y && y.total != null && (r.total = parseInt(k)), m.value = ne(i || p || [], s);
1272
+ } else
1273
+ m.value = ne(h, s);
1274
+ l && console.log("useRequest-res", m.value);
1275
+ }
1276
+ }).catch((d) => {
1277
+ u && (console.log("useRequestErr", d), u({ code: 500 }));
1278
+ }).finally(() => {
1279
+ v.value = !1;
1280
+ });
1281
+ };
1282
+ return a || _(), [v, m, _];
1283
+ }
1284
+ function Gt(n) {
1285
+ const e = T(n), t = T(""), o = T("");
1286
+ return me(e, (a) => {
1287
+ const l = a || ["", ""];
1288
+ t.value = l[0], o.value = l[1];
1289
+ }), [e, t, o];
1290
+ }
1291
+ function Jt(n) {
1292
+ return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
1293
+ }
1294
+ function ne(n, e) {
1295
+ if (!e)
1296
+ return n;
1297
+ if (n instanceof Array)
1298
+ return n.map((o) => {
1299
+ let a = {};
1300
+ return e.forEach((l) => a[l] = o[l]), a;
1301
+ });
1302
+ let t = {};
1303
+ return e.forEach((o) => t[o] = n[o]), t;
1304
+ }
1305
+ function Wt(n, e = []) {
1306
+ const { locale: t } = W(), o = T(n());
1307
+ return me(
1308
+ [t, ...e],
1309
+ () => {
1310
+ o.value = n();
1311
+ },
1312
+ { immediate: !0 }
1313
+ ), [o];
1314
+ }
1315
+ function Qt(n, e, t = "zh_cn") {
1316
+ return n && (n[Me(e)] || n[t]) || "-";
1317
+ }
1318
+ function Xt(n, e) {
1319
+ let t = Re;
1320
+ return typeof n == "string" && n.length > 0 && (t = le(n).mapState), xe(e, t);
1321
+ }
1322
+ function en(n, e) {
1323
+ let t = Be;
1324
+ return typeof n == "string" && n.length > 0 && (t = le(n).mapGetters), xe(e, t);
1325
+ }
1326
+ function tn(n, e) {
1327
+ let t = He;
1328
+ return typeof n == "string" && n.length > 0 && (t = le(n).mapActions), vt(e, t);
1329
+ }
1330
+ function xe(n, e) {
1331
+ const t = Ce(), o = e(n), a = {};
1332
+ return Object.keys(o).forEach((l) => {
1333
+ const r = o[l].bind({ $store: t });
1334
+ a[l] = q(r);
1335
+ }), a;
1336
+ }
1337
+ function vt(n, e) {
1338
+ const t = Ce(), o = e(n), a = {};
1339
+ return Object.keys(o).forEach((l) => {
1340
+ a[l] = o[l].bind({ $store: t });
1341
+ }), a;
1342
+ }
1252
1343
  export {
1253
- Ae as CmpDictionary,
1254
- yt as ConfrimButton,
1255
- Ct as ImportButton,
1256
- vt as LayOutForm,
1257
- bt as ListPage,
1258
- St as OnePortalCasSDK,
1259
- qe as SearchBar,
1260
- se as StatusMap,
1261
- Tt as _toRaw,
1262
- zt as arrToStatusMap,
1263
- Dt as arrayToTree,
1264
- It as checkFileSize,
1265
- _t as creatValidator,
1266
- Ft as createImportFields,
1267
- Vt as createListPageId,
1268
- kt as crypto,
1269
- $t as exportExcel,
1270
- Lt as getValueBykey,
1271
- wt as importExcel,
1272
- xt as sleep,
1273
- Ot as stringToArray,
1274
- Et as stripHtmlTags,
1275
- Ut as unicode2Str
1344
+ qe as CmpDictionary,
1345
+ Ot as ConfrimButton,
1346
+ Et as ImportButton,
1347
+ Dt as LayOutForm,
1348
+ zt as ListPage,
1349
+ Ut as OnePortalCasSDK,
1350
+ nt as SearchBar,
1351
+ ue as StatusMap,
1352
+ Mt as _toRaw,
1353
+ Jt as _typeOf,
1354
+ Pt as arrToStatusMap,
1355
+ Yt as arrayToTree,
1356
+ Ht as checkFileSize,
1357
+ Ft as creatValidator,
1358
+ qt as createImportFields,
1359
+ Nt as createListPageId,
1360
+ At as crypto,
1361
+ It as exportExcel,
1362
+ Qt as getLocaleValue,
1363
+ Kt as getValueBykey,
1364
+ Vt as importExcel,
1365
+ Lt as sleep,
1366
+ jt as stringToArray,
1367
+ Rt as stripHtmlTags,
1368
+ Bt as unicode2Str,
1369
+ tn as useActions,
1370
+ Gt as useDatePicker,
1371
+ en as useGetters,
1372
+ Wt as useI18nReState,
1373
+ Zt as useRequest,
1374
+ Xt as useState
1276
1375
  };