| | |
| | | // 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.clearTreeSealmethod(item.children, data, item) |
| | | if (item.children?.length > 0) { |
| | | this.clearTreeSealmethod(item.children, data, item) |
| | | } |
| | | } |
| | | } |
| | | return tree |
| | |
| | | // 单个勾选方法 |
| | | checkResoucrceInfo(tree, id) { |
| | | function findAndUpdate(node) { |
| | | if (node.sysType == "CmsFolder" && node.children.length > 0) { |
| | | if (node.sysType == "CmsFolder" && node.children?.length > 0) { |
| | | for (let index = 0; index < node.children.length; index++) { |
| | | const element = node.children[index]; |
| | | findAndUpdate(element); |