【修改】 标协会员菜单权限
This commit is contained in:
+102
-37
@@ -9,35 +9,7 @@ Page({
|
||||
*/
|
||||
data: {
|
||||
date: '',
|
||||
selectArr: [{
|
||||
path: '../../assets/images/laikuan-new.png',
|
||||
text: '项目'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/gongzuozu-new.png',
|
||||
text: '工作组'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/fenbiaowei-new.png',
|
||||
text: '分标委'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/huiyi-new.png',
|
||||
text: '会议活动'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/ziliao-new .png',
|
||||
text: '资料网员'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/standard.png',
|
||||
text: '标协会员'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/new-contract.png',
|
||||
text: '合同'
|
||||
},
|
||||
],
|
||||
selectArr: [],
|
||||
titleList: [
|
||||
'会议通知',
|
||||
'文件通知',
|
||||
@@ -140,21 +112,21 @@ Page({
|
||||
clickSelect(e) {
|
||||
let index = e.currentTarget.dataset.index
|
||||
let url = ''
|
||||
if (index === 0) { // 来款项目
|
||||
if (this.data.selectArr[index].val === '0') { // 来款项目
|
||||
url = '../project/project?type=project'
|
||||
} else if (index === 1) { // 工作组
|
||||
} else if (this.data.selectArr[index].val === '1') { // 工作组
|
||||
// url = '../work/work'
|
||||
url = '../project/project?type=work'
|
||||
} else if (index === 2) { // 分标委
|
||||
} else if (this.data.selectArr[index].val === '2') { // 分标委
|
||||
url = '../committee/committee'
|
||||
} else if (index === 3) { // 会议活动
|
||||
} else if (this.data.selectArr[index].val=== '3') { // 会议活动
|
||||
url = '../meeting/meeting'
|
||||
} else if(index === 4){ // 资料网员
|
||||
} else if(this.data.selectArr[index].val === '4'){ // 资料网员
|
||||
// url = '../data/data'
|
||||
url = '../project/project?type=ziliao'
|
||||
}else if(index === 5){
|
||||
}else if(this.data.selectArr[index].val === '6'){ // 标协会员
|
||||
url= '../standardRouter/standardRouter'
|
||||
}else if(index === 6){
|
||||
}else if(this.data.selectArr[index].val === '5'){ // 合同
|
||||
url = '../mineContract/mineContract'
|
||||
}
|
||||
wx.navigateTo({
|
||||
@@ -172,7 +144,7 @@ Page({
|
||||
this.loadData()
|
||||
wx.showToast({
|
||||
title: '已读成功',
|
||||
icon: 'none'
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -260,7 +232,75 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
const that = this
|
||||
let menuArrStand = [{
|
||||
path: '../../assets/images/laikuan-new.png',
|
||||
val:'0',
|
||||
text: '项目'
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/gongzuozu-new.png',
|
||||
text: '工作组',
|
||||
val:'1',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/fenbiaowei-new.png',
|
||||
text: '分标委',
|
||||
val:'2',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/huiyi-new.png',
|
||||
text: '会议活动',
|
||||
val:'3',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/ziliao-new .png',
|
||||
text: '资料网员',
|
||||
val:'4',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/standard.png',
|
||||
text: '标协会员',
|
||||
val:'6',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/new-contract.png',
|
||||
text: '合同',
|
||||
val:'5',
|
||||
},
|
||||
]
|
||||
|
||||
let menuArr = [{
|
||||
path: '../../assets/images/laikuan-new.png',
|
||||
text: '项目',
|
||||
val:'0',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/gongzuozu-new.png',
|
||||
text: '工作组',
|
||||
val:'1',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/fenbiaowei-new.png',
|
||||
text: '分标委',
|
||||
val:'2',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/huiyi-new.png',
|
||||
text: '会议活动',
|
||||
val:'3',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/ziliao-new .png',
|
||||
text: '资料网员',
|
||||
val:'4',
|
||||
},
|
||||
{
|
||||
path: '../../assets/images/new-contract.png',
|
||||
text: '合同',
|
||||
val:'5',
|
||||
},
|
||||
]
|
||||
let searchParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -273,6 +313,31 @@ Page({
|
||||
searchParams
|
||||
})
|
||||
this.loadData()
|
||||
// 默认不显示标协会员的菜单
|
||||
wx.getStorage({
|
||||
key:'userInfo',
|
||||
success(res){
|
||||
console.log(res);
|
||||
if(res.data.companyRole === '1' ){
|
||||
// 说明不是会员系统的企业
|
||||
that.setData({
|
||||
'selectArr':menuArr
|
||||
})
|
||||
}else{
|
||||
// 是会员的企业
|
||||
that.setData({
|
||||
'selectArr':menuArrStand
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
fail(){
|
||||
// this.data.selectArr = []
|
||||
that.setData({
|
||||
'selectArr':menuArr
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<text>{{item.text}}</text>
|
||||
</view>
|
||||
<view class="select-item"></view>
|
||||
<view class="select-item" wx:if="{{selectArr.length === 6}}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 消息列表筛选框 -->
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="item-content">负责人电话:{{item.phone || item.principalPhone}}</view>
|
||||
<view class="item-content">负责人邮箱:{{item.email || item.principalEmail}}</view>
|
||||
<view class="item-content">运行周期:一年</view>
|
||||
<view class="item-content">缴费凭证:{{item.paymentStatus_dictText}}</view>
|
||||
<view class="item-content">缴费凭证:{{item.paymentStatus_dictText || '无'}}</view>
|
||||
</block>
|
||||
<!-- 工作组项目展示end -->
|
||||
<!-- 应该是不要了 -->
|
||||
|
||||
@@ -5,38 +5,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
pageRputers: [
|
||||
{
|
||||
path: "../standardBasicInfo/standardBasicInfo",
|
||||
imgPath:'../../assets/images/basic-info.png',
|
||||
val: "1",
|
||||
name: "基本信息"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型
|
||||
imgPath:'../../assets/images/notice.png',
|
||||
val: "2",
|
||||
name: "标准宣贯"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2",
|
||||
imgPath:'../../assets/images/train.png',
|
||||
val: "3",
|
||||
name: "培训会"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3",
|
||||
imgPath:'../../assets/images/info.png',
|
||||
val: "4",
|
||||
name: "信息交流会"
|
||||
},
|
||||
{
|
||||
path: "../council/council?type=standard&meetingType=6",
|
||||
imgPath:'../../assets/images/lishi.png',
|
||||
val: "5",
|
||||
name: "理事会"
|
||||
},
|
||||
]
|
||||
pageRouters:[]
|
||||
},
|
||||
/**
|
||||
* @description 跳转
|
||||
@@ -68,7 +37,85 @@ Page({
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
const that = this
|
||||
// 理事会成员展示的
|
||||
let councilArr = [
|
||||
{
|
||||
path: "../standardBasicInfo/standardBasicInfo",
|
||||
imgPath:'../../assets/images/basic-info.png',
|
||||
val: "1",
|
||||
name: "基本信息"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型
|
||||
imgPath:'../../assets/images/notice.png',
|
||||
val: "2",
|
||||
name: "标准宣贯"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2",
|
||||
imgPath:'../../assets/images/train.png',
|
||||
val: "3",
|
||||
name: "培训会"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3",
|
||||
imgPath:'../../assets/images/info.png',
|
||||
val: "4",
|
||||
name: "信息交流会"
|
||||
},
|
||||
{
|
||||
path: "../council/council?type=standard&meetingType=6",
|
||||
imgPath:'../../assets/images/lishi.png',
|
||||
val: "5",
|
||||
name: "理事会"
|
||||
},
|
||||
]
|
||||
// 非理事会成员展示的
|
||||
let notCouncilArr = [
|
||||
{
|
||||
path: "../standardBasicInfo/standardBasicInfo",
|
||||
imgPath:'../../assets/images/basic-info.png',
|
||||
val: "1",
|
||||
name: "基本信息"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=1", // type 是会议类型
|
||||
imgPath:'../../assets/images/notice.png',
|
||||
val: "2",
|
||||
name: "标准宣贯"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=2",
|
||||
imgPath:'../../assets/images/train.png',
|
||||
val: "3",
|
||||
name: "培训会"
|
||||
},
|
||||
{
|
||||
path: "../meeting/meeting?type=standard&meetingType=2&tbMeetingType=3",
|
||||
imgPath:'../../assets/images/info.png',
|
||||
val: "4",
|
||||
name: "信息交流会"
|
||||
}
|
||||
]
|
||||
wx.getStorage({
|
||||
key:'userInfo',
|
||||
success(res){
|
||||
console.log(res);
|
||||
if(res.data.isCouncil === '1' ){
|
||||
// 说明是理事会成员
|
||||
that.setData({
|
||||
'pageRouters':councilArr
|
||||
})
|
||||
}else{
|
||||
// 说明不是理事会成员
|
||||
that.setData({
|
||||
'pageRouters':notCouncilArr
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
|
||||
|
||||
<view class="wrap">
|
||||
<view class="{{pageRputers.length !== 4 ? 'wrap-length4': 'wrap'}}">
|
||||
<view class="select-box">
|
||||
<view class="select">
|
||||
<view class="select-item" wx:for="{{pageRputers}}" wx:for-item="item" wx:key="path" bindtap="clickSelect"
|
||||
<view class="select-item" wx:for="{{pageRouters}}" wx:for-item="item" wx:key="path" bindtap="clickSelect"
|
||||
data-item="{{item}}" data-index="{{index}}">
|
||||
<view class="image-box">
|
||||
<view class="img-mask"></view>
|
||||
@@ -13,10 +13,10 @@
|
||||
</view>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<text class="select-item"></text>
|
||||
<text class="select-item"></text>
|
||||
<text class="select-item"></text>
|
||||
<text class="select-item"></text>
|
||||
<text class="select-item" wx:if="{{pageRouters.length !== 4}}"></text>
|
||||
<text class="select-item" wx:if="{{pageRouters.length !== 4}}"></text>
|
||||
<text class="select-item" wx:if="{{pageRouters.length !== 4}}"></text>
|
||||
<text class="select-item" wx:if="{{pageRouters.length !== 4}}"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -50,4 +50,11 @@ page {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
height: 150pt;
|
||||
}
|
||||
|
||||
.wrap-length4 {
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
height: 100pt;
|
||||
}
|
||||
Reference in New Issue
Block a user