diff --git a/src/views/datav/Lmgz.vue b/src/views/datav/Lmgz.vue index 83762bc..653aeda 100644 --- a/src/views/datav/Lmgz.vue +++ b/src/views/datav/Lmgz.vue @@ -439,37 +439,37 @@ const getLeaderRiskData = (type) => { } const getAreaNegativeData = (type) => { areaNegativeStatistics(time.value, type).then(res => { - areaNegativeList.value = res + areaNegativeList.value = eachData(res) }) } const getOrgNegativeData = (type) => { orgNegativeStatistics(time.value, type).then(res => { - orgNegativeList.value = res + orgNegativeList.value = eachData(res) }) } const getCarOrgNegativeData = (type) => { orgCarNegativeStatistics(time.value, type).then(res => { - orgCarNegativeList.value = res + orgCarNegativeList.value = eachData(res) }) } const getPoliceANegativeData = (type) => { policeANegativeStatistics(time.value, type).then(res => { - policeANegativeList.value = res + policeANegativeList.value = eachData(res) }) } const getPoliceBNegativeData = (type) => { policeBNegativeStatistics(time.value, type).then(res => { - policeBNegativeList.value = res + policeBNegativeList.value = eachData(res) }) } const getLeaderNegativeData = (type) => { policeLeaderNegativeStatistics(time.value, type).then(res => { - leaderNegativeList.value = res + leaderNegativeList.value = eachData(res) }) } @@ -493,13 +493,13 @@ const getCarOrgRateData = (type) => { } const eachData = (data) => { - let arr = [] + let arr = []; data.forEach(item => { arr.push({ label: item.name, - value: item.score - }) - }) + value: 'score' in item ? Number(item.score) : Number(item.value) + }); + }); return arr; }