2025-05-21 11:24:53 +08:00
|
|
|
|
<template>
|
|
|
|
|
<!-- <el-card v-loading="loading" body-class="printMe"> -->
|
|
|
|
|
<div class="w75% m-a">
|
|
|
|
|
<div id="printMe" class="pos-relative">
|
2025-09-10 01:11:46 +08:00
|
|
|
|
<div class="resultIcon"><img :src="'/image/svg/' + inspectionType + '.png'" alt="" /></div>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<h2 style="text-align: center; margin-top: 5px; font-weight: bold">安全生产监督检查通知书</h2>
|
|
|
|
|
<el-row>
|
2025-07-30 16:26:34 +08:00
|
|
|
|
<el-col :span="12" style="text-align: left">填报人:{{ safetyInspectionDetail?.fill }}</el-col>
|
|
|
|
|
<el-col :span="12" style="text-align: right">填报时间:{{ safetyInspectionDetail?.createdAt }}</el-col>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
<el-descriptions :column="2" border style="margin-top: 8px" label-width="160px" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="检查项目" :span="2" class-name="zebra">{{ currentProject?.name }} </el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="检查类型" label-class-name="white">
|
2025-09-09 09:40:08 +08:00
|
|
|
|
{{ safetyInspectionDetail?.studyTypeName }}
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="违章类型" label-class-name="white">
|
2025-09-09 09:40:08 +08:00
|
|
|
|
{{ safetyInspectionDetail?.tourTypeName }}
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="检查时间" class-name="zebra">{{ safetyInspectionDetail?.checkTime }} </el-descriptions-item>
|
2025-09-09 09:40:08 +08:00
|
|
|
|
<el-descriptions-item label-align="center" label="检查人" class-name="zebra">{{ safetyInspectionDetail?.abarbeitung }} </el-descriptions-item>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<el-descriptions-item label-align="center" label="整改人" label-class-name="white"
|
2025-07-30 16:26:34 +08:00
|
|
|
|
>{{ safetyInspectionDetail?.abarbeitung }}
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="要求整改期限" label-class-name="white">
|
|
|
|
|
{{ dayjs(safetyInspectionDetail?.rectificationDeadline).format('YYYY 年 MM 月 DD 日') }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions border direction="vertical" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="巡检结果" class-name="none"></el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions :column="2" border label-width="160px" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="内容" :span="2" label-class-name="white"
|
2025-09-09 09:40:08 +08:00
|
|
|
|
>{{ safetyInspectionDetail?.inspectionResult }}
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="检查附件" :span="2" label-class-name="white">
|
|
|
|
|
<el-space wrap>
|
2025-09-10 01:11:46 +08:00
|
|
|
|
<div v-for="item in safetyInspectionDetail.checkAttachment" :key="item.id">
|
|
|
|
|
<span v-if="['png', 'jpg', 'jpeg'].includes(item.fileType)">
|
|
|
|
|
<image-preview :src="'http://58.17.134.85:8920' + item.path" width="200px" />
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<el-link :href="`${'http://58.17.134.85:8920' + item.path}`" type="primary" :underline="false" target="_blank">
|
|
|
|
|
<span> {{ item.name }} </span>
|
|
|
|
|
</el-link>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-space>
|
|
|
|
|
<!-- <el-space wrap>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<div v-for="item in checkFileList" :key="item.ossId">
|
|
|
|
|
<span v-if="['.png', '.jpg', '.jpeg'].includes(item.fileSuffix)">
|
|
|
|
|
<image-preview :src="item.url" width="200px" />
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
<el-link :href="`${item.url}`" type="primary" :underline="false" target="_blank">
|
|
|
|
|
<span> {{ item.originalName }} </span>
|
|
|
|
|
</el-link>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2025-09-10 01:11:46 +08:00
|
|
|
|
</el-space> -->
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="检查状态" :span="2" label-class-name="white">
|
|
|
|
|
<el-steps style="max-width: 200px" :active="Number(safetyInspectionDetail?.status)" finish-status="finish">
|
|
|
|
|
<el-step v-for="item in safety_inspection_type" :key="item.value" :title="item.label" />
|
|
|
|
|
</el-steps>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions border direction="vertical" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="整改情况" class-name="none"></el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions :column="2" border label-width="160px" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="班组" label-class-name="white"
|
|
|
|
|
>{{ safetyInspectionDetail?.teamName }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="整改日期" label-class-name="white"
|
|
|
|
|
>{{ safetyInspectionDetail?.rectificationTime }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="整改措施及完成情况" :span="2" label-class-name="white">
|
|
|
|
|
{{ safetyInspectionDetail?.measure }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="整改附件" :span="2" label-class-name="white">
|
|
|
|
|
<el-space wrap>
|
2025-09-10 01:11:46 +08:00
|
|
|
|
<div v-for="item in safetyInspectionDetail.abarbeitungAttachment" :key="item.id">
|
2025-07-30 16:26:34 +08:00
|
|
|
|
<span v-if="['png', 'jpg', 'jpeg'].includes(item.fileType)">
|
2025-09-10 01:11:46 +08:00
|
|
|
|
<image-preview :src="'http://58.17.134.85:8920' + item.path" width="200px" />
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
2025-09-10 01:11:46 +08:00
|
|
|
|
<el-link :href="`${'http://58.17.134.85:8920' + item.path}`" type="primary" :underline="false" target="_blank">
|
|
|
|
|
<span> {{ item.name }} </span>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</el-link>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-space>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions border direction="vertical" size="large">
|
|
|
|
|
<el-descriptions-item label-align="center" label="复查结果" class-name="none"></el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
<el-descriptions :column="2" border label-width="160px" size="large">
|
2025-07-30 16:26:34 +08:00
|
|
|
|
<el-descriptions-item label-align="center" label="复查人" label-class-name="white">{{ safetyInspectionDetail?.fill }} </el-descriptions-item>
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<el-descriptions-item label-align="center" label="复查日期" label-class-name="white"
|
|
|
|
|
>{{ safetyInspectionDetail?.reviewTime }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label-align="center" label="复查情况" :span="2" label-class-name="white"
|
|
|
|
|
>{{ safetyInspectionDetail?.review }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- </el-card> -->
|
2025-09-09 09:40:08 +08:00
|
|
|
|
<!-- <div class="dialog-footer">
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<div class="btn-item" @click="handleExport">
|
|
|
|
|
<img src="../../../../assets/icons/svg/derived.png" />
|
|
|
|
|
<span>导出</span>
|
|
|
|
|
</div>
|
2025-09-09 09:40:08 +08:00
|
|
|
|
<div class="btn-item" v-print="'#printMe'">
|
2025-05-21 11:24:53 +08:00
|
|
|
|
<img src="../../../../assets/icons/svg/print.png" />
|
|
|
|
|
<span>打印</span>
|
2025-09-09 09:40:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
2025-05-21 11:24:53 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { useUserStoreHook } from '@/store/modules/user';
|
|
|
|
|
import { SafetyInspectionVO } from '@/api/safety/safetyInspection/types';
|
|
|
|
|
import { getSafetyInspection } from '@/api/safety/safetyInspection';
|
|
|
|
|
import { downLoadOss, listByIds } from '@/api/system/oss';
|
|
|
|
|
import { OssVO } from '@/api/system/oss/types';
|
2025-07-07 19:56:03 +08:00
|
|
|
|
import { dayjs } from 'element-plus';
|
2025-05-21 11:24:53 +08:00
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
safetyInspectionId?: string | number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { safety_inspection_violation_type, safety_inspection_type, safety_inspection_check_type } = toRefs<any>(
|
|
|
|
|
proxy?.useDict('safety_inspection_violation_type', 'review_type', 'reply_type', 'safety_inspection_type', 'safety_inspection_check_type')
|
|
|
|
|
);
|
|
|
|
|
// 获取用户 store
|
|
|
|
|
const userStore = useUserStoreHook();
|
|
|
|
|
// 从 store 中获取项目列表和当前选中的项目
|
|
|
|
|
const currentProject = computed(() => userStore.selectedProject);
|
|
|
|
|
const props = defineProps<Props>();
|
|
|
|
|
const loading = ref<boolean>(false);
|
2025-07-30 16:26:34 +08:00
|
|
|
|
const safetyInspectionDetail = ref({ checkAttachment: [] });
|
2025-05-21 11:24:53 +08:00
|
|
|
|
const checkFileList = ref<OssVO[]>();
|
|
|
|
|
const rectificationFileList = ref<OssVO[]>();
|
|
|
|
|
//检查状态图片
|
|
|
|
|
const inspectionType = computed(() => {
|
|
|
|
|
let imgName = 'successLogo';
|
|
|
|
|
if (safetyInspectionDetail.value?.status == '2') imgName = 'rectification';
|
|
|
|
|
if (safetyInspectionDetail.value?.reviewType == '1') imgName = 'successful';
|
|
|
|
|
if (safetyInspectionDetail.value?.reviewType == '2') imgName = 'failure';
|
|
|
|
|
console.log('🚀 ~ inspectionType ~ imgName:', imgName);
|
|
|
|
|
|
|
|
|
|
return imgName;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const get = async () => {
|
|
|
|
|
loading.value = true;
|
2025-07-30 16:26:34 +08:00
|
|
|
|
const res = await getSafetyInspection({ id: props.safetyInspectionId });
|
|
|
|
|
if (res.data && res.code === 0) {
|
2025-05-21 11:24:53 +08:00
|
|
|
|
safetyInspectionDetail.value = res.data;
|
2025-09-10 01:11:46 +08:00
|
|
|
|
console.log('🚀 ~ get ~ res.data:', res.data);
|
2025-05-21 11:24:53 +08:00
|
|
|
|
}
|
2025-09-10 01:11:46 +08:00
|
|
|
|
|
2025-05-21 11:24:53 +08:00
|
|
|
|
loading.value = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleExport = async () => {
|
|
|
|
|
await downLoadOss({ id: safetyInspectionDetail.value.id }, '/safety/safetyInspection/export/word', '安全生产监督检查通知书.zip');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
console.log('🚀 ~ onMounted ~ props.safetyInspectionId:', props.safetyInspectionId);
|
|
|
|
|
get();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => props.safetyInspectionId,
|
|
|
|
|
(newId, oldId) => {
|
|
|
|
|
if (newId !== oldId) {
|
|
|
|
|
checkFileList.value = undefined;
|
|
|
|
|
rectificationFileList.value = undefined;
|
|
|
|
|
get();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
#printMe {
|
|
|
|
|
padding: 15px 20px 20px 20px !important;
|
|
|
|
|
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.white) {
|
|
|
|
|
background: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.none) {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.zebra) {
|
|
|
|
|
background: #f5f7fa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@page {
|
|
|
|
|
size: auto;
|
|
|
|
|
margin: 0mm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dialog-footer {
|
2025-09-09 09:40:08 +08:00
|
|
|
|
height: 100px;
|
2025-05-21 11:24:53 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 14%;
|
|
|
|
|
right: 6%;
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #ddd;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 20px 10px;
|
|
|
|
|
|
|
|
|
|
.btn-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.resultIcon {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 100px;
|
|
|
|
|
right: 50px;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
width: 105px;
|
|
|
|
|
height: 105px;
|
|
|
|
|
img {
|
|
|
|
|
width: 105px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|