feat(资产): 抖音号列 + 近7天异常计算列

- 账号总表新增抖音号列
- 近7天状态:account_status_log 近7天异常 + 人工异常,显示 无异常/N天前异常/今天异常(人工)
- 导出 CSV 同步增加近7天状态/最近异常时间/异常来源
- test_roster 覆盖计算规则
This commit is contained in:
2026-10-31 11:14:08 +08:00
parent aba4583641
commit fb32d17877
6 changed files with 116 additions and 11 deletions
+15 -4
View File
@@ -329,6 +329,8 @@ function afHtmlAsset() {
'<td><b>' + esc(a.name) + '</b>' +
(a.in_roster ? '' : ' <span class="label label-warning">账号库没有</span>') +
(a.has_dir ? '' : '<div class="text-muted" style="font-size:11px">还没有素材文件夹</div>') + '</td>' +
'<td class="text-muted" style="font-size:12px;font-family:var(--mono)">' +
(a.douyin_id ? esc(a.douyin_id) : '—') + '</td>' +
'<td>' + devSel + '</td>' +
'<td style="white-space:nowrap">' +
(a.account_status
@@ -346,6 +348,13 @@ function afHtmlAsset() {
esc(a.status_checked_at) + '</div>' : '') +
'</td>' +
'<td>' + afManualStatusHtml(a) + '</td>' +
'<td style="white-space:nowrap">' +
'<span class="label ' + (a.status_7d_abnormal ? 'label-warning' : 'label-success') + '" ' +
'title="' + esc(a.status_7d_abnormal
? ('最近异常 ' + (a.status_7d_at || '') +
(a.status_7d_source ? '(' + a.status_7d_source + ')' : ''))
: '近7天没有异常记录') + '">' +
esc(a.status_7d_text || '无异常') + '</span></td>' +
'<td><button class="btn btn-xs btn-primary" onclick="afAssetOpenAccount(\'' + esc(a.name) + '\')">' +
'入库 <b>' + (a.total || 0) + '</b> · 未发布 <b style="color:#b45309">' + (a.pending || 0) + '</b>' +
' · 已发布 <b style="color:#16a34a">' + (a.done || 0) + '</b>' +
@@ -402,11 +411,13 @@ function afHtmlAsset() {
? ',筛出 ' + shown.length + ' 个' : '') + '</span>' +
'</div>' +
'<table class="table"><thead><tr>' +
'<th style="width:230px">账号</th><th style="width:210px">所属手机</th>' +
'<th style="width:190px">账号状态(自动)</th><th style="width:140px">人工标记</th>' +
'<th style="width:360px">素材库</th><th style="width:140px">最近发布</th><th style="width:190px">操作</th>' +
'<th style="width:210px">账号</th><th style="width:120px">抖音号</th>' +
'<th style="width:200px">所属手机</th>' +
'<th style="width:180px">账号状态(自动)</th><th style="width:130px">人工标记</th>' +
'<th style="width:130px">近7天状态</th>' +
'<th style="width:320px">素材库</th><th style="width:130px">最近发布</th><th style="width:190px">操作</th>' +
'</tr></thead><tbody>' +
(rows || '<tr><td colspan="7" class="empty">' +
(rows || '<tr><td colspan="9" class="empty">' +
((F.device || F.q || F.status) ? '没有符合筛选条件的账号 —— 点「清除筛选」看全部'
: '还没有账号 —— 先「导入/维护账号库」,再「批量上传素材」') +
'</td></tr>') +