js.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1.  $(window).load(function(){$(".loading").fadeOut()})
  2. $(function () {
  3. echarts_1();
  4. echarts_4()
  5. echarts_31()
  6. function echarts_1() {
  7. // 基于准备好的dom,初始化echarts实例
  8. var myChart = echarts.init(document.getElementById('echart1'));
  9. var data = [{
  10. title: '**省'
  11. },
  12. ['本周'],
  13. [{
  14. name: '文本1',
  15. max: 150
  16. }, {
  17. name: '文本2',
  18. max: 150
  19. }, {
  20. name: '文本3',
  21. max: 150
  22. }, {
  23. name: '文本4',
  24. max: 150
  25. }, {
  26. name: '文本5',
  27. max: 150
  28. }],
  29. [43, 100, 28, 3, 150],
  30. ]
  31. option = {
  32. color: ['#9DD060', '#35C96E', '#4DCEF8'],
  33. tooltip: {},
  34. radar: {
  35. center: ['50%', '50%'],
  36. radius: ["25%", "70%"],
  37. name: {
  38. textStyle: {
  39. color: '#72ACD1'
  40. }
  41. },
  42. splitLine: {
  43. lineStyle: {
  44. color: 'rgba(255,255,255,.0',
  45. width: 2
  46. }
  47. },
  48. axisLine: {
  49. lineStyle: {
  50. color: 'rgba(255,255,255,0.2)',
  51. width: 1,
  52. type: 'dotted'
  53. },
  54. },
  55. splitArea: {
  56. areaStyle: {
  57. color: ['rgba(255,255,255,.1)', 'rgba(255,255,255,0)']
  58. }
  59. },
  60. indicator: data[2]
  61. },
  62. series: [{
  63. name: '',
  64. type: 'radar',
  65. data: [{
  66. areaStyle: {
  67. normal: {
  68. opacity: 0.3,
  69. }
  70. },
  71. value: data[3],
  72. name: data[1][0]
  73. },
  74. {
  75. areaStyle: {
  76. normal: {
  77. opacity: 0.3,
  78. }
  79. },
  80. value: data[4],
  81. name: data[1][1]
  82. },
  83. {
  84. areaStyle: {
  85. normal: {
  86. opacity: 0.3,
  87. }
  88. },
  89. value: data[5],
  90. name: data[1][2]
  91. }
  92. ]
  93. }]
  94. };
  95. // 使用刚指定的配置项和数据显示图表。
  96. myChart.setOption(option);
  97. window.addEventListener("resize",function(){
  98. myChart.resize();
  99. });
  100. }
  101. function echarts_4() {
  102. // 基于准备好的dom,初始化echarts实例
  103. var myChart = echarts.init(document.getElementById('echart4'));
  104. var myChart2 = echarts.init(document.getElementById('echart3'));
  105. option = {
  106. tooltip: {
  107. trigger: 'axis',
  108. axisPointer: {
  109. type: 'shadow'
  110. }
  111. },
  112. legend: {
  113. data: ['文本1', '文本2'],
  114. top:'2%',
  115. textStyle: {
  116. color: "rgba(255,255,255,.5)",
  117. fontSize: '12',
  118. },
  119. itemWidth: 12,
  120. itemHeight: 12,
  121. itemGap: 35
  122. },
  123. grid: {
  124. left: '0%',
  125. top:'40px',
  126. right: '0%',
  127. bottom: '0%',
  128. containLabel: true
  129. },
  130. xAxis: [{
  131. type: 'category',
  132. data: ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
  133. axisLine: {
  134. show: true,
  135. lineStyle: {
  136. color: "rgba(255,255,255,.1)",
  137. width: 1,
  138. type: "solid"
  139. },
  140. },
  141. axisTick: {
  142. show: false,
  143. },
  144. axisLabel: {
  145. interval: 0,
  146. // rotate:50,
  147. show: true,
  148. splitNumber: 15,
  149. textStyle: {
  150. color: "rgba(255,255,255,.6)",
  151. fontSize: '14',
  152. },
  153. },
  154. }],
  155. yAxis: [{
  156. type: 'value',
  157. axisLabel: {
  158. //formatter: '{value} %'
  159. show:true,
  160. textStyle: {
  161. color: "rgba(255,255,255,.6)",
  162. fontSize: '14',
  163. },
  164. },
  165. axisTick: {
  166. show: false,
  167. },
  168. axisLine: {
  169. show: true,
  170. lineStyle: {
  171. color: "rgba(255,255,255,.1 )",
  172. width: 1,
  173. type: "solid"
  174. },
  175. },
  176. splitLine: {
  177. lineStyle: {
  178. color: "rgba(255,255,255,.1)",
  179. }
  180. }
  181. }],
  182. series: [{
  183. name: '文本1',
  184. type: 'bar',
  185. data: [2, 3, 3, 9, 15, 12, 6, 4, 6],
  186. barWidth:'20%', //柱子宽度
  187. // barGap: 1, //柱子之间间距
  188. itemStyle: {
  189. normal: {
  190. color:'#2f89cf',
  191. opacity: 1,
  192. barBorderRadius: 5,
  193. }
  194. }
  195. }, {
  196. name: '文本2',
  197. type: 'bar',
  198. data: [1, 4, 5, 11, 12, 9, 5, 6, 5],
  199. barWidth:'20%',
  200. // barGap: 1,
  201. itemStyle: {
  202. normal: {
  203. color:'#62c98d',
  204. opacity: 1,
  205. barBorderRadius: 5,
  206. }
  207. }
  208. },
  209. ]
  210. };
  211. option2 = {
  212. // backgroundColor: '#00265f',
  213. tooltip: {
  214. trigger: 'axis',
  215. axisPointer: {
  216. type: 'shadow'
  217. }
  218. },
  219. legend: {
  220. data: ['2017年', '2018年'],
  221. top:'5%',
  222. textStyle: {
  223. color: "#fff",
  224. fontSize: '12',
  225. },
  226. itemGap: 35
  227. },
  228. grid: {
  229. left: '0%',
  230. top:'40px',
  231. right: '0%',
  232. bottom: '0',
  233. containLabel: true
  234. },
  235. xAxis: [{
  236. type: 'category',
  237. data: ['1月', '2月', '3月', '4月', '5月', '6月'],
  238. axisLine: {
  239. show: true,
  240. lineStyle: {
  241. color: "rgba(255,255,255,.1)",
  242. width: 1,
  243. type: "solid"
  244. },
  245. },
  246. axisTick: {
  247. show: false,
  248. },
  249. axisLabel: {
  250. interval: 0,
  251. // rotate:50,
  252. show: true,
  253. splitNumber: 5,
  254. textStyle: {
  255. color: "rgba(255,255,255,.6)",
  256. fontSize: '12',
  257. },
  258. },
  259. }],
  260. yAxis: [{
  261. type: 'value',
  262. axisLabel: {
  263. //formatter: '{value} %'
  264. show:true,
  265. textStyle: {
  266. color: "rgba(255,255,255,.6)",
  267. fontSize: '12',
  268. },
  269. },
  270. axisTick: {
  271. show: false,
  272. },
  273. axisLine: {
  274. show: true,
  275. lineStyle: {
  276. color: "rgba(255,255,255,.1 )",
  277. width: 1,
  278. type: "solid"
  279. },
  280. },
  281. splitLine: {
  282. lineStyle: {
  283. color: "rgba(255,255,255,.1)",
  284. }
  285. }
  286. }],
  287. series: [{
  288. name: '2017年',
  289. type: 'line',
  290. smooth: true,
  291. data: [2, 6, 3, 8, 5, 8],
  292. itemStyle: {
  293. normal: {
  294. color:'#2f89cf',
  295. opacity: 1,
  296. barBorderRadius: 5,
  297. }
  298. }
  299. }, {
  300. name: '2018年',
  301. type: 'line',
  302. smooth: true,
  303. data: [5, 2, 6, 4, 5, 12],
  304. barWidth:'15',
  305. // barGap: 1,
  306. itemStyle: {
  307. normal: {
  308. color:'#62c98d',
  309. opacity: 1,
  310. barBorderRadius: 5,
  311. }
  312. }
  313. },
  314. ]
  315. };
  316. // 使用刚指定的配置项和数据显示图表。
  317. myChart.setOption(option2);
  318. myChart2.setOption(option);
  319. window.addEventListener("resize",function(){
  320. myChart.resize();
  321. });
  322. }
  323. function echarts_31() {
  324. // 基于准备好的dom,初始化echarts实例
  325. var myChart = echarts.init(document.getElementById('fb01'));
  326. var myChart2 = echarts.init(document.getElementById('fb02'));
  327. var myChart3 = echarts.init(document.getElementById('fb03'));
  328. var myChart4 = echarts.init(document.getElementById('fb04'));
  329. var myChart5 = echarts.init(document.getElementById('myd1'));
  330. var myChart7 = echarts.init(document.getElementById('sysx'));
  331. option = {
  332. tooltip: {
  333. trigger: 'item',
  334. formatter: "{a} <br/>{b}: {c} ({d}%)",
  335. position:function(p){ //其中p为当前鼠标的位置
  336. return [p[0] + 10, p[1] - 10];
  337. }
  338. },
  339. legend: {
  340. orient: 'vertical',
  341. top:'25%',
  342. right:0,
  343. itemWidth: 10,
  344. itemHeight: 10,
  345. data:['20-29岁','30-39岁','40-49岁','50岁以上'],
  346. textStyle: {
  347. color: 'rgba(255,255,255,.5)',
  348. fontSize:'12',
  349. }
  350. },
  351. series: [
  352. {
  353. name:'年龄分布',
  354. type:'pie',
  355. center: ['35%', '50%'],
  356. radius: ['40%', '50%'],
  357. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  358. label: {show:false},
  359. labelLine: {show:false},
  360. data:[
  361. {value:4, name:'20-29岁'},
  362. {value:2, name:'30-39岁'},
  363. {value:2, name:'40-49岁'},
  364. {value:1, name:'50岁以上'},
  365. ]
  366. }
  367. ]
  368. };
  369. option2 = {
  370. tooltip: {
  371. trigger: 'item',
  372. formatter: "{a} <br/>{b}: {c} ({d}%)",
  373. position:function(p){ //其中p为当前鼠标的位置
  374. return [p[0] + 10, p[1] - 10];
  375. }
  376. },
  377. legend: {
  378. orient: 'vertical',
  379. top:'25%',
  380. right:'8%',
  381. itemWidth: 10,
  382. itemHeight: 10,
  383. data:['博士','硕士','本科','专科'],
  384. textStyle: {
  385. color: 'rgba(255,255,255,.5)',
  386. fontSize:'12',
  387. }
  388. },
  389. series: [
  390. {
  391. name:'学历构成',
  392. type:'pie',
  393. center: ['40%', '50%'],
  394. radius: ['40%', '50%'],
  395. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  396. label: {show:false},
  397. labelLine: {show:false},
  398. data:[
  399. {value:10, name:'博士'},
  400. {value:20, name:'硕士'},
  401. {value:30, name:'本科'},
  402. {value:40, name:'专科'},
  403. ]
  404. }
  405. ]
  406. };
  407. option3 = {
  408. tooltip: {
  409. trigger: 'item',
  410. formatter: "{a} <br/>{b}: {c} ({d}%)",
  411. position:function(p){ //其中p为当前鼠标的位置
  412. return [p[0] + 10, p[1] - 10];
  413. }
  414. },
  415. legend: {
  416. orient: 'vertical',
  417. top:'center',
  418. right:0,
  419. itemWidth: 10,
  420. itemHeight: 10,
  421. data:['数据分门别类','数据关系部门','今日数据交易'],
  422. textStyle: {
  423. color: 'rgba(255,255,255,.5)',
  424. fontSize:'12',
  425. }
  426. },
  427. series: [
  428. {
  429. name:'数据',
  430. type:'pie',
  431. center: ['35%', '50%'],
  432. radius: ['40%', '50%'],
  433. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  434. label: {show:false},
  435. labelLine: {show:false},
  436. data:[
  437. {value:4, name:'数据分门别类'},
  438. {value:2, name:'数据关系部门'},
  439. {value:2, name:'今日数据交易'},
  440. ]
  441. }
  442. ]
  443. };
  444. option4 = {
  445. tooltip: {
  446. trigger: 'item',
  447. formatter: "{a} <br/>{b}: {c} ({d}%)",
  448. position:function(p){ //其中p为当前鼠标的位置
  449. return [p[0] + 10, p[1] - 10];
  450. }
  451. },
  452. legend: {
  453. orient: 'vertical',
  454. top:'center',
  455. right:'8%',
  456. itemWidth: 10,
  457. itemHeight: 10,
  458. data:['零销类','服务类','销售类','软件类','硬件类','其它类'],
  459. textStyle: {
  460. color: 'rgba(255,255,255,.5)',
  461. fontSize:'12',
  462. }
  463. },
  464. series: [
  465. {
  466. name:'业务分类',
  467. type:'pie',
  468. center: ['40%', '50%'],
  469. radius: ['40%', '50%'],
  470. color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
  471. label: {show:false},
  472. labelLine: {show:false},
  473. data:[
  474. {value:10, name:'零销类'},
  475. {value:20, name:'服务类'},
  476. {value:30, name:'销售类'},
  477. {value:40, name:'软件类'},
  478. {value:50, name:'硬件类'},
  479. {value:60, name:'其它类'},
  480. ]
  481. }
  482. ]
  483. };
  484. option5 = {
  485. grid: {
  486. left: '0',
  487. right: '0',
  488. top: '10%',
  489. bottom: '24%',
  490. //containLabel: true
  491. },
  492. legend: {
  493. data: ['等待', '已办人数', '已办业务'],
  494. bottom:0,
  495. itemWidth: 10,
  496. itemHeight: 10,
  497. textStyle: {
  498. color: "#fff",
  499. fontSize: '10',
  500. },
  501. itemGap: 5
  502. },
  503. tooltip: {
  504. show: "true",
  505. trigger: 'item'
  506. },
  507. yAxis: {
  508. type: 'value',
  509. show: false,
  510. },
  511. xAxis: [{
  512. type: 'category',
  513. axisTick: {
  514. show: false
  515. },
  516. axisLine: {
  517. show: true,
  518. lineStyle: {
  519. color: '#363e83',
  520. }
  521. },
  522. axisLabel: {
  523. show: false,
  524. // inside: true,
  525. textStyle: {
  526. color: "rgba(255,255,255,1)",
  527. fontWeight: 'normal',
  528. fontSize: '12',
  529. },
  530. // formatter:function(val){
  531. // return val.split("").join("\n")
  532. // },
  533. },
  534. data: ['业务办量统计']
  535. }
  536. ],
  537. series: [
  538. {
  539. name: '等待',
  540. type: 'bar',
  541. barWidth: '20',
  542. itemStyle: {
  543. normal: {
  544. show: true,
  545. color:'#20aa92',
  546. barBorderRadius: 50,
  547. borderWidth: 0,
  548. }
  549. },
  550. zlevel: 2,
  551. barGap: '100%',
  552. data: [20],
  553. label: {
  554. formatter: "{c}人",
  555. show: true,
  556. position: 'top',
  557. textStyle: {
  558. fontSize:12,
  559. color: 'rgba(255,255,255,.6)',
  560. }
  561. },
  562. },
  563. {
  564. name: '已办人数',
  565. type: 'bar',
  566. itemStyle: {
  567. normal: {
  568. show: true,
  569. color:'#f4664e',
  570. barBorderRadius: 50,
  571. borderWidth: 0,
  572. }
  573. },
  574. zlevel: 2,
  575. barWidth: '20',
  576. data: [40],
  577. label: {
  578. formatter: "{c}人",
  579. show: true,
  580. position: 'top',
  581. textStyle: {
  582. fontSize:12,
  583. color: 'rgba(255,255,255,.6)',
  584. }
  585. },
  586. },
  587. {
  588. name: '已办业务',
  589. type: 'bar',
  590. itemStyle: {
  591. normal: {
  592. show: true,
  593. color:'#0c93dc',
  594. barBorderRadius: 50,
  595. borderWidth: 0,
  596. }
  597. },
  598. zlevel: 2,
  599. barWidth: '20',
  600. data: [127],
  601. label: {
  602. formatter: "{c}份",
  603. show: true,
  604. position: 'top',
  605. textStyle: {
  606. fontSize:12,
  607. color: 'rgba(255,255,255,.6)',
  608. }
  609. },
  610. },
  611. ]
  612. };
  613. option7 = {
  614. // backgroundColor: '#00265f',
  615. tooltip: {
  616. trigger: 'axis',
  617. axisPointer: {
  618. type: 'shadow'
  619. }
  620. },
  621. grid: {
  622. left: '0%',
  623. top:'10px',
  624. right: '0%',
  625. bottom: '0',
  626. containLabel: true
  627. },
  628. xAxis: [{
  629. type: 'category',
  630. data: ['1月', '2月', '3月', '4月', '5月', '6月'],
  631. axisLine: {
  632. show: true,
  633. lineStyle: {
  634. color: "rgba(255,255,255,.1)",
  635. width: 1,
  636. type: "solid"
  637. },
  638. },
  639. axisTick: {
  640. show: false,
  641. },
  642. axisLabel: {
  643. interval: 0,
  644. // rotate:50,
  645. show: true,
  646. splitNumber: 5,
  647. textStyle: {
  648. color: "rgba(255,255,255,.6)",
  649. fontSize: '12',
  650. },
  651. },
  652. }],
  653. yAxis: [{
  654. type: 'value',
  655. axisLabel: {
  656. //formatter: '{value} %'
  657. show:true,
  658. textStyle: {
  659. color: "rgba(255,255,255,.6)",
  660. fontSize: '12',
  661. },
  662. },
  663. axisTick: {
  664. show: false,
  665. },
  666. axisLine: {
  667. show: true,
  668. lineStyle: {
  669. color: "rgba(255,255,255,.1 )",
  670. width: 1,
  671. type: "solid"
  672. },
  673. },
  674. splitLine: {
  675. show: false,
  676. lineStyle: {
  677. color: "rgba(255,255,255,.1)",
  678. }
  679. }
  680. }],
  681. series: [{
  682. name: '2017年',
  683. type: 'line',
  684. //smooth: true,
  685. data: [2, 6, 3, 8, 5, 8],
  686. itemStyle: {
  687. normal: {
  688. color:'#2f89cf',
  689. opacity: 1,
  690. barBorderRadius: 5,
  691. }
  692. }
  693. }
  694. ]
  695. };
  696. // 使用刚指定的配置项和数据显示图表。
  697. myChart.setOption(option);
  698. myChart2.setOption(option2);
  699. myChart3.setOption(option3);
  700. myChart4.setOption(option4);
  701. myChart5.setOption(option5);
  702. myChart7.setOption(option7);
  703. window.addEventListener("resize",function(){
  704. myChart.resize();
  705. myChart7.resize();
  706. myChart2.resize();
  707. myChart3.resize();
  708. myChart4.resize();
  709. myChart5.resize();
  710. });
  711. }
  712. })