Browse Source

修复设置dag udp组件点取消按钮未保存数据

pull/2/head
gongzijian 6 years ago
parent
commit
9bb699434d
  1. 2
      escheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue
  2. 18
      escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

2
escheduler-ui/src/js/conf/home/pages/dag/_source/dag.vue

@ -29,7 +29,7 @@
icon="fa fa-code"> icon="fa fa-code">
</x-button> </x-button>
<span class="name">{{name}}</span> <span class="name">{{name}}</span>
<span class="copy-name" @click="_copyName" :data-clipboard-text="name"><i class="iconfont" data-container="body" data-toggle="tooltip" title="复制名称" >&#xe61e;</i></span> <span v-if="name" class="copy-name" @click="_copyName" :data-clipboard-text="name"><i class="iconfont" data-container="body" data-toggle="tooltip" title="复制名称" >&#xe61e;</i></span>
</div> </div>
<div class="save-btn"> <div class="save-btn">
<div class="operation" style="vertical-align: middle;"> <div class="operation" style="vertical-align: middle;">

18
escheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

@ -110,6 +110,13 @@
} }
return true return true
}, },
_accuStore(){
this.store.commit('dag/setGlobalParams', _.cloneDeep(this.udpList))
this.store.commit('dag/setName', _.cloneDeep(this.name))
this.store.commit('dag/setTimeout', _.cloneDeep(this.timeout))
this.store.commit('dag/setDesc', _.cloneDeep(this.desc))
this.store.commit('dag/setSyncDefine', this.syncDefine)
},
/** /**
* submit * submit
*/ */
@ -130,11 +137,8 @@
} }
// Storage global globalParams // Storage global globalParams
this.store.commit('dag/setGlobalParams', _.cloneDeep(this.udpList)) this._accuStore()
this.store.commit('dag/setName', _.cloneDeep(this.name))
this.store.commit('dag/setTimeout', _.cloneDeep(this.timeout))
this.store.commit('dag/setDesc', _.cloneDeep(this.desc))
this.store.commit('dag/setSyncDefine', this.syncDefine)
Affirm.setIsPop(false) Affirm.setIsPop(false)
this.$emit('onUdp') this.$emit('onUdp')
} }
@ -155,7 +159,11 @@
* Close the popup * Close the popup
*/ */
close () { close () {
// Storage global globalParams
this._accuStore()
setTimeout(() => {
this.$emit('close') this.$emit('close')
})
} }
}, },
watch: { watch: {

Loading…
Cancel
Save