js.js 15 KB

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