<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="padding:0;">
                <div class="layui-form-item border-b">
                    <div class="layui-inline">
                        <label class="layui-form-label">创建时间</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="laydate-range-datetime" placeholder="" lay-key="28">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 38px;">
                        <button class="layui-btn layuiadmin-btn-useradmin"  lay-submit lay-filter="query">查询</button>
                        <button class="layui-btn  layui-btn-primary"  lay-submit lay-filter="reset">重置</button>
                    </div>
                </div>

                <!-- 表格+头部按钮 -->
                <div class="layui-card-body"  style="padding:0;">
                    <div style="padding-bottom: 10px;">
                        <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="add" sptg:security="estate:car:add">添加车辆</button>
                    </div>
                    <table id="table-id" lay-filter="table-id"></table>
                    <input type="hidden" id="fastDfsServer" th:value="${fastDfsServer}">
                </div>
            </div>

        </div>
    </div>

    <script type="text/html" id="car_img">
        {{# if(d.carImg != null && d.carImg != ''){ }}
        <img src="{{d.carImg}}" style="display: inline-block; width: 20%; height: 100%;cursor: zoom-in;filter: blur(2px);" >
        {{# } }}
    </script>

    <script type="text/html" id="vehicleDrivingLicense1">
        {{# var fastDfsServer = document.getElementById("fastDfsServer").value;}}
        {{# if(d.vehicleDrivingLicense1 != null && d.vehicleDrivingLicense1 != ''){ }}
        <img src="{{d.vehicleDrivingLicense1}}" style="display: inline-block; width: 20%; height: 100%;cursor: zoom-in;filter: blur(2px);">
        {{# } }}
    </script>
    <script type="text/html" id="vehicleDrivingLicense2">
        {{# var fastDfsServer = document.getElementById("fastDfsServer").value;}}
        {{# if(d.vehicleDrivingLicense2 != null && d.vehicleDrivingLicense2 != ''){ }}
        <img src="{{d.vehicleDrivingLicense2}}" style="display: inline-block; width: 20%; height: 100%;cursor: zoom-in;filter: blur(2px);">
        {{# } }}
    </script>
    <!-- 车辆类型 -->
    <script type="text/html" id="car_type">
        {{#  if(d.type == 0){ }}
        <span>轿车</span>
        {{#  }else if(d.type == 1){ }}
        <span>货车</span>
        {{#  }else if(d.type == 2){ }}
        <span>客车</span>
        {{#  }else if(d.type == 3){ }}
        <span>挂车</span>
        {{#  }else if(d.type == 4){ }}
        <span>摩托车</span>
        {{#  }else if(d.type == 5){ }}
        <span>非完整车辆</span>
        {{#  }else if(d.type == 5){ }}
        <span>电动车辆</span>
        {{# }else { }}
        <span></span>
        {{# } }}
    </script>

    <script type="text/html" id="table-useradmin-webuser">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit" sptg:security="estate:car:edit">修改</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="application" sptg:security="estate:car:edit">审核</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete" sptg:security="estate:car:delete">删除</a>
    </script>

    <script type="text/javascript" th:src="@{'/layui/layui.js '}" charset="utf-8"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/estate/car-manage.js'}" charset="utf-8"></script>
</body>
</html>