|
@@ -51,29 +51,19 @@ module.exports = app => {
|
|
|
throw '该功能已关闭或无法查看';
|
|
|
}
|
|
|
// 获取标段审批信息
|
|
|
- const tenderidList = [];
|
|
|
+ const dcTenders = await ctx.service.datacollectTender.getList(ctx.session.sessionProject.id, ctx.subProject.id);
|
|
|
+ const noTids = ctx.app._.map(dcTenders, 'tid');
|
|
|
+ let tenderList = await ctx.service.tender.getList('', null, 1);
|
|
|
+ tenderList = ctx.app._.filter(tenderList, function(item) {
|
|
|
+ return ctx.app._.indexOf(noTids, item.id) === -1;
|
|
|
+ });
|
|
|
+ const tenderidList = ctx.helper._.map(tenderList, 'id');
|
|
|
const noticeList = await ctx.service.noticePush.getNoticeByDataCollect(ctx.session.sessionProject.id, tenderidList);
|
|
|
// 获取分类
|
|
|
const categoryData = await this.ctx.service.category.getListByCategoryLevel(ctx.subProject.id);
|
|
|
// 默认坐标,否则则取办事处坐标
|
|
|
const projectData = await ctx.service.project.getDataById(ctx.session.sessionProject.id);
|
|
|
ctx.subProject.data_collect_pages = ctx.subProject.data_collect_pages ? ctx.subProject.data_collect_pages.split(',') : [];
|
|
|
- // let map_json = {
|
|
|
- // province: mapConst.map[0].province,
|
|
|
- // lng: mapConst.map[0].lng,
|
|
|
- // lat: mapConst.map[0].lat,
|
|
|
- // level: 15,
|
|
|
- // };
|
|
|
- // if (projectData.map_json) {
|
|
|
- // map_json = JSON.parse(projectData.map_json);
|
|
|
- // } else {
|
|
|
- // const mapInfo = ctx.helper._.find(mapConst.map, { office: projectData.manager_office });
|
|
|
- // if (mapInfo) {
|
|
|
- // map_json.province = mapInfo.province;
|
|
|
- // map_json.lng = mapInfo.lng;
|
|
|
- // map_json.lat = mapInfo.lat;
|
|
|
- // }
|
|
|
- // }
|
|
|
if (ctx.params.index) {
|
|
|
ctx.subProject.dataCollect = parseInt(ctx.params.index);
|
|
|
}
|