diff --git a/src/views/fileManage/index.vue b/src/views/fileManage/index.vue index c72725c..6bd2165 100644 --- a/src/views/fileManage/index.vue +++ b/src/views/fileManage/index.vue @@ -218,6 +218,7 @@ export default { parentId: '', modalTitle: '', modelType: '', + selectdirName:'', searchFile: { dirId: '', queryCondition: '', @@ -254,8 +255,10 @@ export default { return } console.log('dirid=' + this.searchFile.dirId) + console.log('dirName=' + this.selectdirName) this.$refs.modalForm.title = '文件上传' this.$refs.modalForm.dirId = this.searchFile.dirId + this.$refs.modalForm.dirName = this.selectdirName this.$refs.modalForm.add() }, getcountFileNum() { @@ -421,6 +424,7 @@ export default { this.selectId = e.node.dataRef.id this.parentId = e.node.dataRef.parentId this.searchFile.dirId = this.selectId + this.selectdirName = e.node.dataRef.title this.searchgetFileList() }, }, diff --git a/src/views/fileManage/modules/SliceUpload.vue b/src/views/fileManage/modules/SliceUpload.vue index 63daef3..1b6bece 100644 --- a/src/views/fileManage/modules/SliceUpload.vue +++ b/src/views/fileManage/modules/SliceUpload.vue @@ -103,7 +103,8 @@ export default { pageNum :1, pageSize:999999999 }, - dirId:"" + dirId:"", + dirName:"" } }, created () { @@ -300,9 +301,8 @@ export default { if (!fileMD5Value) { fileMD5Value = await this.getMd5(file, file.size) } + const res = await verifyFileExist({ fileMD5Value:fileMD5Value,dirName:this.dirName }) try { - const res = await verifyFileExist({ fileMD5Value }) - console.log(res.result.exist); if (res.result.exist) { // 跳过文件验证逻辑 currentRow.percentage = 100 currentRow.uploadStatus = 2 @@ -327,8 +327,7 @@ export default { } } } catch (error) { - console.error(error) - this.$message.error('获取文件是否已上传状态失败') + this.$message.error(res.message) } }, @@ -371,7 +370,7 @@ export default { // 开始执行切片上传 readFileMD5 (file, currentRow, slicingSize, sumSlicingCount, success, error) { // 检查文件有没有上传过的状态 - verifyFileExist({ fileMD5Value: this.fileMD5[file.uid] }) + verifyFileExist({ fileMD5Value: this.fileMD5[file.uid],dirName:this.dirName }) .then((res) => { const { exist, shareTotal, shareIndex } = res.result if (res.success) { diff --git a/src/views/fileManage/modules/uploadModal.vue b/src/views/fileManage/modules/uploadModal.vue index 09bbc07..e9901a9 100644 --- a/src/views/fileManage/modules/uploadModal.vue +++ b/src/views/fileManage/modules/uploadModal.vue @@ -43,7 +43,8 @@ import SliceUpload from './SliceUpload' visible: false, confirmLoading: false, strategys:[], - dirId:"" + dirId:"", + dirName:"" } }, created () { @@ -54,6 +55,7 @@ import SliceUpload from './SliceUpload' this.visible =true; setTimeout(()=>{ this.$refs.technicalUpload.dirId = this.dirId; + this.$refs.technicalUpload.dirName = this.dirName this.$refs.technicalUpload.deleteFile(); },300) @@ -65,14 +67,13 @@ import SliceUpload from './SliceUpload' close () { this.$emit('close'); this.visible = false; + this.$parent.getcountFileNum(); this.$parent.searchgetFileList(); }, handleOk () { - this.$parent.searchgetFileList(); this.close(); }, handleCancel () { - this.$parent.searchgetFileList(); this.close() }, }