恢复工会信息代码

This commit is contained in:
dragon
2024-07-12 20:50:54 +08:00
parent b53103c162
commit 5b41dbabed

View File

@@ -3,119 +3,126 @@
<!-- 查询 --> <!-- 查询 -->
<div class="inquire"> <div class="inquire">
<span>ID</span> <span>ID</span>
<el-input v-model="inquire.userId" <el-input
v-model="inquire.userId"
placeholder="" placeholder=""
class="input"></el-input> class="input"
></el-input>
</div> </div>
<div class="inquire"> <div class="inquire">
<span>推荐人</span> <span>推荐人</span>
<el-input v-model="inquire.referrer" <el-input
v-model="inquire.referrer"
placeholder="" placeholder=""
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<div class="inquire"> <div class="inquire">
<div class="block"> <div class="block">
<span class="demonstration">日期</span> <span class="demonstration">日期</span>
<el-date-picker v-model="inquire.time" <el-date-picker
v-model="inquire.time"
type="datetimerange" type="datetimerange"
range-separator="" range-separator=""
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
<!-- 查询按钮 --> <!-- 查询按钮 -->
<el-button class="primary" <el-button class="primary" type="primary" @click="getData()"
type="primary" >查询</el-button
@click="getData()">查询</el-button> >
<el-button class="primary" <el-button class="primary" type="primary" @click="addDialog = true"
type="primary" >添加</el-button
@click="addDialog = true">添加</el-button> >
<!-- 表格 --> <!-- 表格 -->
<el-table v-loading="loading" <el-table
v-loading="loading"
:data="tableData" :data="tableData"
border border
style="width: 100%; margin-top: 25px"> style="width: 100%; margin-top: 25px"
<el-table-column prop="referrer" >
align="center" <el-table-column prop="referrer" align="center" label="推荐人" />
label="推荐人" /> <el-table-column prop="ownerErbanNo" align="center" label="会长ID" />
<el-table-column prop="ownerErbanNo" <el-table-column prop="ownerNick" align="center" label="会长昵称" />
align="center" <el-table-column prop="name" align="center" label="公会昵称" />
label="会长ID" /> <el-table-column align="center" prop="giftInfo" label="公会背景图">
<el-table-column prop="ownerNick"
align="center"
label="会长昵称" />
<el-table-column prop="ownerPartitionName"
align="center"
label="会长分区" />
<el-table-column prop="name"
align="center"
label="公会昵称" />
<el-table-column align="center"
prop="giftInfo"
label="公会背景图">
<template v-slot="scope"> <template v-slot="scope">
<el-image style="width: 100px; height: 100px" <el-image
style="width: 100px; height: 100px"
:src="scope.row.backgroundUrl" :src="scope.row.backgroundUrl"
:zoom-rate="1.1" :zoom-rate="1.1"
:preview-src-list="[scope.row.backgroundUrl]" :preview-src-list="[scope.row.backgroundUrl]"
fit="cover" fit="cover"
preview-teleported="true" preview-teleported="true"
hide-on-click-modal="true" /> hide-on-click-modal="true"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" align="center" label="创建日期" />
<!-- <el-table-column prop="memberNum" align="center" label="成员数量" /> -->
<el-table-column
align="center" align="center"
label="创建日期" /> label="成员数量/上限"
<el-table-column prop="memberNum" ><template v-slot="scope"
align="center" >{{ scope.row.memberNum }}/{{ scope.row.memberNumLimit }}</template
label="成员数量" /> ></el-table-column>
<el-table-column prop="goldIncome" <el-table-column prop="goldIncome" align="center" label="金币总收入" />
align="center" <el-table-column prop="diamondRemain" align="center" label="钻石总收入" />
label="金币总收入" />
<el-table-column prop="diamondRemain" <el-table-column align="center" label="操作" width="300">
align="center"
label="钻石总收入" />
<el-table-column align="center"
label="操作"
width="300">
<template v-slot="scope"> <template v-slot="scope">
<el-button @click="ediClick(scope)" <el-button
@click="ediClick(scope)"
class="primary" class="primary"
type="primary" type="primary"
size="default" size="default"
:disabled="!scope.row.enable">编辑</el-button> :disabled="!scope.row.enable"
<el-button @click=" >编辑</el-button
>
<el-button
@click="
delDialog = true; delDialog = true;
delDialogData = scope.row; delDialogData = scope.row;
" "
:class="scope.row.enable ? 'danger' : 'info'" :class="scope.row.enable ? 'danger' : 'info'"
:type="scope.row.enable ? 'danger' : 'info'" :type="scope.row.enable ? 'danger' : 'info'"
size="default" size="default"
:disabled="!scope.row.enable">{{ scope.row.enable ? "移除" : "已解散" }}</el-button> :disabled="!scope.row.enable"
>{{ scope.row.enable ? "移除" : "已解散" }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 新增弹窗 --> <!-- 新增弹窗 -->
<el-dialog v-model="addDialog" <el-dialog v-model="addDialog" title="新增" width="28%" center>
title="新增"
width="28%"
center>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px; width: 100px" <span
class="col-sm-2 control-label">会长ID</span> style="display: inline-block; margin-right: 20px; width: 100px"
<el-input v-model="resource.id" class="col-sm-2 control-label"
>会长ID</span
>
<el-input
v-model="resource.id"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<div style="margin-bottom: 25px"> <div style="margin-bottom: 25px">
<span style="display: inline-block; margin-right: 20px; width: 100px" <span
class="col-sm-2 control-label">推荐人</span> style="display: inline-block; margin-right: 20px; width: 100px"
<el-input v-model="resource.referrer" class="col-sm-2 control-label"
>推荐人</span
>
<el-input
v-model="resource.referrer"
style="width: 75%" style="width: 75%"
class="input"></el-input> class="input"
></el-input>
</div> </div>
<!-- <div style="margin-bottom: 25px"> <!-- <div style="margin-bottom: 25px">
<span <span
@@ -132,13 +139,13 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="addDialog = false">取消</el-button> <el-button @click="addDialog = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="add()"> 确认 </el-button>
@click="add()"> 确认 </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 分页 --> <!-- 分页 -->
<el-pagination style="margin-top: 10px" <el-pagination
style="margin-top: 10px"
class="paginationClass" class="paginationClass"
v-model:current-page="currentPage" v-model:current-page="currentPage"
v-model:page-size="pageSize" v-model:page-size="pageSize"
@@ -146,7 +153,84 @@
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next"
:total="total" :total="total"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" /> @current-change="handleCurrentChange"
/>
<!-- 编辑弹窗 -->
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
<!-- 会长ID -->
<div style="margin-bottom: 25px; margin-top: 10px">
<span
style="display: inline-block; margin-right: 20px"
class="col-sm-2 control-label"
>会长ID</span
>
<el-input
v-model="ediObj.leaderId"
style="width: 75%"
class="input"
disabled
></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-input
v-model="ediObj.leaderNick"
style="width: 75%"
class="input"
disabled
></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-input
v-model="ediObj.guildNick"
style="width: 75%"
class="input"
disabled
></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-input
v-model="ediObj.guildNumber"
style="width: 75%"
class="input"
></el-input>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="editDialog = false">取消</el-button>
<el-button type="primary" @click="editDialogClick()">
确认
</el-button>
</span>
</template>
</el-dialog>
<!-- 二次确认删除弹窗 -->
<el-dialog v-model="delDialog" title="提示" width="30%" center>
<span> 确定要解散该公会吗?</span>
<template #footer>
<span class="dialog-footer">
<el-button @click="delDialog = false">取消</el-button>
<el-button type="primary" @click="delClick()"> 确认 </el-button>
</span>
</template>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@@ -157,9 +241,11 @@ import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
export default { export default {
name: "GuildInfo", name: "GuildInfo",
data () { data() {
return { return {
loading: false, loading: false,
delDialog: false,
delDialogData: null,
//查询所需条件对象 //查询所需条件对象
inquire: { inquire: {
userId: "", userId: "",
@@ -180,14 +266,23 @@ export default {
total: 10, //总页数 total: 10, //总页数
currentPage: 1, //页码 currentPage: 1, //页码
pageSize: 10, //条数 pageSize: 10, //条数
// 编辑弹窗
editDialog: false,
ediObj: {
leaderId: "",
leaderNick: "",
guildNick: "",
guildNumber: "",
id: "",
},
}; };
}, },
created () { created() {
this.getData(); this.getData();
}, },
methods: { methods: {
// 查询接口 // 查询接口
getData () { getData() {
this.loading = true; this.loading = true;
let time = this.inquire.time; let time = this.inquire.time;
let startTime = ""; let startTime = "";
@@ -211,7 +306,7 @@ export default {
}); });
}, },
// 添加 // 添加
add () { add() {
this.addDialog = false; this.addDialog = false;
create({ create({
erbanNo: this.resource.id, erbanNo: this.resource.id,
@@ -221,7 +316,7 @@ export default {
}); });
}, },
// 编辑按钮 // 编辑按钮
ediClick (res) { ediClick(res) {
var obj = res.row; var obj = res.row;
this.ediObj.leaderId = obj.ownerErbanNo; this.ediObj.leaderId = obj.ownerErbanNo;
this.ediObj.leaderNick = obj.ownerNick; this.ediObj.leaderNick = obj.ownerNick;
@@ -231,7 +326,7 @@ export default {
this.editDialog = true; this.editDialog = true;
}, },
// 二次确认弹窗 // 二次确认弹窗
editDialogClick () { editDialogClick() {
console.log(this.ediObj); console.log(this.ediObj);
update({ update({
id: this.ediObj.id, id: this.ediObj.id,
@@ -256,7 +351,7 @@ export default {
}); });
}, },
// 解散按钮 // 解散按钮
delClick () { delClick() {
console.log(this.delDialogData.id); console.log(this.delDialogData.id);
var familyId = this.delDialogData.id; var familyId = this.delDialogData.id;
dismiss({ familyId }).then((res) => { dismiss({ familyId }).then((res) => {
@@ -279,10 +374,10 @@ export default {
}); });
}, },
// 分页导航 // 分页导航
handleSizeChange () { handleSizeChange() {
this.getData(); this.getData();
}, },
handleCurrentChange () { handleCurrentChange() {
this.getData(); this.getData();
}, },
}, },