提交代码
This commit is contained in:
parent
854cc9de13
commit
e50a958f09
|
@ -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()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user