fix: 修复两端走查发现的4个UI断点
- 门户回填表单:缺发布截图时提交按钮前置禁用并提示「先上传发布截图,
链接回填需以截图为凭证」,不再等提交后才 toast 报错(服务端守卫保留)
- 门户笔记详情:回填链接前收起回收区块的说明与示例图,只留一行锁定提示,
降低回填阶段信息密度
- 运营端分发表:数据状态按任务采集计划显示等待日(等待D{首个采集日}),
未设置计划时显示「待设置采集计划」,不再写死「等待D2」
- 截图包回收清单:序号列对无 source_row 的内容回退行号;种子内容补
source_row,演示数据导出不再出现空序号
This commit is contained in:
@@ -188,6 +188,8 @@ type Distribution = {
|
||||
task_platform: "小红书" | "抖音";
|
||||
content_format: "image_text" | "video";
|
||||
due_at: string;
|
||||
task_collection_days: string | null;
|
||||
task_collection_start_date: string | null;
|
||||
};
|
||||
|
||||
type RecoverySortKey =
|
||||
@@ -5033,6 +5035,25 @@ function DistributionTable({
|
||||
onRelease?: (distribution: Distribution) => void;
|
||||
showRecovery?: boolean;
|
||||
}) {
|
||||
// 已发布但还没采到数据的行:有计划时按首个采集日显示,没计划时
|
||||
// 明说待设置,而不是写死「等待D2」误导运营。
|
||||
const waitingCollectionLabel = (item: Distribution) => {
|
||||
let days: number[] = [];
|
||||
try {
|
||||
const parsed = JSON.parse(item.task_collection_days || "[]") as unknown;
|
||||
if (Array.isArray(parsed)) {
|
||||
days = parsed
|
||||
.map(Number)
|
||||
.filter((day) => Number.isInteger(day) && day >= 1 && day <= 7);
|
||||
}
|
||||
} catch {
|
||||
days = [];
|
||||
}
|
||||
if (!item.task_collection_start_date || days.length === 0) {
|
||||
return "待设置采集计划";
|
||||
}
|
||||
return `等待D${Math.min(...days)}`;
|
||||
};
|
||||
return (
|
||||
<div className="table-scroll">
|
||||
<table className="data-table">
|
||||
@@ -5075,7 +5096,11 @@ function DistributionTable({
|
||||
) : item.d2_likes !== null ? (
|
||||
<span className="metric-waiting">采集中</span>
|
||||
) : (
|
||||
<span className="muted">{item.publish_url ? "等待D2" : "尚未发布"}</span>
|
||||
<span className="muted">
|
||||
{item.publish_url
|
||||
? waitingCollectionLabel(item)
|
||||
: "尚未发布"}
|
||||
</span>
|
||||
)}
|
||||
</td>
|
||||
{showRecovery && (
|
||||
|
||||
@@ -78,7 +78,7 @@ export async function GET(request: Request) {
|
||||
exported += 1;
|
||||
}
|
||||
manifest.push([
|
||||
String(row.source_row ?? ""),
|
||||
String(row.source_row ?? rowIndex + 1),
|
||||
row.title,
|
||||
row.claimant_name || row.partner_name,
|
||||
row.claimed_at,
|
||||
|
||||
Reference in New Issue
Block a user