From b8dfc98b089e47fdb3e269941bbd2de3f7fb7de1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 13 Sep 2021 17:14:57 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_enterprises

---
 src/views/securityUnitChild/licence.vue |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/views/securityUnitChild/licence.vue b/src/views/securityUnitChild/licence.vue
index 7fc6d85..efa47c1 100644
--- a/src/views/securityUnitChild/licence.vue
+++ b/src/views/securityUnitChild/licence.vue
@@ -2,7 +2,12 @@
   <div class="License">
     <el-container>
       <el-main>
-        <avue-form :option="option" v-model="form" :upload-after="uploadAfter">
+        <avue-form
+          :option="option"
+          v-model="form"
+          :upload-after="uploadAfter"
+          :upload-delete="uploadDelete"
+        >
         </avue-form
       ></el-main>
     </el-container>
@@ -57,13 +62,31 @@
         this.form.imgUrl = this.row.licence;
       }
     },
+    uploadDelete(column, file) {
+      this.row.licence = "";
+      return update(this.row)
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "删除成功!",
+          });
+          // done();
+        })
+        .catch((error) => {
+          this.$message({
+            type: "warning",
+            message: "删除照片失败,再重试!",
+          });
+          // done();
+        });
+    },
     uploadAfter(res, done, loading, column) {
       this.row.licence = res.url;
       update(this.row).then(
         () => {
           this.$message({
             type: "success",
-            message: "操作成功!",
+            message: "添加成功!",
           });
           done();
         },

--
Gitblit v1.9.3