夏邑12345_前端

UnitNsign-Census.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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. 策划
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <script src="../js/zepto.js"></script>
  97. <script src="../js/mui.min.js"></script>
  98. <script src="../js/echarts-all.js"></script>
  99. <script src="../js/huayi.config.js"></script>
  100. <script src="../js/mui.picker.min.js"></script>
  101. <script type="text/javascript">
  102. mui.init();
  103. window.onload = function() {
  104. mui('.mui-scroll-wrapper').scroll({
  105. deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
  106. });
  107. }
  108. var goodslist;
  109. //本月
  110. mui.plusReady(function() {
  111. var wv = plus.webview.currentWebview();
  112. var index = wv.index;
  113. console.log(index);
  114. plus.nativeUI.closeWaiting();
  115. //显示当前页面
  116. mui.currentWebview.show();
  117. //下拉框
  118. $.ajax({
  119. type: "get",
  120. url: huayi.config.callcenter_url + '/APP/GetDeptList',
  121. async: false,
  122. dataType: 'json',
  123. data: {
  124. usercode: 8000,
  125. },
  126. success: function(data) {
  127. console.log(data.state);
  128. if(data.state == "success") {
  129. goodslist = data.data;
  130. bindseat($(".mui-select"));
  131. }
  132. },
  133. error: function(data) {
  134. console.log(data.message);
  135. }
  136. });
  137. //下拉框
  138. function bindseat(obj) {
  139. obj.empty();
  140. obj.append('<option value="" selected="true">所有单位</option>');
  141. $(goodslist).each(function(i, n) {
  142. obj.append('<option value="' + n.F_DeptId + '">' + n.F_DeptName + '</option>');
  143. })
  144. }
  145. //日期
  146. var dates = new Date();
  147. var time = dates.getFullYear() + "-" + (dates.getMonth() + 1) + '-' + dates.getDate();
  148. $("#demo1").val(time);
  149. //下拉框
  150. $(".mui-select").on('change', function() {
  151. console.log($('.mui-select').val());
  152. Usercode();
  153. })
  154. Usercode();
  155. //时间选择
  156. var btns = mui('.btns');
  157. btns.each(function(i, btn) {  
  158. btn.addEventListener('tap', function() {   
  159. var dtPicker = new mui.DtPicker({    
  160. type: "date", //设置日历初始视图模式
  161.   
  162. });  
  163. dtPicker.show(function(e) {
  164. $("#demo1").val(e);
  165. Usercode();
  166. }); 
  167. }, false);
  168. })
  169. var btn = mui('.btn');
  170. btn.each(function(i, btn) {  
  171. btn.addEventListener('tap', function() {   
  172. var dtPicker = new mui.DtPicker({    
  173. type: "date", //设置日历初始视图模式
  174.   
  175. });  
  176. dtPicker.show(function(e) {
  177. $("#demo2").val(e);
  178. Usercode();
  179. }); 
  180. }, false);
  181. })
  182. //本周
  183. function Usercode(){
  184. $.ajax({
  185. type: "get",
  186. url: huayi.config.callcenter_url + '/APP/GetAPPDeptNoSureReport',
  187. async: true,
  188. dataType: 'json',
  189. data: {
  190. usercode: 8000,
  191. sdate:$("#demo1").val(),
  192. edate: $("#demo2").val(),
  193. id:$('.mui-select').val()
  194. },
  195. success: function(data) {
  196. console.log(data.state);
  197. if(data.state == "success") {
  198. var xAxis = [];
  199. var yAxis_1 = [];
  200. var yAxis_2 = [];
  201. var yAxis_3 = [];
  202. var yAxis_4 = [];
  203. var yAxis_5 = [];
  204. // console.log(data.data.APPSeatReport[0].djblcount);
  205. var a=0,b=0,c=0,d=0,e=0;
  206. if(data.data.APPDeptNoSureReport.length>1){
  207. xAxis.push('所有单位');
  208. }else{
  209. xAxis.push(data.data.APPDeptNoSureReport[0].deptname);
  210. }
  211. for(var i = 0; i < data.data.APPDeptNoSureReport.length; i++) {
  212. a+=data.data.APPDeptNoSureReport[i].jscount;
  213. b+=data.data.APPDeptNoSureReport[i].xqwqscount;
  214. c+=data.data.APPDeptNoSureReport[i].yqwqscount;
  215. d+=data.data.APPDeptNoSureReport[i].xqwqsrate;
  216. e+=data.data.APPDeptNoSureReport[i].yqwqsrate;
  217. }
  218. yAxis_1.push(a);
  219. yAxis_2.push(b);
  220. yAxis_3.push(c);
  221. yAxis_4.push(d);
  222. yAxis_5.push(e);
  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. itemStyle: {
  309. normal: {
  310. label: {
  311. show: true
  312. }
  313. }
  314. },
  315. data: yAxis_3
  316. }, {
  317. name: '当月未签收率',
  318. type: 'bar',
  319. itemStyle: {
  320. normal: {
  321. label: {
  322. show: true
  323. }
  324. }
  325. },
  326. data: yAxis_4
  327. }, {
  328. name: '当月逾期签收率',
  329. type: 'bar',
  330. itemStyle: {
  331. normal: {
  332. label: {
  333. show: true
  334. }
  335. }
  336. },
  337. data: yAxis_5
  338. }]
  339. };
  340. echartsPie = echarts.init(document.getElementById('pieChart'));
  341. echartsPie.clear();
  342. echartsPie.setOption(option,true);
  343. }
  344. },
  345. error: function(data) {
  346. console.log(data.message);
  347. }
  348. });
  349. }
  350. //本月
  351. //部门
  352. // $.ajax({
  353. // type: "get",
  354. // url: huayi.config.callcenter_url + 'WorkOrder/GetReportByDept',
  355. // async: true,
  356. // dataType: 'json',
  357. // data: {
  358. // openid: 'oKOqcv31fh76rtNmJDjKc39oIsfA'
  359. // },
  360. // success: function(data) {
  361. // console.log(data.state);
  362. // if(data.state == "success") {
  363. // console.log(data.data[0].unfinish);
  364. // var xAxis_fl = [];
  365. // var yAxis_ = [];
  366. // var yAxiss_ = [];
  367. // // $("#Workfinish").text(data.data[7].finish);
  368. // // $("#Workunfinifh").text(data.data[7].unfinish);
  369. // // $("#WorkTotal").text(data.data[7].finish + data.data[0].unfinish);
  370. // for(var i = 0; i < data.data.length; i++) {
  371. // xAxis_fl.push(data.data[i].dept);
  372. // yAxis_.push(data.data[i].unfinish);
  373. // yAxiss_.push(data.data[i].finish)
  374. // }
  375. //
  376. // var option = {
  377. // grid: {
  378. // x: 35,
  379. // x2: 10,
  380. // y: 30,
  381. // y2: 50,
  382. // borderWidth: 0
  383. // },
  384. // toolbox: {
  385. // show: false,
  386. // feature: {
  387. // mark: {
  388. // show: true
  389. // },
  390. // dataView: {
  391. // show: true,
  392. // readOnly: false
  393. // },
  394. // magicType: {
  395. // show: true,
  396. // type: ['line', 'bar']
  397. // },
  398. // restore: {
  399. // show: true
  400. // },
  401. // saveAsImage: {
  402. // show: true
  403. // }
  404. // }
  405. // },
  406. // legend: {
  407. // top: 20,
  408. // data: ['已完成', '未完成', ]
  409. // },
  410. //
  411. // calculable: false,
  412. // xAxis: [{
  413. // axisLabel: {
  414. // interval: 0
  415. // },
  416. // axisLabel: {
  417. // rotate: 40, //字体倾斜度数
  418. // interval: 0, //interval 是指间隔多少个类别画栅格,为 0 时则每个数据都画,为 1 时间隔 1 个画,以此类推
  419. // textStyle: {
  420. // color: "red", //字体颜色
  421. // fontSize: 10 //字体大小
  422. // }
  423. // },
  424. // splitArea: {
  425. // show: false,
  426. // },
  427. // splitLine: {
  428. // show: false
  429. // }, //去除网格线
  430. // type: 'category',
  431. // data: xAxis_fl
  432. // }],
  433. // yAxis: [{
  434. // show: false,
  435. // splitLine: {
  436. // show: false
  437. // }, //去除网格线
  438. // type: 'value',
  439. // splitArea: {
  440. // show: false,
  441. // }
  442. // }],
  443. // series: [{
  444. // name: '已完成',
  445. // type: 'bar',
  446. // barWidth: 10, //柱图宽度
  447. // itemStyle: {
  448. // normal: {
  449. // label: {
  450. // show: true
  451. // }
  452. // }
  453. // },
  454. // data: yAxis_
  455. // }, {
  456. // name: '未完成',
  457. // type: 'bar',
  458. // barWidth: 10, //柱图宽度
  459. // itemStyle: {
  460. // normal: {
  461. // label: {
  462. // show: true
  463. // }
  464. // }
  465. // },
  466. // data: yAxiss_
  467. // }]
  468. // };
  469. // echartsPie = echarts.init(document.getElementById('bar-Chart2'));
  470. // echartsPie.setOption(option);
  471. // }
  472. //
  473. // },
  474. // error: function(data) {
  475. // console.log(data.message);
  476. // }
  477. // });
  478. //获取区域
  479. });
  480. </script>
  481. </body>
  482. </html>