提交记录排序
This commit is contained in:
parent
92ee88a961
commit
6da442b49e
|
|
@ -331,11 +331,17 @@ const isImageUrl = (url) => {
|
|||
|
||||
// 转换提交记录数据
|
||||
const transformSubmitRecords = (submitList) => {
|
||||
if (!Array.isArray(submitList) || submitList.length === 0) {
|
||||
if (!Array.isArray(submitList) || submitList.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const sortedList = [...submitList].sort((a, b) => {
|
||||
const timeA = a?.createTime ? new Date(a.createTime).getTime() : 0;
|
||||
const timeB = b?.createTime ? new Date(b.createTime).getTime() : 0;
|
||||
return timeB - timeA;
|
||||
});
|
||||
|
||||
return submitList.map(item => {
|
||||
return sortedList.map(item => {
|
||||
// 处理附件:可能是逗号分隔的URL字符串
|
||||
let imageAttachments = [];
|
||||
let fileAttachments = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user