提交代码

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: '', parentId: '',
modalTitle: '', modalTitle: '',
modelType: '', modelType: '',
selectdirName:'',
searchFile: { searchFile: {
dirId: '', dirId: '',
queryCondition: '', queryCondition: '',
@ -254,8 +255,10 @@ export default {
return return
} }
console.log('dirid=' + this.searchFile.dirId) console.log('dirid=' + this.searchFile.dirId)
console.log('dirName=' + this.selectdirName)
this.$refs.modalForm.title = '文件上传' this.$refs.modalForm.title = '文件上传'
this.$refs.modalForm.dirId = this.searchFile.dirId this.$refs.modalForm.dirId = this.searchFile.dirId
this.$refs.modalForm.dirName = this.selectdirName
this.$refs.modalForm.add() this.$refs.modalForm.add()
}, },
getcountFileNum() { getcountFileNum() {
@ -421,6 +424,7 @@ export default {
this.selectId = e.node.dataRef.id this.selectId = e.node.dataRef.id
this.parentId = e.node.dataRef.parentId this.parentId = e.node.dataRef.parentId
this.searchFile.dirId = this.selectId this.searchFile.dirId = this.selectId
this.selectdirName = e.node.dataRef.title
this.searchgetFileList() this.searchgetFileList()
}, },
}, },

View File

@ -103,7 +103,8 @@ export default {
pageNum :1, pageNum :1,
pageSize:999999999 pageSize:999999999
}, },
dirId:"" dirId:"",
dirName:""
} }
}, },
created () { created () {
@ -300,9 +301,8 @@ export default {
if (!fileMD5Value) { if (!fileMD5Value) {
fileMD5Value = await this.getMd5(file, file.size) fileMD5Value = await this.getMd5(file, file.size)
} }
const res = await verifyFileExist({ fileMD5Value:fileMD5Value,dirName:this.dirName })
try { try {
const res = await verifyFileExist({ fileMD5Value })
console.log(res.result.exist);
if (res.result.exist) { // if (res.result.exist) { //
currentRow.percentage = 100 currentRow.percentage = 100
currentRow.uploadStatus = 2 currentRow.uploadStatus = 2
@ -327,8 +327,7 @@ export default {
} }
} }
} catch (error) { } catch (error) {
console.error(error) this.$message.error(res.message)
this.$message.error('获取文件是否已上传状态失败')
} }
}, },
@ -371,7 +370,7 @@ export default {
// //
readFileMD5 (file, currentRow, slicingSize, sumSlicingCount, success, error) { readFileMD5 (file, currentRow, slicingSize, sumSlicingCount, success, error) {
// //
verifyFileExist({ fileMD5Value: this.fileMD5[file.uid] }) verifyFileExist({ fileMD5Value: this.fileMD5[file.uid],dirName:this.dirName })
.then((res) => { .then((res) => {
const { exist, shareTotal, shareIndex } = res.result const { exist, shareTotal, shareIndex } = res.result
if (res.success) { if (res.success) {

View File

@ -43,7 +43,8 @@ import SliceUpload from './SliceUpload'
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
strategys:[], strategys:[],
dirId:"" dirId:"",
dirName:""
} }
}, },
created () { created () {
@ -54,6 +55,7 @@ import SliceUpload from './SliceUpload'
this.visible =true; this.visible =true;
setTimeout(()=>{ setTimeout(()=>{
this.$refs.technicalUpload.dirId = this.dirId; this.$refs.technicalUpload.dirId = this.dirId;
this.$refs.technicalUpload.dirName = this.dirName
this.$refs.technicalUpload.deleteFile(); this.$refs.technicalUpload.deleteFile();
},300) },300)
@ -65,14 +67,13 @@ import SliceUpload from './SliceUpload'
close () { close () {
this.$emit('close'); this.$emit('close');
this.visible = false; this.visible = false;
this.$parent.getcountFileNum();
this.$parent.searchgetFileList(); this.$parent.searchgetFileList();
}, },
handleOk () { handleOk () {
this.$parent.searchgetFileList();
this.close(); this.close();
}, },
handleCancel () { handleCancel () {
this.$parent.searchgetFileList();
this.close() this.close()
}, },
} }