| | |
| | | // 查看其父级是否有销售方式 |
| | | if (parent.saleMethod?.length > 0) { |
| | | // 父级是有销售方式直接显示按钮 |
| | | // const index = data.findIndex(i => i.id == parent.id) |
| | | parent.isShowIcon = true |
| | | } |
| | | // else { |
| | | // // 父级没有销售方式,查找该资源父级 |
| | | // const arr = parent.productLinkPath.split('\\') |
| | | // const linkData = arr[arr.length - 1] // arr[arr.length - 1] 排除自己 |
| | | // linkData.reverse() |
| | | // const dataList = linkData.map(ritem => { |
| | | // const parentData = data.find(citem => citem.id == ritem); |
| | | // if (parentData) return parentData; |
| | | // }) |
| | | // if (dataList?.length > 0) { |
| | | // const index = data.findIndex(i => i.id == dataList[0].id) |
| | | // data[index].isShowIcon = true |
| | | // } |
| | | // } |
| | | } else { |
| | | item.isShowIcon = true |
| | | } |
| | | } else { |
| | | this.handleSalmethodBtn(item.children, data, item) |
| | | if (item.children?.length > 0) { |
| | | this.handleSalmethodBtn(item.children, data, item) |
| | | } |
| | | } |
| | | } |
| | | return tree |