|
@@ -87,18 +87,34 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getOrgTreeList () {
|
|
|
- this.$http
|
|
|
- .get('/czc-community/assets/tree/community/find', { buildingType: this.buildingType })
|
|
|
- .then(({ status, data, msg }) => {
|
|
|
- if (status === 0 && data) {
|
|
|
- this.organList = data;
|
|
|
- this.dimension(data);
|
|
|
- this.$nextTick().then(() => {
|
|
|
- const firstNode = document.querySelector('.el-tree-node');
|
|
|
- firstNode.click();
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.buildingType == '5') {
|
|
|
+ this.$http
|
|
|
+ .get('/czc-community/assets/tree/community/find')
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (status === 0 && data) {
|
|
|
+ this.organList = data;
|
|
|
+ this.dimension(data);
|
|
|
+ this.$nextTick().then(() => {
|
|
|
+ const firstNode = document.querySelector('.el-tree-node');
|
|
|
+ firstNode.click();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$http
|
|
|
+ .get('/czc-community/assets/tree/community/find', { buildingType: this.buildingType })
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (status === 0 && data) {
|
|
|
+ this.organList = data;
|
|
|
+ this.dimension(data);
|
|
|
+ this.$nextTick().then(() => {
|
|
|
+ const firstNode = document.querySelector('.el-tree-node');
|
|
|
+ firstNode.click();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
filterNode (value, data) {
|
|
|
if (!value) return true;
|