瀏覽代碼

日报分享

zhujindu 7 月之前
父節點
當前提交
872c895696
共有 1 個文件被更改,包括 13 次插入9 次删除
  1. 13 9
      src/views/week/dailyHistoricalDetails.vue

+ 13 - 9
src/views/week/dailyHistoricalDetails.vue

@@ -706,20 +706,24 @@ export default {
     },
     // 打开分享
     clickShareFlag(index = -1) {
-      // 重置分享图片状态
-      this.reportTarget.photos.forEach((item) => {
-        item.photos.forEach((val) => {
-          this.$set(val, 'checked', false);
-        });
-      });
-      // 选择分享的图片
-      this.shareImgFlag = true;
+      this.urlList = [];
       this.reportRemarksIndex = index;
+      if (this.reportTarget.photos && this.reportTarget.photos.length) {
+        // 重置分享图片状态
+        this.reportTarget.photos.forEach((item) => {
+          item.photos.forEach((val) => {
+            this.$set(val, 'checked', false);
+          });
+        });
+        // 选择分享的图片
+        this.shareImgFlag = true;
+      } else {
+        this.setShareFlag = true;
+      }
     },
     // 确认分享
     confirmShare() {
       this.shareImgFlag = false;
-      this.urlList = [];
       this.reportTarget.photos.forEach((item) => {
         item.photos.forEach((val) => {
           if (val.checked) this.urlList.push(val.fileUrl);