|
@@ -295,7 +295,7 @@ module.exports = app => {
|
|
|
accountInfo,
|
|
|
userPermission,
|
|
|
};
|
|
|
- await this._list('tender/index.ejs', renderData, 'tender/modal.ejs');
|
|
|
+ await this._listCache('tender/index.ejs', renderData, 'tender/modal.ejs');
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -321,6 +321,39 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 标段管理(Get)
|
|
|
+ *
|
|
|
+ * @param ctx
|
|
|
+ * @return {Promise<void>}
|
|
|
+ */
|
|
|
+ async listManage(ctx) {
|
|
|
+ this.jsFiles = this.app.jsFiles.tender.manage;
|
|
|
+ // 先判断权限
|
|
|
+ // 获取用户新建标段权利
|
|
|
+ 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) {
|
|
|
+ const renderData = {
|
|
|
+ accountInfo,
|
|
|
+ userPermission,
|
|
|
+ };
|
|
|
+ await this._listCache('tender/manage.ejs', renderData, 'tender/manage_modal.ejs', 'manage');
|
|
|
+ } else {
|
|
|
+ this.ctx.redirect(ctx.request.header.referer);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ async listDefaultOrg(ctx) {
|
|
|
+ this.jsFiles = this.app.jsFiles.tender.list;
|
|
|
+ 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 = {
|
|
|
+ accountInfo,
|
|
|
+ userPermission,
|
|
|
+ };
|
|
|
+ await this._list('tender/index.ejs', renderData, 'tender/modal.ejs');
|
|
|
+ }
|
|
|
+ /**
|
|
|
* 标段概况(Get)
|
|
|
*
|
|
|
* @param {object} ctx - egg全局变量
|