|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<view class="workbench-page">
|
|
|
|
|
|
- <view class="section white-wrap" v-for="item in tabs" :key="item.label">
|
|
|
- <view class="tab-title">{{item.label}}</view>
|
|
|
- <view class="tab-ul">
|
|
|
- <view class="tab-item" @click="handleGoNext(tab.url)" v-for="tab in item.child" :key="tab.label">
|
|
|
- <image :src="tab.img" mode="aspectFill" class="icon"/>
|
|
|
- <view class="label">{{tab.label}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="section white-wrap" v-for="item in my_tabs" :key="item.label">
|
|
|
+ <view class="tab-title">{{item.label}}</view>
|
|
|
+ <view class="tab-ul">
|
|
|
+ <view class="tab-item" @click="handleGoNext(tab.url)" v-for="tab in item.child" :key="tab.label">
|
|
|
+ <image :src="tab.img" mode="aspectFill" class="icon"/>
|
|
|
+ <view class="label">{{tab.label}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -19,6 +19,7 @@
|
|
|
export default{
|
|
|
data() {
|
|
|
return {
|
|
|
+ my_tabs: [],
|
|
|
tabs: [
|
|
|
{
|
|
|
label: '审批',
|
|
@@ -38,11 +39,6 @@
|
|
|
url: '/pages-approve/seal/list',
|
|
|
img: require('@/static/icon-3.png')
|
|
|
},
|
|
|
- // {
|
|
|
- // label: '活动审批',
|
|
|
- // url: '/pages-approve/activity/list',
|
|
|
- // img: require('@/static/icon-4.png')
|
|
|
- // },
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -78,17 +74,25 @@
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ onLoad() {
|
|
|
+
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+
|
|
|
onShareAppMessage() {
|
|
|
return shareData
|
|
|
},
|
|
|
methods: {
|
|
|
handleGoNext(url) {
|
|
|
-
|
|
|
uni.navigateTo({
|
|
|
url
|
|
|
})
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+ const userInfo = this.$store.state.userInfo;
|
|
|
+ this.my_tabs = !['ficc_admin','admin'].includes(userInfo.RoleTypeCode) ? this.tabs.filter(_ => _.label !== '问答社区') : this.tabs;
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|