From 22f2b64b5ddede46c16a4830992b27e395e9c90c Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期三, 11 五月 2022 20:39:18 +0800
Subject: [PATCH] #

---
 Monitor-APP/pages/index/index.vue |  178 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 140 insertions(+), 38 deletions(-)

diff --git a/Monitor-APP/pages/index/index.vue b/Monitor-APP/pages/index/index.vue
index c51fe79..019a147 100644
--- a/Monitor-APP/pages/index/index.vue
+++ b/Monitor-APP/pages/index/index.vue
@@ -1,6 +1,13 @@
 <template>
+	<!-- {"msg":"鎿嶄綔鎴愬姛","code":200,"data":"鎷f枡鍑哄簱锛�4426)\n婧愬簱浣嶏細1200101\n鐩爣绔欙細186\n1101842-10000-22047518517\n\n"} -->
+	<!-- "鎷f枡鍑哄簱锛�4426)\n婧愬簱浣嶏細1200101\n鐩爣绔欙細186\n1101842-10000-22047518517\n\n" -->
 	<view class="container">
-		<view class="curtain"></view>
+		<view class="floor-screen" :class="floorMove" >
+			<view style="">
+				<text>{{newspaper}}</text>
+			</view>
+		</view>
+		<view class="top-screen" :class="topMove">
 			<view class="head">
 				<text>鑷姩浠撳簱WCS鐩戞帶骞冲彴</text>
 				<view class="time-tools">{{year}}-{{month}}-{{day}}&nbsp{{hours}}:{{minutes}}:{{seconds}}&nbsp{{week}}</view>
@@ -150,20 +157,21 @@
 					</view>
 				</view>
 			</view>
-			<view>
-				<!-- 杈撳叆url -->
-				<uni-popup ref="url" type="dialog">
-					<uni-popup-dialog ref="inputClose" mode="input" title="閰嶇疆url" value=""
-						placeholder="绀轰緥:192.168.1.1" @confirm="baseUrlConfirm"></uni-popup-dialog>
-				</uni-popup>
-			</view>
-			<view>
-				<!-- 杈撳叆ledId -->
-				<uni-popup ref="ledId" type="dialog">
-					<uni-popup-dialog ref="inputClose" mode="input" title="閰嶇疆ledId" value=""
-						placeholder="绀轰緥:1" @confirm="ledIdConfirm"></uni-popup-dialog>
-				</uni-popup>
-			</view>
+		</view>
+		<view>
+			<!-- 杈撳叆url -->
+			<uni-popup ref="url" type="dialog">
+				<uni-popup-dialog ref="inputClose" mode="input" title="閰嶇疆url" value=""
+					placeholder="绀轰緥:192.168.1.1" @confirm="baseUrlConfirm"></uni-popup-dialog>
+			</uni-popup>
+		</view>
+		<view>
+			<!-- 杈撳叆ledId -->
+			<uni-popup ref="ledId" type="dialog">
+				<uni-popup-dialog ref="inputClose" mode="input" title="閰嶇疆ledId" value=""
+					placeholder="绀轰緥:1" @confirm="ledIdConfirm"></uni-popup-dialog>
+			</uni-popup>
+		</view>
 	</view>
 </template>
 
@@ -208,6 +216,12 @@
 				minutes:38,
 				seconds:13,
 				week:'鏄熸湡鍥�',
+				ani:'',
+				// move: 'upMove 1.5s 1;',
+				move:true,
+				topMove:'topUp',
+				floorMove:'',
+				newspaper:'',
 			}
 		},
 		mounted() {
@@ -224,20 +238,52 @@
 		},
 		onReady() {
 			setTimeout(() => {
-				this.initlineChart();
-				this.initPieChart();
+				// this.initlineChart();
+				// this.initPieChart();
 				
 			}, 0);
 			setTimeout(() => {
-				this.getServerData();
-				this.getOther();
+				// this.getServerData();
+				// this.getOther();
+				// this.getPakin();
 			}, 1000);
 			setInterval(() => {
-				this.getDate();
+				// this.getDate();
+				this.getPakin();
+				this.animation();
 			},1000)
-			
 		},
 		methods: {
+			getPakin () {
+				let that = this
+				uni.request({
+					url: "http://10.10.0.222:9090/jkwcs/monitor/led",
+					data: {
+						ledId:'186'
+					},
+					method:'GET',
+					success(result) {
+						console.log(result)
+						let res = result.data
+						if (res.data) {
+							that.newspaper = res.data
+							that.move = false
+						} else {
+							that.newspaper = ''
+							that.move = true
+						}
+					}
+				})
+			},
+			animation() {
+				if (this.move) {
+					this.topMove = 'topUp'
+					this.floorMove = 'floorUp'
+				} else {
+					this.topMove = 'topDown'
+					this.floorMove = 'floorDown'
+				}
+			},
 			getDateFormat(value) {
 				var date = new Date();// 鑾峰彇褰撳墠鏃堕棿
 				date.setDate(date.getDate() + value);// 璁剧疆澶╂暟 -1 澶�
@@ -250,7 +296,7 @@
 			initlineChart() {
 				let that = this
 				uni.request({
-					url: "http://192.168.2.20:8080/jswcs/monitor/line/charts",
+					url: "http://10.10.0.222:9090/jswcs/monitor/line/charts",
 					method:'GET',
 					success(result) {
 						var res = result.data
@@ -265,7 +311,7 @@
 			initPieChart() {
 				let that = this
 				uni.request({
-					url: "http://192.168.2.20:8080/jswcs/monitor/loc/rep",
+					url: "http://10.10.0.222:9090/jswcs/monitor/loc/rep",
 					method:'GET',
 					success(result) {
 						var res = result.data
@@ -283,7 +329,8 @@
 			getOther() {
 				let that = this
 				uni.request({
-					url: "http://" + that.baseUrl + ":8080/jswcs/monitor/other",
+					// http://10.10.0.222:9090/jkwcs/monitor/led?ledId=186
+					url: "http://" + that.baseUrl + ":9090/jswcs/monitor/other",
 					data: {
 						crnId: 1, 
 						ledId: this.baseLedId,
@@ -309,6 +356,7 @@
 			},
 			ledId() {
 				this.$refs.ledId.open()
+				// this.$refs.ledId.open()
 			},
 			baseUrlConfirm(val) {
 				this.baseUrl = val
@@ -349,16 +397,31 @@
 </script>
 
 <style>
-	.curtain {
-		position: fixed;
-		width: 1920px;
-		height: 1080px;
-		background-image: url(../../static/background.png);
-		/* background:red; */
-		animation:move 1.5s 1;
-		z-index: 999;
+	/* animation:upMove 1.5s 1; */
+	/* downMove */
+	/* 涓婂眰鍚戜笂 */
+	.topUp {
+		animation: topUp 1.5s 1;
+		animation-fill-mode: both;
 	}
-	@keyframes mymove
+	@keyframes topUp {
+		from {
+			opacity: 0.5;
+			/* background-color:blue; */
+			top:-1080px
+			}
+		to {
+			opacity: 1;
+			/* background-color:red; */
+			top: 0;
+		}
+	}
+	/* 涓婂眰鍚戜笅 */
+	.topDown {
+		animation: topDown 1.5s 1;
+		animation-fill-mode: both;
+	}
+	@keyframes topDown
 		{
 		from {
 			opacity: 1;
@@ -368,25 +431,64 @@
 		to {
 			opacity: 0.5;
 			/* background-color:blue; */
-			top:-900px
+			top:-1080px
 		}
 	}
-	@keyframes move {
+	/* 涓嬪眰鍚戜笂 */
+	.floorUp {
+		animation: floorUp 1.5s 1;
+		animation-fill-mode: both;
+	}
+	@keyframes floorUp {
 		from {
 			opacity: 0.5;
 			/* background-color:blue; */
-			top:-900px
+			top: 0px;
 			}
 		to {
 			opacity: 1;
 			/* background-color:red; */
-			top: 0;
+			top: 1080px;
 		}
+	}
+	/* 涓嬪眰鍚戜笅 */
+	.floorDown {
+		animation: floorDown 1.5s 1;
+		animation-fill-mode: both;
+	}
+	@keyframes floorDown {
+		from {
+			opacity: 0.5;
+			/* background-color:blue; */
+			top: 1080px;
+			}
+		to {
+			opacity: 1;
+			/* background-color:red; */
+			top: -0px;
+		}
+	}
+	.top-screen {
+		position: fixed;
+		width: 1920px;
+		height: 1080px;
+		/* top: -1000px; */
+		background-image: url(../../static/background.png);
+		/* background:red; */
+		/* animation:upMove 1.5s 1; */
+		z-index: 999;
+	}
+	.floor-screen {
+		width: 1920px;
+		height: 1080px;
+		position: relative;
+		color: #FFFFFF;
+		background-image: url(../../static/background.png);
 	}
 	.container {
 		width: 1920px;
 		height: 1080px;
-		background-image: url(../../static/background.png);
+		
 		position: relative;
 		/* background: #000428;  
 		background: -webkit-linear-gradient(to right, #004e92, #000428);  

--
Gitblit v1.9.1