Browse Source

区域列表面积显示

master
zhanyunjiu 3 years ago
parent
commit
df5bb0c932
  1. 6
      src/views/farm/area/index.vue

6
src/views/farm/area/index.vue

@ -157,17 +157,17 @@ export default {
if(filterList.length == 0){
//
this.list.forEach(t => {
oneList.push({id:one.id, name:one.name, occupied:one.occupied, createTime:one.createTime, children:twoList});
oneList.push({id:one.id, name:one.name, occupied:one.occupied, area:one.area, createTime:one.createTime, children:twoList});
})
}else{
filterList.forEach((one) => {
let twoList = [];
this.list.forEach((two) => {
if(one.id == two.parentId){
twoList.push({id:two.id, name:two.name, occupied:two.occupied, createTime:two.createTime})
twoList.push({id:two.id, name:two.name, occupied:two.occupied, area:two.area, createTime:two.createTime})
}
})
oneList.push({id:one.id, name:one.name, occupied:one.occupied, createTime:one.createTime, children:twoList});
oneList.push({id:one.id, name:one.name, occupied:one.occupied, area:one.area, createTime:one.createTime, children:twoList});
})
}
this.list = oneList;

Loading…
Cancel
Save