From 4b46937a30cdc356de14d207c4ed09e25373af10 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 09 九月 2024 08:11:23 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 81 +++++++++++++++++++++++++++++++++++++--- 1 files changed, 74 insertions(+), 7 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 3ebeac2..efea331 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -262,7 +262,8 @@ <swiper class="swiper-body-main" vertical="true" display-multiple-items="8" circular="true" :autoplay="true" :interval="3000" :duration="1000"> - <swiper-item class="swiper-item" v-for="(item,i) in locs" :key="i"> + <swiper-item class="swiper-item" v-for="(item,i) in locs" :key="i" + :style="item.color"> <view style="width: 10%;">No:{{i+1}}</view> <view style="width: 12%;">{{item.orderNo ? item.orderNo : '--'}}</view> <view style="width: 12%;">{{item.wrkNo ? item.wrkNo : '--'}}</view> @@ -420,7 +421,7 @@ infoType: 0, text: '', infoText: { - title: 'AGV鎷i�変俊鎭�', + title: '', staNo: "", matnr: "", maknx: "", @@ -463,15 +464,48 @@ // 娴嬭瘯鐢� 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 if (res.data.agvWrkMast.ioType == 57) { + that.infoText.title = '鐩樼偣鍐嶅叆搴�' + } else if (res.data.agvWrkMast.ioType == 53) { + that.infoText.title = '鎷f枡鍐嶅叆搴�' + } else if (res.data.agvWrkMast.ioType == 101) { + 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 +520,39 @@ 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) { + 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枡鍑哄簱' + for (let k in that.locs) { + if (that.locs[k].anfme == 0 || that.locs[k].anfme == null) { + that.locs[k]['color'] = 'color: #df741c' + } + } + } else if (res.data.agvWrkMast.ioType == 57) { + that.infoText.title = '鐩樼偣鍐嶅叆搴�' + } else if (res.data.agvWrkMast.ioType == 53) { + that.infoText.title = '鎷f枡鍐嶅叆搴�' + } else if (res.data.agvWrkMast.ioType == 101) { + that.infoText.title = '鍏ㄦ澘鍑哄簱' + } + + + } else{ + that.infoText.title = '鍏ュ簱浣滀笟' + } + } else if (res.data.agvWaitPakins != null) { + that.locs = res.data.agvWaitPakins + that.infoText.title = '鍏ュ簱浣滀笟' + } + + + } } }) @@ -790,7 +853,7 @@ success(result) { var res = result.data if (res.code === 200) { - console.log(res.data.pie); + // console.log(res.data.pie); that.chartsData.Pie.series[0].data = res.data.pie that.baseInfo.longAllLoc = res.data.longAllLoc that.baseInfo.shortAllLoc = res.data.shortAllLoc @@ -848,6 +911,10 @@ flex-direction: row; } + .red { + color: red + } + .container{ width: 100vw; min-height: 100vh; -- Gitblit v1.9.1