| | |
| | | :title="`选择候选部门`" |
| | | :visible.sync="show" |
| | | width="65%" |
| | | |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | :modal="false" |
| | | :before-close="close"> |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | methods: { |
| | | setCheckList(value) { |
| | | this.checkList = value |
| | | this.$nextTick(() => { |
| | | if (this.$refs.tree && this.checkeds) { |
| | | this.$refs.tree.setCheckedKeys(this.checkeds); |
| | | } |
| | | }); |
| | | }, |
| | | handleCheckChange(data, checked, indeterminate) { |
| | | if (checked) { |
| | | this.checkList.push(data) |
| | | if (this.checkList.indexOf(data) === -1) { |
| | | this.checkList.push(data) |
| | | } |
| | | } else { |
| | | this.checkList = this.checkList.filter(item => item !== data) |
| | | } |