Browse Source

rename bug

pull/2/head
gongzijian 6 years ago
parent
commit
086b34d63a
  1. 2
      escheduler-ui/.env
  2. 7
      escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue
  3. 6
      escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue

2
escheduler-ui/.env

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

7
escheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/list/_source/rename.vue

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

6
escheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/rename.vue

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

Loading…
Cancel
Save