Files: Filter files can enter Discover.
This commit is contained in:
@@ -72,7 +72,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import filesStore from '@/stores/files.js';
|
||||
import AllMapDataStore from '@/stores/allMapData.js';
|
||||
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
|
||||
import IconRule from '@/components/icons/IconRule.vue';
|
||||
import IconsFilter from '@/components/icons/IconsFilter.vue';
|
||||
@@ -85,15 +87,14 @@
|
||||
data() {
|
||||
return {
|
||||
switchListOrGrid: false,
|
||||
filesTag: 'all',
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
const store = filesStore();
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const { createFilterId } = storeToRefs(allMapDataStore);
|
||||
|
||||
return {
|
||||
store,
|
||||
}
|
||||
return { store, allMapDataStore, createFilterId }
|
||||
},
|
||||
components: {
|
||||
IconDataFormat,
|
||||
@@ -131,7 +132,13 @@
|
||||
* @param {object} file
|
||||
*/
|
||||
enterDiscover(file){
|
||||
this.$router.push({ name: 'Discover', params: { logId: file.id }});
|
||||
let logId;
|
||||
if(file.fileType === 'Log') logId = file.id;
|
||||
else if(file.fileType === 'Filter') {
|
||||
this.createFilterId = file.id;
|
||||
logId = file.log.id;
|
||||
}
|
||||
this.$router.push({ name: 'Discover', params: { logId: logId }});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user