97 lines
4.2 KiB
HTML
97 lines
4.2 KiB
HTML
|
{layout name="manager/layout" /}
|
||
|
|
||
|
<div class="layui-tab newStyle" lay-filter="site">
|
||
|
<ul class="layui-tab-title">
|
||
|
<li class="layui-this" lay-id="company">磁盘上未使用的文件</li>
|
||
|
<li lay-id="upload">数据库中未使用的文件</li>
|
||
|
</ul>
|
||
|
<div class="layui-tab-content">
|
||
|
<div class="layui-tab-item layui-show">
|
||
|
<table class="layui-table layui-form file-disk" id="file-disk" lay-filter="file-disk" style="width: 50%;">
|
||
|
<colgroup>
|
||
|
<col width="15px" >
|
||
|
<col width="75px">
|
||
|
<col >
|
||
|
<col >
|
||
|
<col width="60px">
|
||
|
<col width="50%">
|
||
|
</colgroup>
|
||
|
<thead>
|
||
|
<td>
|
||
|
<input type="checkbox" lay-filter="select_all" class="select_all" lay-skin="primary" value="disk" title=""/>
|
||
|
</td>
|
||
|
<td>文件</td>
|
||
|
<td>大小</td>
|
||
|
<td>是否存在数据库中</td>
|
||
|
</thead>
|
||
|
{foreach $uploadedNotInUseFiles as $key => $file}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<input type="checkbox" lay-skin="primary" lay-filter="select_item" class="select_item" value="{$file.path}" />
|
||
|
</td>
|
||
|
<td>
|
||
|
{if in_array($file['suffix'], ['jpg', 'jpeg', 'png', 'gif'])}
|
||
|
<div class="layer-photos"><img src="{$file.path}" width="50" /></div>
|
||
|
{elseif in_array($file['suffix'], ['mp4'])}
|
||
|
<div class="layer-video"><video src="{$file.path}" width="50" /></div>
|
||
|
{else /}
|
||
|
<span>{$file.path}</span>
|
||
|
{/if}
|
||
|
</td>
|
||
|
<td>{$file.sizeStr}</td>
|
||
|
<td>
|
||
|
{if in_array($key, $bothNotInUseFilesKey)}是{else /}否{/if}
|
||
|
</td>
|
||
|
</tr>
|
||
|
{/foreach}
|
||
|
</table>
|
||
|
<div><button class="layui-btn layui-btn-danger layui-btn-sm file-del" data-url="{:url('/manager.file/delPath')}" data-filter="file-disk">清除磁盘文件</button></div>
|
||
|
</div>
|
||
|
<div class="layui-tab-item">
|
||
|
<table class="layui-table layui-form file-database" id="file-database" lay-filter="file-database" style="width: 50%;">
|
||
|
<colgroup>
|
||
|
<col width="15px" >
|
||
|
<col width="75px">
|
||
|
<col >
|
||
|
<col >
|
||
|
<col width="60px">
|
||
|
<col width="50%">
|
||
|
</colgroup>
|
||
|
<thead>
|
||
|
<td>
|
||
|
<input type="checkbox" lay-filter="parents-table" lay-skin="primary" value="database" title=""/>
|
||
|
</td>
|
||
|
<td>文件</td>
|
||
|
<td>上传前名称</td>
|
||
|
<td>大小</td>
|
||
|
<td>是否存在磁盘中</td>
|
||
|
</thead>
|
||
|
{foreach $dbUploadedNotInUseFiles as $key => $file}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<input type="checkbox" data-fileId="{$file.id}" lay-filter="childrens-table" value="{$file.id}" lay-skin="primary"/>
|
||
|
</td>
|
||
|
<td>
|
||
|
{if in_array($key, $bothNotInUseFilesKey)}
|
||
|
{if $file['type'] == 'img'}
|
||
|
<div class="layer-photos"><img src="{$file.src}" width="50" /></div>
|
||
|
{elseif $file['type'] == 'video'}
|
||
|
<div class="layer-video"><video src="{$file.src}" width="50" /></div>
|
||
|
{/if}
|
||
|
{else /}
|
||
|
<span>{$file.src}</span>
|
||
|
{/if}
|
||
|
</td>
|
||
|
<td>{$file.name}</td>
|
||
|
<td>{:sizeToStr($file['size'])}</td>
|
||
|
<td>
|
||
|
{if in_array($key, $bothNotInUseFilesKey)}是{else /}否{/if}
|
||
|
</td>
|
||
|
</tr>
|
||
|
{/foreach}
|
||
|
</table>
|
||
|
<div><button class="layui-btn layui-btn-danger layui-btn-sm delAll" data-url="{:url('/manager.file/del')}" data-filter="file-database" >清除数据库文件</button></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|