From b7d6b37e8795910ec81b6a0b1656133d9af3cc97 Mon Sep 17 00:00:00 2001 From: wangqiao Date: Sat, 6 Sep 2025 18:39:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E8=A1=A8=E5=8D=95=E7=BB=84=E4=BB=B6=E5=92=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/upnew/index.ts | 4 +- api/upnew/types.ts | 4 +- pages/upnew/components/DrawForm.vue | 77 +++++++++++++++------------- pages/upnew/components/DrawType.vue | 79 ++++++++++++----------------- pages/upnew/components/Preview.vue | 20 ++++---- pages/upnew/index.vue | 10 ++-- 6 files changed, 92 insertions(+), 102 deletions(-) diff --git a/api/upnew/index.ts b/api/upnew/index.ts index d339297..fa155ab 100644 --- a/api/upnew/index.ts +++ b/api/upnew/index.ts @@ -16,7 +16,7 @@ export const create = (params: TcreateReq) => { * @returns */ export const parent = (params: { type: string | number; parentId: number | string }) => { - return useFetchRequest.get>('/prod-api/app-api/business/app/dict/parent', { query: params }) + return useDollarFetchRequest.get>('/prod-api/app-api/business/app/dict/parent', { query: params }) } /** * 获取具有上下级的字典信息 @@ -32,7 +32,7 @@ export const parentV2 = (params: { type: string | number; parentId: number | str * @returns */ export const indexTabs = () => { - return useFetchRequest.get>('/prod-api/app-api/business/project/index/index-tab3') + return useDollarFetchRequest.get>('/prod-api/app-api/business/project/index/index-tab3') } /** * 模糊查询获取标签内容 diff --git a/api/upnew/types.ts b/api/upnew/types.ts index 9f077b6..8e60383 100644 --- a/api/upnew/types.ts +++ b/api/upnew/types.ts @@ -10,9 +10,9 @@ export interface FileItem { // 定义整个 JSON 对象的类型 export interface TcreateReq { - activeName: string + activeName: string | number id: number | string - type: any[] + type: number isDomestic: number | string province: string // 省份编码 city: string // 城市编码 diff --git a/pages/upnew/components/DrawForm.vue b/pages/upnew/components/DrawForm.vue index c978df5..3cd88de 100644 --- a/pages/upnew/components/DrawForm.vue +++ b/pages/upnew/components/DrawForm.vue @@ -1,6 +1,6 @@ @@ -216,7 +218,7 @@ formatTypeList.value = res.data }) } - getFormatTypeList() + // getFormatTypeList() const projectTypeList = ref([]) /** 获取分类下拉框 */ @@ -225,7 +227,6 @@ projectTypeList.value = res.data }) } - getParent() /** 版本 */ const editionsList = ref([]) @@ -237,11 +238,15 @@ editionsList.value = res.data }) } - getEditionsList() const handlePreview = (val: any) => { emit('preview', val) } + + onMounted(() => { + getEditionsList() + getParent() + })