|
|
@@ -63,6 +63,7 @@
|
|
|
<!-- 上传图片 -->
|
|
|
<div class="uploading_box" v-loading="loading">
|
|
|
<el-upload
|
|
|
+ ref="upload"
|
|
|
action="/send_answer_img"
|
|
|
list-type="picture-card"
|
|
|
:on-preview="handlePictureCardPreview"
|
|
|
@@ -194,13 +195,12 @@ export default {
|
|
|
|
|
|
//上传图片-删除
|
|
|
handleRemove() {
|
|
|
- let postData = this.$qs.parse({
|
|
|
- pic_list: localStorage.getItem("add"),
|
|
|
- ret: this.radio
|
|
|
- });
|
|
|
-
|
|
|
//判断是识别失败进来的还是直接点击的手动输入
|
|
|
if (localStorage.getItem("memoryCompileID") !== null) {
|
|
|
+ let postData = this.$qs.parse({
|
|
|
+ img_list: localStorage.getItem("add"),
|
|
|
+ ret: this.radio
|
|
|
+ });
|
|
|
//识别失败
|
|
|
return this.$confirm("确定要删除图片吗", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -221,6 +221,8 @@ export default {
|
|
|
type: "success",
|
|
|
duration: 1500
|
|
|
});
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ localStorage.removeItem("add");
|
|
|
} else if (res.data === 1) {
|
|
|
this.$notify.error({
|
|
|
title: "错误",
|
|
|
@@ -237,6 +239,10 @@ export default {
|
|
|
throw new Error("取消成功!");
|
|
|
});
|
|
|
} else {
|
|
|
+ let postData = this.$qs.parse({
|
|
|
+ pic_list: localStorage.getItem("add"),
|
|
|
+ ret: this.radio
|
|
|
+ });
|
|
|
//手动输入
|
|
|
return this.$confirm("确定要删除图片吗", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -257,6 +263,8 @@ export default {
|
|
|
type: "success",
|
|
|
duration: 1500
|
|
|
});
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ localStorage.removeItem("add");
|
|
|
} else if (res.data === 1) {
|
|
|
this.$notify.error({
|
|
|
title: "错误",
|