region.html 35 KB

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