diff --git a/src/view/education.vue b/src/view/education.vue index c337e40..0f0bfcb 100644 --- a/src/view/education.vue +++ b/src/view/education.vue @@ -612,12 +612,9 @@ const getData = async () => { // 吹哨人 data.whistleblower = res.data.whistleblower; // 预警线索 - const dataArray = res.data.whistleblower.culeTotal.data; - const dataArray1 = res.data.whistleblower.gaCules.data; - const dataArray2 = res.data.whistleblower.jcgCules.data; - data.culeTotal = dataArray[dataArray.length - 1]; - data.gaCules = dataArray1[dataArray1.length - 1]; - data.jcgCules = dataArray2[dataArray2.length - 1]; + data.culeTotal = res.data.whistleblower.culeTotal.data.slice(-1)[0]; + data.gaCules = res.data.whistleblower.gaCules.data.slice(-1)[0]; + data.jcgCules = res.data.whistleblower.jcgCules.data.slice(-1)[0]; } }); };