浏览代码

部分章节报告拼接内容

Karsa 8 月之前
父节点
当前提交
524cd597f7
共有 1 个文件被更改,包括 47 次插入10 次删除
  1. 47 10
      src/views/hzyb/report/Detail.vue

+ 47 - 10
src/views/hzyb/report/Detail.vue

@@ -9,7 +9,7 @@
     </div> -->
     </div> -->
     <div class="report-detail-page" @click="closeAttention" v-if="info" :style="{paddingBottom:$store.state.hzyb.audioData.url&&'80px'}">
     <div class="report-detail-page" @click="closeAttention" v-if="info" :style="{paddingBottom:$store.state.hzyb.audioData.url&&'80px'}">
         <!-- 晨报、周报章节 -->
         <!-- 晨报、周报章节 -->
-        <div class="chapter-list-wrap" v-if="info.report_info.has_chapter">
+        <div class="chapter-list-wrap" v-if="info.report_info.has_chapter&&report_detail_show_type===2">
             <div class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'">
             <div class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'">
                 <div class="title">{{info.report_info.classify_name_first}}</div>
                 <div class="title">{{info.report_info.classify_name_first}}</div>
                 <div class="sub-title">{{info.report_info.title}}</div>
                 <div class="sub-title">{{info.report_info.title}}</div>
@@ -106,11 +106,29 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <div id="report-rich-content" class="rich-content" style="position: relative;" ref="richConBox">
                 <div id="report-rich-content" class="rich-content" style="position: relative;" ref="richConBox">
-                    <div v-if="info.auth_ok">
-                        <ul>
-                            <li v-for="item in realContent" :key="item" v-html="item"></li>
-                        </ul>
-                    </div>
+                    <!-- 单人报告 -->
+                    <template v-if="info.auth_ok">
+                        <div v-if="!info.report_info.has_chapter">
+                            <ul>
+                                <li v-for="item in realContent" :key="item" v-html="item"></li>
+                            </ul>
+                        </div>
+                        
+                        <!-- 展示拼接的章节报告 -->
+                        <template v-if="info.report_info.has_chapter && info.report_detail_show_type===1">
+                            <div 
+                                class="chapter-concat-item" 
+                                v-for="chapter in info.report_chapter_list"
+                                :key="chapter.report_chapter_id"
+                            >
+                                <div class="chapter-title">
+                                    <h3 class="chapter-title-text">{{chapter.title}}</h3>
+                                </div>
+                                <div class="html-cont" v-html="chapter.content"></div>
+                            </div>
+                        </template>
+                    </template>
+
                     <div v-html="info.report_info.content_sub" v-else></div>
                     <div v-html="info.report_info.content_sub" v-else></div>
                     <!-- 隐藏的水印 -->
                     <!-- 隐藏的水印 -->
                     <div class="hide-watermark-box" v-if="userInfo">
                     <div class="hide-watermark-box" v-if="userInfo">
@@ -447,7 +465,7 @@ export default {
                 this.layoutBaseInfo['创建时间']=moment(res.data.report_info.publish_time).format('YYYY.MM.DD HH:mm')
                 this.layoutBaseInfo['创建时间']=moment(res.data.report_info.publish_time).format('YYYY.MM.DD HH:mm')
                 this.audioData={
                 this.audioData={
                     auth_ok:res.data.auth_ok,
                     auth_ok:res.data.auth_ok,
-                    video_name:res.data.report_info.video_name,
+                    video_name:res.data.report_info.video_name||`${res.data.report_info.title}(${moment(res.data.report_info.publish_time).format('MMDD')})`,
                     video_play_seconds:res.data.report_info.video_play_seconds,
                     video_play_seconds:res.data.report_info.video_play_seconds,
                     video_url:res.data.report_info.video_url,
                     video_url:res.data.report_info.video_url,
                     video_img:res.data.report_info.video_img
                     video_img:res.data.report_info.video_img
@@ -483,15 +501,14 @@ export default {
                 }
                 }
 
 
                 // 处理报告标题数据
                 // 处理报告标题数据
-                if(!this.info.report_info.has_chapter){
-                    //【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}
+                // if(!this.info.report_info.has_chapter){
                     const  time=moment(res.data.report_info.publish_time).format('MMDD')
                     const  time=moment(res.data.report_info.publish_time).format('MMDD')
                     if(res.data.report_info.classify_name_second==res.data.report_info.title){
                     if(res.data.report_info.classify_name_second==res.data.report_info.title){
                         this.title=`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${time})`
                         this.title=`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${time})`
                     }else{
                     }else{
                         this.title=`【第${res.data.report_info.stage}期|${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${time})`
                         this.title=`【第${res.data.report_info.stage}期|${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${time})`
                     }
                     }
-                }
+                // }
 
 
                 //向小程序发送分享数据
                 //向小程序发送分享数据
                 //处理分享标题
                 //处理分享标题
@@ -1182,4 +1199,24 @@ export default {
         box-sizing: border-box
         box-sizing: border-box
     }
     }
 }
 }
+.chapter-concat-item {
+    padding: 20px 0;
+    .chapter-title {
+        display: flex;
+        align-items: center;
+        font-size: 30px;
+        .type {
+            height: fit-content;
+            display: inline-block;
+            color: #fff;
+            padding: 10px 20px;
+            background-color: #E6A23C;
+            border-radius: 8px; 
+            margin-right: 20px;
+        }
+        .chapter-title-text {
+            font-size: 30px;
+        }
+    }
+}
 </style>
 </style>