From 5ef99c7d71ec5d3d027bef03062cd71b271a766d Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 13 三月 2024 16:20:29 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 99 insertions(+), 21 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 8e0328b..b1bc16c 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -15,19 +15,35 @@ <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.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> - + <!-- v-for="k in item.agvWrkDetl.orderNo" --> + <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 style="width: 16vw;background-color: aquamarine;display: flex;" v-for="k in item.agvWrkDetl.orderNo"> + <view>{{k.orderNo}}--</view> + <view>{{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.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> + <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> @@ -55,24 +71,36 @@ <input type="text" v-model="basePort"> </view> </view> - <!-- <view class="item"> - <view class="desc">ledId锛�</view> - <view class="input"> - <input type="text" v-model="baseLedId"> - </view> - </view> - <view class="item"> - <view class="desc">CrnId锛�</view> - <view class="input"> - <input type="text" v-model="baseCrnId"> - </view> - </view> --> + <view class="item"> <view class="desc">Url锛�</view> <view class="input"> <input type="text" v-model="baseUrl"> </view> </view> + + + <view class="item"> + <view class="desc">妤煎眰锛�</view> + <radio-group @change="floor"> + <label> + <radio :checked="ck1" style="margin-left: 50rpx;"/><text>1妤�</text> + </label> + <label> + <radio :checked="ck2" style="margin-left: 50rpx;"/><text>3妤�</text> + </label> + </radio-group> + </view> + + <view class="item"> + <view class="desc">缂撳瓨璐ф灦锛�</view> + <radio-group @change="radioChange" > + <label v-for="(item, index) in rows" :key="item.value"> + <radio style="margin-left: 50rpx;" :value="item.value" :checked="index === current" />{{item.name}} + </label> + </radio-group> + </view> + </scroll-view> <!-- button --> <view class="eject-button"> @@ -94,6 +122,11 @@ data() { return { locs: [], + floors: [{value: 1,name:'1妤�'},{value:2,name:'3妤�'}], + rows: [{value: 'cs-101',name:'1鍙�'},{value: 'cs-102',name:'2鍙�'}], + ck1: true, + ck2: false, + current: 'cs-101', series: [], homeViewShow: true, infoViewShow: false , @@ -137,6 +170,9 @@ baseLedId: '', baseCrnId: '', baseUrl: 'tzskwms', + floor1: true, + floor2: false, + row: '', info: null, error: null, infoType: 0, @@ -178,11 +214,13 @@ const BasePort = uni.getStorageSync('BasePort'); const BaseCrnId = uni.getStorageSync('BaseCrnId'); const PROJ = uni.getStorageSync('UPROJ'); + const CURRENT = uni.getStorageSync('current'); that.baseUrl = PROJ that.baseIP = BaseIP that.baseLedId = BaseLedId that.basePort = BasePort that.baseCrnId = BaseCrnId + that.current = CURRENT this.getUrl() this.getVisualized() }, @@ -194,14 +232,33 @@ // this.getInfo2() // this.getError2() // this.getUrl() - this.controller() + // this.controller() + this.getVisualized() },1000) }, methods: { + floor() { + var temp = this.ck1 + this.ck1 = this.ck2 + this.ck2 = temp + if (this.ck1) { + this.rows = [{value: 'cs-101',name:'1鍙�'},{value: 'cs-102',name:'2鍙�'}] + } else { + this.rows = [{value: 'CS-305',name:'1鍙�'},{value: 'CS-306',name:'2鍙�'},{value: 'CS-307',name:'3鍙�'}] + } + }, + radioChange(evt) { + for (let i = 0; i < this.rows.length; i++) { + if (this.rows[i].value === evt.detail.value) { + this.current = evt.detail.value; + break; + } + } + }, getVisualized() { let that = this - let param = {stationCode: 'CS-101'} + let param = {stationCode: `${that.current}`} uni.request({ url: `${that.commonUrl}/agv/basDevp/visualized/list/auth`, header: { 'Access-Control-Allow-Origin': '*'}, @@ -213,6 +270,27 @@ 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.devNo == 'CS-101-004-01@1') { + // let a = i.agvWrkDetl.orderNo + // // console.log(a.length); + // let b = JSON.parse(a) + // // console.log(b.length); + + // } + // console.log(i.agvWrkDetl); that.locs.push(i) } } @@ -473,6 +551,7 @@ uni.setStorageSync('BasePort',this.basePort); uni.setStorageSync('BaseCrnId',this.baseCrnId); uni.setStorageSync('UPROJ',this.baseUrl); + uni.setStorageSync('current',this.current); this.getUrl() this.ejectShow = false }, @@ -606,7 +685,7 @@ @import url("home.css"); .main-y { - font-size: 40rpx; + font-size: 22rpx; background-color: rgba(255, 255, 255, .05); width:19vw; height: 28vh; @@ -623,12 +702,11 @@ /* background-color: #FF5722; */ } .y-it-desc { - width: 240rpx; text-align: right; /* background-color: #FF5722; */ } .margin { - margin-left: 20rpx; + margin-left: 10rpx; } /* 鍒� */ -- Gitblit v1.9.1