diff --git a/src/api/ne/neConfig.ts b/src/api/ne/neConfig.ts index 6631562f..5704b84c 100644 --- a/src/api/ne/neConfig.ts +++ b/src/api/ne/neConfig.ts @@ -6,10 +6,11 @@ import { request } from '@/plugins/http-fetch'; * @param query 查询参数 * @returns object */ -export function getAllNeConfig(neType: string) { +export function getAllNeConfig(neType: string, neId: string) { return request({ url: `/ne/config/list/${neType}`, method: 'GET', + params: { neId }, timeout: 60_000, }); } diff --git a/src/views/ne/neConfig/index.vue b/src/views/ne/neConfig/index.vue index 625f74bb..36ed47f9 100644 --- a/src/views/ne/neConfig/index.vue +++ b/src/views/ne/neConfig/index.vue @@ -209,7 +209,7 @@ function fnActiveConfigNode(key: string | number) { /**查询配置可选属性值列表 */ function fnGetNeConfig() { - const neType = neTypeSelect.value[0]; + const [neType, neId] = neTypeSelect.value ; if (!neType) { message.warning({ content: t('views.ne.neConfig.neTypePleace'), @@ -220,7 +220,7 @@ function fnGetNeConfig() { treeState.loading = true; // 获取数据 - getAllNeConfig(neType).then(res => { + getAllNeConfig(neType, neId).then(res => { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { const arr = []; for (const item of res.data) { diff --git a/src/views/ne/neConfigHA/index.vue b/src/views/ne/neConfigHA/index.vue index c9d8ee0d..043d9e3d 100644 --- a/src/views/ne/neConfigHA/index.vue +++ b/src/views/ne/neConfigHA/index.vue @@ -30,7 +30,7 @@ let neIdSelect = ref([]); let neTypeSelectStatus = ref(true); /**网元类型neType选择 */ async function fnSelectNeType(_: any, info: any) { - if (!info) return; + if (!info) return; await fnGetNeConfig(info.value); if (treeState.data.length === 0) { message.warning({ @@ -226,7 +226,8 @@ async function fnGetNeConfig(neType: string) { treeState.loading = true; // 获取数据 - const res = await getAllNeConfig(neType); + let neId = neTypeSelect.value[1]; + const res = await getAllNeConfig(neType, neId); if (res.code === RESULT_CODE_SUCCESS) { const arr = []; for (const v of res.data) {