未验证 提交 555880e6 编写于 作者: Y Yichao Yang 提交者: GitHub

[Fix-3077][ui] Fix the edit duplicated name verify (#3376)

上级 26184de9
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
name: 'udp', name: 'udp',
data () { data () {
return { return {
originalName: '',
// dag name // dag name
name: '', name: '',
// dag description // dag description
...@@ -169,12 +170,15 @@ ...@@ -169,12 +170,15 @@
this.$emit('onUdp') this.$emit('onUdp')
} }
// verify that the name exists if (this.originalName !== this.name) {
this.store.dispatch('dag/verifDAGName', this.name).then(res => { this.store.dispatch('dag/verifDAGName', this.name).then(res => {
_verif()
}).catch(e => {
this.$message.error(e.msg || '')
})
} else {
_verif() _verif()
}).catch(e => { }
this.$message.error(e.msg || '')
})
}, },
/** /**
* Close the popup * Close the popup
...@@ -196,6 +200,7 @@ ...@@ -196,6 +200,7 @@
this.udpList = dag.globalParams this.udpList = dag.globalParams
this.udpListCache = dag.globalParams this.udpListCache = dag.globalParams
this.name = dag.name this.name = dag.name
this.originalName = dag.name
this.description = dag.description this.description = dag.description
this.syncDefine = dag.syncDefine this.syncDefine = dag.syncDefine
this.timeout = dag.timeout || 0 this.timeout = dag.timeout || 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册