@skyfox2000/webui 1.3.16 → 1.3.18
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/package.json +1 -1
- package/src/components/layout/page/baseLayout.vue +44 -0
- package/src/components/layout/page/basicLayout.vue +11 -44
- package/src/typings/option.d.ts +1 -1
- package/src/utils/options.ts +2 -2
- package/lib/AceEditor.d.ts +0 -1
- package/lib/BasicLayout.d.ts +0 -1
- package/lib/Error403.d.ts +0 -1
- package/lib/Error404.d.ts +0 -1
- package/lib/ExcelForm.d.ts +0 -1
- package/lib/UploadForm.d.ts +0 -1
- package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/lib/assets/modules/file-upload-JBIvw5Xx.js +0 -204
- package/lib/assets/modules/index-BMkaOjBS.js +0 -380
- package/lib/assets/modules/index-BOYtm8ib.js +0 -112
- package/lib/assets/modules/index-BkChvyed.js +0 -109
- package/lib/assets/modules/menuTabs-BFPjaQRI.js +0 -671
- package/lib/assets/modules/toolIcon-XOgjdQdO.js +0 -50
- package/lib/assets/modules/uploadList-BedljASx.js +0 -2407
- package/lib/assets/modules/uploadList-CW7OIDS3.js +0 -382
- package/lib/components/common/alert/index.vue.d.ts +0 -13
- package/lib/components/common/button/index.vue.d.ts +0 -41
- package/lib/components/common/icon/appicon.vue.d.ts +0 -11
- package/lib/components/common/icon/fullscreen.vue.d.ts +0 -3
- package/lib/components/common/icon/helper.vue.d.ts +0 -23
- package/lib/components/common/icon/index.vue.d.ts +0 -243
- package/lib/components/common/icon/layoutIcon.vue.d.ts +0 -43
- package/lib/components/common/icon/projectIcon.vue.d.ts +0 -59
- package/lib/components/common/icon/toolIcon.vue.d.ts +0 -43
- package/lib/components/common/index.d.ts +0 -22
- package/lib/components/common/loading/index.vue.d.ts +0 -3
- package/lib/components/common/tooltip/index.vue.d.ts +0 -21
- package/lib/components/content/dialog/index.vue.d.ts +0 -35
- package/lib/components/content/drawer/index.vue.d.ts +0 -28
- package/lib/components/content/form/formItem.vue.d.ts +0 -28
- package/lib/components/content/form/index.vue.d.ts +0 -25
- package/lib/components/content/index.d.ts +0 -22
- package/lib/components/content/search/index.vue.d.ts +0 -32
- package/lib/components/content/search/searchItem.vue.d.ts +0 -23
- package/lib/components/content/table/index.vue.d.ts +0 -127
- package/lib/components/content/table/tableOperate.vue.d.ts +0 -18
- package/lib/components/content/toolbar/icontool.vue.d.ts +0 -7
- package/lib/components/content/toolbar/index.vue.d.ts +0 -18
- package/lib/components/content/tree/index.vue.d.ts +0 -46
- package/lib/components/form/aceEditor/aceConfig.d.ts +0 -8
- package/lib/components/form/autoComplete/index.vue.d.ts +0 -101
- package/lib/components/form/cascader/index.vue.d.ts +0 -80
- package/lib/components/form/checkbox/index.vue.d.ts +0 -100
- package/lib/components/form/datePicker/index.vue.d.ts +0 -6
- package/lib/components/form/index.d.ts +0 -41
- package/lib/components/form/input/index.vue.d.ts +0 -29
- package/lib/components/form/input/inputIcon.vue.d.ts +0 -10
- package/lib/components/form/input/inputNumber.vue.d.ts +0 -3
- package/lib/components/form/input/inputPassword.vue.d.ts +0 -3
- package/lib/components/form/propEditor/index.vue.d.ts +0 -15
- package/lib/components/form/radio/index.vue.d.ts +0 -105
- package/lib/components/form/radio/radioStatus.vue.d.ts +0 -31
- package/lib/components/form/rangePicker/index.vue.d.ts +0 -16
- package/lib/components/form/select/index.vue.d.ts +0 -119
- package/lib/components/form/switch/index.vue.d.ts +0 -76
- package/lib/components/form/textarea/index.vue.d.ts +0 -3
- package/lib/components/form/timePicker/index.vue.d.ts +0 -6
- package/lib/components/form/transfer/index.vue.d.ts +0 -38
- package/lib/components/form/transfer/transferTable.vue.d.ts +0 -38
- package/lib/components/form/treeSelect/index.vue.d.ts +0 -47
- package/lib/components/form/upload/uploadList.vue.d.ts +0 -488
- package/lib/components/index.d.ts +0 -4
- package/lib/components/layout/breadcrumb/index.vue.d.ts +0 -3
- package/lib/components/layout/content/index.vue.d.ts +0 -22
- package/lib/components/layout/datetime/index.vue.d.ts +0 -3
- package/lib/components/layout/header/headerExits.vue.d.ts +0 -3
- package/lib/components/layout/header/index.vue.d.ts +0 -3
- package/lib/components/layout/header/user.vue.d.ts +0 -3
- package/lib/components/layout/index.d.ts +0 -14
- package/lib/components/layout/menu/index.vue.d.ts +0 -6
- package/lib/components/layout/menu/menuTabs.vue.d.ts +0 -3
- package/lib/const/options.d.ts +0 -32
- package/lib/directives/enter-submit.d.ts +0 -4
- package/lib/directives/index.d.ts +0 -2
- package/lib/directives/permission.d.ts +0 -5
- package/lib/es/AceEditor/index.js +0 -167
- package/lib/es/BasicLayout/index.js +0 -101
- package/lib/es/Error403/index.js +0 -39
- package/lib/es/Error404/index.js +0 -39
- package/lib/es/ExcelForm/index.js +0 -491
- package/lib/es/UploadForm/index.js +0 -110
- package/lib/index.d.ts +0 -46
- package/lib/router/index.d.ts +0 -15
- package/lib/stores/appInfo.d.ts +0 -31
- package/lib/stores/hostInfo.d.ts +0 -11
- package/lib/stores/pageInfo.d.ts +0 -18
- package/lib/stores/pinia.d.ts +0 -3
- package/lib/stores/settingInfo.d.ts +0 -8
- package/lib/stores/userInfo.d.ts +0 -25
- package/lib/typings/data.d.ts +0 -80
- package/lib/typings/form.d.ts +0 -206
- package/lib/typings/menu.d.ts +0 -7
- package/lib/typings/option.d.ts +0 -209
- package/lib/typings/page.d.ts +0 -70
- package/lib/typings/table.d.ts +0 -181
- package/lib/typings/tools.d.ts +0 -130
- package/lib/typings/tree.d.ts +0 -72
- package/lib/typings/upload.d.ts +0 -161
- package/lib/typings/urls.d.ts +0 -69
- package/lib/utils/cache.d.ts +0 -23
- package/lib/utils/data.d.ts +0 -6
- package/lib/utils/download.d.ts +0 -6
- package/lib/utils/eventbus.d.ts +0 -16
- package/lib/utils/excel-preview.d.ts +0 -24
- package/lib/utils/excel-view.d.ts +0 -25
- package/lib/utils/export-table.d.ts +0 -12
- package/lib/utils/file-upload.d.ts +0 -17
- package/lib/utils/form-csv.d.ts +0 -18
- package/lib/utils/form-excel.d.ts +0 -36
- package/lib/utils/form-validate.d.ts +0 -29
- package/lib/utils/form.d.ts +0 -9
- package/lib/utils/icon-loader.d.ts +0 -125
- package/lib/utils/isEmpty.d.ts +0 -1
- package/lib/utils/main-openapis.d.ts +0 -8
- package/lib/utils/menu.d.ts +0 -6
- package/lib/utils/options.d.ts +0 -7
- package/lib/utils/page.d.ts +0 -30
- package/lib/utils/table.d.ts +0 -21
- package/lib/utils/tools.d.ts +0 -18
- package/lib/utils/tree.d.ts +0 -3
- package/lib/vite-env.d.ts +0 -8
- package/lib/webui.css +0 -1
- package/lib/webui.es.js +0 -2345
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import S from "async-validator";
|
|
2
|
-
import { httpPost as M, ResStatus as V } from "@skyfox2000/fapi";
|
|
3
|
-
import { i as T, ag as $ } from "./uploadList-BedljASx.js";
|
|
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-XOgjdQdO.js";
|
|
8
|
-
const j = (i) => {
|
|
9
|
-
const e = i.split(`
|
|
10
|
-
`).filter((c) => c.trim() !== "");
|
|
11
|
-
if (e.length === 0)
|
|
12
|
-
return { headers: [], rows: [] };
|
|
13
|
-
const s = e.map((c) => c.split(",").map((r) => {
|
|
14
|
-
const o = r.trim();
|
|
15
|
-
if (o === "" || o === "null") return null;
|
|
16
|
-
const t = Number(o);
|
|
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) => {
|
|
21
|
-
try {
|
|
22
|
-
const e = await import("exceljs"), s = new e.default.Workbook();
|
|
23
|
-
await s.xlsx.load(i);
|
|
24
|
-
const n = s.worksheets[0];
|
|
25
|
-
if (!n)
|
|
26
|
-
return { headers: [], rows: [] };
|
|
27
|
-
const a = [], c = [];
|
|
28
|
-
return n.getRow(1).eachCell((r) => {
|
|
29
|
-
let o = "";
|
|
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) => {
|
|
32
|
-
if (o > 1) {
|
|
33
|
-
const t = [];
|
|
34
|
-
a.forEach((u, l) => {
|
|
35
|
-
const f = r.getCell(l + 1).value;
|
|
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);
|
|
38
|
-
}
|
|
39
|
-
}), { headers: a, rows: c };
|
|
40
|
-
} catch (e) {
|
|
41
|
-
return console.error("Excel解析失败:", e), { headers: [], rows: [] };
|
|
42
|
-
}
|
|
43
|
-
}, g = async (i, e, s) => {
|
|
44
|
-
try {
|
|
45
|
-
const n = await import("exceljs"), a = new n.default.Workbook(), c = a.addWorksheet("Sheet1"), { headers: r, rows: o } = i;
|
|
46
|
-
if (r.length === 0)
|
|
47
|
-
throw new Error("数据为空");
|
|
48
|
-
const t = /* @__PURE__ */ new Map();
|
|
49
|
-
s != null && s.markCells && s.markCells.forEach(({ row: h, col: w, color: d }) => {
|
|
50
|
-
const y = `${h}-${w}`;
|
|
51
|
-
t.set(y, d || "FFFF0000");
|
|
52
|
-
});
|
|
53
|
-
const u = c.getRow(1);
|
|
54
|
-
r.forEach((h, w) => {
|
|
55
|
-
const d = u.getCell(w + 1);
|
|
56
|
-
d.value = h, d.font = { bold: !0 }, d.fill = {
|
|
57
|
-
type: "pattern",
|
|
58
|
-
pattern: "solid",
|
|
59
|
-
fgColor: { argb: "FFE0E0E0" }
|
|
60
|
-
}, s != null && s.markHeaders && s.markHeaders.includes(h) && (d.fill = {
|
|
61
|
-
type: "pattern",
|
|
62
|
-
pattern: "solid",
|
|
63
|
-
fgColor: { argb: "FFFF0000" }
|
|
64
|
-
}, d.font = {
|
|
65
|
-
name: "Arial",
|
|
66
|
-
size: 10,
|
|
67
|
-
bold: !0,
|
|
68
|
-
color: { argb: "FFFFFFFF" }
|
|
69
|
-
});
|
|
70
|
-
}), o.forEach((h, w) => {
|
|
71
|
-
const d = c.getRow(w + 2);
|
|
72
|
-
h.forEach((y, k) => {
|
|
73
|
-
const F = d.getCell(k + 1);
|
|
74
|
-
F.value = y;
|
|
75
|
-
const C = `${w + 2}-${k + 1}`;
|
|
76
|
-
t.has(C) && (F.fill = {
|
|
77
|
-
type: "pattern",
|
|
78
|
-
pattern: "solid",
|
|
79
|
-
fgColor: { argb: t.get(C) }
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}), c.columns.forEach((h) => {
|
|
83
|
-
h.width = 15;
|
|
84
|
-
});
|
|
85
|
-
const l = await a.xlsx.writeBuffer(), p = new Blob([l], {
|
|
86
|
-
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
87
|
-
});
|
|
88
|
-
return {
|
|
89
|
-
success: !0,
|
|
90
|
-
blobUrl: URL.createObjectURL(p),
|
|
91
|
-
fileName: e.replace(/\.(csv|xlsx?)$/i, ".xlsx")
|
|
92
|
-
};
|
|
93
|
-
} catch (n) {
|
|
94
|
-
return console.error("转换Excel失败:", n), {
|
|
95
|
-
success: !1,
|
|
96
|
-
error: n instanceof Error ? n.message : "未知错误"
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}, P = async (i, e) => {
|
|
100
|
-
try {
|
|
101
|
-
const s = j(i);
|
|
102
|
-
return await g(s, e);
|
|
103
|
-
} catch (s) {
|
|
104
|
-
return {
|
|
105
|
-
success: !1,
|
|
106
|
-
error: s instanceof Error ? s.message : "CSV处理失败"
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}, W = async (i, e) => {
|
|
110
|
-
try {
|
|
111
|
-
const s = new Blob([i], {
|
|
112
|
-
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
113
|
-
});
|
|
114
|
-
return {
|
|
115
|
-
success: !0,
|
|
116
|
-
blobUrl: URL.createObjectURL(s),
|
|
117
|
-
fileName: e
|
|
118
|
-
};
|
|
119
|
-
} catch (s) {
|
|
120
|
-
return {
|
|
121
|
-
success: !1,
|
|
122
|
-
error: s instanceof Error ? s.message : "Excel处理失败"
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}, q = async (i, e) => await g(i, e), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
126
|
-
__proto__: null,
|
|
127
|
-
csvToExcelView: P,
|
|
128
|
-
csvToNormalized: j,
|
|
129
|
-
excelToExcelView: W,
|
|
130
|
-
excelToNormalized: H,
|
|
131
|
-
normalizedToExcelView: q,
|
|
132
|
-
toExcel: g
|
|
133
|
-
}, Symbol.toStringTag, { value: "Module" })), x = async (i) => {
|
|
134
|
-
const e = await H(i);
|
|
135
|
-
if (e.headers.length === 0)
|
|
136
|
-
return m.error("Excel文件不包含工作表"), null;
|
|
137
|
-
const s = [];
|
|
138
|
-
return e.rows.forEach((n) => {
|
|
139
|
-
const a = {};
|
|
140
|
-
e.headers.forEach((c, r) => {
|
|
141
|
-
c && (a[c] = n[r]);
|
|
142
|
-
}), s.push(a);
|
|
143
|
-
}), {
|
|
144
|
-
headers: e.headers,
|
|
145
|
-
excelData: s,
|
|
146
|
-
excelRows: e.rows
|
|
147
|
-
};
|
|
148
|
-
}, J = async (i, e, s) => {
|
|
149
|
-
const n = await x(i);
|
|
150
|
-
if (!n)
|
|
151
|
-
return { success: !1, error: "Excel文件处理失败" };
|
|
152
|
-
const { headers: a, excelRows: c } = n, { markHeaders: r } = e, o = [...a];
|
|
153
|
-
r && r.length > 0 && r.forEach((u) => {
|
|
154
|
-
o.includes(u) || o.push(u);
|
|
155
|
-
});
|
|
156
|
-
const t = c.map((u) => {
|
|
157
|
-
const l = [...u];
|
|
158
|
-
for (; l.length < o.length; )
|
|
159
|
-
l.push(null);
|
|
160
|
-
return l;
|
|
161
|
-
});
|
|
162
|
-
return await g({ headers: o, rows: t }, s, e);
|
|
163
|
-
}, G = async (i, e) => {
|
|
164
|
-
if (!e || T(e))
|
|
165
|
-
return { hasError: !1 };
|
|
166
|
-
const s = await x(i);
|
|
167
|
-
if (!s) return { hasError: !0 };
|
|
168
|
-
const { headers: n, excelData: a } = s, c = [];
|
|
169
|
-
if (Object.keys(e).forEach((t) => {
|
|
170
|
-
n.includes(t) || c.push(t);
|
|
171
|
-
}), n.length === 0 || a.length === 0)
|
|
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 ? {
|
|
177
|
-
hasError: !0,
|
|
178
|
-
markCells: o.map((u) => ({
|
|
179
|
-
row: u.row + 2,
|
|
180
|
-
// 转为Excel行号(+2是因为表头占一行,且是1-based索引)
|
|
181
|
-
col: u.col + 1,
|
|
182
|
-
// 转为Excel列号(+1是因为是1-based索引)
|
|
183
|
-
color: "FFFF0000"
|
|
184
|
-
// 红色
|
|
185
|
-
})),
|
|
186
|
-
markHeaders: c
|
|
187
|
-
} : { hasError: !1 };
|
|
188
|
-
}, Q = async (i, e, s) => {
|
|
189
|
-
const n = [];
|
|
190
|
-
for (let a = 0; a < e.length; a++) {
|
|
191
|
-
const c = e[a];
|
|
192
|
-
try {
|
|
193
|
-
await s.validate(c).catch(({ errors: r }) => {
|
|
194
|
-
const o = [];
|
|
195
|
-
r.forEach((t) => {
|
|
196
|
-
const u = i.indexOf(t.field);
|
|
197
|
-
u >= 0 && (o.some((p) => p.row === a && p.col === u) || o.push({
|
|
198
|
-
row: a,
|
|
199
|
-
col: u,
|
|
200
|
-
header: t.field,
|
|
201
|
-
message: t.message.replace("${label}", i[u])
|
|
202
|
-
}));
|
|
203
|
-
}), n.push(...o);
|
|
204
|
-
});
|
|
205
|
-
} catch (r) {
|
|
206
|
-
console.error("验证表格数据时发生错误:", r), m.error("验证表格数据时发生错误:" + r);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
return n;
|
|
210
|
-
}, X = async (i, e, s) => {
|
|
211
|
-
if (!e || e.length === 0)
|
|
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);
|
|
218
|
-
}), r.length > 0)
|
|
219
|
-
return m.error(`表头缺少重复检测所需字段: ${r.join(", ")}`), { hasError: !0 };
|
|
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("|");
|
|
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);
|
|
226
|
-
}), s) {
|
|
227
|
-
const l = await M(s, {
|
|
228
|
-
Data: u
|
|
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);
|
|
234
|
-
}
|
|
235
|
-
if (t.size > 0) {
|
|
236
|
-
const l = [];
|
|
237
|
-
return t.forEach((p) => {
|
|
238
|
-
e.forEach((f) => {
|
|
239
|
-
const h = a.indexOf(f);
|
|
240
|
-
h >= 0 && l.push({
|
|
241
|
-
row: p + 2,
|
|
242
|
-
// Excel行号 = 数组索引 + 2(表头和1-based索引)
|
|
243
|
-
col: h + 1,
|
|
244
|
-
// Excel列号 = 数组索引 + 1(1-based索引)
|
|
245
|
-
color: "FFA500"
|
|
246
|
-
// 黄橙色
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
}), {
|
|
250
|
-
hasError: !0,
|
|
251
|
-
markCells: l,
|
|
252
|
-
markHeaders: r
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
return { hasError: !1 };
|
|
256
|
-
}, ne = async (i, e, s, n) => {
|
|
257
|
-
const a = [], c = [];
|
|
258
|
-
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);
|
|
262
|
-
f.hasError ? (o = !0, u = "检测到重复数据", f.markCells && f.markCells.forEach((h) => {
|
|
263
|
-
const w = a.find(
|
|
264
|
-
(d) => d.row === h.row && d.col === h.col
|
|
265
|
-
);
|
|
266
|
-
w ? w.color = "8B0000" : a.push(h);
|
|
267
|
-
}), f.markHeaders && c.push(...f.markHeaders)) : u = "重复性检验通过";
|
|
268
|
-
}
|
|
269
|
-
if (r || o) {
|
|
270
|
-
const f = await J(
|
|
271
|
-
i,
|
|
272
|
-
{
|
|
273
|
-
markCells: a,
|
|
274
|
-
markHeaders: c
|
|
275
|
-
},
|
|
276
|
-
"validation_errors.xlsx"
|
|
277
|
-
);
|
|
278
|
-
return f.success && f.blobUrl ? {
|
|
279
|
-
errBlob: await (await fetch(f.blobUrl)).blob(),
|
|
280
|
-
validationMsg: t,
|
|
281
|
-
duplicateMsg: u,
|
|
282
|
-
hasFormatError: r,
|
|
283
|
-
hasDuplicateError: o
|
|
284
|
-
} : {
|
|
285
|
-
validationMsg: t,
|
|
286
|
-
duplicateMsg: u,
|
|
287
|
-
hasFormatError: r,
|
|
288
|
-
hasDuplicateError: o
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
return {
|
|
292
|
-
validationMsg: t,
|
|
293
|
-
duplicateMsg: u,
|
|
294
|
-
hasFormatError: !1,
|
|
295
|
-
hasDuplicateError: !1
|
|
296
|
-
};
|
|
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) {
|
|
302
|
-
m.error("上传的文件不是Excel文件");
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
const { headers: r, excelRows: o, excelData: t } = c;
|
|
306
|
-
s && s.length > 0 ? s.forEach((u) => {
|
|
307
|
-
switch (u) {
|
|
308
|
-
case "Headers":
|
|
309
|
-
e.Headers = r;
|
|
310
|
-
break;
|
|
311
|
-
case "RawRows":
|
|
312
|
-
e.RawRows = o;
|
|
313
|
-
break;
|
|
314
|
-
case "Records":
|
|
315
|
-
e.Records = t;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}) : (e.Headers = r, e.RawRows = o, e.Records = t);
|
|
319
|
-
}
|
|
320
|
-
}, Y = { class: "absolute z-[9999] w-full h-full top-0 flex flex-flow row items-center justify-center" }, le = /* @__PURE__ */ R({
|
|
321
|
-
__name: "index",
|
|
322
|
-
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)
|
|
326
|
-
]));
|
|
327
|
-
}
|
|
328
|
-
}), ie = /* @__PURE__ */ R({
|
|
329
|
-
__name: "index",
|
|
330
|
-
props: {
|
|
331
|
-
icon: {},
|
|
332
|
-
type: { default: "info" },
|
|
333
|
-
showIcon: { type: Boolean, default: !0 },
|
|
334
|
-
message: {}
|
|
335
|
-
},
|
|
336
|
-
setup(i) {
|
|
337
|
-
const e = i, s = {
|
|
338
|
-
success: "#52c41a",
|
|
339
|
-
info: "#1890ff",
|
|
340
|
-
warning: "#faad14",
|
|
341
|
-
error: "#ff4d4f"
|
|
342
|
-
}, n = {
|
|
343
|
-
success: "icon-success-fill",
|
|
344
|
-
info: "icon-info-fill",
|
|
345
|
-
warning: "icon-warn-fill",
|
|
346
|
-
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({
|
|
349
|
-
"show-icon": u.showIcon,
|
|
350
|
-
type: u.type,
|
|
351
|
-
message: u.message
|
|
352
|
-
}, u.$attrs), {
|
|
353
|
-
icon: O(() => [
|
|
354
|
-
(b(), _(K, {
|
|
355
|
-
icon: r.value,
|
|
356
|
-
style: A({ color: c.value }),
|
|
357
|
-
key: t.value
|
|
358
|
-
}, null, 8, ["icon", "style"]))
|
|
359
|
-
]),
|
|
360
|
-
_: 1
|
|
361
|
-
}, 16, ["show-icon", "type", "message"]));
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
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,
|
|
377
|
-
x as p,
|
|
378
|
-
g as t,
|
|
379
|
-
G as v
|
|
380
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
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-BkChvyed.js";
|
|
3
|
-
import { Modal as D, Space as E } from "ant-design-vue";
|
|
4
|
-
import "@skyfox2000/fapi";
|
|
5
|
-
import { P as M, d as P, o as $, b as K } from "./uploadList-BedljASx.js";
|
|
6
|
-
import "@skyfox2000/microbase";
|
|
7
|
-
import "vue-m-message";
|
|
8
|
-
import "async-validator";
|
|
9
|
-
import "dayjs";
|
|
10
|
-
import "vue-draggable-next";
|
|
11
|
-
const U = { class: "overflow-y-auto w-full h-full" }, R = /* @__PURE__ */ F({
|
|
12
|
-
__name: "index",
|
|
13
|
-
props: {
|
|
14
|
-
saveText: {},
|
|
15
|
-
saveAsText: {},
|
|
16
|
-
cancelText: {},
|
|
17
|
-
editorCtrl: {},
|
|
18
|
-
dialogSave: { type: Function },
|
|
19
|
-
dialogSaveAs: { type: Function },
|
|
20
|
-
width: {},
|
|
21
|
-
full: { type: Boolean },
|
|
22
|
-
open: { type: Boolean }
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:open"],
|
|
25
|
-
setup(C, { emit: T }) {
|
|
26
|
-
const l = C, e = l.editorCtrl;
|
|
27
|
-
_(M.EditorControl, e);
|
|
28
|
-
const t = w(l.open ?? !1), A = T, h = w(l.width ?? 430);
|
|
29
|
-
p(
|
|
30
|
-
() => e == null ? void 0 : e.visible.value,
|
|
31
|
-
(o) => {
|
|
32
|
-
t.value = o ?? !1;
|
|
33
|
-
}
|
|
34
|
-
), p(
|
|
35
|
-
() => l.open,
|
|
36
|
-
(o) => {
|
|
37
|
-
t.value = o;
|
|
38
|
-
}
|
|
39
|
-
), p(
|
|
40
|
-
() => t.value,
|
|
41
|
-
(o) => {
|
|
42
|
-
A("update:open", o), o || f();
|
|
43
|
-
}
|
|
44
|
-
), B(() => {
|
|
45
|
-
t.value = (e == null ? void 0 : e.visible.value) ?? !1;
|
|
46
|
-
});
|
|
47
|
-
const k = () => {
|
|
48
|
-
l.dialogSave ? l.dialogSave() : e && $(e);
|
|
49
|
-
}, x = () => {
|
|
50
|
-
l.dialogSaveAs ? l.dialogSaveAs() : e && K(e);
|
|
51
|
-
}, f = () => {
|
|
52
|
-
e ? P(e) : t.value = !1;
|
|
53
|
-
};
|
|
54
|
-
return (o, c) => (r(), n(a(D), {
|
|
55
|
-
open: t.value,
|
|
56
|
-
"onUpdate:open": c[0] || (c[0] = (s) => t.value = s),
|
|
57
|
-
wrapClassName: "modal mx-auto min-w-[430px] " + (o.full ? "full-modal w-full" : ""),
|
|
58
|
-
width: h.value
|
|
59
|
-
}, {
|
|
60
|
-
footer: i(() => [
|
|
61
|
-
V(a(E), null, {
|
|
62
|
-
default: i(() => {
|
|
63
|
-
var s, g, S, y;
|
|
64
|
-
return [
|
|
65
|
-
o.cancelText !== "" ? (r(), n(a(m), {
|
|
66
|
-
key: 0,
|
|
67
|
-
onClick: f
|
|
68
|
-
}, {
|
|
69
|
-
default: i(() => [
|
|
70
|
-
u(v(o.cancelText ?? "取消"), 1)
|
|
71
|
-
]),
|
|
72
|
-
_: 1
|
|
73
|
-
})) : d("", !0),
|
|
74
|
-
o.saveAsText !== "" && ((s = a(e)) == null ? void 0 : s.saveAsBtnVisible) !== !1 ? (r(), n(a(m), {
|
|
75
|
-
key: 1,
|
|
76
|
-
onClick: x,
|
|
77
|
-
type: "primary",
|
|
78
|
-
loading: (g = a(e)) == null ? void 0 : g.isFormSaving.value
|
|
79
|
-
}, {
|
|
80
|
-
default: i(() => [
|
|
81
|
-
u(v(o.saveAsText ?? "另存为"), 1)
|
|
82
|
-
]),
|
|
83
|
-
_: 1
|
|
84
|
-
}, 8, ["loading"])) : d("", !0),
|
|
85
|
-
o.saveText !== "" && ((S = a(e)) == null ? void 0 : S.saveBtnVisible) !== !1 ? (r(), n(a(m), {
|
|
86
|
-
key: 2,
|
|
87
|
-
onClick: k,
|
|
88
|
-
type: "primary",
|
|
89
|
-
loading: (y = a(e)) == null ? void 0 : y.isFormSaving.value
|
|
90
|
-
}, {
|
|
91
|
-
default: i(() => [
|
|
92
|
-
u(v(o.saveText ?? "保存"), 1)
|
|
93
|
-
]),
|
|
94
|
-
_: 1
|
|
95
|
-
}, 8, ["loading"])) : d("", !0)
|
|
96
|
-
];
|
|
97
|
-
}),
|
|
98
|
-
_: 1
|
|
99
|
-
})
|
|
100
|
-
]),
|
|
101
|
-
default: i(() => [
|
|
102
|
-
N("div", U, [
|
|
103
|
-
b(o.$slots, "default")
|
|
104
|
-
])
|
|
105
|
-
]),
|
|
106
|
-
_: 3
|
|
107
|
-
}, 8, ["open", "wrapClassName", "width"]));
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
export {
|
|
111
|
-
R as _
|
|
112
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
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
|
-
import { Button as _ } from "ant-design-vue";
|
|
3
|
-
import { a as P, _ as k } from "./toolIcon-XOgjdQdO.js";
|
|
4
|
-
const C = /* @__PURE__ */ d({
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "index",
|
|
7
|
-
props: {
|
|
8
|
-
/**
|
|
9
|
-
* 提示标题
|
|
10
|
-
* @props
|
|
11
|
-
* @name content
|
|
12
|
-
* @type {string}
|
|
13
|
-
*/
|
|
14
|
-
tiptext: String,
|
|
15
|
-
/**
|
|
16
|
-
* 提示显示位置
|
|
17
|
-
* @props
|
|
18
|
-
* @name placement
|
|
19
|
-
* @type {string}
|
|
20
|
-
* @default 'top'
|
|
21
|
-
*/
|
|
22
|
-
placement: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: "top"
|
|
25
|
-
},
|
|
26
|
-
/**
|
|
27
|
-
* 内置图标属性设置
|
|
28
|
-
* @props
|
|
29
|
-
* @name iconProps
|
|
30
|
-
* @type {object}
|
|
31
|
-
* @summary 内置图标复杂属性设置,仅支持前置图标
|
|
32
|
-
*/
|
|
33
|
-
iconProps: Object,
|
|
34
|
-
/**
|
|
35
|
-
* 默认使用框架图标
|
|
36
|
-
* 其它图标请自定义
|
|
37
|
-
* @props
|
|
38
|
-
* @name icon
|
|
39
|
-
* @type {string}
|
|
40
|
-
*/
|
|
41
|
-
icon: String
|
|
42
|
-
// /**
|
|
43
|
-
// * 点击事件
|
|
44
|
-
// * @props
|
|
45
|
-
// * @name clickEvent
|
|
46
|
-
// * @summary 格式 "空间名#事件名",空间名和事件名用#分隔,事件名用.分隔
|
|
47
|
-
// * @type {string}
|
|
48
|
-
// */
|
|
49
|
-
// clickEvent: {
|
|
50
|
-
// type: String
|
|
51
|
-
// },
|
|
52
|
-
// /**
|
|
53
|
-
// * 点击传输数据
|
|
54
|
-
// * @props
|
|
55
|
-
// * @name data
|
|
56
|
-
// * @summary 点击事件传输的默认数据
|
|
57
|
-
// * @type {object|string}
|
|
58
|
-
// */
|
|
59
|
-
// data: {
|
|
60
|
-
// type: [Object, String]
|
|
61
|
-
// }
|
|
62
|
-
},
|
|
63
|
-
emits: [
|
|
64
|
-
/**
|
|
65
|
-
* 点击事件
|
|
66
|
-
* @emits
|
|
67
|
-
* @name click
|
|
68
|
-
* @summary 图标按钮点击时触发的事件
|
|
69
|
-
*/
|
|
70
|
-
"click"
|
|
71
|
-
],
|
|
72
|
-
setup(i, { emit: l }) {
|
|
73
|
-
const c = f(), t = i, a = l, m = () => {
|
|
74
|
-
t.iconProps && t.iconProps.icons && (t.iconProps.iconIndex = (t.iconProps.iconIndex + 1) % t.iconProps.icons.length), a("click");
|
|
75
|
-
};
|
|
76
|
-
return (s, b) => (x(), u("div", null, [
|
|
77
|
-
e(P, {
|
|
78
|
-
title: t.tiptext,
|
|
79
|
-
disabled: t.tiptext ? void 0 : "disabled",
|
|
80
|
-
placement: i.placement
|
|
81
|
-
}, {
|
|
82
|
-
default: n(() => [
|
|
83
|
-
e(o(_), r({ class: "px-[10px] py-[4px] flex items-center gap-1" }, o(c), { onClick: m }), {
|
|
84
|
-
icon: n(() => [
|
|
85
|
-
p(s.$slots, "icon", {}, () => [
|
|
86
|
-
e(k, r({
|
|
87
|
-
icon: t.icon,
|
|
88
|
-
class: [
|
|
89
|
-
o(c).type === "primary" ? "ant-btn-primary" : "",
|
|
90
|
-
"cursor-pointer w-[17px] h-[17px] mx-auto"
|
|
91
|
-
],
|
|
92
|
-
clickable: ""
|
|
93
|
-
}, t.iconProps), null, 16, ["icon", "class"])
|
|
94
|
-
])
|
|
95
|
-
]),
|
|
96
|
-
default: n(() => [
|
|
97
|
-
p(s.$slots, "default")
|
|
98
|
-
]),
|
|
99
|
-
_: 3
|
|
100
|
-
}, 16)
|
|
101
|
-
]),
|
|
102
|
-
_: 3
|
|
103
|
-
}, 8, ["title", "disabled", "placement"])
|
|
104
|
-
]));
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
export {
|
|
108
|
-
C as _
|
|
109
|
-
};
|