添加部门弹窗单选功能

This commit is contained in:
sean yu 2020-10-30 11:17:05 +08:00
parent 72b33afce9
commit 357d57a3ca

View File

@ -23,7 +23,7 @@
</div>
<div class="popup-item-content">
<div class="popup-item-content-item">
<div class="content">
<div class="content" v-show="!isSignle">
<el-checkbox :value ='isAll' @change="handleChangChoose($event)">全选</el-checkbox>
</div>
</div>
@ -78,6 +78,11 @@ export default {
title: {
type: String,
default: '选择参与部门'
},
// add by sean
isSignle: {
type: Boolean,
default: false
}
},
data () {
@ -138,6 +143,10 @@ export default {
}
return
}
// add by sean
if (this.isSignle && this.tags.length > 0) {
this.tags.splice(0, this.tags.length)
}
const isHas = this.tags.some(i => i.departmentId === item.departmentId)
if (isHas && !event) {
this.tags = this.tags.filter(i => i.departmentId !== item.departmentId)