1、后端数据库model优化,解决mysql、sqlite初始化问题,同时满足

2、部门表移除创建人,负责会和user表有外键循环引用问题,这样设计合理
3、前端所有列表左对齐,移除部门详情中创建人字段
This commit is contained in:
zhangtao
2024-12-11 20:20:46 +08:00
parent 0a7d7ebcd6
commit 07583dd3a0
19 changed files with 244 additions and 364 deletions
+5 -6
View File
@@ -122,7 +122,6 @@
{{ detailState.available ? '启用' : '禁用' }}
</a-descriptions-item>
<a-descriptions-item label="上级部门" :span="2">{{ detailState.parent_name }}</a-descriptions-item>
<a-descriptions-item label="创建人">{{ detailState.creator ? detailState.creator.name : '-' }}</a-descriptions-item>
<a-descriptions-item label="创建时间">{{ detailState.created_at }}</a-descriptions-item>
<a-descriptions-item label="修改时间">{{ detailState.updated_at }}</a-descriptions-item>
<a-descriptions-item label="备注" :span="2">{{ detailState.description }}</a-descriptions-item>
@@ -300,7 +299,7 @@ const columns = reactive<TableColumnsType>([
{
title: '部门名称',
dataIndex: 'name',
align: 'center',
// align: 'center',
ellipsis: true,
key: 'name',
// width: 160
@@ -309,7 +308,7 @@ const columns = reactive<TableColumnsType>([
title: '排序',
dataIndex: 'order',
key: 'order',
align: 'center',
// align: 'center',
ellipsis: true,
// width: 100
},
@@ -318,7 +317,7 @@ const columns = reactive<TableColumnsType>([
dataIndex: 'available',
key: 'available',
ellipsis: true,
align: 'center',
// align: 'center',
// width: 100
},
{
@@ -331,7 +330,7 @@ const columns = reactive<TableColumnsType>([
{
title: '创建时间',
dataIndex: 'created_at',
align: 'center',
// align: 'center',
ellipsis: true,
key: 'created_at',
width: 200
@@ -339,7 +338,7 @@ const columns = reactive<TableColumnsType>([
{
title: '更新日期',
dataIndex: 'updated_at',
align: 'center',
// align: 'center',
ellipsis: true,
key: 'created_at',
width: 200