region.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>全区统计</title>
  7. <style>
  8. /*.chartContent * {*/
  9. /* padding: 0;*/
  10. /* margin: 0;*/
  11. /*}*/
  12. .chartContent .title {
  13. border-left: 5px solid #2B9CF9;
  14. padding: 0 10px;
  15. line-height: 1.5em;
  16. color: #666;
  17. margin: 25px 0 15px;
  18. }
  19. .chartLiContent {
  20. overflow: hidden
  21. }
  22. .chartContent .chartLi {
  23. float: left;
  24. height: 200px;
  25. box-sizing: border-box;
  26. }
  27. .chartContent .tableHead {
  28. background: #2B9CF9;
  29. line-height: 1.5em;
  30. color: #fff;
  31. padding: 10px 0;
  32. text-align: center;
  33. }
  34. .chartContent .tableHead .tableHeadLi {
  35. float: left;
  36. }
  37. .chartContent .tableHead {
  38. overflow: hidden;
  39. }
  40. .chartContent .tableBody {
  41. }
  42. .chartContent .tableBodyLi {
  43. overflow: hidden;
  44. background: #eee;
  45. }
  46. .chartContent .tableBodyLi .liHead {
  47. overflow: hidden;
  48. }
  49. .chartContent .tableBodyLi .liHeadTopTd {
  50. float: left;
  51. line-height: 1.2em;
  52. padding: 5px 0px 5px 0px;
  53. font-size: 14px;
  54. color: #666;
  55. }
  56. .chartContent .tableBodyLi .liHeadTopTd i.close:before {
  57. content: "\e665";
  58. }
  59. .chartContent .tableBodyLi .liBodyLi .td {
  60. float: left;
  61. line-height: 1.2em;
  62. /*padding: 5px;*/
  63. /*color: #666;*/
  64. text-align: center;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. min-height: 30px;
  69. }
  70. .chartContent .date_line {
  71. width: 1200px;
  72. position: relative;
  73. overflow: hidden;
  74. }
  75. .chartContent .date_line > i {
  76. z-index: 5;
  77. position: absolute;
  78. top: 0;
  79. padding: 10px;
  80. font-weight: bold;
  81. cursor: pointer;
  82. background: #ffffff;
  83. }
  84. .chartContent .date_line .pre_month {
  85. left: -8px;
  86. }
  87. .chartContent .date_line .next_month {
  88. right: -8px;
  89. }
  90. .chartContent .date_line .date_tab_list {
  91. border-bottom: 1px solid #e2e3e4;
  92. width: 6000px;
  93. position: relative;
  94. left: 0;
  95. top: 0;
  96. }
  97. .chartContent .date_line .date_tab_list .date_tab_item {
  98. display: inline-block;
  99. float: left;
  100. width: 58px;
  101. text-align: center;
  102. margin-left: 15px;
  103. margin-right: 15px;
  104. border: 1px solid #e2e3e3;
  105. border-bottom: none;
  106. background-color: #eaeaea;
  107. padding: 10px 20px;
  108. cursor: pointer;
  109. margin-bottom: -1px;
  110. }
  111. .chartContent .date_line .date_tab_list .date_tab_item:first-child {
  112. margin-left: 30px;
  113. }
  114. .chartContent .date_line .date_tab_list .active_month {
  115. background-color: #ffffff;
  116. color: #00a0e9;
  117. }
  118. .table001 * {
  119. padding: 0;
  120. margin: 0;
  121. }
  122. .table001 table, .table001 .table {
  123. display: table;
  124. border-collapse: collapse;
  125. border-spacing: 0;
  126. table-layout: fixed;
  127. }
  128. .table001 table td {
  129. border: 1px solid #999;
  130. padding: 5px;
  131. }
  132. .table001 table thead td {
  133. background: #2B9CF9;
  134. color: #fff;
  135. border-color: #2B9CF9;
  136. padding: 5px 10px;
  137. line-height: 1.5em;
  138. text-align: center;
  139. }
  140. .liBody {
  141. background-color: #ffffff;
  142. }
  143. .liBodyLi {
  144. border-bottom: 1px solid #eaeaea;
  145. }
  146. .clearfix:after { /*伪元素是行内元素 正常浏览器清除浮动方法*/
  147. content: "";
  148. display: block;
  149. height: 0;
  150. clear: both;
  151. visibility: hidden;
  152. }
  153. .clearfix {
  154. *zoom: 1; /*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
  155. }
  156. .chartContent{
  157. border-bottom: 1px solid #ded7d5;
  158. }
  159. </style>
  160. <link rel="stylesheet" th:href="@{/home/ifont/iconfont.css}">
  161. </head>
  162. <body layout:fragment="content">
  163. <nav class="breadcrumb">
  164. <i class="Hui-iconfont">&#xe67f;</i>
  165. 首页
  166. <span class="c-gray en">&gt;</span>
  167. 用地服务
  168. <span class="c-gray en">&gt;</span>
  169. 用地管理统计
  170. <span class="c-gray en">&gt;</span>
  171. 全区统计
  172. </nav>
  173. <div class="chartContent">
  174. <div class="title">当前审核状态统计</div>
  175. <div class="chartLiContent">
  176. <div id="pending_pie" class="chartLi" style="width:30%;"></div>
  177. <div id="processing_bar" class="chartLi" style="width:40%;"></div>
  178. <div id="processed_pie" class="chartLi" style="width:30%;"></div>
  179. </div>
  180. </div>
  181. <div class="chartContent">
  182. <div class="title">月度分类统计</div>
  183. <div class="date_line">
  184. <i class="pre_month Hui-iconfont Hui-iconfont-slider-left"></i>
  185. <i class="next_month Hui-iconfont Hui-iconfont-slider-right"></i>
  186. <ul class="date_tab_list clearfix" id="date_line">
  187. <!-- <li class="date_tab_item">2019-01</li>-->
  188. <!-- <li class="date_tab_item">2019-02</li>-->
  189. <!-- <li class="date_tab_item">2019-03</li>-->
  190. <!-- <li class="date_tab_item">2019-04</li>-->
  191. <!-- <li class="active_month date_tab_item">2019-05</li>-->
  192. <!-- <li class="date_tab_item">2019-06</li>-->
  193. <!-- <li class="date_tab_item">2019-07</li>-->
  194. <!-- <li class="date_tab_item">2019-08</li>-->
  195. <!-- <li class="date_tab_item">2019-09</li>-->
  196. <!-- <li class="date_tab_item">2019-11</li>-->
  197. <!-- <li class="date_tab_item">2019-12</li>-->
  198. <!-- <li class="date_tab_item">2020-01</li>-->
  199. <!-- <li class="date_tab_item">2020-02</li>-->
  200. </ul>
  201. </div>
  202. <div id="monthly_type_bar" style="width: 1200px; height: 400px"></div>
  203. </div>
  204. <div class="chartContent">
  205. <div class="title">月度审核结果对比</div>
  206. <div id="monthly_approve_bar" style="width: 1200px; height: 400px"></div>
  207. </div>
  208. <div class="chartContent">
  209. <div class="title">月度审核统计表</div>
  210. <input class="Wdate input-text" type="text" th:id="monthly_start_time" th:name="monthly_start_time"
  211. style="float:left; width: 150px;"
  212. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'monthly_end_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  213. <input class="Wdate input-text" type="text" th:id="monthly_end_time" th:name="monthly_end_time"
  214. style="float:left; width: 150px;"
  215. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'monthly_start_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  216. <a th:onclick="'javascript:exportMonthlyStatistic();'"
  217. class="btn btn-secondary radius" type="button">导出</a>
  218. <div class="table001" style="width: 96%; margin-left: 2%;margin-top:15px;">
  219. <table id="monthly_approve_statistic" th:fragment="approve_statistic_monthly">
  220. <thead>
  221. <tr>
  222. <td>&nbsp;</td>
  223. <td colspan="3">存量工业用地房屋出租</td>
  224. <td colspan="3">存量工业用地用途依法改变</td>
  225. <td colspan="3">存量工业用地不动产权权属转移登记</td>
  226. <td colspan="3">存量工业用地项目公司股权(结构)变更登记</td>
  227. <td colspan="3">汇总</td>
  228. </tr>
  229. <tr>
  230. <td>&nbsp;</td>
  231. <td>提交数</td>
  232. <td>通过数</td>
  233. <td>通过率</td>
  234. <td>提交数</td>
  235. <td>通过数</td>
  236. <td>通过率</td>
  237. <td>提交数</td>
  238. <td>通过数</td>
  239. <td>通过率</td>
  240. <td>提交数</td>
  241. <td>通过数</td>
  242. <td>通过率</td>
  243. <td>提交数</td>
  244. <td>通过数</td>
  245. <td>通过率</td>
  246. </tr>
  247. </thead>
  248. <tbody>
  249. <tr th:each="model,iterStat:${list}" th:object="${model}">
  250. <td th:text="*{rowName}"></td>
  251. <td th:text="*{rentApplyNum}"></td>
  252. <td th:text="*{rentPassNum}"></td>
  253. <td th:text="*{rentPassRate + '%'}"></td>
  254. <td th:text="*{useChangeApplyNum}"></td>
  255. <td th:text="*{useChangePassNum}"></td>
  256. <td th:text="*{useChangePassRate + '%'}"></td>
  257. <td th:text="*{immovablesChangeApplyNum}"></td>
  258. <td th:text="*{immovablesChangePassNum}"></td>
  259. <td th:text="*{immovablesChangePassRate + '%'}"></td>
  260. <td th:text="*{equityStructureChangeApplyNum}"></td>
  261. <td th:text="*{equityStructureChangePassNum}"></td>
  262. <td th:text="*{equityStructureChangePassRate}"></td>
  263. <td th:text="*{totalApplyNum}"></td>
  264. <td th:text="*{totalPassNum}"></td>
  265. <td th:text="*{totalPassRate + '%'}"></td>
  266. </tr>
  267. </tbody>
  268. </table>
  269. </div>
  270. </div>
  271. <div class="chartContent">
  272. <div class="title">板块统计表</div>
  273. <input class="Wdate input-text" type="text" th:id="plate_start_time" th:name="plate_start_time"
  274. style="float:left; width: 150px;"
  275. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'plate_end_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getPlateStatistic()} })"/>
  276. <input class="Wdate input-text" type="text" th:id="plate_end_time" th:name="plate_end_time"
  277. style="float:left; width: 150px;"
  278. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'plate_start_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getPlateStatistic()} })"/>
  279. <a th:onclick="'javascript:exportPlateStatistic();'"
  280. class="btn btn-secondary radius" type="button">导出</a>
  281. <div id="plate_approve_statistic" th:fragment="approve_statistic_plate" style="margin-top: 15px;">
  282. <div class="tableHead" style="width: 96%; margin-left: 2%;">
  283. <div class="tableHeadLi" style="width:9%;" th:each="model,iterStat:${head}" th:object="${model}"
  284. th:if="${iterStat.index==0}">&nbsp;
  285. </div>
  286. <div class="tableHeadLi" style="width:9%;" th:each="model,iterStat:${head}" th:object="${model}"
  287. th:text="*{name}" th:if="${iterStat.index!=0}">&nbsp;
  288. </div>
  289. <!-- <div class="tableHeadLi" style="width:10%;">狮山街道(含横塘)</div>-->
  290. <!-- <div class="tableHeadLi" style="width:10%;">枫桥街道</div>-->
  291. <!-- <div class="tableHeadLi" style="width:10%;">浒墅关镇</div>-->
  292. <!-- <div class="tableHeadLi" style="width:10%;">通安镇</div>-->
  293. <!-- <div class="tableHeadLi" style="width:10%;">浒墅关经开区</div>-->
  294. <!-- <div class="tableHeadLi" style="width:10%;">科技城(含东渚)</div>-->
  295. <!-- <div class="tableHeadLi" style="width:10%;">综合保税区</div>-->
  296. <!-- <div class="tableHeadLi" style="width:10%;">度假区(含镇湖)</div>-->
  297. <!-- <div class="tableHeadLi" style="width:10%;">区外</div>-->
  298. <!-- <div class="tableHeadLi" style="width:10%;">合计</div>-->
  299. </div>
  300. <div class="tableBody" style="width: 96%; margin-left: 2%;">
  301. <div class="tableBodyLi" th:each="model,iterStat:${data}" th:object="${model}">
  302. <div class="liHead">
  303. <div class="liHeadTopTd" style="width:9%;">
  304. <i class="ifont-youx-copy-copy open" style="float: left;"></i>
  305. <div th:text="*{name}">提交数量</div>
  306. </div>
  307. <div class="liHeadTopTd" style="width:9%;text-align: center" th:each="arrayS:*{num}"
  308. th:object="${model}" th:text="${arrayS}">100
  309. </div>
  310. </div>
  311. <div class="liBody">
  312. <div class="liBodyLi clearfix" th:each="model,iterStat:*{type}" th:object="${model}">
  313. <div class="td" style="width:9%;" th:text="*{name}">1</div>
  314. <div class="td" style="width:9%;" th:each="arrayS:*{streetNum}" th:object="${model}"
  315. th:text="${arrayS}">2
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <script th:inline="javascript">
  324. getApproveStatus("");
  325. // getTypeStatistic("", "", "");
  326. getMontylyApproveStatus();
  327. getMontylyApproveStatistic();
  328. getPlateStatistic();
  329. //当前审核状态统计
  330. function getApproveStatus(streedId) {
  331. $.ajax({
  332. url: pagePath + "/land_statistic/approve/status?street_id=" + streedId,
  333. type: "get",
  334. dataType: "json",
  335. data: {
  336. "timestamp": new Date().getTime(),
  337. },
  338. success: function (result) {
  339. if (result.success) {
  340. // console.log(result.obj)
  341. pendingArray = result.obj.pending;
  342. processingArray = result.obj.processing;
  343. processedArray = result.obj.processed;
  344. var processingXAxisData = new Array();
  345. var processingData = new Array();
  346. for (var argument of processingArray) {
  347. processingXAxisData.push(argument.name);
  348. processingData.push(argument.value);
  349. // console.log(argument)
  350. }
  351. renderPendingPie("待审核", pendingArray, pendingArray);
  352. renderProcessingBar("审核中", processingXAxisData, processingData);
  353. renderProcessedPie("已审核", processedArray, processedArray);
  354. } else {
  355. errorMessage(result.message);
  356. }
  357. },
  358. error: function () {
  359. errorMessage('系统错误!');
  360. }
  361. });
  362. }
  363. //月度分类统计
  364. function getTypeStatistic(streedId, startTime, endTime) {
  365. $.ajax({
  366. url: pagePath + "/land_statistic/approve/type?street_id=" + streedId + "&start_time=" + startTime + "&end_time=" + endTime,
  367. type: "get",
  368. dataType: "json",
  369. data: {
  370. "timestamp": new Date().getTime(),
  371. },
  372. success: function (result) {
  373. if (result.success) {
  374. // console.log(result.obj)
  375. var data = result.obj.data
  376. var xAxisName = result.obj.xAxisName;
  377. var legendData = new Array();
  378. for (var argument of data) {
  379. legendData.push(argument.name);
  380. }
  381. renderMonthlyTypeBar(legendData, xAxisName, data);
  382. } else {
  383. errorMessage(result.message);
  384. }
  385. },
  386. error: function () {
  387. errorMessage('系统错误!');
  388. }
  389. });
  390. }
  391. //月度审核结果统计
  392. function getMontylyApproveStatus() {
  393. $.ajax({
  394. url: pagePath + "/land_statistic/approve/result/monthly",
  395. type: "get",
  396. dataType: "json",
  397. data: {
  398. "timestamp": new Date().getTime(),
  399. },
  400. success: function (result) {
  401. if (result.success) {
  402. // console.log(result.obj)
  403. var data = result.obj.data
  404. var xAxisName = result.obj.xAxisName;
  405. var legendData = new Array();
  406. for (var argument of data) {
  407. legendData.push(argument.name);
  408. }
  409. renderMonthlyApproveBar(legendData, xAxisName, data);
  410. } else {
  411. errorMessage(result.message);
  412. }
  413. },
  414. error: function () {
  415. errorMessage('系统错误!');
  416. }
  417. });
  418. }
  419. //当前审核状态统计 待审核
  420. function renderPendingPie(title, legendData, data) {
  421. // 基于准备好的dom,初始化echarts实例
  422. var charts = echarts.init(document.getElementById('pending_pie'));
  423. // 指定图表的配置项和数据
  424. var option = {
  425. title: {
  426. text: title,
  427. textStyle: {
  428. fontSize: 18,
  429. fontWeight: 'bold'
  430. }
  431. },
  432. tooltip: {
  433. trigger: 'item',
  434. zlevel: 1,
  435. formatter: '{a} <br/>{b}: {c} ({d}%)'
  436. },
  437. legend: {
  438. orient: 'horizontal',
  439. bottom: 10,
  440. data: legendData
  441. },
  442. series: [
  443. {
  444. name: title,
  445. type: 'pie',
  446. radius: ['50%', '70%'],
  447. avoidLabelOverlap: false,
  448. label: {
  449. normal: {
  450. show: true,
  451. zlevel: 0,
  452. position: 'center',
  453. formatter: function () {
  454. var num = 0;
  455. for (var obj of data) {
  456. num += obj.value;
  457. }
  458. return num;
  459. }
  460. },
  461. emphasis: {
  462. show: false,
  463. textStyle: {
  464. fontSize: '30',
  465. fontWeight: 'bold'
  466. }
  467. }
  468. },
  469. labelLine: {
  470. normal: {
  471. show: false
  472. }
  473. },
  474. data: data
  475. }
  476. ]
  477. };
  478. // 使用刚指定的配置项和数据显示图表。
  479. charts.setOption(option);
  480. }
  481. //当前审核状态统计 审核中
  482. function renderProcessingBar(title, xAxisData, data) {
  483. // 基于准备好的dom,初始化echarts实例
  484. var charts = echarts.init(document.getElementById('processing_bar'));
  485. // 指定图表的配置项和数据
  486. option = {
  487. title: {
  488. text: title,
  489. textStyle: {
  490. fontSize: '18',
  491. fontWeight: 'bold'
  492. }
  493. },
  494. color: ['#3398DB'],
  495. tooltip: {
  496. trigger: 'axis',
  497. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  498. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  499. }
  500. },
  501. grid: {
  502. left: '3%',
  503. right: '4%',
  504. bottom: '3%',
  505. containLabel: true
  506. },
  507. xAxis: [
  508. {
  509. type: 'category',
  510. data: xAxisData,
  511. axisTick: {
  512. alignWithLabel: true
  513. },
  514. axisLabel: {
  515. interval: 0
  516. }
  517. }
  518. ],
  519. yAxis: [
  520. {
  521. type: 'value'
  522. }
  523. ],
  524. series: [
  525. {
  526. name: '',
  527. type: 'bar',
  528. barWidth: '60%',
  529. label: {
  530. normal: {
  531. show: true,
  532. position: 'top'
  533. }
  534. },
  535. data: data
  536. }
  537. ]
  538. };
  539. // 使用刚指定的配置项和数据显示图表。
  540. charts.setOption(option);
  541. }
  542. //当前审核状态统计 已审核
  543. function renderProcessedPie(title, legendData, data) {
  544. // 基于准备好的dom,初始化echarts实例
  545. var charts = echarts.init(document.getElementById('processed_pie'));
  546. // 指定图表的配置项和数据
  547. var option = {
  548. title: {
  549. text: title,
  550. textStyle: {
  551. fontSize: '18',
  552. fontWeight: 'bold'
  553. }
  554. },
  555. tooltip: {
  556. trigger: 'item',
  557. zlevel: 1,
  558. formatter: '{a} <br/>{b}: {c} ({d}%)'
  559. },
  560. legend: {
  561. orient: 'horizontal',
  562. bottom: 10,
  563. data: legendData
  564. },
  565. series: [
  566. {
  567. name: title,
  568. type: 'pie',
  569. radius: '70%',
  570. avoidLabelOverlap: false,
  571. label: {
  572. normal: {
  573. show: true,
  574. zlevel: 0,
  575. position: 'top',
  576. formatter: '{b}: {c}'
  577. // formatter: function () {
  578. // var num = 0;
  579. // for (var obj of data) {
  580. // num += obj.value;
  581. // }
  582. // return num;
  583. // }
  584. },
  585. emphasis: {
  586. show: false,
  587. textStyle: {
  588. fontSize: '30',
  589. fontWeight: 'bold'
  590. }
  591. }
  592. },
  593. labelLine: {
  594. normal: {
  595. show: false
  596. }
  597. },
  598. data: data
  599. }
  600. ]
  601. };
  602. // 使用刚指定的配置项和数据显示图表。
  603. charts.setOption(option);
  604. }
  605. function getMonth() {
  606. var dataArr = [];
  607. var data = new Date();
  608. var year = data.getFullYear();
  609. data.setMonth(data.getMonth() + 1, 1) //获取到当前月份,设置月份
  610. for (var i = 0; i < 12; i++) {
  611. data.setMonth(data.getMonth() - 1); //每次循环一次 月份值减1
  612. var m = data.getMonth() + 1;
  613. m = m < 10 ? "0" + m : m;
  614. dataArr.unshift(data.getFullYear() + "-" + (m));
  615. }
  616. var date = new Date(), y = date.getFullYear(), m = date.getMonth();
  617. var firstDay = new Date(y, m, 1);
  618. var lastDay = new Date(y, m + 1, 0);
  619. // console.log(firstDay.format('yyyy-MM-dd') + " 00:00:00")
  620. // console.log(lastDay.format('yyyy-MM-dd') + " 23:59:59")
  621. return dataArr;
  622. }
  623. //月度分类统计
  624. function renderMonthlyTypeBar(legendData, xAxisName, data) {
  625. // 基于准备好的dom,初始化echarts实例
  626. var charts = echarts.init(document.getElementById('monthly_type_bar'));
  627. charts.on('timelinechanged', function (timeLineIndex) {
  628. // console.log(timeLineIndex.currentIndex)
  629. });
  630. // 指定图表的配置项和数据
  631. option = {
  632. // timeline: {
  633. // axisType: "category",
  634. // currentIndex: 11,
  635. // data: getMonth()
  636. // },
  637. color: ['#003366', '#006699', '#4cabce', '#e5323e'],
  638. tooltip: {
  639. trigger: 'axis',
  640. axisPointer: {
  641. type: 'shadow'
  642. }
  643. },
  644. legend: {
  645. orient: 'vertical',
  646. top: 80,
  647. right: 10,
  648. data: legendData
  649. },
  650. xAxis: [
  651. {
  652. type: 'category',
  653. axisTick: {show: false},
  654. data: xAxisName,
  655. axisLabel: {
  656. interval: 0,
  657. formatter: function (value) {
  658. var ret = '';
  659. var maxLength = 10;
  660. var xAxisName = value.split("\n\n")[0];
  661. var rate = value.split("\n\n")[1];
  662. var rowNum = Math.ceil(xAxisName.length / maxLength);
  663. if (rowNum > 1) {
  664. for (var i = 0; i < rowNum; i++) {
  665. var temp = "";
  666. var start = i * maxLength;
  667. var end = start + maxLength;
  668. temp = xAxisName.substring(start, end) + "\n";
  669. ret += temp;
  670. }
  671. return ret + "\n" + rate;
  672. } else {
  673. return xAxisName + "\n" + rate;
  674. }
  675. }
  676. }
  677. }
  678. ],
  679. yAxis: [{type: 'value'}],
  680. series: data
  681. };
  682. // 使用刚指定的配置项和数据显示图表。
  683. charts.setOption(option);
  684. }
  685. //月度审核结果对比
  686. function renderMonthlyApproveBar(legendData, xAxisName, data) {
  687. // 基于准备好的dom,初始化echarts实例
  688. var charts = echarts.init(document.getElementById('monthly_approve_bar'));
  689. // 指定图表的配置项和数据
  690. option = {
  691. color: ['#006699', '#4cabce', '#e5323e'],
  692. tooltip: {
  693. trigger: 'axis',
  694. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  695. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  696. }
  697. },
  698. legend: {
  699. orient: 'vertical',
  700. top: 80,
  701. right: 10,
  702. data: legendData
  703. },
  704. yAxis: {type: 'value'},
  705. xAxis: {
  706. type: 'category',
  707. data: xAxisName
  708. },
  709. series: data
  710. };
  711. // 使用刚指定的配置项和数据显示图表。
  712. charts.setOption(option);
  713. optionCustom = {
  714. series: [
  715. {
  716. barWidth: 30
  717. }
  718. ]
  719. };
  720. charts.setOption(optionCustom);
  721. }
  722. //月度审核统计表
  723. function getMontylyApproveStatistic() {
  724. var url = pagePath + "/land_statistic/approve/statistic/monthly"
  725. var start_time = $('#monthly_start_time').val();
  726. var end_time = $('#monthly_end_time').val();
  727. url += "?start_time=" + start_time + "&end_time=" + end_time;
  728. // 装载局部刷新返回的页面
  729. $('#monthly_approve_statistic').load(url);
  730. }
  731. //导出月度统计
  732. function exportMonthlyStatistic() {
  733. var start_time = $('#monthly_start_time').val();
  734. var end_time = $('#monthly_end_time').val();
  735. window.open(pagePath + "/land_statistic/approve/statistic/monthly/export?start_time=" + start_time + "&end_time=" + end_time);
  736. }
  737. //导出板块统计
  738. function exportPlateStatistic() {
  739. var start_time = $('#plate_start_time').val();
  740. var end_time = $('#plate_end_time').val();
  741. window.open(pagePath + "/land_statistic/approve/statistic/plate/export?start_time=" + start_time + "&end_time=" + end_time);
  742. }
  743. //板块统计表
  744. function getPlateStatistic() {
  745. var start_time = $('#plate_start_time').val();
  746. var end_time = $('#plate_end_time').val();
  747. // 装载局部刷新返回的页面
  748. $('#plate_approve_statistic').load(pagePath + "/land_statistic/approve/statistic/plate?start_time=" + start_time + "&end_time=" + end_time);
  749. }
  750. $(document).on("click", ".liHead", function () {
  751. // console.log("点击了", $(this).next().is(":hidden"))
  752. if (!$(this).next().is(":hidden")) {
  753. $(this).next().slideUp(200)
  754. $(this).children(":first").children(":first").attr("class", "ifont-youx-copy-copy close")
  755. } else {
  756. $(this).next().slideDown(200)
  757. $(this).children(":first").children(":first").attr("class", "ifont-youx-copy-copy open")
  758. }
  759. })
  760. $(function () {
  761. var dataArr = [];
  762. var data = new Date();
  763. var year = data.getFullYear();
  764. data.setMonth(data.getMonth() + 1, 1) //获取到当前月份,设置月份
  765. for (var i = 0; i < 24; i++) {
  766. data.setMonth(data.getMonth() - 1); //每次循环一次 月份值减1
  767. var m = data.getMonth() + 1;
  768. m = m < 10 ? "0" + m : m;
  769. dataArr.unshift(data.getFullYear() + "-" + (m));
  770. }
  771. // console.log(dataArr)
  772. var str = "";
  773. for (var i = 0; i < dataArr.length; i++) {
  774. if (i < dataArr.length - 1) {
  775. str += "<li class='date_tab_item'>" + dataArr[i] + "</li>";
  776. } else {
  777. str += "<li class='active_month date_tab_item'>" + dataArr[i] + "</li>";
  778. var startTime = dataArr[i] + "-01 00:00:00";
  779. var endTime = dataArr[i] + "-31 23:59:59";
  780. getTypeStatistic("", startTime, endTime);
  781. }
  782. }
  783. $("#date_line").append(str);
  784. // 点击前一页
  785. $('.date_line .pre_month').click(function () {
  786. let offsetNum = $('.date_tab_list').position().left
  787. // console.log('父元素偏移量', Math.abs(offsetNum))
  788. if (Math.abs(offsetNum) > 0) {
  789. $('.date_line .pre_month').css('display', 'none')
  790. let offsetLeft = (offsetNum + 1170 + 'px')
  791. $(".date_tab_list").animate({left: offsetLeft}, 1000)
  792. setTimeout(function () {
  793. $('.date_line .pre_month').css('display', 'block')
  794. }, 1000)
  795. } else {
  796. // console.log('已到头')
  797. }
  798. })
  799. // 点击后一页
  800. $('.date_line .next_month').click(function () {
  801. let offsetNum = $('.date_tab_list').position().left
  802. let childrenNum = $('.date_tab_list').children('.date_tab_item').length
  803. let maxOffset = (Math.ceil(childrenNum / 9) - 1) * 1170
  804. // console.log('父元素偏移量', offsetNum)
  805. // console.log('子元素数量', childrenNum)
  806. // console.log('最大偏移量', maxOffset)
  807. if (Math.abs(offsetNum) < maxOffset) {
  808. $('.date_line .next_month').css('display', 'none')
  809. let offsetLeft = (offsetNum - 1170 + 'px')
  810. $(".date_tab_list").animate({left: offsetLeft}, 1000)
  811. setTimeout(function () {
  812. $('.date_line .next_month').css('display', 'block')
  813. }, 1000)
  814. } else {
  815. // console.log('已到达最大距离')
  816. }
  817. })
  818. // 点击统计日期
  819. $('.date_tab_list .date_tab_item').click(function () {
  820. // console.log('当前点击日期', $(this).html())
  821. var startTime = $(this).html() + "-01 00:00:00";
  822. var endTime = $(this).html() + "-31 23:59:59";
  823. getTypeStatistic("", startTime, endTime)
  824. $(this).addClass('active_month').siblings().removeClass("active_month")
  825. })
  826. Date.prototype.format = function (format) {
  827. var o = {
  828. "M+": this.getMonth() + 1, //month
  829. "d+": this.getDate(), //day
  830. "h+": this.getHours(), //hour
  831. "m+": this.getMinutes(), //minute
  832. "s+": this.getSeconds(), //second
  833. "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
  834. "S": this.getMilliseconds() //millisecond
  835. }
  836. if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
  837. (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  838. for (var k in o) if (new RegExp("(" + k + ")").test(format))
  839. format = format.replace(RegExp.$1,
  840. RegExp.$1.length == 1 ? o[k] :
  841. ("00" + o[k]).substr(("" + o[k]).length));
  842. return format;
  843. }
  844. })
  845. </script>
  846. </body>
  847. </html>