scorpio 2 yıl önce
ebeveyn
işleme
f315e28608

+ 10 - 10
src/layout/left.vue

@@ -29,20 +29,20 @@
 
 <script>
 export default {
-  data() {
+  data () {
     return {
       active: 0,
       subActive: 0,
       data: [
         {
-          name: '项 目 库',
-          img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+          name: '年度投资管理',
+          img: new URL('../assets/svg/icon4.svg', import.meta.url).href,
           path: '/'
         },
         {
-          name: '年度投资管理',
-          img: new URL('../assets/svg/icon4.svg', import.meta.url).href,
-          path: '/invest'
+          name: '项 目 库',
+          img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+          path: '/home'
         },
         {
           name: '任务列表',
@@ -74,12 +74,12 @@ export default {
       currentPage: ''
     }
   },
-  created() {
+  created () {
     this.currentPage = window.location.href
     this.init()
   },
   methods: {
-    init() {
+    init () {
       if (this.currentPage.indexOf('/invest') > -1) {
         this.active = 1
       } else if (this.currentPage.indexOf('/task') > -1) {
@@ -92,7 +92,7 @@ export default {
         this.active = 0
       }
     },
-    navClick(item, index) {
+    navClick (item, index) {
       this.active = index
       if (item.children && item.children.length > 0) {
         this.subActive = 0
@@ -101,7 +101,7 @@ export default {
         this.$router.push(item.path)
       }
     },
-    subClick(item, index) {
+    subClick (item, index) {
       this.subActive = index
       this.$router.push(item.path)
     }

+ 9 - 9
src/views/home/index.vue

@@ -10,7 +10,7 @@
 
 <route>
 {
-path: '/',
+path: '/home',
 name: '项目库',
 }
 </route>
@@ -19,28 +19,28 @@ name: '项目库',
 import topSerach from './component/top_serach.vue'
 import ownerSerach from './component/owner_serach.vue'
 import dash from './component/dash.vue'
-import {useStore} from '@/store/user.js'
+import { useStore } from '@/store/user.js'
 
 import tokenStore from '../../store/token.js'
 
 export default {
-  components: {topSerach, dash, ownerSerach},
-  setup() {
+  components: { topSerach, dash, ownerSerach },
+  setup () {
     const store = useStore()
     const token = tokenStore()
-    return {store, token}
+    return { store, token }
   },
-  data() {
+  data () {
     return {
       type: 1
     }
   },
-  created() {
+  created () {
 
   },
   methods: {
-    push() {
-      this.$router.push({path: '/setting', query: {id: 12, type: 'test'}})
+    push () {
+      this.$router.push({ path: '/setting', query: { id: 12, type: 'test' } })
     }
   }
 }

+ 6 - 1
src/views/invest/components/left.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="flex flex-col flex-center">
       <span class="font-16 grey-6 bold">年度资金管理</span>
-      <base-button class="mt-20" title="全县投资情况" icon="" :type='active === -1 ? "1" :"2" ' @click='viewAll'/>
+      <base-button v-if='user.info.viewStage === 1' class="mt-20" title="全县投资情况" icon="" :type='active === -1 ? "1" :"2" ' @click='viewAll'/>
       <div class='full-width flex flex-center mt-20'>
         <el-tabs v-model="activeName" class="font-16" @tab-change="getOrg">
           <el-tab-pane label="住建局" name="1"/>
@@ -21,10 +21,15 @@
 
 <script>
 import baseButton from '@/components/base-button.vue'
+import { useStore } from '@/store/user.js'
 
 export default {
   name: 'left',
   components: { baseButton },
+  setup () {
+    const user = useStore()
+    return { user }
+  },
   data () {
     return {
       activeName: '1',

+ 1 - 0
src/views/invest/index.vue

@@ -37,6 +37,7 @@
 
 <route>
 {
+path: '/',
 name: '年度投资管理',
 }
 </route>