@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,237 +0,0 @@
1
- <template>
2
- <div class="childFormFile">
3
- <div class="">
4
- <el-upload class="childFormFile-upload" ref="uploadInput" drag
5
- :action="column.pathUrl || uploadAction"
6
- :show-file-list="false"
7
- :before-upload="beforeUpload" multiple
8
- :data="uploadData" :on-progress="handleUploadProgress"
9
- :on-success="fileSuccess">
10
- <div class="childFormFile-btn">
11
- <span class="bnUIcon bnUIcon-upload"></span> 选择或拖拽上传文件
12
- </div>
13
- </el-upload>
14
- <!-- 视频附件不支持,其他情况支持 -->
15
- <el-input v-model="pasteValue"
16
- ref="fileUploadInput"
17
- placeholder="复制粘贴上传截图"
18
- class="childFormFile-input"/>
19
- <span class="childFormFile-tip">最多可上传{{ uploadFileNumber }}个文件,单个文件不超过{{ showLimit }}M</span>
20
- </div>
21
- <el-progress
22
- style="width: 100%; max-width: 444px"
23
- :percentage="uploadProgress"
24
- v-show="uploadProgress > 0"
25
- class="childFormFile-progress"
26
- ></el-progress>
27
- <div v-if="value">
28
- <BnFileView :file-list="value" :isDel="true" :is-mini="true"></BnFileView>
29
- </div>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- import {pasteImg} from "../BnSmartFormUtil.js";
35
- import {fileType} from "./../fileForm/fileFormData.js";
36
-
37
- export default {
38
- name: "childFormFile",
39
- props: {
40
- column: {
41
- type: Object,
42
- default: () => ({}),
43
- },
44
- value:{
45
- type: Array,
46
- default: () => [],
47
- },
48
- },
49
- data() {
50
- return {
51
- fileType: this.column.fileType || fileType,
52
- pasteValue: "",
53
- pasteImgList: [], //用来存放粘贴的图片
54
- // 上传进度
55
- uploadProgress: 0,
56
- uploadFileCount: 0, //记录上传次数,限制最多上传5个
57
- uploadFileNumber: 10, //可上传附件那个数
58
- showLimit: 15, //单文件最大M数
59
- uploadAction: "/v2/attachment/upload",
60
- uploadData: {source: "task"},
61
- };
62
- },
63
- methods: {
64
- /**
65
- * 上传成功
66
- * */
67
- fileSuccess(res) {
68
- this.column.error = "";
69
- this.uploadProgress = 0;
70
-
71
- if (!res.code) {
72
- const fileData = {
73
- title: res.data.fileName,
74
- id: res.data.id,
75
- code: res.data.id,
76
- size: res.data.fileSize,
77
- type: res.data.suffix,
78
- url: res.data.url,
79
- };
80
-
81
- if (this.value.length < this.uploadFileNumber) {
82
- this.value.push(fileData);
83
- this.$emit('onChange', this.column);
84
- } else {
85
- this.$message({
86
- message: `上传文件个数不能超过${this.uploadFileNumber}个`,
87
- type: 'warning'
88
- });
89
- }
90
- this.uploadFileCount = this.value.length;
91
- } else {
92
- this.$message({
93
- message: res.msg,
94
- type: 'warning'
95
- });
96
- }
97
- },
98
- /**
99
- * 附件上传前
100
- * */
101
- beforeUpload(file) {
102
- if (this.value.length >= this.uploadFileNumber) {
103
- this.$message({
104
- message: `上传文件个数不能超过${this.uploadFileNumber}个`,
105
- type: 'warning'
106
- });
107
- return false;
108
- }
109
- const maxSize = 50;
110
- const maxSizeBytes = 1048576 * maxSize;
111
- if (file.size > maxSizeBytes) {
112
- this.$message({
113
- message: `上传文件大小不能超出${maxSize}MB`,
114
- type: 'warning'
115
- });
116
- return false;
117
- }
118
- const fileExt = file.name.split(".").pop().toLowerCase();
119
- if (!this.fileType.includes(fileExt)) {
120
- this.$message({
121
- message: "上传的文件格式不支持",
122
- type: 'warning'
123
- });
124
- return false;
125
- }
126
- this.uploadFileCount++;
127
- return true;
128
- },
129
- handleUploadProgress(event) {
130
- this.uploadProgress = Math.round(event.percent);
131
- },
132
- //粘贴图片到编辑器,事件处理方法,主要用于事件销毁
133
- pasteEvent(evt) {
134
- if (this.value.length >= this.uploadFileNumber) {
135
- this.$message({
136
- message: `上传文件个数不能超过${this.uploadFileNumber}个`,
137
- type: 'warning'
138
- });
139
- return false;
140
- }
141
- this.column.error = "";
142
- this.pasteImgList.push(evt);
143
- pasteImg(evt, this.column.pathUrl || this.uploadAction).then((res) => {
144
- if (!res.code) {
145
- const fileData = {
146
- title: res.data.fileName,
147
- id: res.data.id,
148
- code: res.data.id,
149
- size: res.data.fileSize,
150
- type: res.data.suffix,
151
- url: res.data.url,
152
- };
153
-
154
- this.value.push(fileData);
155
- this.$emit('onChange', this.column);
156
- if (this.value.length >= this.uploadFileNumber) {
157
- this.pasteImgList = [];
158
- }
159
- } else {
160
- this.$message({
161
- message: res.msg,
162
- type: 'warning'
163
- });
164
- }
165
- });
166
- },
167
- },
168
- mounted() {
169
- if (this.$refs.fileUploadInput && this.$refs.fileUploadInput.$el) {
170
- this.$refs.fileUploadInput.$el.addEventListener("paste", this.pasteEvent);
171
- }
172
- },
173
- //实例销毁前
174
- beforeDestroy() {
175
- if (this.$refs.fileUploadInput && this.$refs.fileUploadInput.$el) {
176
- this.$refs.fileUploadInput.$el.removeEventListener(
177
- "paste",
178
- this.pasteEvent
179
- );
180
- }
181
- },
182
- };
183
- </script>
184
- <style scoped lang="scss">
185
- .childFormFile {
186
- &-btn {
187
- width: 257px;
188
- height: 20px;
189
- padding: 5px 16px;
190
- border: 1px solid rgba(0, 0, 0, 0.15);
191
- box-sizing: content-box;
192
- border-radius: 2px;
193
- color: #666;
194
- }
195
-
196
- :deep(.childFormFile-upload) {
197
- .el-upload {
198
- display: inline-block;
199
- }
200
-
201
- .el-upload-dragger {
202
- border: none;
203
- width: auto;
204
- height: auto;
205
- border-radius: 0;
206
- padding: 0;
207
- }
208
- }
209
-
210
- &-list {
211
- position: relative;
212
- }
213
-
214
- :deep(.childFormFile-input) {
215
- width: 145px;
216
- display: inline-block;
217
-
218
- .el-input__wrapper {
219
- border: 1px dashed rgba(0, 0, 0, 0.15);
220
- }
221
- }
222
-
223
- &-tip {
224
- margin-left: 8px;
225
- display: inline-block;
226
- font-size: 12px;
227
- line-height: 32px;
228
- color: rgba(0, 0, 0, 0.25);
229
- }
230
-
231
- &-progress {
232
- width: 100%;
233
- max-width: 444px;
234
- margin-top: 8px;
235
- }
236
- }
237
- </style>
@@ -1,260 +0,0 @@
1
- <!-- 子表单支持 1,2,3,4,5,7,10 这七个组件 -->
2
- <template>
3
- <div class="w-default-wrap">
4
- <vxe-table border size="small" :data="sourceData.value" :max-height="360">
5
- <vxe-column type="seq" width="50"></vxe-column>
6
- <template v-for="(column,index) in sourceData.moduleDefinition" :key="index">
7
- <vxe-column :title="column.name" :params="column.extraInfo || {}" :min-width="240" show-header-overflow="title"
8
- v-if="isShow(column)">
9
- <template #header="scope">
10
- <div class="w-flex-center">
11
- <!--必填标识-->
12
- <span v-if="scope.column.params.valueEmptyCheck == 1"
13
- class="w-color-red w-margin-right4">*</span>
14
- <span>{{ scope.column.title }}</span>
15
- </div>
16
- </template>
17
- <template #default="scope">
18
- <div class="w-flex-left">
19
- <div class="childFormBody-td" v-if="column.behaviorType == 1">
20
- <el-input type="textarea" resize="none" :rows="1" placeholder="请输入"
21
- :disabled="disabled || isDisabled(column)"
22
- @input="onInput($event,scope,column)" @focus="onFocus($event,scope,column)"
23
- @blur="onBlur($event,scope,column)" :maxlength="200000"
24
- v-model.trim="scope.row[column.columnCode]"/>
25
- </div>
26
- <div class="childFormBody-td" v-if="column.behaviorType == 2">
27
- <BnInpNum @input="onInput($event,scope,column)" :disabled="disabled || isDisabled(column)"
28
- @focus="onFocus($event,scope,column)" @blur="onBlur($event,scope,column)"
29
- :precision="column.extraInfo?.valueType"
30
- v-model="scope.row[column.columnCode]"
31
- placeholder="请输入有效数值"></BnInpNum>
32
- </div>
33
- <div class="childFormBody-td" v-if="[3,4,5].includes(column.behaviorType)">
34
- <BnSelect v-model="scope.row[column.columnCode]" clearable filterable
35
- :multiple="column.behaviorType == 5" :optionProps="{value:'code',label:'title'}"
36
- :options="column.moduleDefinition" :disabled="disabled || isDisabled(column)"
37
- :pathUrl="column.pathUrl" :postData="column.postData" :postFunc="postFunc"
38
- @change="onChange('change',scope,column)"></BnSelect>
39
- </div>
40
- <div class="childFormBody-td" v-if="[6,20].includes(column.behaviorType)">
41
- <BnCascader @change="onChange('change',scope,column)"
42
- v-model="scope.row[column.columnCode]"
43
- :postFunc="postFunc" :path-url="column.pathUrl"
44
- :post-data="column.postData" remote-mode="tree"
45
- :optionProps="{value:'code',label:'title'}" :label-in-value="false"
46
- :options="column.moduleDefinition.optionList" hide-check-to-last
47
- :multiple="column.behaviorType == 20" :disabled="disabled || isDisabled(column)"
48
- clearable/>
49
- <!-- <BnRelation @change="onChange('change',scope,column)" :options="column.moduleDefinition.optionList"-->
50
- <!-- :props="{checkStrictly:true,value:'code',label:'title'}"-->
51
- <!-- v-model="scope.row[column.columnCode]"-->
52
- <!-- :multiple="column.behaviorType == 20" filterable-->
53
- <!-- :disabled="disabled || isDisabled(column)"></BnRelation>-->
54
- </div>
55
- <div class="childFormBody-td" v-if="column.behaviorType == 7">
56
- <el-date-picker @change="onChange('change',scope,column)" :disabled="disabled || isDisabled(column)"
57
- v-model="scope.row[column.columnCode]" type="datetime"
58
- format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"/>
59
- </div>
60
- <div v-if="column.behaviorType == 10" class="childFormBody-file">
61
- <el-popover placement="top" title="附件上传" :width="400" trigger="click">
62
- <child-form-file :column="column" :value="scope.row[column.columnCode]"
63
- @change="onChange('change',scope,column)"></child-form-file>
64
- <template #reference>
65
- <span class="bnUIcon bnUIcon-addFile childFormBody-file-icon"></span>
66
- </template>
67
- </el-popover>
68
- <div class="childFormBody-file-view" v-if="scope.row[column.columnCode]">
69
- <BnFileView :file-list="scope.row[column.columnCode]" :is-mini="true"
70
- :isDel="true"
71
- :no-warp="true" @delFile="onChange('change',scope,column)"></BnFileView>
72
- </div>
73
- </div>
74
- <div class="childFormBody-operate">
75
- <el-popover placement="bottom" v-if="column.extraInfo?.stockSearchColumnCode" width="480">
76
- <searchInventory :key="scope.row._X_ROW_KEY" :postFunc="postFunc" :column="column" :row="scope.row"/>
77
- <template #reference>
78
- <span class="bnUIcon bnUIcon-inventory w-color-orange w-default-hover w-margin-left4"
79
- title="点击查库存"/>
80
- </template>
81
- </el-popover>
82
- </div>
83
- </div>
84
- </template>
85
- </vxe-column>
86
- </template>
87
- <template #empty>
88
- <span>暂无数据
89
- <span class="w-color-blue w-cursor-pointer" v-if="!disabled" @click="addDefault(0)">点击添加</span>
90
- </span>
91
- </template>
92
- <vxe-column fixed="right" width="52" v-if="!disabled">
93
- <template #header="{ column }">
94
- <div class="w-flex-center">
95
- <span class="bnUIcon bnUIcon-clear w-color-red w-font-max w-cursor-pointer" title="点击清空子表单" v-if="sourceData.value.length > 0"
96
- @click="sourceData.value=[]"></span>
97
- </div>
98
- </template>
99
- <template #default="scope">
100
- <span class="bnUIcon bnUIcon-add w-color-blue w-cursor-pointer w-font-max w-margin-right5"
101
- @click="addDefault(scope.rowIndex+1)"></span>
102
- <span class="bnUIcon bnUIcon-delete w-color-red w-font-max w-cursor-pointer"
103
- @click="delItem(scope.rowIndex)"></span>
104
- </template>
105
- </vxe-column>
106
- </vxe-table>
107
- </div>
108
- </template>
109
-
110
- <script>
111
- import {debounce} from "lodash";
112
- import childFormFile from "./childFormFile.vue";
113
- import searchInventory from "./searchInventory.vue";
114
- // 处理默认值映射相关逻辑
115
- import {initDefaultLinkVal} from "../BnSmartFormUtil.js";
116
-
117
- export default {
118
- name: "editLabel",
119
- components: {childFormFile, searchInventory},
120
- props: {
121
- sourceData: {
122
- type: Object,
123
- default: function () {
124
- return {}
125
- }
126
- },
127
- // 默认值映射相关规则
128
- defaultLink: Object,
129
- componentList: Array,
130
- taskId: [String, Number],
131
- disabled: Boolean,
132
- postFunc: Function
133
- },
134
- methods: {
135
- /**
136
- * 根据权限判断是否限制组件
137
- * */
138
- isShow(column) {
139
- let flag = true;
140
- // 处理新建时可见、编辑时可见
141
- if (!this.taskId && column.extraInfo.isAddable != 1) {
142
- flag = false;
143
- } else if (this.taskId && column.extraInfo.isEditable != 1) {
144
- flag = false;
145
- }
146
- return flag;
147
- },
148
- /**
149
- * 根据权限判断是否禁用组件
150
- * */
151
- isDisabled(column) {
152
- let flag = false;
153
- // 处理新建时可见、编辑时可见
154
- if (!this.taskId && column.extraInfo.valueAddable == 1) {
155
- flag = true;
156
- } else if (this.taskId && column.extraInfo.valueEditable == 1) {
157
- flag = true;
158
- }
159
- return flag;
160
- },
161
- /**
162
- * 向表格内插入数据
163
- * */
164
- addDefault(index) {
165
- //超出最大条数,提示不能再增加保存了
166
- if (this.sourceData.value.length >= 30) {
167
- this.$message.warning("最多支持30条");
168
- return false;
169
- }
170
- //遍历子表单的组件列表,整理value
171
- let value = {};
172
- this.sourceData.moduleDefinition.forEach(component => {
173
- // 子表单的规则的key 是 父组件id。子组件id 拼接的,其他判断和正常组件一样
174
- if (component.behaviorType == 1 && this.defaultLink?.setColumn[`${this.sourceData.columnCode}.${component.columnCode}`]) {
175
- value[component.columnCode] = initDefaultLinkVal(this.componentList, this.defaultLink.setColumn[`${this.sourceData.columnCode}.${component.columnCode}`]);
176
- } else {
177
- value[component.columnCode] = component.value;
178
- }
179
- });
180
- let data = JSON.parse(JSON.stringify(value))
181
- if (index) {
182
- this.sourceData.value.splice(index, 0, data)
183
- } else {
184
- this.sourceData.value.push(data);
185
- }
186
- // 触发change事件,整行添加
187
- this.onChange('addRow', {row: data}, null)
188
- },
189
- /**
190
- * 删除数据
191
- * */
192
- delItem(index) {
193
- this.sourceData.value.splice(index, 1);
194
- this.onChange('delRow', {delIndx: index}, null)
195
- },
196
- /**
197
- * 输入框Change事件
198
- * @param {String} type 是否是其他事件类型
199
- * @param {Object} params 扩展参数
200
- * */
201
- onChange: debounce(function (type, params, column) {
202
- this.sourceData.error = '';
203
- this.sourceData.warning = '';
204
- // 当值不为空
205
- this.$emit('onChange', this.sourceData, {type: type, tableScope: params, childColumn: column})
206
- }, 500),
207
- /**
208
- * 输入框输入事件
209
- * @param {Object} params 扩展参数
210
- * */
211
- onInput(e, params, column) {
212
- this.$emit('input', this.sourceData, {tableScope: params, childColumn: column})
213
- this.onChange('input', params, column)
214
- },
215
- /**
216
- * 输入框onFocus事件
217
- * @param {Object} params 表格组件行数据
218
- * @param {Object} column 子组件
219
- * */
220
- onFocus(e, params, column) {
221
- this.$emit('focus', this.sourceData, {tableScope: params, childColumn: column})
222
- },
223
- /**
224
- * 输入框失去焦点事件
225
- * @param {Object} params 扩展参数
226
- * */
227
- onBlur(e, params, column) {
228
- this.$emit('blur', this.sourceData, {tableScope: params, childColumn: column})
229
- },
230
- },
231
- }
232
- </script>
233
- <style scoped lang="scss">
234
- .childFormBody {
235
- &-file {
236
- order: 1;
237
- display: flex;
238
- align-items: center;
239
-
240
- &-icon {
241
- font-size: 22px;
242
- }
243
-
244
- &-view {
245
- width: calc(100% - 20px);
246
- overflow: hidden
247
- }
248
- }
249
-
250
- &-td {
251
- flex-grow: 1;
252
-
253
- }
254
-
255
- &-operate {
256
- display: flex;
257
- align-items: center;
258
- }
259
- }
260
- </style>
@@ -1,110 +0,0 @@
1
- <template>
2
- <div class="w-default-wrap childrenForm">
3
- <formItemTop :column="column"/>
4
- <div class="childrenForm-behavior">
5
- <div class="w-flex-center w-margin-bottom6">
6
- <!--多包裹下的子单-->
7
- <template v-if="dataBack && dataBack.order == column.columnCode">
8
- <el-popover placement="top-start" :width="400" trigger="hover" :show-arrow="false">
9
- <div class="BnSmartForm-title-tip">
10
- <span class="w-color-blue">标准ERP子组件</span>,会将选中包裹的子表合并然后在这里列举
11
- </div>
12
- <template #reference>
13
- <el-button link type="primary" style="padding-left: 0"
14
- @click="$emit('operate', this.column,'chooseChildOrder')">
15
- <span class="bnUIcon bnUIcon-split"></span> 请选择
16
- </el-button>
17
- </template>
18
- </el-popover>
19
- </template>
20
- <!--子表单关联表,查询数据-->
21
- <template v-if="column.insideDataSourceInfo?.tableCode">
22
- <el-popover placement="top-start" :width="440" trigger="hover" :show-arrow="false">
23
- <div class="BnSmartForm-title-tip">
24
- <span class="w-color-blue">关联表组件</span>,可以通过筛选条件,筛选外部表数据进行选择回填
25
- </div>
26
- <template #reference>
27
- <el-button link type="primary" style="padding-left: 0"
28
- @click="$emit('operate', this.column,'chooseAssocTable')">
29
- <span class="bnUIcon bnUIcon-linkTable"></span>筛选{{ column.name }}
30
- </el-button>
31
- </template>
32
- </el-popover>
33
- </template>
34
- <!--ipaas数据关联查询-->
35
- <template v-if="column.outDataSourceInfo[0]?.platform == 'relation_ipaas'">
36
- <el-popover placement="top-start" :width="440" trigger="hover" :show-arrow="false">
37
- <div class="BnSmartForm-title-tip">
38
- <span class="w-color-blue">关联ipaas查询数据</span>,可以通过班牛ipaas接口筛选外部数据,进行选择回填
39
- </div>
40
- <template #reference>
41
- <el-button link type="primary" style="padding-left: 0"
42
- @click="$emit('operate', this.column,'chooseIPaasData')">
43
- <span class="bnUIcon bnUIcon-api"></span>查询{{ column.name }}
44
- </el-button>
45
- </template>
46
- </el-popover>
47
- </template>
48
- </div>
49
- <childrenFormBody :sourceData="column" ref="childrenFormBody" :disabled="disabled" :taskId="taskId"
50
- :defaultLink="defaultLink" :componentList="componentList" :postFunc="postFunc"
51
- @input="onInput" @onChange="onChange" @focus="onFocus" @blur="onBlur"></childrenFormBody>
52
- </div>
53
- <formItemFooter :column="column"/>
54
- </div>
55
- </template>
56
-
57
- <script>
58
- //引入子表单组件
59
- import childrenFormBody from './childrenFormBody.vue'
60
- import formItemTop from "../formItemTop/formItemTop.vue";
61
- import formItemFooter from "../formItemFooter/formItemFooter.vue";
62
- import {debounce} from "lodash";
63
-
64
- export default {
65
- name: "childrenForm",
66
- components: {formItemFooter, formItemTop, childrenFormBody,},
67
- props: {
68
- column: {
69
- type: Object, default() {
70
- return {}
71
- }
72
- },
73
- dataBack: Object,
74
- // 默认值映射相关规则
75
- defaultLink: Object,
76
- componentList: Array,
77
- disabled: Boolean,
78
- taskId: [String, Number],
79
- postFunc: Function
80
- },
81
- methods: {
82
- /**
83
- * Change事件
84
- * params:子表单需要增加更多参数,用来表示是自己那个子组件,发生的什么变化
85
- * */
86
- onChange: debounce(function (column, params) {
87
- this.$emit('onChange', this.column, params)
88
- }, 500),
89
- /**
90
- * 输入框输入事件
91
- * */
92
- onInput(e, params) {
93
- this.$emit('input', this.column, params)
94
- },
95
- /**
96
- * 输入框onFocus事件
97
- * */
98
- onFocus(e, params) {
99
- this.$emit('focus', this.column, params)
100
- },
101
- /**
102
- * 输入框失去焦点事件
103
- * */
104
- onBlur(e, params) {
105
- this.$emit('blur', this.column, params)
106
- },
107
- },
108
- }
109
- </script>
110
-