This commit is contained in:
liang.chao 2025-12-09 13:10:08 +08:00
parent 6f7403e453
commit ca318f3f6f
2 changed files with 143 additions and 28 deletions

View File

@ -30,3 +30,10 @@ export function agreeRectificationApi(data) {
data: data, data: data,
}) })
} }
export function transferAuditDetailApi(data) {
return request({
url: '/blade-system/archivingManage/transferAuditDetail',
method: 'POST',
data: data,
})
}

View File

@ -30,6 +30,24 @@
<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" />
<div class="audit-status-section">
<h4>责任单位审核情况</h4>
<div class="audit-list">
<div
v-for="(item, index) in auditList"
:key="index"
class="audit-item"
>
<span class="dept-name">{{ item.deptName }}</span>
<el-tag
:type="getAuditTagType(item.auditStatus)"
size="small"
>
{{ getAuditStatusText(item.auditStatus) }}
</el-tag>
</div>
</div>
</div>
</el-col> </el-col>
<el-col :span="16" class="pane-right"> <el-col :span="16" class="pane-right">
<RightTable :selectedNode="selectedNode" :projectId="projectId" :auditStatus="auditStatus" /> <RightTable :selectedNode="selectedNode" :projectId="projectId" :auditStatus="auditStatus" />
@ -39,25 +57,29 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, computed } 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';
import { import {
getProjectNameByIdApi, getProjectNameByIdApi
} from '@/api/archivesManagement/fileManager/fileManager'; } from '@/api/archivesManagement/fileManager/fileManager';
import {
transferAuditDetailApi
} from '@/api/archivesManagement/archivingManage';
const route = useRoute() const route = useRoute();
const router = useRouter() const router = useRouter();
// //
const projectId = ref(null) const projectId = ref(null);
const auditStatus = ref(null) const auditStatus = ref(null);
const selectedNode = ref(null) const selectedNode = ref(null);
const archiveForm = ref({ const archiveForm = ref({
projectName: '', projectName: '',
description: '' description: ''
}) });
const auditList = ref([]);
// //
const getStatusIcon = () => { const getStatusIcon = () => {
@ -99,40 +121,84 @@ const getStatusColorClass = () => {
return 'status-pending'; return 'status-pending';
}; };
//
const getAuditTagType = (status) => {
if (status === '0') { //
return 'warning';
} else if (status === '1') { //
return 'success';
} else if (status === '2') { //
return 'danger';
}
return 'info';
};
//
const getAuditStatusText = (status) => {
if (status === '0') { //
return '待审核';
} else if (status === '1') { //
return '已通过';
} else if (status === '2') { //
return '下发整改';
}
return '未知';
};
//
const getAuditInfo = async () => {
try {
const res = await transferAuditDetailApi({
proId: projectId.value
});
if (res.data?.code === 200) {
auditList.value = res.data.data || [];
} else {
console.error('获取审核信息失败:', res.data?.message || '接口返回错误');
auditList.value = [];
}
} catch (error) {
console.error('获取审核信息失败:', error);
auditList.value = [];
}
};
// //
onMounted(() => { onMounted(() => {
projectId.value = route.query.id projectId.value = route.query.id;
auditStatus.value = route.query.auditStatus auditStatus.value = route.query.auditStatus;
// //
getProjectName() getProjectName();
}) //
getAuditInfo();
});
// //
const getProjectName = async () => { const getProjectName = async () => {
try { try {
const res = await getProjectNameByIdApi({ const res = await getProjectNameByIdApi({
id: projectId.value id: projectId.value
}) });
if (res.data?.code === 200) { if (res.data?.code === 200) {
const project = res.data.data const project = res.data.data;
archiveForm.value.projectName = project.proName || '未知项目' archiveForm.value.projectName = project.proName || '未知项目';
} else { } else {
archiveForm.value.projectName = '未知项目' archiveForm.value.projectName = '未知项目';
} }
} catch (error) { } catch (error) {
console.error('获取项目名称失败:', error) console.error('获取项目名称失败:', error);
archiveForm.value.projectName = '未知项目' archiveForm.value.projectName = '未知项目';
} }
} };
// //
const handleClose = () => { const handleClose = () => {
router.go(-1) router.go(-1);
} };
const handleNodeClick = (data) => { const handleNodeClick = (data) => {
selectedNode.value = data selectedNode.value = data;
} };
</script> </script>
<style scoped> <style scoped>
@ -163,7 +229,7 @@ const handleNodeClick = (data) => {
background-color: #f5f7fa; background-color: #f5f7fa;
border-radius: 4px; border-radius: 4px;
margin-bottom: 12px; margin-bottom: 12px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
} }
.status-header { .status-header {
@ -240,7 +306,7 @@ const handleNodeClick = (data) => {
text-align: right !important; text-align: right !important;
} }
.dialog-footer .el-button+.el-button { .dialog-footer .el-button + .el-button {
margin-left: 8px; margin-left: 8px;
} }
@ -269,4 +335,46 @@ const handleNodeClick = (data) => {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.audit-status-section {
margin-top: 16px;
padding: 16px;
border: 1px solid #ebeef5;
border-radius: 4px;
background-color: #fafafa;
}
.audit-status-section h4 {
margin: 0 0 12px 0;
font-size: 14px;
font-weight: bold;
color: #303133;
}
.audit-list {
max-height: 300px;
overflow-y: auto;
}
.audit-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px dashed #dcdfe6;
}
.audit-item:last-child {
border-bottom: none;
}
.dept-name {
font-size: 13px;
color: #606266;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-right: 8px;
}
</style> </style>