|
@@ -408,6 +408,8 @@ export default {
|
|
|
this.dataSourceForm.label = data.label
|
|
|
this.dataSourceForm.type = data.labelKey
|
|
|
this.dataSourceForm.typeId = data.id
|
|
|
+
|
|
|
+ this.$refs.dataSourceForm.validateField('label')
|
|
|
}
|
|
|
this.initDataSourceForm()
|
|
|
},
|
|
@@ -572,18 +574,23 @@ export default {
|
|
|
this.datasourceDialogVisible = false
|
|
|
},
|
|
|
winSave(){
|
|
|
- this.dataSourceForm.dataSourceDescribe = this.dataSourceForm.desc
|
|
|
- let data = {
|
|
|
- dataSourceName : this.dataSourceForm.dataSourceName,
|
|
|
- dataSourceDescribe : this.dataSourceForm.desc,
|
|
|
- id: this.dataSourceForm.id
|
|
|
- }
|
|
|
- //只修改名称和备注
|
|
|
- updateDataSourceNameAndDescribe(data).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.showMsg('保存成功!', true)
|
|
|
- this.handleClose()
|
|
|
- this.getAllDataSource()
|
|
|
+ this.$refs['dataSourceForm'].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.dataSourceForm.dataSourceDescribe = this.dataSourceForm.desc
|
|
|
+ let data = {
|
|
|
+ dataSourceName: this.dataSourceForm.dataSourceName,
|
|
|
+ dataSourceDescribe: this.dataSourceForm.desc,
|
|
|
+ id: this.dataSourceForm.id,
|
|
|
+ typeId: this.dataSourceForm.typeId
|
|
|
+ }
|
|
|
+ //只修改名称和备注
|
|
|
+ updateDataSourceNameAndDescribe(data).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.showMsg('保存成功!', true)
|
|
|
+ this.handleClose()
|
|
|
+ this.getAllDataSource()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|