This commit is contained in:
liang.chao 2025-12-08 17:46:20 +08:00
parent bdb0060bea
commit b8c781c1dc
2 changed files with 123 additions and 3 deletions

View File

@ -14,14 +14,19 @@
@on-load="onLoad" @on-load="onLoad"
> >
<template #menu-left> <template #menu-left>
<!-- 只有在非已审核通过状态时显示下发整改通知按钮 -->
<el-button <el-button
v-if="auditStatus !== '1'"
type="primary" type="primary"
plain plain
@click="showRectifyNoticeDialog" @click="showRectifyNoticeDialog"
> >
下发整改通知 下发整改通知
</el-button> </el-button>
<!-- 只有在待审批时显示同意归档按钮 -->
<el-button <el-button
v-if="auditStatus === '0'"
type="success" type="success"
plain plain
@click="agreeRectification" @click="agreeRectification"

View File

@ -8,6 +8,25 @@
</div> </div>
</el-card> </el-card>
<!-- 状态标题区域 -->
<div class="status-section" v-if="projectId && auditStatus" style="margin: 12px 0;">
<div class="status-header">
<h3 class="project-name">{{ selectedNode?.label || archiveForm.projectName || '未知工程' }}</h3>
<div class="status-container">
<div class="status-icon">
<component
:is="getStatusIcon()"
class="status-icon-svg"
:class="getStatusColorClass()"
/>
</div>
<div class="status-text" :class="getStatusColorClass()">
{{ getStatusText() }}
</div>
</div>
</div>
</div>
<el-row :gutter="24" class="content-row" v-if="projectId && auditStatus"> <el-row :gutter="24" class="content-row" v-if="projectId && auditStatus">
<el-col :span="8" class="pane-left"> <el-col :span="8" class="pane-left">
<LeftTree @handleNodeClick="handleNodeClick" :projectId="projectId" :auditStatus="auditStatus" /> <LeftTree @handleNodeClick="handleNodeClick" :projectId="projectId" :auditStatus="auditStatus" />
@ -16,12 +35,11 @@
<RightTable :selectedNode="selectedNode" :projectId="projectId" :auditStatus="auditStatus" /> <RightTable :selectedNode="selectedNode" :projectId="projectId" :auditStatus="auditStatus" />
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import LeftTree from './components/leftTree.vue' import LeftTree from './components/leftTree.vue'
import RightTable from './components/rightTable.vue' import RightTable from './components/rightTable.vue'
@ -41,6 +59,46 @@ const archiveForm = ref({
description: '' description: ''
}) })
//
const getStatusIcon = () => {
// auditStatus
if (auditStatus.value === '0') { //
return 'Clock';
} else if (auditStatus.value === '1') { //
return 'CircleCheck';
} else if (auditStatus.value === '2') { //
return 'Warning';
}
//
return 'Clock';
};
//
const getStatusText = () => {
// auditStatus
if (auditStatus.value === '0') { //
return '待审核';
} else if (auditStatus.value === '1') { //
return '已审核通过';
} else if (auditStatus.value === '2') { //
return '已下发整改';
}
//
return '待审核';
};
//
const getStatusColorClass = () => {
if (auditStatus.value === '0') { //
return 'status-pending';
} else if (auditStatus.value === '1') { //
return 'status-approved';
} else if (auditStatus.value === '2') { //
return 'status-rectification';
}
return 'status-pending';
};
// //
onMounted(() => { onMounted(() => {
projectId.value = route.query.id projectId.value = route.query.id
@ -100,6 +158,64 @@ const handleNodeClick = (data) => {
border-color: #dcdfe6; border-color: #dcdfe6;
} }
.status-section {
padding: 15px;
background-color: #f5f7fa;
border-radius: 4px;
margin-bottom: 12px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.status-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.project-name {
margin: 0;
font-size: 18px;
font-weight: bold;
color: #303133;
}
.status-container {
display: flex;
align-items: center;
gap: 8px;
}
.status-icon {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
}
.status-icon-svg {
width: 20px;
height: 20px;
}
.status-text {
font-size: 16px;
font-weight: 500;
}
/* 状态颜色类 */
.status-pending {
color: #d0891e; /* 灰色 - 待审核 */
}
.status-approved {
color: #67c23a; /* 绿色 - 已审核通过 */
}
.status-rectification {
color: #ff4747; /* 橙色 - 已下发整改 */
}
.content-row { .content-row {
min-height: calc(100vh - 200px); min-height: calc(100vh - 200px);
} }
@ -120,7 +236,6 @@ const handleNodeClick = (data) => {
overflow: hidden; overflow: hidden;
} }
.dialog-footer { .dialog-footer {
text-align: right !important; text-align: right !important;
} }