feat: interapt
This commit is contained in:
@@ -15,15 +15,15 @@
|
||||
<div class="layui-card-header">扫描进度</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="scan-bar">
|
||||
<div class="scan-tile">
|
||||
<div class="scan-tile" id="scan-photo-tile">
|
||||
<div>相册</div>
|
||||
<strong>{{ $photoProgress['scanned'] ?? 0 }} / {{ $photoProgress['total'] ?? 0 }}</strong>
|
||||
<div>已扫 / 总数 · 疑似 {{ $photoProgress['suspected'] ?? 0 }} · 确定 {{ $photoProgress['confirmed'] ?? 0 }}</div>
|
||||
<strong data-scan-main>—</strong>
|
||||
<div data-scan-sub>已扫 / 总数 · 加载中</div>
|
||||
</div>
|
||||
<div class="scan-tile">
|
||||
<div class="scan-tile" id="scan-note-tile">
|
||||
<div>备忘录</div>
|
||||
<strong>{{ $noteProgress['scanned'] ?? 0 }} / {{ $noteProgress['total'] ?? 0 }}</strong>
|
||||
<div>已扫 / 总数 · 疑似 {{ $noteProgress['suspected'] ?? 0 }} · 确定 {{ $noteProgress['confirmed'] ?? 0 }}</div>
|
||||
<strong data-scan-main>—</strong>
|
||||
<div data-scan-sub>已扫 / 总数 · 加载中</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,9 +89,25 @@ layui.use(['table', 'form', 'layer'], function () {
|
||||
var table = layui.table, form = layui.form, layer = layui.layer, $ = layui.$;
|
||||
var token = @json(csrf_token());
|
||||
var actionBase = @json(url('/'.$portal.'/findings'));
|
||||
var progressUrl = @json(route($portal.'.findings.progress'));
|
||||
|
||||
if (window.CorunaFilterOptions) CorunaFilterOptions.apply(form);
|
||||
|
||||
function fillScanTile(id, row) {
|
||||
var tile = document.getElementById(id);
|
||||
if (!tile || !row) return;
|
||||
var main = tile.querySelector('[data-scan-main]');
|
||||
var sub = tile.querySelector('[data-scan-sub]');
|
||||
if (main) main.textContent = (row.scanned || 0) + ' / ' + (row.total || 0);
|
||||
if (sub) sub.textContent = '已扫 / 总数 · 疑似 ' + (row.suspected || 0) + ' · 确定 ' + (row.confirmed || 0);
|
||||
}
|
||||
|
||||
$.getJSON(progressUrl).done(function (res) {
|
||||
if (!res || res.code !== 0) return;
|
||||
fillScanTile('scan-photo-tile', res.photo);
|
||||
fillScanTile('scan-note-tile', res.note);
|
||||
});
|
||||
|
||||
table.render({
|
||||
elem: '#LAY-find-list',
|
||||
id: 'LAY-find-list',
|
||||
|
||||
Reference in New Issue
Block a user