From b45407e3504abf5dae7866f1ce5a9c47e8cf23ac Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期六, 04 十月 2025 13:39:37 +0800 Subject: [PATCH] 12 --- Monitor-APP/pages/home/home.vue | 123 +++++++++++++---------------------------- 1 files changed, 39 insertions(+), 84 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 53ab323..8f0afe2 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -434,7 +434,7 @@ times: 0, currDate: '', textred: 'textred', - apiIp: '192.168.5.22', + apiIp: '192.168.7.247', apiPort: '9090', apiUrl: 'czkhwcs', ledInfosApi: '/console/getLedInfos' @@ -570,90 +570,45 @@ ledId: that.baseLedId }, success(result) { - var res = result.data - const res1 = { - "data": [{ - "ioType": 103, - "staNo": "STA002", - "workNo": "8888", - "matDtos": [{ - "matnr": "0050950010050001", - "maknx": "灏忓帹鎴�", - "proType": "鐢甸晙", - "batch": null, - "specs": "桅35", - "orderNo": "WHIN2503000101", - "outOrderNo": "BYM2024-1007SN楂橀湒", - "unit": "pcs", - "weight": 450, - "objectName": "桅35閾滃皬鍘ㄦ埧", - "length": 20, - "temp1": "浜屽彿鏄熸渤绌哄績鍗曞瓟锛堜笉甯﹀瓟銆丮8铻虹汗瀛旓級", - "temp2": "1007SN楂橀湒", - "count": 1000, - "anfme": 1000, - "factArea": "楂橀湒宸ュ巶" - }, - { - "matnr": "0050950010050002", - "proType": "鐢甸晙", - "maknx": "澶у帹鎴�", - "batch": "B20240521A", - "specs": "桅45", - "orderNo": "WHIN2503000102", - "outOrderNo": "BYM2024-1008SN楂橀湒", - "unit": "pcs", - "weight": 520, - "objectName": "桅45閾滃ぇ鍘ㄦ埧", - "length": 22, - "temp1": "D1075000鍏ュ鍠锋灙榫欏ご(57閾溿�佷綋鎶涚爞銆�2涓灪涓濆瓟)SH095", - "temp2": "1007SN楂橀湒", - "count": 800, - "anfme": 800, - "factArea": "涓壃宸ュ巶" - }, - { - "matnr": "0050950010050003", - "proType": "鐢甸晙", - "maknx": "娴村閰嶄欢", - "batch": "B20240521B", - "specs": "桅28", - "orderNo": "WHIN2503000103", - "outOrderNo": "BYM2024-1009SN楂橀湒", - "unit": "濂�", - "weight": 300, - "objectName": "桅28闀�閾浠�", - "length": 18, - "temp1": "桅28闀�閾浠�", - "temp2": "1007SN楂橀湒", - "count": 600, - "anfme": 600, - "factArea": "涓壃宸ュ巶" - }, - { - "matnr": "0050950010050004", - "proType": "鐢甸晙", - "maknx": "闂ㄦ妸鎵�", - "batch": null, - "specs": "L200*W30", - "orderNo": "WHIN2503000104", - "outOrderNo": "BYM2024-1010SN楂橀湒", - "unit": "涓�", - "weight": 180, - "objectName": "榛戣壊閾濋棬鎶婃墜", - "length": 20, - "temp1": "榛戣壊閾濋棬鎶婃墜", - "temp2": "1007SN楂橀湒", - "count": 300, - "anfme": 300, - "factArea": "涓壃宸ュ巶" - } - ] - } - - ] + var res = result.data + if (res.data && res.data !== "") { + if (that.infoType == 2 || that.infoType == 3) { + return; + } + // infoType1:鍙湁鎷f枡绛変俊鎭� + that.infoType = 1 + if (res.data[0].ioType === 101) { + that.infoText.title = '鍏ㄦ澘鍑哄簱' + } else if(res.data[0].ioType === 103) { + that.infoText.title = '妫�鏂欏嚭搴�' + } else if(res.data[0].ioType === 107) { + that.infoText.title = '鐩樼偣鍑哄簱' + } else if(res.data[0].ioType === 1) { + that.infoText.title = '鍏ュ簱' + } else if(res.data[0].ioType === 10) { + that.infoText.title = '绌烘墭鍏ュ簱' + } else if(res.data[0].ioType === 110) { + that.infoText.title = '绌烘墭鍑哄簱' + }else if(res.data[0].ioType === 54) { + that.infoText.title = '骞舵澘鍐嶅叆搴�' + } else if(res.data[0].ioType === 104) { + that.infoText.title = '骞舵澘鍑哄簱' + } + that.infoText.barcode = res.data[0].barcode + that.infoText.workNo = res.data[0].workNo + that.infoText.sourceLocNo = res.data[0].sourceLocNo + that.infoText.staNo = res.data[0].staNo + that.swiperList = res.data[0].matDtos + // that.infoText.matnr = res.data[0].matDtos[0].matnr + // that.infoText.specs = res.data[0].matDtos[0].specs + // that.infoText.maknx = res.data[0].matDtos[0].maknx + // that.infoText.count = res.data[0].matDtos[0].count + } else { + if (that.infoType == 2 || that.infoType == 3) { + return; + } + that.infoType = 0 } - that.infoModel(res1) } }) -- Gitblit v1.9.1