Commit c66ac9eb authored by zhengke's avatar zhengke

修改

parent 234b2c96
......@@ -3,7 +3,9 @@
<div class="head-title">
用户管理
<el-button @click="dialogVisible = true" style="float: right; margin-top: -5px" size="small" type="primary">批量导出
<el-button @click="getCkedData" style="float: right; margin-top: -5px" size="small" type="primary">批量设置分组
</el-button>
<el-button @click="dialogVisible = true" style="float: right; margin: -5px 10px 0 0" size="small" type="primary">批量导出
</el-button>
<el-button @click="addusers()" style="float: right; margin-top: -5px; margin-right: 10px" size="small"
type="primary">新增
......@@ -125,6 +127,13 @@
</el-option>
</el-select>
</div>
<div style="display: flex;align-items: center;margin-bottom: 10px;margin-right: 20px;">
<span style="margin-right: 5px">分组</span>
<el-select v-model="msg.GroupIdList" @change="(msg.pageIndex = 1), getList()" multiple class="w300" size="small">
<el-option v-for="item in groupArray" :key="item.GroupId" :label="item.GroupName" :value="item.GroupId">
</el-option>
</el-select>
</div>
</div>
<div style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div style="display: flex; align-items: center">
......@@ -336,6 +345,23 @@
<el-button size="small" @click="detailShow = false">关 闭</el-button>
</span>
</el-dialog>
<!-- 批量设置分组 -->
<el-dialog title="批量设置分组" :visible.sync="isShowGroup" width="400px">
<el-form>
<el-form-item label="分组">
<el-select v-model="groupMsg.BelongGroupIdList" multiple style="width:320px" size="small">
<el-option v-for="item in groupArray" :key="item.GroupId" :label="item.GroupName" :value="item.GroupId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<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>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -383,6 +409,7 @@
HouseInfo: 0,
EducationType: 0,
Marriage: 0,
GroupIdList:[]
},
ages: [0, 0], //年龄
Heights: [0, 0], //身高
......@@ -430,7 +457,15 @@
quanxianMsg: {
UserIds: '',
IsFaTie: 0,
}
},
groupArray:[],
isShowGroup:false, //批量设置分组
groupMsg:{
BelongGroupIdList:[],
UserIds:""
},
//选中的数据
selectedData:[]
};
},
created() {
......@@ -444,6 +479,7 @@
this.GetMarriageEnumList(); //婚姻
this.GetHouseInfoEnumList(); //房子情况
this.GetCarInfoEnumList(); //车子情况
this.getgroupList();
},
methods: {
editGoods(obj, index) {
......@@ -518,6 +554,7 @@
data.push(x.Id)
})
this.quanxianMsg.UserIds = data.join(',')
this.selectedData = val;
},
quanxian(type) {
if (this.quanxianMsg.UserIds == '') {
......@@ -701,6 +738,37 @@
}
});
},
//获取分组下来列表
getgroupList() {
this.apipost("/api/User/GetMemberGroupList", {}, res => {
if (res.data.resultCode == 1) {
this.groupArray = res.data.data;
}
});
},
//点击批量设置分组
getCkedData(){
if(this.selectedData.length==0){
this.Error('请选择需要设置的数据');
}else{
this.isShowGroup=true;
}
},
//批量保存分组
saveGroup(){
let data = [];
this.groupMsg.UserIds = '',
this.selectedData.map(x => {
data.push(x.Id)
})
this.groupMsg.UserIds = data.join(',')
this.apipost("/api/Miai/BatchSetMemberGroup", this.groupMsg , res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}
});
}
},
mounted() {},
};
......
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