Commit 32559d08 authored by 以墨为白's avatar 以墨为白 🎧

进度问题

parent f589b46d
......@@ -120,6 +120,7 @@ export default {
if (file.pass) {//文件已经存在
_self.$emit("Completed", param);
_self.fileList.filter(e => e.id == file.id)[0].state = 2;
_self.fileList.filter(e => e.id == file.id)[0].percentage = 100;
} else { //如果所有分块上传成功,则通知后台合并分块
$.ajax({
type: "POST",
......@@ -131,6 +132,7 @@ export default {
},
success: function (data) {
_self.fileList.filter(e => e.id == file.id)[0].state = 2;
_self.fileList.filter(e => e.id == file.id)[0].percentage = 100;
param.success = data.code == 9000;
_self.$emit("Completed", param);
},
......@@ -208,7 +210,8 @@ export default {
},
getProgressBar(file, percentage) {
let item = this.fileList.find(e => e.id == file.id);
item && (item.percentage = Math.floor(percentage * 100 * 100) / 100);
//在分片合并之后在设置进度百分之百
item && (item.percentage = percentage == 1 ? 99.9 : Math.floor(percentage * 100 * 100) / 100);
}
},
};
......
......@@ -495,7 +495,6 @@ export default {
//table数据预览
handleView(index, row) {
console.log(1121212121212);
let _this = this;
//用户判断此格式是否是视频格式
let video_type = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment