Discover: Remove unnecessary code.

This commit is contained in:
chiayin
2023-05-16 15:47:55 +08:00
parent 85514681b7
commit 895d1bb9b7
3 changed files with 1 additions and 5 deletions

View File

@@ -44,7 +44,6 @@ import LoadingStore from '@/stores/loading.js';
import AllMapDataStore from '@/stores/allMapData.js'; import AllMapDataStore from '@/stores/allMapData.js';
export default { export default {
props:['setRule'],
setup() { setup() {
const loadingStore = LoadingStore(); const loadingStore = LoadingStore();
const allMapDataStore = AllMapDataStore(); const allMapDataStore = AllMapDataStore();

View File

@@ -92,8 +92,6 @@ export default {
return this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0); return this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
}, },
traceList: function() { traceList: function() {
let sum = this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
return this.traces.map(trace => { return this.traces.map(trace => {
return { return {
id: trace.id, id: trace.id,
@@ -105,7 +103,6 @@ export default {
.slice(this.selectArea[0], this.selectArea[1]); .slice(this.selectArea[0], this.selectArea[1]);
}, },
caseTotalPercent: function() { caseTotalPercent: function() {
let countSum = this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
let ratioSum = this.traceList.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0) / this.traceCountTotal; let ratioSum = this.traceList.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0) / this.traceCountTotal;
return this.getPercentLabel(ratioSum) return this.getPercentLabel(ratioSum)
}, },

View File

@@ -96,7 +96,7 @@
</div> </div>
</div> </div>
<!-- header: funnel --> <!-- header: funnel -->
<Funnel v-if="tab === 'funnel'" @submit-all="sumbitAll" :setRule="setRule" ref="filterTrace"></Funnel> <Funnel v-if="tab === 'funnel'" @submit-all="sumbitAll"></Funnel>
</Sidebar> </Sidebar>
</template> </template>