Browse Source

[Fix-4734][UI] Fix file update dialog not reset after re-open the dialog (#4735)

pull/3/MERGE
Shiwen Cheng 4 years ago committed by GitHub
parent
commit
d4fd9811f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue
  2. 10
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue
  3. 11
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue
  4. 10
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue
  5. 11
      dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue
  6. 11
      dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue
  7. 11
      dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue

9
dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue

@ -143,10 +143,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdateDefinition')
this.reset()
}, e => {
reject(e)
self.$emit('closeDefinition')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -171,6 +173,13 @@
close () {
this.$emit('closeDefinition')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = ''
this.dragOver = false
},
/**
* Drag and drop upload
*/

10
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue

@ -196,10 +196,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdate')
this.reset()
}, e => {
reject(e)
self.$emit('close')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -221,6 +223,14 @@
$('.update-file-modal').hide()
this.$emit('onArchive')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = null
this.currentDir = localStore.getItem('currentDir')
this.dragOver = false
},
/**
* Drag and drop upload
*/

11
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue

@ -181,10 +181,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdateFileChildUpdate')
this.reset()
}, e => {
reject(e)
self.$emit('close')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -217,6 +219,15 @@
},
close () {
this.$emit('closeFileChildUpdate')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = ''
this.currentDir = localStore.getItem('currentDir')
this.pid = -1
this.dragOver = false
}
},
mounted () {

10
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue

@ -195,10 +195,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdate')
this.reset()
}, e => {
reject(e)
self.$emit('close')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -220,6 +222,14 @@
$('.update-file-modal').hide()
this.$emit('onArchive')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = null
this.currentDir = '/'
this.dragOver = false
},
/**
* Drag and drop upload
*/

11
dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue

@ -179,10 +179,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdateFileUpdate')
this.reset()
}, e => {
reject(e)
self.$emit('closeFileUpdate')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -207,6 +209,15 @@
close () {
this.$emit('closeFileUpdate')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = ''
this.currentDir = '/'
this.pid = -1
this.dragOver = false
},
/**
* Drag and drop upload
*/

11
dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue

@ -181,10 +181,12 @@
this.$message.success(res.msg)
resolve()
self.$emit('onUpdateResourceChildUpdate')
this.reset()
}, e => {
reject(e)
self.$emit('close')
this.$message.error(e.msg || '')
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -206,6 +208,15 @@
$('.update-file-modal').hide()
this.$emit('onArchiveResourceChildUpdate')
},
reset () {
this.name = ''
this.description = ''
this.progress = 0
this.file = ''
this.currentDir = localStore.getItem('currentDir')
this.pid = -1
this.dragOver = false
},
/**
* Drag and drop upload
*/

11
dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue

@ -124,11 +124,13 @@
this.spinnerLoading = false
this.progress = 0
this.$emit('on-update', res.data)
this.reset()
}, e => {
this.spinnerLoading = false
this.progress = 0
this.$message.error(e.msg || '')
this.$emit('on-update', e)
this.reset()
}, {
data: formData,
emulateJSON: false,
@ -148,6 +150,15 @@
this._formDataUpdate()
})
}
},
reset () {
this.udfName = ''
this.udfDesc = ''
this.file = ''
this.progress = 0
this.spinnerLoading = false
this.pid = null
this.currentDir = ''
}
},
watch: {},

Loading…
Cancel
Save