123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme() + "://"
- + request.getServerName() + ":" + request.getServerPort()
- + path + "/";
- %>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <base href="<%=basePath%>">
- <!-- jsp文件头和头部 -->
- <%@ include file="../../system/index/top.jsp"%>
- </head>
- <body class="no-skin">
- <!-- /section:basics/navbar.layout -->
- <div class="main-container" id="main-container">
- <!-- /section:basics/sidebar -->
- <div class="main-content">
- <div class="main-content-inner">
- <div class="page-content">
- <div class="row">
- <div class="col-xs-12">
-
- <!-- 检索 -->
- <form action="fhbutton/list.do" method="post" name="Form" id="Form">
- <table style="margin-top:5px;">
- <tr>
- <td>
- <div class="nav-search">
- <span class="input-icon">
- <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/>
- <i class="ace-icon fa fa-search nav-search-icon"></i>
- </span>
- </div>
- </td>
- <c:if test="${QX.cha == 1 }">
- <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
- </c:if>
- </tr>
- </table>
- <!-- 检索 -->
-
- <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;">
- <thead>
- <tr>
- <th class="center" style="width:35px;">
- <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
- </th>
- <th class="center" style="width:50px;">序号</th>
- <th class="center">名称</th>
- <th class="center">权限标识</th>
- <th class="center">备注</th>
- <th class="center">操作</th>
- </tr>
- </thead>
-
- <tbody>
- <!-- 开始循环 -->
- <c:choose>
- <c:when test="${not empty varList}">
- <c:if test="${QX.cha == 1 }">
- <c:forEach items="${varList}" var="var" varStatus="vs">
- <tr>
- <td class='center'>
- <label class="pos-rel"><input type='checkbox' name='ids' value="${var.FHBUTTON_ID}" class="ace" /><span class="lbl"></span></label>
- </td>
- <td class='center' style="width: 30px;">${page.showCount*(page.currentPage-1)+vs.index+1}</td>
- <td class='center'>${var.NAME}</td>
- <td class='center'>${var.QX_NAME}</td>
- <td class='center'>${var.BZ}</td>
- <td class="center">
- <c:if test="${QX.edit != 1 && QX.del != 1 }">
- <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
- </c:if>
- <div class="hidden-sm hidden-xs btn-group">
- <c:if test="${QX.edit == 1 }">
- <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.FHBUTTON_ID}');">
- <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
- </a>
- </c:if>
- <c:if test="${QX.del == 1 }">
- <a class="btn btn-xs btn-danger" onclick="del('${var.FHBUTTON_ID}');">
- <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
- </a>
- </c:if>
- </div>
- <div class="hidden-md hidden-lg">
- <div class="inline pos-rel">
- <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
- <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
- </button>
-
- <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
- <c:if test="${QX.edit == 1 }">
- <li>
- <a style="cursor:pointer;" onclick="edit('${var.FHBUTTON_ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
- <span class="green">
- <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
- </span>
- </a>
- </li>
- </c:if>
- <c:if test="${QX.del == 1 }">
- <li>
- <a style="cursor:pointer;" onclick="del('${var.FHBUTTON_ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
- <span class="red">
- <i class="ace-icon fa fa-trash-o bigger-120"></i>
- </span>
- </a>
- </li>
- </c:if>
- </ul>
- </div>
- </div>
- </td>
- </tr>
-
- </c:forEach>
- </c:if>
- <c:if test="${QX.cha == 0 }">
- <tr>
- <td colspan="100" class="center">您无权查看</td>
- </tr>
- </c:if>
- </c:when>
- <c:otherwise>
- <tr class="main_info">
- <td colspan="100" class="center" >没有相关数据</td>
- </tr>
- </c:otherwise>
- </c:choose>
- </tbody>
- </table>
- <div class="page-header position-relative">
- <table style="width:100%;">
- <tr>
- <td style="vertical-align:top;">
- <c:if test="${QX.add == 1 }">
- <a class="btn btn-sm btn-success" onclick="add();">新增</a>
- </c:if>
- <c:if test="${QX.del == 1 }">
- <a class="btn btn-sm btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a>
- </c:if>
- </td>
- <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
- </tr>
- </table>
- </div>
- </form>
-
- </div>
- <!-- /.col -->
- </div>
- <!-- /.row -->
- </div>
- <!-- /.page-content -->
- </div>
- </div>
- <!-- /.main-content -->
- <!-- 返回顶部 -->
- <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
- <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
- </a>
- </div>
- <!-- /.main-container -->
- <!-- basic scripts -->
- <!-- 页面底部js¨ -->
- <%@ include file="../../system/index/foot.jsp"%>
- <!-- 删除时确认窗口 -->
- <script src="static/ace/js/bootbox.js"></script>
- <!-- ace scripts -->
- <script src="static/ace/js/ace/ace.js"></script>
- <!--提示框-->
- <script type="text/javascript" src="static/js/jquery.tips.js"></script>
- <script type="text/javascript">
- $(top.hangge());//关闭加载状态
- //检索
- function tosearch(){
- top.jzts();
- $("#Form").submit();
- }
- $(function() {
- //复选框全选控制
- var active_class = 'active';
- $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){
- var th_checked = this.checked;//checkbox inside "TH" table header
- $(this).closest('table').find('tbody > tr').each(function(){
- var row = this;
- if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true);
- else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false);
- });
- });
- });
-
- //新增
- function add(){
- top.jzts();
- var diag = new top.Dialog();
- diag.Drag=true;
- diag.Title ="新增";
- diag.URL = '<%=basePath%>fhbutton/goAdd.do';
- diag.Width = 450;
- diag.Height = 370;
- diag.CancelEvent = function(){ //关闭事件
- if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
- if('${page.currentPage}' == '0'){
- top.jzts();
- setTimeout("self.location=self.location",100);
- }else{
- nextPage(${page.currentPage});
- }
- }
- diag.close();
- };
- diag.show();
- }
-
- //删除
- function del(Id){
- bootbox.confirm("确定要删除吗?", function(result) {
- if(result) {
- top.jzts();
- var url = "<%=basePath%>fhbutton/delete.do?FHBUTTON_ID="+Id+"&tm="+new Date().getTime();
- $.get(url,function(data){
- nextPage(${page.currentPage});
- });
- }
- });
- }
-
- //修改
- function edit(Id){
- top.jzts();
- var diag = new top.Dialog();
- diag.Drag=true;
- diag.Title ="编辑";
- diag.URL = '<%=basePath%>fhbutton/goEdit.do?FHBUTTON_ID='+Id;
- diag.Width = 450;
- diag.Height = 370;
- diag.CancelEvent = function(){ //关闭事件
- if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){
- nextPage(${page.currentPage});
- }
- diag.close();
- };
- diag.show();
- }
-
- //批量操作
- function makeAll(msg){
- bootbox.confirm(msg, function(result) {
- if(result) {
- var str = '';
- for(var i=0;i < document.getElementsByName('ids').length;i++){
- if(document.getElementsByName('ids')[i].checked){
- if(str=='') str += document.getElementsByName('ids')[i].value;
- else str += ',' + document.getElementsByName('ids')[i].value;
- }
- }
- if(str==''){
- bootbox.dialog({
- message: "<span class='bigger-110'>您没有选择任何内容!</span>",
- buttons:
- { "button":{ "label":"确定", "className":"btn-sm btn-success"}}
- });
- $("#zcheckbox").tips({
- side:1,
- msg:'点这里全选',
- bg:'#AE81FF',
- time:8
- });
- return;
- }else{
- if(msg == '确定要删除选中的数据吗?'){
- top.jzts();
- $.ajax({
- type: "POST",
- url: '<%=basePath%>fhbutton/deleteAll.do?tm='+new Date().getTime(),
- data: {DATA_IDS:str},
- dataType:'json',
- //beforeSend: validateData,
- cache: false,
- success: function(data){
- $.each(data.list, function(i, list){
- nextPage(${page.currentPage});
- });
- }
- });
- }
- }
- }
- });
- };
-
- //导出excel
- function toExcel(){
- window.location.href='<%=basePath%>fhbutton/excel.do';
- }
- </script>
- </body>
- </html>
|