From 226c96ebc10302ce7ff5b14287bf46018728a7d7 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期二, 15 八月 2023 14:38:51 +0800
Subject: [PATCH] #
---
Monitor-APP/pages/home/home.vue | 140 +++++++++++++++++++++-------------------------
1 files changed, 65 insertions(+), 75 deletions(-)
diff --git a/Monitor-APP/pages/home/home.vue b/Monitor-APP/pages/home/home.vue
index 943424e..957ec78 100644
--- a/Monitor-APP/pages/home/home.vue
+++ b/Monitor-APP/pages/home/home.vue
@@ -23,52 +23,16 @@
<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 class="box-item">
@@ -120,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>
@@ -165,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;font-size: 2vw;font-family: DS-DIGI-1;">{{baseInfo.noneCount}}</view>
</view>
</view>
</view>
@@ -218,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">
@@ -234,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.matNo}}</view>
- <view>{{item.maknx}}</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>
@@ -377,11 +341,14 @@
staNo: "",
matnr: "",
maknx: "",
- specs: "",
+ batch: "",
count: "",
error: ""
},
- swiperList: []
+ swiperList: [],
+ tableList: [],
+ pakin: 10,
+ pikout: 20,
}
},
onShow() {
@@ -410,7 +377,7 @@
this.initlineChart()
this.initPieChart()
this.getOther()
- this.getDate()
+ this.getDate2()
this.getInfo()
this.getError()
// this.getInfo2()
@@ -418,7 +385,7 @@
this.getUrl()
this.controller()
// 娴嬭瘯鐢�
-
+ this.getTop()
},1000)
},
methods: {
@@ -681,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 澶�
@@ -703,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]
}
}
})
@@ -749,6 +731,16 @@
}
})
},
+ // 鑾峰彇top鍦ㄥ簱
+ getTop() {
+ let that = this
+ uni.request({
+ url: that.commonUrl + '/monitor/loc/top',
+ success(res) {
+ that.tableList = res.data.data
+ }
+ })
+ }
}
}
@@ -757,6 +749,12 @@
<style>
/* @import url("../../static/css/common.css"); */
@import url("home.css");
+ @font-face {
+ font-style: normal;
+ font-family: DS-DIGI-1;
+ src: url('../../static/font-family/DS-DIGI-1.ttf');
+ }
+
/* 鍒� */
.flex-col {
display: flex;
@@ -807,7 +805,7 @@
right: 2%;
top: 2%;
font-size:1vw;
- transform: scale(0.8);
+ font-family: DS-DIGI-1;
}
.button-left {
position: absolute;
@@ -828,15 +826,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