From 5486de22c04f660b4fea68dc67b5898f2cd770ff Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期五, 02 十二月 2022 14:17:26 +0800 Subject: [PATCH] # --- Monitor-APP/pages/home/home.vue | 54 ++++++++++++++++++++++++++---------------------------- 1 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue index 740c142..713af6f 100644 --- a/Monitor-APP/pages/home/home.vue +++ b/Monitor-APP/pages/home/home.vue @@ -28,8 +28,8 @@ <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: 5vw;;font-size: 2vw;">{{baseInfo.xDistance}}</view> - <view style="position: absolute;bottom: 0;left: 7vw;">m</view> + <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> @@ -39,8 +39,8 @@ <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: 5vw;;font-size: 2vw;">{{baseInfo.yDistance}}</view> - <view style="position: absolute;bottom: 0;left: 7vw;">m</view> + <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> @@ -50,8 +50,8 @@ <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: 5vw;;font-size: 2vw;">{{baseInfo.xDuration}}</view> - <view style="position: absolute;bottom: 0;left: 7vw;">s</view> + <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> @@ -61,8 +61,8 @@ <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: 5vw;;font-size: 2vw;">{{baseInfo.yDuration}}</view> - <view style="position: absolute;bottom: 0;left: 7vw;">s</view> + <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> @@ -167,13 +167,13 @@ <view style="width: 8vw;height: 4vw;line-height: 4vw;font-size: 2vw;">{{baseInfo.stockCount}}</view> </view> <view class="flex-row sub-info" style="margin-top: 2vh;"> - <image src="../../static/g1.png" mode="aspectFit"></image> - <view style="width: 8vw;height: 4vw;line-height: 4vw;">鍦ㄥ簱</view> + <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> <view class="flex-row sub-info" style="margin-top: 2vh;"> - <image src="../../static/g1.png" mode="aspectFit"></image> - <view style="width: 8vw;height: 4vw;line-height: 4vw;">鍦ㄥ簱</view> + <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> </view> @@ -384,31 +384,29 @@ this.getUrl() }, onLoad() { - - // this.getServerData() - this.getDate() setInterval(()=>{ + this.getServerData() + this.initlineChart() + this.initPieChart() + this.getOther() this.getDate() this.getInfo() this.getError() this.getUrl() + this.controller() // 娴嬭瘯鐢� // this.getInfo2() // this.getError2() - this.controller() },1000) - setInterval(()=>{ - // this.controller() - },2000) }, methods: { getUrl() { this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePort + "/" +this.baseUrl }, - // getServerData() { - // this.chartsDataLine1=JSON.parse(JSON.stringify(demodata.Line)) - // this.chartsDataPie2=JSON.parse(JSON.stringify(demodata.PieA)) - // }, + getServerData() { + this.chartsDataLine1=JSON.parse(JSON.stringify(this.chartsData.Line)) + this.chartsDataPie2=JSON.parse(JSON.stringify(this.chartsData.Pie)) + }, // 鑾峰彇閿欒淇℃伅 getInfo2() { let that = this @@ -688,11 +686,11 @@ var res = result.data if (res.code === 200) { that.chartsData.Pie.series[0].data = res.data.pie - that.stockCount = res.data.stockCunt - that.emptyCount = res.data.emptyCount - that.noneCount = res.data.noneCount - that.used = res.data.used - that.usedPr = res.data.usedPr + that.baseInfo.stockCount = res.data.stockCunt + that.baseInfo.emptyCount = res.data.emptyCount + that.baseInfo.noneCount = res.data.noneCount + that.baseInfo.used = res.data.used + that.baseInfo.usedPr = res.data.usedPr } } }) -- Gitblit v1.9.1