This commit is contained in:
liang.chao 2025-11-29 14:05:05 +08:00
parent 6b33583f74
commit 06fbca491f
1 changed files with 29 additions and 4 deletions

View File

@ -19,9 +19,9 @@
>
<!-- 自定义档案状态显示 -->
<template #fileStatus="{ row }">
{{
formatFileStatus(row.fileStatus)
}}
<span :class="getFileStatusClass(row.fileStatus)">
{{ formatFileStatus(row.fileStatus) }}
</span>
</template>
@ -181,6 +181,18 @@ export default {
methods: {
beforeOpen(done, type, row) {
done(); // done()
},
getFileStatusClass(status) {
switch (status) {
case '0':
return 'status-not-archived'; //
case '1':
return 'status-checked'; //
case '2':
return 'status-archived'; //
default:
return '';
}
},
formatFileStatus(status) {
switch (status) {
@ -250,4 +262,17 @@ export default {
};
</script>
<style></style>
<style>
.status-not-archived {
color: #f56c6c; /* 红色 */
background-color: #fef0f0;
}
.status-checked {
color: #e6a23c; /* 橙色(或你可选蓝色 #409eff */
background-color: #fdf6ec;
}
.status-archived {
color: #67c23a; /* 绿色 */
background-color: #f0f9eb;
}
</style>