Merged in bugfix/PMCORE-3366 (pull request #8179)

Bugfix/PMCORE-3366

Approved-by: Rodrigo Quelca
This commit is contained in:
Henry Jonathan Quispe Quispe
2021-09-28 13:18:50 +00:00
committed by Julio Cesar Laura Avendaño
10 changed files with 275 additions and 141 deletions

View File

@@ -166,7 +166,6 @@ export default {
}, },
watch: { watch: {
color() { color() {
console.log("colores");
}, },
}, },
methods: { methods: {

View File

@@ -6,13 +6,15 @@
:key="item.label" :key="item.label"
:class="item.classObject" :class="item.classObject"
> >
<span v-if="item.data.color"> <span @click="item.onClick">
<div <span v-if="item.color">
class="vp-color-breadcrumb" <div
:style="{ backgroundColor: item.data.color }" class="vp-color-breadcrumb"
></div :style="{ backgroundColor: item.color }"
></span> ></div
<span>{{ item.label }}</span> ></span>
<span>{{ item.label }}</span>
</span>
</li> </li>
<div <div
v-for="item in settings" v-for="item in settings"
@@ -47,19 +49,11 @@ export default {
formatOptions(data) { formatOptions(data) {
let options = data; let options = data;
for (let i = 0; i <= options.length - 1; i++) { for (let i = 0; i <= options.length - 1; i++) {
if (i === options.length - 1) { options[i].classObject = {
options[i].classObject = { "vp-breadcrumb-item": true,
"vp-breadcrumb-item": true, active: false,
active: true, "vp-inline-block": true,
"vp-inline-block": true, };
};
} else {
options[i].classObject = {
"vp-breadcrumb-item": true,
active: false,
"vp-inline-block": true,
};
}
} }
return options; return options;
}, },

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="pm-all-view-popover"> <div class="pm-tm-view-popover">
<b-popover <b-popover
:target="target" :target="target"
ref="popover" ref="popover"
@@ -39,6 +39,7 @@
value-field="key" value-field="key"
text-field="value" text-field="value"
name="flavour-2a" name="flavour-2a"
class="process-view-popover"
@change="changeOptions" @change="changeOptions"
stacked stacked
></b-form-checkbox-group> ></b-form-checkbox-group>
@@ -68,7 +69,6 @@ export default {
results: [], results: [],
allColumns: false, allColumns: false,
localSelected: [], localSelected: [],
selected: [],
}; };
}, },
mounted() { mounted() {
@@ -137,7 +137,7 @@ export default {
res.push(o.key); res.push(o.key);
}); });
} }
this.selected = res; this.localSelected = res;
}, },
/** /**
* Handler when change options event * Handler when change options event
@@ -167,4 +167,11 @@ export default {
.v-popover-footer { .v-popover-footer {
display: flow-root; display: flow-root;
} }
.process-view-popover {
margin-bottom: 1rem;
overflow-y: auto;
display: block;
max-height: 200px;
}
</style> </style>

View File

@@ -10,6 +10,7 @@
<modal-new-request ref="newRequest"></modal-new-request> <modal-new-request ref="newRequest"></modal-new-request>
<div class="d-inline-flex p-2"> <div class="d-inline-flex p-2">
<vue-charts <vue-charts
:key="random"
ref="pm-vue-chart" ref="pm-vue-chart"
@onChangeLevel="changeLevel" @onChangeLevel="changeLevel"
:levels="visited" :levels="visited"
@@ -17,7 +18,7 @@
<div class="vp-6"></div> <div class="vp-6"></div>
<drill-down :visited="visited" @onChangeLevel="changeLevel" /> <drill-down :visited="visited" @onChangeLevel="changeLevel" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@@ -27,11 +28,12 @@ import DrillDown from "./DrillDown.vue";
import VueCharts from "./VueCharts.vue"; import VueCharts from "./VueCharts.vue";
import defaultMixins from "./defaultMixins"; import defaultMixins from "./defaultMixins";
import _ from "lodash";
export default { export default {
name: "TaskMetrics", name: "TaskMetrics",
mixins: [defaultMixins], mixins: [defaultMixins],
components: { components: {
ButtonFleft, ButtonFleft,
ModalNewRequest, ModalNewRequest,
DrillDown, DrillDown,
VueCharts, VueCharts,
@@ -40,13 +42,17 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
visited: this.settings && this.settings.visited ? this.settings.visited : [ random: _.random(0, 100000),
{ visited:
level: 0, this.settings && this.settings.visited
active: true, ? this.settings.visited
id: _.random(0,100), : [
} {
] level: 0,
active: true,
id: _.random(0, 100),
},
],
}; };
}, },
created() {}, created() {},
@@ -59,27 +65,30 @@ export default {
* Change level in drill down * Change level in drill down
*/ */
changeLevel(data) { changeLevel(data) {
let item = _.find(this.visited, data); let item = _.findIndex(this.visited, (el) => {
this.visited.forEach(function (elem) { return el.id == data.id;
elem.active = false;
}); });
if(!item) { this.visited.forEach(function (elem) {
elem.active = false;
});
data.active = true;
item != -1 ? this.visited.splice(item, 1, data) : null;
if (item == -1) {
data.active = true; data.active = true;
this.visited = _.filter(this.visited, function(o) { this.visited = _.filter(this.visited, function (o) {
return o.level < data.level; return o.level < data.level;
}); });
this.visited.push(data); this.visited.push(data);
} else {
item.active = true;
} }
this.random = _.random(0, 100000);
this.$emit("updateSettings", { this.$emit("updateSettings", {
data: this.visited, data: this.visited,
key: "visited", key: "visited",
page: "task-metrics", page: "task-metrics",
type: "normal", type: "normal",
id: this.id id: this.id,
}); });
}, },
}, },
}; };
</script> </script>

View File

@@ -6,11 +6,12 @@
</h6> </h6>
<div> <div>
<BreadCrumb <BreadCrumb
:options="breadCrumbs.data" :options="dataBreadcrumbs()"
:settings="settingsBreadcrumbs" :settings="settingsBreadcrumbs"
/> />
<ProcessPopover <ProcessPopover
:options="optionsProcesses" :options="optionsProcesses"
:selected="selectedProcesses"
@onChange="onChangeSearchPopover" @onChange="onChangeSearchPopover"
target="pm-task-process" target="pm-task-process"
ref="pm-task-process" ref="pm-task-process"
@@ -25,10 +26,11 @@
:show-labels="false" :show-labels="false"
track-by="id" track-by="id"
label="name" label="name"
@select="changeOption"
></multiselect> ></multiselect>
</div> </div>
<label class="vp-inline-block vp-padding-l20">{{ $t("ID_TOP10") }}</label> <label class="vp-inline-block vp-padding-l20">{{
$t("ID_TOP10")
}}</label>
<div class="vp-inline-block"> <div class="vp-inline-block">
<b-form-checkbox <b-form-checkbox
v-model="top" v-model="top"
@@ -104,7 +106,7 @@ export default {
BreadCrumb, BreadCrumb,
ProcessPopover, ProcessPopover,
}, },
props: ["data", "breadCrumbs"], props: ["data"],
data() { data() {
let that = this; let that = this;
return { return {
@@ -122,7 +124,7 @@ export default {
optionsCategory: [], optionsCategory: [],
optionsProcesses: [], optionsProcesses: [],
selectedProcesses: [], selectedProcesses: [],
top: false, top: this.data[2] ? this.data[2].data.top : true,
width: 0, width: 0,
totalCases: [], totalCases: [],
currentSelection: null, currentSelection: null,
@@ -186,7 +188,20 @@ export default {
this.getCategories(); this.getCategories();
this.getProcesses(); this.getProcesses();
}, },
watch: {}, watch: {
category(nvalue, old) {
this.changeOption();
},
optionsCategory(nvalue, old) {
this.category = this.data[2] ? this.data[2].data.category : nvalue[0];
},
optionsProcesses(nvalue, old) {
this.selectedProcesses = this.data[2]
? this.data[2].data.selectedProcesses
: _.flatMap(nvalue, (n) => n.key);
this.changeOption();
},
},
computed: {}, computed: {},
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
@@ -221,9 +236,6 @@ export default {
.processList(query || "") .processList(query || "")
.then((response) => { .then((response) => {
that.formatDataProcesses(response.data); that.formatDataProcesses(response.data);
that.changeOption({
id: "all",
});
}) })
.catch((e) => { .catch((e) => {
console.error(err); console.error(err);
@@ -247,25 +259,19 @@ export default {
array.push({ name: el["CATEGORY_NAME"], id: el["CATEGORY_ID"] }); array.push({ name: el["CATEGORY_NAME"], id: el["CATEGORY_ID"] });
}); });
this.optionsCategory = array; this.optionsCategory = array;
this.category = array[0];
}, },
/** /**
* Format processes for popover * Format processes for popover
* @param {*} data * @param {*} data
*/ */
formatDataProcesses(data) { formatDataProcesses(data) {
let sels = [], let labels = [],
labels = [],
array = []; array = [];
_.each(data, (el) => { _.each(data, (el) => {
array.push({ value: el["PRO_TITLE"], key: el["PRO_ID"] }); array.push({ value: el["PRO_TITLE"], key: el["PRO_ID"] });
sels.push(el["PRO_ID"]);
labels; labels;
}); });
this.optionsProcesses = array; this.optionsProcesses = array;
this.selectedProcesses = sels;
//Update the labels //Update the labels
this.dataProcesses = data; this.dataProcesses = data;
}, },
@@ -273,25 +279,25 @@ export default {
* Change the options in TOTAL CASES BY PROCESS * Change the options in TOTAL CASES BY PROCESS
* @param {*} option * @param {*} option
*/ */
changeOption(option) { changeOption() {
let that = this, let that = this,
dt = {}; dt = {};
if (this.data.length > 1) { if (this.category && this.selectedProcesses.length > 0 && this.data[1]) {
dt = { dt = {
category: option.id, category: this.category.id,
caseList: this.data[1].id.toLowerCase(), caseList: this.data[1].id.toLowerCase(),
processes: this.selectedProcesses, processes: this.selectedProcesses,
top: this.top, top: this.top,
}; };
option.id == "all" ? delete dt.category : null; this.category.id == "all" ? delete dt.category : null;
Api.process Api.process
.totalCasesByProcess(dt) .totalCasesByProcess(dt)
.then((response) => { .then((response) => {
that.totalCases = response.data; that.totalCases = response.data;
that.formatTotalCases(response.data); that.formatTotalCases(response.data);
}) })
.catch((e) => { .catch((e) => {
console.error(err); console.error(e);
}); });
} }
}, },
@@ -327,17 +333,8 @@ export default {
* @param {*} data * @param {*} data
*/ */
onUpdateColumnSettings(data) { onUpdateColumnSettings(data) {
let res;
this.selectedProcesses = data; this.selectedProcesses = data;
res = _.intersectionBy(this.totalCases, data, (el) => { this.changeOption();
if (_.isNumber(el)) {
return el;
}
if (_.isObject(el) && el["PRO_ID"]) {
return el["PRO_ID"];
}
});
this.formatTotalCases(res);
}, },
/** /**
* Update labels in chart * Update labels in chart
@@ -365,9 +362,7 @@ export default {
* Force update view when update level * Force update view when update level
*/ */
forceUpdateView() { forceUpdateView() {
this.changeOption({ this.changeOption();
id: 0,
});
}, },
/** /**
* Event handler change input search popover * Event handler change input search popover
@@ -402,7 +397,11 @@ export default {
id: this.currentSelection["PRO_ID"], id: this.currentSelection["PRO_ID"],
name: this.currentSelection["PRO_TITLE"], name: this.currentSelection["PRO_TITLE"],
level: 2, level: 2,
data: this.currentSelection, data: {
top: this.top,
category: this.category,
selectedProcesses: this.selectedProcesses,
},
}); });
}, },
/** /**
@@ -429,6 +428,20 @@ export default {
}); });
eventBus.$emit("home::sidebar::click-item", taskList); eventBus.$emit("home::sidebar::click-item", taskList);
}, },
/**
* Return the breadcrumbs
*/
dataBreadcrumbs() {
let res = [];
if (this.data[1]) {
res.push({
label: this.data[1]["name"],
onClick() {},
color: this.data[1]["color"],
});
}
return res;
},
}, },
}; };
</script> </script>

View File

@@ -1,10 +1,10 @@
<template> <template>
<div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block"> <div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block">
<div class="p-1 v-flex"> <div class="p-1 v-flex">
<h6 class="v-search-title">{{$t("ID_DRILL_DOWN_RISK_MATRIX")}}</h6> <h6 class="v-search-title">{{ $t("ID_DRILL_DOWN_RISK_MATRIX") }}</h6>
<div> <div>
<BreadCrumb <BreadCrumb
:options="breadCrumbs.data" :options="dataBreadcrumbs()"
:settings="settingsBreadcrumbs" :settings="settingsBreadcrumbs"
/> />
<div class="vp-width-p30 vp-inline-block"> <div class="vp-width-p30 vp-inline-block">
@@ -36,9 +36,7 @@
></b-form-datepicker> ></b-form-datepicker>
</div> </div>
<div class="vp-inline-block"> <div class="vp-inline-block">
<label class="form-label">{{ <label class="form-label">{{ $t("ID_TOP") }}</label>
$t("ID_TOP")
}}</label>
</div> </div>
<div class="vp-inline-block"> <div class="vp-inline-block">
<multiselect <multiselect
@@ -127,11 +125,23 @@ export default {
let that = this; let that = this;
return { return {
currentSelection: null, currentSelection: null,
dateFrom: moment().format("YYYY-MM-DD"), dateFrom:
dateTo: moment().add(30, "d").format("YYYY-MM-DD"), this.data[3] && this.data[3].data.dateFromRisk
dateNow: "", ? this.data[3].data.dateFromRisk
size: { name: this.$t("ID_ALL"), id: "all" }, : moment().format("YYYY-MM-DD"),
riskType: "ON_TIME", dateTo:
this.data[3] && this.data[3].data.dateToRisk
? this.data[3].data.dateToRisk
: moment().add(30, "d").format("YYYY-MM-DD"),
dateNow: moment().format("DD/MM/YYYY h:mm:ss a"),
size:
this.data[3] && this.data[3].data.size
? this.data[3].data.size
: { name: this.$t("ID_ALL"), id: "all" },
riskType:
this.data[3] && this.data[3].data.riskType
? this.data[3].data.riskType
: "ON_TIME",
settingsBreadcrumbs: [ settingsBreadcrumbs: [
{ {
class: "fas fa-info-circle", class: "fas fa-info-circle",
@@ -227,9 +237,10 @@ export default {
.totalCasesByRisk(dt) .totalCasesByRisk(dt)
.then((response) => { .then((response) => {
that.formatDataRange(response.data); that.formatDataRange(response.data);
that.updateSettings();
}) })
.catch((e) => { .catch((e) => {
console.error(err); console.error(e);
}); });
} }
}, },
@@ -298,7 +309,7 @@ export default {
this.$refs["LevelThreeChart"].updateOptions({ this.$refs["LevelThreeChart"].updateOptions({
yaxis: { yaxis: {
max: 0, max: 0,
tickAmount: 7 tickAmount: 7,
}, },
title: { title: {
text: "Days before being Overdue", text: "Days before being Overdue",
@@ -309,7 +320,7 @@ export default {
this.$refs["LevelThreeChart"].updateOptions({ this.$refs["LevelThreeChart"].updateOptions({
yaxis: { yaxis: {
max: 0, max: 0,
tickAmount: 7 tickAmount: 7,
}, },
title: { title: {
text: "Days before being At-Risk", text: "Days before being At-Risk",
@@ -421,6 +432,46 @@ export default {
}); });
}); });
}, },
/**
* Return the breadcrumbs
*/
dataBreadcrumbs() {
let res = [];
if (this.data[1]) {
res.push({
label: this.data[1]["name"],
onClick() {},
color: this.data[1]["color"],
});
}
if (this.data[2]) {
res.push({
label: this.data[2]["name"],
onClick() {},
color: null,
});
}
return res;
},
/**
* UPdate settings user config
*/
updateSettings() {
this.$emit("updateDataLevel", {
id: "level3",
name: this.data[2]["name"],
level: 3,
data: {
dateFrom: this.data[3].data.dateFrom,
dateTo: this.data[3].data.dateTo,
period: this.data[3].data.period,
dateFromRisk: this.dateFrom,
dateToRisk: this.dateTo,
size: this.size,
riskType: this.riskType,
},
});
},
}, },
}; };
</script> </script>

View File

@@ -6,7 +6,7 @@
</h6> </h6>
<div> <div>
<BreadCrumb <BreadCrumb
:options="breadCrumbs.data" :options="dataBreadcrumbs()"
:settings="settingsBreadcrumbs" :settings="settingsBreadcrumbs"
/> />
<div class="vp-width-p30 vp-inline-block"> <div class="vp-width-p30 vp-inline-block">
@@ -94,13 +94,17 @@ export default {
Multiselect, Multiselect,
BreadCrumb, BreadCrumb,
}, },
props: ["data", "breadCrumbs"], props: ["data"],
data() { data() {
let that = this; let that = this;
return { return {
dateFrom: moment().format("YYYY-MM-DD"), dateFrom: this.data[3]
dateTo: moment().add(30, "d").format("YYYY-MM-DD"), ? this.data[3].data.dateFrom
period: "day", : moment().format("YYYY-MM-DD"),
dateTo: this.data[3]
? this.data[3].data.dateTo
: moment().add(30, "d").format("YYYY-MM-DD"),
period: this.data[3] ? this.data[3].data.period : "day",
periodOptions: [ periodOptions: [
{ text: this.$t("ID_DAY"), value: "day" }, { text: this.$t("ID_DAY"), value: "day" },
{ text: this.$t("ID_MONTH"), value: "month" }, { text: this.$t("ID_MONTH"), value: "month" },
@@ -155,12 +159,12 @@ export default {
this.changeOption(); this.changeOption();
}, },
watch: { watch: {
dateFrom () { dateFrom() {
this.validateDateTo(); this.validateDateTo();
}, },
dateTo () { dateTo() {
this.validateDateTo(); this.validateDateTo();
} },
}, },
computed: {}, computed: {},
updated() {}, updated() {},
@@ -230,10 +234,14 @@ export default {
*/ */
onClickDrillDown() { onClickDrillDown() {
this.$emit("updateDataLevel", { this.$emit("updateDataLevel", {
id: this.data[2]["id"], id: "level2",
name: this.data[2]["name"], name: this.data[2]["name"],
level: 3, level: 3,
data: null, data: {
dateFrom: this.dateFrom,
dateTo: this.dateTo,
period: this.period,
},
}); });
}, },
/** /**
@@ -282,7 +290,7 @@ export default {
* Validate range date * Validate range date
*/ */
validateDateTo() { validateDateTo() {
if (this.dateFrom !== '' && this.dateTo !== '') { if (this.dateFrom !== "" && this.dateTo !== "") {
if (this.dateFrom > this.dateTo) { if (this.dateFrom > this.dateTo) {
this.stateDateTo = false; this.stateDateTo = false;
} else { } else {
@@ -290,6 +298,27 @@ export default {
} }
} }
}, },
/**
* Return the breadcrumbs
*/
dataBreadcrumbs() {
let res = [];
if (this.data[1]) {
res.push({
label: this.data[1]["name"],
onClick() {},
color: this.data[1]["color"],
});
}
if (this.data[2]) {
res.push({
label: this.data[2]["name"],
onClick() {},
color: null,
});
}
return res;
},
}, },
}; };
</script> </script>

View File

@@ -2,22 +2,19 @@
<div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block"> <div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block">
<div class="p-1 v-flex"> <div class="p-1 v-flex">
<h6 class="v-search-title">{{ $t("ID_DRILL_DOWN_NUMBER_TASKS") }}</h6> <h6 class="v-search-title">{{ $t("ID_DRILL_DOWN_NUMBER_TASKS") }}</h6>
<BreadCrumb :options="breadCrumbs.data" :settings="settingsBreadcrumbs" /> <BreadCrumb :options="dataBreadcrumbs" :settings="settingsBreadcrumbs" />
<apexchart <apexchart
v-show="typeView === 'donut'" v-show="typeView === 'donut'"
ref="apexchart1" ref="apexchart1"
:width="width"
:options="optionsDonut" :options="optionsDonut"
:series="seriesDonut" :series="seriesDonut"
></apexchart> ></apexchart>
<apexchart <apexchart
v-show="typeView === 'bar'" v-show="typeView === 'bar'"
ref="apexchart2" ref="apexchart2"
:width="width"
:options="optionsBar" :options="optionsBar"
:series="seriesBar" :series="seriesBar"
></apexchart> ></apexchart>
<div class="row"> <div class="row">
<div class="col-sm vp-align-right"> <div class="col-sm vp-align-right">
<button <button
@@ -52,7 +49,7 @@ export default {
name: "VueChartLvZero", name: "VueChartLvZero",
mixins: [], mixins: [],
components: { BreadCrumb }, components: { BreadCrumb },
props: ["breadCrumbs"], props: [],
data() { data() {
let that = this; let that = this;
return { return {
@@ -68,6 +65,57 @@ export default {
onClick() {}, onClick() {},
}, },
], ],
dataBreadcrumbs: [
{
label: that.$i18n.t("ID_INBOX"),
onClick() {
that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_INBOX"),
name: that.$i18n.t("ID_INBOX"),
level: 1,
color: "#179a6e",
});
},
color: "#179a6e",
},
{
label: this.$i18n.t("ID_DRAFT"),
onClick() {
that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_DRAFT"),
name: that.$i18n.t("ID_DRAFT"),
level: 1,
color: "#feb019",
});
},
color: "#feb019",
},
{
label: this.$i18n.t("ID_PAUSED"),
onClick() {
that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_PAUSED"),
name: that.$i18n.t("ID_PAUSED"),
level: 1,
color: "#008ffb",
});
},
color: "#008ffb",
},
{
label: this.$i18n.t("ID_UNASSIGNED"),
onClick() {
that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_UNASSIGNED"),
name: that.$i18n.t("ID_UNASSIGNED"),
level: 1,
color: "#8f99a0",
});
},
color: "#8f99a0",
},
],
optionsDonut: { optionsDonut: {
labels: [ labels: [
this.$i18n.t("ID_INBOX"), this.$i18n.t("ID_INBOX"),
@@ -78,20 +126,10 @@ export default {
chart: { chart: {
id: "apexchart1", id: "apexchart1",
type: "donut", type: "donut",
events: { events: {},
legendClick: function (chartContext, seriesIndex, config) {
that.currentSelection = that.data[seriesIndex];
that.$emit("updateDataLevel", {
id: that.currentSelection["List Name"],
name: that.currentSelection["List Name"],
level: 1,
color: that.formatColor(that.currentSelection["Color"]),
data: that.currentSelection,
});
},
},
}, },
legend: { legend: {
show: false,
position: "top", position: "top",
offsetY: 0, offsetY: 0,
}, },
@@ -127,6 +165,7 @@ export default {
}, },
}, },
legend: { legend: {
show: false,
position: "top", position: "top",
offsetY: 0, offsetY: 0,
}, },

View File

@@ -1,29 +1,23 @@
<template> <template>
<div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block"> <div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block">
<vue-chart-lv-zero <vue-chart-lv-zero v-if="level === 0" @updateDataLevel="updateDataLevel" />
v-show="level === 0"
@updateDataLevel="updateDataLevel"
:breadCrumbs="dataBreadCrumbs()"
/>
<vue-chart-lv-one <vue-chart-lv-one
:key="key1" :key="key1"
v-show="level === 1" v-if="level === 1"
:data="levels" :data="levels"
@updateDataLevel="updateDataLevel" @updateDataLevel="updateDataLevel"
:breadCrumbs="dataBreadCrumbs()"
/> />
<vue-chart-lv-two <vue-chart-lv-two
:key="key2" :key="key2"
v-show="level === 2" v-if="level === 2"
:data="levels" :data="levels"
@updateDataLevel="updateDataLevel" @updateDataLevel="updateDataLevel"
:breadCrumbs="dataBreadCrumbs()"
/> />
<vue-chart-lv-three <vue-chart-lv-three
:key="key3" :key="key3"
v-show="level === 3" v-show="level === 3"
:data="levels" :data="levels"
:breadCrumbs="dataBreadCrumbs()" @updateDataLevel="updateDataLevel"
/> />
</div> </div>
</template> </template>
@@ -44,13 +38,13 @@ export default {
VueChartLvTwo, VueChartLvTwo,
VueChartLvThree, VueChartLvThree,
}, },
props: ["levels"], props: ["levels"],
data() { data() {
let that = this; let that = this;
return { return {
key1: _.random(0,100), key1: _.random(0, 100),
key2: _.random(0,100), key2: _.random(0, 100),
key3: _.random(0,100), key3: _.random(0, 100),
settingsBreadCrumbs: [ settingsBreadCrumbs: [
{ {
class: "fas fa-info-circle", class: "fas fa-info-circle",
@@ -63,9 +57,9 @@ export default {
mounted() {}, mounted() {},
watch: {}, watch: {},
computed: { computed: {
level: function () { level: function () {
return _.find(this.levels, {'active': true }).level; return _.find(this.levels, { active: true }).level;
} },
}, },
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
@@ -104,7 +98,7 @@ export default {
res.push({ res.push({
label: el.name, label: el.name,
onClick() { onClick() {
this.$emit("onChangeLevel", el); this.$emit("onChangeLevel", el);
}, },
data: el, data: el,
}); });
@@ -124,7 +118,7 @@ export default {
}; };
break; break;
} }
} },
}, },
}; };
</script> </script>

View File

@@ -164,7 +164,6 @@ export default {
this.data.reasonPause = this.pauseData.reasonPause; this.data.reasonPause = this.pauseData.reasonPause;
api.cases.pauseCase(this.data) api.cases.pauseCase(this.data)
.then((response) => { .then((response) => {
console.log(response);
if (response.statusText == "OK" || response.status === 200) { if (response.statusText == "OK" || response.status === 200) {
that.$refs["modal-pause-case"].hide(); that.$refs["modal-pause-case"].hide();
that.$parent.$refs['ellipsis-' + that.data.TAS_UID].hideActionButtons() that.$parent.$refs['ellipsis-' + that.data.TAS_UID].hideActionButtons()