|
|
@ -294,7 +294,7 @@ export default { |
|
|
|
if(e.children.length>0){// 若有下级 |
|
|
|
if(e.children.length>0){// 若有下级 |
|
|
|
if(e.children[0].children.length===0){// 找到下级的下级若无子级,则赋值勾选 |
|
|
|
if(e.children[0].children.length===0){// 找到下级的下级若无子级,则赋值勾选 |
|
|
|
action = e.children[0].id |
|
|
|
action = e.children[0].id |
|
|
|
}else{// 只招两层 |
|
|
|
}else{// 直接赋值 |
|
|
|
action = e.children[0].children[0].id |
|
|
|
action = e.children[0].children[0].id |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -342,7 +342,7 @@ export default { |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectType(index,indexPath){ |
|
|
|
selectType(index,indexPath){// 点击事件 |
|
|
|
let introduce = '' |
|
|
|
let introduce = '' |
|
|
|
this.keyword = '' |
|
|
|
this.keyword = '' |
|
|
|
let list = this.typeList |
|
|
|
let list = this.typeList |
|
|
@ -362,7 +362,37 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(!introduce) introduce = list.find(n => n.id == indexPath[0]).introduce |
|
|
|
if(!introduce) introduce = list.find(n => n.id == indexPath[0]).introduce |
|
|
|
this.defaultType = index |
|
|
|
|
|
|
|
|
|
|
|
if(indexPath.length>=2){ |
|
|
|
|
|
|
|
let clikckId = indexPath[indexPath.length-1] |
|
|
|
|
|
|
|
let select |
|
|
|
|
|
|
|
function getSelect(arr){ |
|
|
|
|
|
|
|
if(arr.length>0){ |
|
|
|
|
|
|
|
arr.map(e=>{ |
|
|
|
|
|
|
|
if(e.id==clikckId){ |
|
|
|
|
|
|
|
if(e.children.length===0){ |
|
|
|
|
|
|
|
select = e.id |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
if(e.children[0].children.length>0){ |
|
|
|
|
|
|
|
select = e.children[0].children[0].id |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
select = e.children[0].id |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
getSelect(e.children) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getSelect(this.typeList) |
|
|
|
|
|
|
|
console.log(select,'dig'); |
|
|
|
|
|
|
|
this.defaultType = select |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.defaultType = index |
|
|
|
|
|
|
|
} |
|
|
|
this.introduce = introduce |
|
|
|
this.introduce = introduce |
|
|
|
this.previewHead = [] |
|
|
|
this.previewHead = [] |
|
|
|
this.previewData = [] |
|
|
|
this.previewData = [] |
|
|
@ -384,7 +414,7 @@ export default { |
|
|
|
return result |
|
|
|
return result |
|
|
|
}, |
|
|
|
}, |
|
|
|
openType(index,indexPath){ |
|
|
|
openType(index,indexPath){ |
|
|
|
// console.log(11,this.typeList) |
|
|
|
console.log(11,this.typeList) |
|
|
|
let id = this.findId(this.typeList,index) |
|
|
|
let id = this.findId(this.typeList,index) |
|
|
|
this.selectType(id,indexPath) |
|
|
|
this.selectType(id,indexPath) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -597,7 +627,7 @@ export default { |
|
|
|
background-color: #fff; |
|
|
|
background-color: #fff; |
|
|
|
border: 1px solid #e6e6e6; |
|
|
|
border: 1px solid #e6e6e6; |
|
|
|
border-radius: 5px; |
|
|
|
border-radius: 5px; |
|
|
|
|
|
|
|
|
|
|
|
input{ |
|
|
|
input{ |
|
|
|
width: 195px; |
|
|
|
width: 195px; |
|
|
|
margin-left: 10px; |
|
|
|
margin-left: 10px; |
|
|
|