diff --git a/src/views/datav/CaseVerif.vue b/src/views/datav/CaseVerif.vue index 04ffb58..c283553 100644 --- a/src/views/datav/CaseVerif.vue +++ b/src/views/datav/CaseVerif.vue @@ -577,16 +577,16 @@ const getCaseSourceRateAndDealSituationData = async (timeValue) => { // tzcloption.value.series[0].data = res.dzclList; // } -function getData() { - getCaseVerificationRankData(time.value); +async function getData() { + await getCaseVerificationRankData(time.value); // getCaseProblemPropertyData(time.value) - getCaseVerificationCountData(time.value); - getCaseVerificationMapData(time.value); - getCaseVerificationTrendData(selectedYear.value); - getCaseSourceRateAndDealSituationData(time.value); + await getCaseVerificationCountData(time.value); + await getCaseVerificationMapData(time.value); + await getCaseVerificationTrendData(selectedYear.value); + await getCaseSourceRateAndDealSituationData(time.value); // getConfinementAndPauseData(time.value); - getCaseTypeFun(time.value) - getConfinementBarFun(time.value) + await getCaseTypeFun(time.value) + await getConfinementBarFun(time.value) } // endregion diff --git a/src/views/datav/Lmgz.vue b/src/views/datav/Lmgz.vue index 75cef35..9e97039 100644 --- a/src/views/datav/Lmgz.vue +++ b/src/views/datav/Lmgz.vue @@ -424,22 +424,24 @@ watch(time, () => { },{deep:true}); onMounted(() => { - getTotalData();//数量统计 /total/statistics - getAreaRiskData(selectedMetric.value); // 【分县市局 高业务量】 - getAreaNegativeData(selectedMetric.value);// 分县 /area/negative/statistics 【分县市局 中业务量】 - getAreaRateData(selectedMetric.value);// /area/rate/statistics 【分县市局 低业务量】 - getPCSRiskData(selectedMetricPCS.value);//分机构统计风险分 派出所 /risk/org/statistics 【派出所 高业务量】 - getOrgNegativeData(selectedMetricPCS.value);// 派出所 /org/negative/statistics 【派出所 中业务量】 - getOrgRateData(selectedMetricPCS.value);// 派出所 /org/rate/statistics 【派出所 低业务量】 - getCarRiskData(selectedMetricJJDD.value);//分机构统计风险分 交警大队 【交警大队 高业务量】 - getCarOrgNegativeData(selectedMetricJJDD.value);// /org/car/negative/statistics 【交警大队 中业务量】 - getCarOrgRateData(selectedMetricJJDD.value);// 交警人均率 /org/car/rate/statistics 【交警大队 低业务量】 - getLeaderNegativeData(selectedMetricLD.value);// 【领导 问题数】 - getLeaderRiskData(selectedMetricLD.value);// 【领导 问题涉及人数】 - getPoliceANegativeData(selectedMetricMJ.value);// 【民警 问题数】 - getPoliceARiskData(selectedMetricMJ.value);// 【民警 问题发生率】 - getPoliceBNegativeData(selectedMetricXFJ.value);//【辅警/协警 问题数】 - getPoliceBRiskData(selectedMetricXFJ.value);//【辅警/协警 问题发生率】 + Promise.all([ + getTotalData(),//数量统计 /total/statistics + getAreaRiskData(selectedMetric.value),// 【分县市局 高业务量】 + getAreaNegativeData(selectedMetric.value),// 分县 /area/negative/statistics 【分县市局 中业务量】 + getAreaRateData(selectedMetric.value),// /area/rate/statistics 【分县市局 低业务量】 + getPCSRiskData(selectedMetricPCS.value),//分机构统计风险分 派出所 /risk/org/statistics 【派出所 高业务量】 + getOrgNegativeData(selectedMetricPCS.value),// 派出所 /org/negative/statistics 【派出所 中业务量】 + getOrgRateData(selectedMetricPCS.value),// 派出所 /org/rate/statistics 【派出所 低业务量】 + getCarRiskData(selectedMetricJJDD.value),//分机构统计风险分 交警大队 【交警大队 高业务量】 + getCarOrgNegativeData(selectedMetricJJDD.value),// /org/car/negative/statistics 【交警大队 中业务量】 + getCarOrgRateData(selectedMetricJJDD.value),// 交警人均率 /org/car/rate/statistics 【交警大队 低业务量】 + getLeaderNegativeData(selectedMetricLD.value),// 【领导 问题数】 + getLeaderRiskData(selectedMetricLD.value),// 【领导 问题涉及人数】 + getPoliceANegativeData(selectedMetricMJ.value),// 【民警 问题数】 + getPoliceARiskData(selectedMetricMJ.value),// 【民警 问题发生率】 + getPoliceBNegativeData(selectedMetricXFJ.value),//【辅警/协警 问题数】 + getPoliceBRiskData(selectedMetricXFJ.value)//【辅警/协警 问题发生率】 + ]) }); const getTotalData = async () => { diff --git a/src/views/datav/SceneInsp.vue b/src/views/datav/SceneInsp.vue index 4972e5d..591aab6 100644 --- a/src/views/datav/SceneInsp.vue +++ b/src/views/datav/SceneInsp.vue @@ -1029,16 +1029,14 @@ const getWorkDynamicsData = async () => { messages.value = colorNewsVoList; }; -const getData = () => { - new Promise.all([ - getChangedRankData(), - getProblemTypeRateData(), - getSupervisionNotifyCountData(), - getSupervisionNotifyMapData(), - getSupervisionTrendData(), - getYellowBetDrugData(), - getWorkDynamicsData() - ]) +const getData =async () => { + await getChangedRankData(), + await getSupervisionNotifyMapData(), + await getProblemTypeRateData(), + await getSupervisionNotifyCountData(), + await getSupervisionTrendData(), + await getYellowBetDrugData(), + await getWorkDynamicsData() }; // endregion @@ -1111,17 +1109,19 @@ const sceneInspTrendAnimation = () => { sceneInspTrendIntervalId = setInterval(sceneInspTrendAnimation, 2000); // 专项督察问题排行动画 const sceneInspZxdxRankAnimation = () => { - const dictItem = dictData.find( + if(dictData.value){ + const dictItem = dictData.value.find( (item) => (item.dictValue === zxdcProRankTab.value) ); if (dictItem) { - const index = dictData.indexOf(dictItem); - if (index === dictData.length - 1) { - zxdcProRankTab.value = dictData[0].dictValue; - } else { - zxdcProRankTab.value = dictData[index + 1].dictValue; - } + const index = dictData.value.indexOf(dictItem); + if (index === dictData.value.length - 1) { + zxdcProRankTab.value = dictData[0]?.dictValue; + } else { + zxdcProRankTab.value = dictData[index + 1]?.dictValue; + } } + } }; onMounted(() => { @@ -1148,6 +1148,7 @@ sceneWorkDynamicsIntervalId = setInterval(sceneWorkDynamicsAnimation, 50); // region 事件 watch(time, () => { + getData(); }); onMounted(() => { diff --git a/src/views/datav/VideoInsp.vue b/src/views/datav/VideoInsp.vue index 48cc33b..d755fe5 100644 --- a/src/views/datav/VideoInsp.vue +++ b/src/views/datav/VideoInsp.vue @@ -517,14 +517,12 @@ const getVideoSuperviseProblemTypeRateData = async (timeValue) => { res.videoSuperviseProblemTypeRate; }; -const getData =async () => { - await Promise.all([ - getVideoSuperviseProblemRankData(time.value), - getAllVideoSuperviseCountData(time.value), - getVideoSuperviseMapData(time.value), - getVideoSuperviseTrendData(selectedYear.value), - getVideoSuperviseProblemTypeRateData(time.value), - ]) +const getData = async () => { + await getVideoSuperviseProblemRankData(time.value), + await getAllVideoSuperviseCountData(time.value), + await getVideoSuperviseMapData(time.value), + await getVideoSuperviseTrendData(selectedYear.value), + await getVideoSuperviseProblemTypeRateData(time.value) }; // endregion