livelihood.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  7. <link rel="stylesheet" href="style/reset.css" />
  8. <link rel="stylesheet" href="style/public.css" />
  9. <link rel="stylesheet" href="style/livelihood.css" />
  10. <link rel="stylesheet" href="font/iconfont.css" />
  11. <title>Document</title>
  12. </head>
  13. <body>
  14. <header class="title">
  15. <i class="iconfont iconminshengxingfu"></i>
  16. 民生幸福
  17. </header>
  18. <div class="line"></div>
  19. <section class="s1">
  20. <div class="card">
  21. <div class="s-title"><h2>医疗卫生</h2></div>
  22. <div class="f-item">
  23. <span>卫生机构数</span>
  24. <span class="emphasize">1608</span>
  25. </div>
  26. <div class="f-item">
  27. <span>医院</span>
  28. <span class="emphasize">44</span>
  29. </div>
  30. <div class="f-item">
  31. <span>床位数</span>
  32. <span class="emphasize">22774</span>
  33. </div>
  34. <div class="f-item">
  35. <span>人员数</span>
  36. <span class="emphasize">34531</span>
  37. </div>
  38. </div>
  39. <div class="card">
  40. <div class="s-title"><h2>运输邮电</h2></div>
  41. <div class="f-item">
  42. <span>机动车辆总数</span>
  43. <span class="emphasize">293.37万辆</span>
  44. </div>
  45. <div class="f-item">
  46. <span>货运量</span>
  47. <span class="emphasize">14975万吨</span>
  48. </div>
  49. <div class="f-item">
  50. <span>货物周转量</span>
  51. <span class="emphasize">186.62亿吨公里</span>
  52. </div>
  53. <div class="f-item">
  54. <span>货物吞吐量</span>
  55. <span class="emphasize">8267.42万吨</span>
  56. </div>
  57. </div>
  58. <div class="line"></div>
  59. <div class="card">
  60. <div class="s-title"><h2>教育资源</h2></div>
  61. <div class="f-item">
  62. <span>普通中学</span>
  63. <span class="emphasize">189所</span>
  64. </div>
  65. <div class="f-item">
  66. <span>小学</span>
  67. <span class="emphasize">319所</span>
  68. </div>
  69. <div class="f-item">
  70. <span>幼儿教育</span>
  71. <span class="emphasize">275所</span>
  72. </div>
  73. <div class="f-item">
  74. <span>高等院校</span>
  75. <span class="emphasize">3所</span>
  76. </div>
  77. <div class="f-item">
  78. <span>中等职业教育学校</span>
  79. <span class="emphasize">22所</span>
  80. </div>
  81. </div>
  82. <div class="card">
  83. <div class="s-title"><h2>文体服务</h2></div>
  84. <div class="f-item">
  85. <span>博物馆</span>
  86. <span class="emphasize">6所</span>
  87. </div>
  88. <div class="f-item">
  89. <span>公共图书馆</span>
  90. <span class="emphasize">8所</span>
  91. </div>
  92. <div class="f-item">
  93. <span>广播电视台</span>
  94. <span class="emphasize">8个</span>
  95. </div>
  96. <div class="f-item">
  97. <span>文化站</span>
  98. <span class="emphasize">74个</span>
  99. </div>
  100. </div>
  101. </section>
  102. <div class="line"></div>
  103. <section class="s2">
  104. <div class="card" id="gdp"></div>
  105. <div class="card" id="outIn"></div>
  106. <div class="line"></div>
  107. <div class="card" id="addVal"></div>
  108. <div class="card" id="xiaofei"></div>
  109. <div class="line"></div>
  110. <div class="card" style="height:240px;" id="guding"></div>
  111. <div class="card" style="height:240px;" id="gongshang"></div>
  112. </section>
  113. <script src="js/echarts.min.js"></script>
  114. <script>
  115. (function() {
  116. let gdpOption = {
  117. title: {
  118. text: "社会保障",
  119. textStyle: {
  120. color: "#fff"
  121. }
  122. },
  123. color: ["#ffe354", "#ff9a32", "#dc9518"],
  124. tooltip: {
  125. trigger: "axis",
  126. axisPointer: {
  127. lineStyle: {
  128. color: "#57617B"
  129. }
  130. }
  131. },
  132. legend: {
  133. data: [
  134. "城镇职工养老保险人数",
  135. "城乡居民基养老保险人数",
  136. "城乡基本医疗保险人数"
  137. ],
  138. icon: "rect",
  139. itemWidth: 10,
  140. itemHeight: 5,
  141. itemGap: 2,
  142. right: "0",
  143. x: "40%",
  144. textStyle: {
  145. fontSize: 12,
  146. color: "#F1F1F3"
  147. }
  148. },
  149. grid: {
  150. left: "1%",
  151. right: "6%",
  152. bottom: "3%",
  153. containLabel: true
  154. },
  155. xAxis: [
  156. {
  157. type: "category",
  158. boundaryGap: false,
  159. axisLine: {
  160. lineStyle: {
  161. color: "#fff"
  162. }
  163. },
  164. data: ["2013", "2014", "2015", "2016", "2017"]
  165. }
  166. ],
  167. yAxis: [
  168. {
  169. name:"(万人)",
  170. type: "value",
  171. axisTick: {
  172. show: false
  173. },
  174. axisLine: {
  175. lineStyle: {
  176. color: "#fff"
  177. }
  178. },
  179. axisLabel: {
  180. margin: 10,
  181. textStyle: {
  182. fontSize: 14
  183. }
  184. },
  185. splitLine: {
  186. show: false,
  187. lineStyle: {
  188. color: "#57617B"
  189. }
  190. }
  191. }
  192. ],
  193. series: [
  194. {
  195. name: "城镇职工养老保险人数",
  196. type: "line",
  197. smooth: true,
  198. lineStyle: {
  199. normal: {
  200. width: 1
  201. }
  202. },
  203. areaStyle: {
  204. normal: {
  205. color: new echarts.graphic.LinearGradient(
  206. 0,
  207. 0,
  208. 0,
  209. 1,
  210. [
  211. {
  212. offset: 0,
  213. color: "rgba(137, 189, 27, 0.3)"
  214. },
  215. {
  216. offset: 0.8,
  217. color: "rgba(137, 189, 27, 0)"
  218. }
  219. ],
  220. false
  221. ),
  222. shadowColor: "rgba(253, 225, 89, 1)",
  223. shadowBlur: 10
  224. }
  225. },
  226. itemStyle: {
  227. normal: {
  228. color: "#ffe354"
  229. }
  230. },
  231. data: [181.2026, 186.1874, 191.9834, 193.571, 186.2082]
  232. },
  233. {
  234. name: "城乡居民基养老保险人数",
  235. type: "line",
  236. smooth: true,
  237. lineStyle: {
  238. normal: {
  239. width: 1
  240. }
  241. },
  242. areaStyle: {
  243. normal: {
  244. color: new echarts.graphic.LinearGradient(
  245. 0,
  246. 0,
  247. 0,
  248. 1,
  249. [
  250. {
  251. offset: 0,
  252. color: "rgba(0, 136, 212, 0.3)"
  253. },
  254. {
  255. offset: 0.8,
  256. color: "rgba(0, 136, 212, 0)"
  257. }
  258. ],
  259. false
  260. ),
  261. shadowColor: "rgba(253, 225, 89, 1)",
  262. shadowBlur: 10
  263. }
  264. },
  265. itemStyle: {
  266. normal: {
  267. color: "#ff9a32"
  268. }
  269. },
  270. data: [149.5543, 142.4777, 149.1736, 156.006, 155.4064]
  271. },
  272. {
  273. name: "城乡基本医疗保险人数",
  274. type: "line",
  275. smooth: true,
  276. lineStyle: {
  277. normal: {
  278. width: 1
  279. }
  280. },
  281. areaStyle: {
  282. normal: {
  283. color: new echarts.graphic.LinearGradient(
  284. 0,
  285. 0,
  286. 0,
  287. 1,
  288. [
  289. {
  290. offset: 0,
  291. color: "rgba(219, 50, 51, 0.3)"
  292. },
  293. {
  294. offset: 0.8,
  295. color: "rgba(219, 50, 51, 0)"
  296. }
  297. ],
  298. false
  299. ),
  300. shadowColor: "rgba(253, 225, 89, 1)",
  301. shadowBlur: 10
  302. }
  303. },
  304. itemStyle: {
  305. normal: {
  306. color: "#dc9518"
  307. }
  308. },
  309. data: [385.3142, 388.7146, 386.9919, 382.6387, 388.8139]
  310. }
  311. ]
  312. };
  313. let outInOption = {
  314. title: {
  315. text: "邮电服务",
  316. textStyle: {
  317. color: "#fff"
  318. }
  319. },
  320. color: ["#ffe354", "#ff9a32"],
  321. tooltip: {
  322. trigger: "axis"
  323. },
  324. legend: {
  325. icon: "rect",
  326. itemWidth: 14,
  327. itemHeight: 5,
  328. itemGap: 1,
  329. data: ["客运量", "货物吞吐量"],
  330. x: "60%",
  331. textStyle: {
  332. fontSize: 12,
  333. color: "#fff"
  334. }
  335. },
  336. grid: {
  337. left: "2%",
  338. right: "4%",
  339. bottom: "3%",
  340. top: "30%",
  341. containLabel: true
  342. },
  343. xAxis: [
  344. {
  345. type: "category",
  346. data: ["2013", "2014", "2015", "2016", "2017"],
  347. axisLine: {
  348. lineStyle: {
  349. color: "#ffffff"
  350. }
  351. }
  352. }
  353. ],
  354. yAxis: [
  355. {
  356. type: "value",
  357. splitLine: {
  358. show: false
  359. },
  360. axisLine: {
  361. lineStyle: {
  362. color: "#ffffff"
  363. }
  364. }
  365. }
  366. ],
  367. series: [
  368. {
  369. name: "客运量",
  370. type: "bar",
  371. data: [20102, 9545, 9239, 9746, 9606],
  372. barGap: 0
  373. },
  374. {
  375. name: "货物吞吐量",
  376. type: "bar",
  377. data: [6737.08, 7352.17, 7524.62, 7923, 8267.42],
  378. barGap: 0
  379. }
  380. ]
  381. };
  382. let addValOption = {
  383. title: {
  384. text: "升学率、入学率",
  385. textStyle: {
  386. color: "#fff"
  387. }
  388. },
  389. color: ["#ffe354"],
  390. tooltip: {
  391. trigger: "axis",
  392. axisPointer: {
  393. // 坐标轴指示器,坐标轴触发有效
  394. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  395. }
  396. },
  397. grid: {
  398. left: "3%",
  399. right: "4%",
  400. bottom: "3%",
  401. top: "33%",
  402. containLabel: true,
  403. borderColor: "#fff"
  404. },
  405. xAxis: [
  406. {
  407. type: "category",
  408. data: [
  409. "学龄\n儿童",
  410. "小学\n升学",
  411. "初中\n适龄",
  412. "初中\n升学",
  413. "高中\n升学"
  414. ],
  415. axisTick: {
  416. alignWithLabel: true
  417. },
  418. axisLine: {
  419. lineStyle: {
  420. color: "#ffffff"
  421. }
  422. }
  423. }
  424. ],
  425. yAxis: [
  426. {
  427. name: "(%)",
  428. type: "value",
  429. splitLine: {
  430. show: false
  431. },
  432. axisLine: {
  433. lineStyle: {
  434. color: "#ffffff"
  435. }
  436. }
  437. }
  438. ],
  439. series: [
  440. {
  441. name: "升学入学率",
  442. type: "bar",
  443. barWidth: "40%",
  444. data: [100, 100, 100, 98.58, 87.79]
  445. }
  446. ]
  447. };
  448. let xiaofeiOption = {
  449. title: {
  450. text: "卫生机构人员比例",
  451. textStyle: {
  452. color: "#fff"
  453. }
  454. },
  455. tooltip: {
  456. trigger: "item",
  457. formatter: "{a} <br/>{b} : {c} ({d}%)",
  458. textStyle: {
  459. fontSize: 12
  460. }
  461. },
  462. legend: {
  463. data: [
  464. "执业医师",
  465. "执业助理医师",
  466. "注册护士",
  467. "药师(士)",
  468. "技师(士)",
  469. "其他卫生技术人员"
  470. ],
  471. itemWidth: 10,
  472. itemHeight: 5,
  473. itemGap: 2,
  474. right: "0",
  475. x: "48%",
  476. y: "30%",
  477. textStyle: {
  478. fontSize: 12,
  479. color: "#F1F1F3"
  480. }
  481. },
  482. series: [
  483. {
  484. name: "卫生机构人员比例",
  485. type: "pie",
  486. center: ["25%", "60%"],
  487. radius: ["50%", "65%"],
  488. avoidLabelOverlap: false,
  489. color: ["#ffe354", "#ff9a32","#dc9518","#9b9b9b","#dc9518","#bfbfbf","#d9d9d9"],
  490. label: {
  491. normal: {
  492. show: false
  493. },
  494. emphasis: {
  495. show: true,
  496. textStyle: {
  497. fontSize: "12",
  498. fontWeight: "bold"
  499. }
  500. }
  501. },
  502. labelLine: {
  503. normal: {
  504. show: false
  505. }
  506. },
  507. data: [
  508. { value: 2904.1, name: "其他卫生技术人员" },
  509. { value: 8002.28, name: "执业医师" },
  510. { value: 1857.6, name: "执业助理医师" },
  511. { value: 12908.45, name: "注册护士" },
  512. { value: 1894.6, name: "药师(士)" },
  513. { value: 1320.5, name: "技师(士)" }
  514. ]
  515. }
  516. ]
  517. };
  518. let gudingOption = {
  519. title: {
  520. text: "民生公共支出情况",
  521. textStyle: {
  522. color: "#fff"
  523. }
  524. },
  525. color: ["#ffe354"],
  526. tooltip: {
  527. trigger: "axis",
  528. axisPointer: {
  529. // 坐标轴指示器,坐标轴触发有效
  530. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  531. }
  532. },
  533. grid: {
  534. left: "3%",
  535. right: "4%",
  536. bottom: "3%",
  537. top: "23%",
  538. containLabel: true,
  539. borderColor: "#fff"
  540. },
  541. xAxis: [
  542. {
  543. axisLabel:{
  544. interval:0,
  545. rotate:45,
  546. // margin:2,
  547. textStyle:{
  548. fontSize:10
  549. }
  550. },
  551. type: "category",
  552. data: [
  553. "一般公共服务",
  554. "公共安全",
  555. "教育",
  556. "文化体育与传媒",
  557. "社会保障和就业",
  558. "医疗卫生",
  559. "节能环保",
  560. "城乡社区事务",
  561. "交通运输",
  562. "其他支出"
  563. ],
  564. axisTick: {
  565. alignWithLabel: true
  566. },
  567. axisLine: {
  568. lineStyle: {
  569. color: "#ffffff"
  570. }
  571. }
  572. }
  573. ],
  574. yAxis: [
  575. {
  576. type: "value",
  577. splitLine: {
  578. show: false
  579. },
  580. axisLine: {
  581. lineStyle: {
  582. color: "#ffffff"
  583. }
  584. }
  585. }
  586. ],
  587. series: [
  588. {
  589. name: "(万元)",
  590. type: "bar",
  591. barWidth: "40%",
  592. data: [
  593. 393354,
  594. 273139,
  595. 732484,
  596. 76247,
  597. 530281,
  598. 373195,
  599. 47605,
  600. 47605,
  601. 219034,
  602. 97014,
  603. 7055
  604. ]
  605. }
  606. ]
  607. };
  608. let gongshangOption = {
  609. title: {
  610. text: "城镇登记失业率",
  611. textStyle: {
  612. color: "#fff"
  613. }
  614. },
  615. color: ["#ffe354"],
  616. tooltip: {
  617. trigger: "axis",
  618. axisPointer: {
  619. // 坐标轴指示器,坐标轴触发有效
  620. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  621. }
  622. },
  623. grid: {
  624. left: "3%",
  625. right: "4%",
  626. bottom: "3%",
  627. top: "33%",
  628. containLabel: true,
  629. borderColor: "#fff"
  630. },
  631. xAxis: [
  632. {
  633. type: "category",
  634. data: ["2013", "2014", "2015", "2016", "2017"],
  635. axisTick: {
  636. alignWithLabel: true
  637. },
  638. axisLine: {
  639. lineStyle: {
  640. color: "#ffffff"
  641. }
  642. }
  643. }
  644. ],
  645. yAxis: [
  646. {
  647. name: "(%)",
  648. type: "value",
  649. splitLine: {
  650. show: false
  651. },
  652. max:100,
  653. axisLine: {
  654. lineStyle: {
  655. color: "#ffffff"
  656. }
  657. }
  658. }
  659. ],
  660. series: [
  661. {
  662. name: "失业率(%)",
  663. type: "bar",
  664. barWidth: "40%",
  665. data: [2.32, 2.36, 2.37, 2.37, 2.38]
  666. }
  667. ]
  668. };
  669. let gdpChart = echarts.init(document.querySelector("#gdp"));
  670. let outInChart = echarts.init(document.querySelector("#outIn"));
  671. let addValChart = echarts.init(document.querySelector("#addVal"));
  672. let xiaofeiChart = echarts.init(document.querySelector("#xiaofei"));
  673. let gudingChart = echarts.init(document.querySelector("#guding"));
  674. let gongshangChart = echarts.init(document.querySelector("#gongshang"));
  675. gdpChart.setOption(gdpOption);
  676. outInChart.setOption(outInOption);
  677. addValChart.setOption(addValOption);
  678. xiaofeiChart.setOption(xiaofeiOption);
  679. gudingChart.setOption(gudingOption);
  680. gongshangChart.setOption(gongshangOption);
  681. })();
  682. let arr = Array.from(document.querySelectorAll(".s1 .card")).concat(
  683. Array.from(document.querySelectorAll(".s2 .card"))
  684. );
  685. arr.forEach((dom, index) => {
  686. dom.addEventListener("click", e => {
  687. console.log("livelihoodClickHandle", index);
  688. window.livelihoodClickHandle && window.livelihoodClickHandle(index);
  689. });
  690. });
  691. </script>
  692. </body>
  693. </html>