Compare commits

...

2 Commits

Author SHA1 Message Date
chenruiye
96846bcf2d 修改主播退公会申请页面字段 2025-03-13 18:54:26 +08:00
chenruiye
af9c29421c 主播退公会申请 2025-02-28 19:19:31 +08:00
2 changed files with 202 additions and 1 deletions

View File

@@ -279,3 +279,22 @@ export const guildApplyAudit = query => {
params: query
});
};
// 主播退公会申请 列表
export const guildManageQuitList = query => {
return request({
url: '/admin/guild/manage/quitList',
method: 'get',
params: query
});
};
// 主播退公会申请审核
export const guildManageOptQuit = query => {
return request({
url: '/admin/guild/manage/optQuit',
method: 'post',
params: query
});
};

View File

@@ -0,0 +1,182 @@
<template>
<div class="box">
<!-- 查询 -->
<el-form ref="searchForm" :model="searchForm" :rules="searchRules" label-width="auto" inline="true">
<el-form-item label="ID" prop="erbanNo">
<el-input v-model="searchForm.erbanNo" placeholder="" class="input"></el-input>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="searchForm.status" placeholder="请选择">
<el-option label="全部" :value="-1"></el-option>
<el-option label="未操作" :value="1"></el-option>
<el-option label="已同意" :value="2"></el-option>
<el-option label="已拒绝" :value="3"></el-option>
<el-option label="已过期" :value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" prop="time">
<el-date-picker v-model="searchForm.time" type="datetimerange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()">查询</el-button>
</el-form-item>
</el-form>
<!-- 表格 -->
<el-table v-loading="loading" :data="tableData" border style="width: 100%; margin-top: 25px">
<el-table-column prop="erbanNo" align="center" label="用户ID" />
<el-table-column prop="uid" align="center" label="UID" />
<el-table-column prop="guildId" align="center" label="公会ID" />
<el-table-column prop="guildName" align="center" label="公会长昵称" />
<el-table-column prop="createTime" align="center" label="申请时间" />
<el-table-column align="center" label="操作">
<template v-slot="scope">
<p v-if="scope.row.status == 2" style="color: green;">已同意</p>
<p v-if="scope.row.status == 3" style="color: red;">已拒绝</p>
<p v-if="scope.row.status == 4" style="color: orange;">已过期</p>
<el-button v-if="scope.row.status == 1" @click="optClick(scope.row, 2)" type="primary">同意</el-button><br>
<el-button v-if="scope.row.status == 1" @click="optClick(scope.row, 3)" type="warning">拒绝</el-button>
</template>
</el-table-column>
<el-table-column prop="operator" align="center" label="操作人" />
<el-table-column prop="updateTime" 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="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next" :total="total" @size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</template>
<script>
import { guildManageQuitList, guildManageOptQuit } from "@/api/nobleman/nobleman";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessageBox, ElMessage } from "element-plus"; // 正确引入 ElM
export default {
name: "AnchorQuitApply",
data() {
return {
loading: false,
//查询所需条件对象
searchForm: {
erbanNo: "",
status: "",
time: "",
},
// 查询规则
searchRules: {
// erbanNo: [{ required: true, trigger: 'blur', message: 'ID不能为空' }]
},
// 表格
tableData: [],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
this.getData();
},
methods: {
// 查询接口
getData() {
this.loading = true;
let time = this.searchForm.time;
let startTime = "";
let endTime = "";
if (time && time.length > 0) {
startTime = dateFormat(this.searchForm.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.searchForm.time[1], "yyyy-MM-dd hh:mm:ss");
}
guildManageQuitList({
erbanNo: this.searchForm.erbanNo,
status: this.searchForm.status,
startDate: startTime,
endDate: endTime,
pageNum: this.currentPage,
pageSize: this.pageSize,
}).then((res) => {
this.total = res.data.total;
this.tableData = res.data.rows;
this.loading = false;
});
},
// 同意/拒绝
optClick(row, val) {
let params = {
id: row.id,
status: val,
}
ElMessageBox.confirm(`确认${val == 2 ? '同意' : '拒绝'}吗?`, "提示", {
type: "warning",
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(() => {
guildManageOptQuit(params).then((res) => {
console.log();
if (res.code == 200) {
this.getData();
ElMessage({
showClose: true,
message: "操作成功!",
type: "success",
});
} else {
ElMessage({
showClose: true,
message: res.message,
type: "error",
});
}
});
})
.catch(() => { });
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.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;
}
}
</style>