虞城12345_前端

Transa-Census.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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. <link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
  9. <style>
  10. .mui-control-content {
  11. background-color: white;
  12. min-height: 215px;
  13. }
  14. .mui-control-content .mui-loading {
  15. margin-top: 50px;
  16. }
  17. .chart {
  18. height: 260px;
  19. margin: 0px;
  20. padding: 0px;
  21. }
  22. .mui-slider .mui-slider-group {
  23. height: 500px;
  24. }
  25. #CS {
  26. position: absolute;
  27. right: 0;
  28. height: 100%;
  29. padding: 0;
  30. padding-left: 5px;
  31. border: none;
  32. z-index: 30;
  33. width: 100%;
  34. }
  35. .mui-scroll {
  36. height: 100%;
  37. }
  38. #lineChart {
  39. position: absolute;
  40. top: 0;
  41. right: 0;
  42. bottom: 0;
  43. left: 0;
  44. padding: 10px;
  45. -webkit-box-sizing: border-box;
  46. box-sizing: border-box;
  47. }
  48. .mui-grid-bottom {
  49. height: 2px;
  50. background-color: #57cebf;
  51. display: block;
  52. width: 20px;
  53. margin: 0 auto;
  54. }
  55. </style>
  56. </head>
  57. <body>
  58. <header class="mui-bar mui-bar-nav">
  59. <h1 id="title" class="mui-title">职能单位已办理统计报表</h1>
  60. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  61. </header>
  62. <div class="mui-content ">
  63. <form id='login-form' class="mui-input-group">
  64. <!--logo-->
  65. <div class="mui-input-row">
  66. <label>职能单位:</label>
  67. <select name="" class="mui-select">
  68. </select>
  69. </div>
  70. <div class="mui-input-row mui-password">
  71. <label>开始时间:</label>
  72. <!--<input id='password' type="datetime-local" class=" mui-input" >-->
  73. <input id='demo1' data-options='{}' type="text" class="mui-input-clear btns contact" />
  74. </div>
  75. <div class="mui-input-row mui-password">
  76. <label>结束时间:</label>
  77. <!--<input id='password' type="datetime-local" class=" mui-input" >-->
  78. <input id='demo2' data-options='{}' type="text" class="mui-input-clear btn contact" />
  79. </div>
  80. </form>
  81. <div id="slider" class="mui-slider" >
  82. <div class="mui-slider-group">
  83. <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
  84. <div id="scroll1" class="mui-scroll-wrapper">
  85. <div class="mui-scroll" style="margin-top: 20px;">
  86. <div class="chart" id="pieChart"></div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script src="../js/zepto.js"></script>
  94. <script src="../js/mui.min.js"></script>
  95. <script src="../js/echarts-all.js"></script>
  96. <script src="../js/huayi.config.js"></script>
  97. <script src="../js/mui.picker.min.js"></script>
  98. <script type="text/javascript">
  99. mui.init();
  100. window.onload = function() {
  101. mui('.mui-scroll-wrapper').scroll({
  102. deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
  103. });
  104. }
  105. var goodslist;
  106. //本月
  107. mui.plusReady(function() {
  108. var wv = plus.webview.currentWebview();
  109. var index = wv.index;
  110. console.log(index);
  111. plus.nativeUI.closeWaiting();
  112. //显示当前页面
  113. mui.currentWebview.show();
  114. //下拉框
  115. $.ajax({
  116. type: "get",
  117. url: huayi.config.callcenter_url + '/APP/GetDeptList',
  118. async: false,
  119. dataType: 'json',
  120. data: {
  121. usercode: 8000,
  122. },
  123. success: function(data) {
  124. console.log(data.state);
  125. if(data.state == "success") {
  126. goodslist = data.data;
  127. bindseat($(".mui-select"));
  128. }
  129. },
  130. error: function(data) {
  131. console.log(data.message);
  132. }
  133. });
  134. //下拉框
  135. function bindseat(obj) {
  136. obj.empty();
  137. obj.append('<option value="" selected="true">所有单位</option>');
  138. $(goodslist).each(function(i, n) {
  139. obj.append('<option value="' + n.F_DeptId + '">' + n.F_DeptName + '</option>');
  140. })
  141. }
  142. //日期
  143. var dates = new Date();
  144. var time = dates.getFullYear() + "-" + (dates.getMonth() + 1) + '-' + dates.getDate();
  145. $("#demo1").val(time);
  146. //下拉框
  147. $(".mui-select").on('change', function() {
  148. console.log($('.mui-select').val());
  149. Usercode();
  150. })
  151. Usercode();
  152. //时间选择
  153. var btns = mui('.btns');
  154. btns.each(function(i, btn) {  
  155. btn.addEventListener('tap', function() {   
  156. var dtPicker = new mui.DtPicker({    
  157. type: "date", //设置日历初始视图模式
  158.   
  159. });  
  160. dtPicker.show(function(e) {
  161. $("#demo1").val(e);
  162. Usercode();
  163. }); 
  164. }, false);
  165. })
  166. var btn = mui('.btn');
  167. btn.each(function(i, btn) {  
  168. btn.addEventListener('tap', function() {   
  169. var dtPicker = new mui.DtPicker({    
  170. type: "date", //设置日历初始视图模式
  171.   
  172. });  
  173. dtPicker.show(function(e) {
  174. $("#demo2").val(e);
  175. Usercode();
  176. }); 
  177. }, false);
  178. })
  179. //本周
  180. function Usercode(){
  181. $.ajax({
  182. type: "get",
  183. url: huayi.config.callcenter_url + '/APP/GetAPPDeptDealReport',
  184. async: true,
  185. dataType: 'json',
  186. data: {
  187. usercode: 8000,
  188. sdate:$("#demo1").val(),
  189. edate: $("#demo2").val(),
  190. id:$('.mui-select').val()
  191. },
  192. success: function(data) {
  193. console.log(data.state);
  194. if(data.state == "success") {
  195. var xAxis = [];
  196. var yAxis_1 = [];
  197. var yAxis_2 = [];
  198. var yAxis_3 = [];
  199. var yAxis_4 = [];
  200. var yAxis_5 = [];
  201. var yAxis_6 = [];
  202. // console.log(data.data.APPSeatReport[0].djblcount);
  203. var a=0,b=0,c=0,d=0,e=0;f=0;
  204. if(data.data.APPDeptDealReport.length>1){
  205. xAxis.push('所有单位');
  206. }else{
  207. xAxis.push(data.data.APPDeptDealReport[0].deptname);
  208. }
  209. for(var i = 0; i < data.data.APPDeptDealReport.length; i++) {
  210. a+=data.data.APPDeptDealReport[i].blcount;
  211. b+=data.data.APPDeptDealReport[i].hfcount;
  212. c+=data.data.APPDeptDealReport[i].mycount;
  213. d+=data.data.APPDeptDealReport[i].bmycount;
  214. // e+=data.data.APPDeptDealReport[i].yqblzcount;
  215. // f+=data.data.APPDeptDealReport[i].ysshcount;
  216. }
  217. yAxis_1.push(a);
  218. yAxis_2.push(b);
  219. yAxis_3.push(c);
  220. yAxis_4.push(d);
  221. // yAxis_5.push(e);
  222. // yAxis_6.push(f);
  223. var option = {
  224. grid: {
  225. x: '3%',
  226. x2: '3%',
  227. y: '25%',
  228. y2: 25,
  229. borderWidth: 0
  230. },
  231. toolbox: {
  232. show: false,
  233. feature: {
  234. mark: {
  235. show: true
  236. },
  237. dataView: {
  238. show: true,
  239. readOnly: false
  240. },
  241. magicType: {
  242. show: true,
  243. type: ['line']
  244. },
  245. restore: {
  246. show: true
  247. },
  248. saveAsImage: {
  249. show: true
  250. }
  251. }
  252. },
  253. legend: {
  254. top: 0,
  255. data: ['办理工单量','已回访', '回访满意量','回访不满意量' ]
  256. },
  257. calculable: false,
  258. xAxis: [{
  259. axisLabel: {
  260. interval: 0
  261. },
  262. splitArea: {
  263. show: false,
  264. },
  265. splitLine: {
  266. show: false
  267. }, //去除网格线
  268. type: 'category',
  269. data: xAxis
  270. }],
  271. yAxis: [{
  272. show: false,
  273. splitLine: {
  274. show: false
  275. }, //去除网格线
  276. type: 'value',
  277. splitArea: {
  278. show: false,
  279. }
  280. }],
  281. series: [{
  282. name: '办理工单量',
  283. type: 'bar',
  284. barWidth: 20, //柱图宽度
  285. itemStyle: {
  286. normal: {
  287. label: {
  288. show: true
  289. }
  290. }
  291. },
  292. data: yAxis_1
  293. }, {
  294. name: '已回访',
  295. type: 'bar',
  296. barWidth: 20, //柱图宽度
  297. itemStyle: {
  298. normal: {
  299. label: {
  300. show: true
  301. }
  302. }
  303. },
  304. data: yAxis_2
  305. }, {
  306. name: '回访满意量',
  307. type: 'bar',
  308. barWidth: 20, //柱图宽度
  309. itemStyle: {
  310. normal: {
  311. label: {
  312. show: true
  313. }
  314. }
  315. },
  316. data: yAxis_3
  317. }, {
  318. name: '回访不满意量',
  319. type: 'bar',
  320. barWidth: 20, //柱图宽度
  321. itemStyle: {
  322. normal: {
  323. label: {
  324. show: true
  325. }
  326. }
  327. },
  328. data: yAxis_4
  329. }]
  330. };
  331. echartsPie = echarts.init(document.getElementById('pieChart'));
  332. echartsPie.clear();
  333. echartsPie.setOption(option,true);
  334. }
  335. },
  336. error: function(data) {
  337. console.log(data.message);
  338. }
  339. });
  340. }
  341. //本月
  342. //部门
  343. // $.ajax({
  344. // type: "get",
  345. // url: huayi.config.callcenter_url + 'WorkOrder/GetReportByDept',
  346. // async: true,
  347. // dataType: 'json',
  348. // data: {
  349. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  350. // },
  351. // success: function(data) {
  352. // console.log(data.state);
  353. // if(data.state == "success") {
  354. // console.log(data.data[0].unfinish);
  355. // var xAxis_fl = [];
  356. // var yAxis_ = [];
  357. // var yAxiss_ = [];
  358. // // $("#Workfinish").text(data.data[7].finish);
  359. // // $("#Workunfinifh").text(data.data[7].unfinish);
  360. // // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  361. // for(var i = 0; i < data.data.length; i++) {
  362. // xAxis_fl.push(data.data[i].dept);
  363. // yAxis_.push(data.data[i].unfinish);
  364. // yAxiss_.push(data.data[i].finish)
  365. // }
  366. //
  367. // var option = {
  368. // grid: {
  369. // x: 35,
  370. // x2: 10,
  371. // y: 30,
  372. // y2: 50,
  373. // borderWidth: 0
  374. // },
  375. // toolbox: {
  376. // show: false,
  377. // feature: {
  378. // mark: {
  379. // show: true
  380. // },
  381. // dataView: {
  382. // show: true,
  383. // readOnly: false
  384. // },
  385. // magicType: {
  386. // show: true,
  387. // type: ['line', 'bar']
  388. // },
  389. // restore: {
  390. // show: true
  391. // },
  392. // saveAsImage: {
  393. // show: true
  394. // }
  395. // }
  396. // },
  397. // legend: {
  398. // top: 20,
  399. // data: ['已完成', '未完成', ]
  400. // },
  401. //
  402. // calculable: false,
  403. // xAxis: [{
  404. // axisLabel: {
  405. // interval: 0
  406. // },
  407. // axisLabel: {
  408. // rotate: 40, //字体倾斜度数
  409. // interval: 0, //interval 是指间隔多少个类别画栅格,为 0 时则每个数据都画,为 1 时间隔 1 个画,以此类推
  410. // textStyle: {
  411. // color: "red", //字体颜色
  412. // fontSize: 10 //字体大小
  413. // }
  414. // },
  415. // splitArea: {
  416. // show: false,
  417. // },
  418. // splitLine: {
  419. // show: false
  420. // }, //去除网格线
  421. // type: 'category',
  422. // data: xAxis_fl
  423. // }],
  424. // yAxis: [{
  425. // show: false,
  426. // splitLine: {
  427. // show: false
  428. // }, //去除网格线
  429. // type: 'value',
  430. // splitArea: {
  431. // show: false,
  432. // }
  433. // }],
  434. // series: [{
  435. // name: '已完成',
  436. // type: 'bar',
  437. // barWidth: 10, //柱图宽度
  438. // itemStyle: {
  439. // normal: {
  440. // label: {
  441. // show: true
  442. // }
  443. // }
  444. // },
  445. // data: yAxis_
  446. // }, {
  447. // name: '未完成',
  448. // type: 'bar',
  449. // barWidth: 10, //柱图宽度
  450. // itemStyle: {
  451. // normal: {
  452. // label: {
  453. // show: true
  454. // }
  455. // }
  456. // },
  457. // data: yAxiss_
  458. // }]
  459. // };
  460. // echartsPie = echarts.init(document.getElementById('bar-Chart2'));
  461. // echartsPie.setOption(option);
  462. // }
  463. //
  464. // },
  465. // error: function(data) {
  466. // console.log(data.message);
  467. // }
  468. // });
  469. //获取区域
  470. });
  471. </script>
  472. </body>
  473. </html>