Merged in bugfix/PMCORE-2684 (pull request #7753)

PMCORE-2684

Approved-by: Rodrigo Quelca <rockoinfo@yahoo.com>
This commit is contained in:
Fabio Guachalla
2021-01-20 20:03:56 +00:00
committed by Julio Cesar Laura Avendaño
4 changed files with 87 additions and 2 deletions

View File

@@ -45,6 +45,16 @@ export let cases = {
keys: {}
});
},
openSummary(data) {
var params = new FormData();
params.append('appUid', data.APP_UID);
params.append('delIndex', data.DEL_INDEX);
params.append('action', 'todo');
return axios.post(window.config.SYS_SERVER +
window.config.SYS_URI +
`appProxy/requestOpenSummary`, params);
},
inputdocuments(data) {
var params = new FormData();
params.append('appUid', data.APP_UID);
@@ -73,7 +83,11 @@ export let cases = {
return axios.post(window.config.SYS_SERVER +
window.config.SYS_URI +
`appProxy/getSummary`, params);
`appProxy/getSummary`, params, {
headers: {
'Cache-Control': 'no-cache'
}
});
},
casenotes(data) {
var params = new FormData();

View File

@@ -0,0 +1,47 @@
<template>
<div class="summaryForm">
<iframe
:width="width"
ref="IFrameSummaryForm"
frameborder="0"
:src="path"
:height="height"
allowfullscreen
>
</iframe>
</div>
</template>
<script>
export default {
name: "MoreInformation",
props: {
data: Object
},
data() {
return {
height: "500px",
width: "100%",
diffHeight: 10
};
},
computed: {
path() {
let url = "";
if (this.data && this.data.DYN_UID) {
url =
window.config.SYS_SERVER +
window.config.SYS_URI +
'/cases/summary?APP_UID='+this.data.APP_UID +
'&DEL_INDEX=' + this.data.DEL_INDEX +
'&DYN_UID=' + this.data.DYN_UID;
}
return url;
},
},
mounted() {},
methods: {
}
}
</script>

View File

@@ -201,6 +201,7 @@ export default {
this.getInputDocuments();
this.getOutputDocuments();
this.getCasesNotes();
this.requestOpenSummary();
},
methods: {
postComment(comment, send, files) {
@@ -504,7 +505,24 @@ export default {
ACTION: "todo",
});
this.$emit("onUpdatePage", "XCase");
}
},
/**
* Verify if the case has the permission Summary Form
* to add dynUid in dataCase
*/
requestOpenSummary() {
Api.cases
.openSummary(this.dataCase)
.then((response) => {
var data = response.data;
if (data.dynUid !== "") {
this.dataCase.DYN_UID = data.dynUid;
}
})
.catch((e) => {
console.error(e);
});
},
},
};
</script>

View File

@@ -4,6 +4,10 @@
<tab :name="$t('ID_SUMMARY')">
<PmCaseSummary :data="dataCaseSummary"> </PmCaseSummary>
</tab>
<tab :name="$t('ID_MORE_INFORMATION')">
<MoreInformation :data="dataCase" v-if="currentTab == $t('ID_MORE_INFORMATION')">
</MoreInformation>
</tab>
<tab :name="$t('ID_PROCESS_MAP')">
<ProcessMap :data="dataCase" v-if="currentTab == $t('ID_PROCESS_MAP')">
</ProcessMap>
@@ -25,6 +29,7 @@ import PmCaseSummary from "./../components/home/caseDetail/PmCaseSummary.vue";
import ProcessMap from "./../components/home/caseDetail/ProcessMap.vue";
import CaseHistory from "./../components/home/caseDetail/CaseHistory.vue";
import ChangeLog from "./../components/home/caseDetail/ChangeLog.vue";
import MoreInformation from './../components/home/caseDetail/MoreInformation.vue';
import Api from "../api/index";
export default {
@@ -36,6 +41,7 @@ export default {
PmCaseSummary,
CaseHistory,
ChangeLog,
MoreInformation
},
props: {
dataCase: Object,