PMCORE-3392:Task metrics> in levels 2 and 3, the option "drill" does not show data

This commit is contained in:
Fabio Guachalla
2021-10-14 12:01:37 -04:00
parent 09af54a444
commit 7901ee9e9f
2 changed files with 44 additions and 26 deletions

View File

@@ -205,6 +205,7 @@ export default {
created() {}, created() {},
mounted() { mounted() {
this.getBodyHeight(); this.getBodyHeight();
this.loadOption();
}, },
watch: {}, watch: {},
computed: {}, computed: {},
@@ -221,28 +222,47 @@ export default {
* Change datepickers or radio button * Change datepickers or radio button
*/ */
changeOption() { changeOption() {
let that = this, let dt;
dt; if (this.dateFrom && this.dateTo) {
if (this.dateFrom && this.dateTo) { dt = {
dt = { process: this.data[2].id,
process: this.data[2].id, caseList: this.data[1].id.toLowerCase(),
caseList: this.data[1].id.toLowerCase(), dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"), dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
dateTo: moment(this.dateTo).format("YYYY-MM-DD"), riskStatus: this.riskType,
riskStatus: this.riskType, };
}; this.size.id != "all" ? (dt["topCases"] = this.size.id) : null;
this.size.id != "all" ? (dt["topCases"] = this.size.id) : null; this.dateNow = moment().format("YYYY-MM-DD h:mm:ss a");
this.dateNow = moment().format("YYYY-MM-DD h:mm:ss a"); this.updateSettings();
Api.process }
.totalCasesByRisk(dt) },
.then((response) => { /**
that.formatDataRange(response.data); * Load option saved in userConfig
that.updateSettings(); */
}) loadOption() {
.catch((e) => { let that = this,
console.error(e); dt;
}); if (this.data.length > 2) {
} if (this.dateFrom && this.dateTo) {
dt = {
process: this.data[2].id,
caseList: this.data[1].id.toLowerCase(),
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
riskStatus: this.riskType,
};
this.size.id != "all" ? (dt["topCases"] = this.size.id) : null;
this.dateNow = moment().format("YYYY-MM-DD h:mm:ss a");
Api.process
.totalCasesByRisk(dt)
.then((response) => {
that.formatDataRange(response.data);
})
.catch((e) => {
console.error(e);
});
}
}
}, },
/** /**
* Format response fromn API * Format response fromn API
@@ -283,9 +303,7 @@ export default {
}); });
this.updateApexchartAxis(); this.updateApexchartAxis();
if (this.data[1].id.toLowerCase() == "draft") { if (this.data[1].id.toLowerCase() !== "draft") {
this.series = []; // Draft is empty
} else {
this.series = serie; this.series = serie;
} }
}, },

View File

@@ -15,7 +15,7 @@
/> />
<vue-chart-lv-three <vue-chart-lv-three
:key="key3" :key="key3"
v-show="level === 3" v-if="level === 3"
:data="levels" :data="levels"
@updateDataLevel="updateDataLevel" @updateDataLevel="updateDataLevel"
/> />