Нет описания

superviseDataStatisticsSecondaryUnit.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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 rel="stylesheet" href="../css/WorkOrder/Search.css" />
  10. <link rel="stylesheet" href="../css/init.css" />
  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. .inpBox {
  42. border: 1px solid #e5e6e7;
  43. height: 32px;
  44. width: 200px;
  45. display: inline-block;
  46. position: relative;
  47. vertical-align: middle;
  48. }
  49. .inpBox .inps1 {
  50. width: 100%;
  51. height: 30px;
  52. outline: none;
  53. border: 0;
  54. border-image-width: 0;
  55. padding: 0;
  56. padding-left: 3px;
  57. }
  58. .xl {
  59. display: inline-block;
  60. background: url(../img/dropDown.png) no-repeat;
  61. height: 100%;
  62. background-position: center center;
  63. width: 20px;
  64. position: absolute;
  65. right: 0;
  66. top: 0px;
  67. background-color: #f7bc8b;
  68. cursor: pointer;
  69. }
  70. .xl:hover {
  71. background-color: #e6d523;
  72. }
  73. .addTree {
  74. background: #fff;
  75. position: absolute;
  76. width: 100%;
  77. border: 1px solid darkgrey;
  78. right: 0;
  79. top: 30px;
  80. display: none;
  81. height: 350px;
  82. overflow-y: auto;
  83. z-index: 10;
  84. text-align: center;
  85. }
  86. .addTree .list li:hover {
  87. background: #ebebeb;
  88. color: #717171;
  89. }
  90. .Content_box .title {
  91. font-size: 24px;
  92. text-align: center;
  93. }
  94. .Content_box h5 {
  95. font-size: 16px;
  96. text-align: center;
  97. }
  98. .select {
  99. width: 200px;
  100. height: 32px;
  101. border: 1px solid rgb(229, 230, 231);
  102. }
  103. .footerDataStatistics {
  104. /* padding: 0 0 0 20px; */
  105. margin: 10px 0 0 10px;
  106. font-size: 18px;
  107. }
  108. </style>
  109. </head>
  110. <body class="gray-bg">
  111. <div class="wrapper wrapper-content animated fadeInRight">
  112. <div class="daoHang clearfix">
  113. <div class="dhLeft">
  114. <sapn>
  115. <i class="syIcon"></i>位置:
  116. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  117. <a href="javaScript:;">业务统计</a>&gt;
  118. <a href="" class="nowPosition">二级单位数据统计</a>
  119. </sapn>
  120. </div>
  121. <div class="dhRight">
  122. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  123. </div>
  124. </div>
  125. <div class="Content_box">
  126. <div class="complain Shows">
  127. <div class="toolBar clearfix">
  128. <div class="toolLeft">
  129. 开始日期:
  130. <input class="photo x-color inputs laydate-icon" type="text" id="squeryTime"
  131. autocomplete="off" />
  132. 结束时间:
  133. <input class="photo x-color inputs laydate-icon" type="text" id="equeryTime"
  134. autocomplete="off" />
  135. <!-- 部门:
  136. <div class="inpBox">
  137. <input class="inps inps1">
  138. <input type="hidden" id="deptid" />
  139. <i class="xl xl_two"></i>
  140. <div class="addTree xlAdd_two">
  141. <ul id="deptTree" class="ztree"></ul>
  142. </div>
  143. </div> -->
  144. 来源:
  145. <select class="select" id="source"></select>
  146. <button class="btns search_1">查询</button>
  147. <a class="btns" id="exportPublicSentiments">导出</a>
  148. </div>
  149. </div>
  150. <div class="title" id="titleText">12345联动服务工作办理情况通报表</div>
  151. <div class="title">统计周期:<span class="statisticalPeriod"></span></div>
  152. <!-- <h5>一、县(市、区)联动单位</h5> -->
  153. <div style="width: 100%;padding: 10px;">
  154. <table id="workorderlist_1" class="tables" data-row-style="rowStyle" data-query-params="queryParams"
  155. data-pagination="true">
  156. <thead>
  157. <tr>
  158. <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
  159. <th data-field="deptname" data-align="center">联动单位</th>
  160. <th data-field="Undertakers" data-formatter="reciveCountList" data-align="center">承办件
  161. </th>
  162. <th data-field="Undertakersrate" data-align="center">承办率</th>
  163. <th data-field="Undertakersscore" data-align="center">得分(5分)</th>
  164. <th data-field="overdue" data-formatter="timeOutCountList" data-align="center">超期件</th>
  165. <th data-field="overduerate" data-align="center">按时反馈率</th>
  166. <th data-field="overduescore" data-align="center">得分(20分)</th>
  167. <th data-field="unsuccessful" data-formatter="unFinishCountList" data-align="center">未果件
  168. </th>
  169. <th data-field="unsuccessfulrate" data-align="center">办结率</th>
  170. <th data-field="unsuccessfulscore" data-align="center">得分(10分)</th>
  171. <th data-field="Chargeback" data-formatter="backCountList" data-align="center">退单件</th>
  172. <th data-field="Chargebackrate" data-align="center">有效回复率</th>
  173. <th data-field="Chargebackscore" data-align="center">得分(15分)</th>
  174. <th data-field="Comment" data-formatter="visitCountList" data-align="center">群众评议总数</th>
  175. <th data-field="Oncedissatisfied" data-formatter="onceDissatisfiedCountList"
  176. data-align="center">一次不满意件</th>
  177. <th data-field="dissatisfied" data-formatter="dissatisfiedCountList"
  178. data-align="center">不满意件</th>
  179. <th data-field="satisfiedrate" data-align="center">满意率</th>
  180. <th data-field="satisfiedscore" data-align="center">得分(50分)</th>
  181. <th data-field="total" data-align="center">总分</th>
  182. <th data-field="" data-formatter="serialNumber" data-align="center">排名</th>
  183. </tr>
  184. </thead>
  185. </table>
  186. </div>
  187. <div class="footerDataStatistics">统计时段:00:00—23:59:59</div>
  188. </div>
  189. </div>
  190. </div>
  191. <script>
  192. $(document).ready(function () {
  193. laydate.render({
  194. elem: '#squeryTime',
  195. theme: '#00a1cb',
  196. type: 'datetime',
  197. });
  198. laydate.render({
  199. elem: '#equeryTime',
  200. theme: '#00a1cb',
  201. type: 'datetime',
  202. });
  203. initTable();
  204. bindtree();
  205. LY($("#source"));
  206. });
  207. //表格
  208. function initTable() {
  209. $.ajax({
  210. url: huayi.config.callcenter_url + 'DataAssessment/GetDBDataList_2',
  211. type: 'get',
  212. data: {
  213. starttime: $('#squeryTime').val(),
  214. endtime: $('#equeryTime').val(),
  215. // deptid3: $("#deptid").val(),
  216. source: $("#source").val(),
  217. token: $.cookie("token")
  218. },
  219. dataType: "json",
  220. async: true,
  221. success: function (returnValue) {
  222. //异步获取数据
  223. //debugger;
  224. var resultData = returnValue.rows;
  225. var resultData_1 = []
  226. var resultData_2 = []
  227. var resultData_3 = []
  228. var resultData_4 = []
  229. $(".statisticalPeriod").text(returnValue.strdate + " 至 " + returnValue.edate)
  230. $("#titleText").text("12345联动服务工作" + returnValue.month + "月份办理情况通报表")
  231. resultData.forEach(function (v, i) {
  232. if (v.category === 1) {
  233. resultData_1.push(v)
  234. } else if (v.category === 2) {
  235. resultData_2.push(v)
  236. } else if (v.category === 3) {
  237. resultData_3.push(v)
  238. } else if (v.category === 4) {
  239. resultData_4.push(v)
  240. }
  241. })
  242. $('#workorderlist_1').bootstrapTable('load', resultData_1);
  243. }
  244. });
  245. $('#workorderlist_1').bootstrapTable('destroy').bootstrapTable({
  246. striped: true,
  247. pagination: false,
  248. });
  249. }
  250. //搜索
  251. $(".search_1").click(function () {
  252. initTable();
  253. });
  254. $(".inps").focus(function () {
  255. $(this).siblings(".addTree").css("display", "block");
  256. });
  257. $(".xl").click(function () {
  258. var xl = $(this).siblings(".addTree");
  259. if (xl.css("display") == "block") {
  260. xl.css("display", "none");
  261. } else {
  262. xl.css("display", "block");
  263. }
  264. });
  265. $(".addTree").mouseleave(function () {
  266. $(this).css("display", "none");
  267. });
  268. function bindtree() {
  269. $.getJSON(
  270. huayi.config.callcenter_url + "Department/GetDeptList", {
  271. token: $.cookie("token")
  272. },
  273. function (result) {
  274. if (result.state.toLowerCase() == "success") {
  275. $.fn.zTree.init($("#deptTree"), setting, result.data);
  276. }
  277. }
  278. );
  279. }
  280. //获取所属部门
  281. var setting = {
  282. data: {
  283. key: {
  284. name: "F_DeptName",
  285. },
  286. simpleData: {
  287. enable: true,
  288. idKey: "F_DeptId",
  289. pIdKey: "F_PartentId",
  290. rootPId: -1,
  291. },
  292. },
  293. callback: {
  294. onClick: zTreeOnClick,
  295. },
  296. };
  297. function zTreeOnClick(event, treeId, treeNode) {
  298. $(".inps1").val(treeNode.F_DeptName);
  299. $("#deptid").val(treeNode.F_DeptId);
  300. }
  301. //编号
  302. function serialNumber(val, row, index) {
  303. return index + 1;
  304. }
  305. //导出
  306. $('#exportPublicSentiments').click(function () {
  307. dcexcelDispath(this);
  308. });
  309. function dcexcelDispath(obj) {
  310. var starttime = $('#squeryTime').val()
  311. var endtime = $('#equeryTime').val()
  312. var url = huayi.config.callcenter_url + "DataAssessment/GetDBDataList_2?token=" + $.cookie("token");
  313. url += "&starttime=" + starttime + "&endtime=" + endtime + "&deptid=" + $('#deptid').val() + "&isdc=true";
  314. obj.href = url;
  315. }
  316. function reciveCountList(val, row) {
  317. console.log("row", row)
  318. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'0\')" >' + val +
  319. '</a></div>';
  320. }
  321. function timeOutCountList(val, row) {
  322. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'1\')" >' + val +
  323. '</a></div>';
  324. }
  325. function unFinishCountList(val, row) {
  326. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'2\')" >' + val +
  327. '</a></div>';
  328. }
  329. function backCountList(val, row) {
  330. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'3\')" >' + val +
  331. '</a></div>';
  332. }
  333. function visitCountList(val, row) {
  334. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'4\')" >' + val +
  335. '</a></div>';
  336. }
  337. function dissatisfiedCountList(val, row) {
  338. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'5\')" >' + val +
  339. '</a></div>';
  340. }
  341. function onceDissatisfiedCountList(val, row) {
  342. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'6\')" >' + val +
  343. '</a></div>';
  344. }
  345. function viewList(deptId, dbtype) {
  346. var source = $("#source").val();
  347. starttime = $("#squeryTime").val();
  348. endtime = $("#equeryTime").val();
  349. if (endtime.length > 0 && endtime.length <= 10) {
  350. endtime = encodeURIComponent(endtime + " 23:59:59");
  351. } else {
  352. endtime = encodeURIComponent(endtime);
  353. }
  354. layer.open({
  355. type: 2,
  356. content: "./superviseDataStatisticsSecondaryUnitList.html?deptId=" + deptId + "&dbtype=" + dbtype +
  357. "&starttime=" + starttime + "&endtime=" + endtime + "&source=" + source, //iframe的url,no代表不显示滚动条
  358. title: '督办统计列表',
  359. area: ['90%', '90%'], //宽高
  360. });
  361. }
  362. //来源
  363. function LY(obj) {
  364. obj.empty();
  365. obj.append(
  366. '<option selected="selected" value="">请选择</option>'
  367. );
  368. $.getJSON(
  369. huayi.config.callcenter_url +
  370. "Dictionary/GetDicValueListById", {
  371. token: $.cookie("token"),
  372. id: 1,
  373. },
  374. function (data) {
  375. if (data.state.toLowerCase() == "success") {
  376. var content = data.data;
  377. $(content).each(function (i, n) {
  378. $(
  379. "<option value='" +
  380. n.F_ValueId +
  381. "'>" +
  382. n.F_Value +
  383. "</option>"
  384. ).appendTo(obj);
  385. });
  386. }
  387. }
  388. );
  389. }
  390. </script>
  391. </body>
  392. </html>