From 59106f4f1c9e7daaf50da15b8d3f3b5fc329aa65 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 07 十一月 2023 10:19:12 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 101 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 75 insertions(+), 26 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 92ce788..9379e94 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -215,11 +215,12 @@ <view class="text-content"> <!-- head --> <view class="swiper-head"> - <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 style="width: 10vw;">鐩爣绔欙細{{infoText.staNo}}</view> + <view style="flex: 1;">鍟嗗搧缂栧彿</view> + <view style="flex: 1;">鍟嗗搧鍚嶇О</view> + <view style="width: 10vw;">鏁伴噺</view> + <view style="flex: 1;">绠辩爜</view> + <view style="width: 10vw;">搴撳瓨鏁伴噺</view> </view> <!-- body --> <view class="swiper-body"> @@ -231,11 +232,13 @@ 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 style="width: 20%;">No:{{i+1}}</view> - <view style="width: 30%;">{{item.matNo}}</view> - <view style="width: 20%;">{{item.maknx}}</view> - <view style="width: 20%;">{{item.specs}}</view> - <view style="width: 10%;">{{item.count}}</view> + <view style="width: 10vw;">No:{{i+1}}</view> + <view style="flex: 1;">{{item.matNo}}</view> + <view style="flex: 1;">{{item.maknx}}</view> + <!-- <view style="width: 20%;">{{item.specs}}</view> --> + <view style="width: 10vw;">{{item.count}}</view> + <view style="flex: 1;">{{item.zpallet}}</view> + <view style="width: 10vw;">{{item.anfme}}</view> </swiper-item> </swiper> </view> @@ -243,6 +246,10 @@ </y-box> </view> </view> + </view> + <view class="btn"> + <!-- <button >鎷f枡鍥炲簱</button> --> + <button size="mini" type="primary" @click="">鐩樼偣鍥炲簱</button> </view> </uni-transition> <!-- 寮傚父淇℃伅 --> @@ -325,6 +332,7 @@ export default { data() { return { + commonUrl: '', series: [], homeViewShow: true, infoViewShow: false , @@ -414,22 +422,50 @@ that.baseLedId = BaseLedId that.basePort = BasePort that.baseCrnId = BaseCrnId - // this.getUrl() + + + + this.getDate2() + setTimeout(()=>{ + // this.getServerData() + // this.initlineChart() + // this.initPieChart() + // this.getOther() + setTimeout(()=>{ + this.getServerData() + this.initlineChart() + this.initPieChart() + this.getOther() + setTimeout(()=>{ + this.getServerData() + this.initlineChart() + this.initPieChart() + this.getOther() + },3000) + },1000) + },1000) }, onLoad() { + setInterval(()=>{ - this.getServerData() - this.initlineChart() - this.initPieChart() - this.getOther() this.getDate2() - // this.getInfo() - // this.getError() - this.getInfo2() - this.getError2() this.getUrl() + this.getInfo() + this.getError() + // this.getInfo2() + // this.getError2() this.controller() },1000) + + setInterval(()=>{ + this.getDate2() + this.getUrl() + this.getInfo() + this.getError() + // this.getInfo2() + // this.getError2() + this.controller() + },600000) }, methods: { timeOuts() { @@ -518,6 +554,7 @@ infoModel(res) { let that = this if (res.data && res.data !== "") { + that.infoText.title = res.data[0].title if (that.infoType == 2 || that.infoType == 3) { return; } @@ -726,11 +763,14 @@ success(result) { var res = result.data if (res.code === 200) { - that.chartsData.Line.categories = [ - that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-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 + setTimeout(()=> { + that.chartsData.Line.categories = [ + that.getDateFormat(-11),that.getDateFormat(-10),that.getDateFormat(-9),that.getDateFormat(-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 + },1000) + } } }) @@ -765,7 +805,7 @@ uni.request({ url: that.commonUrl + "/monitor/other", data: { - crnId: that.baseCrnId, + crnId: that.baseCrnId, ledId: that.baseLedId, }, success(result) { @@ -792,6 +832,15 @@ /* @import url("../../static/css/common.css"); */ @import url("home.css"); /* 鍒� */ + .btn { + position: fixed; + width: 100%; + height: 10vh; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + } .flex-col { display: flex; flex-direction: column; @@ -976,7 +1025,7 @@ } .info-main { width: 100vw; - height: 88vh; + height: 80vh; display: flex; justify-content: center; align-items: center; -- Gitblit v1.9.1