This commit is contained in:
parent
6f7403e453
commit
ca318f3f6f
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -163,7 +229,7 @@ const handleNodeClick = (data) => {
|
|||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
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 {
|
||||
|
|
@ -240,7 +306,7 @@ const handleNodeClick = (data) => {
|
|||
text-align: right !important;
|
||||
}
|
||||
|
||||
.dialog-footer .el-button+.el-button {
|
||||
.dialog-footer .el-button + .el-button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue