|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <el-dialog :title="title" center width="70%" :visible.sync="agencymngShow" :destroy-on-close="true" :modal-append-to-body="true"
|
|
|
- :append-to-body="true">
|
|
|
+ <el-dialog :title="title" center width="70%" @close="agencymng.isClose=true;" :visible.sync="agencymngShow"
|
|
|
+ :destroy-on-close="true" :modal-append-to-body="true" :append-to-body="true">
|
|
|
<div style="margin-top:-15px;padding-bottom:20px;display:flex;cursor: pointer">
|
|
|
<span style="font-size:14px">管理:</span>
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
@@ -13,7 +13,8 @@
|
|
|
<div class="full">
|
|
|
<el-row :gutter="0">
|
|
|
<el-col :span="4">
|
|
|
- <tree ref="tree" @nodeClick="nodeClick"></tree>
|
|
|
+ <tree ref="tree" @nodeClick="nodeClick" v-if="$isNotEmpty(agencymng.agencyId)&&!this.agencymng.isClose">
|
|
|
+ </tree>
|
|
|
</el-col>
|
|
|
<el-col :span="20">
|
|
|
<residential v-if="listShow(0)"></residential>
|
|
|
@@ -55,6 +56,7 @@
|
|
|
return {
|
|
|
breadcrumbList: [],
|
|
|
agencymng: {
|
|
|
+ isClose: false,
|
|
|
level: 0,
|
|
|
agencyId: "",
|
|
|
residentialId: '',
|
|
|
@@ -71,7 +73,7 @@
|
|
|
computed: {
|
|
|
listShow() {
|
|
|
return data => {
|
|
|
- if (this.agencymng.level == data && this.agencymng.agencyId) {
|
|
|
+ if (this.agencymng.level == data && this.$isNotEmpty(this.agencymng.agencyId) && !this.agencymng.isClose) {
|
|
|
return true
|
|
|
} else {
|
|
|
return false
|
|
|
@@ -79,9 +81,12 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ destroyed() {
|
|
|
+ console.log("我已经摧毁了");
|
|
|
+ },
|
|
|
methods: {
|
|
|
breadcrumbClick(item, index) {
|
|
|
- console.log(item,"breadcrumbClick");
|
|
|
+ console.log(item, "breadcrumbClick");
|
|
|
let list = this.breadcrumbList.reverse()
|
|
|
list.splice(0, list.length - index - 1)
|
|
|
this.breadcrumbList = list.reverse()
|
|
|
@@ -121,7 +126,7 @@
|
|
|
floorId,
|
|
|
roomId,
|
|
|
}
|
|
|
- if (level==4||level==5) {
|
|
|
+ if (level == 4 || level == 5) {
|
|
|
this.getRoomList()
|
|
|
}
|
|
|
},
|
|
|
@@ -134,15 +139,15 @@
|
|
|
},
|
|
|
nodeClick(obj) {
|
|
|
this.breadcrumbList = obj.list
|
|
|
- console.log(this.breadcrumbList,"this.breadcrumbList");
|
|
|
this.initBreadcrumbList()
|
|
|
let node = obj.node
|
|
|
let level = node.level
|
|
|
let id = node.data.id
|
|
|
this.updateAgencymng(level, id)
|
|
|
- console.log(this.breadcrumbList,"this.breadcrumbList");
|
|
|
},
|
|
|
showDialog(item) {
|
|
|
+ this.agencymng.isClose=false
|
|
|
+ this.breadcrumbList = []
|
|
|
this.agencymngShow = true
|
|
|
this.title = item.name
|
|
|
this.agency = item
|