<el-form-item label="所属门店:" prop="id">
<el-select
clearable
placeholder="请选择所属门店"
class="dialog-input"
v-model="formData.belongBusinessId">
<el-option
v-for="item in businessList"
:label="item.name"
:value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
// 获取门店数据
getBusiness() {
listBusiness().then(res => {
this.businessList = res.response
})
},
<el-form-item label="角色:" prop="role_ids">
<el-select
@change="handleRoleChange"
multiple
class="dialog-input"
v-model="formData.role_ids"
placeholde="请选择状态">
<el-option
v-for="item in roleList"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
handleRoleChange(selectArr) {
this.roles = selectArr.map(roleId => {
return this.roleList.find(v => v.id == roleId)
})
},