Router: change /Discover to /Discover/map/type/filterId
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<StatusBar></StatusBar>
|
||||
<h1>Conformance</h1>
|
||||
</template>
|
||||
<script>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import StatusBar from '@/components/Discover/Conformance/StatusBar.vue';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const loadingStore = LoadingStore();
|
||||
const { isLoading } = storeToRefs(loadingStore);
|
||||
|
||||
return { isLoading }
|
||||
},
|
||||
components: {
|
||||
StatusBar,
|
||||
},
|
||||
async created() {
|
||||
let logId;
|
||||
if(this.$route.params.type === 'log') logId = this.$route.params.fileId;
|
||||
console.log(logId);
|
||||
|
||||
// this.isLoading = true;
|
||||
this.isLoading = false;
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -58,10 +58,10 @@ import { storeToRefs } from 'pinia';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
import cytoscapeMap from '@/module/cytoscapeMap.js';
|
||||
import SidebarView from '@/components/Discover/SidebarView.vue';
|
||||
import SidebarState from '@/components/Discover/SidebarState.vue';
|
||||
import SidebarTraces from '@/components/Discover/SidebarTraces.vue';
|
||||
import SidebarFilter from '@/components/Discover/SidebarFilter.vue';
|
||||
import SidebarView from '@/components/Discover/Map/SidebarView.vue';
|
||||
import SidebarState from '@/components/Discover/Map/SidebarState.vue';
|
||||
import SidebarTraces from '@/components/Discover/Map/SidebarTraces.vue';
|
||||
import SidebarFilter from '@/components/Discover/Map/SidebarFilter.vue';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
@@ -293,11 +293,13 @@ export default {
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
// 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;
|
||||
// 先 loading 再執行以下程式
|
||||
this.isLoading = true;
|
||||
// Log 檔前往 Map Log 頁, Filter 檔前往 Map Filter 頁
|
||||
if(this.$route.params.type === 'log'){
|
||||
this.logId = 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);
|
||||
@@ -310,8 +312,7 @@ export default {
|
||||
this.createCy(this.mapType);
|
||||
await this.allMapDataStore.getFilterParams();
|
||||
|
||||
this.isLoading = true;
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
// 執行完後才取消 loading
|
||||
this.isLoading = false;
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user