economics.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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/economics.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 icondiqiuyi"></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. <p>法人单位数</p>
  24. <p class="emphasize">70533</p>
  25. </div>
  26. <div class="f-item">
  27. <p>产业活动单位数</p>
  28. <p class="emphasize">79544</p>
  29. </div>
  30. </div>
  31. <div class="card">
  32. <div class="s-title"><h2>规上企业</h2></div>
  33. <div class="f-item">
  34. <p>规模以上工业企业</p>
  35. <p class="emphasize">2112个</p>
  36. </div>
  37. <div class="f-item">
  38. <p>规模以下工业企业</p>
  39. <p class="emphasize">48608个</p>
  40. </div>
  41. </div>
  42. <div class="line"></div>
  43. <div class="card" style="height:180px;">
  44. <div class="s-title"><h2>科技发展</h2></div>
  45. <div class="f-item">
  46. <p>市属科学研究开发机构</p>
  47. <p class="emphasize">11家</p>
  48. </div>
  49. <div class="f-item">
  50. <p>高新技术企业数</p>
  51. <p class="emphasize">741家</p>
  52. </div>
  53. <div class="f-item">
  54. <p>省级科技计划项目</p>
  55. <p class="emphasize">9家</p>
  56. </div>
  57. <div class="f-item">
  58. <p>专利申请量</p>
  59. <p class="emphasize">17996件</p>
  60. </div>
  61. </div>
  62. <div class="card" style="height:180px;">
  63. <div class="s-title"><h2>规上企业R&D情况</h2></div>
  64. <div class="f-item">
  65. <p>R&D活动企业</p>
  66. <p class="emphasize">897家</p>
  67. </div>
  68. <div class="f-item">
  69. <p>R&D项目数</p>
  70. <p class="emphasize">3580个</p>
  71. </div>
  72. <div class="f-item">
  73. <p>R&D专利申请数</p>
  74. <p class="emphasize">4265个</p>
  75. </div>
  76. <div class="f-item">
  77. <p>R&D经费内部支出</p>
  78. <p class="emphasize">48.45亿元</p>
  79. </div>
  80. <div class="f-item">
  81. <p>R&D新产品产值</p>
  82. <p class="emphasize">1035.67亿元</p>
  83. </div>
  84. </div>
  85. </section>
  86. <div class="line"></div>
  87. <section class="s2">
  88. <div class="card" id="gdp"></div>
  89. <div class="card" id="outIn"></div>
  90. <div class="line"></div>
  91. <div class="card" id="addVal"></div>
  92. <div class="card" id="xiaofei"></div>
  93. <div class="line"></div>
  94. <div class="card" id="guding"></div>
  95. <div class="card" id="gongshang"></div>
  96. </section>
  97. <script src="js/echarts.min.js"></script>
  98. <script>
  99. (function() {
  100. let gdpOption = {
  101. title: {
  102. text: "年度GDP走势",
  103. textStyle: {
  104. color: "#fff"
  105. }
  106. },
  107. color: ["#ffe354"],
  108. tooltip: {
  109. trigger: "axis",
  110. axisPointer: {
  111. // 坐标轴指示器,坐标轴触发有效
  112. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  113. }
  114. },
  115. grid: {
  116. left: "3%",
  117. right: "4%",
  118. bottom: "3%",
  119. containLabel: true,
  120. borderColor: "#fff"
  121. },
  122. xAxis: [
  123. {
  124. type: "category",
  125. data: ["2013", "2014", "2015", "2016", "2017"],
  126. axisTick: {
  127. alignWithLabel: true
  128. },
  129. axisLine: {
  130. lineStyle: {
  131. color: "#ffffff"
  132. }
  133. }
  134. }
  135. ],
  136. yAxis: [
  137. {
  138. name: "(亿元)",
  139. type: "value",
  140. splitLine: {
  141. show: false
  142. },
  143. axisLine: {
  144. lineStyle: {
  145. color: "#ffffff"
  146. }
  147. }
  148. }
  149. ],
  150. series: [
  151. {
  152. name: "GDP",
  153. type: "bar",
  154. barWidth: "40%",
  155. data: [2020.1263, 2104.7991, 2264.1883, 2444.0859, 2690.2505]
  156. }
  157. ]
  158. };
  159. let outInOption = {
  160. title: {
  161. text: "进出口额走势",
  162. textStyle: {
  163. color: "#fff"
  164. }
  165. },
  166. color: ["#ffe354", "#ff9a32"],
  167. tooltip: {
  168. trigger: "axis",
  169. axisPointer: {
  170. // 坐标轴指示器,坐标轴触发有效
  171. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  172. },
  173. formatter: function(params) {
  174. // 改鼠标悬浮提示值格式
  175. var relVal = params[0].name + "<br/>";
  176. relVal +=
  177. params[0].seriesName + " : " + params[0].value + "<br/>";
  178. relVal +=
  179. params[1].seriesName + " : " + -params[1].value + "<br/>";
  180. return relVal;
  181. }
  182. },
  183. legend: {
  184. data: ["进口额", "出口额"],
  185. x: "60%",
  186. textStyle: {
  187. color: "#fff"
  188. }
  189. },
  190. grid: {
  191. left: "2%",
  192. right: "4%",
  193. bottom: "3%",
  194. containLabel: true
  195. },
  196. xAxis: [
  197. {
  198. type: "value",
  199. axisLabel: {
  200. formatter: function(value) {
  201. if (value < 0) {
  202. return -value;
  203. } else {
  204. return value;
  205. }
  206. }
  207. },
  208. axisLine: {
  209. lineStyle: {
  210. color: "#ffffff"
  211. }
  212. }
  213. }
  214. ],
  215. yAxis: [
  216. {
  217. position: "left",
  218. type: "category",
  219. axisTick: { show: false },
  220. axisLine: {
  221. show: true,
  222. lineStyle: {
  223. color: "#ffffff"
  224. }
  225. },
  226. data: ["2013", "2014", "2015", "2016", "2017"]
  227. }
  228. ],
  229. series: [
  230. {
  231. name: "进口额",
  232. type: "bar",
  233. stack: "总量",
  234. label: {
  235. normal: {
  236. show: false,
  237. position: "right"
  238. }
  239. },
  240. data: [309.5884, 268.1925, 277.1032, 324.9113, 57.3362]
  241. },
  242. {
  243. name: "出口额",
  244. type: "bar",
  245. stack: "总量",
  246. label: {
  247. normal: {
  248. show: false,
  249. position: "left",
  250. formatter: function(value) {
  251. if (value.data < 0) {
  252. return -value.data;
  253. }
  254. }
  255. }
  256. },
  257. data: [-1075.59, -993.5928, -954.6461, -926.8384, -140.0002]
  258. }
  259. ]
  260. };
  261. let addValOption = {
  262. title: {
  263. text: "规上工业增加值走势",
  264. textStyle: {
  265. color: "#fff"
  266. }
  267. },
  268. color: ["#ff9a32", "#ffe354"],
  269. tooltip: {
  270. trigger: "axis",
  271. axisPointer: {
  272. // 坐标轴指示器,坐标轴触发有效
  273. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  274. },
  275. position: "right"
  276. },
  277. grid: {
  278. left: "3%",
  279. right: "4%",
  280. bottom: "13%",
  281. top: "20%",
  282. containLabel: true,
  283. borderColor: "#fff"
  284. },
  285. legend: {
  286. itemWidth: 14,
  287. itemHeight: 5,
  288. itemGap: 1,
  289. data: ["规模以上工业增加值(亿元)", "增速(%)"],
  290. x: "0",
  291. y:"90%",
  292. textStyle: {
  293. color: "#fff",
  294. fontSize: 10
  295. }
  296. },
  297. xAxis: {
  298. data: ["2013", "2014", "2015", "2016", "2017"],
  299. axisLine: {
  300. lineStyle: {
  301. color: "#ffffff"
  302. }
  303. },
  304. axisTick: {
  305. show: false //隐藏X轴刻度
  306. },
  307. axisLabel: {
  308. show: true,
  309. textStyle: {
  310. color: "#fff" //X轴文字颜色
  311. }
  312. }
  313. },
  314. yAxis: [
  315. {
  316. type: "value",
  317. splitLine: {
  318. show: false
  319. },
  320. splitLine: {
  321. show: false
  322. },
  323. axisTick: {
  324. show: false
  325. },
  326. axisLine: {
  327. lineStyle: {
  328. color: "#ffffff"
  329. }
  330. },
  331. axisLabel: {
  332. show: true,
  333. textStyle: {
  334. color: "#fff"
  335. }
  336. }
  337. },
  338. {
  339. type: "value",
  340. position: "right",
  341. splitLine: {
  342. show: false
  343. },
  344. axisTick: {
  345. show: false
  346. },
  347. axisLine: {
  348. lineStyle: {
  349. color: "#ffffff"
  350. }
  351. },
  352. axisLabel: {
  353. show: true,
  354. formatter: "{value} %", //右侧Y轴文字显示
  355. textStyle: {
  356. color: "#fff"
  357. }
  358. }
  359. }
  360. ],
  361. series: [
  362. {
  363. name: "增速(%)",
  364. type: "line",
  365. yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
  366. smooth: true, //平滑曲线显示
  367. showAllSymbol: true, //显示所有图形。
  368. symbol: "circle", //标记的图形为实心圆
  369. symbolSize: 10, //标记的大小
  370. data: ["", 11, 8, 7, 10]
  371. },
  372. {
  373. name: "规模以上工业增加值(亿元)",
  374. type: "line",
  375. data: [696.9119, 847.2853, 965.7447, 1065.7959, 991.6795]
  376. }
  377. ]
  378. };
  379. let xiaofeiOption = {
  380. title: {
  381. text: "社会消费品零销总额走势",
  382. textStyle: {
  383. color: "#fff"
  384. }
  385. },
  386. color: ["#ffe354"],
  387. tooltip: {
  388. trigger: "axis",
  389. axisPointer: {
  390. // 坐标轴指示器,坐标轴触发有效
  391. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  392. }
  393. },
  394. grid: {
  395. left: "2%",
  396. right: "4%",
  397. bottom: "3%",
  398. top: "20%",
  399. containLabel: true
  400. },
  401. xAxis: [
  402. {
  403. type: "value",
  404. axisLine: {
  405. lineStyle: {
  406. color: "#ffffff"
  407. }
  408. }
  409. }
  410. ],
  411. yAxis: [
  412. {
  413. // name:'(万/人)',
  414. position: "left",
  415. type: "category",
  416. axisTick: { show: false },
  417. axisLine: {
  418. show: true,
  419. lineStyle: {
  420. color: "#ffffff"
  421. }
  422. },
  423. data: ["2013", "2014", "2015", "2016", "2017"]
  424. }
  425. ],
  426. series: [
  427. {
  428. name: "(亿元)",
  429. type: "bar",
  430. stack: "总量",
  431. label: {
  432. normal: {
  433. show: false,
  434. position: "right"
  435. }
  436. },
  437. data: [903.6984, 923.3509, 1034.309, 1159.0639, 1279.6336]
  438. }
  439. ]
  440. };
  441. let gudingOption = {
  442. title: {
  443. text: "固定资产投资走势",
  444. textStyle: {
  445. color: "#fff"
  446. }
  447. },
  448. color: ["#ff9a32"],
  449. tooltip: {
  450. trigger: "axis",
  451. axisPointer: {
  452. // 坐标轴指示器,坐标轴触发有效
  453. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  454. }
  455. },
  456. grid: {
  457. left: "3%",
  458. right: "4%",
  459. bottom: "3%",
  460. containLabel: true,
  461. borderColor: "#fff"
  462. },
  463. xAxis: [
  464. {
  465. type: "category",
  466. data: ["2013", "2014", "2015", "2016", "2017"],
  467. axisTick: {
  468. alignWithLabel: true
  469. },
  470. axisLine: {
  471. lineStyle: {
  472. color: "#ffffff"
  473. }
  474. }
  475. }
  476. ],
  477. yAxis: [
  478. {
  479. name: "(亿元)",
  480. type: "value",
  481. splitLine: {
  482. show: false
  483. },
  484. axisLine: {
  485. lineStyle: {
  486. color: "#ffffff"
  487. }
  488. }
  489. }
  490. ],
  491. series: [
  492. {
  493. data: [1000.8418, 1111.6497, 1307.8743, 1517.7723, 1774.8348],
  494. type: "line",
  495. label: {
  496. show: false,
  497. position: "top",
  498. textStyle: {
  499. color: "#fff",
  500. fontSize: 10
  501. }
  502. }
  503. }
  504. ]
  505. };
  506. let gongshangOption = {
  507. title: {
  508. text: "地方公共财政预算收入",
  509. textStyle: {
  510. color: "#fff"
  511. }
  512. },
  513. color: ["#ffe354"],
  514. tooltip: {
  515. trigger: "axis",
  516. axisPointer: {
  517. // 坐标轴指示器,坐标轴触发有效
  518. type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
  519. }
  520. },
  521. grid: {
  522. left: "3%",
  523. right: "4%",
  524. bottom: "3%",
  525. containLabel: true,
  526. borderColor: "#fff"
  527. },
  528. xAxis: [
  529. {
  530. type: "category",
  531. data: ["2013", "2014", "2015", "2016", "2017"],
  532. axisTick: {
  533. alignWithLabel: true
  534. },
  535. axisLine: {
  536. lineStyle: {
  537. color: "#ffffff"
  538. }
  539. }
  540. }
  541. ],
  542. yAxis: [
  543. {
  544. name: "(亿元)",
  545. type: "value",
  546. splitLine: {
  547. show: false
  548. },
  549. axisLine: {
  550. lineStyle: {
  551. color: "#ffffff"
  552. }
  553. }
  554. }
  555. ],
  556. series: [
  557. {
  558. data: [158.03, 177.2, 199.01, 204.17, 222.37],
  559. type: "line"
  560. }
  561. ]
  562. };
  563. let gdpChart = echarts.init(document.querySelector("#gdp"));
  564. let outInChart = echarts.init(document.querySelector("#outIn"));
  565. let addValChart = echarts.init(document.querySelector("#addVal"));
  566. let xiaofeiChart = echarts.init(document.querySelector("#xiaofei"));
  567. let gudingChart = echarts.init(document.querySelector("#guding"));
  568. let gongshangChart = echarts.init(document.querySelector("#gongshang"));
  569. gdpChart.setOption(gdpOption);
  570. outInChart.setOption(outInOption);
  571. addValChart.setOption(addValOption);
  572. xiaofeiChart.setOption(xiaofeiOption);
  573. gudingChart.setOption(gudingOption);
  574. gongshangChart.setOption(gongshangOption);
  575. })();
  576. let arr = Array.from(document.querySelectorAll(".s1 .card")).concat(
  577. Array.from(document.querySelectorAll(".s2 .card"))
  578. );
  579. arr.forEach((dom, index) => {
  580. dom.addEventListener("click", e => {
  581. console.log("economicsClickHandle", index);
  582. window.economicsClickHandle && window.economicsClickHandle(index);
  583. });
  584. });
  585. </script>
  586. </body>
  587. </html>