feat: Conformance Save switchNavItem done.
This commit is contained in:
@@ -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 }
|
||||
},
|
||||
props:['type', 'checkType', 'checkId', 'checkFileId'], // 來自 router 的 props
|
||||
components: {
|
||||
SidebarView,
|
||||
SidebarState,
|
||||
@@ -327,18 +328,38 @@ export default {
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
const routeParams = this.$route.params;
|
||||
|
||||
// 先 loading 再執行以下程式
|
||||
this.isLoading = true;
|
||||
// Log 檔前往 Map Log 頁, Filter 檔前往 Map Filter 頁
|
||||
if(this.$route.params.type === 'log'){
|
||||
this.logId = this.$route.params.fileId;
|
||||
this.baseLogId = this.$route.params.fileId;
|
||||
}else if(this.$route.params.type === 'filter') {
|
||||
this.createFilterId = this.$route.params.fileId;
|
||||
// 取得 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));
|
||||
switch (routeParams.type) {
|
||||
case 'log':
|
||||
this.logId = routeParams.fileId;
|
||||
this.baseLogId = routeParams.fileId;
|
||||
break;
|
||||
case 'filter':
|
||||
this.createFilterId = routeParams.fileId;
|
||||
// 取得 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;
|
||||
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
|
||||
await this.allMapDataStore.getAllMapData();
|
||||
|
||||
Reference in New Issue
Block a user