修改英语区工会管理部分表单

This commit is contained in:
chenruiye
2025-03-21 16:03:42 +08:00
parent 95626880e2
commit 133b9b96f4
5 changed files with 158 additions and 22 deletions

View File

@@ -298,3 +298,11 @@ export const guildManageOptQuit = query => {
});
};
// 获取分区下的国家
export const getlistByPartitionId = query => {
return request({
url: '/admin/regionInfo/listByPartitionId',
method: 'get',
params: query
});
};

View File

@@ -27,16 +27,17 @@
</div>
<div class="inquire">
<div class="block">
<span class="demonstration">会长分区</span>
<span class="demonstration">国家</span>
<el-select
v-model="inquire.partitionId"
v-model="inquire.regionId"
style="width: 75%"
placeholder="请选择"
clearable
>
<el-option
v-for="item in inquire.inquireonInfos"
:key="item.id"
:label="item.desc"
:label="JSON.parse(item.name).zh"
:value="item.id"
></el-option>
</el-select>
@@ -74,6 +75,7 @@
>
<el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
<el-table-column prop="name" align="center" label="公会名称" />
<el-table-column prop="zoneName" align="center" label="公会长所属国家" />
<el-table-column
prop="ownerPartitionName"
align="center"
@@ -131,6 +133,18 @@
label="送礼人数"
/>
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="detailspageNum"
v-model:page-size="detailspageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="detailstotal"
@size-change="detailshandleSizeChange"
@current-change="detailshandleCurrentChange"
/>
<template #footer>
<div class="dialog-footer">
<el-button @click="detailsDialog = false">关闭</el-button>
@@ -161,6 +175,7 @@ import {
incomeListFamilyMember,
incomeExportFamily,
incomeExportFamilys,
getlistByPartitionId
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
@@ -178,10 +193,11 @@ export default {
nick: "",
partitionId: 2,
inquireonInfos: [
{ desc: "英语区", id: 1 },
{ desc: "阿拉伯区", id: 2 },
{ desc: "华语区", id: 4 },
// { desc: "英语区", id: 1 },
// { desc: "阿拉伯区", id: 2 },
// { desc: "华语区", id: 4 },
],
regionId:0
},
// 表格
tableData: [],
@@ -194,12 +210,26 @@ export default {
detailsTitle: "",
tableDataDetails: [],
familyIdEx: "",
detailspageSize:10,
detailspageNum :1,
detailstotal:0
};
},
created() {
this.getData();
this.getlistByPartitionId()
},
methods: {
getlistByPartitionId(){
getlistByPartitionId({partitionId:2,containAll:true}).then((res) => {
if (res.code == 200) {
this.inquire.inquireonInfos = res.data;
// let obj = {name:{zh:"全部"},id:0}
// obj.name = JSON.stringify(obj.name)
// this.inquire.inquireonInfos.unshift(obj)
}
});
},
// 查询接口
getData() {
this.loading = true;
@@ -231,6 +261,7 @@ export default {
endDate: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
regionId:this.inquire.regionId
}).then((res) => {
if (res.code == 200) {
this.total = res.data.total;
@@ -288,7 +319,7 @@ export default {
},
// 查看详情按钮
ediClick(val) {
this.detailsTitle = `公会昵称:【${val.name}】 时间:【${val.createTime}】—金币收入明细`;
let time = this.inquire.time;
let startDate = "";
let endDate = "";
@@ -296,14 +327,20 @@ export default {
startDate = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endDate = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
if(val){
this.detailsTitle = `公会昵称:【${val.name}】 时间:【${val.createTime}】—金币收入明细`;
this.familyIdEx = val.id;
}
incomeListFamilyMember({
endDate,
startDate,
familyId: val.id,
familyId: this.familyIdEx,
pageNum:this.detailspageNum,
pageSize:this.detailspageSize
}).then((res) => {
this.tableDataDetails = res.data;
this.tableDataDetails = res.data.records;
this.detailsDialog = true;
this.detailstotal = res.data.total
});
},
// 导出按钮
@@ -329,6 +366,12 @@ export default {
handleCurrentChange() {
this.getData();
},
detailshandleSizeChange(){
this.ediClick()
},
detailshandleCurrentChange(){
this.ediClick()
}
},
};
</script>

View File

@@ -216,6 +216,18 @@
class="input"
></el-input>
</div>
<div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
class="col-sm-2 control-label"
>邀请人ID</span
>
<el-input
v-model="resource.inviteErbanNo"
style="width: 75%"
class="input"
></el-input>
</div>
<!-- <div style="margin-bottom: 25px">
<span
style="display: inline-block; margin-right: 20px; width: 100px"
@@ -530,6 +542,7 @@ export default {
id: "",
nick: "",
referrer: "",
inviteErbanNo:''
},
// 表格
tableData: [],
@@ -749,7 +762,19 @@ export default {
create({
erbanNo: this.resource.id,
referrer: this.resource.referrer,
inviteErbanNo:this.resource.inviteErbanNo
}).then((res) => {
if (res.code == 200) {
ElMessage({
message: res.message,
type: "success",
});
} else {
ElMessage({
message: res.message,
type: "error",
});
}
this.getData();
});
},

View File

@@ -7,6 +7,12 @@
placeholder=""
class="input"></el-input>
</div>
<div class="inquire">
<span>公会长ID</span>
<el-input v-model="inquire.ownErbanNo"
placeholder=""
class="input"></el-input>
</div>
<!-- 工会昵称 -->
<div class="inquire">
<span>工会名称</span>
@@ -43,6 +49,12 @@
<el-table-column prop="familyName"
align="center"
label="公会昵称" />
<el-table-column prop="familyOwnerErbanNo"
align="center"
label="公会长Id" />
<el-table-column prop="familyOwnerRegionName"
align="center"
label="公会长所属国家" />
<el-table-column prop="erbanNo"
align="center"
label="成员ID" />
@@ -78,6 +90,12 @@
label="操作"
width="300">
<template v-slot="scope">
<el-button @click="removeMemberBtn(scope.row.familyMemberId)"
class="primary"
type="primary"
size="default" v-if='scope.row.enable && scope.row.roleType != 1'
>移除主播</el-button>
<el-button @click="warnClick(scope)"
class="primary"
type="primary"
@@ -86,7 +104,9 @@
class="primary"
type="primary"
size="default"
:disabled="scope.row.violationNum == 0 ? 'disabled' : ''">警告详情</el-button>
:disabled="scope.row.violationNum == 0 ? 'disabled' : ''"
:style="(scope.row.enable&& scope.row.roleType != 1)?'margin-top:10px':''"
>警告详情</el-button>
</template>
</el-table-column>
</el-table>
@@ -194,11 +214,12 @@ import {
addRecord,
listRecord,
exportFamilyMember,
removeMember
} from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import { ElMessage, ElMessageBox} from "element-plus";
export default {
name: "GuildMemberInfo",
data () {
@@ -209,6 +230,7 @@ export default {
userId: "",
nick: "",
time: "",
ownErbanNo:''
},
//新增所需对象
resource: {
@@ -255,6 +277,7 @@ export default {
endDate: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
ownErbanNo:this.inquire.ownErbanNo
}).then((res) => {
this.total = res.data.total;
this.tableData = res.data.rows;
@@ -347,6 +370,31 @@ export default {
}
});
},
// 移除主播
removeMemberBtn(familyMemberId){
ElMessageBox.confirm('是否移除该主播', "提示", {
type: "warning",
confirmButtonText: "确定",
cancelButtonText: "取消",
}).then(()=>{
removeMember({familyMemberId}).then((res)=>{
if (res.code == 200) {
ElMessage({
showClose: true,
message: res.message,
type: "success",
});
this.getData();
}else{
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
})
})
},
// 分页导航
handleSizeChange () {
this.getData();

View File

@@ -43,17 +43,7 @@
<el-table-column prop="type" align="center" label="操作类型">
<template v-slot="scope">
{{
scope.row.type == 1
? "申请加入"
: scope.row.type == 2
? "申请退出"
: scope.row.type == 3
? "邀请加入"
: scope.row.type == 4
? "设置管理员"
: scope.row.type == 5
? "移除管理员"
: "移除成员"
getTypeDescription(scope.row.type)
}}
</template>
</el-table-column>
@@ -145,6 +135,28 @@ export default {
this.loading = false;
});
},
getTypeDescription(type) {
switch (type) {
case 1:
return "申请加入";
case 2:
return "申请退出";
case 3:
return "邀请加入";
case 4:
return "设置管理员";
case 5:
return "移除管理员";
case 6:
return "移除成员";
case 7:
return "后台添加";
case 8:
return "后台删除";
default:
return "";
}
},
// 分页导航
handleSizeChange() {
this.getData();