03f86373 by 杨威

目录树所有权类型右键功能取消,修复楼盘表目录树收缩展开功能

1 parent a5cdec84
...@@ -100,11 +100,12 @@ export default { ...@@ -100,11 +100,12 @@ export default {
100 this.$emit("changeTop", e.pageY); 100 this.$emit("changeTop", e.pageY);
101 this.$emit("changeLeft", e.pageX); 101 this.$emit("changeLeft", e.pageX);
102 this.$emit("changeZdData",item); 102 this.$emit("changeZdData",item);
103 //判断所有权类型 103 this.$emit("changeVisible", false);
104 console.log(item.dm,'item.dm '); 104 // //判断所有权类型
105 if(item.dm == 'G' || item.dm == 'J' ||item.dm == 'Z'){ 105 // console.log(item.dm,'item.dm ');
106 this.$emit("changeCreateVisible", true); 106 // if(item.dm == 'G' || item.dm == 'J' ||item.dm == 'Z'){
107 } 107 // this.$emit("changeCreateVisible", true);
108 // }
108 //判断楼盘类型 109 //判断楼盘类型
109 switch (item.type) { 110 switch (item.type) {
110 case 'zd': 111 case 'zd':
......
...@@ -135,17 +135,17 @@ export default { ...@@ -135,17 +135,17 @@ export default {
135 } 135 }
136 }, 136 },
137 137
138 createVisible(value) { 138 // createVisible(value) {
139 if (value) { 139 // if (value) {
140 document.body.addEventListener("click", this.closeMenu); 140 // document.body.addEventListener("click", this.closeMenu);
141 } else { 141 // } else {
142 document.body.removeEventListener("click", this.closeMenu); 142 // document.body.removeEventListener("click", this.closeMenu);
143 } 143 // }
144 } 144 // }
145 }, 145 },
146 created() { 146 created() {
147 console.log("lineTree create"); 147 console.log("lineTree create");
148 // this.preDealData(this.pd); 148 this.preDealData(this.pd);
149 // this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]); 149 // this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]);
150 }, 150 },
151 151
...@@ -184,8 +184,14 @@ export default { ...@@ -184,8 +184,14 @@ export default {
184 this.dialogVisible = false; 184 this.dialogVisible = false;
185 }, 185 },
186 preDealData(list) { 186 preDealData(list) {
187 //楼盘表目录树没有expand属性 187 // //楼盘表目录树没有expand属性
188 list[0].expand = list[0].expand == undefined ? true:list[0].expand; 188 // list[0].expand = list[0].expand == undefined ? true:list[0].expand;
189 list.forEach((x) => {
190 if (x.expand == undefined) this.$set(x, "expand", true);
191 if (x.children && x.children.length > 0) {
192 this.preDealData(x.children);
193 }
194 });
189 return list; 195 return list;
190 }, 196 },
191 // 根据id展开树的具体项 197 // 根据id展开树的具体项
...@@ -206,17 +212,10 @@ export default { ...@@ -206,17 +212,10 @@ export default {
206 console.log(this.formatData, "this.formatData"); 212 console.log(this.formatData, "this.formatData");
207 }, 213 },
208 itemClick(item) { 214 itemClick(item) {
209 item.expand = item.expand == undefined? true:!item.expand; 215 // item.expand = item.expand == undefined? true:!item.expand;
216 item.expand = !item.expand;
210 this.$emit("itemClick", item); 217 this.$emit("itemClick", item);
211 }, 218 },
212 // 详情点击
213 detailClick(data) {
214 clearTimeout(this.timer);
215 this.timer = setTimeout(() => {
216 this.selectedDetail = data;
217 this.$emit("detailClick", data);
218 }, 300);
219 },
220 //自然幢右键点击事件 219 //自然幢右键点击事件
221 openMenu(e,item){ 220 openMenu(e,item){
222 console.log(item,'右键item'); 221 console.log(item,'右键item');
...@@ -228,7 +227,7 @@ export default { ...@@ -228,7 +227,7 @@ export default {
228 //关闭右键菜单 227 //关闭右键菜单
229 closeMenu(){ 228 closeMenu(){
230 this.lpbvisible = false; 229 this.lpbvisible = false;
231 this.createVisible = false; 230 // this.createVisible = false;
232 }, 231 },
233 //楼盘表右键菜单项打开父组件弹框 232 //楼盘表右键菜单项打开父组件弹框
234 openLpbDialog(type){ 233 openLpbDialog(type){
......