8 changed files with 209 additions and 181 deletions
@ -0,0 +1,20 @@ |
|||||||
|
import type { GenDatabaseTypeParams, GenDatabaseType, GenDatabaseTypeResult } from '/@/api/platform/system/entity/genDatabaseType'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/system_proxy/system/devtools/genDatabaseType/list', |
||||||
|
add = '/system_proxy/system/devtools/genDatabaseType/save', |
||||||
|
get = '/system_proxy/system/devtools/genDatabaseType', |
||||||
|
edit = '/system_proxy/system/devtools/genDatabaseType/update', |
||||||
|
del = '/system_proxy/system/devtools/genDatabaseType/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listGenDatabaseType = (params?: Partial<GenDatabaseTypeParams>) => defHttp.get<GenDatabaseTypeResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addGenDatabaseType = (params: Partial<GenDatabaseType>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editGenDatabaseType = (params: Partial<GenDatabaseType>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getGenDatabaseType = (id: string) => defHttp.get<GenDatabaseType>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delGenDatabaseType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,20 @@ |
|||||||
|
import type { GenTableFieldTypeParams, GenTableFieldType, GenTableFieldTypeResult } from '/@/api/platform/system/entity/genTableFieldType'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/system_proxy/system/devtools/genTableFieldType/list', |
||||||
|
add = '/system_proxy/system/devtools/genTableFieldType/save', |
||||||
|
get = '/system_proxy/system/devtools/genTableFieldType', |
||||||
|
edit = '/system_proxy/system/devtools/genTableFieldType/update', |
||||||
|
del = '/system_proxy/system/devtools/genTableFieldType/remove', |
||||||
|
} |
||||||
|
|
||||||
|
export const listGenTableFieldType = (params?: Partial<GenTableFieldTypeParams>) => defHttp.get<GenTableFieldTypeResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
export const addGenTableFieldType = (params: Partial<GenTableFieldType>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
export const editGenTableFieldType = (params: Partial<GenTableFieldType>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
export const getGenTableFieldType = (id: string) => defHttp.get<GenTableFieldType>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
export const delGenTableFieldType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,13 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { Page } from '/@/api/common/data/entity'; |
||||||
|
import type { BaseEntity } from '/@/api/common/base/entity'; |
||||||
|
|
||||||
|
export type GenDatabaseTypeParams = Page & GenDatabaseType; |
||||||
|
|
||||||
|
export interface GenDatabaseType extends BaseEntity { |
||||||
|
id: string; |
||||||
|
type: string; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
export type GenDatabaseTypeResult = R<GenDatabaseType[]>; |
@ -0,0 +1,16 @@ |
|||||||
|
import type { R } from '/#/axios'; |
||||||
|
import type { Page } from '/@/api/common/data/entity'; |
||||||
|
import type { BaseEntity } from '/@/api/common/base/entity'; |
||||||
|
|
||||||
|
export type GenTableFieldTypeParams = Page & GenTableFieldType; |
||||||
|
|
||||||
|
export interface GenTableFieldType extends BaseEntity { |
||||||
|
id: string; |
||||||
|
typeId: string; |
||||||
|
label: string; |
||||||
|
value: string; |
||||||
|
sort: number; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
export type GenTableFieldTypeResult = R<GenTableFieldType[]>; |
@ -1,154 +0,0 @@ |
|||||||
import { BasicColumn } from '/@/components/Table'; |
|
||||||
import { FormSchema } from '/@/components/Table'; |
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [ |
|
||||||
{ |
|
||||||
title: '客户端Id', |
|
||||||
dataIndex: 'clientId', |
|
||||||
width: 100 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '客户端密钥', |
|
||||||
dataIndex: 'clientSecret', |
|
||||||
width: 100 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '授权类型', |
|
||||||
dataIndex: 'authorizedGrantTypes', |
|
||||||
width: 130 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '授权范围', |
|
||||||
dataIndex: 'scope', |
|
||||||
width: 90 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '令牌过期秒数', |
|
||||||
dataIndex: 'accessTokenValidity', |
|
||||||
width: 130 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '令牌过期秒数', |
|
||||||
dataIndex: 'refreshTokenValidity', |
|
||||||
width: 130 |
|
||||||
}, |
|
||||||
{ |
|
||||||
title: '创建时间', |
|
||||||
dataIndex: 'createTime', |
|
||||||
width: 100 |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'clientId', |
|
||||||
label: '客户端编码', |
|
||||||
component: 'Input', |
|
||||||
componentProps: { |
|
||||||
placeholder: '请输入客户端编码', |
|
||||||
}, |
|
||||||
colProps: { span: 8 }, |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'dateRange', |
|
||||||
label: '创建时间', |
|
||||||
component: 'RangePicker', |
|
||||||
componentProps: { |
|
||||||
style: { width:'100%' }, |
|
||||||
valueFormat: 'YYYY-MM-DD', |
|
||||||
placeholder: ['开始日期','结束日期'] |
|
||||||
}, |
|
||||||
colProps: { span: 8 } |
|
||||||
} |
|
||||||
]; |
|
||||||
|
|
||||||
export const formSchema: FormSchema[] = [ |
|
||||||
{ |
|
||||||
field: 'id', |
|
||||||
label: 'ID', |
|
||||||
component: 'Input', |
|
||||||
show: false |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'clientId', |
|
||||||
label: '客户端Id', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'clientSecret', |
|
||||||
label: '客户端密钥', |
|
||||||
component: 'Input', |
|
||||||
required: true, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'authorizedGrantTypes', |
|
||||||
label: '授权类型', |
|
||||||
component: 'InputTextArea', |
|
||||||
required:true, |
|
||||||
componentProps: { |
|
||||||
rows: 3 |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'scope', |
|
||||||
label: '授权范围', |
|
||||||
component: 'Input', |
|
||||||
required:true, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'accessTokenValidity', |
|
||||||
label: '过期秒数', |
|
||||||
component: 'InputNumber', |
|
||||||
componentProps: { |
|
||||||
style: { width:'100%' }, |
|
||||||
min: 0 |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'refreshTokenValidity', |
|
||||||
label: '刷新秒数', |
|
||||||
component: 'InputNumber', |
|
||||||
componentProps: { |
|
||||||
style: { width:'100%' }, |
|
||||||
min: 0 |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'webServerRedirectUri', |
|
||||||
label: '回调地址', |
|
||||||
component: 'Input', |
|
||||||
colProps: { |
|
||||||
span: 12 |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
field: 'additionalInformation', |
|
||||||
label: '附加说明', |
|
||||||
component: 'InputTextArea', |
|
||||||
componentProps: { |
|
||||||
rows: 6 |
|
||||||
}, |
|
||||||
colProps: { |
|
||||||
span: 24 |
|
||||||
} |
|
||||||
} |
|
||||||
]; |
|
@ -0,0 +1,89 @@ |
|||||||
|
import { BasicColumn } from '/@/components/Table'; |
||||||
|
import { FormSchema } from '/@/components/Table'; |
||||||
|
import { listGenDatabaseType } from '/@/api/platform/system/controller/genDatabaseType'; |
||||||
|
|
||||||
|
export const columns: BasicColumn[] = [ |
||||||
|
{ |
||||||
|
title: '数据库类型', |
||||||
|
dataIndex: 'type' |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
export const searchFormSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'type', |
||||||
|
label: '数据库类型', |
||||||
|
component: 'ApiSelect', |
||||||
|
colProps: { span: 6 }, |
||||||
|
componentProps: { |
||||||
|
api: listGenDatabaseType, |
||||||
|
params: { |
||||||
|
size: 99 |
||||||
|
}, |
||||||
|
labelField: 'type', |
||||||
|
valueField: 'id', |
||||||
|
resultField: 'data' |
||||||
|
} |
||||||
|
} |
||||||
|
]; |
||||||
|
|
||||||
|
export const formSchema: FormSchema[] = [ |
||||||
|
{ |
||||||
|
field: 'id', |
||||||
|
label: 'ID', |
||||||
|
component: 'Input', |
||||||
|
show: false |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'nickName', |
||||||
|
label: '昵称', |
||||||
|
component: 'Input', |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'deptName', |
||||||
|
label: '所属部门', |
||||||
|
component: 'Input', |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'sex', |
||||||
|
label: '性别', |
||||||
|
component: 'Select', |
||||||
|
colProps: { |
||||||
|
span: 12 |
||||||
|
}, |
||||||
|
componentProps: { |
||||||
|
options: [ |
||||||
|
{ label: '男', value: '0' }, |
||||||
|
{ label: '女', value: '1' } |
||||||
|
] |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'phone', |
||||||
|
label: '手机号', |
||||||
|
component: 'Input', |
||||||
|
}, |
||||||
|
{ |
||||||
|
field: 'email', |
||||||
|
label: '邮箱', |
||||||
|
component: 'Input', |
||||||
|
}, |
||||||
|
]; |
||||||
|
|
||||||
|
export const genTableFieldTypeReloadColumns: BasicColumn[] = [ |
||||||
|
{ |
||||||
|
title: '标签', |
||||||
|
dataIndex: 'label' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '值', |
||||||
|
dataIndex: 'value' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '排序', |
||||||
|
dataIndex: 'sort' |
||||||
|
} |
||||||
|
]; |
Loading…
Reference in new issue