@skyfox2000/webui 1.5.3 → 1.5.7
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.
- package/lib/assets/modules/{baseLayout-LU1ysAJM.js → baseLayout-DfTxHOFc.js} +7 -7
- package/lib/assets/modules/file-upload-DTOdV5vM.js +211 -0
- package/lib/assets/modules/index-BDoBUrYA.js +114 -0
- package/lib/assets/modules/{index-C6RrxZBR.js → index-BwMaOrJT.js} +1 -1
- package/lib/assets/modules/{index-CHG5bbZG.js → index-M1qERbea.js} +99 -99
- package/lib/assets/modules/{menuTabs-Bk8A-zzL.js → menuTabs-DWaBSRNr.js} +42 -42
- package/lib/assets/modules/{toolIcon-ADz-Bt4_.js → toolIcon-BYnHhAy-.js} +1 -1
- package/lib/assets/modules/upload-template-BKm9mFq8.js +6764 -0
- package/lib/assets/modules/uploadList-CHvr6Hp1.js +472 -0
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +2 -2
- package/lib/es/Error403/index.js +14 -15
- package/lib/es/Error404/index.js +16 -17
- package/lib/es/ExcelForm/index.js +244 -244
- package/lib/es/MenuLayout/index.js +5 -5
- package/lib/es/TemplateFile/index.js +53 -54
- package/lib/es/UploadForm/index.js +61 -63
- package/lib/locales/default.d.ts +287 -103
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1440 -1586
- package/package.json +1 -1
- package/src/components/common/icon/fullscreen.vue +1 -1
- package/src/components/content/dialog/excelForm.vue +32 -28
- package/src/components/content/dialog/index.vue +3 -3
- package/src/components/content/dialog/templateFile.vue +3 -2
- package/src/components/content/dialog/uploadForm.vue +5 -4
- package/src/components/content/drawer/index.vue +5 -3
- package/src/components/content/list/index.vue +2 -1
- package/src/components/content/list/listOperate.vue +6 -7
- package/src/components/content/search/index.vue +2 -2
- package/src/components/content/table/index.vue +2 -1
- package/src/components/content/table/tableOperate.vue +8 -9
- package/src/components/content/toolbar/icontool.vue +1 -5
- package/src/components/content/toolbar/index.vue +4 -5
- package/src/components/content/toolpanel/index.vue +20 -20
- package/src/components/error/error403.vue +2 -2
- package/src/components/error/error404.vue +2 -2
- package/src/components/form/input/index.vue +3 -1
- package/src/components/form/select/index.vue +3 -2
- package/src/components/form/textarea/index.vue +3 -1
- package/src/components/form/transfer/index.vue +2 -1
- package/src/components/form/upload/uploadList.vue +23 -19
- package/src/components/layout/header/headerExits.vue +5 -5
- package/src/components/layout/menu/menuTabs.vue +1 -1
- package/src/const/options.ts +17 -16
- package/src/locales/default.ts +297 -176
- package/src/locales/index.ts +12 -4
- package/src/stores/appInfo.ts +2 -1
- package/src/stores/userInfo.ts +6 -5
- package/src/utils/data.ts +9 -8
- package/src/utils/download.ts +5 -4
- package/src/utils/excel-preview.ts +4 -3
- package/src/utils/export-table.ts +7 -6
- package/src/utils/file-upload.ts +15 -14
- package/src/utils/form-csv.ts +4 -3
- package/src/utils/form-excel.ts +14 -13
- package/src/utils/form-validate.ts +18 -17
- package/src/utils/form.ts +6 -5
- package/src/utils/icon-loader.ts +3 -2
- package/src/utils/options.ts +2 -1
- package/src/utils/tools.ts +18 -17
- package/lib/assets/modules/file-upload-BvIYPDBD.js +0 -211
- package/lib/assets/modules/index-Bi3hR8Gf.js +0 -114
- package/lib/assets/modules/upload-template-mzLL4UUU.js +0 -6462
- package/lib/assets/modules/uploadList-DRGJEXDH.js +0 -466
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { httpPost as
|
|
3
|
-
import { i as T, as as U, L as
|
|
4
|
-
import
|
|
5
|
-
import { defineComponent as
|
|
6
|
-
import { Spin as K, Alert as
|
|
7
|
-
import { _ as
|
|
8
|
-
const
|
|
1
|
+
import V from "async-validator";
|
|
2
|
+
import { httpPost as $, ResStatus as M } from "@skyfox2000/fapi";
|
|
3
|
+
import { i as T, $ as m, aD as U, L as z, u as B } from "./upload-template-BKm9mFq8.js";
|
|
4
|
+
import E from "vue-m-message";
|
|
5
|
+
import { defineComponent as S, useAttrs as A, createElementBlock as O, openBlock as v, createVNode as N, unref as k, mergeProps as D, computed as x, createBlock as _, withCtx as L, normalizeStyle as P } from "vue";
|
|
6
|
+
import { Spin as K, Alert as W } from "ant-design-vue";
|
|
7
|
+
import { _ as q } from "./toolIcon-BYnHhAy-.js";
|
|
8
|
+
const j = (i) => {
|
|
9
9
|
const e = i.split(`
|
|
10
10
|
`).filter((l) => l.trim() !== "");
|
|
11
11
|
if (e.length === 0)
|
|
@@ -17,7 +17,7 @@ const D = (i) => {
|
|
|
17
17
|
return isNaN(t) ? o : t;
|
|
18
18
|
})), c = s[0].map((l) => String(l || "")), a = s.slice(1);
|
|
19
19
|
return { headers: c, rows: a };
|
|
20
|
-
},
|
|
20
|
+
}, H = async (i) => {
|
|
21
21
|
try {
|
|
22
22
|
const e = await import("exceljs"), s = new e.default.Workbook();
|
|
23
23
|
await s.xlsx.load(i);
|
|
@@ -46,48 +46,48 @@ const D = (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:
|
|
50
|
-
const y = `${h}-${
|
|
51
|
-
t.set(y,
|
|
49
|
+
s != null && s.markCells && s.markCells.forEach(({ row: h, col: p, color: d }) => {
|
|
50
|
+
const y = `${h}-${p}`;
|
|
51
|
+
t.set(y, d || "FFFF0000");
|
|
52
52
|
});
|
|
53
53
|
const u = l.getRow(1);
|
|
54
|
-
r.forEach((h,
|
|
55
|
-
const
|
|
56
|
-
|
|
54
|
+
r.forEach((h, p) => {
|
|
55
|
+
const d = u.getCell(p + 1);
|
|
56
|
+
d.value = h, d.font = { bold: !0 }, d.fill = {
|
|
57
57
|
type: "pattern",
|
|
58
58
|
pattern: "solid",
|
|
59
59
|
fgColor: { argb: "FFE0E0E0" }
|
|
60
|
-
}, s != null && s.markHeaders && s.markHeaders.includes(h) && (
|
|
60
|
+
}, s != null && s.markHeaders && s.markHeaders.includes(h) && (d.fill = {
|
|
61
61
|
type: "pattern",
|
|
62
62
|
pattern: "solid",
|
|
63
63
|
fgColor: { argb: "FFFF0000" }
|
|
64
|
-
},
|
|
64
|
+
}, d.font = {
|
|
65
65
|
name: "Arial",
|
|
66
66
|
size: 10,
|
|
67
67
|
bold: !0,
|
|
68
68
|
color: { argb: "FFFFFFFF" }
|
|
69
69
|
});
|
|
70
|
-
}), o.forEach((h,
|
|
71
|
-
const
|
|
72
|
-
h.forEach((y,
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
t.has(
|
|
70
|
+
}), o.forEach((h, p) => {
|
|
71
|
+
const d = l.getRow(p + 2);
|
|
72
|
+
h.forEach((y, F) => {
|
|
73
|
+
const C = d.getCell(F + 1);
|
|
74
|
+
C.value = y;
|
|
75
|
+
const R = `${p + 2}-${F + 1}`;
|
|
76
|
+
t.has(R) && (C.fill = {
|
|
77
77
|
type: "pattern",
|
|
78
78
|
pattern: "solid",
|
|
79
|
-
fgColor: { argb: t.get(
|
|
79
|
+
fgColor: { argb: t.get(R) }
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
}), l.columns.forEach((h) => {
|
|
83
83
|
h.width = 15;
|
|
84
84
|
});
|
|
85
|
-
const n = await a.xlsx.writeBuffer(),
|
|
85
|
+
const n = await a.xlsx.writeBuffer(), w = 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(
|
|
90
|
+
blobUrl: URL.createObjectURL(w),
|
|
91
91
|
fileName: e.replace(/\.(csv|xlsx?)$/i, ".xlsx")
|
|
92
92
|
};
|
|
93
93
|
} catch (c) {
|
|
@@ -96,9 +96,9 @@ const D = (i) => {
|
|
|
96
96
|
error: c instanceof Error ? c.message : "未知错误"
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
},
|
|
99
|
+
}, J = async (i, e) => {
|
|
100
100
|
try {
|
|
101
|
-
const s =
|
|
101
|
+
const s = j(i);
|
|
102
102
|
return await g(s, e);
|
|
103
103
|
} catch (s) {
|
|
104
104
|
return {
|
|
@@ -106,7 +106,7 @@ const D = (i) => {
|
|
|
106
106
|
error: s instanceof Error ? s.message : "CSV处理失败"
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
},
|
|
109
|
+
}, G = async (i, e) => {
|
|
110
110
|
try {
|
|
111
111
|
const s = new Blob([i], {
|
|
112
112
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
@@ -122,18 +122,18 @@ const D = (i) => {
|
|
|
122
122
|
error: s instanceof Error ? s.message : "Excel处理失败"
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, Q = async (i, e) => await g(i, e), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
126
126
|
__proto__: null,
|
|
127
|
-
csvToExcelView:
|
|
128
|
-
csvToNormalized:
|
|
129
|
-
excelToExcelView:
|
|
130
|
-
excelToNormalized:
|
|
131
|
-
normalizedToExcelView:
|
|
127
|
+
csvToExcelView: J,
|
|
128
|
+
csvToNormalized: j,
|
|
129
|
+
excelToExcelView: G,
|
|
130
|
+
excelToNormalized: H,
|
|
131
|
+
normalizedToExcelView: Q,
|
|
132
132
|
toExcel: g
|
|
133
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
134
|
-
const e = await
|
|
133
|
+
}, Symbol.toStringTag, { value: "Module" })), b = async (i) => {
|
|
134
|
+
const e = await H(i);
|
|
135
135
|
if (e.headers.length === 0)
|
|
136
|
-
return
|
|
136
|
+
return E.error(m("webui.utils.formExcel.noWorksheet")), null;
|
|
137
137
|
const s = [];
|
|
138
138
|
return e.rows.forEach((c) => {
|
|
139
139
|
const a = {};
|
|
@@ -145,10 +145,10 @@ const D = (i) => {
|
|
|
145
145
|
excelData: s,
|
|
146
146
|
excelRows: e.rows
|
|
147
147
|
};
|
|
148
|
-
},
|
|
149
|
-
const c = await
|
|
148
|
+
}, X = async (i, e, s) => {
|
|
149
|
+
const c = await b(i);
|
|
150
150
|
if (!c)
|
|
151
|
-
return { success: !1, error: "
|
|
151
|
+
return { success: !1, error: m("webui.utils.formExcel.processFailed") };
|
|
152
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);
|
|
@@ -160,19 +160,19 @@ const D = (i) => {
|
|
|
160
160
|
return n;
|
|
161
161
|
});
|
|
162
162
|
return await g({ headers: o, rows: t }, s, e);
|
|
163
|
-
},
|
|
163
|
+
}, Y = async (i, e) => {
|
|
164
164
|
if (!e || T(e))
|
|
165
165
|
return { hasError: !1 };
|
|
166
|
-
const s = await
|
|
166
|
+
const s = await b(i);
|
|
167
167
|
if (!s) return { hasError: !0 };
|
|
168
168
|
const { headers: c, excelData: a } = s, l = [];
|
|
169
169
|
if (Object.keys(e).forEach((t) => {
|
|
170
170
|
c.includes(t) || l.push(t);
|
|
171
171
|
}), c.length === 0 || a.length === 0)
|
|
172
|
-
return
|
|
173
|
-
const r = new
|
|
172
|
+
return E.error(m("webui.utils.formExcel.insufficientData")), { hasError: !0 };
|
|
173
|
+
const r = new V({});
|
|
174
174
|
r.messages(U.messages()), r.define(e);
|
|
175
|
-
const o = await
|
|
175
|
+
const o = await Z(c, a, r);
|
|
176
176
|
return o.length > 0 || l.length > 0 ? {
|
|
177
177
|
hasError: !0,
|
|
178
178
|
markCells: o.map((u) => ({
|
|
@@ -185,7 +185,7 @@ const D = (i) => {
|
|
|
185
185
|
})),
|
|
186
186
|
markHeaders: l
|
|
187
187
|
} : { hasError: !1 };
|
|
188
|
-
},
|
|
188
|
+
}, Z = async (i, e, s) => {
|
|
189
189
|
const c = [];
|
|
190
190
|
for (let a = 0; a < e.length; a++) {
|
|
191
191
|
const l = e[a];
|
|
@@ -194,7 +194,7 @@ const D = (i) => {
|
|
|
194
194
|
const o = [];
|
|
195
195
|
r.forEach((t) => {
|
|
196
196
|
const u = i.indexOf(t.field);
|
|
197
|
-
u >= 0 && (o.some((
|
|
197
|
+
u >= 0 && (o.some((w) => w.row === a && w.col === u) || o.push({
|
|
198
198
|
row: a,
|
|
199
199
|
col: u,
|
|
200
200
|
header: t.field,
|
|
@@ -203,43 +203,43 @@ const D = (i) => {
|
|
|
203
203
|
}), c.push(...o);
|
|
204
204
|
});
|
|
205
205
|
} catch (r) {
|
|
206
|
-
console.error("
|
|
206
|
+
console.error(m("webui.utils.formExcel.validationError") + ":", r), E.error(m("webui.utils.formExcel.validationError") + ":" + r);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
return c;
|
|
210
|
-
},
|
|
210
|
+
}, I = async (i, e, s) => {
|
|
211
211
|
if (!e || e.length === 0)
|
|
212
212
|
return { hasError: !1 };
|
|
213
|
-
const c = await
|
|
213
|
+
const c = await b(i);
|
|
214
214
|
if (!c) return { hasError: !0 };
|
|
215
215
|
const { headers: a, excelData: l } = c, r = [];
|
|
216
216
|
if (e.forEach((n) => {
|
|
217
217
|
a.includes(n) || r.push(n);
|
|
218
218
|
}), r.length > 0)
|
|
219
|
-
return
|
|
219
|
+
return E.error(m("webui.utils.formExcel.missingDuplicateFields") + `: ${r.join(", ")}`), { hasError: !0 };
|
|
220
220
|
const o = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), u = new Array();
|
|
221
|
-
if (l.forEach((n,
|
|
222
|
-
const f = e.map((
|
|
221
|
+
if (l.forEach((n, w) => {
|
|
222
|
+
const f = e.map((d) => n[d]), h = f.join("|");
|
|
223
223
|
u.push(h);
|
|
224
|
-
const
|
|
225
|
-
|
|
224
|
+
const p = f.some((d) => d != null && d !== "");
|
|
225
|
+
p && o.has(h) ? (t.add(w), t.add(o.get(h))) : p && o.set(h, w);
|
|
226
226
|
}), s) {
|
|
227
|
-
const n = await
|
|
227
|
+
const n = await $(s, {
|
|
228
228
|
Data: u
|
|
229
229
|
});
|
|
230
|
-
if ((n == null ? void 0 : n.status) ==
|
|
230
|
+
if ((n == null ? void 0 : n.status) == M.SUCCESS)
|
|
231
231
|
(n == null ? void 0 : n.data).forEach((f) => {
|
|
232
232
|
t.add(f);
|
|
233
233
|
});
|
|
234
|
-
else throw (n == null ? void 0 : n.errno) ==
|
|
234
|
+
else throw (n == null ? void 0 : n.errno) == z ? (B().logout(!1), new Error("登录已过期")) : new Error(n == null ? void 0 : n.msg);
|
|
235
235
|
}
|
|
236
236
|
if (t.size > 0) {
|
|
237
237
|
const n = [];
|
|
238
|
-
return t.forEach((
|
|
238
|
+
return t.forEach((w) => {
|
|
239
239
|
e.forEach((f) => {
|
|
240
240
|
const h = a.indexOf(f);
|
|
241
241
|
h >= 0 && n.push({
|
|
242
|
-
row:
|
|
242
|
+
row: w + 2,
|
|
243
243
|
// Excel行号 = 数组索引 + 2(表头和1-based索引)
|
|
244
244
|
col: h + 1,
|
|
245
245
|
// Excel列号 = 数组索引 + 1(1-based索引)
|
|
@@ -254,21 +254,21 @@ const D = (i) => {
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
return { hasError: !1 };
|
|
257
|
-
},
|
|
257
|
+
}, ie = async (i, e, s, c) => {
|
|
258
258
|
const a = [], l = [];
|
|
259
|
-
let r = !1, o = !1, t = "
|
|
260
|
-
const n = await
|
|
261
|
-
if (n.hasError ? (r = !0, t = "
|
|
262
|
-
const f = await
|
|
263
|
-
f.hasError ? (o = !0, u = "
|
|
264
|
-
const
|
|
265
|
-
(
|
|
259
|
+
let r = !1, o = !1, t = m("webui.utils.formExcel.validationSuccess"), u = m("webui.utils.formExcel.duplicateValidationPending");
|
|
260
|
+
const n = await Y(i, e);
|
|
261
|
+
if (n.hasError ? (r = !0, t = m("webui.utils.formExcel.validationFailed"), n.markCells && a.push(...n.markCells), n.markHeaders && l.push(...n.markHeaders)) : e && Object.keys(e).length > 0 && (t = m("webui.utils.formExcel.validationPassed")), s && s.length > 0) {
|
|
262
|
+
const f = await I(i, s, c);
|
|
263
|
+
f.hasError ? (o = !0, u = m("webui.utils.formExcel.duplicateDetected"), f.markCells && f.markCells.forEach((h) => {
|
|
264
|
+
const p = a.find(
|
|
265
|
+
(d) => d.row === h.row && d.col === h.col
|
|
266
266
|
);
|
|
267
|
-
|
|
268
|
-
}), f.markHeaders && l.push(...f.markHeaders)) : u = "
|
|
267
|
+
p ? p.color = "8B0000" : a.push(h);
|
|
268
|
+
}), f.markHeaders && l.push(...f.markHeaders)) : u = m("webui.utils.formExcel.duplicateCheckPassed");
|
|
269
269
|
}
|
|
270
270
|
if (r || o) {
|
|
271
|
-
const f = await
|
|
271
|
+
const f = await X(
|
|
272
272
|
i,
|
|
273
273
|
{
|
|
274
274
|
markCells: a,
|
|
@@ -295,12 +295,12 @@ const D = (i) => {
|
|
|
295
295
|
hasFormatError: !1,
|
|
296
296
|
hasDuplicateError: !1
|
|
297
297
|
};
|
|
298
|
-
},
|
|
298
|
+
}, ue = async (i, e, s) => {
|
|
299
299
|
const c = i.originFileObj;
|
|
300
300
|
if (c) {
|
|
301
|
-
const a = await c.arrayBuffer(), l = await
|
|
301
|
+
const a = await c.arrayBuffer(), l = await b(a);
|
|
302
302
|
if (!l) {
|
|
303
|
-
|
|
303
|
+
E.error(m("webui.utils.formExcel.fileNotExcel"));
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
const { headers: r, excelRows: o, excelData: t } = l;
|
|
@@ -318,15 +318,15 @@ const D = (i) => {
|
|
|
318
318
|
}
|
|
319
319
|
}) : (e.Headers = r, e.RawRows = o, e.Records = t);
|
|
320
320
|
}
|
|
321
|
-
},
|
|
321
|
+
}, ee = { class: "absolute z-[9999] w-full h-full top-0 flex flex-flow row items-center justify-center" }, fe = /* @__PURE__ */ S({
|
|
322
322
|
__name: "index",
|
|
323
323
|
setup(i) {
|
|
324
|
-
const e =
|
|
325
|
-
return (s, c) => (
|
|
326
|
-
|
|
324
|
+
const e = A();
|
|
325
|
+
return (s, c) => (v(), O("div", ee, [
|
|
326
|
+
N(k(K), D({ style: { "margin-top": "-10%" } }, k(e)), null, 16)
|
|
327
327
|
]));
|
|
328
328
|
}
|
|
329
|
-
}),
|
|
329
|
+
}), he = /* @__PURE__ */ S({
|
|
330
330
|
__name: "index",
|
|
331
331
|
props: {
|
|
332
332
|
icon: {},
|
|
@@ -345,16 +345,16 @@ const D = (i) => {
|
|
|
345
345
|
info: "icon-info-fill",
|
|
346
346
|
warning: "icon-warn-fill",
|
|
347
347
|
error: "icon-error-fill"
|
|
348
|
-
}, a =
|
|
349
|
-
return (u, n) => (
|
|
348
|
+
}, a = x(() => e.type || "info"), l = x(() => s[a.value]), r = x(() => c[a.value]), o = Math.random().toString(36).substring(2, 9), t = x(() => `${o}-${a.value}-${r.value}`);
|
|
349
|
+
return (u, n) => (v(), _(k(W), D({
|
|
350
350
|
"show-icon": u.showIcon,
|
|
351
351
|
type: u.type,
|
|
352
352
|
message: u.message
|
|
353
353
|
}, u.$attrs), {
|
|
354
354
|
icon: L(() => [
|
|
355
|
-
(
|
|
355
|
+
(v(), _(q, {
|
|
356
356
|
icon: r.value,
|
|
357
|
-
style:
|
|
357
|
+
style: P({ color: l.value }),
|
|
358
358
|
key: t.value
|
|
359
359
|
}, null, 8, ["icon", "style"]))
|
|
360
360
|
]),
|
|
@@ -363,19 +363,19 @@ const D = (i) => {
|
|
|
363
363
|
}
|
|
364
364
|
});
|
|
365
365
|
export {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
366
|
+
he as _,
|
|
367
|
+
I as a,
|
|
368
|
+
ue as b,
|
|
369
|
+
J as c,
|
|
370
|
+
X as d,
|
|
371
|
+
j as e,
|
|
372
|
+
H as f,
|
|
373
|
+
G as g,
|
|
374
|
+
fe as h,
|
|
375
|
+
ie as i,
|
|
376
|
+
le as j,
|
|
377
|
+
Q as n,
|
|
378
|
+
b as p,
|
|
379
379
|
g as t,
|
|
380
|
-
|
|
380
|
+
Y as v
|
|
381
381
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as _, createBlock as y, createCommentVNode as b, openBlock as l, unref as t, mergeProps as $, useAttrs as
|
|
2
|
-
import { a as A, _ as k } from "./toolIcon-
|
|
3
|
-
import { c as D,
|
|
1
|
+
import { defineComponent as _, createBlock as y, createCommentVNode as b, openBlock as l, unref as t, mergeProps as $, useAttrs as W, computed as j, ref as h, watch as w, withCtx as m, createElementBlock as g, normalizeStyle as T, createElementVNode as f, inject as Y, onMounted as P, createVNode as r, toDisplayString as C, Fragment as L, renderList as U, createTextVNode as G, reactive as Q, nextTick as X, withModifiers as Z } from "vue";
|
|
2
|
+
import { a as A, _ as k } from "./toolIcon-BYnHhAy-.js";
|
|
3
|
+
import { c as D, a7 as E, av as O, aa as K, a9 as R, u as F, $ as S, T as ee, aA as H, aB as te, aC as ne, a as V, a8 as oe, r as q, at as B } from "./upload-template-BKm9mFq8.js";
|
|
4
4
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import { theme as
|
|
5
|
+
import { theme as M, Breadcrumb as ie, Modal as ae, Flex as ce, Dropdown as le, Menu as J, MenuItem as re, LayoutHeader as ue, Space as pe, Tabs as de, TabPane as me } from "ant-design-vue";
|
|
6
6
|
import { isMicroApp as fe } from "@skyfox2000/microbase";
|
|
7
7
|
import { SERVER_HOST as N } from "@skyfox2000/fapi";
|
|
8
8
|
import "vue-m-message";
|
|
@@ -272,13 +272,13 @@ const ge = /* @__PURE__ */ _({
|
|
|
272
272
|
"update:iconIndex"
|
|
273
273
|
],
|
|
274
274
|
setup(c, { emit: o }) {
|
|
275
|
-
const s =
|
|
275
|
+
const s = W(), e = c, u = o, i = j(() => {
|
|
276
276
|
if (Array.isArray(e.size)) return e.size;
|
|
277
277
|
{
|
|
278
278
|
let a = e.size;
|
|
279
279
|
return [a, a];
|
|
280
280
|
}
|
|
281
|
-
}), n =
|
|
281
|
+
}), n = h(e.icon), p = h(e.iconIndex);
|
|
282
282
|
w(
|
|
283
283
|
() => e.icon,
|
|
284
284
|
(a) => {
|
|
@@ -301,15 +301,15 @@ const ge = /* @__PURE__ */ _({
|
|
|
301
301
|
e.icons.length > 0 ? (d.value = d.value >= e.icons.length ? 0 : d.value, n.value = e.icons[p.value]) : n.value = e.icon;
|
|
302
302
|
const I = (a) => {
|
|
303
303
|
if (a.stopPropagation(), e.clickEvent) {
|
|
304
|
-
const
|
|
305
|
-
|
|
304
|
+
const v = e.clickEvent.split("#");
|
|
305
|
+
v.length === 2 && Y("$" + v[0]).$emit(v[1], e.data);
|
|
306
306
|
}
|
|
307
307
|
e.autoSwitch && e.icons.length > 0 && (d.value = (d.value + 1) % e.icons.length, n.value = e.icons[p.value]), u("click");
|
|
308
308
|
}, x = () => {
|
|
309
309
|
let a = "";
|
|
310
310
|
return e.spin && (a += "rotate"), e.flip && (a += " flip"), a;
|
|
311
311
|
};
|
|
312
|
-
return (a,
|
|
312
|
+
return (a, v) => (l(), y(A, {
|
|
313
313
|
title: e.tiptext,
|
|
314
314
|
disabled: e.tiptext ? void 0 : "disabled",
|
|
315
315
|
color: c.tipcolor,
|
|
@@ -361,7 +361,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
361
361
|
_: 1
|
|
362
362
|
}, 8, ["title", "disabled", "color", "placement", "size"]));
|
|
363
363
|
}
|
|
364
|
-
}),
|
|
364
|
+
}), Je = /* @__PURE__ */ se(xe, [["__scopeId", "data-v-0146f00c"]]), ye = /* @__PURE__ */ _({
|
|
365
365
|
__name: "projectIcon",
|
|
366
366
|
props: {
|
|
367
367
|
icon: {
|
|
@@ -392,13 +392,13 @@ const ge = /* @__PURE__ */ _({
|
|
|
392
392
|
class: ["align-middle"]
|
|
393
393
|
}, u.$attrs), null, 16, ["icon", "icons"])) : b("", !0);
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), ve = { class: "text-xs leading-[3]" }, he = {
|
|
396
396
|
key: 0,
|
|
397
397
|
class: "leading-[2.5] mx-[6px] text-[rgba(0,0,0,0.45)]"
|
|
398
398
|
}, be = /* @__PURE__ */ _({
|
|
399
399
|
__name: "index",
|
|
400
400
|
setup(c) {
|
|
401
|
-
const { useToken: o } =
|
|
401
|
+
const { useToken: o } = M, { token: s } = o(), e = O();
|
|
402
402
|
return w(
|
|
403
403
|
() => e.TabActive,
|
|
404
404
|
() => K()
|
|
@@ -420,12 +420,12 @@ const ge = /* @__PURE__ */ _({
|
|
|
420
420
|
separator: ""
|
|
421
421
|
}, {
|
|
422
422
|
itemRender: m(({ route: n }) => [
|
|
423
|
-
f("span",
|
|
423
|
+
f("span", ve, C(n.breadcrumbName), 1),
|
|
424
424
|
r(t(k), {
|
|
425
425
|
icon: n.icon,
|
|
426
426
|
fontsize: "15px"
|
|
427
427
|
}, null, 8, ["icon"]),
|
|
428
|
-
n.index < t(R).length - 1 ? (l(), g("span",
|
|
428
|
+
n.index < t(R).length - 1 ? (l(), g("span", he, ">")) : b("", !0)
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
431
|
}, 8, ["routes"])
|
|
@@ -434,7 +434,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
434
434
|
}), ke = { class: "font-['Courier'] text-[#666]" }, Se = /* @__PURE__ */ _({
|
|
435
435
|
__name: "index",
|
|
436
436
|
setup(c) {
|
|
437
|
-
const o =
|
|
437
|
+
const o = h("");
|
|
438
438
|
return P(() => {
|
|
439
439
|
setInterval(() => {
|
|
440
440
|
const s = /* @__PURE__ */ new Date(), e = { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, u = s.toLocaleString(void 0, e).replace(/\//g, "-").replace(",", "");
|
|
@@ -445,12 +445,12 @@ const ge = /* @__PURE__ */ _({
|
|
|
445
445
|
}), we = { style: { margin: "0 0 0 20px", "font-weight": "400", "font-size": "16px" } }, Ce = /* @__PURE__ */ _({
|
|
446
446
|
__name: "headerExits",
|
|
447
447
|
setup(c) {
|
|
448
|
-
const o = F(), s =
|
|
448
|
+
const o = F(), s = h(!1), e = () => {
|
|
449
449
|
s.value = !1, fe() ? ee.userLogout() : o.logout(!0);
|
|
450
450
|
};
|
|
451
451
|
return (u, i) => (l(), g(L, null, [
|
|
452
452
|
r(t(A), {
|
|
453
|
-
title: t(S)("webui.layout.header.exitPlatform")
|
|
453
|
+
title: t(S)("webui.components.layout.header.exitPlatform")
|
|
454
454
|
}, {
|
|
455
455
|
default: m(() => [
|
|
456
456
|
r(t(k), {
|
|
@@ -458,7 +458,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
458
458
|
onClick: i[0] || (i[0] = (n) => s.value = !0),
|
|
459
459
|
clickable: "",
|
|
460
460
|
class: "w-5 h-5",
|
|
461
|
-
title: t(S)("webui.layout.header.exitSystem")
|
|
461
|
+
title: t(S)("webui.components.layout.header.exitSystem")
|
|
462
462
|
}, null, 8, ["title"])
|
|
463
463
|
]),
|
|
464
464
|
_: 1
|
|
@@ -466,7 +466,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
466
466
|
r(t(ae), {
|
|
467
467
|
open: s.value,
|
|
468
468
|
"onUpdate:open": i[1] || (i[1] = (n) => s.value = n),
|
|
469
|
-
title: t(S)("webui.layout.header.confirmExit"),
|
|
469
|
+
title: t(S)("webui.components.layout.header.confirmExit"),
|
|
470
470
|
"ok-text": t(S)("webui.common.confirm"),
|
|
471
471
|
"cancel-text": t(S)("webui.common.cancel"),
|
|
472
472
|
width: 380,
|
|
@@ -484,7 +484,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
484
484
|
color: "orange",
|
|
485
485
|
class: "w-[60px] h-[60px]"
|
|
486
486
|
}),
|
|
487
|
-
f("div", we, C(t(S)("webui.layout.header.exitConfirmMessage")), 1)
|
|
487
|
+
f("div", we, C(t(S)("webui.components.layout.header.exitConfirmMessage")), 1)
|
|
488
488
|
]),
|
|
489
489
|
_: 1
|
|
490
490
|
})
|
|
@@ -512,7 +512,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
512
512
|
}), Ae = { class: "flex items-center cursor-pointer" }, ze = /* @__PURE__ */ _({
|
|
513
513
|
__name: "language",
|
|
514
514
|
setup(c) {
|
|
515
|
-
const o = H(), s =
|
|
515
|
+
const o = H(), s = h(te()), e = o.length > 0, u = async (i) => {
|
|
516
516
|
try {
|
|
517
517
|
await ne(i), s.value = i;
|
|
518
518
|
} catch (n) {
|
|
@@ -524,14 +524,14 @@ const ge = /* @__PURE__ */ _({
|
|
|
524
524
|
placement: "bottomRight"
|
|
525
525
|
}, {
|
|
526
526
|
overlay: m(() => [
|
|
527
|
-
r(t(
|
|
527
|
+
r(t(J), null, {
|
|
528
528
|
default: m(() => [
|
|
529
529
|
(l(!0), g(L, null, U(t(o), (p) => (l(), y(t(re), {
|
|
530
530
|
key: p.key,
|
|
531
531
|
onClick: (d) => u(p.key)
|
|
532
532
|
}, {
|
|
533
533
|
default: m(() => [
|
|
534
|
-
|
|
534
|
+
G(C(p.label), 1)
|
|
535
535
|
]),
|
|
536
536
|
_: 2
|
|
537
537
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -553,10 +553,10 @@ const ge = /* @__PURE__ */ _({
|
|
|
553
553
|
}), Be = { class: "flex items-center" }, Ne = {
|
|
554
554
|
key: 1,
|
|
555
555
|
class: "w-[1px] h-[16px] bg-[#d9d9d9] mx-[3px]"
|
|
556
|
-
},
|
|
556
|
+
}, We = /* @__PURE__ */ _({
|
|
557
557
|
__name: "index",
|
|
558
558
|
setup(c) {
|
|
559
|
-
const { useToken: o } =
|
|
559
|
+
const { useToken: o } = M, { token: s } = o(), e = V(), u = () => {
|
|
560
560
|
e.setMenuCollapse(!e.menuCollapse);
|
|
561
561
|
}, i = H().length > 0;
|
|
562
562
|
return (n, p) => (l(), y(t(ue), {
|
|
@@ -602,15 +602,15 @@ const ge = /* @__PURE__ */ _({
|
|
|
602
602
|
_: 1
|
|
603
603
|
}, 8, ["style"]));
|
|
604
604
|
}
|
|
605
|
-
}),
|
|
605
|
+
}), Ye = /* @__PURE__ */ _({
|
|
606
606
|
__name: "index",
|
|
607
607
|
props: {
|
|
608
608
|
routes: {}
|
|
609
609
|
},
|
|
610
610
|
setup(c) {
|
|
611
|
-
const o = c, s =
|
|
611
|
+
const o = c, s = h([]), e = h([]), u = Q([]), i = O(), n = (x) => {
|
|
612
612
|
B().push(x.key.toString());
|
|
613
|
-
}, p = V(), d =
|
|
613
|
+
}, p = V(), d = h([]), I = () => {
|
|
614
614
|
let x = i.TabActive;
|
|
615
615
|
const a = x.split("/");
|
|
616
616
|
a.pop(), s.value = [a.join("/")], p.menuCollapse || (d.value = [a.join("/")]), e.value = [x];
|
|
@@ -618,7 +618,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
618
618
|
return w(
|
|
619
619
|
() => p.menuCollapse,
|
|
620
620
|
(x) => {
|
|
621
|
-
x || (d.value = [],
|
|
621
|
+
x || (d.value = [], X(() => {
|
|
622
622
|
d.value = [...s.value];
|
|
623
623
|
}));
|
|
624
624
|
}
|
|
@@ -629,21 +629,21 @@ const ge = /* @__PURE__ */ _({
|
|
|
629
629
|
}
|
|
630
630
|
), P(() => {
|
|
631
631
|
oe(o.routes, u, ye, { class: "!w-5 !h-5" }), i.setTabActive(q.currentRoute.value.path), I();
|
|
632
|
-
}), (x, a) => (l(), y(t(
|
|
632
|
+
}), (x, a) => (l(), y(t(J), {
|
|
633
633
|
openKeys: d.value,
|
|
634
|
-
"onUpdate:openKeys": a[0] || (a[0] = (
|
|
634
|
+
"onUpdate:openKeys": a[0] || (a[0] = (v) => d.value = v),
|
|
635
635
|
selectedKeys: e.value,
|
|
636
|
-
"onUpdate:selectedKeys": a[1] || (a[1] = (
|
|
636
|
+
"onUpdate:selectedKeys": a[1] || (a[1] = (v) => e.value = v),
|
|
637
637
|
mode: "inline",
|
|
638
638
|
theme: "dark",
|
|
639
639
|
items: u,
|
|
640
640
|
onClick: n
|
|
641
641
|
}, null, 8, ["openKeys", "selectedKeys", "items"]));
|
|
642
642
|
}
|
|
643
|
-
}), Pe = { class: "flex items-center" }, Le = { class: "flex" },
|
|
643
|
+
}), Pe = { class: "flex items-center" }, Le = { class: "flex" }, Oe = ["onClick"], Ge = /* @__PURE__ */ _({
|
|
644
644
|
__name: "menuTabs",
|
|
645
645
|
setup(c) {
|
|
646
|
-
const { useToken: o } =
|
|
646
|
+
const { useToken: o } = M, { token: s } = o(), e = O();
|
|
647
647
|
w(
|
|
648
648
|
() => q.currentRoute.value.path,
|
|
649
649
|
(n) => {
|
|
@@ -673,7 +673,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
673
673
|
f("div", Pe, [
|
|
674
674
|
f("span", Le, C(d.title), 1),
|
|
675
675
|
r(t(A), {
|
|
676
|
-
title: "
|
|
676
|
+
title: n.$t("webui.common.close"),
|
|
677
677
|
placement: "top",
|
|
678
678
|
size: "small"
|
|
679
679
|
}, {
|
|
@@ -681,7 +681,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
681
681
|
t(e).TabPanes.length > 1 && d.closable ? (l(), g("div", {
|
|
682
682
|
key: 0,
|
|
683
683
|
class: "inline-block mx-auto relative flex items-center",
|
|
684
|
-
onClick:
|
|
684
|
+
onClick: Z((I) => i(d.key), ["stop"])
|
|
685
685
|
}, [
|
|
686
686
|
r(t(k), {
|
|
687
687
|
icon: "icon-new",
|
|
@@ -690,10 +690,10 @@ const ge = /* @__PURE__ */ _({
|
|
|
690
690
|
class: "w-[15px] h-[15px] ml-1",
|
|
691
691
|
tipcolor: t(s).colorBgSpotlight
|
|
692
692
|
}, null, 8, ["tipcolor"])
|
|
693
|
-
], 8,
|
|
693
|
+
], 8, Oe)) : b("", !0)
|
|
694
694
|
]),
|
|
695
695
|
_: 2
|
|
696
|
-
},
|
|
696
|
+
}, 1032, ["title"])
|
|
697
697
|
])
|
|
698
698
|
]),
|
|
699
699
|
_: 2
|
|
@@ -705,13 +705,13 @@ const ge = /* @__PURE__ */ _({
|
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
707
|
export {
|
|
708
|
-
|
|
708
|
+
Je as I,
|
|
709
709
|
ge as _,
|
|
710
710
|
ye as a,
|
|
711
711
|
be as b,
|
|
712
712
|
Se as c,
|
|
713
|
-
|
|
713
|
+
We as d,
|
|
714
714
|
Ce as e,
|
|
715
|
-
|
|
716
|
-
|
|
715
|
+
Ye as f,
|
|
716
|
+
Ge as g
|
|
717
717
|
};
|
|
@@ -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 "./upload-template-
|
|
4
|
+
import { c as S } from "./upload-template-BKm9mFq8.js";
|
|
5
5
|
const T = /* @__PURE__ */ i({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|