|
@@ -36,10 +36,10 @@
|
|
|
clearable
|
|
|
filterable
|
|
|
placeholder="请选择分部">
|
|
|
- <el-option v-for="item in branchList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-option v-for="item in selects.branchs"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -198,12 +198,13 @@
|
|
|
<el-select style="width: calc(100% - 75px) !important;"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ collapse-tags
|
|
|
v-model.trim="form.organIdLists"
|
|
|
multiple>
|
|
|
- <el-option v-for="item in branchList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"></el-option>
|
|
|
+ <el-option v-for="item in selects.branchs"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-button @click="onBranchCheckAll">全选</el-button>
|
|
|
</el-form-item>
|
|
@@ -328,7 +329,6 @@ export default {
|
|
|
roleStatus: false,
|
|
|
formActionTitle: 'create',
|
|
|
roleList: [], // 角色列表
|
|
|
- branchList: [], // 分部列表
|
|
|
formTitle: {
|
|
|
create: '添加员工',
|
|
|
update: '修改员工'
|
|
@@ -376,7 +376,7 @@ export default {
|
|
|
onBranchCheckAll () {
|
|
|
this.form.organIdLists = []
|
|
|
|
|
|
- this.branchList.forEach(item => {
|
|
|
+ this.selects.branchs.forEach(item => {
|
|
|
this.form.organIdLists.push(item.value)
|
|
|
})
|
|
|
},
|
|
@@ -444,20 +444,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- branchQueryPage({ // 获取分部
|
|
|
- delFlag: 0,
|
|
|
- rows: 9999
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200 && res.data && res.data.rows) {
|
|
|
- this.branchList = []
|
|
|
- res.data.rows.forEach(item => {
|
|
|
- this.branchList.push({
|
|
|
- label: item.name,
|
|
|
- value: item.id
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$store.dispatch('setBranchs')
|
|
|
|
|
|
},
|
|
|
roleOperation (type, data) {
|