This commit is contained in:
parent
09fc799b7d
commit
6e789330b3
|
|
@ -19,13 +19,11 @@
|
|||
>
|
||||
<!-- 自定义档案状态显示 -->
|
||||
<template #fileStatus="{ row }">
|
||||
<span :class="getFileStatusClass(row.fileStatus)">
|
||||
<el-tag :type="getFileStatusType(row.fileStatus)" effect="light">
|
||||
{{ formatFileStatus(row.fileStatus) }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<!-- 操作列 -->
|
||||
<template #menu="{ row }">
|
||||
<el-button
|
||||
|
|
@ -88,7 +86,7 @@ export default {
|
|||
label: '工程类型',
|
||||
prop: 'proType', //该列对应的数据字段名(即后端返回或提交时使用的 key)。
|
||||
search: true,
|
||||
type: 'select', //指定该字段在表单中的输入类型为“下拉选择框”
|
||||
type: 'select', //指定该字段在表单中的输入类型为"下拉选择框"
|
||||
dicUrl: '/blade-system/system/dict/data/type', // 接口地址
|
||||
dicMethod: 'post', // 指定为 POST 请求
|
||||
dicQuery: {
|
||||
|
|
@ -111,7 +109,7 @@ export default {
|
|||
label: '电压等级',
|
||||
prop: 'voltageLevel', //该列对应的数据字段名(即后端返回或提交时使用的 key)。
|
||||
search: true,
|
||||
type: 'select', //指定该字段在表单中的输入类型为“下拉选择框”
|
||||
type: 'select', //指定该字段在表单中的输入类型为"下拉选择框"
|
||||
dicUrl: '/blade-system/system/dict/data/type', // 接口地址
|
||||
dicMethod: 'post', // 指定为 POST 请求
|
||||
dicQuery: {
|
||||
|
|
@ -182,30 +180,30 @@ export default {
|
|||
beforeOpen(done, type, row) {
|
||||
done(); // 必须调用 done()
|
||||
},
|
||||
getFileStatusClass(status) {
|
||||
formatFileStatus(status) {
|
||||
switch (status) {
|
||||
case '0':
|
||||
return 'status-not-archived'; // 未归档移交
|
||||
return '未归档移交';
|
||||
case '1':
|
||||
return 'status-checked'; // 已确认完整性
|
||||
return '已确认完整性';
|
||||
case '2':
|
||||
return 'status-archived'; // 已归档移交
|
||||
return '已归档移交';
|
||||
default:
|
||||
return '';
|
||||
return '未知状态';
|
||||
}
|
||||
},
|
||||
getFileStatusType(status) {
|
||||
switch (status) {
|
||||
case '0':
|
||||
return 'warning'; // 黄色 - 未归档移交
|
||||
case '1':
|
||||
return 'primary'; // 蓝色 - 已确认完整性
|
||||
case '2':
|
||||
return 'success'; // 绿色 - 已归档移交
|
||||
default:
|
||||
return 'info'; // 灰色 - 未知状态
|
||||
}
|
||||
},
|
||||
formatFileStatus(status) {
|
||||
switch (status) {
|
||||
case '0':
|
||||
return '未归档移交';
|
||||
case '1':
|
||||
return '已确认完整性';
|
||||
case '2':
|
||||
return '已归档移交';
|
||||
default:
|
||||
return '未知状态';
|
||||
}
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
|
|
@ -262,17 +260,4 @@ export default {
|
|||
};
|
||||
</script>
|
||||
|
||||
<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>
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
>
|
||||
<!-- 自定义档案状态显示 -->
|
||||
<template #auditStatus="{ row }">
|
||||
{{
|
||||
getStatusText(row.auditStatus)
|
||||
}}
|
||||
<el-tag :type="getStatusType(row.auditStatus)" effect="light">
|
||||
{{ getStatusText(row.auditStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
|
|
@ -126,6 +126,18 @@ export default {
|
|||
return '未知状态'
|
||||
}
|
||||
},
|
||||
getStatusType(status) {
|
||||
switch (status) {
|
||||
case '0':
|
||||
return 'warning'; // 黄色 - 待审批
|
||||
case '1':
|
||||
return 'success'; // 绿色 - 审批通过
|
||||
case '2':
|
||||
return 'danger'; // 红色 - 审批驳回
|
||||
default:
|
||||
return 'info'; // 灰色 - 未知状态
|
||||
}
|
||||
},
|
||||
searchReset() {
|
||||
this.query = {};
|
||||
this.onLoad(this.page);
|
||||
|
|
|
|||
Loading…
Reference in New Issue