|
@@ -230,11 +230,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onCheck(checkedKeys) {
|
|
|
+ console.log(checkedKeys, 'checkedKeys-checkedKeys');
|
|
|
this.checkedKeys = checkedKeys;
|
|
|
this.nodes(this.treeData, checkedKeys);
|
|
|
+ console.log(this.selectRightData, 'this.selectRightData');
|
|
|
this.applyTypeOption = this.Es6duplicate([...this.selectRightData], 'key');
|
|
|
+ console.log(this.applyTypeOption, 'this.applyTypeOption');
|
|
|
const changeSelectData = this.applyTypeOption.map(item => item.key);
|
|
|
- this.checkedKeys = changeSelectData;
|
|
|
+ // this.checkedKeys = changeSelectData;
|
|
|
if (this.applyTypeOption.length > 100) {
|
|
|
const lastOptionKey = this.applyTypeOption[99].key;
|
|
|
const lastIndex = changeSelectData.findIndex(item => item === lastOptionKey);
|
|
@@ -244,10 +247,6 @@ export default {
|
|
|
this.$emit('applyType', this.applyTypeOption);
|
|
|
},
|
|
|
nodes(data, checkedKeys) {
|
|
|
- if (!checkedKeys.length) {
|
|
|
- this.selectRightData = new Set();
|
|
|
- return;
|
|
|
- }
|
|
|
data.forEach(item => {
|
|
|
if (item.children) {
|
|
|
this.nodes(item.children, checkedKeys);
|