vue2-client 1.8.345 → 1.8.347
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.
- package/package.json +1 -1
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +7 -2
- package/src/base-client/components/common/XFormGroup/XFormGroup.vue +9 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -0
- package/src/base-client/components/common/XTable/XTable.vue +15 -1
package/package.json
CHANGED
|
@@ -277,12 +277,17 @@ export default {
|
|
|
277
277
|
// 修改场景下对表单项赋值
|
|
278
278
|
if (modifyModelData && modifyModelData.data) {
|
|
279
279
|
this.modifyModelData = modifyModelData
|
|
280
|
-
this.files = modifyModelData.files
|
|
281
|
-
this.images = modifyModelData.images
|
|
282
280
|
if (Object.keys(modifyModelData.data).length > 0) {
|
|
283
281
|
this.getModifyModelData(modifyModelData)
|
|
284
282
|
}
|
|
285
283
|
}
|
|
284
|
+
// 处理表单得附件
|
|
285
|
+
if (modifyModelData && modifyModelData.files) {
|
|
286
|
+
this.files = modifyModelData.files
|
|
287
|
+
}
|
|
288
|
+
if (modifyModelData && modifyModelData.images) {
|
|
289
|
+
this.images = modifyModelData.images
|
|
290
|
+
}
|
|
286
291
|
this.loaded = true
|
|
287
292
|
},
|
|
288
293
|
// 时间组件赋默认值
|
|
@@ -138,7 +138,11 @@ export default {
|
|
|
138
138
|
this.formList.push(res)
|
|
139
139
|
let modifyModelData = {}
|
|
140
140
|
if (this.modifyModelData[res.groupName]) {
|
|
141
|
-
modifyModelData = {
|
|
141
|
+
modifyModelData = {
|
|
142
|
+
data: this.modifyModelData[res.groupName],
|
|
143
|
+
files: this.modifyModelData[res.groupName].files,
|
|
144
|
+
images: this.modifyModelData[res.groupName].images
|
|
145
|
+
}
|
|
142
146
|
}
|
|
143
147
|
const params = {
|
|
144
148
|
layout: res.xAddFormLayout,
|
|
@@ -146,6 +150,10 @@ export default {
|
|
|
146
150
|
showSubmitBtn: false,
|
|
147
151
|
serviceName: this.serviceName,
|
|
148
152
|
fixedAddForm: modifyModelData.data,
|
|
153
|
+
modifyModelData: {
|
|
154
|
+
files: modifyModelData.files,
|
|
155
|
+
images: modifyModelData.images
|
|
156
|
+
},
|
|
149
157
|
businessType: this.businessType,
|
|
150
158
|
...res
|
|
151
159
|
}
|
|
@@ -292,7 +292,8 @@ export default {
|
|
|
292
292
|
// 汇总抽屉是否显示
|
|
293
293
|
summaryDrawerVisible: false,
|
|
294
294
|
// 汇总更新标志
|
|
295
|
-
summaryUpdate: false
|
|
295
|
+
summaryUpdate: false,
|
|
296
|
+
formItems: []
|
|
296
297
|
}
|
|
297
298
|
},
|
|
298
299
|
props: {
|
|
@@ -403,8 +404,10 @@ export default {
|
|
|
403
404
|
serviceName,
|
|
404
405
|
tableSummaryMap = {},
|
|
405
406
|
viewMode,
|
|
407
|
+
formItems,
|
|
406
408
|
env = 'prod'
|
|
407
409
|
} = params
|
|
410
|
+
this.formItems = formItems
|
|
408
411
|
this.showSummary = Object.keys(tableSummaryMap).length > 0
|
|
409
412
|
this.queryParams = queryParams
|
|
410
413
|
this.tableColumns = JSON.parse(JSON.stringify(tableColumns))
|
|
@@ -564,6 +567,12 @@ export default {
|
|
|
564
567
|
* 获取主键列名称
|
|
565
568
|
*/
|
|
566
569
|
getPrimaryKeyName () {
|
|
570
|
+
if (this.formItems && this.formItems.length) {
|
|
571
|
+
const primaryKeyData = this.formItems.filter(item => item.silencePurpose === 'primaryKey')
|
|
572
|
+
if (primaryKeyData.length) {
|
|
573
|
+
return primaryKeyData[0].model
|
|
574
|
+
}
|
|
575
|
+
}
|
|
567
576
|
return this.tableColumns[0].dataIndex
|
|
568
577
|
},
|
|
569
578
|
// 导出选中或本页数据
|
|
@@ -680,6 +689,11 @@ export default {
|
|
|
680
689
|
this.selectId = id
|
|
681
690
|
}
|
|
682
691
|
const primaryKeyName = this.getPrimaryKeyName()
|
|
692
|
+
|
|
693
|
+
if (this.tableColumns[0].dataIndex !== primaryKeyName) {
|
|
694
|
+
this.selectId = this.selectedRows[0][primaryKeyName]
|
|
695
|
+
}
|
|
696
|
+
|
|
683
697
|
requestParameters.conditionParams[primaryKeyName] = this.selectId
|
|
684
698
|
requestParameters.f_businessid = this.selectId
|
|
685
699
|
if (this.isTableTemp) {
|