const chainData = [ { deptId: '1', deptName: 'A部门', chains: [ { chainId: '12', chainName: 'A部门-供应链1' }, { chainId: '13', chainName: 'A部门-供应链2' } ] } ]; const handleChainData = chainData.map(item => { const children = []; item.chains.forEach(chainItem => { children.push({ value: chainItem.chainId, label: chainItem.chainName, }); }); return { value: item.deptId, label: item.deptName, children, }; }); console.log(JSON.stringify(handleChainData));