From 36ea5d5026a0e98cc8f44f7132ad1a5df03413c5 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Wed, 21 Feb 2024 16:32:07 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=8E=A7=E4=BB=B6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/system/controller/genShowType.ts | 20 +++ src/api/platform/system/entity/genShowType.ts | 17 ++ .../genCustomObj/GenCustomObjModal.vue | 2 + .../{ClientModal.vue => GenShowTypeModal.vue} | 51 ++---- .../devtools/genShowType/client.data.ts | 154 ------------------ .../devtools/genShowType/genShowType.data.ts | 92 +++++++++++ .../system/devtools/genShowType/index.vue | 51 +++--- 7 files changed, 173 insertions(+), 214 deletions(-) create mode 100644 src/api/platform/system/controller/genShowType.ts create mode 100644 src/api/platform/system/entity/genShowType.ts rename src/views/system/devtools/genShowType/{ClientModal.vue => GenShowTypeModal.vue} (58%) delete mode 100644 src/views/system/devtools/genShowType/client.data.ts create mode 100644 src/views/system/devtools/genShowType/genShowType.data.ts 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 @@