| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <template>
- <div class="ma-content-block">
- <sa-table ref="crudRef" :options="options" :columns="columns" :searchForm="searchForm">
- <!-- 搜索区 tableSearch -->
- <template #tableSearch>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="游戏" field="game_id">
- <game-select v-model="searchForm.game_id" multiple />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="5" :xs="24">
- <a-form-item label="注册日期" field="tdate">
- <a-range-picker class="w-full" v-model="searchForm.tdate" :show-time="false" mode="month" />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="渠道ID" field="agent_id">
- <a-input v-model="searchForm.agent_id" placeholder="渠道ID" allow-clear />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="渠道名称" field="agent_name">
- <a-input v-model="searchForm.agent_name" placeholder="渠道名称" allow-clear />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="广告位ID" field="site_id">
- <a-input v-model="searchForm.site_id" placeholder="广告位ID" allow-clear />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="3" :xs="24">
- <a-form-item label="广告名称" field="site_name">
- <a-input v-model="searchForm.site_name" placeholder="广告名称" allow-clear />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="负责人" field="auth_id">
- <auth-select v-model="searchForm.auth_id" multiple />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="5" :xs="24">
- <a-form-item label="媒体类型" field="media_id">
- <media-select v-model="searchForm.media_id" />
- </a-form-item>
- </a-col>
- <a-col :sm="24" :md="8" :lg="8" :xl="6" :xxl="4" :xs="24">
- <a-form-item label="展示类型" field="data_type">
- <a-select v-model="searchForm.data_type" placeholder="展示类型" :allow-clear="false">
- <a-option value="recovery">回本率</a-option>
- <a-option value="remount">实际回本率</a-option>
- <a-option value="ltv">LTV</a-option>
- <a-option value="pay_num">付费人数</a-option>
- <a-option value="pay_total">付费总额</a-option>
- <a-option value="pay_rate">付费率</a-option>
- <a-option value="arpu"> 付费ARPU </a-option>
- </a-select>
- </a-form-item>
- </a-col>
- </template>
- <!-- Table 自定义渲染 -->
- </sa-table>
- </div>
- </template>
- <script setup>
- import { onMounted, ref, reactive } from 'vue'
- import api from '../../api/gameLog/channelAnalysis'
- import dayjs from 'dayjs'
- import GameSelect from '@/components/game-select/index.vue'
- import MediaSelect from '@/components/media-select/index.vue'
- import AuthSelect from '@/components/auth-select/index.vue'
- // 引用定义
- const crudRef = ref()
- const gameList = ref([])
- // 搜索表单
- const searchForm = ref({
- game_id: '',
- media_id: '',
- auth_id: '',
- agent_id: '',
- agent_name: '',
- site_name: '',
- site_id: '',
- tdate: [],
- data_type: 'recovery',
- })
- // SaTable 基础配置
- const options = reactive({
- api: api.getLtvMDataList,
- pk: 'tmonth',
- rowSelection: { showCheckedAll: true },
- showSort: false,
- showSummary: true,
- summary: [
- {
- action: 'totalRow',
- dataIndex: 'tmonth',
- },
- {
- suffixText: '元',
- action: 'totalRow',
- dataIndex: 'cost',
- },
- {
- action: 'totalRow',
- dataIndex: 'reg_total',
- },
- {
- action: 'totalRow',
- dataIndex: 'reg_cost',
- },
- {
- action: 'totalRow',
- dataIndex: 'm0',
- },
- {
- action: 'totalRow',
- dataIndex: 'm1',
- },
- {
- action: 'totalRow',
- dataIndex: 'm2',
- },
- {
- action: 'totalRow',
- dataIndex: 'm3',
- },
- {
- action: 'totalRow',
- dataIndex: 'm4',
- },
- {
- action: 'totalRow',
- dataIndex: 'm5',
- },
- {
- action: 'totalRow',
- dataIndex: 'm6',
- },
- {
- action: 'totalRow',
- dataIndex: 'm7',
- },
- {
- action: 'totalRow',
- dataIndex: 'm8',
- },
- {
- action: 'totalRow',
- dataIndex: 'm9',
- },
- {
- action: 'totalRow',
- dataIndex: 'm10',
- },
- {
- action: 'totalRow',
- dataIndex: 'm11',
- },
- {
- action: 'totalRow',
- dataIndex: 'm12',
- },
- {
- action: 'totalRow',
- dataIndex: 'm13',
- },
- {
- action: 'totalRow',
- dataIndex: 'm14',
- },
- {
- action: 'totalRow',
- dataIndex: 'm15',
- },
- {
- action: 'totalRow',
- dataIndex: 'm16',
- },
- {
- action: 'totalRow',
- dataIndex: 'm17',
- },
- {
- action: 'totalRow',
- dataIndex: 'm18',
- },
- {
- action: 'totalRow',
- dataIndex: 'm19',
- },
- {
- action: 'totalRow',
- dataIndex: 'm20',
- },
- {
- action: 'totalRow',
- dataIndex: 'm21',
- },
- {
- action: 'totalRow',
- dataIndex: 'm22',
- },
- {
- action: 'totalRow',
- dataIndex: 'm23',
- },
- {
- action: 'totalRow',
- dataIndex: 'm24',
- },
- ],
- operationColumn: false,
- })
- // SaTable 列配置
- const columns = reactive([
- { title: '日期', dataIndex: 'tmonth', width: 130, fixed: 'left' },
- { title: '消耗金额', dataIndex: 'cost', width: 100 },
- { title: '注册数', dataIndex: 'reg_total', width: 80 },
- { title: '注册成本', dataIndex: 'reg_cost', width: 100 },
- { title: '累计', dataIndex: 'm0', width: 80 },
- { title: '1', dataIndex: 'm1', width: 80 },
- { title: '2', dataIndex: 'm2', width: 80 },
- { title: '3', dataIndex: 'm3', width: 80 },
- { title: '4', dataIndex: 'm4', width: 80 },
- { title: '5', dataIndex: 'm5', width: 80 },
- { title: '6', dataIndex: 'm6', width: 80 },
- { title: '7', dataIndex: 'm7', width: 80 },
- { title: '8', dataIndex: 'm8', width: 80 },
- { title: '9', dataIndex: 'm9', width: 80 },
- { title: '10', dataIndex: 'm10', width: 80 },
- { title: '11', dataIndex: 'm11', width: 80 },
- { title: '12', dataIndex: 'm12', width: 80 },
- { title: '13', dataIndex: 'm13', width: 80 },
- { title: '14', dataIndex: 'm14', width: 80 },
- { title: '15', dataIndex: 'm15', width: 80 },
- { title: '16', dataIndex: 'm16', width: 80 },
- { title: '17', dataIndex: 'm17', width: 80 },
- { title: '18', dataIndex: 'm18', width: 80 },
- { title: '19', dataIndex: 'm19', width: 80 },
- { title: '20', dataIndex: 'm20', width: 80 },
- { title: '21', dataIndex: 'm21', width: 80 },
- { title: '22', dataIndex: 'm22', width: 80 },
- { title: '23', dataIndex: 'm23', width: 80 },
- { title: '24', dataIndex: 'm24', width: 80 },
- ])
- // 页面数据初始化
- const initPage = () => {
- searchForm.value.tdate = [dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
- }
- // SaTable 数据请求
- const refresh = async () => {
- crudRef.value?.refresh()
- }
- // 页面加载完成执行
- onMounted(async () => {
- initPage()
- refresh()
- })
- </script>
- <script>
- export default { name: 'v1/channelAnalysis/ltvm' }
- </script>
|