未验证 提交 e8c9c33d 编写于 作者: J JuFeng Li 提交者: GitHub

[Fix-5055][UI] Fix can not upload file to correct dir (#5056)



* fix udf resource can not upload to the correct dir,and when delete udf resource can not refresh page
Co-authored-by: N李巨丰 <lijf@2345.com>
上级 5d7dc1cb
......@@ -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 {
......
......@@ -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}` })
}
......
......@@ -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 || '')
})
},
......
......@@ -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
......
......@@ -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 => {
......
......@@ -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 => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册