|
@@ -81,6 +81,7 @@ async function getChartDetail(e){
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
currentLang.value = localStorage.getItem('chartETALange')==='EN'?'en':'zh'
|
|
|
+ initChartState(route.query)
|
|
|
getChartDetail('init')
|
|
|
})
|
|
|
|
|
@@ -454,18 +455,18 @@ async function handleSwitchChart(type){
|
|
|
item=index===chartSortListData.value.length-1?chartSortListData.value[0]:chartSortListData.value[index+1]
|
|
|
}
|
|
|
//切换前重置chartState
|
|
|
- initChartState()
|
|
|
+ initChartState(item)
|
|
|
routeQueryData.id=item.ChartInfoId
|
|
|
routeQueryData.chartType=item.ChartType
|
|
|
routeQueryData.chartClassifyId=item.ChartClassifyId
|
|
|
getChartDetail('init')
|
|
|
}
|
|
|
-function initChartState(){
|
|
|
+function initChartState(data){
|
|
|
chartState.showTimePop=false
|
|
|
- chartState.startTime=''
|
|
|
- chartState.endTime='',
|
|
|
- chartState.yearVal='',
|
|
|
- chartState.calendarType='公历'
|
|
|
+ chartState.startTime=sameOptionType.includes(Number(data.chartType))?data.StartDate:data.SeasonStartDate
|
|
|
+ chartState.endTime=sameOptionType.includes(Number(data.chartType))?data.EndDate:data.SeasonEndDate
|
|
|
+ chartState.yearVal=data.DateType
|
|
|
+ chartState.calendarType=data.Calendar
|
|
|
}
|
|
|
|
|
|
|