Explorar o código

决策大屏定制化功能

laiguoran %!s(int64=2) %!d(string=hai) anos
pai
achega
6520cba284

+ 1 - 0
app/controller/setting_controller.js

@@ -1103,6 +1103,7 @@ module.exports = app => {
                     categoryData,
                     tenders,
                     dcTenders,
+                    is_dz1: ctx.session.sessionProject.code === 'P0505' ? 5 : false,
                 }, 'setting/datacollect_modal.ejs');
             } catch (error) {
                 ctx.helper.log(error);

+ 2 - 2
app/public/css/main.css

@@ -1629,7 +1629,7 @@ overflow-y: auto;
 .height-20{
   height: 19%;
 }
-#review_box,#review_box2{
+.review_box{
   height: 100%;
   overflow: hidden;
 }
@@ -1642,7 +1642,7 @@ overflow-y: auto;
   height: -moz-calc(100% - 53px);
   height: calc(100% - 53px);
 }
-#comment1, #comment2, #comment3, #comment4{
+.list-comment{
   margin: 0;
   padding: 0;
 }

+ 35 - 3
app/public/js/datacollect_scroll.js

@@ -1,5 +1,6 @@
 window.onload = roll(50);
 window.onload = roll2(50);
+window.onload = roll3(50);
 function roll(t) {
     var ul1 = document.getElementById("comment1");
     var ul2 = document.getElementById("comment2");
@@ -62,6 +63,37 @@ function rollStart2() {
         ulbox2.scrollTop++;
     }
 }
+function roll3(t) {
+    var ul5 = document.getElementById("comment5");
+    var ul6 = document.getElementById("comment6");
+    var ulbox3 = document.getElementById("review_box3");
+    ul6.innerHTML = ul5.innerHTML;
+    ulbox3.scrollTop = 0; // 开始无滚动时设为0
+    // var timer = setInterval(rollStart, t); // 设置定时器,参数t用在这为间隔时间(单位毫秒),参数t越小,滚动速度越快
+    var timer3 = setInterval(rollStart3, '40');
+    ulbox3.onmouseover = function () {
+        clearInterval(timer3);
+    }
+    // 鼠标移出div后继续滚动
+    ulbox3.onmouseout = function () {
+        // timer = setInterval(rollStart, t);
+        timer3 = setInterval(rollStart3, '40');
+    }
+}
+function rollStart3() {
+    // 上面声明的DOM对象为局部对象需要再次声明
+    var ul5 = document.getElementById("comment5");
+    var ul6 = document.getElementById("comment6");
+    var ulbox3 = document.getElementById("review_box3");
+    // console.log(ulbox3.scrollTop);
+    // 正常滚动不断给scrollTop的值+1,当滚动高度大于列表内容高度时恢复为0
+    if (ulbox3.scrollTop >= ul5.scrollHeight) {
+        ulbox3.scrollTop = 0;
+    } else {
+        ulbox3.scrollTop++;
+    }
+}
+
 
 // tableScroll('tableId', '100%', 30, 10);
 var MyMarhq;
@@ -75,10 +107,10 @@ function tableScroll(tableid, hei, speed, len) {
         'overflow': 'hidden',
         'height': hei + 'px'
     })
-    $(".tableid_").find('th').each(function(i) {
+    $('#' + tableid).parent().find('.tableid_').find('th').each(function(i) {
         $(this).css('width', $('#' + tableid).find('th:eq(' + i + ')').innerWidth());
     });
-    $(".tableid_").css({
+    $('#' + tableid).parent().find('.tableid_').css({
         'position': 'absolute',
         'top': 0,
         'left': 0,
@@ -97,7 +129,7 @@ function tableScroll(tableid, hei, speed, len) {
         } else {
             $('#' + tableid).find('tbody').html($('#' + tableid).find('tbody').html() + $('#' + tableid).find('tbody').html() + $('#' + tableid).find('tbody').html() + $('#' + tableid).find('tbody').html());
         }
-        $(".tableid_").css('top', 0);
+        $('#' + tableid).parent().find('.tableid_').css('top', 0);
         $('#' + tableid).css('top', 0);
         var tblTop = 0;
         var outerHeight = $('#' + tableid).find('tbody').find("tr").outerHeight();

+ 311 - 15
app/view/datacollect/index.ejs

@@ -126,7 +126,7 @@
                             <!--饼图-->
                             <div class="left-chart">
                                 <div class="card height-100 bg-dark mt-2 ml-2 mr-2">
-                                    <div id="jechart" style="height: 100%; width: 100%;"></div>
+                                    <div id="jechart" class="jechart" style="height: 100%; width: 100%;"></div>
                                 </div>
                             </div>
                         </div>
@@ -166,7 +166,7 @@
                                                 <th>截止本期应付</th>
                                             </tr>
                                             </thead>
-                                            <tbody id="stage-data">
+                                            <tbody class="stage-data">
                                             </tbody>
                                         </table>
                                         <table id="tableId1"></table>
@@ -224,8 +224,8 @@
                             <div class="right-biaoduan">
                                 <div class="card height-100 bg-dark mt-2">
                                     <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
-                                    <div id="review_box" class="m-0 p-3 mb-2">
-                                        <ul class="list-unstyled" id="comment1">
+                                    <div id="review_box" class="review_box m-0 p-3 mb-2">
+                                        <ul class="list-unstyled list-comment" id="comment1">
                                             <% for (const notice of noticeList) { %>
                                                 <% if(notice.type === pushType.stage) { %>
                                                     <li class="media pb-3 mb-3 border-bottom-grey-1">
@@ -324,7 +324,7 @@
                                                 <% } %>
                                             <% } %>
                                         </ul>
-                                        <ul id="comment2"></ul>
+                                        <ul id="comment2" class="list-comment"></ul>
                                     </div>
                                 </div>
                             </div>
@@ -448,8 +448,8 @@
                                             <div class="left-bd-scroll height-100 mr-1">
                                                 <div class="card bg-dark height-100">
                                                     <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
-                                                    <div id="review_box2" class="m-0 p-3 mb-2 height-100">
-                                                        <ul class="list-unstyled" id="comment3">
+                                                    <div id="review_box2" class="review_box m-0 p-3 mb-2 height-100">
+                                                        <ul class="list-unstyled list-comment" id="comment3">
                                                             <% for (const notice of noticeList) { %>
                                                                 <% if(notice.type === pushType.stage) { %>
                                                                     <li class="media pb-3 mb-3 border-bottom-grey-1">
@@ -548,7 +548,7 @@
                                                                 <% } %>
                                                             <% } %>
                                                         </ul>
-                                                        <ul id="comment4"></ul>
+                                                        <ul id="comment4" class="list-comment"></ul>
                                                     </div>
                                                 </div>
                                             </div>
@@ -599,14 +599,245 @@
                     </div>
                 </div>
             </div>
+            <% if (ctx.helper._.includes(projectData.data_collect_pages, '5')) { %>
+            <div class="flex-content" data-content="5" <% if (ctx.session.sessionProject.dataCollect !== 5) { %>style="display: none"<% } %>>
+                <div class="row">
+                    <div class="col-3 pr-0">
+                        <div class="left-content">
+                            <div class="left-card-content">
+                                <div class="height-20 mb-2">
+                                    <div class="card text-center bg-dark text-white ml-2 mr-2 py-1 height-100">
+                                        <div class="card-body card-per-body">
+                                            <div class="row">
+                                                <div class="col-6">
+                                                    <h5 class="card-title card-case-title data_tender_num">0</h5>
+                                                    <p class="card-text card-case-text text-muted">工区个数</p>
+                                                </div>
+                                                <div class="col-6">
+                                                    <h5 class="card-title card-case-title data_tender_rate">0%</h5>
+                                                    <p class="card-text card-case-text text-muted">计量进度</p>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="height-20 mb-2">
+                                    <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
+                                        <div class="card-body card-per-body">
+                                            <h5 class="card-title card-case-title data_total_price">0.00</h5>
+                                            <p class="card-text card-case-text text-muted">台账金额</p>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="height-20 mb-2">
+                                    <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
+                                        <div class="card-body card-per-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="">
+                                            <h5 class="card-title card-case-title data_total_checked_change_price">0.00</h5>
+                                            <p class="card-text text-muted">已批复变更金额</p>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="height-20 mb-2">
+                                    <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
+                                        <div class="card-body card-per-body">
+                                            <h5 class="card-title card-case-title data_total_after_change_price">0.00</h5>
+                                            <p class="card-text text-muted">变更后金额</p>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="height-20 mb-2">
+                                    <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
+                                        <div class="card-body card-per-body">
+                                            <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
+                                            <p class="card-text text-muted">累计完成金额</p>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <!--饼图-->
+                            <div class="left-chart">
+                                <div class="card height-100 bg-dark mt-2 ml-2 mr-2">
+                                    <div id="jechart5" class="jechart" style="height: 100%; width: 100%;"></div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-9 pl-0">
+                        <div class="center-content">
+                            <div class="center-chart-content">
+                                <div class="height-100">
+                                    <div class="row pl-0 pr-0 center-di">
+                                        <div class="col-12">
+                                            <div class="card bg-dark height-100">
+                                                <div class="jlchart" style="height: 100%; width: 100%;"></div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="row pl-3 pr-0 center-chart">
+                                        <div class="col-8 pl-0 pr-0 height-100">
+                                            <div class="card height-100 bg-dark mt-2 mr-2">
+                                                <div class="di-content mb-2">
+                                                    <div class="jldbchart" id="jldbchart5" style="height: 100%; width: 100%;"></div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="col-4 pl-0 pr-0 height-100">
+                                            <div class="card height-100 bg-dark mt-2 mb-2">
+                                                <div class="jlwcdchart" id="jlwcdchart5" style="height: 100%; width: 100%;"></div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="row pl-3 pr-0 center-table">
+                                <div class="col-8 pl-0 pr-0 height-100">
+                                    <div class="mr-2 height-100">
+                                        <div class="card height-100 bg-dark mt-2">
+                                            <h6 class="bg-dark text-center text-white m-0 py-3">各工区明细数据</h6>
+                                            <div class="tablebox">
+                                                <table id="tableId2">
+                                                    <thead>
+                                                    <tr>
+                                                        <th>标段</th>
+                                                        <th>期数</th>
+                                                        <th>0号台账</th>
+                                                        <th>本期完成</th>
+                                                        <th>截止本期完成</th>
+                                                        <th>本期应付</th>
+                                                        <th>截止本期应付</th>
+                                                    </tr>
+                                                    </thead>
+                                                    <tbody class="stage-data">
+                                                    </tbody>
+                                                </table>
+                                                <table id="tableId3"></table>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="col-4 pl-0 pr-0 height-100">
+                                    <div class="card height-100 bg-dark mt-2 pr-3">
+                                        <h6 class="bg-dark text-center text-white m-0 py-3">各工区审批信息</h6>
+                                        <div id="review_box3" class="review_box m-0 p-3 mb-2">
+                                            <ul class="list-unstyled list-comment" id="comment5">
+                                                <% for (const notice of noticeList) { %>
+                                                    <% if(notice.type === pushType.stage) { %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-success">计量审批</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
+                                                                        <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
+                                                                        <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } else if(notice.type === pushType.material) { %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
+                                                                        <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
+                                                                        <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } else if(notice.type === pushType.ledger) { %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-info">台账审批</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } else if(notice.type === pushType.revise) { %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-info">台账修订</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
+                                                                        <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
+                                                                        <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } else if(notice.type === pushType.change){ %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
+                                                                        <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
+                                                                        <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } else if(notice.type === pushType.advance) { %>
+                                                        <li class="media pb-3 mb-3 border-bottom-grey-1">
+                                                            <div class="media-body">
+                                                                <div class="row">
+                                                                    <div class="col-2"><span class="badge badge-warning">预付款</span></div>
+                                                                    <div class="col-10 text-white">
+                                                                        <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
+                                                                        <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
+                                                                        <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
+                                                                    </div>
+                                                                </div>
+                                                                <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
+                                                                    <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
+                                                                </p>
+                                                            </div>
+                                                        </li>
+                                                    <% } %>
+                                                <% } %>
+                                            </ul>
+                                            <ul id="comment6" class="list-comment"></ul>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            <% } %>
+            </div>
         </div>
     </div>
 </div>
 <script src="/public/js/datacollect_scroll.js"></script>
 <script type="text/javascript">  autoFlashHeight();</script>
 <script type="text/javascript">
+    const is_dz = <%- ctx.helper._.includes(projectData.data_collect_pages, '5') %>;
     // 分类金额饼图表
-    var myChart1 = echarts.init(document.getElementById('jechart'), 'dark');
+    var chart1 = document.getElementsByClassName('jechart');
+    // var myChart1 = echarts.init(document.getElementById('jechart'), 'dark');
     option1 = {
         tooltip : {
             trigger: 'item',
@@ -653,7 +884,12 @@
             }
         ]
     };
-    myChart1.setOption(option1);
+    var myChart1_1 = echarts.init(chart1[0], 'dark');
+    myChart1_1.setOption(option1);
+    if (is_dz) {
+        var myChart1_2 = echarts.init(chart1[1], 'dark');
+        myChart1_2.setOption(option1);
+    }
     // 计量情况柱状图表
     // var myChart2 = echarts.init(document.getElementsByClassName('jlchart')[0], 'dark');
     option2 = {
@@ -813,6 +1049,12 @@
     myChart2_1.setOption(option2);
     myChart2_2.setOption(option2);
     myChart2_3.setOption(option2);
+    if (is_dz) {
+        var myChart2_4 = echarts.init(chart2[3], 'dark');
+        const option2_4 = _.cloneDeep(option2);
+        option2_4.title.text = '各工区计量情况';
+        myChart2_4.setOption(option2_4);
+    }
     // myChart2.setOption(option);
     // 计量完成度统计柱状图表
     // var myChart3 = echarts.init(document.getElementsByClassName('jlwcdchart')[0], 'dark');
@@ -901,6 +1143,12 @@
     var myChart3_2 = echarts.init(chart3[1], 'dark');
     myChart3_1.setOption(option3);
     myChart3_2.setOption(option3);
+    if (is_dz) {
+        var myChart3_3 = echarts.init(chart3[2], 'dark');
+        const option3_3 = _.cloneDeep(option3);
+        option3_3.title.text = '各工区计量完成百分比统计';
+        myChart3_3.setOption(option3_3);
+    }
     // 计量对比线形图表
     option4 = {
         title: {
@@ -1008,6 +1256,12 @@
     var myChart4_2 = echarts.init(chart4[1], 'dark');
     myChart4_1.setOption(option4);
     myChart4_2.setOption(option4);
+    if (is_dz) {
+        var myChart4_3 = echarts.init(chart4[2], 'dark');
+        const option4_3 = _.cloneDeep(option4);
+        option4_3.title.text = '全线计量对比';
+        myChart4_3.setOption(option4_3);
+    }
     // for (var i = 0; i < chart4.length; i++) {
     //     var myChart4 = echarts.init(chart4[i], 'dark');
     //     myChart4.setOption(option);
@@ -1102,7 +1356,7 @@
     myChart5.setOption(option5);
 
     function echartsReset() {
-        myChart1.resize();
+        myChart1_1.resize();
         myChart2_1.resize();
         myChart2_2.resize();
         myChart2_3.resize();
@@ -1111,6 +1365,12 @@
         myChart4_1.resize();
         myChart4_2.resize();
         myChart5.resize();
+        if (is_dz) {
+            myChart1_2.resize();
+            myChart2_4.resize();
+            myChart3_3.resize();
+            myChart4_3.resize();
+        }
     }
     $(function () {
         $('#showFull').click(function () {
@@ -1128,6 +1388,7 @@
             echartsReset();
             $(".tableid_").find('th').each(function(i) {
                 $(this).css('width', $('#tableId').find('th:eq(' + i + ')').innerWidth());
+                $(this).css('width', $('#tableId2').find('th:eq(' + i + ')').innerWidth());
             });
         }, 500);
     })
@@ -1462,9 +1723,14 @@
             $('.month_material_num').text(month_material_num);
 
             // 滚动数据
-            $('#stage-data').html(html);
+            $('.stage-data').eq(0).html(html);
             // if (originDataCollect === 1 || originDataCollect === 2) {
             tableScroll('tableId', '100%', 30, 7);
+            if (is_dz) {
+                $('.stage-data').eq(1).html(html);
+                tableScroll('tableId2', '100%', 30, 7);
+            }
+
             // }
             $('[data-toggle="tooltip"]').tooltip();
 
@@ -1485,6 +1751,11 @@
             myChart2_1.setOption(option2);
             myChart2_2.setOption(option2);
             myChart2_3.setOption(option2);
+            if (is_dz) {
+                const option2_4 = _.cloneDeep(option2);
+                option2_4.title[0].text = '各工区计量情况';
+                myChart2_4.setOption(option2_4);
+            }
 
             const option3 = myChart3_1.getOption();
             option3.dataZoom[0].start = 0;
@@ -1502,12 +1773,20 @@
             }
             myChart3_1.setOption(option3);
             myChart3_2.setOption(option3);
+            if (is_dz) {
+                const option3_3 = _.cloneDeep(option3);
+                option3_3.title[0].text = '各工区计量完成百分比统计';
+                myChart3_3.setOption(option3_3);
+            }
 
-            const option1 = myChart1.getOption();
+            const option1 = myChart1_1.getOption();
             option1.series[0].data = _.filter(chart_option1_data, function (item) {
                 return item.value !== 0;
             });
-            myChart1.setOption(option1);
+            myChart1_1.setOption(option1);
+            if (is_dz) {
+                myChart1_2.setOption(option1);
+            }
 
             const option4_data = {
                 yearmonth: [],
@@ -1544,8 +1823,16 @@
             }
             myChart4_1.setOption(option4);
             myChart4_2.setOption(option4);
+            if (is_dz) {
+                const option4_3 = _.cloneDeep(option4);
+                option4_3.title[0].text = '全线计量对比';
+                myChart4_3.setOption(option4_3);
+            }
 
             $('#tableId').css({'margin-top': 0});
+            if (is_dz) {
+                $('#tableId2').css({'margin-top': 0});
+            }
 
             // 地图设置
             // const polyLineList = [];
@@ -1567,6 +1854,7 @@
             if (num === 1 || num === 3) {
                 $('.flex-content[data-content="1"]').show();
                 $('.flex-content[data-content="2"]').hide();
+                $('.flex-content[data-content="5"]').hide();
                 if (originDataCollect !== 1 && originDataCollect !== 3) {
                     tableScroll('tableId', '100%', 30, 7);
                 }
@@ -1582,9 +1870,10 @@
                     $('.jlchart[data-chart-num="2"]').siblings().show();
                 }
                 // roll(50);
-            } else {
+            } else if (num === 2 || num === 4) {
                 $('.flex-content[data-content="2"]').show();
                 $('.flex-content[data-content="1"]').hide();
+                $('.flex-content[data-content="5"]').hide();
                 // roll2(50);
                 if (num === 4) {
                     $('.jldbchart[data-chart-num="2"]').hide();
@@ -1593,6 +1882,13 @@
                     $('.jldbchart[data-chart-num="2"]').show();
                     $('.jldbchart[data-chart-num="2"]').siblings().hide();
                 }
+            } else if (num === 5) {
+                $('.flex-content[data-content="5"]').show();
+                $('.flex-content[data-content="1"]').hide();
+                $('.flex-content[data-content="2"]').hide();
+                tableScroll('tableId2', '100%', 30, 7);
+                // $('.jlchart[data-chart-num="1"]').show();
+                // $('.jlchart[data-chart-num="2"]').siblings().show();
             }
             echartsReset();
         });

+ 15 - 0
app/view/setting/datacollect.ejs

@@ -16,6 +16,10 @@
                         <a class="nav-item nav-link<% if ((ctx.session.sessionProject.dataCollect === 0 && i === 1) || ctx.session.sessionProject.dataCollect === i) { %> active<% } %>" data-datacollect="<%- i %>" data-toggle="tab" href="#shujudaping-<%- i %>" role="tab">
                             决策大屏<%- ctx.helper.transFormToChinese(i) %><% if (ctx.helper._.indexOf(projectData.data_collect_pages, i.toString()) !== -1) { %>(已开启<% if (i === ctx.session.sessionProject.dataCollect) { %>、默认<% } %>)<% } %></a>
                     <% } %>
+                    <% if (is_dz1) { %>
+                        <a class="nav-item nav-link<% if (ctx.session.sessionProject.dataCollect === is_dz1) { %> active<% } %>" data-datacollect="<%- is_dz1 %>" data-toggle="tab" href="#shujudaping-<%- is_dz1 %>" role="tab">
+                            决策大屏<%- ctx.helper.transFormToChinese(is_dz1) %><% if (ctx.helper._.indexOf(projectData.data_collect_pages, is_dz1.toString()) !== -1) { %>(已开启<% if (ctx.session.sessionProject.dataCollect === is_dz1) { %>、默认<% } %>)<% } %></a>
+                    <% } %>
                     <div class="ml-auto">
                         <!--<div class="form-check form-check-inline">-->
                             <!--<input class="form-check-input" type="checkbox" id="show-datacollect" value="option1" <% if (ctx.session.sessionProject.dataCollect) { %>checked<% } %>>-->
@@ -39,6 +43,9 @@
                     <% for (let i = 1; i <= 2; i++) { %>
                         <div id="shujudaping-<%- i %>" class="tab-pane<% if ((ctx.session.sessionProject.dataCollect === 0 && i === 1) || ctx.session.sessionProject.dataCollect === i) { %> active<% } %>"><img src="/public/images/juecedaping0<%- i %>.png" width="100%"></div>
                     <% } %>
+                    <% if (is_dz1) { %>
+                        <div id="shujudaping-<%- is_dz1 %>" class="tab-pane<% if (ctx.session.sessionProject.dataCollect === is_dz1) { %> active<% } %>"><img src="/public/images/juecedaping0<%- is_dz1 %>.png" width="100%"></div>
+                    <% } %>
                 </div>
             </div>
         </div>
@@ -55,6 +62,7 @@
     const tenders = JSON.parse(unescape('<%- escape(JSON.stringify(tenders)) %>'));
     let dcTenders = JSON.parse(unescape('<%- escape(JSON.stringify(dcTenders)) %>'));
     let addDataCollect = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.session.sessionProject.page_show.addDataCollect)) %>'));
+    let is_dz1 = <% if (is_dz1) { %>parseInt('<%- is_dz1 %>');<% } else { %>false;<% } %>
     $(function () {
         autoFlashHeight();
         // 开启及关闭展示
@@ -117,6 +125,13 @@
                 }
                 $('#tablist a').eq(i-1).text('决策大屏' + transFormToChinese(i) + msg);
             }
+            if (is_dz1) {
+                let msg = '';
+                if (_.indexOf(dataCollectPages, is_dz1.toString()) !== -1) {
+                    msg = '(已开启' + (is_dz1=== dataCollect ? '、默认' : '') + ')' ;
+                }
+                $('#tablist a').eq(is_dz1-3).text('决策大屏' + transFormToChinese(is_dz1) + msg);
+            }
         }
         $('#tablist a').click(function () {
             const page = parseInt($(this).data('datacollect'));