jwyu před 1 rokem
rodič
revize
268f7b3d1d

+ 4 - 4
src/views/myETA/ChartDetail.vue

@@ -455,7 +455,7 @@ let showSaveChartOther=ref(false)
                     class="time-box" 
                     v-if="sameOptionType.includes(chartInfo.ChartType)||chartInfo.ChartType===2"
                     @click="chartState.showTimePop=true"
-                >请选择时间段</span>
+                >{{chartState.startTime?chartState.startTime+'~'+chartState.endTime:'请选择时间段'}}</span>
             </div>
             <div class="right-action-box">
                 <div class="item red" @click.stop="handleRemoveChart" v-if="$route.query.iscommon!='true'">
@@ -470,7 +470,7 @@ let showSaveChartOther=ref(false)
                     <img src="@/assets/imgs/myETA/icon_save2.png" alt="">
                     <span>另存为</span>
                 </div>
-                <div class="item red" @click.stop="handleDeleteChart">
+                <div class="item red" @click.stop="handleDeleteChart" v-if="chartInfo.IsEdit">
                     <img src="@/assets/imgs/icon_del.png" alt="">
                     <span>删除</span>
                 </div>
@@ -699,7 +699,7 @@ let showSaveChartOther=ref(false)
                 <img src="@/assets/imgs/myETA/icon_remove.png" alt="">
                 <span>移出</span>
             </div>
-            <div class="item" @click.stop="handleDeleteChart">
+            <div class="item" @click.stop="handleDeleteChart" v-if="chartInfo.IsEdit">
                 <img src="@/assets/imgs/myETA/icon_del.png" alt="">
                 <span>删除</span>
             </div>
@@ -1038,7 +1038,7 @@ let showSaveChartOther=ref(false)
             margin: 20px auto;
             border-radius: 4px;
             span{
-                width: 110px;
+                width: 111px;
                 height: 38px;
                 line-height: 38px;
             }

+ 3 - 1
src/views/myETA/SearchList.vue

@@ -50,13 +50,15 @@ function handleSearch(){
 }
 
 function goDetail(item){
-    router.push({
+
+    const routerEl=router.resolve({
         path:"/myETA/chartdetail",
         query:{
             code:item.UniqueCode,
             iscommon:true
         }
     })
+    window.open(routerEl.href,'_blank')
 }
 
 </script>

+ 2 - 2
src/views/myETA/components/EDBInfo.vue

@@ -58,11 +58,11 @@ const list=[
     },
     {
         name:"起始时间",
-        key:""
+        key:"StartDate"
     },
     {
         name:"最新日期",
-        key:"StartDate"
+        key:"LatestDate"
     },
     {
         name:"最新值",

+ 3 - 1
src/views/myETA/components/MobileClassifyWrap.vue

@@ -16,7 +16,8 @@ const {
     handleShowOpt,
     handleClassifyShare,
     handleCopyClassify,
-    handleClassifyDel
+    handleClassifyDel,
+    handleAddClassifyBeforeClose
 }=useClassify()
 
 getMyClassify()
@@ -101,6 +102,7 @@ function goChooseChart(){
         show-cancel-button
         confirmButtonText="确定"
         @confirm="handleConfirmEditClassify"
+        :before-close="handleAddClassifyBeforeClose"
     >
         <div class="rename-wrap">
             <input type="text" placeholder="请输入分类名称!" v-model="classifyState.classifyNameVal">

+ 13 - 3
src/views/myETA/components/PadClasssifyWrap.vue

@@ -21,7 +21,8 @@ const {
     handleShowOpt,
     handleClassifyShare,
     handleCopyClassify,
-    handleClassifyDel
+    handleClassifyDel,
+    handleAddClassifyBeforeClose
 }=useClassify()
 
 
@@ -58,7 +59,8 @@ const listState = reactive({
     page:1,
     pageSize:20,
     finished:false,
-    loading:false
+    loading:false,
+    total:0,
 })
 async function getList(){
     const res=await apiMyChartList({
@@ -76,6 +78,7 @@ async function getList(){
         listState.finished=res.Data.Paging.IsEnd
         const arr=res.Data.List||[]
         listState.list=[...listState.list,...arr]
+        listState.total=res.Data.Paging.Totals
     }
 }
 function onLoad(){
@@ -114,7 +117,7 @@ function handleRemoveChart(item,index){
 
 // 跳转详情
 function goDetail(item){
-    router.push({
+    const routerEl=router.resolve({
         path:"/myETA/chartdetail",
         query:{
             code:item.UniqueCode,
@@ -122,6 +125,7 @@ function goDetail(item){
             iscommon:classifyState.classifyTypeAct==1?false:true
         }
     })
+    window.open(routerEl.href,'_blank')
 }
 
 function goChooseChart(){
@@ -214,6 +218,7 @@ function goChooseChart(){
                 />
                 <div class="btn" @click="goChooseChart">选择图表</div>
                 <div class="btn" @click="handleAddClassify('')">添加分类</div>
+                <div class="list-total">共{{listState.total}}张图表</div>
             </div>
             <van-list
                 v-model:loading="listState.loading"
@@ -252,6 +257,7 @@ function goChooseChart(){
         show-cancel-button
         confirmButtonText="确定"
         @confirm="handleConfirmEditClassify"
+        :before-close="handleAddClassifyBeforeClose"
     >
         <div class="rename-wrap">
             <input type="text" placeholder="请输入分类名称!" v-model="classifyState.classifyNameVal">
@@ -363,6 +369,10 @@ function goChooseChart(){
                     border-radius: 3px;
                     margin-left: 20px;
                 }
+                .list-total{
+                    position: absolute;
+                    bottom: 10px;
+                }
             }
             .chart-list{
                 padding: 0 30px;

+ 11 - 1
src/views/myETA/hooks/useClassify.js

@@ -98,6 +98,7 @@ export function useClassify(){
         if(res.Ret===200){
             classifyState.activeClassifyVal.IsPublic=params.IsPublic
             getMyClassify()
+            showToast('设置成功')
         }
     }
 
@@ -135,6 +136,14 @@ export function useClassify(){
         }).catch(()=>{})
     }
 
+    const handleAddClassifyBeforeClose=(action)=>{
+        if(action==='confirm'&&classifyState.isAddClassifyName){
+            return false
+        }else{
+            return true
+        }
+    }
+
     return {
         classifyTypeOpt,
         classifyState,
@@ -146,6 +155,7 @@ export function useClassify(){
         handleShowOpt,
         handleClassifyShare,
         handleCopyClassify,
-        handleClassifyDel
+        handleClassifyDel,
+        handleAddClassifyBeforeClose
     }
 }