提交 c606f2ae authored 作者: 龙菲's avatar 龙菲

修改导入报错逻辑

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