map/ui/dasadmin/src/views/backend/statAnalysis/index.vue

36 lines
1.3 KiB
Vue
Raw Normal View History

2024-10-29 14:28:30 +08:00
<template>
<div class="statAnalysis">
<el-menu :default-active="activeIndex" class="headerList" mode="horizontal" @select="handleSelect">
<el-menu-item v-for="(item, index) in headerList" :index="index" :key="index"> {{ item }} </el-menu-item>
</el-menu>
2024-10-30 12:13:23 +08:00
<TrendAnalysis v-if="activeIndex == 1"></TrendAnalysis>
<TrendComparison v-if="activeIndex == 2"></TrendComparison>
2024-10-29 14:28:30 +08:00
</div>
</template>
<script setup lang="ts">
2024-10-30 12:13:23 +08:00
import { ref } from 'vue'
2024-10-29 14:28:30 +08:00
import { useI18n } from 'vue-i18n'
import { useConfig } from '/@/stores/config'
2024-10-30 12:13:23 +08:00
import TrendAnalysis from './trendAnalysis.vue'
import TrendComparison from './trendComparison.vue'
2024-10-29 14:28:30 +08:00
const config = useConfig()
2024-10-30 12:13:23 +08:00
const activeIndex = ref(1)
2024-10-29 14:28:30 +08:00
const { t } = useI18n()
const headerList = [t('statAnalysis.PowerCurveAnalysis'), t('statAnalysis.trendAnalysis'), t('statAnalysis.trendComparison')]
2024-10-30 12:13:23 +08:00
const handleSelect = (index) => {
activeIndex.value = index
2024-10-29 16:50:24 +08:00
}
2024-10-29 14:28:30 +08:00
</script>
<style scoped lang="scss">
.statAnalysis {
height: 100%;
.headerList {
border: none;
--el-menu-bg-color: v-bind('config.getColorVal("menuBackground")');
--el-menu-text-color: v-bind('config.getColorVal("menuColor")');
--el-menu-active-color: v-bind('config.getColorVal("menuActiveColor")');
}
}
</style>