123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <template>
- <view class="workbench-page">
- <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>
- </template>
- <script>
- import {shareData} from '@/utils/config.js'
- export default{
- data() {
- return {
- my_tabs: [],
- tabs: [
- {
- label: '审批',
- child: [
- {
- label: '客户审批',
- url: '/pages-approve/custome/list',
- img: require('@/static/icon-1.png')
- },
- {
- label: '合同审批',
- url: '/pages-approve/contract/list',
- img: require('@/static/icon-2.png')
- },
- {
- label: '用印审批',
- url: '/pages-approve/seal/list',
- img: require('@/static/icon-3.png')
- },
- ]
- },
- {
- label: '路演管理',
- child: [
- {
- label: '销售员日历',
- url: '/pages-roadshow/sellerCalendar/index',
- img: require('@/static/icon-8.png')
- },
- {
- label: '研究员日历',
- url: '/pages-roadshow/researcherCalendar/index',
- img: require('@/static/icon-5.png')
- },
- {
- label: '我的日历',
- url: '/pages-roadshow/myCalendar/index',
- img: require('@/static/icon-6.png')
- }
- ]
- },
- {
- label: '问答社区',
- child: [
- {
- label: '问答管理',
- url: '/pages-question/detail/index?type=question',
- img: require('@/static/icon-question.png')
- },
- {
- label: '评论管理',
- url: '/pages-question/detail/index?type=comment',
- img: require('@/static/icon-comment.png')
- }
- ]
- },
- {
- label: '出差管理',
- child: [
- {
- label: '出差日历',
- url: '/pages-businessTrip/calendar/index',
- img: require('@/static/icon-businesstrip-calendar.png')
- },
- {
- label: '出差申请',
- url: '/pages-businessTrip/apply/list',
- img: require('@/static/icon-businesstrip-apply.png')
- },
- {
- label: '出差审批',
- url: '/pages-approve/businessTrip/list',
- img: require('@/static/icon-businesstrip-approve.png')
- },
- ]
- },
- {
- label: '视频',
- child: [
- {
- label: '评论管理',
- url: '/pages-video/comment/list',
- img: require('@/static/icon-comment-video.png')
- }
- ]
- }
- ]
- }
- },
- 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;
- if(!userInfo.IsBusinessTrip){//删除出差审批
- this.my_tabs=this.my_tabs.map(item=>{
- item.child=item.child.filter(_=>_.label!=='出差审批')
- return item
- })
- }
- // 权益不显示出差管理模块
- if(userInfo.IsRai){
- this.my_tabs=this.my_tabs.filter(_ => _.label !== '出差管理')
- }
- //不是销售不显示销售员日历
- //admin和沛总单独开
- const showArr = ['ficc_seller','ficc_group','seller','admin']
- if(!showArr.includes(userInfo.RoleTypeCode)&&userInfo.AdminId!==66){
- this.my_tabs = this.my_tabs.map(item=>{
- item.child=item.child.filter(_=>_.label!=='销售员日历')
- return item
- })
- }
- }
- },
- }
- </script>
- <style lang="scss">
- .workbench-page{
- padding: 20rpx;
- display: flex;
- flex-wrap: wrap;
- }
- .section{
- width: 100%;
- padding: 30rpx;
- box-shadow: 0px 3px 12px rgba(175, 175, 175, 0.16);
- font-size: 12px;
- font-weight: 400;
- color: #666;
- margin-bottom: 30rpx;
- .tab-title {
- font-size: 32rpx;
- font-weight: bold;
- color: #222;
- }
- .tab-ul {
- margin-top: 40rpx;
- display: flex;
- align-items: center;
- .tab-item {
- margin-right: 60rpx;
- text-align: center;
- .icon{
- width: 78rpx;
- height: 78rpx;
- margin: 0 auto 10rpx;
- }
- }
- }
- }
- </style>
|