rename bug

This commit is contained in:
gongzijian 2019-05-22 17:23:26 +08:00
parent d45bf677a4
commit 086b34d63a
3 changed files with 22 additions and 9 deletions

View File

@ -1,6 +1,6 @@
# 后端接口地址
API_BASE = http://192.168.xx.xx:12345
API_BASE = http://192.168.221.188:12345
# 本地开发如需ip访问项目把"#"号去掉
#DEV_HOST = 192.168.xx.xx

View File

@ -49,10 +49,16 @@
methods: {
_ok (fn) {
this._verification().then(res => {
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'FILE'
})
if (this.name === this.item.alias) {
return new Promise((resolve,reject) => {
resolve()
})
}else{
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'FILE'
})
}
}).then(res => {
return this.store.dispatch('resource/resourceRename', {
name: this.name,
@ -78,6 +84,7 @@
} else {
resolve()
}
})
}
},

View File

@ -49,10 +49,16 @@
methods: {
_ok (fn) {
this._verification().then(res => {
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'UDF'
})
if (this.name === this.item.alias) {
return new Promise((resolve,reject) => {
resolve()
})
}else{
return this.store.dispatch('resource/resourceVerifyName', {
name: this.name,
type: 'UDF'
})
}
}).then(res => {
return this.store.dispatch('resource/resourceRename', {
name: this.name,