yahee-components 0.0.113 → 0.0.114

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 (174) hide show
  1. package/es/annex-upload/annex-upload.vue.js +55 -0
  2. package/es/annex-upload/annex-upload.vue2.js +121 -0
  3. package/es/annex-upload/index.js +7 -0
  4. package/es/annex-upload/mimeType.js +822 -0
  5. package/es/annex-upload/style/index.css +7 -0
  6. package/es/border-wrap/border-wrap.vue.js +75 -0
  7. package/es/border-wrap/border-wrap.vue2.js +48 -0
  8. package/es/border-wrap/index.js +7 -0
  9. package/es/border-wrap/props.js +11 -0
  10. package/es/border-wrap/style/index.css +24 -0
  11. package/es/common-import/common-import.vue.js +394 -0
  12. package/es/common-import/common-import.vue2.js +366 -0
  13. package/es/common-import/index.js +7 -0
  14. package/es/common-import/props.js +23 -0
  15. package/es/common-import/style/index.css +32 -0
  16. package/es/complex-search/batch-search-dialog.vue.js +119 -0
  17. package/es/complex-search/batch-search-dialog.vue2.js +50 -0
  18. package/es/complex-search/complex-search.vue.js +122 -0
  19. package/es/complex-search/complex-search.vue2.js +71 -0
  20. package/es/complex-search/index.js +7 -0
  21. package/es/complex-search/props.js +19 -0
  22. package/es/complex-search/style/index.css +24 -0
  23. package/es/complex-search/useComplexSearch.js +44 -0
  24. package/es/copy/copy.vue.js +39 -0
  25. package/es/copy/copy.vue2.js +36 -0
  26. package/es/copy/index.js +7 -0
  27. package/es/copy/props.js +9 -0
  28. package/es/copy/style/index.css +12 -0
  29. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +120 -0
  30. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +127 -0
  31. package/es/country-platform-shop-condition/index.js +7 -0
  32. package/es/country-platform-shop-condition/style/index.css +59 -0
  33. package/es/drop-down-condition/drop-down-condition.vue.js +125 -0
  34. package/es/drop-down-condition/drop-down-condition.vue2.js +129 -0
  35. package/es/drop-down-condition/index.js +7 -0
  36. package/es/drop-down-condition/style/index.css +64 -0
  37. package/es/echart-gauge/echart-gauge.vue.js +14 -0
  38. package/es/echart-gauge/echart-gauge.vue2.js +149 -0
  39. package/es/echart-gauge/index.js +7 -0
  40. package/es/echart-gauge/props.js +9 -0
  41. package/es/echart-gauge/style/index.css +4 -0
  42. package/es/file-download-wrapper/file-download-wrapper.vue.js +164 -0
  43. package/es/file-download-wrapper/file-download-wrapper.vue2.js +115 -0
  44. package/es/file-download-wrapper/index.js +7 -0
  45. package/es/file-download-wrapper/key.js +17 -0
  46. package/es/file-download-wrapper/props.js +12 -0
  47. package/es/file-download-wrapper/style/index.css +66 -0
  48. package/es/filter-container/filter-container.vue.js +24 -0
  49. package/es/filter-container/filter-container.vue2.js +61 -0
  50. package/es/filter-container/index.js +7 -0
  51. package/es/filter-container/key.js +4 -0
  52. package/es/filter-container/props.js +11 -0
  53. package/es/filter-container/style/index.css +16 -0
  54. package/es/filter-wrapper/filter-wrapper.vue.js +19 -0
  55. package/es/filter-wrapper/filter-wrapper.vue2.js +56 -0
  56. package/es/filter-wrapper/index.js +7 -0
  57. package/es/filter-wrapper/props.js +10 -0
  58. package/es/filter-wrapper/style/index.css +3 -0
  59. package/es/height-collapse/height-collapse.vue.js +26 -0
  60. package/es/height-collapse/height-collapse.vue2.js +44 -0
  61. package/es/height-collapse/index.js +7 -0
  62. package/es/height-collapse/props.js +11 -0
  63. package/es/height-collapse/style/index.css +32 -0
  64. package/es/help-tag/help-tag.vue.js +46 -0
  65. package/es/help-tag/help-tag.vue2.js +51 -0
  66. package/es/help-tag/index.js +7 -0
  67. package/es/help-tag/props.js +9 -0
  68. package/es/help-tag/style/index.css +8 -0
  69. package/es/image-upload/image-upload.vue.js +116 -0
  70. package/es/image-upload/image-upload.vue2.js +93 -0
  71. package/es/image-upload/index.js +7 -0
  72. package/es/image-upload/style/index.css +33 -0
  73. package/es/index.js +63 -0
  74. package/es/installs.js +41 -0
  75. package/es/left-condition/index.js +7 -0
  76. package/es/left-condition/left-condition-sub.vue.js +36 -0
  77. package/es/left-condition/left-condition-sub.vue2.js +78 -0
  78. package/es/left-condition/left-condition.vue.js +77 -0
  79. package/es/left-condition/left-condition.vue2.js +162 -0
  80. package/es/left-condition/style/index.css +10 -0
  81. package/es/left-condition-enum/index.js +7 -0
  82. package/es/left-condition-enum/left-condition-enum.vue.js +22 -0
  83. package/es/left-condition-enum/left-condition-enum.vue2.js +42 -0
  84. package/es/left-condition-enum/style/index.css +10 -0
  85. package/es/node_modules/.pnpm/@vueuse_core@11.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/core/index.js +99 -0
  86. package/es/node_modules/.pnpm/@vueuse_shared@11.3.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/shared/index.js +22 -0
  87. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/index.js +38 -0
  88. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/adapters.js +53 -0
  89. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/fetch.js +141 -0
  90. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/adapters/xhr.js +71 -0
  91. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js +46 -0
  92. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CancelToken.js +77 -0
  93. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/CanceledError.js +11 -0
  94. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/cancel/isCancel.js +6 -0
  95. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/Axios.js +136 -0
  96. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosError.js +54 -0
  97. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/AxiosHeaders.js +181 -0
  98. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/InterceptorManager.js +58 -0
  99. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/buildFullPath.js +9 -0
  100. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/dispatchRequest.js +31 -0
  101. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/mergeConfig.js +70 -0
  102. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/settle.js +14 -0
  103. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/core/transformData.js +13 -0
  104. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/index.js +89 -0
  105. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/defaults/transitional.js +8 -0
  106. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/env/data.js +4 -0
  107. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
  108. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  109. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/bind.js +8 -0
  110. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/buildURL.js +23 -0
  111. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  112. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/composeSignals.js +30 -0
  113. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/cookies.js +32 -0
  114. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/formDataToJSON.js +31 -0
  115. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  116. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  117. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/isURLSameOrigin.js +8 -0
  118. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/null.js +4 -0
  119. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
  120. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  121. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/progressEventReducer.js +35 -0
  122. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/resolveConfig.js +33 -0
  123. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/speedometer.js +19 -0
  124. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/spread.js +8 -0
  125. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/throttle.js +15 -0
  126. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toFormData.js +85 -0
  127. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
  128. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/trackStream.js +63 -0
  129. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/helpers/validator.js +54 -0
  130. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  131. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  132. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  133. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/browser/index.js +15 -0
  134. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/common/utils.js +9 -0
  135. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/platform/index.js +9 -0
  136. package/es/node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/utils.js +222 -0
  137. package/es/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +282 -0
  138. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/index.js +97 -0
  139. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/animation/basicTransition.js +96 -0
  140. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/animation/customGraphicKeyframeAnimation.js +56 -0
  141. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/animation/customGraphicTransition.js +242 -0
  142. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/animation/morphTransitionHelper.js +106 -0
  143. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/animation/universalTransition.js +345 -0
  144. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/BarSeries.js +56 -0
  145. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/BarView.js +487 -0
  146. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +77 -0
  147. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/PictorialBarSeries.js +49 -0
  148. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/PictorialBarView.js +325 -0
  149. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/install.js +23 -0
  150. package/es/node_modules/.pnpm/echarts@6.0.0/node_modules/echarts/lib/chart/bar/installPictorialBar.js +10 -0
  151. package/lib/annex-upload/style/index.css +7 -0
  152. package/lib/border-wrap/style/index.css +24 -0
  153. package/lib/common-import/style/index.css +32 -0
  154. package/lib/complex-search/style/index.css +24 -0
  155. package/lib/copy/style/index.css +12 -0
  156. package/lib/country-platform-shop-condition/style/index.css +59 -0
  157. package/lib/drop-down-condition/style/index.css +64 -0
  158. package/lib/echart-gauge/style/index.css +4 -0
  159. package/lib/file-download-wrapper/style/index.css +66 -0
  160. package/lib/filter-container/style/index.css +16 -0
  161. package/lib/filter-wrapper/style/index.css +3 -0
  162. package/lib/height-collapse/style/index.css +32 -0
  163. package/lib/help-tag/style/index.css +8 -0
  164. package/lib/image-upload/style/index.css +33 -0
  165. package/lib/left-condition/style/index.css +10 -0
  166. package/lib/left-condition-enum/style/index.css +10 -0
  167. package/lib/operation-log/style/index.css +234 -0
  168. package/lib/scale-screen/style/index.css +0 -0
  169. package/lib/style.css +1405 -0
  170. package/lib/styles/custom.css +82 -0
  171. package/lib/styles/globals.css +699 -0
  172. package/lib/styles/index.css +753 -0
  173. package/lib/styles/variables.css +34 -0
  174. package/package.json +1 -1
@@ -0,0 +1,366 @@
1
+ import { defineComponent as be, mergeDefaults as Ie, toRefs as Re, ref as n, watch as De, reactive as Ce, onMounted as Te, onUnmounted as $e } from "vue";
2
+ import { translateEmployeeName as Fe, M2 as M } from "../utils/translate.js";
3
+ import { get as Ue } from "../packages/components/api/log-server.js";
4
+ import { getDomainBaseReportUrl as xe, getDomainBaseUrl as Me } from "../utils/get-domain-base-url.js";
5
+ import { getUploadRecord as qe } from "../packages/components/api/common-import/index.js";
6
+ import { defaultCommonImportProps as Ne } from "./props.js";
7
+ import { ElMessage as u, vLoading as ke, ElUpload as Be, ElTableColumn as Oe, ElTable as Pe, ElRow as _e, ElProgress as Le, ElPagination as We, ElLink as Ge, ElDialog as Ae, ElCol as Je, ElCard as je, ElButton as ze, ElMessageBox as te } 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 He from "../node_modules/.pnpm/axios@1.10.0/node_modules/axios/lib/axios.js";
35
+ const Xe = {
36
+ name: "YaheeCommonImport",
37
+ inheritAttrs: !1
38
+ }, Ft = /* @__PURE__ */ be({
39
+ ...Xe,
40
+ props: /* @__PURE__ */ Ie({
41
+ isShowDialog: { type: Boolean, required: !1 },
42
+ isShowResponseDataMessage: { type: Boolean, required: !1 },
43
+ title: { type: String, required: !0 },
44
+ importId: { type: String, required: !0 },
45
+ multiple: { type: Boolean, required: !1 },
46
+ ProcessRequestData: { type: null, required: !1 },
47
+ AutoCompleteResult: { type: Boolean, required: !1 },
48
+ displayGetTemplate: { type: Boolean, required: !1 },
49
+ processImportUrl: { type: String, required: !0 },
50
+ requestData: { type: Object, required: !1 },
51
+ uploadRecord: { type: Function, required: !1 },
52
+ uploadFile: { type: Function, required: !1 },
53
+ uploadDisabled: { type: Boolean, required: !1 },
54
+ filePath: { type: String, required: !1 },
55
+ processFiles: { type: Function, required: !1 }
56
+ }, Ne()),
57
+ emits: [
58
+ "setIsShowDialog",
59
+ "closeDialog",
60
+ "setResponseData",
61
+ "submit",
62
+ "reloadTableData"
63
+ ],
64
+ setup(oe, { expose: re, emit: ae }) {
65
+ re();
66
+ const q = oe, {
67
+ isShowDialog: ne,
68
+ isShowResponseDataMessage: N,
69
+ title: le,
70
+ importId: p,
71
+ processImportUrl: R,
72
+ requestData: D,
73
+ processFiles: k,
74
+ filePath: B
75
+ } = Re(q), C = n(!1), se = n(!1), v = n(!1), O = n([]), i = n({}), P = n(1), _ = n(1), T = n(50), m = n({}), w = n({}), $ = n({}), c = {}, d = n({}), y = n({}), g = n({}), S = n(""), F = n(!1), f = n({
76
+ siteId: null,
77
+ reportTime: null,
78
+ fileName: ""
79
+ }), E = ae, ie = () => {
80
+ E("closeDialog");
81
+ }, L = () => {
82
+ E("setResponseData", $.value);
83
+ }, W = () => {
84
+ E("submit");
85
+ }, ce = (e) => {
86
+ var t, o, r;
87
+ return Number(
88
+ ((((t = i.value[e]) == null ? void 0 : t.successRowCount) + ((o = i.value[e]) == null ? void 0 : o.failedRowCount)) / ((r = i.value[e]) == null ? void 0 : r.totalRowCount) * 100).toFixed(0)
89
+ );
90
+ }, ue = (e) => {
91
+ const t = e == null ? void 0 : e.CreateOn;
92
+ if (typeof t != "string") return "---";
93
+ const o = t.match(/\/Date\((\d+)/);
94
+ if (!o) return "---";
95
+ const r = Number(o[1]);
96
+ if (Number.isNaN(r)) return "---";
97
+ const a = new Date(r);
98
+ if (Number.isNaN(a.getTime())) return "---";
99
+ const s = a.getFullYear(), l = String(a.getMonth() + 1).padStart(2, "0"), we = String(a.getDate()).padStart(2, "0"), ye = String(a.getHours()).padStart(2, "0"), Se = String(a.getMinutes()).padStart(2, "0"), Ee = String(a.getSeconds()).padStart(2, "0");
100
+ return `${s}-${l}-${we} ${ye}:${Se}:${Ee}`;
101
+ }, de = () => {
102
+ if (!d.value) return;
103
+ let e = "";
104
+ if (d.value.TemplateType == 1)
105
+ e = x(
106
+ `${d.value.Template}?dispositionType=attachment&t=${(/* @__PURE__ */ new Date()).getTime()}`
107
+ );
108
+ else if (d.value.TemplateType == 2) {
109
+ const t = d.value.Template;
110
+ if (!t) {
111
+ u.error("缺少报表ID");
112
+ return;
113
+ }
114
+ G(t);
115
+ }
116
+ window.open(e, "_self");
117
+ }, G = async (e) => {
118
+ const t = `Id=${e}`, o = {
119
+ method: "post",
120
+ url: `${j("ExportTable/OutputNew")}?${t}`,
121
+ headers: {
122
+ "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
123
+ },
124
+ withCredentials: !0,
125
+ data: t
126
+ };
127
+ He(o).then((r) => {
128
+ r.data.Success ? window.open(`${r.data.Url}`, "_self") : console.log(r);
129
+ }).catch((r) => {
130
+ console.log(r);
131
+ });
132
+ }, me = () => {
133
+ C.value = !0, A(T.value);
134
+ }, pe = () => {
135
+ C.value = !1;
136
+ }, ge = () => {
137
+ h.value = /* @__PURE__ */ new Set();
138
+ }, fe = (e) => {
139
+ e && window.open(`${B.value}/${e}`, "_self");
140
+ }, A = async (e) => {
141
+ U(JSON.stringify({ rows: T.value, page: e }));
142
+ };
143
+ De(
144
+ () => D,
145
+ (e) => {
146
+ e && (f.value = D.value);
147
+ },
148
+ { immediate: !0, deep: !0 }
149
+ );
150
+ const U = (e) => {
151
+ qe(`/ExcelImport/GetExcelImportRecords?importId=${p.value}`, e).then((t) => {
152
+ var o, r;
153
+ t.status !== 200 && (u.error(M("获取上传记录失败!")), console.log(`获取上传记录失败!${JSON.stringify(t)}`)), O.value = (o = t.data) == null ? void 0 : o.rows, _.value = (r = t.data) == null ? void 0 : r.total;
154
+ }).catch((t) => {
155
+ console.log(t);
156
+ });
157
+ }, he = (e) => {
158
+ U(JSON.stringify({ rows: e, page: P.value }));
159
+ }, J = async (e) => {
160
+ const t = `${b("/ExcelImport/GetExcelImportEvent")}?origin=${window.location.host}&importId=${e}`;
161
+ try {
162
+ const o = await fetch(t, {
163
+ method: "GET",
164
+ credentials: "include"
165
+ });
166
+ return o.ok || u.error(`Network response was not ok: ${o.statusText}`), await o.json();
167
+ } catch (o) {
168
+ return console.error("Failed to fetch Excel import event:", o), {};
169
+ }
170
+ }, x = (e) => {
171
+ let t = "";
172
+ const o = window.location.hostname;
173
+ 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 = S.value, `${t}${e}`;
174
+ }, b = (e) => Me() + e, j = (e) => xe() + e, z = (e) => {
175
+ if (v.value = !0, e && !g.value[e])
176
+ try {
177
+ fetch(`${b("/Common/GetAllWebRoot")}?origin=${window.location.host}`, {
178
+ method: "GET",
179
+ credentials: "include"
180
+ }).then((t) => {
181
+ if (!t.ok)
182
+ throw new Error("Network response was not ok");
183
+ let o = {};
184
+ t.json().then((r) => {
185
+ if (o = r, g.value = o, !g.value) {
186
+ console.error("GetWebRoot 失败");
187
+ return;
188
+ }
189
+ S.value = g.value[e], S.value || console.error(`GetWebRoot未找到key为${e}的数据`);
190
+ });
191
+ }).finally(() => {
192
+ v.value = !1;
193
+ });
194
+ } catch (t) {
195
+ v.value = !1, console.error("GetWebRoot 失败", t);
196
+ }
197
+ }, h = n(/* @__PURE__ */ new Set()), I = Ce({}), ve = (e) => {
198
+ F.value = !0;
199
+ const { file: t } = e, o = 100 * 1024 * 1024;
200
+ if (t.size > o) {
201
+ console.error("文件大小不能超过 1GB"), u.success("文件大小不能超过 1GB");
202
+ return;
203
+ }
204
+ K(t.name), H(t).then((r) => {
205
+ X(t, r);
206
+ });
207
+ }, H = (e) => new Promise((t, o) => {
208
+ const r = new FileReader();
209
+ r.onload = () => t(r.result), r.onerror = (a) => o(a), r.readAsDataURL(e);
210
+ }), X = (e, t) => {
211
+ W(), h.value.has(e.name) ? (delete I[e.name], delete i.value[e.name], delete m.value[e.name], delete w.value[e.name], delete c[e.name], delete y.value[e.name]) : h.value.add(e.name);
212
+ const o = new FormData();
213
+ 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");
214
+ const r = new XMLHttpRequest();
215
+ r.open("POST", `${x("fragmentupload?t=")}${Math.random()}`, !0), r.upload.onprogress = (a) => {
216
+ a.lengthComputable && (I[e.name] = Math.round(a.loaded / a.total * 100));
217
+ }, r.onload = () => {
218
+ if (r.status === 200)
219
+ try {
220
+ const a = JSON.parse(r.responseText);
221
+ if (console.log("服务器返回值:", a), a.ACK !== "Success" || !a.FileId) {
222
+ u.error(`${e.name} 上传失败`);
223
+ return;
224
+ }
225
+ u.success(`${e.name} 上传成功`), I[e.name] = 100, setTimeout(() => {
226
+ f.value = {
227
+ ...f.value,
228
+ // 保留原有字段
229
+ fileName: (e == null ? void 0 : e.name) || ""
230
+ // ES6可选链避免报错
231
+ }, m.value[e.name] || (m.value[e.name] = Z(20)), Y({
232
+ importId: p.value,
233
+ fileId: a.FileId,
234
+ wsSessionId: m.value[e.name],
235
+ file: e,
236
+ requestData: f.value
237
+ });
238
+ }, 500);
239
+ } catch (a) {
240
+ console.error("解析服务器返回值失败:", a), u.error(`${e.name} 上传完成,但解析返回值失败`);
241
+ }
242
+ else
243
+ u.error(`${e.name} 上传失败`);
244
+ }, r.onerror = () => {
245
+ u.error(`${e.name} 上传异常`);
246
+ }, r.send(o);
247
+ }, Y = (e) => {
248
+ k.value(R.value, e, {}).then((t) => {
249
+ var a;
250
+ if (F.value = !1, console.log("processFiles 返回值:", t), t != null && t.success) {
251
+ let s = "文件导入成功";
252
+ t != null && t.fileId && (s = "存在失败的条目,详情请查看输出文件"), te.alert(s, "操作成功", {
253
+ confirmButtonText: "确定",
254
+ callback: () => {
255
+ var l;
256
+ t != null && t.fileId && (w.value[(l = e == null ? void 0 : e.file) == null ? void 0 : l.name] = t.fileId, $.value = t.data, N.value && L());
257
+ }
258
+ });
259
+ return;
260
+ }
261
+ const r = (Array.isArray(t == null ? void 0 : t.messages) ? t.messages : ["未知错误"]).join(`
262
+ `) + `
263
+
264
+ (可使用鼠标滚轮滚动查看)`;
265
+ te.alert(r, "导入错误", {
266
+ confirmButtonText: "知道了",
267
+ customClass: "custom-common-import-alert",
268
+ dangerouslyUseHTMLString: !0
269
+ }), t != null && t.fileId && (w.value[(a = e == null ? void 0 : e.file) == null ? void 0 : a.name] = t.fileId);
270
+ }).catch((t) => {
271
+ var r;
272
+ console.error("processFiles 失败", t);
273
+ let o = t == null ? void 0 : t.exMsg;
274
+ o || (o = M("处理过程中发生错误!")), y.value[(r = e == null ? void 0 : e.file) == null ? void 0 : r.name] = o;
275
+ });
276
+ }, Z = (e, t) => {
277
+ t || (t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
278
+ let o = "";
279
+ for (let r = e; r > 0; --r)
280
+ o += t[Math.floor(Math.random() * t.length)];
281
+ return o;
282
+ }, Q = (e) => {
283
+ let t = "";
284
+ const { domain: o } = document;
285
+ 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;
286
+ }, V = async () => await Ue(b("/Common/GetWsAuthCode")), K = (e) => {
287
+ c[e] = new WebSocket(Q("/excel-import/")), c[e].onmessage = (t) => {
288
+ var r, a;
289
+ if (t.data == "get-auth") {
290
+ V().then((s) => {
291
+ var l;
292
+ console.log("发送authCode:", s), (l = c[e]) == null || l.send(`auth:${s}`);
293
+ });
294
+ return;
295
+ }
296
+ const o = JSON.parse(t.data);
297
+ if (console.log("接收普通消息", o), !!o)
298
+ if (o.MessageType === 0) {
299
+ const s = o.MessageIndex || 0, l = JSON.parse(o == null ? void 0 : o.Content);
300
+ if ((l == null ? void 0 : l.error) == !0) {
301
+ y.value[e] = l.message;
302
+ return;
303
+ }
304
+ (!i.value[e] || s > ((r = i.value[e]) == null ? void 0 : r.MessageIndex)) && (i.value[e] = l, i.value[e].MessageIndex = s, l != null && l.finished && ((a = c[e]) == null || a.close()));
305
+ } else o.MessageType === 1 ? m.value[e] = o.Content : console.log("进度:", o);
306
+ }, c[e].onerror = (t) => {
307
+ console.error("WebSocket 错误:", t), t instanceof ErrorEvent ? console.error("Error message:", t.message) : console.error("Unknown WebSocket error:", t);
308
+ }, c[e].onclose = () => {
309
+ console.log("WebSocket 连接关闭");
310
+ };
311
+ };
312
+ Te(() => {
313
+ if (!R.value) {
314
+ console.error("processImportUrl不能为空!");
315
+ return;
316
+ }
317
+ if (!p.value) {
318
+ console.error("importId不能为空!");
319
+ return;
320
+ }
321
+ J(p.value).then((t) => {
322
+ d.value = t;
323
+ });
324
+ const e = window.location.hostname;
325
+ e.includes("localhost") || e.includes("127.0.0.1") || e.includes("yahee.com") || z("PictureUrlRoot");
326
+ }), $e(() => {
327
+ h.value.forEach((e) => {
328
+ var t;
329
+ (t = c[e]) == null || t.close();
330
+ });
331
+ });
332
+ const ee = { props: q, isShowDialog: ne, isShowResponseDataMessage: N, title: le, importId: p, processImportUrl: R, requestData: D, processFiles: k, filePath: B, isShowCoreImportRecordDialog: C, tableLoading: se, initWebRootUrlLoading: v, tableData: O, importProgress: i, pageNo: P, totalNum: _, pageSize: T, sessionIds: m, problemFiles: w, responseData: $, socket: c, eventData: d, errorMessage: y, allWebRoot: g, webRoot: S, uploadLoading: F, localRequestData: f, emit: E, handleClose: ie, emitResponseData: L, triggerSubmit: W, getProgressPercentage: ce, getFormattedDate: ue, getTemplateFile: de, fetchReport: G, displayRecords: me, handleCloseRecord: pe, handleOpen: ge, getFile: fe, handleSizeChange: A, getUploadRecordDataList: U, handleCurrentChange: he, fetchExcelImportEvent: J, getFileServiceUrl: x, getCommonUrl: b, getReportCommonUrl: j, getWebRoot: z, fileNames: h, uploadProgress: I, handleFileUpload: ve, readFileAsBase64: H, uploadConfigFile: X, processFile: Y, getRandomStr: Z, getWebSocketServerUrl: Q, getAuthCode: V, setupWebSocket: K, get M2() {
333
+ return M;
334
+ }, get translateEmployeeName() {
335
+ return Fe;
336
+ }, get ElButton() {
337
+ return ze;
338
+ }, get ElCard() {
339
+ return je;
340
+ }, get ElCol() {
341
+ return Je;
342
+ }, get ElDialog() {
343
+ return Ae;
344
+ }, get ElLink() {
345
+ return Ge;
346
+ }, get ElPagination() {
347
+ return We;
348
+ }, get ElProgress() {
349
+ return Le;
350
+ }, get ElRow() {
351
+ return _e;
352
+ }, get ElTable() {
353
+ return Pe;
354
+ }, get ElTableColumn() {
355
+ return Oe;
356
+ }, get ElUpload() {
357
+ return Be;
358
+ }, get vLoading() {
359
+ return ke;
360
+ } };
361
+ return Object.defineProperty(ee, "__isScriptSetup", { enumerable: !1, value: !0 }), ee;
362
+ }
363
+ });
364
+ export {
365
+ Ft as default
366
+ };
@@ -0,0 +1,7 @@
1
+ import { withInstall as o } from "../utils/install.js";
2
+ import m from "./common-import.vue.js";
3
+ const p = o(m);
4
+ export {
5
+ p as YaheeCommonImport,
6
+ p as default
7
+ };
@@ -0,0 +1,23 @@
1
+ import { M2 as e } from "../utils/translate.js";
2
+ function t() {
3
+ return {
4
+ isShowDialog: !1,
5
+ isShowResponseDataMessage: !1,
6
+ multiple: !1,
7
+ AutoCompleteResult: !0,
8
+ title: e("导入"),
9
+ // 确保 M2 函数已定义
10
+ displayGetTemplate: !0,
11
+ uploadDisabled: !1,
12
+ // 可选参数的默认空值
13
+ ProcessRequestData: void 0,
14
+ requestData: void 0,
15
+ uploadRecord: void 0,
16
+ uploadFile: void 0,
17
+ processFiles: void 0,
18
+ filePath: void 0
19
+ };
20
+ }
21
+ export {
22
+ t as defaultCommonImportProps
23
+ };
@@ -0,0 +1,32 @@
1
+ @charset "UTF-8";
2
+ .yahee-common-import .el-dialog {
3
+ min-width: 800px;
4
+ }
5
+ .yahee-common-import .upload-record {
6
+ margin: 10px 0 10px 0;
7
+ height: 30px;
8
+ width: 80px;
9
+ }
10
+ .yahee-common-import .uploadProgress {
11
+ padding: 10px;
12
+ margin: 5px 0 5px 0;
13
+ border: solid 1px gray;
14
+ border-radius: 10px;
15
+ }
16
+ .yahee-common-import .page-pagination {
17
+ margin-top: 10px;
18
+ display: flex;
19
+ justify-content: flex-end;
20
+ }
21
+ .yahee-common-import .ellipsis-cell {
22
+ white-space: nowrap; /* 禁止换行 */
23
+ overflow: hidden; /* 隐藏超出的内容 */
24
+ text-overflow: ellipsis; /* 显示省略号 */
25
+ }
26
+
27
+ /* 添加全局样式 */
28
+ .custom-common-import-alert .el-message-box__content {
29
+ max-height: 60vh;
30
+ overflow-y: auto;
31
+ white-space: pre-wrap; /* 保留换行符 */
32
+ }
@@ -0,0 +1,119 @@
1
+ import w from "./batch-search-dialog.vue2.js";
2
+ import { resolveComponent as a, createBlock as m, openBlock as r, withCtx as t, createVNode as n, createElementBlock as u, Fragment as p, renderList as b, createElementVNode as v, createTextVNode as h } from "vue";
3
+ /* empty css */
4
+ import k from "../_virtual/_plugin-vue_export-helper.js";
5
+ const C = { class: "dialog-footer" };
6
+ function x(T, o, d, e, B, E) {
7
+ const s = a("el-option"), c = a("el-select"), i = a("el-form-item"), _ = a("el-row"), y = a("el-input"), V = a("el-form"), f = a("el-button"), g = a("el-dialog");
8
+ return r(), m(g, {
9
+ modelValue: e.visible,
10
+ "onUpdate:modelValue": o[3] || (o[3] = (l) => e.visible = l),
11
+ title: "批量查询",
12
+ width: "30%",
13
+ "before-close": e.handleClose,
14
+ "append-to-body": !0,
15
+ draggable: ""
16
+ }, {
17
+ footer: t(() => [
18
+ v("div", C, [
19
+ n(f, {
20
+ type: "primary",
21
+ loading: e.loading,
22
+ onClick: e.handleConfirm
23
+ }, {
24
+ default: t(() => o[4] || (o[4] = [
25
+ h(" 确认 ")
26
+ ])),
27
+ _: 1,
28
+ __: [4]
29
+ }, 8, ["loading"]),
30
+ n(f, { onClick: e.handleClose }, {
31
+ default: t(() => o[5] || (o[5] = [
32
+ h("关闭")
33
+ ])),
34
+ _: 1,
35
+ __: [5]
36
+ })
37
+ ])
38
+ ]),
39
+ default: t(() => [
40
+ n(V, {
41
+ ref: "formRef",
42
+ model: e.form,
43
+ rules: e.rules
44
+ }, {
45
+ default: t(() => [
46
+ n(_, { class: "row-class" }, {
47
+ default: t(() => [
48
+ n(i, { prop: "searchType" }, {
49
+ default: t(() => [
50
+ d.showSelect ? (r(), m(c, {
51
+ key: 0,
52
+ modelValue: e.form.searchType,
53
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => e.form.searchType = l),
54
+ size: "small",
55
+ style: { width: "100px", "background-color": "white" }
56
+ }, {
57
+ default: t(() => [
58
+ (r(!0), u(p, null, b(d.isBatchSelectSameWithInput ? d.inputOptions : d.batchOptions, (l) => (r(), m(s, {
59
+ key: l.label,
60
+ label: l.label,
61
+ value: l.value
62
+ }, null, 8, ["label", "value"]))), 128))
63
+ ]),
64
+ _: 1
65
+ }, 8, ["modelValue"])) : (r(), m(c, {
66
+ key: 1,
67
+ modelValue: e.form.searchType,
68
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => e.form.searchType = l),
69
+ size: "small",
70
+ style: { width: "95px" },
71
+ disabled: ""
72
+ }, {
73
+ default: t(() => [
74
+ (r(!0), u(p, null, b(d.defaultOptions, (l) => (r(), m(s, {
75
+ key: l.label,
76
+ label: l.label,
77
+ value: l.value
78
+ }, null, 8, ["label", "value"]))), 128))
79
+ ]),
80
+ _: 1
81
+ }, 8, ["modelValue"]))
82
+ ]),
83
+ _: 1
84
+ })
85
+ ]),
86
+ _: 1
87
+ }),
88
+ n(_, { class: "row-class" }, {
89
+ default: t(() => [
90
+ n(i, {
91
+ prop: "searchContent",
92
+ style: { width: "100%" }
93
+ }, {
94
+ default: t(() => [
95
+ n(y, {
96
+ modelValue: e.form.searchContent,
97
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => e.form.searchContent = l),
98
+ placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,",
99
+ type: "textarea",
100
+ rows: 5,
101
+ onPaste: e.handlePaste
102
+ }, null, 8, ["modelValue"])
103
+ ]),
104
+ _: 1
105
+ })
106
+ ]),
107
+ _: 1
108
+ })
109
+ ]),
110
+ _: 1
111
+ }, 8, ["model"])
112
+ ]),
113
+ _: 1
114
+ }, 8, ["modelValue"]);
115
+ }
116
+ const z = /* @__PURE__ */ k(w, [["render", x], ["__scopeId", "data-v-5ba0516b"], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/complex-search/batch-search-dialog.vue"]]);
117
+ export {
118
+ z as default
119
+ };
@@ -0,0 +1,50 @@
1
+ import { defineComponent as h, ref as n, watch as d } from "vue";
2
+ const b = h({
3
+ name: "BatchSearchDialog"
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ }), O = /* @__PURE__ */ h({
6
+ ...b,
7
+ __name: "batch-search-dialog",
8
+ props: {
9
+ modelValue: { type: Boolean, default: !1 },
10
+ showSelect: { type: Boolean, default: !0 },
11
+ isBatchSelectSameWithInput: { type: Boolean, default: !0 },
12
+ inputOptions: { type: Array, default: () => [] },
13
+ batchOptions: { type: Array, default: () => [] },
14
+ defaultOptions: {
15
+ type: Array,
16
+ default: () => [{ value: "WHOLE_SEARCH", label: "综合搜索" }]
17
+ }
18
+ },
19
+ emits: ["update:modelValue", "confirm"],
20
+ setup(m, { expose: v, emit: _ }) {
21
+ v();
22
+ const u = m, o = _, l = n(!1), r = n(!1), s = n(), e = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), C = {
23
+ searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
24
+ };
25
+ d(
26
+ () => u.modelValue,
27
+ (t) => {
28
+ l.value = t;
29
+ }
30
+ ), d(l, (t) => {
31
+ o("update:modelValue", t);
32
+ });
33
+ const y = (t) => {
34
+ var p;
35
+ t.preventDefault();
36
+ const a = (p = t.clipboardData) == null ? void 0 : p.getData("text/plain"), c = a == null ? void 0 : a.replace(/[\n\r\t]+/g, ",");
37
+ c && (e.value.searchContent = e.value.searchContent ? `${e.value.searchContent},${c}` : c);
38
+ }, S = async () => {
39
+ var a;
40
+ if (!s.value) return;
41
+ await s.value.validate().catch(() => !1) && ((a = e.value.searchContent) != null && a.trim()) && (r.value = !0, o("confirm", { ...e.value, searchContent: e.value.searchContent.trim() }), i(), r.value = !1);
42
+ }, i = () => {
43
+ l.value = !1, e.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
44
+ }, f = { props: u, emit: o, visible: l, loading: r, formRef: s, form: e, rules: C, handlePaste: y, handleConfirm: S, handleClose: i };
45
+ return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
46
+ }
47
+ });
48
+ export {
49
+ O as default
50
+ };