From 393a90a0d03a76e7117c5ed751877b85abb8c48c Mon Sep 17 00:00:00 2001 From: zhongzm Date: Tue, 26 Aug 2025 17:07:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9code=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/overview/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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