diff --git a/src/views/perfManage/overview/index.vue b/src/views/perfManage/overview/index.vue index 4a42a20e..4bf8c1e5 100644 --- a/src/views/perfManage/overview/index.vue +++ b/src/views/perfManage/overview/index.vue @@ -223,7 +223,7 @@ async function fetchHistoryData(neId: string) { const res = await listKPIData(params) //console.log('历史数据响应:', res) - if (res.code === 200001 && Array.isArray(res.data)) { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { // 将历史数据转换为与实时数据相同的格式 const historyData = res.data.map((item: any) => ({ timestamp: item.timeGroup || Date.now(), @@ -1006,7 +1006,7 @@ function handleIMSRealtimeData(res: any) { const { code, data, msg } = res // 检查是否是错误响应 - 修改为适配实际的code值 - if (code !== 200001 || !data) { + if (code !== RESULT_CODE_SUCCESS || !data) { // console.warn('收到错误响应或数据格式不正确:', res) // 调试信息 return } @@ -1798,7 +1798,7 @@ function calculateFailedRegistrationsChange() { // // // 创建模拟的后端KPI数据消息格式 // const mockWebSocketMessage = { -// code: 1, +// code: RESULT_CODE_SUCCESS, // data: { // data: { // 'SCSCF.03': Math.floor(Math.random() * 300000) + 200000, // active registrations