diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue index 1d711e4064e95a6a433f397c5edd8ac60fad1cbf..f1d61bf81d788794862a7ec49a6879debc778c66 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/definitionUpdate.vue +++ b/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 */ diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue index 3bf1df13895ac95d57eb6036c2937fdbedce9809..39e8216b0a23ed954512eea926dbc7095aec5e22 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildReUpdate.vue +++ b/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 */ diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue index a43da699730208bf9ae194e13cbc5d3787f32b18..d6d7fac8cb4bfbc87f620fa91773fd7b2ce876de 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue +++ b/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 () { diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue index 4d6a0e2228b674f6cfae7bc8f8a1f5f8da313324..af58e14993124425fa844ad16ed37f46860d37fe 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileReUpload.vue +++ b/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 */ diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue index d9780de63919a2e16cb1dccde3469b8dd69df949..6fa9d2699b9f48e1e0aaf9546c5344f69b18b7de 100755 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileUpdate.vue +++ b/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 */ diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue index 714954bfc9af95b0e733570ccf6d54c97713ba13..5cb0c3c65273c1566edc6b9b4c2f91702fabce4d 100755 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue +++ b/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 */ diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue index d06a6a13b64221cba0d3455bfce724523d1583aa..b4e6dfdd98008c1358e68ae9c6c5d9edc00ae7f9 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/udfUpdate.vue +++ b/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: {},