|
@@ -42,6 +42,7 @@ module.exports = app => {
|
|
const ctx = this.ctx;
|
|
const ctx = this.ctx;
|
|
await this.ctx.service.s2bProj.refreshSessionS2b(pid);
|
|
await this.ctx.service.s2bProj.refreshSessionS2b(pid);
|
|
ctx.subMenu.s2b.display = !!ctx.session.sessionProject.gxby || !!ctx.session.sessionProject.dagl;
|
|
ctx.subMenu.s2b.display = !!ctx.session.sessionProject.gxby || !!ctx.session.sessionProject.dagl;
|
|
|
|
+ ctx.subMenu.datacollect.display = ctx.session.sessionProject.page_show.openDataCollect;
|
|
// this.ctx.subMenu.s2b.display = false;
|
|
// this.ctx.subMenu.s2b.display = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1095,6 +1096,9 @@ module.exports = app => {
|
|
|
|
|
|
async dataCollect(ctx) {
|
|
async dataCollect(ctx) {
|
|
try {
|
|
try {
|
|
|
|
+ if (!ctx.session.sessionProject.page_show.openDataCollect) {
|
|
|
|
+ throw '该功能已关闭或无法查看';
|
|
|
|
+ }
|
|
const projectId = ctx.session.sessionProject.id;
|
|
const projectId = ctx.session.sessionProject.id;
|
|
await this._checkMenu(projectId);
|
|
await this._checkMenu(projectId);
|
|
const projectData = await ctx.service.project.getDataById(projectId);
|
|
const projectData = await ctx.service.project.getDataById(projectId);
|
|
@@ -1131,6 +1135,7 @@ module.exports = app => {
|
|
}, 'setting/datacollect_modal.ejs');
|
|
}, 'setting/datacollect_modal.ejs');
|
|
} catch (error) {
|
|
} catch (error) {
|
|
ctx.helper.log(error);
|
|
ctx.helper.log(error);
|
|
|
|
+ ctx.session.postError = error.toString();
|
|
ctx.redirect('/dashboard');
|
|
ctx.redirect('/dashboard');
|
|
}
|
|
}
|
|
}
|
|
}
|