lifanagju_citu пре 11 месеци
родитељ
комит
d8550cce7b

+ 5 - 2
src/layout/company/navBar.vue

@@ -13,7 +13,7 @@
         </div>
         
         <div class="d-flex user-nav">
-          <div class="d-flex align-center cursor-pointer">
+          <div class="d-flex align-center cursor-pointer" @click="handleEnterpriseClick">
             <v-img rounded width="40" height="40" src="https://minio.citupro.com/dev/menduner/7.png" ></v-img>
             <span class="ml-3">广州辞图科技有限公司</span>
           </div>
@@ -95,7 +95,7 @@ const userStore = useUserStore()
 
 import { useRouter } from 'vue-router'
 const router = useRouter()
-const handleLogoClick = () => { router.push({ path: '/enterprise/home'}) }
+const handleLogoClick = () => { router.push({ path: '/enterprise'}) }
 
 // const changeRole = () => {
 //   router.push({ path: '/' })
@@ -104,6 +104,9 @@ const handleLogoClick = () => { router.push({ path: '/enterprise/home'}) }
 const handleToPersonalCenter = () => {
   // router.push({ path: '/personalCenter' })
 }
+const handleEnterpriseClick = () => {
+  router.push({ path: '/enterprise/enterpriseCenter' })
+}
 
 // 退出登录
 const handleLogout = async () => {

+ 6 - 1
src/layout/enterprise.vue

@@ -2,7 +2,7 @@
   <div class="parent d-flex flex-column">
     <Headers class="headers"></Headers>
     <div class="content d-flex">
-      <side class="content-sticky"></side>
+      <side class="content-sticky" v-if="whiteList.indexOf(router.currentRoute.value.path) === -1"></side>
       <div class="pa-3 content-box">
         <router-view></router-view>
       </div>
@@ -15,7 +15,12 @@
 import Headers from './company/navBar.vue'
 import Slider from './company/slider.vue'
 import side from './company/side.vue'
+import { useRouter } from 'vue-router'
 defineOptions({ name: 'enterprise-layout-index' })
+// 不展示侧边栏名单
+const whiteList = ['/enterprise/enterpriseCenter']
+const router = useRouter()
+console.log('router.currentRoute.value.path', router.currentRoute.value.path)
 </script>
 
 <style lang="scss" scoped>

+ 17 - 1
src/router/modules/enterprise.js

@@ -125,6 +125,22 @@ const enterprise = [
         component: () => import('@/views/enterprise/systemManagement/informationSettings.vue')
       }
     ]
-  }
+  },
+  {
+    path: '/enterprise/enterpriseCenter',
+    component: Layout,
+    name: 'enterpriseCenter',
+    show: true,
+    meta: {
+      title: '企业中心'
+    },
+    children: [
+      {
+        path: '/enterprise/enterpriseCenter',
+        show: true,
+        component: () => import('@/views/enterprise/enterpriseCenter/index.vue')
+      }
+    ]
+  },
 ]
 export default enterprise

+ 10 - 0
src/views/enterprise/enterpriseCenter/index.vue

@@ -0,0 +1,10 @@
+<!-- 企业中心 -->
+<template>
+  <div class="ma-10">企业中心</div>
+</template>
+
+<script setup>
+defineOptions({name: 'enterprise-enterpriseCenter'})
+</script>
+<style lang="scss" scoped>
+</style>