diff --git a/static/app.js b/static/app.js index d5097eb..37a6c51 100644 --- a/static/app.js +++ b/static/app.js @@ -176,7 +176,7 @@ window.switchTab = switchTab; function renderProjects() { const items = state.data.operations; const rows = items.map((x) => [ - `${x.project_name}

${x.project_version}

`, + `${x.project_name}`, text(x.customer_need || x.notes), badge(x.current_stage || x.project_status), x.expected_contract_amount ? money(x.expected_contract_amount) : "—", @@ -186,7 +186,6 @@ function renderProjects() { document.querySelector("#projects").innerHTML = `
${card(formHtml([ { label: "项目名称", input: `` }, - { label: "项目版本", input: `` }, { label: "当前阶段", input: `` }, { label: "项目金额", input: `` }, { label: "负责人", input: `` }, @@ -199,11 +198,12 @@ function showTaskModal(projectId) { const project = state.data.operations.find((x) => x.id === projectId); const tasks = (state.data.tasks || []).filter((t) => t.project_id === projectId); const phases = ["项目准备", "项目执行", "项目验收", "验收完毕"]; - document.querySelector("#taskModal").innerHTML = `

${project.project_name} · 任务清单

${phases.map((phase) => { + document.querySelector("#taskModal").innerHTML = `

${project.project_name} · 任务清单

${phases.map((phase) => { const pt = tasks.filter((t) => t.phase === phase); - return `
${phase}${pt.length ? ` (${pt.filter(t=>t.task).length}/${pt.length})` : ""}
${pt.length ? pt.map((t) => `

${t.milestone ? `${t.milestone}:` : ""}${t.task}

${t.owner ? `

👤 ${t.owner}${t.due_date ? " · 📅 " + t.due_date : ""}

` : ""}
`).join("") : `

暂无任务

`}
`; + return `
${phase}${pt.length}
${pt.length ? pt.map((t) => `
${t.task}
`).join("") : `
暂无任务
`}
`; }).join("")}
`; document.querySelector("#taskModal").classList.add("active"); + if (window.lucide) window.lucide.createIcons(); } window.closeTaskModal = () => document.querySelector("#taskModal").classList.remove("active"); diff --git a/static/styles.css b/static/styles.css index 3e5acbf..bf4c92b 100644 --- a/static/styles.css +++ b/static/styles.css @@ -490,15 +490,54 @@ td { margin: 4px 0; } -/* Task Modal */ +/* Task Modal — Plane style */ .task-modal { display: none; } .task-modal.active { display: block; } .task-overlay { - position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 200; + position: fixed; inset: 0; background: rgba(10,12,16,0.5); z-index: 200; display: flex; align-items: flex-start; justify-content: center; - padding-top: 60px; overflow-y: auto; + padding-top: 48px; overflow-y: auto; } .task-panel { - background: white; border-radius: 12px; width: 800px; max-width: 90vw; - box-shadow: 0 20px 60px rgba(0,0,0,0.15); margin-bottom: 60px; + background: #18191c; border-radius: 12px; width: 600px; max-width: 92vw; + box-shadow: 0 24px 80px rgba(0,0,0,0.4); margin-bottom: 48px; } +.task-header { + display: flex; align-items: center; justify-content: space-between; + padding: 16px 20px; border-bottom: 1px solid #2a2d34; +} +.task-title { color: #e4e5e7; font-size: 15px; font-weight: 600; } +.task-close { + color: #6b6d75; background: none; border: none; cursor: pointer; + padding: 4px; border-radius: 6px; display: flex; +} +.task-close:hover { color: #e4e5e7; background: #2a2d34; } +.task-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; } +.task-group { + background: #1e2025; border-radius: 8px; + border: 1px solid #2a2d34; overflow: hidden; +} +.task-group-hd { + display: flex; align-items: center; gap: 8px; + padding: 10px 14px; +} +.task-group-icon { color: #6b6d75; display: flex; } +.task-group-label { color: #aeafb4; font-size: 13px; font-weight: 600; } +.task-group-n { + background: #2a2d34; color: #6b6d75; font-size: 11px; + padding: 1px 7px; border-radius: 10px; +} +.task-group-list { display: flex; flex-direction: column; } +.task-row { + display: flex; align-items: center; gap: 10px; + padding: 8px 14px; border-top: 1px solid #24272d; +} +.task-dot { display: flex; color: #4b4d54; } +.task-name { color: #c5c6ca; font-size: 13px; } +.task-none { color: #4b4d54; font-size: 13px; padding: 12px 14px; text-align: center; border-top: 1px solid #24272d; } +.task-group-add { + display: block; width: 100%; padding: 10px; text-align: center; + color: #6b6d75; font-size: 13px; background: none; border: none; + border-top: 1px solid #24272d; cursor: pointer; +} +.task-group-add:hover { color: #e4e5e7; background: #24272d; }