yahee-components 0.0.95 → 0.0.97
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.
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { M2 as u, translateEmployeeName as
|
|
3
|
-
import { get as
|
|
4
|
-
import { getDomainBaseUrl as
|
|
5
|
-
import { getUploadRecord as
|
|
6
|
-
import { defaultCommonImportProps as
|
|
7
|
-
import { ElDialog as se, ElRow as
|
|
1
|
+
import { defineComponent as Pe, mergeDefaults as We, toRefs as ze, ref as p, watch as qe, reactive as Ae, onMounted as Ve, onUnmounted as Je, createElementBlock as y, openBlock as c, Fragment as ae, createVNode as s, unref as l, isRef as je, withCtx as r, withDirectives as re, createElementVNode as $, createCommentVNode as h, renderSlot as ne, createTextVNode as f, toDisplayString as i, renderList as He, createBlock as b } from "vue";
|
|
2
|
+
import { M2 as u, translateEmployeeName as Xe } from "../utils/translate.js";
|
|
3
|
+
import { get as Ye } from "../packages/components/api/log-server.js";
|
|
4
|
+
import { getDomainBaseUrl as Ze, getDomainBaseReportUrl as Qe } from "../utils/get-domain-base-url.js";
|
|
5
|
+
import { getUploadRecord as Ke } from "../packages/components/api/common-import/index.js";
|
|
6
|
+
import { defaultCommonImportProps as et } from "./props.js";
|
|
7
|
+
import { ElDialog as se, ElRow as _, ElUpload as tt, ElButton as W, ElCol as C, ElLink as z, ElProgress as ot, ElCard as lt, vLoading as ie, ElTable as at, ElTableColumn as R, ElPagination as rt, ElMessage as k, ElMessageBox as ue } from "element-plus";
|
|
8
8
|
import "element-plus/theme-chalk/src/base.scss";
|
|
9
|
+
import "element-plus/theme-chalk/src/button.scss";
|
|
10
|
+
import "element-plus/theme-chalk/src/card.scss";
|
|
11
|
+
import "element-plus/theme-chalk/src/col.scss";
|
|
9
12
|
import "element-plus/theme-chalk/src/dialog.scss";
|
|
10
13
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
11
|
-
import "element-plus/theme-chalk/src/row.scss";
|
|
12
|
-
import "element-plus/theme-chalk/src/button.scss";
|
|
13
14
|
import "element-plus/theme-chalk/src/link.scss";
|
|
14
|
-
import "element-plus/theme-chalk/src/
|
|
15
|
+
import "element-plus/theme-chalk/src/badge.scss";
|
|
16
|
+
import "element-plus/theme-chalk/src/message.scss";
|
|
17
|
+
import "element-plus/theme-chalk/src/message-box.scss";
|
|
18
|
+
import "element-plus/theme-chalk/src/input.scss";
|
|
19
|
+
import "element-plus/theme-chalk/src/pagination.scss";
|
|
20
|
+
import "element-plus/theme-chalk/src/tag.scss";
|
|
21
|
+
import "element-plus/theme-chalk/src/option.scss";
|
|
22
|
+
import "element-plus/theme-chalk/src/option-group.scss";
|
|
23
|
+
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
24
|
+
import "element-plus/theme-chalk/src/popper.scss";
|
|
25
|
+
import "element-plus/theme-chalk/src/select.scss";
|
|
26
|
+
import "element-plus/theme-chalk/src/progress.scss";
|
|
27
|
+
import "element-plus/theme-chalk/src/row.scss";
|
|
15
28
|
import "element-plus/theme-chalk/src/table.scss";
|
|
16
29
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
17
30
|
import "element-plus/theme-chalk/src/tooltip.scss";
|
|
18
|
-
import "element-plus/theme-chalk/src/popper.scss";
|
|
19
|
-
import "element-plus/theme-chalk/src/scrollbar.scss";
|
|
20
31
|
import "element-plus/theme-chalk/src/table-column.scss";
|
|
21
|
-
import "element-plus/theme-chalk/src/tag.scss";
|
|
22
32
|
import "element-plus/theme-chalk/src/upload.scss";
|
|
23
|
-
import "
|
|
24
|
-
import "
|
|
25
|
-
|
|
26
|
-
import "element-plus/theme-chalk/src/option.scss";
|
|
27
|
-
import "element-plus/theme-chalk/src/option-group.scss";
|
|
28
|
-
import "element-plus/theme-chalk/src/select.scss";
|
|
29
|
-
import "element-plus/theme-chalk/src/input.scss";
|
|
30
|
-
import "element-plus/theme-chalk/src/badge.scss";
|
|
31
|
-
import "element-plus/theme-chalk/src/message.scss";
|
|
32
|
-
import "element-plus/theme-chalk/src/message-box.scss";
|
|
33
|
-
const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key: 1 }, st = { style: { color: "red" } }, it = { class: "form-slot" }, ut = {
|
|
33
|
+
import "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js";
|
|
34
|
+
import nt from "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
|
|
35
|
+
const st = { class: "form-slot" }, it = { key: 0 }, ut = { key: 0 }, dt = { key: 1 }, ct = { style: { color: "red" } }, pt = { class: "form-slot" }, mt = {
|
|
34
36
|
key: 0,
|
|
35
37
|
class: "card-header"
|
|
36
|
-
},
|
|
38
|
+
}, ft = ["innerHTML"], gt = {
|
|
37
39
|
key: 0,
|
|
38
40
|
class: "ellipsis-cell"
|
|
39
|
-
},
|
|
41
|
+
}, vt = {
|
|
40
42
|
name: "YaheeCommonImport",
|
|
41
43
|
inheritAttrs: !1
|
|
42
|
-
},
|
|
43
|
-
...
|
|
44
|
-
props: /* @__PURE__ */
|
|
44
|
+
}, Zt = /* @__PURE__ */ Pe({
|
|
45
|
+
...vt,
|
|
46
|
+
props: /* @__PURE__ */ We({
|
|
45
47
|
isShowDialog: { type: Boolean },
|
|
46
48
|
isShowResponseDataMessage: { type: Boolean },
|
|
47
49
|
title: {},
|
|
@@ -57,7 +59,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
57
59
|
uploadDisabled: { type: Boolean },
|
|
58
60
|
filePath: {},
|
|
59
61
|
processFiles: { type: Function }
|
|
60
|
-
},
|
|
62
|
+
}, et()),
|
|
61
63
|
emits: [
|
|
62
64
|
"setIsShowDialog",
|
|
63
65
|
"closeDialog",
|
|
@@ -69,13 +71,13 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
69
71
|
const pe = de, {
|
|
70
72
|
isShowDialog: q,
|
|
71
73
|
isShowResponseDataMessage: me,
|
|
72
|
-
title:
|
|
74
|
+
title: fe,
|
|
73
75
|
importId: F,
|
|
74
76
|
processImportUrl: H,
|
|
75
77
|
requestData: X,
|
|
76
|
-
processFiles:
|
|
78
|
+
processFiles: ge,
|
|
77
79
|
filePath: ve
|
|
78
|
-
} =
|
|
80
|
+
} = ze(pe), M = p(!1), he = p(!1), U = p(!1), Y = p([]), m = p({}), Z = p(1), Q = p(1), A = p(50), I = p({}), x = p({}), K = p({}), S = {}, w = p({}), E = p({}), N = p({}), V = p(""), B = p(!1), O = p({
|
|
79
81
|
siteId: null,
|
|
80
82
|
reportTime: null,
|
|
81
83
|
fileName: ""
|
|
@@ -99,26 +101,51 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
99
101
|
if (Number.isNaN(a)) return "---";
|
|
100
102
|
const n = new Date(a);
|
|
101
103
|
if (Number.isNaN(n.getTime())) return "---";
|
|
102
|
-
const v = n.getFullYear(), d = String(n.getMonth() + 1).padStart(2, "0"), L = String(n.getDate()).padStart(2, "0"),
|
|
103
|
-
return `${v}-${d}-${L} ${
|
|
104
|
+
const v = n.getFullYear(), d = String(n.getMonth() + 1).padStart(2, "0"), L = String(n.getDate()).padStart(2, "0"), g = String(n.getHours()).padStart(2, "0"), P = String(n.getMinutes()).padStart(2, "0"), Le = String(n.getSeconds()).padStart(2, "0");
|
|
105
|
+
return `${v}-${d}-${L} ${g}:${P}:${Le}`;
|
|
104
106
|
}, ke = () => {
|
|
105
|
-
if (!
|
|
107
|
+
if (!w.value) return;
|
|
106
108
|
let e = "";
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
if (w.value.TemplateType == 1)
|
|
110
|
+
e = le(
|
|
111
|
+
`${w.value.Template}?dispositionType=attachment&t=${(/* @__PURE__ */ new Date()).getTime()}`
|
|
112
|
+
);
|
|
113
|
+
else if (w.value.TemplateType == 2) {
|
|
114
|
+
const t = w.value.Template;
|
|
115
|
+
if (!t) {
|
|
116
|
+
k.error("缺少报表ID");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
Se(t);
|
|
120
|
+
}
|
|
121
|
+
window.open(e, "_self");
|
|
122
|
+
}, Se = async (e) => {
|
|
123
|
+
const t = `Id=${e}`, o = {
|
|
124
|
+
method: "post",
|
|
125
|
+
url: `${$e("ExportTable/OutputNew")}?${t}`,
|
|
126
|
+
headers: {
|
|
127
|
+
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
|
128
|
+
},
|
|
129
|
+
withCredentials: !0,
|
|
130
|
+
data: t
|
|
131
|
+
};
|
|
132
|
+
nt(o).then((a) => {
|
|
133
|
+
a.data.Success ? window.open(`${a.data.Url}`, "_self") : console.log(a);
|
|
134
|
+
}).catch((a) => {
|
|
135
|
+
console.log(a);
|
|
136
|
+
});
|
|
137
|
+
}, Ie = () => {
|
|
111
138
|
M.value = !0, te(A.value);
|
|
112
139
|
}, _e = () => {
|
|
113
140
|
M.value = !1;
|
|
114
|
-
},
|
|
141
|
+
}, Re = () => {
|
|
115
142
|
D.value = /* @__PURE__ */ new Set();
|
|
116
143
|
}, G = (e) => {
|
|
117
144
|
e && window.open(`${ve.value}/${e}`, "_self");
|
|
118
145
|
}, te = async (e) => {
|
|
119
146
|
oe(JSON.stringify({ rows: A.value, page: e }));
|
|
120
147
|
};
|
|
121
|
-
|
|
148
|
+
qe(
|
|
122
149
|
() => X,
|
|
123
150
|
(e) => {
|
|
124
151
|
e && (O.value = X.value);
|
|
@@ -126,22 +153,22 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
126
153
|
{ immediate: !0, deep: !0 }
|
|
127
154
|
);
|
|
128
155
|
const oe = (e) => {
|
|
129
|
-
|
|
156
|
+
Ke(`/ExcelImport/GetExcelImportRecords?importId=${F.value}`, e).then((t) => {
|
|
130
157
|
var o, a;
|
|
131
|
-
t.status !== 200 && (
|
|
158
|
+
t.status !== 200 && (k.error(u("获取上传记录失败!")), console.log(`获取上传记录失败!${JSON.stringify(t)}`)), Y.value = (o = t.data) == null ? void 0 : o.rows, Q.value = (a = t.data) == null ? void 0 : a.total;
|
|
132
159
|
}).catch((t) => {
|
|
133
160
|
console.log(t);
|
|
134
161
|
});
|
|
135
|
-
},
|
|
162
|
+
}, De = (e) => {
|
|
136
163
|
oe(JSON.stringify({ rows: e, page: Z.value }));
|
|
137
|
-
},
|
|
164
|
+
}, Te = async (e) => {
|
|
138
165
|
const t = `${j("/ExcelImport/GetExcelImportEvent")}?origin=${window.location.host}&importId=${e}`;
|
|
139
166
|
try {
|
|
140
167
|
const o = await fetch(t, {
|
|
141
168
|
method: "GET",
|
|
142
169
|
credentials: "include"
|
|
143
170
|
});
|
|
144
|
-
return o.ok ||
|
|
171
|
+
return o.ok || k.error(`Network response was not ok: ${o.statusText}`), await o.json();
|
|
145
172
|
} catch (o) {
|
|
146
173
|
return console.error("Failed to fetch Excel import event:", o), {};
|
|
147
174
|
}
|
|
@@ -149,8 +176,8 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
149
176
|
let t = "";
|
|
150
177
|
const o = window.location.hostname;
|
|
151
178
|
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 = V.value, `${t}${e}`;
|
|
152
|
-
}, j = (e) =>
|
|
153
|
-
if (
|
|
179
|
+
}, j = (e) => Ze() + e, $e = (e) => Qe() + e, xe = (e) => {
|
|
180
|
+
if (U.value = !0, !N.value[e])
|
|
154
181
|
try {
|
|
155
182
|
fetch(`${j("/Common/GetAllWebRoot")}?origin=${window.location.host}`, {
|
|
156
183
|
method: "GET",
|
|
@@ -160,70 +187,70 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
160
187
|
throw new Error("Network response was not ok");
|
|
161
188
|
let o = {};
|
|
162
189
|
t.json().then((a) => {
|
|
163
|
-
if (o = a,
|
|
190
|
+
if (o = a, N.value = o, !N.value) {
|
|
164
191
|
console.error("GetWebRoot 失败");
|
|
165
192
|
return;
|
|
166
193
|
}
|
|
167
|
-
V.value =
|
|
194
|
+
V.value = N.value[e], V.value || console.error(`GetWebRoot未找到key为${e}的数据`);
|
|
168
195
|
});
|
|
169
196
|
}).finally(() => {
|
|
170
|
-
|
|
197
|
+
U.value = !1;
|
|
171
198
|
});
|
|
172
199
|
} catch (t) {
|
|
173
|
-
|
|
200
|
+
U.value = !1, console.error("GetWebRoot 失败", t);
|
|
174
201
|
}
|
|
175
|
-
}, D = p(/* @__PURE__ */ new Set()),
|
|
202
|
+
}, D = p(/* @__PURE__ */ new Set()), T = Ae({}), Ee = (e) => {
|
|
176
203
|
B.value = !0;
|
|
177
204
|
const { file: t } = e, o = 100 * 1024 * 1024;
|
|
178
205
|
if (t.size > o) {
|
|
179
|
-
console.error("文件大小不能超过 1GB"),
|
|
206
|
+
console.error("文件大小不能超过 1GB"), k.success("文件大小不能超过 1GB");
|
|
180
207
|
return;
|
|
181
208
|
}
|
|
182
|
-
|
|
183
|
-
|
|
209
|
+
Ge(t.name), Fe(t).then((a) => {
|
|
210
|
+
Me(t, a);
|
|
184
211
|
});
|
|
185
|
-
},
|
|
212
|
+
}, Fe = (e) => new Promise((t, o) => {
|
|
186
213
|
const a = new FileReader();
|
|
187
214
|
a.onload = () => t(a.result), a.onerror = (n) => o(n), a.readAsDataURL(e);
|
|
188
|
-
}),
|
|
189
|
-
we(), D.value.has(e.name) ? (delete
|
|
215
|
+
}), Me = (e, t) => {
|
|
216
|
+
we(), D.value.has(e.name) ? (delete T[e.name], delete m.value[e.name], delete I.value[e.name], delete x.value[e.name], delete S[e.name], delete E.value[e.name]) : D.value.add(e.name);
|
|
190
217
|
const o = new FormData();
|
|
191
218
|
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");
|
|
192
219
|
const a = new XMLHttpRequest();
|
|
193
220
|
a.open("POST", `${le("fragmentupload?t=")}${Math.random()}`, !0), a.upload.onprogress = (n) => {
|
|
194
|
-
n.lengthComputable && (
|
|
221
|
+
n.lengthComputable && (T[e.name] = Math.round(n.loaded / n.total * 100));
|
|
195
222
|
}, a.onload = () => {
|
|
196
223
|
if (a.status === 200)
|
|
197
224
|
try {
|
|
198
225
|
const n = JSON.parse(a.responseText);
|
|
199
226
|
if (console.log("服务器返回值:", n), n.ACK !== "Success" || !n.FileId) {
|
|
200
|
-
|
|
227
|
+
k.error(`${e.name} 上传失败`);
|
|
201
228
|
return;
|
|
202
229
|
}
|
|
203
|
-
|
|
230
|
+
k.success(`${e.name} 上传成功`), T[e.name] = 100, setTimeout(() => {
|
|
204
231
|
O.value = {
|
|
205
232
|
...O.value,
|
|
206
233
|
// 保留原有字段
|
|
207
234
|
fileName: (e == null ? void 0 : e.name) || ""
|
|
208
235
|
// ES6可选链避免报错
|
|
209
|
-
},
|
|
236
|
+
}, I.value[e.name] || (I.value[e.name] = Ne(20)), Ue({
|
|
210
237
|
importId: F.value,
|
|
211
238
|
fileId: n.FileId,
|
|
212
|
-
wsSessionId:
|
|
239
|
+
wsSessionId: I.value[e.name],
|
|
213
240
|
file: e,
|
|
214
241
|
requestData: O.value
|
|
215
242
|
});
|
|
216
243
|
}, 500);
|
|
217
244
|
} catch (n) {
|
|
218
|
-
console.error("解析服务器返回值失败:", n),
|
|
245
|
+
console.error("解析服务器返回值失败:", n), k.error(`${e.name} 上传完成,但解析返回值失败`);
|
|
219
246
|
}
|
|
220
247
|
else
|
|
221
|
-
|
|
248
|
+
k.error(`${e.name} 上传失败`);
|
|
222
249
|
}, a.onerror = () => {
|
|
223
|
-
|
|
250
|
+
k.error(`${e.name} 上传异常`);
|
|
224
251
|
}, a.send(o);
|
|
225
|
-
},
|
|
226
|
-
|
|
252
|
+
}, Ue = (e) => {
|
|
253
|
+
ge.value(H.value, e, {}).then((t) => {
|
|
227
254
|
var n;
|
|
228
255
|
if (B.value = !1, console.log("processFiles 返回值:", t), t != null && t.success) {
|
|
229
256
|
let v = "文件导入成功";
|
|
@@ -231,7 +258,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
231
258
|
confirmButtonText: "确定",
|
|
232
259
|
callback: () => {
|
|
233
260
|
var d;
|
|
234
|
-
t != null && t.fileId && (
|
|
261
|
+
t != null && t.fileId && (x.value[(d = e == null ? void 0 : e.file) == null ? void 0 : d.name] = t.fileId, K.value = t.data, me.value && ye());
|
|
235
262
|
}
|
|
236
263
|
});
|
|
237
264
|
return;
|
|
@@ -244,30 +271,30 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
244
271
|
confirmButtonText: "知道了",
|
|
245
272
|
customClass: "custom-common-import-alert",
|
|
246
273
|
dangerouslyUseHTMLString: !0
|
|
247
|
-
}), t != null && t.fileId && (
|
|
274
|
+
}), t != null && t.fileId && (x.value[(n = e == null ? void 0 : e.file) == null ? void 0 : n.name] = t.fileId);
|
|
248
275
|
}).catch((t) => {
|
|
249
276
|
var a;
|
|
250
277
|
console.error("processFiles 失败", t);
|
|
251
278
|
let o = t == null ? void 0 : t.exMsg;
|
|
252
|
-
o || (o = u("处理过程中发生错误!")),
|
|
279
|
+
o || (o = u("处理过程中发生错误!")), E.value[(a = e == null ? void 0 : e.file) == null ? void 0 : a.name] = o;
|
|
253
280
|
});
|
|
254
|
-
},
|
|
281
|
+
}, Ne = (e, t) => {
|
|
255
282
|
t || (t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
|
256
283
|
let o = "";
|
|
257
284
|
for (let a = e; a > 0; --a)
|
|
258
285
|
o += t[Math.floor(Math.random() * t.length)];
|
|
259
286
|
return o;
|
|
260
|
-
},
|
|
287
|
+
}, Be = (e) => {
|
|
261
288
|
let t = "";
|
|
262
289
|
const { domain: o } = document;
|
|
263
290
|
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;
|
|
264
|
-
},
|
|
265
|
-
|
|
291
|
+
}, Oe = async () => await Ye(j("/Common/GetWsAuthCode")), Ge = (e) => {
|
|
292
|
+
S[e] = new WebSocket(Be("/excel-import/")), S[e].onmessage = (t) => {
|
|
266
293
|
var a, n;
|
|
267
294
|
if (t.data == "get-auth") {
|
|
268
|
-
|
|
295
|
+
Oe().then((v) => {
|
|
269
296
|
var d;
|
|
270
|
-
console.log("发送authCode:", v), (d =
|
|
297
|
+
console.log("发送authCode:", v), (d = S[e]) == null || d.send(`auth:${v}`);
|
|
271
298
|
});
|
|
272
299
|
return;
|
|
273
300
|
}
|
|
@@ -276,18 +303,18 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
276
303
|
if (o.MessageType === 0) {
|
|
277
304
|
const v = o.MessageIndex || 0, d = JSON.parse(o == null ? void 0 : o.Content);
|
|
278
305
|
if ((d == null ? void 0 : d.error) == !0) {
|
|
279
|
-
|
|
306
|
+
E.value[e] = d.message;
|
|
280
307
|
return;
|
|
281
308
|
}
|
|
282
|
-
(!m.value[e] || v > ((a = m.value[e]) == null ? void 0 : a.MessageIndex)) && (m.value[e] = d, m.value[e].MessageIndex = v, d != null && d.finished && ((n =
|
|
283
|
-
} else o.MessageType === 1 ?
|
|
284
|
-
},
|
|
309
|
+
(!m.value[e] || v > ((a = m.value[e]) == null ? void 0 : a.MessageIndex)) && (m.value[e] = d, m.value[e].MessageIndex = v, d != null && d.finished && ((n = S[e]) == null || n.close()));
|
|
310
|
+
} else o.MessageType === 1 ? I.value[e] = o.Content : console.log("进度:", o);
|
|
311
|
+
}, S[e].onerror = (t) => {
|
|
285
312
|
console.error("WebSocket 错误:", t), t instanceof ErrorEvent ? console.error("Error message:", t.message) : console.error("Unknown WebSocket error:", t);
|
|
286
|
-
},
|
|
313
|
+
}, S[e].onclose = () => {
|
|
287
314
|
console.log("WebSocket 连接关闭");
|
|
288
315
|
};
|
|
289
316
|
};
|
|
290
|
-
return
|
|
317
|
+
return Ve(() => {
|
|
291
318
|
if (!H.value) {
|
|
292
319
|
console.error("processImportUrl不能为空!");
|
|
293
320
|
return;
|
|
@@ -296,38 +323,38 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
296
323
|
console.error("importId不能为空!");
|
|
297
324
|
return;
|
|
298
325
|
}
|
|
299
|
-
|
|
300
|
-
|
|
326
|
+
Te(F.value).then((t) => {
|
|
327
|
+
w.value = t;
|
|
301
328
|
});
|
|
302
329
|
const e = window.location.hostname;
|
|
303
|
-
e.includes("localhost") || e.includes("127.0.0.1") || e.includes("yahee.com") ||
|
|
304
|
-
}),
|
|
330
|
+
e.includes("localhost") || e.includes("127.0.0.1") || e.includes("yahee.com") || xe("PictureUrlRoot");
|
|
331
|
+
}), Je(() => {
|
|
305
332
|
D.value.forEach((e) => {
|
|
306
333
|
var t;
|
|
307
|
-
(t =
|
|
334
|
+
(t = S[e]) == null || t.close();
|
|
308
335
|
});
|
|
309
336
|
}), (e, t) => (c(), y(ae, null, [
|
|
310
337
|
s(l(se), {
|
|
311
338
|
modelValue: l(q),
|
|
312
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) =>
|
|
313
|
-
title: l(u)(l(
|
|
339
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => je(q) ? q.value = o : null),
|
|
340
|
+
title: l(u)(l(fe)),
|
|
314
341
|
width: "900",
|
|
315
342
|
"before-close": ee,
|
|
316
343
|
draggable: "",
|
|
317
|
-
onOpen:
|
|
344
|
+
onOpen: Re
|
|
318
345
|
}, {
|
|
319
346
|
default: r(() => {
|
|
320
347
|
var o;
|
|
321
348
|
return [
|
|
322
349
|
re((c(), y("div", null, [
|
|
323
|
-
|
|
350
|
+
$("div", st, [
|
|
324
351
|
ne(e.$slots, "form")
|
|
325
352
|
]),
|
|
326
|
-
s(l(
|
|
353
|
+
s(l(_), null, {
|
|
327
354
|
default: r(() => [
|
|
328
|
-
s(l(
|
|
355
|
+
s(l(tt), {
|
|
329
356
|
class: "upload-record",
|
|
330
|
-
"http-request":
|
|
357
|
+
"http-request": Ee,
|
|
331
358
|
accept: ".xls,.xlsx,.txt,.csv",
|
|
332
359
|
"show-file-list": !1,
|
|
333
360
|
multiple: e.multiple,
|
|
@@ -344,7 +371,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
344
371
|
loading: B.value
|
|
345
372
|
}, {
|
|
346
373
|
default: r(() => [
|
|
347
|
-
|
|
374
|
+
f(i(l(u)("上传文件")), 1)
|
|
348
375
|
]),
|
|
349
376
|
_: 1
|
|
350
377
|
}, 8, ["disabled", "loading"])
|
|
@@ -354,121 +381,121 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
354
381
|
]),
|
|
355
382
|
_: 1
|
|
356
383
|
}),
|
|
357
|
-
(o = D.value) != null && o.size ? (c(), y("div",
|
|
358
|
-
(c(!0), y(ae, null,
|
|
384
|
+
(o = D.value) != null && o.size ? (c(), y("div", it, [
|
|
385
|
+
(c(!0), y(ae, null, He(D.value, (a) => {
|
|
359
386
|
var n, v;
|
|
360
387
|
return c(), y("div", {
|
|
361
388
|
key: a,
|
|
362
389
|
class: "uploadProgress"
|
|
363
390
|
}, [
|
|
364
|
-
s(l(
|
|
391
|
+
s(l(_), { style: { "margin-bottom": "5px" } }, {
|
|
365
392
|
default: r(() => [
|
|
366
|
-
s(l(
|
|
393
|
+
s(l(C), { span: 18 }, {
|
|
367
394
|
default: r(() => [
|
|
368
395
|
s(l(z), {
|
|
369
396
|
type: "primary",
|
|
370
397
|
underline: !1,
|
|
371
398
|
style: { font: "inherit" },
|
|
372
|
-
onClick: t[0] || (t[0] = (d) => G(
|
|
399
|
+
onClick: t[0] || (t[0] = (d) => G(w.value.Template))
|
|
373
400
|
}, {
|
|
374
401
|
default: r(() => [
|
|
375
|
-
|
|
402
|
+
f(i(a), 1)
|
|
376
403
|
]),
|
|
377
404
|
_: 2
|
|
378
405
|
}, 1024)
|
|
379
406
|
]),
|
|
380
407
|
_: 2
|
|
381
408
|
}, 1024),
|
|
382
|
-
|
|
409
|
+
T[a] ? (c(), b(l(C), {
|
|
383
410
|
key: 0,
|
|
384
411
|
span: 6
|
|
385
412
|
}, {
|
|
386
413
|
default: r(() => [
|
|
387
|
-
|
|
414
|
+
T[a] == 100 ? (c(), y("span", ut, i(l(u)("文件上传完成")), 1)) : (c(), y("span", dt, i(l(u)("文件正在上传,进度") + `${T[a]}% ...`), 1))
|
|
388
415
|
]),
|
|
389
416
|
_: 2
|
|
390
417
|
}, 1024)) : h("", !0)
|
|
391
418
|
]),
|
|
392
419
|
_: 2
|
|
393
420
|
}, 1024),
|
|
394
|
-
|
|
421
|
+
I.value[a] ? (c(), b(l(_), {
|
|
395
422
|
key: 0,
|
|
396
423
|
style: { "margin-bottom": "5px" }
|
|
397
424
|
}, {
|
|
398
425
|
default: r(() => [
|
|
399
|
-
|
|
426
|
+
f(i(l(u)("导入ID")) + ":" + i(I.value[a]), 1)
|
|
400
427
|
]),
|
|
401
428
|
_: 2
|
|
402
429
|
}, 1024)) : h("", !0),
|
|
403
|
-
|
|
430
|
+
E.value[a] ? (c(), b(l(_), {
|
|
404
431
|
key: 1,
|
|
405
432
|
style: { "margin-bottom": "5px" }
|
|
406
433
|
}, {
|
|
407
434
|
default: r(() => [
|
|
408
|
-
|
|
435
|
+
$("span", ct, i(l(u)(E.value[a])), 1)
|
|
409
436
|
]),
|
|
410
437
|
_: 2
|
|
411
438
|
}, 1024)) : h("", !0),
|
|
412
|
-
(n = m.value[a]) != null && n.totalRowCount ? (c(),
|
|
439
|
+
(n = m.value[a]) != null && n.totalRowCount ? (c(), b(l(_), {
|
|
413
440
|
key: 2,
|
|
414
441
|
style: { "margin-bottom": "5px" }
|
|
415
442
|
}, {
|
|
416
443
|
default: r(() => {
|
|
417
444
|
var d, L;
|
|
418
445
|
return [
|
|
419
|
-
s(l(
|
|
446
|
+
s(l(C), { span: 6 }, {
|
|
420
447
|
default: r(() => {
|
|
421
|
-
var
|
|
448
|
+
var g, P;
|
|
422
449
|
return [
|
|
423
|
-
|
|
450
|
+
f(i(l(u)("工作簿")) + ":" + i((g = m.value[a]) == null ? void 0 : g.currentSheet) + "/" + i((P = m.value[a]) == null ? void 0 : P.sheetCount), 1)
|
|
424
451
|
];
|
|
425
452
|
}),
|
|
426
453
|
_: 2
|
|
427
454
|
}, 1024),
|
|
428
|
-
s(l(
|
|
455
|
+
s(l(C), { span: 6 }, {
|
|
429
456
|
default: r(() => {
|
|
430
|
-
var
|
|
457
|
+
var g;
|
|
431
458
|
return [
|
|
432
|
-
|
|
459
|
+
f(i(l(u)("总行数")) + ":" + i((g = m.value[a]) == null ? void 0 : g.totalRowCount), 1)
|
|
433
460
|
];
|
|
434
461
|
}),
|
|
435
462
|
_: 2
|
|
436
463
|
}, 1024),
|
|
437
|
-
s(l(
|
|
464
|
+
s(l(C), { span: 6 }, {
|
|
438
465
|
default: r(() => {
|
|
439
|
-
var
|
|
466
|
+
var g;
|
|
440
467
|
return [
|
|
441
|
-
|
|
468
|
+
f(i(l(u)("成功行数")) + ":" + i((g = m.value[a]) == null ? void 0 : g.successRowCount), 1)
|
|
442
469
|
];
|
|
443
470
|
}),
|
|
444
471
|
_: 2
|
|
445
472
|
}, 1024),
|
|
446
|
-
(d = m.value[a]) != null && d.failedRowCount ? h("", !0) : (c(),
|
|
473
|
+
(d = m.value[a]) != null && d.failedRowCount ? h("", !0) : (c(), b(l(C), {
|
|
447
474
|
key: 0,
|
|
448
475
|
span: 6
|
|
449
476
|
}, {
|
|
450
477
|
default: r(() => [
|
|
451
|
-
|
|
478
|
+
f(i(l(u)("失败行数")) + ":0 ", 1)
|
|
452
479
|
]),
|
|
453
480
|
_: 1
|
|
454
481
|
})),
|
|
455
|
-
(L = m.value[a]) != null && L.failedRowCount ? (c(),
|
|
482
|
+
(L = m.value[a]) != null && L.failedRowCount ? (c(), b(l(C), {
|
|
456
483
|
key: 1,
|
|
457
484
|
span: 6,
|
|
458
485
|
style: { display: "flex" }
|
|
459
486
|
}, {
|
|
460
487
|
default: r(() => [
|
|
461
|
-
|
|
488
|
+
f(i(l(u)("失败行数")) + ": ", 1),
|
|
462
489
|
s(l(z), {
|
|
463
490
|
type: "primary",
|
|
464
491
|
underline: !1,
|
|
465
|
-
title:
|
|
466
|
-
onClick: (
|
|
492
|
+
title: x.value[a],
|
|
493
|
+
onClick: (g) => G(x.value[a])
|
|
467
494
|
}, {
|
|
468
495
|
default: r(() => {
|
|
469
|
-
var
|
|
496
|
+
var g;
|
|
470
497
|
return [
|
|
471
|
-
|
|
498
|
+
f(i((g = m.value[a]) == null ? void 0 : g.failedRowCount), 1)
|
|
472
499
|
];
|
|
473
500
|
}),
|
|
474
501
|
_: 2
|
|
@@ -480,52 +507,52 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
480
507
|
}),
|
|
481
508
|
_: 2
|
|
482
509
|
}, 1024)) : h("", !0),
|
|
483
|
-
t[3] || (t[3] =
|
|
484
|
-
(v = m.value[a]) != null && v.totalRowCount ? (c(),
|
|
510
|
+
t[3] || (t[3] = $("br", null, null, -1)),
|
|
511
|
+
(v = m.value[a]) != null && v.totalRowCount ? (c(), b(l(ot), {
|
|
485
512
|
key: 3,
|
|
486
513
|
percentage: be(a)
|
|
487
514
|
}, null, 8, ["percentage"])) : h("", !0),
|
|
488
|
-
|
|
515
|
+
$("div", pt, [
|
|
489
516
|
ne(e.$slots, "resultMessage")
|
|
490
517
|
])
|
|
491
518
|
]);
|
|
492
519
|
}), 128))
|
|
493
520
|
])) : h("", !0),
|
|
494
|
-
s(l(
|
|
521
|
+
s(l(_), { style: { "margin-top": "10px" } }, {
|
|
495
522
|
default: r(() => [
|
|
496
|
-
s(l(
|
|
523
|
+
s(l(lt), { style: { width: "860px" } }, {
|
|
497
524
|
header: r(() => [
|
|
498
|
-
e.displayGetTemplate ? (c(), y("div",
|
|
499
|
-
|
|
525
|
+
e.displayGetTemplate ? (c(), y("div", mt, [
|
|
526
|
+
$("span", null, i(l(u)("说明")), 1)
|
|
500
527
|
])) : h("", !0)
|
|
501
528
|
]),
|
|
502
529
|
footer: r(() => [
|
|
503
|
-
s(l(
|
|
530
|
+
s(l(_), null, {
|
|
504
531
|
default: r(() => [
|
|
505
|
-
s(l(
|
|
506
|
-
s(l(
|
|
532
|
+
s(l(C), { span: 10 }),
|
|
533
|
+
s(l(C), {
|
|
507
534
|
span: 14,
|
|
508
535
|
style: { display: "flex", "justify-content": "flex-end" }
|
|
509
536
|
}, {
|
|
510
537
|
default: r(() => [
|
|
511
|
-
e.displayGetTemplate &&
|
|
538
|
+
e.displayGetTemplate && w.value.TemplateType != 0 ? (c(), b(l(W), {
|
|
512
539
|
key: 0,
|
|
513
540
|
style: { "background-color": "rgba(89, 191, 87, 1)", color: "white", "font-weight": "bold" },
|
|
514
541
|
size: "large",
|
|
515
542
|
onClick: ke
|
|
516
543
|
}, {
|
|
517
544
|
default: r(() => [
|
|
518
|
-
|
|
545
|
+
f(i(l(u)("获取模板")), 1)
|
|
519
546
|
]),
|
|
520
547
|
_: 1
|
|
521
548
|
})) : h("", !0),
|
|
522
549
|
s(l(W), {
|
|
523
550
|
style: { "background-color": "rgba(89, 191, 87, 1)", color: "white", "font-weight": "bold" },
|
|
524
551
|
size: "large",
|
|
525
|
-
onClick:
|
|
552
|
+
onClick: Ie
|
|
526
553
|
}, {
|
|
527
554
|
default: r(() => [
|
|
528
|
-
|
|
555
|
+
f(i(l(u)("导入记录")), 1)
|
|
529
556
|
]),
|
|
530
557
|
_: 1
|
|
531
558
|
}),
|
|
@@ -535,7 +562,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
535
562
|
onClick: ee
|
|
536
563
|
}, {
|
|
537
564
|
default: r(() => [
|
|
538
|
-
|
|
565
|
+
f(i(l(u)("关闭")), 1)
|
|
539
566
|
]),
|
|
540
567
|
_: 1
|
|
541
568
|
})
|
|
@@ -549,8 +576,8 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
549
576
|
default: r(() => [
|
|
550
577
|
e.displayGetTemplate ? (c(), y("div", {
|
|
551
578
|
key: 0,
|
|
552
|
-
innerHTML:
|
|
553
|
-
}, null, 8,
|
|
579
|
+
innerHTML: w.value.Description
|
|
580
|
+
}, null, 8, ft)) : h("", !0)
|
|
554
581
|
]),
|
|
555
582
|
_: 1
|
|
556
583
|
})
|
|
@@ -558,7 +585,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
558
585
|
_: 1
|
|
559
586
|
})
|
|
560
587
|
])), [
|
|
561
|
-
[l(ie),
|
|
588
|
+
[l(ie), U.value]
|
|
562
589
|
])
|
|
563
590
|
];
|
|
564
591
|
}),
|
|
@@ -573,8 +600,8 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
573
600
|
draggable: ""
|
|
574
601
|
}, {
|
|
575
602
|
default: r(() => [
|
|
576
|
-
|
|
577
|
-
re((c(),
|
|
603
|
+
$("div", null, [
|
|
604
|
+
re((c(), b(l(at), {
|
|
578
605
|
border: "",
|
|
579
606
|
"row-key": "id",
|
|
580
607
|
data: Y.value,
|
|
@@ -595,7 +622,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
595
622
|
"min-width": "100"
|
|
596
623
|
}, {
|
|
597
624
|
default: r((o) => [
|
|
598
|
-
|
|
625
|
+
f(i(Ce(o.row)), 1)
|
|
599
626
|
]),
|
|
600
627
|
_: 1
|
|
601
628
|
}, 8, ["label"]),
|
|
@@ -604,7 +631,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
604
631
|
label: l(u)("导入人")
|
|
605
632
|
}, {
|
|
606
633
|
default: r((o) => [
|
|
607
|
-
|
|
634
|
+
f(i(o.row.CreatedBy ? l(Xe)(o.row.CreatedBy) : "-"), 1)
|
|
608
635
|
]),
|
|
609
636
|
_: 1
|
|
610
637
|
}, 8, ["label"]),
|
|
@@ -621,7 +648,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
621
648
|
onClick: (a) => G(o.row.InFileId)
|
|
622
649
|
}, {
|
|
623
650
|
default: r(() => [
|
|
624
|
-
|
|
651
|
+
f(i(o.row.InFileId), 1)
|
|
625
652
|
]),
|
|
626
653
|
_: 2
|
|
627
654
|
}, 1032, ["onClick"])
|
|
@@ -641,7 +668,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
641
668
|
onClick: (a) => G(o.row.OutFileId)
|
|
642
669
|
}, {
|
|
643
670
|
default: r(() => [
|
|
644
|
-
|
|
671
|
+
f(i(o.row.OutFileId), 1)
|
|
645
672
|
]),
|
|
646
673
|
_: 2
|
|
647
674
|
}, 1032, ["onClick"])
|
|
@@ -655,7 +682,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
655
682
|
width: "200"
|
|
656
683
|
}, {
|
|
657
684
|
default: r((o) => [
|
|
658
|
-
o.row.ErrorMessage ? (c(), y("div",
|
|
685
|
+
o.row.ErrorMessage ? (c(), y("div", gt, i(o.row.ErrorMessage), 1)) : h("", !0)
|
|
659
686
|
]),
|
|
660
687
|
_: 1
|
|
661
688
|
}, 8, ["label"]),
|
|
@@ -669,7 +696,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
669
696
|
}, 8, ["data", "empty-text"])), [
|
|
670
697
|
[l(ie), he.value]
|
|
671
698
|
]),
|
|
672
|
-
s(l(
|
|
699
|
+
s(l(rt), {
|
|
673
700
|
"current-page": Z.value,
|
|
674
701
|
"page-sizes": [50, 100, 150, 200],
|
|
675
702
|
"page-size": A.value,
|
|
@@ -677,7 +704,7 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
677
704
|
total: Q.value,
|
|
678
705
|
class: "page-pagination",
|
|
679
706
|
onSizeChange: te,
|
|
680
|
-
onCurrentChange:
|
|
707
|
+
onCurrentChange: De
|
|
681
708
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
682
709
|
])
|
|
683
710
|
]),
|
|
@@ -687,5 +714,5 @@ const lt = { class: "form-slot" }, at = { key: 0 }, rt = { key: 0 }, nt = { key:
|
|
|
687
714
|
}
|
|
688
715
|
});
|
|
689
716
|
export {
|
|
690
|
-
|
|
717
|
+
Zt as default
|
|
691
718
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
const o = () => {
|
|
2
2
|
const e = window.location.hostname;
|
|
3
3
|
return e.includes("localhost") ? "http://localhost:33658" : e.includes("yahee.com") ? "http://qas-newerp.yahee.com.cn:8088/Common/latest/" : "//newserp.yaheecloud.com/common/";
|
|
4
|
+
}, t = () => {
|
|
5
|
+
const e = window.location.hostname;
|
|
6
|
+
return e.includes("localhost") ? "http://localhost:33658" : e.includes("yahee.com") ? "http://qas-newerp.yahee.com.cn:8088/PMS/Latest/" : "https://newerp.yaheecloud.com/PMS/Report/";
|
|
4
7
|
};
|
|
5
8
|
export {
|
|
9
|
+
t as getDomainBaseReportUrl,
|
|
6
10
|
o as getDomainBaseUrl
|
|
7
11
|
};
|
package/package.json
CHANGED