| | |
| | | // 扁平化数据转换tree |
| | | getTreeList(rootList, pathLength, newArr, path) { |
| | | for (const item of rootList) { |
| | | if (item.productLinkPath.length == pathLength && item.productLinkPath.includes(path)) { |
| | | if ((pathLength - item.productLinkPath.length >= 0 && pathLength - item.productLinkPath.length <= 3) && item.productLinkPath.includes(path)) { |
| | | if (item.sysType == 'CmsItem') { |
| | | if (item.selectType == 'webpage') { |
| | | item.disabled = true |
| | |
| | | // }) |
| | | // } |
| | | // debugger |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, 17, list, '\\') |
| | | const num = query.cmsPath.length + 6 |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\') |
| | | list = this.ensureTreeConsistency(list) |
| | | list = this.changeResourceChildren(list) |
| | | console.log('修改后云', list); |