Discover: Filters Save done.
This commit is contained in:
@@ -68,9 +68,9 @@ export default {
|
||||
const loadingStore = LoadingStore();
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const { isLoading } = storeToRefs(loadingStore);
|
||||
const { processMap, bpmn, stats, insights, traces, traceTaskSeq, cases, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, temporaryData, isRuleData, ruleData, createFilterId } = storeToRefs(allMapDataStore);
|
||||
const { processMap, bpmn, stats, insights, traces, traceTaskSeq, cases, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, temporaryData, isRuleData, ruleData, logId, createFilterId } = storeToRefs(allMapDataStore);
|
||||
|
||||
return { isLoading, processMap, bpmn, stats, insights, traces, traceTaskSeq, cases, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, createFilterId, temporaryData, isRuleData, ruleData, allMapDataStore}
|
||||
return { isLoading, processMap, bpmn, stats, insights, traces, traceTaskSeq, cases, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe, filterTrace, logId, createFilterId, temporaryData, isRuleData, ruleData, allMapDataStore}
|
||||
},
|
||||
components: {
|
||||
SidebarView,
|
||||
@@ -294,15 +294,22 @@ export default {
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.allMapDataStore.logId = this.$route.params.logId;
|
||||
// Log 檔前往 DiscoverLog 頁, Filter 檔前往 DiscoverFilter 頁
|
||||
if(this.$route.name === 'DiscoverLog'){
|
||||
this.logId = this.$route.params.logId;
|
||||
}else if(this.$route.name === 'DiscoverFilter') {
|
||||
this.createFilterId = this.$route.params.filterId;
|
||||
// 取得 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));
|
||||
}
|
||||
// 取得 logId 後才 call api
|
||||
await this.allMapDataStore.getAllMapData();
|
||||
await this.allMapDataStore.getAllTrace();
|
||||
await this.allMapDataStore.getTraceDetail();
|
||||
this.createCy(this.mapType);
|
||||
await this.allMapDataStore.getFilterParams();
|
||||
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));
|
||||
|
||||
this.isLoading = true;
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
|
||||
Reference in New Issue
Block a user