region.html 33 KB

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