yahee-components 0.0.108 → 0.0.110

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