From 93134f806255451acba8668529b4e41860ec9a90 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 11 五月 2024 09:24:22 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 53 insertions(+), 5 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 3ebeac2..f7d0f2f 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -420,7 +420,7 @@ infoType: 0, text: '', infoText: { - title: 'AGV鎷i�変俊鎭�', + title: '', staNo: "", matnr: "", maknx: "", @@ -463,15 +463,44 @@ // 娴嬭瘯鐢� this.getVisualized() + // this.getVisualizedTest() },1000) }, methods: { getUrl() { this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePort + "/" +this.baseUrl }, + getVisualizedTest() { + let that = this + var result = ycqdata.dataInfo3 + console.log(result); + let res = result.data + if (res.code === 200) { + console.log(res.data.agvWaitPakins); + if (res.data.agvWrkDetls != null) { + that.locs = res.data.agvWrkDetls + if (res.data.agvWrkMast) { + if (res.data.agvWrkMast.ioType == 107) { + that.infoText.title = '鐩樼偣鍑哄簱' + } else if (res.data.agvWrkMast.ioType == 103) { + that.infoText.title = '鎷f枡鍑哄簱' + } else { + that.infoText.title = '鍏ㄦ澘鍑哄簱' + } + } else{ + that.infoText.title = '鍏ュ簱浣滀笟' + } + } else if (res.data.agvWaitPakins != null) { + that.locs = res.data.agvWaitPakins + that.infoText.title = '鍏ュ簱浣滀笟' + } + + + + } + }, getVisualized() { let that = this - console.log(this.devNo); let param = {devNo: `${that.devNo}`} uni.request({ url: `${that.commonUrl}/rpc/info`, @@ -486,10 +515,29 @@ data: JSON.stringify(param), success(res) { res = res.data - console.log(res); that.result = res - if (res.code === 200 && res.data) { - that.locs = res.data + if (res.code === 200) { + console.log(res.data.agvWaitPakins); + if (res.data.agvWrkDetls != null) { + that.locs = res.data.agvWrkDetls + if (res.data.agvWrkMast) { + if (res.data.agvWrkMast.ioType == 107) { + that.infoText.title = '鐩樼偣鍑哄簱' + } else if (res.data.agvWrkMast.ioType == 103) { + that.infoText.title = '鎷f枡鍑哄簱' + } else { + that.infoText.title = '鍏ㄦ澘鍑哄簱' + } + } else{ + that.infoText.title = '鍏ュ簱浣滀笟' + } + } else if (res.data.agvWaitPakins != null) { + that.locs = res.data.agvWaitPakins + that.infoText.title = '鍏ュ簱浣滀笟' + } + + + } } }) -- Gitblit v1.9.1