deck_reportCtrl.js 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. 'use strict';
  2. app.controller('deck_reportCtrl', ["$scope", "$rootScope", "$state", "$timeout", "$interval", "$http", "$cookieStore", "SweetAlert", "Restangular", "api_report", "api_statistic", "moment", 'api_user_data','api_deck_report', function ($scope, $rootScope, $state, $timeout, $interval, $http, $cookieStore, SweetAlert, Restangular, api_report, api_statistic, moment, api_user_data,api_deck_report) {
  3. $scope.tap = 'LDZS';
  4. // 选择日期:
  5. $scope.dateSelected = [{
  6. name: '近90天',
  7. id: 0
  8. }, {
  9. name: '近1年',
  10. id: 1
  11. }, {
  12. name: '近3年',
  13. id: 2
  14. }, {
  15. name: '近5年',
  16. id: 3
  17. }]
  18. $scope.parameters = {};
  19. $scope.nowdata = moment(new Date()).format('YYYY/MM/DD HH:ss:mm');
  20. var weeks = new Date().getDay();
  21. $scope.starttimes = moment(new Date().getTime() - 86400000 * (weeks + 6)).format('YYYY-MM-DD');
  22. $scope.endtimes = moment(new Date().getTime() - 86400000 * (weeks)).format('YYYY-MM-DD');
  23. $scope.changeForm = function (paramDateFrom) {
  24. $scope.starttimes = moment(paramDateFrom).format('YYYY-MM-DD');
  25. }
  26. $scope.changeTo = function (paramDateTo) {
  27. $scope.endtimes = moment(paramDateTo).format('YYYY-MM-DD');
  28. }
  29. $scope.parameters.paramDateFrom = $scope.starttimes;
  30. $scope.parameters.paramDateTo = $scope.endtimes;
  31. $scope.searchkeys = {
  32. dateSelected: {id:-1,name:""}//选中
  33. };
  34. // 重置
  35. $scope.reset = function(){
  36. $scope.parameters.paramDateFrom = moment(new Date().getTime() - 86400000 * (weeks + 6)).format('YYYY-MM-DD');
  37. $scope.parameters.paramDateTo = moment(new Date().getTime() - 86400000 * (weeks)).format('YYYY-MM-DD');
  38. $scope.searchkeys.dateSelected = {id:-1,name:""}
  39. $scope.getData();
  40. }
  41. // n天前
  42. $scope.GetDateStr = function (AddDayCount) {
  43. var dd = new Date();
  44. dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
  45. var y = dd.getFullYear();
  46. var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期,不足10补0
  47. var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号,不足10补0
  48. return y + "-" + m + "-" + d;
  49. }
  50. //上周
  51. $scope.week = function () {
  52. $scope.searchstate = "week";
  53. var weeks = new Date().getDay();
  54. $scope.starttimes = moment(new Date().getTime() - 86400000 * (weeks + 6)).format('YYYY-MM-DD');
  55. $scope.endtimes = moment(new Date().getTime() - 86400000 * (weeks)).format('YYYY-MM-DD');
  56. $scope.parameters.paramDateFrom = $scope.starttimes;
  57. $scope.parameters.paramDateTo = $scope.endtimes;
  58. // $scope.parameters = parseDateParameter($scope.parameters);
  59. // $scope.mdxquery();
  60. }
  61. //上月
  62. $scope.month = function () {
  63. $scope.searchstate = "month";
  64. $scope.starttimes = moment((new Date(moment().startOf('month'))).setMonth((new Date()).getMonth() - 1)).format('YYYY-MM-DD');
  65. $scope.endtimes = moment((new Date(moment().startOf('month'))).setMonth((new Date()).getMonth()) - 86400000).format('YYYY-MM-DD');
  66. $scope.parameters.paramDateFrom = $scope.starttimes;
  67. $scope.parameters.paramDateTo = $scope.endtimes;
  68. // $scope.parameters = parseDateParameter($scope.parameters);
  69. // $scope.mdxquery();
  70. }
  71. //上年
  72. //今年(1月1日-至今)
  73. $scope.year = function () {
  74. $scope.searchstate = "year";
  75. $scope.starttimes = moment().startOf('year').format('YYYY-MM-DD');
  76. $scope.endtimes = moment().format('YYYY-MM-DD');
  77. $scope.parameters.paramDateFrom = $scope.starttimes;
  78. $scope.parameters.paramDateTo = $scope.endtimes;
  79. }
  80. // 近n年
  81. $scope.nearYear = function (n) {
  82. $scope.parameters.paramDateFrom = moment().subtract(n, "years").format("YYYY-MM-DD");
  83. $scope.parameters.paramDateTo = $scope.endtimes;
  84. console.log($scope.parameters.paramDateFrom, $scope.parameters.paramDateTo)
  85. }
  86. /**
  87. *日历
  88. */
  89. $scope.open = function ($event) {
  90. $event.preventDefault();
  91. $event.stopPropagation();
  92. $scope.opened = !$scope.opened;
  93. };
  94. $scope.endOpen = function ($event) {
  95. $event.preventDefault();
  96. $event.stopPropagation();
  97. $scope.startOpened = false;
  98. $scope.endOpened = !$scope.endOpened;
  99. };
  100. $scope.startOpen = function ($event) {
  101. $event.preventDefault();
  102. $event.stopPropagation();
  103. $scope.endOpened = false;
  104. $scope.startOpened = !$scope.startOpened;
  105. };
  106. //选择类型
  107. $scope.active = function (name) {
  108. $scope.tap = name
  109. if ($scope.tap == 'LDZS') {
  110. $scope.getData();
  111. } else {
  112. setTimeout(function () {
  113. barechart2();
  114. barechart3();
  115. }, 500);
  116. }
  117. }
  118. // 请求人
  119. // api_user_data.fetchDataList('requester', {
  120. // "idx": 0,
  121. // "sum": 10
  122. // }).then(function (response) {
  123. // if (response) {
  124. // if (response.status = 200) {
  125. // $scope.requester = response.list;
  126. // }
  127. // }
  128. // })
  129. //获取数据
  130. $scope.total = 0;//来电总数
  131. $scope.trans = 0;//建单总数
  132. $scope.trans_percent = 0;//来电转换率
  133. $scope.dataList = [];//柱状图-按月统计来电量
  134. $scope.dataList_name = [];//横轴名称
  135. $scope.dataList_totalNum = [];//来电总数
  136. $scope.dataList_buildNum = [];//建单总数
  137. $scope.hourList = [];//24小时来电趋势图-按小时统计来电量
  138. $scope.hourList_name = [];
  139. $scope.hourList_countNum = [];
  140. $scope.timeList = [];//未接听数-按月统计
  141. $scope.timeList_name = [];
  142. $scope.timeList_sumNum = [];
  143. $scope.timeList_avgNum = [];
  144. $scope.missList = [];//接听通话时长和平均时长-按月统计
  145. $scope.missList_name = [];
  146. $scope.missList_countNum = [];
  147. $scope.getData = function(){
  148. api_deck_report.fetchLdzsNumList({
  149. "startTime": $scope.parameters.paramDateFrom,
  150. "endTime": $scope.parameters.paramDateTo,
  151. }).then(function (res) {
  152. if(res){
  153. // 来电总数顶部数字
  154. if(res.title){
  155. $scope.total = res.title.total || 0;
  156. $scope.trans = res.title.trans || 0;
  157. $scope.trans_percent = res.title.trans_percent || 0;
  158. }
  159. // 柱状图-按月统计来电量
  160. if(res.dataList){
  161. var arr = Object.values(res.dataList);
  162. $scope.dataList = arr.map(ress=>{
  163. return {
  164. time:ress.time,
  165. total:ress.total || 0,
  166. trans:ress.trans || 0
  167. }
  168. })
  169. $scope.dataList_name = $scope.dataList.map(v=>v.time);//横轴名称
  170. $scope.dataList_totalNum = $scope.dataList.map(v=>v.total);//来电总数
  171. $scope.dataList_buildNum = $scope.dataList.map(v=>v.trans);//建单总数
  172. }
  173. // 24小时来电趋势图-按小时统计来电量
  174. if(res.hourList){
  175. $scope.hourList = res.hourList || [];
  176. $scope.hourList_name = $scope.hourList.map(v=>v.time);//横轴名称
  177. $scope.hourList_countNum = $scope.hourList.map(v=>v.count);//数量
  178. }
  179. // 接听通话时长和平均时长-按月统计
  180. if(res.timeList){
  181. $scope.timeList = res.timeList || [];
  182. $scope.timeList_name = $scope.timeList.map(v=>v.time);//横轴名称
  183. $scope.timeList_sumNum = $scope.timeList.map(v=>v.sum);//通话时长
  184. $scope.timeList_avgNum = $scope.timeList.map(v=>v.avg);//平均时长
  185. }
  186. // 未接听数-按月统计
  187. if(res.missList){
  188. $scope.missList = res.missList || [];
  189. $scope.missList_name = $scope.missList.map(v=>v.time);//横轴名称
  190. $scope.missList_countNum = $scope.missList.map(v=>v.count);//未接听数
  191. }
  192. //渲染图表
  193. barechart();
  194. barechart1({id:"sjfx1",name:'来电数量',unit:'个',data:{x:$scope.hourList_name,y:$scope.hourList_countNum}});
  195. barechart1({id:"sjfx2",name:' 接听通话时长',unit:'秒',data:{x:$scope.timeList_name,y:$scope.timeList_sumNum}});
  196. barechart1({id:"sjfx3",name:' 接听电话平均时长',unit:'秒',data:{x:$scope.timeList_name,y:$scope.timeList_avgNum}});
  197. barechart1({id:"sjfx4",name:'未接电话',unit:'个',data:{x:$scope.missList_name,y:$scope.missList_countNum}});
  198. }
  199. })
  200. }
  201. $scope.getData();
  202. // 选择日期
  203. $scope.onChangeDate = function (s) {
  204. console.log(s)
  205. switch (s) {
  206. case 0:
  207. // 最近90天
  208. console.log('最近90天');
  209. $scope.parameters.paramDateFrom = $scope.GetDateStr(-90);
  210. break;
  211. case 1:
  212. // 最近一年
  213. console.log('最近一年');
  214. $scope.nearYear(1)
  215. break;
  216. case 2:
  217. // 最近三年
  218. console.log('最近三年');
  219. $scope.nearYear(3)
  220. break;
  221. case 3:
  222. // 最近五年
  223. console.log('最近五年');
  224. $scope.nearYear(5)
  225. break;
  226. }
  227. }
  228. //图表 来电转换
  229. function barechart() {
  230. console.log(echarts)
  231. var dom = document.getElementById("ldzh");
  232. console.log(dom)
  233. var myChart = echarts.init(dom);
  234. var option = null;
  235. console.log(myChart)
  236. myChart.showLoading({  
  237. text: '数据加载中...',
  238. color: '#c23531',
  239. textColor: '#fff',
  240. maskColor: 'rgba(255,255,255,0)',
  241. zlevel: 0
  242. });
  243. myChart.hideLoading();
  244. option = {
  245. tooltip: {
  246. trigger: 'axis',
  247. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  248. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  249. }
  250. },
  251. legend: {
  252. data: ['来电总数', '建单总数'],
  253. align: 'left',
  254. // itemWidth:10,
  255. // itemHeight:10,
  256. bottom: 0
  257. },
  258. grid: {
  259. left: '.5%',
  260. right: '0%',
  261. bottom: '15%',
  262. containLabel: true
  263. },
  264. xAxis: [{
  265. type: 'category',
  266. // axisTick: {
  267. // alignWithLabel: true
  268. // },
  269. axisLabel: {
  270. textStyle: {
  271. color: '#7B7B7B',
  272. // fontSize: '14',
  273. }
  274. },
  275. axisLine: {
  276. show: true,
  277. lineStyle: {
  278. color: '#7B7B7B',
  279. // type: 'dotted'
  280. },
  281. },
  282. data: $scope.dataList_name
  283. }],
  284. yAxis: [{
  285. type: 'value',
  286. scale: true,
  287. name: '数量 (个)',
  288. min: 0,
  289. boundaryGap: [0.2, 0.2],
  290. axisLabel: {
  291. textStyle: {
  292. color: '#7B7B7B',
  293. // fontSize: '14',
  294. }
  295. },
  296. axisLine: {
  297. show: true,
  298. lineStyle: {
  299. color: '#7B7B7B',
  300. // type: 'dotted'
  301. },
  302. },
  303. }
  304. // {
  305. // type: 'value',
  306. // scale: true,
  307. // name: '来电转换率',
  308. // min: 0,
  309. // max: 100,
  310. // boundaryGap: [0.2, 0.2],
  311. // axisLabel: {
  312. // formatter: '{value} %',
  313. // textStyle: {
  314. // color: '#7B7B7B',
  315. // // fontSize: '14',
  316. // }
  317. // },
  318. // axisLine: {
  319. // show: true,
  320. // lineStyle: {
  321. // color: '#7B7B7B',
  322. // // type: 'dotted'
  323. // },
  324. // },
  325. // }
  326. ],
  327. series: [
  328. {
  329. name: '来电总数',
  330. type: 'bar',
  331. itemStyle: {
  332. normal: {
  333. color: '#005395'
  334. }
  335. },
  336. data: $scope.dataList_totalNum
  337. }, {
  338. name: '建单总数',
  339. type: 'bar',
  340. itemStyle: {
  341. normal: {
  342. color: '#1CA58F'
  343. }
  344. },
  345. data: $scope.dataList_buildNum
  346. }
  347. ]
  348. };
  349. if (option && typeof option === "object") {
  350. myChart.setOption(option, true);
  351. myChart.hideLoading();
  352. }
  353. }
  354. //图表 事件趋势
  355. function barechart1(options) {
  356. console.log(echarts)
  357. var dom = document.getElementById(options.id);
  358. console.log(dom)
  359. var myChart1 = echarts.init(dom);
  360. var option1 = null;
  361. console.log(myChart1)
  362. myChart1.showLoading({  
  363. text: '数据加载中...',
  364. color: '#c23531',
  365. textColor: '#fff',
  366. maskColor: 'rgba(255,255,255,0)',
  367. zlevel: 0
  368. });
  369. myChart1.hideLoading();
  370. option1 = {
  371. tooltip: {
  372. trigger: 'axis',
  373. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  374. // type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  375. lineStyle: {
  376. color: '#49A9EE',
  377. type: 'dotted'
  378. },
  379. }
  380. },
  381. legend: {
  382. data: [options.name],
  383. align: 'left',
  384. // itemWidth:10,
  385. // itemHeight:10,
  386. bottom: 0
  387. },
  388. grid: {
  389. left: '1%',
  390. right: '0%',
  391. bottom: '15%',
  392. top: '10%',
  393. containLabel: true
  394. },
  395. xAxis: [{
  396. type: 'category',
  397. // axisTick: {
  398. // alignWithLabel: true
  399. // },
  400. axisLabel: {
  401. textStyle: {
  402. color: '#7B7B7B',
  403. // fontSize: '14',
  404. }
  405. },
  406. axisLine: {
  407. show: true,
  408. lineStyle: {
  409. color: '#7B7B7B',
  410. // type: 'dotted'
  411. },
  412. },
  413. data: options.data.x
  414. }],
  415. yAxis: [{
  416. type: 'value',
  417. scale: true,
  418. name: options.name + '(' + options.unit +')',
  419. min: 0,
  420. boundaryGap: [0.2, 0.2],
  421. axisLabel: {
  422. textStyle: {
  423. color: '#7B7B7B',
  424. // fontSize: '14',
  425. }
  426. },
  427. axisLine: {
  428. show: true,
  429. lineStyle: {
  430. color: '#7B7B7B',
  431. // type: 'dotted'
  432. },
  433. },
  434. }, ],
  435. series: [{
  436. name: options.name,
  437. type: 'line',
  438. itemStyle: {
  439. normal: {
  440. color: '#005395',
  441. }
  442. },
  443. lineStyle: {
  444. normal: {
  445. color: '#005395'
  446. }
  447. },
  448. data: options.data.y
  449. }]
  450. };
  451. if (option1 && typeof option1 === "object") {
  452. myChart1.setOption(option1, true);
  453. myChart1.hideLoading();
  454. }
  455. }
  456. //图表 来电转换
  457. function barechart2() {
  458. console.log(echarts)
  459. var dom = document.getElementById("sjqs");
  460. console.log(dom)
  461. var myChart = echarts.init(dom);
  462. var option = null;
  463. console.log(myChart)
  464. myChart.showLoading({  
  465. text: '数据加载中...',
  466. color: '#c23531',
  467. textColor: '#fff',
  468. maskColor: 'rgba(255,255,255,0)',
  469. zlevel: 0
  470. });
  471. myChart.hideLoading();
  472. option = {
  473. tooltip: {
  474. trigger: 'axis',
  475. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  476. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  477. }
  478. },
  479. legend: {
  480. data: ['直接处理', '事件派单', '来电转换率'],
  481. align: 'left',
  482. // itemWidth:10,
  483. // itemHeight:10,
  484. bottom: 0
  485. },
  486. grid: {
  487. left: '.5%',
  488. right: '0%',
  489. bottom: '15%',
  490. containLabel: true
  491. },
  492. xAxis: [{
  493. type: 'category',
  494. // axisTick: {
  495. // alignWithLabel: true
  496. // },
  497. axisLabel: {
  498. textStyle: {
  499. color: '#7B7B7B',
  500. // fontSize: '14',
  501. }
  502. },
  503. axisLine: {
  504. show: true,
  505. lineStyle: {
  506. color: '#7B7B7B',
  507. // type: 'dotted'
  508. },
  509. },
  510. data: ['10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12']
  511. }],
  512. yAxis: [{
  513. type: 'value',
  514. scale: true,
  515. name: '事件数量 (件)',
  516. min: 0,
  517. boundaryGap: [0.2, 0.2],
  518. // axisLabel: {
  519. // formatter: '{value}'
  520. // }
  521. axisLabel: {
  522. textStyle: {
  523. color: '#7B7B7B',
  524. // fontSize: '14',
  525. }
  526. },
  527. axisLine: {
  528. show: true,
  529. lineStyle: {
  530. color: '#7B7B7B',
  531. // type: 'dotted'
  532. },
  533. },
  534. },
  535. {
  536. type: 'value',
  537. scale: true,
  538. name: '来电转换率',
  539. min: 0,
  540. max: 100,
  541. boundaryGap: [0.2, 0.2],
  542. axisLabel: {
  543. textStyle: {
  544. color: '#7B7B7B',
  545. // fontSize: '14',
  546. },
  547. formatter: '{value} %'
  548. },
  549. axisLine: {
  550. show: true,
  551. lineStyle: {
  552. color: '#7B7B7B',
  553. // type: 'dotted'
  554. },
  555. },
  556. },
  557. ],
  558. series: [{
  559. name: '直接处理',
  560. type: 'bar',
  561. itemStyle: {
  562. normal: {
  563. color: '#005395'
  564. }
  565. },
  566. data: [20, 12, 31, 23, 56, 78, 92, 12, 23]
  567. }, {
  568. name: '事件派单',
  569. type: 'bar',
  570. itemStyle: {
  571. normal: {
  572. color: '#1CA58F'
  573. }
  574. },
  575. data: [10, 20, 5, 5, 2, 32, 34, 56, 23]
  576. },
  577. {
  578. name: '来电转换率',
  579. type: 'line',
  580. itemStyle: {
  581. normal: {
  582. color: '#49A9EE'
  583. }
  584. },
  585. lineStyle: {
  586. normal: {
  587. color: '#49A9EE'
  588. }
  589. },
  590. data: [10, 20, 5, 43, 12, 34, 12, 56, 67]
  591. }
  592. ]
  593. };
  594. if (option && typeof option === "object") {
  595. myChart.setOption(option, true);
  596. myChart.hideLoading();
  597. }
  598. }
  599. //图表 来电转换
  600. function barechart3() {
  601. console.log(echarts)
  602. var dom = document.getElementById("sjpd");
  603. console.log(dom)
  604. var myChart = echarts.init(dom);
  605. var option = null;
  606. console.log(myChart)
  607. myChart.showLoading({  
  608. text: '数据加载中...',
  609. color: '#c23531',
  610. textColor: '#fff',
  611. maskColor: 'rgba(255,255,255,0)',
  612. zlevel: 0
  613. });
  614. myChart.hideLoading();
  615. option = {
  616. tooltip: {
  617. trigger: 'axis',
  618. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  619. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  620. }
  621. },
  622. legend: {
  623. data: ['事件派单', '请求重新指派', '派单准确率'],
  624. align: 'left',
  625. // itemWidth:10,
  626. // itemHeight:10,
  627. bottom: 0
  628. },
  629. grid: {
  630. left: '.5%',
  631. right: '0%',
  632. bottom: '15%',
  633. containLabel: true
  634. },
  635. xAxis: [{
  636. type: 'category',
  637. // axisTick: {
  638. // alignWithLabel: true
  639. // },
  640. axisLabel: {
  641. textStyle: {
  642. color: '#7B7B7B',
  643. // fontSize: '14',
  644. }
  645. },
  646. axisLine: {
  647. show: true,
  648. lineStyle: {
  649. color: '#7B7B7B',
  650. // type: 'dotted'
  651. },
  652. },
  653. data: ['10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12', '10-12']
  654. }],
  655. yAxis: [{
  656. type: 'value',
  657. scale: true,
  658. name: '事件数量 (件)',
  659. min: 0,
  660. boundaryGap: [0.2, 0.2],
  661. axisLabel: {
  662. formatter: '{value}',
  663. textStyle: {
  664. color: '#7B7B7B',
  665. // fontSize: '14',
  666. }
  667. },
  668. axisLine: {
  669. show: true,
  670. lineStyle: {
  671. color: '#7B7B7B',
  672. // type: 'dotted'
  673. },
  674. },
  675. },
  676. {
  677. type: 'value',
  678. scale: true,
  679. name: '派单准确率',
  680. min: 0,
  681. max: 100,
  682. boundaryGap: [0.2, 0.2],
  683. axisLabel: {
  684. textStyle: {
  685. color: '#7B7B7B',
  686. // fontSize: '14',
  687. },
  688. formatter: '{value} %'
  689. },
  690. axisLine: {
  691. show: true,
  692. lineStyle: {
  693. color: '#7B7B7B',
  694. // type: 'dotted'
  695. },
  696. },
  697. }
  698. ],
  699. series: [{
  700. name: '事件派单',
  701. type: 'bar',
  702. itemStyle: {
  703. normal: {
  704. color: '#005395'
  705. }
  706. },
  707. data: [20, 12, 31, 23, 56, 78, 92, 12, 23]
  708. }, {
  709. name: '请求重新指派',
  710. type: 'bar',
  711. itemStyle: {
  712. normal: {
  713. color: '#1CA58F'
  714. }
  715. },
  716. data: [10, 20, 5, 5, 2, 32, 34, 56, 23]
  717. },
  718. {
  719. name: '派单准确率',
  720. type: 'line',
  721. itemStyle: {
  722. normal: {
  723. color: '#49A9EE'
  724. }
  725. },
  726. lineStyle: {
  727. normal: {
  728. color: '#49A9EE'
  729. }
  730. },
  731. data: [10, 20, 5, 43, 12, 34, 12, 56, 67]
  732. }
  733. ]
  734. };
  735. if (option && typeof option === "object") {
  736. myChart.setOption(option, true);
  737. myChart.hideLoading();
  738. }
  739. }
  740. }])