Commit 6b2534f3 authored by zhengke's avatar zhengke

修改

parent 4d9b654b
......@@ -8,9 +8,9 @@
</div>
<div class="content">
<div style="display: flex; align-items: center; flex-wrap: wrap">
<div class="searchInput" style="width: 150px">
<div class="searchInput" style="width: 210px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 125px; height: 30px" placeholder="请输入昵称" v-model="msg.GroupName"
style="display: inline-block; width: 180px; height: 30px" placeholder="请输入昵称" v-model="msg.GroupName"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search"
......@@ -25,7 +25,7 @@
<el-table-column prop="GroupName" label="分组名称" width="200"> </el-table-column>
<el-table-column prop="LookGroupIds" label="可查看分组" width="300"> </el-table-column>
<el-table-column prop="CreateDate" width="200" label="加入时间"></el-table-column>
<el-table-column prop="address" label="操作" fixed="right">
<el-table-column prop="address" label="操作" fixed="right">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img @click="EditGroup(scope.row)" style="width: 32px; height: 32px"
......@@ -34,7 +34,7 @@
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img @click="DeleteGroup(scope.row)" style="width: 32px; height: 32px"
src="../../assets/img/userman/QRcode.png" alt="" />
src="../../assets/img/userman/del.png" alt="" />
</el-tooltip>
</template>
</el-table-column>
......@@ -44,14 +44,14 @@
</el-pagination>
</div>
<!-- 新增修改用户分组 -->
<el-dialog title="修改星星数" :visible.sync="IsShowGroup" width="600px" :close-on-click-modal="false">
<el-dialog :title="commonTitle" :visible.sync="IsShowGroup" width="600px" :close-on-click-modal="false">
<div>
<el-form :model="addMsg" ref="addMsg" label-width="150px">
<el-form-item label="分组名称">
<el-input v-model="addMsg.GroupName" placeholder="请输入分组名称"></el-input>
<el-input v-model="addMsg.GroupName" class="w300" placeholder="请输入分组名称"></el-input>
</el-form-item>
<el-form-item label="可查看分组">
<el-select v-model="addMsg.GroupIdList">
<el-select v-model="addMsg.GroupIdList" multiple class="w300">
<el-option v-for="item in groupArray" :key="item.GroupId" :label="item.GroupName" :value="item.GroupId">
</el-option>
</el-select>
......@@ -60,7 +60,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="IsShowGroup = false">关 闭</el-button>
<el-button size="small" type="primary" @click="SaveGroup()">修 改</el-button>
<el-button size="small" type="primary" @click="SaveGroup()">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -78,6 +78,7 @@
loading: false,
tableData: [],
total: 0,
commonTitle: '新增分组',
msg: {
pageIndex: 1,
pageSize: 15,
......@@ -86,7 +87,6 @@
addMsg: {
GroupId: 0,
GroupName: "", //分组名称
LookGroupIds: "",
GroupIdList: [],
IsSpecial: 0,
},
......@@ -100,13 +100,30 @@
methods: {
//新增修改用户分组
EditGroup(obj) {
if (obj) {
this.commonTitle = '修改分组'
this.addMsg.GroupId = obj.GroupId;
this.addMsg.GroupName = obj.GroupName;
this.addMsg.GroupIdList = obj.GroupIdList;
} else {
this.addMsg.GroupId = 0;
this.addMsg.GroupName = '';
this.addMsg.GroupIdList = [];
this.addMsg.IsSpecial = 0;
this.commonTitle = '新增分组'
}
console.log(obj, '数据');
this.IsShowGroup = true;
},
//保存用户分组信息
SaveGroup() {
this.apipost("/api/User/SetMemberGroup", this.addMsg, res => {
console.log(res);
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.IsShowGroup = false;
}
});
},
//获取用户分组信息
......@@ -120,11 +137,16 @@
},
//删除分组
DeleteGroup(item) {
this.apipost("/api/User/DeleteMemberGroup", {
GroupId: item.GroupId
}, res => {
console.log(res);
let that = this;
that.Confirm("是否确定删除?", function () {
that.apipost("/api/User/DeleteMemberGroup", {
GroupId: item.GroupId
}, res => {
if(res.data.resultCode==1){
that.Success(res.data.message);
that.getList();
}
});
});
},
getList() {
......@@ -145,13 +167,10 @@
},
//获取分组下来列表
getgroupList() {
this.apipost("/api/User/GetMemberGroupList", {
}, res => {
console.log(res);
this.groupArray = res.data.data;
this.apipost("/api/User/GetMemberGroupList", {}, res => {
if (res.data.resultCode == 1) {
this.groupArray = res.data.data;
}
});
}
},
......@@ -162,26 +181,6 @@
</script>
<style>
.memberGroup .remark_name {
color: #888888;
font-size: 12px;
margin-left: 10px;
float: right;
}
.memberGroup .app-image {
background-position: center center;
width: 50px;
height: 50px;
border-radius: 0%;
float: left;
margin-right: 8px;
}
.memberGroup .blue {
color: #409eff;
}
.memberGroup .content .searchInput {
border: 1px solid #dcdfe6;
border-radius: 4px;
......@@ -212,4 +211,8 @@
box-sizing: border-box;
}
.memberGroup .w300 {
width: 300px !important;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment