新增- 房间日流水奖励
This commit is contained in:
@@ -435,4 +435,29 @@ export const exportGuildMemberWeekLevelReward = query => {
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
}
|
||||
// 房间日流水 -列表
|
||||
export const getRoomSendRankDayRewardPage = query => {
|
||||
return request({
|
||||
url: '/admin/roomSendRank/dayReward/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 房间日流水-导出
|
||||
export const exportRoomSendRankDayReward = query => {
|
||||
return request({
|
||||
url: `/admin/roomSendRank/dayReward/export`,
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
// 房间日流水 -明细
|
||||
export const getRoomSendRankDayRewardListDetail = query => {
|
||||
return request({
|
||||
url: '/admin/roomSendRank/dayReward/listDetail',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
358
src/views/guildOperationManagement/dailyRoomFlow.vue
Normal file
358
src/views/guildOperationManagement/dailyRoomFlow.vue
Normal file
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">地区</span>
|
||||
<partition-region-select
|
||||
v-model:partition-id="formData.partitionId"
|
||||
v-model:region-id="formData.regionId"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>用户ID</span>
|
||||
<el-input
|
||||
v-model="formData.erbanNo"
|
||||
placeholder="请输入用户ID"
|
||||
class="input"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span class="demonstration">状态</span>
|
||||
<el-select v-model="formData.status" placeholder="请选择">
|
||||
<el-option label="全部" :value="-1"></el-option>
|
||||
<el-option label="未发放" :value="0"></el-option>
|
||||
<el-option label="已经发放" :value="1"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="inquire" style="margin-top: 20px">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker
|
||||
v-model="dataTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary" type="primary" @click="resetFormData()"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button class="primary" type="primary" @click="confirmExport2Excel()"
|
||||
>导出</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="statDate" align="center" label="日期" />
|
||||
<el-table-column prop="erbanNo" align="center" label="房间ID" />
|
||||
<el-table-column prop="roomTitle" align="center" label="房间昵称" />
|
||||
<el-table-column prop="partitionIdDesc" align="center" label="分区" />
|
||||
<el-table-column prop="regionName" align="center" label="国家" />
|
||||
<el-table-column prop="serialValue" align="center" label="房间流水">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
detailDialogFun(
|
||||
scope.row.partitionId,
|
||||
scope.row.roomUid,
|
||||
scope.row.statDate
|
||||
)
|
||||
"
|
||||
type="text"
|
||||
size="medium "
|
||||
>{{ scope.row.serialValue }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="levelName" align="center" label="档位" />
|
||||
<el-table-column
|
||||
prop="ownerReceiveReward"
|
||||
align="center"
|
||||
label="目标获得金币"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="userReceiveReward"
|
||||
align="center"
|
||||
label="已获得金币"
|
||||
/>
|
||||
<el-table-column prop="receiveTime" align="center" label="领取时间" />
|
||||
<el-table-column prop="isWinner" align="center" label="操作人">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
"用户ID:" + scope.row.erbanNo + "(uid:" + scope.row.roomUid + ")"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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"
|
||||
/>
|
||||
|
||||
<!--房间贡献明细弹窗 -->
|
||||
<el-dialog v-model="detailDialog" title="房间贡献明细" width="60%" center>
|
||||
<!-- 表格数据 -->
|
||||
|
||||
<div style="margin-bottom: 25px">
|
||||
<span style="display: inline-block; margin-right: 20px">用户ID:</span>
|
||||
<el-input
|
||||
style="width: 15%"
|
||||
class="input"
|
||||
v-model="detailData.erbanNo"
|
||||
></el-input>
|
||||
<el-button
|
||||
style="margin-left: 20px"
|
||||
type="primary"
|
||||
@click="searchSpecificData()"
|
||||
>查询</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="detailData.loading"
|
||||
:data="detailData.showData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="statDate" align="center" label="日期" />
|
||||
<el-table-column prop="rank" align="center" label="排行" />
|
||||
<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="regionDesc" align="center" label="国家" />
|
||||
<el-table-column prop="userSerialValue" align="center" label="贡献值" />
|
||||
<el-table-column prop="rewardRatio" align="center" label="比例">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.rewardRatio * 100 + "%" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="userReward"
|
||||
align="center"
|
||||
label="目标获得金币"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="userReceiveReward"
|
||||
align="center"
|
||||
label="已获得金币"
|
||||
/>
|
||||
<el-table-column prop="receiveTime" align="center" label="领取时间" />
|
||||
<el-table-column prop="erbanNo" align="center" label="领取人">
|
||||
<template v-slot="scope">
|
||||
{{ "用户ID:" + scope.row.erbanNo + "(uid:" + scope.row.uid + ")" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PartitionSelect from "../common/partitionSelect.vue";
|
||||
import PartitionRegionSelect from "@/views/common/partitionRegionSelect.vue";
|
||||
export default {
|
||||
name: "dailyRoomFlow",
|
||||
components: { PartitionSelect, PartitionRegionSelect },
|
||||
};
|
||||
</script>
|
||||
<script setup>
|
||||
import { ref, onMounted, reactive, computed } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { formatDate } from "@/utils/relDate";
|
||||
import {
|
||||
getRoomSendRankDayRewardPage,
|
||||
exportRoomSendRankDayReward,
|
||||
getRoomSendRankDayRewardListDetail,
|
||||
} from "@/api/relAgency/relAgency.js";
|
||||
const dataTime = ref("");
|
||||
const formData = reactive({
|
||||
partitionId: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
status: -1,
|
||||
regionId: "",
|
||||
});
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
});
|
||||
const detailDialog = ref(false);
|
||||
const detailData = reactive({
|
||||
data: [],
|
||||
showData: [],
|
||||
loading: false,
|
||||
erbanNo: "",
|
||||
});
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd");
|
||||
formData.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd");
|
||||
} else {
|
||||
formData.startTime = dataTime.value;
|
||||
formData.endTime = dataTime.value;
|
||||
}
|
||||
getRoomSendRankDayRewardPage(formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
tableData.data = res.data.rows;
|
||||
tableData.total = res.data.total;
|
||||
tableData.loading = false;
|
||||
} else {
|
||||
tableData.loading = false;
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
// 贡献明细
|
||||
const detailDialogFun = (partitionId, roomUid, statDate) => {
|
||||
detailData.loading = true;
|
||||
getRoomSendRankDayRewardListDetail({
|
||||
partitionId,
|
||||
roomUid,
|
||||
statDate,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
detailData.data = res.data;
|
||||
detailData.showData = res.data;
|
||||
detailData.loading = false;
|
||||
detailDialog.value = true;
|
||||
} else {
|
||||
detailData.loading = false;
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const searchSpecificData = () => {
|
||||
// 假设你想根据房间ID查找
|
||||
if (detailData.erbanNo) {
|
||||
const specificData = detailData.data.filter(
|
||||
(item) => item.erbanNo == detailData.erbanNo
|
||||
);
|
||||
detailData.showData = specificData;
|
||||
} else {
|
||||
detailData.showData = detailData.data;
|
||||
}
|
||||
};
|
||||
//重置
|
||||
const resetFormData = () => {
|
||||
Object.assign(formData, {
|
||||
partitionId: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
status: -1,
|
||||
regionId: "",
|
||||
});
|
||||
tableData.data = [];
|
||||
tableData.total = 0;
|
||||
dataTime.value = "";
|
||||
};
|
||||
// 导出
|
||||
const confirmExport2Excel = async () => {
|
||||
try {
|
||||
const res = await exportRoomSendRankDayReward(formData);
|
||||
if (res) {
|
||||
ElMessage({
|
||||
message: "导出成功",
|
||||
type: "success",
|
||||
});
|
||||
let time = formatDate(new Date());
|
||||
let alink = document.createElement("a");
|
||||
alink.download = `房间日流水奖励${time}.xls`;
|
||||
alink.style.display = "none";
|
||||
const blob = new Blob([res]);
|
||||
alink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(alink);
|
||||
alink.click();
|
||||
URL.revokeObjectURL(alink.href);
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.pageNo = val;
|
||||
getData();
|
||||
};
|
||||
</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;
|
||||
}
|
||||
}
|
||||
.selectBox {
|
||||
display: flex;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title_txt {
|
||||
font-weight: 600;
|
||||
margin-top: 20px;
|
||||
span {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user