活动模块-房间活动申请 ,房间活动数据统计

This commit is contained in:
chenruiye
2025-05-15 17:01:01 +08:00
parent deafdd3455
commit 3ae6a82291
4 changed files with 348 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
// 房间活动申请列表
export const getListEvent = query => {
return request({
url: '/userevent/listEvent',
method: 'get',
params: query
});
};
// 房间活动申请列表-审核
export const operatorListEvent = query => {
return request({
url: '/userevent/operator',
method: 'post',
params: query
});
};
// 房间活动数据统计 -列表
export const getUserEventDataList = query => {
return request({
url: '/userEventData/list',
method: 'get',
params: query
});
};

View File

@@ -0,0 +1,182 @@
<template>
<div class="box">
<div class="inquire">
<span>分区</span>
<partition-select v-model:partition-id="formData.partitionId" />
</div>
<div class="inquire">
<span>房间ID:</span>
<el-input v-model="formData.roomErbanNo" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">开始时间</span>
<el-date-picker v-model="formData.startTime" type="datetime" placeholder="开始时间">
</el-date-picker>
</div>
</div>
<div class="inquire">
<span class="demonstration">状态</span>
<el-select v-model="formData.eventStatus" placeholder="请选择">
<el-option label="全部" :value="-1"></el-option>
<el-option label="待审核" :value="0"></el-option>
<el-option label="审核通过" :value="1"></el-option>
<el-option label="拒绝" :value="2"></el-option>
<el-option label="删除" :value="3"></el-option>
<el-option label="过期" :value="4"></el-option>
</el-select>
</div>
<el-button style="" type="primary" @click="getData()">查询</el-button>
<!-- 表格数据 -->
<el-table v-loading="tableData.loading" :data="tableData.data" ref="multipleTable"
@selection-change="handleSelectionChange" border style="width: 100%; margin-top: 25px">
<el-table-column prop="id" align="center" label="id" />
<el-table-column prop="roomErbanNo" align="center" label="房间ID" />
<el-table-column prop="erbanNo" align="center" label="举办人ID" />
<el-table-column prop="nick" align="center" label="举办人昵称" />
<el-table-column prop="partitionDesc" align="center" label="分区" />
<el-table-column prop="eventTopic" align="center" label="活动标题" />
<el-table-column prop="eventDetail" align="center" label="活动内容" />
<el-table-column prop="eventBanner" align="center" label="活动banner" >
<template v-slot="scope">
<el-image style="width: 100px; height: 100px" :src="scope.row.eventBanner" :zoom-rate="1.1"
:preview-src-list="[scope.row.eventBanner]" fit="scale-down" preview-teleported="true"
hide-on-click-modal="true" />
</template>
</el-table-column>
<el-table-column prop="eventStartTimeStr" align="center" label="开始时间" />
<el-table-column prop="eventDuration" align="center" label="活动时长(分钟)" />
<el-table-column prop="createTimeStr" align="center" label="提交时间" />
<el-table-column align="center" label="操作" width="200">
<template v-slot="scope">
<template v-if="scope.row.eventStatus === 0">
<el-button class="primary" type="primary" @click="
operatorEvent(scope.row, 1);
" size="default">同意</el-button>
<el-button class="primary" type="danger" @click="
operatorEvent(scope.row, 2);
" size="default">拒绝</el-button>
</template>
<template v-else>
{{ scope.row.eventStatus === 1 ? '审核通过' : scope.row.eventStatus === 2 ? '已拒绝' :
scope.row.eventStatus === 3 ? '已删除' : '已过期' }}
</template>
</template>
</el-table-column>
<el-table-column prop="operator" align="center" label="操作人" />
</el-table>
<!-- 分页 -->
<el-pagination style="margin-top: 10px" class="paginationClass" :current-page="formData.pageNo"
:page-size="formData.pageSize" :page-sizes="[10, 20, 50, 100, 200]" layout="sizes, prev, pager, next"
:total="tableData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
</div>
</template>
<script>
import { ref, onMounted, reactive } from 'vue'
import PartitionSelect from "../common/partitionSelect.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { dateFormat } from "@/utils/system-helper";
import { getListEvent, operatorListEvent } from "@/api/boom/roomActivityApplication";
export default {
name: "roomActivityApplication",
components: { PartitionSelect },
setup() {
const formData = reactive({
partitionId: undefined,
roomErbanNo: '',
startTime: '',
eventStatus: -1,
pageNo: 1,
pageSize: 10,
});
const tableData = reactive({
data: [],
total: 0,
loading: false,
})
const getData = () => {
if (formData.startTime) {
formData.startTime = dateFormat(formData.startTime, "yyyy-MM-dd hh:mm:ss")
}
tableData.loading = true;
getListEvent(formData).then(res => {
if (res.code == 200) {
tableData.data = res.data.rows
tableData.loading = false;
tableData.total = res.data.total
} else {
tableData.loading = false;
ElMessage.error(res.message);
}
})
};
const operatorEvent = (row, eventStatus) => {
const eventId = row.id;
ElMessageBox.confirm('确认此操作吗', "提示", {
type: "warning",
confirmButtonText: "确定",
cancelButtonText: "取消",
}).then(() => {
operatorListEvent({ eventId, eventStatus }).then(res => {
if (res.code === 200) {
ElMessage.success('操作成功');
getData();
} else {
ElMessage.error(res.message);
}
})
})
}
const handleSizeChange = (val) => {
formData.pageSize = val;
getData();
};
const handleCurrentChange = (val) => {
formData.pageNo = val;
getData();
};
return {
formData,
getData,
tableData,
handleSizeChange,
handleCurrentChange,
operatorEvent
}
}
}
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
</style>

View File

@@ -0,0 +1,121 @@
<template>
<div class="box">
<div class="inquire">
<span>分区</span>
<partition-select v-model:partition-id="formData.partitionId" />
</div>
<div class="inquire">
<span>房间ID:</span>
<el-input v-model="formData.roomErbanNo" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">开始时间</span>
<el-date-picker v-model="formData.startTime" type="datetime" placeholder="开始时间">
</el-date-picker>
</div>
</div>
<el-button style="" type="primary" @click="getData()">查询</el-button>
<!-- 表格数据 -->
<el-table v-loading="tableData.loading" :data="tableData.data" ref="multipleTable"
@selection-change="handleSelectionChange" border style="width: 100%; margin-top: 25px">
<el-table-column prop="id" align="center" label="id" />
<el-table-column prop="roomErbanNo" align="center" label="房间ID" />
<el-table-column prop="erbanNo" align="center" label="举办人ID" />
<el-table-column prop="nick" align="center" label="举办人昵称" />
<el-table-column prop="partitionDesc" align="center" label="分区" />
<el-table-column prop="eventStartTimeStr" align="center" label="开始时间" />
<el-table-column prop="eventDuration" align="center" label="活动时长(分钟)" />
<el-table-column prop="diamondNum" align="center" label="房间钻石流水" />
<el-table-column prop="goldNum" align="center" label="房间金币流水" />
</el-table>
<!-- 分页 -->
<el-pagination style="margin-top: 10px" class="paginationClass" :current-page="formData.pageNo"
:page-size="formData.pageSize" :page-sizes="[10, 20, 50, 100, 200]" layout="sizes, prev, pager, next"
:total="tableData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
</div>
</template>
<script>
import { ref, onMounted, reactive } from 'vue'
import PartitionSelect from "../common/partitionSelect.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { getUserEventDataList } from "@/api/boom/roomActivityApplication";
export default {
name: "roomActivityDataStatistics",
components: { PartitionSelect },
setup() {
const formData = reactive({
partitionId: undefined,
roomErbanNo: '',
startTime: '',
pageNo:1,
pageSize:10,
});
const tableData = reactive({
data: [],
total: 0,
loading: false,
})
const getData = () => {
tableData.loading = true;
getUserEventDataList(formData).then(res => {
if (res.code == 200) {
tableData.data = res.data.rows
tableData.loading = false;
tableData.total = res.data.total
} else {
tableData.loading = false;
ElMessage.error(res.message);
}
})
};
const handleSizeChange = (val) => {
formData.pageSize = val;
getData();
};
const handleCurrentChange = (val) => {
formData.pageNo = val;
getData();
};
return {
formData,
getData,
tableData,
handleSizeChange,
handleCurrentChange
}
}
}
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
</style>

View File

@@ -331,6 +331,15 @@
></select>
</div>
</div>
<div class="form-group">
<label for="activityShow" class="col-sm-3 control-label"
>是否展示在活动入口:</label
>
<select name="activityShow" id="activityShow" class="col-sm-2">
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div id="bannerTypeDiv">
<div class="form-group">
<label for="platform" class="col-sm-3 control-label"
@@ -610,6 +619,15 @@
></select>
</div>
</div>
<div class="form-group">
<label for="activityShow" class="col-sm-3 control-label"
>是否展示在活动入口:</label
>
<select name="activityShow" id="addactivityShow" class="col-sm-2">
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div id="addBannerTypeDiv">
<div class="form-group">
<label for="platform" class="col-sm-3 control-label"
@@ -1169,6 +1187,7 @@ export default {
$("#limitLevelExper").val(json.data.limitLevelExper);
$("#showType").val(json.data.showType);
$("#showRule").val(json.data.showRule);
$("#activityShow").val(json.data.activityShow);
window.selectOnChange(
json.data.bannerType,
json.data.titleId