我正在尝试使用React-Table npm包在表单元的项目符号列表中动态呈现数据。我能够呈现一个项目符号列表,但是它返回了JSON结构中的所有“ Route”数组,而我只想将对应的Route数据返回到每个单元格。我还提供了当前代码和数据JSON结构。
render() {
const data = this.state.testData
const exportData = this.state.csvData
return (
<React.Fragment>
<div>
<ReactTable
ref={(r)=>this.reactTable=r}
data={data}
columns={[
{
Header: "Subhead",
columns: [
{
Header: "Label",
accessor: "Label",
width: 140,
className: 'bold_label'
},
{
Header: "Channel Number",
headerClassName: 'small_th', // Set the classname of the `th` element of the column
accessor: "Channel_Number",
width: 55,
className: 'center_col '
},
{
Header: "FEC Type",
accessor: "FEC_Type",
width: 65,
className: 'center_col'
},
{
Header: "Latency",
accessor: "Latency",
width: 75,
className: 'center_col'
},
{
Header: "Utilized Bandwidth Gbps",
accessor: "Utilized_Bandwidth_Gbps",
className: 'center_col'
},
]
},
{
Header: "Subhead",
columns: [
{
Header: "Wavelength Distance",
accessor: "Wavelength_Distance",
className: 'center_col',
width: 75,
},
{
Header: "Channel Capacity Gbps",
accessor: "Channel_Capacity_Gbps",
},
{
Header: "Channel Capacity ODU",
accessor: "Channel_Capacity_ODU",
},
{
Header: "Free Bandwith Gbps",
accessor: "Free_Bandwith_Gbps",
},
{
Header: "Free Bandwith ODU",
accessor: "Free_Bandwith_ODU",
},
{
Header: "OSNR",
accessor: "OSNR",
width: 45,
},
{
Header: "OSNR Threshold",
accessor: "OSNR_Threshold"
},
]
},
{
Header: "Subhead",
columns: [
{
Header: "Pre FEC BER",
accessor: "Pre_FEC_BER",
className: 'center_col'
},
{
Header: "Route",
accessor: () => data.map(data => {
return (
<ul>
<li>{data.Route}</li>
</ul>
)
}),
id: "Route",
width: 200,
},
]
}
]}
defaultPageSize={10}
className="-striped -highlight"
/>
<br />
</div>
{
"Data": [
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 1,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-7-B-OSN6800_3:TPE_3-14-1_PTP::9-9-C-OSN6800_3:TPE_3-14-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 1529.16
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 80,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-1-lab-A-OSN6800_1:TPE_1-8-1_PTP::9-9-C-OSN6800_1:TPE_1-8-1_PTP",
"Latency": 10.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94b48b-670f-493a-9b55-c6a9b56b0288",
"5c94b485-6c76-4877-9ae2-d6a34e1062ff"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 1560.61
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 15,
"FEC_Type": "SDFEC2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "M96HD01-MUE01-U16_0:TPE_0-1-2_PTP::M96HD01-A2E01-U16_0:TPE_0-1-2_PTP",
"Latency": 70.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": 0.0,
"Route": [
"5c94b489-c799-4aae-a707-67003f658dea",
"5c94b488-4e22-48d7-9932-c154cf89ce25",
"5c94b487-943a-40e0-ad61-1b6da491f90b",
"5c94b488-411e-46e1-b234-dbc9d6b7ff42",
"5c94b489-0d88-49a2-9f42-36345b64d1fe",
"5c94b487-35f7-4500-875e-43ed88c74e51"
],
"Utilized_Bandwidth_Gbps": 8,
"Utilized_Bandwidth_ODU": 6.666666666666667,
"Wavelength_Distance": 1534.64
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": null,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-7-B-OSN6800_3:TPE_3-2-1_PTP::9-9-C-OSN6800_3:TPE_3-2-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": null
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 74,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-9-C-OSN6800_1:TPE_1-11-4_PTP::9-7-B-OSN6800_1:TPE_1-8-1_PTP",
"Latency": 10.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 1558.17
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 10,
"FEC_Type": "SDFEC2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "M96HD01-A2E01-U32_0:TPE_0-1-1_PTP::M96HD01-M3Q01-U32_0:TPE_0-3-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": 0.0,
"Route": [
"5c94b486-2c47-49ef-9305-c478b501f2e2",
"5c94b487-5bb2-45cc-9bdf-1736e6f276c1",
"5c94b486-37c6-4feb-b260-bad91ca53952",
"5c94b48a-7618-4fd9-b0b5-8c5377223240"
],
"Utilized_Bandwidth_Gbps": 33,
"Utilized_Bandwidth_ODU": 27.5,
"Wavelength_Distance": 1532.68
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 80,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-1-lab-A-OSN6800_1:TPE_1-11-1_PTP::9-9-C-OSN6800_1:TPE_1-11-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 8,
"Utilized_Bandwidth_ODU": 6.666666666666667,
"Wavelength_Distance": 1560.61
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": null,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-9-C-OSN6800_3:TPE_3-14-4_PTP::9-7-B-OSN6800_3:TPE_3-14-4_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": null
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 40,
"FEC_Type": "SDFEC2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "M96HD01-MUE01-U16_0:TPE_0-1-1_PTP::M96HD01-A2E01-U16_0:TPE_0-1-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": 0.0,
"Route": [
"5c94b488-95e5-4f83-8dad-deffcee3a027",
"5c94b489-86a2-444a-85d7-e54a8d7c68fd"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 1544.53
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 11,
"FEC_Type": "SDFEC2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "M96HD01-M3Q01-U32_0:TPE_0-3-2_PTP::M96HD01-MUE01-U32_0:TPE_0-1-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": 0.0,
"Route": [
"5c94b48a-af6c-4c24-8e91-5dea4918d48d",
"5c94b48b-12ce-4aef-bf4f-f538477418ec"
],
"Utilized_Bandwidth_Gbps": 33,
"Utilized_Bandwidth_ODU": 27.5,
"Wavelength_Distance": 1533.07
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 76,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-1-lab-A-OSN6800_1:TPE_1-11-3_PTP::9-9-C-OSN6800_1:TPE_1-11-3_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 8,
"Utilized_Bandwidth_ODU": 6.666666666666667,
"Wavelength_Distance": 1558.98
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": null,
"FEC_Type": "",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "9-7-B-OSN6800_3:TPE_3-1-1_PTP::9-9-C-OSN6800_3:TPE_3-1-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": null
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 30,
"FEC_Type": "SDFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "M96HD01-MUE01-U32_0:TPE_0-8-1_PTP::M96HD01-A2E01-U32_0:TPE_0-8-1_PTP",
"Latency": 0.0,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": 0.000323,
"Route": [
"5c94b488-95e5-4f83-8dad-deffcee3a027",
"5c94b489-86a2-444a-85d7-e54a8d7c68fd"
],
"Utilized_Bandwidth_Gbps": 25,
"Utilized_Bandwidth_ODU": 20.833333333333336,
"Wavelength_Distance": 1540.56
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 85,
"FEC_Type": "SDFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE4/130SNX10-2-15-L1-1 NODE6/130SNX10-2-13-L1-1 ODU4 OTU4#1 ODU4:1",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a6-5cd7-449f-a85f-0beae3bd24dc",
"5c94c5a5-85a7-4c41-8ca5-7b986a803c7c"
],
"Utilized_Bandwidth_Gbps": 32,
"Utilized_Bandwidth_ODU": 26.666666666666668,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 69,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE1-PSS4/11DPM12-2-7-L1-1 NODE2-PSS4/11DPM12-2-7-L2-1 _296:1",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-057c-4cbe-a36e-aa31502d3dca",
"5c94c5a5-27ca-4ddf-9996-dc203d92f611"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 87,
"FEC_Type": "EFEC2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE4/11STMM10-2-14-L1 NODE6/11STMM10-2-7-L1 OTU2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a6-5cd7-449f-a85f-0beae3bd24dc",
"5c94c5a5-85a7-4c41-8ca5-7b986a803c7c"
],
"Utilized_Bandwidth_Gbps": 4,
"Utilized_Bandwidth_ODU": 3.3333333333333335,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 52,
"FEC_Type": "SDFEC-G2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE5/OTU-1-9-L1 NODE7/OTU-1-9-L1 OTU4",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-b1c0-46df-b739-6bbc6cb519da",
"5c94c5a6-3fb7-464a-a564-c356af83e996",
"5c94c5a5-7a63-4d0c-93fc-13c89aef1e5a",
"5c94c5a5-518b-4fa3-9c2b-153f2b92d109",
"5c94c5a5-1cba-4147-950f-2a01c5b43319",
"5c94c5a5-2911-4961-8fd1-2ff10e44a344"
],
"Utilized_Bandwidth_Gbps": 8,
"Utilized_Bandwidth_ODU": 6.666666666666667,
"Wavelength_Distance": 160
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 43,
"FEC_Type": "SDFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE5#OCS/OTUODU4-1-1-17-1 NODE6#OCS/OTUODU4-1-1-7-1 ODU4",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a6-8ca8-4501-8fc2-85b801c5eab7",
"5c94c5a5-bf60-47dd-a65a-b1421c0e5bad",
"5c94c5a5-1cba-4147-950f-2a01c5b43319",
"5c94c5a5-2911-4961-8fd1-2ff10e44a344"
],
"Utilized_Bandwidth_Gbps": 24,
"Utilized_Bandwidth_ODU": 20.0,
"Wavelength_Distance": 160
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 75,
"FEC_Type": null,
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE5/OCH-2-6-1 NODE7/OCH-2-6-1 OTU4X2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-1cba-4147-950f-2a01c5b43319",
"5c94c5a5-2911-4961-8fd1-2ff10e44a344"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 160
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 51,
"FEC_Type": null,
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE7/OCH-2-6-2 NODE5/OCH-2-6-2 OTU4X2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-1cba-4147-950f-2a01c5b43319",
"5c94c5a5-2911-4961-8fd1-2ff10e44a344"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 160
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 69,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE1-PSS4/11DPM12-2-7-L2-1 NODE3-PSS4/11DPM12-2-7-L1-1 _311:1",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-bb69-451e-9162-82bcda094493",
"5c94c5a5-d268-413a-bd02-af497640c390"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 41,
"FEC_Type": "SDFEC-G2",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE4/OCH-2-11-L1 NODE6/OCH-2-8-L1 OTU4X2 ODU4:1 ODU4#2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-b1c0-46df-b739-6bbc6cb519da",
"5c94c5a6-3fb7-464a-a564-c356af83e996",
"5c94c5a5-7a63-4d0c-93fc-13c89aef1e5a",
"5c94c5a5-518b-4fa3-9c2b-153f2b92d109",
"5c94c5a6-8ca8-4501-8fc2-85b801c5eab7",
"5c94c5a5-bf60-47dd-a65a-b1421c0e5bad",
"5c94c5a5-3e64-480b-b512-54f0ed736abe",
"5c94c5a5-2807-488a-b354-b88c7b12f106"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 67,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE1-PSS4/11DPM12-2-8-L1-1 NODE2-PSS4/11DPM12-2-8-L2-1 _299:2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-057c-4cbe-a36e-aa31502d3dca",
"5c94c5a5-27ca-4ddf-9996-dc203d92f611"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 50,
"FEC_Type": null,
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE7/OCH-2-10-2 NODE5/OCH-2-10-2 OTU4X2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-b1c0-46df-b739-6bbc6cb519da",
"5c94c5a6-3fb7-464a-a564-c356af83e996",
"5c94c5a5-7a63-4d0c-93fc-13c89aef1e5a",
"5c94c5a5-518b-4fa3-9c2b-153f2b92d109"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 69,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE2-PSS4/11DPM12-2-7-L1-1 NODE3-PSS4/11DPM12-2-7-L2-1 _305:1",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-4d87-4d69-bdcd-521a36a245f4",
"5c94c5a5-9c57-4404-99b1-de339f22bea3"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 39,
"FEC_Type": "SDFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE4/OCH-1-11-L1 NODE6/OCH-1-11-L1 OTU4X2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-b1c0-46df-b739-6bbc6cb519da",
"5c94c5a6-3fb7-464a-a564-c356af83e996",
"5c94c5a5-3e64-480b-b512-54f0ed736abe",
"5c94c5a5-2807-488a-b354-b88c7b12f106",
"5c94c5a6-5cd7-449f-a85f-0beae3bd24dc",
"5c94c5a5-85a7-4c41-8ca5-7b986a803c7c"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 20
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 50,
"FEC_Type": null,
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE7/OCH-2-10-1 NODE5/OCH-2-10-1 OTU4X2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a6-8ca8-4501-8fc2-85b801c5eab7",
"5c94c5a5-bf60-47dd-a65a-b1421c0e5bad",
"5c94c5a5-3e64-480b-b512-54f0ed736abe",
"5c94c5a5-2807-488a-b354-b88c7b12f106"
],
"Utilized_Bandwidth_Gbps": 40,
"Utilized_Bandwidth_ODU": 33.333333333333336,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 67,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE2-PSS4/11DPM12-2-8-L1-1 NODE3-PSS4/11DPM12-2-8-L2-1 _302:2",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-4d87-4d69-bdcd-521a36a245f4",
"5c94c5a5-9c57-4404-99b1-de339f22bea3"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 43,
"FEC_Type": "SDFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "NODE5#OCS/OTUODU4-1-1-7-1 NODE6#OCS/OTUODU4-1-1-17-1 ODU4",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-3e64-480b-b512-54f0ed736abe",
"5c94c5a5-2807-488a-b354-b88c7b12f106"
],
"Utilized_Bandwidth_Gbps": 8,
"Utilized_Bandwidth_ODU": 6.666666666666667,
"Wavelength_Distance": 10
},
{
"Central_Frequency_Division": "?",
"Channel_Capacity_Gbps": null,
"Channel_Capacity_ODU": null,
"Channel_Number": 67,
"FEC_Type": "EFEC",
"Free_Bandwidth_Gbps": null,
"Free_Bandwidth_ODU": null,
"Label": "Test_SA_CWDM",
"Latency": null,
"OSNR": null,
"OSNR_Threshold": null,
"Pre_FEC_BER": null,
"Route": [
"5c94c5a5-bb69-451e-9162-82bcda094493",
"5c94c5a5-d268-413a-bd02-af497640c390"
],
"Utilized_Bandwidth_Gbps": 0,
"Utilized_Bandwidth_ODU": 0.0,
"Wavelength_Distance": 0
}
],
"Meta": {
"limit": 100,
"offset": 0,
"records": 30,
"total": 30
}
}
答案 0 :(得分:0)
要动态设置单元格的内容,需要为每列使用道具Cell
。
您需要更改Route
列的单元格内容。要显示您的单元格的相应路线,请执行以下操作:
{
Header: "Route",
accessor: "Route",
Cell: row =>
row.row.original.Route.map(route => (
<ul>
<li>{route}</li>
</ul>
)),
id: "Route",
width: 200
}
这将显示该行相应路线的项目符号列表。