zhengnaiwen_citu 6 ماه پیش
والد
کامیت
5ee85a1307

+ 4 - 0
src/styles/orangeTheme.scss

@@ -4,6 +4,10 @@
   background-color: $theme-color !important;
   color: #FFF !important;
 }
+.el-menu--horizontal>.el-menu-item.is-active,
+.el-menu--horizontal>.el-submenu.is-active .el-submenu__title {
+  border-bottom: 2px solid $theme-color !important;
+}
 
 // tabs页
 .el-tabs__item:hover,

+ 18 - 0
src/views/humanResources/panorama/dynamic/panoramaDetailsBaseInfo.vue

@@ -0,0 +1,18 @@
+<template>
+  <div>
+    <el-empty description="暂无数据"></el-empty>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'panoramaDetailsBaseInfo',
+  methods: {
+    onInitPanorama () {}
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 25 - 6
src/views/humanResources/panorama/panoramaDetails.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="white pa-3 content">
     <el-menu :default-active="activeIndex" unique-opened class="el-menu-demo" mode="horizontal" @select="onSelect">
-      <template  v-for="_menu in menuList">
+      <template v-for="_menu in menuList">
         <PanoramaDetailsMenu :key="_menu.id" :item="_menu"></PanoramaDetailsMenu>
       </template>
     </el-menu>
@@ -31,6 +31,9 @@ import {
   findPath
 } from '@/utils/panorama'
 import qs from 'qs'
+const DEFAULT_COMPONENT = {
+  基础信息: 'humanResources/panorama/dynamic/panoramaDetailsBaseInfo'
+}
 export default {
   name: 'panorama-details',
   components: { PanoramaDetailsMenu },
@@ -38,13 +41,17 @@ export default {
     return {
       activeIndex: '',
       breadcrumbs: [],
-      componentsPath: null
+      componentsPath: null,
+      defaultItems: []
     }
   },
   computed: {
     ...mapGetters(['routes', 'organizationTree']),
     menuList () {
-      return this.filterRoute(JSON.parse(JSON.stringify(this.routes)))
+      return [
+        ...this.defaultItems,
+        ...this.filterRoute(JSON.parse(JSON.stringify(this.routes)))
+      ]
     },
     menuPath () {
       return findPath(this.menuList, this.activeIndex, [], {
@@ -60,7 +67,13 @@ export default {
     }
   },
   created () {
-    this.activeIndex = this.$route.query.path || 'humanResources/roster'
+    this.defaultItems = Object.keys(DEFAULT_COMPONENT).map(key => {
+      return {
+        label: key,
+        component: DEFAULT_COMPONENT[key]
+      }
+    })
+    this.activeIndex = this.$route.query.path || this.defaultItems[0].component
     this.getDept()
     this.runPanorama()
   },
@@ -116,7 +129,13 @@ export default {
     flex: 1;
   }
 }
-::v-deep .el-menu-demo>.el-submenu {
-  overflow: hidden;
+::v-deep .el-menu-demo {
+  &>.el-submenu {
+    overflow: hidden;
+  }
+  &>.is-active {
+    background-color: unset !important;
+    color: #303133 !important;
+  }
 }
 </style>