@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
@@ -1,210 +0,0 @@
1
- <template>
2
- <div class="w-default-wrap">
3
- <!-- 默认值输入框,支持手动输入和组件关联 -->
4
- <el-input
5
- v-model="columnInfo.defaultInfo"
6
- placeholder="点击右侧可选择组件关联"
7
- ref="defaultContentString"
8
- @change="handleDefaultValueChange"
9
- >
10
- <template #append>
11
- <!-- 组件关联下拉选择器 -->
12
- <BnDrop :options="columnList.filter(i=>i.id !== columnInfo.id && ![10, 11, 12, 13, 17,18].includes(i.behaviorType))"
13
- :optionProps="{value:'columnCode',label:'name'}"
14
- :placement="'bottom-end'"
15
- @checkItem="handleColumnSelect"
16
- noValue
17
- >
18
- <div>
19
- <el-tooltip
20
- class="box-item"
21
- effect="dark" :show-after="600"
22
- content="关联组件将会把组件的值,映射到当前组件的默认值中"
23
- placement="top"
24
- >
25
- <span class="bnUIcon bnUIcon-linkFiled w-color-purple w-cursor-pointer"></span>
26
- </el-tooltip>
27
- </div>
28
- </BnDrop>
29
- </template>
30
- </el-input>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- export default {
36
- name: "defaultSet",
37
- props: {
38
- // 最终选中的value
39
- modelValue: {
40
- type: Object,
41
- default() {
42
- return {}
43
- }
44
- },
45
- // 组件列表
46
- columnList: {
47
- type: Array,
48
- default() {
49
- return []
50
- }
51
- },
52
- // 是否禁用
53
- disabled: Boolean,
54
- postFunc: Function,
55
- extendPost: Object,
56
- },
57
-
58
- computed: {
59
- columnInfo: {
60
- get() {
61
- return this.modelValue;
62
- },
63
- set(val) {
64
- this.$emit("update:modelValue", val);
65
- },
66
- },
67
- },
68
-
69
- methods: {
70
- /**
71
- * 在光标位置插入文本
72
- * @param {HTMLElement} dom - 目标输入框DOM元素
73
- * @param {string} value - 要插入的文本
74
- * @returns {string} 插入后的完整文本
75
- */
76
- insertTextAtCursor(dom, value) {
77
- // IE浏览器支持
78
- if (document.selection) {
79
- dom.focus();
80
- const selectRange = document.selection.createRange();
81
- selectRange.text = value;
82
- dom.focus();
83
- }
84
- // 现代浏览器支持
85
- else if (dom.selectionStart || dom.selectionStart === 0) {
86
- const startPos = dom.selectionStart;
87
- const endPos = dom.selectionEnd;
88
- const scrollTop = dom.scrollTop;
89
-
90
- // 在光标位置插入文本
91
- dom.value = dom.value.substring(0, startPos) + value + dom.value.substring(endPos);
92
-
93
- // 设置光标位置到插入文本之后
94
- dom.focus();
95
- dom.selectionStart = startPos + value.length;
96
- dom.selectionEnd = startPos + value.length;
97
- dom.scrollTop = scrollTop;
98
- }
99
- // 其他情况直接追加到末尾
100
- else {
101
- dom.value += value;
102
- dom.focus();
103
- }
104
-
105
- return dom.value;
106
- },
107
-
108
- /**
109
- * 将默认值中的组件名称转换为对应的code和id
110
- * 格式:$组件名$ -> $组件code$ 或 $组件id$
111
- */
112
- updateDefaultInfoWithCodeAndId() {
113
- let defaultInfoWithCode = this.columnInfo.defaultInfo;
114
- let defaultInfoWithId = this.columnInfo.defaultInfo;
115
-
116
- // 遍历所有组件列表,进行字符串替换
117
- this.columnList.forEach(col => {
118
- const placeholder = `$${col.name}$`;
119
- const codePlaceholder = `$${col.columnCode}$`;
120
- const idPlaceholder = `$${col.id}$`;
121
-
122
- // 全局替换组件名为code和id
123
- defaultInfoWithCode = defaultInfoWithCode.split(placeholder).join(codePlaceholder);
124
- defaultInfoWithId = defaultInfoWithId.split(placeholder).join(idPlaceholder);
125
- });
126
-
127
- // 更新到组件配置中
128
- this.columnInfo.extraInfo.defaultInfoWithCode = defaultInfoWithCode;
129
- this.columnInfo.extraInfo.defaultInfoWithId = defaultInfoWithId;
130
- },
131
-
132
- /**
133
- * 处理选择关联组件事件
134
- * @param {Object} column - 被选中的组件对象
135
- */
136
- handleColumnSelect(column) {
137
- // 限制最多关联10个组件
138
- if (this.columnInfo.extraInfo.defaultInfoRuleCols?.length >= 10) {
139
- this.$message.warning('最多可设置10个组件', 2.5);
140
- return;
141
- }
142
-
143
- // 在光标位置插入组件占位符:$组件名$
144
- const inputEl = this.$refs.defaultContentString?.input;
145
- const placeholder = `$${column.name}$`;
146
- const newValue = this.insertTextAtCursor(inputEl, placeholder);
147
-
148
- // 更新默认值
149
- this.columnInfo.defaultInfo = newValue;
150
-
151
- // 转换为code和id格式
152
- this.updateDefaultInfoWithCodeAndId();
153
-
154
- // 检查是否已存在相同组件,避免重复添加
155
- const isDuplicate = this.columnInfo.extraInfo.defaultInfoRuleCols?.some(
156
- col => col.id === column.id && col.name === column.name
157
- );
158
-
159
- // 添加到已选组件列表
160
- if (!isDuplicate) {
161
- this.columnInfo.extraInfo.defaultInfoRuleCols = this.columnInfo.extraInfo.defaultInfoRuleCols || [];
162
- this.columnInfo.extraInfo.defaultInfoRuleCols.push({
163
- name: column.name,
164
- columnCode: column.columnCode,
165
- behaviorType: column.behaviorType
166
- });
167
- }
168
- },
169
-
170
- /**
171
- * 处理默认值输入框内容变化
172
- * @param {string} val - 当前输入框的值
173
- */
174
- handleDefaultValueChange(val) {
175
- // 如果清空了输入框,则清空所有关联组件信息
176
- if (!val) {
177
- this.columnInfo.extraInfo.defaultInfoRuleCols = [];
178
- this.columnInfo.extraInfo.defaultInfoWithCode = '';
179
- this.columnInfo.extraInfo.defaultInfoWithId = '';
180
- return;
181
- }
182
-
183
- // 过滤掉已被删除的组件占位符
184
- // 如果默认值中不再包含某个组件的占位符,则从已选列表中移除
185
- this.columnInfo.extraInfo.defaultInfoRuleCols =
186
- this.columnInfo.extraInfo.defaultInfoRuleCols?.filter(col => {
187
- const placeholder = `$${col.name}$`;
188
- return val.includes(placeholder);
189
- }) || [];
190
-
191
- // 如果还有关联组件,更新code和id格式
192
- if (this.columnInfo.extraInfo.defaultInfoRuleCols?.length) {
193
- this.updateDefaultInfoWithCodeAndId();
194
- } else {
195
- // 没有关联组件时清空
196
- this.columnInfo.extraInfo.defaultInfoWithCode = '';
197
- this.columnInfo.extraInfo.defaultInfoWithId = '';
198
- }
199
- },
200
- },
201
- }
202
- </script>
203
-
204
-
205
- <style scoped lang="scss">
206
- .defaultSet {
207
- position: relative;
208
- width: 100%;
209
- }
210
- </style>
@@ -1,126 +0,0 @@
1
- <template>
2
- <el-dialog
3
- v-model="visible"
4
- title="编辑函数" top="5vh" :close-on-click-modal="false"
5
- width="900" :destroy-on-close="true" append-to-body
6
- >
7
- <BnFunExpr v-if="visible" :id="columnInfo.extraInfo.exprId"
8
- :column-list="columnList" ref="bnFunExpr" :post-func="postFunc"></BnFunExpr>
9
- <template #footer>
10
- <div class="dialog-footer">
11
- <div>
12
- <el-link type="primary" href="https://banniu.yuque.com/staff-dmhmqa/zn9sih/mgcoi8ogkyvew7gt?singleDoc# "
13
- target="_blank">使用手册
14
- </el-link>
15
- </div>
16
- <div>
17
- <el-button @click="visible = false">取消</el-button>
18
- <el-button type="primary" :loading="loading" @click="submitForm">确认</el-button>
19
- </div>
20
- </div>
21
- </template>
22
- </el-dialog>
23
- </template>
24
-
25
- <script>
26
-
27
- export default {
28
- name: "funcExprDialog",
29
- props: {
30
- //最终选中的value
31
- modelValue: {
32
- type: Object,
33
- default() {
34
- return {}
35
- }
36
- },
37
- componentList: Array,
38
- tableCode: String,
39
- postFunc: Function,
40
- extendPost: Object,
41
- },
42
- computed: {
43
- columnInfo: {
44
- get() {
45
- return this.modelValue;
46
- },
47
- set(val) {
48
- this.$emit("update:modelValue", val);
49
- },
50
- },
51
- columnList() {
52
- let children = [];
53
- this.componentList.forEach((item) => {
54
- let data = {"id": item.id, "behaviorType": item.behaviorType, "name": item.name};
55
- if (item.behaviorType === 13) {
56
- const moduleDefinition = item.moduleDefinition.map((mod) => {
57
- return {
58
- "id": mod.id,
59
- "behaviorType": mod.behaviorType,
60
- "name": `${item.name}-${mod.name}`,
61
- parentId: item.id,
62
- parentName: item.name
63
- };
64
- })
65
- children.push(...moduleDefinition);
66
- } else {
67
- children.push(data);
68
- }
69
- });
70
- return [
71
- {
72
- "name": "工作表组件",
73
- children
74
- }
75
- ]
76
- }
77
- },
78
- data() {
79
- return {
80
- visible: false,
81
- loading: false,
82
- }
83
- },
84
- methods: {
85
- open() {
86
- this.loading = false;
87
- this.visible = true;
88
- },
89
- submitForm() {
90
- this.loading = true;
91
- const params = this.$refs.bnFunExpr.saveRule();
92
- // 清空操作
93
- if(!params.exprDisplay){
94
- this.columnInfo.extraInfo.exprId = '';
95
- this.columnInfo.extraInfo.exprExec = '';
96
- this.$emit("saveOver",'')
97
- this.visible = false;
98
- return;
99
- }
100
- this.postFunc('/expr/create',
101
- {...params, ...this.extendPost}).then(res => {
102
- this.loading = false;
103
- if (!res.code) {
104
- this.$emit("saveOver",params.exprDisplay)
105
- this.columnInfo.extraInfo.exprId = res.data.id;
106
- this.columnInfo.extraInfo.exprExec = res.data.exprExec;
107
- if(this.columnInfo.id == 6 || this.columnInfo.columnCode == 'task_title'){
108
- this.columnInfo.extraInfo.isAutoTitle = '1'
109
- this.columnInfo.extraInfo.autoTitleRule = ''
110
- }
111
- this.visible = false;
112
- }
113
- })
114
- },
115
- }
116
- }
117
- </script>
118
-
119
-
120
- <style scoped lang="scss">
121
- .dialog-footer {
122
- display: flex;
123
- justify-content: space-between;
124
- position: relative;
125
- }
126
- </style>
@@ -1,141 +0,0 @@
1
- <template>
2
- <div class="packageFilter" v-loading="!lazyLoad">
3
- <!-- 顶部操作栏 -->
4
- <div class="packageFilter-top w-flex-center">
5
- <div class="packageFilter-top-title">数据过滤</div>
6
- <div class="w-margin-left8">
7
- <span class="w-font12 w-color-orange">(选择包裹时,不会展示符合下方条件的ERP单据)</span>
8
- </div>
9
- </div>
10
- <!-- 选项列表 -->
11
- <div class="packageFilter-list" ref="optionList" v-if="lazyLoad">
12
- <div class="packageFilter-list-item" v-for="element in filterColumns"
13
- :class="[componentWidth>400?'two':'one']">
14
- <div class="w-font14 w-color-black6 w-text-over w-margin-bottom4" :title="element.name">{{ element.name }}</div>
15
- <div class="w-flex-center">
16
- <BnSelect v-model="dataFilterByPackage[element.columnCode]" clearable filterable
17
- :labelInValue="false" @change="changeDataFilter"
18
- :optionProps="{value:'code',label:'title'}"
19
- :multiple="true"
20
- :options="element.moduleDefinition"
21
- :pathUrl="element.pathUrl"
22
- :post-data="element.postData"
23
- :postFunc="postFunc"
24
- ></BnSelect>
25
- </div>
26
- </div>
27
- </div>
28
- <div v-else class="w-empty">
29
- 数据加载中...
30
- </div>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import {cloneDeep, isEmpty} from "lodash";
36
-
37
- export default {
38
- name: "packageFilter",
39
- computed: {
40
- filterColumns() {
41
- return this.columnList.filter(item => this.columnData.extraInfo.filterColumn.includes(item.columnCode))
42
- }
43
- },
44
- props: {
45
- columnData: {
46
- type: Object,
47
- default: () => ({}),
48
- },
49
- postFunc: Function, // API请求函数
50
- extendPost: Object, // 额外的请求参数
51
- columnList: {
52
- type: Array,
53
- default: () => []
54
- },
55
- disabled: Boolean,
56
- },
57
- data() {
58
- return {
59
- dataFilterByPackage: {},
60
- lazyLoad:false,//因为下拉菜单多的时候可能会影响加载速度,这里做个延迟加载
61
- componentWidth: 0, // 组件宽度
62
- };
63
- },
64
- mounted() {
65
- this.dataFilterByPackage = this.columnData.extraInfo?.dataFilterByPackage ? JSON.parse(this.columnData.extraInfo?.dataFilterByPackage) : {}
66
- // 计算组件宽度
67
- this.calculateWidth();
68
- if(this.filterColumns.length>4){
69
- setTimeout(()=>{
70
- this.lazyLoad = true;
71
- },200)
72
- }else{
73
- this.lazyLoad = true;
74
- }
75
- },
76
- methods: {
77
- isEmpty,
78
- /**
79
- * 计算组件宽度
80
- */
81
- calculateWidth() {
82
- this.$nextTick(() => {
83
- const el = this.$el;
84
- if (el) {
85
- this.componentWidth = el.offsetWidth;
86
- }
87
- });
88
- },
89
- /**
90
- * 滚动到列表底部
91
- */
92
- changeDataFilter() {
93
- this.columnData.extraInfo.dataFilterByPackage = JSON.stringify(this.dataFilterByPackage)
94
- },
95
- },
96
- };
97
- </script>
98
- <style scoped lang="scss">
99
- .packageFilter {
100
- // 顶部操作栏
101
- &-top {
102
- height: 32px;
103
- font-size: 14px;
104
-
105
- &-title {
106
- font-weight: 500;
107
- }
108
- }
109
-
110
- // 选项列表
111
- &-list {
112
- display: flex;
113
- flex-wrap: wrap;
114
- gap: 10px;
115
- margin-top: 10px;
116
- max-height: 300px;
117
- overflow-y: auto;
118
-
119
- &-item {
120
- position: relative;
121
- cursor: pointer;
122
- background: #ebeef5;
123
- border-radius: 6px;
124
- padding: 10px;
125
-
126
- &.two {
127
- width: calc(50% - 5px);
128
- }
129
-
130
- &.one {
131
- width: 100%;
132
- }
133
-
134
- &:hover {
135
- background: #E4E7ED;
136
- box-shadow: 0px 0px 6px rgba(0, 0, 0, .12);;
137
- }
138
- }
139
- }
140
- }
141
- </style>
@@ -1,156 +0,0 @@
1
- <template>
2
- <div class="paraExplainSet">
3
- <el-input type="textarea" resize="none" :rows="3"
4
- v-model="columnData.extraInfo.paraExplain" placeholder="填写说明" clearable
5
- :disabled="disabled" :maxlength="800" show-word-limit></el-input>
6
- <div class="w-flex-left w-flex-wrap w-flex-gap8 w-margin-top10">
7
- <el-upload class="paraExplainSet-upload" ref="uploadInput"
8
- :action="uploadUrl" :show-file-list="false" :disabled="disabled"
9
- :before-upload="beforeUpload" multiple :on-success="fileSuccess">
10
- <div class="paraExplainSet-upload-btn w-flex-center w-flex-lrCenter">
11
- <span class="bnUIcon bnUIcon-upImg w-font24 w-color-blue"></span>
12
- </div>
13
- </el-upload>
14
- <div v-for="(url,index) in columnData.extraInfo.operationPictures" :key="index" class="paraExplainSet-image-wrapper">
15
- <el-image preview-teleported style="width: 40px; height: 40px" :src="url"
16
- :preview-src-list="columnData.extraInfo.operationPictures"
17
- show-progress
18
- :initial-index="index"
19
- fit="cover"
20
- />
21
- <div v-if="!disabled" class="paraExplainSet-image-delete" @click="deleteImage(index)">
22
- <span class="bnUIcon bnUIcon-clear w-color-white"></span>
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <script>
30
- import { getApiBaseUrl } from "../../../../utils/config.js";
31
-
32
- export default {
33
- name: "paraExplainSet",
34
- props: {
35
- columnData: {
36
- type: Object,
37
- default: () => ({}),
38
- },
39
- disabled: Boolean,
40
- postFunc: Function, // API请求函数
41
- extendPost: Object, // 额外的请求参数
42
- },
43
- data() {
44
- return {
45
- fileType:['png', 'jpg', 'jpeg', 'gif']
46
- };
47
- },
48
- mounted() {
49
- if(!this.columnData.extraInfo.operationPictures){
50
- this.columnData.extraInfo.operationPictures = []
51
- }
52
- },
53
- computed: {
54
- uploadUrl() {
55
- return `${getApiBaseUrl()}/v2/attachment/upload/remarkOperation`
56
- },
57
- },
58
- methods: {
59
- /**
60
- * 上传成功
61
- * */
62
- fileSuccess(res) {
63
- if (!res.code) {
64
- if (this.columnData.extraInfo.operationPictures?.length < 15) {
65
- this.columnData.extraInfo.operationPictures?.length
66
- this.columnData.extraInfo.operationPictures.push(res.data.url);
67
- } else {
68
- this.$message.warning('上传文件个数不能超过15个')
69
- }
70
- } else {
71
- this.$message.warning(res.msg);
72
- }
73
- },
74
- /**
75
- * 附件上传前
76
- * */
77
- beforeUpload(file) {
78
- if (this.columnData.extraInfo.operationPictures?.length >= 15) {
79
- this.$message.warning('上传文件个数不能超过15个')
80
- return false;
81
- }
82
- const maxSize = 50;
83
- const maxSizeBytes = 1048576 * maxSize;
84
- if (file.size > maxSizeBytes) {
85
- this.$message.warning(`上传文件大小不能超出${maxSize}MB`);
86
- return false;
87
- }
88
- const fileExt = file.name.split(".").pop().toLowerCase();
89
- if (!this.fileType.includes(fileExt)) {
90
- this.$message.warning('仅支持上传图片');
91
- return false;
92
- }
93
- return true;
94
- },
95
- /**
96
- * 删除图片
97
- * */
98
- deleteImage(index) {
99
- this.columnData.extraInfo.operationPictures.splice(index, 1);
100
- },
101
- },
102
- };
103
- </script>
104
- <style scoped lang="scss">
105
- .paraExplainSet {
106
- width: 100%;
107
- &-upload{
108
- width: 40px;
109
- height: 40px;
110
- &-btn{
111
- width: 40px;
112
- height: 40px;
113
- border: 1px solid rgba(0, 0, 0, .12);
114
- box-shadow: 0px 0px 12px rgba(0, 0, 0, .12);
115
- }
116
- }
117
-
118
- &-image-wrapper {
119
- position: relative;
120
- width: 40px;
121
- height: 40px;
122
-
123
- &:hover {
124
- .paraExplainSet-image-delete {
125
- opacity: 1;
126
- }
127
- }
128
- }
129
-
130
- &-image-delete {
131
- position: absolute;
132
- top: -6px;
133
- right: -6px;
134
- width: 18px;
135
- height: 18px;
136
- border-radius: 50%;
137
- background-color: rgba(0, 0, 0, 0.6);
138
- display: flex;
139
- align-items: center;
140
- justify-content: center;
141
- cursor: pointer;
142
- opacity: 0;
143
- transition: opacity 0.2s;
144
- z-index: 10;
145
-
146
- &:hover {
147
- background-color: rgba(0, 0, 0, 0.8);
148
- }
149
-
150
- .el-icon-close {
151
- color: #fff;
152
- font-size: 12px;
153
- }
154
- }
155
- }
156
- </style>