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 }"> <template #fileStatus="{ row }">
{{ <span :class="getFileStatusClass(row.fileStatus)">
formatFileStatus(row.fileStatus) {{ formatFileStatus(row.fileStatus) }}
}} </span>
</template> </template>
@ -181,6 +181,18 @@ export default {
methods: { methods: {
beforeOpen(done, type, row) { beforeOpen(done, type, row) {
done(); // done() 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) { formatFileStatus(status) {
switch (status) { switch (status) {
@ -250,4 +262,17 @@ export default {
}; };
</script> </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>