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