js.js 15 KB

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