|
@@ -673,7 +673,19 @@ export default {
|
|
|
this.$set(this.fileList[index], "status", 5);
|
|
|
return "<span style=\"color: red\">转换失败</span>";
|
|
|
case 6:
|
|
|
+ // console.log(item.name)
|
|
|
+ //获取输出的目标文件名
|
|
|
+ // let name = item.name
|
|
|
+ // let num= name.lastIndexOf(".")
|
|
|
+ // let output = ""
|
|
|
+ // if(item.output === "png" || item.output === "jpg"){
|
|
|
+ // output = "zip"
|
|
|
+ // }else {
|
|
|
+ // output = item.output
|
|
|
+ // }
|
|
|
+ // const outFilename = name.slice(0,num)+"."+output
|
|
|
this.$set(this.fileList[index], "status", 6);
|
|
|
+ // return `<a href="${item.path}" download="${outFilename}" style="color: #0dd299">下载</a>`;
|
|
|
return `<a href="${item.path}" style="color: #0dd299">下载</a>`;
|
|
|
}
|
|
|
},
|
|
@@ -747,21 +759,22 @@ export default {
|
|
|
this.changeFileStatus(file.name, 2,file.output);
|
|
|
this.uploadNum++;
|
|
|
this.uploadSuccessNum++;
|
|
|
- if (this.uploadNum === this.uniqFileArr.length) {
|
|
|
- this.convertFile(file.name, missionId);
|
|
|
- }
|
|
|
let uploadAllNum = this.uploadErrNum + this.uploadSuccessNum
|
|
|
- if(uploadAllNum === this.uniqFileArr.length && this.uploadErrNum > 0){
|
|
|
- this.changeFileFlag = true;
|
|
|
- this.changeFileStatus("all", 5);
|
|
|
+ if (uploadAllNum === this.uniqFileArr.length) {
|
|
|
+ this.convertFile(file.name, missionId);
|
|
|
}
|
|
|
+ // if(uploadAllNum === this.uniqFileArr.length && this.uploadErrNum > 0){
|
|
|
+ // this.changeFileFlag = true;
|
|
|
+ // this.changeFileStatus("all", 5);
|
|
|
+ // }
|
|
|
}
|
|
|
else {
|
|
|
this.uploadErrNum++;
|
|
|
let uploadAllNum = this.uploadErrNum + this.uploadSuccessNum
|
|
|
if(uploadAllNum === this.uniqFileArr.length){
|
|
|
- this.changeFileFlag = true;
|
|
|
- this.changeFileStatus("all", 5);
|
|
|
+ // this.changeFileFlag = true;
|
|
|
+ // this.changeFileStatus(file.name, 5,file.output);
|
|
|
+ this.convertFile(file.name, missionId);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -812,16 +825,18 @@ export default {
|
|
|
output = item.output
|
|
|
}
|
|
|
const outFilename = name.slice(0,num)+"."+output
|
|
|
- if (outFilename === getFileList[i].outFilename) {
|
|
|
- this.changeFileStatus(getFileList[i].fileName, 6, getFileList[i].targetType);
|
|
|
- this.$set(item, "path", getFileList[i].path);
|
|
|
- // 对相同文件名与相同转换后文件进行去重
|
|
|
- this.changeSucesssFileList.forEach((iten,index)=>{
|
|
|
- if(iten.id.indexOf(item.id) !== -1){
|
|
|
- this.changeSucesssFileList.splice(index,1)
|
|
|
- }
|
|
|
- })
|
|
|
- this.changeSucesssFileList.push(item);
|
|
|
+ if(item.status !==6){
|
|
|
+ if (outFilename === getFileList[i].outFilename) {
|
|
|
+ this.changeFileStatus(getFileList[i].fileName, 6, getFileList[i].targetType);
|
|
|
+ this.$set(item, "path", getFileList[i].path);
|
|
|
+ // 对相同文件名与相同转换后文件进行去重
|
|
|
+ this.changeSucesssFileList.forEach((iten,index)=>{
|
|
|
+ if(iten.id.indexOf(item.id) !== -1){
|
|
|
+ this.changeSucesssFileList.splice(index,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.changeSucesssFileList.push(item);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
changeSucesssNum++;
|