This commit is contained in:
熊成强 2020-10-30 11:17:55 +08:00
commit 59eb1f8702

View File

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