js.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1.  $(window).load(function(){$(".loading").fadeOut()})
  2. $(function () {
  3. echarts_1();
  4. echarts_2();
  5. echarts_3();
  6. echarts_4();
  7. // echarts_5();
  8. echarts_6();
  9. zb1();
  10. zb2();
  11. zb3();
  12. zb4();
  13. function echarts_1() {
  14. /* 青 岛 研 锦 网 络 科 技 有限公司 版权所有*/
  15. // 基于准备好的dom,初始化echarts实例
  16. var myChart = echarts.init(document.getElementById('echart1'));
  17. option = {
  18. tooltip : {
  19. trigger: 'item',
  20. formatter: "{b} : {c} ({d}%)"
  21. },
  22. legend: {
  23. right:10,
  24. top:30,
  25. height:140,
  26. itemWidth:10,
  27. itemHeight:10,
  28. itemGap:10,
  29. textStyle:{
  30. color: 'rgba(255,255,255,.6)',
  31. fontSize:12
  32. },
  33. orient:'vertical',
  34. data:['调速电位器','外壳及零件','热敏开关','加热指示灯','电池']
  35. },
  36. calculable : true,
  37. series : [
  38. {
  39. name:' ',
  40. color: ['#62c98d', '#2f89cf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  41. type:'pie',
  42. radius : [30, 70],
  43. center : ['35%', '50%'],
  44. roseType : 'radius',
  45. label: {
  46. normal: {
  47. show: true
  48. },
  49. emphasis: {
  50. show: true
  51. }
  52. },
  53. lableLine: {
  54. normal: {
  55. show: false
  56. },
  57. emphasis: {
  58. show: true
  59. }
  60. },
  61. data:[
  62. {value:10, name:'调速电位器'},
  63. {value:15, name:'外壳及零件'},
  64. {value:25, name:'热敏开关'},
  65. {value:30, name:'加热指示灯'},
  66. {value:35, name:'电池'},
  67. ]
  68. },
  69. ]
  70. };
  71. // 使用刚指定的配置项和数据显示图表。
  72. myChart.setOption(option);
  73. window.addEventListener("resize",function(){
  74. myChart.resize();
  75. });
  76. }
  77. function echarts_2() {
  78. // 基于准备好的dom,初始化echarts实例
  79. var myChart = echarts.init(document.getElementById('echart2'));
  80. option = {
  81. tooltip : {
  82. trigger: 'item',
  83. formatter: "{b} : {c} ({d}%)"
  84. },
  85. legend: {
  86. right:10,
  87. top:30,
  88. height:140,
  89. itemWidth:10,
  90. itemHeight:10,
  91. itemGap:10,
  92. textStyle:{
  93. color: 'rgba(255,255,255,.6)',
  94. fontSize:12
  95. },
  96. orient:'vertical',
  97. data:['显示屏','维护管','接口接线板','干燥管','电源模块']
  98. },
  99. calculable : true,
  100. series : [
  101. {
  102. name:' ',
  103. color: ['#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  104. type:'pie',
  105. radius : [30, 70],
  106. center : ['35%', '50%'],
  107. roseType : 'radius',
  108. label: {
  109. normal: {
  110. show: true
  111. },
  112. emphasis: {
  113. show: true
  114. }
  115. },
  116. lableLine: {
  117. normal: {
  118. show: true
  119. },
  120. emphasis: {
  121. show: true
  122. }
  123. },
  124. data:[
  125. {value:50, name:'显示屏'},
  126. {value:45, name:'维护管'},
  127. {value:35, name:'接口接线板'},
  128. {value:30, name:'干燥管'},
  129. {value:28, name:'电源模块'}
  130. ]
  131. },
  132. ]
  133. };
  134. // 使用刚指定的配置项和数据显示图表。
  135. myChart.setOption(option);
  136. window.addEventListener("resize",function(){
  137. myChart.resize();
  138. });
  139. }
  140. function echarts_3() {
  141. var myChart = echarts.init(document.getElementById('echart3'));
  142. option = {
  143. tooltip: {
  144. trigger: 'axis',
  145. axisPointer: {
  146. lineStyle: {
  147. color: '#dddc6b'
  148. }
  149. }
  150. },
  151. grid: {
  152. left: '10',
  153. top: '20',
  154. right: '30',
  155. bottom: '10',
  156. containLabel: true
  157. },
  158. xAxis: [{
  159. type: 'category',
  160. boundaryGap: false,
  161. axisLabel: {
  162. textStyle: {
  163. color: "rgba(255,255,255,.6)",
  164. fontSize:16,
  165. },
  166. },
  167. axisLine: {
  168. lineStyle: {
  169. color: 'rgba(255,255,255,.1)'
  170. }
  171. },
  172. data: ['模拟考试1', '模拟考试2', '模拟考试3', '模拟考试4', '模拟考试5', '模拟考试6', '模拟考试7', '模拟考试8', '模拟考试9']
  173. }, {
  174. axisPointer: {show: false},
  175. axisLine: { show: false},
  176. position: 'bottom',
  177. offset: 20,
  178. }],
  179. yAxis: [{
  180. type: 'value',
  181. axisTick: {show: false},
  182. axisLine: {
  183. lineStyle: {
  184. color: 'rgba(255,255,255,.1)'
  185. }
  186. },
  187. axisLabel: {
  188. textStyle: {
  189. color: "rgba(255,255,255,.6)",
  190. fontSize:16,
  191. },
  192. },
  193. splitLine: {
  194. lineStyle: {
  195. color: 'rgba(255,255,255,.1)'
  196. }
  197. }
  198. }],
  199. series: [
  200. {
  201. name: '结算率',
  202. type: 'line',
  203. smooth: true,
  204. symbol: 'circle',
  205. symbolSize: 5,
  206. showSymbol: false,
  207. lineStyle: {
  208. normal: {
  209. color: '#dddc6b',
  210. width: 4
  211. }
  212. },
  213. areaStyle: {
  214. normal: {
  215. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  216. offset: 0,
  217. color: 'rgba(221, 220, 107, 0.4)'
  218. }, {
  219. offset: 0.8,
  220. color: 'rgba(221, 220, 107, 0.1)'
  221. }], false),
  222. shadowColor: 'rgba(0, 0, 0, 0.1)',
  223. }
  224. },
  225. itemStyle: {
  226. normal: {
  227. color: '#dddc6b',
  228. borderColor: 'rgba(221, 220, 107, .1)',
  229. borderWidth: 12
  230. }
  231. },
  232. data: [70, 85, 65, 82, 94, 84,88,92,90]
  233. },
  234. ]
  235. };
  236. // 使用刚指定的配置项和数据显示图表。
  237. myChart.setOption(option);
  238. window.addEventListener("resize",function(){
  239. myChart.resize();
  240. });
  241. }
  242. function echarts_4() {
  243. // 基于准备好的dom,初始化echarts实例
  244. var myChart = echarts.init(document.getElementById('echart4'));
  245. option = {
  246. tooltip: {
  247. trigger: 'axis',
  248. axisPointer: {
  249. type: 'shadow'
  250. }
  251. },
  252. legend: {
  253. data: ['2025年'],
  254. align: 'right',
  255. right: '40%',
  256. top:'0%',
  257. textStyle: {
  258. color: "#fff",
  259. fontSize: '16',
  260. },
  261. itemWidth: 16,
  262. itemHeight: 16,
  263. itemGap: 35
  264. },
  265. grid: {
  266. left: '0%',
  267. top:'40px',
  268. right: '0%',
  269. bottom: '2%',
  270. containLabel: true
  271. },
  272. xAxis: [{
  273. type: 'category',
  274. data: ['011区队', '012区队', '013区队', '014区队', '015区队', '016区队', '017区队', '018区队'],
  275. axisLine: {
  276. show: true,
  277. lineStyle: {
  278. color: "rgba(255,255,255,.1)",
  279. width: 1,
  280. type: "solid"
  281. },
  282. },
  283. axisTick: {
  284. show: false,
  285. },
  286. axisLabel: {
  287. interval: 0,
  288. // rotate:50,
  289. show: true,
  290. splitNumber: 15,
  291. textStyle: {
  292. color: "rgba(255,255,255,.6)",
  293. fontSize: '16',
  294. },
  295. },
  296. }],
  297. yAxis: [{
  298. type: 'value',
  299. axisLabel: {
  300. //formatter: '{value} %'
  301. show:true,
  302. textStyle: {
  303. color: "rgba(255,255,255,.6)",
  304. fontSize: '16',
  305. },
  306. },
  307. axisTick: {
  308. show: false,
  309. },
  310. axisLine: {
  311. show: true,
  312. lineStyle: {
  313. color: "rgba(255,255,255,.1 )",
  314. width: 1,
  315. type: "solid"
  316. },
  317. },
  318. splitLine: {
  319. lineStyle: {
  320. color: "rgba(255,255,255,.1)",
  321. }
  322. }
  323. }],
  324. series: [{
  325. name: '2017年',
  326. type: 'bar',
  327. data: [87, 99, 85, 82, 86, 94, 86, 72],
  328. barWidth:'15', //柱子宽度
  329. // barGap: 1, //柱子之间间距
  330. itemStyle: {
  331. normal: {
  332. color:'#2f89cf',
  333. opacity: 1,
  334. barBorderRadius: 5,
  335. }
  336. }
  337. },
  338. // {
  339. // name: '2018年',
  340. // type: 'bar',
  341. // data: [1, 4, 5, 11, 12, 9, 5, 6, 5, 6, 3, 9],
  342. // barWidth:'15',
  343. // // barGap: 1,
  344. // itemStyle: {
  345. // normal: {
  346. // color:'#62c98d',
  347. // opacity: 1,
  348. // barBorderRadius: 5,
  349. // }
  350. // }
  351. // },
  352. ]
  353. };
  354. /* 青岛研锦网络科技有限公司 版权所有*/
  355. // 使用刚指定的配置项和数据显示图表。
  356. myChart.setOption(option);
  357. window.addEventListener("resize",function(){
  358. myChart.resize();
  359. });
  360. }
  361. // function echarts_5() {
  362. // // 基于准备好的dom,初始化echarts实例
  363. // var myChart = echarts.init(document.getElementById('echart5'));
  364. // option = {
  365. // // backgroundColor: '#00265f',
  366. // tooltip: {
  367. // trigger: 'axis',
  368. // axisPointer: {
  369. // type: 'shadow'
  370. // }
  371. // },
  372. // legend: {
  373. // data: ['2017年', '2018年'],
  374. // align: 'right',
  375. // right: '40%',
  376. // top:'0%',
  377. // textStyle: {
  378. // color: "#fff",
  379. // fontSize: '16',
  380. //
  381. // },
  382. //
  383. // itemGap: 35
  384. // },
  385. // grid: {
  386. // left: '0%',
  387. // top:'40px',
  388. // right: '0%',
  389. // bottom: '2%',
  390. // containLabel: true
  391. // },
  392. // xAxis: [{
  393. // type: 'category',
  394. // data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  395. // axisLine: {
  396. // show: true,
  397. // lineStyle: {
  398. // color: "rgba(255,255,255,.1)",
  399. // width: 1,
  400. // type: "solid"
  401. // },
  402. // },
  403. // axisTick: {
  404. // show: false,
  405. // },
  406. // axisLabel: {
  407. // interval: 0,
  408. // // rotate:50,
  409. // show: true,
  410. // splitNumber: 15,
  411. // textStyle: {
  412. // color: "rgba(255,255,255,.6)",
  413. // fontSize: '16',
  414. // },
  415. // },
  416. // }],
  417. // yAxis: [{
  418. // type: 'value',
  419. // axisLabel: {
  420. // //formatter: '{value} %'
  421. // show:true,
  422. // textStyle: {
  423. // color: "rgba(255,255,255,.6)",
  424. // fontSize: '16',
  425. // },
  426. // },
  427. // axisTick: {
  428. // show: false,
  429. // },
  430. // axisLine: {
  431. // show: true,
  432. // lineStyle: {
  433. // color: "rgba(255,255,255,.1 )",
  434. // width: 1,
  435. // type: "solid"
  436. // },
  437. // },
  438. // splitLine: {
  439. // lineStyle: {
  440. // color: "rgba(255,255,255,.1)",
  441. // }
  442. // }
  443. // }],
  444. // series: [{
  445. // name: '2017年',
  446. // type: 'line',
  447. //
  448. // data: [2, 6, 3, 8, 5, 8, 10, 13, 8, 5, 6, 9],
  449. //
  450. // itemStyle: {
  451. // normal: {
  452. // color:'#2f89cf',
  453. // opacity: 1,
  454. //
  455. // barBorderRadius: 5,
  456. // }
  457. // }
  458. // }, {
  459. // name: '2018年',
  460. // type: 'line',
  461. // data: [5, 2, 6, 4, 5, 12, 5, 17, 9, 2, 6, 3],
  462. // barWidth:'15',
  463. // // barGap: 1,
  464. // itemStyle: {
  465. // normal: {
  466. // color:'#62c98d',
  467. // opacity: 1,
  468. // barBorderRadius: 5,
  469. // }
  470. // }
  471. // },
  472. // ]
  473. // };
  474. //
  475. //
  476. // // 使用刚指定的配置项和数据显示图表。
  477. // myChart.setOption(option);
  478. // window.addEventListener("resize",function(){
  479. // myChart.resize();
  480. // });
  481. // }
  482. function echarts_6() {
  483. // 基于准备好的dom,初始化echarts实例
  484. var myChart = echarts.init(document.getElementById('echart6'));
  485. option = {
  486. tooltip : {
  487. trigger: 'item',
  488. formatter: "{b} : {c} ({d}%)"
  489. },
  490. legend: {
  491. right:10,
  492. top:30,
  493. height:140,
  494. itemWidth:10,
  495. itemHeight:10,
  496. itemGap:10,
  497. textStyle:{
  498. color: 'rgba(255,255,255,.6)',
  499. fontSize:12
  500. },
  501. orient:'vertical',
  502. data:['汇总主控板','显控报警板','外壳及零件','检测剂','干燥管']
  503. },
  504. calculable : true,
  505. series : [
  506. {
  507. name:' ',
  508. color: ['#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  509. type:'pie',
  510. radius : [30, 70],
  511. center : ['35%', '50%'],
  512. roseType : 'radius',
  513. label: {
  514. normal: {
  515. show: true
  516. },
  517. emphasis: {
  518. show: true
  519. }
  520. },
  521. lableLine: {
  522. normal: {
  523. show: true
  524. },
  525. emphasis: {
  526. show: true
  527. }
  528. },
  529. data:[
  530. {value:50, name:'汇总主控板'},
  531. {value:45, name:'显控报警板'},
  532. {value:35, name:'外壳及零件'},
  533. {value:30, name:'检测剂'},
  534. {value:30, name:'干燥管'},
  535. ]
  536. },
  537. ]
  538. };
  539. // 使用刚指定的配置项和数据显示图表。
  540. myChart.setOption(option);
  541. window.addEventListener("resize",function(){
  542. myChart.resize();
  543. });
  544. }
  545. function zb1() {
  546. // 基于准备好的dom,初始化echarts实例
  547. var myChart = echarts.init(document.getElementById('zb1'));
  548. var v1=100//结算数
  549. var v2=40//未结算数
  550. var v3=v1+v2//总订单数
  551. option = {
  552. series: [{
  553. type: 'pie',
  554. radius: ['60%', '70%'],
  555. color:'#49bcf7',
  556. label: {
  557. normal: {
  558. position: 'center'
  559. }
  560. },
  561. data: [{
  562. value: v1,
  563. name: '100',
  564. label: {
  565. normal: {
  566. formatter:70,//Math.round( v1/v3*100)+ '%%',
  567. textStyle: {
  568. fontSize: 30,
  569. color:'#fff',
  570. }
  571. }
  572. }
  573. },
  574. {
  575. value: v2,
  576. label: {
  577. normal: {
  578. formatter : function (params){
  579. return '最高分';
  580. },
  581. textStyle: {
  582. color: '#aaa',
  583. fontSize: 16
  584. }
  585. }
  586. },
  587. itemStyle: {
  588. normal: {
  589. color: 'rgba(255,255,255,.2)'
  590. },
  591. emphasis: {
  592. color: '#fff'
  593. }
  594. },
  595. }]
  596. }]
  597. };
  598. myChart.setOption(option);
  599. window.addEventListener("resize",function(){
  600. myChart.resize();
  601. });
  602. }
  603. function zb2() {
  604. // 基于准备好的dom,初始化echarts实例
  605. var myChart = echarts.init(document.getElementById('zb2'));
  606. var v1=80//结算数
  607. var v2=20//未结算数
  608. var v3=v1+v2//总订单数
  609. option = {
  610. //animation: false,
  611. series: [{
  612. type: 'pie',
  613. radius: ['60%', '70%'],
  614. color:'#49bcf7',
  615. label: {
  616. normal: {
  617. position: 'center'
  618. }
  619. },
  620. data: [{
  621. value: v1,
  622. name: '80',
  623. label: {
  624. normal: {
  625. // formatter:Math.round( v1/v3*100)+ '%',
  626. textStyle: {
  627. fontSize: 24,
  628. color:'#fff',
  629. }
  630. }
  631. }
  632. }, {
  633. value: v2,
  634. label: {
  635. normal: {
  636. formatter : function (params){
  637. return '最低分';
  638. },
  639. textStyle: {
  640. color: '#aaa',
  641. fontSize: 16
  642. }
  643. }
  644. },
  645. itemStyle: {
  646. normal: {
  647. color: 'rgba(255,255,255,.2)'
  648. },
  649. emphasis: {
  650. color: '#fff'
  651. }
  652. },
  653. }]
  654. }]
  655. };
  656. myChart.setOption(option);
  657. window.addEventListener("resize",function(){
  658. myChart.resize();
  659. });
  660. }
  661. function zb3() {
  662. // 基于准备好的dom,初始化echarts实例
  663. var myChart = echarts.init(document.getElementById('zb3'));
  664. var v1=30//结算金额
  665. var v2=70//未结算
  666. var v3=v1+v2
  667. option = {
  668. series: [{
  669. type: 'pie',
  670. radius: ['60%', '70%'],
  671. color:'#62c98d',
  672. label: {
  673. normal: {
  674. position: 'center'
  675. }
  676. },
  677. data: [{
  678. value: v1,
  679. name: '95',
  680. label: {
  681. normal: {
  682. // formatter:Math.round( v1/v3*100)+ '%',
  683. textStyle: {
  684. fontSize: 24,
  685. color:'#fff',
  686. }
  687. }
  688. }
  689. }, {
  690. value: v2,
  691. label: {
  692. normal: {
  693. formatter : function (params){
  694. return '平均分';
  695. },
  696. textStyle: {
  697. color: '#aaa',
  698. fontSize: 16
  699. }
  700. }
  701. },
  702. itemStyle: {
  703. normal: {
  704. color: 'rgba(255,255,255,.2)'
  705. },
  706. emphasis: {
  707. color: '#fff'
  708. }
  709. },
  710. }]
  711. }]
  712. };
  713. myChart.setOption(option);
  714. window.addEventListener("resize",function(){
  715. myChart.resize();
  716. });
  717. }
  718. function zb4() {
  719. // 基于准备好的dom,初始化echarts实例
  720. var myChart = echarts.init(document.getElementById('zb4'));
  721. var v1=90//结算金额
  722. var v2=10//未结算
  723. var v3=v1+v2
  724. option = {
  725. series: [{
  726. type: 'pie',
  727. radius: ['60%', '70%'],
  728. color:'#29d08a',
  729. label: {
  730. normal: {
  731. position: 'center'
  732. }
  733. },
  734. data: [{
  735. value: v1,
  736. name: '30分钟',
  737. label: {
  738. normal: {
  739. // formatter:Math.round( v1/v3*100)+ '%',
  740. textStyle: {
  741. fontSize: 24,
  742. color:'#fff',
  743. }
  744. }
  745. }
  746. }, {
  747. value: v2,
  748. label: {
  749. normal: {
  750. formatter : function (params){
  751. return '平均时长';
  752. },
  753. textStyle: {
  754. color: '#aaa',
  755. fontSize: 16
  756. }
  757. }
  758. },
  759. itemStyle: {
  760. normal: {
  761. color: 'rgba(255,255,255,.2)'
  762. },
  763. emphasis: {
  764. color: '#fff'
  765. }
  766. },
  767. }]
  768. }]
  769. };
  770. myChart.setOption(option);
  771. window.addEventListener("resize",function(){
  772. myChart.resize();
  773. });
  774. }
  775. })