Bläddra i källkod

4库红黄灯

JiangPengLi 2 månader sedan
förälder
incheckning
6d69d1abb5

+ 5 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -1,6 +1,7 @@
 package com.rtrh.projects.modules.projects.po;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.rtrh.projects.modules.projects.enums.RedLightEnum;
 import com.rtrh.projects.modules.system.po.TableBaseColomn;
 import lombok.*;
 
@@ -180,4 +181,8 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     public BigDecimal getAmtTotal() {
         return amtTotal == null ? BigDecimal.ZERO : amtTotal;
     }
+
+    public String getStatusRedName() {
+        return RedLightEnum.getNameByCode(statusRed);
+    }
 }

+ 12 - 4
projects/src/main/java/com/rtrh/projects/web/controller/problemreport/ProblemInfoController.java

@@ -6,11 +6,14 @@ import cn.afterturn.easypoi.pdf.PdfExportUtil;
 import cn.afterturn.easypoi.pdf.entity.PdfExportParams;
 import cn.afterturn.easypoi.word.WordExportUtil;
 import cn.afterturn.easypoi.word.entity.MyXWPFDocument;
+import cn.hutool.core.collection.CollectionUtil;
 import com.rtrh.common.util.StringUtil;
 import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.service.SubInfoQueryService;
 import com.rtrh.projects.modules.projects.vo.SubInfoQueryTzVO;
 import com.rtrh.projects.modules.system.enums.SysTableKind;
+import com.rtrh.projects.modules.system.po.TSystable;
 import com.rtrh.projects.modules.system.service.JUnitService;
 import com.rtrh.projects.modules.system.service.TSysTableService;
 import com.rtrh.projects.web.controller.BaseController;
@@ -26,10 +29,8 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Controller
 @RequestMapping("/problem/info")
@@ -88,7 +89,14 @@ public class ProblemInfoController extends BaseController {
         model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));
         model.put("XMLX", tSysTableService.getByKind(SysTableKind.XMLX));
         model.put("JSXZ", tSysTableService.getByKind(SysTableKind.JSXZ));
+        List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
+        List<String> subjectIds = getSubjectIds();
+        if (CollectionUtil.isNotEmpty(subjectIds)){
+            byKind = byKind.stream().filter(item -> subjectIds.contains(item.getCode())).collect(Collectors.toList());
+        }
+        model.put("JSDD",byKind);   //项目属地
         model.put("status", status);
+        model.put("statusName", SubInfoStatusEnum.getDesc(status));
         model.put("subjectId", subjectId);
         model.put("indusKind", indusKind);
         model.put("scale", scale);

+ 60 - 156
projects/src/main/webapp/vmodules/problem/info/cbProblem.jsp

@@ -67,31 +67,24 @@
 <div id="app"></div>
 <template id="template">
     <div class="layui-layout layui-layout-admin pd0">
-
         <div class="right_title">
-
-            <div class="txt">前期手续办理超期 <div class="top-breadcrumb"></div></div>
+            <div class="txt">${statusName}库 <div class="top-breadcrumb"></div></div>
             <div class="layui-collapse search_form">
                 <div class="layui-colla-item">
                     <div class="layui-colla-content layui-show">
                         <form class="layui-form" lay-filter="searchForm">
-
-
-
                             <div class="layui-row">
-
                                 <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label">项目名称</label>
                                         <div class="layui-input-block">
                                             <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">
-                                            <input type="hidden" name="subjectId"    value="${subjectId}">
                                             <input type="hidden" name="mainId" value="${mainId }">
                                             <input type="hidden" name="sourceId" value="${sourceId }">
                                             <input type="hidden" name="hyfl" value="${hyfl }">
                                             <input type="hidden" name="code" value="${code}">
                                             <input type="hidden" name="status" value="${status}">
-                                            <input type="hidden" name="subjectId" value="${subjectId}">
+<%--                                            <input type="hidden" name="subjectId" value="${subjectId}">--%>
                                             <input type="hidden" name="indusKind" value="${indusKind}">
                                             <input type="hidden" name="scale" value="${scale}">
                                         </div>
@@ -99,42 +92,27 @@
                                 </div>
                                 <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
                                     <div class="layui-form-item" style="height:28px;">
-                                        <label class="layui-form-label">问题类型</label>
+                                        <label class="layui-form-label">红黄灯</label>
                                         <div class="layui-input-block">
-                                            <select id="lightType" name="lightType">
+                                            <select id="lightType" name="statusRed">
                                                 <option value="">所有</option>
-                                                <option value="1">未办理红灯</option>
-                                                <option value="2">未办理黄灯</option>
-                                                <option value="3">超期办理</option>
+                                                <option value="1">红灯</option>
+                                                <option value="2">黄灯</option>
+                                                <option value="3">白灯</option>
                                             </select>
                                         </div>
                                     </div>
                                 </div>
                                 <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
                                     <div class="layui-form-item" style="height:28px;">
-                                        <label class="layui-form-label">建设性质</label>
+                                        <label class="layui-form-label">项目属地</label>
                                         <div class="layui-input-block">
-                                            <div id="propKind" name="propKind"></div>
+                                            <div id="jsdd" name="jsddList"></div>
                                         </div>
                                     </div>
                                 </div>
-<%--                                <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">--%>
-<%--                                    <div class="layui-form-item" style="height:28px;">--%>
-<%--                                        <label class="layui-form-label">所属行业</label>--%>
-<%--                                        <div class="layui-input-block">--%>
-<%--                                            <div id="indusKind" name="hyfl"></div>--%>
-<%--                                        </div>--%>
-<%--                                    </div>--%>
-<%--                                </div>--%>
-                            </div>
-                            <div class="layui-row">
-
                                 <div class="layui-col-xs12 layui-col-sm12 layui-col-md3">
                                     <button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
-<%--                                    <span class="layui-btn layui-btn-normal" style="position:relative;z-index:9" @click="backHis()">--%>
-<%--                                        返回--%>
-<%--                                    </span>--%>
-                                    <!-- <button type="button" class="layui-btn layui-btn-export" @click="exportExcel">导出</button> -->
                                 </div>
                             </div>
                         </form>
@@ -148,7 +126,7 @@
             <div class="layui-row class_ls">
                 <div class="layui-form-item" style="display: flex">
                     <label class="juli">
-                        问题总数<span class="lanse-first">{{numData.total}}个</span>
+                        问题总数<span class="lanse-first">{{numData.totalNum}}个</span>
                         <div class="progress-div">
                             <div class="layui-progress">
                                 <div class="layui-progress-bar"></div>
@@ -172,7 +150,7 @@
                         </div>
                     </label>
                     <label class="juli">
-                        白灯数量<span class="lanse-first">{{numData.cqNum}}</span>
+                        白灯数量<span class="lanse-first">{{numData.whiteNum}}</span>
                         <div class="progress-div">
                             <div class="layui-progress">
                                 <div class="layui-progress-bar" :style="'width:'+numData.cqNumRate"></div>
@@ -265,31 +243,6 @@
         <%--<span title="项目信息" lay-event="toDetail">项目信息</span>--%>
         <span title="短信" lay-event="toMsgLog">短信</span>
         <span title="短信发送" lay-event="sendMsg">短信发送</span>
-        <%--    <c:if test="${isHydw}">--%>
-        <%--      <span title="问题督办" lay-event="problem">&nbsp;问题督办</span>--%>
-        <%--    </c:if>--%>
-        <%--    {{# if(d.unitId == "${currUnitId}") { }}--%>
-        <%--    <span title="原因录入" lay-event="setSubReason">&nbsp;原因录入</span>--%>
-        <%--    {{#}}}--%>
-
-        <%--    {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}--%>
-        <%--    <span title="信息修改" lay-event="toEditSubInfo">&nbsp;信息修改</span>--%>
-        <%--    {{#} }}--%>
-
-        <%--    {{# if("${currUser.edit}" == 'true') { }}--%>
-        <%--    {{# if(d.status != '0' && d.status != '6' && d.status != '7' && d.status != '8' && d.status != '9' && d.status != 'A') { }}--%>
-        <%--    <span title="退回暂存" lay-event="toTh">&nbsp;退回暂存</span>--%>
-        <%--    {{#}}}--%>
-        <%--    {{#} }}--%>
-        <%--    <span title="手续办理" lay-event="preNew">&nbsp;手续办理</span>--%>
-        <%--    <c:if test="${admin}">--%>
-        <%--      {{# if(d.isHide == "1") { }}--%>
-        <%--      <span title="取消在建库"  lay-event="isNoHide">&nbsp;取消在建库</span>--%>
-        <%--      {{#} else { }}--%>
-        <%--      <span title="移入在建库"  lay-event="isHide">&nbsp;移入在建库</span>--%>
-        <%--      {{#} }}--%>
-        <%--    </c:if>--%>
-
     </div>
 </script>
 
@@ -395,11 +348,6 @@
     <span style="color: red" >   <image   class="light-rgb"     src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
     {{#}}}
 </script>
-
-<%--<script type="text/html" id="num2">--%>
-<%--    &lt;%&ndash;	{{(d.num1 + d.num2)/2}}&ndash;%&gt;--%>
-<%--    {{d.num2}}--%>
-<%--</script>--%>
 <script type="text/html" id="num4">
     <div style="display: flex;justify-content: center">
         {{#if( (d.num3!=null && d.num3!= '') || d.num3 == 0 ) { }}
@@ -443,6 +391,7 @@
             pageNo : 1,
             indusKind : {},
             propKind : {},
+            jsddList : {},
             kind: {},
             numData:{
                 totalNum:0,
@@ -474,37 +423,15 @@
                     this.lightType="2";
                 }
 
-                var seleDatas = [], jsxz = [], xmlx = [];
-<%--                <c:forEach items="${HYFL }" var="hy">--%>
-<%--                seleDatas.push({value:'${hy.id}',name:'${hy.title}'});--%>
-<%--                </c:forEach>--%>
-<%--                this.indusKind = layui.xmSelect.render({--%>
-<%--                    el:'#indusKind',--%>
-<%--                    language:'zn',--%>
-<%--                    data: seleDatas--%>
-<%--                });--%>
-                <c:forEach items="${JSXZ}" var="js">
-                jsxz.push({value: '${js.code}', name:'${js.title}'});
+                var seleDatas = [], jsdd = [], xmlx = [];
+                <c:forEach items="${JSDD}" var="js">
+                jsdd.push({value: '${js.code}', name:'${js.title}'});
                 </c:forEach>
-                this.propKind = layui.xmSelect.render({
-                    el:'#propKind',
+                this.jsddList = layui.xmSelect.render({
+                    el:'#jsdd',
                     language:'zn',
-                    data: jsxz
+                    data: jsdd
                 });
-<%--                <c:forEach items="${XMLX}" var="xm">--%>
-<%--                xmlx.push({value: '${xm.code}', name: '${xm.title}'});--%>
-<%--                </c:forEach>--%>
-<%--                this.kind = layui.xmSelect.render({--%>
-<%--                    el: "#kind",--%>
-<%--                    language:'zn',--%>
-<%--                    data:xmlx--%>
-<%--                });--%>
-
-
-                console.log("${subjectId}");
-                console.log("${mainId}");
-                console.log("${sourceId}");
-                console.log("${hyfl}");
                 this.getData();
                 window.addEventListener('message', this.receiveMessage, false);
                 window.parent.postMessage('init loaded')
@@ -519,16 +446,7 @@
                     type: 2,
                     area: ["600px", "400px"],
                     content: App.getUrl("/msgLog/sendMsg?layer=true&content=" + content + "&subId=" + obj.data.subId + "&kind=手续超期&item=" + obj.data.preName),
-                    /*              btn: ["发送", "取消"],*/
                     yes: function () {
-                        /*              App.msg.confirm("确认发送逾期短信到该项目负责人?", function () {
-                                          App.postJson("/api/msgLog/sendDueMsg", {
-                                              subId: obj.data.subId,
-                                              kind: "手续超期"
-                                          }, function (res) {
-                                              App.msg.success("发送成功");
-                                          })
-                                      })*/
                         top.layer.closeAll();
                     }, close: function (index) {
                         top.layer.close(index);
@@ -584,8 +502,7 @@
             getSearchParams: function() {
                 var param = layui.form.getValue("searchForm");
 
-                console.log("param");
-                console.log(param);
+                console.log("param:", param);
                 if(param.rangeDate) {
                     param.beginDate = param.rangeDate.split(" ~ ")[0];
                     param.endDate = param.rangeDate.split(" ~ ")[1];
@@ -595,34 +512,30 @@
                     param.light = this.light.getValue("valueStr");
                 }
                 delete(param.select);
-                param.propKind = this.propKind.getValue("value").sort().join(",");
+                // param.propKind = this.propKind.getValue("value").sort().join(",");
+                param.subjectId = this.jsddList.getValue("value").sort().join(",");
                 return param;
             },
             getData : function(){
                 var self = this;
                 var param = this.getSearchParams();
 
-                console.log(param);
-
                 param.pageNo = this.pageNo;
                 param.pageSize = this.pageSize;
                 param.orderBy = this.sort.field;
                 param.orderType = this.sort.type || null;
 
-
                 if (self.lightType=="1"){
                     param.openDate=true;
                 }else{
                     param.offsetMax=-10;
                 }
 
-
-
-                App.postJson("/api/subInfo/query/queryPage",param, function(res){
-                    console.log(res.data)
+                App.postJson("/api/subInfo/query/problemLightStatistics",param, function(res){
                     self.numData = res.data;
                 });
 
+                param.statusRedList = ["1","2","3"]
                 App.postJson("/api/subInfo/query/queryPage",param, function(res){
                     self.dataList = res.rows;
                     self.loadPage(res.total);
@@ -663,20 +576,44 @@
                     even: true,
                     autoSort: false,
                     initSort: self.sort,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', fixed: 'left', align: 'center',title:'序号'},
-                        // {field: 'abc', title: 'ABC',fixed: 'left', width: 70, templet: "#abcSpan"},
-                        {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 300, templet: '#subName'},
-                        {field: 'preName', title: '手续名称', minWidth: 150},
-                        {field: 'unitDesc', title: '批复单位名称', minWidth: 150},
-                        {field: 'nameLead', title: '办理人(批复单位)', width: 80},
-                        {field: 'tel', title: '电话(批复单位)', width: 100},
-                        {field: 'datePlan', title: '开办日期', minWidth: 80},
-                        {field: 'num1', title: '计划办理天数', width: 100, templet: '#dayNum'},
-                        {field: 'num3', title: '实际办理天数', width: 100, templet: '#num3'},
-                        {field: 'num4', title: '节约天数', width: 100, templet: '#num4'},
-                        {title: '操作', width: 150, align:'center', toolbar: '#toolBar',fixed:'right'},
+                    cols: [[
+                        {type: 'numbers', align: 'center', width: 44, title: '序号',fixed: 'left'},
+                        {field: 'subName', title: '项目名称', minWidth: 200, templet: '#subName',fixed: 'left'},
+                        {field: 'subjectName', title: '项目所在地', width: 100},
+                        {field: 'content', title: '建设内容', minWidth: 100,
+                            templet: function (row) {
+                                return row.content ? '<span class="cut" title="' + row.content + '">' + row.content + '</span>' : '';
+                            }},
+                        {
+                            field: 'amtTotal',
+                            title: '总投资',
+                            width: 100,
+                            templet: d => `<span class="new-roman">` + (d.amtTotal / 10000).toFixed(2) + `</span>` + "亿元",
+                        },
+                        {field: 'statusName', title: '状态', width: 60},
+                        {field: 'statusRedName', title: '红黄灯', width: 60},
+                        {field: 'beginDate', title: '计划开工日期', minWidth: 100,
+                            templet: (d)=> `<span class="new-roman">` +  d.beginDate + `</span>`
+                        },
+                        {field: 'endDate', title: '计划完工日期', minWidth: 100,
+                            templet: (d)=> `<span class="new-roman">` +  d.endDate + `</span>`
+                        },
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
+                    // cols: [[ // 设置表头
+                    //     {type: 'numbers', fixed: 'left', align: 'center',title:'序号'},
+                    //     // {field: 'abc', title: 'ABC',fixed: 'left', width: 70, templet: "#abcSpan"},
+                    //     {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 300, templet: '#subName'},
+                    //     {field: 'preName', title: '手续名称', minWidth: 150},
+                    //     {field: 'unitDesc', title: '批复单位名称', minWidth: 150},
+                    //     {field: 'nameLead', title: '办理人(批复单位)', width: 80},
+                    //     {field: 'tel', title: '电话(批复单位)', width: 100},
+                    //     {field: 'datePlan', title: '开办日期', minWidth: 80},
+                    //     {field: 'num1', title: '计划办理天数', width: 100, templet: '#dayNum'},
+                    //     {field: 'num3', title: '实际办理天数', width: 100, templet: '#num3'},
+                    //     {field: 'num4', title: '节约天数', width: 100, templet: '#num4'},
+                    //     {title: '操作', width: 150, align:'center', toolbar: '#toolBar',fixed:'right'},
+                    // ]],
                     fixed: true,
                     height: window.screen.availHeight-430,
                     data : self.dataList,
@@ -729,7 +666,6 @@
                 })
             },
             daysBetween: function (date1, date2) {
-
                 const timeDiff = Math.abs(date2.getTime() - date1.getTime());
                 return Math.ceil(timeDiff / (1000 * 3600 * 24));
             },
@@ -817,7 +753,6 @@
                     yes: function(index) {
                         var reason = layui.form.val("problemForm");
                         reason.subId = obj.data.id;
-
                         if (reason.statusF=="2"||reason.statusF=="1"){
                             if (reason.status_reason==""||reason.status_reason==undefined){
                                 layer.msg("红灯,黄灯必须输入原因");
@@ -837,33 +772,7 @@
                     }
                 })
             },
-            exportExcel: function(){
-                var param = this.getSearchParams();
-                App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"),"POST", param,"项目情况表.xlsx", "导出失败");
-            },
-            exportExcelByIndusKind: function(){
-                var param = this.getSearchParams();
-                App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"),"POST", param,"项目情况表(按所属行业统计).xlsx", "导出失败");
-            },
-            exportSchedulingExcel: function(){
-                var param = this.getSearchParams();
-                App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"),"POST", param,"项目调度表.xlsx", "导出失败");
-            },
-            /* exportExcel2: function(){
-                var param = this.getSearchParams();
-                 App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"POST", param,"项目详情信息表.xlsx", "导出失败");
-            }, */
-            exportMoreExcel: function() {
-                top.window.getSearchParams = this.getSearchParams;
-                App.openLayer({
-                    title : "自定义导出",
-                    content : App.getUrl("/subInfoExport/index"),
-                    height : "600",
-                    width : "800"
-                })
-            },
             toMsgLog: function (obj) {
-
                 App.openLayer({
                     title: "短信",
                     content: App.getUrl("/msgLog/kindDetail?subId=" + obj.data.subId+"&kind=手续超期"),
@@ -891,11 +800,6 @@
                 window.location.href=App.getUrl("/subPreNew/todo?subId=" + obj.data.id);
             },
             backHis: function (){
-                // if() {
-                // window.history.back(-1);
-                <%--}else {--%>
-                <%--  window.location.href="";--%>
-                <%--}--%>
                 window.location.href = "${lastUrl}";
             },
             toTh: function(obj){

+ 224 - 180
projects/src/main/webapp/vmodules/problem/info/preInfo.jsp

@@ -35,13 +35,13 @@
                     <span class="button-card new-roman" @click="tabNumClick('1')">{{cbToXjNum}}</span></button>
 <%--                <button class="btn btn1" :class="{active: tabActive === 2}" @click="onChangeActive(2)">前期手续办理超期--%>
 <%--                    <span class="button-card" @click="ct('','','','','2','')">{{preNum}}</span></button>--%>
-                <button class="btn btn1" :class="{active: tabActive === 3}" @click="onChangeActive(3,'2')">新建库
+                <button class="btn btn1" :class="{active: tabActive === 2}" @click="onChangeActive(2,'2')">新建库
 <%--                    <span class="button-card new-roman" @click="ct('','','','','3','')">{{xjToZjNum}}</span></button>--%>
                     <span class="button-card new-roman" @click="tabNumClick('2')">{{xjToZjNum}}</span></button>
-                <button class="btn btn1" :class="{active: tabActive === 4}" @click="onChangeActive(4,'3')">在建库
+                <button class="btn btn1" :class="{active: tabActive === 3}" @click="onChangeActive(3,'3')">在建库
 <%--                    <span class="button-card new-roman" @click="ct('','','','','4','')">{{zjToTcNum}}</span></button>--%>
                     <span class="button-card new-roman" @click="tabNumClick('3')">{{zjToTcNum}}</span></button>
-                <button class="btn btn1" :class="{active: tabActive === 5}" @click="onChangeActive(5,'9')">投产库
+                <button class="btn btn1" :class="{active: tabActive === 4}" @click="onChangeActive(4,'9')">投产库
 <%--                    <span class="button-card new-roman" @click="ct('','','','','5','')">{{tcToRgNum}}</span></button>--%>
                     <span class="button-card new-roman" @click="tabNumClick('9')">{{tcToRgNum}}</span></button>
                 <button class="btn btn2" :class="{active: tabActive === 6}" @click="onChangeActive(6)">项目月报超期
@@ -345,7 +345,7 @@
         },
         mounted: function () {
             this.init()
-            window.planDetail = this.detailPlan;
+            // window.planDetail = this.detailPlan;
             window.showImage = this.showImage;
         },
         methods: {
@@ -354,21 +354,24 @@
                 window.location.href = App.getUrl(url);
             },
             itemClick(subjectId,indusKind,scale){
-                // ct: function (subjectId, sourceId, mainId, hyfl, index,code) {
                 let index = this.tabActive;
-                const tabParam = {
-                    1: { status: "1" },
-                    2: { status: "2" },
-                    3: { status: "3" },
-                    4: { status: "9" },
-                };
-                const param = tabParam[index] || tabParam[1];
-                let url = "/problem/info/redLight?status=" + param.status
-                    + "&subjectId=" + subjectId
-                    + "&indusKind=" + indusKind
-                    + "&scale=" + scale
-                    + "&lastUrl=" + window.location.href;
-                window.location.href = App.getUrl(url);
+                if (index === 6){
+                    this.ct(subjectId,'','',indusKind,'',scale)
+                }else {
+                    const tabParam = {
+                        1: { status: "1" },
+                        2: { status: "2" },
+                        3: { status: "3" },
+                        4: { status: "9" },
+                    };
+                    const param = tabParam[index] || tabParam[1];
+                    let url = "/problem/info/redLight?status=" + param.status
+                        + "&subjectId=" + subjectId
+                        + "&indusKind=" + indusKind
+                        + "&scale=" + scale
+                        + "&lastUrl=" + window.location.href;
+                    window.location.href = App.getUrl(url);
+                }
             },
             init: function () {
                 this.winH = document.body.clientHeight;
@@ -385,28 +388,28 @@
                 this.onChangeActive(1,'1');
                 this.fixedFunc();
             },
-            loadTable: function (data) {
-                layui.table.render({
-                    elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
-                    even: true,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', fixed: 'left', align: 'center', title: '序号', width: 50},
-                        {field: 'subName', title: '项目名称', fixed: 'left'},
-                        {field: 'preName', title: '手续名称'},
-                        {field: 'content', title: '批复单位名称'},
-                        {field: 'content', title: '办理人(批复单位)'},
-                        {field: 'content', title: '联系电话(批复单位)'},
-                        {field: 'content', title: '开办日期'},
-                        {field: 'content', title: '计划办理天数'},
-                        {
-                            title: '操作', width: 120, templet: function (row) {
-                                return '<div class="toolBar"><span  onclick="planDetail(\'' + row.id + '\',\'' + row.statusSp + '\')">查看</span></div>'
-                            }
-                        }
-                    ]],
-                    data: data
-                })
-            },
+            // loadTable: function (data) {
+            //     layui.table.render({
+            //         elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
+            //         even: true,
+            //         cols: [[ // 设置表头
+            //             {type: 'numbers', fixed: 'left', align: 'center', title: '序号', width: 50},
+            //             {field: 'subName', title: '项目名称', fixed: 'left'},
+            //             {field: 'preName', title: '手续名称'},
+            //             {field: 'content', title: '批复单位名称'},
+            //             {field: 'content', title: '办理人(批复单位)'},
+            //             {field: 'content', title: '联系电话(批复单位)'},
+            //             {field: 'content', title: '开办日期'},
+            //             {field: 'content', title: '计划办理天数'},
+            //             {
+            //                 title: '操作', width: 120, templet: function (row) {
+            //                     return '<div class="toolBar"><span  onclick="planDetail(\'' + row.id + '\',\'' + row.statusSp + '\')">查看</span></div>'
+            //                 }
+            //             }
+            //         ]],
+            //         data: data
+            //     })
+            // },
             showImage: function (that) {
                 var imageUrl = $(that).find("img").eq(0).attr("realUrl");
                 if (imageUrl) {
@@ -451,85 +454,85 @@
             toPre: function (id) {
                 window.open(App.getUrl("/subPreNew/todo?subId=${sunInfo.id}"));
             },
-            detailPlan: function (id, status) {
-                if (status != '9') {
-                    layer.msg("该计划未竣工,请竣工后查看", {icon: 5, time: 1000});
-                    return;
-                }
-                window.location.href = App.getUrl("subComplete/planDetail?planId=" + id);
-            },
-            loadShgcTable: function () {
-                var self = this;
-                layui.table.render({
-                    elem: '#shgc', // 指定原始表格元素选择器(推荐id选择器)
-                    even: true,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', title: '序号', width: 50},
-                        {field: 'unitName', title: '审核单位', minWidth: 100},
-                        {field: 'departName', title: '审核科室', minWidth: 100},
-                        {field: 'statusSp', title: '审核状态', minWidth: 150, templet: '#statusSp'},
-                        {field: 'dateSp', title: '审核时间', width: 150},
-                    ]],
-                    limit: self.shgc.length,
-                    data: self.shgc
-                });
-            },
-            loadHzbaTable: function () {
-                var self = this;
-                layui.table.render({
-                    elem: '#hzba', // 指定原始表格元素选择器(推荐id选择器)
-                    even: true,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', title: '序号', width: 50},
-                        {field: 'sysName', title: '工作说明', minWidth: 100},
-                        {field: 'statusName', title: '办理状况', minWidth: 100},
-                        {field: 'subUnitName', title: '批复单位', minWidth: 100},
-                        {field: 'datePlan', title: '开始办理时间', minWidth: 150},
-                        {field: 'dateConfirm', title: '实际批复时间', width: 150},
-                        {field: 'apprNo', title: '批复文号', width: 150},
-                        {field: 'fileAddre', title: '附件图片', width: 150, templet: '#imageDiv'},
-                        {field: 'fileName', title: '附件文件名称', width: 150},
-                    ]],
-                    limit: self.hzba.length,
-                    data: self.hzba
-                });
-            },
-            loadKgspTable: function () {
-                var self = this;
-                layui.table.render({
-                    elem: '#kgsp', // 指定原始表格元素选择器(推荐id选择器)
-                    even: true,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', title: '序号', width: 50},
-                        {field: 'sysName', title: '工作说明', minWidth: 100},
-                        {field: 'statusName', title: '办理状况', minWidth: 100},
-                        {field: 'subUnitName', title: '批复单位', minWidth: 100},
-                        {field: 'datePlan', title: '开始办理时间', minWidth: 150},
-                        {field: 'dateConfirm', title: '实际批复时间', width: 150},
-                        {field: 'apprNo', title: '批复文号', width: 150},
-                        {field: 'fileAddre', title: '附件图片', width: 150, templet: '#imageDiv'},
-                        {field: 'fileName', title: '附件文件名称', width: 150},
-                    ]],
-                    limit: self.kgsp.length,
-                    data: self.kgsp
-                });
-            },
-            loadJgdwTable: function () {
-                var self = this;
-                layui.table.render({
-                    elem: '#jgdw', // 指定原始表格元素选择器(推荐id选择器)
-                    even: true,
-                    cols: [[ // 设置表头
-                        {type: 'numbers', title: '序号', width: 50},
-                        {field: 'manageName', title: '监管单位'},
-                        {field: 'departName', title: '责任科室'},
-                        {field: 'nameLead', title: '责任领导', minWidth: 200},
-                        {field: 'tel', title: '联系电话', minWidth: 200}
-                    ]],
-                    limit: self.jgdw.length,
-                    data: self.jgdw
-                });
-            },
+            // detailPlan: function (id, status) {
+            //     if (status != '9') {
+            //         layer.msg("该计划未竣工,请竣工后查看", {icon: 5, time: 1000});
+            //         return;
+            //     }
+            //     window.location.href = App.getUrl("subComplete/planDetail?planId=" + id);
+            // },
+            // loadShgcTable: function () {
+            //     var self = this;
+            //     layui.table.render({
+            //         elem: '#shgc', // 指定原始表格元素选择器(推荐id选择器)
+            //         even: true,
+            //         cols: [[ // 设置表头
+            //             {type: 'numbers', title: '序号', width: 50},
+            //             {field: 'unitName', title: '审核单位', minWidth: 100},
+            //             {field: 'departName', title: '审核科室', minWidth: 100},
+            //             {field: 'statusSp', title: '审核状态', minWidth: 150, templet: '#statusSp'},
+            //             {field: 'dateSp', title: '审核时间', width: 150},
+            //         ]],
+            //         limit: self.shgc.length,
+            //         data: self.shgc
+            //     });
+            // },
+            // loadHzbaTable: function () {
+            //     var self = this;
+            //     layui.table.render({
+            //         elem: '#hzba', // 指定原始表格元素选择器(推荐id选择器)
+            //         even: true,
+            //         cols: [[ // 设置表头
+            //             {type: 'numbers', title: '序号', width: 50},
+            //             {field: 'sysName', title: '工作说明', minWidth: 100},
+            //             {field: 'statusName', title: '办理状况', minWidth: 100},
+            //             {field: 'subUnitName', title: '批复单位', minWidth: 100},
+            //             {field: 'datePlan', title: '开始办理时间', minWidth: 150},
+            //             {field: 'dateConfirm', title: '实际批复时间', width: 150},
+            //             {field: 'apprNo', title: '批复文号', width: 150},
+            //             {field: 'fileAddre', title: '附件图片', width: 150, templet: '#imageDiv'},
+            //             {field: 'fileName', title: '附件文件名称', width: 150},
+            //         ]],
+            //         limit: self.hzba.length,
+            //         data: self.hzba
+            //     });
+            // },
+            // loadKgspTable: function () {
+            //     var self = this;
+            //     layui.table.render({
+            //         elem: '#kgsp', // 指定原始表格元素选择器(推荐id选择器)
+            //         even: true,
+            //         cols: [[ // 设置表头
+            //             {type: 'numbers', title: '序号', width: 50},
+            //             {field: 'sysName', title: '工作说明', minWidth: 100},
+            //             {field: 'statusName', title: '办理状况', minWidth: 100},
+            //             {field: 'subUnitName', title: '批复单位', minWidth: 100},
+            //             {field: 'datePlan', title: '开始办理时间', minWidth: 150},
+            //             {field: 'dateConfirm', title: '实际批复时间', width: 150},
+            //             {field: 'apprNo', title: '批复文号', width: 150},
+            //             {field: 'fileAddre', title: '附件图片', width: 150, templet: '#imageDiv'},
+            //             {field: 'fileName', title: '附件文件名称', width: 150},
+            //         ]],
+            //         limit: self.kgsp.length,
+            //         data: self.kgsp
+            //     });
+            // },
+            // loadJgdwTable: function () {
+            //     var self = this;
+            //     layui.table.render({
+            //         elem: '#jgdw', // 指定原始表格元素选择器(推荐id选择器)
+            //         even: true,
+            //         cols: [[ // 设置表头
+            //             {type: 'numbers', title: '序号', width: 50},
+            //             {field: 'manageName', title: '监管单位'},
+            //             {field: 'departName', title: '责任科室'},
+            //             {field: 'nameLead', title: '责任领导', minWidth: 200},
+            //             {field: 'tel', title: '联系电话', minWidth: 200}
+            //         ]],
+            //         limit: self.jgdw.length,
+            //         data: self.jgdw
+            //     });
+            // },
             changeSide() {
                 this.collapse = !this.collapse
             },
@@ -595,60 +598,101 @@
 
             // tab上的数字点击跳转
             ct: function (subjectId, sourceId, mainId, hyfl, index,code) {
-                // window.event? window.event.cancelBubble = true : e.stopPropagation();
-                // console.log('ct被点击了');
-                var self = this;
-                var url = "/problem/info/preWarn";
-                console.log(index);
-                if (index !== undefined && index != "") {
-                     if (index == 1) {
-                        url = "/problem/info/cbToXjWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                    } else if (index == 2) {
-                         url = "/problem/info/preWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                    } else if (index == 3) {
-                         url = "/problem/info/openWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                    } else if (index == 4) {
-                         url = "/problem/info/endWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                    } else if (index == 5) {
-                         url = "/problem/info/pldWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                    } else if (index == 6) {
-                         url = "/problem/info/monthWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                const self = this;
+                const baseUrls = {
+                    1: "/problem/info/cbToXjWarn",
+                    2: "/problem/info/preWarn",
+                    3: "/problem/info/openWarn",
+                    4: "/problem/info/endWarn",
+                    5: "/problem/info/pldWarn",
+                    6: "/problem/info/monthWarn"
+                };
 
-                     }
+                let subjectValue = "";
+                if (mainId != null && mainId !== undefined && mainId !== '') {
+                    subjectValue = self.quyuListTab[self.chooseNum]?.number || "";
                 } else {
-                    if (mainId != null && mainId != undefined && mainId != '') {
-                        if (self.tabActive == 1) {
-                            url = "/problem/info/cbToXjWarn?subjectId="+ self.quyuListTab[self.chooseNum].number +"&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 2) {
-                            url = "/problem/info/preWarn?subjectId="+ self.quyuListTab[self.chooseNum].number +"&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 3) {
-                            url = "/problem/info/openWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 4) {
-                            url = "/problem/info/endWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 5) {
-                            url = "/problem/info/pldWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 6) {
-                            //url = "/problem/info/problemWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&lastUrl=" + window.location.href;
-                            url = "/problem/info/monthWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        }
-                    } else {
-                        if (self.tabActive == 1) {
-                            url = "/problem/info/cbToXjWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 2) {
-                            url = "/problem/info/preWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 3) {
-                            url = "/problem/info/openWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 4) {
-                            url = "/problem/info/endWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 5) {
-                            url = "/problem/info/pldWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        } else if (self.tabActive == 6) {
-                            //url = "/problem/info/problemWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&lastUrl=" + window.location.href;
-                            url = "/problem/info/monthWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
-                        }
-                    }
+                    subjectValue = subjectId || "";
                 }
-                window.location.href = App.getUrl(url);
+
+                // Determine the correct URL based on index or tabActive
+                let urlKey = index !== undefined && index !== "" ? index : self.tabActive;
+
+                // Validate the key exists in the mapping
+                if (!baseUrls[urlKey]) {
+                    console.error("Invalid index or tabActive value:", urlKey);
+                    return;
+                }
+
+                const baseUrl = baseUrls[urlKey];
+                const params = new URLSearchParams({
+                    subjectId: subjectValue,
+                    sourceId: sourceId,
+                    mainId: mainId,
+                    hyfl: hyfl,
+                    code: code,
+                    lastUrl: window.location.href
+                });
+
+                const finalUrl = baseUrl+`?`+params.toString();
+                window.location.href = App.getUrl(finalUrl);
+
+
+
+                // window.event? window.event.cancelBubble = true : e.stopPropagation();
+                // console.log('ct被点击了');
+                // var self = this;
+                // var url = "/problem/info/preWarn";
+                // console.log(index);
+                // if (index !== undefined && index != "") {
+                //      if (index == 1) {
+                //         url = "/problem/info/cbToXjWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //     } else if (index == 2) {
+                //          url = "/problem/info/preWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //     } else if (index == 3) {
+                //          url = "/problem/info/openWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //     } else if (index == 4) {
+                //          url = "/problem/info/endWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //     } else if (index == 5) {
+                //          url = "/problem/info/pldWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //     } else if (index == 6) {
+                //          url = "/problem/info/monthWarn?subjectId=&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //
+                //      }
+                // } else {
+                //     if (mainId != null && mainId != undefined && mainId != '') {
+                //         if (self.tabActive == 1) {
+                //             url = "/problem/info/cbToXjWarn?subjectId="+ self.quyuListTab[self.chooseNum].number +"&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 2) {
+                //             url = "/problem/info/preWarn?subjectId="+ self.quyuListTab[self.chooseNum].number +"&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 3) {
+                //             url = "/problem/info/openWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 4) {
+                //             url = "/problem/info/endWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 5) {
+                //             url = "/problem/info/pldWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 6) {
+                //             //url = "/problem/info/problemWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&lastUrl=" + window.location.href;
+                //             url = "/problem/info/monthWarn?subjectId=" + self.quyuListTab[self.chooseNum].number + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         }
+                //     } else {
+                //         if (self.tabActive == 1) {
+                //             url = "/problem/info/cbToXjWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 2) {
+                //             url = "/problem/info/preWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 3) {
+                //             url = "/problem/info/openWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 4) {
+                //             url = "/problem/info/endWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 5) {
+                //             url = "/problem/info/pldWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         } else if (self.tabActive == 6) {
+                //             //url = "/problem/info/problemWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&lastUrl=" + window.location.href;
+                //             url = "/problem/info/monthWarn?subjectId=" + (subjectId || "") + "&sourceId=" + sourceId + "&mainId=" + mainId + "&hyfl=" + hyfl + "&code=" + code +"&lastUrl=" + window.location.href;
+                //         }
+                //     }
+                // }
+                // window.location.href = App.getUrl(url);
             },
             // chooseItem: function (index) {
             //     this.collsItem = 0;
@@ -779,16 +823,16 @@
             backHis: function () {
                 window.history.back(-1);
             },
-            collaspe: function (item) {
-                var self = this;
-                console.log(item)
-                if (self.collsItem === item) {
-                    self.collsItem = 0
-                } else {
-                    self.collsItem = item;
-                    self.fixedFunc();
-                }
-            },
+            // collaspe: function (item) {
+            //     var self = this;
+            //     console.log(item)
+            //     if (self.collsItem === item) {
+            //         self.collsItem = 0
+            //     } else {
+            //         self.collsItem = item;
+            //         self.fixedFunc();
+            //     }
+            // },
             fixedFunc: function () {
                 if (self.collsItem == 1) {
                     var proBarItem = document.querySelector('.bar-item-1');