| | |
| | | loading: false, |
| | | openTeachids: result |
| | | }) |
| | | console.log('教学资源', this.data.teach); |
| | | console.log('教学资源', this.data.teach, this.data.applyState); |
| | | } else if (type.refCode == 'jsek_cloudLearning') { |
| | | // res.datas.cmsDatas[0].datas.forEach(item => { |
| | | // item.checked = false |
| | |
| | | url: "/packageDomain/pages/sampleBookList/applicationForm/index", |
| | | }); |
| | | }, |
| | | |
| | | handleTree() { |
| | | // const child = this.selectComponent('#teach-tree') |
| | | let tree |
| | | // let openIds = child.data.openIds |
| | | if (this.data.tabValue == 'jsek_teachingResources') { |
| | | tree = this.data.teach |
| | | } else { |
| | | tree = this.data.learn |
| | | } |
| | | for (let index = 0; index < tree.length; index++) { |
| | | const item = tree[index]; |
| | | if (item.children && item.children.length > 0) { |
| | | const num = this.data.openTeachids.findIndex(citem => item.id == citem) |
| | | if (num >= 0) { |
| | | item.open = true |
| | | } else { |
| | | item.open = false |
| | | } |
| | | this.handleTree(item.children) |
| | | } |
| | | } |
| | | this.setData({ |
| | | teach: tree |
| | | }) |
| | | }, |
| | | }) |