From e8c9c33d7e45b361c3c25085b01d3d78b6b11d90 Mon Sep 17 00:00:00 2001 From: JuFeng Li <920347627@qq.com> Date: Thu, 1 Apr 2021 20:57:46 +0800 Subject: [PATCH] [Fix-5055][UI] Fix can not upload file to correct dir (#5056) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix udf resource can not upload to the correct dir,and when delete udf resource can not refresh page Co-authored-by: 李巨丰 --- .../resource/pages/file/pages/subdirectory/_source/list.vue | 1 + .../pages/resource/pages/udf/pages/resource/_source/list.vue | 1 + .../resource/pages/udf/pages/subUdfDirectory/_source/list.vue | 2 -- .../pages/resource/pages/udf/pages/subUdfDirectory/index.vue | 1 + .../src/js/module/components/fileUpdate/fileChildUpdate.vue | 2 +- .../src/js/module/components/fileUpdate/resourceChildUpdate.vue | 2 +- 6 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue index f0098578a7..c51aded8b5 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/file/pages/subdirectory/_source/list.vue @@ -115,6 +115,7 @@ _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) if (item.directory) { + localStore.setItem('pid', `${item.id}`) localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/file/subdirectory/${item.id}` }) } else { diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue index f25178c09e..24bf71228d 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/resource/_source/list.vue @@ -116,6 +116,7 @@ _go (item) { localStore.setItem('file', `${item.alias}|${item.size}`) if (item.directory) { + localStore.setItem('pid', `${item.id}`) localStore.setItem('currentDir', `${item.fullName}`) this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` }) } diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue index 8522190c1b..17d0d2ad05 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue @@ -127,11 +127,9 @@ this.deleteResource({ id: item.id }).then(res => { - this.$refs[`poptip-${i}`][0].doClose() this.$emit('on-update') this.$message.success(res.msg) }).catch(e => { - this.$refs[`poptip-${i}`][0].doClose() this.$message.error(e.msg || '') }) }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue index 5de6fdb1c0..654d5fbee9 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/index.vue @@ -121,6 +121,7 @@ this.isLeft = true } this.isLoading = !flag + this.searchParams.id = this.$route.params.id this.getResourcesListP(this.searchParams).then(res => { if (this.searchParams.pageNo > 1 && res.totalList.length === 0) { this.searchParams.pageNo = this.searchParams.pageNo - 1 diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue index a984af6854..369a1613a6 100644 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue +++ b/dolphinscheduler-ui/src/js/module/components/fileUpdate/fileChildUpdate.vue @@ -174,7 +174,7 @@ formData.append('file', this.file) formData.append('type', this.type) formData.append('name', this.name) - formData.append('pid', this.pid) + formData.append('pid', this.id) formData.append('currentDir', this.currentDir) formData.append('description', this.description) io.post('resources/create', res => { diff --git a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue b/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue index 4bc438f31e..fedb2b2392 100755 --- a/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue +++ b/dolphinscheduler-ui/src/js/module/components/fileUpdate/resourceChildUpdate.vue @@ -174,7 +174,7 @@ formData.append('file', this.file) formData.append('type', this.type) formData.append('name', this.name) - formData.append('pid', this.pid) + formData.append('pid', this.id) formData.append('currentDir', this.currentDir) formData.append('description', this.description) io.post('resources/create', res => {