|
@@ -28,6 +28,8 @@ let routeQueryData=reactive({
|
|
chartClassifyId:route.query.chartClassifyId,
|
|
chartClassifyId:route.query.chartClassifyId,
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+let currentLang = ref('')
|
|
|
|
+
|
|
//获取图详情
|
|
//获取图详情
|
|
let chartInfoData=null
|
|
let chartInfoData=null
|
|
let chartInfo=ref(null)
|
|
let chartInfo=ref(null)
|
|
@@ -70,7 +72,7 @@ async function getChartDetail(e){
|
|
},
|
|
},
|
|
},
|
|
},
|
|
renderId:'chart-box',
|
|
renderId:'chart-box',
|
|
- lang:'zh',
|
|
|
|
|
|
+ lang:currentLang.value,
|
|
changeLangIsCheck:false,
|
|
changeLangIsCheck:false,
|
|
showChartTitle:false
|
|
showChartTitle:false
|
|
})
|
|
})
|
|
@@ -78,6 +80,7 @@ async function getChartDetail(e){
|
|
|
|
|
|
}
|
|
}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ currentLang.value = localStorage.getItem('chartETALange')==='EN'?'en':'zh'
|
|
getChartDetail('init')
|
|
getChartDetail('init')
|
|
})
|
|
})
|
|
|
|
|
|
@@ -202,7 +205,7 @@ function handleConfirmLimitChange(){
|
|
highChart.value = chartRender({
|
|
highChart.value = chartRender({
|
|
data:data,
|
|
data:data,
|
|
renderId:'chart-box',
|
|
renderId:'chart-box',
|
|
- lang:'zh',
|
|
|
|
|
|
+ lang:currentLang.value,
|
|
changeLangIsCheck:false,
|
|
changeLangIsCheck:false,
|
|
showChartTitle:false
|
|
showChartTitle:false
|
|
})
|
|
})
|
|
@@ -320,7 +323,7 @@ async function getShareLink(){
|
|
}
|
|
}
|
|
function checkChartEnOption(){
|
|
function checkChartEnOption(){
|
|
if(!chartInfo.value.ChartNameEn) return false
|
|
if(!chartInfo.value.ChartNameEn) return false
|
|
- for(const data of edbList){
|
|
|
|
|
|
+ for(const data of chartInfoData.EdbInfoList){
|
|
if(data.EdbNameEn==""||(data.UnitEn==""&&data.Unit!="")){
|
|
if(data.EdbNameEn==""||(data.UnitEn==""&&data.Unit!="")){
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
@@ -438,18 +441,27 @@ async function handleSwitchChart(type){
|
|
}else{
|
|
}else{
|
|
item=index===chartSortListData.value.length-1?chartSortListData.value[0]:chartSortListData.value[index+1]
|
|
item=index===chartSortListData.value.length-1?chartSortListData.value[0]:chartSortListData.value[index+1]
|
|
}
|
|
}
|
|
|
|
+ //切换前重置chartState
|
|
|
|
+ initChartState()
|
|
routeQueryData.id=item.ChartInfoId
|
|
routeQueryData.id=item.ChartInfoId
|
|
routeQueryData.chartType=item.ChartType
|
|
routeQueryData.chartType=item.ChartType
|
|
routeQueryData.chartClassifyId=item.ChartClassifyId
|
|
routeQueryData.chartClassifyId=item.ChartClassifyId
|
|
getChartDetail('init')
|
|
getChartDetail('init')
|
|
}
|
|
}
|
|
|
|
+function initChartState(){
|
|
|
|
+ chartState.showTimePop=false
|
|
|
|
+ chartState.startTime=''
|
|
|
|
+ chartState.endTime='',
|
|
|
|
+ chartState.yearVal='',
|
|
|
|
+ chartState.calendarType='公历'
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
<div class="chart-detail-page" v-if="chartInfo">
|
|
<div class="chart-detail-page" v-if="chartInfo">
|
|
- <div class="chart-title">{{chartInfo.ChartName}}</div>
|
|
|
|
|
|
+ <div class="chart-title">{{currentLang==='en'?(chartInfo.ChartNameEn||chartInfo.ChartName):chartInfo.ChartName}}</div>
|
|
|
|
|
|
<!-- 一般曲线图选择时间区间或者季节图选择日期 -->
|
|
<!-- 一般曲线图选择时间区间或者季节图选择日期 -->
|
|
<div
|
|
<div
|
|
@@ -911,6 +923,9 @@ async function handleSwitchChart(type){
|
|
display: flex;
|
|
display: flex;
|
|
gap:0 20px;
|
|
gap:0 20px;
|
|
border-bottom: 1px solid #DCDFE6;
|
|
border-bottom: 1px solid #DCDFE6;
|
|
|
|
+ &:last-child{
|
|
|
|
+ border-bottom: none;
|
|
|
|
+ }
|
|
.edb-name{
|
|
.edb-name{
|
|
flex: 1;
|
|
flex: 1;
|
|
/* text-align: center; */
|
|
/* text-align: center; */
|
|
@@ -1108,6 +1123,7 @@ async function handleSwitchChart(type){
|
|
border-top: 1px solid $border-color;
|
|
border-top: 1px solid $border-color;
|
|
width: 100vw;
|
|
width: 100vw;
|
|
padding: 0 30px;
|
|
padding: 0 30px;
|
|
|
|
+ margin-top: 20px;
|
|
.pad-limit-set-btn{
|
|
.pad-limit-set-btn{
|
|
display: block;
|
|
display: block;
|
|
text-align: right;
|
|
text-align: right;
|
|
@@ -1123,9 +1139,6 @@ async function handleSwitchChart(type){
|
|
border: 1px solid $border-color;
|
|
border: 1px solid $border-color;
|
|
.list-item{
|
|
.list-item{
|
|
padding: 18px;
|
|
padding: 18px;
|
|
- &:last-child{
|
|
|
|
- border-bottom: none;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|