From cea89e47ba56ae0be363b996814c62c7420020d6 Mon Sep 17 00:00:00 2001 From: yangyuanshuai Date: Sat, 9 Nov 2024 15:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=87=E6=A0=87=E9=9B=86?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dataset/RepIndexSet/index.ts | 15 +++++++++++++++ src/views/dataset/RepIndexSet/RepIndexSet.vue | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/api/dataset/RepIndexSet/index.ts b/src/api/dataset/RepIndexSet/index.ts index 6acb4bb..6227015 100644 --- a/src/api/dataset/RepIndexSet/index.ts +++ b/src/api/dataset/RepIndexSet/index.ts @@ -65,3 +65,18 @@ export const getIndexType = ({ paramName, systemCode }): Promise => { }); }; + +/** 查询指标集类型树形结构 */ +export const getIndexSetTreeApi = async () => { + const res = await request.post({ + url: '/RepIndexSet/spi/dataset/RepIndexSet/IndexSetTree', + }); + if (res?.body?.menutree?.length > 0) { + const data = res.body.menutree + return data.sort((a:AppCustomRouteRecordRaw, b:AppCustomRouteRecordRaw) => { + return a?.props?.sort && b?.props?.sort ? a.props.sort - b.props.sort : 0 + }); + } + return []; +}; + diff --git a/src/views/dataset/RepIndexSet/RepIndexSet.vue b/src/views/dataset/RepIndexSet/RepIndexSet.vue index bfac317..0862425 100644 --- a/src/views/dataset/RepIndexSet/RepIndexSet.vue +++ b/src/views/dataset/RepIndexSet/RepIndexSet.vue @@ -7,7 +7,8 @@ import { delRepIndexSetApi, queryRepIndexSetApi, importExcelApiUrl, - exportExcelApi + exportExcelApi, + getIndexSetTreeApi } from '@/api/dataset/RepIndexSet' import { TableData } from '@/api/dataset/RepIndexSet/types' @@ -185,7 +186,7 @@ const searchSchema = reactive([ }, component: 'TreeSelect', optionApi: async () => { - const res = await getIndexCategoryTreeApi(); + const res = await getIndexSetTreeApi(); IndexTypeParamsList.value = res; indexType_param_LIST.value = res; res.forEach(item=>{