feat: Conformance Save switchNavItem done.
This commit is contained in:
@@ -608,7 +608,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -114,16 +114,21 @@ export default {
|
|||||||
let type;
|
let type;
|
||||||
let fileId;
|
let fileId;
|
||||||
|
|
||||||
if(this.navViewName === 'FILES') {
|
switch (this.navViewName) {
|
||||||
this.store.filesTag = event.target.innerText;
|
case 'FILES':
|
||||||
} else if(this.navViewName === 'DISCOVER') {
|
this.store.filesTag = event.target.innerText;
|
||||||
type = this.$route.params.type;
|
break;
|
||||||
fileId = this.$route.params.fileId;
|
case 'DISCOVER':
|
||||||
if(event.target.innerText === 'MAP') {
|
type = this.$route.params.type;
|
||||||
this.$router.push({name: 'Map', params: { type: type, fileId: fileId }})
|
fileId = this.$route.params.fileId;
|
||||||
} else if(event.target.innerText === 'CONFORMANCE') {
|
if(event.target.innerText === 'MAP') {
|
||||||
this.$router.push({name: 'Conformance', params: { type: type, fileId: fileId }})
|
if(type === 'rule') this.$router.push({name: 'CheckMap'});
|
||||||
}
|
else this.$router.push({name: 'Map', params: { type: type, fileId: fileId }});
|
||||||
|
} else if(event.target.innerText === 'CONFORMANCE') {
|
||||||
|
if(type === 'rule') this.$router.push({name: 'CheckConformance'});
|
||||||
|
else this.$router.push({name: 'Conformance', params: { type: type, fileId: fileId }});
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getNavViewName() {
|
getNavViewName() {
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await this.conformanceStore.getConformanceParams();
|
await this.conformanceStore.getConformanceParams();
|
||||||
this.isLoading = false;
|
// 給 rule 檔取得 ShowBar 一些時間
|
||||||
|
setTimeout(() => this.isLoading = false, 500);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.selectedRuleType = 'Have activity';
|
this.selectedRuleType = 'Have activity';
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export default {
|
|||||||
|
|
||||||
return { isLoading, processMap, bpmn, stats, insights, traceId, traces, baseTraces, baseTraceId, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, logId, baseLogId, createFilterId, temporaryData, isRuleData, ruleData, allMapDataStore, cases }
|
return { isLoading, processMap, bpmn, stats, insights, traceId, traces, baseTraces, baseTraceId, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, logId, baseLogId, createFilterId, temporaryData, isRuleData, ruleData, allMapDataStore, cases }
|
||||||
},
|
},
|
||||||
|
props:['type', 'checkType', 'checkId', 'checkFileId'], // 來自 router 的 props
|
||||||
components: {
|
components: {
|
||||||
SidebarView,
|
SidebarView,
|
||||||
SidebarState,
|
SidebarState,
|
||||||
@@ -327,18 +328,38 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
const routeParams = this.$route.params;
|
||||||
|
|
||||||
// 先 loading 再執行以下程式
|
// 先 loading 再執行以下程式
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
// Log 檔前往 Map Log 頁, Filter 檔前往 Map Filter 頁
|
// Log 檔前往 Map Log 頁, Filter 檔前往 Map Filter 頁
|
||||||
if(this.$route.params.type === 'log'){
|
switch (routeParams.type) {
|
||||||
this.logId = this.$route.params.fileId;
|
case 'log':
|
||||||
this.baseLogId = this.$route.params.fileId;
|
this.logId = routeParams.fileId;
|
||||||
}else if(this.$route.params.type === 'filter') {
|
this.baseLogId = routeParams.fileId;
|
||||||
this.createFilterId = this.$route.params.fileId;
|
break;
|
||||||
// 取得 logID 和上次儲存的 Funnel
|
case 'filter':
|
||||||
await this.allMapDataStore.fetchFunnel(this.createFilterId);
|
this.createFilterId = routeParams.fileId;
|
||||||
this.isRuleData = await Array.from(this.temporaryData);
|
// 取得 logID 和上次儲存的 Funnel
|
||||||
this.ruleData = await this.isRuleData.map(e => this.$refs.sidevarFilterRef.setRule(e));
|
await this.allMapDataStore.fetchFunnel(this.createFilterId);
|
||||||
|
this.isRuleData = await Array.from(this.temporaryData);
|
||||||
|
this.ruleData = await this.isRuleData.map(e => this.$refs.sidevarFilterRef.setRule(e));
|
||||||
|
break;
|
||||||
|
case 'rule':
|
||||||
|
switch (this.checkType) {
|
||||||
|
case 'log':
|
||||||
|
this.logId = this.checkFileId;
|
||||||
|
this.baseLogId = this.checkFileId;
|
||||||
|
break;
|
||||||
|
case 'filter':
|
||||||
|
this.createFilterId = this.checkFileId;
|
||||||
|
// 取得 logID 和上次儲存的 Funnel
|
||||||
|
await this.allMapDataStore.fetchFunnel(this.createFilterId);
|
||||||
|
this.isRuleData = await Array.from(this.temporaryData);
|
||||||
|
this.ruleData = await this.isRuleData.map(e => this.$refs.sidevarFilterRef.setRule(e));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// 取得 logId 後才 call api
|
// 取得 logId 後才 call api
|
||||||
await this.allMapDataStore.getAllMapData();
|
await this.allMapDataStore.getAllMapData();
|
||||||
|
|||||||
Reference in New Issue
Block a user