@bytenew/bn-bus-ui 1.1.463 → 1.1.464

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 (167) hide show
  1. package/dist/assocTableSearch-Bfe96864.js +349 -0
  2. package/dist/assocTableSearch.css +1 -0
  3. package/dist/bn-bus-ui.es.js +65 -0
  4. package/dist/bn-bus-ui.umd.js +49 -0
  5. package/dist/chooseIPaasData-COrrvQKZ.js +391 -0
  6. package/dist/chooseIPaasData.css +1 -0
  7. package/dist/defaultSet-CzN1ec_d.js +297 -0
  8. package/dist/defaultSet.css +1 -0
  9. package/dist/fileFormData-D_Q1vylE.js +53 -0
  10. package/dist/formItemFooter-BvptZj_u.js +108 -0
  11. package/dist/formItemFooter.css +1 -0
  12. package/dist/funcExprDialog-BguNs9fl.js +139 -0
  13. package/dist/funcExprDialog.css +1 -0
  14. package/dist/index-0oB7QocU.js +44 -0
  15. package/dist/index-69fRP0M8.js +89 -0
  16. package/dist/index-BdklTJtF.js +66 -0
  17. package/dist/index-Bu3jHlby.js +45 -0
  18. package/dist/index-BxWx5kpG.js +89 -0
  19. package/dist/index-C5LQ0OSs.js +183 -0
  20. package/dist/index-C8YhrrUN.js +51 -0
  21. package/dist/index-COuPCIzB.js +45 -0
  22. package/dist/index-CSvVyjxx.js +178 -0
  23. package/dist/index-DCv51EXX.js +109 -0
  24. package/dist/index-DUSI6MuC.js +135 -0
  25. package/dist/index-DVzxs2vR.js +58 -0
  26. package/dist/index-Dd4b8zNb.js +746 -0
  27. package/dist/index-Md-ZlkCW.js +66 -0
  28. package/dist/index-hsSIY2FP.js +221 -0
  29. package/dist/index-n13-H3_Y.js +118 -0
  30. package/dist/index-wUl5aPUD.js +64 -0
  31. package/dist/index.css +1 -0
  32. package/dist/index2.css +1 -0
  33. package/dist/index3.css +1 -0
  34. package/dist/index4.css +1 -0
  35. package/dist/index5.css +1 -0
  36. package/dist/index6.css +1 -0
  37. package/dist/index7.css +1 -0
  38. package/dist/install-CNjs0u5x.js +23299 -0
  39. package/dist/install.css +1 -0
  40. package/dist/setOption-CXOifQcx.js +329 -0
  41. package/dist/setOption.css +1 -0
  42. package/dist/setRelationOption-C7VDhej7.js +5217 -0
  43. package/dist/setRelationOption.css +1 -0
  44. package/package.json +4 -20
  45. package/install.js +0 -134
  46. package/packages/BnAddress/index.vue +0 -141
  47. package/packages/BnAddressParse/index.vue +0 -75
  48. package/packages/BnAdvancedFilter/BnFilterView.vue +0 -145
  49. package/packages/BnAdvancedFilter/index.vue +0 -345
  50. package/packages/BnAdvancedFilter/util.js +0 -171
  51. package/packages/BnCascader/BnCascader.vue +0 -543
  52. package/packages/BnCascader/BnCascaderPanel.vue +0 -1331
  53. package/packages/BnCascader/cascaderDisplay.js +0 -102
  54. package/packages/BnCheck/BnCheck.vue +0 -253
  55. package/packages/BnColumnConfig/columnConfigDialog.vue +0 -134
  56. package/packages/BnColumnConfig/component/childrenFormSetting/assocTable.vue +0 -143
  57. package/packages/BnColumnConfig/component/childrenFormSetting/assocTableSearch.vue +0 -314
  58. package/packages/BnColumnConfig/component/childrenFormSetting/index.vue +0 -243
  59. package/packages/BnColumnConfig/component/defaultSet/defaultSet.vue +0 -114
  60. package/packages/BnColumnConfig/component/defaultSet/stringDefault.vue +0 -210
  61. package/packages/BnColumnConfig/component/funcExprDialog/funcExprDialog.vue +0 -126
  62. package/packages/BnColumnConfig/component/packageFilter/index.vue +0 -141
  63. package/packages/BnColumnConfig/component/paraExplainSet/index.vue +0 -156
  64. package/packages/BnColumnConfig/component/setOption/setOption.vue +0 -321
  65. package/packages/BnColumnConfig/component/setRelationOption/ConditionList.vue +0 -277
  66. package/packages/BnColumnConfig/component/setRelationOption/LevelHeader.vue +0 -144
  67. package/packages/BnColumnConfig/component/setRelationOption/setRelationOption.vue +0 -642
  68. package/packages/BnColumnConfig/data.js +0 -129
  69. package/packages/BnColumnConfig/index.scss +0 -23
  70. package/packages/BnColumnConfig/index.vue +0 -309
  71. package/packages/BnCondVal/BnCondVal.vue +0 -112
  72. package/packages/BnCondVal/itemVal/dateRegVal.vue +0 -39
  73. package/packages/BnCondVal/itemVal/dateVal.vue +0 -39
  74. package/packages/BnCondVal/itemVal/numRegVal.vue +0 -67
  75. package/packages/BnCondVal/itemVal/numVal.vue +0 -44
  76. package/packages/BnCondVal/itemVal/relationVal.vue +0 -73
  77. package/packages/BnCondVal/itemVal/selectColumnVal.vue +0 -58
  78. package/packages/BnCondVal/itemVal/selectVal.vue +0 -59
  79. package/packages/BnCondVal/itemVal/stringVal.vue +0 -156
  80. package/packages/BnCondition/index.vue +0 -551
  81. package/packages/BnCondition/util.js +0 -232
  82. package/packages/BnDatePicker/BnDatePicker.vue +0 -194
  83. package/packages/BnDrop/BnDrop.vue +0 -917
  84. package/packages/BnEmptyTip/BnEmptyTip.vue +0 -107
  85. package/packages/BnExportOrder/BnExportOrder.vue +0 -241
  86. package/packages/BnExportOrder/validatorCode.vue +0 -94
  87. package/packages/BnFileView/BnFileView.vue +0 -271
  88. package/packages/BnFileView/FileDetail.vue +0 -125
  89. package/packages/BnFileView/videoPreview.vue +0 -70
  90. package/packages/BnFilterOption/BnFilterOption.vue +0 -160
  91. package/packages/BnFunExpr/BnFunExpr.vue +0 -608
  92. package/packages/BnImportOrder/BnImportOrder.vue +0 -323
  93. package/packages/BnImportTemplate/BnImportTemplate.vue +0 -866
  94. package/packages/BnImportTemplate/assets/merge_tip_img.png +0 -0
  95. package/packages/BnImportTemplate/assets/sheet_tip.png +0 -0
  96. package/packages/BnImportTemplate/assets/xls.png +0 -0
  97. package/packages/BnImportTemplate/components/ImportTemplateTrigger.vue +0 -198
  98. package/packages/BnImportTemplate/components/TemplateEditDialog.vue +0 -340
  99. package/packages/BnImportTemplate/components/TemplateFieldsConfig.vue +0 -401
  100. package/packages/BnImportTemplate/components/TemplateListDialog.vue +0 -297
  101. package/packages/BnInpNum/BnInpNum.vue +0 -165
  102. package/packages/BnMenus/BnMenus.vue +0 -502
  103. package/packages/BnMenus/MenuItem.vue +0 -321
  104. package/packages/BnOrderCard/BnOrderCard.vue +0 -389
  105. package/packages/BnOrderCard/orderRemark.vue +0 -178
  106. package/packages/BnOrderCard/util.js +0 -94
  107. package/packages/BnOrderDetail/BnOrderDetail.vue +0 -338
  108. package/packages/BnOrderDetail/filterLogByUser.vue +0 -108
  109. package/packages/BnOrderDetail/orderLogs.vue +0 -53
  110. package/packages/BnOrderDetail/showSubForm/index.vue +0 -41
  111. package/packages/BnOrderDetail/showSubForm/showChildTable.vue +0 -61
  112. package/packages/BnOrderDetail/showSubForm/showTimeLine.vue +0 -131
  113. package/packages/BnOrderDetail/showSubForm/tableCellCopy.vue +0 -84
  114. package/packages/BnOrderShare/index.vue +0 -378
  115. package/packages/BnOrderShare/shareUrlInp.vue +0 -54
  116. package/packages/BnRadio/BnRadio.vue +0 -181
  117. package/packages/BnRelation/BnRelation.vue +0 -120
  118. package/packages/BnSelect/BnSelect.vue +0 -485
  119. package/packages/BnSmartForm/BnBatchForm.vue +0 -334
  120. package/packages/BnSmartForm/BnBatchFormDialog.vue +0 -423
  121. package/packages/BnSmartForm/BnSmartElf/elfLog/index.vue +0 -57
  122. package/packages/BnSmartForm/BnSmartElf/index.vue +0 -95
  123. package/packages/BnSmartForm/BnSmartFormPsychic.js +0 -629
  124. package/packages/BnSmartForm/BnSmartFormUtil.js +0 -524
  125. package/packages/BnSmartForm/addressForm/index.vue +0 -73
  126. package/packages/BnSmartForm/checkboxForm/index.vue +0 -99
  127. package/packages/BnSmartForm/childrenForm/childFormFile.vue +0 -237
  128. package/packages/BnSmartForm/childrenForm/childrenFormBody.vue +0 -260
  129. package/packages/BnSmartForm/childrenForm/index.vue +0 -110
  130. package/packages/BnSmartForm/childrenForm/searchInventory.vue +0 -115
  131. package/packages/BnSmartForm/chooseAssocTable/chooseAssocTable.vue +0 -451
  132. package/packages/BnSmartForm/chooseAssocTable/chooseChildGood.vue +0 -229
  133. package/packages/BnSmartForm/chooseAssocTable/tableCellCopy.vue +0 -84
  134. package/packages/BnSmartForm/chooseChildOrder/chooseChildOrder.vue +0 -158
  135. package/packages/BnSmartForm/chooseIPaasData/chooseIPaasData.vue +0 -307
  136. package/packages/BnSmartForm/chooseIPaasData/tableCellCopy.vue +0 -84
  137. package/packages/BnSmartForm/choosePackage/choosePackage.vue +0 -361
  138. package/packages/BnSmartForm/dateDualForm/index.vue +0 -37
  139. package/packages/BnSmartForm/dateForm/index.vue +0 -38
  140. package/packages/BnSmartForm/fileForm/fileFormData.js +0 -50
  141. package/packages/BnSmartForm/fileForm/index.vue +0 -240
  142. package/packages/BnSmartForm/formItemFooter/formItemFooter.vue +0 -38
  143. package/packages/BnSmartForm/formItemTop/formItemTop.vue +0 -42
  144. package/packages/BnSmartForm/index.vue +0 -1201
  145. package/packages/BnSmartForm/numberForm/index.vue +0 -63
  146. package/packages/BnSmartForm/radioForm/index.vue +0 -72
  147. package/packages/BnSmartForm/receiveForm/index.vue +0 -112
  148. package/packages/BnSmartForm/relationForm/index.vue +0 -82
  149. package/packages/BnSmartForm/scoreForm/index.vue +0 -39
  150. package/packages/BnSmartForm/selectForm/index.vue +0 -55
  151. package/packages/BnSmartForm/showValForm/index.vue +0 -42
  152. package/packages/BnSmartForm/showValForm/showValFormTable.vue +0 -104
  153. package/packages/BnSmartForm/smartFormsCommon.scss +0 -43
  154. package/packages/BnSmartForm/stringForm/index.vue +0 -170
  155. package/packages/BnVirtPopover/index.vue +0 -319
  156. package/packages/BnWebLog/BnWebLog.vue +0 -140
  157. package/packages/BnWorkSettingDrop/advancedOptions.js +0 -112
  158. package/packages/BnWorkSettingDrop/benBenAIUtil.js +0 -89
  159. package/packages/BnWorkSettingDrop/index.vue +0 -292
  160. package/packages/font/iconfont.css +0 -243
  161. package/packages/font/iconfont.ttf +0 -0
  162. package/packages/font/iconfont.woff +0 -0
  163. package/packages/font/iconfont.woff2 +0 -0
  164. package/utils/addressParse-old.js +0 -645
  165. package/utils/addressParse.js +0 -735
  166. package/utils/config.js +0 -68
  167. package/utils/index.js +0 -1171
@@ -0,0 +1,183 @@
1
+ import { debounce as F } from "lodash";
2
+ import { f as E, a as Q } from "./formItemFooter-BvptZj_u.js";
3
+ import { resolveComponent as u, openBlock as r, createElementBlock as v, createVNode as i, createElementVNode as b, createBlock as d, withCtx as C, createTextVNode as U, toDisplayString as R, createCommentVNode as D } from "vue";
4
+ import { _ as N } from "./install-CNjs0u5x.js";
5
+ const T = {
6
+ name: "stringForm",
7
+ components: { formItemTop: Q, formItemFooter: E },
8
+ props: {
9
+ column: Object,
10
+ dataBack: Object,
11
+ extraInfo: Object,
12
+ disabled: Boolean,
13
+ postFunc: Function
14
+ },
15
+ data() {
16
+ return {
17
+ lastQueryValue: null,
18
+ lastQueryResults: []
19
+ };
20
+ },
21
+ computed: {
22
+ parsedDataExtra() {
23
+ var l, t;
24
+ const e = ((t = (l = this.column) == null ? void 0 : l.extraInfo) == null ? void 0 : t.dataExtra) || "";
25
+ if (!e) return null;
26
+ try {
27
+ return JSON.parse(e);
28
+ } catch {
29
+ return null;
30
+ }
31
+ },
32
+ isUrlType() {
33
+ var e;
34
+ return !!((e = this.parsedDataExtra) != null && e.searchUrl);
35
+ },
36
+ dataExtraUrl() {
37
+ var e;
38
+ return ((e = this.parsedDataExtra) == null ? void 0 : e.searchUrl) || "";
39
+ }
40
+ },
41
+ methods: {
42
+ /**
43
+ * 输入框输入事件
44
+ * */
45
+ onInput(e) {
46
+ this.column.error = "", this.column.warning = "", this.$emit("onInput", this.column), this.onChange(e);
47
+ },
48
+ /**
49
+ * 输入框Change事件
50
+ * @param {String} type 是否是其他事件类型
51
+ * */
52
+ onChange: F(function(e, l) {
53
+ this.column.value && this.checkValue(), this.$emit("onChange", this.column);
54
+ }, 500),
55
+ /**
56
+ * 输入框onFocus事件
57
+ * */
58
+ onFocus(e) {
59
+ this.$emit("focus", this.column);
60
+ },
61
+ /**
62
+ * 输入框失去焦点事件
63
+ * */
64
+ onBlur() {
65
+ this.$emit("blur", this.column);
66
+ },
67
+ /**
68
+ * 检查输入框的值,并判断是否需要调用检查数据唯一
69
+ *
70
+ * */
71
+ checkValue() {
72
+ try {
73
+ this.column.extraInfo.regular && (new RegExp(this.column.extraInfo.regular).test(this.column.value) || (this.column.error = this.column.extraInfo.paraExplain || "请输入符合要求的" + this.column.name));
74
+ } catch (e) {
75
+ console.log("stringForm.changeErr:" + e);
76
+ }
77
+ },
78
+ /**
79
+ * 远程搜索建议(聚焦时用当前值筛选,输入变更时用输入值筛选)
80
+ */
81
+ querySearch(e, l) {
82
+ if (!e) {
83
+ this.lastQueryValue = null, this.lastQueryResults = [], l([]);
84
+ return;
85
+ }
86
+ if (this.lastQueryValue === e) {
87
+ l(this.lastQueryResults);
88
+ return;
89
+ }
90
+ const t = {
91
+ ...this.column.postData || {},
92
+ column: this.column.columnCode,
93
+ keyword: e || "",
94
+ pageNo: 1,
95
+ pageSize: 50
96
+ }, m = this.dataExtraUrl;
97
+ this.postFunc(m, t).then((s) => {
98
+ var o;
99
+ if (!s.code && ((o = s.data) != null && o.results)) {
100
+ const c = s.data.results.map((n) => ({ value: n.value || n.label || "", ...n }));
101
+ this.lastQueryValue = e, this.lastQueryResults = c, l(c);
102
+ } else
103
+ this.lastQueryValue = e, this.lastQueryResults = [], l([]);
104
+ }).catch(() => {
105
+ this.lastQueryValue = e, this.lastQueryResults = [], l([]);
106
+ });
107
+ },
108
+ handleSelect(e) {
109
+ this.column.value = e.value, this.column.error = "", this.column.warning = "", this.$emit("onInput", this.column), this.$emit("onChange", this.column);
110
+ }
111
+ }
112
+ }, O = { class: "w-default-wrap" }, S = { class: "w-default-wrap" }, j = {
113
+ key: 3,
114
+ class: "w-margin-top6"
115
+ };
116
+ function z(e, l, t, m, s, o) {
117
+ var f, p, x, I, y, V, k, g;
118
+ const c = u("formItemTop"), n = u("el-autocomplete"), h = u("el-input"), B = u("el-button"), _ = u("formItemFooter");
119
+ return r(), v("div", O, [
120
+ i(c, {
121
+ column: t.column,
122
+ dataBack: t.dataBack
123
+ }, null, 8, ["column", "dataBack"]),
124
+ b("div", S, [
125
+ o.isUrlType ? (r(), d(n, {
126
+ key: 0,
127
+ modelValue: t.column.value,
128
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => t.column.value = a),
129
+ "fetch-suggestions": o.querySearch,
130
+ clearable: "",
131
+ class: "w-50",
132
+ placeholder: ((p = (f = t.column) == null ? void 0 : f.extraInfo) == null ? void 0 : p.placeholder) || "",
133
+ onSelect: o.handleSelect
134
+ }, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect"])) : ((I = (x = t.column) == null ? void 0 : x.extraInfo) == null ? void 0 : I.dataExtra) == "textarea" ? (r(), d(h, {
135
+ key: 1,
136
+ modelValue: t.column.value,
137
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => t.column.value = a),
138
+ onInput: o.onInput,
139
+ onFocus: o.onFocus,
140
+ onBlur: o.onBlur,
141
+ clearable: "",
142
+ "show-word-limit": "",
143
+ placeholder: ((V = (y = t.column) == null ? void 0 : y.extraInfo) == null ? void 0 : V.placeholder) || "",
144
+ type: "textarea",
145
+ rows: 4,
146
+ maxlength: 500
147
+ }, null, 8, ["modelValue", "onInput", "onFocus", "onBlur", "placeholder"])) : (r(), d(h, {
148
+ key: 2,
149
+ modelValue: t.column.value,
150
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => t.column.value = a),
151
+ disabled: t.disabled,
152
+ placeholder: ((g = (k = t.column) == null ? void 0 : k.extraInfo) == null ? void 0 : g.placeholder) || "",
153
+ onInput: o.onInput,
154
+ onFocus: o.onFocus,
155
+ onBlur: o.onBlur,
156
+ clearable: "",
157
+ "show-word-limit": ""
158
+ }, null, 8, ["modelValue", "disabled", "placeholder", "onInput", "onFocus", "onBlur"])),
159
+ t.dataBack && t.dataBack.key == t.column.columnCode ? (r(), v("div", j, [
160
+ i(B, {
161
+ link: "",
162
+ type: "primary",
163
+ style: { "padding-left": "0" },
164
+ onClick: l[3] || (l[3] = (a) => e.$emit("operate", this.column, "choosePackage"))
165
+ }, {
166
+ default: C(() => [
167
+ U("选择" + R(t.column.name || ""), 1)
168
+ ]),
169
+ _: 1
170
+ })
171
+ ])) : D("", !0)
172
+ ]),
173
+ i(_, {
174
+ column: t.column,
175
+ extraInfo: t.extraInfo,
176
+ onOperate: l[4] || (l[4] = (a, w) => e.$emit("operate", a, w))
177
+ }, null, 8, ["column", "extraInfo"])
178
+ ]);
179
+ }
180
+ const H = /* @__PURE__ */ N(T, [["render", z]]);
181
+ export {
182
+ H as default
183
+ };
@@ -0,0 +1,51 @@
1
+ import { a as f, f as _ } from "./formItemFooter-BvptZj_u.js";
2
+ import { resolveComponent as n, openBlock as o, createElementBlock as t, createVNode as a, createElementVNode as p, Fragment as h, renderList as v, createCommentVNode as F } from "vue";
3
+ import { _ as g } from "./install-CNjs0u5x.js";
4
+ const V = {
5
+ name: "radioForm",
6
+ components: { formItemFooter: _, formItemTop: f },
7
+ props: {
8
+ column: {
9
+ type: Object,
10
+ default: function() {
11
+ return {};
12
+ }
13
+ },
14
+ disabled: Boolean
15
+ },
16
+ methods: {
17
+ changeVal() {
18
+ this.column.error = "", this.column.warning = "", this.$emit("onChange", this.column);
19
+ }
20
+ }
21
+ }, w = { class: "w-default-wrap radioForm" }, I = { class: "w-default-wrap clearFix" }, b = {
22
+ key: 0,
23
+ class: "w-default-wrap radioForm-empty"
24
+ };
25
+ function x(B, l, e, C, k, m) {
26
+ const r = n("formItemTop"), c = n("BnRadio"), d = n("formItemFooter");
27
+ return o(), t("div", w, [
28
+ a(r, { column: e.column }, null, 8, ["column"]),
29
+ p("div", I, [
30
+ (o(!0), t(h, null, v(e.column.moduleDefinition, (i, u) => (o(), t("div", {
31
+ class: "radioForm-item",
32
+ key: u
33
+ }, [
34
+ a(c, {
35
+ modelValue: e.column.value,
36
+ "onUpdate:modelValue": l[0] || (l[0] = (s) => e.column.value = s),
37
+ optionProps: { value: "code", label: "title" },
38
+ disabled: e.disabled,
39
+ trueData: i,
40
+ onChange: m.changeVal
41
+ }, null, 8, ["modelValue", "disabled", "trueData", "onChange"])
42
+ ]))), 128)),
43
+ e.column.moduleDefinition.length == 0 ? (o(), t("div", b, " 无数据 ")) : F("", !0)
44
+ ]),
45
+ a(d, { column: e.column }, null, 8, ["column"])
46
+ ]);
47
+ }
48
+ const T = /* @__PURE__ */ g(V, [["render", x], ["__scopeId", "data-v-7a529164"]]);
49
+ export {
50
+ T as default
51
+ };
@@ -0,0 +1,45 @@
1
+ import { f as d, a as s } from "./formItemFooter-BvptZj_u.js";
2
+ import { debounce as f } from "lodash";
3
+ import { resolveComponent as n, openBlock as i, createElementBlock as _, createVNode as t, createElementVNode as p } from "vue";
4
+ import { _ as x } from "./install-CNjs0u5x.js";
5
+ const h = {
6
+ name: "numberForm",
7
+ components: { formItemTop: s, formItemFooter: d },
8
+ props: {
9
+ column: {
10
+ type: Object,
11
+ default: function() {
12
+ return {};
13
+ }
14
+ },
15
+ disabled: Boolean
16
+ },
17
+ methods: {
18
+ /**
19
+ * 输入框Change事件
20
+ * */
21
+ onChange: f(function(m, o) {
22
+ this.$emit("onChange", this.column);
23
+ }, 500)
24
+ }
25
+ }, I = { class: "w-default-wrap" }, b = { class: "w-default-wrap" };
26
+ function v(m, o, e, C, g, a) {
27
+ const l = n("formItemTop"), c = n("el-rate"), r = n("formItemFooter");
28
+ return i(), _("div", I, [
29
+ t(l, { column: e.column }, null, 8, ["column"]),
30
+ p("div", b, [
31
+ t(c, {
32
+ modelValue: e.column.value,
33
+ "onUpdate:modelValue": o[0] || (o[0] = (u) => e.column.value = u),
34
+ disabled: e.disabled,
35
+ onChange: a.onChange,
36
+ max: e.column.extraInfo.valueMaxSize ? parseInt(e.column.extraInfo.valueMaxSize) : 5
37
+ }, null, 8, ["modelValue", "disabled", "onChange", "max"])
38
+ ]),
39
+ t(r, { column: e.column }, null, 8, ["column"])
40
+ ]);
41
+ }
42
+ const T = /* @__PURE__ */ x(h, [["render", v]]);
43
+ export {
44
+ T as default
45
+ };
@@ -0,0 +1,178 @@
1
+ import { a as b, f as I } from "./formItemFooter-BvptZj_u.js";
2
+ import { _ as F, a5 as v } from "./install-CNjs0u5x.js";
3
+ import { f as w } from "./fileFormData-D_Q1vylE.js";
4
+ import { resolveComponent as o, openBlock as m, createElementBlock as y, createBlock as N, createCommentVNode as x, createElementVNode as a, createVNode as i, withCtx as V, createTextVNode as T, toDisplayString as r, withDirectives as B, vShow as C } from "vue";
5
+ const D = {
6
+ name: "FileForm",
7
+ components: { formItemFooter: I, formItemTop: b },
8
+ props: {
9
+ column: { type: Object, default: () => ({}) },
10
+ disabled: Boolean,
11
+ // 隐藏头部
12
+ hiddenTop: Boolean
13
+ },
14
+ data() {
15
+ return {
16
+ fileType: this.column.fileType || w,
17
+ pasteValue: "",
18
+ pasteImgList: [],
19
+ //用来存放粘贴的图片
20
+ // 上传进度
21
+ uploadProgress: 0,
22
+ uploadFileCount: 0,
23
+ //记录上传次数,限制最多上传5个
24
+ uploadFileNumber: this.column.uploadFileNumber || 10,
25
+ //可上传附件那个数
26
+ showLimit: 15,
27
+ //单文件最大M数
28
+ uploadAction: "/v2/attachment/upload",
29
+ uploadData: { source: "task" }
30
+ };
31
+ },
32
+ methods: {
33
+ /**
34
+ * 上传成功
35
+ * */
36
+ fileSuccess(t) {
37
+ if (this.column.error = "", this.uploadProgress = 0, t.code)
38
+ this.$message({
39
+ message: t.msg,
40
+ type: "warning"
41
+ });
42
+ else {
43
+ const e = {
44
+ title: t.data.fileName,
45
+ id: t.data.id,
46
+ code: t.data.id,
47
+ size: t.data.fileSize,
48
+ type: t.data.suffix,
49
+ url: t.data.url
50
+ };
51
+ this.column.value.length < this.uploadFileNumber ? (this.column.value.push(e), this.$emit("onChange", this.column)) : this.$message({
52
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
53
+ type: "warning"
54
+ }), this.uploadFileCount = this.column.value.length;
55
+ }
56
+ },
57
+ /**
58
+ * 附件上传前
59
+ * */
60
+ beforeUpload(t) {
61
+ if (this.column.value.length >= this.uploadFileNumber)
62
+ return this.$message({
63
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
64
+ type: "warning"
65
+ }), !1;
66
+ const e = 50, s = 1048576 * e;
67
+ if (t.size > s)
68
+ return this.$message({
69
+ message: `上传文件大小不能超出${e}MB`,
70
+ type: "warning"
71
+ }), !1;
72
+ const u = t.name.split(".").pop().toLowerCase();
73
+ return this.fileType.includes(u) ? (this.uploadFileCount++, !0) : (this.$message({
74
+ message: "上传的文件格式不支持",
75
+ type: "warning"
76
+ }), !1);
77
+ },
78
+ handleUploadProgress(t) {
79
+ this.uploadProgress = Math.round(t.percent);
80
+ },
81
+ //粘贴图片到编辑器,事件处理方法,主要用于事件销毁
82
+ pasteEvent(t) {
83
+ if (this.column.value.length >= this.uploadFileNumber)
84
+ return this.$message({
85
+ message: `上传文件个数不能超过${this.uploadFileNumber}个`,
86
+ type: "warning"
87
+ }), !1;
88
+ this.column.error = "", this.pasteImgList.push(t), v(t, this.column.pathUrl || this.uploadAction).then((e) => {
89
+ if (e.code)
90
+ this.$message({
91
+ message: e.msg,
92
+ type: "warning"
93
+ });
94
+ else {
95
+ const s = {
96
+ title: e.data.fileName,
97
+ id: e.data.id,
98
+ code: e.data.id,
99
+ size: e.data.fileSize,
100
+ type: e.data.suffix,
101
+ url: e.data.url
102
+ };
103
+ this.column.value.push(s), this.$emit("onChange", this.column), this.column.value.length >= this.uploadFileNumber && (this.pasteImgList = []);
104
+ }
105
+ });
106
+ }
107
+ },
108
+ mounted() {
109
+ this.$refs.pasteImgInput && this.$refs.pasteImgInput.$el && this.$refs.pasteImgInput.$el.addEventListener("paste", this.pasteEvent);
110
+ },
111
+ //实例销毁前
112
+ beforeDestroy() {
113
+ this.$refs.pasteImgInput && this.$refs.pasteImgInput.$el && this.$refs.pasteImgInput.$el.removeEventListener(
114
+ "paste",
115
+ this.pasteEvent
116
+ );
117
+ }
118
+ }, U = { class: "fileForm" }, E = { class: "" }, L = { class: "fileForm-tip" };
119
+ function S(t, e, s, u, l, n) {
120
+ const p = o("formItemTop"), d = o("el-upload"), c = o("el-input"), h = o("el-progress"), f = o("BnFileView"), g = o("formItemFooter");
121
+ return m(), y("div", U, [
122
+ s.hiddenTop ? x("", !0) : (m(), N(p, {
123
+ key: 0,
124
+ column: s.column
125
+ }, null, 8, ["column"])),
126
+ a("div", E, [
127
+ i(d, {
128
+ class: "fileForm-upload",
129
+ ref: "uploadInput",
130
+ drag: "",
131
+ action: s.column.pathUrl || l.uploadAction,
132
+ "show-file-list": !1,
133
+ disabled: s.disabled,
134
+ "before-upload": n.beforeUpload,
135
+ multiple: "",
136
+ data: l.uploadData,
137
+ "on-progress": n.handleUploadProgress,
138
+ "on-success": n.fileSuccess
139
+ }, {
140
+ default: V(() => [...e[1] || (e[1] = [
141
+ a("div", { class: "fileForm-btn" }, [
142
+ a("span", { class: "bnUIcon bnUIcon-upload" }),
143
+ T(" 选择或拖拽上传文件 ")
144
+ ], -1)
145
+ ])]),
146
+ _: 1
147
+ }, 8, ["action", "disabled", "before-upload", "data", "on-progress", "on-success"]),
148
+ i(c, {
149
+ modelValue: l.pasteValue,
150
+ "onUpdate:modelValue": e[0] || (e[0] = (_) => l.pasteValue = _),
151
+ ref: "pasteImgInput",
152
+ placeholder: "复制粘贴上传截图",
153
+ class: "fileForm-input",
154
+ disabled: s.disabled
155
+ }, null, 8, ["modelValue", "disabled"]),
156
+ a("span", L, "最多可上传" + r(l.uploadFileNumber) + "个文件,单个文件不超过" + r(l.showLimit) + "M", 1)
157
+ ]),
158
+ B(i(h, {
159
+ style: { width: "100%", "max-width": "444px" },
160
+ percentage: l.uploadProgress,
161
+ class: "fileForm-progress"
162
+ }, null, 8, ["percentage"]), [
163
+ [C, l.uploadProgress > 0]
164
+ ]),
165
+ a("div", null, [
166
+ i(f, {
167
+ "file-list": s.column.value,
168
+ isDel: !s.disabled,
169
+ row: "2"
170
+ }, null, 8, ["file-list", "isDel"])
171
+ ]),
172
+ i(g, { column: s.column }, null, 8, ["column"])
173
+ ]);
174
+ }
175
+ const A = /* @__PURE__ */ F(D, [["render", S], ["__scopeId", "data-v-ce213ba4"]]);
176
+ export {
177
+ A as default
178
+ };
@@ -0,0 +1,109 @@
1
+ import { isEmpty as u } from "lodash";
2
+ import { resolveComponent as m, resolveDirective as f, withDirectives as h, openBlock as i, createElementBlock as n, createElementVNode as a, Fragment as g, renderList as _, normalizeClass as y, toDisplayString as F, createVNode as k } from "vue";
3
+ import { _ as v } from "./install-CNjs0u5x.js";
4
+ const x = {
5
+ name: "packageFilter",
6
+ computed: {
7
+ filterColumns() {
8
+ return this.columnList.filter((t) => this.columnData.extraInfo.filterColumn.includes(t.columnCode));
9
+ }
10
+ },
11
+ props: {
12
+ columnData: {
13
+ type: Object,
14
+ default: () => ({})
15
+ },
16
+ postFunc: Function,
17
+ // API请求函数
18
+ extendPost: Object,
19
+ // 额外的请求参数
20
+ columnList: {
21
+ type: Array,
22
+ default: () => []
23
+ },
24
+ disabled: Boolean
25
+ },
26
+ data() {
27
+ return {
28
+ dataFilterByPackage: {},
29
+ lazyLoad: !1,
30
+ //因为下拉菜单多的时候可能会影响加载速度,这里做个延迟加载
31
+ componentWidth: 0
32
+ // 组件宽度
33
+ };
34
+ },
35
+ mounted() {
36
+ var t, o;
37
+ this.dataFilterByPackage = (t = this.columnData.extraInfo) != null && t.dataFilterByPackage ? JSON.parse((o = this.columnData.extraInfo) == null ? void 0 : o.dataFilterByPackage) : {}, this.calculateWidth(), this.filterColumns.length > 4 ? setTimeout(() => {
38
+ this.lazyLoad = !0;
39
+ }, 200) : this.lazyLoad = !0;
40
+ },
41
+ methods: {
42
+ isEmpty: u,
43
+ /**
44
+ * 计算组件宽度
45
+ */
46
+ calculateWidth() {
47
+ this.$nextTick(() => {
48
+ const t = this.$el;
49
+ t && (this.componentWidth = t.offsetWidth);
50
+ });
51
+ },
52
+ /**
53
+ * 滚动到列表底部
54
+ */
55
+ changeDataFilter() {
56
+ this.columnData.extraInfo.dataFilterByPackage = JSON.stringify(this.dataFilterByPackage);
57
+ }
58
+ }
59
+ }, B = { class: "packageFilter" }, w = {
60
+ key: 0,
61
+ class: "packageFilter-list",
62
+ ref: "optionList"
63
+ }, D = ["title"], C = { class: "w-flex-center" }, P = {
64
+ key: 1,
65
+ class: "w-empty"
66
+ };
67
+ function b(t, o, c, L, l, s) {
68
+ const r = m("BnSelect"), d = f("loading");
69
+ return h((i(), n("div", B, [
70
+ o[0] || (o[0] = a("div", { class: "packageFilter-top w-flex-center" }, [
71
+ a("div", { class: "packageFilter-top-title" }, "数据过滤"),
72
+ a("div", { class: "w-margin-left8" }, [
73
+ a("span", { class: "w-font12 w-color-orange" }, "(选择包裹时,不会展示符合下方条件的ERP单据)")
74
+ ])
75
+ ], -1)),
76
+ l.lazyLoad ? (i(), n("div", w, [
77
+ (i(!0), n(g, null, _(s.filterColumns, (e) => (i(), n("div", {
78
+ class: y(["packageFilter-list-item", [l.componentWidth > 400 ? "two" : "one"]])
79
+ }, [
80
+ a("div", {
81
+ class: "w-font14 w-color-black6 w-text-over w-margin-bottom4",
82
+ title: e.name
83
+ }, F(e.name), 9, D),
84
+ a("div", C, [
85
+ k(r, {
86
+ modelValue: l.dataFilterByPackage[e.columnCode],
87
+ "onUpdate:modelValue": (p) => l.dataFilterByPackage[e.columnCode] = p,
88
+ clearable: "",
89
+ filterable: "",
90
+ labelInValue: !1,
91
+ onChange: s.changeDataFilter,
92
+ optionProps: { value: "code", label: "title" },
93
+ multiple: !0,
94
+ options: e.moduleDefinition,
95
+ pathUrl: e.pathUrl,
96
+ "post-data": e.postData,
97
+ postFunc: c.postFunc
98
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange", "options", "pathUrl", "post-data", "postFunc"])
99
+ ])
100
+ ], 2))), 256))
101
+ ], 512)) : (i(), n("div", P, " 数据加载中... "))
102
+ ])), [
103
+ [d, !l.lazyLoad]
104
+ ]);
105
+ }
106
+ const W = /* @__PURE__ */ v(x, [["render", b], ["__scopeId", "data-v-a92dc360"]]);
107
+ export {
108
+ W as default
109
+ };