mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 18:59:26 +08:00
refactor: 移除角色状态字段
This commit is contained in:
@@ -39,7 +39,6 @@ export interface RoleResp {
|
|||||||
sort: number
|
sort: number
|
||||||
description: string
|
description: string
|
||||||
dataScope: number
|
dataScope: number
|
||||||
status: 1 | 2
|
|
||||||
isSystem: boolean
|
isSystem: boolean
|
||||||
createUserString: string
|
createUserString: string
|
||||||
createTime: string
|
createTime: string
|
||||||
@@ -56,7 +55,6 @@ export interface RoleDetailResp {
|
|||||||
menuIds: Array<number>
|
menuIds: Array<number>
|
||||||
dataScope: number
|
dataScope: number
|
||||||
deptIds: Array<number>
|
deptIds: Array<number>
|
||||||
status: 1 | 2
|
|
||||||
isSystem: boolean
|
isSystem: boolean
|
||||||
createUserString: string
|
createUserString: string
|
||||||
createTime: string
|
createTime: string
|
||||||
@@ -66,7 +64,6 @@ export interface RoleDetailResp {
|
|||||||
}
|
}
|
||||||
export interface RoleQuery extends PageQuery {
|
export interface RoleQuery extends PageQuery {
|
||||||
description?: string
|
description?: string
|
||||||
status?: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 系统菜单类型 */
|
/** 系统菜单类型 */
|
||||||
|
@@ -32,17 +32,6 @@
|
|||||||
:auto-size="{ minRows: 3, maxRows: 5 }"
|
:auto-size="{ minRows: 3, maxRows: 5 }"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="状态" field="status">
|
|
||||||
<a-switch
|
|
||||||
v-model="form.status"
|
|
||||||
:disabled="form.isSystem"
|
|
||||||
type="round"
|
|
||||||
:checked-value="1"
|
|
||||||
:unchecked-value="2"
|
|
||||||
checked-text="启用"
|
|
||||||
unchecked-text="禁用"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>功能权限</legend>
|
<legend>功能权限</legend>
|
||||||
@@ -123,7 +112,6 @@ const { form, resetForm } = useForm({
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
sort: 999,
|
sort: 999,
|
||||||
status: 1,
|
|
||||||
description: undefined,
|
description: undefined,
|
||||||
menuIds: undefined,
|
menuIds: undefined,
|
||||||
dataScope: 4,
|
dataScope: 4,
|
||||||
|
@@ -1,16 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-drawer v-model:visible="visible" title="角色详情" :width="width >= 600 ? 600 : '100%'" :footer="false">
|
<a-drawer v-model:visible="visible" title="角色详情" :width="width >= 600 ? 600 : '100%'" :footer="false">
|
||||||
<a-descriptions title="基础信息" :column="2" size="large" class="general-description">
|
<a-descriptions title="基础信息" :column="2" size="large" class="general-description">
|
||||||
<a-descriptions-item label="ID" :span="2">{{ dataDetail?.id }}</a-descriptions-item>
|
<a-descriptions-item label="ID">{{ dataDetail?.id }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="名称">{{ dataDetail?.name }}</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="编码">{{ dataDetail?.code }}</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="状态">
|
|
||||||
<a-tag v-if="dataDetail?.status === 1" color="green">启用</a-tag>
|
|
||||||
<a-tag v-else color="red">禁用</a-tag>
|
|
||||||
</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="数据权限">
|
<a-descriptions-item label="数据权限">
|
||||||
<GiCellTag :value="dataDetail?.dataScope" :dict="data_scope_enum" />
|
<GiCellTag :value="dataDetail?.dataScope" :dict="data_scope_enum" />
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="名称">{{ dataDetail?.name }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="编码">{{ dataDetail?.code }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="创建人">{{ dataDetail?.createUserString }}</a-descriptions-item>
|
<a-descriptions-item label="创建人">{{ dataDetail?.createUserString }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="创建时间">{{ dataDetail?.createTime }}</a-descriptions-item>
|
<a-descriptions-item label="创建时间">{{ dataDetail?.createTime }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="修改人">{{ dataDetail?.updateUserString }}</a-descriptions-item>
|
<a-descriptions-item label="修改人">{{ dataDetail?.updateUserString }}</a-descriptions-item>
|
||||||
|
@@ -15,14 +15,6 @@
|
|||||||
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
|
<a-input v-model="queryForm.description" placeholder="请输入关键词" allow-clear @change="search">
|
||||||
<template #prefix><icon-search /></template>
|
<template #prefix><icon-search /></template>
|
||||||
</a-input>
|
</a-input>
|
||||||
<a-select
|
|
||||||
v-model="queryForm.status"
|
|
||||||
:options="DisEnableStatusList"
|
|
||||||
placeholder="请选择状态"
|
|
||||||
allow-clear
|
|
||||||
style="width: 150px"
|
|
||||||
@change="search"
|
|
||||||
/>
|
|
||||||
<a-button @click="reset">重置</a-button>
|
<a-button @click="reset">重置</a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #custom-right>
|
<template #custom-right>
|
||||||
@@ -34,9 +26,6 @@
|
|||||||
<template #name="{ record }">
|
<template #name="{ record }">
|
||||||
<a-link @click="onDetail(record)">{{ record.name }}</a-link>
|
<a-link @click="onDetail(record)">{{ record.name }}</a-link>
|
||||||
</template>
|
</template>
|
||||||
<template #status="{ record }">
|
|
||||||
<GiCellStatus :status="record.status" />
|
|
||||||
</template>
|
|
||||||
<template #dataScope="{ record }">
|
<template #dataScope="{ record }">
|
||||||
<GiCellTag :value="record.dataScope" :dict="data_scope_enum" />
|
<GiCellTag :value="record.dataScope" :dict="data_scope_enum" />
|
||||||
</template>
|
</template>
|
||||||
@@ -75,7 +64,6 @@ import { useTable } from '@/hooks'
|
|||||||
import { useDict } from '@/hooks/app'
|
import { useDict } from '@/hooks/app'
|
||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
import has from '@/utils/has'
|
import has from '@/utils/has'
|
||||||
import { DisEnableStatusList } from '@/constant/common'
|
|
||||||
|
|
||||||
defineOptions({ name: 'SystemRole' })
|
defineOptions({ name: 'SystemRole' })
|
||||||
|
|
||||||
@@ -90,7 +78,6 @@ const columns: TableInstanceColumns[] = [
|
|||||||
},
|
},
|
||||||
{ title: '名称', dataIndex: 'name', slotName: 'name', ellipsis: true, tooltip: true },
|
{ title: '名称', dataIndex: 'name', slotName: 'name', ellipsis: true, tooltip: true },
|
||||||
{ title: '编码', dataIndex: 'code', ellipsis: true, tooltip: true },
|
{ title: '编码', dataIndex: 'code', ellipsis: true, tooltip: true },
|
||||||
{ title: '状态', slotName: 'status', align: 'center' },
|
|
||||||
{ title: '数据权限', dataIndex: 'dataScope', slotName: 'dataScope', ellipsis: true, tooltip: true },
|
{ title: '数据权限', dataIndex: 'dataScope', slotName: 'dataScope', ellipsis: true, tooltip: true },
|
||||||
{ title: '排序', dataIndex: 'sort', align: 'center', show: false },
|
{ title: '排序', dataIndex: 'sort', align: 'center', show: false },
|
||||||
{ title: '系统内置', slotName: 'isSystem', align: 'center', show: false },
|
{ title: '系统内置', slotName: 'isSystem', align: 'center', show: false },
|
||||||
@@ -111,7 +98,6 @@ const columns: TableInstanceColumns[] = [
|
|||||||
|
|
||||||
const queryForm = reactive({
|
const queryForm = reactive({
|
||||||
description: undefined,
|
description: undefined,
|
||||||
status: undefined,
|
|
||||||
sort: ['createTime,desc']
|
sort: ['createTime,desc']
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -126,7 +112,6 @@ const {
|
|||||||
// 重置
|
// 重置
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
queryForm.description = undefined
|
queryForm.description = undefined
|
||||||
queryForm.status = undefined
|
|
||||||
search()
|
search()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user