From 82f1aa86b16963bd92a09391f2360eb1a6751ace Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期五, 13 五月 2022 14:14:44 +0800 Subject: [PATCH] # --- Monitor-APP/pages/index/index.vue | 87 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 79 insertions(+), 8 deletions(-) diff --git a/Monitor-APP/pages/index/index.vue b/Monitor-APP/pages/index/index.vue index 062d9f8..340ba16 100644 --- a/Monitor-APP/pages/index/index.vue +++ b/Monitor-APP/pages/index/index.vue @@ -14,14 +14,14 @@ <view class="box-border box-border2"></view> <view class="box-border box-border3"></view> <view class="box-border box-border4"></view> - <view style="width: 10%;height: 100%;background-color: #007AFF;display: inline-block;float: left;"> - <text>鍏ㄦ澘鍑哄簱</text> + <view style="width: 10%;height: 100%;display:inline-block;float: left;text-align: center;padding-top: 180px;"> + <text>{{title}}</text> </view> - <view style="width: 80%;height: 100%;background-color: #063A7B;display: inline-block;float: left;"> + <view style="width: 80%;height: 100%;display: inline-block;float: left;font-size: 170rpx;"> <text class="animate">{{newspaper}}</text> </view> - <view style="width: 10%;height: 100%;background-color: #00428a;display: inline-block;float: right;"> - <text>186</text> + <view style="width: 10%;height: 100%;display: inline-block;float: right;padding-top: 180px;"> + <text>鐩爣绔檣{staNo}}</text> </view> </view> </view> @@ -248,12 +248,14 @@ week:'鏄熸湡鍥�', ani:'', // move: 'upMove 1.5s 1;', - move:true, + move:false, topMove:'topUp', floorMove:'', version:'', // newspaper:'鎷f枡鍑哄簱锛�4426)\n婧愬簱浣嶏細1200101\n鐩爣绔欙細186\n1101842-10000-22047518517\n\n', newspaper:'', + title:'', + staNo:'' } }, mounted() { @@ -283,7 +285,8 @@ }, 1000); setInterval(() => { this.getDate(); - this.getPakin(); + // this.getPakin(); + this.getYYY(); this.animation(); },1000) }, @@ -304,10 +307,24 @@ method:'GET', success(result) { console.log(result) + var newsData = '' + var str = '' let res = result.data if (res.data[0]) { - that.newspaper = res.data[0].matDtos + if (res.data[0].ioType === 101) { + that.title = '鍏ㄦ澘鍑哄簱' + } else if(res.data[0].ioType === 103) { + that.title = '妫�鏂欏嚭搴�' + } + that.staNo = res.data[0].staNo + + for (var i = 0; i < res.data[0].matDtos.length; i++) { + str = res.data[0].matDtos[i].matnr + ' - ' + res.data[0].matDtos[i].batch + '\n' + newsData = newsData + str + } + + console.log(newsData) that.move = false } else { that.newspaper = '' @@ -316,6 +333,60 @@ } }) }, + getYYY() { + let that = this + var newsData = '' + var str = '' + var result = {"msg":"鎿嶄綔鎴愬姛", + "code":200, + "data":[{ + "title":"鍏ㄦ澘鍑哄簱", + "workNo":7016, + "ioType":101, + "staNo":188, + "sourceStaNo":null, + "locNo":null, + "sourceLocNo":"0900107", + "matDtos":[ + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037502300","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505146","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504801","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507729","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507727","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507731","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504807","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504805","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504797","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504794","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504791","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504793","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505141","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507728","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504810","count":1.0}, + {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505148","count":1.0}], + "emptyMk":false}]} + let res = result.data + console.log(res[0].ioType) + if (res[0]) { + if (res[0].ioType === 101) { + that.title = '鍏ㄦ澘鍑哄簱' + } else if(res[0].ioType === 103) { + that.title = '妫�鏂欏嚭搴�' + } + that.staNo = res[0].staNo + + for (var i = 0; i < res[0].matDtos.length; i++) { + str = res[0].matDtos[i].matnr + ' - ' + res[0].matDtos[i].batch + '\n' + newsData = newsData + str + } + console.log(newsData) + that.newspaper = newsData + that.move = false + } else { + that.newspaper = '' + that.move = true + } + }, animation() { // console.log(this.baseUrl,this.baseLedId) if (this.move) { -- Gitblit v1.9.1