12345678910111213141516171819202122232425262728293031323334353637 |
- '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<void>}
- */
- 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;
- };
|