fix: 修复项目详情上传时间展示

This commit is contained in:
wkc
2026-03-05 15:45:20 +08:00
parent bd0b25d059
commit 848640e284

View File

@@ -86,7 +86,11 @@
{{ scope.row.enterpriseNames || '-' }}
</template>
</el-table-column>
<el-table-column prop="uploadTime" label="上传时间" width="160"></el-table-column>
<el-table-column prop="uploadTime" label="上传时间" width="180">
<template slot-scope="scope">
{{ formatUploadTime(scope.row.uploadTime) }}
</template>
</el-table-column>
<el-table-column prop="uploadUser" label="上传人" width="100"></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
@@ -298,6 +302,7 @@ import {
getFileUploadList,
getFileUploadStatistics,
} from "@/api/ccdiProjectUpload";
import { parseTime } from "@/utils/ruoyi";
export default {
name: "UploadData",
@@ -996,6 +1001,11 @@ export default {
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
},
/** 格式化上传时间 */
formatUploadTime(time) {
const formatted = parseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
return formatted || "-";
},
},
};
</script>