From d5fe669988a083bcdb4ff7f349b2e56fa5882a87 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期二, 15 八月 2023 14:02:51 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 162 ++++++++++++++++++++++++++---------------------------- 1 files changed, 78 insertions(+), 84 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index e2d0281..bfc7b84 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -1,5 +1,6 @@ <template> <view class="container"> + <!-- 瀹佹尝鎹蜂赴椤圭洰 --> <uni-transition :duration="duration" :mode-class="homeMode" :show="homeViewShow"> <view class="home-view"> <view class="head"> @@ -22,54 +23,18 @@ <view class="box-item"> <text class="item-title">浠撳簱鏁版嵁</text> <text class="item-subTitle">warehouse data</text> - <view class="img-box"> - - <view class="item-img"> - <image src="../../static/a1.png" mode="aspectFit"></image> - <view class="flex-col" style="width: calc(100% - 5vw);"> - <view class="flex-row" style="position: relative;" > - <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">{{baseInfo.xDistance}}</view> - <view style="position: absolute;bottom: 0;left: 10vw;">m</view> - </view> - <view style="height: 100%;text-align: left;text-indent: 2em;">绱璧拌璺濈(绫�)</view> - </view> - </view> - - <view class="item-img"> - <image src="../../static/b1.png" mode="aspectFit"></image> - <view class="flex-col" style="width: calc(100% - 5vw);"> - <view class="flex-row" style="position: relative;" > - <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">{{baseInfo.yDistance}}</view> - <view style="position: absolute;bottom: 0;left: 10vw;">m</view> - </view> - <view style="height: 100%;text-align: left;text-indent: 2em;">绱鍗囬檷璺濈(绫�)</view> - </view> - </view> - - <view class="item-img"> - <image src="../../static/c1.png" mode="aspectFit"></image> - <view class="flex-col" style="width: calc(100% - 5vw);"> - <view class="flex-row" style="position: relative;" > - <view style="-width: 2vw;padding-left: 2vw;;font-size: 2vw;">{{baseInfo.xDuration}}</view> - <view style="position: absolute;bottom: 0;left: 10vw;">s</view> - </view> - <view style="height: 100%;text-align: left;text-indent: 2em;">绱璧拌鏃堕暱(绉�)</view> - </view> - </view> - - <view class="item-img"> - <image src="../../static/d1.png" mode="aspectFit"></image> - <view class="flex-col" style="width: calc(100% - 5vw);"> - <view class="flex-row" style="position: relative;" > - <view style="width: 2vw;padding-left: 2vw;;font-size: 2vw;">{{baseInfo.yDuration}}</view> - <view style="position: absolute;bottom: 0;left: 10vw;">s</view> - </view> - <view style="height: 100%;text-align: left;text-indent: 2em;">绱鍗囬檷鏃堕暱(绉�)</view> - </view> - </view> - + <view style="width: 100%;"> + <table style="width: 100%;font-size:1vw;"> + <tr><th>鎺掑悕</th><th>鏂欏彿</th><th>鍚嶇О</th><th>鏁伴噺</th></tr> + <tr v-for="(item,i) in tableList" :key="i"> + <td>top {{i+1}}</td> + <td>{{item.matnr}}</td> + <td>{{item.maktx}}</td> + <td>{{item.anfme}}</td> + </tr> + </table> </view> - </view> + </view> <view class="box-item"> <view class="flex-row" style="width: 100%;"> <!-- 宸︿晶 --> @@ -119,8 +84,8 @@ <!-- 鐧惧垎姣� --> <view class="flex-col" style="align-items: flex-end;justify-content: flex-end;" > <!-- style="justify-content: flex-end;position: absolute;top: 0;right: 1vw;text-align: right;" --> - <text class="item-title">31</text> - <text class="item-subTitle">浠婃棩璁㈠崟鏁�</text> + <text class="item-title">{{pakin}} / {{pikout}}</text> + <text class="item-subTitle">浠婃棩鍏�/鍑烘暟</text> </view> </view> </view> @@ -164,17 +129,17 @@ <view class="flex-row sub-info"> <image src="../../static/g1.png" mode="aspectFit"></image> <view style="width: 8vw;height: 4vw;line-height: 4vw;">鍦ㄥ簱</view> - <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.stockCount}}</view> + <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;font-family: DS-DIGI-1;">{{baseInfo.stockCount}}</view> </view> <view class="flex-row sub-info" style="margin-top: 2vh;"> <image src="../../static/f1.png" mode="aspectFit"></image> <view style="width: 8vw;height: 4vw;line-height: 4vw;">绌哄簱</view> - <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.emptyCount}}</view> + <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;font-family: DS-DIGI-1;">{{baseInfo.emptyCount}}</view> </view> <view class="flex-row sub-info" style="margin-top: 2vh;"> <image src="../../static/e1.png" mode="aspectFit"></image> - <view style="width: 8vw;height: 4vw;line-height: 4vw;">绂佺敤</view> - <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.noneCount}}</view> + <view style="width: 8vw;height: 4vw;line-height: 4vw;">閿佸畾</view> + <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;font-family: DS-DIGI-1;">{{baseInfo.noneCount}}</view> </view> </view> </view> @@ -217,11 +182,11 @@ <view class="text-content"> <!-- head --> <view class="swiper-head"> - <view>鐩爣绔欙細{{infoText.staNo}}</view> - <view>鍟嗗搧缂栧彿</view> - <view>鍟嗗搧鍚嶇О</view> - <view>瑙勬牸</view> - <view>鏁伴噺</view> + <view style="width: 20%;">鐩爣绔欙細{{infoText.staNo}}</view> + <view style="width: 30%;">鍟嗗搧缂栧彿</view> + <view style="width: 20%;">鍟嗗搧鍚嶇О</view> + <view style="width: 20%;">鎵规</view> + <view style="width: 10%;">鏁伴噺</view> </view> <!-- body --> <view class="swiper-body"> @@ -233,11 +198,11 @@ display-multiple-items="8" circular="true" :autoplay="true" :interval="3000" :duration="1000"> <swiper-item class="swiper-item" v-for="(item,i) in swiperList" :key="i"> - <view>No:{{i+1}}</view> - <view>{{item.matnr}}</view> - <view>{{item.maktx}}</view> - <view>{{item.specs}}</view> - <view>{{item.count}}</view> + <view style="width: 20%;">No:{{i+1}}</view> + <view style="width: 30%;">{{item.matnr}}</view> + <view style="width: 20%;">{{item.maknx}}</view> + <view style="width: 20%;">{{item.batch}}</view> + <view style="width: 10%;">{{item.count}}</view> </swiper-item> </swiper> </view> @@ -376,11 +341,14 @@ staNo: "", matnr: "", maknx: "", - specs: "", + batch: "", count: "", error: "" }, - swiperList: [] + swiperList: [], + tableList: [], + pakin: 10, + pikout: 20, } }, onShow() { @@ -409,7 +377,7 @@ this.initlineChart() this.initPieChart() this.getOther() - this.getDate() + this.getDate2() this.getInfo() this.getError() // this.getInfo2() @@ -417,7 +385,7 @@ this.getUrl() this.controller() // 娴嬭瘯鐢� - + this.getTop() },1000) }, methods: { @@ -497,12 +465,15 @@ that.infoText.title = '鍏ㄦ澘鍑哄簱' } else if(res.data[0].ioType === 103) { that.infoText.title = '妫�鏂欏嚭搴�' + } else if(res.data[0].ioType === 107) { + that.infoText.title = '鐩樼偣鍑哄簱' } that.infoText.staNo = res.data[0].staNo - 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[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 } else { if (that.infoType == 2 || that.infoType == 3) { return; @@ -521,17 +492,18 @@ method:"GET", success(result) { var res = result.data - console.log(res); if (res.data && res.data !== "") { var errorInfo = res.data if (that.infoType == 1) { that.infoType = 3 - that.infoText.title = "寮傚父" + that.infoText.title = "鍏朵粬淇℃伅" + // that.infoText.title = "寮傚父" that.infoText.error = errorInfo return } that.infoType = 2 - that.infoText.title = "寮傚父" + that.infoText.title = "鍏朵粬淇℃伅" + // that.infoText.title = "寮傚父" that.infoText.error = errorInfo } else { if (that.infoType == 1) { @@ -676,6 +648,19 @@ } this.calendar = year + "骞�" + month + "鏈�" + day + "鏃� " + hours + ":" + minutes + ":" + seconds + " " + weeks }, + // 鏃ュ巻 鏈嶅姟鍣� + getDate2() { + let that = this + uni.request({ + url: that.commonUrl + "/monitor/date", + 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 + } + }) + }, getDateFormat(value) { var date = new Date();// 鑾峰彇褰撳墠鏃堕棿 date.setDate(date.getDate() + value);// 璁剧疆澶╂暟 -1 澶� @@ -698,6 +683,8 @@ that.getDateFormat(-7),that.getDateFormat(-6),that.getDateFormat(-5),that.getDateFormat(-4), that.getDateFormat(-3),that.getDateFormat(-2),that.getDateFormat(-1),that.getDateFormat(0),] that.chartsData.Line.series = res.data.rows + that.pakin = res.data.rows[0].data[11] + that.pikout = res.data.rows[1].data[11] } } }) @@ -744,6 +731,16 @@ } }) }, + // 鑾峰彇top鍦ㄥ簱 + getTop() { + let that = this + uni.request({ + url: that.commonUrl + '/monitor/loc/top', + success(res) { + that.tableList = res.data.data + } + }) + } } } @@ -751,6 +748,11 @@ <style> /* @import url("../../static/css/common.css"); */ + @font-face { + font-style: normal; + font-family: DS-DIGI-1; + src: url('../../static/font-family/DS-DIGI-1.ttf'); + } @import url("home.css"); /* 鍒� */ .flex-col { @@ -802,7 +804,7 @@ right: 2%; top: 2%; font-size:1vw; - transform: scale(0.8); + font-family: DS-DIGI-1; } .button-left { position: absolute; @@ -823,15 +825,7 @@ width: 13.5%; height: 8.5%; } - .img-box { - width: 100%; - /* background-color: #666666; */ - display: flex; - flex-direction: row; - justify-content: flex-start; - flex-wrap: wrap; - font-size: 1vw; - } + .item-img { width: 50%; margin-top: 5%; -- Gitblit v1.9.1