This commit is contained in:
parent
bdb0060bea
commit
b8c781c1dc
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue