feat(tasks): 大屏任务卡展示增强 —— 接单方式/截止/交付时限/人数/独占/发包方
- taskData.js normalizeTask 加 mode/modeLabel/deadline/deliveryDays/headcount/exclusive/publisherName。 - TaskDisplay.jsx 卡片增 接单方式+预算、截止/交付时限/独占|人数 徽标、发包方。 - task-display.css 加 task-meta 行样式。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,13 @@ function normalizeTask(raw, idx) {
|
||||
budgetMin: Number(t.budget_min) || 0,
|
||||
budgetMax: Number(t.budget_max) || 0,
|
||||
budgetLabel: fmtBudget(t.budget_min, t.budget_max),
|
||||
mode: t.mode || 'grab',
|
||||
modeLabel: MODE_LABEL[t.mode] || '抢单',
|
||||
deadline: t.deadline || '',
|
||||
deliveryDays: Number(t.delivery_days) || 0,
|
||||
headcount: Number(t.headcount) || 0,
|
||||
exclusive: !!t.exclusive,
|
||||
publisherName: t.publisher_name || '',
|
||||
status: t.status || 'published',
|
||||
claimed: t.status === 'claimed' || t.status === 'doing' || !!t.claimed_by,
|
||||
claimedBy: t.claimed_by || '',
|
||||
@@ -26,6 +33,10 @@ function normalizeTask(raw, idx) {
|
||||
};
|
||||
}
|
||||
|
||||
const MODE_LABEL = {
|
||||
grab: '抢单', bid: '竞标', assign: '指派', recommend: '推荐',
|
||||
};
|
||||
|
||||
function fmtBudget(min, max) {
|
||||
const n = Number(min) || 0, x = Number(max) || 0;
|
||||
if (!n && !x) return '面议';
|
||||
|
||||
Reference in New Issue
Block a user