feat: menric

This commit is contained in:
hashbro
2026-09-06 03:55:24 +08:00
parent f94def7c1f
commit d4c096ed4a
50 changed files with 1698 additions and 148 deletions
+20 -1
View File
@@ -15,6 +15,16 @@
</div>
</div>
@include('admin.partials.filter_agent_select')
<div class="layui-inline">
<label class="layui-form-label">已读</label>
<div class="layui-input-block">
<select name="read">
<option value="">全部</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-block">
@@ -32,7 +42,10 @@
<div class="layui-card-body">
<table id="LAY-photo-list" lay-filter="LAY-photo-list"></table>
<script type="text/html" id="LAY-photo-thumb">
<img src="@{{d.url}}" lay-event="preview" title="点击预览" style="max-height:48px;max-width:72px;cursor:pointer;">
<span class="photo-thumb">
<img src="@{{d.url}}" lay-event="preview" title="点击预览" style="max-height:48px;max-width:72px;cursor:pointer;">
@{{# if(!d.read){ }}<i class="photo-unread-dot" title="未读"></i>@{{# } }}
</span>
</script>
<script type="text/html" id="LAY-photo-ops">
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">设备详情</a>
@@ -55,6 +68,9 @@ layui.use(['table', 'form', 'layer'], function () {
{ field: 'thumb', title: '预览', width: 100, templet: '#LAY-photo-thumb' },
{ field: 'device_key', title: '设备 ID', width: 150 },
{ field: 'channel_id', title: '渠道 ID', minWidth: 220 },
{ field: 'read', title: '已读', width: 80, templet: function (d) {
return Number(d.read) === 1 ? '已读' : '<span style="color:#ff5722;">未读</span>';
} },
{ field: 'x_hit', title: '敏感词', width: 90, sort: true },
{ field: 'size', title: '大小', width: 100, sort: true },
{ field: 'created_at', title: '创建时间', width: 170, sort: true },
@@ -82,6 +98,9 @@ layui.use(['table', 'form', 'layer'], function () {
return;
}
if (obj.event === 'preview') {
if (Number(obj.data.read) !== 1) {
obj.update({ read: 1 });
}
var url = obj.data.url;
layer.open({
type: 1,