yahee-components 0.0.71 → 0.0.72

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 (51) hide show
  1. package/es/annex-upload/annex-upload.vue.js +51 -154
  2. package/es/annex-upload/annex-upload.vue2.js +119 -2
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/api/tool.js +1 -1
  5. package/es/border-wrap/border-wrap.vue.js +64 -95
  6. package/es/border-wrap/border-wrap.vue2.js +46 -2
  7. package/es/common-import/common-import.vue.js +384 -4
  8. package/es/common-import/common-import.vue2.js +90 -434
  9. package/es/complex-search/complex-search.vue.js +17 -17
  10. package/es/copy/copy.vue.js +37 -55
  11. package/es/copy/copy.vue2.js +34 -2
  12. package/es/copy/index.js +3 -3
  13. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
  14. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
  15. package/es/drop-down-condition/drop-down-condition.vue.js +115 -215
  16. package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
  17. package/es/echart-gauge/echart-gauge.vue.js +12 -140
  18. package/es/echart-gauge/echart-gauge.vue2.js +147 -2
  19. package/es/echart-gauge/index.js +3 -3
  20. package/es/image-upload/image-upload.vue.js +109 -170
  21. package/es/image-upload/image-upload.vue2.js +91 -2
  22. package/es/image-upload/index.js +3 -3
  23. package/es/input/index.js +3 -3
  24. package/es/input/input.vue.js +17 -38
  25. package/es/input/input.vue2.js +33 -2
  26. package/es/left-condition/index.js +3 -3
  27. package/es/left-condition/left-condition-sub.vue.js +32 -91
  28. package/es/left-condition/left-condition-sub.vue2.js +76 -2
  29. package/es/left-condition/left-condition.vue.js +70 -218
  30. package/es/left-condition/left-condition.vue2.js +160 -2
  31. package/es/left-condition-enum/index.js +3 -3
  32. package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
  33. package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
  34. package/es/operation-log/operation-log-content.vue.js +71 -92
  35. package/es/operation-log/operation-log-content.vue2.js +39 -2
  36. package/es/operation-log/operation-log-dialog.vue.js +45 -67
  37. package/es/operation-log/operation-log-dialog.vue2.js +38 -2
  38. package/es/operation-log/operation-log-form.vue.js +108 -183
  39. package/es/operation-log/operation-log-form.vue2.js +104 -2
  40. package/es/operation-log/operation-log.vue.js +119 -228
  41. package/es/operation-log/operation-log.vue2.js +135 -2
  42. package/es/packages/components/api/log-server.js +6 -6
  43. package/es/packages/components/api/upload-server.js +1 -1
  44. package/es/packages/components/hooks/useEcharts.js +19 -19
  45. package/es/packages/components/hooks/useImg.js +8 -8
  46. package/es/scale-screen/index.js +4 -4
  47. package/es/scale-screen/scale-screen.vue.js +19 -126
  48. package/es/scale-screen/scale-screen.vue2.js +125 -2
  49. package/es/utils/translate.js +18 -18
  50. package/es/yahee-components.css +1 -1
  51. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { defineComponent, mergeDefaults, toRefs, ref, watch, reactive, onMounted, onUnmounted, createElementBlock, openBlock, Fragment, createVNode, unref, isRef, withCtx, withDirectives, createElementVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString, renderList, createBlock } from "vue";
2
- import { M2, translateEmployeeName } from "../utils/translate.js";
1
+ import { defineComponent, mergeDefaults, toRefs, ref, watch, reactive, onMounted, onUnmounted } from "vue";
2
+ import { translateEmployeeName, M2 } from "../utils/translate.js";
3
3
  import { get } from "../packages/components/api/log-server.js";
4
4
  import { getDomainBaseUrl } from "../utils/get-domain-base-url.js";
5
5
  import { processFiles } from "../packages/components/api/common/index.js";
6
6
  import { getUploadRecord } from "../packages/components/api/common-import/index.js";
7
7
  import { defaultCommonImportProps } from "./props.js";
8
- import { ElDialog, ElRow, ElUpload, ElButton, ElCol, ElLink, ElProgress, ElCard, vLoading, ElTable, ElTableColumn, ElPagination, ElMessage, ElMessageBox } from "element-plus";
8
+ import { ElMessage, vLoading, ElProgress, ElPagination, ElCard, ElUpload, ElTableColumn, ElTable, ElCol, ElLink, ElButton, ElRow, ElDialog, ElMessageBox } from "element-plus";
9
9
  import "element-plus/theme-chalk/src/base.scss";
10
10
  import "element-plus/theme-chalk/src/dialog.scss";
11
11
  import "element-plus/theme-chalk/src/overlay.scss";
@@ -31,30 +31,28 @@ import "element-plus/theme-chalk/src/input.scss";
31
31
  import "element-plus/theme-chalk/src/badge.scss";
32
32
  import "element-plus/theme-chalk/src/message.scss";
33
33
  import "element-plus/theme-chalk/src/message-box.scss";
34
- const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 = { key: 0 }, _hoisted_4 = { key: 1 }, _hoisted_5 = { style: { color: "red" } }, _hoisted_6 = { class: "card-header" }, _hoisted_7 = ["innerHTML"], _hoisted_8 = {
35
- key: 0,
36
- class: "ellipsis-cell"
37
- }, __default__ = {
34
+ const __default__ = {
38
35
  name: "YaheeCommonImport",
39
36
  inheritAttrs: !1
40
37
  }, _sfc_main = /* @__PURE__ */ defineComponent({
41
38
  ...__default__,
42
39
  props: /* @__PURE__ */ mergeDefaults({
43
- isShowDialog: { type: Boolean },
44
- title: {},
45
- importId: {},
46
- multiple: { type: Boolean },
47
- ProcessRequestData: {},
48
- AutoCompleteResult: { type: Boolean },
49
- displayGetTemplate: { type: Boolean },
50
- processImportUrl: {},
51
- requestData: {},
52
- uploadRecord: { type: Function },
53
- uploadFile: { type: Function },
54
- uploadDisabled: { type: Boolean }
40
+ isShowDialog: { type: Boolean, required: !1 },
41
+ title: { type: String, required: !0 },
42
+ importId: { type: String, required: !0 },
43
+ multiple: { type: Boolean, required: !1 },
44
+ ProcessRequestData: { type: null, required: !1 },
45
+ AutoCompleteResult: { type: Boolean, required: !1 },
46
+ displayGetTemplate: { type: Boolean, required: !1 },
47
+ processImportUrl: { type: String, required: !0 },
48
+ requestData: { type: Object, required: !1 },
49
+ uploadRecord: { type: Function, required: !1 },
50
+ uploadFile: { type: Function, required: !1 },
51
+ uploadDisabled: { type: Boolean, required: !1 }
55
52
  }, defaultCommonImportProps()),
56
53
  emits: ["setIsShowDialog", "submit", "reloadTableData"],
57
- setup(__props, { emit: __emit }) {
54
+ setup(__props, { expose: __expose, emit: __emit }) {
55
+ __expose();
58
56
  const props = __props, { isShowDialog, title, importId, processImportUrl, requestData } = toRefs(props), isShowCoreImportRecordDialog = ref(!1), tableLoading = ref(!1), initWebRootUrlLoading = ref(!1), tableData = ref([]), importProgress = ref({}), pageNo = ref(1), totalNum = ref(1), pageSize = ref(50), sessionIds = ref({}), problemFiles = ref({}), socket = {}, eventData = ref({}), errorMessage = ref({}), allWebRoot = ref({}), webRoot = ref(""), localRequestData = ref({
59
57
  siteId: null,
60
58
  reportTime: null,
@@ -64,9 +62,9 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
64
62
  }, triggerSubmit = () => {
65
63
  emit("submit");
66
64
  }, getProgressPercentage = (e) => {
67
- var t, o, l;
65
+ var t, o, r;
68
66
  return Number(
69
- ((((t = importProgress.value[e]) == null ? void 0 : t.successRowCount) + ((o = importProgress.value[e]) == null ? void 0 : o.failedRowCount)) / ((l = importProgress.value[e]) == null ? void 0 : l.totalRowCount) * 100).toFixed(0)
67
+ ((((t = importProgress.value[e]) == null ? void 0 : t.successRowCount) + ((o = importProgress.value[e]) == null ? void 0 : o.failedRowCount)) / ((r = importProgress.value[e]) == null ? void 0 : r.totalRowCount) * 100).toFixed(0)
70
68
  );
71
69
  }, getFormattedDate = (row) => {
72
70
  const utcDate = eval(
@@ -75,8 +73,8 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
75
73
  return LongDate(localDate, "---");
76
74
  }, LongDate = (e, t) => {
77
75
  const o = new Date(e);
78
- let l = 0, r = 0, s = 0, a = 0, i = 0, n = "";
79
- return l = o.getFullYear(), l === 1 || l === 1970 || l === 1900 || isNaN(l) ? t !== void 0 ? t : "---" : (r = o.getMonth() + 1, s = o.getDate(), a = o.getHours(), i = o.getMinutes(), n = `${l}-`, n += r >= 10 ? `${r}-` : `0${r}-`, n += s >= 10 ? s : `0${s}`, n += a >= 10 ? ` ${a}` : ` 0${a}`, n += i >= 10 ? `:${i}` : `:0${i}`, n);
76
+ let r = 0, a = 0, s = 0, l = 0, i = 0, n = "";
77
+ return r = o.getFullYear(), r === 1 || r === 1970 || r === 1900 || isNaN(r) ? t !== void 0 ? t : "---" : (a = o.getMonth() + 1, s = o.getDate(), l = o.getHours(), i = o.getMinutes(), n = `${r}-`, n += a >= 10 ? `${a}-` : `0${a}-`, n += s >= 10 ? s : `0${s}`, n += l >= 10 ? ` ${l}` : ` 0${l}`, n += i >= 10 ? `:${i}` : `:0${i}`, n);
80
78
  }, getTemplateFile = () => {
81
79
  if (!eventData.value) return;
82
80
  let e = "";
@@ -90,7 +88,7 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
90
88
  }, handleOpen = () => {
91
89
  fileNames.value = /* @__PURE__ */ new Set();
92
90
  }, getFile = (e) => {
93
- e && window.open(`https://imgs.yaheecloud.com//${e}`, "_self");
91
+ e && window.open(`http://qas-service.yahee.com.cn:8088/FMSService/Latest//${e}`, "_self");
94
92
  }, handleSizeChange = async (e) => {
95
93
  getUploadRecordDataList(JSON.stringify({ rows: pageSize.value, page: e }));
96
94
  };
@@ -103,8 +101,8 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
103
101
  );
104
102
  const getUploadRecordDataList = (e) => {
105
103
  getUploadRecord(`/ExcelImport/GetExcelImportRecords?importId=${importId.value}`, e).then((t) => {
106
- var o, l;
107
- t.status !== 200 && (ElMessage.error(M2("获取上传记录失败!")), console.log(`获取上传记录失败!${JSON.stringify(t)}`)), tableData.value = (o = t.data) == null ? void 0 : o.rows, totalNum.value = (l = t.data) == null ? void 0 : l.total;
104
+ var o, r;
105
+ t.status !== 200 && (ElMessage.error(M2("获取上传记录失败!")), console.log(`获取上传记录失败!${JSON.stringify(t)}`)), tableData.value = (o = t.data) == null ? void 0 : o.rows, totalNum.value = (r = t.data) == null ? void 0 : r.total;
108
106
  }).catch((t) => {
109
107
  console.log(t);
110
108
  });
@@ -126,7 +124,7 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
126
124
  const o = window.location.hostname;
127
125
  return o.includes("localhost") || o.includes("127.0.0.1") || o.includes("yahee.com") ? t = "http://qas-service.yahee.com.cn:8088/FMSService/Latest/" : t = webRoot.value, `${t}${e}`;
128
126
  }, getCommonUrl = (e) => getDomainBaseUrl() + e, getWebRoot = (e) => {
129
- if (initWebRootUrlLoading.value = !0, !allWebRoot.value[e])
127
+ if (initWebRootUrlLoading.value = !0, e && !allWebRoot.value[e])
130
128
  try {
131
129
  fetch(`${getCommonUrl("/Common/GetAllWebRoot")}?origin=${window.location.host}`, {
132
130
  method: "GET",
@@ -135,8 +133,8 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
135
133
  if (!t.ok)
136
134
  throw new Error("Network response was not ok");
137
135
  let o = {};
138
- t.json().then((l) => {
139
- if (o = l, allWebRoot.value = o, !allWebRoot.value) {
136
+ t.json().then((r) => {
137
+ if (o = r, allWebRoot.value = o, !allWebRoot.value) {
140
138
  console.error("GetWebRoot 失败");
141
139
  return;
142
140
  }
@@ -154,24 +152,24 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
154
152
  console.error("文件大小不能超过 1GB"), ElMessage.success("文件大小不能超过 1GB");
155
153
  return;
156
154
  }
157
- setupWebSocket(t.name), readFileAsBase64(t).then((l) => {
158
- uploadConfigFile(t, l);
155
+ setupWebSocket(t.name), readFileAsBase64(t).then((r) => {
156
+ uploadConfigFile(t, r);
159
157
  });
160
158
  }, readFileAsBase64 = (e) => new Promise((t, o) => {
161
- const l = new FileReader();
162
- l.onload = () => t(l.result), l.onerror = (r) => o(r), l.readAsDataURL(e);
159
+ const r = new FileReader();
160
+ r.onload = () => t(r.result), r.onerror = (a) => o(a), r.readAsDataURL(e);
163
161
  }), uploadConfigFile = (e, t) => {
164
162
  triggerSubmit(), fileNames.value.has(e.name) ? (delete uploadProgress[e.name], delete importProgress.value[e.name], delete sessionIds.value[e.name], delete problemFiles.value[e.name], delete socket[e.name], delete errorMessage.value[e.name]) : fileNames.value.add(e.name);
165
163
  const o = new FormData();
166
164
  o.append("FileType", "115"), o.append("FileName", e.name), o.append("Base64Content", t), o.append("CreatedBy", "0"), o.append("Offset", "0"), o.append("IsOver", "true");
167
- const l = new XMLHttpRequest();
168
- l.open("POST", `${getFileServiceUrl("fragmentupload?t=")}${Math.random()}`, !0), l.upload.onprogress = (r) => {
169
- r.lengthComputable && (uploadProgress[e.name] = Math.round(r.loaded / r.total * 100));
170
- }, l.onload = () => {
171
- if (l.status === 200)
165
+ const r = new XMLHttpRequest();
166
+ r.open("POST", `${getFileServiceUrl("fragmentupload?t=")}${Math.random()}`, !0), r.upload.onprogress = (a) => {
167
+ a.lengthComputable && (uploadProgress[e.name] = Math.round(a.loaded / a.total * 100));
168
+ }, r.onload = () => {
169
+ if (r.status === 200)
172
170
  try {
173
- const r = JSON.parse(l.responseText);
174
- if (console.log("服务器返回值:", r), r.ACK !== "Success" || !r.FileId) {
171
+ const a = JSON.parse(r.responseText);
172
+ if (console.log("服务器返回值:", a), a.ACK !== "Success" || !a.FileId) {
175
173
  ElMessage.error(`${e.name} 上传失败`);
176
174
  return;
177
175
  }
@@ -183,23 +181,23 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
183
181
  // ES6可选链避免报错
184
182
  }, sessionIds.value[e.name] || (sessionIds.value[e.name] = getRandomStr(20)), processFile({
185
183
  importId: importId.value,
186
- fileId: r.FileId,
184
+ fileId: a.FileId,
187
185
  wsSessionId: sessionIds.value[e.name],
188
186
  file: e,
189
187
  requestData: localRequestData.value
190
188
  });
191
189
  }, 500);
192
- } catch (r) {
193
- console.error("解析服务器返回值失败:", r), ElMessage.error(`${e.name} 上传完成,但解析返回值失败`);
190
+ } catch (a) {
191
+ console.error("解析服务器返回值失败:", a), ElMessage.error(`${e.name} 上传完成,但解析返回值失败`);
194
192
  }
195
193
  else
196
194
  ElMessage.error(`${e.name} 上传失败`);
197
- }, l.onerror = () => {
195
+ }, r.onerror = () => {
198
196
  ElMessage.error(`${e.name} 上传异常`);
199
- }, l.send(o);
197
+ }, r.send(o);
200
198
  }, processFile = (e) => {
201
199
  processFiles(processImportUrl.value, e, {}).then((t) => {
202
- var r;
200
+ var a;
203
201
  if (console.log("processFiles 返回值:", t), t != null && t.success) {
204
202
  ElMessageBox.alert("文件导入成功", "操作成功", {
205
203
  confirmButtonText: "确定",
@@ -210,25 +208,25 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
210
208
  });
211
209
  return;
212
210
  }
213
- const l = (Array.isArray(t == null ? void 0 : t.messages) ? t.messages : ["未知错误"]).join(`
211
+ const r = (Array.isArray(t == null ? void 0 : t.messages) ? t.messages : ["未知错误"]).join(`
214
212
  `) + `
215
213
 
216
214
  (可使用鼠标滚轮滚动查看)`;
217
- ElMessageBox.alert(l, "导入错误", {
215
+ ElMessageBox.alert(r, "导入错误", {
218
216
  confirmButtonText: "知道了",
219
217
  customClass: "custom-common-import-alert",
220
218
  dangerouslyUseHTMLString: !0
221
- }), t != null && t.fileId && (problemFiles.value[(r = e == null ? void 0 : e.file) == null ? void 0 : r.name] = t.fileId);
219
+ }), t != null && t.fileId && (problemFiles.value[(a = e == null ? void 0 : e.file) == null ? void 0 : a.name] = t.fileId);
222
220
  }).catch((t) => {
223
- var l;
221
+ var r;
224
222
  console.error("processFiles 失败", t);
225
223
  let o = t == null ? void 0 : t.exMsg;
226
- o || (o = M2("处理过程中发生错误!")), errorMessage.value[(l = e == null ? void 0 : e.file) == null ? void 0 : l.name] = o;
224
+ o || (o = M2("处理过程中发生错误!")), errorMessage.value[(r = e == null ? void 0 : e.file) == null ? void 0 : r.name] = o;
227
225
  });
228
226
  }, getRandomStr = (e, t) => {
229
227
  t || (t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
230
228
  let o = "";
231
- for (let l = e; l > 0; --l)
229
+ for (let r = e; r > 0; --r)
232
230
  o += t[Math.floor(Math.random() * t.length)];
233
231
  return o;
234
232
  }, getWebSocketServerUrl = (e) => {
@@ -237,23 +235,23 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
237
235
  return o.indexOf("localhost") >= 0 || o.indexOf("yahee.com") >= 0 ? t = "ws://qas-newerp.yahee.com.cn:8306" : t = "wss://websocket.yaheecloud.com:10001", t + e;
238
236
  }, getAuthCode = async () => await get(getCommonUrl("/Common/GetWsAuthCode")), setupWebSocket = (e) => {
239
237
  socket[e] = new WebSocket(getWebSocketServerUrl("/excel-import/")), socket[e].onmessage = (t) => {
240
- var l, r;
238
+ var r, a;
241
239
  if (t.data == "get-auth") {
242
240
  getAuthCode().then((s) => {
243
- var a;
244
- console.log("发送authCode:", s), (a = socket[e]) == null || a.send(`auth:${s}`);
241
+ var l;
242
+ console.log("发送authCode:", s), (l = socket[e]) == null || l.send(`auth:${s}`);
245
243
  });
246
244
  return;
247
245
  }
248
246
  const o = JSON.parse(t.data);
249
247
  if (console.log("接收普通消息", o), !!o)
250
248
  if (o.MessageType === 0) {
251
- const s = o.MessageIndex || 0, a = JSON.parse(o == null ? void 0 : o.Content);
252
- if ((a == null ? void 0 : a.error) == !0) {
253
- errorMessage.value[e] = a.message;
249
+ const s = o.MessageIndex || 0, l = JSON.parse(o == null ? void 0 : o.Content);
250
+ if ((l == null ? void 0 : l.error) == !0) {
251
+ errorMessage.value[e] = l.message;
254
252
  return;
255
253
  }
256
- (!importProgress.value[e] || s > ((l = importProgress.value[e]) == null ? void 0 : l.MessageIndex)) && (importProgress.value[e] = a, importProgress.value[e].MessageIndex = s, a != null && a.finished && ((r = socket[e]) == null || r.close()));
254
+ (!importProgress.value[e] || s > ((r = importProgress.value[e]) == null ? void 0 : r.MessageIndex)) && (importProgress.value[e] = l, importProgress.value[e].MessageIndex = s, l != null && l.finished && ((a = socket[e]) == null || a.close()));
257
255
  } else o.MessageType === 1 ? sessionIds.value[e] = o.Content : console.log("进度:", o);
258
256
  }, socket[e].onerror = (t) => {
259
257
  console.error("WebSocket 错误:", t), t instanceof ErrorEvent ? console.error("Error message:", t.message) : console.error("Unknown WebSocket error:", t);
@@ -261,7 +259,7 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
261
259
  console.log("WebSocket 连接关闭");
262
260
  };
263
261
  };
264
- return onMounted(() => {
262
+ onMounted(() => {
265
263
  if (!processImportUrl.value) {
266
264
  console.error("processImportUrl不能为空!");
267
265
  return;
@@ -280,379 +278,37 @@ const _hoisted_1 = { class: "form-slot" }, _hoisted_2 = { key: 0 }, _hoisted_3 =
280
278
  var t;
281
279
  (t = socket[e]) == null || t.close();
282
280
  });
283
- }), (e, t) => (openBlock(), createElementBlock(Fragment, null, [
284
- createVNode(unref(ElDialog), {
285
- modelValue: unref(isShowDialog),
286
- "onUpdate:modelValue": t[1] || (t[1] = (o) => isRef(isShowDialog) ? isShowDialog.value = o : null),
287
- title: unref(M2)(unref(title)),
288
- width: "900",
289
- "before-close": handleClose,
290
- draggable: "",
291
- onOpen: handleOpen
292
- }, {
293
- default: withCtx(() => {
294
- var o;
295
- return [
296
- withDirectives((openBlock(), createElementBlock("div", null, [
297
- createElementVNode("div", _hoisted_1, [
298
- renderSlot(e.$slots, "form", {}, void 0, !0)
299
- ]),
300
- createVNode(unref(ElRow), null, {
301
- default: withCtx(() => [
302
- createVNode(unref(ElUpload), {
303
- class: "upload-record",
304
- "http-request": handleFileUpload,
305
- accept: ".xls,.xlsx,.txt,.csv",
306
- "show-file-list": !1,
307
- multiple: e.multiple,
308
- drag: "",
309
- style: { width: "20%", height: "100%" },
310
- disabled: e.uploadDisabled
311
- }, {
312
- default: withCtx(() => [
313
- createVNode(unref(ElButton), {
314
- style: { "background-color": "rgba(0, 183, 238, 1)", "font-weight": "bold" },
315
- size: "large",
316
- type: "primary",
317
- disabled: e.uploadDisabled
318
- }, {
319
- default: withCtx(() => [
320
- createTextVNode(toDisplayString(unref(M2)("上传文件")), 1)
321
- ]),
322
- _: 1
323
- }, 8, ["disabled"])
324
- ]),
325
- _: 1
326
- }, 8, ["multiple", "disabled"])
327
- ]),
328
- _: 1
329
- }),
330
- (o = fileNames.value) != null && o.size ? (openBlock(), createElementBlock("div", _hoisted_2, [
331
- (openBlock(!0), createElementBlock(Fragment, null, renderList(fileNames.value, (l) => {
332
- var r, s;
333
- return openBlock(), createElementBlock("div", {
334
- key: l,
335
- class: "uploadProgress"
336
- }, [
337
- createVNode(unref(ElRow), { style: { "margin-bottom": "5px" } }, {
338
- default: withCtx(() => [
339
- createVNode(unref(ElCol), { span: 18 }, {
340
- default: withCtx(() => [
341
- createVNode(unref(ElLink), {
342
- type: "primary",
343
- underline: !1,
344
- style: { font: "inherit" },
345
- onClick: t[0] || (t[0] = (a) => getFile(eventData.value.Template))
346
- }, {
347
- default: withCtx(() => [
348
- createTextVNode(toDisplayString(l), 1)
349
- ]),
350
- _: 2
351
- }, 1024)
352
- ]),
353
- _: 2
354
- }, 1024),
355
- uploadProgress[l] ? (openBlock(), createBlock(unref(ElCol), {
356
- key: 0,
357
- span: 6
358
- }, {
359
- default: withCtx(() => [
360
- uploadProgress[l] == 100 ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(M2)("文件上传完成")), 1)) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(unref(M2)("文件正在上传,进度") + `${uploadProgress[l]}% ...`), 1))
361
- ]),
362
- _: 2
363
- }, 1024)) : createCommentVNode("", !0)
364
- ]),
365
- _: 2
366
- }, 1024),
367
- sessionIds.value[l] ? (openBlock(), createBlock(unref(ElRow), {
368
- key: 0,
369
- style: { "margin-bottom": "5px" }
370
- }, {
371
- default: withCtx(() => [
372
- createTextVNode(toDisplayString(unref(M2)("导入ID")) + ":" + toDisplayString(sessionIds.value[l]), 1)
373
- ]),
374
- _: 2
375
- }, 1024)) : createCommentVNode("", !0),
376
- errorMessage.value[l] ? (openBlock(), createBlock(unref(ElRow), {
377
- key: 1,
378
- style: { "margin-bottom": "5px" }
379
- }, {
380
- default: withCtx(() => [
381
- createElementVNode("span", _hoisted_5, toDisplayString(unref(M2)(errorMessage.value[l])), 1)
382
- ]),
383
- _: 2
384
- }, 1024)) : createCommentVNode("", !0),
385
- (r = importProgress.value[l]) != null && r.totalRowCount ? (openBlock(), createBlock(unref(ElRow), {
386
- key: 2,
387
- style: { "margin-bottom": "5px" }
388
- }, {
389
- default: withCtx(() => {
390
- var a, i;
391
- return [
392
- createVNode(unref(ElCol), { span: 6 }, {
393
- default: withCtx(() => {
394
- var n, c;
395
- return [
396
- createTextVNode(toDisplayString(unref(M2)("工作簿")) + ":" + toDisplayString((n = importProgress.value[l]) == null ? void 0 : n.currentSheet) + "/" + toDisplayString((c = importProgress.value[l]) == null ? void 0 : c.sheetCount), 1)
397
- ];
398
- }),
399
- _: 2
400
- }, 1024),
401
- createVNode(unref(ElCol), { span: 6 }, {
402
- default: withCtx(() => {
403
- var n;
404
- return [
405
- createTextVNode(toDisplayString(unref(M2)("总行数")) + ":" + toDisplayString((n = importProgress.value[l]) == null ? void 0 : n.totalRowCount), 1)
406
- ];
407
- }),
408
- _: 2
409
- }, 1024),
410
- createVNode(unref(ElCol), { span: 6 }, {
411
- default: withCtx(() => {
412
- var n;
413
- return [
414
- createTextVNode(toDisplayString(unref(M2)("成功行数")) + ":" + toDisplayString((n = importProgress.value[l]) == null ? void 0 : n.successRowCount), 1)
415
- ];
416
- }),
417
- _: 2
418
- }, 1024),
419
- (a = importProgress.value[l]) != null && a.failedRowCount ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(ElCol), {
420
- key: 0,
421
- span: 6
422
- }, {
423
- default: withCtx(() => [
424
- createTextVNode(toDisplayString(unref(M2)("失败行数")) + ":0 ", 1)
425
- ]),
426
- _: 1
427
- })),
428
- (i = importProgress.value[l]) != null && i.failedRowCount ? (openBlock(), createBlock(unref(ElCol), {
429
- key: 1,
430
- span: 6,
431
- style: { display: "flex" }
432
- }, {
433
- default: withCtx(() => [
434
- createTextVNode(toDisplayString(unref(M2)("失败行数")) + ": ", 1),
435
- createVNode(unref(ElLink), {
436
- type: "primary",
437
- underline: !1,
438
- title: problemFiles.value[l],
439
- onClick: (n) => getFile(problemFiles.value[l])
440
- }, {
441
- default: withCtx(() => {
442
- var n;
443
- return [
444
- createTextVNode(toDisplayString((n = importProgress.value[l]) == null ? void 0 : n.failedRowCount), 1)
445
- ];
446
- }),
447
- _: 2
448
- }, 1032, ["title", "onClick"])
449
- ]),
450
- _: 2
451
- }, 1024)) : createCommentVNode("", !0)
452
- ];
453
- }),
454
- _: 2
455
- }, 1024)) : createCommentVNode("", !0),
456
- t[3] || (t[3] = createElementVNode("br", null, null, -1)),
457
- (s = importProgress.value[l]) != null && s.totalRowCount ? (openBlock(), createBlock(unref(ElProgress), {
458
- key: 3,
459
- percentage: getProgressPercentage(l)
460
- }, null, 8, ["percentage"])) : createCommentVNode("", !0)
461
- ]);
462
- }), 128))
463
- ])) : createCommentVNode("", !0),
464
- createVNode(unref(ElRow), { style: { "margin-top": "10px" } }, {
465
- default: withCtx(() => [
466
- createVNode(unref(ElCard), { style: { width: "860px" } }, {
467
- header: withCtx(() => [
468
- createElementVNode("div", _hoisted_6, [
469
- createElementVNode("span", null, toDisplayString(unref(M2)("说明")), 1)
470
- ])
471
- ]),
472
- footer: withCtx(() => [
473
- createVNode(unref(ElRow), null, {
474
- default: withCtx(() => [
475
- createVNode(unref(ElCol), { span: 10 }),
476
- createVNode(unref(ElCol), {
477
- span: 14,
478
- style: { display: "flex", "justify-content": "flex-end" }
479
- }, {
480
- default: withCtx(() => [
481
- e.displayGetTemplate && eventData.value.TemplateType != 0 ? (openBlock(), createBlock(unref(ElButton), {
482
- key: 0,
483
- style: { "background-color": "rgba(89, 191, 87, 1)", color: "white", "font-weight": "bold" },
484
- size: "large",
485
- onClick: getTemplateFile
486
- }, {
487
- default: withCtx(() => [
488
- createTextVNode(toDisplayString(unref(M2)("获取模板")), 1)
489
- ]),
490
- _: 1
491
- })) : createCommentVNode("", !0),
492
- createVNode(unref(ElButton), {
493
- style: { "background-color": "rgba(89, 191, 87, 1)", color: "white", "font-weight": "bold" },
494
- size: "large",
495
- onClick: displayRecords
496
- }, {
497
- default: withCtx(() => [
498
- createTextVNode(toDisplayString(unref(M2)("导入记录")), 1)
499
- ]),
500
- _: 1
501
- }),
502
- createVNode(unref(ElButton), {
503
- style: { color: "#949592", "font-weight": "bold" },
504
- size: "large",
505
- onClick: handleClose
506
- }, {
507
- default: withCtx(() => [
508
- createTextVNode(toDisplayString(unref(M2)("关闭")), 1)
509
- ]),
510
- _: 1
511
- })
512
- ]),
513
- _: 1
514
- })
515
- ]),
516
- _: 1
517
- })
518
- ]),
519
- default: withCtx(() => [
520
- createElementVNode("div", {
521
- innerHTML: eventData.value.Description
522
- }, null, 8, _hoisted_7)
523
- ]),
524
- _: 1
525
- })
526
- ]),
527
- _: 1
528
- })
529
- ])), [
530
- [unref(vLoading), initWebRootUrlLoading.value]
531
- ])
532
- ];
533
- }),
534
- _: 3
535
- }, 8, ["modelValue", "title"]),
536
- createVNode(unref(ElDialog), {
537
- modelValue: isShowCoreImportRecordDialog.value,
538
- "onUpdate:modelValue": t[2] || (t[2] = (o) => isShowCoreImportRecordDialog.value = o),
539
- title: unref(M2)("导入记录"),
540
- width: "1400",
541
- "before-close": handleCloseRecord,
542
- draggable: ""
543
- }, {
544
- default: withCtx(() => [
545
- createElementVNode("div", null, [
546
- withDirectives((openBlock(), createBlock(unref(ElTable), {
547
- border: "",
548
- "row-key": "id",
549
- data: tableData.value,
550
- "max-height": "500",
551
- style: { width: "100%" },
552
- "empty-text": unref(M2)("暂无数据")
553
- }, {
554
- default: withCtx(() => [
555
- createVNode(unref(ElTableColumn), {
556
- align: "center",
557
- label: unref(M2)("记录ID"),
558
- "min-width": "220",
559
- prop: "TaskId"
560
- }, null, 8, ["label"]),
561
- createVNode(unref(ElTableColumn), {
562
- align: "center",
563
- label: unref(M2)("导入时间"),
564
- "min-width": "100"
565
- }, {
566
- default: withCtx((o) => [
567
- createTextVNode(toDisplayString(getFormattedDate(o.row)), 1)
568
- ]),
569
- _: 1
570
- }, 8, ["label"]),
571
- createVNode(unref(ElTableColumn), {
572
- align: "center",
573
- label: unref(M2)("导入人")
574
- }, {
575
- default: withCtx((o) => [
576
- createTextVNode(toDisplayString(unref(translateEmployeeName)(o.row.CreatedBy)), 1)
577
- ]),
578
- _: 1
579
- }, 8, ["label"]),
580
- createVNode(unref(ElTableColumn), {
581
- align: "center",
582
- label: unref(M2)("上传文件"),
583
- "min-width": "160"
584
- }, {
585
- default: withCtx((o) => [
586
- createVNode(unref(ElLink), {
587
- type: "primary",
588
- underline: !1,
589
- style: { font: "inherit" },
590
- onClick: (l) => getFile(o.row.InFileId)
591
- }, {
592
- default: withCtx(() => [
593
- createTextVNode(toDisplayString(o.row.InFileId), 1)
594
- ]),
595
- _: 2
596
- }, 1032, ["onClick"])
597
- ]),
598
- _: 1
599
- }, 8, ["label"]),
600
- createVNode(unref(ElTableColumn), {
601
- align: "center",
602
- label: unref(M2)("输出文件"),
603
- "min-width": "160"
604
- }, {
605
- default: withCtx((o) => [
606
- createVNode(unref(ElLink), {
607
- type: "primary",
608
- underline: !1,
609
- style: { font: "inherit" },
610
- onClick: (l) => getFile(o.row.OutFileId)
611
- }, {
612
- default: withCtx(() => [
613
- createTextVNode(toDisplayString(o.row.OutFileId), 1)
614
- ]),
615
- _: 2
616
- }, 1032, ["onClick"])
617
- ]),
618
- _: 1
619
- }, 8, ["label"]),
620
- createVNode(unref(ElTableColumn), {
621
- align: "center",
622
- label: unref(M2)("错误信息"),
623
- prop: "ErrorMessage",
624
- width: "200"
625
- }, {
626
- default: withCtx((o) => [
627
- o.row.ErrorMessage ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(o.row.ErrorMessage), 1)) : createCommentVNode("", !0)
628
- ]),
629
- _: 1
630
- }, 8, ["label"]),
631
- createVNode(unref(ElTableColumn), {
632
- align: "center",
633
- label: unref(M2)("备注"),
634
- prop: "Remark"
635
- }, null, 8, ["label"])
636
- ]),
637
- _: 1
638
- }, 8, ["data", "empty-text"])), [
639
- [unref(vLoading), tableLoading.value]
640
- ]),
641
- createVNode(unref(ElPagination), {
642
- "current-page": pageNo.value,
643
- "page-sizes": [50, 100, 150, 200],
644
- "page-size": pageSize.value,
645
- layout: "total, sizes, prev, pager, next, jumper",
646
- total: totalNum.value,
647
- class: "page-pagination",
648
- onSizeChange: handleSizeChange,
649
- onCurrentChange: handleCurrentChange
650
- }, null, 8, ["current-page", "page-size", "total"])
651
- ])
652
- ]),
653
- _: 1
654
- }, 8, ["modelValue", "title"])
655
- ], 64));
281
+ });
282
+ const __returned__ = { props, isShowDialog, title, importId, processImportUrl, requestData, isShowCoreImportRecordDialog, tableLoading, initWebRootUrlLoading, tableData, importProgress, pageNo, totalNum, pageSize, sessionIds, problemFiles, socket, eventData, errorMessage, allWebRoot, webRoot, localRequestData, emit, handleClose, triggerSubmit, getProgressPercentage, getFormattedDate, LongDate, getTemplateFile, displayRecords, handleCloseRecord, handleOpen, getFile, handleSizeChange, getUploadRecordDataList, handleCurrentChange, fetchExcelImportEvent, getFileServiceUrl, getCommonUrl, getWebRoot, fileNames, uploadProgress, handleFileUpload, readFileAsBase64, uploadConfigFile, processFile, getRandomStr, getWebSocketServerUrl, getAuthCode, setupWebSocket, get M2() {
283
+ return M2;
284
+ }, get translateEmployeeName() {
285
+ return translateEmployeeName;
286
+ }, get ElDialog() {
287
+ return ElDialog;
288
+ }, get ElRow() {
289
+ return ElRow;
290
+ }, get ElButton() {
291
+ return ElButton;
292
+ }, get ElLink() {
293
+ return ElLink;
294
+ }, get ElCol() {
295
+ return ElCol;
296
+ }, get ElTable() {
297
+ return ElTable;
298
+ }, get ElTableColumn() {
299
+ return ElTableColumn;
300
+ }, get ElUpload() {
301
+ return ElUpload;
302
+ }, get ElCard() {
303
+ return ElCard;
304
+ }, get ElPagination() {
305
+ return ElPagination;
306
+ }, get ElProgress() {
307
+ return ElProgress;
308
+ }, get vLoading() {
309
+ return vLoading;
310
+ } };
311
+ return Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: !1, value: !0 }), __returned__;
656
312
  }
657
313
  });
658
314
  export {