|
@@ -25,6 +25,7 @@ import AddChartToMyETA from '@/views/chartETA/components/AddChartToMyETA.vue'
|
|
|
import { setExtremumDate } from '@/hooks/chart/commonFun.js'
|
|
|
import {myETABtn,useAuthBtn} from '@/hooks/useAuthBtn'
|
|
|
import {usePublicSettingStore} from '@/store/modules/publicSetting'
|
|
|
+import { useNoAuth } from '@/hooks/useNoAuth'
|
|
|
const {checkAuthBtn} = useAuthBtn()
|
|
|
|
|
|
|
|
@@ -99,6 +100,9 @@ async function getChartInfo(){
|
|
|
chartInfoData=res.Data
|
|
|
|
|
|
chartInfo.value=res.Data.ChartInfo
|
|
|
+
|
|
|
+ if(!chartInfo.value.HaveOperaAuth) return
|
|
|
+
|
|
|
if([2,5].includes(res.Data.ChartInfo.Source)){
|
|
|
edbList.value=[res.Data.EdbInfoList[0]]
|
|
|
}else{
|
|
@@ -747,143 +751,152 @@ const isShowAddToMyETADialog=ref(false)
|
|
|
|
|
|
<template>
|
|
|
<div class="chart-detail-page" v-if="chartInfo">
|
|
|
- <div
|
|
|
- class="chart-title"
|
|
|
- :style="chartInfo.ChartThemeStyle?`
|
|
|
- text-align:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.align};
|
|
|
- font-size:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.fontSize}px;
|
|
|
- color:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.color}
|
|
|
- `:''"
|
|
|
- >
|
|
|
- {{chartInfo.ChartName}}
|
|
|
- </div>
|
|
|
- <!-- 一般曲线图选择时间区间或者季节图选择日期 -->
|
|
|
- <div
|
|
|
- class="select-time-box"
|
|
|
- v-if="(sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2"
|
|
|
- @click="openDateSelect"
|
|
|
- >
|
|
|
- <img class="left-icon" src="@/assets/imgs/icon_calendar.png" alt="">
|
|
|
- <span :class="['val-box',!chartState.startTime?'val-box_grey':'']">{{chartState.startTime||'开始日期'}} ~ {{chartState.startTime&&!chartState.endTime?'至今':chartState.endTime||'结束日期'}}</span>
|
|
|
- <van-icon class="right-icon" name="arrow" />
|
|
|
- </div>
|
|
|
+ <template v-if="chartInfo.HaveOperaAuth">
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="chart-title"
|
|
|
+ :style="chartInfo.ChartThemeStyle?`
|
|
|
+ text-align:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.align};
|
|
|
+ font-size:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.fontSize}px;
|
|
|
+ color:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.color}
|
|
|
+ `:''"
|
|
|
+ >
|
|
|
+ {{chartInfo.ChartName}}
|
|
|
+ </div>
|
|
|
+ <!-- 一般曲线图选择时间区间或者季节图选择日期 -->
|
|
|
+ <div
|
|
|
+ class="select-time-box"
|
|
|
+ v-if="(sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2"
|
|
|
+ @click="openDateSelect"
|
|
|
+ >
|
|
|
+ <img class="left-icon" src="@/assets/imgs/icon_calendar.png" alt="">
|
|
|
+ <span :class="['val-box',!chartState.startTime?'val-box_grey':'']">{{chartState.startTime||'开始日期'}} ~ {{chartState.startTime&&!chartState.endTime?'至今':chartState.endTime||'结束日期'}}</span>
|
|
|
+ <van-icon class="right-icon" name="arrow" />
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- pad端时间和操作按钮模块 -->
|
|
|
- <div class="pad-time-action-wrap">
|
|
|
- <div class="left-time-box" >
|
|
|
- <template v-if="sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
|
|
|
- <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
|
|
|
+ <!-- pad端时间和操作按钮模块 -->
|
|
|
+ <div class="pad-time-action-wrap">
|
|
|
+ <div class="left-time-box" >
|
|
|
+ <template v-if="sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
|
|
|
+ <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
|
|
|
+ <span
|
|
|
+ :class="['item',chartState.yearVal==item.value?'active':'']"
|
|
|
+ v-for="item in yearSelectOpt"
|
|
|
+ :key="item.value"
|
|
|
+ @click="handleYearChange(item)"
|
|
|
+ >{{item.name}}</span>
|
|
|
+ </template>
|
|
|
<span
|
|
|
- :class="['item',chartState.yearVal==item.value?'active':'']"
|
|
|
- v-for="item in yearSelectOpt"
|
|
|
- :key="item.value"
|
|
|
- @click="handleYearChange(item)"
|
|
|
- >{{item.name}}</span>
|
|
|
- </template>
|
|
|
- <span
|
|
|
- class="time-box"
|
|
|
- v-if="(sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2"
|
|
|
- @click="openDateSelect"
|
|
|
- >{{chartState.startTime?chartState.startTime+'~'+(chartState.endTime?chartState.endTime:'至今'):'请选择时间段'}}</span>
|
|
|
- </div>
|
|
|
- <div class="right-action-box">
|
|
|
- <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
|
|
|
- <img src="@/assets/imgs/myETA/icon_limit2.png" alt="">
|
|
|
- <span>上下限设置</span>
|
|
|
+ class="time-box"
|
|
|
+ v-if="(sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1)||chartInfo.ChartType===2"
|
|
|
+ @click="openDateSelect"
|
|
|
+ >{{chartState.startTime?chartState.startTime+'~'+(chartState.endTime?chartState.endTime:'至今'):'请选择时间段'}}</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="showMoreAction=true" v-if="isMoreActionShow||$route.query.from==='edbRelationChart'">
|
|
|
- <img src="@/assets/imgs/chartETA/more-icon.png" alt="">
|
|
|
- <span>更多设置</span>
|
|
|
+ <div class="right-action-box">
|
|
|
+ <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
|
|
|
+ <img src="@/assets/imgs/myETA/icon_limit2.png" alt="">
|
|
|
+ <span>上下限设置</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="showMoreAction=true" v-if="isMoreActionShow||$route.query.from==='edbRelationChart'">
|
|
|
+ <img src="@/assets/imgs/chartETA/more-icon.png" alt="">
|
|
|
+ <span>更多设置</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- 图渲染区域 -->
|
|
|
- <div class="chart-render-wrap">
|
|
|
- <!-- pad 切换上一张\下一张 -->
|
|
|
- <img class="pad-change-chart-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
|
|
|
- <img class="pad-change-chart-btn pad-change-chart-next-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
|
|
|
- <div class="chart-box" id="chart-box"></div>
|
|
|
-
|
|
|
- <!-- 底部来源,图表说明 -->
|
|
|
- <div class="chart-bottom-insruction-info"
|
|
|
- v-if="(chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow) || (chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow)">
|
|
|
-
|
|
|
- <div
|
|
|
- class="chart-source"
|
|
|
- v-if="chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow"
|
|
|
+ <!-- 图渲染区域 -->
|
|
|
+ <div class="chart-render-wrap">
|
|
|
+ <!-- pad 切换上一张\下一张 -->
|
|
|
+ <img class="pad-change-chart-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
|
|
|
+ <img class="pad-change-chart-btn pad-change-chart-next-btn" src="@/assets/imgs/icon_arrow2.png" alt="" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
|
|
|
+ <div class="chart-box" id="chart-box"></div>
|
|
|
+
|
|
|
+ <!-- 底部来源,图表说明 -->
|
|
|
+ <div class="chart-bottom-insruction-info"
|
|
|
+ v-if="(chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow) || (chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow)">
|
|
|
+
|
|
|
+ <div
|
|
|
+ class="chart-source"
|
|
|
+ v-if="chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow"
|
|
|
+ :style="`
|
|
|
+ color: ${ JSON.parse(chartInfo.SourcesFrom).color };
|
|
|
+ font-size: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
|
|
|
+ `"
|
|
|
+ >
|
|
|
+ 数据来源:{{JSON.parse(chartInfo.SourcesFrom).text}}
|
|
|
+ </div>
|
|
|
+ <!-- 图表说明 -->
|
|
|
+ <div
|
|
|
+ class="chart-instruction text_oneLine"
|
|
|
+ v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
|
|
|
+ v-text="JSON.parse(chartInfo.Instructions).text"
|
|
|
:style="`
|
|
|
- color: ${ JSON.parse(chartInfo.SourcesFrom).color };
|
|
|
- font-size: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
|
|
|
+ color: ${JSON.parse(chartInfo.Instructions).color};
|
|
|
+ font-size: ${ JSON.parse(chartInfo.Instructions).fontSize }px
|
|
|
`"
|
|
|
- >
|
|
|
- 数据来源:{{JSON.parse(chartInfo.SourcesFrom).text}}
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
- <!-- 图表说明 -->
|
|
|
- <div
|
|
|
- class="chart-instruction text_oneLine"
|
|
|
- v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
|
|
|
- v-text="JSON.parse(chartInfo.Instructions).text"
|
|
|
- :style="`
|
|
|
- color: ${JSON.parse(chartInfo.Instructions).color};
|
|
|
- font-size: ${ JSON.parse(chartInfo.Instructions).fontSize }px
|
|
|
- `"
|
|
|
- ></div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- 一般曲线图选择时间区间 -->
|
|
|
- <div class="select-year-box" v-if="sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
|
|
|
- <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
|
|
|
- <span
|
|
|
- :class="['item',chartState.yearVal==item.value?'active':'']"
|
|
|
- v-for="item in yearSelectOpt"
|
|
|
- :key="item.value"
|
|
|
- @click="handleYearChange(item)"
|
|
|
- >{{item.name}}</span>
|
|
|
- </div>
|
|
|
- <!-- 季节图切换公/农历 -->
|
|
|
- <div class="calendar-type-box" v-if="chartInfo.ChartType === 2">
|
|
|
- <span
|
|
|
- :class="chartState.calendarType=='公历'?'active':''"
|
|
|
- @click="handleSeasonTypeChange('公历')"
|
|
|
- >公历</span>
|
|
|
- <span
|
|
|
- :class="chartState.calendarType=='农历'?'active':''"
|
|
|
- @click="handleSeasonTypeChange('农历')"
|
|
|
- >农历</span>
|
|
|
- </div>
|
|
|
+ <!-- 一般曲线图选择时间区间 -->
|
|
|
+ <div class="select-year-box" v-if="sameOptionType.includes(chartInfo.ChartType)&& chartInfo.Source===1">
|
|
|
+ <span :class="['item',chartState.yearVal==''?'active':'']" @click="handleYearChange({value:''})">全部</span>
|
|
|
+ <span
|
|
|
+ :class="['item',chartState.yearVal==item.value?'active':'']"
|
|
|
+ v-for="item in yearSelectOpt"
|
|
|
+ :key="item.value"
|
|
|
+ @click="handleYearChange(item)"
|
|
|
+ >{{item.name}}</span>
|
|
|
+ </div>
|
|
|
+ <!-- 季节图切换公/农历 -->
|
|
|
+ <div class="calendar-type-box" v-if="chartInfo.ChartType === 2">
|
|
|
+ <span
|
|
|
+ :class="chartState.calendarType=='公历'?'active':''"
|
|
|
+ @click="handleSeasonTypeChange('公历')"
|
|
|
+ >公历</span>
|
|
|
+ <span
|
|
|
+ :class="chartState.calendarType=='农历'?'active':''"
|
|
|
+ @click="handleSeasonTypeChange('农历')"
|
|
|
+ >农历</span>
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- 指标模块 -->
|
|
|
- <div class="edb-list-box">
|
|
|
- <div class="list-box">
|
|
|
- <div class="list-item" v-for="item in edbList" :key="item.EdbInfoId" @click="handleShowEDBInfo(item)">
|
|
|
- <span class="date">{{item.LatestDate}}</span>
|
|
|
- <span class="edb-name van-ellipsis" :style="{color:item.ChartColor}">{{item.EdbName}}</span>
|
|
|
- <span class="value">{{item.LatestValue}}</span>
|
|
|
+ <!-- 指标模块 -->
|
|
|
+ <div class="edb-list-box">
|
|
|
+ <div class="list-box">
|
|
|
+ <div class="list-item" v-for="item in edbList" :key="item.EdbInfoId" @click="handleShowEDBInfo(item)">
|
|
|
+ <span class="date">{{item.LatestDate}}</span>
|
|
|
+ <span class="edb-name van-ellipsis" :style="{color:item.ChartColor}">{{item.EdbName}}</span>
|
|
|
+ <span class="value">{{item.LatestValue}}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- 底部悬浮操作模块 -->
|
|
|
- <div class="fix-bot-action-box">
|
|
|
- <div class="item" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
|
|
|
- <img class="icon" src="@/assets/imgs/icon_arrow.png" alt="">
|
|
|
- <div>上一张</div>
|
|
|
- </div>
|
|
|
- <div class="item" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
|
|
|
- <img class="icon" style="transform: rotate(180deg);" src="@/assets/imgs/icon_arrow.png" alt="">
|
|
|
- <div>下一张</div>
|
|
|
- </div>
|
|
|
- <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
|
|
|
- <img class="icon" src="@/assets/imgs/myETA/icon_limit.png" alt="">
|
|
|
- <div>上下限</div>
|
|
|
- </div>
|
|
|
- <div class="item" @click="showMoreAction=true" v-if="isMoreActionShow||$route.query.from==='edbRelationChart'">
|
|
|
- <img class="icon" src="@/assets/imgs/myETA/icon_menu.png" alt="">
|
|
|
- <div>更多</div>
|
|
|
+ <!-- 底部悬浮操作模块 -->
|
|
|
+ <div class="fix-bot-action-box">
|
|
|
+ <div class="item" @click="handleSwitchChart('prev')" v-if="allChartList.length>0">
|
|
|
+ <img class="icon" src="@/assets/imgs/icon_arrow.png" alt="">
|
|
|
+ <div>上一张</div>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handleSwitchChart('next')" v-if="allChartList.length>0">
|
|
|
+ <img class="icon" style="transform: rotate(180deg);" src="@/assets/imgs/icon_arrow.png" alt="">
|
|
|
+ <div>下一张</div>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
|
|
|
+ <img class="icon" src="@/assets/imgs/myETA/icon_limit.png" alt="">
|
|
|
+ <div>上下限</div>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="showMoreAction=true" v-if="isMoreActionShow||$route.query.from==='edbRelationChart'">
|
|
|
+ <img class="icon" src="@/assets/imgs/myETA/icon_menu.png" alt="">
|
|
|
+ <div>更多</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <div class="noAuth" v-if="chartInfo.HaveOperaAuth===false">
|
|
|
+ <img class="img" :src="useNoAuth().noAuthImg" alt="">
|
|
|
+ <div>{{useNoAuth().chart}}</div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<!-- 选择日期弹窗 -->
|
|
@@ -1583,5 +1596,12 @@ const isShowAddToMyETADialog=ref(false)
|
|
|
.chart-picture-box{
|
|
|
width: 500PX;
|
|
|
}
|
|
|
+
|
|
|
+}
|
|
|
+.noAuth {
|
|
|
+ text-align: center;
|
|
|
+ .img {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|