|
@@ -89,8 +89,16 @@ module.exports = app => {
|
|
|
* @return {Promise<void>}
|
|
|
*/
|
|
|
async listManage(ctx) {
|
|
|
- this.jsFiles = this.app.jsFiles.tender.manage;
|
|
|
- await this._list('tender/manage.ejs', tenderConst.manageTableCol, 'tender/manage_modal.ejs');
|
|
|
+ // 先判断权限
|
|
|
+ // 获取用户新建标段权利
|
|
|
+ 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) {
|
|
|
+ this.jsFiles = this.app.jsFiles.tender.manage;
|
|
|
+ await this._list('tender/manage.ejs', tenderConst.manageTableCol, 'tender/manage_modal.ejs');
|
|
|
+ } else {
|
|
|
+ this.ctx.redirect('/dashboard');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -409,7 +417,7 @@ module.exports = app => {
|
|
|
}
|
|
|
const data = JSON.parse(ctx.request.body.data);
|
|
|
if (!data.rule || !data.connector || !codeRuleConst.ruleField[data.rule]) {
|
|
|
- throw '参数错误';
|
|
|
+ throw '请选择组件再添加';
|
|
|
}
|
|
|
|
|
|
const updateData = {
|