Nav apraksta

statisticsIndicators.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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. /*.fixed-table-body {
  109. transform: scaleY(-1);
  110. }
  111. .fixed-table-loading {
  112. transform: scaleY(-1);
  113. top: 0 !important;
  114. }
  115. #workorderlist_1 {
  116. transform: scaleY(-1);
  117. }*/
  118. </style>
  119. </head>
  120. <body class="gray-bg">
  121. <div class="wrapper wrapper-content animated fadeInRight">
  122. <div class="daoHang clearfix">
  123. <div class="dhLeft">
  124. <sapn>
  125. <i class="syIcon"></i>位置:
  126. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  127. <a href="javaScript:;">业务统计</a>&gt;
  128. <a href="" class="nowPosition">工作指标统计</a>
  129. </sapn>
  130. </div>
  131. <div class="dhRight">
  132. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  133. </div>
  134. </div>
  135. <div class="Content_box">
  136. <div class="complain Shows">
  137. <div class="toolBar clearfix">
  138. <div class="toolLeft">
  139. 开始日期:
  140. <input class="photo x-color inputs laydate-icon" type="text" id="squeryTime"
  141. autocomplete="off" />
  142. 结束时间:
  143. <input class="photo x-color inputs laydate-icon" type="text" id="equeryTime"
  144. autocomplete="off" />
  145. <!--部门:
  146. <div class="inpBox">
  147. <input class="inps inps1">
  148. <input type="hidden" id="deptid" />
  149. <i class="xl xl_two"></i>
  150. <div class="addTree xlAdd_two">
  151. <ul id="deptTree" class="ztree"></ul>
  152. </div>
  153. </div> -->
  154. 来源:
  155. <select class="select" id="source"></select>
  156. <button class="btns search_1">查询</button>
  157. <a class="btns" id="exportPublicSentiments">导出</a>
  158. </div>
  159. </div>
  160. <div class="title" id="titleText">安阳市民声网络电话服务未诉先办工作评估指标统计表</div>
  161. <div class="title">统计周期:<span class="statisticalPeriod"></span></div>
  162. <!-- <h5>一、县(市、区)联动单位</h5> -->
  163. <div style="width: 100%;padding: 10px;" >
  164. <table id="workorderlist_1" class="tables" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  165. <thead>
  166. <tr>
  167. <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
  168. <th data-field="deptname" data-align="left" data-formatter="formatterOrganize">部门名称</th>
  169. <th data-field="classification" data-align="center">分类数据</th>
  170. <th data-field="organize" data-align="center" >部门承办量</th>
  171. <th data-field="oversignfor" data-align="center">超时签收量</th>
  172. <th data-field="signfor" data-align="center">及时签收量</th>
  173. <th data-field="signforrate" data-align="center">及时签收率</th>
  174. <th data-field="overhandle" data-align="center">超时办理量</th>
  175. <th data-field="handle" data-align="center">按时办理量</th>
  176. <th data-field="handlerate" data-align="center">按时办结率</th>
  177. <th data-field="onehandle" data-align="center">一次办结量</th>
  178. <th data-field="onehandlerate" data-align="center">一次办结率</th>
  179. <th data-field="satisfied" data-align="center">满意量</th>
  180. <th data-field="dissatisfied" data-align="center">不满意量</th>
  181. <th data-field="tobeevaluated" data-align="center">待评价量</th>
  182. <th data-field="satisfactionrate" data-align="center">满 意 率</th>
  183. <th data-field="correction" data-align="center">不满意差评整改量</th>
  184. <th data-field="correctionsatisfiedint" data-align="center">不满意差评整改满意量</th>
  185. <th data-field="appealapproved" data-align="center">差评整改不满意申诉通过量</th>
  186. <th data-field="appea1noapproved" data-align="center">差评整改不满意申诉未通过量</th>
  187. <th data-field="correctionsatisfiedrate" data-align="center">差评整改满意率</th>
  188. <th data-field="correctionrate" data-align="center">差评整改率</th>
  189. </tr>
  190. </thead>
  191. </table>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. <script>
  197. $(document).ready(function () {
  198. laydate.render({
  199. elem: '#squeryTime',
  200. theme: '#00a1cb',
  201. type: 'datetime',
  202. });
  203. laydate.render({
  204. elem: '#equeryTime',
  205. theme: '#00a1cb',
  206. type: 'datetime',
  207. });
  208. $('#squeryTime').val(getLastMonthTodayToTodayRange().start)
  209. $('#equeryTime').val(getLastMonthTodayToTodayRange().end)
  210. initTable();
  211. // bindtree();
  212. LY($("#source"));
  213. });
  214. function formatterOrganize(val){
  215. return '<div style="width:200px">'+val+'</div>'
  216. }
  217. //表格
  218. function initTable() {
  219. $.ajax({
  220. url: huayi.config.callcenter_url + 'DataAssessment/GetDeptDispatch',
  221. type: 'get',
  222. data: {
  223. starttime: $('#squeryTime').val(),
  224. endtime: $('#equeryTime').val(),
  225. deptid: $("#deptid").val(),
  226. source: $("#source").val(),
  227. token: $.cookie("token")
  228. },
  229. dataType: "json",
  230. async: true,
  231. success: function (returnValue) {
  232. //异步获取数据
  233. //debugger;
  234. var resultData = returnValue.rows;
  235. var resultData_1 = []
  236. var resultData_2 = []
  237. var resultData_3 = []
  238. var resultData_4 = []
  239. $(".statisticalPeriod").text(returnValue.strdate + " 至 " + returnValue.edate)
  240. resultData.forEach(function (v, i) {
  241. resultData_1.push(v)
  242. })
  243. $('#workorderlist_1').bootstrapTable('load', resultData_1);
  244. }
  245. });
  246. $('#workorderlist_1').bootstrapTable('destroy').bootstrapTable({
  247. striped: true,
  248. pagination: true,
  249. });
  250. }
  251. //搜索
  252. $(".search_1").click(function () {
  253. initTable();
  254. });
  255. $(".inps").focus(function () {
  256. $(this).siblings(".addTree").css("display", "block");
  257. });
  258. $(".xl").click(function () {
  259. var xl = $(this).siblings(".addTree");
  260. if (xl.css("display") == "block") {
  261. xl.css("display", "none");
  262. } else {
  263. xl.css("display", "block");
  264. }
  265. });
  266. $(".addTree").mouseleave(function () {
  267. $(this).css("display", "none");
  268. });
  269. function bindtree() {
  270. $.getJSON(
  271. huayi.config.callcenter_url + "Department/GetDeptList", {
  272. token: $.cookie("token")
  273. },
  274. function (result) {
  275. if (result.state.toLowerCase() == "success") {
  276. $.fn.zTree.init($("#deptTree"), setting, result.data);
  277. }
  278. }
  279. );
  280. }
  281. //获取所属部门
  282. var setting = {
  283. data: {
  284. key: {
  285. name: "F_DeptName",
  286. },
  287. simpleData: {
  288. enable: true,
  289. idKey: "F_DeptId",
  290. pIdKey: "F_PartentId",
  291. rootPId: -1,
  292. },
  293. },
  294. callback: {
  295. onClick: zTreeOnClick,
  296. },
  297. };
  298. function zTreeOnClick(event, treeId, treeNode) {
  299. $(".inps1").val(treeNode.F_DeptName);
  300. $("#deptid").val(treeNode.F_DeptId);
  301. }
  302. //编号
  303. function serialNumber(val, row, index) {
  304. return index + 1;
  305. }
  306. //导出
  307. $('#exportPublicSentiments').click(function () {
  308. dcexcelDispath(this);
  309. });
  310. function dcexcelDispath(obj) {
  311. var starttime = $('#squeryTime').val()
  312. var endtime = $('#equeryTime').val()
  313. var url = huayi.config.callcenter_url + "DataAssessment/GetDeptDispatch?token=" + $.cookie("token");
  314. url += "&starttime=" + starttime + "&endtime=" + endtime + "&deptid=" + $('#deptid').val() + "&source=" + $('#source').val()+ "&isdc=true";
  315. obj.href = url;
  316. }
  317. function reciveCountList(val, row) {
  318. console.log("row", row)
  319. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'0\')" >' + val +
  320. '</a></div>';
  321. }
  322. function timeOutCountList(val, row) {
  323. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'1\')" >' + val +
  324. '</a></div>';
  325. }
  326. function unFinishCountList(val, row) {
  327. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'2\')" >' + val +
  328. '</a></div>';
  329. }
  330. function backCountList(val, row) {
  331. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'3\')" >' + val +
  332. '</a></div>';
  333. }
  334. function visitCountList(val, row) {
  335. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'4\')" >' + val +
  336. '</a></div>';
  337. }
  338. function dissatisfiedCountList(val, row) {
  339. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'5\')" >' + val +
  340. '</a></div>';
  341. }
  342. function onceDissatisfiedCountList(val, row) {
  343. return '<div class="imgs" ><a class="" onclick="viewList(\'' + row.deptid + '\', \'6\')" >' + val +
  344. '</a></div>';
  345. }
  346. function viewList(deptId, dbtype) {
  347. var source = $("#source").val();
  348. starttime = $("#squeryTime").val();
  349. endtime = $("#equeryTime").val();
  350. if (endtime.length > 0 && endtime.length <= 10) {
  351. endtime = encodeURIComponent(endtime + " 23:59:59");
  352. } else {
  353. endtime = encodeURIComponent(endtime);
  354. }
  355. layer.open({
  356. type: 2,
  357. content: "./superviseDataStatisticsSecondaryUnitList.html?deptId=" + deptId + "&dbtype=" + dbtype + "&starttime=" + starttime + "&endtime=" + endtime + "&source=" + source, //iframe的url,no代表不显示滚动条
  358. title: '督办统计列表',
  359. area: ['90%', '90%'], //宽高
  360. });
  361. }
  362. function getLastMonthTodayToTodayRange() {
  363. // 格式化日期为 YYYY-MM-DD HH:mm:ss
  364. const format = (date) => {
  365. const year = date.getFullYear();
  366. const month = String(date.getMonth() + 1).padStart(2, '0');
  367. const day = String(date.getDate()).padStart(2, '0');
  368. const hours = String(date.getHours()).padStart(2, '0');
  369. const minutes = String(date.getMinutes()).padStart(2, '0');
  370. const seconds = String(date.getSeconds()).padStart(2, '0');
  371. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  372. };
  373. // 获取当前日期(今天)
  374. const today = new Date();
  375. // 计算上个月的今天,并设置为 00:00:00
  376. const lastMonthToday = new Date(today);
  377. lastMonthToday.setMonth(lastMonthToday.getMonth() - 1); // 上个月今天
  378. lastMonthToday.setHours(0, 0, 0, 0); // 重置时间为 00:00:00
  379. // 计算今天的结束时间 23:59:59
  380. const todayEnd = new Date(today);
  381. todayEnd.setHours(23, 59, 59, 0); // 重置时间为 23:59:59
  382. return {
  383. start: format(lastMonthToday),
  384. end: format(todayEnd)
  385. };
  386. }
  387. //来源
  388. function LY(obj) {
  389. obj.empty();
  390. obj.append(
  391. '<option selected="selected" value="">请选择</option>'
  392. );
  393. $.getJSON(
  394. huayi.config.callcenter_url +
  395. "Dictionary/GetDicValueListById", {
  396. token: $.cookie("token"),
  397. id: 1,
  398. },
  399. function (data) {
  400. if (data.state.toLowerCase() == "success") {
  401. var content = data.data;
  402. $(content).each(function (i, n) {
  403. $(
  404. "<option value='" +
  405. n.F_ValueId +
  406. "'>" +
  407. n.F_Value +
  408. "</option>"
  409. ).appendTo(obj);
  410. });
  411. }
  412. }
  413. );
  414. }
  415. </script>
  416. </body>
  417. </html>