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