去掉空children

lijinlong^2
吕天方 1 year ago
parent 75632c5988
commit 3c93731fe2

@ -423,6 +423,15 @@ export default {
this.nextStep = false; this.nextStep = false;
this.filtrate(); this.filtrate();
this.nextText = "下一步"; this.nextText = "下一步";
// this.multipleSelection.forEach((_item)=>{
// this.tableData.map((item)=>{
// if(_item.uscCode == item.uscCode){
// this.$nextTick(() => {
// this.$refs.multipleTable.toggleRowSelection(item);
// });
// }
// })
// })
this.multipleSelection.map((item)=>{ this.multipleSelection.map((item)=>{
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(item); this.$refs.multipleTable.toggleRowSelection(item);
@ -654,7 +663,7 @@ export default {
// //
pagesChange(pages) { pagesChange(pages) {
this.pages = pages; this.pages = pages;
console.log(this.form) // console.log(this.form)
if(this.dept.ancestors.split(',').length == 2){ if(this.dept.ancestors.split(',').length == 2){
if(Array.isArray(this.form.subdistrict)) { if(Array.isArray(this.form.subdistrict)) {
this.subdistrict = this.form.subdistrict.slice(1, 8); this.subdistrict = this.form.subdistrict.slice(1, 8);
@ -795,6 +804,9 @@ export default {
// }) // })
item.map((item)=>{ item.map((item)=>{
item.children.map((itemTwo)=>{ item.children.map((itemTwo)=>{
if(itemTwo.children.length == 0){
delete itemTwo.children;
}
itemTwo.county = itemTwo.subdistrict itemTwo.county = itemTwo.subdistrict
}) })
}) })

Loading…
Cancel
Save