mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 22:57:11 +08:00
chore: 客户端管理 => 终端管理
This commit is contained in:
@@ -17,5 +17,5 @@ VITE_OPEN_DEVTOOLS = false
|
|||||||
# 应用配置面板
|
# 应用配置面板
|
||||||
VITE_APP_SETTING = true
|
VITE_APP_SETTING = true
|
||||||
|
|
||||||
# 客户端ID
|
# 终端ID
|
||||||
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
@@ -13,5 +13,5 @@ VITE_BASE = '/'
|
|||||||
# 应用配置面板
|
# 应用配置面板
|
||||||
VITE_APP_SETTING = true
|
VITE_APP_SETTING = true
|
||||||
|
|
||||||
# 客户端ID
|
# 终端ID
|
||||||
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
@@ -18,5 +18,5 @@ VITE_OPEN_DEVTOOLS = true
|
|||||||
# 应用配置面板
|
# 应用配置面板
|
||||||
VITE_APP_SETTING = false
|
VITE_APP_SETTING = false
|
||||||
|
|
||||||
# 客户端ID
|
# 终端ID
|
||||||
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
VITE_CLIENT_ID = 'ef51c9a3e9046c4f2ea45142c8a8344a'
|
||||||
|
@@ -5,27 +5,27 @@ export type * from './type'
|
|||||||
|
|
||||||
const BASE_URL = '/system/client'
|
const BASE_URL = '/system/client'
|
||||||
|
|
||||||
/** @desc 查询客户端列表 */
|
/** @desc 查询终端列表 */
|
||||||
export function listClient(query: T.ClientPageQuery) {
|
export function listClient(query: T.ClientPageQuery) {
|
||||||
return http.get<PageRes<T.ClientResp[]>>(`${BASE_URL}`, query)
|
return http.get<PageRes<T.ClientResp[]>>(`${BASE_URL}`, query)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 查询客户端详情 */
|
/** @desc 查询终端详情 */
|
||||||
export function getClient(id: string) {
|
export function getClient(id: string) {
|
||||||
return http.get<T.ClientDetailResp>(`${BASE_URL}/${id}`)
|
return http.get<T.ClientDetailResp>(`${BASE_URL}/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 新增客户端 */
|
/** @desc 新增终端 */
|
||||||
export function addClient(data: any) {
|
export function addClient(data: any) {
|
||||||
return http.post(`${BASE_URL}`, data)
|
return http.post(`${BASE_URL}`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 修改客户端 */
|
/** @desc 修改终端 */
|
||||||
export function updateClient(data: any, id: string) {
|
export function updateClient(data: any, id: string) {
|
||||||
return http.put(`${BASE_URL}/${id}`, data)
|
return http.put(`${BASE_URL}/${id}`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @desc 删除客户端 */
|
/** @desc 删除终端 */
|
||||||
export function deleteClient(ids: string | Array<string>) {
|
export function deleteClient(ids: string | Array<string>) {
|
||||||
return http.del(`${BASE_URL}/${ids}`)
|
return http.del(`${BASE_URL}/${ids}`)
|
||||||
}
|
}
|
||||||
|
@@ -259,7 +259,7 @@ export interface StorageQuery {
|
|||||||
export interface StoragePageQuery extends StorageQuery, PageQuery {
|
export interface StoragePageQuery extends StorageQuery, PageQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 客户端类型 */
|
/** 终端类型 */
|
||||||
export interface ClientResp {
|
export interface ClientResp {
|
||||||
id: string
|
id: string
|
||||||
clientId: string
|
clientId: string
|
||||||
|
@@ -32,7 +32,7 @@ const { width } = useWindowSize()
|
|||||||
const dataId = ref('')
|
const dataId = ref('')
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
const isUpdate = computed(() => !!dataId.value)
|
const isUpdate = computed(() => !!dataId.value)
|
||||||
const title = computed(() => (isUpdate.value ? '修改客户端' : '新增客户端'))
|
const title = computed(() => (isUpdate.value ? '修改终端' : '新增终端'))
|
||||||
const formRef = ref<InstanceType<typeof GiForm>>()
|
const formRef = ref<InstanceType<typeof GiForm>>()
|
||||||
const { client_type, auth_type_enum } = useDict('auth_type_enum', 'client_type')
|
const { client_type, auth_type_enum } = useDict('auth_type_enum', 'client_type')
|
||||||
|
|
||||||
@@ -56,20 +56,20 @@ const handleGenerate = () => {
|
|||||||
|
|
||||||
const columns: Columns = reactive([
|
const columns: Columns = reactive([
|
||||||
{
|
{
|
||||||
label: '客户端 Key',
|
label: '终端 Key',
|
||||||
field: 'clientKey',
|
field: 'clientKey',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
rules: [{ required: true, message: '请输入客户端 Key' }],
|
rules: [{ required: true, message: '请输入终端 Key' }],
|
||||||
span: 2,
|
span: 2,
|
||||||
disabled: () => {
|
disabled: () => {
|
||||||
return isUpdate.value
|
return isUpdate.value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户端秘钥',
|
label: '终端秘钥',
|
||||||
field: 'clientSecret',
|
field: 'clientSecret',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
rules: [{ required: true, message: '请输入客户端秘钥' }],
|
rules: [{ required: true, message: '请输入终端秘钥' }],
|
||||||
span: 2,
|
span: 2,
|
||||||
disabled: () => {
|
disabled: () => {
|
||||||
return isUpdate.value
|
return isUpdate.value
|
||||||
@@ -97,11 +97,11 @@ const columns: Columns = reactive([
|
|||||||
rules: [{ required: true, message: '请选择认证类型' }],
|
rules: [{ required: true, message: '请选择认证类型' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '客户端类型',
|
label: '终端类型',
|
||||||
field: 'clientType',
|
field: 'clientType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: client_type,
|
options: client_type,
|
||||||
rules: [{ required: true, message: '请选择客户端类型' }],
|
rules: [{ required: true, message: '请选择终端类型' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () => (
|
label: () => (
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
<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 :column="1" size="large" class="general-description">
|
<a-descriptions :column="1" size="large" class="general-description">
|
||||||
<a-descriptions-item label="ID">{{ dataDetail?.id }}</a-descriptions-item>
|
<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="终端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="终端Key">{{ dataDetail?.clientKey }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="客户端秘钥">{{ dataDetail?.clientSecret }}</a-descriptions-item>
|
<a-descriptions-item label="终端秘钥">{{ dataDetail?.clientSecret }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="认证类型">
|
<a-descriptions-item label="认证类型">
|
||||||
<a-space>
|
<a-space>
|
||||||
<GiCellTag v-for="(item, index) in dataDetail?.authType" :key="index" :value="item" :dict="auth_type_enum" />
|
<GiCellTag v-for="(item, index) in dataDetail?.authType" :key="index" :value="item" :dict="auth_type_enum" />
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="客户端类型">
|
<a-descriptions-item label="终端类型">
|
||||||
<GiCellTag :value="dataDetail?.clientType" :dict="client_type" />
|
<GiCellTag :value="dataDetail?.clientType" :dict="client_type" />
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="Token最低活跃频率">{{ dataDetail?.activeTimeout }}</a-descriptions-item>
|
<a-descriptions-item label="Token最低活跃频率">{{ dataDetail?.activeTimeout }}</a-descriptions-item>
|
||||||
|
@@ -13,12 +13,12 @@
|
|||||||
@refresh="search"
|
@refresh="search"
|
||||||
>
|
>
|
||||||
<template #toolbar-left>
|
<template #toolbar-left>
|
||||||
<a-input-search v-model="queryForm.clientKey" placeholder="搜索客户端Key" 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-input-search v-model="queryForm.clientSecret" placeholder="搜索终端秘钥" allow-clear @search="search" />
|
||||||
<a-select
|
<a-select
|
||||||
v-model="queryForm.clientType"
|
v-model="queryForm.clientType"
|
||||||
:options="client_type"
|
:options="client_type"
|
||||||
placeholder="请选择客户端类型"
|
placeholder="请选择终端类型"
|
||||||
allow-clear
|
allow-clear
|
||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
@change="search"
|
@change="search"
|
||||||
@@ -114,7 +114,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
fixed: !isMobile() ? 'left' : undefined,
|
fixed: !isMobile() ? 'left' : undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '客户端 ID',
|
title: '终端 ID',
|
||||||
dataIndex: 'clientId',
|
dataIndex: 'clientId',
|
||||||
slotName: 'clientId',
|
slotName: 'clientId',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@@ -125,8 +125,8 @@ const columns: TableInstanceColumns[] = [
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ title: '客户端 Key', dataIndex: 'clientKey', slotName: 'clientKey', 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: 'clientSecret', slotName: 'clientSecret', ellipsis: true, tooltip: true, align: 'center' },
|
||||||
{
|
{
|
||||||
title: '认证类型',
|
title: '认证类型',
|
||||||
dataIndex: 'authType',
|
dataIndex: 'authType',
|
||||||
@@ -141,7 +141,7 @@ const columns: TableInstanceColumns[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '客户端类型',
|
title: '终端类型',
|
||||||
dataIndex: 'clientType',
|
dataIndex: 'clientType',
|
||||||
slotName: 'clientType',
|
slotName: 'clientType',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@@ -190,7 +190,7 @@ const reset = () => {
|
|||||||
// 删除
|
// 删除
|
||||||
const onDelete = (record: ClientResp) => {
|
const onDelete = (record: ClientResp) => {
|
||||||
return handleDelete(() => deleteClient(record.id), {
|
return handleDelete(() => deleteClient(record.id), {
|
||||||
content: `是否确定删除客户端「${record.clientKey}(${record.clientId})」?`,
|
content: `是否确定删除终端「${record.clientKey}(${record.clientId})」?`,
|
||||||
showModal: true,
|
showModal: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user