Bladeren bron

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

laiguoran 3 jaren geleden
bovenliggende
commit
396c172caf
2 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. 6 2
      app/controller/report_archive_controller.js
  2. 0 1
      app/public/report/js/rpt_archive.js

+ 6 - 2
app/controller/report_archive_controller.js

@@ -213,6 +213,8 @@ module.exports = app => {
             const rptId = params.rptId;
             const ttlPgs = params.ttlPgs;
             const uuid = params.uuid;
+            const reportName = params.reportName;
+            const userId = ctx.session.sessionUser.accountId;
             const content = params.content;
             const orgArchiveList = await ctx.service.rptArchiveEncryption.getPrjStgArchiveEncryption(prjId, stgId);
             if (orgArchiveList.length > 0) {
@@ -225,6 +227,8 @@ module.exports = app => {
                             // 最后打脸了,还真的要考虑不同的uuid,不早说,TNND
                             item.encryption = content;
                             item.total_page = ttlPgs;
+                            item.user_id = userId;
+                            item.report_name = reportName;
                             hasArchive = true;
                             break;
                         }
@@ -232,7 +236,7 @@ module.exports = app => {
                 }
                 if (!hasArchive) {
                     // 表示有新的要加
-                    contentArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content });
+                    contentArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content, user_id: userId, report_name: reportName });
                 } else {
                     //
                 }
@@ -242,7 +246,7 @@ module.exports = app => {
             } else {
                 // 需要增加
                 const archiveArr = [];
-                archiveArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content });
+                archiveArr.push({ rpt_id: rptId, uuid, total_page: ttlPgs, encryption: content, user_id: userId, report_name: reportName });
                 const addedRst = await ctx.service.rptArchiveEncryption.createArchiveEncryption(prjId, stgId, archiveArr);
                 // console.log(addedRst);
                 ctx.body = { err: 0, msg: '', data: { addedRst: archiveArr } };

+ 0 - 1
app/public/report/js/rpt_archive.js

@@ -570,7 +570,6 @@ let rptArchiveObj = {
                             params.content = pageEncryptInfo;
                             params.uuid = result.uuid; //正确返回时,带着uuid回来
                             params.reportName = currentNode.name;
-                            params.reportAreas = [];
                             CommonAjax.postXsrfEx("/tender/report_api/addArchiveEncryption", params, 10000, true, getCookie('csrfToken_j'),
                                 function(rst){
                                     if (cb) {