浏览代码

Merge branch 'feature_20260330_拜访连拍速度优化' into uat(dev)

zhujindu 2 周之前
父节点
当前提交
5c845586f3
共有 1 个文件被更改,包括 19 次插入3 次删除
  1. 19 3
      src/components/deleteUploadImgTaskPhoto.vue

+ 19 - 3
src/components/deleteUploadImgTaskPhoto.vue

@@ -21,7 +21,11 @@
       </van-col>
       <van-col span="6" v-for="(urls, index) in imgArr" :key="index">
         <div class="imgview">
-          <van-icon v-if="insert == '1'" name="close" size="16" v-on:click="deleteImg(index)" />
+          <van-icon
+            v-if="insert == '1'"
+            name="close"
+            size="16"
+            v-on:click="deleteImg(index, urls)" />
           <img :src="urls.fileUrl" width="100px" height="100px" @click="previewsImg(index)" />
           <!-- <img
             v-else
@@ -164,8 +168,20 @@ export default {
         });
       }
     },
-    deleteImg(index) {
-      this.imgArr.splice(index, 1);
+    deleteImg(index, urls) {
+      // <!-- 0=企业微信,1=H5相机 -->
+      if (this.userInfo.photoMethod == '1') {
+        removePhotoBatch({ fileIdList: urls.fileIdSplicing.split(',') }).then((res) => {
+          if (res.code == 200) {
+            this.$toast('删除成功!');
+            this.$emit('upDataDetail');
+          } else {
+            this.$toast('删除失败!');
+          }
+        });
+      } else {
+        this.imgArr.splice(index, 1);
+      }
     },
     previewsImg(index) {
       let urls = this.imgArr.map((item) => item.fileUrl);