|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
label: '请选择数据源',
|
|
|
hide: !this.formValues.chooseStorage,
|
|
|
noAttach: true,
|
|
|
- itemText: 'name',
|
|
|
+ itemText: 'name_zh',
|
|
|
itemValue: 'id',
|
|
|
items: this.dataSourceItems
|
|
|
},
|
|
|
@@ -172,6 +172,11 @@ export default {
|
|
|
this.formValues[key] = this.itemData[key]?.id || null
|
|
|
return
|
|
|
}
|
|
|
+ if (key === 'data_source') {
|
|
|
+ this.formValues[key] = this.itemData[key] || null
|
|
|
+ this.formValues.chooseStorage = !!this.itemData[key]
|
|
|
+ return
|
|
|
+ }
|
|
|
if (Object.prototype.hasOwnProperty.call(this.itemData, key)) {
|
|
|
this.formValues[key] = this.itemData[key]
|
|
|
}
|
|
|
@@ -219,12 +224,12 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
const { chooseStorage, data_source: dataSource, storage_location: storageLocation, ...obj } = this.formValues
|
|
|
- // if (chooseStorage) {
|
|
|
- // return {
|
|
|
- // ...obj,
|
|
|
- // data_source: dataSource
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (chooseStorage) {
|
|
|
+ return {
|
|
|
+ ...obj,
|
|
|
+ data_source: dataSource
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
...obj,
|
|
|
storage_location: storageLocation
|