Нет описания

Source-Census.html 33KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  1. <!doctype html>
  2. <html lang="en" class="feedback">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>数据统计</title>
  7. <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
  8. <style>
  9. .mui-control-content {
  10. background-color: white;
  11. min-height: 215px;
  12. }
  13. .mui-control-content .mui-loading {
  14. margin-top: 50px;
  15. }
  16. .chart {
  17. height: 260px;
  18. margin: 0px;
  19. padding: 0px;
  20. }
  21. .mui-slider .mui-slider-group {
  22. height: 500px;
  23. }
  24. #CS {
  25. position: absolute;
  26. right: 0;
  27. height: 100%;
  28. padding: 0;
  29. padding-left: 5px;
  30. border: none;
  31. z-index: 30;
  32. width: 100%;
  33. }
  34. .mui-scroll {
  35. height: 100%;
  36. }
  37. #lineChart {
  38. position: absolute;
  39. top: 0;
  40. right: 0;
  41. bottom: 0;
  42. left: 0;
  43. padding: 10px;
  44. -webkit-box-sizing: border-box;
  45. box-sizing: border-box;
  46. }
  47. .mui-grid-bottom {
  48. height: 2px;
  49. background-color: #57cebf;
  50. display: block;
  51. width: 20px;
  52. margin: 0 auto;
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <header class="mui-bar mui-bar-nav">
  58. <h1 id="title" class="mui-title">来源报表</h1>
  59. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  60. </header>
  61. <div class="mui-content ">
  62. <form id='login-form' class="mui-input-group">
  63. <!--logo-->
  64. <div class="mui-input-row">
  65. <label>来源:</label>
  66. <select name="" class="mui-select">
  67. </select>
  68. </div>
  69. <div class="mui-input-row mui-password">
  70. <label>时间:</label>
  71. <!--<input id='password' type="datetime-local" class=" mui-input" >-->
  72. <input id='demo1' data-options='{}' type="text" class="mui-input-clear btn contact" />
  73. </div>
  74. </form>
  75. <div id="slider" class="mui-slider">
  76. <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
  77. <a class="mui-control-item mui-active" href="#item1mobile" index="1">
  78. 日报
  79. </a>
  80. <a class="mui-control-item" href="#item2mobile" index="2">
  81. 周报
  82. </a>
  83. <a class="mui-control-item" href="#item3mobile" index="3">
  84. 月报
  85. </a>
  86. </div>
  87. <div class="mui-slider-group">
  88. <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
  89. <div id="scroll1" class="mui-scroll-wrapper">
  90. <div class="mui-scroll">
  91. <div class="chart" id="pieChart"></div>
  92. <div>
  93. <ul class="mui-table-view mui-grid-view mui-grid-9">
  94. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  95. <a href="#">
  96. <span class="size-20" id="jsblrate"></span>
  97. <div class="mui-media-body size-14">即时办理率</div>
  98. </a>
  99. <span class="mui-grid-bottom"></span>
  100. </li>
  101. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  102. <a href="#">
  103. <span class="size-20" id="wlzbrate"></span>
  104. <div class="mui-media-body size-14">转办率</div>
  105. </a>
  106. <span class="mui-grid-bottom"></span>
  107. </li>
  108. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  109. <a href="#">
  110. <span class="size-20" id="zbbjrate"></span>
  111. <div class="mui-media-body size-14">转办办结率</div>
  112. </a>
  113. <span class="mui-grid-bottom"></span>
  114. </li>
  115. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  116. <a href="#">
  117. <span class="size-20" id="bjrate"></span>
  118. <div class="mui-media-body size-14">办结率</div>
  119. </a>
  120. <span class="mui-grid-bottom"></span>
  121. </li>
  122. </ul>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <div id="item2mobile" class="mui-slider-item mui-control-content">
  128. <div id="scroll2" class="mui-scroll-wrapper">
  129. <div class="mui-scroll">
  130. <div class="chart" id="barChart"></div>
  131. <div>
  132. <ul class="mui-table-view mui-grid-view mui-grid-9">
  133. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  134. <a href="#">
  135. <span class="size-20" id="week-jsblrate"></span>
  136. <div class="mui-media-body size-14">即时办理率</div>
  137. </a>
  138. </li>
  139. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  140. <a href="#">
  141. <span class="size-20" id="week-wlzbrate"></span>
  142. <div class="mui-media-body size-14">转办率</div>
  143. </a>
  144. </li>
  145. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  146. <a href="#">
  147. <span class="size-20" id="week-zbbjrate"></span>
  148. <div class="mui-media-body size-14">转办办结率</div>
  149. </a>
  150. </li>
  151. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  152. <a href="#">
  153. <span class="size-20" id="week-bjrate"></span>
  154. <div class="mui-media-body size-14">办结率</div>
  155. </a>
  156. </li>
  157. </ul>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <div id="item3mobile" class="mui-slider-item mui-control-content">
  163. <div id="scroll2" class="mui-scroll-wrapper">
  164. <div class="mui-scroll">
  165. <div class="chart" id="Chart">5555</div>
  166. <div>
  167. <ul class="mui-table-view mui-grid-view mui-grid-9">
  168. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  169. <a href="#">
  170. <span class="size-20" id="month-jsblrate"></span>
  171. <div class="mui-media-body size-14">即时办理率</div>
  172. </a>
  173. </li>
  174. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  175. <a href="#">
  176. <span class="size-20" id="month-wlzbrate"></span>
  177. <div class="mui-media-body size-14">转办率</div>
  178. </a>
  179. </li>
  180. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  181. <a href="#">
  182. <span class="size-20" id="month-zbbjrate"></span>
  183. <div class="mui-media-body size-14">转办办结率</div>
  184. </a>
  185. </li>
  186. <li class="mui-table-view-cell mui-media mui-col-xs-6 ">
  187. <a href="#">
  188. <span class="size-20" id="month-bjrate"></span>
  189. <div class="mui-media-body size-14">办结率</div>
  190. </a>
  191. </li>
  192. </ul>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <script src="../js/zepto.js"></script>
  201. <script src="../js/mui.min.js"></script>
  202. <script src="../js/echarts.common.min.js"></script>
  203. <script src="../js/huayi.config.js"></script>
  204. <script type="text/javascript">
  205. mui.init();
  206. window.onload = function() {
  207. mui('.mui-scroll-wrapper').scroll({
  208. deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
  209. });
  210. }
  211. var usercode = localStorage.getItem("user"); //获取本地存储
  212. var goodslist;
  213. var index_=1;
  214. //本周图表
  215. var xAxis = [];
  216. var yAxis = [];
  217. var yAxiss = [];
  218. //本月
  219. var xAxis_math = [];
  220. var yAxis_math = [];
  221. var yAxiss_math = []
  222. mui.plusReady(function() {
  223. var wv = plus.webview.currentWebview();
  224. var index = wv.index;
  225. plus.nativeUI.closeWaiting();
  226. //显示当前页面
  227. mui.currentWebview.show();
  228. //下拉框
  229. $.ajax({
  230. type: "get",
  231. url: huayi.config.callcenter_url + '/APP/GetDicValueList',
  232. async: false,
  233. dataType: 'json',
  234. data: {
  235. usercode: usercode,
  236. },
  237. success: function(data) {
  238. console.log(data.state);
  239. if(data.state == "success") {
  240. goodslist = data.data;
  241. bindseat($(".mui-select"));
  242. }
  243. },
  244. error: function(data) {
  245. console.log(data.message);
  246. }
  247. });
  248. //下拉框
  249. function bindseat(obj) {
  250. obj.empty();
  251. // obj.append('<option value="0" selected="true">所有来源</option>');
  252. $(goodslist).each(function(i, n) {
  253. obj.append('<option value="' + n.F_ValueId + '">' + n.F_Value + '</option>');
  254. })
  255. }
  256. //日期
  257. var dates = new Date();
  258. var time = dates.getFullYear() + "-" + (dates.getMonth() + 1) + '-' + dates.getDate();
  259. $("#demo1").val(time);
  260. //时间选择
  261. var btns = mui('.btn');
  262. btns.each(function(i, btn) {  
  263. btn.addEventListener('tap', function() {   
  264. var dtPicker = new mui.DtPicker({    
  265. type: "date", //设置日历初始视图模式
  266.   
  267. });  
  268. dtPicker.show(function(e) {
  269. $("#demo1").val(e);
  270. AreaL();//日报
  271. AreaLs();//周报
  272. }); 
  273. }, false);
  274. })
  275. AreaL();
  276. $(".mui-select").on('change', function() {
  277. console.log($('.mui-select').val());
  278. AreaL();//日报
  279. AreaLs();//周报
  280. Month();//月报
  281. })
  282. //日报的数据
  283. function AreaL() {
  284. console.log($('.mui-select').val());
  285. $.ajax({
  286. type: "get",
  287. url: huayi.config.callcenter_url + '/app/GetAPPWorkReportSingle',
  288. async: true,
  289. dataType: 'json',
  290. data: {
  291. usercode: usercode,
  292. datetype: index_,
  293. date: $("#demo1").val(),
  294. datatype:index,
  295. dataid: $('.mui-select').val()
  296. },
  297. success: function(data) {
  298. if(data.state == "success") {
  299. var Data = data.data.APPDayWeekMonthReportSingle[0];
  300. // alert(JSON.stringify(Data));
  301. $("#bjrate").text(Data.bjrate)
  302. $("#jsblrate").text(Data.jsblrate);
  303. $("#wlzbrate").text(Data.wlzbrate);
  304. $("#zbbjrate").text(Data.zbbjrate);
  305. var option = {
  306. tooltip: {
  307. formatter: "{b} : {c} ({d}%)"
  308. },
  309. legend: {
  310. orient: 'vertical',
  311. top: 'middle',
  312. x: 'top',
  313. left: 10,
  314. top: 3,
  315. data: ['即时办结', '网络转办', '转办办结']
  316. },
  317. series: [{
  318. type: 'pie',
  319. radius: '55%',
  320. selectedMode: 'single',
  321. center: ['50%', '60%'],
  322. label: {
  323. normal: {
  324. formatter: "{b} : {c} ",
  325. }
  326. },
  327. labelLine: {
  328. normal: {
  329. show: false
  330. }
  331. },
  332. data: [{
  333. value: data.data.APPDayWeekMonthReportSingle[0].jsblcount,
  334. name: '即时办结',
  335. },
  336. {
  337. value: data.data.APPDayWeekMonthReportSingle[0].wlzbcount,
  338. name: '网络转办',
  339. },
  340. {
  341. value: data.data.APPDayWeekMonthReportSingle[0].zbbjcount,
  342. name: '转办办结',
  343. }
  344. ],
  345. }]
  346. };
  347. echartsPie = echarts.init(document.getElementById('pieChart'));
  348. echartsPie.setOption(option);
  349. }
  350. },
  351. error: function(data) {
  352. console.log(data.message);
  353. }
  354. });
  355. }
  356. AreaLs();
  357. Month();
  358. //周报
  359. function AreaLs() {
  360. console.log($('.mui-select').val());
  361. $.ajax({
  362. type: "get",
  363. url: huayi.config.callcenter_url + '/app/GetAPPWorkReportSingle',
  364. async: true,
  365. dataType: 'json',
  366. data: {
  367. usercode: usercode,
  368. datetype: 2,
  369. date: $("#demo1").val(),
  370. datatype:index,
  371. dataid: $('.mui-select').val()
  372. },
  373. success: function(data) {
  374. if(data.state == "success") {
  375. var Data = data.data.APPDayWeekMonthReportSingle[0];
  376. $("#week-bjrate").text(Data.bjrate)
  377. $("#week-jsblrate").text(Data.jsblrate);
  378. $("#week-wlzbrate").text(Data.wlzbrate);
  379. $("#week-zbbjrate").text(Data.zbbjrate);
  380. var option = {
  381. tooltip: {
  382. formatter: "{b} : {c} ({d}%)"
  383. },
  384. legend: {
  385. orient: 'vertical',
  386. top: 'middle',
  387. x: 'left',
  388. left: 5,
  389. top: 5,
  390. data: ['即时办结', '网络转办', '转办办结']
  391. },
  392. series: [{
  393. type: 'pie',
  394. radius: '55%',
  395. selectedMode: 'single',
  396. center: ['50%', '60%'],
  397. label: {
  398. normal: {
  399. formatter: "{a} {b} : {c} ",
  400. }
  401. },
  402. labelLine: {
  403. normal: {
  404. show: false
  405. }
  406. },
  407. data: [{
  408. value: data.data.APPDayWeekMonthReportSingle[0].jsblcount,
  409. name: '即时办结',
  410. },
  411. {
  412. value: data.data.APPDayWeekMonthReportSingle[0].wlzbcount,
  413. name: '网络转办',
  414. },
  415. {
  416. value: data.data.APPDayWeekMonthReportSingle[0].zbbjcount,
  417. name: '转办办结',
  418. }
  419. ],
  420. }]
  421. };
  422. echartsPie = echarts.init(document.getElementById('barChart'));
  423. echartsPie.setOption(option);
  424. }
  425. },
  426. error: function(data) {
  427. console.log(data.message);
  428. }
  429. });
  430. }
  431. //月报
  432. function Month(){
  433. console.log($('.mui-select').val());
  434. $.ajax({
  435. type: "get",
  436. url: huayi.config.callcenter_url + '/app/GetAPPWorkReportSingle',
  437. async: true,
  438. dataType: 'json',
  439. data: {
  440. usercode: usercode,
  441. datetype: 3,
  442. date: $("#demo1").val(),
  443. datatype:index,
  444. dataid: $('.mui-select').val()
  445. },
  446. success: function(data) {
  447. if(data.state == "success") {
  448. var Data = data.data.APPDayWeekMonthReportSingle[0];
  449. $("#month-bjrate").text(Data.bjrate)
  450. $("#month-jsblrate").text(Data.jsblrate);
  451. $("#month-wlzbrate").text(Data.wlzbrate);
  452. $("#month-zbbjrate").text(Data.zbbjrate);
  453. var option = {
  454. tooltip: {
  455. formatter: "{a} <br/>{b} : {c} ({d}%)"
  456. },
  457. legend: {
  458. orient: 'vertical',
  459. x: 'left',
  460. left: 5,
  461. top: 5,
  462. data: ['即时办结', '网络转办', '转办办结']
  463. },
  464. series: [{
  465. type: 'pie',
  466. radius: '55%',
  467. selectedMode: 'single',
  468. center: ['50%', '60%'],
  469. label: {
  470. normal: {
  471. formatter: "{a} {b} : {c} ",
  472. }
  473. },
  474. labelLine: {
  475. normal: {
  476. show: false
  477. }
  478. },
  479. data: [{
  480. value: data.data.APPDayWeekMonthReportSingle[0].jsblcount,
  481. name: '即时办结',
  482. },
  483. {
  484. value: data.data.APPDayWeekMonthReportSingle[0].wlzbcount,
  485. name: '网络转办',
  486. },
  487. {
  488. value: data.data.APPDayWeekMonthReportSingle[0].zbbjcount,
  489. name: '转办办结',
  490. }
  491. ],
  492. }]
  493. };
  494. echartsPie = echarts.init(document.getElementById('Chart'));
  495. echartsPie.setOption(option);
  496. }
  497. },
  498. error: function(data) {
  499. console.log(data.message);
  500. }
  501. });
  502. }
  503. //切换
  504. $(".mui-control-item").on('tap',function(){
  505. var indexs=$(this).attr('index');
  506. index_=indexs;
  507. AreaL();
  508. AreaLs();
  509. Month();
  510. })
  511. //本周
  512. // $.ajax({
  513. // type: "get",
  514. // url: huayi.config.callcenter_url + 'WorkOrder/GetWeekReport',
  515. // async: true,
  516. // dataType: 'json',
  517. // data: {
  518. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  519. // },
  520. // success: function(data) {
  521. // console.log(data.state);
  522. // if(data.state == "success") {
  523. // console.log(data.data[0].unfinish);
  524. // $("#Workfinish").text(data.data[7].finish);
  525. // $("#Workunfinifh").text(data.data[7].unfinish);
  526. // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  527. // for(var i = 0; i < data.data.length; i++) {
  528. // xAxis.push(data.data[i].ID);
  529. //
  530. // yAxis.push(data.data[i].unfinish);
  531. // yAxiss.push(data.data[i].finish)
  532. // }
  533. //
  534. // var option = {
  535. // grid: {
  536. // x: 35,
  537. // x2: 10,
  538. // y: 30,
  539. // y2: 25,
  540. // borderWidth: 0
  541. // },
  542. // toolbox: {
  543. // show: false,
  544. // feature: {
  545. // mark: {
  546. // show: true
  547. // },
  548. // dataView: {
  549. // show: true,
  550. // readOnly: false
  551. // },
  552. // magicType: {
  553. // show: true,
  554. // type: ['line', 'bar']
  555. // },
  556. // restore: {
  557. // show: true
  558. // },
  559. // saveAsImage: {
  560. // show: true
  561. // }
  562. // }
  563. // },
  564. // legend: {
  565. // top: 20,
  566. // data: ['已完成', '未完成', ]
  567. // },
  568. //
  569. // calculable: false,
  570. // xAxis: [{
  571. // axisLabel: {
  572. // interval: 0
  573. // },
  574. //
  575. // splitArea: {
  576. // show: false,
  577. // },
  578. // splitLine: {
  579. // show: false
  580. // }, //去除网格线
  581. // type: 'category',
  582. // data: xAxis
  583. // }],
  584. // yAxis: [{
  585. // show: false,
  586. // splitLine: {
  587. // show: false
  588. // }, //去除网格线
  589. // type: 'value',
  590. // splitArea: {
  591. // show: false,
  592. // }
  593. // }],
  594. // series: [{
  595. // name: '已完成',
  596. // type: 'bar',
  597. // barWidth: 10, //柱图宽度
  598. // itemStyle: {
  599. // normal: {
  600. // label: {
  601. // show: true
  602. // }
  603. // }
  604. // },
  605. // data: yAxis
  606. // }, {
  607. // name: '未完成',
  608. // type: 'bar',
  609. // barWidth: 10, //柱图宽度
  610. // itemStyle: {
  611. // normal: {
  612. // label: {
  613. // show: true
  614. // }
  615. // }
  616. // },
  617. // data: yAxiss
  618. // }]
  619. // };
  620. // echartsPie = echarts.init(document.getElementById('barChart'));
  621. // echartsPie.setOption(option);
  622. // }
  623. //
  624. // },
  625. // error: function(data) {
  626. // console.log(data.message);
  627. // }
  628. // });
  629. //本月
  630. // $.ajax({
  631. // type: "get",
  632. // url: huayi.config.callcenter_url + 'WorkOrder/GetMonthReport',
  633. // async: true,
  634. // dataType: 'json',
  635. // data: {
  636. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  637. // },
  638. // success: function(data) {
  639. // console.log(data.state);
  640. // if(data.state == "success") {
  641. // console.log(data.data[0].unfinish);
  642. // $("#Workfinish").text(data.data[7].finish);
  643. // $("#Workunfinifh").text(data.data[7].unfinish);
  644. // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  645. // for(var i = 0; i < data.data.length; i++) {
  646. // xAxis_math.push(data.data[i].ID);
  647. //
  648. // yAxis_math.push(data.data[i].unfinish);
  649. // yAxiss_math.push(data.data[i].finish)
  650. // }
  651. //
  652. // // var option = {
  653. // // grid: {
  654. // // x: 35,
  655. // // x2: 10,
  656. // // y: 30,
  657. // // y2: 50,
  658. // // borderWidth: 0
  659. // // },
  660. // // toolbox: {
  661. // // show: false,
  662. // // feature: {
  663. // // mark: {
  664. // // show: true
  665. // // },
  666. // // dataView: {
  667. // // show: true,
  668. // // readOnly: false
  669. // // },
  670. // // magicType: {
  671. // // show: true,
  672. // // type: ['line', 'bar']
  673. // // },
  674. // // restore: {
  675. // // show: true
  676. // // },
  677. // // saveAsImage: {
  678. // // show: true
  679. // // }
  680. // // }
  681. // // },
  682. // // legend: {
  683. // //
  684. // // data: ['已完成', '未完成', ]
  685. // // },
  686. // //
  687. // // calculable: false,
  688. // // xAxis: [{
  689. // // axisLabel: {
  690. // // interval: 10
  691. // // },
  692. // // axisLabel: {
  693. // // rotate: 45, //字体倾斜度数
  694. // // interval: 0, //interval 是指间隔多少个类别画栅格,为 0 时则每个数据都画,为 1 时间隔 1 个画,以此类推
  695. // // textStyle: {
  696. // // color: "red", //字体颜色
  697. // // fontSize: 10 //字体大小
  698. // // }
  699. // // },
  700. // // splitArea: {
  701. // // show: false,
  702. // // },
  703. // // splitLine: {
  704. // // show: false
  705. // // }, //去除网格线
  706. // // type: 'category',
  707. // // data:xAxis_math
  708. // // }],
  709. // // yAxis: [{
  710. // // show: false,
  711. // // splitLine: {
  712. // // show: false
  713. // // }, //去除网格线
  714. // // type: 'value',
  715. // // splitArea: {
  716. // // show: false,
  717. // // }
  718. // // }],
  719. // // series: [{
  720. // // name: '已完成',
  721. // // type: 'bar',
  722. // // barWidth: 10, //柱图宽度
  723. // // itemStyle: {
  724. // // normal: {
  725. // // label: {
  726. // // show: true
  727. // // }
  728. // // }
  729. // // },
  730. // // data: yAxis_math,
  731. // //
  732. // // },
  733. // // {
  734. // // name: '未完成',
  735. // // type: 'bar',
  736. // // barWidth: 5, //柱图宽度
  737. // // itemStyle: {
  738. // // normal: {
  739. // // label: {
  740. // // show: true
  741. // // }
  742. // // }
  743. // // },
  744. // // data: yAxiss_math,
  745. // //
  746. // // }
  747. // // ]
  748. // // };
  749. //
  750. // var option = {
  751. // tooltip: {
  752. // trigger: 'axis',
  753. // axisPointer: {
  754. // type: 'shadow'
  755. // }
  756. // },
  757. // legend: {
  758. // data: ['未完成', '已完成']
  759. // },
  760. // grid: {
  761. // left: '3%',
  762. // right: '4%',
  763. // bottom: '3%',
  764. // containLabel: true
  765. // },
  766. // xAxis: {
  767. // type: 'value',
  768. // boundaryGap: [0, 0.01]
  769. // },
  770. // yAxis: {
  771. // type: 'category',
  772. // data: xAxis_math
  773. // },
  774. // series: [{
  775. // name: '未完成',
  776. // type: 'bar',
  777. // barWidth: 10,
  778. // data: yAxis_math
  779. // },
  780. // {
  781. // name: '已完成',
  782. // type: 'bar',
  783. // barWidth: 10,
  784. // data: yAxiss_math
  785. // }
  786. // ]
  787. // };
  788. // echartsPie = echarts.init(document.getElementById('lineChart'));
  789. // echartsPie.setOption(option);
  790. // }
  791. //
  792. // },
  793. // error: function(data) {
  794. // console.log(data.message);
  795. // }
  796. // });
  797. ///全部
  798. // $.ajax({
  799. // type: "get",
  800. // url: huayi.config.callcenter_url + 'WorkOrder/GetTotalReport',
  801. // async: true,
  802. // dataType: 'json',
  803. // data: {
  804. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  805. // },
  806. // success: function(data) {
  807. // console.log(data.state);
  808. // if(data.state == "success") {
  809. // console.log(data.data[0].unfinish);
  810. // $("#finish").text(data.data[0].finish);
  811. // $("#unfinifh").text(data.data[0].unfinish);
  812. // $("#RTotal").text(data.data[0].finish + data.data[0].unfinish);
  813. // var option = {
  814. // tooltip: {
  815. // formatter: "{a} <br/>{b} : {c} ({d}%)"
  816. // },
  817. // legend: {
  818. // orient: 'vertical',
  819. // // top: 'middle',
  820. //
  821. // x: 'left',
  822. // left: 25,
  823. // top: 80,
  824. // data: ['未完成', '已完成']
  825. // },
  826. // series: [{
  827. // type: 'pie',
  828. // radius: '65%',
  829. // center: ['50%', '50%'],
  830. // selectedMode: 'single',
  831. // data: [
  832. //
  833. // {
  834. // value: data.data[0].unfinish,
  835. // name: '未完成',
  836. // label: {
  837. // normal: {
  838. // formatter: "{b}: {c} ({d}%)"
  839. // }
  840. // }
  841. // },
  842. // {
  843. // value: data.data[0].finish,
  844. // name: '已完成',
  845. // label: {
  846. // normal: {
  847. // formatter: "{b}: {c} ({d}%)"
  848. // }
  849. // }
  850. // }
  851. //
  852. // ],
  853. // itemStyle: {
  854. // emphasis: {
  855. // shadowBlur: 10,
  856. // shadowOffsetX: 0,
  857. // shadowColor: 'rgba(0, 0, 0, 0.5)'
  858. // }
  859. // }
  860. // }]
  861. // };
  862. //
  863. // echartsPie = echarts.init(document.getElementById('lineCharts'));
  864. // echartsPie.setOption(option);
  865. // }
  866. //
  867. // },
  868. // error: function(data) {
  869. // console.log(data.message);
  870. // }
  871. // });
  872. //分类
  873. // $.ajax({
  874. // type: "get",
  875. // url: huayi.config.callcenter_url + 'WorkOrder/GetReportByFL',
  876. // async: true,
  877. // dataType: 'json',
  878. // data: {
  879. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  880. // },
  881. // success: function(data) {
  882. // console.log(data.state);
  883. // if(data.state == "success") {
  884. // console.log(data.data[0].unfinish);
  885. // var xAxis_fl = [];
  886. // var yAxis_ = [];
  887. // var yAxiss_ = [];
  888. // // $("#Workfinish").text(data.data[7].finish);
  889. // // $("#Workunfinifh").text(data.data[7].unfinish);
  890. // // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  891. // for(var i = 0; i < data.data.length; i++) {
  892. // xAxis_fl.push(data.data[i].fl);
  893. // yAxis_.push(data.data[i].unfinish);
  894. // yAxiss_.push(data.data[i].finish)
  895. // }
  896. // console.log(yAxis_);
  897. // var option = {
  898. // grid: {
  899. // x: 35,
  900. // x2: 10,
  901. // y: 30,
  902. // y2: 50,
  903. // borderWidth: 0
  904. // },
  905. // toolbox: {
  906. // show: false,
  907. // feature: {
  908. // mark: {
  909. // show: true
  910. // },
  911. // dataView: {
  912. // show: true,
  913. // readOnly: false
  914. // },
  915. // magicType: {
  916. // show: true,
  917. // type: ['line', 'bar']
  918. // },
  919. // restore: {
  920. // show: true
  921. // },
  922. // saveAsImage: {
  923. // show: true
  924. // }
  925. // }
  926. // },
  927. // legend: {
  928. // top: 20,
  929. // data: ['已完成', '未完成', ]
  930. // },
  931. //
  932. // calculable: false,
  933. // xAxis: [{
  934. // axisLabel: {
  935. // interval: 0
  936. // },
  937. // axisLabel: {
  938. // rotate: 40, //字体倾斜度数
  939. // interval: 0, //interval 是指间隔多少个类别画栅格,为 0 时则每个数据都画,为 1 时间隔 1 个画,以此类推
  940. // textStyle: {
  941. // color: "red", //字体颜色
  942. // fontSize: 10 //字体大小
  943. // }
  944. // },
  945. // splitArea: {
  946. // show: false,
  947. // },
  948. // splitLine: {
  949. // show: false
  950. // }, //去除网格线
  951. // type: 'category',
  952. // data: xAxis_fl
  953. // }],
  954. // yAxis: [{
  955. // show: false,
  956. // splitLine: {
  957. // show: false
  958. // }, //去除网格线
  959. // type: 'value',
  960. // splitArea: {
  961. // show: false,
  962. // }
  963. // }],
  964. // series: [{
  965. // name: '已完成',
  966. // type: 'bar',
  967. // barWidth: 10, //柱图宽度
  968. // itemStyle: {
  969. // normal: {
  970. // label: {
  971. // show: true
  972. // }
  973. // }
  974. // },
  975. // data: yAxiss_
  976. // }, {
  977. // name: '未完成',
  978. // type: 'bar',
  979. // barWidth: 10, //柱图宽度
  980. // itemStyle: {
  981. // normal: {
  982. // label: {
  983. // show: true
  984. // }
  985. // }
  986. // },
  987. // data: yAxis_
  988. // }]
  989. // };
  990. // echartsPie = echarts.init(document.getElementById('bar-Chart'));
  991. // echartsPie.setOption(option);
  992. // }
  993. //
  994. // },
  995. // error: function(data) {
  996. // console.log(data.message);
  997. // }
  998. // });
  999. //部门
  1000. // $.ajax({
  1001. // type: "get",
  1002. // url: huayi.config.callcenter_url + 'WorkOrder/GetReportByDept',
  1003. // async: true,
  1004. // dataType: 'json',
  1005. // data: {
  1006. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  1007. // },
  1008. // success: function(data) {
  1009. // console.log(data.state);
  1010. // if(data.state == "success") {
  1011. // console.log(data.data[0].unfinish);
  1012. // var xAxis_fl = [];
  1013. // var yAxis_ = [];
  1014. // var yAxiss_ = [];
  1015. // // $("#Workfinish").text(data.data[7].finish);
  1016. // // $("#Workunfinifh").text(data.data[7].unfinish);
  1017. // // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  1018. // for(var i = 0; i < data.data.length; i++) {
  1019. // xAxis_fl.push(data.data[i].dept);
  1020. // yAxis_.push(data.data[i].unfinish);
  1021. // yAxiss_.push(data.data[i].finish)
  1022. // }
  1023. //
  1024. // var option = {
  1025. // grid: {
  1026. // x: 35,
  1027. // x2: 10,
  1028. // y: 30,
  1029. // y2: 50,
  1030. // borderWidth: 0
  1031. // },
  1032. // toolbox: {
  1033. // show: false,
  1034. // feature: {
  1035. // mark: {
  1036. // show: true
  1037. // },
  1038. // dataView: {
  1039. // show: true,
  1040. // readOnly: false
  1041. // },
  1042. // magicType: {
  1043. // show: true,
  1044. // type: ['line', 'bar']
  1045. // },
  1046. // restore: {
  1047. // show: true
  1048. // },
  1049. // saveAsImage: {
  1050. // show: true
  1051. // }
  1052. // }
  1053. // },
  1054. // legend: {
  1055. // top: 20,
  1056. // data: ['已完成', '未完成', ]
  1057. // },
  1058. //
  1059. // calculable: false,
  1060. // xAxis: [{
  1061. // axisLabel: {
  1062. // interval: 0
  1063. // },
  1064. // axisLabel: {
  1065. // rotate: 40, //字体倾斜度数
  1066. // interval: 0, //interval 是指间隔多少个类别画栅格,为 0 时则每个数据都画,为 1 时间隔 1 个画,以此类推
  1067. // textStyle: {
  1068. // color: "red", //字体颜色
  1069. // fontSize: 10 //字体大小
  1070. // }
  1071. // },
  1072. // splitArea: {
  1073. // show: false,
  1074. // },
  1075. // splitLine: {
  1076. // show: false
  1077. // }, //去除网格线
  1078. // type: 'category',
  1079. // data: xAxis_fl
  1080. // }],
  1081. // yAxis: [{
  1082. // show: false,
  1083. // splitLine: {
  1084. // show: false
  1085. // }, //去除网格线
  1086. // type: 'value',
  1087. // splitArea: {
  1088. // show: false,
  1089. // }
  1090. // }],
  1091. // series: [{
  1092. // name: '已完成',
  1093. // type: 'bar',
  1094. // barWidth: 10, //柱图宽度
  1095. // itemStyle: {
  1096. // normal: {
  1097. // label: {
  1098. // show: true
  1099. // }
  1100. // }
  1101. // },
  1102. // data: yAxis_
  1103. // }, {
  1104. // name: '未完成',
  1105. // type: 'bar',
  1106. // barWidth: 10, //柱图宽度
  1107. // itemStyle: {
  1108. // normal: {
  1109. // label: {
  1110. // show: true
  1111. // }
  1112. // }
  1113. // },
  1114. // data: yAxiss_
  1115. // }]
  1116. // };
  1117. // echartsPie = echarts.init(document.getElementById('bar-Chart2'));
  1118. // echartsPie.setOption(option);
  1119. // }
  1120. //
  1121. // },
  1122. // error: function(data) {
  1123. // console.log(data.message);
  1124. // }
  1125. // });
  1126. //获取区域
  1127. });
  1128. </script>
  1129. </body>
  1130. </html>