150 lines
6.0 KiB
HTML
Executable File
150 lines
6.0 KiB
HTML
Executable File
{layout name="manager/layout" /}
|
||
<style>
|
||
.layui-table-cell{
|
||
text-align: center;
|
||
height: auto;
|
||
white-space: normal;
|
||
}
|
||
.layui-table img{
|
||
max-height: 100%;
|
||
object-fit: cover;
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
display: block;
|
||
max-width: 150px;
|
||
vertical-align: middle;
|
||
border: 0;
|
||
}
|
||
</style>
|
||
<div class="layuimini-container location-file-page">
|
||
<div class="layuimini-main">
|
||
<fieldset class="table-search-fieldset" style="display: none">
|
||
<legend>搜索信息</legend>
|
||
<div style="margin: 10px 10px 10px 10px">
|
||
<form class="layui-form layui-form-pane" action="">
|
||
<div class="layui-form-item">
|
||
<div class="layui-inline layui-hide">
|
||
<label class="layui-form-label">是否OSS</label>
|
||
<div class="layui-input-block">
|
||
<select name="is_oss">
|
||
<option value="-1">全部</option>
|
||
<option value="0">否</option>
|
||
<option value="1">是</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<label class="layui-form-label">文件名</label>
|
||
<div class="layui-input-inline">
|
||
<input type="text" name="name" placeholder="模糊搜索" autocomplete="off" class="layui-input">
|
||
</div>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</fieldset>
|
||
<div>
|
||
<br>
|
||
<blockquote class="layui-elem-quote layui-quote-nm layui-hide">
|
||
失效文件:本地不存在,oss也不存在的文件
|
||
</blockquote>
|
||
<a class="upload-btn" style="display: none" href="javascript:;" data-url="/manager/upload/file" data-field="file_file" data-accept="*" data-mimetype="*"><i class="fa fa-plus"></i> 添加</a>
|
||
<table id="table-container" class="layui-table" data-url="/manager/attachment/file?type={$type}&multiple={$multiple}" lay-filter="table-container-filter"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 隐藏列 -->
|
||
<!-- 编辑单元格提交url -->
|
||
<input type="hidden" id="row-modify" data-url="/manager/attachment/modify">
|
||
<!-- oss URL -->
|
||
<input type="hidden" id="oss-url" data-url="{$oss ?? ''}">
|
||
|
||
<!-- 列 类型 -->
|
||
<script type="text/html" id="row-type">
|
||
{{# if (d.type == 'image') { }}
|
||
<i class="fa fa-image"></i> 图片
|
||
{{# } }}
|
||
{{# if (d.type == 'video') { }}
|
||
<i class="fa fa-youtube-play"></i> 视频
|
||
{{# } }}
|
||
{{# if (d.type == 'file') { }}
|
||
<i class="fa fa-file"></i> 文件
|
||
{{# } }}
|
||
</script>
|
||
|
||
<!-- 列 是否OSS -->
|
||
<script type="text/html" id="row-oss">
|
||
{{# if (d.is_oss) { }}
|
||
是
|
||
{{# } else { }}
|
||
否
|
||
{{# } }}
|
||
</script>
|
||
|
||
<!-- 列 文件是否失效 即本地没有&&oss没有=失效 -->
|
||
<script type="text/html" id="row-local">
|
||
{{# if (d.is_oss == 0 && d.has_local == 0) { }}
|
||
<span style="color: red">是</span>
|
||
{{# } else { }}
|
||
否
|
||
{{# } }}
|
||
</script>
|
||
|
||
<!-- 列 封面图 -->
|
||
<script type="text/html" id="row-cover">
|
||
<div>
|
||
{{# if (d.type == 'image') { }}
|
||
{{# if (d.is_oss) { }}
|
||
<a href="{$oss ?? ''}{{ d.src }}" target="_blank">
|
||
<img src="{$oss ?? ''}{{ d.src }}" alt="">
|
||
</a>
|
||
{{# } else { }}
|
||
<a href="{{ d.src }}" target="_blank">
|
||
<img src="{{ d.src }}" alt="">
|
||
</a>
|
||
{{# } }}
|
||
{{# } }}
|
||
|
||
{{# if (d.type == 'video') { }}
|
||
{{# if (d.is_oss) { }}
|
||
<a href="{$oss ?? ''}{{ d.src }}" target="_blank">
|
||
<img src="/static/manager/image/video.png" alt="">
|
||
</a>
|
||
{{# } else { }}
|
||
<a href="{{ d.src }}" target="_blank">
|
||
<img src="/static/manager/image/video.png" alt="">
|
||
</a>
|
||
{{# } }}
|
||
</a>
|
||
{{# } }}
|
||
{{# if (d.type == 'file') { }}
|
||
<img src="/static/manager/image/file.png" alt="">
|
||
{{# } }}
|
||
</div>
|
||
</script>
|
||
|
||
<!-- 操作列 -->
|
||
<script type="text/html" id="row-operate">
|
||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-href="/manager/attachment/del.html?id={{d.id}}" lay-event="del"><i class="fa fa-trash"></i> 删除</a>
|
||
{if $selected}
|
||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="select"><i class="fa fa-check"></i> 选择</a>
|
||
{/if}
|
||
</script>
|
||
|
||
<!-- toolbar -->
|
||
<script type="text/html" id="toolbar-tpl">
|
||
<a class="layui-btn layui-btn-sm layui-btn-sm" data-table-refresh lay-event="refresh"><i class="fa fa-refresh"></i></a>
|
||
{if $selected}
|
||
<a class="layui-btn layui-btn-normal layui-btn-sm" href="javascript:;" lay-event="multiple"><i class="fa fa-check"></i> 选择</a>
|
||
{else /}
|
||
<!-- <a class="layui-btn layui-btn-normal layui-btn-sm" href="javascript:;" lay-event="upload"><i class="fa fa-plus"></i> 添加</a>-->
|
||
<a class="layui-btn layui-btn-warm layui-btn-sm" href="javascript:;" lay-event="lost"><i class="fa fa-trash"></i> 一键删除失效文件</a>
|
||
<a class="layui-btn layui-btn-default layui-btn-sm" href="javascript:;" lay-event="oss"><i class="fa fa-cloud-upload"></i> 本地文件一键上传OSS</a>
|
||
<a class="layui-btn layui-btn-danger layui-btn-sm" data-href="/manager/attachment/del.html" lay-event="del"><i class="fa fa-trash-o"></i> 删除</a>
|
||
{/if}
|
||
</script>
|
||
<script src="__MANAGER__/js/attachment.js?v={:mt_rand()}"></script> |