js.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  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', '模拟考10']
  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,88]
  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区队', '019区队', '020区队', '021区队', '022区队','023区队', '024区队'],
  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, 82,92, 96, 94, 86, 78,75],
  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. data: ['模拟考1', '模拟考2', '模拟考3', '模拟考4', '模拟考5', '模拟考6', '模拟考7', '模拟考8', '模拟考9', '模拟考10', '模拟考11', '模拟考12'],
  396. axisLine: {
  397. show: true,
  398. lineStyle: {
  399. color: "rgba(255,255,255,.1)",
  400. width: 1,
  401. type: "solid"
  402. },
  403. },
  404. axisTick: {
  405. show: false,
  406. },
  407. axisLabel: {
  408. interval: 0,
  409. // rotate:50,
  410. show: true,
  411. splitNumber: 15,
  412. textStyle: {
  413. color: "rgba(255,255,255,.6)",
  414. fontSize: '16',
  415. },
  416. },
  417. }],
  418. yAxis: [{
  419. type: 'value',
  420. axisLabel: {
  421. //formatter: '{value} %'
  422. show:true,
  423. textStyle: {
  424. color: "rgba(255,255,255,.6)",
  425. fontSize: '16',
  426. },
  427. },
  428. axisTick: {
  429. show: false,
  430. },
  431. axisLine: {
  432. show: true,
  433. lineStyle: {
  434. color: "rgba(255,255,255,.1 )",
  435. width: 1,
  436. type: "solid"
  437. },
  438. },
  439. splitLine: {
  440. lineStyle: {
  441. color: "rgba(255,255,255,.1)",
  442. }
  443. }
  444. }],
  445. series: [
  446. // {
  447. // name: '2017年',
  448. // type: 'line',
  449. //
  450. // data: [2, 6, 3, 8, 5, 8, 10, 13, 8, 5, 6, 9],
  451. //
  452. // itemStyle: {
  453. // normal: {
  454. // color:'#2f89cf',
  455. // opacity: 1,
  456. //
  457. // barBorderRadius: 5,
  458. // }
  459. // }
  460. // },
  461. {
  462. name: '2018年',
  463. type: 'line',
  464. // data: [5, 2, 6, 4, 5, 12, 5, 17, 9, 2, 6, 3],
  465. data: [70, 85, 65, 82, 94, 84,75,92,70,88,65,89],
  466. barWidth:'15',
  467. // barGap: 1,
  468. itemStyle: {
  469. normal: {
  470. color:'#62c98d',
  471. opacity: 1,
  472. barBorderRadius: 5,
  473. }
  474. }
  475. },
  476. ]
  477. };
  478. // 使用刚指定的配置项和数据显示图表。
  479. myChart.setOption(option);
  480. window.addEventListener("resize",function(){
  481. myChart.resize();
  482. });
  483. }
  484. function echarts_6() {
  485. // 基于准备好的dom,初始化echarts实例
  486. var myChart = echarts.init(document.getElementById('echart6'));
  487. option = {
  488. tooltip : {
  489. trigger: 'item',
  490. formatter: "{b} : {c} ({d}%)"
  491. },
  492. legend: {
  493. right:10,
  494. top:30,
  495. height:140,
  496. itemWidth:10,
  497. itemHeight:10,
  498. itemGap:10,
  499. textStyle:{
  500. color: 'rgba(255,255,255,.6)',
  501. fontSize:12
  502. },
  503. orient:'vertical',
  504. data:['汇总主控板','显控报警板','外壳及零件','检测剂','干燥管']
  505. },
  506. calculable : true,
  507. series : [
  508. {
  509. name:' ',
  510. color: ['#62c98d', '#205acf', '#c9c862', '#c98b62', '#c962b9', '#7562c9','#c96262'],
  511. type:'pie',
  512. radius : [30, 70],
  513. center : ['35%', '50%'],
  514. roseType : 'radius',
  515. label: {
  516. normal: {
  517. show: true
  518. },
  519. emphasis: {
  520. show: true
  521. }
  522. },
  523. lableLine: {
  524. normal: {
  525. show: true
  526. },
  527. emphasis: {
  528. show: true
  529. }
  530. },
  531. data:[
  532. {value:50, name:'汇总主控板'},
  533. {value:45, name:'显控报警板'},
  534. {value:35, name:'外壳及零件'},
  535. {value:30, name:'检测剂'},
  536. {value:30, name:'干燥管'},
  537. ]
  538. },
  539. ]
  540. };
  541. // 使用刚指定的配置项和数据显示图表。
  542. myChart.setOption(option);
  543. window.addEventListener("resize",function(){
  544. myChart.resize();
  545. });
  546. }
  547. function zb1() {
  548. // 基于准备好的dom,初始化echarts实例
  549. var myChart = echarts.init(document.getElementById('zb1'));
  550. var v1=100//结算数
  551. var v2=40//未结算数
  552. var v3=v1+v2//总订单数
  553. option = {
  554. series: [{
  555. type: 'pie',
  556. radius: ['60%', '70%'],
  557. color:'#49bcf7',
  558. label: {
  559. normal: {
  560. position: 'center'
  561. }
  562. },
  563. data: [{
  564. value: v1,
  565. name: '100',
  566. label: {
  567. normal: {
  568. formatter:70,//Math.round( v1/v3*100)+ '%%',
  569. textStyle: {
  570. fontSize: 30,
  571. color:'#fff',
  572. }
  573. }
  574. }
  575. },
  576. {
  577. value: v2,
  578. label: {
  579. normal: {
  580. formatter : function (params){
  581. return '最高分';
  582. },
  583. textStyle: {
  584. color: '#aaa',
  585. fontSize: 16
  586. }
  587. }
  588. },
  589. itemStyle: {
  590. normal: {
  591. color: 'rgba(255,255,255,.2)'
  592. },
  593. emphasis: {
  594. color: '#fff'
  595. }
  596. },
  597. }]
  598. }]
  599. };
  600. myChart.setOption(option);
  601. window.addEventListener("resize",function(){
  602. myChart.resize();
  603. });
  604. }
  605. function zb2() {
  606. // 基于准备好的dom,初始化echarts实例
  607. var myChart = echarts.init(document.getElementById('zb2'));
  608. var v1=80//结算数
  609. var v2=20//未结算数
  610. var v3=v1+v2//总订单数
  611. option = {
  612. //animation: false,
  613. series: [{
  614. type: 'pie',
  615. radius: ['60%', '70%'],
  616. color:'#49bcf7',
  617. label: {
  618. normal: {
  619. position: 'center'
  620. }
  621. },
  622. data: [{
  623. value: v1,
  624. name: '80',
  625. label: {
  626. normal: {
  627. // formatter:Math.round( v1/v3*100)+ '%',
  628. textStyle: {
  629. fontSize: 24,
  630. color:'#fff',
  631. }
  632. }
  633. }
  634. }, {
  635. value: v2,
  636. label: {
  637. normal: {
  638. formatter : function (params){
  639. return '最低分';
  640. },
  641. textStyle: {
  642. color: '#aaa',
  643. fontSize: 16
  644. }
  645. }
  646. },
  647. itemStyle: {
  648. normal: {
  649. color: 'rgba(255,255,255,.2)'
  650. },
  651. emphasis: {
  652. color: '#fff'
  653. }
  654. },
  655. }]
  656. }]
  657. };
  658. myChart.setOption(option);
  659. window.addEventListener("resize",function(){
  660. myChart.resize();
  661. });
  662. }
  663. function zb3() {
  664. // 基于准备好的dom,初始化echarts实例
  665. var myChart = echarts.init(document.getElementById('zb3'));
  666. var v1=30//结算金额
  667. var v2=70//未结算
  668. var v3=v1+v2
  669. option = {
  670. series: [{
  671. type: 'pie',
  672. radius: ['60%', '70%'],
  673. color:'#62c98d',
  674. label: {
  675. normal: {
  676. position: 'center'
  677. }
  678. },
  679. data: [{
  680. value: v1,
  681. name: '95',
  682. label: {
  683. normal: {
  684. // formatter:Math.round( v1/v3*100)+ '%',
  685. textStyle: {
  686. fontSize: 24,
  687. color:'#fff',
  688. }
  689. }
  690. }
  691. }, {
  692. value: v2,
  693. label: {
  694. normal: {
  695. formatter : function (params){
  696. return '平均分';
  697. },
  698. textStyle: {
  699. color: '#aaa',
  700. fontSize: 16
  701. }
  702. }
  703. },
  704. itemStyle: {
  705. normal: {
  706. color: 'rgba(255,255,255,.2)'
  707. },
  708. emphasis: {
  709. color: '#fff'
  710. }
  711. },
  712. }]
  713. }]
  714. };
  715. myChart.setOption(option);
  716. window.addEventListener("resize",function(){
  717. myChart.resize();
  718. });
  719. }
  720. function zb4() {
  721. // 基于准备好的dom,初始化echarts实例
  722. var myChart = echarts.init(document.getElementById('zb4'));
  723. var v1=90//结算金额
  724. var v2=10//未结算
  725. var v3=v1+v2
  726. option = {
  727. series: [{
  728. type: 'pie',
  729. radius: ['60%', '70%'],
  730. color:'#29d08a',
  731. label: {
  732. normal: {
  733. position: 'center'
  734. }
  735. },
  736. data: [{
  737. value: v1,
  738. name: '30分钟',
  739. label: {
  740. normal: {
  741. // formatter:Math.round( v1/v3*100)+ '%',
  742. textStyle: {
  743. fontSize: 24,
  744. color:'#fff',
  745. }
  746. }
  747. }
  748. }, {
  749. value: v2,
  750. label: {
  751. normal: {
  752. formatter : function (params){
  753. return '平均时长';
  754. },
  755. textStyle: {
  756. color: '#aaa',
  757. fontSize: 16
  758. }
  759. }
  760. },
  761. itemStyle: {
  762. normal: {
  763. color: 'rgba(255,255,255,.2)'
  764. },
  765. emphasis: {
  766. color: '#fff'
  767. }
  768. },
  769. }]
  770. }]
  771. };
  772. myChart.setOption(option);
  773. window.addEventListener("resize",function(){
  774. myChart.resize();
  775. });
  776. }
  777. })