|
@@ -277,7 +277,7 @@ export default {
|
|
|
list.forEach((item) => {
|
|
|
this.resetTree(this.options, item);
|
|
|
});
|
|
|
- this.defaultArr = [];
|
|
|
+ if (this.$refs.tree) this.$refs.tree.setCheckedKeys([]);
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.selectdialogData = val;
|
|
@@ -333,16 +333,15 @@ export default {
|
|
|
} else {
|
|
|
// 选择模板时,生成新的树
|
|
|
this.dialogData = JSON.parse(JSON.stringify(this.tableData));
|
|
|
- this.options = JSON.parse(JSON.stringify(this.optionsTemp))
|
|
|
+ this.options = JSON.parse(JSON.stringify(this.optionsTemp));
|
|
|
// this.setData(this.dialogData);
|
|
|
}
|
|
|
- if (this.defaultArr.length) {
|
|
|
- this.dialogData.forEach((item) => {
|
|
|
- this.resetTree(this.options, item);
|
|
|
- });
|
|
|
- this.removeChildrenZero(this.options);
|
|
|
- return this.dialogData;
|
|
|
- }
|
|
|
+ // if (this.defaultArr.length) {
|
|
|
+ this.dialogData.forEach((item) => {
|
|
|
+ this.resetTree(this.options, item);
|
|
|
+ });
|
|
|
+ this.removeChildrenZero(this.options);
|
|
|
+ return this.dialogData;
|
|
|
},
|
|
|
},
|
|
|
watch: {
|