增加渠道上传预统计

This commit is contained in:
yml2213
2026-07-25 14:34:03 +08:00
parent 1ea01f7d46
commit 7ca68e6b8b
15 changed files with 689 additions and 63 deletions
@@ -137,7 +137,12 @@ function selectListing(row: Listing) {
function replaceListing(next: Listing) {
const index = listings.value.findIndex(item => item.id === next.id)
if (index >= 0) {
listings.value.splice(index, 1, next)
const previous = listings.value[index]!
listings.value.splice(index, 1, {
...previous,
...next,
source_channel: next.source_channel || previous.source_channel,
})
} else {
listings.value.unshift(next)
}
@@ -422,6 +427,13 @@ function contactPhone(row: Listing) {
return typeof value === 'string' && value.trim() ? value : '-'
}
function sourceChannel(row: Listing) {
if (typeof row.source_channel === 'string' && row.source_channel.trim()) {
return row.source_channel.trim()
}
return isExternalUpload(row) ? '未填写' : '站内发布'
}
function ownerOnlineText(row: Listing) {
const text = row.asset_summary?.online_time_text
if (typeof text === 'string' && text.trim()) return text
@@ -456,7 +468,15 @@ function isDefaultScreenshot(url: string) {
function riskItems(row: Listing): RiskItem[] {
const items: RiskItem[] = []
if (isExternalUpload(row)) items.push({ label: `外部上传:${uploaderName(row)}`, level: 'info' })
if (isExternalUpload(row)) {
items.push({
label: `外部上传:${uploaderName(row)} / 渠道:${sourceChannel(row)}`,
level: 'info',
})
} else {
items.push({ label: `来源渠道:${sourceChannel(row)}`, level: 'info' })
}
const infoCount = items.length
if (!row.screenshot_urls?.length) items.push({ label: '没有账号截图', level: 'danger' })
if (hasDefaultScreenshot(row)) items.push({ label: '使用默认截图', level: 'warning' })
if (hasBanRecord(row)) items.push({ label: `封禁记录:${banRecordText(row)}`, level: 'danger' })
@@ -472,7 +492,7 @@ function riskItems(row: Listing): RiskItem[] {
items.push({ label: '烽火等级接近下限', level: 'warning' })
if (!readAssetString(row, 'season_insurance'))
items.push({ label: '缺少保险格数', level: 'warning' })
if (!items.length) items.push({ label: '未发现明显风险', level: 'info' })
if (items.length === infoCount) items.push({ label: '未发现明显风险', level: 'info' })
return items
}
@@ -495,6 +515,7 @@ function reviewSearchText(row: Listing) {
row.login_platform,
row.rank_level,
uploaderName(row),
sourceChannel(row),
getSkinNames(row).join(' '),
]
.join(' ')
@@ -602,7 +623,7 @@ async function openScreenshot(url: string) {
v-model="filters.keyword"
:prefix-icon="Search"
clearable
placeholder="搜索编号、标题、客服、段位、皮肤"
placeholder="搜索编号、标题、客服、渠道、段位、皮肤"
/>
<el-select v-model="filters.risk" placeholder="风险筛选">
<el-option label="全部待审" value="all" />
@@ -642,10 +663,17 @@ async function openScreenshot(url: string) {
formatCent(item.deposit_amount_cent)
}}</span
>
<el-tag v-if="isExternalUpload(item)" size="small" type="info">{{
uploaderName(item)
}}</el-tag>
<el-tag v-if="hasDefaultScreenshot(item)" size="small" type="warning">默认图</el-tag>
<div class="queue-tags">
<el-tag size="small" type="primary" effect="plain">{{
sourceChannel(item)
}}</el-tag>
<el-tag v-if="isExternalUpload(item)" size="small" type="info">{{
uploaderName(item)
}}</el-tag>
<el-tag v-if="hasDefaultScreenshot(item)" size="small" type="warning"
>默认图</el-tag
>
</div>
</div>
</button>
<el-empty
@@ -782,11 +810,20 @@ async function openScreenshot(url: string) {
<div class="review-panel">
<div class="panel-title">
<h3>上传信息</h3>
<el-tag v-if="isExternalUpload(selectedListing)" size="small" type="info"
>外部上传</el-tag
>
<div class="panel-tags">
<el-tag size="small" type="primary" effect="plain">{{
sourceChannel(selectedListing)
}}</el-tag>
<el-tag v-if="isExternalUpload(selectedListing)" size="small" type="info"
>外部上传</el-tag
>
</div>
</div>
<dl class="detail-list">
<div>
<dt>来源渠道</dt>
<dd>{{ sourceChannel(selectedListing) }}</dd>
</div>
<div>
<dt>上传人</dt>
<dd>{{ uploaderName(selectedListing) }}</dd>
@@ -1206,6 +1243,14 @@ async function openScreenshot(url: string) {
align-items: center;
}
.queue-tags,
.panel-tags {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 6px;
}
.review-detail {
display: flex;
flex-direction: column;