|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="layout-container">
|
|
<div class="layout-container">
|
|
|
<!-- 菜单栏 -->
|
|
<!-- 菜单栏 -->
|
|
|
- <From :form-items="dynamicFormItems" @formSubmitted="handleFormSubmitted" @formReset="handleFormReset" />
|
|
|
|
|
|
|
+ <From :form-items="dynamicFormItems" @formSubmitted="handleFormSubmitted" @formReset="handleFormReset"
|
|
|
|
|
+ @formChangeSelect="handleFormChange" />
|
|
|
|
|
|
|
|
<div class="btn">
|
|
<div class="btn">
|
|
|
<el-button type="" v-if="formSearch.appIds && selectData.length > 0" @click="clearSelection">取消全选</el-button>
|
|
<el-button type="" v-if="formSearch.appIds && selectData.length > 0" @click="clearSelection">取消全选</el-button>
|
|
@@ -124,12 +125,12 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</Layer>
|
|
</Layer>
|
|
|
|
|
|
|
|
- <el-dialog v-model="ecpmLayer.show" :title="`查看用户《${ecpmData.nickName}》的ECPM`" :width="ecpmLayer.width" align-center center
|
|
|
|
|
- :fullscreen="isFullscreen">
|
|
|
|
|
|
|
+ <el-dialog v-model="ecpmLayer.show" :title="`查看用户《${ecpmData.nickName}》的ECPM`" :width="ecpmLayer.width" align-center
|
|
|
|
|
+ center :fullscreen="isFullscreen">
|
|
|
<el-icon class=" full-icon" @click="isFullscreen = !isFullscreen">
|
|
<el-icon class=" full-icon" @click="isFullscreen = !isFullscreen">
|
|
|
<FullScreen />
|
|
<FullScreen />
|
|
|
</el-icon>
|
|
</el-icon>
|
|
|
- <EcpmDialog v-if="ecpmLayer.show" v-model:isFullscreen="isFullscreen" :ecpmData="ecpmData" />
|
|
|
|
|
|
|
+ <EcpmDialog v-if="ecpmLayer.show" v-model:isFullscreen="isFullscreen" :ecpmData="ecpmData" />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 审核备注 -->
|
|
<!-- 审核备注 -->
|
|
@@ -151,7 +152,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onBeforeMount, ref, reactive, nextTick } from "vue";
|
|
|
|
|
|
|
+import { onBeforeMount, ref, reactive, nextTick, watch } from "vue";
|
|
|
import From from "@/components/from/index.vue";
|
|
import From from "@/components/from/index.vue";
|
|
|
import Table from "@/components/table/index.vue";
|
|
import Table from "@/components/table/index.vue";
|
|
|
import Layer from '@/components/layer/index.vue'
|
|
import Layer from '@/components/layer/index.vue'
|
|
@@ -159,7 +160,7 @@ import { FullScreen } from '@element-plus/icons'
|
|
|
import { ElMessage, ElLoading } from 'element-plus'
|
|
import { ElMessage, ElLoading } from 'element-plus'
|
|
|
import {
|
|
import {
|
|
|
getUserList, riskBannedUser, riskLockUser, appUserEcpm, getRevenueByTime,
|
|
getUserList, riskBannedUser, riskLockUser, appUserEcpm, getRevenueByTime,
|
|
|
- batchAudit, batchBanned, batchDeblock
|
|
|
|
|
|
|
+ batchAudit, batchBanned, batchDeblock, appUserGetDitchList, getUserForIosList
|
|
|
} from '@/api/userModule.js'
|
|
} from '@/api/userModule.js'
|
|
|
import { ditchList } from '@/api/outBagModule.js'
|
|
import { ditchList } from '@/api/outBagModule.js'
|
|
|
import { appList } from "@/api/formworkErection.js";
|
|
import { appList } from "@/api/formworkErection.js";
|
|
@@ -191,6 +192,7 @@ const formSearch = ref({
|
|
|
appIds: undefined, //所属应用
|
|
appIds: undefined, //所属应用
|
|
|
registryTimeBegin: getTodayRangeLocal(),// 注册时间
|
|
registryTimeBegin: getTodayRangeLocal(),// 注册时间
|
|
|
registryTimeEnd: undefined,// 注册时间
|
|
registryTimeEnd: undefined,// 注册时间
|
|
|
|
|
+ appType: undefined,
|
|
|
page: 1,// 当前页码
|
|
page: 1,// 当前页码
|
|
|
limit: 20,// 当前页数量(查询量)
|
|
limit: 20,// 当前页数量(查询量)
|
|
|
});
|
|
});
|
|
@@ -218,6 +220,21 @@ const settingData = async () => {
|
|
|
type: 'input',
|
|
type: 'input',
|
|
|
needEnterEvent: true
|
|
needEnterEvent: true
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "应用类型",
|
|
|
|
|
+ prop: "appType",
|
|
|
|
|
+ type: "select",
|
|
|
|
|
+ options: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "Android",
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "IOS",
|
|
|
|
|
+ value: 2,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
label: '所属应用',
|
|
label: '所属应用',
|
|
|
prop: 'appIds',
|
|
prop: 'appIds',
|
|
@@ -247,36 +264,82 @@ const settingData = async () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+async function handleFormChange(item, e) {
|
|
|
|
|
+ console.log("实时表单数据:", item.prop, e)
|
|
|
|
|
+ if (item.prop === 'appType') {
|
|
|
|
|
+ // IOS
|
|
|
|
|
+ if (e === 2) {
|
|
|
|
|
+ dynamicFormItems.value[4] = {
|
|
|
|
|
+ label: '渠道来源',
|
|
|
|
|
+ prop: 'ditchId',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ clearable: false,
|
|
|
|
|
+ defaultVal: ditchOptionsIos.value[0].value,
|
|
|
|
|
+ options: ditchOptionsIos.value,
|
|
|
|
|
+ }
|
|
|
|
|
+ dynamicFormItems.value[3] = {}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ dynamicFormItems.value[4] = {
|
|
|
|
|
+ label: '渠道来源',
|
|
|
|
|
+ prop: 'ditchId',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ // clearable: false,
|
|
|
|
|
+ defaultVal: ditchOptions.value[0].value,
|
|
|
|
|
+ options: ditchOptions.value,
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ dynamicFormItems.value[3] = {
|
|
|
|
|
+ label: '所属应用',
|
|
|
|
|
+ prop: 'appIds',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ clearable: false,
|
|
|
|
|
+ defaultVal: null,
|
|
|
|
|
+ options: appsOptions.value,
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const firstApp = ref('')
|
|
const firstApp = ref('')
|
|
|
-//渠道来源
|
|
|
|
|
|
|
+const ditchOptions = ref([])
|
|
|
|
|
+const ditchOptionsIos = ref([])
|
|
|
|
|
+const appsOptions = ref([])
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 设置表单数据
|
|
|
const getApiOptions = async () => {
|
|
const getApiOptions = async () => {
|
|
|
try {
|
|
try {
|
|
|
// 并发获取数据
|
|
// 并发获取数据
|
|
|
- const [{ data: ditchData }, { data: appData }] = await Promise.all([
|
|
|
|
|
|
|
+ const [{ data: ditchData }, { data: appData }, { data: iosDitch }] = await Promise.all([
|
|
|
ditchList({ page: 1, limit: 9999 }),
|
|
ditchList({ page: 1, limit: 9999 }),
|
|
|
- appList({ page: 1, limit: 9999 })
|
|
|
|
|
|
|
+ appList({ page: 1, limit: 9999 }),
|
|
|
|
|
+ appUserGetDitchList({ page: 1, limit: 9999 })
|
|
|
])
|
|
])
|
|
|
-
|
|
|
|
|
- const ditchOptions = ditchData.map(item => ({
|
|
|
|
|
|
|
+ ditchOptions.value = ditchData.map(item => ({
|
|
|
label: item.ditchName,
|
|
label: item.ditchName,
|
|
|
value: item.ditchId
|
|
value: item.ditchId
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
- const appsOptions = appData.map(item => ({
|
|
|
|
|
|
|
+ appsOptions.value = appData.map(item => ({
|
|
|
label: item.appName,
|
|
label: item.appName,
|
|
|
value: item.appId
|
|
value: item.appId
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
|
|
+ ditchOptionsIos.value = iosDitch.map(item => ({
|
|
|
|
|
+ label: item.ditchName,
|
|
|
|
|
+ value: item.ditchId
|
|
|
|
|
+ }))
|
|
|
// 赋值到表单项
|
|
// 赋值到表单项
|
|
|
- dynamicFormItems.value[3].options = ditchOptions
|
|
|
|
|
- dynamicFormItems.value[2].options = appsOptions
|
|
|
|
|
|
|
+ dynamicFormItems.value[4].options = ditchOptions.value
|
|
|
|
|
+ dynamicFormItems.value[3].options = appsOptions.value
|
|
|
|
|
|
|
|
- // 如果有应用列表,默认选第一个
|
|
|
|
|
- if (appsOptions.length > 0) {
|
|
|
|
|
|
|
+ //如果有应用列表,默认选第一个
|
|
|
|
|
+ if (appsOptions.value.length > 0) {
|
|
|
// const firstApp = appsOptions[0].value
|
|
// const firstApp = appsOptions[0].value
|
|
|
- firstApp.value = appsOptions[0].value
|
|
|
|
|
- dynamicFormItems.value[2].defaultVal = firstApp.value
|
|
|
|
|
|
|
+ firstApp.value = appsOptions.value[0].value
|
|
|
|
|
+ dynamicFormItems.value[3].defaultVal = firstApp.value
|
|
|
formSearch.value.appIds = firstApp.value
|
|
formSearch.value.appIds = firstApp.value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -306,7 +369,7 @@ const getList = async (timeout = 5000) => {
|
|
|
// getRevenueByTime({ ...param })
|
|
// getRevenueByTime({ ...param })
|
|
|
]) */
|
|
]) */
|
|
|
|
|
|
|
|
- const listRes = await getUserList({ ...formSearch.value })
|
|
|
|
|
|
|
+ const listRes = formSearch.value.appType === 2 ? await getUserForIosList({ ...formSearch.value }) : await getUserList({ ...formSearch.value })
|
|
|
// 列表当日总收益
|
|
// 列表当日总收益
|
|
|
const totalEarnings = listRes.data.reduce((acc, cur) => acc + (cur.todayIncome || 0), 0)
|
|
const totalEarnings = listRes.data.reduce((acc, cur) => acc + (cur.todayIncome || 0), 0)
|
|
|
|
|
|
|
@@ -334,14 +397,15 @@ const changeTableData = (type) => {
|
|
|
|
|
|
|
|
// 搜索
|
|
// 搜索
|
|
|
const handleFormSubmitted = (formData) => {
|
|
const handleFormSubmitted = (formData) => {
|
|
|
- // console.log("接收到子组件传递的数据", formData);
|
|
|
|
|
|
|
+ console.log("接收到子组件传递的数据", formData);
|
|
|
formSearch.value.page = page.pageNum;
|
|
formSearch.value.page = page.pageNum;
|
|
|
formSearch.value.limit = page.pageSize;
|
|
formSearch.value.limit = page.pageSize;
|
|
|
formSearch.value.nickName = formData.nickName;
|
|
formSearch.value.nickName = formData.nickName;
|
|
|
formSearch.value.userId = formData.userId;
|
|
formSearch.value.userId = formData.userId;
|
|
|
formSearch.value.ditchId = formData.ditchId;
|
|
formSearch.value.ditchId = formData.ditchId;
|
|
|
formSearch.value.userStatus = formData.userStatus;
|
|
formSearch.value.userStatus = formData.userStatus;
|
|
|
- formSearch.value.appIds = formData.appIds;
|
|
|
|
|
|
|
+ formSearch.value.appType = formData.appType;
|
|
|
|
|
+ formSearch.value.appIds = formData.appType === 2 ? undefined : formData.appIds;
|
|
|
formSearch.value.registryTimeBegin = convertUTCToBeijing(formData.registryTimeBegin, false) || undefined
|
|
formSearch.value.registryTimeBegin = convertUTCToBeijing(formData.registryTimeBegin, false) || undefined
|
|
|
formSearch.value.registryTimeEnd = convertUTCToBeijing(formData.registryTimeEnd, false) || undefined
|
|
formSearch.value.registryTimeEnd = convertUTCToBeijing(formData.registryTimeEnd, false) || undefined
|
|
|
|
|
|
|
@@ -358,6 +422,7 @@ const handleFormReset = () => {
|
|
|
appIds: undefined, //所属应用
|
|
appIds: undefined, //所属应用
|
|
|
registryTimeBegin: getTodayRangeLocal(),// 注册时间
|
|
registryTimeBegin: getTodayRangeLocal(),// 注册时间
|
|
|
registryTimeEnd: undefined,// 注册时间
|
|
registryTimeEnd: undefined,// 注册时间
|
|
|
|
|
+ appType: undefined,
|
|
|
page: 1,// 当前页码
|
|
page: 1,// 当前页码
|
|
|
limit: 20,// 当前页数量(查询量)
|
|
limit: 20,// 当前页数量(查询量)
|
|
|
};
|
|
};
|