From d2feedb3197ee2b1c210d1e8c27f3e1006d15e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 20 Oct 2023 16:02:24 +0800 Subject: [PATCH] =?UTF-8?q?CN-1391=20fix:=20=E6=B7=BB=E5=8A=A0eventInfoObj?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detections/Index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/detections/Index.vue b/src/views/detections/Index.vue index e7f7a8f1..d514bb93 100644 --- a/src/views/detections/Index.vue +++ b/src/views/detections/Index.vue @@ -633,7 +633,11 @@ export default { } axios.get(api.detection[this.pageType].securityList, { params }).then(response => { if (response.status === 200) { - this.listData = response.data.data.result + const data = response.data.data.result + data.forEach(item => { + item.eventInfoObj = JSON.parse(item.eventInfo) + }) + this.listData = data } else { this.listData = [] console.error(response.data.message) @@ -690,7 +694,7 @@ export default { } // 参数q,避免切换页码时,地址栏参数q为空 let urlQ = '' - if (param.str) { + if (param && param.str) { urlQ = encodeURI(param.str) } else if (this.q) { urlQ = encodeURI(this.q)