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,
})
}
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-col :span="8" class="pane-left">
<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 :span="16" class="pane-right">
<RightTable :selectedNode="selectedNode" :projectId="projectId" :auditStatus="auditStatus" />
@ -39,25 +57,29 @@
</template>
<script setup>
import { ref, onMounted, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import LeftTree from './components/leftTree.vue'
import RightTable from './components/rightTable.vue'
import { ref, onMounted, computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import LeftTree from './components/leftTree.vue';
import RightTable from './components/rightTable.vue';
import {
getProjectNameByIdApi,
getProjectNameByIdApi
} from '@/api/archivesManagement/fileManager/fileManager';
import {
transferAuditDetailApi
} from '@/api/archivesManagement/archivingManage';
const route = useRoute()
const router = useRouter()
const route = useRoute();
const router = useRouter();
//
const projectId = ref(null)
const auditStatus = ref(null)
const selectedNode = ref(null)
const projectId = ref(null);
const auditStatus = ref(null);
const selectedNode = ref(null);
const archiveForm = ref({
projectName: '',
description: ''
})
});
const auditList = ref([]);
//
const getStatusIcon = () => {
@ -99,40 +121,84 @@ const getStatusColorClass = () => {
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(() => {
projectId.value = route.query.id
auditStatus.value = route.query.auditStatus
projectId.value = route.query.id;
auditStatus.value = route.query.auditStatus;
//
getProjectName()
})
getProjectName();
//
getAuditInfo();
});
//
const getProjectName = async () => {
try {
const res = await getProjectNameByIdApi({
id: projectId.value
})
});
if (res.data?.code === 200) {
const project = res.data.data
archiveForm.value.projectName = project.proName || '未知项目'
const project = res.data.data;
archiveForm.value.projectName = project.proName || '未知项目';
} else {
archiveForm.value.projectName = '未知项目'
archiveForm.value.projectName = '未知项目';
}
} catch (error) {
console.error('获取项目名称失败:', error)
archiveForm.value.projectName = '未知项目'
}
console.error('获取项目名称失败:', error);
archiveForm.value.projectName = '未知项目';
}
};
//
const handleClose = () => {
router.go(-1)
}
router.go(-1);
};
const handleNodeClick = (data) => {
selectedNode.value = data
}
selectedNode.value = data;
};
</script>
<style scoped>
@ -269,4 +335,46 @@ const handleNodeClick = (data) => {
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>