提交 6bf04840 authored 作者: 龙菲's avatar 龙菲

修改导入报错逻辑

上级 7af5a19d
......@@ -34,6 +34,7 @@
size="48"
icon="el-icon-circle-close"
@click.native="handleCancel(scope.$index)"
v-if="scope.row.status==null"
></el-button>
</template>
</el-table-column>
......
......@@ -353,13 +353,14 @@ export default {
(progressEvent) => this.uploadUnderWayCallback(progressEvent, index),
(c) => this.cancelCallBack(c, index)
).then((res) => {
if (res.code == 0) {
if (res.data.code == 0) {
this.$set(this.filesList[index], "status", "success");
this.$set(this.filesList[index], "desc", "上传成功");
this.$message.success("文件" + file.name + "上传成功!");
} else {
this.$set(this.filesList[index], "status", "warning");
this.$set(this.filesList[index], "desc", "上传失败" + res.msg);
this.$message.error("上传失败:" + res.msg);
this.$set(this.filesList[index], "desc", "上传失败" + res.data.msg);
this.$message.error("上传失败:" + res.data.msg);
}
});
},
......@@ -415,7 +416,7 @@ export default {
this.cancelUploadArr.splice(index, 1); //从取消队列中删除
}
if (this.filesList[index]) {
this.filesList.splice(index,1)
this.filesList.splice(index, 1);
}
this.$message.info("已取消上传!");
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论