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 | 186 +++++++++++++++++++++++++++------------------- 1 files changed, 110 insertions(+), 76 deletions(-) diff --git a/Monitor-APP/pages/index/index.vue b/Monitor-APP/pages/index/index.vue index 107f222..019a147 100644 --- a/Monitor-APP/pages/index/index.vue +++ b/Monitor-APP/pages/index/index.vue @@ -1,7 +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="upper " :class="mmm" ></view> - <view class="lower" :class="fff"> + <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}} {{hours}}:{{minutes}}:{{seconds}} {{week}}</view> @@ -152,20 +158,20 @@ </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> + <!-- 杈撳叆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> @@ -211,9 +217,11 @@ seconds:13, week:'鏄熸湡鍥�', ani:'', - move: 'upMove 1.5s 1;', - mmm:'upup', - fff:'' + // move: 'upMove 1.5s 1;', + move:true, + topMove:'topUp', + floorMove:'', + newspaper:'', } }, mounted() { @@ -230,31 +238,50 @@ }, 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(); - },1000) - setInterval(() => { + // this.getDate(); + this.getPakin(); this.animation(); - },10000) + },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.ani) { - this.ani = '' - this.mmm = 'upup' - this.fff = 'upupmove' + if (this.move) { + this.topMove = 'topUp' + this.floorMove = 'floorUp' } else { - this.ani = 1 - this.mmm = 'down' - this.fff = 'ddmove' + this.topMove = 'topDown' + this.floorMove = 'floorDown' } }, getDateFormat(value) { @@ -269,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 @@ -284,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 @@ -302,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, @@ -328,6 +356,7 @@ }, ledId() { this.$refs.ledId.open() + // this.$refs.ledId.open() }, baseUrlConfirm(val) { this.baseUrl = val @@ -370,34 +399,29 @@ <style> /* animation:upMove 1.5s 1; */ /* downMove */ - .upup { - animation: upMove 1.5s 1; + /* 涓婂眰鍚戜笂 */ + .topUp { + animation: topUp 1.5s 1; animation-fill-mode: both; } - .down { - animation: downMove 1.5s 1; + @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; } - - .upupmove { - animation: upupmove 1.5s 1; - animation-fill-mode: both; - } - .ddmove { - animation: ddmove 1.5s 1; - animation-fill-mode: both; - } - .upper { - position: fixed; - width: 1920px; - height: 1080px; - /* top: -1000px; */ - background-image: url(../../static/background.png); - /* background:red; */ - /* animation:upMove 1.5s 1; */ - z-index: 999; - } - @keyframes downMove + @keyframes topDown { from { opacity: 1; @@ -410,19 +434,12 @@ top:-1080px } } - @keyframes upMove { - from { - opacity: 0.5; - /* background-color:blue; */ - top:-1080px - } - to { - opacity: 1; - /* background-color:red; */ - top: 0; - } + /* 涓嬪眰鍚戜笂 */ + .floorUp { + animation: floorUp 1.5s 1; + animation-fill-mode: both; } - @keyframes upupmove { + @keyframes floorUp { from { opacity: 0.5; /* background-color:blue; */ @@ -434,7 +451,12 @@ top: 1080px; } } - @keyframes ddmove { + /* 涓嬪眰鍚戜笅 */ + .floorDown { + animation: floorDown 1.5s 1; + animation-fill-mode: both; + } + @keyframes floorDown { from { opacity: 0.5; /* background-color:blue; */ @@ -446,15 +468,27 @@ top: -0px; } } - .lower { + .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