yahee-components 0.0.93 → 0.0.94-test1

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