Преглед изворни кода

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

zhujindu пре 2 недеља
родитељ
комит
221ae9bd67
1 измењених фајлова са 14 додато и 8 уклоњено
  1. 14 8
      src/components/deleteUploadImgTaskPhoto.vue

+ 14 - 8
src/components/deleteUploadImgTaskPhoto.vue

@@ -115,11 +115,12 @@ export default {
       handler(val) {
         this.imgArr = [];
         // <!-- 0=企业微信,1=H5相机 -->
-        if (val) {
-          if (this.userInfo.photoMethod == '1') {
-            this.imgArr = val || [];
-          }
+        // if (val) {
+        if (this.userInfo.photoMethod == '1') {
+          this.imgArr = val || [];
+        } else {
         }
+        // }
       },
       deep: true,
       immediate: true,
@@ -196,6 +197,14 @@ export default {
       console.log(source);
       // 0=企业微信,1=H5相机
       if (this.userInfo.photoMethod == '0') {
+        this.imgArr = this.imgArr.concat(
+          localIds.map((item) => {
+            return {
+              mediaId: '',
+              fileUrl: item,
+            };
+          }),
+        );
         this.syncUpload(localIds);
       } else {
         this.$emit('upDataDetail');
@@ -219,10 +228,7 @@ export default {
           localId: localId,
           isShowProgressTips: 0, // 默认为1,显示进度提示
           success: (res) => {
-            this.imgArr.push({
-              mediaId: res.serverId,
-              fileUrl: localId,
-            });
+            this.imgArr[localIds.length - 1].mediaId = res.serverId;
             this.syncUpload(localIds, callback);
           },
         });