Commit 6b2534f3 authored by zhengke's avatar zhengke

修改

parent 4d9b654b
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
</div> </div>
<div class="content"> <div class="content">
<div style="display: flex; align-items: center; flex-wrap: wrap"> <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()" <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> size="small" clearable>
</el-input> </el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" <span @click="(msg.pageIndex = 1), getList()" class="el-icon-search"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<el-tooltip class="item" effect="dark" content="删除" placement="top"> <el-tooltip class="item" effect="dark" content="删除" placement="top">
<img @click="DeleteGroup(scope.row)" style="width: 32px; height: 32px" <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> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
</el-pagination> </el-pagination>
</div> </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> <div>
<el-form :model="addMsg" ref="addMsg" label-width="150px"> <el-form :model="addMsg" ref="addMsg" label-width="150px">
<el-form-item label="分组名称"> <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>
<el-form-item label="可查看分组"> <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 v-for="item in groupArray" :key="item.GroupId" :label="item.GroupName" :value="item.GroupId">
</el-option> </el-option>
</el-select> </el-select>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="IsShowGroup = false">关 闭</el-button> <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> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
loading: false, loading: false,
tableData: [], tableData: [],
total: 0, total: 0,
commonTitle: '新增分组',
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
...@@ -86,7 +87,6 @@ ...@@ -86,7 +87,6 @@
addMsg: { addMsg: {
GroupId: 0, GroupId: 0,
GroupName: "", //分组名称 GroupName: "", //分组名称
LookGroupIds: "",
GroupIdList: [], GroupIdList: [],
IsSpecial: 0, IsSpecial: 0,
}, },
...@@ -100,13 +100,30 @@ ...@@ -100,13 +100,30 @@
methods: { methods: {
//新增修改用户分组 //新增修改用户分组
EditGroup(obj) { 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; this.IsShowGroup = true;
}, },
//保存用户分组信息 //保存用户分组信息
SaveGroup() { SaveGroup() {
this.apipost("/api/User/SetMemberGroup", this.addMsg, res => { this.apipost("/api/User/SetMemberGroup", this.addMsg, res => {
console.log(res); console.log(res);
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.IsShowGroup = false;
}
}); });
}, },
//获取用户分组信息 //获取用户分组信息
...@@ -120,11 +137,16 @@ ...@@ -120,11 +137,16 @@
}, },
//删除分组 //删除分组
DeleteGroup(item) { DeleteGroup(item) {
this.apipost("/api/User/DeleteMemberGroup", { let that = this;
that.Confirm("是否确定删除?", function () {
that.apipost("/api/User/DeleteMemberGroup", {
GroupId: item.GroupId GroupId: item.GroupId
}, res => { }, res => {
console.log(res); if(res.data.resultCode==1){
that.Success(res.data.message);
that.getList();
}
});
}); });
}, },
getList() { getList() {
...@@ -145,13 +167,10 @@ ...@@ -145,13 +167,10 @@
}, },
//获取分组下来列表 //获取分组下来列表
getgroupList() { getgroupList() {
this.apipost("/api/User/GetMemberGroupList", { this.apipost("/api/User/GetMemberGroupList", {}, res => {
if (res.data.resultCode == 1) {
}, res => {
console.log(res);
this.groupArray = res.data.data; this.groupArray = res.data.data;
}
}); });
} }
}, },
...@@ -162,26 +181,6 @@ ...@@ -162,26 +181,6 @@
</script> </script>
<style> <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 { .memberGroup .content .searchInput {
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
border-radius: 4px; border-radius: 4px;
...@@ -212,4 +211,8 @@ ...@@ -212,4 +211,8 @@
box-sizing: border-box; box-sizing: border-box;
} }
.memberGroup .w300 {
width: 300px !important;
}
</style> </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