新增权限判断按钮选项
This commit is contained in:
parent
966e878538
commit
35ed2e07a6
@ -133,7 +133,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
oaHomeData: oaHomeData,
|
||||
oaHomeData: [],
|
||||
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
||||
assessData: [{
|
||||
num: '0',
|
||||
@ -181,6 +181,7 @@
|
||||
this.getApproveList()
|
||||
this.initUserInfo()
|
||||
this.showToask()
|
||||
this.initOaHomeDada()
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
@ -199,6 +200,15 @@
|
||||
initUserInfo(){
|
||||
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar = '';
|
||||
},
|
||||
initOaHomeDada(){
|
||||
if(this.$store.state.app.userInfo.admin_id==0){// 如果用户不是管理员
|
||||
let arr = oaHomeData.filter(item=>!item.admin);//过滤掉管理员专属页面
|
||||
this.oaHomeData = arr;
|
||||
}else {
|
||||
let arr = oaHomeData.filter(item=>!item.personnel);//过滤掉普通用户专属页面
|
||||
this.oaHomeData = arr;
|
||||
}
|
||||
},
|
||||
async getApproveList() {
|
||||
const res = await noticeList({
|
||||
keyword: '',
|
||||
@ -422,20 +432,21 @@
|
||||
}
|
||||
|
||||
.fast_track {
|
||||
width: 694.74rpx;
|
||||
height: 361.4rpx;
|
||||
width: 694rpx;
|
||||
// height: 331rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
justify-content: left;
|
||||
align-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 28.07rpx 38.6rpx;
|
||||
padding: 15rpx 38.6rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
|
||||
.track_item {
|
||||
width: 154.39rpx;
|
||||
font-size: 24.56rpx;
|
||||
margin: 25rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
@ -195,12 +195,14 @@ export const oaHomeData = [
|
||||
{
|
||||
text: '公司信息',
|
||||
icon: prefix + 'oa/qjsq@2x.png',
|
||||
url: '/subpkg/companyInfo/companyInfo'
|
||||
url: '/subpkg/companyInfo/companyInfo',
|
||||
admin: true
|
||||
},
|
||||
{
|
||||
text: '人员管理',
|
||||
icon: prefix + 'oa/ccsq@2x.png',
|
||||
url: '/subpkg/personnel/personnel'
|
||||
url: '/subpkg/personnel/personnel',
|
||||
admin: true
|
||||
},
|
||||
{
|
||||
text: '固定资产',
|
||||
@ -214,17 +216,20 @@ export const oaHomeData = [
|
||||
{
|
||||
text: '公司管理',
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
url: '/subpkg/companyAdmin/companyAdmin'
|
||||
url: '/subpkg/companyAdmin/companyAdmin',
|
||||
admin: true
|
||||
},
|
||||
{
|
||||
text: '档案管理',
|
||||
icon: prefix + 'oa/bxsq@2x.png',
|
||||
url: '/subpkg/archives/archives'
|
||||
url: '/subpkg/archives/archives',
|
||||
personnel: true
|
||||
},
|
||||
// {
|
||||
// text: '片区经理',
|
||||
// icon: prefix + 'oa/yzsq@2x.png',
|
||||
// url: '/pages/oaManager/oaManager'
|
||||
// url: '/pages/oaManager/oaManager',
|
||||
// admin: true
|
||||
// },
|
||||
{
|
||||
text: '财务管理',
|
||||
|
Loading…
x
Reference in New Issue
Block a user