refactor(project-detail): 调整里程碑和日报组件的布局结构
All checks were successful
Lint Code / Lint Code (push) Successful in 2m46s

- 简化里程碑名称和删除按钮的模板语法,移除不必要的换行
- 将项目日报卡片从独立行移至里程碑卡片下方,使用 `mt-4` 间距分隔
- 保持原有功能和样式不变,仅优化视觉层级和代码结构
This commit is contained in:
2026-04-01 16:22:28 +08:00
parent 5b96f54d71
commit 00c521540e

View File

@@ -1809,124 +1809,122 @@ onMounted(() => {
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="16" class="mt-4">
<el-col :xs="24" :lg="24">
<el-card shadow="hover">
<template #header>
<div class="flex-bc">
<div class="flex items-center gap-2">
<component :is="useRenderIcon('ri/file-text-line')" />
<span class="font-medium">项目日报</span>
<el-tag
v-if="dailyReportWithAnalysisTotal"
size="small"
type="info"
>
{{ dailyReportWithAnalysisTotal }} 条
</el-tag>
<div class="mt-4">
<el-card shadow="hover">
<template #header>
<div class="flex-bc">
<div class="flex items-center gap-2">
<component :is="useRenderIcon('ri/file-text-line')" />
<span class="font-medium">项目日报</span>
<el-tag
v-if="dailyReportWithAnalysisTotal"
size="small"
type="info"
>
{{ dailyReportWithAnalysisTotal }} 条
</el-tag>
</div>
<div class="flex gap-2">
<el-button
link
:disabled="dailyReportWithAnalysisLoading"
@click="fetchDailyReportWithAnalysis"
>
<component :is="useRenderIcon(RefreshIcon)" />
</el-button>
</div>
</div>
<div class="flex gap-2">
</template>
<div v-loading="dailyReportWithAnalysisLoading">
<div class="flex items-center gap-2 mb-3">
<el-date-picker
v-model="dailyReportWithAnalysisQuery.reportDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="日报日期"
clearable
/>
<el-input
v-model="dailyReportWithAnalysisQuery.suggestionStatus"
placeholder="建议状态(可选)"
clearable
style="max-width: 180px"
/>
<el-button
link
:disabled="dailyReportWithAnalysisLoading"
@click="fetchDailyReportWithAnalysis"
type="primary"
size="small"
:loading="dailyReportWithAnalysisLoading"
@click="handleDailyReportWithAnalysisSearch"
>
<component :is="useRenderIcon(RefreshIcon)" />
查询
</el-button>
<el-button
size="small"
:disabled="dailyReportWithAnalysisLoading"
@click="resetDailyReportWithAnalysisFilters"
>
重置
</el-button>
</div>
</div>
</template>
<div v-loading="dailyReportWithAnalysisLoading">
<div class="flex items-center gap-2 mb-3">
<el-date-picker
v-model="dailyReportWithAnalysisQuery.reportDate"
type="date"
value-format="YYYY-MM-DD"
placeholder="日报日期"
clearable
/>
<el-input
v-model="dailyReportWithAnalysisQuery.suggestionStatus"
placeholder="建议状态(可选)"
clearable
style="max-width: 180px"
/>
<el-button
type="primary"
size="small"
:loading="dailyReportWithAnalysisLoading"
@click="handleDailyReportWithAnalysisSearch"
>
查询
</el-button>
<el-button
size="small"
:disabled="dailyReportWithAnalysisLoading"
@click="resetDailyReportWithAnalysisFilters"
>
重置
</el-button>
</div>
<el-table
:data="dailyReportWithAnalysisRows"
highlight-current-row
style="width: 100%"
@row-click="openDailyReportDetail"
>
<el-table-column label="日期" width="120">
<template #default="{ row }">
{{ row.reportDate || "--" }}
</template>
</el-table-column>
<el-table-column label="提交人" width="120">
<template #default="{ row }">
{{ row.submitterUsername || "--" }}
</template>
</el-table-column>
<el-table-column label="分析状态" width="120">
<template #default="{ row }">
<el-tag size="small" type="info">
{{ row.analysisStatus || "--" }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="工时" width="90">
<template #default="{ row }">
{{ row.workIntensity ?? "--" }}
</template>
</el-table-column>
<el-table-column label="需协助" width="90">
<template #default="{ row }">
{{ row.needHelp ? "是" : "否" }}
</template>
</el-table-column>
<el-table-column label="内容" min-width="220">
<template #default="{ row }">
<div class="text-sm line-clamp-2">
{{ row.workContent || "--" }}
</div>
</template>
</el-table-column>
</el-table>
<el-table
:data="dailyReportWithAnalysisRows"
highlight-current-row
style="width: 100%"
@row-click="openDailyReportDetail"
>
<el-table-column label="日期" width="120">
<template #default="{ row }">
{{ row.reportDate || "--" }}
</template>
</el-table-column>
<el-table-column label="提交人" width="120">
<template #default="{ row }">
{{ row.submitterUsername || "--" }}
</template>
</el-table-column>
<el-table-column label="分析状态" width="120">
<template #default="{ row }">
<el-tag size="small" type="info">
{{ row.analysisStatus || "--" }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="工时" width="90">
<template #default="{ row }">
{{ row.workIntensity ?? "--" }}
</template>
</el-table-column>
<el-table-column label="需协助" width="90">
<template #default="{ row }">
{{ row.needHelp ? "是" : "否" }}
</template>
</el-table-column>
<el-table-column label="内容" min-width="220">
<template #default="{ row }">
<div class="text-sm line-clamp-2">
{{ row.workContent || "--" }}
</div>
</template>
</el-table-column>
</el-table>
<div class="flex justify-end mt-3">
<el-pagination
background
layout="total, sizes, prev, pager, next"
:total="dailyReportWithAnalysisTotal"
:page-size="dailyReportWithAnalysisQuery.pageSize"
:current-page="dailyReportWithAnalysisQuery.pageNum"
:page-sizes="[5, 10, 20, 50]"
@current-change="handleDailyReportWithAnalysisPageChange"
@size-change="handleDailyReportWithAnalysisSizeChange"
/>
<div class="flex justify-end mt-3">
<el-pagination
background
layout="total, sizes, prev, pager, next"
:total="dailyReportWithAnalysisTotal"
:page-size="dailyReportWithAnalysisQuery.pageSize"
:current-page="dailyReportWithAnalysisQuery.pageNum"
:page-sizes="[5, 10, 20, 50]"
@current-change="handleDailyReportWithAnalysisPageChange"
@size-change="handleDailyReportWithAnalysisSizeChange"
/>
</div>
</div>
</div>
</el-card>
</el-card>
</div>
</el-col>
</el-row>