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) + } + } }) },