新增-负责人管理/运营流水分析/负责人变更记录,公会信息新增选择负责人

This commit is contained in:
2025-07-17 14:04:21 +08:00
parent becb53037e
commit 661e9f55c3
6 changed files with 910 additions and 2 deletions

View File

@@ -0,0 +1,67 @@
import request from "@/utils/request";
// 负责人列表
export const getGuildOperatorList = query => {
return request({
url: '/admin/guildOperator/page',
method: 'get',
params: query
});
};
// 获取分区下的国家
export const getlistByPartitionId = query => {
return request({
url: '/admin/regionInfo/listByPartitionId',
method: 'get',
params: query
});
};
// 获取全量后台用户列表
export const getUserListAll = query => {
return request({
url: '/admin/user/listAll',
method: 'get',
params: query
});
};
// 保存
export const saveGuildOperator = query => {
return request({
headers: { "Content-Type": 'application/json;charset=UTF-8' },
url: '/admin/guildOperator/save',
method: 'post',
data: query
});
};
// 获取 周期列表
export const familyMemberWeekLevelRewardListCycleDate = query => {
return request({
url: '/admin/familyMemberWeekLevelReward/listCycleDate',
method: 'get',
params: query
});
};
// 获取 负责人全部列表
export const getGuildOperatorListAll = query => {
return request({
url: '/admin/guildOperator/listAll',
method: 'get',
params: query
});
};
// 获取 运营流水分析列表
export const getGuildOperatorPageWeekStatList = query => {
return request({
url: '/admin/guildOperator/pageWeekStat',
method: 'get',
params: query
});
};
// 获取 公会运营负责人变更记录
export const getGuildOperatorHistoryList = query => {
return request({
url: '/admin/guildOperatorHistory/page',
method: 'get',
params: query
});
};

View File

@@ -135,4 +135,12 @@ export const exportDiamondStatistics = query => {
params: query,
responseType: 'blob'
});
};
// 获取 负责人全部列表
export const getGuildOperatorListAll = query => {
return request({
url: '/admin/guildOperator/listAll',
method: 'get',
params: query
});
};

View File

@@ -162,6 +162,10 @@
hide-on-click-modal="true" />
</template>
</el-table-column>
<el-table-column prop="guildOperatorName"
align="center"
label="负责人" />
<!-- <el-table-column align="center" label="收款账户" width="300">
<template v-slot="scope">
<el-button
@@ -411,6 +415,20 @@
class="input"
:disabled="!ediObj.enableEditInvite"></el-input>
</div>
<!-- 负责人 -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label">负责人</span>
<el-select v-model="ediObj.operatorId" placeholder="请选择">
<el-option
v-for="item in adminListArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button>
@@ -580,6 +598,7 @@ import {
addMember,
setManager,
removeMember,
getGuildOperatorListAll
} from "@/api/noblemanNew/noblemanNew";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
@@ -636,7 +655,8 @@ export default {
imageUrl1: "",
imageUrl2: "",
enableEditInvite: false,
inviteErbanNo: ''
inviteErbanNo: '',
operatorId:''
},
// 收款账户弹窗
payAccountDialog: false,
@@ -658,7 +678,20 @@ export default {
// 删除成员弹窗
memberRemoveDialog: false,
memberRemoveObj: {},
adminListArr:[],//负责人列表
};
},
mounted () {
getGuildOperatorListAll().then(res => {
if (res.code == 200) {
this.adminListArr = res.data;
} else {
ElMessage.error(res.message);
}
});
},
created () {
},
methods: {
// 查询接口
@@ -871,6 +904,7 @@ export default {
this.ediObj.imageUrl1 = obj.backgroundUrl;
this.ediObj.imageUrl2 = obj.avatar;
this.ediObj.enableEditInvite = obj.enableEditInvite;
this.ediObj.operatorId = obj.guildOperatorId;
this.ediObj.guildContactType = obj.guildContactType;
this.ediObj.guildContact = obj.guildContact;
this.ediObj.inviteErbanNo = obj.inviteErbanNo;
@@ -887,7 +921,8 @@ export default {
name: this.ediObj.guildNick,
guildContactType: this.ediObj.guildContactType,
guildContact: this.ediObj.guildContact,
inviteErbanNo: this.ediObj.inviteErbanNo
inviteErbanNo: this.ediObj.inviteErbanNo,
operatorId:this.ediObj.operatorId
}).then((res) => {
if (res.code == 200) {
ElMessage({

View File

@@ -0,0 +1,141 @@
<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.guildId" placeholder="" class="input" />
</div>
<el-button style="" type="primary" @click="getData()">查询</el-button>
<el-button style="" type="primary" @click="resetFormData()">重置</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="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="oldOperatorName" align="center" label="原负责人" />
<el-table-column prop="newOperatorName" align="center" label="当前负责人" />
<el-table-column prop="updateTime" align="center" label="操作时间" />
<el-table-column prop="adminName" 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 "../common/partitionSelect.vue";
import {getGuildOperatorHistoryList
} from "@/api/ResponsiblePersonManagement/ResponsiblePersonManagement.js";
export default {
name: "ChangeRecordResponsiblePerson",
components: { PartitionSelect },
setup() {
const formData = reactive({
partitionId: undefined,
pageNo: 1,
pageSize: 10,
guildId:''
});
const tableData = reactive({
data: [],
total: 0,
loading: false,
});
const getData = () => {
tableData.loading = true;
getGuildOperatorHistoryList(formData).then((res) => {
if (res.code == 200) {
tableData.data = res.data.records;
tableData.loading = false;
tableData.total = res.data.total;
} else {
tableData.loading = false;
ElMessage.error(res.message);
}
});
};
//重置
const resetFormData = () => {
Object.assign(formData, {
pageNo: 1,
pageSize: 10,
guildId:''
});
};
const handleSizeChange = (val) => {
formData.pageSize = val;
getData();
};
const handleCurrentChange = (val) => {
formData.pageNo = val;
getData();
};
return {
formData,
tableData,
resetFormData,
handleSizeChange,
handleCurrentChange,
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;
}
</style>

View File

@@ -0,0 +1,335 @@
<template>
<div class="box">
<div class="inquire">
<span>分区</span>
<partition-select v-model:partition-id="formData.partitionId" />
</div>
<div class="inquire">
<span>负责人</span>
<el-select v-model="formData.operatorId" placeholder="请选择">
<el-option
v-for="item in adminListArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>周期</span>
<el-select v-model="formData.date" placeholder="请选择">
<el-option
v-for="item in dateCycleArr"
:key="item.timeId"
:label="item.timeName"
:value="item.timeId"
>
</el-option>
</el-select>
</div>
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<el-button class="primary" type="primary" @click="resetFormData()"
>重置查询</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="partitionDesc" align="center" label="分区" />
<el-table-column prop="name" align="center" label="负责人名字" />
<el-table-column prop="date" align="center" label="周期" />
<el-table-column prop="newGuildCount" align="center" label="新公会数" />
<el-table-column
prop="newActiveGuildCount"
align="center"
label="新公会数(有效)"
/>
<el-table-column
prop="newGuildTotalGoldFlow"
align="center"
label="新公会总钻石流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.newGuildTotalGoldFlow) }}
</template>
</el-table-column>
<el-table-column
prop="guildCount"
align="center"
label="总公会数(有效)"
/>
<el-table-column
prop="guildTotalGoldFlow"
align="center"
label="总钻石流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.guildTotalGoldFlow) }}
</template>
</el-table-column>
<el-table-column
prop="guildTotalGoldFlowWow"
align="center"
label="周环比/钻石流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.guildTotalGoldFlowWow) }}
</template>
</el-table-column>
<el-table-column
prop="guildTotalDiamondFlow"
align="center"
label="总金币流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.guildTotalDiamondFlow) }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
class="primary"
type="primary"
@click="detailPageFun(scope.row)"
size="default"
>地区明细</el-button
>
<el-button
class="primary"
type="primary"
@click="detailPageFun(scope.row)"
size="default"
>公会明细</el-button
>
</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="regionStatDialog" title="地区明细" width="36%" center>
<el-table :data="regionStatTable" style="width: 100%">
<el-table-column
prop="partitionDesc"
align="center"
label="分区"
/>
<el-table-column
prop="newGuildTotalGoldFlow"
align="center"
label="地区"
/>
<el-table-column prop="newGuildCount" align="center" label="新公会数" />
<el-table-column
prop="newActiveGuildCount"
align="center"
label="新公会数(有效)"
/>
<el-table-column
prop="newGuildTotalGoldFlow"
align="center"
label="新公会总钻石流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.newGuildTotalGoldFlow) }}
</template>
</el-table-column>
<el-table-column
prop="newGuildTotalDiamondFlow"
align="center"
label="新公会总金币流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.newGuildTotalDiamondFlow) }}
</template>
</el-table-column>
<el-table-column
prop="guildCount"
align="center"
label="总公会数(有效)"
/>
<el-table-column
prop="guildCount"
align="center"
label="本周总钻石流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.guildCount) }}
</template>
</el-table-column>
<el-table-column
prop="guildCount"
align="center"
label="本周总金币流水"
>
<template v-slot="scope">
{{ formattedNumber(scope.row.guildGoldCount) }}
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="regionStatDialog = false">
关闭
</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { ref, onMounted, reactive,computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import PartitionSelect from "../common/partitionSelect.vue";
import {
getGuildOperatorListAll,
getGuildOperatorPageWeekStatList,
familyMemberWeekLevelRewardListCycleDate,
} from "@/api/ResponsiblePersonManagement/ResponsiblePersonManagement.js";
import { dateFormat } from "@/utils/system-helper";
export default {
name: "OperationFlowAnalysis",
components: { PartitionSelect },
setup() {
const formData = reactive({
partitionId: undefined,
pageNo: 1,
pageSize: 10,
operatorId: "",
date: "",
});
const adminListArr = ref([]);
const dateCycleArr = ref([]);
const regionStatDialog = ref(false);
const regionStatTable = ref([]);
const tableData = reactive({
data: [],
total: 0,
loading: false,
});
const getData = () => {
tableData.loading = true;
getGuildOperatorPageWeekStatList(formData).then((res) => {
if (res.code == 200) {
tableData.data = res.data.records;
tableData.loading = false;
tableData.total = res.data.total;
} else {
tableData.loading = false;
ElMessage.error(res.message);
}
});
};
// 重置
const resetFormData = () => {
Object.assign(formData, {
pageNo: 1,
pageSize: 10,
operatorId: "",
date: "",
});
};
// 千分位
const formattedNumber = computed(() => {
return (num) => {
if (num === null || num === undefined) return '';
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
};
})
onMounted(() => {
getGuildOperatorListAll().then((res) => {
if (res.code == 200) {
adminListArr.value = res.data;
} else {
ElMessage.error(res.message);
}
});
familyMemberWeekLevelRewardListCycleDate().then((res) => {
if (res.code == 200) {
res.data.forEach((res, i) => {
dateCycleArr.value[i] = {
timeName: `${dateFormat(
res.startDate,
"yyyy-MM-dd"
)}~${dateFormat(res.endDate, "yyyy-MM-dd")}`,
timeId: res.dateCycle,
};
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
});
return {
formData,
adminListArr,
tableData,
getData,
dateCycleArr,
resetFormData,
regionStatDialog,
regionStatTable,
formattedNumber
};
},
};
</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;
}
</style>

View File

@@ -0,0 +1,322 @@
<template>
<div class="box">
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<el-button class="primary" type="primary" @click="addDialog = true;resetAddFormData()"
>新增</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="partitionDesc" align="center" label="分区" />
<el-table-column prop="name" align="center" label="负责人名字" />
<el-table-column prop="regionName" align="center" label="分管国家" >
<template v-slot="scope">
{{ scope.row.regionMap.join(",") }}
</template>
</el-table-column>
<el-table-column prop="adminName" align="center" label="账号" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
class="primary"
type="primary"
@click="detailPageFun(scope.row)"
size="default"
>编辑</el-button
>
</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="addDialog"
:title="addFormData.id == '' ? '新增' : '编辑'"
width="28%"
center
>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>分区</span
>
<template v-if="addFormData.id == ''">
<partition-select
v-model:partition-id="addFormData.partitionId"
@update:partitionId="getlistByPartition"
/>
</template>
<template v-else>{{ addFormData.partitionDesc }}</template>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>国家</span
>
<el-select
multiple
filterable
v-model="addFormData.regionIds"
placeholder="请选择"
>
<el-option
v-for="item in adminCountryArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>负责人名字</span
>
<el-input
v-model="addFormData.name"
style="width: 50%"
class="input"
:disabled="addFormData.id == '' ? false : true"
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>后台账号</span
>
<template v-if="addFormData.id == ''">
<el-select
filterable
v-model="addFormData.adminId"
placeholder="请选择"
>
<el-option
v-for="item in userAdminArr"
:key="item.id"
:label="item.username"
:value="item.id"
>
</el-option>
</el-select>
</template>
<template v-else>
{{ addFormData.adminName }}
</template>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="addDialog = false">取消</el-button>
<el-button type="primary" @click="addFun()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</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 {
getGuildOperatorList,
getlistByPartitionId,
getUserListAll,
saveGuildOperator,
} from "@/api/ResponsiblePersonManagement/ResponsiblePersonManagement.js";
export default {
name: "ResponsiblePersonManagement",
// components: { PartitionRegionSelect, PartitionSelect },
setup() {
const formData = reactive({
pageNo: 1,
pageSize: 10,
});
const tableData = reactive({
data: [],
total: 0,
loading: false,
});
const addFormData = reactive({
partitionId: undefined,
regionIds: [],
name: "",
adminId: "",
id: "",
});
const addDialog = ref(false);
const adminCountryArr = ref([]);
const userAdminArr = ref([]);
const getData = () => {
tableData.loading = true;
getGuildOperatorList(formData).then((res) => {
if (res.code == 200) {
res.data.records.forEach(item => {
item.regionMap = Object.values(item.regionMap);
});
tableData.data = res.data.records;
tableData.loading = false;
tableData.total = res.data.total;
} else {
tableData.loading = false;
ElMessage.error(res.message);
}
});
};
const getlistByPartition = (e) => {
if (e) {
addFormData.partitionId = e;
}
addFormData.regionIds = [];
getlistByPartitionId({
partitionId: addFormData.partitionId,
containAll: false,
}).then((res) => {
if (res.code == 200) {
adminCountryArr.value = res.data;
} else {
ElMessage.error(res.message);
}
});
};
// 增加
const addFun = () => {
saveGuildOperator(addFormData).then((res) => {
if (res.code == 200) {
ElMessage.success("添加成功");
getData();
addDialog.value = false;
} else {
addDialog.value = false;
ElMessage.error(res.message);
}
resetAddFormData()
});
};
const resetAddFormData = () => {
Object.assign(addFormData, {
partitionId: undefined,
regionId: [],
name: "",
adminId: "",
id: "",
});
};
// 编辑
const detailPageFun = (row) => {
addFormData.id = row.id;
addFormData.regionIds = row.regionIds;
addFormData.partitionDesc = row.partitionDesc;
addFormData.partitionId = row.partitionId;
addFormData.adminName = row.adminName;
addFormData.name = row.name;
addFormData.adminId = row.adminId;
getlistByPartitionId({
partitionId: row.partitionId,
containAll: false,
}).then((res) => {
if (res.code == 200) {
adminCountryArr.value = res.data;
} else {
ElMessage.error(res.message);
}
});
addDialog.value = true;
};
const handleSizeChange = (val) => {
formData.pageSize = val;
getData();
};
const handleCurrentChange = (val) => {
formData.pageNo = val;
getData();
};
onMounted(() => {
getData();
getUserListAll().then((res) => {
if (res.code == 200) {
userAdminArr.value = res.data;
} else {
ElMessage.error(res.message);
}
});
});
return {
formData,
tableData,
addFormData,
addDialog,
getData,
adminCountryArr,
getlistByPartition,
addFun,
userAdminArr,
resetAddFormData,
detailPageFun,
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;
}
}
.selectBox {
display: flex;
height: 35px;
line-height: 35px;
margin-bottom: 20px;
}
</style>