Conformance: Activity sequence Start & End linkage done.

This commit is contained in:
chiayin
2023-08-30 14:19:20 +08:00
parent 1e49e11a1b
commit 187ce7afcc
6 changed files with 103 additions and 84 deletions

View File

@@ -43,7 +43,6 @@
<div id="cfmTrace" ref="cfmTrace" class="h-full min-w-full relative"></div>
</div>
</div>
{{ caseData }}
<div class="overflow-y-auto overflow-x-auto scrollbar h-[calc(100%_-_264px)] infiniteTable" @scroll="handleScroll">
<DataTable :value="caseData" showGridlines tableClass="text-sm " breakpoint="0">
<div v-for="(col, index) in columnData" :key="index">
@@ -100,12 +99,12 @@ export default {
caseData: function() {
if(this.infiniteData !== null){
const data = JSON.parse(JSON.stringify(this.infiniteData)); // 深拷貝原始 cases 的內容
console.log(data);
data.forEach(item => {
// item.facets.forEach((facet, index) => {
// console.log(facet.value);
// item[`fac_${index}`] = facet.value.join(', '); // 建立新的 key-value pair
// });
// delete item.facets; // 刪除原本的 attributes 屬性
item.facets.forEach((facet, index) => {
item[`fac_${index}`] = facet.value; // 建立新的 key-value pair
});
delete item.facets; // 刪除原本的 attributes 屬性
item.attributes.forEach((attribute, index) => {
item[`att_${index}`] = attribute.value; // 建立新的 key-value pair
@@ -121,6 +120,7 @@ export default {
{ field: 'id', header: 'Case Id' },
{ field: 'started_at', header: 'Start Date' },
{ field: 'completed_at', header: 'End Date' },
...data[0].facets.map((fac, index) => ({ field: `fac_${index}`, header: fac.name })),
...data[0].attributes.map((att, index) => ({ field: `att_${index}`, header: att.key })),
];
return result