<template>
<view class="u-content iconfont">
<view class="leftFixa">
<view class="title" v-for="(item,idx) in menu" :key="idx" @click="switchMenu(item.module)">
<view :class="item.module==tab?'thisTab':''">
{{item.title}}
<view class="subTitle"> 申请审批 </view>
</view>
</view>
</view>
<!-- 审批 -->
<div class="tabList">
<view class="navtips">
<view class="utext">审批</view>
<!-- <u-line></u-line> -->
</view>
<view class="gridList thisTab">
<view v-for="(item,idx) in listData.item_sp" :key="idx" class="gridItem">
<span class="icon" :class="item.icon"></span>
<text class="text">{{item.title}}</text>
</view>
</view>
<view class="navtips" style="margin-top: 60rpx;">
<view class="utext">抄送</view>
<!-- <u-line></u-line> -->
</view>
<view class="gridList" style="margin-bottom: 200rpx;">
<view v-for="(item,idx) in listData.item_cx" :key="idx" class="gridItem">
<span class="icon" :class="item.icon"></span>
<text class="text">{{item.title}}</text>
</view>
</view>
</div>
</view>
</template>
<script>
import {
tools
} from "@/utils/tools.js"
import {
toPage
} from "@/utils/toPage.js"
import {
approveMenu
} from "@/utils/menu.js"
import common from "@/api/common"
export default {
data() {
return {
menu: approveMenu,
tab: 'renli',
listData: [],
}
},
methods: {
//切换类型
switchMenu(tab) {
this.getItem(tab)
},
//加载数据item
getItem(tab) {
for (var i = 0; i < approveMenu.length; i++) {
if (approveMenu[i]['module'] == tab) {
this.tab = tab
this.listData = approveMenu[i]
}
}
},
},
onShow() {
this.switchMenu('renli');
let data = {
a: '196636a',
b: '29yety88b',
}
let token = {
token: 999999
}
common.index.liet(data, token)
}
}
</script>
<style lang="scss" scoped>
.leftFixa {
width: 140rpx;
height: 100vh;
position: fixed;
left: 0;
top: 0;
box-shadow: 0px 1px 8px 0px #999;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
padding-top: 10rpx;
z-index: 2;
.title {
padding: 40rpx 0;
width: 100%;
border-bottom: 1px solid #ddd;
text-align: center;
}
.subTitle {
font-size: 24rpx;
margin-top: 10rpx;
}
}
.tabList {
padding: 30rpx 0 0 140rpx;
}
.gridList {
display: flex;
flex-wrap: wrap;
flex-direction: row;
margin-top: 20rpx;
.gridItem {
padding: 30rpx 0;
text-align: center;
width: 33%;
.icon {
font-size: 50rpx;
}
.text {
font-size: 26rpx;
}
}
}
.navtips {
.utext {
padding: 15rpx;
}
}
</style>