main.html 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>统计</title>
  7. <!--<link rel="shortcut icon" href="sooka.ico">-->
  8. <link rel="shortcut icon" href="../static/sooka.ico" th:href="@{/sooka.ico}"/>
  9. <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
  10. <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
  11. <link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
  12. <link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
  13. <style type="text/css">
  14. ul li {
  15. list-style: none
  16. }
  17. * {
  18. padding: 0;
  19. margin: 0;
  20. }
  21. .title-logo {
  22. font-size: 24px;
  23. color: #fff;
  24. float: left;
  25. line-height: 50px;
  26. font-weight: bolder;
  27. }
  28. .text-bold {
  29. font-weight: bolder
  30. }
  31. .border-none {
  32. border: none !important;
  33. }
  34. .left-bar-sj {
  35. padding: 10px 25px;
  36. text-align: center;
  37. }
  38. .sj_1 {
  39. height: 150px;
  40. }
  41. .sj_1 li {
  42. height: 150px;
  43. display: flex;
  44. width: 32%;
  45. float: left;
  46. border-radius: 5px;
  47. }
  48. .sj_1_li_b1 {
  49. background-image: linear-gradient(#ec4800, #ff9018);
  50. margin-right: 2%;
  51. }
  52. .sj_1_li_b2 {
  53. background-image: linear-gradient(#035efc, #1cbde4);
  54. margin-right: 2%;
  55. }
  56. .sj_1_li_b3 {
  57. background-image: linear-gradient(#369e19, #3deb30);
  58. }
  59. .img-con {
  60. width: 45%;
  61. margin: 5%;
  62. padding: 0 8% 0 5%;
  63. text-align: center;
  64. border-right: 1px solid #fff;
  65. }
  66. .num-con {
  67. display: flex;
  68. flex-direction: column;
  69. padding: 5% 0 0 6%;
  70. text-align: left;
  71. }
  72. .num-con span {
  73. color: #fff;
  74. line-height: 48px;
  75. }
  76. .num-con .number {
  77. font-size: 48px;
  78. font-weight: bolder;
  79. }
  80. .num-con .name {
  81. font-size: 30px;
  82. }
  83. .sj-fl {
  84. height: 150px;
  85. background: #fff;
  86. border-radius: 3px;
  87. display: flex;
  88. margin-top: 30px;
  89. }
  90. .sj-row {
  91. width: 25%;
  92. height: 70%;
  93. border-right: 1px solid #ccc;
  94. display: flex;
  95. margin-top: 1.5%;
  96. }
  97. .fl-img-con {
  98. /*width: 45%;*/
  99. margin: 0 0 0 10%;
  100. padding: 4% 0% 0 12%;
  101. text-align: center;
  102. }
  103. .fl-num-con {
  104. display: flex;
  105. flex-direction: column;
  106. padding: 5% 0 0 5%;
  107. text-align: left;
  108. }
  109. .fl-num-con span {
  110. color: #666;
  111. line-height: 36px;
  112. }
  113. .fl-num-con .fl-number {
  114. font-size: 36px;
  115. font-weight: bolder;
  116. }
  117. .fl-num-con .fl-name {
  118. font-size: 24px;
  119. }
  120. .sj-data {
  121. height: auto;
  122. background: #fff;
  123. border-radius: 3px;
  124. display: flex;
  125. flex-direction: row;
  126. }
  127. .data-tit {
  128. font-size: 24px;
  129. color: #333;
  130. text-align: left;
  131. line-height: 24px;
  132. padding: 20px 0;
  133. border-bottom: 1px solid #ccc;
  134. }
  135. .sj-fl-data {
  136. height: auto;
  137. background: #fff;
  138. border-radius: 3px;
  139. display: flex;
  140. flex-direction: column;
  141. margin-top: 30px;
  142. }
  143. .data-fl-row {
  144. display: flex;
  145. flex-direction: column;
  146. border: 1px solid #eeeeee;
  147. width: 32%;
  148. padding: 20px;
  149. }
  150. .data-image {
  151. width: 500px;
  152. height: 320px;
  153. margin-top: 40px
  154. }
  155. .m-r-2 {
  156. margin-right: 2%;
  157. }
  158. .data-fl-row span {
  159. text-align: left;
  160. font-size: 24px;
  161. color: #333;
  162. }
  163. .data-fl-row_span {
  164. text-align: left;
  165. font-size: 24px;
  166. color: #333;
  167. }
  168. .data-fl-row-lis {
  169. display: flex;
  170. width: 165px;
  171. }
  172. .data-fl-row-lis img {
  173. width: 50px;
  174. height: 50px;
  175. }
  176. .data-fl-list-rig {
  177. display: flex;
  178. flex-direction: column;
  179. margin-left: 7px;
  180. }
  181. .data-fl-list-rig span {
  182. color: #fff;
  183. }
  184. .data-fl-list-rig .number {
  185. font-size: 20px;
  186. }
  187. .data-fl-list-rig .name {
  188. font-size: 14px
  189. }
  190. .data-fl-list-rig .number2 {
  191. font-size: 20px;
  192. color: #666;
  193. }
  194. .data-fl-list-rig .name2 {
  195. font-size: 14px;
  196. color: #666;
  197. }
  198. .data-fl-all {
  199. padding: 30px 10px 30px 30px;
  200. background: #5470c6;
  201. display: flex;
  202. }
  203. .right-fast-menu {
  204. margin-top: 20px;
  205. height: auto;
  206. display: flex;
  207. flex-direction: column;
  208. position: fixed;
  209. right: 0;
  210. }
  211. .fast-rig-clo {
  212. padding-top: 10px;
  213. width: 105px;
  214. height: 105px;
  215. display: flex;
  216. flex-direction: column;
  217. margin-bottom: 5px;
  218. background: #fff;
  219. text-align: center;
  220. }
  221. .fast-rig-clo span {
  222. color: #666;
  223. font-size: 16px;
  224. margin-top: 10px;
  225. }
  226. .fast-rig-clo img {
  227. width: 50px;
  228. height: 50px;
  229. margin: 0 auto;
  230. }
  231. .fast-rig-clo a {
  232. display: block;
  233. width: 105px;
  234. height: 105px;
  235. position: absolute;
  236. z-index: 1000;
  237. }
  238. .m-l-30 {
  239. margin-left: 30px;
  240. }
  241. .m-t-30 {
  242. margin-top: 30px;
  243. }
  244. </style>
  245. </head>
  246. <body class="gray-bg" style="background:#fff">
  247. <!--欢迎图片-->
  248. <!--<div style="width: 100%; height: auto; max-width: 550px; margin:0 auto; padding-top: 30px">-->
  249. <!-- <img th:src="@{/img/wjxthyy.png}" style="width: 100%;" />-->
  250. <!--</div>-->
  251. <!--欢迎主页面-->
  252. <div class="col-lg-12 left-bar-sj">
  253. <!--事件开始-->
  254. <div class="sj_1" id="f1">
  255. <ul>
  256. <li class="sj_1_li_b1">
  257. <div class="col-lg-4 img-con"><img th:src="@{/img/xc-ld-sjzs.png}"></div>
  258. <div class="col-lg-8 num-con">
  259. <span id="sjzs" class="number text-bold">0</span>
  260. <span class="name">事件总数</span>
  261. </div>
  262. </li>
  263. <li class="sj_1_li_b2">
  264. <div class="col-lg-4 img-con"><img th:src="@{/img/xc-ld-clz.png}"></div>
  265. <div class="col-lg-8 num-con">
  266. <span id="dbrw" class="number text-bold">0</span>
  267. <span class="name">待办事件</span>
  268. </div>
  269. </li>
  270. <li class="sj_1_li_b3">
  271. <div class="col-lg-4 img-con"><img th:src="@{/img/xc-ld-wcl.png}"></div>
  272. <div class="col-lg-8 num-con">
  273. <span id="ybrw" class="number text-bold">0</span>
  274. <span class="name">已办事件</span>
  275. </div>
  276. </li>
  277. </ul>
  278. </div>
  279. <!--事件结束-->
  280. <div class="data-tit text-bold m-t-30">人口信息统计</div>
  281. <!--sj-data容器一行只能显示三个图表,如果超过三个要以sj-data容器重新开头-->
  282. <div class="sj-data">
  283. <div id="div_kg" class="data-fl-row m-t-30 m-r-2">
  284. <span>空挂人口统计</span>
  285. <div id="data_kg" class="data-image" ></div>
  286. </div>
  287. <div id="div_db" class="data-fl-row m-t-30 m-r-2">
  288. <span>低保人口统计</span>
  289. <div id="data_db" class="data-image" ></div>
  290. </div>
  291. <div id="div_yqtx" class="data-fl-row m-t-30">
  292. <span>一汽退休老干部统计</span>
  293. <div id="data_yqtx" class="data-image" ></div>
  294. </div>
  295. </div>
  296. <div class="sj-data">
  297. <div id="div_age" class="data-fl-row m-t-30 m-r-2">
  298. <span>年龄构成统计</span>
  299. <div id="data_age" class="data-image"></div>
  300. </div>
  301. <div id="div_js" class="data-fl-row m-t-30 m-r-2">
  302. <span>计生信息统计</span>
  303. <div id="data_js" class="data-image" ></div>
  304. </div>
  305. <div id="div_lr" class="data-fl-row m-t-30">
  306. <span>老年人口统计</span>
  307. <div id="data_lr" class="data-image" ></div>
  308. </div>
  309. </div>
  310. <div class="sj-data">
  311. <div id="div_canJi" class="data-fl-row m-t-30 m-r-2">
  312. <span>残联信息统计</span>
  313. <div id="data_canJi" class="data-image" ></div>
  314. </div>
  315. <div id="div_tsrq" class="data-fl-row m-t-30 m-r-2">
  316. <span>特殊人群信息统计</span>
  317. <div id="data_tsrq" class="data-image" ></div>
  318. </div>
  319. <div id="div_ym" class="data-fl-row m-t-30">
  320. <span>疫苗接种情况统计</span>
  321. <div id="data_ym" class="data-image" ></div>
  322. </div>
  323. </div>
  324. <div class="sj-data">
  325. <div id="div_bx" class="data-fl-row m-t-30 m-r-2">
  326. <span>保险信息</span>
  327. <div id="data_bx" class="data-image" ></div>
  328. </div>
  329. <div id="div-sj11" class="data-fl-row m-t-30 m-r-2">
  330. <span>事件诉求统计</span>
  331. <div id="data-sj11" class="data-image" ></div>
  332. </div>
  333. </div>
  334. </div>
  335. <script th:src="@{/js/echarts/echarts.js}"></script>
  336. <!--大图表1-->
  337. </body>
  338. </html>
  339. <script th:src="@{/js/jquery.min.js}"></script>
  340. <script th:src="@{/js/bootstrap.min.js}"></script>
  341. <script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
  342. <script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
  343. <script th:src="@{/js/jquery.contextMenu.min.js}"></script>
  344. <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
  345. <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
  346. <script th:src="@{/ruoyi/js/ry-ui.js}"></script>
  347. <script th:src="@{/ruoyi/js/common.js}"></script>
  348. <script th:src="@{/ruoyi/index.js}"></script>
  349. <script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
  350. <script th:inline="javascript"> var ctx = [[@{/}]]; </script>
  351. <script>
  352. var prefix_per = "zhsq_qk/person/person";
  353. $(function () {
  354. initHeaderNum();//初始化事件总数、待办任务、已办任务
  355. kg();//空挂人口数
  356. age();//年龄构成数
  357. tx();//退休老干部数
  358. db();//低保人口数
  359. js();//计生信息
  360. lr();//老龄人口数
  361. ym();//疫苗接种情况
  362. canJi();//残联信息
  363. tsrq();//特殊人群信息
  364. bx();//保险信息
  365. wgsjtj();//网格事件统计
  366. });
  367. function initHeaderNum() {
  368. //初始化事件总数、待办任务、已办任务
  369. let url = ctx+"/eventRank/eventRank/rankForNum";
  370. $.ajax({
  371. url : url,
  372. type: "post",
  373. success : function (res) {
  374. $("#sjzs").text(res.sjzs);
  375. $("#dbrw").text(res.dbrw);
  376. $("#ybrw").text(res.ybrw);
  377. }
  378. });
  379. }
  380. //查询空挂人口数
  381. function kg(){
  382. $.ajax({
  383. url : ctx+"/person/person/queryPerByEchartsForIndex",
  384. type: "post",
  385. success : function (restdata) {
  386. var colors0 = ['#FF0000', '#009100', '#AE00AE', '#3414d9', '#ffcc00', '#00ffcc', '#00fff0', '#5519ff'];
  387. var colors1 = ['#5519ff', '#ffcc00', '#00ffcc', '#8CEA00', '#cc9933', '#00cc99', '#3043f2', '#3414d9'];
  388. var pertype = restdata.perType;
  389. if(pertype){
  390. var nameList =[];
  391. var dataList=[];
  392. for(var i=0;i<restdata.data.length;i++){
  393. nameList.push(restdata.data[i].dataName);
  394. dataList.push(restdata.data[i].perCou);
  395. }
  396. var myChart = echarts.init(document.getElementById('data_kg'));
  397. option = {
  398. xAxis: {
  399. type: 'category',
  400. axisLabel: {
  401. interval: 0,
  402. rotate: 30
  403. },
  404. data: nameList
  405. },
  406. yAxis: {
  407. type: 'value'
  408. },
  409. tooltip: {
  410. trigger: 'axis',
  411. formatter: "{b}空挂人口数 : {c}人",
  412. axisPointer: {
  413. type: 'cross',
  414. crossStyle: {
  415. color: '#999'
  416. }
  417. }
  418. },
  419. series: [
  420. {
  421. data: dataList,
  422. type: 'bar',
  423. showBackground: true,
  424. backgroundStyle: {
  425. color: 'rgba(180, 180, 180, 0.2)'
  426. },
  427. itemStyle: {
  428. normal: {
  429. color: function(params) {
  430. //设置柱状图的显示颜色
  431. return new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  432. offset: 0,
  433. color: colors0[params.dataIndex]
  434. }, {
  435. offset: 1,
  436. color: colors1[params.dataIndex]
  437. }])
  438. }
  439. }
  440. }
  441. }
  442. ]
  443. };
  444. myChart.setOption(option);
  445. }else {
  446. $("#div_kg").hide();
  447. }
  448. }
  449. });
  450. }
  451. //查询年龄构成人口数
  452. function age(){
  453. $.ajax({
  454. url : ctx+"/person/person/queryPerAgeByEchartsForIndex",
  455. type: "post",
  456. success : function (restdata) {
  457. var colors0 = ['#804040', '#F9F900', '#A5A552', '#00cc99', '#7E3D76', '#3414d9', '#7E3D76', '#5519ff'];
  458. var colors1 = ['#00ffcc', '#FF5809', '#ADADAD', '#9F4D95', '#3414d9', '#cc9933', '#ffcc00', '#00fff0'];
  459. var pertype = restdata.perType;
  460. if(pertype){
  461. var nameList =['18周岁及以下','19-35周岁','36-55周岁','56-70周岁','70周岁以上'];
  462. var dataList=[];
  463. if (restdata.data!=null&&restdata.data.length==1){
  464. dataList.push(restdata.data[0].perCouEighteen);
  465. dataList.push(restdata.data[0].perCouNineteenThirtyFive);
  466. dataList.push(restdata.data[0].perCouThirtySixFiftyFive);
  467. dataList.push(restdata.data[0].perCouFiftySixSeventy);
  468. dataList.push(restdata.data[0].perCouSeventy);
  469. }
  470. var myChart = echarts.init(document.getElementById('data_age'));
  471. option = {
  472. xAxis: {
  473. type: 'category',
  474. axisLabel: {
  475. interval: 0,
  476. rotate: 30
  477. },
  478. data: nameList
  479. },
  480. yAxis: {
  481. type: 'value'
  482. },
  483. tooltip: {
  484. trigger: 'axis',
  485. formatter: "{b}人数 : {c}人",
  486. axisPointer: {
  487. type: 'cross',
  488. crossStyle: {
  489. color: '#999'
  490. }
  491. }
  492. },
  493. series: [
  494. {
  495. data: dataList,
  496. type: 'bar',
  497. showBackground: true,
  498. backgroundStyle: {
  499. color: 'rgba(180, 180, 180, 0.2)'
  500. },
  501. itemStyle: {
  502. normal: {
  503. color: function(params) {
  504. //设置柱状图的显示颜色
  505. return new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  506. offset: 0,
  507. color: colors0[params.dataIndex]
  508. }, {
  509. offset: 1,
  510. color: colors1[params.dataIndex]
  511. }])
  512. }
  513. }
  514. }
  515. }
  516. ]
  517. };
  518. myChart.setOption(option);
  519. }else {
  520. $("#div_age").hide();
  521. }
  522. }
  523. });
  524. }
  525. //退休老干部数
  526. function tx() {
  527. $.ajax({
  528. url: ctx+"/person/person/queryPerYqtxByEchartsForIndex",
  529. type: "post",
  530. success: function (restdata) {
  531. var pertype = restdata.perType;
  532. if (pertype) {
  533. var nameList = [];
  534. var dataList = [];
  535. for (var i = 0; i < restdata.data.length; i++) {
  536. nameList.push(restdata.data[i].perYqtx);
  537. dataList.push(restdata.data[i].perCou);
  538. }
  539. var myChart = echarts.init(document.getElementById('data_yqtx'));
  540. option = {
  541. tooltip: {
  542. trigger: 'item'
  543. },
  544. series: [
  545. {
  546. name:'退休老干部人数',
  547. type: 'pie',
  548. radius: ['30%', '50%'],
  549. data: [
  550. { value: dataList[0], name: nameList[0]+'一汽退休老干部人数', itemStyle: {
  551. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  552. offset: 0,
  553. color: '#006000'
  554. }, {
  555. offset: 1,
  556. color: '#AAAAFF'
  557. }]),
  558. } },
  559. { value: dataList[1], name: nameList[1]+'一汽退休老干部人数', itemStyle: {
  560. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  561. offset: 0,
  562. color: '#A5A552'
  563. }, {
  564. offset: 1,
  565. color: '#28FF28'
  566. }]),
  567. } }
  568. ],
  569. emphasis: {
  570. itemStyle: {
  571. shadowBlur: 10,
  572. shadowOffsetX:5,
  573. shadowColor: 'rgba(0, 0, 0, 0.5)'
  574. }
  575. }
  576. }
  577. ]
  578. };
  579. myChart.setOption(option);
  580. } else {
  581. $("#div_yqtx").hide();
  582. }
  583. }
  584. });
  585. }
  586. //低保人口数
  587. function db() {
  588. $.ajax({
  589. url: ctx+"/person/person/queryPerDbByEchartsForIndex",
  590. type: "post",
  591. success: function (restdata) {
  592. var pertype = restdata.perType;
  593. if (pertype) {
  594. var nameList = [];
  595. var dataList = [];
  596. for (var i = 0; i < restdata.data.length; i++) {
  597. nameList.push(restdata.data[i].dataName);
  598. dataList.push(restdata.data[i].perCou);
  599. }
  600. var myChart = echarts.init(document.getElementById('data_db'));
  601. option = {
  602. xAxis: {
  603. type: 'category',
  604. axisLabel: {
  605. interval: 0,
  606. rotate: 30
  607. },
  608. data: nameList
  609. },
  610. yAxis: {
  611. type: 'value'
  612. },
  613. tooltip: {
  614. trigger: 'axis',
  615. formatter: "{b}低保人口数 : {c}人",
  616. axisPointer: {
  617. type: 'cross',
  618. crossStyle: {
  619. color: '#999'
  620. }
  621. }
  622. },
  623. series: [
  624. {
  625. data: dataList,
  626. type: 'line',
  627. areaStyle: {
  628. normal: {
  629. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  630. { offset: 0, color: "#F75000" },
  631. { offset: 0.5, color: "#FF8000" },
  632. { offset: 1, color: "#EAC100" }
  633. ])
  634. }
  635. }
  636. }
  637. ]
  638. };
  639. myChart.setOption(option);
  640. } else {
  641. $("#div_db").hide();
  642. }
  643. }
  644. });
  645. }
  646. //计生信息数
  647. function js() {
  648. $.ajax({
  649. url: ctx+"/person/person/queryPerJsByEchartsForIndex",
  650. type: "post",
  651. success: function (restdata) {
  652. var pertype = restdata.perType;
  653. if (pertype) {
  654. var nameList = ['是','否'];
  655. var dataList = [];
  656. if (restdata.data!=null&&restdata.data.length==1){
  657. dataList.push(restdata.data[0].perCouSfknYse);
  658. dataList.push(restdata.data[0].perCouSfknNo);
  659. }
  660. var myChart = echarts.init(document.getElementById('data_js'));
  661. option = {
  662. tooltip: {
  663. trigger: 'item'
  664. },
  665. series: [
  666. {
  667. name:'计生信息统计',
  668. type: 'pie',
  669. radius: '50%',
  670. data: [
  671. { value: dataList[0], name: nameList[0]+'困难家庭人数',itemStyle: {
  672. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  673. offset: 0,
  674. color: '#00FFFF'
  675. }, {
  676. offset: 1,
  677. color: '#EAC100'
  678. }]),
  679. } },
  680. { value: dataList[1], name: nameList[1]+'困难家庭人数' ,itemStyle: {
  681. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  682. offset: 0,
  683. color: '#E800E8'
  684. }, {
  685. offset: 1,
  686. color: '#00ffeb'
  687. }]),
  688. }}
  689. ],
  690. emphasis: {
  691. itemStyle: {
  692. shadowBlur: 10,
  693. shadowOffsetX: 0,
  694. shadowColor: 'rgba(0, 0, 0, 0.5)'
  695. }
  696. }
  697. }
  698. ]
  699. };
  700. myChart.setOption(option);
  701. } else {
  702. $("#div_js").hide();
  703. }
  704. }
  705. });
  706. }
  707. //老龄人口数
  708. function lr() {
  709. $.ajax({
  710. url: ctx+"/person/person/queryPerLrEchartsForIndex",
  711. type: "post",
  712. success: function (restdata) {
  713. var pertype = restdata.perType;
  714. if (pertype) {
  715. var nameList = [];
  716. var dataList = [];
  717. for (var i = 0; i < restdata.data.length; i++) {
  718. nameList.push(restdata.data[i].dataName);
  719. dataList.push(restdata.data[i].perCou);
  720. }
  721. var myChart = echarts.init(document.getElementById('data_lr'));
  722. option = {
  723. xAxis: {
  724. type: 'category',
  725. data: nameList
  726. },
  727. yAxis: {
  728. type: 'value'
  729. },
  730. tooltip: {
  731. trigger: 'axis',
  732. formatter: "{b}老年人口数 : {c}人",
  733. axisPointer: {
  734. type: 'cross',
  735. crossStyle: {
  736. color: '#999'
  737. }
  738. }
  739. },
  740. series: [
  741. {
  742. data: dataList,
  743. type: 'line',
  744. areaStyle: {
  745. normal: {
  746. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  747. { offset: 0, color: "#FF0080" },
  748. { offset: 0.5, color: "#FF60AF" },
  749. { offset: 1, color: "#FFC1E0" }
  750. ])
  751. }
  752. }
  753. }
  754. ]
  755. };
  756. myChart.setOption(option);
  757. } else {
  758. $("#div_lr").hide();
  759. }
  760. }
  761. });
  762. }
  763. //疫苗接种情况
  764. function ym() {
  765. $.ajax({
  766. url: ctx+"/person/person/queryPerYmEchartsForIndex",
  767. type: "post",
  768. success: function (restdata) {
  769. var pertype = restdata.perType;
  770. if (pertype) {
  771. var list1 = [];
  772. var list2 = [];
  773. if (restdata.data!=null&&restdata.data.length==1){
  774. list1.push(restdata.data[0].perCouNo1Yes);
  775. list1.push(restdata.data[0].perCouNo2Yes);
  776. list1.push(restdata.data[0].perCouNo3Yes);
  777. list2.push(restdata.data[0].perCouNo1No);
  778. list2.push(restdata.data[0].perCouNo1No);
  779. list2.push(restdata.data[0].perCouNo1No);
  780. }
  781. var myChart = echarts.init(document.getElementById('data_ym'));
  782. option = {
  783. title: {
  784. text: '疫苗接种情况'
  785. },
  786. tooltip: {
  787. trigger: 'axis'
  788. },
  789. legend: {
  790. data: ['已接种', '未接种']
  791. },
  792. grid: {
  793. left: '3%',
  794. right: '14%',
  795. bottom: '0%',
  796. containLabel: true
  797. },
  798. toolbox: {
  799. feature: {
  800. saveAsImage: {}
  801. }
  802. },
  803. xAxis: {
  804. type: 'category',
  805. boundaryGap: false,
  806. data: ['第一针', '第二针', '第三针']
  807. },
  808. yAxis: {
  809. type: 'value'
  810. },
  811. series: [
  812. {
  813. name: '已接种',
  814. type: 'line',
  815. stack: 'Total',
  816. data: list1
  817. },
  818. {
  819. name: '未接种',
  820. type: 'line',
  821. stack: 'Total',
  822. data: list2
  823. }
  824. ]
  825. };
  826. myChart.setOption(option);
  827. } else {
  828. $("#div_ym").hide();
  829. }
  830. }
  831. });
  832. }
  833. //残联信息数
  834. //https://echarts.apache.org/examples/zh/editor.html?c=pie-simple
  835. function canJi() {
  836. $.ajax({
  837. url: ctx+"/person/person/queryPerCanJiByEchartsForIndex",
  838. type: "post",
  839. success: function (restdata) {
  840. var pertype = restdata.perType;
  841. if (pertype) {
  842. var canJi = restdata.data[0];
  843. var myChart = echarts.init(document.getElementById('data_canJi'));
  844. option = {
  845. title: {
  846. text: '残联信息',
  847. //subtext: 'Fake Data',
  848. left: 'center'
  849. },
  850. tooltip: {
  851. trigger: 'item'
  852. },
  853. legend: {
  854. orient: 'vertical',
  855. left: 'left',
  856. show: false
  857. },
  858. series: [
  859. {
  860. name: '残联信息',
  861. type: 'pie',
  862. radius: '50%',
  863. itemStyle: {
  864. borderRadius: 0,
  865. borderColor: '#fff',
  866. borderWidth: 2
  867. },
  868. data: [
  869. { value: canJi.cjNumber, name: '残疾人数',itemStyle: {
  870. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  871. offset: 0,
  872. color: '#8E8E8E'
  873. }, {
  874. offset: 1,
  875. color: '#AE0000'
  876. }]),
  877. } },
  878. { value: canJi.btNumber, name: '享受重残补贴人数',itemStyle: {
  879. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  880. offset: 0,
  881. color: '#D9006C'
  882. }, {
  883. offset: 1,
  884. color: '#AE00AE'
  885. }]),
  886. } },
  887. { value: canJi.xfNumber, name: '巡防对象人数',itemStyle: {
  888. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  889. offset: 0,
  890. color: '#28FF28'
  891. }, {
  892. offset: 1,
  893. color: '#CF9E9E'
  894. }]),
  895. } },
  896. { value: canJi.zhouNumber, name: '巡防频次(周)',itemStyle: {
  897. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  898. offset: 0,
  899. color: '#C7C7E2'
  900. }, {
  901. offset: 1,
  902. color: '#4A4AFF'
  903. }]),
  904. } },
  905. { value: canJi.yueNumber, name: '巡防频次(月)',itemStyle: {
  906. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  907. offset: 0,
  908. color: '#d0d0d0'
  909. }, {
  910. offset: 1,
  911. color: '#F75000'
  912. }]),
  913. } },
  914. { value: canJi.jiNumber, name: '巡防频次(季)',itemStyle: {
  915. color: new echarts.graphic.LinearGradient(1, 1, 0, 0, [{
  916. offset: 0,
  917. color: '#E1E100'
  918. }, {
  919. offset: 1,
  920. color: '#FF5809'
  921. }]),
  922. } }
  923. ],
  924. emphasis: {
  925. itemStyle: {
  926. shadowBlur: 10,
  927. shadowOffsetX: 0,
  928. shadowColor: 'rgba(0, 0, 0, 0.5)'
  929. }
  930. }
  931. }
  932. ]
  933. };
  934. myChart.setOption(option);
  935. } else {
  936. $("#div_js").hide();
  937. }
  938. }
  939. });
  940. }
  941. //特殊人群信息数
  942. //https://echarts.apache.org/examples/zh/editor.html?c=pie-simple
  943. function tsrq() {
  944. $.ajax({
  945. url: ctx+"/person/person/queryPerTsrqByEchartsForIndex",
  946. type: "post",
  947. success: function (restdata) {
  948. var pertype = restdata.perType;
  949. if (pertype) {
  950. var tsrq = restdata.data[0];
  951. var myChart = echarts.init(document.getElementById('data_tsrq'));
  952. option = {
  953. title: {
  954. text: '特殊人群信息',
  955. //subtext: 'Fake Data',
  956. left: 'center'
  957. },
  958. tooltip: {
  959. trigger: 'item'
  960. },
  961. legend: {
  962. orient: 'vertical',
  963. left: 'left',
  964. show: false
  965. },
  966. series: [
  967. {
  968. name: '特殊人群信息',
  969. type: 'pie',
  970. radius: ['30%', '50%'],
  971. itemStyle: {
  972. borderRadius: 0,
  973. borderColor: '#fff',
  974. borderWidth: 2
  975. },
  976. data: [
  977. { value: tsrq.tsrqNumber1, name: '无' },
  978. { value: tsrq.tsrqNumber2, name: '社区矫正人员' },
  979. { value: tsrq.tsrqNumber3, name: '劳模' },
  980. { value: tsrq.tsrqNumber4, name: '志愿者' },
  981. { value: tsrq.tsrqNumber5, name: '失业人员' },
  982. { value: tsrq.tsrqNumber6, name: '信访人员' },
  983. { value: tsrq.tsrqNumber7, name: '残疾人' },
  984. { value: tsrq.tsrqNumber8, name: '低保人员' },
  985. { value: tsrq.tsrqNumber9, name: '精神病人' },
  986. { value: tsrq.tsrqNumber10, name: '释解安置人员' },
  987. { value: tsrq.tsrqNumber11, name: '吸毒人员' },
  988. { value: tsrq.tsrqNumber12, name: '重点稳控人员' },
  989. { value: tsrq.tsrqNumber13, name: '活跃分子' },
  990. { value: tsrq.tsrqNumber14, name: '闹访骨干' },
  991. { value: tsrq.tsrqNumber15, name: '吸毒人员未成年子女' },
  992. { value: tsrq.tsrqNumber16, name: '服刑人员未成年子女' },
  993. { value: tsrq.tsrqNumber17, name: '留守人员' },
  994. { value: tsrq.tsrqNumber18, name: '军烈属' },
  995. { value: tsrq.tsrqNumber19, name: '台胞侨胞' },
  996. { value: tsrq.tsrqNumber20, name: '老龄人' },
  997. { value: tsrq.tsrqNumber21, name: '失信被执行人' },
  998. { value: tsrq.tsrqNumber22, name: '社保人员' },
  999. { value: tsrq.tsrqNumber23, name: '医保人员' }
  1000. ],
  1001. emphasis: {
  1002. itemStyle: {
  1003. shadowBlur: 10,
  1004. shadowOffsetX: 0,
  1005. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1006. }
  1007. }
  1008. }
  1009. ]
  1010. };
  1011. myChart.setOption(option);
  1012. } else {
  1013. $("#div_tsrq").hide();
  1014. }
  1015. }
  1016. });
  1017. }
  1018. //保险信息数
  1019. function bx() {
  1020. $.ajax({
  1021. url: ctx+"/person/person/queryPerInsuranceByEchartsForIndex",
  1022. type: "post",
  1023. success: function (restdata) {
  1024. var pertype = restdata.perType;
  1025. if (pertype) {
  1026. var data = [];
  1027. if (restdata.data!=null&&restdata.data.length==1){
  1028. data.push({ value: restdata.data[0].perCouCzbYanglao, name: '城职保是否参保' });
  1029. data.push({ value: restdata.data[0].perCouCjbYanglao, name: '城居保是否参保' });
  1030. data.push({ value: restdata.data[0].perCouCzbYiliao, name: '城镇职工医疗保险是否参保' });
  1031. data.push({ value: restdata.data[0].perCouCjbYiliao, name: '城镇居民医疗保险是否参保' });
  1032. }
  1033. var myChart = echarts.init(document.getElementById('data_bx'));
  1034. option = {
  1035. title: {
  1036. text: '保险信息',
  1037. //subtext: 'Fake Data',
  1038. left: 'center'
  1039. },
  1040. tooltip: {
  1041. trigger: 'item'
  1042. },
  1043. legend: {
  1044. orient: 'vertical',
  1045. left: 'left',
  1046. show: false
  1047. },
  1048. series: [
  1049. {
  1050. name: '保险信息',
  1051. type: 'pie',
  1052. radius: ['30%', '50%'],
  1053. itemStyle: {
  1054. borderRadius: 0,
  1055. borderColor: '#fff',
  1056. borderWidth: 2,
  1057. normal: {
  1058. color: function (params) {
  1059. var colorList = [
  1060. {
  1061. c1: "#FA7096",
  1062. c2: "#FE8C69",
  1063. },
  1064. {
  1065. c1: "#3E6FF3",
  1066. c2: "#45B1F6",
  1067. },
  1068. {
  1069. c1: "#B15BFF",
  1070. c2: "#921AFF"
  1071. },
  1072. {
  1073. c1: "#C4C400",
  1074. c2: "#FFFF37"
  1075. },
  1076. ];
  1077. return new echarts.graphic.LinearGradient(1, 0, 0, 0, [
  1078. {
  1079. //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
  1080. offset: 0,
  1081. color: colorList[params.dataIndex].c1,
  1082. },
  1083. {
  1084. offset: 1,
  1085. color: colorList[params.dataIndex].c2,
  1086. },
  1087. ]);
  1088. }
  1089. }
  1090. },
  1091. data: data,
  1092. emphasis: {
  1093. itemStyle: {
  1094. shadowBlur: 10,
  1095. shadowOffsetX: 0,
  1096. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1097. }
  1098. }
  1099. }
  1100. ]
  1101. };
  1102. myChart.setOption(option);
  1103. } else {
  1104. $("#div_bx").hide();
  1105. }
  1106. }
  1107. });
  1108. }
  1109. function wgsjtj() {
  1110. let url = ctx+"/eventRank/eventRank/rankBarChart";
  1111. $.ajax({
  1112. url : url,
  1113. type: "post",
  1114. success : function (res) {
  1115. var colors0 = ['#804040', '#F9F900', '#A5A552', '#00cc99', '#7E3D76', '#3414d9', '#7E3D76', '#5519ff'];
  1116. var colors1 = ['#00ffcc', '#FF5809', '#ADADAD', '#9F4D95', '#3414d9', '#cc9933', '#ffcc00', '#00fff0'];
  1117. var myChart = echarts.init(document.getElementById('data-sj11'));
  1118. option = {
  1119. xAxis: {
  1120. type: 'category',
  1121. axisLabel: {
  1122. interval: 0,
  1123. rotate: 30
  1124. },
  1125. data: res.names
  1126. },
  1127. yAxis: {
  1128. type: 'value'
  1129. },
  1130. tooltip: {
  1131. trigger: 'axis',
  1132. formatter: "{b}事件数量 : {c}件"
  1133. },
  1134. series: [
  1135. {
  1136. data: res.datas,
  1137. type: 'bar',
  1138. showBackground: true,
  1139. backgroundStyle: {
  1140. color: 'rgba(180, 180, 180, 0.2)'
  1141. },
  1142. itemStyle: {
  1143. normal: {
  1144. color: new echarts.graphic.LinearGradient(1, 1, 0, 0,
  1145. [
  1146. {offset: 0, color: '#FF0000'}, //柱图渐变色
  1147. {offset: 0.5, color: '#FF359A'}, //柱图渐变色
  1148. {offset: 1, color: '#53FF53'}, //柱图渐变色
  1149. ]
  1150. )
  1151. }
  1152. }
  1153. }
  1154. ]
  1155. };
  1156. myChart.setOption(option);
  1157. }
  1158. });
  1159. }
  1160. </script>