新增权限判断按钮选项

This commit is contained in:
weipengfei 2023-07-31 11:52:59 +08:00
parent 966e878538
commit 35ed2e07a6
2 changed files with 26 additions and 10 deletions

View File

@ -133,7 +133,7 @@
}, },
data() { data() {
return { return {
oaHomeData: oaHomeData, oaHomeData: [],
src: 'https://cdn.uviewui.com/uview/album/1.jpg', src: 'https://cdn.uviewui.com/uview/album/1.jpg',
assessData: [{ assessData: [{
num: '0', num: '0',
@ -181,6 +181,7 @@
this.getApproveList() this.getApproveList()
this.initUserInfo() this.initUserInfo()
this.showToask() this.showToask()
this.initOaHomeDada()
}, },
computed: {}, computed: {},
methods: { methods: {
@ -199,6 +200,15 @@
initUserInfo(){ initUserInfo(){
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : this.myOaInfo.avatar = ''; 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() { async getApproveList() {
const res = await noticeList({ const res = await noticeList({
keyword: '', keyword: '',
@ -422,20 +432,21 @@
} }
.fast_track { .fast_track {
width: 694.74rpx; width: 694rpx;
height: 361.4rpx; // height: 331rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: left;
align-content: space-between; align-content: space-between;
margin: 0 auto; margin: 0 auto;
padding: 28.07rpx 38.6rpx; padding: 15rpx 38.6rpx;
background-color: #fff; background-color: #fff;
border-radius: 12px; border-radius: 12px;
.track_item { .track_item {
width: 154.39rpx; width: 154.39rpx;
font-size: 24.56rpx; font-size: 24.56rpx;
margin: 25rpx 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;

View File

@ -195,12 +195,14 @@ export const oaHomeData = [
{ {
text: '公司信息', text: '公司信息',
icon: prefix + 'oa/qjsq@2x.png', icon: prefix + 'oa/qjsq@2x.png',
url: '/subpkg/companyInfo/companyInfo' url: '/subpkg/companyInfo/companyInfo',
admin: true
}, },
{ {
text: '人员管理', text: '人员管理',
icon: prefix + 'oa/ccsq@2x.png', icon: prefix + 'oa/ccsq@2x.png',
url: '/subpkg/personnel/personnel' url: '/subpkg/personnel/personnel',
admin: true
}, },
{ {
text: '固定资产', text: '固定资产',
@ -214,17 +216,20 @@ export const oaHomeData = [
{ {
text: '公司管理', text: '公司管理',
icon: prefix + 'oa/bxsq@2x.png', icon: prefix + 'oa/bxsq@2x.png',
url: '/subpkg/companyAdmin/companyAdmin' url: '/subpkg/companyAdmin/companyAdmin',
admin: true
}, },
{ {
text: '档案管理', text: '档案管理',
icon: prefix + 'oa/bxsq@2x.png', icon: prefix + 'oa/bxsq@2x.png',
url: '/subpkg/archives/archives' url: '/subpkg/archives/archives',
personnel: true
}, },
// { // {
// text: '片区经理', // text: '片区经理',
// icon: prefix + 'oa/yzsq@2x.png', // icon: prefix + 'oa/yzsq@2x.png',
// url: '/pages/oaManager/oaManager' // url: '/pages/oaManager/oaManager',
// admin: true
// }, // },
{ {
text: '财务管理', text: '财务管理',