feat: Performance router done.

This commit is contained in:
chiayin
2024-01-25 15:35:23 +08:00
parent fefb3f325d
commit 8ebfb151c7
4 changed files with 42 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
<template>
<div>
<h2>ProformanceView</h2>
</div>
</template>

View File

@@ -83,7 +83,7 @@ export default {
// FILES: ['ALL', 'DISCOVER', 'COMPARE', 'DESIGN'],
FILES: ['ALL', 'DISCOVER'],
// DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA']
DISCOVER: ['MAP', 'CONFORMANCE']
DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE']
},
navViewName: 'FILES',
isActive: null,
@@ -136,13 +136,27 @@ export default {
case 'DISCOVER':
type = this.$route.params.type;
fileId = this.$route.params.fileId;
if(event.target.innerText === 'MAP') {
if(type === 'rule') this.$router.push({name: 'CheckMap'});
else this.$router.push({name: 'Map', params: { type: type, fileId: fileId }});
} else if(event.target.innerText === 'CONFORMANCE') {
if(type === 'rule') this.$router.push({name: 'CheckConformance'});
else this.$router.push({name: 'Conformance', params: { type: type, fileId: fileId }});
switch (event.target.innerText) {
case 'MAP':
if(type === 'rule') this.$router.push({name: 'CheckMap'});
else this.$router.push({name: 'Map', params: { type: type, fileId: fileId }});
break;
case 'CONFORMANCE':
if(type === 'rule') this.$router.push({name: 'CheckConformance'});
else this.$router.push({name: 'Conformance', params: { type: type, fileId: fileId }});
break
case 'PERFORMANCE':
this.$router.push({name: 'Performance'});
break;
}
// if(event.target.innerText === 'MAP') {
// if(type === 'rule') this.$router.push({name: 'CheckMap'});
// else this.$router.push({name: 'Map', params: { type: type, fileId: fileId }});
// } else if(event.target.innerText === 'CONFORMANCE') {
// if(type === 'rule') this.$router.push({name: 'CheckConformance'});
// else this.$router.push({name: 'Conformance', params: { type: type, fileId: fileId }});
// }
break;
}
},
@@ -158,11 +172,14 @@ export default {
switch (name) {
case 'Map':
case 'CheckMap':
this.isActive = 'MAP'
this.isActive = 'MAP';
break;
case 'Conformance':
case 'CheckConformance':
this.isActive = 'CONFORMANCE'
this.isActive = 'CONFORMANCE';
break;
case 'Performanc':
this.isActive = 'PERFORMANCE';
break;
}
break;