Browse Source

[Fix 0000]修复数据中心相关接口请求报错Token错误的问题

bobo04052021@163.com 3 ngày trước cách đây
mục cha
commit
73d243cc64

+ 7 - 2
src/utils/http/axios/index.ts

@@ -198,8 +198,13 @@ const transform: AxiosTransform = {
    * @description: 请求拦截器处理
    */
   requestInterceptors: (config: Recordable, options) => {
-    // 请求之前处理config
-    const token = getToken();
+    let token: string | null = null;
+    if (config.headers['X-Access-Token']) {
+      config.headers.Authorization = config.headers['X-Access-Token'];
+      token = config.headers['X-Access-Token'];
+    } else {
+      token = getToken();
+    }
     let tenantId: string | number = getTenantId();
     if (token && (config as Recordable)?.requestOptions?.withToken !== false) {
       // jwt token

+ 21 - 4
src/views/vent/dataCenter/deviceCenter/device.api.ts

@@ -2,11 +2,28 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
   deviceTypeList = '/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem',
-  deviceList = '/compute/deviceData/getDeviceAll',
-  devMonitorList = '/compute/deviceData/getDeviceMonitorInfo',
+  deviceList = '/dataCenter/compute/deviceData/getDeviceAll',
+  devMonitorList = '/dataCenter/compute/deviceData/getDeviceMonitorInfo',
 }
 export const getDeviceTypeList = (params) => defHttp.get({ url: Api.deviceTypeList, params });
 //根据设备类型获取设备列表
-export const getDeviceListByType = (params) => defHttp.post({ url: Api.deviceList, params });
+// export const getDeviceListByType = (params) => defHttp.post({ url: Api.deviceList, params });
+export const getDeviceListByType = (params) =>
+  defHttp.post({
+    headers: {
+      'X-Access-Token':
+        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzU5ODQxMTcwfQ.fHaM3l-d88tUSLOs8sstXsDuSCn6Agbj_EMZMgV6waw',
+    },
+    url: Api.deviceList,
+    params,
+  });
 //根据设备id获取设备监控数据
-export const getDevMonitorListById = (params) => defHttp.post({ url: Api.devMonitorList, params });
+export const getDevMonitorListById = (params) =>
+  defHttp.post({
+    headers: {
+      'X-Access-Token':
+        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzU5ODQxMTcwfQ.fHaM3l-d88tUSLOs8sstXsDuSCn6Agbj_EMZMgV6waw',
+    },
+    url: Api.devMonitorList,
+    params,
+  });

+ 2 - 844
src/views/vent/dataCenter/deviceCenter/index.vue

@@ -282,193 +282,7 @@ async function getDeviceList(deviceTypeVal?) {
   const params: any = {
     devKind: deviceTypeVal,
   };
-  const result = {
-    records: [
-      {
-        id: '1965325207547695105',
-        strname: '束管1',
-        strinstallpos: '束管1',
-        devicekind: 'bundletube',
-        strtype: 'bundletube_auto',
-        typename: null,
-        flength: null,
-        fsectarea: null,
-        planedVa: null,
-        regulation: null,
-        elevation: null,
-        nsubstationid: '1696417397868986370',
-        stationname: '调试http协议',
-        strremark: null,
-        createBy: 'admin',
-        createTime: '2025-09-09 16:03:38',
-        updateBy: null,
-        updateTime: null,
-        isSelfDevice: 0,
-        status: 1,
-        monitorflag: 1,
-        testflag: 0,
-        sysOrgCode: 'A02A02',
-        orgCode: 'A02',
-        readData: {},
-        linkInfo: null,
-        stationids: null,
-        password: null,
-        strserno: 'sg001',
-        devgroup: null,
-        panel: null,
-        coalseam: null,
-        other1: null,
-        other2: null,
-        other3: null,
-        other4: null,
-        info: {},
-        linkId: null,
-        addrIndex: null,
-        standCode: null,
-        stationtype: null,
-        otherInfo: null,
-        programList: null,
-        debugFlag: 0,
-        orderNum: 0,
-        insType: null,
-        disTeamId: null,
-        isSensor: null,
-        nameEarly: null,
-        nameNoon: null,
-        nameNight: null,
-        disTeamName: null,
-        gasCheckTaskId: null,
-        isExistGasCheckTask: null,
-        netStatus: null,
-        devicekind_dictText: '束管监测',
-        isSelfDevice_dictText: '其他厂家',
-        monitorflag_dictText: '监测',
-        testflag_dictText: '否',
-      },
-      {
-        id: '1965325207568666626',
-        strname: '束管2',
-        strinstallpos: '束管2',
-        devicekind: 'bundletube',
-        strtype: 'bundletube_auto',
-        typename: null,
-        flength: null,
-        fsectarea: null,
-        planedVa: null,
-        regulation: null,
-        elevation: null,
-        nsubstationid: '1696417397868986370',
-        stationname: '调试http协议',
-        strremark: null,
-        createBy: 'admin',
-        createTime: '2025-09-09 16:03:38',
-        updateBy: null,
-        updateTime: null,
-        isSelfDevice: 0,
-        status: 1,
-        monitorflag: 1,
-        testflag: 0,
-        sysOrgCode: 'A02A02',
-        orgCode: 'A02',
-        readData: {},
-        linkInfo: null,
-        stationids: null,
-        password: null,
-        strserno: 'sg002',
-        devgroup: null,
-        panel: null,
-        coalseam: null,
-        other1: null,
-        other2: null,
-        other3: null,
-        other4: null,
-        info: {},
-        linkId: null,
-        addrIndex: null,
-        standCode: null,
-        stationtype: null,
-        otherInfo: null,
-        programList: null,
-        debugFlag: 0,
-        orderNum: 0,
-        insType: null,
-        disTeamId: null,
-        isSensor: null,
-        nameEarly: null,
-        nameNoon: null,
-        nameNight: null,
-        disTeamName: null,
-        gasCheckTaskId: null,
-        isExistGasCheckTask: null,
-        netStatus: null,
-        devicekind_dictText: '束管监测',
-        isSelfDevice_dictText: '其他厂家',
-        monitorflag_dictText: '监测',
-        testflag_dictText: '否',
-      },
-      {
-        id: '1965325207568666627',
-        strname: '束管3',
-        strinstallpos: '束管3',
-        devicekind: 'bundletube',
-        strtype: 'bundletube_auto',
-        typename: null,
-        flength: null,
-        fsectarea: null,
-        planedVa: null,
-        regulation: null,
-        elevation: null,
-        nsubstationid: '1696417397868986370',
-        stationname: '调试http协议',
-        strremark: null,
-        createBy: 'admin',
-        createTime: '2025-09-09 16:03:38',
-        updateBy: null,
-        updateTime: null,
-        isSelfDevice: 0,
-        status: 1,
-        monitorflag: 1,
-        testflag: 0,
-        sysOrgCode: 'A02A02',
-        orgCode: 'A02',
-        readData: {},
-        linkInfo: null,
-        stationids: null,
-        password: null,
-        strserno: 'sg003',
-        devgroup: null,
-        panel: null,
-        coalseam: null,
-        other1: null,
-        other2: null,
-        other3: null,
-        other4: null,
-        info: {},
-        linkId: null,
-        addrIndex: null,
-        standCode: null,
-        stationtype: null,
-        otherInfo: null,
-        programList: null,
-        debugFlag: 0,
-        orderNum: 0,
-        insType: null,
-        disTeamId: null,
-        isSensor: null,
-        nameEarly: null,
-        nameNoon: null,
-        nameNight: null,
-        disTeamName: null,
-        gasCheckTaskId: null,
-        isExistGasCheckTask: null,
-        netStatus: null,
-        devicekind_dictText: '束管监测',
-        isSelfDevice_dictText: '其他厂家',
-        monitorflag_dictText: '监测',
-        testflag_dictText: '否',
-      },
-    ],
-  };
+  const result = await getDeviceListByType(params);
   deviceList.value = result.records;
 }
 
@@ -557,669 +371,13 @@ const loadMonitoringData = async (deviceId) => {
 
   loadingMap[deviceId] = true;
   try {
-    const result = {
-      msgType: null,
-      deviceID: '1965325207568666627',
-      deviceType: 'bundletube_auto',
-      typeName: '束管监测',
-      kindtypeName: '束管监测',
-      deviceName: '束管3',
-      devicePos: '束管3',
-      subStationID: '1696417397868986370',
-      monitorflag: 1,
-      testflag: 0,
-      fsectarea: null,
-      planedVa: null,
-      regulation: null,
-      elevation: null,
-      subStationName: '调试http协议束管',
-      subStationIP: 'http://192.168.1.88:10930/compute/testDta/getSgList',
-      subStationPort: '8930',
-      subStationType: 'http',
-      addrIndex: null,
-      standCode: null,
-      sysOrgCode: 'A02A02',
-      orgCode: 'A02',
-      stationids: null,
-      bakids: null,
-      limits: null,
-      cameras: [],
-      summaryHour: [],
-      summaryDay: [],
-      history: [],
-      majorpath: {},
-      info: null,
-      netStatus: null,
-      frontGateOpenCtrl: null,
-      rearGateOpenCtrl: null,
-      readTime: '2025-10-30 14:31:32',
-      lastSummaryDate: null,
-      paramid: null,
-      readData: {
-        coval: {
-          id: 1611236056970682378,
-          saveid: 0,
-          valueCode: 'coval',
-          valueName: '一氧化碳',
-          value: '12.50',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'coval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '一氧化碳低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'coval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '一氧化碳高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'co',
-          lastSummaryDate: null,
-        },
-        ch2val: {
-          id: 1611236056970682382,
-          saveid: 0,
-          valueCode: 'ch2val',
-          valueName: '乙烯',
-          value: '0.00',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'ch2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '乙烯低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'ch2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '乙烯高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'ch2',
-          lastSummaryDate: null,
-        },
-        gasval: {
-          id: 1611236056970682380,
-          saveid: 0,
-          valueCode: 'gasval',
-          valueName: '甲烷',
-          value: '0.40',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'gasval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '甲烷低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'gasval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '甲烷高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'ch4',
-          lastSummaryDate: null,
-        },
-        chval: {
-          id: 1611236056970682381,
-          saveid: 0,
-          valueCode: 'chval',
-          valueName: '乙炔',
-          value: '0.00',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'chval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '乙炔低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'chval',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '乙炔高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'c2h2',
-          lastSummaryDate: null,
-        },
-        o2val: {
-          id: 1611236056970683001,
-          saveid: 0,
-          valueCode: 'o2val',
-          valueName: '氧气',
-          value: '19.96',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'o2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '氧气低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'o2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '氧气高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'o2',
-          lastSummaryDate: null,
-        },
-        co2val: {
-          id: 1611236056970682379,
-          saveid: 0,
-          valueCode: 'co2val',
-          valueName: '二氧化碳',
-          value: '0.22',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 4,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'co2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: null,
-              fmax: -10000.00000999999974737875163555145263671875,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '二氧化碳低于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-            {
-              id: null,
-              limitid: null,
-              devicekind: null,
-              devicetype: null,
-              deviceid: null,
-              eventid: null,
-              eventname: null,
-              monitorcode: 'co2val',
-              valuetype: 2,
-              alarmType: null,
-              relatedCode: null,
-              fmin: 1000.000009999999974752427078783512115478515625,
-              fmax: 1000000,
-              leveltype: 10000,
-              datakind: null,
-              timelength: null,
-              des: '二氧化碳高于限值',
-              maxDeviceid: null,
-              minDeviceid: null,
-              maxCode: null,
-              minCode: null,
-              isVoice: null,
-              isCxVoice: null,
-              voiceFre: null,
-            },
-          ],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: '读取数据为空',
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: 1,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'co2',
-          lastSummaryDate: null,
-        },
-        deviceStatus: {
-          id: 1611236056970682466,
-          saveid: 0,
-          valueCode: 'deviceStatus',
-          valueName: '运行状态',
-          value: '',
-          hourNum: null,
-          dayNum: null,
-          hourAvg: null,
-          hourMax: null,
-          hourMin: null,
-          dayAvg: null,
-          dayMax: null,
-          dayMin: null,
-          hourMaxTime: null,
-          dayMaxTime: null,
-          hourMinTime: null,
-          dayMinTime: null,
-          dictset: null,
-          summaryDate: null,
-          valueType: 3,
-          maxVal: null,
-          minVal: null,
-          limitlevels: [],
-          warnFlag: null,
-          time: '2025-10-30 14:31:32',
-          timelength: null,
-          warnInfo: null,
-          warnRank: null,
-          saveflag: 1,
-          spaceSave: null,
-          avgflag: null,
-          warnKindType: null,
-          isVoice: null,
-          isCxVoice: null,
-          voiceFre: null,
-          plcAddr: 'M49.0',
-          lastSummaryDate: null,
-        },
-      },
-      oldData: {},
-      oldreadTime: null,
-      fclearwidth: null,
-      fperheight: null,
-      nwindow: null,
-      nwindownum: null,
-      sign: null,
-      isRun: null,
-      saveflag: null,
-      spaceSave: 0,
-      linkInfo: null,
-      linkId: null,
-      bakflag: null,
-      password: null,
-      strserno: 'sg003',
-      strRemark: null,
-      other1: null,
-      other2: null,
-      other3: null,
-      sysKind: 'fireS',
-      orderNum: 0,
-      dtype: 'bundletube',
-      nfrontPluseCircle: null,
-      nbackPluseCircle: null,
-    };
+    const result = await getDevMonitorListById({ devId: deviceId });
     monitorList.value = Object.values(result.readData);
   } catch (error) {
     console.error(`加载设备 ${deviceId} 数据失败:`, error);
   } finally {
     loadingMap[deviceId] = false;
   }
-  // const result = await getDevMonitorListById({ deviceId });
 };
 
 onMounted(async () => {