|
@@ -2,13 +2,14 @@
|
|
|
import chartBox from './component/chartBox.vue'
|
|
|
import noAuth from './component/noAuth.vue'
|
|
|
import sharePoster from '../components/SharePoster.vue'
|
|
|
+import collectBox from './component/collectBox.vue'
|
|
|
import { Popup, Toast,Picker } from 'vant';
|
|
|
import {ref,onMounted, reactive, watch,computed} from 'vue'
|
|
|
import {useRoute, useRouter,onBeforeRouteUpdate} from 'vue-router'
|
|
|
import moment from 'moment'
|
|
|
import _ from 'lodash';
|
|
|
import Highcharts from 'highcharts/highstock';
|
|
|
-import {apiChartInfo,apiChartList,apiChartSave,apiChartBeforeAndNext,apiChartRefresh} from '@/api/hzyb/chart.js'
|
|
|
+import {apiChartInfo,apiChartList,apiChartSave,apiChartBeforeAndNext,apiChartRefresh,apiMyChartDetail} from '@/api/hzyb/chart.js'
|
|
|
const router=useRouter()
|
|
|
const route=useRoute()
|
|
|
document.title='图表详情'
|
|
@@ -213,17 +214,25 @@ let noAuthData=ref(null)
|
|
|
const getChartInfo=async (type)=>{
|
|
|
// resData.value=null
|
|
|
loading.value=true
|
|
|
- const res=await apiChartInfo({
|
|
|
- ChartInfoId:ChartInfoId,
|
|
|
- DateType:dateType.value,
|
|
|
- StartDate:startDate.value&&sameOptionType.value.includes(resData.value.ChartInfo.ChartType)?startDate.value:'',
|
|
|
- EndDate:endDate.value&&sameOptionType.value.includes(resData.value.ChartInfo.ChartType)?endDate.value:'',
|
|
|
- SeasonStartDate:startDate.value&&resData.value.ChartInfo.ChartType===2?startDate.value:'',
|
|
|
- SeasonEndDate:endDate.value&&resData.value.ChartInfo.ChartType===2?endDate.value:'',
|
|
|
- Calendar:calendarType.value,
|
|
|
- Authorization:route.query.token,
|
|
|
- MyChartClassifyId:Number(route.query.MyChartClassifyId)
|
|
|
- })
|
|
|
+ let res=null
|
|
|
+ // 如果是从我的图库中来的
|
|
|
+ if(route.query.source=='ybxcx_my_chart'){
|
|
|
+ res=await apiMyChartDetail({
|
|
|
+ ChartInfoId:ChartInfoId,
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ res=await apiChartInfo({
|
|
|
+ ChartInfoId:ChartInfoId,
|
|
|
+ DateType:dateType.value,
|
|
|
+ StartDate:startDate.value&&sameOptionType.value.includes(resData.value.ChartInfo.ChartType)?startDate.value:'',
|
|
|
+ EndDate:endDate.value&&sameOptionType.value.includes(resData.value.ChartInfo.ChartType)?endDate.value:'',
|
|
|
+ SeasonStartDate:startDate.value&&resData.value.ChartInfo.ChartType===2?startDate.value:'',
|
|
|
+ SeasonEndDate:endDate.value&&resData.value.ChartInfo.ChartType===2?endDate.value:'',
|
|
|
+ Calendar:calendarType.value,
|
|
|
+ Authorization:route.query.token,
|
|
|
+ MyChartClassifyId:Number(route.query.MyChartClassifyId)
|
|
|
+ })
|
|
|
+ }
|
|
|
loading.value=false
|
|
|
if(res.code===200){
|
|
|
resData.value=res.data
|
|
@@ -1502,7 +1511,7 @@ const posterParams=computed(()=>{
|
|
|
<template>
|
|
|
<div class="chart-detail" v-if="!loading&&!noauth">
|
|
|
<div class="chart-title">{{resData.ChartInfo.ChartName}}</div>
|
|
|
- <div class="top-box">
|
|
|
+ <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">
|
|
|
<img src="../../../assets/hzyb/chart/calendar.png" alt="">
|
|
|
<span class="date">{{startDate||'开始日期'}}</span>
|
|
@@ -1524,9 +1533,18 @@ const posterParams=computed(()=>{
|
|
|
<img class="icon" src="../../../assets/hzyb/chart/save.png" alt="" @click="handleSaveChart" v-if="canSave">
|
|
|
<img class="icon" src="../../../assets/hzyb/chart/refresh.png" alt="" @click="handleRefreshChart">
|
|
|
</div>
|
|
|
+
|
|
|
+ <collectBox
|
|
|
+ v-if="$route.query.source=='ybxcx_my_chart'"
|
|
|
+ :code="resData.ChartInfo.UniqueCode"
|
|
|
+ :myChartInfo="resData.MyChartInfo"
|
|
|
+ />
|
|
|
|
|
|
<chartBox :options='chartData' v-if="!loading"></chartBox>
|
|
|
-
|
|
|
+
|
|
|
+ <div class="source-box" style="margin-top:5px" v-if="$route.query.source=='ybxcx_my_chart'">来源:{{resData&&resData.ChartInfo.ChartSource}}</div>
|
|
|
+
|
|
|
+ <template v-if="$route.query.source!=='ybxcx_my_chart'">
|
|
|
<div class="flex source-box">
|
|
|
<div :style="{flex:resData&&resData.ChartInfo.ChartType===2?1:2}"><span v-if="resData&&resData.ChartInfo.ChartType!==2">来源:{{resData&&resData.ChartInfo.ChartSource}}</span></div>
|
|
|
<div class="season-change-box" style="flex:1" v-if="resData&&resData.ChartInfo.ChartType===2">
|
|
@@ -1574,10 +1592,11 @@ const posterParams=computed(()=>{
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+ </template>
|
|
|
|
|
|
<!-- 上一张下一张图切换 -->
|
|
|
<div
|
|
|
- v-if="$route.query.from!='share'"
|
|
|
+ v-if="$route.query.from!='share'&&$route.query.source!=='ybxcx_my_chart'"
|
|
|
class="change-page-wrap"
|
|
|
:style="{left:pageBoxPosition.left+'px',top:pageBoxPosition.top+'px'}"
|
|
|
@touchmove.stop="pageTouchmove"
|
|
@@ -1650,6 +1669,9 @@ const posterParams=computed(()=>{
|
|
|
<style lang="scss" scoped>
|
|
|
::v-deep(.highcharts-axis-title) {
|
|
|
font-size: 20px;
|
|
|
+ @media (min-width: 768px){
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
}
|
|
|
.chart-detail{
|
|
|
.flex{
|
|
@@ -1661,6 +1683,10 @@ const posterParams=computed(()=>{
|
|
|
font-weight: bold;
|
|
|
color: #1F243A;
|
|
|
letter-spacing: 2px;
|
|
|
+ @media (min-width: 768px){
|
|
|
+ padding: 0px 0 20px 0;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
}
|
|
|
.top-box{
|
|
|
padding: 20px 34px 40px 34px;
|
|
@@ -1737,6 +1763,10 @@ const posterParams=computed(()=>{
|
|
|
background-color: #E3B377;
|
|
|
}
|
|
|
}
|
|
|
+ @media (min-width: 768px){
|
|
|
+ padding: 0;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.date-type-box{
|
|
@@ -1853,7 +1883,5 @@ const posterParams=computed(()=>{
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
</style>
|