mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-12 06:57:11 +08:00
chore: 客户端管理 => 终端管理
This commit is contained in:
@@ -32,7 +32,7 @@ const { width } = useWindowSize()
|
||||
const dataId = ref('')
|
||||
const visible = ref(false)
|
||||
const isUpdate = computed(() => !!dataId.value)
|
||||
const title = computed(() => (isUpdate.value ? '修改客户端' : '新增客户端'))
|
||||
const title = computed(() => (isUpdate.value ? '修改终端' : '新增终端'))
|
||||
const formRef = ref<InstanceType<typeof GiForm>>()
|
||||
const { client_type, auth_type_enum } = useDict('auth_type_enum', 'client_type')
|
||||
|
||||
@@ -56,20 +56,20 @@ const handleGenerate = () => {
|
||||
|
||||
const columns: Columns = reactive([
|
||||
{
|
||||
label: '客户端 Key',
|
||||
label: '终端 Key',
|
||||
field: 'clientKey',
|
||||
type: 'input',
|
||||
rules: [{ required: true, message: '请输入客户端 Key' }],
|
||||
rules: [{ required: true, message: '请输入终端 Key' }],
|
||||
span: 2,
|
||||
disabled: () => {
|
||||
return isUpdate.value
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '客户端秘钥',
|
||||
label: '终端秘钥',
|
||||
field: 'clientSecret',
|
||||
type: 'input',
|
||||
rules: [{ required: true, message: '请输入客户端秘钥' }],
|
||||
rules: [{ required: true, message: '请输入终端秘钥' }],
|
||||
span: 2,
|
||||
disabled: () => {
|
||||
return isUpdate.value
|
||||
@@ -97,11 +97,11 @@ const columns: Columns = reactive([
|
||||
rules: [{ required: true, message: '请选择认证类型' }],
|
||||
},
|
||||
{
|
||||
label: '客户端类型',
|
||||
label: '终端类型',
|
||||
field: 'clientType',
|
||||
type: 'select',
|
||||
options: client_type,
|
||||
rules: [{ required: true, message: '请选择客户端类型' }],
|
||||
rules: [{ required: true, message: '请选择终端类型' }],
|
||||
},
|
||||
{
|
||||
label: () => (
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<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 :column="1" size="large" class="general-description">
|
||||
<a-descriptions-item label="ID">{{ dataDetail?.id }}</a-descriptions-item>
|
||||
<a-descriptions-item label="客户端ID"><a-typography-paragraph :copyable="!!dataDetail?.clientId">{{ dataDetail?.clientId }}</a-typography-paragraph></a-descriptions-item>
|
||||
<a-descriptions-item label="客户端Key">{{ dataDetail?.clientKey }}</a-descriptions-item>
|
||||
<a-descriptions-item label="客户端秘钥">{{ dataDetail?.clientSecret }}</a-descriptions-item>
|
||||
<a-descriptions-item label="终端ID"><a-typography-paragraph :copyable="!!dataDetail?.clientId">{{ dataDetail?.clientId }}</a-typography-paragraph></a-descriptions-item>
|
||||
<a-descriptions-item label="终端Key">{{ dataDetail?.clientKey }}</a-descriptions-item>
|
||||
<a-descriptions-item label="终端秘钥">{{ dataDetail?.clientSecret }}</a-descriptions-item>
|
||||
<a-descriptions-item label="认证类型">
|
||||
<a-space>
|
||||
<GiCellTag v-for="(item, index) in dataDetail?.authType" :key="index" :value="item" :dict="auth_type_enum" />
|
||||
</a-space>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="客户端类型">
|
||||
<a-descriptions-item label="终端类型">
|
||||
<GiCellTag :value="dataDetail?.clientType" :dict="client_type" />
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="Token最低活跃频率">{{ dataDetail?.activeTimeout }}</a-descriptions-item>
|
||||
|
@@ -13,12 +13,12 @@
|
||||
@refresh="search"
|
||||
>
|
||||
<template #toolbar-left>
|
||||
<a-input-search v-model="queryForm.clientKey" placeholder="搜索客户端Key" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.clientSecret" placeholder="搜索客户端秘钥" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.clientKey" placeholder="搜索终端Key" allow-clear @search="search" />
|
||||
<a-input-search v-model="queryForm.clientSecret" placeholder="搜索终端秘钥" allow-clear @search="search" />
|
||||
<a-select
|
||||
v-model="queryForm.clientType"
|
||||
:options="client_type"
|
||||
placeholder="请选择客户端类型"
|
||||
placeholder="请选择终端类型"
|
||||
allow-clear
|
||||
style="width: 160px"
|
||||
@change="search"
|
||||
@@ -114,7 +114,7 @@ const columns: TableInstanceColumns[] = [
|
||||
fixed: !isMobile() ? 'left' : undefined,
|
||||
},
|
||||
{
|
||||
title: '客户端 ID',
|
||||
title: '终端 ID',
|
||||
dataIndex: 'clientId',
|
||||
slotName: 'clientId',
|
||||
ellipsis: true,
|
||||
@@ -125,8 +125,8 @@ const columns: TableInstanceColumns[] = [
|
||||
)
|
||||
},
|
||||
},
|
||||
{ title: '客户端 Key', dataIndex: 'clientKey', slotName: 'clientKey', ellipsis: true, tooltip: true, align: 'center' },
|
||||
{ title: '客户端秘钥', dataIndex: 'clientSecret', slotName: 'clientSecret', ellipsis: true, tooltip: true, align: 'center' },
|
||||
{ title: '终端 Key', dataIndex: 'clientKey', slotName: 'clientKey', ellipsis: true, tooltip: true, align: 'center' },
|
||||
{ title: '终端秘钥', dataIndex: 'clientSecret', slotName: 'clientSecret', ellipsis: true, tooltip: true, align: 'center' },
|
||||
{
|
||||
title: '认证类型',
|
||||
dataIndex: 'authType',
|
||||
@@ -141,7 +141,7 @@ const columns: TableInstanceColumns[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '客户端类型',
|
||||
title: '终端类型',
|
||||
dataIndex: 'clientType',
|
||||
slotName: 'clientType',
|
||||
ellipsis: true,
|
||||
@@ -190,7 +190,7 @@ const reset = () => {
|
||||
// 删除
|
||||
const onDelete = (record: ClientResp) => {
|
||||
return handleDelete(() => deleteClient(record.id), {
|
||||
content: `是否确定删除客户端「${record.clientKey}(${record.clientId})」?`,
|
||||
content: `是否确定删除终端「${record.clientKey}(${record.clientId})」?`,
|
||||
showModal: true,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user