From 52f2f4d62c4fcefa3b8b7128661cb5e296917571 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 12 十二月 2023 19:33:30 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 94 ++++++++++++++++++++--------------------------- 1 files changed, 40 insertions(+), 54 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index cc1db29..cea4b83 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -9,10 +9,10 @@ <!-- <view class="time-tools">{{calendar}}</view> <view class="button-left" @click="ejected()"></view> <view class="button-right" @click="ejected()"></view> --> - <view v-if="!locs"><button size="mini" @click="ejected()" >閰嶇疆</button></view> + <view v-if="locs.length==0"><button size="mini" @click="ejected()" >閰嶇疆</button></view> <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: 5rpx;"> + <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> @@ -35,81 +35,53 @@ </view> </view> - <view class="flex-col" style="width: 100%;" v-if="item.agvWaitPakin"> + <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 style="flex: 1;">缁撲綑</view> </view> - <view class="flex-row" v-for="k in item.agvWaitPakin.orderNo"> + <view class="flex-row" v-for="k in item.agvWaitPakins"> <view style="flex: 3;">{{k.orderNo}}</view> - <view style="flex: 3;">{{item.agvWaitPakin.matnr}}</view> + <view style="flex: 3;">{{k.matnr}}</view> <view style="flex: 1;">{{k.anfme}}</view> - <view style="flex: 1;">{{item.agvWaitPakin.anfme + item.agvWaitPakin.volume}}</view> + <view style="flex: 1;">{{k.volume}}</view> </view> </view> - <view class="flex-col" style="width: 100%;" v-if="item.agvWrkDetl"> + <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 style="flex: 1;">缁撲綑</view> </view> - <view class="flex-row" v-for="k in item.agvWrkDetl.orderNo"> + <view class="flex-row" v-for="k in item.agvWrkDetls"> <view style="flex: 3;">{{k.orderNo}}</view> - <view style="flex: 3;">{{item.agvWrkDetl.matnr}}</view> + <view style="flex: 3;">{{k.matnr}}</view> <view style="flex: 1;">{{k.anfme}}</view> - <view style="flex: 1;">{{item.agvWrkDetl.anfme + item.agvWrkDetl.volume}}</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: 10rpx; + <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: 10rpx; + <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 class="main"> - <view class="main-y" v-for="item in locs"> - <view class="y-it"><view class="y-it-desc">宸ヤ綔绔欑紪鍙�:</view><view class="margin">{{item.devNo}}</view></view> - <view class="y-it"><view class="y-it-desc">宸ヤ綔绔欑紪鍙�:</view><view class="margin">{{item.locSts$}}</view></view> - - <view class="y-it" v-if="item.agvWaitPakin"><view class="y-it-desc">璁㈠崟鍙�:</view><view class="margin">{{item.agvWaitPakin.orderNo}}</view></view> - <view class="y-it" v-if="item.agvWaitPakin"><view class="y-it-desc">鐗╂枡鍙�:</view><view class="margin">{{item.agvWaitPakin.matnr}}</view></view> - <view class="y-it" v-if="item.agvWaitPakin"><view class="y-it-desc">鎵瑰彿:</view><view class="margin">{{item.agvWaitPakin.batch}}</view></view> - <view class="y-it" v-if="item.agvWaitPakin"><view class="y-it-desc">鏂欑鐮�:</view><view class="margin">{{item.agvWaitPakin.suppCode}}</view></view> - <view class="y-it" v-if="item.agvWaitPakin"><view class="y-it-desc">鏁伴噺:</view><view class="margin">{{item.agvWaitPakin.anfme}}</view></view> - - <view class="y-it" v-if="item.agvWrkMast"><view class="y-it-desc">宸ヤ綔鍙�:</view><view class="margin">{{item.agvWrkMast.wrkNo}}</view></view> - <view class="y-it" v-if="item.agvWrkMast"><view class="y-it-desc">宸ヤ綔鐘舵��:</view><view class="margin">{{item.agvWrkMast.wrkSts$}}</view></view> - <view class="y-it" v-if="item.agvWrkMast"><view class="y-it-desc">宸ヤ綔绫诲瀷:</view><view class="margin">{{item.agvWrkMast.ioType$}}</view></view> - <view class="y-it" v-if="item.agvWrkDetl " > - <view style="display: flex;align-items: stretch;" > - <view style="height: 100%">璁㈠崟鍙�: </view> - <view style="width: 16vw;display: flex;flex-wrap: wrap;"> - <view style="width: 100%; text-align: left;" v-for="k in item.agvWrkDetl.orderNo">{{k.orderNo}}--{{k.anfme}}</view> - </view> - </view> - </view> - <view class="y-it" v-if="item.agvWrkDetl"><view class="y-it-desc">鐗╂枡鍙�:</view><view class="margin">{{item.agvWrkDetl.matnr}}</view></view> - <view class="y-it" v-if="item.agvWrkDetl"><view class="y-it-desc">鎵瑰彿:</view><view class="margin">{{item.agvWrkDetl.batch}}</view></view> - <view class="y-it" v-if="item.agvWrkDetl"><view class="y-it-desc">鏂欑鐮�:</view><view class="margin">{{item.agvWrkDetl.suppCode}}</view></view> - <view class="y-it" v-if="item.agvWrkDetl"> - <view class="y-it-desc" >鍙栬揣鏁伴噺:</view><view class="margin">{{item.agvWrkDetl.anfme}}</view> - <view class="y-it-desc" style="flex:1;">缁撲綑鏁伴噺:</view><view class="margin" style="margin-right: 10%;">{{item.agvWrkDetl.volume}}</view> - </view> - - </view> - </view> --> </view> </uni-transition> @@ -184,9 +156,14 @@ export default { data() { return { - locs: [], + locs: [ + // {devNo:'CS-309-005-03@3',locSts$:'O.绌哄簱浣�', + // agvWrkMast:{wrkNo:23879,wrkSts$: "205.宸ヤ綔瀹屾垚"}, + // agvWaitPakin: {} + // }, + ], floors: [{value: 1,name:'1妤�'},{value:2,name:'3妤�'}], - rows: [{value: 'cs-101',name:'1鍙�'},{value: 'cs-102',name:'2鍙�'}], + rows: [{value: 'cs-101',name:'101'},{value: 'cs-102',name:'102'}], ck1: true, ck2: false, current: 'cs-101', @@ -320,11 +297,14 @@ // 瀹瑰櫒绂诲満 containerMoveOut(e) { let _this = this + let devNo = {devNo:[e]} + // console.log(JSON.stringify(devNo)); uni.request({ url: `${_this.commonUrl}/agv/basDevp/visualized/container/moveOut`, - data: {devNo: e}, + data: JSON.stringify(devNo), method: 'POST', success(res) { + } }) }, @@ -333,9 +313,9 @@ this.ck1 = this.ck2 this.ck2 = temp if (this.ck1) { - this.rows = [{value: 'cs-101',name:'1鍙�'},{value: 'cs-102',name:'2鍙�'}] + this.rows = [{value: 'cs-101',name:'101'},{value: 'cs-102',name:'102'}] } else { - this.rows = [{value: 'CS-305',name:'1鍙�'},{value: 'CS-306',name:'2鍙�'},{value: 'CS-307',name:'3鍙�'}] + 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'}] } }, radioChange(evt) { @@ -351,7 +331,13 @@ let param = {stationCode: `${that.current}`} uni.request({ url: `${that.commonUrl}/agv/basDevp/visualized/list/auth`, - header: { 'Access-Control-Allow-Origin': '*'}, + header: { + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET,POST,OPTIONS', + 'Access-Control-Allow-Headers': 'X-Request-with,Content-Type', + }, + sslVerify: false, + withCredentials: true, method: 'POST', data: JSON.stringify(param), success(res) { @@ -481,7 +467,7 @@ } .main-b { - font-size: 10rpx; + font-size: 24rpx; background-color: rgba(255, 255, 255, .05); /* background-color: rgba(0, 189, 47, 0.3); */ width:19.8vw; -- Gitblit v1.9.1