From d36ff3f80b4891f56342d5fb6bcc4390497ae348 Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期一, 16 五月 2022 22:11:28 +0800 Subject: [PATCH] # --- Monitor-APP/pages/index/index.vue | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 40 insertions(+), 13 deletions(-) diff --git a/Monitor-APP/pages/index/index.vue b/Monitor-APP/pages/index/index.vue index 7856806..7e827cb 100644 --- a/Monitor-APP/pages/index/index.vue +++ b/Monitor-APP/pages/index/index.vue @@ -18,8 +18,8 @@ <text>{{title}}</text> </view> <view style="width: 80%;height: 100%;display: inline-block;float: left;font-size: 160rpx;"> - <text class="animate" v-show="!errorShow && !pakinShow">{{newspaper}}</text> - <text v-show="errorShow">{{newspaper}}</text> + <text class="animate" v-show="!errorShow && pakinShow && pakinGun">{{newspaper}}</text> + <text v-show="errorShow">{{errorPaper}}</text> <text v-show="pakinShow">{{newspaper}}</text> </view> <view style="width: 10%;height: 100%;display: inline-block;float: right;padding-top: 180px;"> @@ -207,6 +207,7 @@ </template> <script> + import ycqdata from '@/pages/index/data.json'; import demodata from '@/mockdata/demodata.json'; export default { data() { @@ -256,10 +257,12 @@ version:'', // newspaper:'鎷f枡鍑哄簱锛�4426)\n婧愬簱浣嶏細1200101\n鐩爣绔欙細186\n1101842-10000-22047518517\n\n', newspaper:'', + errorPaper:'', title:'', staNo:'', errorShow:'', - pakinShow:'' + pakinShow:'', + pakinGun:'', } }, mounted() { @@ -292,9 +295,9 @@ this.getPakin(); this.getError(); // this.getYYY(); - // this.getEEE(); + // this.getEEE();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ this.animation(); - },1500) + },3000) }, onLoad() { // var that=this @@ -303,6 +306,7 @@ // }); }, methods: { + getError() { let that = this uni.request({ @@ -314,15 +318,25 @@ success(result) { console.log(result) let res = result.data - if (res.data) { + if (res.data && res.data !== "") { + console.log('鏈夊紓甯�') that.title = '' that.staNo = '' + that.pakinShow = false that.errorShow = true - that.newspaper = res.data - that.move = false + that.errorPaper = res.data + that.move = false // 鏄剧ず } else { - that.newspaper = '' + that.errorPaper = '' that.errorShow = false + console.log('鏃犲紓甯�') + console.log(that.pakinShow) + if (that.pakinShow) { + console.log('鏃犲紓甯�,鏈夋嫞璐�') + return; + } else { + that.move = true // 闅愯棌 + } } } }); @@ -341,10 +355,14 @@ var str = '' let res = result.data if(res.data) { - if (res.data[0].matDtos) { - if (res.data[0].matDtos.length <= 8) { - that.pakinShow = true - } + console.log("鎷h揣锛屾湁鎷f枡") + if (res.data[0].matDtos.length > 0) { + console.log("鏈夋嫞鏂�,闀垮害>8") + + that.pakinShow = true + that.pakinGun = true + // console.log(that.errorShow,that.pakinShow,that.pakinGun) + if (res.data[0].ioType === 101) { that.title = '鍏ㄦ澘鍑哄簱' } else if(res.data[0].ioType === 103) { @@ -356,11 +374,20 @@ newsData = newsData + str } if (that.errorShow) { + // that.pakinShow = false return; } else { that.newspaper = newsData that.move = false } + if (res.data[0].matDtos.length <= 8) { + console.log("鏈夋嫞鏂�,闀垮害<=8") + that.errorShow = true + that.pakinShow = true + that.pakinGun = false + + } + console.log(that.errorShow,that.pakinShow,that.pakinGun) } else { that.move = true } -- Gitblit v1.9.1