<テンプレート> <! -ノードを追加する前に、checkable-ボックス- > <A-ツリー defaultExpandAll :autoExpandParent = "trueに" :treeData = "treeData" @ SELECT = "this.onSelect" /> </テンプレート> データ(){ リターン{ // expandedKeys:[ '0-0-0'、 '0-0-1'] //指定ツリーノード展開するように制御 autoExpandParentを:真、自動的に親ノード展開するかどうか// // checkedKeysを:[ '0-0-0'] //選択された制御されたツリーノード // selectedKeys:[] //(制御)選択されたツリーノード設定 treeData:[{ タイトル: '選手:'、 キー: '0-0'、 子供:[] }]、 getPeopleTree(this.queryParam) .then(RES => { } IF(res.code && res.code!== 200){ この。$ message.error(res.message) } IF(res.data!== NULL){ this.peopleTreeData = res.data [0] .course_list //训练数据 this.treeData [0] .TITLE = res.data [0] .MEMBER //训练人名字 のために(VAR I = 0; I <res.data [0] .course_list.length; iは++){ VAR辞書= {タイトル: ''、キー: ''} dict.title = res.data [0] .course_list [I] .course_name + ' - ' + res.data [0] .course_list [I] .course_times 辞書。キー= res.data [0] .course_list [i]は.course_id this.treeData [0] .children.push(辞書) //はconsole.log( '最后的数据' + JSON.stringify(これは。treeData)) //トレーニングコース番号 //はconsole.log( '训练课程ID' + res.data [0] .course_list [0] .course_id) }他{ this.peopleTreeData = [] this.treeData [0] .TITLE = '暂无记录' } this.loading =偽 )} .catch((エラー)=> { にconsole.log(エラー) であれば(error.message === '6000msのタイムアウトを超え'){ この。$のmessage.error( '网络超时') } this.loading = FALSE }) }) }、 {)にonSelect(selectedKeys、情報を //はconsole.log( '点击的人的信息' + JSON.stringify(selectedKeys [0])) this.xunlian = selectedKeys [0] CONST getparam = { Course_IDに:selectedKeys [0] 、 USER_ID:this.queryParamを。ユーザーID }