| @@ -126,7 +126,7 @@ const Dataset = () => { | |||||
| }; | }; | ||||
| const getDatasetVersions = (params) => { | const getDatasetVersions = (params) => { | ||||
| getDatasetVersionIdList(params).then((res) => { | getDatasetVersionIdList(params).then((res) => { | ||||
| setWordList(res.data); | |||||
| setWordList(res?.data?.content ?? []); | |||||
| }); | }); | ||||
| }; | }; | ||||
| const handleChange = (value) => { | const handleChange = (value) => { | ||||
| @@ -277,7 +277,9 @@ const Dataset = () => { | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div style={{ marginBottom: '10px', fontSize: '14px' }}> | <div style={{ marginBottom: '10px', fontSize: '14px' }}> | ||||
| {wordList.length > 0 ? wordList[0].description : null} | |||||
| {wordList.length > 0 && wordList[0].description | |||||
| ? '版本描述:' + wordList[0].description | |||||
| : null} | |||||
| </div> | </div> | ||||
| <Table columns={columns} dataSource={wordList} pagination={false} rowKey="id" /> | <Table columns={columns} dataSource={wordList} pagination={false} rowKey="id" /> | ||||
| </div> | </div> | ||||
| @@ -121,8 +121,7 @@ const Dataset = () => { | |||||
| }; | }; | ||||
| const getModelVersions = (params) => { | const getModelVersions = (params) => { | ||||
| getModelVersionIdList(params).then((ret) => { | getModelVersionIdList(params).then((ret) => { | ||||
| console.log(ret); | |||||
| setWordList(ret.data); | |||||
| setWordList(ret?.data?.content ?? []); | |||||
| }); | }); | ||||
| }; | }; | ||||
| const handleExport = async () => { | const handleExport = async () => { | ||||
| @@ -278,7 +277,9 @@ const Dataset = () => { | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div style={{ marginBottom: '10px', fontSize: '14px' }}> | <div style={{ marginBottom: '10px', fontSize: '14px' }}> | ||||
| {wordList.length > 0 ? wordList[0].description : null} | |||||
| {wordList.length > 0 && wordList[0].description | |||||
| ? '版本描述:' + wordList[0].description | |||||
| : null} | |||||
| </div> | </div> | ||||
| <Table columns={columns} dataSource={wordList} pagination={false} rowKey="id" /> | <Table columns={columns} dataSource={wordList} pagination={false} rowKey="id" /> | ||||
| </div> | </div> | ||||