目录树调整
Showing
3 changed files
with
21 additions
and
5 deletions
... | @@ -216,7 +216,8 @@ export default { | ... | @@ -216,7 +216,8 @@ export default { |
216 | path: '/'+item.type, | 216 | path: '/'+item.type, |
217 | query:{ | 217 | query:{ |
218 | source: 2, | 218 | source: 2, |
219 | bsm:item.bsm | 219 | bsm:item.bsm, |
220 | auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2' | ||
220 | } | 221 | } |
221 | }); | 222 | }); |
222 | }else if(item.type == 'zrz'){ | 223 | }else if(item.type == 'zrz'){ |
... | @@ -225,7 +226,8 @@ export default { | ... | @@ -225,7 +226,8 @@ export default { |
225 | path: '/'+item.type, | 226 | path: '/'+item.type, |
226 | query:{ | 227 | query:{ |
227 | source: 2, | 228 | source: 2, |
228 | bsm:item.bsm | 229 | bsm:item.bsm, |
230 | auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2' | ||
229 | } | 231 | } |
230 | }); | 232 | }); |
231 | }else if(item.type == 'dz'){ | 233 | }else if(item.type == 'dz'){ |
... | @@ -234,7 +236,8 @@ export default { | ... | @@ -234,7 +236,8 @@ export default { |
234 | path: '/'+item.type, | 236 | path: '/'+item.type, |
235 | query:{ | 237 | query:{ |
236 | source: 2, | 238 | source: 2, |
237 | bsm:item.bsm | 239 | bsm:item.bsm, |
240 | auth:this.$route.query.auth ? this.$route.query.auth :'0,1,2' | ||
238 | } | 241 | } |
239 | }); | 242 | }); |
240 | } | 243 | } | ... | ... |
... | @@ -128,7 +128,12 @@ import sxdr from '@components/sxdr/sxdr' | ... | @@ -128,7 +128,12 @@ import sxdr from '@components/sxdr/sxdr' |
128 | export default { | 128 | export default { |
129 | inheritAttrs: false, | 129 | inheritAttrs: false, |
130 | props: { | 130 | props: { |
131 | pd: {}, | 131 | pd: { |
132 | type:Array, | ||
133 | default: () => { | ||
134 | return []; | ||
135 | }, | ||
136 | }, | ||
132 | size: { | 137 | size: { |
133 | type: Number, | 138 | type: Number, |
134 | default: 16, | 139 | default: 16, |
... | @@ -196,7 +201,9 @@ export default { | ... | @@ -196,7 +201,9 @@ export default { |
196 | // } | 201 | // } |
197 | }, | 202 | }, |
198 | created() { | 203 | created() { |
204 | this.$nextTick(()=>{ | ||
199 | this.preDealData(this.pd); | 205 | this.preDealData(this.pd); |
206 | }) | ||
200 | // this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]); | 207 | // this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]); |
201 | }, | 208 | }, |
202 | 209 | ||
... | @@ -280,6 +287,9 @@ export default { | ... | @@ -280,6 +287,9 @@ export default { |
280 | }, | 287 | }, |
281 | preDealData(list) { | 288 | preDealData(list) { |
282 | //楼盘表目录树没有expand属性 | 289 | //楼盘表目录树没有expand属性 |
290 | // if(list == null){ | ||
291 | // return list | ||
292 | // }else{ | ||
283 | list.forEach((x) => { | 293 | list.forEach((x) => { |
284 | if (x.expand == undefined) this.$set(x, "expand", true); | 294 | if (x.expand == undefined) this.$set(x, "expand", true); |
285 | if (x.children && x.children.length > 0) { | 295 | if (x.children && x.children.length > 0) { |
... | @@ -287,6 +297,7 @@ export default { | ... | @@ -287,6 +297,7 @@ export default { |
287 | } | 297 | } |
288 | }); | 298 | }); |
289 | return list; | 299 | return list; |
300 | // } | ||
290 | }, | 301 | }, |
291 | // 根据id展开树的具体项 | 302 | // 根据id展开树的具体项 |
292 | expandTreeItemById(idList) { | 303 | expandTreeItemById(idList) { |
... | @@ -339,7 +350,8 @@ export default { | ... | @@ -339,7 +350,8 @@ export default { |
339 | } | 350 | } |
340 | }) | 351 | }) |
341 | } | 352 | } |
342 | }) | 353 | }); |
354 | this.$store.state.treeData = this.formatData; | ||
343 | }, | 355 | }, |
344 | //自然幢右键点击事件 | 356 | //自然幢右键点击事件 |
345 | openMenu(e,item){ | 357 | openMenu(e,item){ | ... | ... |
... | @@ -280,6 +280,7 @@ export default { | ... | @@ -280,6 +280,7 @@ export default { |
280 | if (res.success) { | 280 | if (res.success) { |
281 | this.pd = res.result; | 281 | this.pd = res.result; |
282 | this.$store.state.newZdbsm = ''; | 282 | this.$store.state.newZdbsm = ''; |
283 | this.$store.state.treeData = res.result; | ||
283 | } | 284 | } |
284 | }); | 285 | }); |
285 | }, | 286 | }, | ... | ... |
-
Please register or sign in to post a comment