永城市12345 (县级市)- 来源于虞城县12345 - 所有县级统一API

historyList.html 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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/init.css" rel="stylesheet" />
  10. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  11. <script src="../js/laydate/laydate.js"></script>
  12. <style type="text/css">
  13. .time-box{
  14. display: inline-block;
  15. position: relative;
  16. }
  17. .toolRight input{
  18. padding-right: 30px;
  19. }
  20. .tub{
  21. position: absolute;
  22. right: 8px;
  23. top: 5px;
  24. font-size: 18px;
  25. color: #00a0ca;
  26. }
  27. .detailHtml{
  28. width: 100%;
  29. padding: 15px;
  30. }
  31. .inpBox {
  32. border: 1px solid #e5e6e7;
  33. height: 34px;
  34. width: 220px;
  35. display: inline-block;
  36. position: relative;
  37. vertical-align: middle;
  38. }
  39. .addTree {
  40. background: #fff;
  41. position: absolute;
  42. width: 100%;
  43. border: 1px solid #e5e6e7;
  44. right: 0;
  45. top: 32px;
  46. display: none;
  47. z-index: 222;
  48. }
  49. .xl {
  50. display: inline-block;
  51. background: url(../img/dropDown.png) no-repeat;
  52. height: 100%;
  53. background-position: center center;
  54. width: 20px;
  55. position: absolute;
  56. right: 0;
  57. top: 0px;
  58. /* background-color: #f7bc8b; */
  59. cursor: pointer;
  60. }
  61. .ztree li span {
  62. border: none;
  63. padding: 0;
  64. }
  65. .inps {
  66. width: 217px;
  67. height: 32px;
  68. outline: none;
  69. border: 0;
  70. border-image-width: 0;
  71. padding: 0;
  72. padding-left: 3px;
  73. }
  74. .Cleans{
  75. display: inline-block;
  76. width: 16px;
  77. position: absolute;
  78. right: 21px;
  79. top: 10px;
  80. display: none;
  81. }
  82. </style>
  83. </head>
  84. <body class="gray-bg">
  85. <div class="daoHang clearfix">
  86. <div class="dhLeft">
  87. <sapn>
  88. <i class="syIcon"></i>位置:
  89. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  90. <a href="javaScript:;">绩效质检</a>&gt;
  91. <a href="javaScript:;" class="nowPosition">单位绩效历史列表</a>
  92. </sapn>
  93. </div>
  94. <div class="dhRight">
  95. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  96. </div>
  97. </div>
  98. <div class="wrapper wrapper-content">
  99. <div class="th-top clearfix">
  100. <div class="form-inline th-bar clearfix">
  101. <div class="time-box form-group" >
  102. <i class="tub fa fa-calendar"></i>
  103. <input class="form-control" type="text" id="startTime" placeholder="选择时间">
  104. </div>
  105. <div class="time-box form-group" >
  106. <input type="hidden" id="depId" />
  107. <div class="inpBox">
  108. <input type="text" class="inps" />
  109. <i class="Cleans fa fa-close"></i>
  110. <i class="xl xl_one"></i>
  111. <div class="addTree xlAdd">
  112. <ul id="addTreeDemo" class="ztree">
  113. </ul>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="form-group tool_bars pull-right">
  118. <button class="btns search">搜索</button>
  119. <!--<a class="btns export">导出</a>-->
  120. </div>
  121. </div>
  122. </div>
  123. <div class="Content_box">
  124. <!--待处理/-->
  125. <div class="complain Shows">
  126. <div style="width: 100%;padding: 10px;">
  127. <table id="lists" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  128. <thead>
  129. <tr>
  130. <th data-field="state" data-checkbox="true" data-align="center"></th>
  131. <th data-field="F_Year" data-align="center" data-formatter="yearMonth">年月</th>
  132. <th data-field="F_DeptId" data-align="center" >部门</th>
  133. <th data-field="F_TotalPoint" data-align="center">总分</th>
  134. <th data-align="center" data-formatter="formatterDetail">操作</th>
  135. </tr>
  136. </thead>
  137. </table>
  138. <!--<p style="margin-top: 20px;"><button class="btns allDel">批量删除</button></p>-->
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <script src="../js/zTree/jquery.ztree.core.js"></script>
  144. <script>
  145. var editHtml='<div class="detailHtml"><table class="table table-striped table-bordered table-condensed tabless">'+
  146. '<thead>'+
  147. '<th>名称</th>'+
  148. '<th>分数</th>'+
  149. '<th>数量</th>'+
  150. '<th>总数</th>'+
  151. '</thead>'+
  152. '<tbody>'+
  153. '<tr>'+
  154. '<td>按期办结</td>'+
  155. '<td>0</td>'+
  156. '<td>10</td>'+
  157. '<td>20</td>'+
  158. '</tr>'+
  159. '</tbody>'+
  160. '</table></div>'
  161. $(document).ready(function() {
  162. //年月选择器
  163. laydate.render({
  164. elem: '#startTime'
  165. ,format: 'yyyy-MM',
  166. type: 'month',
  167. theme: '#00a1cb'
  168. });
  169. initTables();
  170. //搜索
  171. $('.search').click(function(){
  172. initTables();
  173. })
  174. //所属分类下拉
  175. $('.inps').focus(function() {
  176. $('.xlAdd').css('display', 'block')
  177. })
  178. $('.xl').click(function() {
  179. if($('.xlAdd').css('display') == 'block') {
  180. $('.xlAdd').css('display', 'none')
  181. } else {
  182. $('.xlAdd').css('display', 'block')
  183. }
  184. })
  185. $('.addTree').mouseleave(function() {
  186. $(this).css('display', 'none')
  187. })
  188. //清除
  189. $(".Cleans ").click(function(){
  190. $('.inps').val("");
  191. $("#depId").val("");
  192. })
  193. tree()
  194. })
  195. //列表
  196. function initTables() {
  197. //先销毁表格
  198. $('#lists').bootstrapTable('destroy');
  199. //初始化表格,动态从服务器加载数据
  200. $("#lists").bootstrapTable({
  201. method: "get", //使用get请求到服务器获取数据
  202. url: huayi.config.callcenter_url + "CheckPoint/GetCheckPointList", //获取数据的Servlet地址
  203. contentType: "application/x-www-form-urlencoded",
  204. striped: true, //表格显示条纹
  205. pagination: true, //启动分页
  206. pageSize: 10, //每页显示的记录数
  207. pageNumber: 1, //当前第几页
  208. pageList: [10, 20, 50, 100], //记录数可选列表
  209. search: false, //是否启用查询
  210. showColumns: false, //显示下拉框勾选要显示的列
  211. showRefresh: false, //显示刷新按钮
  212. sidePagination: "server", //表示服务端请求
  213. // clickToSelect: true,
  214. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  215. //设置为limit可以获取limit, offset, search, sort, order
  216. queryParamsType: "undefined",
  217. queryParams: function queryParams(params) { //设置查询参数
  218. var param = {
  219. pageindex: params.pageNumber,
  220. pagesize: params.pageSize,
  221. year:$('#startTime').val().split('-')[0],
  222. month:$('#startTime').val().split('-')[1],
  223. deptid:$('#depId').val(),
  224. token: $.cookie("token")
  225. };
  226. return param;
  227. },
  228. onLoadSuccess: function (data) { //加载成功时执行
  229. },
  230. onLoadError: function () { //加载失败时执行
  231. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  232. }
  233. });
  234. }
  235. //年月
  236. function yearMonth(val,row){
  237. return '<div>'+ val+'-'+row.F_Month +'</div>'
  238. }
  239. //操作
  240. function formatterDetail(val,row){
  241. return '<div> <a title="查看详情" onclick=go("'+ row.F_ItemJson +'")><i class="fa fa-bars"></i></a></div>'
  242. }
  243. //详情
  244. function go(items){
  245. var item=JSON.parse(items);
  246. console.log(item)
  247. layer.open({
  248. type: 1,
  249. title: '查看考核详情',
  250. area: ['80%', '75%'], //宽高
  251. content: editHtml
  252. });
  253. $('.tabless tbody').html('');
  254. $(item).each(function(i,n){
  255. $('<tr>'+
  256. '<td>'+ n.name+'</td>'+
  257. '<td>'+ n.point+'</td>'+
  258. '<td>'+ n.count+'</td>'+
  259. '<td>'+ n.total+'</td>'+
  260. '</tr>').appendTo('.tabless tbody')
  261. })
  262. }
  263. function tree() {
  264. $.get(huayi.config.callcenter_url + 'Department/GetSecondDeptList', {
  265. "token": $.cookie("token"),
  266. "iscbdw": 1
  267. }, function(result) {
  268. result = $.parseJSON(result);
  269. $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
  270. });
  271. }
  272. var setting1 = {
  273. data: {
  274. key: {
  275. name: "F_DeptName"
  276. },
  277. simpleData: {
  278. enable: true,
  279. idKey: "F_DeptId",
  280. pIdKey: "F_PartentId",
  281. rootPId: 0
  282. }
  283. },
  284. callback: {
  285. onClick: zTreeOnClick
  286. }
  287. };
  288. function zTreeOnClick(event, treeId, treeNode) {
  289. if(treeNode.level == 2) {
  290. $('.inps').val(treeNode.F_DeptName);
  291. $("#depId").val(treeNode.F_DeptId);
  292. // $("#Dpment").val(treeNode.F_DeptName);
  293. $(".Cleans").show();
  294. }
  295. };
  296. </script>
  297. </body>
  298. </html>