Jelajahi Sumber

部分章节报告内容拼接;整个晋西北乱成了一锅粥...

Karsa 5 bulan lalu
induk
melakukan
1d7b21080b
1 mengubah file dengan 43 tambahan dan 5 penghapusan
  1. 43 5
      src/views/report/Detail.vue

+ 43 - 5
src/views/report/Detail.vue

@@ -87,7 +87,7 @@ const getReportDetail=async ()=>{
         info.value.report_info.content=addTokenToIframe(res.data.report_info.content,res.data.report_info.report_id,0)
         audioData.value={
             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_size:res.data.report_info.video_size||'',
             video_play_seconds:res.data.report_info.video_play_seconds,
             video_url:res.data.report_info.video_url,
@@ -518,8 +518,8 @@ const closeShowAttentionPop=()=>{
     <div class="report-detail-page" v-if="info">
         <div class="hasrightaside-box">
             <div class="content-box">
-                <!-- 晨报、周报章节 -->
-                <div class="chapter-list-wrap" v-if="info.report_info.has_chapter">
+                <!-- 晨报、周报章节 列表展示形式 -->
+                <div class="chapter-list-wrap" v-if="info.report_info.has_chapter&&info.report_detail_show_type===2">
                     <div 
                         :class="['top-box',info.report_info.classify_name_first=='周报'?'top-box-week':'']" 
                         :style="'background-image:url(' + info.report_info.banner_url + ')'"
@@ -602,7 +602,7 @@ const closeShowAttentionPop=()=>{
                     </div>
                 </div>
                 
-                <!-- 报告详情 -->
+                <!-- 报告详情 章节报告拼接形式 -->
                 <div class="report-box" v-else>
                     <!-- <template v-if="bannerDataList.length > 0">
                         <el-carousel height="90px" style="margin-bottom:20px;" :interval="4000" :indicator-position="bannerDataList.length==0?'none':''" :arrow="bannerDataList.length==0?'never':''">
@@ -647,7 +647,25 @@ const closeShowAttentionPop=()=>{
                         <AudioBox :data="audioData" v-if="info.report_info.video_url&&info.report_info.video_play_seconds>0"></AudioBox>
 
                         <div id="report-rich-content" class="no-select-text rich-content" ref="waterMarkEl">
-                            <ReportContent :html="info.report_info.content" v-if="info.auth_ok"></ReportContent>
+                            <template v-if="info.auth_ok">
+                                <!-- 展示拼接的章节报告 -->
+                                <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>
+
+                                <!-- 单人报告 -->
+                                <ReportContent :html="info.report_info.content" v-if="!info.report_info.has_chapter"></ReportContent>
+                            </template>
+
                             <div v-html="info.report_info.content_sub" v-else></div>
                             <!-- 隐藏的水印 -->
                             <div class="hide-watermark-box">
@@ -1156,4 +1174,24 @@ const closeShowAttentionPop=()=>{
         box-sizing: border-box
     }
 }
+.chapter-concat-item {
+    padding: 10px 0;
+    .chapter-title {
+        display: flex;
+        align-items: center;
+        font-size: 15px;
+        .type {
+            height: fit-content;
+            display: inline-block;
+            color: #fff;
+            padding: 5px 10px;
+            background-color: #E6A23C;
+            border-radius: 4px; 
+            margin-right: 10px;
+        }
+        .chapter-title-text {
+            font-size: 15px;
+        }
+    }
+}
 </style>