Files
ss-crm-manage-web/src/views/Home/ChannelReport.vue

36 lines
910 B
Vue
Raw Normal View History

2024-10-08 18:08:22 +08:00
<template>
<div>
2024-10-09 16:38:49 +08:00
<el-tabs v-model="tabName" type="border-card" tab-position="top">
<el-tab-pane label="月度统计" name="monthly">
<ChannelMonthly :sourceOptions="sourceOptions" />
</el-tab-pane>
<el-tab-pane label="周期统计" name="period">
<ChannelPeriod :sourceOptions="sourceOptions" />
</el-tab-pane>
</el-tabs>
2024-10-08 18:08:22 +08:00
</div>
</template>
<script setup name="ChannelReport">
2024-10-09 16:38:49 +08:00
import ChannelMonthly from './Comp/ChannelMonthly.vue'
import ChannelPeriod from './Comp/ChannelPeriod.vue'
2024-10-08 18:08:22 +08:00
import { getSimpleSourceList } from '@/api/clue/source'
import { handleTree } from '@/utils/tree'
2024-10-09 16:38:49 +08:00
const tabName = ref('monthly')
2024-10-08 18:08:22 +08:00
onMounted(() => {
getOptions()
})
const sourceOptions = ref([])
function getOptions() {
getSimpleSourceList().then((data) => {
sourceOptions.value = handleTree(data, 'sourceId')
})
}
</script>
<style lang="scss" scoped></style>