Quellcode durchsuchen

Merge branch 'master' into cygx_9.10

bding vor 2 Jahren
Ursprung
Commit
0490936450

BIN
src/assets/hzyb/report/close.png


BIN
src/assets/hzyb/report/icon-1.png


BIN
src/assets/hzyb/report/icon-2.png


+ 22 - 11
src/store/modules/hzyb.js

@@ -3,10 +3,8 @@ const hzybStore={
     state:{
         audioData:{
             INS:null,
-            url:'',//音频链接
-            videoTime:0,//音频时长
-            videoName:'',//音频名称
-            videoImg:'',//音频图片
+            list:[],
+            index:0,
             paused:true,//音频是否在暂停
             show:false,// 显示音频弹窗
             videoCtime:0,//音频当前播放时间
@@ -15,29 +13,42 @@ const hzybStore={
     mutations: {
         // 点击播放音频
         addAudio(state,e){
-            state.audioData.url=e.video_url
-            state.audioData.videoTime=e.video_play_seconds
-            state.audioData.videoName=e.video_name
-            state.audioData.videoImg=e.video_img
+            state.audioData.list=e.list
+            state.audioData.index=e.index||0
             state.audioData.INS.play()
             state.audioData.show=true
         },
         // 更新音频播放状态
         upateAudioStatus(state,e){
             if(e==='end'){
-                state.audioData.url=''
-                state.audioData.show=false
+                if(state.audioData.list.length-1==state.audioData.index){
+                    // 最后一首
+                    state.audioData.show=false
+                    state.audioData.INS=null 
+                    state.audioData.list=[]
+                    state.audioData.index=0
+                    state.audioData.paused=true
+                }else{
+                    state.audioData.index++
+                }
+
             }else if(e==='play'){
                 state.audioData.paused=false
             }else if(e==='paused'){
                 state.audioData.paused=true
             }
         },
+        // 切换音频
+        changeAudioIndex(state,e){
+            console.log(e);
+            state.audioData.index=e
+        },
         //关闭音频弹窗
         closeAudioPop(state){
             state.audioData.show=false
             state.audioData.INS=null 
-            state.audioData.url=''
+            state.audioData.list=[]
+            state.audioData.index=0
             state.audioData.paused=true
         },
         showAudioPop(state){

+ 35 - 18
src/views/hzyb/Index.vue

@@ -1,5 +1,5 @@
 <script setup>
-import {ref} from 'vue'
+import {computed, ref} from 'vue'
 import { Slider,Icon as VanIcon,Progress as VanProgress } from 'vant';
 import { useStore } from "vuex";
 
@@ -7,6 +7,8 @@ const store=useStore()
 
 const audioIconPlaysmall=new URL('../../assets/hzyb/report/audio-play-small.png', import.meta.url).href
 const audioIconPausesmall=new URL('../../assets/hzyb/report/audio-pause-small.png', import.meta.url).href
+const audioIconChange=new URL('../../assets/hzyb/report/audio-change-small.png', import.meta.url).href
+const audioIconChangeGrey=new URL('../../assets/hzyb/report/audio-change-small-grey.png', import.meta.url).href
 
 const formatVoiceTime = (e) => {
   let minus = parseInt(e / 60);
@@ -14,6 +16,10 @@ const formatVoiceTime = (e) => {
   return `${minus > 9 ? minus : "0" + minus}:${sec > 9 ? sec : "0" + sec}`;
 };
 
+const curAudioData=computed(()=>{
+    return store.state.hzyb.audioData.list[store.state.hzyb.audioData.index]
+})
+
 let currentTime=ref(0)
 let showBigAudio=ref(false)
 const audioIns=ref('')
@@ -64,6 +70,17 @@ const handleCloseAudioPup=()=>{
     store.commit('hzyb/closeAudioPop')
 }
 
+// 切换音频
+const handleAudioChange=(type)=>{
+    const cindex=store.state.hzyb.audioData.index
+    if(type==='before'&&cindex!=0){
+        store.commit('hzyb/changeAudioIndex',cindex-1)
+    }
+    if(type==='next'&&(cindex!=store.state.hzyb.audioData.list.length-1)){
+        store.commit('hzyb/changeAudioIndex',cindex+1)
+    }
+}
+
 </script>
 
 
@@ -72,7 +89,7 @@ const handleCloseAudioPup=()=>{
     <audio
         ref="audioIns"
         autoplay
-        :src="$store.state.hzyb.audioData.url"
+        :src="curAudioData?.url"
         @error="audioError"
         @play="audioPlay"
         @pause="audioPause"
@@ -83,11 +100,11 @@ const handleCloseAudioPup=()=>{
     <!-- 悬浮音频模块 -->
     <div class="popup-audio-box" v-if="$store.state.hzyb.audioData.show">
         <div class="small-box" v-if="!showBigAudio" @click="showBigAudio=true">
-            <img :src="$store.state.hzyb.audioData.videoImg" class="bg-img">
+            <img :src="curAudioData.videoImg" class="bg-img">
             <div class="small-con">
                 <div class="audio-name-box" style="flex:1;overflow: hidden;">
-                    <div class="van-ellipsis title">{{$store.state.hzyb.audioData.videoName}}</div>
-                    <div style="color:#666">时长 {{ formatVoiceTime($store.state.hzyb.audioData.videoTime) }}</div>
+                    <div class="van-ellipsis title">{{curAudioData.videoName}}</div>
+                    <div style="color:#666">时长 {{ formatVoiceTime(curAudioData.videoTime) }}</div>
                 </div>
                 <img class="btn-img" :src="$store.state.hzyb.audioData.paused?audioIconPausesmall:audioIconPlaysmall" @click.stop="handleClickAudio" alt="">
                 <van-icon name="cross" color="#BBC3C9" size="16" @click.stop="handleCloseAudioPup" />
@@ -96,40 +113,40 @@ const handleCloseAudioPup=()=>{
                 class="bot-progress" 
                 stroke-width="1px" 
                 color="#D4AC78" 
-                :percentage="(currentTime/$store.state.hzyb.audioData.videoTime)*100" 
+                :percentage="(currentTime/curAudioData.videoTime)*100" 
                 :show-pivot="false" 
             />
         </div>
         <div class="big-box" v-else>
             <van-icon name="arrow-down" color="#BBC3C9" size="16" class="arrow-d" @click="showBigAudio=false" />
             <van-icon name="cross" color="#BBC3C9" size="16" class="arrow-c" @click.stop="handleCloseAudioPup" />
-            <div class="title">{{$store.state.hzyb.audioData.videoName}}</div>
+            <div class="title">{{curAudioData.videoName}}</div>
             <div class="flex">
                 <span>{{formatVoiceTime(currentTime)}}</span>
                 <Slider 
                     button-size="14px" 
                     v-model="currentTime" 
-                    :max="$store.state.hzyb.audioData.videoTime" 
+                    :max="curAudioData.videoTime" 
                     active-color="#D5AD79" 
                     inactive-color="#E9E9E9"
                     @change="SliderChange" 
                     class="slider"
                 ></Slider>
-                <span>{{ formatVoiceTime($store.state.hzyb.audioData.videoTime) }}</span>
+                <span>{{ formatVoiceTime(curAudioData.videoTime) }}</span>
             </div>
             <div class="flex" style="justify-content: center;">
-                <img src="@/assets/hzyb/report/audio-change-small-grey.png">
+                <img 
+                    :src="$store.state.hzyb.audioData.index==0?audioIconChangeGrey:audioIconChange"
+                    @click="handleAudioChange('before')"
+                >
                 <img :src="$store.state.hzyb.audioData.paused?audioIconPausesmall:audioIconPlaysmall" @click="handleClickAudio" style="margin:0 20px">
-                <img src="@/assets/hzyb/report/audio-change-small-grey.png" style="transform: rotate(180deg)">
+                <img 
+                    :src="$store.state.hzyb.audioData.index==($store.state.hzyb.audioData.list.length-1)?audioIconChangeGrey:audioIconChange" 
+                    style="transform: rotate(180deg)"
+                    @click="handleAudioChange('next')"
+                >
             </div>
         </div>
-        <!-- <div>{{$store.state.hzyb.audioData.videoName}}</div>
-        <div class="flex">
-            <span>{{formatVoiceTime(currentTime)}}</span>
-            <Slider button-size="10px" v-model="currentTime" :max="$store.state.hzyb.audioData.videoTime" active-color="#D5AD79" @change="SliderChange" class="slider"></Slider>
-            <span>{{ formatVoiceTime($store.state.hzyb.audioData.videoTime) }}</span>
-            <img :src="$store.state.hzyb.audioData.paused?audioIconPausesmall:audioIconPlaysmall"  alt="" @click="handleClickAudio">
-        </div> -->
     </div>
 </template>
 

+ 222 - 34
src/views/hzyb/chart/Detail.vue

@@ -247,7 +247,7 @@ const getChartInfo=async (type)=>{
         // document.title=res.data.ChartInfo.ChartName
         
         // 设置highchart配置 ChartType: 1曲线图 2季节图:季节图中公历和农历数据结构不同
-        if(![2,7].includes(res.data.ChartInfo.ChartType)){
+        if(![2,7,10].includes(res.data.ChartInfo.ChartType)){
             if(type=='init'){
                 dateType.value=res.data.ChartInfo.DateType
                 startDate.value=res.data.ChartInfo.StartDate||''
@@ -277,6 +277,11 @@ const getChartInfo=async (type)=>{
         //奇怪柱形图依赖数据
         res.data.ChartInfo.ChartType === 7 && initBarData(res.data);
 
+        //截面散点图
+        res.data.ChartInfo.ChartType === 10 && initSectionScatterData(res.data);
+
+        
+
         // 向小程序发送分享数据
         let postData = {
             params:{
@@ -694,6 +699,156 @@ const filterInvalidData = (item)=> {
 }
 
 
+/* 散点截面图 */
+const sectionScatterData = ref({});
+/* 截面散点图获取详情赋值 */
+const initSectionScatterData = ({ DataResp }) => {
+    sectionScatterData.value = DataResp;
+
+    hasLeftAxis.value=true;
+    axisLimitData.leftMin=Number(DataResp.YMinValue)
+    axisLimitData.leftMax=Number(DataResp.YMaxValue)
+    axisLimitData.xMin=Number(DataResp.XMinValue)
+    axisLimitData.xMax=Number(DataResp.XMaxValue)
+    setSectionScatterChart()
+}
+/* 截面散点图设置 sectionScatterData */
+const setSectionScatterChart = () => {
+    const { DataList,XName,XNameEn,XUnitName,XUnitNameEn,YName,YNameEn,YUnitName,YUnitNameEn } = sectionScatterData.value;
+    const { leftMin,leftMax,xMin,xMax }  = axisLimitData;
+
+    //y轴
+    let yAxis = {
+        ...basicYAxis,
+        title: {
+            text: YName,
+            align: 'middle',
+        },
+        opposite: false,
+        reversed: false,
+        min: Number(leftMin),
+        max: Number(leftMax),
+        tickWidth: 1,
+    }
+
+    //x轴
+    let xAxis = {
+        ...scatterXAxis,
+        title: {
+            text: XName,
+            align: 'middle',
+        },
+        min: Number(xMin),
+        max: Number(xMax),
+    }
+
+    //数据列
+    let series = [];
+    DataList.forEach(item => {
+        //数据列
+        let series_item = {
+            data: [],
+            type: 'scatter',
+            name: item.Name,
+            color: item.Color,
+            lineWidth: 0,
+            chartType: 'linear',
+            zIndex:1,
+            visible: true
+        }
+        item.EdbInfoList.forEach(_ => {
+            series_item.data.push({
+            x: _.XValue,
+            y: _.YValue,
+            dataLabels: {
+                enabled: _.IsShow,
+                allowOverlap: true,
+                align: 'left',
+                format: _.Name,
+                formatCh: _.Name,
+                formatEn: _.NameEn
+            }
+            })
+        })
+        series.push(series_item);
+
+    //趋势线
+    if(item.ShowTrendLine)  {
+        
+        let trend_data = item.TrendLimitData.map((_,_index) => (
+            _index === item.TrendLimitData.length-1 ? {
+                x: _.X,
+                y: _.Y,
+                dataLabels: {
+                enabled: item.ShowRSquare || item.ShowFitEquation,
+                align: 'left',
+                color: '#666',
+                x: 20,
+                y: 30,
+                zIndex: 9,
+                allowOverlap: true,
+                formatter: function(){
+                    let tag = '';
+                    item.ShowRSquare && item.ShowFitEquation
+                    ? tag =`<span>${item.TrendLine}</span><br><span>R²=${item.RSquare}</span>`
+                    : item.ShowRSquare && !item.ShowFitEquation
+                    ? tag =`<span>R²=${item.RSquare}</span>`
+                    : item.ShowFitEquation && !item.ShowRSquare
+                    ? tag =`<span>${item.TrendLine}</span>`
+                    : ''
+                    return tag
+                }
+                }
+            } : {
+                x: _.X,
+                y: _.Y,
+            }
+        ))
+
+        let trend_item = {
+            data: trend_data,
+            type: 'spline',
+            linkedTo: ':previous',
+            color: item.Color,
+            lineWidth: 1,
+            chartType: 'linear',
+            enableMouseTracking: false,
+            dashStyle:'Dash',
+            zIndex: 2,
+            visible: true,
+            marker: {
+                enabled: false
+            }
+        }
+        series.push(trend_item)
+    }
+    })
+
+    let tooltip = {
+        formatter: function() {
+            let series_obj = DataList.find(_ => _.Name === this.series.name);
+            let ponit_obj = series_obj.EdbInfoList.find(_ => _.XValue ===this.x && _.YValue===this.y);
+
+            let str=`<b>${ ponit_obj.Name }</b>`;
+            str += `<br><span style="color:${this.color}">\u25CF</span>${ponit_obj.XName}: ${this.x} ${ponit_obj.XDate}<br>`;
+            str += `<span style="color:${this.color}">\u25CF</span>${ponit_obj.YName}: ${this.y} (${ponit_obj.YDate})`;
+
+            return str
+        }
+    }
+    
+    chartData.value = {
+        title: {
+            text:''
+        },
+        series,
+        yAxis: [yAxis],
+        xAxis,
+        tooltip
+    }
+}
+
+
 
 // 路由改变 解决从搜索页返回数据不刷新问题
 onBeforeRouteUpdate((nval)=>{
@@ -720,6 +875,8 @@ let axisLimitData=reactive({//左右轴极值
     rightMax:0,
     rightTwoMin:0,
     rightTwoMax:0,
+    xMin:0,
+    xMax:0,
 })
 const handleConfirmSetLimit=()=>{//确定修改极值(研究员会调用一次保存)
     if(canSave.value){
@@ -1540,9 +1697,14 @@ watch(
         console.log('极值改变');
 
         //奇怪柱状图 商品价格图
-        if(resData.value.ChartInfo.ChartType === 7 || resData.value.ChartInfo.Source === 2) {
+        if([7,10].includes(resData.value.ChartInfo.ChartType) || resData.value.ChartInfo.Source === 2) {
             chartData.value.yAxis[0].max = nval.leftMax;
             chartData.value.yAxis[0].min = nval.leftMin;
+            
+            if(resData.value.ChartInfo.ChartType === 10) {
+                chartData.value.xAxis.max = nval.xMax;
+                chartData.value.xAxis.min = nval.xMin;
+            }
         }else {
             chartData.value.yAxis.forEach(item=>{
                 if(item.IsAxis===1){//左轴
@@ -1737,38 +1899,57 @@ const setChartParams = () => {
             StartDate:startDate.value,
             EndDate: endDate.value,
         }
-    }else if(resData.value.ChartInfo.ChartType===2){//季节图
-        let arr=resData.value.EdbInfoList.map(item=>{
-            return {
-                ChartColor: item.ChartColor,
-                ChartStyle: item.ChartStyle,
-                ChartWidth: Number(item.ChartWidth),
-                EdbInfoId: item.EdbInfoId,
-                EdbInfoType: item.EdbInfoType,
-                IsAxis: item.IsAxis,
-                IsOrder: item.IsOrder,
-                LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
-                LeadValue: item.EdbInfoType ? 0 : Number(item.LeadValue),
-                MaxData: Number(chartData.value.yAxis[0].max),
-                MinData: Number(chartData.value.yAxis[0].min),
+    }
+    switch(resData.value.ChartInfo.ChartType) {
+        case 2: 
+            let arr=resData.value.EdbInfoList.map(item=>{
+                return {
+                    ChartColor: item.ChartColor,
+                    ChartStyle: item.ChartStyle,
+                    ChartWidth: Number(item.ChartWidth),
+                    EdbInfoId: item.EdbInfoId,
+                    EdbInfoType: item.EdbInfoType,
+                    IsAxis: item.IsAxis,
+                    IsOrder: item.IsOrder,
+                    LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
+                    LeadValue: item.EdbInfoType ? 0 : Number(item.LeadValue),
+                    MaxData: Number(chartData.value.yAxis[0].max),
+                    MinData: Number(chartData.value.yAxis[0].min),
+                }
+            })
+            params={
+                ChartInfoId: resData.value.ChartInfo.ChartInfoId || 0,
+                ChartEdbInfoList: arr,
+                Calendar: calendarType.value,
+                SeasonStartDate:startDate.value,
+                SeasonEndDate: endDate.value,
             }
-        })
-        params={
-            ChartInfoId: resData.value.ChartInfo.ChartInfoId || 0,
-            ChartEdbInfoList: arr,
-            Calendar: calendarType.value,
-            SeasonStartDate:startDate.value,
-            SeasonEndDate: endDate.value,
-        }
-    }else if(resData.value.ChartInfo.ChartType===7) {
-        params={
-            ChartInfoId: resData.value.ChartInfo.ChartInfoId || 0,
-            ChartEdbInfoList: barEdbData.value.map(_ =>({ EdbInfoId: _.EdbInfoId })),
-            DateType: 6,
-            LeftMin: String(axisLimitData.leftMin),
-            LeftMax: String(axisLimitData.leftMax),
-        }
+            break;
+        case 7: 
+            params={
+                ChartInfoId: resData.value.ChartInfo.ChartInfoId || 0,
+                ChartEdbInfoList: barEdbData.value.map(_ =>({ EdbInfoId: _.EdbInfoId })),
+                DateType: 6,
+                LeftMin: String(axisLimitData.leftMin),
+                LeftMax: String(axisLimitData.leftMax),
+            }
+            break;
+        case 10: 
+            params = {
+                ChartInfoId: resData.value.ChartInfo.ChartInfoId || 0,
+                DateType: 6,
+                Calendar: "公历",
+                ExtraConfig: JSON.stringify({
+                    ...JSON.parse(resData.value.ChartInfo.ExtraConfig),
+                    XMinValue: String(axisLimitData.xMin),
+                    XMaxValue: String(axisLimitData.xMax),
+                    YMinValue: String(axisLimitData.leftMin),
+                    YMaxValue: String(axisLimitData.leftMax),
+                })
+            } 
+            break;
     }
+    
     return params
 }
 
@@ -1847,7 +2028,7 @@ const posterParams=computed(()=>{
     <div class="chart-detail" v-if="!loading&&!noauth&&!nodata">
         <div class="chart-title">{{resData.ChartInfo.ChartName}}</div>
         <div class="top-box" v-if="$route.query.source!=='ybxcx_my_chart'">
-            <div class="flex calendar-box" style="float:left" @click="handleShowDate" v-if="resData.ChartInfo.ChartType !== 7 &&resData.ChartInfo.Source===1">
+            <div class="flex calendar-box" style="float:left" @click="handleShowDate" v-if="![7,10].includes(resData.ChartInfo.ChartType) &&resData.ChartInfo.Source===1">
                 <img src="../../../assets/hzyb/chart/calendar.png" alt="">
                 <span class="date">{{startDate||'开始日期'}}</span>
                 <span style="margin:0 5px">至</span>
@@ -1974,7 +2155,7 @@ const posterParams=computed(()=>{
                         <span>下限</span>
                     </p>
                     <p style="margin-bottom:25px" v-if="hasLeftAxis">
-                        <span style="margin-right:35px">左轴</span>
+                        <span style="margin-right:35px">{{resData.ChartInfo.ChartType===10 ? 'Y轴' :'左轴'}}</span>
                         <input type="number" v-model="axisLimitData.leftMax">
                         <span style="margin:0 10px">至</span>
                         <input type="number" v-model="axisLimitData.leftMin">
@@ -1992,6 +2173,13 @@ const posterParams=computed(()=>{
                         <span style="margin:0 10px">至</span>
                         <input type="number" v-model="axisLimitData.rightTwoMin">
                     </p>
+                    <!-- x轴上下限 -->
+                    <p v-if="axisLimitData.xMin" style="margin-bottom:25px">
+                        <span style="margin-right:35px">X轴</span>
+                        <input type="number" v-model="axisLimitData.xMin">
+                        <span style="margin:0 10px">至</span>
+                        <input type="number" v-model="axisLimitData.xMax">
+                    </p>
                 </div>
             </div>
         </Popup>

+ 3 - 0
src/views/hzyb/chart/component/chartBox.vue

@@ -165,8 +165,11 @@ watch(
                 :key="item.name"
                 @click="clickChartTopLabel(index)"
             >
+
+							<template v-if="!item.linkedTo">
                 <span class="color" :style="{background:item.visible?item.color:'#ccc'}"></span>
                 <span :style="{color:item.visible?'':'#ccc'}">{{item.name.length>20?item.name.replace(/<br>/g,''):item.name}}</span>
+							</template>	
             </div>
         </div>
 		<div class="chart-content">

+ 124 - 35
src/views/hzyb/report/Detail.vue

@@ -1,6 +1,6 @@
 <template>
 <van-pull-refresh v-model="loading" disabled style="min-height:100vh">
-    <div class="report-detail-page" 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="['晨报','周报'].includes(info.report_info.classify_name_first)">
             <div class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'">
@@ -14,11 +14,16 @@
                             <div>{{formatChapterTime(info.report_info.publish_time,'year-month')}}</div>
                         </div>
                     </div>
-                    <div class="num">第{{info.report_info.stage}}期</div>
+                    <div class="audio-play-list-box" @click="handleGoSetAudioList" v-if="info.report_info.classify_name_first=='周报'&&info.auth_ok">播放清单</div>
+                    <div class="attention-box" v-if="showAttention">
+                        点击<span style="color:#E3B377">播放清单</span>,打开章节列表,进行<span style="color:#E3B377">播放清单配置</span>
+                        <img class="close-icon" src="@/assets/hzyb/report/close.png" alt="" @click.stop="closeAttention">
+                    </div>
                 </div>
+                <div :class="['stage-num',info.report_info.classify_name_first=='晨报'?'stage-num-day':'']">第{{info.report_info.stage}}期</div>
             </div>
             <div class="list-box">
-                <div class="flex item" v-for="(item,index) in chapterList" :key="item.report_chapter_id" @click="goChapterDetail(item)">
+                <div class="flex item" v-for="item in chapterList" :key="item.report_chapter_id" @click="goChapterDetail(item)">
                     <div class="img-box">
                         <van-image class="img" :src="item.report_chapter_type_thumb" mode="aspectFill" />
                     </div>
@@ -29,6 +34,11 @@
                         </div>
                         <div class="van-multi-ellipsis--l2 sub-title">{{item.title}}</div>
                         <div class="update-time">更新至:{{formatChapterTime(item.publish_time,'year-month-day')}}</div>
+                        <div 
+                            :class="['audio-icon-box',item.video_url==$store.state.hzyb.audioData.list[$store.state.hzyb.audioData.index]?.url?'audio-icon-box_active':'']" 
+                            v-if="info.report_info.classify_name_first=='周报'&&item.is_close==0"
+                            @click.stop="handlePlayWeekAudio(item)"
+                        ></div>
                     </div>
                 </div>
             </div>
@@ -228,7 +238,9 @@ export default {
             shareData:{},//分享的数据传给ppt页
 
             collectIcon,
-            collectIcons
+            collectIcons,
+
+            showAttention:false,//是否显示配置播放清单提示
         }
     },
     beforeCreate(){
@@ -242,6 +254,7 @@ export default {
         this.fromPage = this.$route.query.fromPage || ''
         this.getDetail()
         this.getUserInfo()
+
     },
     mounted(){
         $(document).on('click', '.rich-content img',function(event) {
@@ -262,6 +275,43 @@ export default {
         window.removeEventListener('scroll',this.loadMoreHandle)
     },
     methods: {
+        // 点击开始播放周报的列表中的音频
+        handlePlayWeekAudio(e){
+            const arr=[]
+            this.chapterList.forEach(item=>{
+                if(item.is_close==0){
+                    arr.push({
+                        url:item.video_url,
+                        videoTime:item.video_play_seconds,
+                        videoName:item.video_name,
+                        videoImg:'https://hzstatic.hzinsights.com/static/yb_wx/report_list_zhou.png'
+                    })
+                }
+            })
+            console.log(arr);
+            let index=0
+            arr.forEach((_item,idx)=>{
+                if(_item.url==e.video_url) index=idx
+            })
+            this.$store.commit('hzyb/addAudio',{
+                list:arr,
+                index:index
+            })
+        },
+
+        // 设置周报的播放清单
+        handleGoSetAudioList(){
+            wx.miniProgram.navigateTo({
+                url:`/pages-report/audioPlayListSet?reportId=${this.reportId}`,
+            })
+        },
+
+        closeAttention(){
+            if(this.info.report_info.classify_name_first=='晨报'&&!this.info.auth_ok) return
+            localStorage.setItem('showAttention','true')
+            this.showAttention=false
+        },
+
         //背景音频播放报告音频
         handlePlayAudioBG(){
             wx.miniProgram.navigateTo({
@@ -372,33 +422,6 @@ export default {
                 let imgText=''//分享图上需要显示的内容
                 
                 const shareTime=moment(res.data.report_info.publish_time).format('MMDD')
-                //需求修改
-                // if(['晨报','周报'].includes(res.data.report_info.classify_name_first)){
-                //     shareTitle=`【${res.data.report_info.classify_name_first}】${res.data.report_info.title}(${shareTime})`
-                // }else{
-                //     // 专栏类报告
-                //     if(res.data.report_show_type==2){
-                //         const abstract=res.data.report_info.abstract?`:${res.data.report_info.abstract}`:''
-                //         if(res.data.report_info.classify_name_second==res.data.report_info.title){
-                //             shareTitle=`${res.data.report_info.title}(${shareTime})${abstract}`
-                //         }else{
-                //             shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
-                //         }
-                //     }else{
-                //         shareTitle=`【${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${shareTime})`
-                //     }
-                // }
-                // // 日度点评
-                // if(res.data.report_info.classify_name_first==='日度点评'){
-                //     shareTitle=res.data.report_info.abstract||'FICC日度点评'
-                //     const rddpImgRes=await apiRddpShareImg({
-                //         title:`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${shareTime})`
-                //     })
-                //     if(rddpImgRes.code===200){
-                //         shareImg=rddpImgRes.data
-                //     }
-                // }
-
                 if(res.data.report_info.abstract){
                     shareTitle=res.data.report_info.abstract
                     imgText=`<div style="font-size:78px">第${res.data.report_info.stage}期 | ${res.data.report_info.title}(${shareTime})</div>`
@@ -432,6 +455,17 @@ export default {
                         shareImg:shareImg
                     } 
                 });
+
+                // 周报判断是否要显示提示
+                if(res.data.report_info.classify_name_first=='周报'){
+                    const showAtt=localStorage.getItem('showAttention')||""
+                    if(showAtt){
+                        this.showAttention=false
+                    }else{
+                        this.showAttention=true
+                    }
+                }
+                
             }
         },
 
@@ -816,7 +850,7 @@ export default {
                 left: 34px;
                 right: 34px;
                 justify-content: space-between;
-                align-items: flex-end;
+                align-items: center;
                 .time-box{
                     align-items: center;
                     font-size: 24px;
@@ -827,8 +861,53 @@ export default {
                         margin-right: 15px;
                     }
                 }
-                
+                .audio-play-list-box{
+                    background-color: #E3B377;
+                    color: #fff;
+                    font-size: 24px;
+                    width: 180px;
+                    line-height: 52px;
+                    border-radius: 25px;
+                    text-align: center;
+                }
+                .attention-box{
+                    position: absolute;
+                    bottom: 110%;
+                    background-color: #fff;
+                    color: #333;
+                    box-shadow: 0px 0px 10px 4px rgba(0, 0, 0, 0.16);
+                    padding: 20px 54px 20px 20px;
+                    border-radius: 8px;
+                    .close-icon{
+                        width: 24px;
+                        height: 24px;
+                        position: absolute;
+                        top: 50%;
+                        transform: translateY(-50%);
+                        right: 20px;
+                    }
+                    &::after{
+                        content: '';
+                        display:block;
+                        width: 0;
+                        height: 0;
+                        border: 10px solid transparent;
+                        border-top-color: #fff;
+                        position: absolute;
+                        bottom: -20px;
+                        right: 20px;
+                    }
+                }
+            }
+            .stage-num{
+                position: absolute;
+                bottom: 350px;
+                right: 34px;
+            }
+            .stage-num-day{
+                bottom: 70px;
             }
+            
         }
         .list-box{
             margin-top: -50px;
@@ -887,11 +966,21 @@ export default {
                         color: #999;
                     }
                     .update-time{
+                        color: #D4D4D4;
+                        font-size: 24px;
+                        margin-top: 5px;
+                    }
+                    .audio-icon-box{
                         position: absolute;
                         top: 0;
                         right: 0;
-                        color: #D4D4D4;
-                        font-size: 20px;
+                        width: 44px;
+                        height: 40px;
+                        background-image: url('@/assets/hzyb/report/icon-1.png');
+                        background-size: cover;
+                    }
+                    .audio-icon-box_active{
+                        background-image: url('@/assets/hzyb/report/icon-2.png');
                     }
                 }
             }

+ 8 - 3
src/views/hzyb/report/components/AudioBox.vue

@@ -20,7 +20,7 @@ const audioIconPause=new URL('../../../../assets/hzyb/report/audio-pause.png', i
 
 
 const handleClickAudio=()=>{
-    if(store.state.hzyb.audioData.url==props.audioData.video_url){
+    if(store.state.hzyb.audioData.list[store.state.hzyb.audioData.index]?.url==props.audioData.video_url){
       if(store.state.hzyb.audioData.paused){
         store.state.hzyb.audioData.INS.play()
         store.commit('hzyb/showAudioPop')
@@ -28,7 +28,12 @@ const handleClickAudio=()=>{
         store.state.hzyb.audioData.INS.pause()
       }
     }else{
-        store.commit('hzyb/addAudio',props.audioData)
+        store.commit('hzyb/addAudio',{list:[{
+          url:props.audioData.video_url,
+          videoTime:props.audioData.video_play_seconds,
+          videoName:props.audioData.video_name,
+          videoImg:props.audioData.video_img
+        }]})
     }
 }
 
@@ -38,7 +43,7 @@ const handleClickAudio=()=>{
 <template>
   <div class="flex audio-wrap">
     <img style="opacity: 0.3" src="@/assets/hzyb/report/audio-pause.png" mode="aspectFill" v-if="!audioData.auth_ok" />
-    <img :src="$store.state.hzyb.audioData.url==audioData.video_url&&!$store.state.hzyb.audioData.paused?audioIconPlay:audioIconPause" @click="handleClickAudio" v-else />
+    <img :src="$store.state.hzyb.audioData.list[$store.state.hzyb.audioData.index]?.url==audioData.video_url&&!$store.state.hzyb.audioData.paused?audioIconPlay:audioIconPause" @click="handleClickAudio" v-else />
     <div style="flex:1;overflow:hidden">
       <div class="van-multi-ellipsis--l2">{{ audioData.video_name }}</div>
       <div style="color: #999999">{{ formatVoiceTime(audioData.video_play_seconds) }}</div>