From 8dbcf49091f41d784b777a932910552e5ff84a93 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 07 二月 2024 18:13:16 +0800
Subject: [PATCH] #

---
 Monitor-APP/pages/home/home.vue |  215 ++++++++++++++++++++++++-----------------------------
 1 files changed, 98 insertions(+), 117 deletions(-)

diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index cea4b83..01dc996 100644
--- a/Monitor-APP/pages/home/home.vue
+++ b/Monitor-APP/pages/home/home.vue
@@ -2,86 +2,46 @@
 	<view class="container">
 		<uni-transition :duration="duration" :mode-class="homeMode" :show="homeViewShow">
 			<view class="home-view">
-				<!-- <view class="head">
-					<text>鑷姩浠撳簱鐩戞帶骞冲彴</text>
-				</view> -->
-				<!-- 鏃ュ巻 -->
-				<!-- <view class="time-tools">{{calendar}}</view>
-				<view class="button-left" @click="ejected()"></view>
-				<view class="button-right" @click="ejected()"></view> -->
 				<view v-if="locs.length==0"><button size="mini" @click="ejected()" >閰嶇疆</button></view>
-				<view class="main" v-if="locs" >
+				<!-- <view class="main" v-if="locs" >
 					<view class="main-b" v-for="item in locs" :class="item.color">
-						<view class="flex-col" style="width: 100%;font-size: 24rpx;">
-							<view class="flex-row">
-								<view style="flex: 1;" @click="ejected()">{{item.devNo}}</view>
-								<view style="flex: 1;">{{item.locSts$}}</view>
-							</view>
-							<view class="flex-row">
-								<view style="flex: 1;" v-if="item.agvWrkMast">宸ヤ綔鍙凤細{{item.agvWrkMast.wrkNo}}</view>
-								<view style="flex: 1;" v-if="item.agvWrkMast" >{{item.agvWrkMast.wrkSts$}}</view>
-							</view>
-							<view class="flex-row">
-								<view style="flex: 1;" v-if="item.agvWaitPakin">鏂欑鐮�: {{item.agvWaitPakin.suppCode}}</view>
-								<view style="flex: 1;" v-if="item.agvWrkDetl">鏂欑鐮侊細{{item.agvWrkDetl.suppCode}}</view>
-								<view style="flex: 1;" v-if="!item.agvWaitPakin && !item.agvWrkDetl"></view>
-								
-								<view style="flex: 1;" v-if="item.agvWrkMast">{{item.agvWrkMast.ioType$}}</view>
-								<view style="flex: 1;" v-if="!item.agvWrkMast"></view>
-							</view>
-							<view class="flex-row">
-								<view style="flex: 1;" ></view>
-								<view style="flex: 1;" ></view>
-							</view>
+						<view style="background-color: aquamarine;height: 100%;border: 1px solid #999;">
+							<image style="background-color: #FFF;margin: 16rpx;" src="../../static/moren.png" mode="heightFix"></image>
 						</view>
-						
-						<view class="flex-col" style="width: 100%;"  v-if="item.agvWaitPakins">
-							<view class="flex-row" style="background-color: #007aff;">
-								<view style="flex: 3;">璁㈠崟鍙�</view>
-								<view style="flex: 3;">鐗╂枡鍙�</view>
-								<view style="flex: 1;">鏁伴噺</view>
-								<view style="flex: 1;">缁撲綑</view>
-							</view>
-							<view class="flex-row" v-for="k in item.agvWaitPakins">
-								<view style="flex: 3;">{{k.orderNo}}</view>
-								<view style="flex: 3;">{{k.matnr}}</view>
-								<view style="flex: 1;">{{k.anfme}}</view>
-								<view style="flex: 1;">{{k.volume}}</view>
-							</view>
-						</view>
-						
-						<view class="flex-col" style="width: 100%;"  v-if="item.agvWrkDetls">
-							<view class="flex-row" style="background-color: #007aff;">
-								<view style="flex: 3;">璁㈠崟鍙�</view>
-								<view style="flex: 3;">鐗╂枡鍙�</view>
-								<view style="flex: 1;">鏁伴噺</view>
-								<view style="flex: 1;">缁撲綑</view>
-							</view>
-							<view class="flex-row" v-for="k in item.agvWrkDetls">
-								<view style="flex: 3;">{{k.orderNo}}</view>
-								<view style="flex: 3;">{{k.matnr}}</view>
-								<view style="flex: 1;">{{k.anfme}}</view>
-								<view style="flex: 1;">{{k.volume}}</view>
-							</view>
-						</view>
-						<view style="align-self: center;margin-top: auto;width: 100%;display: flex;align-items: center;justify-content: center;" v-if="item.agvWrkMast && item.agvWrkMast.ioType == 103 && item.agvWrkDetl">
-							<view style="width: 60%;background-color: #007aff;height: 3vh;display: flex;align-items: center;justify-content: center;font-size: 24rpx;
-								border-radius: 8rpx;" @click="pickIn(item.devNo)">鎷f枡鍥炲簱</view>
-						</view>
-						
-						<view style="align-self: center;margin-top: auto;width: 100%;display: flex;align-items: center;justify-content: center;" v-if="item.agvWrkMast && item.agvWrkMast.ioType == 107 && item.agvWrkDetl">
-							<view style="width: 60%;background-color: #007aff;height: 3vh;display: flex;align-items: center;justify-content: center;font-size: 24rpx;
-								border-radius: 8rpx;" @click="pickIn(item.devNo)">鐩樼偣鍥炲簱</view>
-						</view>
-						
-						<view style="align-self: center;margin-top: auto;width: 100%;display: flex;align-items: center;justify-content: center;" v-if="item.agvWrkMast && item.agvWrkMast.ioType == 101 && item.agvWrkDetl">
-							<view style="width: 60%;background-color: #007aff;height: 3vh;display: flex;align-items: center;justify-content: center;font-size: 24rpx;
-								border-radius: 8rpx;" @click="containerMoveOut(item.devNo)">瀹瑰櫒绂诲満</view>
-						</view>
-						
 					</view>
+				</view> -->
+				<view style="font-size: 32px;">
+					AGV 鏂欑
 				</view>
-				
+				<!-- <view>
+					<view><text>宸ヤ綔鍙凤細</text><text>{{locs[0].wrkNo ? locs[0].wrkNo : '--'}}</text></view>
+				</view> -->
+				<view class="linke" v-if="locs" >
+					<view class="linke-item" v-for="item in locs" :class="item.color">
+						<view style="background-color: aquamarine;height: 100%;border: 1px solid #999;">
+							<image style="background-color: #FFF;margin: 16rpx;" src="../../static/moren.png" mode="heightFix"></image>
+						</view>
+						<view style="display: flex;flex-direction: column;font-size: 10px;text-indent: 1em;text-align: start;" v-if="item.wrkNo">
+							<view><text>璁㈠崟鍙凤細</text><text>{{item.orderNo ? item.orderNo : '--'}}</text></view>
+							<view><text>宸ヤ綔鍙凤細</text><text>{{item.wrkNo ? item.wrkNo : '--'}}</text></view>
+							<view><text>绠辩爜锛�</text><text>{{item.suppCode ? item.suppCode : '--'}}</text></view>
+							<view><text>鐗╂枡鍚嶇О锛�</text><text>{{item.maktx ? item.maktx : '--'}}</text></view>
+							<view><text>鐗╂枡鍙凤細</text><text>{{item.matnr ? item.matnr : '--'}}</text></view>
+							<view><text>瑙勬牸锛�</text><text>{{item.specs ? item.specs : '--'}}</text></view>
+							<view><text>鏁伴噺锛�</text><text>{{item.anfme ? item.anfme : '--'}}</text></view>
+							<view><text>缁撲綑锛�</text><text>{{item.volume ? item.volume : '--'}}</text></view>
+						</view>
+						<view style="display: flex;flex-direction: column;font-size: 10px;text-indent: 1em;text-align: start;" v-if="!item.wrkNo">
+							<view><text>璁㈠崟鍙凤細</text><text>{{item.orderNo ? item.orderNo : '--'}}</text></view>
+							<view><text>绠辩爜锛�</text><text>{{item.suppCode ? item.suppCode : '--'}}</text></view>
+							<view><text>鐗╂枡鍚嶇О锛�</text><text>{{item.maktx ? item.maktx : '--'}}</text></view>
+							<view><text>鐗╂枡鍙凤細</text><text>{{item.matnr ? item.matnr : '--'}}</text></view>
+							<view><text>瑙勬牸锛�</text><text>{{item.specs ? item.specs : '--'}}</text></view>
+							<view><text>鏁伴噺锛�</text><text>{{item.anfme ? item.anfme : '--'}}</text></view>
+							<view><text>缁撲綑锛�</text><text>{{item.volume ? item.volume : '--'}}</text></view>
+						</view>
+ 					</view>
+				</view>
 				
 			</view>
 		</uni-transition>
@@ -158,9 +118,44 @@
 			return {
 				locs: [
 					// {devNo:'CS-309-005-03@3',locSts$:'O.绌哄簱浣�',
-					// agvWrkMast:{wrkNo:23879,wrkSts$: "205.宸ヤ綔瀹屾垚"},
-					// agvWaitPakin: {}
+					// agvWrkMast:{},
+					// agvWaitPakin: [
+					// 		{matnr:"123123",maktx:"hhahah"},
+					// 		{}
+					// 	]
 					// },
+					{
+						wrkNo:'',
+						anfme:6.0,
+						matnr:"420201001209204",
+						maktx: '纭呰兌骞茬嚗鍓�10g',
+						suppCode: "cdoedad"
+					},
+					{
+						wrkNo:137207,
+						anfme:6.0,
+						matnr:"420201001209204"
+					},
+					{
+						wrkNo:137207,
+						anfme:6.0,
+						matnr:"420201001209204"
+					},
+					{
+						wrkNo:137207,
+						anfme:6.0,
+						matnr:"420201001209204"
+					},
+					{
+						wrkNo:137207,
+						anfme:6.0,
+						matnr:"420201001209204"
+					},
+					{
+						wrkNo:137207,
+						anfme:6.0,
+						matnr:"420201001209204"
+					},
 					],
 				floors: [{value: 1,name:'1妤�'},{value:2,name:'3妤�'}],
 				rows: [{value: 'cs-101',name:'101'},{value: 'cs-102',name:'102'}],
@@ -315,7 +310,7 @@
 				if (this.ck1) {
 					this.rows = [{value: 'cs-101',name:'101'},{value: 'cs-102',name:'102'}]
 				} else {
-					this.rows = [{value: 'CS-305',name:'305'},{value: 'CS-306',name:'306'},{value: 'CS-307',name:'307'},{value: 'CS-308',name:'308'},{value: 'CS-309',name:'309'}]
+					this.rows = [{value: 'CS-313',name:'313'},{value: 'CS-312',name:'312'},{value: 'CS-311',name:'311'},{value: 'CS-310',name:'310'}]
 				}
 			},
 			radioChange(evt) {
@@ -328,9 +323,9 @@
 			},
 			getVisualized() {
 				let that = this
-				let param = {stationCode: `${that.current}`}
+				let param = {devNo: `${that.current}`}
 				uni.request({
-					url: `${that.commonUrl}/agv/basDevp/visualized/list/auth`,
+					url: `${that.commonUrl}/rpc/info`,
 					header: {
 						'Access-Control-Allow-Origin': '*',
 						'Access-Control-Allow-Methods': 'GET,POST,OPTIONS',
@@ -342,37 +337,10 @@
 					data: JSON.stringify(param),
 					success(res) {
 						res = res.data
+						console.log(res);
 						that.result = res
-						if (res.code === 200 && res.data.body.length>0) {
-							that.locs = [];
-							for (let k of res.data.body) {
-								for (let i of k.loc) {
-									if (i.agvWrkDetl) {
-										let a = i.agvWrkDetl.orderNo
-										if (RegExp(/{/).test(a)) {
-											i.agvWrkDetl.orderNo =	JSON.parse(a)
-										} else {
-											i.agvWrkDetl.orderNo = []
-											// console.log(i.agvWrkDetl);
-											i.agvWrkDetl.orderNo.push({anfme:i.agvWrkDetl.anfme,orderNo:a})
-										}
-									}
-									if (i.agvWaitPakin) {
-										let a = i.agvWaitPakin.orderNo
-										if (RegExp(/{/).test(a)) {
-											i.agvWaitPakin.orderNo =	JSON.parse(a)
-										} else {
-											i.agvWaitPakin.orderNo = []
-											// console.log(i.agvWrkDetl);
-											i.agvWaitPakin.orderNo.push({anfme:i.agvWaitPakin.anfme,orderNo:a})
-										}
-									}
-									if(i.locSts == 'F') {
-										i['color'] = 'pakin'
-									}
-									that.locs.push(i)
-								}
-							}
+						if (res.code === 200 && res.data) {
+							that.locs = res.data
 						}
 					}
 				})
@@ -465,20 +433,33 @@
 		justify-content: center;
 		/* text-align: left; */
 	}
-	
+	.main {
+		height: 100vh;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-around;
+		position: relative;
+	}
+	.linke {
+		display: flex;
+		flex-wrap: wrap;
+	}
+	.linke-item {
+		width: 50vw;
+		height: 31.5vh;
+		display: flex;
+		background-color: rgba(255, 255, 255, .05);
+		
+	}
 	.main-b {
 		font-size: 24rpx;
 		background-color: rgba(255, 255, 255, .05);
 		/* background-color: rgba(0, 189, 47, 0.3); */
-		width:19.8vw; 
+		width:49.8vw; 
 		height: 33vh;
-		/* margin-top: 4px; */
 		backdrop-filter: blur(3px);
 		display: flex;
-		flex-direction: column;
-		align-items: flex-start;
-		/* align-items: stretch; */
-		/* justify-content: center; */
+		/* flex-direction: column; */
 	}
 	.pakin {
 		background-color: rgba(0, 189, 47, 0.3);

--
Gitblit v1.9.1