@skyfox2000/webui 1.3.21 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/lib/assets/modules/{baseLayout-Bz3oRE5o.js → baseLayout-BLUY_tDF.js} +6 -6
  2. package/lib/assets/modules/{file-upload-CmnCEJze.js → file-upload-Dk4VFMgz.js} +2 -2
  3. package/lib/assets/modules/{index-CvQ24Mzh.js → index-Bb4qTaRC.js} +2 -2
  4. package/lib/assets/modules/{index-D0njzOzQ.js → index-BuP8i92E.js} +1 -1
  5. package/lib/assets/modules/{index-CAqiqqdd.js → index-DLY7idvQ.js} +134 -133
  6. package/lib/assets/modules/{menuTabs-NVgroqVO.js → menuTabs-DzoBrCZE.js} +7 -7
  7. package/lib/assets/modules/{toolIcon-BuqRfX4F.js → toolIcon-FTelEQwg.js} +1 -1
  8. package/lib/assets/modules/{uploadList-B6MIYOtN.js → uploadList-DIfhRlbh.js} +705 -700
  9. package/lib/assets/modules/{uploadList-KG6kpOaY.js → uploadList-DTAFNhow.js} +152 -146
  10. package/lib/components/common/icon/index.vue.d.ts +1 -1
  11. package/lib/es/AceEditor/index.js +3 -3
  12. package/lib/es/BasicLayout/index.js +2 -2
  13. package/lib/es/Error403/index.js +1 -1
  14. package/lib/es/Error404/index.js +1 -1
  15. package/lib/es/ExcelForm/index.js +5 -5
  16. package/lib/es/MenuLayout/index.js +2 -2
  17. package/lib/es/UploadForm/index.js +4 -4
  18. package/lib/stores/userInfo.d.ts +2 -1
  19. package/lib/utils/micro-openapis.d.ts +35 -0
  20. package/lib/webui.es.js +358 -353
  21. package/package.json +1 -2
  22. package/src/components/layout/header/headerExits.vue +1 -1
  23. package/src/stores/appInfo.ts +7 -8
  24. package/src/stores/userInfo.ts +20 -63
  25. package/src/utils/data.ts +6 -0
  26. package/src/utils/download.ts +10 -1
  27. package/src/utils/export-table.ts +5 -0
  28. package/src/utils/form-excel.ts +14 -9
  29. package/src/utils/main-openapis.ts +2 -2
  30. package/src/utils/micro-openapis.ts +146 -0
  31. package/src/utils/options.ts +5 -0
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as _, onMounted as I, createBlock as s, openBlock as o, unref as e, withCtx as l, createCommentVNode as r, createVNode as p, createElementVNode as x, createElementBlock as y, toDisplayString as g, renderSlot as h } from "vue";
2
2
  import { Layout as i, LayoutSider as k } from "ant-design-vue";
3
- import { a as b } from "./toolIcon-BuqRfX4F.js";
4
- import { I as C, _ as S, f as w, d as $, g as N } from "./menuTabs-NVgroqVO.js";
5
- import { ad as v, a as B, af as E } from "./uploadList-B6MIYOtN.js";
3
+ import { a as b } from "./toolIcon-FTelEQwg.js";
4
+ import { I as C, _ as S, f as w, d as $, g as N } from "./menuTabs-DzoBrCZE.js";
5
+ import { ae as v, a as B, ag as E } from "./uploadList-DIfhRlbh.js";
6
6
  import "@skyfox2000/microbase";
7
7
  import "@skyfox2000/fapi";
8
8
  import L from "vue-m-message";
@@ -17,8 +17,8 @@ const V = { class: "h-[40px] max-h-[40px] bg-[rgba(240,240,240,0.2)] flex flex-n
17
17
  props: {
18
18
  routes: {}
19
19
  },
20
- setup(f) {
21
- const m = f, a = v(), t = B(), u = E();
20
+ setup(m) {
21
+ const f = m, a = v(), t = B(), u = E();
22
22
  return I(() => {
23
23
  L.closeAll();
24
24
  }), (d, c) => (o(), s(e(i), { class: "h-screen" }, {
@@ -56,7 +56,7 @@ const V = { class: "h-[40px] max-h-[40px] bg-[rgba(240,240,240,0.2)] flex flex-n
56
56
  e(t).menuCollapse ? r("", !0) : (o(), y("span", z, g(e(a).appInfo.Name), 1))
57
57
  ]),
58
58
  p(w, {
59
- routes: m.routes
59
+ routes: f.routes
60
60
  }, null, 8, ["routes"])
61
61
  ]),
62
62
  _: 1
@@ -2,12 +2,12 @@ var m = Object.defineProperty;
2
2
  var E = (e, r, o) => r in e ? m(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o;
3
3
  var d = (e, r, o) => E(e, typeof r != "symbol" ? r + "" : r, o);
4
4
  import { hostUrl as v } from "@skyfox2000/fapi";
5
- import { ae as S, ad as w, u as g } from "./uploadList-B6MIYOtN.js";
5
+ import { af as S, ae as w, u as g } from "./uploadList-DIfhRlbh.js";
6
6
  import { mainAppApis as a } from "@skyfox2000/microbase";
7
7
  import y from "dayjs";
8
8
  import p from "vue-m-message";
9
9
  var i = /* @__PURE__ */ ((e) => (e.Pending = "pending", e.Uploading = "uploading", e.Success = "success", e.Error = "error", e.Online = "online", e.Offline = "offline", e))(i || {});
10
- const U = () => a.value ? a.value.getHostInfo() : S().hostInfo, x = () => a.value && a.value.getAppInfo ? a.value.getAppInfo() : w().appInfo, L = (e) => a.value && a.value.userLogin ? a.value.userLogin(e) : g().login(e, !0), M = () => a.value && a.value.userLogout ? a.value.userLogout() : g().logout(), b = () => a.value && a.value.getToken ? a.value.getToken() : g().getToken(), N = () => a.value && a.value.getUserInfo ? a.value.getUserInfo() : g().getUserInfo();
10
+ const U = () => a.value ? a.value.getHostInfo() : S().hostInfo, x = () => a.value && a.value.getAppInfo ? a.value.getAppInfo() : w().appInfo, L = (e) => a.value && a.value.userLogin ? a.value.userLogin(e) : g().login(e, !0), M = () => a.value && a.value.userLogout ? a.value.userLogout() : g().logout(!0), b = () => a.value && a.value.getToken ? a.value.getToken() : g().getToken(), N = () => a.value && a.value.getUserInfo ? a.value.getUserInfo() : g().getUserInfo();
11
11
  class z {
12
12
  /**
13
13
  * 连接路径参数,已判断 undefined 或 null 值
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as F, provide as _, ref as w, watch as p, onMounted as B, createBlock as n, openBlock as r, unref as a, withCtx as i, createElementVNode as N, renderSlot as b, createVNode as V, createCommentVNode as d, createTextVNode as u, toDisplayString as v } from "vue";
2
- import { _ as m } from "./index-D0njzOzQ.js";
2
+ import { _ as m } from "./index-BuP8i92E.js";
3
3
  import { Modal as D, Space as E } from "ant-design-vue";
4
4
  import "@skyfox2000/fapi";
5
- import { P as M, d as P, o as $, b as K } from "./uploadList-B6MIYOtN.js";
5
+ import { P as M, d as P, o as $, b as K } from "./uploadList-DIfhRlbh.js";
6
6
  import "@skyfox2000/microbase";
7
7
  import "vue-m-message";
8
8
  import "async-validator";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as d, useAttrs as f, createElementBlock as u, openBlock as x, createVNode as e, withCtx as n, unref as o, mergeProps as r, renderSlot as p } from "vue";
2
2
  import { Button as _ } from "ant-design-vue";
3
- import { a as P, _ as k } from "./toolIcon-BuqRfX4F.js";
3
+ import { a as P, _ as k } from "./toolIcon-FTelEQwg.js";
4
4
  const C = /* @__PURE__ */ d({
5
5
  inheritAttrs: !1,
6
6
  __name: "index",
@@ -1,76 +1,76 @@
1
- import S from "async-validator";
1
+ import H from "async-validator";
2
2
  import { httpPost as M, ResStatus as V } from "@skyfox2000/fapi";
3
- import { i as T, ag as $ } from "./uploadList-B6MIYOtN.js";
3
+ import { i as T, ah as U, L as $, u as z } from "./uploadList-DIfhRlbh.js";
4
4
  import m from "vue-m-message";
5
- import { defineComponent as R, useAttrs as U, createElementBlock as z, openBlock as b, createVNode as B, unref as v, mergeProps as D, computed as E, createBlock as _, withCtx as O, normalizeStyle as A } from "vue";
6
- import { Spin as N, Alert as L } from "ant-design-vue";
7
- import { _ as K } from "./toolIcon-BuqRfX4F.js";
8
- const j = (i) => {
5
+ import { defineComponent as _, useAttrs as B, createElementBlock as A, openBlock as b, createVNode as O, unref as v, mergeProps as S, computed as E, createBlock as R, withCtx as L, normalizeStyle as N } from "vue";
6
+ import { Spin as K, Alert as P } from "ant-design-vue";
7
+ import { _ as W } from "./toolIcon-FTelEQwg.js";
8
+ const D = (i) => {
9
9
  const e = i.split(`
10
- `).filter((c) => c.trim() !== "");
10
+ `).filter((l) => l.trim() !== "");
11
11
  if (e.length === 0)
12
12
  return { headers: [], rows: [] };
13
- const s = e.map((c) => c.split(",").map((r) => {
13
+ const s = e.map((l) => l.split(",").map((r) => {
14
14
  const o = r.trim();
15
15
  if (o === "" || o === "null") return null;
16
16
  const t = Number(o);
17
17
  return isNaN(t) ? o : t;
18
- })), n = s[0].map((c) => String(c || "")), a = s.slice(1);
19
- return { headers: n, rows: a };
20
- }, H = async (i) => {
18
+ })), c = s[0].map((l) => String(l || "")), a = s.slice(1);
19
+ return { headers: c, rows: a };
20
+ }, j = async (i) => {
21
21
  try {
22
22
  const e = await import("exceljs"), s = new e.default.Workbook();
23
23
  await s.xlsx.load(i);
24
- const n = s.worksheets[0];
25
- if (!n)
24
+ const c = s.worksheets[0];
25
+ if (!c)
26
26
  return { headers: [], rows: [] };
27
- const a = [], c = [];
28
- return n.getRow(1).eachCell((r) => {
27
+ const a = [], l = [];
28
+ return c.getRow(1).eachCell((r) => {
29
29
  let o = "";
30
30
  r.value !== null && r.value !== void 0 && (typeof r.value == "object" ? "richText" in r.value && Array.isArray(r.value.richText) ? o = r.value.richText.map((t) => t.text || "").join("") : "text" in r.value && typeof r.value.text == "string" ? o = r.value.text : r.value instanceof Date ? o = r.value.toLocaleDateString() : o = String(r.value) : o = String(r.value)), a.push(o);
31
- }), n.eachRow((r, o) => {
31
+ }), c.eachRow((r, o) => {
32
32
  if (o > 1) {
33
33
  const t = [];
34
- a.forEach((u, l) => {
35
- const f = r.getCell(l + 1).value;
34
+ a.forEach((u, n) => {
35
+ const f = r.getCell(n + 1).value;
36
36
  f != null ? typeof f == "object" ? "richText" in f && Array.isArray(f.richText) ? t.push(f.richText.map((h) => h.text || "").join("")) : "text" in f && typeof f.text == "string" ? t.push(f.text) : (f instanceof Date, t.push(f)) : t.push(f) : t.push(null);
37
- }), c.push(t);
37
+ }), l.push(t);
38
38
  }
39
- }), { headers: a, rows: c };
39
+ }), { headers: a, rows: l };
40
40
  } catch (e) {
41
41
  return console.error("Excel解析失败:", e), { headers: [], rows: [] };
42
42
  }
43
43
  }, g = async (i, e, s) => {
44
44
  try {
45
- const n = await import("exceljs"), a = new n.default.Workbook(), c = a.addWorksheet("Sheet1"), { headers: r, rows: o } = i;
45
+ const c = await import("exceljs"), a = new c.default.Workbook(), l = a.addWorksheet("Sheet1"), { headers: r, rows: o } = i;
46
46
  if (r.length === 0)
47
47
  throw new Error("数据为空");
48
48
  const t = /* @__PURE__ */ new Map();
49
- s != null && s.markCells && s.markCells.forEach(({ row: h, col: w, color: d }) => {
49
+ s != null && s.markCells && s.markCells.forEach(({ row: h, col: w, color: p }) => {
50
50
  const y = `${h}-${w}`;
51
- t.set(y, d || "FFFF0000");
51
+ t.set(y, p || "FFFF0000");
52
52
  });
53
- const u = c.getRow(1);
53
+ const u = l.getRow(1);
54
54
  r.forEach((h, w) => {
55
- const d = u.getCell(w + 1);
56
- d.value = h, d.font = { bold: !0 }, d.fill = {
55
+ const p = u.getCell(w + 1);
56
+ p.value = h, p.font = { bold: !0 }, p.fill = {
57
57
  type: "pattern",
58
58
  pattern: "solid",
59
59
  fgColor: { argb: "FFE0E0E0" }
60
- }, s != null && s.markHeaders && s.markHeaders.includes(h) && (d.fill = {
60
+ }, s != null && s.markHeaders && s.markHeaders.includes(h) && (p.fill = {
61
61
  type: "pattern",
62
62
  pattern: "solid",
63
63
  fgColor: { argb: "FFFF0000" }
64
- }, d.font = {
64
+ }, p.font = {
65
65
  name: "Arial",
66
66
  size: 10,
67
67
  bold: !0,
68
68
  color: { argb: "FFFFFFFF" }
69
69
  });
70
70
  }), o.forEach((h, w) => {
71
- const d = c.getRow(w + 2);
71
+ const p = l.getRow(w + 2);
72
72
  h.forEach((y, k) => {
73
- const F = d.getCell(k + 1);
73
+ const F = p.getCell(k + 1);
74
74
  F.value = y;
75
75
  const C = `${w + 2}-${k + 1}`;
76
76
  t.has(C) && (F.fill = {
@@ -79,26 +79,26 @@ const j = (i) => {
79
79
  fgColor: { argb: t.get(C) }
80
80
  });
81
81
  });
82
- }), c.columns.forEach((h) => {
82
+ }), l.columns.forEach((h) => {
83
83
  h.width = 15;
84
84
  });
85
- const l = await a.xlsx.writeBuffer(), p = new Blob([l], {
85
+ const n = await a.xlsx.writeBuffer(), d = new Blob([n], {
86
86
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
87
87
  });
88
88
  return {
89
89
  success: !0,
90
- blobUrl: URL.createObjectURL(p),
90
+ blobUrl: URL.createObjectURL(d),
91
91
  fileName: e.replace(/\.(csv|xlsx?)$/i, ".xlsx")
92
92
  };
93
- } catch (n) {
94
- return console.error("转换Excel失败:", n), {
93
+ } catch (c) {
94
+ return console.error("转换Excel失败:", c), {
95
95
  success: !1,
96
- error: n instanceof Error ? n.message : "未知错误"
96
+ error: c instanceof Error ? c.message : "未知错误"
97
97
  };
98
98
  }
99
- }, P = async (i, e) => {
99
+ }, q = async (i, e) => {
100
100
  try {
101
- const s = j(i);
101
+ const s = D(i);
102
102
  return await g(s, e);
103
103
  } catch (s) {
104
104
  return {
@@ -106,7 +106,7 @@ const j = (i) => {
106
106
  error: s instanceof Error ? s.message : "CSV处理失败"
107
107
  };
108
108
  }
109
- }, W = async (i, e) => {
109
+ }, J = async (i, e) => {
110
110
  try {
111
111
  const s = new Blob([i], {
112
112
  type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@@ -122,58 +122,58 @@ const j = (i) => {
122
122
  error: s instanceof Error ? s.message : "Excel处理失败"
123
123
  };
124
124
  }
125
- }, q = async (i, e) => await g(i, e), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
125
+ }, G = async (i, e) => await g(i, e), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
126
126
  __proto__: null,
127
- csvToExcelView: P,
128
- csvToNormalized: j,
129
- excelToExcelView: W,
130
- excelToNormalized: H,
131
- normalizedToExcelView: q,
127
+ csvToExcelView: q,
128
+ csvToNormalized: D,
129
+ excelToExcelView: J,
130
+ excelToNormalized: j,
131
+ normalizedToExcelView: G,
132
132
  toExcel: g
133
133
  }, Symbol.toStringTag, { value: "Module" })), x = async (i) => {
134
- const e = await H(i);
134
+ const e = await j(i);
135
135
  if (e.headers.length === 0)
136
136
  return m.error("Excel文件不包含工作表"), null;
137
137
  const s = [];
138
- return e.rows.forEach((n) => {
138
+ return e.rows.forEach((c) => {
139
139
  const a = {};
140
- e.headers.forEach((c, r) => {
141
- c && (a[c] = n[r]);
140
+ e.headers.forEach((l, r) => {
141
+ l && (a[l] = c[r]);
142
142
  }), s.push(a);
143
143
  }), {
144
144
  headers: e.headers,
145
145
  excelData: s,
146
146
  excelRows: e.rows
147
147
  };
148
- }, J = async (i, e, s) => {
149
- const n = await x(i);
150
- if (!n)
148
+ }, Q = async (i, e, s) => {
149
+ const c = await x(i);
150
+ if (!c)
151
151
  return { success: !1, error: "Excel文件处理失败" };
152
- const { headers: a, excelRows: c } = n, { markHeaders: r } = e, o = [...a];
152
+ const { headers: a, excelRows: l } = c, { markHeaders: r } = e, o = [...a];
153
153
  r && r.length > 0 && r.forEach((u) => {
154
154
  o.includes(u) || o.push(u);
155
155
  });
156
- const t = c.map((u) => {
157
- const l = [...u];
158
- for (; l.length < o.length; )
159
- l.push(null);
160
- return l;
156
+ const t = l.map((u) => {
157
+ const n = [...u];
158
+ for (; n.length < o.length; )
159
+ n.push(null);
160
+ return n;
161
161
  });
162
162
  return await g({ headers: o, rows: t }, s, e);
163
- }, G = async (i, e) => {
163
+ }, X = async (i, e) => {
164
164
  if (!e || T(e))
165
165
  return { hasError: !1 };
166
166
  const s = await x(i);
167
167
  if (!s) return { hasError: !0 };
168
- const { headers: n, excelData: a } = s, c = [];
168
+ const { headers: c, excelData: a } = s, l = [];
169
169
  if (Object.keys(e).forEach((t) => {
170
- n.includes(t) || c.push(t);
171
- }), n.length === 0 || a.length === 0)
170
+ c.includes(t) || l.push(t);
171
+ }), c.length === 0 || a.length === 0)
172
172
  return m.error("Excel文件不包含足够的数据"), { hasError: !0 };
173
- const r = new S({});
174
- r.messages($.messages()), r.define(e);
175
- const o = await Q(n, a, r);
176
- return o.length > 0 || c.length > 0 ? {
173
+ const r = new H({});
174
+ r.messages(U.messages()), r.define(e);
175
+ const o = await Y(c, a, r);
176
+ return o.length > 0 || l.length > 0 ? {
177
177
  hasError: !0,
178
178
  markCells: o.map((u) => ({
179
179
  row: u.row + 2,
@@ -183,62 +183,63 @@ const j = (i) => {
183
183
  color: "FFFF0000"
184
184
  // 红色
185
185
  })),
186
- markHeaders: c
186
+ markHeaders: l
187
187
  } : { hasError: !1 };
188
- }, Q = async (i, e, s) => {
189
- const n = [];
188
+ }, Y = async (i, e, s) => {
189
+ const c = [];
190
190
  for (let a = 0; a < e.length; a++) {
191
- const c = e[a];
191
+ const l = e[a];
192
192
  try {
193
- await s.validate(c).catch(({ errors: r }) => {
193
+ await s.validate(l).catch(({ errors: r }) => {
194
194
  const o = [];
195
195
  r.forEach((t) => {
196
196
  const u = i.indexOf(t.field);
197
- u >= 0 && (o.some((p) => p.row === a && p.col === u) || o.push({
197
+ u >= 0 && (o.some((d) => d.row === a && d.col === u) || o.push({
198
198
  row: a,
199
199
  col: u,
200
200
  header: t.field,
201
201
  message: t.message.replace("${label}", i[u])
202
202
  }));
203
- }), n.push(...o);
203
+ }), c.push(...o);
204
204
  });
205
205
  } catch (r) {
206
206
  console.error("验证表格数据时发生错误:", r), m.error("验证表格数据时发生错误:" + r);
207
207
  }
208
208
  }
209
- return n;
210
- }, X = async (i, e, s) => {
209
+ return c;
210
+ }, Z = async (i, e, s) => {
211
211
  if (!e || e.length === 0)
212
212
  return { hasError: !1 };
213
- const n = await x(i);
214
- if (!n) return { hasError: !0 };
215
- const { headers: a, excelData: c } = n, r = [];
216
- if (e.forEach((l) => {
217
- a.includes(l) || r.push(l);
213
+ const c = await x(i);
214
+ if (!c) return { hasError: !0 };
215
+ const { headers: a, excelData: l } = c, r = [];
216
+ if (e.forEach((n) => {
217
+ a.includes(n) || r.push(n);
218
218
  }), r.length > 0)
219
219
  return m.error(`表头缺少重复检测所需字段: ${r.join(", ")}`), { hasError: !0 };
220
220
  const o = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), u = new Array();
221
- if (c.forEach((l, p) => {
222
- const f = e.map((d) => l[d]), h = f.join("|");
221
+ if (l.forEach((n, d) => {
222
+ const f = e.map((p) => n[p]), h = f.join("|");
223
223
  u.push(h);
224
- const w = f.some((d) => d != null && d !== "");
225
- w && o.has(h) ? (t.add(p), t.add(o.get(h))) : w && o.set(h, p);
224
+ const w = f.some((p) => p != null && p !== "");
225
+ w && o.has(h) ? (t.add(d), t.add(o.get(h))) : w && o.set(h, d);
226
226
  }), s) {
227
- const l = await M(s, {
227
+ const n = await M(s, {
228
228
  Data: u
229
229
  });
230
- if (l != null && l.data && l.data.forEach((p) => {
231
- t.add(p);
232
- }), (l == null ? void 0 : l.status) === V.ERROR)
233
- throw new Error(l.msg);
230
+ if ((n == null ? void 0 : n.status) == V.SUCCESS)
231
+ (n == null ? void 0 : n.data).forEach((f) => {
232
+ t.add(f);
233
+ });
234
+ else throw (n == null ? void 0 : n.errno) == $ ? (z().logout(!1), new Error("登录已过期")) : new Error(n == null ? void 0 : n.msg);
234
235
  }
235
236
  if (t.size > 0) {
236
- const l = [];
237
- return t.forEach((p) => {
237
+ const n = [];
238
+ return t.forEach((d) => {
238
239
  e.forEach((f) => {
239
240
  const h = a.indexOf(f);
240
- h >= 0 && l.push({
241
- row: p + 2,
241
+ h >= 0 && n.push({
242
+ row: d + 2,
242
243
  // Excel行号 = 数组索引 + 2(表头和1-based索引)
243
244
  col: h + 1,
244
245
  // Excel列号 = 数组索引 + 1(1-based索引)
@@ -248,30 +249,30 @@ const j = (i) => {
248
249
  });
249
250
  }), {
250
251
  hasError: !0,
251
- markCells: l,
252
+ markCells: n,
252
253
  markHeaders: r
253
254
  };
254
255
  }
255
256
  return { hasError: !1 };
256
- }, ne = async (i, e, s, n) => {
257
- const a = [], c = [];
257
+ }, le = async (i, e, s, c) => {
258
+ const a = [], l = [];
258
259
  let r = !1, o = !1, t = "数据验证成功", u = "待验证重复数据";
259
- const l = await G(i, e);
260
- if (l.hasError ? (r = !0, t = "数据验证失败", l.markCells && a.push(...l.markCells), l.markHeaders && c.push(...l.markHeaders)) : e && Object.keys(e).length > 0 && (t = "数据验证通过"), s && s.length > 0) {
261
- const f = await X(i, s, n);
260
+ const n = await X(i, e);
261
+ if (n.hasError ? (r = !0, t = "数据验证失败", n.markCells && a.push(...n.markCells), n.markHeaders && l.push(...n.markHeaders)) : e && Object.keys(e).length > 0 && (t = "数据验证通过"), s && s.length > 0) {
262
+ const f = await Z(i, s, c);
262
263
  f.hasError ? (o = !0, u = "检测到重复数据", f.markCells && f.markCells.forEach((h) => {
263
264
  const w = a.find(
264
- (d) => d.row === h.row && d.col === h.col
265
+ (p) => p.row === h.row && p.col === h.col
265
266
  );
266
267
  w ? w.color = "8B0000" : a.push(h);
267
- }), f.markHeaders && c.push(...f.markHeaders)) : u = "重复性检验通过";
268
+ }), f.markHeaders && l.push(...f.markHeaders)) : u = "重复性检验通过";
268
269
  }
269
270
  if (r || o) {
270
- const f = await J(
271
+ const f = await Q(
271
272
  i,
272
273
  {
273
274
  markCells: a,
274
- markHeaders: c
275
+ markHeaders: l
275
276
  },
276
277
  "validation_errors.xlsx"
277
278
  );
@@ -294,15 +295,15 @@ const j = (i) => {
294
295
  hasFormatError: !1,
295
296
  hasDuplicateError: !1
296
297
  };
297
- }, ce = async (i, e, s) => {
298
- const n = i.originFileObj;
299
- if (n) {
300
- const a = await n.arrayBuffer(), c = await x(a);
301
- if (!c) {
298
+ }, ie = async (i, e, s) => {
299
+ const c = i.originFileObj;
300
+ if (c) {
301
+ const a = await c.arrayBuffer(), l = await x(a);
302
+ if (!l) {
302
303
  m.error("上传的文件不是Excel文件");
303
304
  return;
304
305
  }
305
- const { headers: r, excelRows: o, excelData: t } = c;
306
+ const { headers: r, excelRows: o, excelData: t } = l;
306
307
  s && s.length > 0 ? s.forEach((u) => {
307
308
  switch (u) {
308
309
  case "Headers":
@@ -317,15 +318,15 @@ const j = (i) => {
317
318
  }
318
319
  }) : (e.Headers = r, e.RawRows = o, e.Records = t);
319
320
  }
320
- }, Y = { class: "absolute z-[9999] w-full h-full top-0 flex flex-flow row items-center justify-center" }, le = /* @__PURE__ */ R({
321
+ }, I = { class: "absolute z-[9999] w-full h-full top-0 flex flex-flow row items-center justify-center" }, ue = /* @__PURE__ */ _({
321
322
  __name: "index",
322
323
  setup(i) {
323
- const e = U();
324
- return (s, n) => (b(), z("div", Y, [
325
- B(v(N), D({ style: { "margin-top": "-10%" } }, v(e)), null, 16)
324
+ const e = B();
325
+ return (s, c) => (b(), A("div", I, [
326
+ O(v(K), S({ style: { "margin-top": "-10%" } }, v(e)), null, 16)
326
327
  ]));
327
328
  }
328
- }), ie = /* @__PURE__ */ R({
329
+ }), fe = /* @__PURE__ */ _({
329
330
  __name: "index",
330
331
  props: {
331
332
  icon: {},
@@ -339,21 +340,21 @@ const j = (i) => {
339
340
  info: "#1890ff",
340
341
  warning: "#faad14",
341
342
  error: "#ff4d4f"
342
- }, n = {
343
+ }, c = {
343
344
  success: "icon-success-fill",
344
345
  info: "icon-info-fill",
345
346
  warning: "icon-warn-fill",
346
347
  error: "icon-error-fill"
347
- }, a = E(() => e.type || "info"), c = E(() => s[a.value]), r = E(() => n[a.value]), o = Math.random().toString(36).substring(2, 9), t = E(() => `${o}-${a.value}-${r.value}`);
348
- return (u, l) => (b(), _(v(L), D({
348
+ }, a = E(() => e.type || "info"), l = E(() => s[a.value]), r = E(() => c[a.value]), o = Math.random().toString(36).substring(2, 9), t = E(() => `${o}-${a.value}-${r.value}`);
349
+ return (u, n) => (b(), R(v(P), S({
349
350
  "show-icon": u.showIcon,
350
351
  type: u.type,
351
352
  message: u.message
352
353
  }, u.$attrs), {
353
- icon: O(() => [
354
- (b(), _(K, {
354
+ icon: L(() => [
355
+ (b(), R(W, {
355
356
  icon: r.value,
356
- style: A({ color: c.value }),
357
+ style: N({ color: l.value }),
357
358
  key: t.value
358
359
  }, null, 8, ["icon", "style"]))
359
360
  ]),
@@ -362,19 +363,19 @@ const j = (i) => {
362
363
  }
363
364
  });
364
365
  export {
365
- ie as _,
366
- X as a,
367
- ce as b,
368
- P as c,
369
- J as d,
370
- j as e,
371
- H as f,
372
- W as g,
373
- le as h,
374
- ne as i,
375
- ae as j,
376
- q as n,
366
+ fe as _,
367
+ Z as a,
368
+ ie as b,
369
+ q as c,
370
+ Q as d,
371
+ D as e,
372
+ j as f,
373
+ J as g,
374
+ ue as h,
375
+ le as i,
376
+ ce as j,
377
+ G as n,
377
378
  x as p,
378
379
  g as t,
379
- G as v
380
+ X as v
380
381
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as x, createBlock as h, createCommentVNode as I, openBlock as u, unref as t, mergeProps as C, useAttrs as q, computed as j, ref as y, watch as k, withCtx as d, createElementBlock as g, normalizeStyle as T, createElementVNode as m, inject as J, onMounted as N, createVNode as l, toDisplayString as $, Fragment as L, createTextVNode as K, reactive as W, nextTick as Y, renderList as G, withModifiers as Q } from "vue";
2
- import { a as w, _ as b } from "./toolIcon-BuqRfX4F.js";
3
- import { c as D, S as E, af as P, V as U, U as M, u as F, a as V, T as X, r as H, ad as z } from "./uploadList-B6MIYOtN.js";
1
+ import { defineComponent as x, createBlock as h, createCommentVNode as I, openBlock as u, unref as t, mergeProps as C, useAttrs as W, computed as j, ref as y, watch as k, withCtx as d, createElementBlock as g, normalizeStyle as T, createElementVNode as m, inject as q, onMounted as N, createVNode as l, toDisplayString as $, Fragment as L, createTextVNode as K, reactive as J, nextTick as Y, renderList as G, withModifiers as Q } from "vue";
2
+ import { a as w, _ as b } from "./toolIcon-FTelEQwg.js";
3
+ import { c as D, T as E, ag as P, W as U, V as M, u as F, a as V, U as X, r as H, ae as z } from "./uploadList-DIfhRlbh.js";
4
4
  import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  import { theme as O, Breadcrumb as ee, Modal as te, Flex as ne, LayoutHeader as oe, Space as se, Menu as ie, Tabs as ce, TabPane as ae } from "ant-design-vue";
6
6
  import { mainAppApis as R } from "@skyfox2000/microbase";
@@ -272,7 +272,7 @@ const le = /* @__PURE__ */ x({
272
272
  "update:iconIndex"
273
273
  ],
274
274
  setup(c, { emit: s }) {
275
- const i = q(), e = c, r = s, a = j(() => {
275
+ const i = W(), e = c, r = s, a = j(() => {
276
276
  if (Array.isArray(e.size)) return e.size;
277
277
  {
278
278
  let o = e.size;
@@ -302,7 +302,7 @@ const le = /* @__PURE__ */ x({
302
302
  const S = (o) => {
303
303
  if (o.stopPropagation(), e.clickEvent) {
304
304
  const v = e.clickEvent.split("#");
305
- v.length === 2 && J("$" + v[0]).$emit(v[1], e.data);
305
+ v.length === 2 && q("$" + v[0]).$emit(v[1], e.data);
306
306
  }
307
307
  e.autoSwitch && e.icons.length > 0 && (p.value = (p.value + 1) % e.icons.length, n.value = e.icons[f.value]), r("click");
308
308
  }, _ = () => {
@@ -446,7 +446,7 @@ const le = /* @__PURE__ */ x({
446
446
  __name: "headerExits",
447
447
  setup(c) {
448
448
  const s = F(), i = y(!1), e = () => {
449
- i.value = !1, R.value ? R.value.userLogout() : s.logout();
449
+ i.value = !1, R.value ? R.value.userLogout() : s.logout(!0);
450
450
  };
451
451
  return (r, a) => (u(), g(L, null, [
452
452
  l(t(w), { title: "退出平台" }, {
@@ -562,7 +562,7 @@ const le = /* @__PURE__ */ x({
562
562
  routes: {}
563
563
  },
564
564
  setup(c) {
565
- const s = c, i = y([]), e = y([]), r = W([]), a = P(), n = (_) => {
565
+ const s = c, i = y([]), e = y([]), r = J([]), a = P(), n = (_) => {
566
566
  z().push(_.key.toString());
567
567
  }, f = V(), p = y([]), S = () => {
568
568
  let _ = a.TabActive;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as i, createBlock as s, openBlock as l, unref as a, withCtx as p, renderSlot as f, createCommentVNode as u, mergeProps as d } from "vue";
2
2
  import { Tooltip as I } from "ant-design-vue";
3
3
  import { SERVER_HOST as r } from "@skyfox2000/fapi";
4
- import { c as S } from "./uploadList-B6MIYOtN.js";
4
+ import { c as S } from "./uploadList-DIfhRlbh.js";
5
5
  const T = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {