|
@@ -39,6 +39,9 @@ module.exports = app => {
|
|
|
t.completeStage = await this.ctx.service.stage.getLastestCompleteStage(t.id);
|
|
|
}
|
|
|
const categoryData = await this.ctx.service.category.getAllCategory(this.ctx.session.sessionProject.id);
|
|
|
+ // 获取用户新建标段权利
|
|
|
+ const accountInfo = await this.ctx.service.projectAccount.getDataById(this.ctx.session.sessionUser.accountId);
|
|
|
+ const userPermission = accountInfo !== undefined && accountInfo.permission !== '' ? JSON.parse(accountInfo.permission) : null;
|
|
|
const renderData = {
|
|
|
tenderList,
|
|
|
tenderConst,
|
|
@@ -48,7 +51,7 @@ module.exports = app => {
|
|
|
measureType: tenderConst.measureType,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.jsFiles),
|
|
|
auditConst,
|
|
|
- userPermission: this.ctx.session.sessionUser.permission !== '' ? JSON.parse(this.ctx.session.sessionUser.permission) : null,
|
|
|
+ userPermission,
|
|
|
};
|
|
|
await this.layout(view, renderData, modal);
|
|
|
} catch (err) {
|
|
@@ -101,7 +104,9 @@ module.exports = app => {
|
|
|
const responseData = {
|
|
|
err: 0, msg: '', data: null,
|
|
|
};
|
|
|
- const userPermission = ctx.session.sessionUser.permission !== '' ? JSON.parse(ctx.session.sessionUser.permission) : null;
|
|
|
+ // 获取用户新建标段权利
|
|
|
+ const accountInfo = await this.ctx.service.projectAccount.getDataById(this.ctx.session.sessionUser.accountId);
|
|
|
+ const userPermission = accountInfo !== undefined && accountInfo.permission !== '' ? JSON.parse(accountInfo.permission) : null;
|
|
|
if (userPermission === null || userPermission.tender === undefined || userPermission.tender.indexOf('1') === -1) {
|
|
|
throw '当前用户没有创建标段的权限';
|
|
|
}
|