ggooalice 2 years ago
parent
commit
08e90e67a5
1 changed files with 12 additions and 2 deletions
  1. 12 2
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

+ 12 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

@@ -6,7 +6,7 @@
     <van-sticky offset-top="1.22667rem">
         <!-- 全部任务/我执行的/我创建的 -->
         <van-tabs v-model="active" @click="activeClick">
-            <van-tab title="全部任务" :name="0"></van-tab>
+            <van-tab title="全部任务" :name="0" v-if="viewAlltask"></van-tab>
             <van-tab title="我执行的" :name="1"></van-tab>
             <van-tab title="我创建的" :name="2"></van-tab>
         </van-tabs>
@@ -84,7 +84,9 @@
 export default {
     data() {
         return {
-            active: '0',
+            active: 1,
+            user: JSON.parse(localStorage.userInfo),
+            viewAlltask: false,
             select_state: '进行中',
             select_state_array: ['进行中','已完成'],
             select_state_show: false,
@@ -112,6 +114,14 @@ export default {
         }
     },
     mounted() {
+        for(let i in this.user.functionList){
+            if(this.user.functionList[i].name == '查看全部项目'){
+                this.viewAlltask = true
+            }
+            if(this.user.functionList[i].name == '管理全部项目'){
+                this.viewAlltask = true
+            }
+        }
         this.getList()
     },
     methods: {