From 346a966f1d29883aaa3181b421da5e697b1c5d32 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 01 七月 2024 14:18:03 +0800
Subject: [PATCH] #

---
 Monitor-APP/pages/home/home.vue |  125 +++++++++++++++++++++--------------------
 1 files changed, 64 insertions(+), 61 deletions(-)

diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index 05e4dc7..d9631a0 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,18 +227,21 @@
 									vertical 婊戝姩鏂瑰悜鏄惁涓虹旱鍚� 
 									display-multiple-items 鍚屾椂鏄剧ず鐨勬粦鍧楁暟閲� -->
 									<swiper class="swiper-body-main" vertical="true" 
-									display-multiple-items="6"
-									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>
@@ -421,10 +423,10 @@
 				this.getOther()
 				// this.getDate()
 				this.getDate2()
-				// this.getInfo()
+				this.getInfo()
 				// this.getError()
-				this.getInfo2()
-				this.getError2()
+				// this.getInfo2()
+				// this.getError2()
 				this.getUrl()
 				this.controller()
 				// 娴嬭瘯鐢�
@@ -453,28 +455,28 @@
 					}
 					// 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 = '绌烘墭鍑哄簱'
+					switch (res.data[0].ioType) {
+						case 101: 
+							that.infoText.title = '鍏ㄦ澘鍑哄簱'
+							break;
+						case 103:
+							that.infoText.title = '妫�鏂欏嚭搴�'
+							break;
+						case 107:
+							that.infoText.title = '鐩樼偣鍑哄簱'
+							break;
+						case 1:
+							that.infoText.title = '鍏ュ簱'
+							break;
+						case 10:
+							that.infoText.title = '绌烘墭鍏ュ簱'
+							break;
+						case 110:
+							that.infoText.title = '绌烘墭鍑哄簱'
+							break;
 					}
-					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.swiperList = res.data
 				} else {
 					if (that.infoType == 2 || that.infoType == 3) {
 						return;
@@ -509,9 +511,9 @@
 			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.timeOuts = false
 						that.times = 0
@@ -522,28 +524,28 @@
 							}
 							// 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 = '绌烘墭鍑哄簱'
+							switch (res.data[0].ioType) {
+								case 101: 
+									that.infoText.title = '鍏ㄦ澘鍑哄簱'
+									break;
+								case 103:
+									that.infoText.title = '妫�鏂欏嚭搴�'
+									break;
+								case 107:
+									that.infoText.title = '鐩樼偣鍑哄簱'
+									break;
+								case 1:
+									that.infoText.title = '鍏ュ簱'
+									break;
+								case 10:
+									that.infoText.title = '绌烘墭鍏ュ簱'
+									break;
+								case 110:
+									that.infoText.title = '绌烘墭鍑哄簱'
+									break;
 							}
-							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.swiperList = res.data
 						} else {
 							if (that.infoType == 2 || that.infoType == 3) {
 								return;
@@ -724,6 +726,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