<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>列表页面</title>
</head>
<body class="laytp-container">
<div id="search-form" style="display:none;">
    <div class="layui-layer-title">搜索</div>
    <form class="layui-form search-form-body" lay-filter="layui-form" style="margin-top:20px;">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="ID">ID</label>
            <div class="layui-input-inline">
                <input autocomplete="off" type="text" id="id" name="search_param[id][value]" placeholder="请输入ID" class="layui-input">
                <input type="hidden" name="search_param[id][condition]" value="=">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="所属分类">所属分类</label>
            <div class="layui-input-inline">
                <div class="xmSelect"
                    data-name="search_param[category_id][value]"
                    data-sourceType="route"
                    data-source="/admin.files.category/index"
                    data-sourceTree="true"
                    data-paging="false"
                    data-valueField="id"
                    data-textField="name"
                    data-placeholder="请选择所属分类"
                ></div>
                <input type="hidden" name="search_param[category_id][condition]" value="FIND_IN_SET">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="文件名称">文件名称</label>
            <div class="layui-input-inline">
                <input autocomplete="off" type="text" id="name" name="search_param[name][value]" placeholder="请输入文件名称" class="layui-input">
                <input type="hidden" name="search_param[name][condition]" value="LIKE">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="文件类型">文件类型</label>
            <div class="layui-input-inline">
                <select id="file_type" name="search_param[file_type][value]">
                    <option value="">请选择文件类型</option>
                    <option value=""></option>
                    <option value="image">图片</option>
                    <option value="video">视频</option>
                    <option value="audio">音频</option>
                    <option value="file">文件</option>
                </select>
                <input type="hidden" name="search_param[file_type][condition]" value="=">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="上传方式">上传方式</label>
            <div class="layui-input-inline">
                <select id="upload_type" name="search_param[upload_type][value]">
                    <option value="">请选择上传方式</option>
                    <option value=""></option>
                    <option value="local">本地上传</option>
                    <option value="ali-oss">阿里云OSS</option>
                    <option value="qiniu-kodo">七牛云KODO</option>
                </select>
                <input type="hidden" name="search_param[upload_type][condition]" value="=">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="创建者">创建者</label>
            <div class="layui-input-inline">
                <div class="xmSelect"
                    data-name="search_param[create_admin_user_id][value]"
                    data-sourceType="route"
                    data-source="/admin.user/index"
                    data-sourceTree="false"
                    data-paging="true"
                    data-valueField="id"
                    data-textField="nickname"
                    data-placeholder="请选择创建者"
                ></div>
                <input type="hidden" name="search_param[create_admin_user_id][condition]" value="FIND_IN_SET">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label" title="创建时间">创建时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input laydate"
                    id="create_time" name="search_param[create_time][value]"
                    data-type="datetime" data-isRange="true" placeholder="请选择创建时间">
                <input type="hidden" name="search_param[create_time][condition]" value="BETWEEN">
            </div>
        </div>

        <div class="bottom">
            <div class="button-container">
                <button class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="laytp-search-form">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>
                <button type="button" class="laytp-btn laytp-btn-sm laytp-search-form-reset">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button>
            </div>
        </div>
    </form>
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table id="laytp-card" lay-filter="laytp-card" style="width:100%"></table>
    </div>
</div>

<script type="text/html" id="default-toolbar">
    <button class="laytp-btn laytp-btn-warming laytp-btn-md" lay-event="search">
        <i class="layui-icon layui-icon-search"></i>
        搜索
    </button>
    {{# if(facade.hasAuth("/admin.files/recycle")){ }}
    <button class="laytp-btn laytp-btn-success laytp-btn-md" lay-event="recycle">
        <i class="layui-icon layui-icon-delete"></i>
        回收站
    </button>
    {{# } }}
</script>

<script type="text/html" id="default-bar">
    <div class="layui-row">
    {{# if(facade.hasAuth("/admin.files/del")){ }}
    <div class="layui-col-md4">
        <button class="laytp-btn laytp-btn-danger laytp-btn-xs" lay-event="del">
            <i class="layui-icon layui-icon-delete"></i> 删除
        </button>
    </div>
    {{# } }}
    {{# if(facade.hasAuth("/admin.files/preview")){ }}
    <div class="layui-col-md4">
        {{# if(d.file_type!="file"){ }}
        <button class="laytp-btn laytp-btn-normal laytp-btn-xs" lay-event="preview">
            <i class="layui-icon layui-icon-eye"></i> 预览
        </button>
        {{# } }}
    </div>
    {{# } }}
    {{# if(facade.hasAuth("/admin.files/download")){ }}
    <div class="layui-col-md4">
        <button class="laytp-btn laytp-btn-warming laytp-btn-xs" lay-event="download">
            <i class="layui-icon layui-icon-download-circle"></i> 下载
        </button>
    </div>
    {{# } }}
    </div>
</script>

<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/laytp/css/laytp.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/admin/js/files.js?v="+localStorage.getItem("version")+"'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/laytp/css/laytp.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/admin/js/files.js?v="+localStorage.getItem("version")+"'><\/script>");
    }
</script>
</body>
</html>