270 lines
7.2 KiB
Vue
270 lines
7.2 KiB
Vue
<template>
|
|
<div class="box">
|
|
<!-- 查询 -->
|
|
<div class="inquire">
|
|
<div class="block">
|
|
<span class="demonstration">分区</span>
|
|
<partition-select v-model:partition-id="inquire.partitionId"
|
|
v-model:partition-infos="inquire.partitionArr"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<!-- 查询 -->
|
|
<div class="inquire">
|
|
<div class="block">
|
|
<span class="demonstration">地区</span>
|
|
<partition-region-select v-model:partition-id="inquire.partitionId"
|
|
v-model:region-id="inquire.regionId"
|
|
v-model:region-infos="inquire.regionArr"
|
|
v-model:after-init="getData"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="inquire">
|
|
<span>公会ID</span>
|
|
<el-input
|
|
v-model="inquire.guildId"
|
|
placeholder=""
|
|
class="input"
|
|
></el-input>
|
|
</div>
|
|
<div class="inquire">
|
|
<span>公会长ID</span>
|
|
<el-input
|
|
v-model="inquire.guildBoosId"
|
|
placeholder=""
|
|
class="input"
|
|
></el-input>
|
|
</div>
|
|
<!-- 时间选择器 -->
|
|
<!-- <div class="inquire">
|
|
<div class="block">
|
|
<span class="demonstration">日期</span>
|
|
<el-date-picker
|
|
v-model="inquire.time"
|
|
type="datetimerange"
|
|
range-separator="至"
|
|
start-placeholder="开始日期"
|
|
end-placeholder="结束日期"
|
|
>
|
|
</el-date-picker>
|
|
</div>
|
|
</div> -->
|
|
<div class="inquire">
|
|
<div class="block">
|
|
<span class="demonstration">开始时间</span>
|
|
<el-date-picker
|
|
v-model="inquire.time[0]"
|
|
type="date"
|
|
placeholder="开始时间"
|
|
format="YYYY-MM-DD 00:00:00"
|
|
>
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
<div class="inquire">
|
|
<div class="block">
|
|
<span class="demonstration">结束时间</span>
|
|
<el-date-picker
|
|
v-model="inquire.time[1]"
|
|
type="date"
|
|
placeholder="结束时间"
|
|
format="YYYY-MM-DD 23:59:59"
|
|
>
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<!-- 查询按钮 -->
|
|
<el-button class="primary but" type="primary" @click="getData()"
|
|
>查询</el-button
|
|
>
|
|
<el-button
|
|
class="primary"
|
|
type="primary"
|
|
@click="
|
|
inquire.guildId = '';
|
|
inquire.guildBoosId = '';
|
|
inquire.time = [];
|
|
getData();
|
|
"
|
|
>重置查询</el-button
|
|
>
|
|
<el-button
|
|
class="primary"
|
|
type="primary"
|
|
@click="diamondStatisticsExportFun()"
|
|
>导出</el-button
|
|
>
|
|
</div>
|
|
|
|
<!-- 表格 -->
|
|
<el-table
|
|
v-loading="loading"
|
|
:data="tableData"
|
|
border
|
|
style="width: 100%; margin-top: 25px"
|
|
>
|
|
<el-table-column type="index" width="100" align="center" label="序号" />
|
|
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
|
<el-table-column prop="guildId" align="center" label="公会ID" />
|
|
<el-table-column prop="guildName" align="center" label="公会昵称" />
|
|
<el-table-column prop="ownerErbanNo" align="center" label="公会长ID" />
|
|
<el-table-column prop="ownerRegionDesc" align="center" label="公会长地区" />
|
|
<el-table-column prop="adminUsername" align="center" label="操作人" />
|
|
<el-table-column prop="memberNum" align="center" label="主播人数" />
|
|
<el-table-column prop="diamondNum" align="center" label="钻石流水" />
|
|
</el-table>
|
|
<!-- 分页 -->
|
|
<el-pagination
|
|
style="margin-top: 10px"
|
|
class="paginationClass"
|
|
v-model:current-page="currentPage"
|
|
v-model:page-size="pageSize"
|
|
:page-sizes="[20, 50, 100, 200, 500]"
|
|
layout="sizes, prev, pager, next"
|
|
:total="total"
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
/>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import {
|
|
diamondStatistics,
|
|
diamondStatisticsExport,
|
|
} from "@/api/relAgency/relAgency";
|
|
// @ts-ignore
|
|
import { dateFormat } from "@/utils/system-helper";
|
|
// @ts-ignore
|
|
import { ElMessage } from "element-plus";
|
|
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
|
import PartitionRegionSelect from "@/views/common/partitionRegionSelect.vue";
|
|
export default {
|
|
name: "diamondFlow",
|
|
components: {PartitionSelect, PartitionRegionSelect},
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
//查询所需条件对象
|
|
inquire: {
|
|
guildId: "",
|
|
guildBoosId: "",
|
|
time: [],
|
|
partitionId: undefined,
|
|
partitionArr: [],
|
|
regionId: undefined,
|
|
regionArr: [],
|
|
},
|
|
// 表格
|
|
tableData: [],
|
|
// 新增弹窗
|
|
addDialog: false,
|
|
// 分页
|
|
total: 0, //总页数
|
|
currentPage: 1, //页码
|
|
pageSize: 20, //条数
|
|
};
|
|
},
|
|
methods: {
|
|
// 查询接口
|
|
getData() {
|
|
this.loading = true;
|
|
let time = this.inquire.time;
|
|
let startTime = null;
|
|
let endTime = null;
|
|
if (time.length > 0) {
|
|
startTime = this.inquire.time[0]
|
|
? dateFormat(this.inquire.time[0], "yyyy-MM-dd")
|
|
: null;
|
|
endTime = this.inquire.time[1]
|
|
? dateFormat(this.inquire.time[1], "yyyy-MM-dd")
|
|
: null;
|
|
}
|
|
diamondStatistics({
|
|
guildId: this.inquire.guildId,
|
|
ownerErbanNo: this.inquire.guildBoosId,
|
|
partitionId: this.inquire.partitionId,
|
|
regionId: this.inquire.regionId,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
pageNo: this.currentPage,
|
|
pageSize: this.pageSize,
|
|
}).then((res) => {
|
|
if (res.code == 200) {
|
|
this.total = res.data.total;
|
|
this.tableData = res.data.records;
|
|
this.loading = false;
|
|
} else {
|
|
ElMessage({
|
|
showClose: true,
|
|
message: res.message,
|
|
type: "error",
|
|
});
|
|
}
|
|
});
|
|
},
|
|
// 导出
|
|
diamondStatisticsExportFun() {
|
|
let time = this.inquire.time;
|
|
let startTime = "";
|
|
let endTime = "";
|
|
if (time && time.length > 0) {
|
|
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd");
|
|
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd");
|
|
}
|
|
diamondStatisticsExport({
|
|
guildId: this.inquire.guildId,
|
|
ownerErbanNo: this.inquire.guildBoosId,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
partitionId: this.inquire.partitionId,
|
|
regionId: this.inquire.regionId,
|
|
});
|
|
},
|
|
// 分页导航
|
|
handleSizeChange() {
|
|
this.getData();
|
|
},
|
|
handleCurrentChange() {
|
|
this.getData();
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="less" scoped>
|
|
.box {
|
|
padding-top: 20px;
|
|
background: #ecf0f5;
|
|
.inquire {
|
|
display: inline-block;
|
|
margin-right: 20px;
|
|
margin-bottom: 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;
|
|
}
|
|
</style>
|