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
@@ -245,15 +245,15 @@
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"
/>
<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"
/>
<el-table-column
@@ -263,7 +263,7 @@
min-width="120"
>
<template #default="scope">
<el-tag>{{ scope.row.creator?.name }}</el-tag>
<el-tag>{{ scope.row.created_by?.name }}</el-tag>
</template>
</el-table-column>
<el-table-column
@@ -340,13 +340,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>
@@ -449,8 +449,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 },
]);
@@ -460,8 +460,8 @@ const exportColumns = [
{ prop: "name", label: "名称" },
{ prop: "status", label: "状态" },
{ prop: "description", label: "描述" },
{ prop: "created_at", label: "创建时间" },
{ prop: "updated_at", label: "更新时间" },
{ prop: "created_time", label: "创建时间" },
{ prop: "updated_time", label: "更新时间" },
];
// 导入/导出配置