diff --git a/src/views/components/WarehouseWarning.vue b/src/views/components/WarehouseWarning.vue index b373c56..cf0ed16 100644 --- a/src/views/components/WarehouseWarning.vue +++ b/src/views/components/WarehouseWarning.vue @@ -150,69 +150,25 @@ export default { } }, getAlarmInfo() { + // [{"alarmid": "88347b05","lscid": 1,"WYID":"192.168.99.101:5004_1","Itemlevels":7, "siteName": "环境监控.空气净化机", "TS":"2026/1/6 15:08:56", "id":11955, "isAD":1,"type":0,"IP":" 192.168.99.101:5004 ","name":"串口", "value":"无响应", "dw":"", "ItemClass":3},{"alarmid": "4b232d46","lscid": 1,"WYID":"192.168.99.101:5003_1","Itemlevels":7, "siteName": "环境监控.恒湿净化机", "TS":"2026/1/6 16:13:31", "id":11922, "isAD":1,"type":0,"IP":" 192.168.99.101:5003 ","name":"串口", "value":"无响应", "dw":"", "ItemClass":1},{"alarmid": "3a309a0a","lscid": 9,"WYID":"192.168.99.101:6003_9","Itemlevels":7, "siteName": "环境监控.环控设备监测", "TS":"2026/1/6 16:18:33", "id":12061, "isAD":1,"type":0,"IP":" 192.168.99.101:6003 ","name":"红外感应", "value":"OFF", "dw":"", "ItemClass":3},{"alarmid": "63df6a30","lscid": 1,"WYID":"192.168.99.101:5005_1","Itemlevels":7, "siteName": "环境监控.温湿度传感器", "TS":"2026/1/6 16:19:58", "id":11305, "isAD":1,"type":0,"IP":" 192.168.99.101:5005 ","name":"串口", "value":"无响应", "dw":"", "ItemClass":1}] + // this.tableData = [ + // { + // 'id': 'eb6b8653', + // 'lscid': 0, + // 'wyid': '', + // 'itemLevels': 1, + // 'siteName': '.环境监控', + // 'TS': 1765944141000, + // 'isAd': true, + // 'type': 0, + // 'ip': '192.168.99.101:6003', + // 'name': '开关量', + // 'value': '设备断线', + // 'dw': '', + // 'itemClass': 1 + // } + // ] alarmApi.info({ storeroomId: this.storeroomId }).then((data) => { - // this.tableData = [ - // { - // 'id': 'eb6b8653', - // 'lscid': 0, - // 'wyid': '', - // 'itemLevels': 1, - // 'siteName': '.环境监控', - // 'TS': 1765944141000, - // 'isAd': true, - // 'type': 0, - // 'ip': '192.168.99.101:6003', - // 'name': '开关量', - // 'value': '设备断线', - // 'dw': '', - // 'itemClass': 1 - // }, - // { - // 'id': 'eeeeeeee', - // 'lscid': 0, - // 'wyid': null, - // 'itemLevels': 1, - // 'siteName': '红外外线', - // 'TS': 1765867832000, - // 'isAd': true, - // 'type': 0, - // 'ip': '192.168.99.100', - // 'name': '红外外线', - // 'value': '红外线报警', - // 'dw': null, - // 'itemClass': 1 - // }, - // { - // 'id': 'eb6b8653', - // 'lscid': 0, - // 'wyid': '', - // 'itemLevels': 1, - // 'siteName': '.环境监控', - // 'TS': 1765944141000, - // 'isAd': true, - // 'type': 0, - // 'ip': '192.168.99.101:6003', - // 'name': '开关量', - // 'value': '设备断线', - // 'dw': '', - // 'itemClass': 1 - // }, - // { - // 'id': 'eeeeeeee', - // 'lscid': 0, - // 'wyid': null, - // 'itemLevels': 1, - // 'siteName': '红外外线', - // 'TS': 1765867832000, - // 'isAd': true, - // 'type': 0, - // 'ip': '192.168.99.100', - // 'name': '红外外线', - // 'value': '红外线报警', - // 'dw': null, - // 'itemClass': 1 - // } - // ] this.tableData = [] if (data && data.length > 0) { // this.tableData.splice(0, data.length, ...data) diff --git a/src/views/storeManage/deviceManage/module/deviceDetail.vue b/src/views/storeManage/deviceManage/module/deviceDetail.vue index 5f4b827..672aa27 100644 --- a/src/views/storeManage/deviceManage/module/deviceDetail.vue +++ b/src/views/storeManage/deviceManage/module/deviceDetail.vue @@ -510,9 +510,11 @@ export default { }, getypNetStatusByIp(element) { - crudDevice.FetchypNetStatusByIp({ id: element.id }) + crudDevice.FetchypNetStatusByIp({ ip: element.deviceIp }) .then((data) => { - element.deviceState = data === '0' ? 1 : 0 + console.log('data', data) + console.log('data', typeof data) + element.deviceState = data === 0 ? 0 : 1 }) .catch((error) => { console.error('获取原品环控设备状态失败:', error)