yahee-components 0.0.72 → 0.0.73

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