Router: change /Discover to /Discover/map/type/filterId

This commit is contained in:
chiayin
2023-06-16 17:13:59 +08:00
parent 07b35fcce0
commit af1f8f3016
20 changed files with 121 additions and 57 deletions

View File

@@ -132,18 +132,20 @@
* @param {object} file
*/
enterDiscover(file){
let logId;
let filterId;
let type;
let fileId;
if(file.fileType === 'Log'){
this.createFilterId = null;
logId = file.id;
this.$router.push({name: 'DiscoverLog', params: { logId: logId }})
fileId = file.id;
type = 'log';
this.$router.push({name: 'Map', params: { type: type, fileId: fileId }})
}
else if(file.fileType === 'Filter') {
this.createFilterId = file.id;
filterId = file.id;
this.$router.push({name: 'DiscoverFilter', params: { filterId: filterId }})
fileId = file.id;
type = 'filter';
this.$router.push({name: 'Map', params: { type: type, fileId: fileId }})
}
}
},