feat: 数据集数据结构修改

This commit is contained in:
cp3hnu 2024-04-09 13:40:51 +08:00
parent a00d861ab1
commit 2490a5c4c5
2 changed files with 8 additions and 5 deletions

View File

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

View File

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