region.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  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. </style>
  157. <link rel="stylesheet" th:href="@{/home/ifont/iconfont.css}">
  158. </head>
  159. <body layout:fragment="content">
  160. <nav class="breadcrumb">
  161. <i class="Hui-iconfont">&#xe67f;</i>
  162. 首页
  163. <span class="c-gray en">&gt;</span>
  164. 用地服务
  165. <span class="c-gray en">&gt;</span>
  166. 用地管理统计
  167. <span class="c-gray en">&gt;</span>
  168. 全区统计
  169. </nav>
  170. <div class="chartContent">
  171. <div class="title">当前审核状态统计</div>
  172. <div class="chartLiContent">
  173. <div id="pending_pie" class="chartLi" style="width:30%;"></div>
  174. <div id="processing_bar" class="chartLi" style="width:40%;"></div>
  175. <div id="processed_pie" class="chartLi" style="width:30%;"></div>
  176. </div>
  177. </div>
  178. <div class="chartContent">
  179. <div class="title">月度分类统计</div>
  180. <div class="date_line">
  181. <i class="pre_month Hui-iconfont Hui-iconfont-slider-left"></i>
  182. <i class="next_month Hui-iconfont Hui-iconfont-slider-right"></i>
  183. <ul class="date_tab_list clearfix">
  184. <li class="active_month date_tab_item">2019-05</li>
  185. <li class="date_tab_item">2019-06</li>
  186. <li class="date_tab_item">2019-07</li>
  187. <li class="date_tab_item">2019-06</li>
  188. <li class="date_tab_item">2019-07</li>
  189. <li class="date_tab_item">2019-06</li>
  190. <li class="date_tab_item">2019-07</li>
  191. <li class="date_tab_item">2019-06</li>
  192. <li class="date_tab_item">2019-07</li>
  193. <li class="date_tab_item">2019-06</li>
  194. <li class="date_tab_item">2019-07</li>
  195. <li class="date_tab_item">2019-06</li>
  196. <li class="date_tab_item">2019-07</li>
  197. <li class="date_tab_item">2019-07</li>
  198. <li class="date_tab_item">2019-07</li>
  199. <li class="date_tab_item">2019-07</li>
  200. <li class="date_tab_item">2019-07</li>
  201. <li class="date_tab_item">2019-07</li>
  202. <li class="date_tab_item">2019-07</li>
  203. </ul>
  204. </div>
  205. <div id="monthly_type_bar" style="width: 1200px; height: 400px"></div>
  206. </div>
  207. <div class="chartContent">
  208. <div class="title">月度审核结果对比</div>
  209. <div id="monthly_approve_bar" style="width: 1200px; height: 400px"></div>
  210. </div>
  211. <div class="chartContent">
  212. <div class="title">月度审核统计表</div>
  213. <input class="Wdate input-text" type="text" th:id="monthly_start_time" th:name="monthly_start_time"
  214. style="float:left; width: 150px;"
  215. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'monthly_end_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  216. <input class="Wdate input-text" type="text" th:id="monthly_end_time" th:name="monthly_end_time"
  217. style="float:left; width: 150px;"
  218. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'monthly_start_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getMontylyApproveStatistic()} })"/>
  219. <a th:onclick="'javascript:exportMonthlyStatistic();'"
  220. class="btn btn-secondary radius" type="button">导出</a>
  221. <div class="table001" style="width: 96%; margin-left: 2%;">
  222. <table id="monthly_approve_statistic" th:fragment="approve_statistic_monthly">
  223. <thead>
  224. <tr>
  225. <td>&nbsp;</td>
  226. <td colspan="3">存量工业用地房屋出租</td>
  227. <td colspan="3">存量工业用地用途依法改变</td>
  228. <td colspan="3">存量工业用地不动产权权属转移登记</td>
  229. <td colspan="3">存量工业用地项目公司股权(结构)变更登记</td>
  230. <td colspan="3">汇总</td>
  231. </tr>
  232. <tr>
  233. <td>&nbsp;</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. <td>提交数</td>
  247. <td>通过数</td>
  248. <td>通过率</td>
  249. </tr>
  250. </thead>
  251. <tbody>
  252. <tr th:each="model,iterStat:${list}" th:object="${model}">
  253. <td th:text="*{rowName}"></td>
  254. <td th:text="*{rentApplyNum}"></td>
  255. <td th:text="*{rentPassNum}"></td>
  256. <td th:text="*{rentPassRate + '%'}"></td>
  257. <td th:text="*{useChangeApplyNum}"></td>
  258. <td th:text="*{useChangePassNum}"></td>
  259. <td th:text="*{useChangePassRate + '%'}"></td>
  260. <td th:text="*{immovablesChangeApplyNum}"></td>
  261. <td th:text="*{immovablesChangePassNum}"></td>
  262. <td th:text="*{immovablesChangePassRate + '%'}"></td>
  263. <td th:text="*{equityStructureChangeApplyNum}"></td>
  264. <td th:text="*{equityStructureChangePassNum}"></td>
  265. <td th:text="*{equityStructureChangePassRate}"></td>
  266. <td th:text="*{totalApplyNum}"></td>
  267. <td th:text="*{totalPassNum}"></td>
  268. <td th:text="*{totalPassRate + '%'}"></td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. </div>
  273. </div>
  274. <div class="chartContent">
  275. <div class="title">板块统计表</div>
  276. <input class="Wdate input-text" type="text" th:id="plate_start_time" th:name="plate_start_time"
  277. style="float:left; width: 150px;"
  278. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'plate_end_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getPlateStatistic()} })"/>
  279. <input class="Wdate input-text" type="text" th:id="plate_end_time" th:name="plate_end_time"
  280. style="float:left; width: 150px;"
  281. onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'plate_start_time\')}',isShowClear:true,readOnly:true,onpicked: function(){getPlateStatistic()} })"/>
  282. <a th:onclick="'javascript:exportPlateStatistic();'"
  283. class="btn btn-secondary radius" type="button">导出</a>
  284. <div id="plate_approve_statistic" th:fragment="approve_statistic_plate">
  285. <div class="tableHead" style="width: 96%; margin-left: 2%;">
  286. <div class="tableHeadLi" style="width:9%;" th:each="model,iterStat:${head}" th:object="${model}"
  287. th:if="${iterStat.index==0}">&nbsp;
  288. </div>
  289. <div class="tableHeadLi" style="width:9%;" th:each="model,iterStat:${head}" th:object="${model}"
  290. th:text="*{name}" th:if="${iterStat.index!=0}">&nbsp;
  291. </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 class="tableHeadLi" style="width:10%;">度假区(含镇湖)</div>-->
  300. <!-- <div class="tableHeadLi" style="width:10%;">区外</div>-->
  301. <!-- <div class="tableHeadLi" style="width:10%;">合计</div>-->
  302. </div>
  303. <div class="tableBody" style="width: 96%; margin-left: 2%;">
  304. <div class="tableBodyLi" th:each="model,iterStat:${data}" th:object="${model}">
  305. <div class="liHead">
  306. <div class="liHeadTopTd" style="width:9%;">
  307. <i class="ifont-youx-copy-copy open" style="float: left;"></i>
  308. <div th:text="*{name}">提交数量</div>
  309. </div>
  310. <div class="liHeadTopTd" style="width:9%;text-align: center" th:each="arrayS:*{num}"
  311. th:object="${model}" th:text="${arrayS}">100
  312. </div>
  313. </div>
  314. <div class="liBody">
  315. <div class="liBodyLi clearfix" th:each="model,iterStat:*{type}" th:object="${model}">
  316. <div class="td" style="width:9%;" th:text="*{name}">1</div>
  317. <div class="td" style="width:9%;" th:each="arrayS:*{streetNum}" th:object="${model}"
  318. th:text="${arrayS}">2
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. <script th:inline="javascript">
  327. getApproveStatus("");
  328. getTypeStatistic("", "", "");
  329. getMontylyApproveStatus();
  330. getMontylyApproveStatistic();
  331. getPlateStatistic();
  332. //当前审核状态统计
  333. function getApproveStatus(streedId) {
  334. $.ajax({
  335. url: pagePath + "/land_statistic/approve/status?street_id=" + streedId,
  336. type: "get",
  337. dataType: "json",
  338. data: {
  339. "timestamp": new Date().getTime(),
  340. },
  341. success: function (result) {
  342. if (result.success) {
  343. // console.log(result.obj)
  344. pendingArray = result.obj.pending;
  345. processingArray = result.obj.processing;
  346. processedArray = result.obj.processed;
  347. var processingXAxisData = new Array();
  348. var processingData = new Array();
  349. for (var argument of processingArray) {
  350. processingXAxisData.push(argument.name);
  351. processingData.push(argument.value);
  352. // console.log(argument)
  353. }
  354. renderPendingPie("待审核", pendingArray, pendingArray);
  355. renderProcessingBar("审核中", processingXAxisData, processingData);
  356. renderProcessedPie("已审核", processedArray, processedArray);
  357. } else {
  358. errorMessage(result.message);
  359. }
  360. },
  361. error: function () {
  362. errorMessage('系统错误!');
  363. }
  364. });
  365. }
  366. //月度分类统计
  367. function getTypeStatistic(streedId, startTime, endTime) {
  368. $.ajax({
  369. url: pagePath + "/land_statistic/approve/type?street_id=" + streedId + "&start_time" + startTime + "&end_time" + endTime,
  370. type: "get",
  371. dataType: "json",
  372. data: {
  373. "timestamp": new Date().getTime(),
  374. },
  375. success: function (result) {
  376. if (result.success) {
  377. // console.log(result.obj)
  378. var data = result.obj.data
  379. var xAxisName = result.obj.xAxisName;
  380. var legendData = new Array();
  381. for (var argument of data) {
  382. legendData.push(argument.name);
  383. }
  384. renderMonthlyTypeBar(legendData, xAxisName, data);
  385. } else {
  386. errorMessage(result.message);
  387. }
  388. },
  389. error: function () {
  390. errorMessage('系统错误!');
  391. }
  392. });
  393. }
  394. //月度审核结果统计
  395. function getMontylyApproveStatus() {
  396. $.ajax({
  397. url: pagePath + "/land_statistic/approve/result/monthly",
  398. type: "get",
  399. dataType: "json",
  400. data: {
  401. "timestamp": new Date().getTime(),
  402. },
  403. success: function (result) {
  404. if (result.success) {
  405. console.log(result.obj)
  406. var data = result.obj.data
  407. var xAxisName = result.obj.xAxisName;
  408. var legendData = new Array();
  409. for (var argument of data) {
  410. legendData.push(argument.name);
  411. }
  412. renderMonthlyApproveBar(legendData, xAxisName, data);
  413. } else {
  414. errorMessage(result.message);
  415. }
  416. },
  417. error: function () {
  418. errorMessage('系统错误!');
  419. }
  420. });
  421. }
  422. //当前审核状态统计 待审核
  423. function renderPendingPie(title, legendData, data) {
  424. // 基于准备好的dom,初始化echarts实例
  425. var charts = echarts.init(document.getElementById('pending_pie'));
  426. // 指定图表的配置项和数据
  427. var option = {
  428. title: {
  429. text: title,
  430. textStyle: {
  431. fontSize: 18,
  432. fontWeight: 'bold'
  433. }
  434. },
  435. tooltip: {
  436. trigger: 'item',
  437. zlevel: 1,
  438. formatter: '{a} <br/>{b}: {c} ({d}%)'
  439. },
  440. legend: {
  441. orient: 'horizontal',
  442. bottom: 10,
  443. data: legendData
  444. },
  445. series: [
  446. {
  447. name: title,
  448. type: 'pie',
  449. radius: ['50%', '70%'],
  450. avoidLabelOverlap: false,
  451. label: {
  452. normal: {
  453. show: true,
  454. zlevel: 0,
  455. position: 'center',
  456. formatter: function () {
  457. var num = 0;
  458. for (var obj of data) {
  459. num += obj.value;
  460. }
  461. return num;
  462. }
  463. },
  464. emphasis: {
  465. show: false,
  466. textStyle: {
  467. fontSize: '30',
  468. fontWeight: 'bold'
  469. }
  470. }
  471. },
  472. labelLine: {
  473. normal: {
  474. show: false
  475. }
  476. },
  477. data: data
  478. }
  479. ]
  480. };
  481. // 使用刚指定的配置项和数据显示图表。
  482. charts.setOption(option);
  483. }
  484. //当前审核状态统计 审核中
  485. function renderProcessingBar(title, xAxisData, data) {
  486. // 基于准备好的dom,初始化echarts实例
  487. var charts = echarts.init(document.getElementById('processing_bar'));
  488. // 指定图表的配置项和数据
  489. option = {
  490. title: {
  491. text: title,
  492. textStyle: {
  493. fontSize: '18',
  494. fontWeight: 'bold'
  495. }
  496. },
  497. color: ['#3398DB'],
  498. tooltip: {
  499. trigger: 'axis',
  500. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  501. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  502. }
  503. },
  504. grid: {
  505. left: '3%',
  506. right: '4%',
  507. bottom: '3%',
  508. containLabel: true
  509. },
  510. xAxis: [
  511. {
  512. type: 'category',
  513. data: xAxisData,
  514. axisTick: {
  515. alignWithLabel: true
  516. },
  517. axisLabel: {
  518. interval: 0
  519. }
  520. }
  521. ],
  522. yAxis: [
  523. {
  524. type: 'value'
  525. }
  526. ],
  527. series: [
  528. {
  529. name: '',
  530. type: 'bar',
  531. barWidth: '60%',
  532. label: {
  533. normal: {
  534. show: true,
  535. position: 'top'
  536. }
  537. },
  538. data: data
  539. }
  540. ]
  541. };
  542. // 使用刚指定的配置项和数据显示图表。
  543. charts.setOption(option);
  544. }
  545. //当前审核状态统计 已审核
  546. function renderProcessedPie(title, legendData, data) {
  547. // 基于准备好的dom,初始化echarts实例
  548. var charts = echarts.init(document.getElementById('processed_pie'));
  549. // 指定图表的配置项和数据
  550. var option = {
  551. title: {
  552. text: title,
  553. textStyle: {
  554. fontSize: '18',
  555. fontWeight: 'bold'
  556. }
  557. },
  558. tooltip: {
  559. trigger: 'item',
  560. zlevel: 1,
  561. formatter: '{a} <br/>{b}: {c} ({d}%)'
  562. },
  563. legend: {
  564. orient: 'horizontal',
  565. bottom: 10,
  566. data: legendData
  567. },
  568. series: [
  569. {
  570. name: title,
  571. type: 'pie',
  572. radius: '70%',
  573. avoidLabelOverlap: false,
  574. label: {
  575. normal: {
  576. show: true,
  577. zlevel: 0,
  578. position: 'top',
  579. formatter: function () {
  580. var num = 0;
  581. for (var obj of data) {
  582. num += obj.value;
  583. }
  584. return num;
  585. }
  586. },
  587. emphasis: {
  588. show: false,
  589. textStyle: {
  590. fontSize: '30',
  591. fontWeight: 'bold'
  592. }
  593. }
  594. },
  595. labelLine: {
  596. normal: {
  597. show: false
  598. }
  599. },
  600. data: data
  601. }
  602. ]
  603. };
  604. // 使用刚指定的配置项和数据显示图表。
  605. charts.setOption(option);
  606. }
  607. function getMonth() {
  608. var dataArr = [];
  609. var data = new Date();
  610. var year = data.getFullYear();
  611. data.setMonth(data.getMonth() + 1, 1) //获取到当前月份,设置月份
  612. for (var i = 0; i < 12; i++) {
  613. data.setMonth(data.getMonth() - 1); //每次循环一次 月份值减1
  614. var m = data.getMonth() + 1;
  615. m = m < 10 ? "0" + m : m;
  616. dataArr.unshift(data.getFullYear() + "-" + (m));
  617. }
  618. var date = new Date(), y = date.getFullYear(), m = date.getMonth();
  619. var firstDay = new Date(y, m, 1);
  620. var lastDay = new Date(y, m + 1, 0);
  621. console.log(firstDay.format('yyyy-MM-dd') + " 00:00:00")
  622. console.log(lastDay.format('yyyy-MM-dd') + " 23:59:59")
  623. return dataArr;
  624. }
  625. //月度分类统计
  626. function renderMonthlyTypeBar(legendData, xAxisName, data) {
  627. // 基于准备好的dom,初始化echarts实例
  628. var charts = echarts.init(document.getElementById('monthly_type_bar'));
  629. charts.on('timelinechanged', function (timeLineIndex) {
  630. console.log(timeLineIndex.currentIndex)
  631. });
  632. // 指定图表的配置项和数据
  633. option = {
  634. // timeline: {
  635. // axisType: "category",
  636. // currentIndex: 11,
  637. // data: getMonth()
  638. // },
  639. color: ['#003366', '#006699', '#4cabce', '#e5323e'],
  640. tooltip: {
  641. trigger: 'axis',
  642. axisPointer: {
  643. type: 'shadow'
  644. }
  645. },
  646. legend: {
  647. orient: 'vertical',
  648. top: 80,
  649. right: 10,
  650. data: legendData
  651. },
  652. xAxis: [
  653. {
  654. type: 'category',
  655. axisTick: {show: false},
  656. data: xAxisName,
  657. axisLabel: {
  658. interval: 0,
  659. formatter: function (value) {
  660. var ret = '';
  661. var maxLength = 10;
  662. var xAxisName = value.split("\n\n")[0];
  663. var rate = value.split("\n\n")[1];
  664. var rowNum = Math.ceil(xAxisName.length / maxLength);
  665. if (rowNum > 1) {
  666. for (var i = 0; i < rowNum; i++) {
  667. var temp = "";
  668. var start = i * maxLength;
  669. var end = start + maxLength;
  670. temp = xAxisName.substring(start, end) + "\n";
  671. ret += temp;
  672. }
  673. return ret + "\n" + rate;
  674. } else {
  675. return xAxisName + "\n" + rate;
  676. }
  677. }
  678. }
  679. }
  680. ],
  681. yAxis: [{type: 'value'}],
  682. series: data
  683. };
  684. // 使用刚指定的配置项和数据显示图表。
  685. charts.setOption(option);
  686. }
  687. //月度审核结果对比
  688. function renderMonthlyApproveBar(legendData, xAxisName, data) {
  689. // 基于准备好的dom,初始化echarts实例
  690. var charts = echarts.init(document.getElementById('monthly_approve_bar'));
  691. // 指定图表的配置项和数据
  692. option = {
  693. color: ['#006699', '#4cabce', '#e5323e'],
  694. tooltip: {
  695. trigger: 'axis',
  696. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  697. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  698. }
  699. },
  700. legend: {
  701. orient: 'vertical',
  702. top: 80,
  703. right: 10,
  704. data: legendData
  705. },
  706. yAxis: {type: 'value'},
  707. xAxis: {
  708. type: 'category',
  709. data: xAxisName
  710. },
  711. series: data
  712. };
  713. // 使用刚指定的配置项和数据显示图表。
  714. charts.setOption(option);
  715. optionCustom = {
  716. series: [
  717. {
  718. barWidth: 30
  719. }
  720. ]
  721. };
  722. charts.setOption(optionCustom);
  723. }
  724. //月度审核统计表
  725. function getMontylyApproveStatistic() {
  726. var url = pagePath + "/land_statistic/approve/statistic/monthly"
  727. var start_time = $('#monthly_start_time').val();
  728. var end_time = $('#monthly_end_time').val();
  729. url += "?start_time=" + start_time + "&end_time=" + end_time;
  730. // 装载局部刷新返回的页面
  731. $('#monthly_approve_statistic').load(url);
  732. }
  733. //导出月度统计
  734. function exportMonthlyStatistic() {
  735. var start_time = $('#monthly_start_time').val();
  736. var end_time = $('#monthly_end_time').val();
  737. window.open(pagePath + "/land_statistic/approve/statistic/monthly/export?start_time=" + start_time + "&end_time=" + end_time);
  738. }
  739. //导出板块统计
  740. function exportPlateStatistic() {
  741. var start_time = $('#plate_start_time').val();
  742. var end_time = $('#plate_end_time').val();
  743. window.open(pagePath + "/land_statistic/approve/statistic/plate/export?start_time=" + start_time + "&end_time=" + end_time);
  744. }
  745. //板块统计表
  746. function getPlateStatistic() {
  747. var start_time = $('#plate_start_time').val();
  748. var end_time = $('#plate_end_time').val();
  749. // 装载局部刷新返回的页面
  750. $('#plate_approve_statistic').load(pagePath + "/land_statistic/approve/statistic/plate?start_time=" + start_time + "&end_time=" + end_time);
  751. }
  752. $(document).on("click", ".liHead", function () {
  753. console.log("点击了", $(this).next().is(":hidden"))
  754. if (!$(this).next().is(":hidden")) {
  755. $(this).next().slideUp(200)
  756. $(this).children(":first").children(":first").attr("class", "ifont-youx-copy-copy close")
  757. } else {
  758. $(this).next().slideDown(200)
  759. $(this).children(":first").children(":first").attr("class", "ifont-youx-copy-copy open")
  760. }
  761. })
  762. // 点击前一页
  763. $('.date_line .pre_month').click(function(){
  764. let offsetNum = $('.date_tab_list').position().left
  765. // console.log('父元素偏移量', offsetNum)
  766. if (Math.abs(offsetNum) >= 1170) {
  767. let offsetLeft = (offsetNum + 1170 + 'px')
  768. $(".date_tab_list").animate({left: offsetLeft}, 1000)
  769. } else {
  770. console.log('已到头')
  771. }
  772. })
  773. // 点击后一页
  774. $('.date_line .next_month').click(function(){
  775. let offsetNum = $('.date_tab_list').position().left
  776. let childrenNum = $('.date_tab_list').children('.date_tab_item').length
  777. let maxOffset = (Math.ceil(childrenNum/9) - 1) * 1170
  778. // console.log('父元素偏移量', offsetNum)
  779. // console.log('子元素数量', childrenNum)
  780. // console.log('最大偏移量', maxOffset)
  781. if (Math.abs(offsetNum) < maxOffset) {
  782. let offsetLeft = (offsetNum - 1170 + 'px')
  783. $(".date_tab_list").animate({left: offsetLeft}, 1000)
  784. } else {
  785. console.log('已到达最大距离')
  786. }
  787. })
  788. // 点击统计日期
  789. $('.date_tab_list .date_tab_item').click(function(){
  790. console.log('当前点击日期', $(this).html())
  791. $(this).addClass('active_month').siblings().removeClass("active_month")
  792. })
  793. Date.prototype.format = function (format) {
  794. var o = {
  795. "M+": this.getMonth() + 1, //month
  796. "d+": this.getDate(), //day
  797. "h+": this.getHours(), //hour
  798. "m+": this.getMinutes(), //minute
  799. "s+": this.getSeconds(), //second
  800. "q+": Math.floor((this.getMonth() + 3) / 3), //quarter
  801. "S": this.getMilliseconds() //millisecond
  802. }
  803. if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
  804. (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  805. for (var k in o) if (new RegExp("(" + k + ")").test(format))
  806. format = format.replace(RegExp.$1,
  807. RegExp.$1.length == 1 ? o[k] :
  808. ("00" + o[k]).substr(("" + o[k]).length));
  809. return format;
  810. }
  811. </script>
  812. </body>
  813. </html>