plate.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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. .table001 * {
  71. padding: 0;
  72. margin: 0;
  73. }
  74. .table001 table, .table001 .table {
  75. display: table;
  76. border-collapse: collapse;
  77. border-spacing: 0;
  78. table-layout: fixed;
  79. }
  80. .table001 table td {
  81. border: 1px solid #999;
  82. padding: 5px;
  83. }
  84. .table001 table thead td {
  85. background: #2B9CF9;
  86. color: #fff;
  87. border-color: #2B9CF9;
  88. padding: 5px 10px;
  89. line-height: 1.5em;
  90. text-align: center;
  91. }
  92. .liBody {
  93. background-color: #ffffff;
  94. }
  95. .liBodyLi {
  96. border-bottom: 1px solid #eaeaea;
  97. }
  98. .clearfix:after { /*伪元素是行内元素 正常浏览器清除浮动方法*/
  99. content: "";
  100. display: block;
  101. height: 0;
  102. clear: both;
  103. visibility: hidden;
  104. }
  105. .clearfix {
  106. *zoom: 1; /*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
  107. }
  108. </style>
  109. </head>
  110. <body layout:fragment="content">
  111. <nav class="breadcrumb">
  112. <i class="Hui-iconfont">&#xe67f;</i>
  113. 首页
  114. <span class="c-gray en">&gt;</span>
  115. 用地服务
  116. <span class="c-gray en">&gt;</span>
  117. 用地管理统计
  118. <span class="c-gray en">&gt;</span>
  119. 板块统计
  120. </nav>
  121. <div class="chartContent">
  122. </div>
  123. <div class="chartContent">
  124. <div class="title">当前审核状态统计</div>
  125. <div class="chartLiContent">
  126. <div id="pending_pie" class="chartLi" style="width:30%;"></div>
  127. <div id="processing_bar" class="chartLi" style="width:40%;"></div>
  128. <div id="processed_pie" class="chartLi" style="width:30%;"></div>
  129. </div>
  130. </div>
  131. <div class="chartContent">
  132. </div>
  133. <div class="chartContent">
  134. <div class="title">每日统计</div>
  135. <div id="daily_type_line" style="width: 1200px; height: 400px"></div>
  136. </div>
  137. <div class="chartContent">
  138. <div class="title">周期分类统计</div>
  139. <div id="monthly_type_bar" style="width: 1200px; height: 400px"></div>
  140. </div>
  141. <div class="chartContent">
  142. <div class="title">月度审核统计表</div>
  143. <input class="Wdate input-text" type="text" th:id="monthly_start_time" th:name="monthly_start_time"
  144. style="float:left; width: 150px;"
  145. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'monthly_end_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  146. <input class="Wdate input-text" type="text" th:id="monthly_end_time" th:name="monthly_end_time"
  147. style="float:left; width: 150px;"
  148. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'monthly_start_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  149. <a th:onclick="'javascript:exportMonthlyStatistic();'"
  150. class="btn btn-secondary radius" type="button">导出</a>
  151. <div class="table001" style="width: 96%; margin-left: 2%;">
  152. <table id="monthly_approve_statistic" th:fragment="approve_statistic_monthly">
  153. <thead>
  154. <tr>
  155. <td>&nbsp;</td>
  156. <td colspan="3">存量工业用地房屋出租</td>
  157. <td colspan="3">存量工业用地用途依法改变</td>
  158. <td colspan="3">存量工业用地不动产权权属转移登记</td>
  159. <td colspan="3">存量工业用地项目公司股权(结构)变更登记</td>
  160. <td colspan="3">汇总</td>
  161. </tr>
  162. <tr>
  163. <td>&nbsp;</td>
  164. <td>提交数</td>
  165. <td>通过数</td>
  166. <td>通过率</td>
  167. <td>提交数</td>
  168. <td>通过数</td>
  169. <td>通过率</td>
  170. <td>提交数</td>
  171. <td>通过数</td>
  172. <td>通过率</td>
  173. <td>提交数</td>
  174. <td>通过数</td>
  175. <td>通过率</td>
  176. <td>提交数</td>
  177. <td>通过数</td>
  178. <td>通过率</td>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. <tr th:each="model,iterStat:${list}" th:object="${model}">
  183. <td th:text="*{rowName}"></td>
  184. <td th:text="*{rentApplyNum}"></td>
  185. <td th:text="*{rentPassNum}"></td>
  186. <td th:text="*{rentPassRate + '%'}"></td>
  187. <td th:text="*{useChangeApplyNum}"></td>
  188. <td th:text="*{useChangePassNum}"></td>
  189. <td th:text="*{useChangePassRate + '%'}"></td>
  190. <td th:text="*{immovablesChangeApplyNum}"></td>
  191. <td th:text="*{immovablesChangePassNum}"></td>
  192. <td th:text="*{immovablesChangePassRate + '%'}"></td>
  193. <td th:text="*{equityStructureChangeApplyNum}"></td>
  194. <td th:text="*{equityStructureChangePassNum}"></td>
  195. <td th:text="*{equityStructureChangePassRate}"></td>
  196. <td th:text="*{totalApplyNum}"></td>
  197. <td th:text="*{totalPassNum}"></td>
  198. <td th:text="*{totalPassRate + '%'}"></td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. </div>
  203. </div>
  204. <script th:inline="javascript">
  205. var streetList = [[${streetList}]]
  206. console.log([[${streetList}]])
  207. getApproveStatus(streetList[3].id);
  208. getDailyStatistic(streetList[3].id, "2018-04-20", "2018-04-30");
  209. getTypeStatistic(streetList[3].id, "", "");
  210. getMontylyApproveStatistic(streetList[3].id);
  211. //当前审核状态统计
  212. function getApproveStatus(streedId) {
  213. $.ajax({
  214. url: pagePath + "/land_statistic/approve/status?street_id=" + streedId,
  215. type: "get",
  216. dataType: "json",
  217. data: {
  218. "timestamp": new Date().getTime(),
  219. },
  220. success: function (result) {
  221. if (result.success) {
  222. // console.log(result.obj)
  223. pendingArray = result.obj.pending;
  224. processingArray = result.obj.processing;
  225. processedArray = result.obj.processed;
  226. var processingXAxisData = new Array();
  227. var processingData = new Array();
  228. for (var argument of processingArray) {
  229. processingXAxisData.push(argument.name);
  230. processingData.push(argument.value);
  231. // console.log(argument)
  232. }
  233. renderPendingPie("待审核", pendingArray, pendingArray);
  234. renderProcessingBar("审核中", processingXAxisData, processingData);
  235. renderProcessedPie("已审核", processedArray, processedArray);
  236. } else {
  237. errorMessage(result.message);
  238. }
  239. },
  240. error: function () {
  241. errorMessage('系统错误!');
  242. }
  243. });
  244. }
  245. //每日状态统计
  246. function getDailyStatistic(streedId, startTime, endTime) {
  247. $.ajax({
  248. url: pagePath + "/land_statistic/approve/statistic/daily?street_id=" + streedId + "&start_time=" + startTime + "&end_time=" + endTime,
  249. type: "get",
  250. dataType: "json",
  251. data: {
  252. "timestamp": new Date().getTime(),
  253. },
  254. success: function (result) {
  255. if (result.success) {
  256. console.log(result.obj)
  257. var data = result.obj.data
  258. var xAxisName = result.obj.xAxisName;
  259. var legendData = new Array();
  260. for (var argument of data) {
  261. legendData.push(argument.name);
  262. }
  263. renderdailyTypeLine(legendData, xAxisName, data);
  264. } else {
  265. errorMessage(result.message);
  266. }
  267. },
  268. error: function () {
  269. errorMessage('系统错误!');
  270. }
  271. });
  272. }
  273. //周期分类统计
  274. function getTypeStatistic(streedId, startTime, endTime) {
  275. $.ajax({
  276. url: pagePath + "/land_statistic/approve/type?street_id=" + streedId + "&start_time" + startTime + "&end_time" + endTime,
  277. type: "get",
  278. dataType: "json",
  279. data: {
  280. "timestamp": new Date().getTime(),
  281. },
  282. success: function (result) {
  283. if (result.success) {
  284. // console.log(result.obj)
  285. var data = result.obj.data
  286. var xAxisName = result.obj.xAxisName;
  287. var legendData = new Array();
  288. for (var argument of data) {
  289. legendData.push(argument.name);
  290. }
  291. renderMonthlyTypeBar(legendData, xAxisName, data);
  292. } else {
  293. errorMessage(result.message);
  294. }
  295. },
  296. error: function () {
  297. errorMessage('系统错误!');
  298. }
  299. });
  300. }
  301. //当前审核状态统计 待审核
  302. function renderPendingPie(title, legendData, data) {
  303. // 基于准备好的dom,初始化echarts实例
  304. var charts = echarts.init(document.getElementById('pending_pie'));
  305. // 指定图表的配置项和数据
  306. var option = {
  307. title: {
  308. text: title,
  309. textStyle: {
  310. fontSize: 18,
  311. fontWeight: 'bold'
  312. }
  313. },
  314. tooltip: {
  315. trigger: 'item',
  316. zlevel: 1,
  317. formatter: '{a} <br/>{b}: {c} ({d}%)'
  318. },
  319. legend: {
  320. orient: 'horizontal',
  321. bottom: 10,
  322. data: legendData
  323. },
  324. series: [
  325. {
  326. name: title,
  327. type: 'pie',
  328. radius: ['50%', '70%'],
  329. avoidLabelOverlap: false,
  330. label: {
  331. normal: {
  332. show: true,
  333. zlevel: 0,
  334. position: 'center',
  335. formatter: function () {
  336. var num = 0;
  337. for (var obj of data) {
  338. num += obj.value;
  339. }
  340. return num;
  341. }
  342. },
  343. emphasis: {
  344. show: false,
  345. textStyle: {
  346. fontSize: '30',
  347. fontWeight: 'bold'
  348. }
  349. }
  350. },
  351. labelLine: {
  352. normal: {
  353. show: false
  354. }
  355. },
  356. data: data
  357. }
  358. ]
  359. };
  360. // 使用刚指定的配置项和数据显示图表。
  361. charts.setOption(option);
  362. }
  363. //当前审核状态统计 审核中
  364. function renderProcessingBar(title, xAxisData, data) {
  365. // 基于准备好的dom,初始化echarts实例
  366. var charts = echarts.init(document.getElementById('processing_bar'));
  367. // 指定图表的配置项和数据
  368. option = {
  369. title: {
  370. text: title,
  371. textStyle: {
  372. fontSize: '18',
  373. fontWeight: 'bold'
  374. }
  375. },
  376. color: ['#3398DB'],
  377. tooltip: {
  378. trigger: 'axis',
  379. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  380. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  381. }
  382. },
  383. grid: {
  384. left: '3%',
  385. right: '4%',
  386. bottom: '3%',
  387. containLabel: true
  388. },
  389. xAxis: [
  390. {
  391. type: 'category',
  392. data: xAxisData,
  393. axisTick: {
  394. alignWithLabel: true
  395. }
  396. }
  397. ],
  398. yAxis: [
  399. {
  400. type: 'value'
  401. }
  402. ],
  403. series: [
  404. {
  405. name: '直接访问',
  406. type: 'bar',
  407. barWidth: '60%',
  408. label: {
  409. normal: {
  410. show: true,
  411. position: 'top'
  412. }
  413. },
  414. data: data
  415. }
  416. ]
  417. };
  418. // 使用刚指定的配置项和数据显示图表。
  419. charts.setOption(option);
  420. }
  421. //当前审核状态统计 已审核
  422. function renderProcessedPie(title, legendData, data) {
  423. // 基于准备好的dom,初始化echarts实例
  424. var charts = echarts.init(document.getElementById('processed_pie'));
  425. // 指定图表的配置项和数据
  426. var option = {
  427. title: {
  428. text: title,
  429. textStyle: {
  430. fontSize: '18',
  431. fontWeight: 'bold'
  432. }
  433. },
  434. tooltip: {
  435. trigger: 'item',
  436. zlevel: 1,
  437. formatter: '{a} <br/>{b}: {c} ({d}%)'
  438. },
  439. legend: {
  440. orient: 'horizontal',
  441. bottom: 10,
  442. data: legendData
  443. },
  444. series: [
  445. {
  446. name: title,
  447. type: 'pie',
  448. radius: '70%',
  449. avoidLabelOverlap: false,
  450. label: {
  451. normal: {
  452. show: true,
  453. zlevel: 0,
  454. position: 'top',
  455. formatter: function () {
  456. var num = 0;
  457. for (var obj of data) {
  458. num += obj.value;
  459. }
  460. return num;
  461. }
  462. },
  463. emphasis: {
  464. show: false,
  465. textStyle: {
  466. fontSize: '30',
  467. fontWeight: 'bold'
  468. }
  469. }
  470. },
  471. labelLine: {
  472. normal: {
  473. show: false
  474. }
  475. },
  476. data: data
  477. }
  478. ]
  479. };
  480. // 使用刚指定的配置项和数据显示图表。
  481. charts.setOption(option);
  482. }
  483. //每日统计
  484. function renderdailyTypeLine(legendData, xAxisName, data) {
  485. // 基于准备好的dom,初始化echarts实例
  486. var charts = echarts.init(document.getElementById('daily_type_line'));
  487. // 指定图表的配置项和数据
  488. option = {
  489. // title: {
  490. // text: '折线图堆叠'
  491. // },
  492. tooltip: {
  493. trigger: 'axis'
  494. },
  495. legend: {
  496. data: legendData
  497. },
  498. grid: {
  499. left: '3%',
  500. right: '4%',
  501. bottom: '3%',
  502. containLabel: true
  503. },
  504. toolbox: {
  505. feature: {
  506. saveAsImage: {}
  507. }
  508. },
  509. xAxis: {
  510. type: 'category',
  511. boundaryGap: false,
  512. data: xAxisName
  513. },
  514. yAxis: {
  515. type: 'value'
  516. },
  517. series: data
  518. };
  519. // 使用刚指定的配置项和数据显示图表。
  520. charts.setOption(option);
  521. }
  522. //周期分类统计
  523. function renderMonthlyTypeBar(legendData, xAxisName, data) {
  524. // 基于准备好的dom,初始化echarts实例
  525. var charts = echarts.init(document.getElementById('monthly_type_bar'));
  526. // 指定图表的配置项和数据
  527. option = {
  528. color: ['#003366', '#006699', '#4cabce', '#e5323e'],
  529. tooltip: {
  530. trigger: 'axis',
  531. axisPointer: {
  532. type: 'shadow'
  533. }
  534. },
  535. legend: {
  536. orient: 'vertical',
  537. top: 80,
  538. right: 10,
  539. data: legendData
  540. },
  541. xAxis: [
  542. {
  543. type: 'category',
  544. axisTick: {show: false},
  545. data: xAxisName,
  546. axisLabel: {
  547. interval: 0,
  548. formatter: function (value) {
  549. var ret = '';
  550. var maxLength = 10;
  551. var xAxisName = value.split("\n\n")[0];
  552. var rate = value.split("\n\n")[1];
  553. var rowNum = Math.ceil(xAxisName.length / maxLength);
  554. if (rowNum > 1) {
  555. for (var i = 0; i < rowNum; i++) {
  556. var temp = "";
  557. var start = i * maxLength;
  558. var end = start + maxLength;
  559. temp = xAxisName.substring(start, end) + "\n";
  560. ret += temp;
  561. }
  562. return ret + "\n" + rate;
  563. } else {
  564. return xAxisName + "\n" + rate;
  565. }
  566. }
  567. }
  568. }
  569. ],
  570. yAxis: [{type: 'value'}],
  571. series: data
  572. };
  573. // 使用刚指定的配置项和数据显示图表。
  574. charts.setOption(option);
  575. }
  576. //月度审核统计表
  577. function getMontylyApproveStatistic(streetId) {
  578. streetId = 28
  579. var url = pagePath + "/land_statistic/approve/statistic/monthly"
  580. var start_time = $('#monthly_start_time').val();
  581. var end_time = $('#monthly_end_time').val();
  582. url += "?street_id=" + streetId + "&start_time=" + start_time + "&end_time=" + end_time;
  583. // 装载局部刷新返回的页面
  584. $('#monthly_approve_statistic').load(url);
  585. }
  586. //导出月度统计
  587. function exportMonthlyStatistic() {
  588. streetId = 28;
  589. var start_time = $('#monthly_start_time').val();
  590. var end_time = $('#monthly_end_time').val();
  591. window.open(pagePath + "/land_statistic/approve/statistic/monthly/export?start_time="
  592. + start_time + "&end_time=" + end_time + "&street_id=" + streetId);
  593. }
  594. </script>
  595. </body>
  596. </html>