提交代码

This commit is contained in:
RenCheng 2025-05-13 20:43:52 +08:00
parent 854cc9de13
commit e50a958f09
3 changed files with 13 additions and 9 deletions

View File

@ -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()
},
},

View File

@ -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) {

View File

@ -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()
},
}