openWarn.jsp 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <jsp:include page="../../common/common-meta-include.jsp"></jsp:include>
  8. <jsp:include page="../../common/common-js-include.jsp"></jsp:include>
  9. <jsp:include page="../../common/common-css-include.jsp"></jsp:include>
  10. <!--[if lt IE 9]>
  11. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  12. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  13. <![endif]-->
  14. <style type="text/css">
  15. .layui-table-view .layui-table td > div>span,
  16. .layui-table-view .layui-table td > div{
  17. /*min-height: 85px !important;*/
  18. /*white-space: normal;*/
  19. line-height: 22px !important;
  20. display: -webkit-box; /* 使用旧版的弹性盒子布局 */
  21. -webkit-box-orient: vertical; /* 设置为垂直方向排列 */
  22. overflow: hidden; /* 隐藏溢出内容 */
  23. text-overflow: ellipsis; /* 使用省略号表示溢出内容 */
  24. -webkit-line-clamp: 2; /* 显示的行数 */
  25. }
  26. .table_box .table_process .layui-table-cell {
  27. height: 65px;
  28. }
  29. .layui-table-header .layui-table-cell{
  30. height: 42px !important;
  31. }
  32. /*.table_box .table_process .layui-table-cell {*/
  33. /* height: 75px;*/
  34. /*}*/
  35. .layui-table-col-special .layui-table-cell{
  36. display:flex;
  37. justify-content:space-between;
  38. }
  39. .queryTimeType{
  40. margin-top: -4px;
  41. position: absolute;
  42. }
  43. .hiddenParam {
  44. display: none;
  45. }
  46. .morePan{
  47. margin-top: 9px;
  48. position: absolute;
  49. }
  50. .morePan a{
  51. color: #2C6EC6;
  52. }
  53. .table_box .table_process{
  54. height: fit-content;
  55. max-height: 60vh;
  56. overflow-x: scroll;
  57. overflow-y: scroll;
  58. }
  59. .table_box .layui-form{
  60. width:fit-content;
  61. }
  62. </style>
  63. </head>
  64. <body>
  65. <div id="app"></div>
  66. <template id="template">
  67. <div class="layui-layout layui-layout-admin pd0">
  68. <!-- 内容区域 -->
  69. <div class="right_title">
  70. <div class="txt">新建转在建超期 <div class="top-breadcrumb"></div></div>
  71. <div class="layui-collapse search_form">
  72. <div class="layui-colla-item">
  73. <%-- <h2 class="layui-colla-title">筛选</h2>--%>
  74. <div class="layui-colla-content layui-show">
  75. <form class="layui-form" lay-filter="searchForm">
  76. <input type="hidden" name="queryType" value="3">
  77. <input type="hidden" name="subjectId" value="${subjectId }">
  78. <input type="hidden" name="mainId" value="${mainId }">
  79. <input type="hidden" name="sourceId" value="${sourceId }">
  80. <input type="hidden" name="hyfl" value="${hyfl }">
  81. <input type="hidden" name="code" value="${code}">
  82. <div class="layui-row">
  83. <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
  84. <div class="layui-form-item">
  85. <label class="layui-form-label">项目名称</label>
  86. <div class="layui-input-block">
  87. <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">
  88. </div>
  89. </div>
  90. </div>
  91. <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
  92. <div class="layui-form-item" style="height:28px;">
  93. <label class="layui-form-label">问题类型</label>
  94. <div class="layui-input-block">
  95. <select id="lightType" name="lightType">
  96. <option value="">所有</option>
  97. <option value="1">超期红灯</option>
  98. <option value="2">超期黄灯</option>
  99. </select>
  100. </div>
  101. </div>
  102. </div>
  103. <%-- <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">--%>
  104. <%-- <div class="layui-form-item" style="height:28px;">--%>
  105. <%-- <label class="layui-form-label">项目类型</label>--%>
  106. <%-- <div class="layui-input-block">--%>
  107. <%-- <div id="kind" name="kind"></div>--%>
  108. <%-- </div>--%>
  109. <%-- </div>--%>
  110. <%-- </div>--%>
  111. <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
  112. <div class="layui-form-item" style="height:28px;">
  113. <label class="layui-form-label">建设性质</label>
  114. <div class="layui-input-block">
  115. <div id="propKind" name="propKind"></div>
  116. </div>
  117. </div>
  118. </div>
  119. <%-- <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">--%>
  120. <%-- <div class="layui-form-item" style="height:28px;">--%>
  121. <%-- <label class="layui-form-label">所属行业</label>--%>
  122. <%-- <div class="layui-input-block">--%>
  123. <%-- <div id="indusKind" name="hyfl"></div>--%>
  124. <%-- </div>--%>
  125. <%-- </div>--%>
  126. <%-- </div>--%>
  127. </div>
  128. <div class="layui-row">
  129. <div class="layui-col-xs12 layui-col-sm12 layui-col-md3">
  130. <button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
  131. <%-- <span class="layui-btn layui-btn-normal" style="position:relative;z-index:9" @click="backHis()">--%>
  132. <%-- 返回--%>
  133. <%-- </span>--%>
  134. <!-- <button type="button" class="layui-btn layui-btn-export" @click="exportExcel">导出</button> -->
  135. </div>
  136. </div>
  137. </form>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. <div>
  143. <div class="layui-row class_ls">
  144. <div class="layui-form-item" style="display: flex">
  145. <label class="juli">
  146. 问题总数<span class="lanse-first">{{numData.total}}个</span>
  147. <div class="progress-div">
  148. <div class="layui-progress">
  149. <div class="layui-progress-bar"></div>
  150. </div>
  151. </div>
  152. </label>
  153. <label class="juli">
  154. 红灯数量<span class="lanse-first">{{numData.redNum}}个</span>
  155. <div class="progress-div">
  156. <div class="layui-progress">
  157. <div class="layui-progress-bar" :style="'width:'+numData.redRate"></div>
  158. </div>
  159. </div>
  160. </label>
  161. <label class="juli">
  162. 黄灯数量<span class="lanse-first">{{numData.yellowNum}}</span>
  163. <div class="progress-div">
  164. <div class="layui-progress">
  165. <div class="layui-progress-bar" :style="'width:'+numData.yellowRate"></div>
  166. </div>
  167. </div>
  168. </label>
  169. </div>
  170. </div>
  171. </div>
  172. <div>
  173. </div>
  174. <div class="table_box" style="padding-top: 0;">
  175. <div class="table_process">
  176. <table id="table1" lay-filter="test"></table>
  177. </div>
  178. <div class="pagination-box" id="pagination"></div>
  179. </div>
  180. <div style="height: 20px;"></div>
  181. </div>
  182. </template>
  183. <div id="problem" class="layuimini-main" style="display: none;">
  184. <form class="layui-form" lay-filter="problemForm">
  185. <div class="layui-row">
  186. <div class="layui-col-xs12 layui-col-sm12">
  187. <div class="layui-form-item">
  188. <label class="layui-form-label">状态:</label>
  189. <div class="layui-input-block">
  190. <input type="radio" name="statusF" value="2" title="红灯" checked="checked"/>
  191. <input type="radio" name="statusF" value="1" title="黄灯"/>
  192. <input type="radio" name="statusF" value="0" title="绿灯"/>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="layui-row">
  198. <div class="layui-col-xs12 layui-col-sm12">
  199. <div class="layui-form-item">
  200. <label class="layui-form-label">问题描述:</label>
  201. <div class="layui-input-block">
  202. <textarea name="status_reason" maxlength="400" style="height: 300px;width: 80%;" id="problemReason" autocomplete="off" class="layui-textarea"></textarea>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <div class="layui-row">
  208. <div class="layui-col-xs12 layui-col-sm12">
  209. <div class="layui-form-item">
  210. <label class="layui-form-label">要求解决日期:</label>
  211. <div class="layui-input-block " style="width: 25%">
  212. <input type="text" id="dateConfirm" name="dateConfirm" autocomplete="off" class="layui-input" >
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </form>
  218. </div>
  219. <script type="text/html" id="subName">
  220. <span title="{{d.subName}}">{{d.subName}}</span>
  221. </script>
  222. <script type="text/html" id="info">
  223. {{d.nameZrr}}<br/>{{d.tel}}
  224. </script>
  225. <script type="text/html" id="amt">
  226. {{# var computedPer = function(total, now){
  227. return (total == 0) ? 0 : parseInt(now * 100 / total +0.5);
  228. };
  229. }}
  230. <span title="">总投资:{{d.amtTotal}}万元 <br/>
  231. 年度计划投资:{{d.yearPlanAmt}}万元 <br/>
  232. 年度完成投资:{{d.yearEndAmt}}万元( {{computedPer(d.yearPlanAmt, d.yearEndAmt)}} %)</span>
  233. </script>
  234. <script type="text/html" id="date">
  235. <div title="">
  236. <div class="line">计划开工:{{d.beginDate}}
  237. </div>
  238. <div class="line">计划竣工:{{d.endDate}}
  239. </div>
  240. </div>
  241. </script>
  242. <script type="text/html" id="abcSpan">
  243. <span style="font-size:28px;font-weigh:500 !important;">{{d.abc||''}}</span>
  244. </script>
  245. <script type="text/html" id="toolBar">
  246. <div class="toolBar">
  247. <span title="项目信息" lay-event="toDetail">项目信息</span>
  248. <span title="短信" lay-event="toMsgLog">短信</span>
  249. <span title="短信发送" lay-event="sendMsg">短信发送</span>
  250. <span title="督办函" lay-event="toDbh">督办函</span>
  251. </div>
  252. </script>
  253. <script type="text/html" id="preInfo">
  254. <span title="">
  255. {{# if(d.xmbaIs == '' || d.xmbaIs == null ) { }}
  256. 项目备案:未办理 <br/>
  257. {{#} else if(d.xmbaIs == '2' ) { }}
  258. 项目备案:无需办理 <br/>
  259. {{#} else { }}
  260. {{# if(d.xmbaStatus == '' || d.xmbaStatus == null ) { }}
  261. 项目备案:未办理 <br/>
  262. {{#} else if(d.xmbaStatus == '0') { }}
  263. 项目备案:未办理 <br/>
  264. {{#} else if(d.xmbaStatus == '1') { }}
  265. 项目备案:开始办理 <br/>
  266. {{#} else if(d.xmbaStatus == '2') { }}
  267. 项目备案:已办理 <br/>
  268. {{#} }}
  269. {{#} }}
  270. {{# if(d.yjbgIs == '' || d.yjbgIs == null ) { }}
  271. 可行性研究报告:未办理 <br/>
  272. {{#} else if(d.yjbgIs == '2' ) { }}
  273. 可行性研究报告:无需办理 <br/>
  274. {{#} else { }}
  275. {{# if(d.yjbgStatus == '' || d.yjbgStatus == null ) { }}
  276. 可行性研究报告:未办理 <br/>
  277. {{#} else if(d.yjbgStatus == '0') { }}
  278. 可行性研究报告:未办理 <br/>
  279. {{#} else if(d.yjbgStatus == '1') { }}
  280. 可行性研究报告:开始办理 <br/>
  281. {{#} else if(d.yjbgStatus == '2') { }}
  282. 可行性研究报告:已办理 <br/>
  283. {{#} }}
  284. {{#} }}
  285. </span>
  286. </script>
  287. <script type="text/html" id="imageDiv">
  288. <div style="width:50px;height:50px" onclick="showImage(this)">
  289. {{# if(d.fileId != null && d.fileId != '') { }}
  290. <img src="${domain}/static/file/{{d.fileId}}/showfile" realUrl="${domain}/static/file/{{d.fileId}}/showfile" width="50px" height="50px"/>
  291. {{#} }}
  292. </div>
  293. </script>
  294. <script type="text/html" id="offsetLight">
  295. {{#if(d.offset >= -30 && d.offset <= -10 ) { }}
  296. <span style="color: yellow"><image class="light-rgb" src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  297. {{#} else if(d.offset < -30) { }}
  298. <span style="color: red"><image class="light-rgb" src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  299. {{#}}}
  300. </script>
  301. <script type="text/html" id="dayNum">
  302. {{d.num1}}-{{d.num2}}
  303. </script>
  304. <script type="text/html" id="openLight">
  305. {{# var computedPer1 = function(beginDate){
  306. var beginDate =new Date(beginDate);
  307. var beginDate7 =new Date(beginDate);
  308. var beginDate3 =new Date(beginDate);
  309. beginDate7.setDate(beginDate7.getDate()-7);
  310. beginDate3.setDate(beginDate3.getDate()-3);
  311. var newDate = new Date();
  312. if(newDate.getTime() >=beginDate7.getTime() && newDate.getTime() <=beginDate3.getTime()){
  313. return "yellow";
  314. }else if(newDate.getTime() >=beginDate3.getTime() && newDate.getTime() <= beginDate.getTime() ){
  315. return "red";
  316. }else{
  317. return "-";
  318. }
  319. };
  320. }}
  321. {{#if(computedPer1(d.beginDate)=="yellow" ) { }}
  322. <span style="color: yellow"> <image class="light-rgb" src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  323. {{#} else if(computedPer1(d.beginDate)=="red") { }}
  324. <span style="color: red" > <image class="light-rgb" src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  325. {{#}}}
  326. </script>
  327. <script>
  328. new Vue({
  329. el: "#app",
  330. template: "#template",
  331. data: {
  332. winH: 0,
  333. dataList : [],
  334. startDate:"",
  335. endDate:"",
  336. LightType:"",
  337. tableName : 'test',
  338. pageNo : 1,
  339. kind: {},
  340. numData:{},
  341. beginRate: {},
  342. showMoreFlag: false,
  343. light: null,
  344. sort: {field: "amtTotal", type:""},
  345. pageSize : 10
  346. },
  347. mounted : function() {
  348. this.init()
  349. },
  350. methods: {
  351. init : function() {
  352. this.winH = document.body.clientHeight
  353. layui.laydate.render({
  354. elem: '#startTime',
  355. theme: layDateTheme,
  356. range: '~'
  357. });
  358. if("${type}"=== "1" ){
  359. this.lightType="1";
  360. }else{
  361. this.lightType="2";
  362. }
  363. var seleDatas = [], jsxz = [], xmlx = [];
  364. <%-- <c:forEach items="${HYFL }" var="hy">--%>
  365. <%-- seleDatas.push({value:'${hy.id}',name:'${hy.title}'});--%>
  366. <%-- </c:forEach>--%>
  367. <%-- this.indusKind = layui.xmSelect.render({--%>
  368. <%-- el:'#indusKind',--%>
  369. <%-- language:'zn',--%>
  370. <%-- data: seleDatas--%>
  371. <%-- });--%>
  372. <c:forEach items="${JSXZ}" var="js">
  373. jsxz.push({value: '${js.code}', name:'${js.title}'});
  374. </c:forEach>
  375. this.propKind = layui.xmSelect.render({
  376. el:'#propKind',
  377. language:'zn',
  378. data: jsxz
  379. });
  380. <%-- <c:forEach items="${XMLX}" var="xm">--%>
  381. <%-- xmlx.push({value: '${xm.code}', name: '${xm.title}'});--%>
  382. <%-- </c:forEach>--%>
  383. <%-- this.kind = layui.xmSelect.render({--%>
  384. <%-- el: "#kind",--%>
  385. <%-- language:'zn',--%>
  386. <%-- data:xmlx--%>
  387. <%-- });--%>
  388. this.getData();
  389. window.addEventListener('message', this.receiveMessage, false);
  390. window.parent.postMessage('init loaded')
  391. window.toDetail = this.toDetail;
  392. window.showImage = this.showImage;
  393. },
  394. showImage: function(that) {
  395. var imageUrl = $(that).find("img").eq(0).attr("realUrl");
  396. if(imageUrl) {
  397. layer.open({
  398. type: 2,
  399. content: imageUrl,
  400. area: ['500px', '1000px'],
  401. offset: 'auto',
  402. success: function(obj,index){
  403. layer.full(index);
  404. }
  405. })
  406. }
  407. },
  408. setQueryForm2: function() {
  409. $("#searchForm").find(".layui-form-item").parent()
  410. .removeClass("layui-col-xs3").removeClass("layui-col-sm3").removeClass("layui-col-md3")
  411. .addClass("layui-col-xs5").addClass("layui-col-sm5").addClass("layui-col-md5");
  412. },
  413. setQueryForm4: function() {
  414. $("#searchForm").find(".layui-form-item").parent()
  415. .removeClass("layui-col-xs5").removeClass("layui-col-sm5").removeClass("layui-col-md5")
  416. .addClass("layui-col-xs3").addClass("layui-col-sm3").addClass("layui-col-md3");
  417. },
  418. showMore: function() {
  419. var self = this;
  420. layer.open({
  421. title: "查询条件",
  422. type: 1,
  423. area: ['90%','700px'],
  424. content: $("#searchForm"),
  425. btn: ["查询"],
  426. yes: function(index) {
  427. self.search();
  428. layer.close(index);
  429. },
  430. success: function() {
  431. self.setQueryForm2();
  432. $(".hiddenParam").show();
  433. },
  434. end: function() {
  435. self.setQueryForm4();
  436. $(".hiddenParam").hide();
  437. }
  438. })
  439. },
  440. getSearchParams: function() {
  441. var param = layui.form.getValue("searchForm");
  442. if(param.rangeDate) {
  443. param.beginDate = param.rangeDate.split(" ~ ")[0];
  444. param.endDate = param.rangeDate.split(" ~ ")[1];
  445. param.rangeDate = null;
  446. }
  447. if(this.light) {
  448. param.light = this.light.getValue("valueStr");
  449. }
  450. delete(param.select);
  451. // param.kind = this.kind.getValue("value").sort().join(",");
  452. param.propKind = this.propKind.getValue("value").sort().join(",");
  453. return param;
  454. },
  455. sendMsg: function(obj) {
  456. //alert(JSON.stringify(obj.data));
  457. var content = "【市发改委】哈密市发改委提醒:您监管/负责的【" + obj.data.subName + "】项目," +
  458. "项目开工已逾期,请及时关注并处理!";
  459. top.layer.open({
  460. title: "短信内容",
  461. type: 2,
  462. area: ["600px", "400px"],
  463. content: App.getUrl("/msgLog/sendMsg?layer=true&content=" + content + "&subId=" + obj.data.id + "&kind=开工逾期&item=项目开工"),
  464. /* btn: ["发送", "取消"],*/
  465. yes: function () {
  466. /* App.msg.confirm("确认发送逾期短信到该项目负责人?", function () {
  467. App.postJson("/api/msgLog/sendDueMsg", {
  468. subId: obj.data.subId,
  469. kind: "手续超期"
  470. }, function (res) {
  471. App.msg.success("发送成功");
  472. })
  473. })*/
  474. top.layer.closeAll();
  475. }, close: function (index) {
  476. top.layer.close(index);
  477. }
  478. })
  479. },
  480. getData : function(){
  481. var self = this;
  482. var param = this.getSearchParams();
  483. param.pageNo = this.pageNo;
  484. param.pageSize = this.pageSize;
  485. param.orderBy = this.sort.field;
  486. param.orderType = this.sort.type || null;
  487. App.postJson("/api/problemInfo/pageQueryXjToZjDataRedYellow",param, function(res){
  488. console.log(res.data)
  489. self.numData = res.data;
  490. });
  491. App.postJson("/api/problemInfo/pageQueryXjToZjData",param, function(res){
  492. self.dataList = res.rows;
  493. self.loadPage(res.total);
  494. self.loadTable();
  495. });
  496. },
  497. backHis: function (){
  498. // if() {
  499. // window.history.back(-1);
  500. window.location.href = "${lastUrl}";
  501. <%--}else {--%>
  502. <%-- window.location.href="";--%>
  503. <%--}--%>
  504. },
  505. loadTable : function(){
  506. for(var i=0;i<this.dataList.length;i++){
  507. var tem = this.dataList[i];
  508. switch(tem.status){
  509. case '0':
  510. tem.statusName = '暂存';
  511. break;
  512. case '1':
  513. tem.statusName = '项目前期';
  514. break;
  515. case '6':
  516. tem.statusName = '待开工';
  517. break;
  518. case '7':
  519. tem.statusName = '施工中';
  520. break;
  521. /* case '9':
  522. tem.statusName = '年度竣工';
  523. break; */
  524. case '8':
  525. tem.statusName = '暂停施工';
  526. break;
  527. case 'A':
  528. tem.statusName = '已竣工';
  529. break;
  530. }
  531. }
  532. var self = this;
  533. layui.table.render({
  534. elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
  535. even: true,
  536. autoSort: false,
  537. initSort: self.sort,
  538. cols: [[ // 设置表头
  539. {type: 'numbers', fixed: 'left', align: 'center',title:'序号'},
  540. // {field: 'abc', title: 'ABC',fixed: 'left', width: 70, templet: "#abcSpan"},
  541. {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 300, templet: '#subName'},
  542. {field: 'beginDate', title: '计划开工时间', width: 100},
  543. {field: 'endDate', title: '竣工时间', minWidth: 80},
  544. {field: 'unitTitle', title: '项目单位', width: 200},
  545. {field: 'mainTitle', title: '监管单位', width: 80},
  546. {field: 'datePlan', title: '联系人与电话', minWidth: 200,templet: '#info'},
  547. {title: '操作', width: 200, align:'center', toolbar: '#toolBar'},
  548. ]],
  549. fixed:true,
  550. height:window.screen.availHeight-430,
  551. data : self.dataList,
  552. done: function(res, curr, count){
  553. //获取当前时间
  554. var date=new Date();
  555. date.setDate(date.getDate()-3);
  556. res.data.forEach(function(item, index) {
  557. $(".layui-table-body tr").resize(function () {
  558. $(".layui-table-body tr").each(function (index, val) {
  559. $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
  560. });
  561. });
  562. //初始化高度,使得冻结行表体高度一致
  563. $(".layui-table-body tr").each(function (index, val) {
  564. $($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
  565. });
  566. // /1.当前行的背景颜色cur_color
  567. if (item.status === '6' ) {
  568. console.log(item.beginDate)
  569. console.log(date)
  570. if (Date.parse(item.beginDate)<date){
  571. $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('color', "red");
  572. }else{
  573. $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('color', "#EAC100");
  574. }
  575. }else{
  576. if (self.daysBetween(item.beginDate,item.openDateSq)>3){
  577. $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('color', "red");
  578. }else{
  579. $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('color', "#EAC100");
  580. }
  581. }
  582. });
  583. }
  584. });
  585. layui.table.on('tool('+this.tableName+')', function(obj){
  586. var event = obj.event;
  587. self[event].call(this, obj);
  588. });
  589. layui.table.on('sort('+this.tableName+')', function(obj) {
  590. self.sort = obj;
  591. self.getData();
  592. return;
  593. })
  594. },
  595. daysBetween: function (date1String, date2String) {
  596. const date1 = new Date(date1String);
  597. const date2 = new Date(date2String);
  598. const timeDiff = Math.abs(date2.getTime() - date1.getTime());
  599. return Math.ceil(timeDiff / (1000 * 3600 * 24));
  600. },
  601. isNoHide:function (obj){
  602. var self=this;
  603. App.msg.confirm("是否移除在建库?",function() {
  604. App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
  605. if (res.success) {
  606. App.msg.success("设置成功");
  607. self.getData();
  608. layer.close(index);
  609. }
  610. });
  611. });
  612. },
  613. isHide:function (obj){
  614. var self=this;
  615. App.msg.confirm("是否移入重点项目库?",function() {
  616. App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
  617. if (res.success) {
  618. App.msg.success("设置成功");
  619. self.getData();
  620. layer.close(index);
  621. }
  622. });
  623. });
  624. },
  625. loadPage : function(totalCount){
  626. var self = this;
  627. layui.laypage.render({
  628. elem: 'pagination',
  629. count: totalCount,
  630. curr : self.pageNo,
  631. limit : self.pageSize,
  632. layout: ['count', 'prev', 'page', 'next', 'skip'],
  633. jump: function(obj, first) {
  634. //首次不执行
  635. if(!first) {
  636. self.pageNo = obj.curr;
  637. self.getData();
  638. }
  639. }
  640. });
  641. },
  642. yearPlan: function(obj) {
  643. window.location.href=App.getUrl("amtPlan/detail?subId="+obj.data.id);
  644. },
  645. setSubReason: function(obj) {
  646. var self = this;
  647. layui.form.val("reasonForm", obj.data);
  648. layer.open({
  649. type: 1,
  650. title: "项目原因录入",
  651. content: $("#setReason"),
  652. area: ['880px', '560px'],
  653. btn: ["保存", "取消"],
  654. yes: function(index) {
  655. var reason = layui.form.val("reasonForm");
  656. reason.subId = obj.data.id;
  657. App.postJson("/api/subject/subInfo/setSubReason",reason, function(res){
  658. if(res.success){
  659. App.msg.success("设置成功");
  660. self.getData();
  661. layer.close(index);
  662. }
  663. });
  664. },
  665. close: function(index) {
  666. layer.close(index);
  667. }
  668. })
  669. },
  670. problem: function(obj) {
  671. var self = this;
  672. obj.data.status_reason="";
  673. layui.form.val("problemForm", obj.data);
  674. layer.open({
  675. type: 1,
  676. title: "问题督办",
  677. content: $("#problem"),
  678. area: ['800px', '600px'],
  679. btn: ["保存", "取消"],
  680. yes: function(index) {
  681. var reason = layui.form.val("problemForm");
  682. reason.subId = obj.data.id;
  683. if (reason.statusF=="2"||reason.statusF=="1"){
  684. if (reason.status_reason==""||reason.status_reason==undefined){
  685. layer.msg("红灯,黄灯必须输入原因");
  686. return ;
  687. }
  688. }
  689. App.postJson("/api/subject/subInfo/setStatus",{subId:obj.data.id,statusFgw:reason.statusF,reason:reason.status_reason,dateConfirm:reason.dateConfirm}, function(res){
  690. if(res.success){
  691. App.msg.success("设置成功");
  692. self.getData();
  693. layer.close(index);
  694. }
  695. });
  696. },
  697. close: function(index) {
  698. layer.close(index);
  699. }
  700. })
  701. },
  702. exportExcel: function(){
  703. var param = this.getSearchParams();
  704. App.common.utils.downFile(App.getUrl("subInfoExport/exportSummaryExcel"),"POST", param,"项目情况表.xlsx", "导出失败");
  705. },
  706. exportExcelByIndusKind: function(){
  707. var param = this.getSearchParams();
  708. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"),"POST", param,"项目情况表(按所属行业统计).xlsx", "导出失败");
  709. },
  710. exportSchedulingExcel: function(){
  711. var param = this.getSearchParams();
  712. App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"),"POST", param,"项目调度表.xlsx", "导出失败");
  713. },
  714. /* exportExcel2: function(){
  715. var param = this.getSearchParams();
  716. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"POST", param,"项目详情信息表.xlsx", "导出失败");
  717. }, */
  718. exportMoreExcel: function() {
  719. top.window.getSearchParams = this.getSearchParams;
  720. App.openLayer({
  721. title : "自定义导出",
  722. content : App.getUrl("/subInfoExport/index"),
  723. height : "600",
  724. width : "800"
  725. })
  726. },
  727. toDbh: function (obj) {
  728. top.window.location.href=App.getUrl("/problem/info/xmyqkgTemplate?subId=" + obj.data.id);
  729. /* App.openLayer({
  730. title: "督办函",
  731. content: ,
  732. height: "600",
  733. width: "800"
  734. }) */
  735. },
  736. toMsgLog: function (obj) {
  737. App.openLayer({
  738. title: "短信",
  739. content: App.getUrl("/msgLog/kindDetail?subId=" + obj.data.id+"&kind=开工逾期"),
  740. height: "600",
  741. width: "800"
  742. })
  743. },
  744. toDetail : function(obj){
  745. //详情
  746. var index = layer.open({
  747. type: 2,
  748. area: ['1000px', '800px'],
  749. content: App.getUrl("/subject/subInfo/detailView?layer=true&subId="+ obj.data.id + "&lastUrl=" + window.location.href),
  750. });
  751. layui.layer.full(index);
  752. },
  753. print: function(obj){
  754. window.open(App.getUrl("/subject/apply/downPdf?subId="+obj.data.id));
  755. },
  756. toEditSubInfo: function(obj){
  757. window.location.href=App.getUrl("/subject/subInfo/editSubInfo?subId="+obj.data.id);
  758. },
  759. preNew: function (obj){
  760. window.location.href=App.getUrl("/subPreNew/todo?subId=" + obj.data.id);
  761. },
  762. toTh: function(obj){
  763. if(obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
  764. App.msg.confirm("是否需要退回到暂存状态?", function(){
  765. App.postJson("/api/subject/subInfo/toTemp",{subId : obj.data.id,status:"0"}, function(res){
  766. if(res.success){
  767. layer.msg("成功",{icon:6,time:1000});
  768. //
  769. window.location.href=App.getUrl("subject/subInfo/projTz");
  770. }
  771. });
  772. })
  773. } else {
  774. App.msg.warn("已做过开工申报,需要走变更流程");
  775. }
  776. },
  777. search : function(){
  778. this.pageNo = 1;
  779. this.getData();
  780. },
  781. receiveMessage (e) {
  782. console.log('cb receiveMessage: ', e.data)
  783. if (e.data.topBreadcrumb) {
  784. $(".top-breadcrumb").html(e.data.topBreadcrumb)
  785. }
  786. }
  787. }
  788. });
  789. </script>
  790. </body>
  791. </html>