|
@@ -40,7 +40,7 @@ module.exports = options => {
|
|
|
this.session.sessionProject.funSet = projectData.fun_set ? JSON.parse(projectData.fun_set) : null;
|
|
|
// 判断是否有权限查看决策大屏
|
|
|
let showDataCollect = 0;
|
|
|
- if (projectData.data_collect) {
|
|
|
+ if (projectData.data_collect && this.session.sessionProject.page_show.openDataCollect) {
|
|
|
if (sessionUser.is_admin) {
|
|
|
showDataCollect = 1;
|
|
|
} else {
|
|
@@ -83,20 +83,17 @@ module.exports = options => {
|
|
|
let showPayment = 0;
|
|
|
if (sessionUser.is_admin) {
|
|
|
this.session.sessionProject.showSubProj = true;
|
|
|
- this.session.sessionProject.showBudget = true;
|
|
|
- showPayment = 1;
|
|
|
+ this.session.sessionProject.showBudget = this.session.sessionProject.page_show.openBudget;
|
|
|
+ showPayment = this.session.sessionProject.page_show.openPayment ? 1 : 0;
|
|
|
} else {
|
|
|
this.session.sessionProject.showSubProj = false;
|
|
|
- this.session.sessionProject.showBudget = yield this.service.subProjPermission.showBudget(sessionUser.accountId);
|
|
|
- // const grounpInfo = yield this.service.paymentPermissionAudit.getGroupInfo(projectData.id, accountInfo.account_group);
|
|
|
- // if (grounpInfo) {
|
|
|
- // showPayment = 1;
|
|
|
- // } else {
|
|
|
- const auditInfo = yield this.service.paymentPermissionAudit.getDataByCondition({ pid: projectData.id, uid: accountInfo.id });
|
|
|
- if (auditInfo) {
|
|
|
- showPayment = 1;
|
|
|
+ this.session.sessionProject.showBudget = this.session.sessionProject.page_show.openBudget ? yield this.service.subProjPermission.showBudget(sessionUser.accountId) : false;
|
|
|
+ if (this.session.sessionProject.page_show.openPayment) {
|
|
|
+ const auditInfo = yield this.service.paymentPermissionAudit.getDataByCondition({ pid: projectData.id, uid: accountInfo.id });
|
|
|
+ if (auditInfo) {
|
|
|
+ showPayment = 1;
|
|
|
+ }
|
|
|
}
|
|
|
- // }
|
|
|
}
|
|
|
this.session.sessionProject.showPayment = showPayment;
|
|
|
|