feat: 统一状态字段类型为字符串并重构基础类型

refactor: 重构前后端状态字段类型从布尔值改为字符串
feat: 新增基础类型定义和通用类型接口
refactor: 移除不必要的时间范围字段并统一使用created_time
style: 更新前端组件以匹配新的字段命名
docs: 更新接口文档和类型定义
This commit is contained in:
zhangtao
2025-11-27 23:47:23 +08:00
parent 2c9d66e2a7
commit 0c86069efa
73 changed files with 590 additions and 754 deletions
@@ -205,8 +205,8 @@
</template>
</el-table-column>
<el-table-column label="描述" prop="description" min-width="100" />
<el-table-column label="创建时间" prop="created_at" min-width="200" sortable />
<el-table-column label="更新时间" prop="updated_at" min-width="200" sortable />
<el-table-column label="创建时间" prop="created_time" min-width="200" sortable />
<el-table-column label="更新时间" prop="updated_time" min-width="200" sortable />
<OperationColumn :list-data-length="pageTableData.length">
<template #default="scope">
@@ -362,13 +362,13 @@
{{ detailFormData.end_date }}
</el-descriptions-item>
<el-descriptions-item label="创建人" :span="2">
{{ detailFormData.creator?.name }}
{{ detailFormData.created_by?.name }}
</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="2">
{{ detailFormData.created_at }}
{{ detailFormData.created_time }}
</el-descriptions-item>
<el-descriptions-item label="更新时间" :span="2">
{{ detailFormData.updated_at }}
{{ detailFormData.updated_time }}
</el-descriptions-item>
<el-descriptions-item label="描述" :span="4">
{{ detailFormData.description }}
@@ -944,8 +944,8 @@ const exportColumns = [
{ prop: "coalesce", label: "并发执行" },
{ prop: "status", label: "状态" },
{ prop: "description", label: "描述" },
{ prop: "created_at", label: "创建时间" },
{ prop: "updated_at", label: "更新时间" },
{ prop: "created_time", label: "创建时间" },
{ prop: "updated_time", label: "更新时间" },
];
// 导出配置(用于导出弹窗)
@@ -150,11 +150,11 @@
<div class="card-footer">
<div class="footer-item">
<el-icon size="14" class="footer-icon"><User /></el-icon>
<span class="footer-text">{{ app.creator?.name || "未知" }}</span>
<span class="footer-text">{{ app.created_by?.name || "未知" }}</span>
</div>
<div class="footer-item">
<el-icon size="14" class="footer-icon"><Clock /></el-icon>
<span class="footer-text">{{ formatTime(app.created_at) }}</span>
<span class="footer-text">{{ formatTime(app.created_time) }}</span>
</div>
</div>
</template>
@@ -178,16 +178,16 @@
min-width="140"
/>
<el-table-column
v-if="tableColumns.find((col) => col.prop === 'created_at')?.show"
v-if="tableColumns.find((col) => col.prop === 'created_time')?.show"
label="创建时间"
prop="created_at"
prop="created_time"
min-width="180"
sortable
/>
<el-table-column
v-if="tableColumns.find((col) => col.prop === 'updated_at')?.show"
v-if="tableColumns.find((col) => col.prop === 'updated_time')?.show"
label="更新时间"
prop="updated_at"
prop="updated_time"
min-width="180"
sortable
/>
@@ -198,7 +198,7 @@
min-width="100"
>
<template #default="scope">
{{ scope.row.creator?.name }}
{{ scope.row.created_by?.name }}
</template>
</el-table-column>
@@ -276,13 +276,13 @@
{{ detailFormData.description }}
</el-descriptions-item>
<el-descriptions-item label="创建人" :span="2">
{{ detailFormData.creator?.name }}
{{ detailFormData.created_by?.name }}
</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="2">
{{ detailFormData.created_at }}
{{ detailFormData.created_time }}
</el-descriptions-item>
<el-descriptions-item label="更新时间" :span="2">
{{ detailFormData.updated_at }}
{{ detailFormData.updated_time }}
</el-descriptions-item>
</el-descriptions>
</template>
@@ -361,8 +361,8 @@ const tableColumns = ref([
{ prop: "name", label: "名称", show: true },
{ prop: "status", label: "状态", show: true },
{ prop: "description", label: "描述", show: true },
{ prop: "created_at", label: "创建时间", show: true },
{ prop: "updated_at", label: "更新时间", show: true },
{ prop: "created_time", label: "创建时间", show: true },
{ prop: "updated_time", label: "更新时间", show: true },
{ prop: "creator", label: "创建人", show: true },
{ prop: "operation", label: "操作", show: true },
]);