refactor: Discover Router done.

This commit is contained in:
chiayin
2024-03-19 15:57:12 +08:00
parent bc3e20abd0
commit 6663b48159
10 changed files with 236 additions and 154 deletions

View File

@@ -149,23 +149,15 @@ export default {
},
async mounted() {
let params = this.$route.params;
let parent = this.$route.meta.parent;
let file = this.$route.meta.file;
let isCheckPage = this.$route.name.includes('Check');
switch (params.type) {
case 'log':
this.logId = params.fileId;
this.logId = isCheckPage ? file.parent.id : params.fileId;
break;
case 'filter':
this.createFilterId = params.fileId;
break;
case 'rule':
switch (parent.type) {
case 'log':
this.logId = parent.id;
break;
case 'filter':
this.createFilterId = parent.id;
}
this.createFilterId = isCheckPage ? file.parent.id : params.fileId;
break;
}
await this.allMapDataStore.getAllMapData();