Browse Source

日报分享

zhujindu 5 months ago
parent
commit
8cd83cb169
2 changed files with 62 additions and 15 deletions
  1. 10 0
      src/views/week/daily.vue
  2. 52 15
      src/views/week/dailyDetails.vue

+ 10 - 0
src/views/week/daily.vue

@@ -751,8 +751,18 @@ export default {
                 .alert({
                   title: '系统提示',
                   message: '提交成功',
+                  showCancelButton: true,
+                  confirmButtonText: '分享',
+                  cancelButtonText: '关闭',
                 })
                 .then(() => {
+                  // 跳转历史汇报详情 分享汇报
+                  this.$router.replace({
+                    path: 'dailyDetails',
+                    query: { reportId: res.id, source: 'daily' },
+                  });
+                })
+                .catch(() => {
                   if (this.$route.query.reportId != undefined) {
                     window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
                   } else {

+ 52 - 15
src/views/week/dailyDetails.vue

@@ -512,30 +512,33 @@
       custom-class="shareImgFlag">
       <div v-if="reportTarget.photos">
         <div v-for="(item, index) in reportTarget.photos" :key="index">
+          <p style="margin-bottom: 10px; margin-top: 0; display: flex">
+            今日总结&明日规划<van-checkbox
+              v-model="checked"
+              style="margin-left: 10px"></van-checkbox>
+          </p>
           <p style="margin-bottom: 10px; margin-top: 0">{{ item.taskName }}</p>
-          <van-row gutter="10" class="visitIMG1">
-            <van-col
-              span="6"
-              style="padding-bottom: 10px; position: relative"
-              v-for="(itemImg, indexImg) in item.photos"
-              :key="indexImg">
+          <div class="shareVisitImg">
+            <div v-for="(itemImg, indexImg) in item.photos" :key="indexImg">
               <img :src="itemImg.fileUrl" alt="" @click="selectImg(itemImg)" />
               <van-icon
                 @click.stop
                 name="success"
                 class="activaImg"
-                color="red"
-                size="30"
+                color="#fff"
+                size="15"
                 style="
                   position: absolute;
-                  top: 50%;
-                  left: 50%;
-                  margin: -15px 0 0 -15px;
+                  right: 0;
+                  bottom: 0;
+                  /* margin: -15px 0 0 -15px; */
                   pointer-events: none;
+                  background: #2b73cf;
+                  border: 2px solid #fff;
                 "
                 v-if="itemImg.checked" />
-            </van-col>
-          </van-row>
+            </div>
+          </div>
         </div>
       </div>
       <span slot="footer" class="footer-btn">
@@ -629,10 +632,13 @@ export default {
       shareImgFlag: false,
       urlList: [],
       setDailyDetailsBoxFlag: true,
+      source: '',
+      checked: true, //今日总结&明日规划
       //
     };
   },
   created() {
+    this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
   },
@@ -752,6 +758,9 @@ export default {
           }
         }
         this.imgList = imgList;
+        if (this.source == 'daily') {
+          this.clickShareFlag(-1);
+        }
       });
     },
     userTodayPlanNum() {
@@ -767,7 +776,9 @@ export default {
       });
     },
     onClickLeft() {
-      this.$router.go(-1);
+      this.$router.replace({
+        path: 'myHistoricalDaily',
+      });
     },
     wuliaoTableClose() {
       this.shareImgFlag = false;
@@ -866,7 +877,7 @@ export default {
   }
 }
 </style>
-<style>
+<style lang="scss">
 .linep .van-cell__title {
   color: #1e5398;
   font-weight: 500;
@@ -941,4 +952,30 @@ export default {
     }
   }
 }
+.shareImgFlag {
+  .shareVisitImg {
+    display: flex;
+    flex-wrap: wrap;
+    div {
+      width: 22%;
+      height: 80px;
+      margin-right: 3%;
+      margin-top: 10px;
+      position: relative;
+      img {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
+  .el-dialog__header {
+    display: flex;
+    .el-dialog__title {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+  }
+}
 </style>