chenlei пре 3 месеци
родитељ
комит
32bd12cef3

+ 2 - 2
src/layout/components/HeaderWrap.vue

@@ -16,8 +16,8 @@ const breadcrumbArr=computed(()=>{
   let temarr=arr.map(item=>{
     return {title:item.meta.title}
   })
-  if(arr[1]&&arr[1].meta.from){
-    temarr.splice(1,0,{title:arr[1].meta.from,path:arr[1].meta.fromPath})
+  if(arr[1]&&arr[1].meta.pathName){
+    temarr.splice(1,0,{title:arr[1].meta.pathName,path:arr[1].meta.pathFrom})
   }
   if(arr[1]){
     if(['消息推送管理','客户反馈','图片资源库'].includes(arr[1].meta.title)){

+ 5 - 3
src/layout/components/LeftWrap.vue

@@ -1,9 +1,11 @@
 <script setup>
-import { useRouter } from 'vue-router'
+import { useRouter, useRoute } from 'vue-router'
 import { useLayoutState } from '../hooks/index'
 import {apiSystemCommon} from '@/api/system'
+import { color } from 'highcharts';
 
 const router = useRouter()
+const route = useRoute()
 
 const { menuClose } = useLayoutState()
 
@@ -86,7 +88,7 @@ function getMenuIcon(item) {
               style="font-size: 20px;"
             ></svg-icon>
           </template>
-          <span style="margin-left: 5px">{{ level1.children[0].name }}</span>
+          <span :style="`margin-left: 5px; color: ${route.meta.pathName === level1.children[0].name ? '#0052d9' : ''}`" >{{ level1.children[0].name }}</span>
         </t-menu-item>
         <t-submenu :value="level1.MenuId" v-if="level1.IsLevel === 2">
           <template #icon>
@@ -105,7 +107,7 @@ function getMenuIcon(item) {
             :key="child.path"
             @click="handleClickMenu(child.path)"
           >
-            <span style="margin-left: 5px">{{ child.name }}</span>
+            <span :style="`margin-left: 5px; color: ${route.meta.pathName === child.name ? '#0052d9' : ''}`">{{ child.name }}</span>
           </t-menu-item>
         </t-submenu>
       </template>

+ 2 - 2
src/router/modules/etaTrial.js

@@ -25,7 +25,7 @@ export default[
         hidden: false,
         meta: {
           pathFrom: "etaTrialList",
-          pathName: "ETA试用",
+          pathName: "ETA试用管理",
           title:'客户列表'
         },
       },
@@ -36,7 +36,7 @@ export default[
         hidden: false,
         meta: {
           pathFrom: "etaTrialList",
-          pathName: "ETA试用",
+          pathName: "ETA试用管理",
           title:'新增申请'
         },
       },

+ 12 - 6
src/router/modules/system.js

@@ -54,27 +54,33 @@ export default[
         },
       },
       {
-        path:'helpCenter/addDoc',
+        path:'addDoc',
         name:'SystemHelpCenterAddDoc',
         component:()=>import('@/views/system/helpCenter/AddDocment.vue'),
         meta:{
-          title:'添加文章'
+          title:'添加文章',
+          pathFrom: "helpCenter",
+          pathName: "帮助中心配置",
         },
       },
       {
-        path:'helpCenter/detail',
+        path:'detail',
         name:'SystemHelpCenterDetail',
         component:()=>import('@/views/system/helpCenter/DocmentDetail.vue'),
         meta:{
-          title:'查看文章'
+          title:'查看文章',
+          pathFrom: "helpCenter",
+          pathName: "帮助中心配置",
         },
       },
       {
-        path:'helpCenter/classify',
+        path:'classify',
         name:'SystemHelpCenterClassify',
         component:()=>import('@/views/system/helpCenter/classify/Index.vue'),
         meta:{
-          title:'分类管理'
+          title:'分类管理',
+          pathFrom: "helpCenter",
+          pathName: "帮助中心配置",
         },
       },
       {

+ 11 - 9
src/router/modules/training.js

@@ -17,6 +17,16 @@ export default[
           title:'视频管理'
         },
       },
+      {
+        path:'modifyVideo',
+        name:'ModifyVideo',
+        component:()=>import('@/views/training/modifyVideoPage.vue'),
+        meta:{
+          title:'编辑视频',
+          pathFrom: "trainingVideo",
+          pathName: "视频管理",
+        },
+      },
       {
         path:'trainingLabel',
         name:'TrainingLabel',
@@ -32,15 +42,7 @@ export default[
         meta:{
           title:'分类管理'
         },
-      },
-      {
-        path:'modifyVideo',
-        name:'ModifyVideo',
-        component:()=>import('@/views/training/modifyVideoPage.vue'),
-        meta:{
-          title:'编辑视频'
-        },
-      },
+      }
     ]
   }
 ]

+ 2 - 2
src/views/system/helpCenter/AddDocment.vue

@@ -165,7 +165,7 @@ async function handleSaveDocument(type, isAuto) {
     if(!route.query.DocId){
       //新增
       setTimeout(()=>{
-        router.replace("/system/helpCenter/addDoc?DocId="+res.Data.HelpDocId)
+        router.replace("/system/addDoc?DocId="+res.Data.HelpDocId)
         if(!autoSaveTimer){
           autoSaveTimer=setInterval(()=>{
             handleSaveDocument('保存',true)
@@ -186,7 +186,7 @@ function handlePreviewDoc(){
   }
   sessionStorage.setItem("documentDocContent",htmlContent)
   sessionStorage.setItem("Recommend",JSON.stringify(formData.RecommendData))
-  let { href } = router.resolve({ path: "/system/helpCenter/detail" });
+  let { href } = router.resolve({ path: "/system/detail" });
   window.open(href, "_blank");
 }
 

+ 4 - 4
src/views/system/helpCenter/Index.vue

@@ -89,8 +89,8 @@ async function handleDocPublishChange(row){
 <template>
   <div class="bg-white help-center-page">
     <div class="flex top-wrap">
-      <t-button theme="primary" @click="$router.push('/system/helpCenter/addDoc')">添加文章</t-button>
-      <t-button theme="primary" @click="$router.push('/system/helpCenter/classify')">分类管理</t-button>
+      <t-button theme="primary" @click="$router.push('/system/addDoc')">添加文章</t-button>
+      <t-button theme="primary" @click="$router.push('/system/classify')">分类管理</t-button>
       <t-cascader 
         v-model="classifyValue" 
         :options="classifyOpts"
@@ -128,13 +128,13 @@ async function handleDocPublishChange(row){
       @page-change="handlePageChange"
     >
       <template #Title="{row}">
-        <t-link theme="primary" @click="$router.push({path:'/system/helpCenter/detail',query:{DocId:row.Id}})">{{row.Title}}</t-link>
+        <t-link theme="primary" @click="$router.push({path:'/system/detail',query:{DocId:row.Id}})">{{row.Title}}</t-link>
       </template>
       <template #Status="{row}">
         <t-button variant="text" :theme="row.Status==2?'success':'danger'">{{row.Status==2?"已发布":"未发布"}}</t-button>
       </template>
       <template #opt="{ row }">
-        <t-button size="small" variant="text" theme="primary" @click="$router.push({path:'/system/helpCenter/addDoc',query:{DocId:row.Id}})" v-if="row.Status==1">编辑</t-button>
+        <t-button size="small" variant="text" theme="primary" @click="$router.push({path:'/system/addDoc',query:{DocId:row.Id}})" v-if="row.Status==1">编辑</t-button>
         <t-button size="small" variant="text" theme="primary" @click="handleDocPublishChange(row)" v-if="row.Status==1">发布</t-button>
         <t-button size="small" variant="text" theme="primary" @click="handleDocPublishChange(row)" v-if="row.Status==2">取消发布</t-button>
         <t-button size="small" variant="text" theme="danger" @click="handleDelDoc(row)">删除</t-button>