@extends('vip.layouts')
@section('seo_title')
	系统IP限制
@endsection
@section('content')
    <style>
        .layui-laydate-range {
            width: auto;
        }

        .layui-form-switch em {
            width: auto;
        }

        .layui-form-switch {
            width: 44px;
            line-height: 23px;
        }

        .layui-form-item .checkbox {
            width: auto;
        }
    </style>

    <div class="layui-row">
        <div class="layui-col-xs12">
            <form class="layui-form rewrite" eventType="eventForm"  action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
						<label class="layui-form-label">{{ trans('allowip.ip') }}</label>
						<div class="layui-input-inline">
							<input type="text" name="ip" id="ip" eventType="event-query"  value="{{ $ip }}" lay-verify="required" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline checkbox">
							<input type="checkbox" name="sureblur" id="sureblur" lay-skin="switch" lay-text="精确|模糊" checked>
						</div>
                    </div>

					<div class="layui-inline">
					<a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
					<a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
                    <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon">ဂ</i></a>
                    @if(checkRriv('/admin/Allowip/add'))<a href="/admin/Allowip/add" class="layui-btn layui-btn-sm ">添加</a>@endif
                    @if(checkRriv('/admin/Allowip/delete'))<a href="javascript:delWin('/admin/Allowip/delete?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif
				   </div>

                    <!-- &nbsp;&nbsp;&nbsp;&nbsp;<div class="layui-inline"><a href="javascript:openWin('/admin/user/infoAdd','{{ trans('menu.menu_add') }}','700px','500px')" class="layui-btn layui-btn-sm  ">添加</a></div>
                    <div class="layui-inline"><a href="/admin/menu/add" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a></div> -->

                </div>
            </form>
        </div>
    </div>
@push('dataTableJS')
//var active = {
//    reload: function(){
//      //执行重载
//      table.reload('{{ $dataId }}', {
//        page: {
//          curr: 1 //重新从第 1 页开始
//        }
//        ,where: {
//            infoname:$('#infoname').val(),
//        }
//      });
//    }
//  };



//$('.lay-btn-diy').on('click', function(){
//    var type = $(this).data('type');
//    active[type] ? active[type].call(this) : '';
//  });

  //重置表单
  $('.reset').on('click',function(){
	  $('input').val('');
	  $('#infoname').val('');
//	  var type = $(this).data('type');
//	  active[type] ? active[type].call(this) : '';
  });

  //刷新表单
//    $('.set').on('click',function(){
//    var type = $(this).data('type');
//    active[type] ? active[type].call(this) : '';
//    });

@endpush

    @include('vip.datatable')
@endsection
