From 23324388eb3c0ba6cfb70de3a98eb8795f3d3eae Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期一, 16 五月 2022 14:54:11 +0800 Subject: [PATCH] # --- Monitor-APP/pages/index/index.vue | 45 +++++++++++++++++++++++++-------------------- 1 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Monitor-APP/pages/index/index.vue b/Monitor-APP/pages/index/index.vue index 74ef14e..7856806 100644 --- a/Monitor-APP/pages/index/index.vue +++ b/Monitor-APP/pages/index/index.vue @@ -312,6 +312,7 @@ }, method:'GET', success(result) { + console.log(result) let res = result.data if (res.data) { that.title = '' @@ -320,6 +321,7 @@ that.newspaper = res.data that.move = false } else { + that.newspaper = '' that.errorShow = false } } @@ -338,29 +340,32 @@ var newsData = '' var str = '' let res = result.data - if (res.data[0].matDtos) { - if (res.data[0].matDtos.length <= 8) { - that.pakinShow = true - } - if (res.data[0].ioType === 101) { - that.title = '鍏ㄦ澘鍑哄簱' - } else if(res.data[0].ioType === 103) { - that.title = '妫�鏂欏嚭搴�' - } - that.staNo = '鐩爣绔�' + res.data[0].staNo - for (var i = 0; i < res.data[0].matDtos.length; i++) { - str = res.data[0].matDtos[i].matnr + ' - ' + res.data[0].matDtos[i].batch + '\n' - newsData = newsData + str - } - if (that.errorShow) { - return; + if(res.data) { + if (res.data[0].matDtos) { + if (res.data[0].matDtos.length <= 8) { + that.pakinShow = true + } + if (res.data[0].ioType === 101) { + that.title = '鍏ㄦ澘鍑哄簱' + } else if(res.data[0].ioType === 103) { + that.title = '妫�鏂欏嚭搴�' + } + that.staNo = '鐩爣绔�' + res.data[0].staNo + for (var i = 0; i < res.data[0].matDtos.length; i++) { + str = res.data[0].matDtos[i].matnr + ' - ' + res.data[0].matDtos[i].batch + '\n' + newsData = newsData + str + } + if (that.errorShow) { + return; + } else { + that.newspaper = newsData + that.move = false + } } else { - that.newspaper = newsData - that.move = false + that.move = true } - } else { - that.move = true } + } }) }, -- Gitblit v1.9.1