Bläddra i källkod

Merge branch 'master' into v1.6_myETA

jwyu 1 år sedan
förälder
incheckning
ac714d3b14

+ 10 - 2
src/hooks/chart/render.js

@@ -574,7 +574,8 @@ function setSeasonOpt(e){
                     styleEn:data.Unit && (!data.UnitEn)?{cursor:'pointer',color:"#999"}:{cursor:'pointer'}, // 英文样式
                     align: 'high',
                     rotation: 0,
-                    y: -15,
+                    y: -5,
+                    x:-(10 * data.Unit.length),
                     offset: -(10 * data.Unit.length),
                 },
                 max: Number(data.MaxData),
@@ -645,7 +646,8 @@ function setSeasonOpt(e){
                     styleEn:data.Unit && (!data.UnitEn)?{cursor:'pointer',color:"#999"}:{cursor:'pointer'}, // 英文样式
                     align: 'high',
                     rotation: 0,
-                    y: -15,
+                    y: -5,
+                    x:-(10 * data.Unit.length),
                     offset: -(10 * data.Unit.length),
                 },
                 max: Number(data.MaxData),
@@ -760,6 +762,12 @@ function setSeasonOpt(e){
         title: {
 		    enabled: true,
             text:e.ChartInfo.ChartName
+        },
+        legend:{
+            enabled:true,
+            verticalAlign: 'top',
+            y:-10,
+            x:(10 * data.Unit.length)/2
         }
     }
 }

+ 6 - 3
src/views/chartETA/ChartDetail.vue

@@ -455,10 +455,11 @@ async function handleSwitchChart(type){
         item=index===chartSortListData.value.length-1?chartSortListData.value[0]:chartSortListData.value[index+1]
     }
     //切换前重置chartState
-    initChartState(item)
+    
     routeQueryData.id=item.ChartInfoId
     routeQueryData.chartType=item.ChartType
     routeQueryData.chartClassifyId=item.ChartClassifyId
+    initChartState({...item,...routeQueryData})
     getChartDetail('init')
 }
 function initChartState(data){
@@ -502,7 +503,9 @@ function initChartState(data){
                     class="time-box" 
                     v-if="sameOptionType.includes(chartInfo.ChartType)||chartInfo.ChartType===2"
                     @click="chartState.showTimePop=true"
-                >{{chartState.startTime?chartState.startTime+'~'+chartState.endTime:'请选择时间段'}}</span>
+                >
+                    {{chartState.startTime?`${chartState.startTime} ~ ${chartState.endTime||'至今'}`:'请选择时间段'}}
+                </span>
             </div>
             <div class="right-action-box">
                 <div class="item" @click="showMoreAction=true" >
@@ -1149,7 +1152,7 @@ function initChartState(data){
                 margin-bottom: 14px;
             }
             .list-box{
-                border: 1px solid $border-color;
+                //border: 1px solid $border-color;
                 .list-item{
                     padding: 18px;
                 }

+ 3 - 2
src/views/chartETA/List.vue

@@ -354,7 +354,7 @@ getChartList()
                     <img src="@/assets/imgs/chartETA/list-icon.png" alt="">
                 </div>
             </div>
-            <p style="margin-right: 5px;font-weight: bold;word-break: break-all;">{{ catalogMenu }}</p>
+            <p style="font-weight: bold;word-break: break-all;margin-bottom: 5px;">{{ catalogMenu }}</p>
             <div class="select-box">
                 <span>共{{listState.total}}张图表</span>
                 <span> <van-checkbox v-model="listState.IsShowMe">只看我的</van-checkbox></span>
@@ -399,6 +399,7 @@ getChartList()
                     <CatalogTree 
                         :catalog-nodes="catalogNodes"
                         :showFileOpt="showFileOpt"
+                        :activeId="listState.cid"
                         @handleCatalogItemClick="catalogItemClick"
                     />
                 </div>
@@ -563,7 +564,7 @@ getChartList()
                 .time{
                     display: flex;
                     justify-content: space-between;
-                    font-size: 14px;
+                    font-size: 28px;
                     color: $font-grey_999;
                     .tool-icon{
                         width:30px;

+ 11 - 2
src/views/chartETA/components/CatalogItem.vue

@@ -15,6 +15,10 @@ const props = defineProps({
     },
     authOptArr:{
         type:Function,
+    },
+    activeId:{
+        type:Number,
+        default:0
     }
 })
 
@@ -26,7 +30,7 @@ function showPopup(){
 
 <template>
     <div class="catalog-item" :class="{'leaf-padding':!showFileImg}">
-        <span class="van-ellipsis" :class="{'leaf-padding':!showFileImg}">{{node.ChartClassifyName||''}}</span>
+        <span class="van-ellipsis" :class="{'leaf-padding':!showFileImg,'choosed':activeId===node.ChartClassifyId}">{{node.ChartClassifyName||''}}</span>
         <div @click.stop="showPopup" v-if="authOptArr(node,optArr).length">
             <div class="menu-icon">
                 <img class="icon" src="@/assets/imgs/ppt/ppt_icon_menu.png" alt="">
@@ -49,9 +53,14 @@ function showPopup(){
         text-align: left;
         box-sizing: border-box;
         padding: 0 15px;
-        font-size: 16px;
+        font-size: 30px;
         &.leaf-padding{
             padding:0 60px;
+            //color:#969799;
+            color: #323233;
+        }
+        &.choosed{
+            color:#969799;
         }
     }
     img{

+ 5 - 0
src/views/chartETA/components/CatalogTree.vue

@@ -7,6 +7,10 @@ const props = defineProps({
         type:Array,
         default:[]
     },
+    activeId:{
+        type:Number,
+        default:0
+    },
     showFileOpt:Function
 })
 const emits=defineEmits(['handleCatalogItemClick'])
@@ -47,6 +51,7 @@ function handleCatalogItemClick(item,type,node){
                     :node="item" 
                     :showFileImg="false" 
                     :optArr="optArrItem"
+                    :activeId="activeId"
                     :authOptArr="authOptArr"
                     @showPopup="showFileOpt"/>
             </div>