refactor: 💥 优化系统内置类型数据标识

1.系统内置类型数据标识由 type 调整为 is_system
2.优化部分表的非空字段
This commit is contained in:
2023-09-17 23:53:25 +08:00
parent 2755bc8479
commit 8a02401a24
30 changed files with 135 additions and 160 deletions

View File

@@ -10,7 +10,7 @@ export interface DataRecord {
description?: string;
sort: number;
status?: number;
type?: number;
isSystem?: boolean;
createUserString?: string;
createTime?: string;
updateUserString?: string;

View File

@@ -8,6 +8,7 @@ export interface DataRecord {
name: string;
code: string;
description?: string;
isSystem: boolean;
createUser?: string;
createTime?: string;
updateUser?: string;

View File

@@ -13,7 +13,7 @@ export interface DataRecord {
dataScope: number;
deptIds?: Array<number>;
status?: number;
type?: number;
isSystem?: boolean;
createUserString?: string;
createTime?: string;
updateUserString?: string;

View File

@@ -12,7 +12,7 @@ export interface DataRecord {
phone?: string;
description?: string;
status?: number;
type?: number;
isSystem?: boolean;
pwdResetTime?: string;
createUserString?: string;
createTime?: string;

View File

@@ -131,10 +131,10 @@
/>
</template>
</a-table-column>
<a-table-column title="类型" align="center">
<a-table-column title="系统内置" align="center">
<template #cell="{ record }">
<a-tag v-if="record.type === 1" color="red">系统内置</a-tag>
<a-tag v-else color="arcoblue">自定义</a-tag>
<a-tag v-if="record.isSystem" color="red"></a-tag>
<a-tag v-else color="arcoblue"></a-tag>
</template>
</a-table-column>
<a-table-column title="描述" data-index="description" />
@@ -163,7 +163,7 @@
v-permission="['system:dept:delete']"
type="text"
size="small"
title="删除"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
>
<template #icon><icon-delete /></template>删除

View File

@@ -156,8 +156,8 @@
v-permission="['system:dict:delete']"
type="text"
size="small"
title="删除"
:disabled="record.disabled"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.isSystem"
>
<template #icon><icon-delete /></template>删除
</a-button>
@@ -188,7 +188,7 @@
<a-input v-model="form.name" placeholder="请输入字典名称" />
</a-form-item>
<a-form-item label="字典编码" field="code">
<a-input v-model="form.code" placeholder="请输入字典编码" />
<a-input v-model="form.code" placeholder="请输入字典编码" :disabled="form.isSystem" />
</a-form-item>
<a-form-item label="描述" field="description">
<a-textarea
@@ -317,6 +317,7 @@
name: '',
code: '',
description: '',
isSystem: false,
};
proxy.$refs.formRef?.resetFields();
};

View File

@@ -142,10 +142,10 @@
/>
</template>
</a-table-column>
<a-table-column title="类型" align="center">
<a-table-column title="系统内置" align="center">
<template #cell="{ record }">
<a-tag v-if="record.type === 1" color="red">系统内置</a-tag>
<a-tag v-else color="arcoblue">自定义</a-tag>
<a-tag v-if="record.isSystem" color="red"></a-tag>
<a-tag v-else color="arcoblue"></a-tag>
</template>
</a-table-column>
<a-table-column title="描述" data-index="description" tooltip />
@@ -174,7 +174,7 @@
v-permission="['system:role:delete']"
type="text"
size="small"
title="删除"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
>
<template #icon><icon-delete /></template>删除

View File

@@ -192,10 +192,10 @@
/>
</template>
</a-table-column>
<a-table-column title="类型" align="center">
<a-table-column title="系统内置" align="center" :width="90">
<template #cell="{ record }">
<a-tag v-if="record.type === 1" color="red">系统内置</a-tag>
<a-tag v-else color="arcoblue">自定义</a-tag>
<a-tag v-if="record.isSystem" color="red"></a-tag>
<a-tag v-else color="arcoblue"></a-tag>
</template>
</a-table-column>
<a-table-column title="创建人/创建时间" :width="175">
@@ -237,7 +237,7 @@
v-permission="['system:user:delete']"
type="text"
size="small"
title="删除"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.disabled"
>
<template #icon><icon-delete /></template>