增加指标集类型接口

main
yangyuanshuai 9 months ago
parent d8ae3cc028
commit cea89e47ba

@ -65,3 +65,18 @@ export const getIndexType = ({ paramName, systemCode }): Promise<IResponse> => {
}); });
}; };
/** 查询指标集类型树形结构 */
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 [];
};

@ -7,7 +7,8 @@ import {
delRepIndexSetApi, delRepIndexSetApi,
queryRepIndexSetApi, queryRepIndexSetApi,
importExcelApiUrl, importExcelApiUrl,
exportExcelApi exportExcelApi,
getIndexSetTreeApi
} from '@/api/dataset/RepIndexSet' } from '@/api/dataset/RepIndexSet'
import { TableData } from '@/api/dataset/RepIndexSet/types' import { TableData } from '@/api/dataset/RepIndexSet/types'
@ -185,7 +186,7 @@ const searchSchema = reactive<FormSchema[]>([
}, },
component: 'TreeSelect', component: 'TreeSelect',
optionApi: async () => { optionApi: async () => {
const res = await getIndexCategoryTreeApi(); const res = await getIndexSetTreeApi();
IndexTypeParamsList.value = res; IndexTypeParamsList.value = res;
indexType_param_LIST.value = res; indexType_param_LIST.value = res;
res.forEach(item=>{ res.forEach(item=>{

Loading…
Cancel
Save