暫無描述

assessmentDataStatistics.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>数据统计</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  10. <link href="../css/init.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  12. <script src="../js/laydate/laydate.js"></script>
  13. <script src="../js/zTree/jquery.ztree.core.js"></script>
  14. <style>
  15. table td {
  16. word-break: break-all;
  17. word-wrap: break-word;
  18. }
  19. .Shows {
  20. display: block !important;
  21. }
  22. .complain {
  23. display: none;
  24. }
  25. .toolLeft input {
  26. width: 200px;
  27. }
  28. th {
  29. padding: 5px;
  30. text-align: center;
  31. }
  32. td {
  33. padding: 5px;
  34. }
  35. .Borders {
  36. border: 1px solid #d7d7d7;
  37. }
  38. .daoHang {
  39. margin-bottom: 15px;
  40. }
  41. /*树形下拉样式开始*/
  42. .inpBox {
  43. border: 1px solid #e5e6e7;
  44. height: 32px;
  45. width: 200px;
  46. display: inline-block;
  47. position: relative;
  48. vertical-align: middle;
  49. }
  50. .inpBox .inps1 {
  51. width: 100%;
  52. height: 30px;
  53. outline: none;
  54. border: 0;
  55. border-image-width: 0;
  56. padding: 0;
  57. padding-left: 3px;
  58. }
  59. .xl_two {
  60. display: inline-block;
  61. background: url(../img/dropDown.png) no-repeat;
  62. height: 100%;
  63. background-position: center center;
  64. width: 20px;
  65. position: absolute;
  66. right: 0;
  67. top: 0px;
  68. background-color: #f7bc8b;
  69. cursor: pointer;
  70. }
  71. .xl_two:hover {
  72. background-color: #e6d523;
  73. }
  74. .xlAdd_two {
  75. background: #fff;
  76. position: absolute;
  77. width: 100%;
  78. border: 1px solid darkgrey;
  79. right: 0;
  80. top: 30px;
  81. display: none;
  82. height: 350px;
  83. overflow-y: auto;
  84. z-index: 10;
  85. text-align: center;
  86. }
  87. .xlAdd_two .list li:hover {
  88. background: #ebebeb;
  89. color: #717171;
  90. }
  91. /*树形下拉样式结束*/
  92. .Content_box .title {
  93. font-size: 24px;
  94. text-align: center;
  95. }
  96. .Content_box h5 {
  97. font-size: 16px;
  98. text-align: center;
  99. }
  100. .select {
  101. width: 200px;
  102. height: 32px;
  103. border: 1px solid rgb(229, 230, 231);
  104. }
  105. .footerDataStatistics {
  106. /* padding: 0 0 0 20px; */
  107. margin: 10px 0 0 10px;
  108. font-size: 18px;
  109. }
  110. .tables .th-inner {
  111. white-space: normal !important;
  112. }
  113. </style>
  114. </head>
  115. <body class="gray-bg">
  116. <div class="wrapper wrapper-content animated fadeInRight">
  117. <div class="daoHang clearfix">
  118. <div class="dhLeft">
  119. <sapn>
  120. <i class="syIcon"></i>位置:
  121. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  122. <a href="javaScript:;">报表管理</a>&gt;
  123. <a href="" class="nowPosition">考核报表数据统计</a>
  124. </sapn>
  125. </div>
  126. <div class="dhRight">
  127. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  128. </div>
  129. </div>
  130. <div class="Content_box">
  131. <div class="complain Shows">
  132. <div class="toolBar clearfix">
  133. <div class="toolLeft">
  134. 开始日期:
  135. <input class="photo x-color inputs laydate-icon" type="text" id="squeryTime" autocomplete="off" />
  136. 结束时间:
  137. <input class="photo x-color inputs laydate-icon" type="text" id="equeryTime" autocomplete="off" />
  138. 部门:
  139. <div class="inpBox">
  140. <input class="inps inps1">
  141. <input type="hidden" id="deptid" />
  142. <i class="xl xl_two"></i>
  143. <div class="addTree xlAdd_two">
  144. <ul id="deptTree" class="ztree"></ul>
  145. </div>
  146. </div>
  147. 来源:
  148. <select class="select" id="source"></select>
  149. <button class="btns search_1">查询</button>
  150. <a class="btns" id="exportPublicSentiments">导出</a>
  151. </div>
  152. </div>
  153. <div class="title" id="titleText">12345联动服务工作考核数据表</div>
  154. <div class="title">统计周期:<span class="statisticalPeriod"></span></div>
  155. <h5>一、县(市、区)联动单位</h5>
  156. <div style="width: 100%;padding: 10px;">
  157. <table id="workorderlist_1" class="tables" data-row-style="rowStyle" data-query-params="queryParams">
  158. </table>
  159. </div>
  160. <h5>二、市直机关联动单位一组</h5>
  161. <div style="width: 100%;padding: 10px;">
  162. <table id="workorderlist_2" class="tables" data-row-style="rowStyle" data-query-params="queryParams">
  163. </table>
  164. </div>
  165. <h5>三、市直机关联动单位二组</h5>
  166. <div style="width: 100%;padding: 10px;">
  167. <table id="workorderlist_3" class="tables" data-row-style="rowStyle" data-query-params="queryParams">
  168. </table>
  169. </div>
  170. <h5>四、公共事业企业联动单位</h5>
  171. <div style="width: 100%;padding: 10px;">
  172. <table id="workorderlist_4" class="tables" data-row-style="rowStyle" data-query-params="queryParams">
  173. </table>
  174. </div>
  175. <h5>总计</h5>
  176. <div style="width: 100%;padding: 10px;">
  177. <table id="workorderlist_5" class="tables" data-row-style="rowStyle" data-query-params="queryParams">
  178. </table>
  179. </div>
  180. <div class="footerDataStatistics">统计时段:00:00—23:59:59</div>
  181. </div>
  182. </div>
  183. </div>
  184. <script>
  185. var tableColumns = [
  186. { title: '序号', align: 'center',
  187. formatter: function(value, row, index) {
  188. return index+1
  189. }
  190. },
  191. { field: 'deptname', title: '联动单位', align: 'center'
  192. },
  193. { field: 'Undertakers', title: '承办件', align: 'center',
  194. formatter: function(value, row, index) {
  195. return handleOrderList(value, row, 0);
  196. }
  197. },
  198. { field: 'Undertakersrate', title: '承办率', align: 'center'},
  199. { field: 'Undertakersscore', title: '得分(5分)', align: 'center'},
  200. { field: 'signfor', title: '及时签收件', align: 'center',
  201. formatter: function(value, row, index) {
  202. return handleOrderList(value, row, 1);
  203. }
  204. },
  205. { field: 'oversignfor', title: '超时签收件 ', align: 'center',
  206. formatter: function(value, row, index) {
  207. return handleOrderList(value, row, 2);
  208. }
  209. },
  210. { field: 'signforrate', title: '及时签收率', align: 'center'},
  211. { field: 'signforscore', title: '得分(5分)', align: 'center'},
  212. { field: 'overdue', title: '按时反馈件', align: 'center',
  213. formatter: function(value, row, index) {
  214. return handleOrderList(value, row, 3);
  215. }
  216. },
  217. { field: 'overfeedback', title: '超时反馈件', align: 'center',
  218. formatter: function(value, row, index) {
  219. return handleOrderList(value, row, 4);
  220. }
  221. },
  222. { field: 'overduerate', title: '按时反馈率', align: 'center'},
  223. { field: 'overduescore', title: '得分(15分)', align: 'center'},
  224. { field: 'conclude', title: '办结件', align: 'center',
  225. formatter: function(value, row, index) {
  226. return handleOrderList(value, row, 5);
  227. }
  228. },
  229. { field: 'noconclude', title: '未办结件', align: 'center',
  230. formatter: function(value, row, index) {
  231. return handleOrderList(value, row, 6);
  232. }
  233. },
  234. { field: 'unsuccessfulrate', title: '办结率', align: 'center'},
  235. { field: 'unsuccessfulscore', title: '办结得分(10分)', align: 'center'},
  236. { field: 'one', title: '一次办结件', align: 'center',
  237. formatter: function(value, row, index) {
  238. return handleOrderList(value, row, 7);
  239. }
  240. },
  241. { field: 'noone', title: '非一次办结件', align: 'center',
  242. formatter: function(value, row, index) {
  243. return handleOrderList(value, row, 8);
  244. }
  245. },
  246. { field: 'onerate', title: '一次办结率', align: 'center'},
  247. { field: 'onescore', title: '得分(15分)', align: 'center'},
  248. { field: 'noexamine', title: '不计入考核件', align: 'center',
  249. formatter: function(value, row, index) {
  250. return handleOrderList(value, row, 9);
  251. }
  252. },
  253. { field: 'review', title: '评议件', align: 'center',
  254. formatter: function(value, row, index) {
  255. return handleOrderList(value, row, 10);
  256. }
  257. },
  258. { field: 'satisfied', title: '满意件', align: 'center',
  259. formatter: function(value, row, index) {
  260. return handleOrderList(value, row, 11);
  261. }
  262. },
  263. { field: 'nosatisfied', title: '不满意件', align: 'center',
  264. formatter: function(value, row, index) {
  265. return handleOrderList(value, row, 12);
  266. }
  267. },
  268. { field: 'satisfiedrates', title: '满意率', align: 'center'},
  269. { field: 'satisfiedscore', title: '得分(50分)', align: 'center'},
  270. { field: 'total', title: '总分', align: 'center'},
  271. { title: '排名', align: 'center',
  272. formatter: function(value, row, index) {
  273. return index+1
  274. }
  275. },
  276. ]
  277. var exportParams = {}
  278. var treeInputParam = {
  279. classInps:'.inps',
  280. classId:'#deptid',
  281. treeApi:'Department/GetDeptList',
  282. classAddTree:'.addTree',
  283. classXl:'.xl',
  284. treeId:'#deptTree',
  285. treeObj:{
  286. name:'F_DeptName',
  287. id:'F_DeptId',
  288. pid:'F_PartentId',
  289. onclick:zTreeOnClick
  290. }
  291. }
  292. var selectParam = {
  293. id:"#source",
  294. apiUrl:"Dictionary/GetDicValueListById",
  295. dataParam:{
  296. id:1
  297. }
  298. }
  299. $(document).ready(function () {
  300. laydate.render({
  301. elem: '#squeryTime',
  302. theme: '#00a1cb',
  303. type: 'datetime',
  304. });
  305. laydate.render({
  306. elem: '#equeryTime',
  307. theme: '#00a1cb',
  308. type: 'datetime',
  309. });
  310. initTable();
  311. bindtree();
  312. selectCommon(selectParam);
  313. });
  314. //搜索
  315. $(".search_1").click(function () {
  316. initTable();
  317. });
  318. //导出
  319. $('#exportPublicSentiments').click(function () {
  320. exportParams.isdc = true
  321. exportFileFun('DataAssessment/GetExamine',exportParams)
  322. });
  323. function handleOrderList(val,row,tab){
  324. if (row.deptname !=='合计'&&row.deptname !=='总计') {
  325. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \''+tab+'\')" >' + val +
  326. '</a></div>'
  327. }else{
  328. return val
  329. }
  330. }
  331. // 查看列表
  332. function viewList(deptid, tab) {
  333. console.log(deptid, tab)
  334. var deptid = encodeURIComponent(deptid)
  335. starttime = $("#squeryTime").val();
  336. endtime = $("#equeryTime").val();
  337. source = $("#source").val();
  338. source = encodeURIComponent(source);
  339. starttime = encodeURIComponent(starttime);
  340. if (endtime.length > 0 && endtime.length <= 10) {
  341. endtime = encodeURIComponent(endtime + " 23:59:59");
  342. } else {
  343. endtime = encodeURIComponent(endtime);
  344. }
  345. layer.open({
  346. type: 2,
  347. content: "./comhtml/reportOrderList.html?deptid=" + deptid + "&tab=" + tab +
  348. "&starttime=" + starttime + "&endtime=" + endtime+ "&source=" + source, //iframe的url,no代表不显示滚动条
  349. title: '考核统计分析列表',
  350. area: ['90%', '90%'], //宽高
  351. });
  352. }
  353. //表格
  354. function initTable() {
  355. var dataParams = {
  356. starttime: $('#squeryTime').val(),
  357. endtime: $('#equeryTime').val(),
  358. deptid: $("#deptid").val(),
  359. source: $("#source").val(),
  360. token: $.cookie("token")
  361. }
  362. exportParams = dataParams
  363. $.ajax({
  364. url: huayi.config.callcenter_url + 'DataAssessment/GetExamine',
  365. type: 'get',
  366. data: dataParams,
  367. dataType: "json",
  368. async: true,
  369. success: function (returnValue) {
  370. //异步获取数据
  371. //debugger;
  372. var resultData = returnValue.rows;
  373. var resultData_1 = []
  374. var resultData_2 = []
  375. var resultData_3 = []
  376. var resultData_4 = []
  377. var resultData_5 = []
  378. $(".statisticalPeriod").text(returnValue.strdate + " 至 " + returnValue.edate)
  379. $("#titleText").text("12345联动服务工作" + returnValue.month + "月份考核数据表")
  380. resultData.forEach(function (v, i) {
  381. if (v.category === 1) {
  382. resultData_1.push(v)
  383. } else if (v.category === 2) {
  384. resultData_2.push(v)
  385. } else if (v.category === 3) {
  386. resultData_3.push(v)
  387. } else if (v.category === 4) {
  388. resultData_4.push(v)
  389. }else {
  390. resultData_5.push(v)
  391. }
  392. })
  393. $('#workorderlist_1').bootstrapTable('load', resultData_1);
  394. $('#workorderlist_2').bootstrapTable('load', resultData_2);
  395. $('#workorderlist_3').bootstrapTable('load', resultData_3);
  396. $('#workorderlist_4').bootstrapTable('load', resultData_4);
  397. $('#workorderlist_5').bootstrapTable('load', resultData_5);
  398. }
  399. });
  400. $('#workorderlist_1').bootstrapTable('destroy').bootstrapTable({
  401. striped: true,
  402. pagination: false,
  403. columns:tableColumns
  404. });
  405. $('#workorderlist_2').bootstrapTable('destroy').bootstrapTable({
  406. striped: true,
  407. pagination: false,
  408. columns:tableColumns
  409. });
  410. $('#workorderlist_3').bootstrapTable('destroy').bootstrapTable({
  411. striped: true,
  412. pagination: false,
  413. columns:tableColumns
  414. });
  415. $('#workorderlist_4').bootstrapTable('destroy').bootstrapTable({
  416. striped: true,
  417. pagination: false,
  418. columns:tableColumns
  419. });
  420. $('#workorderlist_5').bootstrapTable('destroy').bootstrapTable({
  421. striped: true,
  422. pagination: false,
  423. columns:tableColumns
  424. });
  425. }
  426. // 树形下拉开始
  427. function bindtree() {
  428. $.getJSON(
  429. huayi.config.callcenter_url + treeInputParam.treeApi, {
  430. token: $.cookie("token")
  431. },
  432. function (result) {
  433. if (result.state.toLowerCase() == "success") {
  434. $.fn.zTree.init($(treeInputParam.treeId), setting, result.data);
  435. }
  436. }
  437. );
  438. }
  439. $(treeInputParam.classInps).focus(function () {
  440. $(this).siblings(treeInputParam.classAddTree).css("display", "block");
  441. });
  442. $(treeInputParam.classXl).click(function () {
  443. var xl = $(this).siblings(treeInputParam.classXl);
  444. if (xl.css("display") == "block") {
  445. xl.css("display", "none");
  446. } else {
  447. xl.css("display", "block");
  448. }
  449. });
  450. $(treeInputParam.classAddTree).mouseleave(function () {
  451. $(this).css("display", "none");
  452. });
  453. //获取所属部门
  454. var setting = {
  455. data: {
  456. key: {
  457. name: treeInputParam.treeObj.name,
  458. },
  459. simpleData: {
  460. enable: true,
  461. idKey: treeInputParam.treeObj.id,
  462. pIdKey: treeInputParam.treeObj.pid,
  463. rootPId: -1,
  464. },
  465. },
  466. callback: {
  467. onClick: treeInputParam.treeObj.onclick,
  468. },
  469. };
  470. function zTreeOnClick(event, treeId, treeNode) {
  471. $(treeInputParam.classInps).val(treeNode[treeInputParam.treeObj.name]);
  472. $(treeInputParam.classId).val(treeNode[treeInputParam.treeObj.id]);
  473. }
  474. // 树形下拉结束
  475. // 下拉框
  476. function selectCommon(obj) {
  477. var resultParam
  478. var dataParam = {
  479. token: $.cookie("token")
  480. }
  481. if (obj.dataParam) {
  482. resultParam = Object.assign(dataParam, obj.dataParam)
  483. }else{
  484. resultParam = dataParam
  485. }
  486. $(obj.id).empty();
  487. $(obj.id).append(
  488. '<option selected="selected" value="">请选择</option>'
  489. );
  490. $.getJSON(
  491. huayi.config.callcenter_url +
  492. obj.apiUrl, resultParam,
  493. function (data) {
  494. if (data.state.toLowerCase() == "success") {
  495. var content = data.data;
  496. $(content).each(function (i, n) {
  497. $(
  498. "<option value='" +
  499. n.F_ValueId +
  500. "'>" +
  501. n.F_Value +
  502. "</option>"
  503. ).appendTo($(obj.id));
  504. });
  505. }
  506. }
  507. );
  508. }
  509. //下拉框结束
  510. // 导出列表
  511. function exportFileFun(api, params) {
  512. var url = huayi.config.callcenter_url + api;
  513. if(typeof(params) !== "object") {
  514. return
  515. }
  516. delete params.page
  517. delete params.pagesize
  518. delete params.pageindex
  519. Object.keys(params).forEach(function(key, index) {
  520. if(!params[key]){
  521. params[key] = ""
  522. }
  523. if (index === 0) {
  524. url += `?${key}=${params[key]}`
  525. } else {
  526. url += `&${key}=${params[key]}`
  527. }
  528. })
  529. window.location.href = url;
  530. }
  531. //导出列表结束
  532. </script>
  533. </body>
  534. </html>