'use strict'; /** * * * @author Mai * @date 2021/10/27 * @version */ const auditConst = require('../const/audit'); module.exports = app => { class BudgetController extends app.BaseController { /** * 概算投资 * * @param ctx * @returns {Promise} */ async index(ctx) { try { const renderData = { jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.file.index), auditConst, }; renderData.projectList = await ctx.service.subProject.getFileProject(ctx.session.sessionProject.id, ctx.session.sessionUser.accountId, ctx.session.sessionUser.is_admin); renderData.tenderList = await ctx.service.tender.getList4Select('stage'); renderData.categoryData = await this.ctx.service.category.getAllCategory(this.ctx.session.sessionProject.id); await this.layout('file/index.ejs', renderData, 'file/modal.ejs'); } catch (err) { ctx.log(err); } } } return BudgetController; };