新增 - 房间钻石流水查询
This commit is contained in:
@@ -255,3 +255,20 @@ export const saveAccountConfig = query => {
|
|||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 房间钻石流水查询 - 列表
|
||||||
|
export const getRoomHourDiamondList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomHourDiamond/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 房间钻石流水查询 - 导出
|
||||||
|
export const exportRoomHourDiamondList = query => {
|
||||||
|
return request({
|
||||||
|
url: '/admin/roomHourDiamond/export',
|
||||||
|
method: 'post',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
});
|
||||||
|
};
|
232
src/views/guildOperationManagement/roomDiamondFlowInquiry.vue
Normal file
232
src/views/guildOperationManagement/roomDiamondFlowInquiry.vue
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
<template>
|
||||||
|
<div class="box">
|
||||||
|
<div class="inquire">
|
||||||
|
<span>分区</span>
|
||||||
|
<partition-select v-model:partition-id="formData.partitionId" />
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>地区</span>
|
||||||
|
<partition-region-select
|
||||||
|
v-model:partition-id="formData.partitionId"
|
||||||
|
v-model:region-id="formData.regionId"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>用户ID</span>
|
||||||
|
<el-input
|
||||||
|
v-model="formData.erbanNo"
|
||||||
|
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"
|
||||||
|
value-format="YYYY-MM-DD HH:00:00"
|
||||||
|
placeholder="开始时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<div class="block">
|
||||||
|
<span class="demonstration">结束时间</span>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.endTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD HH:00:00"
|
||||||
|
placeholder="结束时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-button class="primary" 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="erbanNo" align="center" label="用户ID/房主ID" />
|
||||||
|
<el-table-column prop="roomName" align="center" label="房间昵称" />
|
||||||
|
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||||
|
<el-table-column prop="regionName" align="center" label="国家" />
|
||||||
|
<el-table-column prop="roomDiamondNum" 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, computed } from "vue";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||||
|
import PartitionRegionSelect from "@/views/common/partitionRegionSelect.vue";
|
||||||
|
import { formatDate } from "@/utils/relDate";
|
||||||
|
import {
|
||||||
|
getRoomHourDiamondList,
|
||||||
|
exportRoomHourDiamondList,
|
||||||
|
} from "@/api/relAgency/relAgency";
|
||||||
|
export default {
|
||||||
|
name: "roomDiamondFlowInquiry",
|
||||||
|
components: { PartitionRegionSelect, PartitionSelect },
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
const formData = reactive({
|
||||||
|
partitionId: undefined,
|
||||||
|
regionId: undefined,
|
||||||
|
erbanNo: "",
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
});
|
||||||
|
const tableData = reactive({
|
||||||
|
data: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
});
|
||||||
|
const getData = () => {
|
||||||
|
tableData.loading = true;
|
||||||
|
getRoomHourDiamondList(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 confirmExport2Excel = async () => {
|
||||||
|
try {
|
||||||
|
const res = await exportRoomHourDiamondList(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 resetFormData = () => {
|
||||||
|
Object.assign(formData, {
|
||||||
|
partitionId: undefined,
|
||||||
|
regionId: undefined,
|
||||||
|
erbanNo: "",
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
});
|
||||||
|
tableData.data = [];
|
||||||
|
tableData.total = 0;
|
||||||
|
};
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
formData.pageSize = val;
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
formData.pageNo = val;
|
||||||
|
getData();
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
formData,
|
||||||
|
tableData,
|
||||||
|
getData,
|
||||||
|
handleSizeChange,
|
||||||
|
handleCurrentChange,
|
||||||
|
resetFormData,
|
||||||
|
confirmExport2Excel
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectBoxImg {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 178px;
|
||||||
|
height: 178px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
Reference in New Issue
Block a user