余晋文 2 gadi atpakaļ
vecāks
revīzija
bc2921a084
2 mainītis faili ar 18 papildinājumiem un 9 dzēšanām
  1. 16 7
      src/layout/component/Header.vue
  2. 2 2
      src/router/index.js

+ 16 - 7
src/layout/component/Header.vue

@@ -2,6 +2,9 @@
 import { useStore } from "vuex";
 import { computed, ref, watch } from "vue";
 import moment from "moment";
+import { apiGetPermissionList } from "@/api/common.js";
+import { ElMessageBox, ElMessage } from "element-plus";
+import { apiLastApplyRecord ,apiApplyPermission} from "@/api/user";
 import { useRouter } from "vue-router";
 
 const router = useRouter();
@@ -24,7 +27,7 @@ const lastTime = computed(() => {
     return moment(maxTime).format("YYYY.MM.DD");
   }
 });
-import { apiGetPermissionList } from "@/api/common.js";
+
 let permissionList = ref([]);
 const getPermissionList = async () => {
   const res = await apiGetPermissionList();
@@ -51,8 +54,6 @@ let permission_list_str = computed(() => {
 });
 
 //我的中点击去申请权限
-import { ElMessageBox, ElMessage } from "element-plus";
-import { apiLastApplyRecord } from "@/api/user";
 const handleGoApplyPermission = async () => {
   const res = await apiLastApplyRecord();
   if (res.code === 200) {
@@ -99,7 +100,6 @@ const handleGoApplyPermission = async () => {
 };
 
 //我的中点击联系销售
-import { apiApplyPermission } from "@/api/user";
 const handleContact = async () => {
   const res = await apiApplyPermission({
     company_name: userInfo.value.company_name,
@@ -131,6 +131,12 @@ const goBack=()=>{
     router.push({path:'/'})
   }
 }
+
+// 点击面包屑
+const handleClickBreadCrumb=(item,index)=>{
+  const _index=index-(store.state.breadCrumbList.length-1)
+  router.go(_index)
+}
 </script>
 
 <template>
@@ -198,7 +204,7 @@ const goBack=()=>{
       <!-- 面包屑 -->
       <div class="flex-col-center left-breadcrumb-box">
         <img @click="goBack" class="back-icon" src="@/assets/icon-back.png" alt="" v-if="$route.meta.hasBack">
-        <span class="breadcrumb-item" v-for="item in $store.state.breadCrumbList" :key="item.path">{{item.name}}</span>
+        <span class="breadcrumb-item" v-for="(item,index) in $store.state.breadCrumbList" :key="item.path" @click="handleClickBreadCrumb(item,index)">{{item.name}}</span>
       </div>
       <!-- 图库模块搜索与筛选 -->
       <div id="chart-in-head"></div>
@@ -266,6 +272,9 @@ const goBack=()=>{
         &:last-child::after{
           content: '';
         }
+        &:last-child{
+          color: #F3A52F;
+        }
       }
     }
     #chart-in-head{
@@ -305,9 +314,9 @@ const goBack=()=>{
         width: 97px;
         height: 30px;
         border-radius: 8px;
-        border: 1px solid #dab37c;
+        border: 1px solid #F3A52F;
         font-size: 16px;
-        color: #dab37c;
+        color: #F3A52F;
         display: inline-block;
         text-align: center;
         line-height: 30px;

+ 2 - 2
src/router/index.js

@@ -46,7 +46,7 @@ const routes=[
       },
       {
         path: "reportdetail",
-        name: "ReportDetail",
+        name: "ActivityReportDetail",
         component: () => import("@/views/activity/ReportDetail.vue"),
         meta: {
           title: "报告详情",
@@ -55,7 +55,7 @@ const routes=[
       },
       {
         path: "chapterdetail",
-        name: "ChapterReportDetail",
+        name: "ActivityChapterReportDetail",
         component: () => import("@/views/activity/ChapterDetail.vue"),
         meta: {
           title: "报告详情",