yahee-components 0.0.75 → 0.0.81

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 (62) 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/api/server.js +24 -19
  5. package/es/api/tool.js +31 -28
  6. package/es/border-wrap/border-wrap.vue.js +64 -95
  7. package/es/border-wrap/border-wrap.vue2.js +46 -2
  8. package/es/common-import/common-import.vue.js +369 -640
  9. package/es/common-import/common-import.vue2.js +328 -2
  10. package/es/common-import/index.js +3 -3
  11. package/es/common-import/props.js +4 -1
  12. package/es/complex-search/complex-search.vue.js +15 -15
  13. package/es/copy/copy.vue.js +37 -55
  14. package/es/copy/copy.vue2.js +34 -2
  15. package/es/copy/index.js +3 -3
  16. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
  17. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
  18. package/es/drop-down-condition/drop-down-condition.vue.js +113 -213
  19. package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
  20. package/es/echart-gauge/echart-gauge.vue.js +12 -140
  21. package/es/echart-gauge/echart-gauge.vue2.js +147 -2
  22. package/es/echart-gauge/index.js +3 -3
  23. package/es/image-upload/image-upload.vue.js +109 -170
  24. package/es/image-upload/image-upload.vue2.js +91 -2
  25. package/es/image-upload/index.js +3 -3
  26. package/es/input/index.js +3 -3
  27. package/es/input/input.vue.js +17 -38
  28. package/es/input/input.vue2.js +33 -2
  29. package/es/left-condition/index.js +3 -3
  30. package/es/left-condition/left-condition-sub.vue.js +32 -91
  31. package/es/left-condition/left-condition-sub.vue2.js +76 -2
  32. package/es/left-condition/left-condition.vue.js +70 -218
  33. package/es/left-condition/left-condition.vue2.js +160 -2
  34. package/es/left-condition-enum/index.js +3 -3
  35. package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
  36. package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
  37. package/es/operation-log/operation-log-content.vue.js +71 -92
  38. package/es/operation-log/operation-log-content.vue2.js +39 -2
  39. package/es/operation-log/operation-log-dialog.vue.js +46 -68
  40. package/es/operation-log/operation-log-dialog.vue2.js +38 -2
  41. package/es/operation-log/operation-log-form.vue.js +108 -183
  42. package/es/operation-log/operation-log-form.vue2.js +104 -2
  43. package/es/operation-log/operation-log.vue.js +119 -228
  44. package/es/operation-log/operation-log.vue2.js +135 -2
  45. package/es/packages/components/api/log-server.js +6 -6
  46. package/es/packages/components/api/server.js +18 -20
  47. package/es/packages/components/api/tool.js +35 -32
  48. package/es/packages/components/api/upload-server.js +1 -1
  49. package/es/packages/components/hooks/useEcharts.js +19 -19
  50. package/es/packages/components/hooks/useImg.js +8 -8
  51. package/es/scale-screen/index.js +4 -4
  52. package/es/scale-screen/scale-screen.vue.js +19 -126
  53. package/es/scale-screen/scale-screen.vue2.js +125 -2
  54. package/es/utils/translate.js +21 -21
  55. package/package.json +46 -46
  56. package/readme.md +249 -249
  57. package/types/src/common-import/common-import.vue.d.ts +10 -0
  58. package/types/src/common-import/index.d.ts +25 -0
  59. package/types/src/common-import/props.d.ts +19 -0
  60. package/types/src/installs.d.ts +25 -0
  61. package/types/src/left-condition-enum/left-condition-enum.d.ts +3 -0
  62. package/es/packages/components/api/common/index.js +0 -7
@@ -1,4 +1,330 @@
1
- import f from "./common-import.vue.js";
1
+ import { defineComponent, mergeDefaults, toRefs, ref, watch, reactive, onMounted, onUnmounted } from "vue";
2
+ import { translateEmployeeName, M2 } from "../utils/translate.js";
3
+ import { get } from "../packages/components/api/log-server.js";
4
+ import { getDomainBaseUrl } from "../utils/get-domain-base-url.js";
5
+ import { getUploadRecord } from "../packages/components/api/common-import/index.js";
6
+ import { defaultCommonImportProps } from "./props.js";
7
+ import { ElMessage, vLoading, ElProgress, ElPagination, ElCard, ElUpload, ElTableColumn, ElTable, ElCol, ElLink, ElButton, ElRow, ElDialog, ElMessageBox } 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 __default__ = {
34
+ name: "YaheeCommonImport",
35
+ inheritAttrs: !1
36
+ }, _sfc_main = /* @__PURE__ */ defineComponent({
37
+ ...__default__,
38
+ props: /* @__PURE__ */ mergeDefaults({
39
+ isShowDialog: { type: Boolean, required: !1 },
40
+ isShowResponseDataMessage: { type: Boolean, required: !1 },
41
+ title: { type: String, required: !0 },
42
+ importId: { type: String, required: !0 },
43
+ multiple: { type: Boolean, required: !1 },
44
+ ProcessRequestData: { type: null, required: !1 },
45
+ AutoCompleteResult: { type: Boolean, required: !1 },
46
+ displayGetTemplate: { type: Boolean, required: !1 },
47
+ processImportUrl: { type: String, required: !0 },
48
+ requestData: { type: Object, required: !1 },
49
+ uploadRecord: { type: Function, required: !1 },
50
+ uploadFile: { type: Function, required: !1 },
51
+ uploadDisabled: { type: Boolean, required: !1 },
52
+ filePath: { type: String, required: !1 },
53
+ processFiles: { type: Function, required: !1 }
54
+ }, defaultCommonImportProps()),
55
+ emits: ["setIsShowDialog", "setResponseData", "submit", "reloadTableData"],
56
+ setup(__props, { expose: __expose, emit: __emit }) {
57
+ __expose();
58
+ const props = __props, {
59
+ isShowDialog,
60
+ isShowResponseDataMessage,
61
+ title,
62
+ importId,
63
+ processImportUrl,
64
+ requestData,
65
+ processFiles,
66
+ filePath
67
+ } = toRefs(props), isShowCoreImportRecordDialog = ref(!1), tableLoading = ref(!1), initWebRootUrlLoading = ref(!1), tableData = ref([]), importProgress = ref({}), pageNo = ref(1), totalNum = ref(1), pageSize = ref(50), sessionIds = ref({}), problemFiles = ref({}), responseData = ref({}), socket = {}, eventData = ref({}), errorMessage = ref({}), allWebRoot = ref({}), webRoot = ref(""), uploadLoading = ref(!1), localRequestData = ref({
68
+ siteId: null,
69
+ reportTime: null,
70
+ fileName: ""
71
+ }), emit = __emit, handleClose = () => {
72
+ emit("setIsShowDialog", !1);
73
+ }, emitResponseData = () => {
74
+ emit("setResponseData", responseData.value);
75
+ }, triggerSubmit = () => {
76
+ emit("submit");
77
+ }, getProgressPercentage = (e) => {
78
+ var t, o, r;
79
+ return Number(
80
+ ((((t = importProgress.value[e]) == null ? void 0 : t.successRowCount) + ((o = importProgress.value[e]) == null ? void 0 : o.failedRowCount)) / ((r = importProgress.value[e]) == null ? void 0 : r.totalRowCount) * 100).toFixed(0)
81
+ );
82
+ }, getFormattedDate = (row) => {
83
+ const utcDate = eval(
84
+ `new Date(${row.CreateOn.replace(/\d+(?=-[^-]+$)/, (e) => parseInt(e, 10) - 1).match(/\d+/g)})`
85
+ ), localDate = new Date(utcDate.getTime() - utcDate.getTimezoneOffset() * 6e4);
86
+ return LongDate(localDate, "---");
87
+ }, LongDate = (e, t) => {
88
+ const o = new Date(e);
89
+ let r = 0, a = 0, l = 0, s = 0, i = 0, n = "";
90
+ return r = o.getFullYear(), r === 1 || r === 1970 || r === 1900 || isNaN(r) ? t !== void 0 ? t : "---" : (a = o.getMonth() + 1, l = o.getDate(), s = o.getHours(), i = o.getMinutes(), n = `${r}-`, n += a >= 10 ? `${a}-` : `0${a}-`, n += l >= 10 ? l : `0${l}`, n += s >= 10 ? ` ${s}` : ` 0${s}`, n += i >= 10 ? `:${i}` : `:0${i}`, n);
91
+ }, getTemplateFile = () => {
92
+ if (!eventData.value) return;
93
+ let e = "";
94
+ eventData.value.TemplateType == 1 ? e = getFileServiceUrl(
95
+ `${eventData.value.Template}?dispositionType=attachment&t=${(/* @__PURE__ */ new Date()).getTime()}`
96
+ ) : eventData.value.TemplateType == 2 && console.log("获取模板文件失败,暂不支持报表导出"), window.open(e, "_self");
97
+ }, displayRecords = () => {
98
+ isShowCoreImportRecordDialog.value = !0, handleSizeChange(pageSize.value);
99
+ }, handleCloseRecord = () => {
100
+ isShowCoreImportRecordDialog.value = !1;
101
+ }, handleOpen = () => {
102
+ fileNames.value = /* @__PURE__ */ new Set();
103
+ }, getFile = (e) => {
104
+ e && window.open(`${filePath.value}/${e}`, "_self");
105
+ }, handleSizeChange = async (e) => {
106
+ getUploadRecordDataList(JSON.stringify({ rows: pageSize.value, page: e }));
107
+ };
108
+ watch(
109
+ () => requestData,
110
+ (e) => {
111
+ e && (localRequestData.value = requestData.value);
112
+ },
113
+ { immediate: !0, deep: !0 }
114
+ );
115
+ const getUploadRecordDataList = (e) => {
116
+ getUploadRecord(`/ExcelImport/GetExcelImportRecords?importId=${importId.value}`, e).then((t) => {
117
+ var o, r;
118
+ t.status !== 200 && (ElMessage.error(M2("获取上传记录失败!")), console.log(`获取上传记录失败!${JSON.stringify(t)}`)), tableData.value = (o = t.data) == null ? void 0 : o.rows, totalNum.value = (r = t.data) == null ? void 0 : r.total;
119
+ }).catch((t) => {
120
+ console.log(t);
121
+ });
122
+ }, handleCurrentChange = (e) => {
123
+ getUploadRecordDataList(JSON.stringify({ rows: e, page: pageNo.value }));
124
+ }, fetchExcelImportEvent = async (e) => {
125
+ const t = `${getCommonUrl("/ExcelImport/GetExcelImportEvent")}?origin=${window.location.host}&importId=${e}`;
126
+ try {
127
+ const o = await fetch(t, {
128
+ method: "GET",
129
+ credentials: "include"
130
+ });
131
+ return o.ok || ElMessage.error(`Network response was not ok: ${o.statusText}`), await o.json();
132
+ } catch (o) {
133
+ return console.error("Failed to fetch Excel import event:", o), {};
134
+ }
135
+ }, getFileServiceUrl = (e) => {
136
+ let t = "";
137
+ const o = window.location.hostname;
138
+ return o.includes("localhost") || o.includes("127.0.0.1") || o.includes("yahee.com") ? t = "http://qas-service.yahee.com.cn:8088/FMSService/Latest/" : t = webRoot.value, `${t}${e}`;
139
+ }, getCommonUrl = (e) => getDomainBaseUrl() + e, getWebRoot = (e) => {
140
+ if (initWebRootUrlLoading.value = !0, e && !allWebRoot.value[e])
141
+ try {
142
+ fetch(`${getCommonUrl("/Common/GetAllWebRoot")}?origin=${window.location.host}`, {
143
+ method: "GET",
144
+ credentials: "include"
145
+ }).then((t) => {
146
+ if (!t.ok)
147
+ throw new Error("Network response was not ok");
148
+ let o = {};
149
+ t.json().then((r) => {
150
+ if (o = r, allWebRoot.value = o, !allWebRoot.value) {
151
+ console.error("GetWebRoot 失败");
152
+ return;
153
+ }
154
+ webRoot.value = allWebRoot.value[e], webRoot.value || console.error(`GetWebRoot未找到key为${e}的数据`);
155
+ });
156
+ }).finally(() => {
157
+ initWebRootUrlLoading.value = !1;
158
+ });
159
+ } catch (t) {
160
+ initWebRootUrlLoading.value = !1, console.error("GetWebRoot 失败", t);
161
+ }
162
+ }, fileNames = ref(/* @__PURE__ */ new Set()), uploadProgress = reactive({}), handleFileUpload = (e) => {
163
+ uploadLoading.value = !0;
164
+ const { file: t } = e, o = 100 * 1024 * 1024;
165
+ if (t.size > o) {
166
+ console.error("文件大小不能超过 1GB"), ElMessage.success("文件大小不能超过 1GB");
167
+ return;
168
+ }
169
+ setupWebSocket(t.name), readFileAsBase64(t).then((r) => {
170
+ uploadConfigFile(t, r);
171
+ });
172
+ }, readFileAsBase64 = (e) => new Promise((t, o) => {
173
+ const r = new FileReader();
174
+ r.onload = () => t(r.result), r.onerror = (a) => o(a), r.readAsDataURL(e);
175
+ }), uploadConfigFile = (e, t) => {
176
+ triggerSubmit(), fileNames.value.has(e.name) ? (delete uploadProgress[e.name], delete importProgress.value[e.name], delete sessionIds.value[e.name], delete problemFiles.value[e.name], delete socket[e.name], delete errorMessage.value[e.name]) : fileNames.value.add(e.name);
177
+ const o = new FormData();
178
+ 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");
179
+ const r = new XMLHttpRequest();
180
+ r.open("POST", `${getFileServiceUrl("fragmentupload?t=")}${Math.random()}`, !0), r.upload.onprogress = (a) => {
181
+ a.lengthComputable && (uploadProgress[e.name] = Math.round(a.loaded / a.total * 100));
182
+ }, r.onload = () => {
183
+ if (r.status === 200)
184
+ try {
185
+ const a = JSON.parse(r.responseText);
186
+ if (console.log("服务器返回值:", a), a.ACK !== "Success" || !a.FileId) {
187
+ ElMessage.error(`${e.name} 上传失败`);
188
+ return;
189
+ }
190
+ ElMessage.success(`${e.name} 上传成功`), uploadProgress[e.name] = 100, setTimeout(() => {
191
+ localRequestData.value = {
192
+ ...localRequestData.value,
193
+ // 保留原有字段
194
+ fileName: (e == null ? void 0 : e.name) || ""
195
+ // ES6可选链避免报错
196
+ }, sessionIds.value[e.name] || (sessionIds.value[e.name] = getRandomStr(20)), processFile({
197
+ importId: importId.value,
198
+ fileId: a.FileId,
199
+ wsSessionId: sessionIds.value[e.name],
200
+ file: e,
201
+ requestData: localRequestData.value
202
+ });
203
+ }, 500);
204
+ } catch (a) {
205
+ console.error("解析服务器返回值失败:", a), ElMessage.error(`${e.name} 上传完成,但解析返回值失败`);
206
+ }
207
+ else
208
+ ElMessage.error(`${e.name} 上传失败`);
209
+ }, r.onerror = () => {
210
+ ElMessage.error(`${e.name} 上传异常`);
211
+ }, r.send(o);
212
+ }, processFile = (e) => {
213
+ processFiles.value(processImportUrl.value, e, {}).then((t) => {
214
+ var a;
215
+ if (uploadLoading.value = !1, console.log("processFiles 返回值:", t), t != null && t.success) {
216
+ ElMessageBox.alert("文件导入成功", "操作成功", {
217
+ confirmButtonText: "确定",
218
+ callback: () => {
219
+ var l;
220
+ t != null && t.fileId && (problemFiles.value[(l = e == null ? void 0 : e.file) == null ? void 0 : l.name] = t.fileId, responseData.value = t.data, isShowResponseDataMessage.value && emitResponseData());
221
+ }
222
+ });
223
+ return;
224
+ }
225
+ const r = (Array.isArray(t == null ? void 0 : t.messages) ? t.messages : ["未知错误"]).join(`
226
+ `) + `
227
+
228
+ (可使用鼠标滚轮滚动查看)`;
229
+ ElMessageBox.alert(r, "导入错误", {
230
+ confirmButtonText: "知道了",
231
+ customClass: "custom-common-import-alert",
232
+ dangerouslyUseHTMLString: !0
233
+ }), t != null && t.fileId && (problemFiles.value[(a = e == null ? void 0 : e.file) == null ? void 0 : a.name] = t.fileId);
234
+ }).catch((t) => {
235
+ var r;
236
+ console.error("processFiles 失败", t);
237
+ let o = t == null ? void 0 : t.exMsg;
238
+ o || (o = M2("处理过程中发生错误!")), errorMessage.value[(r = e == null ? void 0 : e.file) == null ? void 0 : r.name] = o;
239
+ });
240
+ }, getRandomStr = (e, t) => {
241
+ t || (t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
242
+ let o = "";
243
+ for (let r = e; r > 0; --r)
244
+ o += t[Math.floor(Math.random() * t.length)];
245
+ return o;
246
+ }, getWebSocketServerUrl = (e) => {
247
+ let t = "";
248
+ const { domain: o } = document;
249
+ 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;
250
+ }, getAuthCode = async () => await get(getCommonUrl("/Common/GetWsAuthCode")), setupWebSocket = (e) => {
251
+ socket[e] = new WebSocket(getWebSocketServerUrl("/excel-import/")), socket[e].onmessage = (t) => {
252
+ var r, a;
253
+ if (t.data == "get-auth") {
254
+ getAuthCode().then((l) => {
255
+ var s;
256
+ console.log("发送authCode:", l), (s = socket[e]) == null || s.send(`auth:${l}`);
257
+ });
258
+ return;
259
+ }
260
+ const o = JSON.parse(t.data);
261
+ if (console.log("接收普通消息", o), !!o)
262
+ if (o.MessageType === 0) {
263
+ const l = o.MessageIndex || 0, s = JSON.parse(o == null ? void 0 : o.Content);
264
+ if ((s == null ? void 0 : s.error) == !0) {
265
+ errorMessage.value[e] = s.message;
266
+ return;
267
+ }
268
+ (!importProgress.value[e] || l > ((r = importProgress.value[e]) == null ? void 0 : r.MessageIndex)) && (importProgress.value[e] = s, importProgress.value[e].MessageIndex = l, s != null && s.finished && ((a = socket[e]) == null || a.close()));
269
+ } else o.MessageType === 1 ? sessionIds.value[e] = o.Content : console.log("进度:", o);
270
+ }, socket[e].onerror = (t) => {
271
+ console.error("WebSocket 错误:", t), t instanceof ErrorEvent ? console.error("Error message:", t.message) : console.error("Unknown WebSocket error:", t);
272
+ }, socket[e].onclose = () => {
273
+ console.log("WebSocket 连接关闭");
274
+ };
275
+ };
276
+ onMounted(() => {
277
+ if (!processImportUrl.value) {
278
+ console.error("processImportUrl不能为空!");
279
+ return;
280
+ }
281
+ if (!importId.value) {
282
+ console.error("importId不能为空!");
283
+ return;
284
+ }
285
+ fetchExcelImportEvent(importId.value).then((t) => {
286
+ eventData.value = t;
287
+ });
288
+ const e = window.location.hostname;
289
+ e.includes("localhost") || e.includes("127.0.0.1") || e.includes("yahee.com") || getWebRoot("PictureUrlRoot");
290
+ }), onUnmounted(() => {
291
+ fileNames.value.forEach((e) => {
292
+ var t;
293
+ (t = socket[e]) == null || t.close();
294
+ });
295
+ });
296
+ const __returned__ = { props, isShowDialog, isShowResponseDataMessage, title, importId, processImportUrl, requestData, processFiles, filePath, isShowCoreImportRecordDialog, tableLoading, initWebRootUrlLoading, tableData, importProgress, pageNo, totalNum, pageSize, sessionIds, problemFiles, responseData, socket, eventData, errorMessage, allWebRoot, webRoot, uploadLoading, localRequestData, emit, handleClose, emitResponseData, triggerSubmit, getProgressPercentage, getFormattedDate, LongDate, getTemplateFile, displayRecords, handleCloseRecord, handleOpen, getFile, handleSizeChange, getUploadRecordDataList, handleCurrentChange, fetchExcelImportEvent, getFileServiceUrl, getCommonUrl, getWebRoot, fileNames, uploadProgress, handleFileUpload, readFileAsBase64, uploadConfigFile, processFile, getRandomStr, getWebSocketServerUrl, getAuthCode, setupWebSocket, get M2() {
297
+ return M2;
298
+ }, get translateEmployeeName() {
299
+ return translateEmployeeName;
300
+ }, get ElDialog() {
301
+ return ElDialog;
302
+ }, get ElRow() {
303
+ return ElRow;
304
+ }, get ElButton() {
305
+ return ElButton;
306
+ }, get ElLink() {
307
+ return ElLink;
308
+ }, get ElCol() {
309
+ return ElCol;
310
+ }, get ElTable() {
311
+ return ElTable;
312
+ }, get ElTableColumn() {
313
+ return ElTableColumn;
314
+ }, get ElUpload() {
315
+ return ElUpload;
316
+ }, get ElCard() {
317
+ return ElCard;
318
+ }, get ElPagination() {
319
+ return ElPagination;
320
+ }, get ElProgress() {
321
+ return ElProgress;
322
+ }, get vLoading() {
323
+ return vLoading;
324
+ } };
325
+ return Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: !1, value: !0 }), __returned__;
326
+ }
327
+ });
2
328
  export {
3
- f as default
329
+ _sfc_main as default
4
330
  };
@@ -1,7 +1,7 @@
1
1
  import { withInstall as o } from "../utils/install.js";
2
2
  import m from "./common-import.vue.js";
3
- const a = o(m);
3
+ const p = o(m);
4
4
  export {
5
- a as YaheeCommonImport,
6
- a as default
5
+ p as YaheeCommonImport,
6
+ p as default
7
7
  };
@@ -2,6 +2,7 @@ import { M2 as e } from "../utils/translate.js";
2
2
  function t() {
3
3
  return {
4
4
  isShowDialog: !1,
5
+ isShowResponseDataMessage: !1,
5
6
  multiple: !1,
6
7
  AutoCompleteResult: !0,
7
8
  title: e("导入"),
@@ -12,7 +13,9 @@ function t() {
12
13
  ProcessRequestData: void 0,
13
14
  requestData: void 0,
14
15
  uploadRecord: void 0,
15
- uploadFile: void 0
16
+ uploadFile: void 0,
17
+ processFiles: void 0,
18
+ filePath: void 0
16
19
  };
17
20
  }
18
21
  export {
@@ -1,9 +1,9 @@
1
- import _ from "./complex-search.vue2.js";
2
- import { resolveComponent as r, createElementBlock as d, openBlock as n, Fragment as u, createElementVNode as b, createVNode as t, withKeys as B, createSlots as U, withCtx as a, renderList as i, createBlock as s, createCommentVNode as V, createTextVNode as h, toDisplayString as c } from "vue";
1
+ import T from "./complex-search.vue2.js";
2
+ import { resolveComponent as r, createElementBlock as d, openBlock as n, Fragment as u, createElementVNode as b, createVNode as t, withKeys as B, createSlots as U, withCtx as a, renderList as c, createBlock as s, createCommentVNode as V, createTextVNode as i, toDisplayString as h } from "vue";
3
3
  import O from "../_virtual/_plugin-vue_export-helper.js";
4
4
  const z = { class: "yahee-complex-search" }, P = { class: "search-type-checkbox" }, W = { class: "dialog-footer" };
5
- function E(e, o, N, $, K, L) {
6
- const m = r("el-option"), p = r("el-select"), C = r("Search"), w = r("el-icon"), f = r("el-input"), g = r("el-checkbox"), v = r("el-link"), y = r("el-form-item"), S = r("el-row"), F = r("el-form"), k = r("el-button"), T = r("el-dialog");
5
+ function E(e, o, N, $, D, K) {
6
+ const m = r("el-option"), p = r("el-select"), C = r("Search"), w = r("el-icon"), f = r("el-input"), g = r("el-checkbox"), v = r("el-link"), y = r("el-form-item"), S = r("el-row"), F = r("el-form"), k = r("el-button"), _ = r("el-dialog");
7
7
  return n(), d(u, null, [
8
8
  b("div", z, [
9
9
  t(f, {
@@ -43,7 +43,7 @@ function E(e, o, N, $, K, L) {
43
43
  class: "custom-select"
44
44
  }, {
45
45
  default: a(() => [
46
- (n(!0), d(u, null, i(e.options, (l) => (n(), s(m, {
46
+ (n(!0), d(u, null, c(e.options, (l) => (n(), s(m, {
47
47
  key: l.label,
48
48
  label: l.label,
49
49
  value: l.value
@@ -64,7 +64,7 @@ function E(e, o, N, $, K, L) {
64
64
  disabled: ""
65
65
  }, {
66
66
  default: a(() => [
67
- (n(!0), d(u, null, i(e.defalutOptions, (l) => (n(), s(m, {
67
+ (n(!0), d(u, null, c(e.defalutOptions, (l) => (n(), s(m, {
68
68
  key: l.label,
69
69
  label: l.label,
70
70
  value: l.value
@@ -84,7 +84,7 @@ function E(e, o, N, $, K, L) {
84
84
  onChange: e.searchWithinFilterOptions
85
85
  }, {
86
86
  default: a(() => o[8] || (o[8] = [
87
- h(c("在筛选条件内查询"))
87
+ i(h("在筛选条件内查询"))
88
88
  ])),
89
89
  _: 1,
90
90
  __: [8]
@@ -95,14 +95,14 @@ function E(e, o, N, $, K, L) {
95
95
  onClick: e.showBatchSearchDialog
96
96
  }, {
97
97
  default: a(() => o[9] || (o[9] = [
98
- h(c("批量查询"))
98
+ i(h("批量查询"))
99
99
  ])),
100
100
  _: 1,
101
101
  __: [9]
102
102
  }, 8, ["onClick"])) : V("", !0)
103
103
  ])
104
104
  ]),
105
- t(T, {
105
+ t(_, {
106
106
  modelValue: e.showBatchSearch,
107
107
  "onUpdate:modelValue": o[7] || (o[7] = (l) => e.showBatchSearch = l),
108
108
  title: "批量查询",
@@ -119,14 +119,14 @@ function E(e, o, N, $, K, L) {
119
119
  onClick: e.confirmSearch
120
120
  }, {
121
121
  default: a(() => o[10] || (o[10] = [
122
- h(c("确认"))
122
+ i(h("确认"))
123
123
  ])),
124
124
  _: 1,
125
125
  __: [10]
126
126
  }, 8, ["loading", "onClick"]),
127
127
  t(k, { onClick: e.handleBatchSearchClose }, {
128
128
  default: a(() => o[11] || (o[11] = [
129
- h(c("关闭"))
129
+ i(h("关闭"))
130
130
  ])),
131
131
  _: 1,
132
132
  __: [11]
@@ -152,7 +152,7 @@ function E(e, o, N, $, K, L) {
152
152
  style: { width: "100px", "background-color": "white" }
153
153
  }, {
154
154
  default: a(() => [
155
- (n(!0), d(u, null, i(e.isBatchSelectOptionsSameWithInput ? e.options : e.batchOptions, (l) => (n(), s(m, {
155
+ (n(!0), d(u, null, c(e.isBatchSelectOptionsSameWithInput ? e.options : e.batchOptions, (l) => (n(), s(m, {
156
156
  key: l.label,
157
157
  label: l.label,
158
158
  value: l.value
@@ -168,7 +168,7 @@ function E(e, o, N, $, K, L) {
168
168
  disabled: ""
169
169
  }, {
170
170
  default: a(() => [
171
- (n(!0), d(u, null, i(e.defalutOptions, (l) => (n(), s(m, {
171
+ (n(!0), d(u, null, c(e.defalutOptions, (l) => (n(), s(m, {
172
172
  key: l.label,
173
173
  label: l.label,
174
174
  value: l.value
@@ -211,7 +211,7 @@ function E(e, o, N, $, K, L) {
211
211
  }, 8, ["modelValue", "before-close"])
212
212
  ], 64);
213
213
  }
214
- const X = /* @__PURE__ */ O(_, [["render", E]]);
214
+ const R = /* @__PURE__ */ O(T, [["render", E], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/complex-search/complex-search.vue"]]);
215
215
  export {
216
- X as default
216
+ R as default
217
217
  };
@@ -1,57 +1,39 @@
1
- import { defineComponent as a, createElementBlock as l, openBlock as m, createVNode as e, unref as o, withCtx as t, createElementVNode as i, renderSlot as f } from "vue";
2
- import { ElTooltip as u, ElIcon as d, ElMessage as y } from "element-plus";
3
- import "element-plus/theme-chalk/src/base.scss";
4
- import "element-plus/theme-chalk/src/tooltip.scss";
5
- import "element-plus/theme-chalk/src/popper.scss";
6
- import "element-plus/theme-chalk/src/badge.scss";
7
- import "element-plus/theme-chalk/src/message.scss";
8
- import { DocumentCopy as h } from "@element-plus/icons-vue";
9
- import { useClipboard as _ } from "../packages/components/hooks/useClipboard.js";
10
- const C = { class: "yahee-copy" }, z = /* @__PURE__ */ a({
11
- name: "YaheeCopy",
12
- __name: "copy",
13
- props: {
14
- content: { default: "" },
15
- message: { default: "复制成功" }
16
- },
17
- setup(c) {
18
- const s = c, { copyUrl: p } = _(), r = () => {
19
- p(s.content), y({
20
- message: s.message,
21
- type: "success"
22
- });
23
- };
24
- return (n, g) => (m(), l("div", C, [
25
- e(o(u), {
26
- placement: "right",
27
- effect: "light",
28
- offset: -5,
29
- "show-arrow": !1,
30
- "popper-class": "yahee-copy-custom-popper-class"
31
- }, {
32
- content: t(() => [
33
- e(o(d), {
34
- color: "#3366cc",
35
- size: "18",
36
- class: "icon",
37
- onClick: r
38
- }, {
39
- default: t(() => [
40
- e(o(h))
41
- ]),
42
- _: 1
43
- })
44
- ]),
45
- default: t(() => [
46
- i("div", null, [
47
- f(n.$slots, "default")
48
- ])
49
- ]),
50
- _: 3
51
- })
52
- ]));
53
- }
54
- });
1
+ import n from "./copy.vue2.js";
2
+ import { createElementBlock as r, openBlock as s, createVNode as e, withCtx as c, createElementVNode as l, renderSlot as p } from "vue";
3
+ import a from "../_virtual/_plugin-vue_export-helper.js";
4
+ const f = { class: "yahee-copy" };
5
+ function m(t, i, d, o, _, y) {
6
+ return s(), r("div", f, [
7
+ e(o.ElTooltip, {
8
+ placement: "right",
9
+ effect: "light",
10
+ offset: -5,
11
+ "show-arrow": !1,
12
+ "popper-class": "yahee-copy-custom-popper-class"
13
+ }, {
14
+ content: c(() => [
15
+ e(o.ElIcon, {
16
+ color: "#3366cc",
17
+ size: "18",
18
+ class: "icon",
19
+ onClick: o.copyContent
20
+ }, {
21
+ default: c(() => [
22
+ e(o.DocumentCopy)
23
+ ]),
24
+ _: 1
25
+ })
26
+ ]),
27
+ default: c(() => [
28
+ l("div", null, [
29
+ p(t.$slots, "default")
30
+ ])
31
+ ]),
32
+ _: 3
33
+ })
34
+ ]);
35
+ }
36
+ const k = /* @__PURE__ */ a(n, [["render", m], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/copy/copy.vue"]]);
55
37
  export {
56
- z as default
38
+ k as default
57
39
  };
@@ -1,4 +1,36 @@
1
- import f from "./copy.vue.js";
1
+ import { defineComponent as n } from "vue";
2
+ import { ElMessage as s, ElIcon as m, ElTooltip as i } from "element-plus";
3
+ import "element-plus/theme-chalk/src/base.scss";
4
+ import "element-plus/theme-chalk/src/tooltip.scss";
5
+ import "element-plus/theme-chalk/src/popper.scss";
6
+ import "element-plus/theme-chalk/src/badge.scss";
7
+ import "element-plus/theme-chalk/src/message.scss";
8
+ import { DocumentCopy as c } from "@element-plus/icons-vue";
9
+ import { useClipboard as u } from "../packages/components/hooks/useClipboard.js";
10
+ const b = /* @__PURE__ */ n({
11
+ name: "YaheeCopy",
12
+ __name: "copy",
13
+ props: {
14
+ content: { type: String, required: !0, default: "" },
15
+ message: { type: String, required: !1, default: "复制成功" }
16
+ },
17
+ setup(r, { expose: p }) {
18
+ p();
19
+ const e = r, { copyUrl: t } = u(), o = { props: e, copyUrl: t, copyContent: () => {
20
+ t(e.content), s({
21
+ message: e.message,
22
+ type: "success"
23
+ });
24
+ }, get ElTooltip() {
25
+ return i;
26
+ }, get ElIcon() {
27
+ return m;
28
+ }, get DocumentCopy() {
29
+ return c;
30
+ } };
31
+ return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
32
+ }
33
+ });
2
34
  export {
3
- f as default
35
+ b as default
4
36
  };
package/es/copy/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { withInstall as o } from "../utils/install.js";
2
2
  import t from "./copy.vue.js";
3
- const r = o(t);
3
+ const a = o(t);
4
4
  export {
5
- r as YaheeCopy,
6
- r as default
5
+ a as YaheeCopy,
6
+ a as default
7
7
  };