Forráskód Böngészése

重点项目四库开发完成

Wayne 4 hónapja
szülő
commit
62106e6e6b

+ 4 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java

@@ -14,6 +14,7 @@ import org.apache.ibatis.annotations.Param;
 import com.rtrh.core.repository.mybatis.MyBatisRepository;
 import com.rtrh.projects.modules.projects.vo.SubSmartVO;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 
 @MyBatisRepository
 public interface SubInfoMapper {
@@ -45,4 +46,7 @@ public interface SubInfoMapper {
     List<String> selectAllSubInfoIdsNotSubFix(@Param("subIdList") List<String> subIdList, @Param("status")String status);
 
     void batchInsertSubFix(@Param("subFixList") List<SubFix> subFixList);
+
+    @Update("update sub_fix set cat = #{fixCat} where sub_id = #{subInfoId} and cat = #{oldCat}")
+    void updateFixeCat(@Param("subInfoId") String subInfoId, @Param("fixCat") String fixCat, @Param("oldCat") String oldCat);
 }

+ 1 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -234,6 +234,7 @@
             <if test="status != null and status != ''">
                 AND status = #{status}
             </if>
+            AND amt_total &gt;= 10000
         </where>
     </select>
 

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java

@@ -397,4 +397,6 @@ public interface SubInfoService {
 	void addLabelS(SubLabelAddVO vo, List list);
 
 	void subInfoToSubFix(SubInfoToSubFixVo subInfoToSubFixVo,String userId);
+
+	void updateFixeCat(String subInfoId, String cat);
 }

+ 15 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -4675,8 +4675,10 @@ public class SubInfoServiceImpl implements SubInfoService {
             status = "2";
         }else if ("2".equals(subInfoToSubFixVo.getCat())){
             status = "3";
-        }else if ("3".equals(subInfoToSubFixVo.getCat())){}{
+        }else if ("3".equals(subInfoToSubFixVo.getCat())){
             status = "1";
+        }else if ("9".equals(subInfoToSubFixVo.getCat())){
+            status = "9";
         }
         List<String> newSubInfoIdList = subInfoMapper.selectAllSubInfoIdsNotSubFix(subIdList,status);
         // 3、将这些数据插入到sub_fix表中
@@ -4697,6 +4699,18 @@ public class SubInfoServiceImpl implements SubInfoService {
         }
     }
 
+    @Override
+    public void updateFixeCat(String subInfoId, String cat) {
+        // 改变该状态级别一下的状态 cat = 1 储备转新建,cat = 2 新建转再建
+        String fixCat = "1";
+        String oldCat = "3";
+        if ("2".equals(cat)){
+            fixCat = "2";
+            oldCat = "1";
+        }
+        subInfoMapper.updateFixeCat(subInfoId,fixCat,oldCat);
+    }
+
 
     public List<SubLabel> getSubLabels(SubLabelAddVO vo) {
         List<SubLabel> labelList = subLabelDao.findByCon(vo);

+ 2 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -317,8 +317,10 @@ public class SubInfoController extends BaseController {
                 return new ModelAndView("/vmodules/subject/subInfo/tz/year_sum.jsp");
             case "yearNew":
                 //年度固定资产项目库 - 新建项目
+                //重点项目调度  -  新建项目(工信局系统)
                 return new ModelAndView("/vmodules/subject/subInfo/tz/year_new.jsp");
             case "yearExtend":
+                //重点项目调度  -  续建项目(工信局系统)
                 //年度固定资产项目库 - 续建项目
                 return new ModelAndView("/vmodules/subject/subInfo/tz/year_extend.jsp");
             case "yearReserve":

+ 17 - 1
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -148,7 +148,7 @@ public class SubInfoApiController extends BaseController {
         ListMessage message = new ListMessage();
         try {
             subInfoService.subInfoToSubFix(subInfoToSubFixVo,getCurUser().getId());
-            message.setMessage("抓取成功");
+            message.addSuccess("抓取成功");
         } catch (Exception e) {
             logger.error("", e);
             message.add("抓取失败");
@@ -156,6 +156,22 @@ public class SubInfoApiController extends BaseController {
         return message;
     }
 
+    /**
+     * 重点项目状态改变
+     */
+
+    @PostMapping(value = "/updateFixeCat/{subInfoId}/{cat}")
+    public Message updateFixeCat(@PathVariable String subInfoId,@PathVariable String cat) {
+        Message message = new Message();
+        try {
+            subInfoService.updateFixeCat(subInfoId,cat);
+        } catch (Exception e) {
+            logger.error("", e);
+            message.add("移入失败");
+        }
+        return message;
+    }
+
 
 
 

+ 2 - 2
projects/src/main/webapp/vmodules/leftMenu.jsp

@@ -126,7 +126,7 @@
                             }
                         },
                         {
-                            txt: '建项目',
+                            txt: '建项目',
                             code: '1102',
                             url: 'subject/subInfo/projTz?type=yearExtend',
                             before: function () {
@@ -134,7 +134,7 @@
                             }
                         },
                         {
-                            txt: '汇总项目',
+                            txt: '投产项目',
                             code: '1101',
                             url: 'subject/subInfo/projTz?type=yearSum',
                             before: function () {

+ 72 - 15
projects/src/main/webapp/vmodules/subject/subInfo/tz/year_extend.jsp

@@ -72,13 +72,20 @@
 </head>
 
 <body>
+<script>
+    // 将 JSP 传递的 JSDD 数据转为前端对象
+    var JSDD = {};
+    <c:forEach items="${JSDD}" var="hy">
+    JSDD['${hy.code}'] = '${hy.title}';
+    </c:forEach>
+</script>
 <div id="app"></div>
 <template id="template">
     <div class="layui-layout layui-layout-admin">
         <!-- 内容区域 -->
         <div class="right_title">
             <%--            <span class="txt">重点项目信息台账</span>--%>
-            <div class="txt" style="width: 100%;text-align: center">续建项目库</div>
+            <div class="txt" style="width: 100%;text-align: center">建项目库</div>
             <%--           <span class="txt">续建项目库</span>--%>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
@@ -325,6 +332,10 @@
                                             <button type="button" class="layui-btn layui-btn-norma"
                                                     style="margin-left: 20px" @click="uploadProject">导入
                                             </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px"
+                                                    @click="subInfoToSubFix">自动抓取
+                                            </button>
                                         </div>
                                     </div>
                                 </div>
@@ -646,6 +657,13 @@
 
         </div>
     </script>
+    <script type="text/html" id="subjectId">
+        <div style="display: flex; flex-direction: column; justify-content: center; height: 100%">
+        <span title="{{d.subject_id}}" style="white-space: normal; line-height: 1.25">
+            {{ JSDD[d.subject_id] || '未知' }}
+        </span>
+        </div>
+    </script>
     <script type="text/html" id="abcSpan">
         {{# if(d.abc == "A") { }}
         <span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
@@ -1173,24 +1191,32 @@
                                 }
                             },
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
-                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
-                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
                             {
-                                field: 'offsetLight',
-                                title: '偏离状态',
-                                type: 'string',
-                                align: 'center',
+                                field: 'subjectId',
                                 fixed: 'left',
-                                width: 100,
-                                templet: '#offsetLight'
+                                title: '项目所在地',
+                                minWidth: 200,
+                                templet: '#subjectId' // 指定模板
                             },
+                            {field: 'content', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#content'},
+                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
+                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
+                            // {
+                            //     field: 'offsetLight',
+                            //     title: '偏离状态',
+                            //     type: 'string',
+                            //     align: 'center',
+                            //     fixed: 'left',
+                            //     width: 100,
+                            //     templet: '#offsetLight'
+                            // },
                             {field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
-                            {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
-                            {field: 'state', title: '计划时间', width: 140, templet: '#date'},
+                            // {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
+                            // {field: 'state', title: '计划时间', width: 140, templet: '#date'},
                             // {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
-                            {field: 'statusName', title: '项目进度', width: 60},
-                            {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
-                            {field: 'unitName', title: '项目单位', minWidth: 110},
+                            {field: 'statusName', title: '进展情况', minWidth: 200},
+                            // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
+                            // {field: 'unitName', title: '项目单位', minWidth: 110},
                             // { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
                         ]],
@@ -1504,7 +1530,8 @@
                             }
                         });
                     });
-                }, isNoFix: function (obj) {
+                },
+                isNoFix: function (obj) {
                     var self = this;
                     App.msg.confirm("是否取消纳入?", function () {
                         App.postJson("/api/subject/subInfo/setIsFix", {
@@ -1521,6 +1548,23 @@
                         });
                     });
                 },
+                updateFixeCat: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否转入新建库?", function () {
+                        App.postJson("/api/subject/subInfo/setIsFix", {
+                            subId: obj.data.id,
+                            isFix: "0",
+                            year: self.getSearchParams().year,
+                            stateFix: self.getSearchParams().fixCat
+                        }, function (res) {
+                            if (res.success) {
+                                App.msg.success("设置成功");
+                                self.getData();
+                                layer.close(index);
+                            }
+                        });
+                    });
+                },
 
                 intoSub: function () {
                     top.window.addSubInfo = this.addSub;
@@ -1533,6 +1577,19 @@
                         }
                     });
                 },
+                subInfoToSubFix: function () {
+                    var self = this;
+                    var param = this.getSearchParams();
+                    App.postJson("/api/subject/subInfo/subInfoToSubFix", {
+                        year: param.year,
+                        cat: 2      // 代表抓取新建项目
+                    }, function (res) {
+                        if (res.success) {
+                            App.msg.success("抓取成功");
+                            self.getData();
+                        }
+                    })
+                },
                 downLoadTemplate: function () {
                     parent.window.location.href = App.getUrl(
                         "/subject/subInfo/downLoadFixTemplate"

+ 64 - 13
projects/src/main/webapp/vmodules/subject/subInfo/tz/year_new.jsp

@@ -72,6 +72,13 @@
 </head>
 
 <body>
+<script>
+    // 将 JSP 传递的 JSDD 数据转为前端对象
+    var JSDD = {};
+    <c:forEach items="${JSDD}" var="hy">
+    JSDD['${hy.code}'] = '${hy.title}';
+    </c:forEach>
+</script>
 <div id="app"></div>
 <template id="template">
     <div class="layui-layout layui-layout-admin">
@@ -325,6 +332,10 @@
                                             <button type="button" class="layui-btn layui-btn-norma"
                                                     style="margin-left: 20px" @click="uploadProject">导入
                                             </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px"
+                                                    @click="subInfoToSubFix">自动抓取
+                                            </button>
                                         </div>
                                     </div>
                                 </div>
@@ -646,6 +657,13 @@
 
         </div>
     </script>
+    <script type="text/html" id="subjectId">
+        <div style="display: flex; flex-direction: column; justify-content: center; height: 100%">
+        <span title="{{d.subject_id}}" style="white-space: normal; line-height: 1.25">
+            {{ JSDD[d.subject_id] || '未知' }}
+        </span>
+        </div>
+    </script>
     <script type="text/html" id="abcSpan">
         {{# if(d.abc == "A") { }}
         <span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
@@ -803,6 +821,7 @@
             <%--            {{#} }}--%>
             <%--        </c:if>--%>
             <span title="取消纳入" lay-event="isNoFix">&nbsp;取消纳入</span>
+            <span title="转在建" lay-event="updateFixeCat">转在建</span>
         </div>
     </script>
     <script>
@@ -1173,24 +1192,32 @@
                                 }
                             },
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
-                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
-                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
                             {
-                                field: 'offsetLight',
-                                title: '偏离状态',
-                                type: 'string',
-                                align: 'center',
+                                field: 'subjectId',
                                 fixed: 'left',
-                                width: 100,
-                                templet: '#offsetLight'
+                                title: '项目所在地',
+                                minWidth: 200,
+                                templet: '#subjectId' // 指定模板
                             },
+                            {field: 'content', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#content'},
+                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
+                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
+                            // {
+                            //     field: 'offsetLight',
+                            //     title: '偏离状态',
+                            //     type: 'string',
+                            //     align: 'center',
+                            //     fixed: 'left',
+                            //     width: 100,
+                            //     templet: '#offsetLight'
+                            // },
                             {field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
-                            {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
-                            {field: 'state', title: '计划时间', width: 140, templet: '#date'},
+                            // {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
+                            // {field: 'state', title: '计划时间', width: 140, templet: '#date'},
                             // {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
-                            {field: 'statusName', title: '项目进度', width: 60},
-                            {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
-                            {field: 'unitName', title: '项目单位', minWidth: 110},
+                            {field: 'statusName', title: '进展情况', minWidth: 200},
+                            // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
+                            // {field: 'unitName', title: '项目单位', minWidth: 110},
                             // { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
                         ]],
@@ -1521,6 +1548,17 @@
                         });
                     });
                 },
+                updateFixeCat: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否转入新建库?", function () {
+                        App.postJson("/api/subject/subInfo/updateFixeCat/" + obj.data.id + "/2",{}, function (res) {
+                            if (res.success) {
+                                App.msg.success("转入成功");
+                                self.getData();
+                            }
+                        });
+                    });
+                },
 
                 intoSub: function () {
                     top.window.addSubInfo = this.addSub;
@@ -1533,6 +1571,19 @@
                         }
                     });
                 },
+                subInfoToSubFix: function () {
+                    var self = this;
+                    var param = this.getSearchParams();
+                    App.postJson("/api/subject/subInfo/subInfoToSubFix", {
+                        year: param.year,
+                        cat: 1      // 代表抓取新建项目
+                    }, function (res) {
+                        if (res.success) {
+                            App.msg.success("抓取成功");
+                            self.getData();
+                        }
+                    })
+                },
                 downLoadTemplate: function () {
                     parent.window.location.href = App.getUrl(
                         "/subject/subInfo/downLoadFixTemplate"

+ 60 - 8
projects/src/main/webapp/vmodules/subject/subInfo/tz/year_reserve.jsp

@@ -72,6 +72,13 @@
 </head>
 
 <body>
+<script>
+    // 将 JSP 传递的 JSDD 数据转为前端对象
+    var JSDD = {};
+    <c:forEach items="${JSDD}" var="hy">
+    JSDD['${hy.code}'] = '${hy.title}';
+    </c:forEach>
+</script>
 <div id="app"></div>
 <template id="template">
     <div class="layui-layout layui-layout-admin">
@@ -325,6 +332,10 @@
                                             <button type="button" class="layui-btn layui-btn-norma"
                                                     style="margin-left: 20px" @click="uploadProject">导入
                                             </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px"
+                                                    @click="subInfoToSubFix">自动抓取
+                                            </button>
                                         </div>
                                     </div>
                                 </div>
@@ -646,6 +657,14 @@
 
         </div>
     </script>
+    <script type="text/html" id="subjectId">
+        <div style="display: flex; flex-direction: column; justify-content: center; height: 100%">
+        <span title="{{d.subject_id}}" style="white-space: normal; line-height: 1.25">
+            {{ JSDD[d.subject_id] || '未知' }}
+        </span>
+        </div>
+    </script>
+
     <script type="text/html" id="abcSpan">
         {{# if(d.abc == "A") { }}
         <span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
@@ -803,6 +822,7 @@
             <%--            {{#} }}--%>
             <%--        </c:if>--%>
             <span title="取消纳入" lay-event="isNoFix">&nbsp;取消纳入</span>
+            <span title="转新建" lay-event="updateFixeCat">转新建</span>
         </div>
     </script>
     <script>
@@ -1173,18 +1193,24 @@
                                 }
                             },
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
-                            {field: 'subName', fixed: 'left', title: '项目所在地', minWidth: 200, templet: '#subName'},
-                            {field: 'subName', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#subName'},
+                            {
+                                field: 'subjectId',
+                                fixed: 'left',
+                                title: '项目所在地',
+                                minWidth: 200,
+                                templet: '#subjectId' // 指定模板
+                            },
+                            {field: 'content', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#content'},
                             // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
                             /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
                             // {field: 'offsetLight', title: '偏离状态', type: 'string', align: 'center', fixed: 'left', width: 100, templet: '#offsetLight'},
                             {field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
-                            {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
-                            {field: 'state', title: '计划时间', width: 140, templet: '#date'},
+                            {field: 'statusName', title: '进展情况', minWidth: 200},
+                            // {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
+                            // {field: 'state', title: '计划时间', width: 140, templet: '#date'},
                             // {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
-                            {field: 'statusName', title: '项目进度', width: 60},
-                            {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
-                            {field: 'unitName', title: '项目单位', minWidth: 110},
+                            // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
+                            // {field: 'unitName', title: '项目单位', minWidth: 110},
                             // { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
                         ]],
@@ -1498,7 +1524,8 @@
                             }
                         });
                     });
-                }, isNoFix: function (obj) {
+                },
+                isNoFix: function (obj) {
                     var self = this;
                     App.msg.confirm("是否取消纳入?", function () {
                         App.postJson("/api/subject/subInfo/setIsFix", {
@@ -1516,6 +1543,18 @@
                     });
                 },
 
+                updateFixeCat: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否转入新建库?", function () {
+                        App.postJson("/api/subject/subInfo/updateFixeCat/" + obj.data.id + "/1",{}, function (res) {
+                            if (res.success) {
+                                App.msg.success("转入成功");
+                                self.getData();
+                            }
+                        });
+                    });
+                },
+
                 intoSub: function () {
                     top.window.addSubInfo = this.addSub;
                     var param = this.getSearchParams();
@@ -1532,6 +1571,19 @@
                         "/subject/subInfo/downLoadFixTemplate"
                     );
                 },
+                subInfoToSubFix: function () {
+                    var self = this;
+                    var param = this.getSearchParams();
+                    App.postJson("/api/subject/subInfo/subInfoToSubFix", {
+                        year: param.year,
+                        cat: 3  // 代表抓取储备项目
+                    }, function (res) {
+                        if (res.success) {
+                            App.msg.success("抓取成功");
+                            self.getData();
+                        }
+                    })
+                },
                 uploadProject: function () {
                     $("#importExc").click();
                     self.getData();

+ 343 - 568
projects/src/main/webapp/vmodules/subject/subInfo/tz/year_sum.jsp

@@ -72,22 +72,29 @@
 </head>
 
 <body>
+<script>
+    // 将 JSP 传递的 JSDD 数据转为前端对象
+    var JSDD = {};
+    <c:forEach items="${JSDD}" var="hy">
+    JSDD['${hy.code}'] = '${hy.title}';
+    </c:forEach>
+</script>
 <div id="app"></div>
 <template id="template">
     <div class="layui-layout layui-layout-admin">
         <!-- 内容区域 -->
         <div class="right_title">
             <%--            <span class="txt">重点项目信息台账</span>--%>
-            <div class="txt" style="width: 100%;text-align: center">汇总项目库</div>
-            <%--           <span class="txt">建项目库</span>--%>
+            <div class="txt" style="width: 100%;text-align: center">投产项目库</div>
+            <%--           <span class="txt">建项目库</span>--%>
             <div class="layui-collapse">
                 <div class="layui-colla-item">
                     <%--                    <h2 class="layui-colla-title">筛选</h2>--%>
                     <div class="layui-colla-content layui-show">
                         <form class="layui-form" lay-filter="searchForm" id="searchForm">
-                            <input type="hidden" name="queryType" value="yearSum">
-                            <%--                <input type="hidden" name="fixCat" value="1">--%>
-                            <input type="hidden" name="isFix" value="2">
+                            <input type="hidden" name="queryType" value="yearExtend">
+                            <input type="hidden" name="fixCat" value="9">
+                            <input type="hidden" name="isFix" value="1">
                             <div class="layui-row">
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
                                     <div class="layui-form-item">
@@ -161,19 +168,19 @@
                                         </div>
                                     </div>
                                 </c:if>
-                                <%--     <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
-                                         <div class="layui-form-item">
-                                             <label class="layui-form-label label-longers required">建设性质</label>
-                                             <div class="layui-input-block">
-                                                 <select name="propKind">
-                                                     <option value="">请选择</option>
-                                                     <c:forEach items="${JSXZ}" var="js">
-                                                         <option value="${js.code }">${js.title }</option>
-                                                     </c:forEach>
-                                                 </select>
-                                             </div>
-                                         </div>
-                                     </div>--%>
+                                <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
+                                    <div class="layui-form-item">
+                                        <label class="layui-form-label label-longers required">建设性质</label>
+                                        <div class="layui-input-block">
+                                            <select name="propKind">
+                                                <option value="">请选择</option>
+                                                <c:forEach items="${JSXZ}" var="js">
+                                                    <option value="${js.code }">${js.title }</option>
+                                                </c:forEach>
+                                            </select>
+                                        </div>
+                                    </div>
+                                </div>
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label label-longers required">资金来源</label>
@@ -277,36 +284,8 @@
                                         </div>
                                     </div>
                                 </div>
-                                <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
-                                    <div class="layui-form-item">
-                                        <label class="layui-form-label label-longers">建设性质</label>
-                                        <div class="layui-input-block">
-                                            <div id="fixCat"></div>
-                                        </div>
-                                        <%--             <div class="layui-input-block">
-                                                         <select name="fixCat">
-                                                             <option value="">所有项目</option>
-                                                             <option value="3">储备项目</option>
-                                                             <option value="1">新建项目</option>
-                                                             <option value="2">续建项目</option>
-                                                         </select>
-
-                                                     </div>--%>
-                                    </div>
-                                </div>
-                                <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
-                                    <div class="layui-form-item">
-                                        <label class="layui-form-label label-longers required">标签</label>
-                                        <div class="layui-input-block">
-                                            <select name="subLabel" lay-search="">
-                                                <option value="">请选择</option>
-                                                <c:forEach items="${BQ }" var="hy">
-                                                    <option value="${hy.id }">${hy.title }</option>
-                                                </c:forEach>
-                                            </select>
-                                        </div>
-                                    </div>
-                                </div>
+
+
                                 <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 ">
                                     <div class="layui-form-item">
                                         <label class="layui-form-label label-longers required">年份</label>
@@ -344,18 +323,19 @@
                                                     v-if="!showMoreFlag">更多 </a><a
                                                     v-if="showMoreFlag">收起 V</a></span>
                                             <button type="button" class="layui-btn layui-btn-normal"
-                                                    style="margin-left: 80px" @click="addLabels">批量标签
+                                                    style="margin-left: 80px" @click="intoSub">纳入
+                                            </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px"
+                                                    @click="downLoadTemplate">模板下载
+                                            </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px" @click="uploadProject">导入
+                                            </button>
+                                            <button type="button" class="layui-btn layui-btn-norma"
+                                                    style="margin-left: 20px"
+                                                    @click="subInfoToSubFix">自动抓取
                                             </button>
-                                            <%--  <button type="button" class="layui-btn layui-btn-normal"
-                                                      style="margin-left: 80px" @click="intoSub">纳入
-                                              </button>
-                                              <button type="button" class="layui-btn layui-btn-norma"
-                                                      style="margin-left: 20px"
-                                                      @click="downLoadTemplate">模板下载
-                                              </button>
-                                              <button type="button" class="layui-btn layui-btn-norma"
-                                                      style="margin-left: 20px" @click="uploadProject">导入
-                                              </button>--%>
                                         </div>
                                     </div>
                                 </div>
@@ -375,7 +355,7 @@
                 <div class="layui-form-item">
                     <div style="display: flex">
                         <label class="juli">
-                            项目总数<span class="lanse-first">{{beginRate.total}}</span>
+                            续建项目总数<span class="lanse-first">{{beginRate.total}}</span>
                             <div class="progress-div">
                                 <div class="layui-progress">
                                     <div class="layui-progress-bar"></div>
@@ -510,7 +490,7 @@
                         <%--                                @click="exportMoreExcel">自定义--%>
                         <%--                        </button>--%>
                         <button type="button" class=""
-                                @click="exportProject">汇总项目
+                                @click="exportProject">续建项目
                         </button>
                     </div>
                 </div>
@@ -677,6 +657,13 @@
 
         </div>
     </script>
+    <script type="text/html" id="subjectId">
+        <div style="display: flex; flex-direction: column; justify-content: center; height: 100%">
+        <span title="{{d.subject_id}}" style="white-space: normal; line-height: 1.25">
+            {{ JSDD[d.subject_id] || '未知' }}
+        </span>
+        </div>
+    </script>
     <script type="text/html" id="abcSpan">
         {{# if(d.abc == "A") { }}
         <span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
@@ -834,7 +821,6 @@
             <%--            {{#} }}--%>
             <%--        </c:if>--%>
             <span title="取消纳入" lay-event="isNoFix">&nbsp;取消纳入</span>
-               <span title="标签" lay-event="addLabel" class="no-wrap">标签</span>
         </div>
     </script>
     <script>
@@ -847,7 +833,7 @@
                 startDate: "",
                 endDate: "",
                 tableName: 'test',
-                cacheName: 'TzQueryParam_yearSum_${currUser.id}',
+                cacheName: 'TzQueryParam_yearExtend_${currUser.id}',
                 pageNo: 1,
                 kind: {},
                 beginRate: {},
@@ -907,15 +893,6 @@
                         language: 'zn',
                         data: indusKindData
                     });
-
-                    this.fixCat = layui.xmSelect.render({
-                        el: "#fixCat",
-                        language: 'zn',
-                        data: [{value: "3", name: "储备项目"}, {value: "1", name: "新建项目"}, {
-                            value: "2",
-                            name: "续建项目"
-                        }]
-                    });
                     layui.laydate.render({
                         elem: '#year',
                         type: 'year',
@@ -952,8 +929,8 @@
                         elem: '#importExc'
                         , url: App.getUrl('/api/subject/subInfo/importFixData')
                         , data: {
-                            stateFix: self.getSearchParams().fixCat,
-                            year: self.getSearchParams().year,
+                            stateFix:self.getSearchParams().fixCat,
+                            year:self.getSearchParams().year,
                         }
                         , done: function (res, index, upload) { //上传后的回调
                             if (res.success) {
@@ -1096,11 +1073,8 @@
                     if (this.indusKind) {
                         param.indusKind = this.indusKind.getValue("valueStr");
                     }
-                    if (this.fixCat) {
-                        param.fixCat = this.fixCat.getValue("valueStr");
-                    }
                     delete (param.select)
-                    param.queryTimeType = "0"
+                    param.queryTimeType="0"
                     param.kind = this.kind.getValue("value").sort().join(",");
                     return param;
                 },
@@ -1113,8 +1087,6 @@
                     param.stateFix = this.getSearchParams().fixCat;
                     param.orderType = this.sort.type || null;
                     param.queryType = null;
-                    param.subCat = '2';
-                    param.subYear = this.getSearchParams().year;
                     console.log(param);
                     App.postJson("/api/subInfo/query/all", param, function (res) {
                         self.dataList = res.rows;
@@ -1219,24 +1191,32 @@
                                 }
                             },
                             {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 200, templet: '#subName'},
-                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
-                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
                             {
-                                field: 'offsetLight',
-                                title: '偏离状态',
-                                type: 'string',
-                                align: 'center',
+                                field: 'subjectId',
                                 fixed: 'left',
-                                width: 100,
-                                templet: '#offsetLight'
+                                title: '项目所在地',
+                                minWidth: 200,
+                                templet: '#subjectId' // 指定模板
                             },
+                            // {field: 'abc',type:'string', title: 'ABC',fixed: 'left', align:'center', width: 60, templet: "#abcSpan"},
+                            /*                 {field: 'offset', title: '偏离状态', fixed: 'left', minWidth: 150},*/
+                            // {
+                            //     field: 'offsetLight',
+                            //     title: '偏离状态',
+                            //     type: 'string',
+                            //     align: 'center',
+                            //     fixed: 'left',
+                            //     width: 100,
+                            //     templet: '#offsetLight'
+                            // },
+                            {field: 'content', fixed: 'left', title: '项目建设内容', minWidth: 200, templet: '#content'},
                             {field: 'amtTotal', title: '投资金额', minWidth: 250, templet: '#amt', sort: true},
-                            {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
-                            {field: 'state', title: '计划时间', width: 140, templet: '#date'},
+                            // {field: 'fileId', title: '现场影像', width: 90, templet: '#imageDiv'},
+                            // {field: 'state', title: '计划时间', width: 140, templet: '#date'},
                             // {field: 'leaderName', title: '分管领导', minWidth: 180, templet: '#leaderInfo'},
-                            {field: 'statusName', title: '项目进度', width: 60},
-                            {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
-                            {field: 'unitName', title: '项目单位', minWidth: 110},
+                            {field: 'statusName', title: '进展情况', minWidth: 200},
+                            // {field: 'mainName', title: '日常责任监管单位', minWidth: 100},
+                            // {field: 'unitName', title: '项目单位', minWidth: 110},
                             // { field: 'openLight', title: '开工红黄灯', minWidth: 150, templet: '#openLight' },
                             {title: '操作', width: 180, toolbar: '#toolBar', fixed: 'right',},
                         ]],
@@ -1326,527 +1306,322 @@
                         }
                     })
                 },
-                addLabels: function () {
-                    var layer = layui.layer;
-                    var form = layui.form;
-                    var year = this.getSearchParams().year;
-                    var self = this;
-                    var items = [
-                        <c:forEach items="${BQ}" var="li" varStatus="lis">
-                        {
-                            id: '${li.id}',
-                            title: '${li.title}',
-                        },
-                        </c:forEach>
-                    ];
-
-                   function buildCheckboxString() {
-                        var str = "";
-                        for (let i = 0; i < items.length; i++) {
-                            var count = i + 1;
-                            var hy = items[i];
-                            if (count % 3 === 1) {
-                                // 如果是每三个的第一个,开始新的一行
-                                str += '<tr style="border-bottom: none;">';
-                            }
-                            str += '<td>';
-                      /*      if (val.includes(hy.id)) {
-                                str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" checked="checked" value="' + hy.id + '" title="' + hy.title + '" >';
-                            } else {*/
-                                str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" value="' + hy.id + '" title="' + hy.title + '" >';
-                  /*          }*/
-                            str += '</td>';
-                            if (count % 3 === 0) {
-                                // 如果是每三个的最后一个,结束当前行
-                                str += '</tr>';
-                            }
-                        }
-                        return str;
-                    }
-
-                    // 计算所需的高度
-                    var checkboxCount = items.length;
-                    var rows = checkboxCount / 3;
-                    var height = rows * 30 + 120; // 假设每个复选框和间隔高度为 30px,加上按钮和一些额外空间 100px
-                    var width = 400; // 固定宽度或根据需要调整
-                    // 弹出层
-                   layer.open({
+                toBack: function (obj) {
+                    layer.open({
                         type: 1,
-                        title: '标签',
-                        content:
-                            '<form class="layui-form" action="#" onsubmit="event.preventDefault();">' +
-                            '<div class="layui-form-item">' +
-                            '<div class="layui-input-block" style="margin-left: 60px;">' +
-                            '<table class="layui-table" style="border: none;">' +
-                            ' <tbody ">' +
-                            buildCheckboxString() +
-                            ' </tbody>' +
-                            '</table>' +
-                            '</div>' +
-                            '</div>' +
-                            '<div style="position: absolute; bottom: 15px; width: 100%; text-align: center;">' +
-                            '<button class="layui-btn" style="font-size: inherit;" lay-submit lay-filter="formDemoS">确认</button>' +
-                            '<button class="layui-btn layui-btn-primary" style="font-size: inherit;" onclick="layer.closeAll();">取消</button>' +
-                            '</div>' +
-                            '</form>',
-                        success: function (layero, index) {
-                            // 初始化多选框的样式
-                            layui.use(['form'], function () {
-                                form.render();
-                            });
-                            form.render('checkbox');
-                            form.render();
-                            // 监听提交事件
-                            form.on('submit(formDemoS)', function () {
-                                // 获取选中的值
-                                const checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
-                                const selectedValues = [];
-                                checkboxes.forEach(checkbox => {
-                                    selectedValues.push(checkbox.value);
-                                });
-                                console.log("选中了", selectedValues);
-                                var param = self.getSearchParams();
-                                param.stateFix = self.getSearchParams().fixCat;
-                                param.orderType = self.sort.type || null;
-                                param.queryType = null;
-                                param.subCat = '2';
-                                param.subYear = self.getSearchParams().year;
-                                App.postJson("/api/subject/subInfo/add/labelS", {
-                                    param: param,
-                                    cat: "2",
-                                    year: year,
-                                    labelIdList: selectedValues
-                                }, function (res) {
-                                    if (res.success) {
-                                        // 关闭弹出层
-                                        layer.close(index);
-                                    }
-                                });
-                            });
-                        },
-                        area: [width + 'px', height + 'px'],
-                        offset: 'auto'
-                    });
-            },
-            addLabel: function (obj) {
-                var layer = layui.layer;
-                var form = layui.form;
-                var year = this.getSearchParams().year;
-
-                function getLastSelectedValues() {
-                    return new Promise((resolve, reject) => {
-                        App.postJson("/api/subject/subInfo/query/label", {
-                            id: obj.data.id,
-                            cat: '2',
-                            year: year
-                        }, function (res) {
-                            if (res.success) {
-                                resolve(res.data || []);
-                            } else {
-                                reject();
+                        title: "退回",
+                        content: $("#toBack"),
+                        area: ['600px', ''],
+                        btn: ["保存", "取消"],
+                        yes: function (index) {
+                            var data = layui.form.val("toBackForm");
+                            var status = data.status;
+                            if (status != undefined) {
+                                if (parseInt(obj.data.status) <= parseInt(data.status)) {
+                                    App.msg.warn("只能退回下级状态,请检查!!!!");
+                                    return;
+                                }
+
                             }
-                        });
-                    });
-                }
+                            App.postJson("/api/subject/subInfo/toTemp", {
+                                subId: obj.data.id,
+                                status: data.status
+                            }, function (res) {
+                                if (res.success) {
+                                    layer.msg("成功", {icon: 6, time: 1000});
+                                    //
+                                    window.location.href = App.getUrl("subject/subInfo/projTz?type=1");
+                                }
+                            });
 
-                getLastSelectedValues().then(lastSelectedValues => {
-                    var val = lastSelectedValues;
-                    var self = this;
-                    var items = [
-                        <c:forEach items="${BQ}" var="li" varStatus="lis">
-                        {
-                            id: '${li.id}',
-                            title: '${li.title}',
                         },
-                        </c:forEach>
-                    ];
-
-                    function buildCheckboxString() {
-                        var str = "";
-                        for (let i = 0; i < items.length; i++) {
-                            var count = i + 1;
-                            var hy = items[i];
-                            if (count % 3 === 1) {
-                                // 如果是每三个的第一个,开始新的一行
-                                str += '<tr style="border-bottom: none;">';
-                            }
-                            str += '<td>';
-                            if (val.includes(hy.id)) {
-                                str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" checked="checked" value="' + hy.id + '" title="' + hy.title + '" >';
-                            } else {
-                                str += '<input type="checkbox" lay-skin="primary" name="' + hy.id + '" value="' + hy.id + '" title="' + hy.title + '" >';
-                            }
-                            str += '</td>';
-                            if (count % 3 === 0) {
-                                // 如果是每三个的最后一个,结束当前行
-                                str += '</tr>';
-                            }
+                        close: function (index) {
+                            layer.close(index);
                         }
-                        return str;
-                    }
+                    })
+                },
 
-                    // 计算所需的高度
-                    var checkboxCount = items.length;
-                    var rows = checkboxCount / 3;
-                    var height = rows * 30 + 120; // 假设每个复选框和间隔高度为 30px,加上按钮和一些额外空间 100px
-                    var width = 400; // 固定宽度或根据需要调整
 
-                    // 弹出层
+                problem: function (obj) {
+                    var self = this;
+                    obj.data.status_reason = "";
+                    layui.form.val("problemForm", obj.data);
                     layer.open({
                         type: 1,
-                        title: '标签',
-                        content:
-                            '<form class="layui-form" action="#" onsubmit="event.preventDefault();">' +
-                            '<div class="layui-form-item">' +
-                            '<div class="layui-input-block" style="margin-left: 60px;">' +
-                            '<table class="layui-table" style="border: none;">' +
-                            ' <tbody ">' +
-                            buildCheckboxString() +
-                            ' </tbody>' +
-                            '</table>' +
-                            '</div>' +
-                            '</div>' +
-                            '<div style="position: absolute; bottom: 15px; width: 100%; text-align: center;">' +
-                            '<button class="layui-btn" style="font-size: inherit;" lay-submit lay-filter="formDemo">确认</button>' +
-                            '<button class="layui-btn layui-btn-primary" style="font-size: inherit;" onclick="layer.closeAll();">取消</button>' +
-                            '</div>' +
-                            '</form>',
-                        success: function (layero, index) {
-                            // 初始化多选框的样式
-                            layui.use(['form'], function () {
-                                form.render();
-                            });
-                            form.render('checkbox');
-                            form.render();
-                            // 监听提交事件
-                            form.on('submit(formDemo)', function () {
-                                // 获取选中的值
-                                const checkboxes = document.querySelectorAll('input[type="checkbox"]:checked');
-                                const selectedValues = [];
-                                checkboxes.forEach(checkbox => {
-                                    selectedValues.push(checkbox.value);
-                                });
-                                /*          if (selectedValues.length === 0) {
-                                              layer.msg('请至少选择一个标签');
-                                              return;
-                                          }*/
-                                console.log("选中了", selectedValues);
-                                App.postJson("/api/subject/subInfo/add/label", {
-                                    id: obj.data.id,
-                                    cat: "2",
-                                    year: year,
-                                    labelIdList: selectedValues
-                                }, function (res) {
-                                    if (res.success) {
-                                        // 关闭弹出层
-                                        layer.close(index);
-                                    }
-                                });
+                        title: "问题督办",
+                        content: $("#problem"),
+                        area: ['800px', '600px'],
+                        btn: ["保存", "取消"],
+                        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("红灯,黄灯必须输入原因");
+                                    return;
+                                }
+                            }
+                            App.postJson("/api/subject/subInfo/setStatus", {
+                                subId: obj.data.id,
+                                statusFgw: reason.statusF,
+                                reason: reason.status_reason,
+                                dateConfirm: reason.dateConfirm
+                            }, function (res) {
+                                if (res.success) {
+                                    App.msg.success("设置成功");
+                                    self.getData();
+                                    layer.close(index);
+                                }
                             });
                         },
-                        area: [width + 'px', height + 'px'],
-                        offset: 'auto'
+                        close: function (index) {
+                            layer.close(index);
+                        }
+                    })
+                },
+                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"),"GET", param,"项目详情信息表.xlsx", "导出失败");
+                }, */
+                exportMoreExcel: function () {
+                    top.window.getSearchParams = this.getSearchParams;
+                    App.openLayer({
+                        title: "自定义导出",
+                        content: App.getUrl("/subInfoExport/index"),
+                        height: "800",
+                        width: "1000"
+                    })
+                },
+                toDetail: function (obj) {
+                    //详情
+                    var index = layer.open({
+                        type: 2,
+                        title: "",
+                        area: ['1000px', '800px'],
+                        content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href + "&queryYear=" + obj.data.queryYear),
                     });
-                }).catch(error => {
-                    console.error("无法获取上次选中的值", error);
-                    layer.msg('无法获取上次选中的值,请稍后再试');
-                });
-            },
+                    layui.layer.full(index);
+                },
+                print: function (obj) {
+                    window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
+                },
+                toEditSubInfo: function (obj) {
+                    window.location.href = App.getUrl("/subject/subInfo/editSubInfo?subId=" + obj.data.id);
+                },
+                toTh: function (obj) {
+                    if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
+                        App.msg.confirm("是否需要退回到暂存状态?", function () {
+                            App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id}, function (res) {
+                                if (res.success) {
+                                    layer.msg("成功", {icon: 6, time: 1000});
+                                    //
+                                    window.location.href = App.getUrl("subject/subInfo/projTz");
+                                }
+                            });
+                        })
+                    } else {
+                        App.msg.warn("已做过开工申报,需要走变更流程");
+                    }
+                },
+                changeTg: function (obj) {
+                    var self = this;
 
-            toBack: function (obj) {
-                layer.open({
-                    type: 1,
-                    title: "退回",
-                    content: $("#toBack"),
-                    area: ['600px', ''],
-                    btn: ["保存", "取消"],
-                    yes: function (index) {
-                        var data = layui.form.val("toBackForm");
-                        var status = data.status;
-                        if (status != undefined) {
-                            if (parseInt(obj.data.status) <= parseInt(data.status)) {
-                                App.msg.warn("只能退回下级状态,请检查!!!!");
+                    // var msgConfirm = (obj.data.status == '7' ? '确认变更为停工状态?' : '确认变更为开工状态?');
+                    // App.msg.confirm(msgConfirm, function () {
+
+                    layer.open({
+                        type: 1,
+                        title: obj.data.status == '7' ? '停工日期' : '开工日期',
+                        content: $("#openAndEndDate"),
+
+                        btn: ["保存", "取消"],
+                        yes: function (index) {
+                            var reason = layui.form.val("openForm");
+
+                            if (reason.openDate == null || reason.openDate == "") {
+                                App.msg.warn("日期不能为空");
                                 return;
                             }
 
+                            App.postJson("/api/subject/subInfo/changeTg", {
+                                subId: obj.data.id,
+                                openDate: reason.openDate
+                            }, function (res) {
+                                if (res.success) {
+                                    App.msg.success("变更成功");
+                                    layer.close(index);
+                                    self.getData();
+                                }
+                            })
+                        },
+                        close: function (index) {
+                            layer.close(index);
                         }
-                        App.postJson("/api/subject/subInfo/toTemp", {
-                            subId: obj.data.id,
-                            status: data.status
-                        }, function (res) {
-                            if (res.success) {
-                                layer.msg("成功", {icon: 6, time: 1000});
-                                //
-                                window.location.href = App.getUrl("subject/subInfo/projTz?type=1");
-                            }
-                        });
+                    })
 
-                    },
-                    close: function (index) {
-                        layer.close(index);
-                    }
-                })
-            },
 
+                    // })
 
-            problem: function (obj) {
-                var self = this;
-                obj.data.status_reason = "";
-                layui.form.val("problemForm", obj.data);
-                layer.open({
-                    type: 1,
-                    title: "问题督办",
-                    content: $("#problem"),
-                    area: ['800px', '600px'],
-                    btn: ["保存", "取消"],
-                    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("红灯,黄灯必须输入原因");
-                                return;
-                            }
-                        }
-                        App.postJson("/api/subject/subInfo/setStatus", {
-                            subId: obj.data.id,
-                            statusFgw: reason.statusF,
-                            reason: reason.status_reason,
-                            dateConfirm: reason.dateConfirm
-                        }, function (res) {
+
+                },
+
+                isNoHide: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否移除在建库?", function () {
+                        App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
                             if (res.success) {
                                 App.msg.success("设置成功");
                                 self.getData();
                                 layer.close(index);
                             }
                         });
-                    },
-                    close: function (index) {
-                        layer.close(index);
-                    }
-                })
-            },
-            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"),"GET", param,"项目详情信息表.xlsx", "导出失败");
-            }, */
-            exportMoreExcel: function () {
-                top.window.getSearchParams = this.getSearchParams;
-                App.openLayer({
-                    title: "自定义导出",
-                    content: App.getUrl("/subInfoExport/index"),
-                    height: "800",
-                    width: "1000"
-                })
-            },
-            toDetail: function (obj) {
-                //详情
-                var index = layer.open({
-                    type: 2,
-                    title: "",
-                    area: ['1000px', '800px'],
-                    content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href + "&queryYear=" + obj.data.queryYear),
-                });
-                layui.layer.full(index);
-            },
-            print: function (obj) {
-                window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
-            },
-            toEditSubInfo: function (obj) {
-                window.location.href = App.getUrl("/subject/subInfo/editSubInfo?subId=" + obj.data.id);
-            },
-            toTh: function (obj) {
-                if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
-                    App.msg.confirm("是否需要退回到暂存状态?", function () {
-                        App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id}, function (res) {
+                    });
+                },
+                leaderSupervise: function (obj) {
+
+                    App.openLayer({
+                        title: "督办信息",
+                        content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
+                        height: "600",
+                        width: "800"
+                    })
+
+                },
+                isHide: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否隐藏?", function () {
+                        App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
                             if (res.success) {
-                                layer.msg("成功", {icon: 6, time: 1000});
-                                //
-                                window.location.href = App.getUrl("subject/subInfo/projTz");
+                                App.msg.success("设置成功");
+                                self.getData();
+                                layer.close(index);
                             }
                         });
-                    })
-                } else {
-                    App.msg.warn("已做过开工申报,需要走变更流程");
-                }
-            },
-            changeTg: function (obj) {
-                var self = this;
-
-                // var msgConfirm = (obj.data.status == '7' ? '确认变更为停工状态?' : '确认变更为开工状态?');
-                // App.msg.confirm(msgConfirm, function () {
-
-                layer.open({
-                    type: 1,
-                    title: obj.data.status == '7' ? '停工日期' : '开工日期',
-                    content: $("#openAndEndDate"),
-
-                    btn: ["保存", "取消"],
-                    yes: function (index) {
-                        var reason = layui.form.val("openForm");
+                    });
+                },
 
-                        if (reason.openDate == null || reason.openDate == "") {
-                            App.msg.warn("日期不能为空");
-                            return;
-                        }
 
-                        App.postJson("/api/subject/subInfo/changeTg", {
+                addSub: function (index, data) {
+                    var self = this;
+                    App.msg.confirm("是否纳入年度固定资产投资项目库?", function () {
+                        App.postJson("/api/subject/subInfo/setIsFix", {
+                            subId: data.id,
+                            year: data.year,
+                            isFix: "1",
+                            stateFix:self.getSearchParams().fixCat
+                        }, function (res) {
+                            if (res.success) {
+                                top.layer.close(index);
+                                App.msg.success("纳入成功");
+                                self.getData();
+                            }
+                        });
+                    });
+                },
+                isNoFix: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否取消纳入?", function () {
+                        App.postJson("/api/subject/subInfo/setIsFix", {
                             subId: obj.data.id,
-                            openDate: reason.openDate
+                            isFix: "0",
+                            year: self.getSearchParams().year,
+                            stateFix: self.getSearchParams().fixCat
                         }, function (res) {
                             if (res.success) {
-                                App.msg.success("变更成功");
-                                layer.close(index);
+                                App.msg.success("设置成功");
                                 self.getData();
+                                layer.close(index);
                             }
-                        })
-                    },
-                    close: function (index) {
-                        layer.close(index);
-                    }
-                })
-
-
-                // })
-
-
-            },
-
-            isNoHide: function (obj) {
-                var self = this;
-                App.msg.confirm("是否移除在建库?", function () {
-                    App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
-                        if (res.success) {
-                            App.msg.success("设置成功");
-                            self.getData();
-                            layer.close(index);
-                        }
+                        });
                     });
-                });
-            },
-            leaderSupervise: function (obj) {
-
-                App.openLayer({
-                    title: "督办信息",
-                    content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
-                    height: "600",
-                    width: "800"
-                })
-
-            },
-            isHide: function (obj) {
-                var self = this;
-                App.msg.confirm("是否隐藏?", function () {
-                    App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
-                        if (res.success) {
-                            App.msg.success("设置成功");
-                            self.getData();
-                            layer.close(index);
-                        }
+                },
+                updateFixeCat: function (obj) {
+                    var self = this;
+                    App.msg.confirm("是否转入新建库?", function () {
+                        App.postJson("/api/subject/subInfo/setIsFix", {
+                            subId: obj.data.id,
+                            isFix: "0",
+                            year: self.getSearchParams().year,
+                            stateFix: self.getSearchParams().fixCat
+                        }, function (res) {
+                            if (res.success) {
+                                App.msg.success("设置成功");
+                                self.getData();
+                                layer.close(index);
+                            }
+                        });
                     });
-                });
-            },
-
+                },
 
-            addSub: function (index, data) {
-                var self = this;
-                App.msg.confirm("是否纳入年度固定资产投资项目库?", function () {
-                    App.postJson("/api/subject/subInfo/setIsFix", {
-                        subId: data.id,
-                        year: data.year,
-                        isFix: "1",
-                        stateFix: self.getSearchParams().fixCat
-                    }, function (res) {
-                        if (res.success) {
-                            top.layer.close(index);
-                            App.msg.success("纳入成功");
-                            self.getData();
+                intoSub: function () {
+                    top.window.addSubInfo = this.addSub;
+                    var param = this.getSearchParams();
+                    App.openLayer({
+                        title: "项目纳入",
+                        content: App.getUrl("/subject/subInfo/chooseSubInto?year=" + param.year),
+                        end: function () {
+                            top.window.addSubInfo = null;
                         }
                     });
-                });
-            }, isNoFix: function (obj) {
-                var self = this;
-                App.msg.confirm("是否取消纳入?", function () {
-                    App.postJson("/api/subject/subInfo/setIsFix", {
-                        subId: obj.data.id,
-                        isFix: "0",
-                        year: self.getSearchParams().year,
-                        stateFix: self.getSearchParams().fixCat
+                },
+                subInfoToSubFix: function () {
+                    var self = this;
+                    var param = this.getSearchParams();
+                    App.postJson("/api/subject/subInfo/subInfoToSubFix", {
+                        year: param.year,
+                        cat: 9      // 代表抓取新建项目
                     }, function (res) {
                         if (res.success) {
-                            App.msg.success("设置成功");
+                            App.msg.success("抓取成功");
                             self.getData();
-                            layer.close(index);
                         }
-                    });
-                });
-            },
-
-            intoSub: function () {
-                top.window.addSubInfo = this.addSub;
-                var param = this.getSearchParams();
-                App.openLayer({
-                    title: "项目纳入",
-                    content: App.getUrl("/subject/subInfo/chooseSubInto?year=" + param.year),
-                    end: function () {
-                        top.window.addSubInfo = null;
-                    }
-                });
-            },
-            downLoadTemplate: function () {
-                parent.window.location.href = App.getUrl(
-                    "/subject/subInfo/downLoadFixTemplate"
-                );
-            },
-            uploadProject: function () {
-                $("#importExc").click();
-                self.getData();
-            },
-            exportProject: function () {
-                console.log('导出')
-           /*     var param = this.getSearchParams();*/
-           /*     param.stateFix = this.getSearchParams().fixCat;*/
-                var param = this.getSearchParams();
-       /*         param.pageNo = this.pageNo;
-                param.pageSize = this.pageSize;*/
-/*                param.orderBy = this.sort.field;*/
-                param.stateFix = this.getSearchParams().fixCat;
-                param.orderType = this.sort.type || null;
-                param.queryType = null;
-                param.subCat = '2';
-                param.subYear = this.getSearchParams().year;
-                App.common.utils.downFile(App.getUrl("/subInfoExport/exportFixExcel"), "POST", param, "年度固定资产项目.xlsx", "导出失败");
-            },
-            search: function () {
-                var param = layui.form.getValue("searchForm");
-                window.localStorage.setItem(this.cacheName, JSON.stringify(param));
-                this.pageNo = 1;
-                this.getData();
-            },
-            openExport: function () {
-                this.showExport = true;
-                console.log('移入了')
-            },
-            choseExport: function () {
-                this.showExport = false;
-                console.log('移出了')
+                    })
+                },
+                downLoadTemplate: function () {
+                    parent.window.location.href = App.getUrl(
+                        "/subject/subInfo/downLoadFixTemplate"
+                    );
+                },
+                uploadProject: function () {
+                    $("#importExc").click();
+                    self.getData();
+                },
+                exportProject: function () {
+                    console.log('导出')
+                    var param = this.getSearchParams();
+                    param.stateFix = this.getSearchParams().fixCat;
+                    param.isFix = '1';
+                    App.common.utils.downFile(App.getUrl("/subInfoExport/exportFixExcel"), "POST", param, "年度固定资产项目.xlsx", "导出失败");
+                },
+                search: function () {
+                    var param = layui.form.getValue("searchForm");
+                    window.localStorage.setItem(this.cacheName, JSON.stringify(param));
+                    this.pageNo = 1;
+                    this.getData();
+                },
+                openExport: function () {
+                    this.showExport = true;
+                    console.log('移入了')
+                },
+                choseExport: function () {
+                    this.showExport = false;
+                    console.log('移出了')
+                }
             }
-        }
-        })
-        ;
+        });
     </script>
 </body>