From 4109a5f3adb87196b250e1a9c19c18d69b64e30d Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 02 七月 2024 15:49:42 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 106 +++++++++++++++++------------------------------------ 1 files changed, 34 insertions(+), 72 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index c5eaf24..79836b9 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -214,13 +214,12 @@ <!-- 鏂囨湰瀹瑰櫒 --> <view class="text-content"> <!-- head --> - <view class="swiper-head"> + <!-- <view class="swiper-head"> <view style="width: 30%;">鎵樼洏鐮�: {{infoText.barcode}}</view> <view style="width: 20%;">宸ヤ綔鍙�: {{infoText.workNo}}</view> <view style="width: 30%;">婧愬簱浣�: {{infoText.sourceLocNo}}</view> - <view style="width: 20%;">鐩爣绔�: {{infoText.staNo}}</view> - <!-- <view style="width: 10%;">鏁伴噺</view> --> - </view> + <view style="width: 20%;">鎺ユ敹绔欑偣: {{infoText.staNo}}</view> + </view> --> <!-- body --> <view class="swiper-body"> <!-- swiper 涓�浜涜鏄� @@ -228,19 +227,21 @@ vertical 婊戝姩鏂瑰悜鏄惁涓虹旱鍚� display-multiple-items 鍚屾椂鏄剧ず鐨勬粦鍧楁暟閲� --> <swiper class="swiper-body-main" vertical="true" - display-multiple-items="3" - circular="true" :autoplay="true" :interval="3000" :duration="2000"> + display-multiple-items="5" + circular="true" :autoplay="false" :interval="3000" :duration="2000"> <swiper-item class="swiper-item" v-for="(item,i) in swiperList" :key="i"> - <view style="width: 30%;">{{i+1}} / {{swiperList.length}}</view> - <!-- <view style="width: 30%;">鏂欏彿: {{item.matnr}}</view> --> - <view style="width: 40%;">鍚嶇О: {{item.maknx}}</view> - <view style="width: 30%;">瀹㈡埛: {{item.manu}}</view> + <!-- <view style="width: 30%;">{{i+1}} / {{swiperList.length}}</view> --> + <view style="width: 20%;">浠诲姟鍗曞彿: {{item.taskNo}}</view> + <view style="width: 20%;">杞藉叿缂栧彿: {{item.barcode}}</view> + <view style="width: 20%;">宸ヤ綔鍙�: {{item.taskNo}}</view> + <view style="width: 20%;">鐗╂枡鍚嶇О: {{item.maktx}}</view> + <view style="width: 20%;">鐗╂枡鍙�: {{item.matnr}}</view> - - <view style="width: 30%;">鍑哄簱: {{item.count}} / 鎬绘暟: {{item.total}}</view> - <view style="width: 40%;">瑙勬牸: {{item.specs}}</view> - <view style="width: 30%;">澶囨敞: {{item.memo}}</view> - + <view style="width: 20%;">浠诲姟绫诲瀷: {{item.ioType$}}</view> + <view style="width: 20%;">鍑哄彂绔欑偣: {{item.startPoint ? item.startPoint : '--'}}</view> + <view style="width: 20%;">鎺ユ敹绔欑偣: {{item.targetPoint}}</view> + <view style="width: 20%;">杞繍鏁伴噺: {{item.anfme}}</view> + <!-- <view style="width: 20%;">澶囨敞: {{item.memo}}</view> --> <!-- 11 --> </swiper-item> </swiper> @@ -319,7 +320,7 @@ </view> </view> </view> - <view style="color: #FFF;position: fixed;bottom: 10px;left: 10px;" v-show="timeOut"> + <view style="color: #FFF;position: fixed;bottom: 10px;left: 10px;" v-show="timeOuts"> 杩炴帴瓒呮椂: {{times}} s </view> </view> @@ -389,7 +390,7 @@ barcode: "" }, swiperList: [], - timeOut: false, + timeOuts: false, times: 0, currDate: '' } @@ -422,9 +423,9 @@ this.getOther() // this.getDate() this.getDate2() - this.getInfo() - this.getError() - // this.getInfo2() + // this.getInfo() + // this.getError() + this.getInfo2() // this.getError2() this.getUrl() this.controller() @@ -448,34 +449,14 @@ let that = this var result = ycqdata.dataInfo2 var res = result.data - if (res.data && res.data !== "") { + if (res.data && res.data.length > 0) { 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 = '绌烘墭鍑哄簱' - } - 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 + that.infoText.title = res.data[0].ioType$ + that.swiperList = res.data } else { if (that.infoType == 2 || that.infoType == 3) { return; @@ -510,41 +491,21 @@ getInfo() { let that = this uni.request({ - url: that.commonUrl + "/monitor/led", + url: that.commonUrl + "/monitor/currentTask", method:"GET", - data: {ledId:that.baseLedId}, + // data: {ledId:that.baseLedId}, success(result) { - that.timeOut = false + that.timeOuts = false that.times = 0 var res = result.data - if (res.data && res.data !== "") { + if (res.data && res.data.length > 0) { 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 = '绌烘墭鍑哄簱' - } - 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 + that.infoText.title = res.data[0].ioType + that.swiperList = res.data } else { if (that.infoType == 2 || that.infoType == 3) { return; @@ -553,7 +514,7 @@ } }, fail(err) { - that.timeOut = true + that.timeOuts = true that.times = that.times+3 that.infoType = 0 } @@ -567,7 +528,7 @@ data: {ledId:that.baseLedId}, method:"GET", success(result) { - that.timeOut = false + that.timeOuts = false that.times = 0 var res = result.data if (res.data && res.data !== "") { @@ -591,7 +552,7 @@ } }, fail(err) { - that.timeOut = true + that.timeOuts = true that.infoType = 0 } }) @@ -725,6 +686,7 @@ method:"GET", success(result) { var res = result.data.data + that.calendar = res.year + "骞�" + res.month + "鏈�" + res.day + "鏃� " + res.hour + ":" + res.minute + ":" + res.second + " " + res.week that.currDate = res.year + "/" + res.month + "/" + res.day } -- Gitblit v1.9.1