index.html 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <link rel="stylesheet" href="/admin/css/cockpit.css">
  4. <style>
  5. .fullscreen{
  6. width: 60px;
  7. height: 60px;
  8. font-size: 40px;
  9. position: fixed;
  10. z-index: 100000000000000000000;
  11. right: 50px;
  12. top: 50px;
  13. color: #ffffff;
  14. cursor: pointer;
  15. }
  16. .main2-content .main2-content-fore .daily-box{
  17. width: 100%;
  18. height: 32.4vh;
  19. padding-left: 1vw;
  20. padding-right: 1vw;
  21. }
  22. .main2-content .main2-content-fore .daily-box .check-bl{
  23. width: 90%;
  24. height: 8vh;
  25. border: 2px solid #165B9F;
  26. border-radius: 4px;
  27. margin-top: 2vh;
  28. padding: 3px 0;
  29. }
  30. .main2-content .main2-content-fore .daily-box .check-bl .left{
  31. width: 30%;
  32. height: 100%;
  33. /*display: inline-block;*/
  34. float: left;
  35. border-right: 2px solid #165B9F;
  36. text-align: center;
  37. color: #0BE2DF;
  38. display: flex;
  39. justify-content: center;
  40. align-items: center;
  41. }
  42. .main2-content .main2-content-fore .daily-box .check-bl .right{
  43. width: 70%;
  44. height: 100%;
  45. /*display: inline-block;*/
  46. float: right;
  47. text-align: center;
  48. color: #0BE2DF;
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. }
  53. .main2-content .main2-content-fore .daily-box .check-bl .right .bl{
  54. font-size: 18px;
  55. }
  56. .main2-content .main2-content-fore .daily-box .check-bl .right .nums{
  57. font-size: 14px;
  58. }
  59. .main2-content .main2-content-fore .daily-box .check-nums{
  60. width: 90%;
  61. height: 8vh;
  62. border: 2px solid #165B9F;
  63. border-radius: 4px;
  64. margin-top: 1vh;
  65. padding: 3px 0;
  66. }
  67. .main2-content .main2-content-fore .daily-box .check-avg{
  68. width: 90%;
  69. height: 8vh;
  70. border: 2px solid #165B9F;
  71. border-radius: 4px;
  72. margin-top: 1vh;
  73. padding: 3px 0;
  74. }
  75. .main2-content .main2-content-fore .daily-box .check-nums .left{
  76. width: 30%;
  77. height: 100%;
  78. display: inline-block;
  79. float: left;
  80. border-right: 2px solid #165B9F;
  81. text-align: center;
  82. color: #0BE2DF;
  83. padding-top: 1vh;
  84. }
  85. .main2-content .main2-content-fore .daily-box .check-nums .right{
  86. width: 70%;
  87. height: 100%;
  88. /*display: inline-block;*/
  89. float: right;
  90. text-align: center;
  91. color: #0BE2DF;
  92. padding-top: 1%;
  93. font-size: 20px;
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. }
  98. .main2-content .main2-content-fore .daily-box .check-avg .left{
  99. width: 30%;
  100. height: 100%;
  101. /*display: inline-block;*/
  102. float: left;
  103. border-right: 2px solid #165B9F;
  104. text-align: center;
  105. color: #0BE2DF;
  106. display: flex;
  107. justify-content: center;
  108. align-items: center;
  109. }
  110. .main2-content .main2-content-fore .daily-box .check-avg .right{
  111. width: 70%;
  112. height: 100%;
  113. /*display: inline-block;*/
  114. float: right;
  115. text-align: center;
  116. color: #0BE2DF;
  117. font-size: 20px;
  118. display: flex;
  119. justify-content: center;
  120. align-items: center;
  121. }
  122. </style>
  123. <div class="container1">
  124. <div class="main">
  125. <div class="main1">
  126. <div class="main1-header">
  127. 领导驾驶舱
  128. </div>
  129. </div>
  130. <div class="main2">
  131. <div class="main2-left">
  132. <div class="main2-left-top">
  133. <div class="work-type-mode">
  134. <select name="" id="workTypeMode1">
  135. <option value="1">维修</option>
  136. <option value="2">保洁</option>
  137. <option value="3">运送</option>
  138. <option value="4">安保</option>
  139. </select>
  140. </div>
  141. <div class="main2-left-top-body" id="workMode1">
  142. </div>
  143. <div class="main2-left-top-bottom">
  144. <div class="one">
  145. <div class="kuai color1"></div>
  146. <span>总完成率</span>
  147. </div>
  148. <div class="one">
  149. <div class="kuai color2"></div>
  150. <span>主动完成率</span>
  151. </div>
  152. <div class="one">
  153. <div class="kuai color3"></div>
  154. <span>被动完成率</span>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="main2-left-bottom">
  159. <div class="main2-left-bottom-header" >
  160. <span>本月工单平均响应时间</span>
  161. <div class="work-type-mode">
  162. <select name="" id="workTypeMode2">
  163. <option value="1">维修</option>
  164. <option value="2">保洁</option>
  165. <option value="3">运送</option>
  166. <option value="4">安保</option>
  167. </select>
  168. </div>
  169. </div>
  170. <div class="main2-left-bottom-body">
  171. <div class="response-time">
  172. <div class="min"><text id="min">0</text><span>hour</span></div>
  173. <div class="img">
  174. <img src="/admin/img/tu1.png" alt="">
  175. </div>
  176. <div class="comparison" id="comparison">较上月+0hour</div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="main2-content">
  182. <div class="main2-content-one">
  183. <div class="main2-left-bottom-header">
  184. <span>本月维修类型工单所用工时分析</span>
  185. </div>
  186. <div class="main2-content-one-body" id="yearTodo">
  187. </div>
  188. </div>
  189. <div class="main2-content-two">
  190. <div class="main2-left-bottom-header">
  191. <span>专项任务完成数量</span>
  192. </div>
  193. <div class="main2-content-two-body" id="cleanerTask"></div>
  194. </div>
  195. <div class="main2-content-three">
  196. <div class="main2-left-bottom-header">
  197. <span>本月耗材消耗分析</span>
  198. </div>
  199. <div class="main2-content-three-body" id="mateGoods">
  200. </div>
  201. </div>
  202. <div class="main2-content-fore">
  203. <div class="main2-left-bottom-header">
  204. <span>日常工作数据分析</span>
  205. </div>
  206. <div class="daily-box">
  207. <div class="check-bl">
  208. <div class="left">
  209. 近3个月<br/>检查率
  210. </div>
  211. <div class="right">
  212. <div style="width: 100%; height: auto">
  213. <text class="bl" id="daily-count1">0%</text><br/>
  214. <text class="nums" id="daily-count2">0/0</text>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="check-nums">
  219. <div class="left">
  220. 本月<br/>检查数量
  221. </div>
  222. <div class="right" id="daily-count3">0</div>
  223. </div>
  224. <div class="check-avg">
  225. <div class="left">
  226. 本月<br/>检查平均分
  227. </div>
  228. <div class="right" id="daily-count4">0</div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. <div class="main2-right">
  234. <div class="main2-right-one">
  235. <div class="main2-left-bottom-header">
  236. <span>用户数据分析</span>
  237. </div>
  238. <div class="main2-right-one-body" id="orgUser"></div>
  239. </div>
  240. <div class="main2-right-two">
  241. <div class="main2-left-bottom-header">
  242. <span>医废信息</span>
  243. </div>
  244. <div class="main2-right-two-body">
  245. <div class="waste">
  246. <div class="title" id="waste-title">本月医废收集量</div>
  247. <div class="kg" id="waste-weight">0kg</div>
  248. <div class="line"></div>
  249. <div class="hint">功能未应用-灰色<br/>
  250. 连续72小时没有数据-红色<br/>
  251. 功能应用且连续72小时有数据-绿色</div>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. <div class="fullscreen">
  260. <i class="glyphicon glyphicon-fullscreen" id="fullscreenbtn" onclick="fullScreen(this)"></i>
  261. </div>
  262. {/block}
  263. {block name="script"}
  264. <script src="/static/echarts-5.2.2.js"></script>
  265. <script>
  266. $(window).resize(function(){
  267. location.reload()
  268. $('#fullscreenbtn').show();
  269. changeZoom();
  270. });
  271. function changeZoom() {
  272. var wb = $(window).width()/1920;
  273. var hb = $(window).height()/1080;
  274. if(wb >= hb){
  275. $('body').css({
  276. 'zoom': hb,
  277. });
  278. }else{
  279. $('body').css({
  280. 'zoom': wb,
  281. });
  282. }
  283. }
  284. function fullScreen(_self){
  285. var el = document.documentElement;
  286. var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen;
  287. //typeof rfs != "undefined" && rfs
  288. if (rfs) {
  289. rfs.call(el);
  290. } else if (typeof window.ActiveXObject !== "undefined") {
  291. //for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
  292. var wscript = new ActiveXObject("WScript.Shell");
  293. if (wscript != null) {
  294. wscript.SendKeys("{F11}");
  295. }
  296. }
  297. }
  298. $(function () {
  299. var mode1 = $('#workTypeMode1').val()
  300. var url = '{:url("CockpitStatistics/todoCompletion")}';
  301. var name = '本月-工单完成率';
  302. $.post(url,{mode:mode1},function (res) {
  303. if(res.code == 1) {
  304. var lists = res.data;
  305. var option = {
  306. tooltip: {
  307. show:true,
  308. trigger: 'item',
  309. formatter: "{a} : {d}%"
  310. },
  311. color:['#3170FF','#FFD131','#F96E33'],
  312. legend: {
  313. // top: 'bottom',
  314. // bottom:0,
  315. y:'bottom',
  316. orient: 'vertical',
  317. hoverAnimation: false, //鼠标移入变大
  318. itemHeight: 15,//图例的高度
  319. itemGap:12,//图例之间的间距
  320. //图例的名字需要和饼图的name一致,才会显示图例
  321. // data:lists.title,
  322. textStyle: { //图例文字的样式
  323. color: '#AAC9F7',
  324. fontSize: 8
  325. },
  326. },
  327. series: [
  328. {
  329. name:lists.title[0],
  330. type:'pie',
  331. radius: ['65%', '75%'],
  332. hoverAnimation:false,
  333. //环的位置
  334. label: {
  335. show: true,
  336. position: 'center',
  337. textStyle:{color:'#0BE2DF',fontSize:"10"},
  338. formatter:function (){
  339. return name.split('-').join("\n");
  340. },
  341. normal: { // 显示的位置
  342. // position: 'inner'
  343. }
  344. },
  345. labelLine: {
  346. normal: {
  347. show: false
  348. }
  349. },
  350. emphasis: {
  351. label: {
  352. show: true,
  353. fontSize: '20',
  354. fontWeight: 'bold'
  355. }
  356. },
  357. data:[
  358. {
  359. // name: lists.title[0],
  360. value:lists.count1.bl1, //需要显示的数据
  361. },
  362. {
  363. value:lists.count1.bl2,
  364. //不需要显示的数据,颜色设置成和背景一样
  365. itemStyle: {
  366. normal: {
  367. color: '#184997'
  368. }
  369. }
  370. },
  371. ]
  372. },
  373. {
  374. name:lists.title[1],
  375. type:'pie',
  376. radius: ['52%', '60%'],
  377. hoverAnimation: false, //鼠标移入变大
  378. label: {
  379. show: true,
  380. position: 'center',
  381. formatter:function (){
  382. return name.split('-').join("\n");
  383. },
  384. // normal: {
  385. // position: 'inner'
  386. // }
  387. },
  388. labelLine: {
  389. normal: {
  390. show: false
  391. }
  392. },
  393. emphasis: {
  394. label: {
  395. show: true,
  396. fontSize: '20',
  397. fontWeight: 'bold'
  398. }
  399. },
  400. data:[
  401. {
  402. // name: lists.title[1],
  403. value:lists.count2.bl1,
  404. itemStyle: {
  405. normal: {
  406. color: '#FFD131'
  407. }
  408. }
  409. },
  410. {
  411. value:lists.count2.bl2,
  412. itemStyle: {
  413. normal: {
  414. color: '#184997'
  415. }
  416. }
  417. }
  418. ]
  419. },
  420. {
  421. name:lists.title[2],
  422. type:'pie',
  423. radius: ['42%', '48%'],
  424. hoverAnimation:false,
  425. label: {
  426. show: true,
  427. position: 'center',
  428. formatter:function (){
  429. return name.split('-').join("\n");
  430. },
  431. // normal: {
  432. // position: 'inner'
  433. // }
  434. },
  435. labelLine: {
  436. normal: {
  437. show: false
  438. }
  439. },
  440. emphasis: {
  441. label: {
  442. show: true,
  443. fontSize: '20',
  444. fontWeight: 'bold'
  445. }
  446. },
  447. data:[
  448. {
  449. // name: lists.title[2],
  450. value:lists.count3.bl1,
  451. itemStyle: {
  452. normal: {
  453. color: '#F96E33'
  454. }
  455. }
  456. },
  457. {
  458. value:lists.count3.bl2,
  459. itemStyle: {
  460. normal: {
  461. color: '#184997'
  462. }
  463. }
  464. }
  465. ]
  466. },
  467. ]
  468. };
  469. var myChart = echarts.init(document.getElementById('workMode1'));
  470. myChart.setOption(option);
  471. }
  472. })
  473. // workTypeMode2
  474. var mode2 = $('#workTypeMode2').val()
  475. var url2 = '{:url("CockpitStatistics/todoResponseTime")}';
  476. $.post(url2,{mode:mode2},function (res) {
  477. if(res.code == 1) {
  478. var lists = res.data;
  479. $('#min').html(lists.count);
  480. if(lists.count2 >= 0){
  481. $('#comparison').html('较上月+'+lists.count2+'hour');
  482. }else {
  483. $('#comparison').html('较上月'+lists.count2+'hour');
  484. }
  485. }
  486. })
  487. //yearTodo
  488. var url3 = '{:url("CockpitStatistics/repairTodo")}';
  489. $.post(url3,{},function (res) {
  490. if(res.code == 1) {
  491. var lists = res.data;
  492. option = {
  493. legend: {
  494. top: 'bottom',
  495. left: 'center',
  496. hoverAnimation:false,
  497. textStyle: { //图例文字的样式
  498. color: '#AAC9F7',
  499. // fontSize: 16
  500. },
  501. },
  502. tooltip: {
  503. trigger: 'item',
  504. formatter: '{b} : {c}小时 ({d}%)'
  505. },
  506. series: [
  507. {
  508. name: 'Radius Mode',
  509. type: 'pie',
  510. radius: [20, 60],
  511. // center: ['25%', '50%'],
  512. roseType: 'radius',
  513. itemStyle: {
  514. borderRadius: 5
  515. },
  516. label: {
  517. show: false
  518. },
  519. emphasis: {
  520. label: {
  521. show: false
  522. }
  523. },
  524. data: lists,
  525. },
  526. ],
  527. };
  528. var myChart = echarts.init(document.getElementById('yearTodo'));
  529. myChart.setOption(option);
  530. }
  531. })
  532. //cleanerTask
  533. var url4 = '{:url("CockpitStatistics/cleanTypeTask")}';
  534. $.post(url4,{},function (res) {
  535. if(res.code == 1) {
  536. var lists = res.data;
  537. var option;
  538. option = {
  539. legend: {
  540. left: '10',
  541. top: 'bottom',
  542. textStyle:{
  543. color:'#88B1D0',
  544. fontSize: 12,
  545. },
  546. },
  547. xAxis: {
  548. type: 'category',
  549. data: lists.title,
  550. axisLabel: {
  551. show: true,
  552. interval:0,
  553. textStyle: {
  554. color: '#fff'
  555. },
  556. axisTick: {
  557. show:false,
  558. }
  559. },
  560. axisLine: {
  561. lineStyle: {
  562. type: 'solid',
  563. color: '#20A3F7',//左边线的颜色
  564. width:'1'//坐标线的宽度
  565. }
  566. },
  567. },
  568. yAxis: {
  569. type: 'value',
  570. axisLabel: {
  571. show: true,
  572. textStyle: {
  573. color: '#fff'
  574. },
  575. },
  576. splitLine:{
  577. show:false //去掉网格线
  578. },
  579. axisLine: {
  580. lineStyle: {
  581. type: 'solid',
  582. color: '#20A3F7',//左边线的颜色
  583. // width: '1'//坐标线的宽度
  584. }
  585. }
  586. },
  587. series: [{
  588. data: lists.list,
  589. type: 'bar',
  590. barWidth :15,
  591. itemStyle: {
  592. normal: {
  593. label: {
  594. show: true, //开启显示
  595. position: 'top', //在上方显示
  596. textStyle: { //数值样式
  597. color: '#fff',
  598. fontSize: 16
  599. }
  600. }
  601. }
  602. }
  603. }],
  604. };
  605. var myChart = echarts.init(document.getElementById('cleanerTask'));
  606. myChart.setOption(option);
  607. }
  608. })
  609. //mateGoods
  610. var url5 = '{:url("CockpitStatistics/mateGoods")}';
  611. $.post(url5,{},function (res) {
  612. if(res.code == 1) {
  613. var lists = res.data;
  614. var option;
  615. option = {
  616. legend: {
  617. left: '10',
  618. top: 'bottom',
  619. textStyle:{
  620. color:'#88B1D0',
  621. fontSize: 12,
  622. },
  623. },
  624. xAxis: {
  625. type: 'category',
  626. data: lists.title,
  627. axisLabel: {
  628. show: true,
  629. interval:0,
  630. textStyle: {
  631. color: '#fff'
  632. },
  633. axisTick: {
  634. show:false,
  635. }
  636. },
  637. axisLine: {
  638. lineStyle: {
  639. type: 'solid',
  640. color: '#20A3F7',//左边线的颜色
  641. width:'1'//坐标线的宽度
  642. }
  643. },
  644. },
  645. yAxis: {
  646. type: 'value',
  647. axisLabel: {
  648. show: true,
  649. textStyle: {
  650. color: '#fff'
  651. },
  652. },
  653. splitLine:{
  654. show:false //去掉网格线
  655. },
  656. axisLine: {
  657. lineStyle: {
  658. type: 'solid',
  659. color: '#20A3F7',//左边线的颜色
  660. // width: '1'//坐标线的宽度
  661. }
  662. }
  663. },
  664. series: [{
  665. data: lists.list,
  666. type: 'bar',
  667. barWidth :15,
  668. itemStyle: {
  669. normal: {
  670. label: {
  671. show: true, //开启显示
  672. position: 'top', //在上方显示
  673. textStyle: { //数值样式
  674. color: '#fff',
  675. fontSize: 16
  676. }
  677. }
  678. }
  679. }
  680. }],
  681. };
  682. var myChart = echarts.init(document.getElementById('mateGoods'));
  683. myChart.setOption(option);
  684. }
  685. })
  686. //orgUser
  687. var url6 = '{:url("CockpitStatistics/orgUser")}';
  688. $.post(url6,{},function (res) {
  689. if(res.code == 1) {
  690. var lists = res.data;
  691. option = {
  692. legend: {
  693. top: 'bottom',
  694. left: 'center',
  695. textStyle: { //图例文字的样式
  696. color: '#AAC9F7',
  697. // fontSize: 16
  698. },
  699. },
  700. tooltip: {
  701. trigger: 'item',
  702. formatter: '{b} : {c}人 ({d}%)'
  703. },
  704. series: [
  705. {
  706. name: 'Radius Mode',
  707. type: 'pie',
  708. radius: [20, 60],
  709. // center: ['25%', '50%'],
  710. roseType: 'radius',
  711. hoverAnimation:false,
  712. itemStyle: {
  713. borderRadius: 5
  714. },
  715. label: {
  716. show: false
  717. },
  718. emphasis: {
  719. label: {
  720. show: false
  721. }
  722. },
  723. data: lists,
  724. },
  725. ],
  726. };
  727. var myChart = echarts.init(document.getElementById('orgUser'));
  728. myChart.setOption(option);
  729. }
  730. })
  731. //title
  732. var url7 = '{:url("CockpitStatistics/wasteCount")}';
  733. $.post(url7,{},function (res) {
  734. if(res.code == 1) {
  735. var lists = res.data;
  736. $('#waste-weight').html(lists.count+'kg');
  737. if(lists.type == 1){
  738. $('#waste-title').css('color','#435188');
  739. $('#waste-weight').css('color','#435188');
  740. }
  741. if(lists.type == 2){
  742. $('#waste-title').css('color','#DC1866');
  743. $('#waste-weight').css('color','#DC1866');
  744. }
  745. if(lists.type == 3){
  746. $('#waste-title').css('color','#0BE2DF');
  747. $('#waste-weight').css('color','#0BE2DF');
  748. }
  749. }
  750. })
  751. var url8 = '{:url("CockpitStatistics/dailyDataCount")}';
  752. $.post(url8,{},function (res) {
  753. if(res.code == 1) {
  754. var count = res.data;
  755. $('#daily-count1').html(count.bl);
  756. $('#daily-count2').html(count.count2);
  757. $('#daily-count3').html(count.count3);
  758. $('#daily-count4').html(count.count4);
  759. }
  760. })
  761. });
  762. $('#workTypeMode1').change(function (){
  763. var mode = $('#workTypeMode1').val()
  764. var url = '{:url("CockpitStatistics/todoCompletion")}';
  765. var name = '本月-工单完成率';
  766. $.post(url,{mode:mode},function (res) {
  767. if(res.code == 1) {
  768. var lists = res.data;
  769. var option = {
  770. tooltip: {
  771. show:true,
  772. trigger: 'item',
  773. formatter: "{a} : {d}%"
  774. },
  775. color:['#3170FF','#FFD131','#F96E33'],
  776. legend: {
  777. // top: 'bottom',
  778. // bottom:0,
  779. y:'bottom',
  780. orient: 'vertical',
  781. hoverAnimation: false, //鼠标移入变大
  782. itemHeight: 15,//图例的高度
  783. itemGap:12,//图例之间的间距
  784. //图例的名字需要和饼图的name一致,才会显示图例
  785. // data:lists.title,
  786. textStyle: { //图例文字的样式
  787. color: '#AAC9F7',
  788. fontSize: 8
  789. },
  790. },
  791. series: [
  792. {
  793. name:lists.title[0],
  794. type:'pie',
  795. radius: ['65%', '75%'],
  796. hoverAnimation:false,
  797. //环的位置
  798. label: {
  799. show: true,
  800. position: 'center',
  801. textStyle:{color:'#0BE2DF',fontSize:"10"},
  802. formatter:function (){
  803. return name.split('-').join("\n");
  804. },
  805. normal: { // 显示的位置
  806. // position: 'inner'
  807. }
  808. },
  809. labelLine: {
  810. normal: {
  811. show: false
  812. }
  813. },
  814. emphasis: {
  815. label: {
  816. show: true,
  817. fontSize: '20',
  818. fontWeight: 'bold'
  819. }
  820. },
  821. data:[
  822. {
  823. // name: lists.title[0],
  824. value:lists.count1.bl1, //需要显示的数据
  825. },
  826. {
  827. value:lists.count1.bl2,
  828. //不需要显示的数据,颜色设置成和背景一样
  829. itemStyle: {
  830. normal: {
  831. color: '#184997'
  832. }
  833. }
  834. },
  835. ]
  836. },
  837. {
  838. name:lists.title[1],
  839. type:'pie',
  840. radius: ['52%', '60%'],
  841. hoverAnimation: false, //鼠标移入变大
  842. label: {
  843. show: true,
  844. position: 'center',
  845. formatter:function (){
  846. return name.split('-').join("\n");
  847. },
  848. // normal: {
  849. // position: 'inner'
  850. // }
  851. },
  852. labelLine: {
  853. normal: {
  854. show: false
  855. }
  856. },
  857. emphasis: {
  858. label: {
  859. show: true,
  860. fontSize: '20',
  861. fontWeight: 'bold'
  862. }
  863. },
  864. data:[
  865. {
  866. // name: lists.title[1],
  867. value:lists.count2.bl1,
  868. itemStyle: {
  869. normal: {
  870. color: '#FFD131'
  871. }
  872. }
  873. },
  874. {
  875. value:lists.count2.bl2,
  876. itemStyle: {
  877. normal: {
  878. color: '#184997'
  879. }
  880. }
  881. }
  882. ]
  883. },
  884. {
  885. name:lists.title[2],
  886. type:'pie',
  887. radius: ['42%', '48%'],
  888. hoverAnimation:false,
  889. label: {
  890. show: true,
  891. position: 'center',
  892. formatter:function (){
  893. return name.split('-').join("\n");
  894. },
  895. // normal: {
  896. // position: 'inner'
  897. // }
  898. },
  899. labelLine: {
  900. normal: {
  901. show: false
  902. }
  903. },
  904. emphasis: {
  905. label: {
  906. show: true,
  907. fontSize: '20',
  908. fontWeight: 'bold'
  909. }
  910. },
  911. data:[
  912. {
  913. // name: lists.title[2],
  914. value:lists.count3.bl1,
  915. itemStyle: {
  916. normal: {
  917. color: '#F96E33'
  918. }
  919. }
  920. },
  921. {
  922. value:lists.count3.bl2,
  923. itemStyle: {
  924. normal: {
  925. color: '#184997'
  926. }
  927. }
  928. }
  929. ]
  930. },
  931. ]
  932. };
  933. var myChart = echarts.init(document.getElementById('workMode1'));
  934. myChart.setOption(option);
  935. }
  936. })
  937. })
  938. $('#workTypeMode2').change(function (){
  939. var mode2 = $('#workTypeMode2').val()
  940. var url2 = '{:url("CockpitStatistics/todoResponseTime")}';
  941. $.post(url2,{mode:mode2},function (res) {
  942. if(res.code == 1) {
  943. var lists = res.data;
  944. $('#min').html(lists.count);
  945. if(lists.count2 >= 0){
  946. $('#comparison').html('较上月+'+lists.count2+'min');
  947. }else {
  948. $('#comparison').html('较上月'+lists.count2+'min');
  949. }
  950. }
  951. })
  952. })
  953. </script>
  954. {/block}