BD中心-BD管理列表模块完成
This commit is contained in:
@@ -55,4 +55,21 @@ export const operatorGuildUnBound = query => {
|
||||
method: 'post',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
// 管理列表
|
||||
export const getBdDataList = query => {
|
||||
return request({
|
||||
url: '/admin/bdData/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
// 管理列表-详情
|
||||
export const getBdDetailGuildsList = query => {
|
||||
return request({
|
||||
url: '/admin/bdData/guilds',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
253
src/views/BD/BDmanagement.vue
Normal file
253
src/views/BD/BDmanagement.vue
Normal file
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>用户ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" @update:partitionId="getlistByPartition" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>国家</span>
|
||||
<el-select v-model="formData.regionId" placeholder="请选择">
|
||||
<el-option v-for="item in adminCountryArr" :key="item.id" :label="JSON.parse(item.name).zh"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span class="demonstration">日期</span>
|
||||
<el-date-picker v-model="dataTime" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
<span class="demonstration" style="color: red;">(时间按照东八区计算,需要增加5小时换算为东三区)</span>
|
||||
</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="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="regionName" align="center" label="国家" />
|
||||
<el-table-column prop="createTime" align="center" label="创建时间">
|
||||
<template v-slot="scope">
|
||||
{{ dateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="guildNum" align="center" label="旗下公会数量">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" size="small" @click="editFen(scope.row)">
|
||||
{{ scope.row.guildNum }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="diamondNum" align="center" label="公会钻石流水" />
|
||||
<el-table-column prop="goldNum" align="center" label="公会金币流水" />
|
||||
|
||||
<el-table-column prop="owner" 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" />
|
||||
<!-- 详情表格 -->
|
||||
<el-dialog v-model="detailsDialog" title="公会钻石流水详情" width="70%" center>
|
||||
<!-- 内表格 -->
|
||||
<el-table v-loading="tableDetailData.loading" :data="tableDetailData.data" border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<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="nick" align="center" label="公会长昵称" />
|
||||
<el-table-column prop="regionName" align="center" label="所属国家" />
|
||||
<el-table-column prop="createTime" align="center" label="公会成立时间">
|
||||
<template v-slot="scope">
|
||||
{{ dateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="memberNum" align="center" label="公会成员数(不包括公会长)" />
|
||||
<el-table-column prop="diamondNum" align="center" label="公会钻石流水" />
|
||||
<el-table-column prop="goldNum" align="center" label="公会金币流水" />
|
||||
<el-table-column prop="status" align="center" label="绑定状态" >
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.status == 1 ? '有效' : '无效' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px" class="paginationClass" :current-page="formDetailData.pageNo"
|
||||
:page-size="formDetailData.pageSize" :page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next" :total="tableDetailData.total" @size-change="handleSizeChangeDetail"
|
||||
@current-change="handleCurrentChangeDetail" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, onMounted, reactive, computed } from 'vue'
|
||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||
import { getBdDetailGuildsList, getBdDataList,getlistByPartitionId } from "@/api/BD/IdentitySettings.js"
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
export default {
|
||||
name: 'BDmanagement',
|
||||
components: {
|
||||
PartitionSelect
|
||||
},
|
||||
setup() {
|
||||
const formData = reactive({
|
||||
partitionId: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
erbanNo: '',
|
||||
regionId: '',
|
||||
startTime:'',
|
||||
endTime:''
|
||||
})
|
||||
const tableData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
})
|
||||
const formDetailData = reactive({
|
||||
bdId: '',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
startTime:'',
|
||||
endTime:'',
|
||||
partitionId:'',
|
||||
})
|
||||
const tableDetailData = reactive({
|
||||
data: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
})
|
||||
const detailsDialog = ref(false)
|
||||
const dataTime = ref('');
|
||||
const adminCountryArr = ref([])
|
||||
const getlistByPartition = (e) => {
|
||||
if (e) {
|
||||
formData.partitionId = e;
|
||||
}
|
||||
getlistByPartitionId({ partitionId: formData.partitionId, containAll: true }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
adminCountryArr.value = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
const getData = () => {
|
||||
tableData.loading = true;
|
||||
if (dataTime.value && dataTime.value.length > 0) {
|
||||
formData.startTime = dateFormat(dataTime.value[0], "yyyy-MM-dd hh:mm:ss");
|
||||
formData.endTime = dateFormat(dataTime.value[1], "yyyy-MM-dd hh:mm:ss");
|
||||
} else {
|
||||
formData.startTime = dataTime.value
|
||||
formData.endTime = dataTime.value
|
||||
}
|
||||
getBdDataList(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 editFen = (row) => {
|
||||
if(row){
|
||||
formDetailData.bdId = row.id;
|
||||
formDetailData.partitionId = formData.partitionId;
|
||||
formDetailData.endTime = formData.endTime;
|
||||
formDetailData.startTime = formData.startTime;
|
||||
|
||||
}
|
||||
tableDetailData.loading = true;
|
||||
getBdDetailGuildsList(formDetailData).then(res => {
|
||||
if (res.code == 200) {
|
||||
tableDetailData.data = res.data.rows
|
||||
tableDetailData.total = res.data.total
|
||||
tableDetailData.loading = false
|
||||
detailsDialog.value = true
|
||||
|
||||
} else {
|
||||
tableDetailData.loading = false
|
||||
ElMessage.error(res.message)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
const dateFormat = (row) => {
|
||||
const date = new Date(row);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
}
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.pageNo = val;
|
||||
getData();
|
||||
};
|
||||
const handleSizeChangeDetail = (val) => {
|
||||
formDetailData.pageSize = val;
|
||||
editFen();
|
||||
};
|
||||
const handleCurrentChangeDetail = (val) => {
|
||||
formDetailData.pageNo = val;
|
||||
editFen();
|
||||
};
|
||||
return{
|
||||
formData,
|
||||
adminCountryArr,
|
||||
getlistByPartition,
|
||||
dataTime,
|
||||
getData,
|
||||
tableData,
|
||||
dateFormat,
|
||||
editFen,
|
||||
formDetailData,
|
||||
detailsDialog,
|
||||
tableDetailData,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
handleSizeChangeDetail,
|
||||
handleCurrentChangeDetail
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
Reference in New Issue
Block a user