|  | @@ -688,7 +688,10 @@ export default {
 | 
	
		
			
				|  |  |              this.showDetail = true;
 | 
	
		
			
				|  |  |              this.centerDialogVisible = true;
 | 
	
		
			
				|  |  |              this.$refs.upImages.clearImageList('');
 | 
	
		
			
				|  |  | -            this.$refs.endit.setContent('');
 | 
	
		
			
				|  |  | +            if (!!this.$refs.endit) {
 | 
	
		
			
				|  |  | +                this.$refs.endit.setContent('');
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              console.log('发布活动类型', val);
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          // 清空
 | 
	
	
		
			
				|  | @@ -704,9 +707,15 @@ export default {
 | 
	
		
			
				|  |  |              this.ruleForm.exigencyText = true;
 | 
	
		
			
				|  |  |              this.contentHtml = '';
 | 
	
		
			
				|  |  |              this.setContent = '';
 | 
	
		
			
				|  |  | -            this.$refs.endit.setContent('');
 | 
	
		
			
				|  |  | -            this.$refs.selectTreeHouse.endBtn();
 | 
	
		
			
				|  |  | -            this.$refs['ruleForm'].resetFields();
 | 
	
		
			
				|  |  | +            if (!!this.$refs.endit) {
 | 
	
		
			
				|  |  | +                this.$refs.endit.setContent('');
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (!!this.$refs.selectTreeHouse) {
 | 
	
		
			
				|  |  | +                this.$refs.selectTreeHouse.endBtn();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (!!this.$refs['ruleForm']) {
 | 
	
		
			
				|  |  | +                this.$refs['ruleForm'].resetFields();
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          /**添加按钮 */
 | 
	
		
			
				|  |  |          add() {
 | 
	
	
		
			
				|  | @@ -862,7 +871,10 @@ export default {
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  this.centerDialogVisible = false;
 | 
	
		
			
				|  |  |                  this.clear();
 | 
	
		
			
				|  |  | -                this.$refs['ruleForm'].resetFields();
 | 
	
		
			
				|  |  | +                if (!!this.$refs['ruleForm']) {
 | 
	
		
			
				|  |  | +                    this.$refs['ruleForm'].resetFields();
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                  if (this.showUploadImage) {
 | 
	
		
			
				|  |  |                      this.$refs.upImages.clearImageList('');
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -923,9 +935,10 @@ export default {
 | 
	
		
			
				|  |  |              this.PeopleNames = [];
 | 
	
		
			
				|  |  |              this.$http.get('/sc-user-center/user/findUserList').then(({ status, data, msg }) => {
 | 
	
		
			
				|  |  |                  if (status === 0) {
 | 
	
		
			
				|  |  | +                    this.filterPeople(data);
 | 
	
		
			
				|  |  | +                    this.filterPeopleName(data);
 | 
	
		
			
				|  |  | +                    this.clearTreeChildrenPeople(data);
 | 
	
		
			
				|  |  |                      this.peopleData = data;
 | 
	
		
			
				|  |  | -                    this.filterPeople(this.peopleData);
 | 
	
		
			
				|  |  | -                    this.filterPeopleName(this.peopleData);
 | 
	
		
			
				|  |  |                      this.houseDataNamesPeople = this.PeopleNames.toString();
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  |                      this.$message(error, res.msg);
 | 
	
	
		
			
				|  | @@ -935,12 +948,44 @@ export default {
 | 
	
		
			
				|  |  |          dimension(arr) {
 | 
	
		
			
				|  |  |              arr.map((item, index) => {
 | 
	
		
			
				|  |  |                  if (item.children) {
 | 
	
		
			
				|  |  | -                    this.dimension(item.children);
 | 
	
		
			
				|  |  | +                    if (item.children.length > 0) {
 | 
	
		
			
				|  |  | +                        this.dimension(item.children);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  } else if (item.type == 'room') {
 | 
	
		
			
				|  |  |                      this.filterArr(arr, item, index);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | +        clearTreeChildren(arr) {
 | 
	
		
			
				|  |  | +            arr.map((item, index) => {
 | 
	
		
			
				|  |  | +                if (!!item.children && item.children.length > 0) {
 | 
	
		
			
				|  |  | +                    this.clearTreeChildren(item.children);
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    if (!!item.children) {
 | 
	
		
			
				|  |  | +                        arr.splice(index, 1);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        clearTreeChildrenPeople(arr) {
 | 
	
		
			
				|  |  | +            arr.map((item, index) => {
 | 
	
		
			
				|  |  | +                if (!!item.children && item.children.length > 0) {
 | 
	
		
			
				|  |  | +                    this.clearTreeChildrenPeople(item.children);
 | 
	
		
			
				|  |  | +                } else {
 | 
	
		
			
				|  |  | +                    if (!!item.children && item.children.length == 0) {
 | 
	
		
			
				|  |  | +                        this.clearTreeChildrenPeopleArr(arr, index);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        clearTreeChildrenPeopleArr(arr, index) {
 | 
	
		
			
				|  |  | +            arr.splice(index, 1);
 | 
	
		
			
				|  |  | +            arr.map((item, indexs) => {
 | 
	
		
			
				|  |  | +                if (!!item.children && item.children.length == 0) {
 | 
	
		
			
				|  |  | +                    this.clearTreeChildrenPeopleArr(arr, indexs);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  |          filterArr(arr, item, index) {
 | 
	
		
			
				|  |  |              if (!this.rowDetail.treeData.includes(Number(item.value))) {
 | 
	
		
			
				|  |  |                  arr.splice(index, 1);
 | 
	
	
		
			
				|  | @@ -971,15 +1016,20 @@ export default {
 | 
	
		
			
				|  |  |                          var arr = data.filter((item) => {
 | 
	
		
			
				|  |  |                              return item.id == this.rowDetail.communityId;
 | 
	
		
			
				|  |  |                          });
 | 
	
		
			
				|  |  | -                        console.log('选中的社区', arr);
 | 
	
		
			
				|  |  | -                        this.houseData = arr;
 | 
	
		
			
				|  |  | -                        this.dimension(this.houseData);
 | 
	
		
			
				|  |  | -                        console.log('====================================');
 | 
	
		
			
				|  |  | -                        console.log('houseData', this.houseData);
 | 
	
		
			
				|  |  | -                        console.log('====================================');
 | 
	
		
			
				|  |  | -                        this.filterName(this.houseData);
 | 
	
		
			
				|  |  | -                        let h = [...new Set(this.houseNames)];
 | 
	
		
			
				|  |  | -                        this.houseDataNames = this.houseNames.toString();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                        if (arr.length > 0) {
 | 
	
		
			
				|  |  | +                            // this.houseData = arr;
 | 
	
		
			
				|  |  | +                            this.dimension(arr);
 | 
	
		
			
				|  |  | +                            this.clearTreeChildren(arr);
 | 
	
		
			
				|  |  | +                            this.houseData = arr;
 | 
	
		
			
				|  |  | +                            // this.dimension(this.houseData);
 | 
	
		
			
				|  |  | +                            // console.log(arr);
 | 
	
		
			
				|  |  | +                            // console.log(this.houseData);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                            this.filterName(this.houseData);
 | 
	
		
			
				|  |  | +                            let h = [...new Set(this.houseNames)];
 | 
	
		
			
				|  |  | +                            this.houseDataNames = this.houseNames.toString();
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |          },
 | 
	
	
		
			
				|  | @@ -1025,7 +1075,9 @@ export default {
 | 
	
		
			
				|  |  |                      this.contentHtml = res.data.content;
 | 
	
		
			
				|  |  |                      this.centerDialogVisible = true;
 | 
	
		
			
				|  |  |                      this.showDetail = false;
 | 
	
		
			
				|  |  | -                    this.$refs.previeInform.closeDialog();
 | 
	
		
			
				|  |  | +                    if (!!this.$refs.previeInform) {
 | 
	
		
			
				|  |  | +                        this.$refs.previeInform.closeDialog();
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  |                      return this.$message.error('获取详情失败!请稍后重试');
 | 
	
		
			
				|  |  |                  }
 |