diff --git a/src/api/platform/system/controller/genShowType.ts b/src/api/platform/system/controller/genShowType.ts new file mode 100644 index 0000000..e716140 --- /dev/null +++ b/src/api/platform/system/controller/genShowType.ts @@ -0,0 +1,20 @@ +import type { GenShowType, GenShowTypeParams, GenShowTypeResult } from '/@/api/platform/system/entity/genShowType'; +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + list = '/system_proxy/system/devtools/genShowType/list', + add = '/system_proxy/system/devtools/genShowType/save', + get = '/system_proxy/system/devtools/genShowType', + edit = '/system_proxy/system/devtools/genShowType/update', + del = '/system_proxy/system/devtools/genShowType/remove' +} + +export const listGenShowType = (params?: Partial) => defHttp.get({ url: Api.list, params }, { isReturnResultResponse: true }); + +export const addGenShowType = (params: Partial) => defHttp.post({ url: Api.add, data: params }); + +export const editGenShowType = (params: Partial) => defHttp.put({ url: Api.edit, data: params }); + +export const getGenShowType = (id: string) => defHttp.get({ url: `${Api.get}/${id}` }); + +export const delGenShowType = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); diff --git a/src/api/platform/system/entity/genShowType.ts b/src/api/platform/system/entity/genShowType.ts new file mode 100644 index 0000000..d3ab38b --- /dev/null +++ b/src/api/platform/system/entity/genShowType.ts @@ -0,0 +1,17 @@ +import type { R } from '/#/axios'; +import type { Page } from '/@/api/common/data/entity'; +import type { BaseEntity } from '/@/api/common/base/entity'; + +export type GenShowTypeParams = Page & GenShowType; + +export interface GenShowType extends BaseEntity { + id: string; + label: string; + value: string; + sort: number; + component: string; + importpath: string; + [key: string]: any; +} + +export type GenShowTypeResult = R; diff --git a/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue b/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue index 7f90099..d75680c 100644 --- a/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue +++ b/src/views/system/devtools/genCustomObj/GenCustomObjModal.vue @@ -111,6 +111,7 @@ const id = data.record?.id; const classValue = data.record?.value; const props: Partial = { confirmLoading: false, showOkBtn: true }; + await setProps({ disabled: false }); await updateSchema([{ field: 'value', componentProps: { @@ -147,6 +148,7 @@ case 'view': props.title = '查看java类型'; props.showOkBtn = false; + await setProps({ disabled: true }); const getGencodeCustomObjView = await getGencodeCustomObj(id); state.dataSource = getGencodeCustomObjView?.gencodeCustomFieldList || []; state.tableVisible = getGencodeCustomObjView.type == '0'; diff --git a/src/views/system/devtools/genShowType/ClientModal.vue b/src/views/system/devtools/genShowType/GenShowTypeModal.vue similarity index 58% rename from src/views/system/devtools/genShowType/ClientModal.vue rename to src/views/system/devtools/genShowType/GenShowTypeModal.vue index ebacf06..f219bb9 100644 --- a/src/views/system/devtools/genShowType/ClientModal.vue +++ b/src/views/system/devtools/genShowType/GenShowTypeModal.vue @@ -11,16 +11,15 @@