From c51ece97e4d1f7ec9de79c0b6bde9c8b4b0646d1 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Tue, 24 May 2022 18:29:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E8=AE=A4=E8=AF=81=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certificationProgressEchart.vue | 8 ++++--- .../currentStatusOfTheProjectEcharts.vue | 14 ++++++----- .../components/deliverableStatusEchart.vue | 24 +++++++++++-------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/certificationProgressEchart.vue b/jero-web/src/views/projectManagement/components/certificationProgressEchart.vue index 36acb5923..bed58d4bd 100644 --- a/jero-web/src/views/projectManagement/components/certificationProgressEchart.vue +++ b/jero-web/src/views/projectManagement/components/certificationProgressEchart.vue @@ -78,9 +78,11 @@ getData() { getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => { if (res.success) { - let certificationProgressMap = res.result.certificationProgressMap.certificationProgressMapList || [] - this.certificationProgressTotal = res.result.certificationProgressMap.certificationProgressTotal - this.dataEcharts(certificationProgressMap) + if (res.result) { + let certificationProgressMap = res.result.certificationProgressMap ? res.result.certificationProgressMap.certificationProgressMapList : [] + this.certificationProgressTotal = res.result.certificationProgressMap ? res.result.certificationProgressMap.certificationProgressTotal : 0 + this.dataEcharts(certificationProgressMap) + } } }) }, diff --git a/jero-web/src/views/projectManagement/components/currentStatusOfTheProjectEcharts.vue b/jero-web/src/views/projectManagement/components/currentStatusOfTheProjectEcharts.vue index 271ab0c35..47dea0119 100644 --- a/jero-web/src/views/projectManagement/components/currentStatusOfTheProjectEcharts.vue +++ b/jero-web/src/views/projectManagement/components/currentStatusOfTheProjectEcharts.vue @@ -79,10 +79,11 @@ getData() { getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => { if (res.success) { - this.dataSource = [{}] - let dataSource = res.result.currentProjectStatusMap.currentProjectStatusMapList || [] - this.mainLeftEcharts(dataSource) - this.currentProjectStatusTotal = res.result.currentProjectStatusMap.currentProjectStatusTotal + if (res.result) { + let dataSource = res.result.currentProjectStatusMap ? res.result.currentProjectStatusMap.currentProjectStatusMapList : [] + this.mainLeftEcharts(dataSource) + this.currentProjectStatusTotal = res.result.currentProjectStatusMap ? res.result.currentProjectStatusMap.currentProjectStatusTotal : 0 + } } }) }, @@ -125,8 +126,8 @@ let query = { title: params.seriesName, projectLibraryId: this.$route.query.id, - operatorType:'queryCurrentProjectStatusStatistics', - conditionAssessment:params.data.value + operatorType: 'queryCurrentProjectStatusStatistics', + conditionAssessment: params.data.value } this.$refs.responsibilityListRef.getData(query) }) @@ -135,6 +136,7 @@ let data = [] let color = [] if (dataSource && dataSource.length > 0) { + this.dataSource = [{}] dataSource.forEach(res => { if (res.color == '4') { data.push({ diff --git a/jero-web/src/views/projectManagement/components/deliverableStatusEchart.vue b/jero-web/src/views/projectManagement/components/deliverableStatusEchart.vue index 04f4dd81b..6c120bd6a 100644 --- a/jero-web/src/views/projectManagement/components/deliverableStatusEchart.vue +++ b/jero-web/src/views/projectManagement/components/deliverableStatusEchart.vue @@ -54,16 +54,20 @@ getData() { getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => { if (res.success) { - let listingToConfirmMap = res.result.listingToConfirmMap.listingToConfirmMapList || [] - let taskToConfirmMap = res.result.taskToConfirmMap.taskToConfirmMapList || [] - let designComplianceMap = res.result.designComplianceMap.designComplianceMapList || [] - let prehomoMap = res.result.prehomoMap.prehomoMapList || [] - let verifyComplianceMap = res.result.verifyComplianceMap.verifyComplianceMapList || [] - this.dataEcharts(listingToConfirmMap, 1) - this.dataEcharts(taskToConfirmMap, 2) - this.dataEchartsOne(designComplianceMap, 1) - this.dataEchartsOne(prehomoMap, 2) - this.dataEchartsOne(verifyComplianceMap, 3) + if (res.result){ + + let listingToConfirmMap = res.result.listingToConfirmMap ? res.result.listingToConfirmMap.listingToConfirmMapList : [] + let taskToConfirmMap = res.result.taskToConfirmMap ? res.result.taskToConfirmMap.taskToConfirmMapList : [] + let designComplianceMap = res.result.designComplianceMap ? res.result.designComplianceMap.designComplianceMapList : [] + let prehomoMap = res.result.prehomoMap ? res.result.prehomoMap.prehomoMapList : [] + let verifyComplianceMap = res.result.verifyComplianceMap ? res.result.verifyComplianceMap.verifyComplianceMapList : [] + this.dataEcharts(listingToConfirmMap, 1) + this.dataEcharts(taskToConfirmMap, 2) + this.dataEchartsOne(designComplianceMap, 1) + this.dataEchartsOne(prehomoMap, 2) + this.dataEchartsOne(verifyComplianceMap, 3) + } + } }) },