@extends('vip.layouts')
@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>
	<script type="text/html" id="selectip">
	  <a href="/admin/Adminlog/logipDetail?ip=@{{d.ip}}">@{{ d.ip}}</a>
	</script>

  <script type="text/html" id="desc">
   <span style="width: 100%;word-wrap: break-word;">@{{ d.operation}}</span>
  </script>

<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('system_user.loginname') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="loginname" id="loginname" lay-verify="required" eventType="event-query"  value="{{ $loginname }}" 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">
					<label class="layui-form-label">{{ trans('system_user.ip') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="ip"  id="ip"  lay-verify="" eventType="event-query"  value="{{ $ip }}" autocomplete="off" class="layui-input">
					</div>
                </div>
                <div class="layui-inline">
					<label class="layui-form-label">{{ trans('system_user.operation') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="operation"  id="operation" eventType="event-query"  value="{{ $operation }}" lay-verify="" autocomplete="off" class="layui-input">
					</div>
                </div>
				<div class="layui-inline">
					<label class="layui-form-label">{{ trans('system_user.star_time') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="star_time" value="{{ $star_time }}" id="star_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
					</div>
                </div>
                <div class="layui-inline">
					<label class="layui-form-label">{{ trans('system_user.end_time') }}</label>
					<div class="layui-input-inline">
						<input type="text" name="end_time"  value="{{$end_time}}" id="end_time" placeholder=" - " word-break: break-all; lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
					</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>
               </div>

            </div>
       </form>
    </div>
    </div>
@push('dataTableJS')
/*var active = {
    reload: function(){
      //执行重载
      table.reload('{{ $dataId }}', {
        page: {
          curr: 1 //重新从第 1 页开始
        }
        ,where: {
            loginname:$("#loginname").val(),
            ip:$('#ip').val(),
            operation:$('#operation').val(),
            star_time:$('#star_time').val(),
            end_time:$('#end_time').val(),
			sureblur:$('.layui-form-switch').text(),
        }
      });
    }
  };
$('.lay-btn-diy').on('click', function(){
    var type = $(this).data('type');
    active[type] ? active[type].call(this) : '';
  });*/

  //重置表单
  $('.reset').on('click',function(){
	  $('input').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
