getSenLevel = (params, index = 1, size = 10) => { params.pageIndex = index; params.pageSize = size let test = null const listValue = [] let test01 = [] listSafeDataTypeWithSubtypes(params).then(response => { defaultHandleResponse( response, resultObject => { const { rows } = resultObject rows.map((o, ind) => { const children = [] const { typeId, typeName } = o.safeDataType test = { value: `${typeId}+${typeName}`, title: typeName, disabled: true, //禁止选择 key: `0-${ind}` } o.subtypes.map((v, indx) => { test01 = { value: v.subtypeId, title: v.subtypeName, key: `0-${ind}-${indx}` } children.push(test01) return o }) test.children = children listValue.push(test) return o }) this.setState({ list: listValue }) }, ) }) }