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=>{