diff --git a/src/api/platform/system/controller/gencodeCustomField.ts b/src/api/platform/system/controller/gencodeCustomField.ts new file mode 100644 index 0000000..da5cdb3 --- /dev/null +++ b/src/api/platform/system/controller/gencodeCustomField.ts @@ -0,0 +1,20 @@ +import type { GencodeCustomFieldParams, GencodeCustomField, GencodeCustomFieldResult } from '/@/api/platform/system/entity/gencodeCustomField'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/system_proxy/system/devtools/gencodeCustomField/list', + add = '/system_proxy/system/devtools/gencodeCustomField/save', + get = '/system_proxy/system/devtools/gencodeCustomField', + edit = '/system_proxy/system/devtools/gencodeCustomField/update', + del = '/system_proxy/system/devtools/gencodeCustomField/remove', +} + +export const listGencodeCustomField = (params?: Partial) => defHttp.get({ url: Api.list, params }, { isReturnResultResponse: true }); + +export const addGencodeCustomField = (params: Partial) => defHttp.post({ url: Api.add, data: params }); + +export const editGencodeCustomField = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); + +export const getGencodeCustomField = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); + +export const delGencodeCustomField = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); diff --git a/src/api/platform/system/controller/gencodeCustomObj.ts b/src/api/platform/system/controller/gencodeCustomObj.ts new file mode 100644 index 0000000..8dfc63a --- /dev/null +++ b/src/api/platform/system/controller/gencodeCustomObj.ts @@ -0,0 +1,26 @@ +import type { GencodeCustomObjParams, GencodeCustomObj, GencodeCustomObjResult } from '/@/api/platform/system/entity/gencodeCustomObj'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/system_proxy/system/devtools/gencodeCustomObj/list', + selectListByValue = '/system_proxy/system/devtools/gencodeCustomObj/selectListByValue', + add = '/system_proxy/system/devtools/gencodeCustomObj/save', + get = '/system_proxy/system/devtools/gencodeCustomObj', + edit = '/system_proxy/system/devtools/gencodeCustomObj/update', + saveAndGencodeCustomField = '/system_proxy/system/devtools/gencodeCustomObj/saveAndGencodeCustomField', + del = '/system_proxy/system/devtools/gencodeCustomObj/remove', +} + +export const listGencodeCustomObj = (params?: Partial) => defHttp.get({ url: Api.list, params }, { isReturnResultResponse: true }); + +export const selectListByValue = (type: string) => defHttp.get({ url: `${Api.selectListByValue}/${type}` }); + +export const addGencodeCustomObj = (params: Partial) => defHttp.post({ url: Api.add, data: params }); + +export const editGencodeCustomObj = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); + +export const saveAndGencodeCustomField = (params: Partial) => defHttp.put({ url: Api.saveAndGencodeCustomField, data: params }); + +export const getGencodeCustomObj = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); + +export const delGencodeCustomObj = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); diff --git a/src/api/platform/system/entity/gencodeCustomField.ts b/src/api/platform/system/entity/gencodeCustomField.ts new file mode 100644 index 0000000..f319094 --- /dev/null +++ b/src/api/platform/system/entity/gencodeCustomField.ts @@ -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 GencodeCustomFieldParams = Page & GencodeCustomField; + +export interface GencodeCustomField extends BaseEntity { + id: string; + name: string; + objId: string; + sort: number; + remarks: string; + [key: string]: any; +} + +export type GencodeCustomFieldResult = R; diff --git a/src/api/platform/system/entity/gencodeCustomObj.ts b/src/api/platform/system/entity/gencodeCustomObj.ts new file mode 100644 index 0000000..b5bb9cd --- /dev/null +++ b/src/api/platform/system/entity/gencodeCustomObj.ts @@ -0,0 +1,17 @@ +import type { R } from '/#/axios'; +import type { Page, CommonEntity } from '/@/api/common/data/entity'; + +export type GencodeCustomObjParams = Page & GencodeCustomObj; + +export interface GencodeCustomObj extends CommonEntity { + id: string; + label: string; + value: string; + dataUrl: string; + tableName: string; + sort: number; + type: string; + [key: string]: any; +} + +export type GencodeCustomObjResult = R; diff --git a/src/views/system/devtools/genCustomObj/ClientModal.vue b/src/views/system/devtools/genCustomObj/ClientModal.vue deleted file mode 100644 index ebacf06..0000000 --- a/src/views/system/devtools/genCustomObj/ClientModal.vue +++ /dev/null @@ -1,97 +0,0 @@ - - diff --git a/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue b/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue new file mode 100644 index 0000000..3288e1f --- /dev/null +++ b/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue @@ -0,0 +1,196 @@ + + diff --git a/src/views/system/devtools/genCustomObj/GencodeCustomFieldModal.vue b/src/views/system/devtools/genCustomObj/GencodeCustomFieldModal.vue new file mode 100644 index 0000000..a5dbeb7 --- /dev/null +++ b/src/views/system/devtools/genCustomObj/GencodeCustomFieldModal.vue @@ -0,0 +1,81 @@ + + diff --git a/src/views/system/devtools/genCustomObj/client.data.ts b/src/views/system/devtools/genCustomObj/client.data.ts deleted file mode 100644 index 39b54c6..0000000 --- a/src/views/system/devtools/genCustomObj/client.data.ts +++ /dev/null @@ -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 - } - } -]; diff --git a/src/views/system/devtools/genCustomObj/genCustomObj.data.ts b/src/views/system/devtools/genCustomObj/genCustomObj.data.ts new file mode 100644 index 0000000..4355369 --- /dev/null +++ b/src/views/system/devtools/genCustomObj/genCustomObj.data.ts @@ -0,0 +1,162 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { + title: '标签', + dataIndex: 'label' + }, + { + title: '完整类名', + dataIndex: 'value' + }, + { + title: '数据接口', + dataIndex: 'dataUrl' + }, + { + title: '物理表名', + dataIndex: 'tableName' + }, + { + title: '排序', + dataIndex: 'sort' + } +]; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'label', + label: '标签', + component: 'Input', + componentProps: { + placeholder: '请输入标签', + }, + colProps: { span: 6 } + }, + { + field: 'value', + label: '完整类名', + component: 'Input', + componentProps: { + placeholder: '请输入完整类名', + }, + colProps: { span: 6 } + } +]; + +export const formSchema: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: 'label', + label: '标签', + component: 'Input', + colProps: { span: 16 }, + required: true + }, + { + field: 'value', + label: '完整类名', + component: 'Input', + colProps: { span: 16 }, + required: true + }, + { + field: 'dataUrl', + label: '数据接口', + component: 'Input', + colProps: { span: 16 } + }, + { + field: 'tableName', + label: '物理表名', + component: 'Input', + colProps: { span: 16 } + }, + { + field: 'sort', + label: '排序', + component: 'InputNumber', + colProps: { span: 16 }, + defaultValue: 1, + required: true, + componentProps: { + style: { width:'100%' }, + min: 0 + } + }, + { + field: 'type', + label: '基本类型', + component: 'RadioGroup', + colProps: { span: 16 }, + required: true, + defaultValue: '0', + componentProps: { + options: [ + { label: '是', value: '0' }, + { label: '否', value: '1' } + ] + } + } +]; + +export const formSchemaGencodeCustomField: FormSchema[] = [ + { + field: 'id', + label: 'ID', + component: 'Input', + show: false + }, + { + field: '_action', + label: '操作标识字段', + component: 'Input', + show: false + }, + { + field: 'name', + label: 'java属性', + component: 'Input', + required: true + }, + { + field: 'remarks', + label: '备注', + component: 'InputTextArea', + required: true, + componentProps: { + rows: 3 + } + }, + { + field: 'sort', + label: '排序', + component: 'InputNumber', + componentProps: { + style: { width:'100%' }, + min: 0 + }, + required: true + } +]; + +export const gencodeCustomFieldColumns: BasicColumn[] = [ + { + title: 'java属性', + dataIndex: 'name' + }, + { + title: '备注', + dataIndex: 'remarks' + }, + { + title: '排序', + dataIndex: 'sort' + } +]; diff --git a/src/views/system/devtools/genCustomObj/index.vue b/src/views/system/devtools/genCustomObj/index.vue index 41981c5..78d3234 100644 --- a/src/views/system/devtools/genCustomObj/index.vue +++ b/src/views/system/devtools/genCustomObj/index.vue @@ -4,66 +4,73 @@ @register="registerTable" @selection-change="handleSelectionChange" > + - - +