yc-pro-components 0.0.44 → 0.0.46

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 (80) hide show
  1. package/es/components/display-item/src/index.vue2.mjs +16 -3
  2. package/es/components/index.d.ts +1 -0
  3. package/es/components/index.mjs +2 -0
  4. package/es/components/yc-batch-import-dialog/index.d.ts +167 -0
  5. package/es/components/yc-batch-import-dialog/index.mjs +13 -0
  6. package/es/components/yc-batch-import-dialog/src/UploadRecordList.vue.d.ts +45 -0
  7. package/es/components/yc-batch-import-dialog/src/UploadRecordList.vue.mjs +6 -0
  8. package/es/components/yc-batch-import-dialog/src/UploadRecordList.vue2.mjs +186 -0
  9. package/es/components/yc-batch-import-dialog/src/index.vue.d.ts +73 -0
  10. package/es/components/yc-batch-import-dialog/src/index.vue.mjs +6 -0
  11. package/es/components/yc-batch-import-dialog/src/index.vue2.mjs +579 -0
  12. package/es/components/yc-batch-import-dialog/src/types.d.ts +159 -0
  13. package/es/components/yc-batch-import-dialog/src/types.mjs +1 -0
  14. package/es/components/yc-drawer/src/index.vue.mjs +1 -1
  15. package/es/components/yc-drawer/src/index.vue2.mjs +37 -10
  16. package/es/components/yc-drawer/src/type.d.ts +17 -0
  17. package/es/components/yc-drawer/store.d.ts +6 -0
  18. package/es/components/yc-plus-page/src/index.vue.d.ts +210 -26
  19. package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
  20. package/es/components/yc-plus-page/src/index.vue2.mjs +96 -8
  21. package/es/components/yc-plus-page/src/type.d.ts +12 -0
  22. package/es/dict/createDictStore.d.ts +1 -1
  23. package/es/index.css +13 -11
  24. package/es/index.mjs +2 -0
  25. package/index.css +291 -12
  26. package/index.js +1215 -325
  27. package/index.min.css +5 -3
  28. package/index.min.js +11 -11
  29. package/index.min.mjs +11 -11
  30. package/index.mjs +1215 -328
  31. package/lib/components/display-item/src/index.vue2.js +16 -3
  32. package/lib/components/index.d.ts +1 -0
  33. package/lib/components/index.js +5 -0
  34. package/lib/components/yc-batch-import-dialog/index.d.ts +167 -0
  35. package/lib/components/yc-batch-import-dialog/index.js +20 -0
  36. package/lib/components/yc-batch-import-dialog/src/UploadRecordList.vue.d.ts +45 -0
  37. package/lib/components/yc-batch-import-dialog/src/UploadRecordList.vue.js +10 -0
  38. package/lib/components/yc-batch-import-dialog/src/UploadRecordList.vue2.js +190 -0
  39. package/lib/components/yc-batch-import-dialog/src/index.vue.d.ts +73 -0
  40. package/lib/components/yc-batch-import-dialog/src/index.vue.js +10 -0
  41. package/lib/components/yc-batch-import-dialog/src/index.vue2.js +583 -0
  42. package/lib/components/yc-batch-import-dialog/src/types.d.ts +159 -0
  43. package/lib/components/yc-batch-import-dialog/src/types.js +2 -0
  44. package/lib/components/yc-drawer/src/index.vue.js +1 -1
  45. package/lib/components/yc-drawer/src/index.vue2.js +36 -9
  46. package/lib/components/yc-drawer/src/type.d.ts +17 -0
  47. package/lib/components/yc-drawer/store.d.ts +6 -0
  48. package/lib/components/yc-plus-page/src/index.vue.d.ts +210 -26
  49. package/lib/components/yc-plus-page/src/index.vue.js +1 -1
  50. package/lib/components/yc-plus-page/src/index.vue2.js +95 -7
  51. package/lib/components/yc-plus-page/src/type.d.ts +12 -0
  52. package/lib/dict/createDictStore.d.ts +1 -1
  53. package/lib/index.css +12 -10
  54. package/lib/index.js +5 -0
  55. package/locale/en.js +1 -1
  56. package/locale/en.min.js +1 -1
  57. package/locale/en.min.mjs +1 -1
  58. package/locale/en.mjs +1 -1
  59. package/locale/ja.js +1 -1
  60. package/locale/ja.min.js +1 -1
  61. package/locale/ja.min.mjs +1 -1
  62. package/locale/ja.mjs +1 -1
  63. package/locale/ko.js +1 -1
  64. package/locale/ko.min.js +1 -1
  65. package/locale/ko.min.mjs +1 -1
  66. package/locale/ko.mjs +1 -1
  67. package/locale/zh-cn.js +1 -1
  68. package/locale/zh-cn.min.js +1 -1
  69. package/locale/zh-cn.min.mjs +1 -1
  70. package/locale/zh-cn.mjs +1 -1
  71. package/locale/zh-tw.js +1 -1
  72. package/locale/zh-tw.min.js +1 -1
  73. package/locale/zh-tw.min.mjs +1 -1
  74. package/locale/zh-tw.mjs +1 -1
  75. package/package.json +1 -1
  76. package/theme-chalk/index.css +1 -1
  77. package/theme-chalk/plus-table.css +1 -1
  78. package/theme-chalk/plus-yc-plus-page.css +1 -1
  79. package/theme-chalk/src/table.scss +5 -0
  80. package/theme-chalk/src/yc-plus-page.scss +46 -0
@@ -0,0 +1,579 @@
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createCommentVNode, createElementBlock, toDisplayString, createVNode, createTextVNode, Fragment, pushScopeId, popScopeId } from 'vue';
2
+ import { YcDialog } from '../../yc-dialog/index.mjs';
3
+ import { ElUpload, ElMessage } from 'element-plus';
4
+ import { Loading } from '@element-plus/icons-vue';
5
+ import UploadRecordList from './UploadRecordList.vue.mjs';
6
+
7
+ const _withScopeId = (n) => (pushScopeId("data-v-338bd60b"), n = n(), popScopeId(), n);
8
+ const _hoisted_1 = { class: "batch-import" };
9
+ const _hoisted_2 = {
10
+ key: 0,
11
+ class: "step-container"
12
+ };
13
+ const _hoisted_3 = { class: "step-content" };
14
+ const _hoisted_4 = { class: "step-title" };
15
+ const _hoisted_5 = { class: "step-notice" };
16
+ const _hoisted_6 = { class: "ml-2" };
17
+ const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
18
+ "div",
19
+ { class: "required-tip" },
20
+ "\u6CE8\u610F\uFF01\u6A21\u677F\u4E2D\u7EA2\u8272\u8868\u5934\u90E8\u5206\u4E3A\u5FC5\u586B\u9879\uFF01",
21
+ -1
22
+ /* HOISTED */
23
+ ));
24
+ const _hoisted_8 = {
25
+ key: 1,
26
+ class: "step-container"
27
+ };
28
+ const _hoisted_9 = { class: "step-content" };
29
+ const _hoisted_10 = { class: "step-title" };
30
+ const _hoisted_11 = { class: "upload-area" };
31
+ const _hoisted_12 = {
32
+ key: 0,
33
+ class: "upload-zone"
34
+ };
35
+ const _hoisted_13 = { class: "upload-tip" };
36
+ const _hoisted_14 = { class: "upload-zone uploaded" };
37
+ const _hoisted_15 = { class: "file-name" };
38
+ const _hoisted_16 = {
39
+ key: 3,
40
+ class: "import-status-zone"
41
+ };
42
+ const _hoisted_17 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
43
+ "div",
44
+ { class: "status-text" },
45
+ "\u6B63\u5728\u5BFC\u5165\u4E2D\u2026",
46
+ -1
47
+ /* HOISTED */
48
+ ));
49
+ const _hoisted_18 = {
50
+ key: 4,
51
+ class: "import-status-zone"
52
+ };
53
+ const _hoisted_19 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
54
+ "div",
55
+ { class: "status-text" },
56
+ "\u5BFC\u5165\u6210\u529F",
57
+ -1
58
+ /* HOISTED */
59
+ ));
60
+ const _hoisted_20 = { class: "file-info" };
61
+ const _hoisted_21 = { class: "file-name" };
62
+ const _hoisted_22 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
63
+ "span",
64
+ { class: "separator" },
65
+ "\uFF5C",
66
+ -1
67
+ /* HOISTED */
68
+ ));
69
+ const _hoisted_23 = {
70
+ key: 5,
71
+ class: "import-status-zone"
72
+ };
73
+ const _hoisted_24 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
74
+ "div",
75
+ { class: "status-text" },
76
+ "\u5BFC\u5165\u5931\u8D25",
77
+ -1
78
+ /* HOISTED */
79
+ ));
80
+ const _hoisted_25 = { class: "file-info" };
81
+ const _hoisted_26 = { class: "file-name" };
82
+ const _hoisted_27 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
83
+ "span",
84
+ { class: "separator" },
85
+ "\uFF5C",
86
+ -1
87
+ /* HOISTED */
88
+ ));
89
+ var _sfc_main = /* @__PURE__ */ defineComponent({
90
+ ...{
91
+ name: "YcBatchImportDialog"
92
+ },
93
+ __name: "index",
94
+ props: {
95
+ title: { default: "\u6279\u91CF\u5BFC\u5165" },
96
+ width: { default: 520 },
97
+ iconBaseUrl: { default: "" },
98
+ stepOneTitle: { default: "\u7B2C\u4E00\u6B65\uFF1A\u8BF7\u4E25\u683C\u6309\u7167\u5BFC\u5165\u6A21\u677F\u586B\u5199\u5185\u5BB9\u540E\u5BFC\u5165\uFF0C\u5426\u5219\u5C06\u65B0\u589E\u5931\u8D25\uFF01" },
99
+ tips: { default: "\u6CE8\u610F\uFF1A\u5355\u6B21\u5BFC\u5165\u6570\u636E\u4E0D\u5F97\u8D85\u8FC75000\u6761\uFF0C\u5426\u5219\u5BFC\u5165\u53EF\u80FD\u5931\u8D25!" },
100
+ templateUrl: {},
101
+ templateFileName: {},
102
+ resultFileName: { default: "\u5BFC\u5165\u7ED3\u679C" },
103
+ templateButtonText: { default: "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F" },
104
+ onDownloadTemplate: {},
105
+ stepTwoTitle: { default: "\u7B2C\u4E8C\u6B65\uFF1A\u9009\u62E9\u6A21\u677F\u6587\u4EF6\u5E76\u5F00\u59CB\u5BFC\u5165" },
106
+ accept: { default: ".xls,.xlsx" },
107
+ maxFileSize: { default: 10 },
108
+ maxRowCount: { default: 5e3 },
109
+ importApi: {},
110
+ extraFormData: {},
111
+ responseType: { default: "blob" }
112
+ },
113
+ emits: ["success", "error", "close"],
114
+ setup(__props, { expose: __expose, emit: __emit }) {
115
+ const props = __props;
116
+ const emit = __emit;
117
+ const visible = ref(false);
118
+ const importStatus = ref("initial");
119
+ const uploadedFile = ref(null);
120
+ const errorMessage = ref("");
121
+ const importResult = ref(null);
122
+ const uploadRecords = ref([]);
123
+ const importIconUrl = computed(
124
+ () => props.iconBaseUrl ? `${props.iconBaseUrl}import.svg` : ""
125
+ );
126
+ const excelIconUrl = computed(
127
+ () => props.iconBaseUrl ? `${props.iconBaseUrl}excel.svg` : ""
128
+ );
129
+ const importSuccessIconUrl = computed(
130
+ () => props.iconBaseUrl ? `${props.iconBaseUrl}import_success.svg` : ""
131
+ );
132
+ const importErrorIconUrl = computed(
133
+ () => props.iconBaseUrl ? `${props.iconBaseUrl}import_error.svg` : ""
134
+ );
135
+ const dynamicTips = computed(() => {
136
+ if (props.tips) return props.tips;
137
+ return `\u6CE8\u610F\uFF1A\u5355\u6B21\u5BFC\u5165\u6570\u636E\u4E0D\u5F97\u8D85\u8FC7${props.maxRowCount}\u6761\uFF0C\u5426\u5219\u5BFC\u5165\u53EF\u80FD\u5931\u8D25!`;
138
+ });
139
+ const uploadTip = computed(() => {
140
+ const fileTypes = props.accept.split(",").map((t) => t.replace(".", "").toUpperCase()).join("/");
141
+ return `${fileTypes}\u6587\u4EF6\u5927\u5C0F\u4E0D\u5F97\u8D85\u8FC7${props.maxFileSize}M`;
142
+ });
143
+ const open = (type) => {
144
+ visible.value = true;
145
+ resetState();
146
+ };
147
+ const close = () => {
148
+ visible.value = false;
149
+ };
150
+ const resetState = () => {
151
+ importStatus.value = "initial";
152
+ uploadedFile.value = null;
153
+ errorMessage.value = "";
154
+ importResult.value = null;
155
+ uploadRecords.value = [];
156
+ };
157
+ const handleDownloadTemplate = async () => {
158
+ if (props.onDownloadTemplate) {
159
+ await props.onDownloadTemplate();
160
+ return;
161
+ }
162
+ if (props.templateUrl) {
163
+ try {
164
+ const response = await fetch(props.templateUrl);
165
+ if (!response.ok) {
166
+ throw new Error(`\u4E0B\u8F7D\u5931\u8D25: ${response.status}`);
167
+ }
168
+ const blob = await response.blob();
169
+ const url = window.URL.createObjectURL(blob);
170
+ const link = document.createElement("a");
171
+ link.href = url;
172
+ const fileName = props.templateFileName || props.templateUrl.split("/").pop() || "";
173
+ link.setAttribute("download", fileName);
174
+ document.body.appendChild(link);
175
+ link.click();
176
+ document.body.removeChild(link);
177
+ window.URL.revokeObjectURL(url);
178
+ ElMessage.success("\u6A21\u677F\u4E0B\u8F7D\u6210\u529F");
179
+ } catch (error) {
180
+ console.error("\u4E0B\u8F7D\u6A21\u677F\u5931\u8D25:", error);
181
+ }
182
+ return;
183
+ }
184
+ ElMessage.warning("\u672A\u914D\u7F6E\u6A21\u677F\u4E0B\u8F7D\u5730\u5740");
185
+ };
186
+ const beforeUpload = (file) => {
187
+ var _a;
188
+ const acceptTypes = props.accept.split(",").map((t) => t.trim().toLowerCase());
189
+ const fileExt = "." + ((_a = file.name.split(".").pop()) == null ? void 0 : _a.toLowerCase());
190
+ const isValidType = acceptTypes.includes(fileExt);
191
+ if (!isValidType) {
192
+ const typeNames = acceptTypes.map((t) => t.replace(".", "")).join(" \u6216 ");
193
+ ElMessage.error(`\u53EA\u80FD\u4E0A\u4F20 ${typeNames} \u683C\u5F0F\u7684\u6587\u4EF6`);
194
+ return false;
195
+ }
196
+ const isValidSize = file.size / 1024 / 1024 < props.maxFileSize;
197
+ if (!isValidSize) {
198
+ ElMessage.error(`\u6587\u4EF6\u5927\u5C0F\u4E0D\u5F97\u8D85\u8FC7 ${props.maxFileSize}M`);
199
+ return false;
200
+ }
201
+ return true;
202
+ };
203
+ const handleFileChange = (file) => {
204
+ if (file.status === "ready") {
205
+ uploadedFile.value = file;
206
+ importStatus.value = "uploaded";
207
+ const recordId = crypto.randomUUID();
208
+ const record = {
209
+ id: recordId,
210
+ name: file.name,
211
+ size: file.size || 0,
212
+ progress: 100,
213
+ status: "completed"
214
+ };
215
+ uploadRecords.value.push(record);
216
+ }
217
+ };
218
+ const handleReupload = () => {
219
+ importStatus.value = "initial";
220
+ uploadedFile.value = null;
221
+ errorMessage.value = "";
222
+ importResult.value = null;
223
+ };
224
+ const downloadFile = (blob, originalFileName) => {
225
+ const url = window.URL.createObjectURL(blob);
226
+ const link = document.createElement("a");
227
+ link.href = url;
228
+ const baseFileName = props.resultFileName || "\u5BFC\u5165\u7ED3\u679C";
229
+ const fileExt = (originalFileName == null ? void 0 : originalFileName.split(".").pop()) || "xlsx";
230
+ const downloadFileName = `${baseFileName}_${Date.now()}.${fileExt}`;
231
+ link.setAttribute("download", downloadFileName);
232
+ document.body.appendChild(link);
233
+ link.click();
234
+ document.body.removeChild(link);
235
+ window.URL.revokeObjectURL(url);
236
+ };
237
+ const handleStartImport = async () => {
238
+ if (!uploadedFile.value) {
239
+ ElMessage.warning("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6");
240
+ return;
241
+ }
242
+ try {
243
+ importStatus.value = "importing";
244
+ const formData = new FormData();
245
+ formData.append("file", uploadedFile.value.raw);
246
+ if (props.extraFormData) {
247
+ Object.entries(props.extraFormData).forEach(([key, value]) => {
248
+ formData.append(key, value);
249
+ });
250
+ }
251
+ const result = await props.importApi(formData);
252
+ if (props.responseType === "blob" && result instanceof Blob) {
253
+ importResult.value = result;
254
+ downloadFile(result, uploadedFile.value.name);
255
+ importStatus.value = "success";
256
+ ElMessage.success("\u5BFC\u5165\u6210\u529F");
257
+ emit("success", result);
258
+ return;
259
+ }
260
+ const response = result;
261
+ const data = (response == null ? void 0 : response.data) || response;
262
+ if ((data == null ? void 0 : data.success) === false) {
263
+ importStatus.value = "error";
264
+ errorMessage.value = data.message || "\u90E8\u5206\u6570\u636E\u5BFC\u5165\u5931\u8D25";
265
+ if (data.errorFileBase64) {
266
+ importResult.value = data.errorFileBase64;
267
+ }
268
+ ElMessage.error(errorMessage.value);
269
+ emit("error", new Error(errorMessage.value));
270
+ return;
271
+ }
272
+ importStatus.value = "success";
273
+ ElMessage.success("\u5BFC\u5165\u6210\u529F");
274
+ emit("success", result);
275
+ } catch (error) {
276
+ importStatus.value = "error";
277
+ const err = error instanceof Error ? error : new Error(String(error));
278
+ errorMessage.value = err.message || "\u5BFC\u5165\u5931\u8D25";
279
+ emit("error", err);
280
+ }
281
+ };
282
+ const base64ToBlob = (base64, mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") => {
283
+ const byteCharacters = atob(base64);
284
+ const byteNumbers = new Array(byteCharacters.length);
285
+ for (let i = 0; i < byteCharacters.length; i++) {
286
+ byteNumbers[i] = byteCharacters.charCodeAt(i);
287
+ }
288
+ const byteArray = new Uint8Array(byteNumbers);
289
+ return new Blob([byteArray], { type: mimeType });
290
+ };
291
+ const handleDownloadResult = () => {
292
+ var _a, _b;
293
+ if (!importResult.value) {
294
+ ElMessage.warning("\u6682\u65E0\u5BFC\u5165\u7ED3\u679C\u53EF\u4E0B\u8F7D");
295
+ return;
296
+ }
297
+ if (typeof importResult.value === "string") {
298
+ const blob = base64ToBlob(importResult.value);
299
+ downloadFile(blob, (_a = uploadedFile.value) == null ? void 0 : _a.name);
300
+ return;
301
+ }
302
+ downloadFile(importResult.value, (_b = uploadedFile.value) == null ? void 0 : _b.name);
303
+ };
304
+ const handleConfirm = async () => {
305
+ if (importStatus.value === "success") {
306
+ visible.value = false;
307
+ emit("close");
308
+ } else if (importStatus.value === "uploaded") {
309
+ await handleStartImport();
310
+ } else if (importStatus.value === "initial") {
311
+ ElMessage.warning("\u8BF7\u5148\u4E0A\u4F20\u6587\u4EF6");
312
+ }
313
+ };
314
+ const handleCancel = () => {
315
+ visible.value = false;
316
+ emit("close");
317
+ };
318
+ const handlePauseUpload = (_id) => {
319
+ };
320
+ const handleResumeUpload = (_id) => {
321
+ };
322
+ const handleCancelUpload = (id) => {
323
+ const record = uploadRecords.value.find((r) => r.id === id);
324
+ if (record && uploadedFile.value && record.name === uploadedFile.value.name) {
325
+ importStatus.value = "initial";
326
+ uploadedFile.value = null;
327
+ errorMessage.value = "";
328
+ importResult.value = null;
329
+ }
330
+ const index = uploadRecords.value.findIndex((r) => r.id === id);
331
+ if (index !== -1) {
332
+ uploadRecords.value.splice(index, 1);
333
+ }
334
+ };
335
+ __expose({
336
+ open,
337
+ close,
338
+ reset: resetState
339
+ });
340
+ return (_ctx, _cache) => {
341
+ const _component_YcSvgIcon = resolveComponent("YcSvgIcon");
342
+ const _component_el_button = resolveComponent("el-button");
343
+ const _component_el_icon = resolveComponent("el-icon");
344
+ return openBlock(), createBlock(unref(YcDialog), {
345
+ modelValue: visible.value,
346
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
347
+ title: _ctx.title,
348
+ width: _ctx.width,
349
+ "show-header-border": "",
350
+ onConfirm: handleConfirm,
351
+ onCancel: handleCancel
352
+ }, {
353
+ default: withCtx(() => {
354
+ var _a, _b, _c;
355
+ return [
356
+ createElementVNode("div", _hoisted_1, [
357
+ createCommentVNode(" \u7B2C\u4E00\u6B65\uFF1A\u4E0B\u8F7D\u6A21\u677F\uFF08\u4EC5\u5728\u521D\u59CB\u548C\u5DF2\u4E0A\u4F20\u72B6\u6001\u663E\u793A\uFF09 "),
358
+ importStatus.value === "initial" || importStatus.value === "uploaded" ? (openBlock(), createElementBlock("div", _hoisted_2, [
359
+ createElementVNode("div", _hoisted_3, [
360
+ createElementVNode(
361
+ "div",
362
+ _hoisted_4,
363
+ toDisplayString(_ctx.stepOneTitle),
364
+ 1
365
+ /* TEXT */
366
+ ),
367
+ createElementVNode(
368
+ "div",
369
+ _hoisted_5,
370
+ toDisplayString(dynamicTips.value),
371
+ 1
372
+ /* TEXT */
373
+ ),
374
+ createVNode(_component_el_button, {
375
+ class: "download-btn",
376
+ onClick: handleDownloadTemplate
377
+ }, {
378
+ default: withCtx(() => [
379
+ createVNode(_component_YcSvgIcon, {
380
+ src: importIconUrl.value,
381
+ size: 16
382
+ }, null, 8, ["src"]),
383
+ createElementVNode(
384
+ "span",
385
+ _hoisted_6,
386
+ toDisplayString(_ctx.templateButtonText),
387
+ 1
388
+ /* TEXT */
389
+ )
390
+ ]),
391
+ _: 1
392
+ /* STABLE */
393
+ }),
394
+ _hoisted_7
395
+ ])
396
+ ])) : createCommentVNode("v-if", true),
397
+ createCommentVNode(" \u7B2C\u4E8C\u6B65\uFF1A\u4E0A\u4F20\u6587\u4EF6\uFF08\u4EC5\u5728\u521D\u59CB\u548C\u5DF2\u4E0A\u4F20\u72B6\u6001\u663E\u793A\uFF09 "),
398
+ importStatus.value === "initial" || importStatus.value === "uploaded" ? (openBlock(), createElementBlock("div", _hoisted_8, [
399
+ createElementVNode("div", _hoisted_9, [
400
+ createElementVNode(
401
+ "div",
402
+ _hoisted_10,
403
+ toDisplayString(_ctx.stepTwoTitle),
404
+ 1
405
+ /* TEXT */
406
+ ),
407
+ createCommentVNode(" \u4E0A\u4F20\u533A\u57DF "),
408
+ createElementVNode("div", _hoisted_11, [
409
+ createCommentVNode(" \u521D\u59CB\u72B6\u6001\uFF1A\u663E\u793A\u4E0A\u4F20\u533A\u57DF "),
410
+ importStatus.value === "initial" ? (openBlock(), createElementBlock("div", _hoisted_12, [
411
+ createVNode(_component_YcSvgIcon, {
412
+ src: excelIconUrl.value,
413
+ size: 48,
414
+ "preserve-color": true,
415
+ class: "excel-icon"
416
+ }, null, 8, ["src"]),
417
+ createVNode(unref(ElUpload), {
418
+ "auto-upload": false,
419
+ "show-file-list": false,
420
+ "before-upload": beforeUpload,
421
+ "on-change": handleFileChange,
422
+ accept: _ctx.accept
423
+ }, {
424
+ default: withCtx(() => [
425
+ createVNode(_component_el_button, { class: "select-file-btn" }, {
426
+ default: withCtx(() => [
427
+ createTextVNode("\u9009\u62E9\u6587\u4EF6")
428
+ ]),
429
+ _: 1
430
+ /* STABLE */
431
+ })
432
+ ]),
433
+ _: 1
434
+ /* STABLE */
435
+ }, 8, ["accept"]),
436
+ createElementVNode(
437
+ "div",
438
+ _hoisted_13,
439
+ toDisplayString(uploadTip.value),
440
+ 1
441
+ /* TEXT */
442
+ )
443
+ ])) : (openBlock(), createElementBlock(
444
+ Fragment,
445
+ { key: 1 },
446
+ [
447
+ createCommentVNode(" \u5DF2\u4E0A\u4F20\u6587\u4EF6\u72B6\u6001 "),
448
+ createElementVNode("div", _hoisted_14, [
449
+ createVNode(_component_YcSvgIcon, {
450
+ src: excelIconUrl.value,
451
+ size: 48,
452
+ "preserve-color": true,
453
+ class: "excel-icon"
454
+ }, null, 8, ["src"]),
455
+ createElementVNode(
456
+ "div",
457
+ _hoisted_15,
458
+ toDisplayString((_a = uploadedFile.value) == null ? void 0 : _a.name),
459
+ 1
460
+ /* TEXT */
461
+ ),
462
+ createElementVNode("div", {
463
+ class: "reupload-link",
464
+ onClick: handleReupload
465
+ }, "\u91CD\u65B0\u4E0A\u4F20")
466
+ ])
467
+ ],
468
+ 2112
469
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
470
+ ))
471
+ ])
472
+ ])
473
+ ])) : createCommentVNode("v-if", true),
474
+ createCommentVNode(" \u4E0A\u4F20\u8BB0\u5F55\u6A21\u5757\uFF08\u4EC5\u5728\u521D\u59CB\u548C\u5DF2\u4E0A\u4F20\u72B6\u6001\u663E\u793A\uFF09 "),
475
+ importStatus.value === "initial" || importStatus.value === "uploaded" ? (openBlock(), createBlock(UploadRecordList, {
476
+ key: 2,
477
+ records: uploadRecords.value,
478
+ "icon-base-url": _ctx.iconBaseUrl,
479
+ onPause: handlePauseUpload,
480
+ onResume: handleResumeUpload,
481
+ onCancel: handleCancelUpload
482
+ }, null, 8, ["records", "icon-base-url"])) : createCommentVNode("v-if", true),
483
+ createCommentVNode(" \u5BFC\u5165\u4E2D\u72B6\u6001 "),
484
+ importStatus.value === "importing" ? (openBlock(), createElementBlock("div", _hoisted_16, [
485
+ createVNode(_component_el_icon, {
486
+ class: "loading-icon",
487
+ size: 44
488
+ }, {
489
+ default: withCtx(() => [
490
+ createVNode(unref(Loading))
491
+ ]),
492
+ _: 1
493
+ /* STABLE */
494
+ }),
495
+ _hoisted_17
496
+ ])) : createCommentVNode("v-if", true),
497
+ createCommentVNode(" \u5BFC\u5165\u6210\u529F\u72B6\u6001 "),
498
+ importStatus.value === "success" ? (openBlock(), createElementBlock("div", _hoisted_18, [
499
+ createVNode(_component_YcSvgIcon, {
500
+ src: importSuccessIconUrl.value,
501
+ size: 48,
502
+ "preserve-color": true,
503
+ class: "status-icon"
504
+ }, null, 8, ["src"]),
505
+ _hoisted_19,
506
+ createElementVNode("div", _hoisted_20, [
507
+ createVNode(_component_YcSvgIcon, {
508
+ src: excelIconUrl.value,
509
+ size: 48,
510
+ "preserve-color": true,
511
+ class: "excel-icon"
512
+ }, null, 8, ["src"]),
513
+ createElementVNode(
514
+ "div",
515
+ _hoisted_21,
516
+ toDisplayString((_b = uploadedFile.value) == null ? void 0 : _b.name),
517
+ 1
518
+ /* TEXT */
519
+ ),
520
+ createElementVNode("div", { class: "action-links" }, [
521
+ createElementVNode("span", {
522
+ class: "link",
523
+ onClick: handleReupload
524
+ }, "\u91CD\u65B0\u4E0A\u4F20"),
525
+ _hoisted_22,
526
+ createElementVNode("span", {
527
+ class: "link",
528
+ onClick: handleDownloadResult
529
+ }, "\u4E0B\u8F7D\u5BFC\u5165\u7ED3\u679C")
530
+ ])
531
+ ])
532
+ ])) : createCommentVNode("v-if", true),
533
+ createCommentVNode(" \u5BFC\u5165\u5931\u8D25\u72B6\u6001 "),
534
+ importStatus.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_23, [
535
+ createVNode(_component_YcSvgIcon, {
536
+ src: importErrorIconUrl.value,
537
+ size: 48,
538
+ "preserve-color": true,
539
+ class: "status-icon"
540
+ }, null, 8, ["src"]),
541
+ _hoisted_24,
542
+ createElementVNode("div", _hoisted_25, [
543
+ createVNode(_component_YcSvgIcon, {
544
+ src: excelIconUrl.value,
545
+ size: 48,
546
+ "preserve-color": true,
547
+ class: "excel-icon"
548
+ }, null, 8, ["src"]),
549
+ createElementVNode(
550
+ "div",
551
+ _hoisted_26,
552
+ toDisplayString((_c = uploadedFile.value) == null ? void 0 : _c.name),
553
+ 1
554
+ /* TEXT */
555
+ ),
556
+ createElementVNode("div", { class: "action-links" }, [
557
+ createElementVNode("span", {
558
+ class: "link",
559
+ onClick: handleReupload
560
+ }, "\u91CD\u65B0\u4E0A\u4F20"),
561
+ _hoisted_27,
562
+ createElementVNode("span", {
563
+ class: "link",
564
+ onClick: handleDownloadResult
565
+ }, "\u4E0B\u8F7D\u5BFC\u5165\u7ED3\u679C")
566
+ ])
567
+ ])
568
+ ])) : createCommentVNode("v-if", true)
569
+ ])
570
+ ];
571
+ }),
572
+ _: 1
573
+ /* STABLE */
574
+ }, 8, ["modelValue", "title", "width"]);
575
+ };
576
+ }
577
+ });
578
+
579
+ export { _sfc_main as default };