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