From 3db91701d06ad94703763e4d0b49719782743294 Mon Sep 17 00:00:00 2001 From: WenShiJun Date: Mon, 11 Mar 2024 18:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E4=BE=8B=E4=BC=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20=E5=B2=97=E4=BD=8D=E5=AE=89=E5=85=A8=E6=89=BF?= =?UTF-8?q?=E8=AF=BA=E4=B9=A6=E5=BC=80=E5=8F=91=20=E5=B2=97=E4=BD=8D?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E8=B4=A3=E4=BB=BB=E4=B9=A6=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/request/traffic_safety_commitment.js | 3 +++ src/views/labor_contract/details.vue | 24 +++++++++++++------ src/views/occupational_hazards/details.vue | 19 +++++++++++---- src/views/occupational_hazards/index.vue | 2 +- .../safety_meeting/meeting_info.vue | 6 ++--- src/views/safety_responsibility/details.vue | 21 ++++++++++++---- src/views/safety_responsibility/index.vue | 2 +- src/views/security_commitment/details.vue | 22 ++++++++++++----- 8 files changed, 72 insertions(+), 27 deletions(-) diff --git a/src/request/traffic_safety_commitment.js b/src/request/traffic_safety_commitment.js index a2db6a1..1a2713f 100644 --- a/src/request/traffic_safety_commitment.js +++ b/src/request/traffic_safety_commitment.js @@ -6,3 +6,6 @@ export const addCommitmentView = (params) => upload("/commitment/add", params); export const editCommitmentView = (params) => upload("/commitment/edit", params); // 修改 承诺书 + +export const infoCommitmentView = (params) => + upload("/commitment/goEdit", params); // 详情 承诺书 diff --git a/src/views/labor_contract/details.vue b/src/views/labor_contract/details.vue index 25df689..e2e4cf3 100644 --- a/src/views/labor_contract/details.vue +++ b/src/views/labor_contract/details.vue @@ -1,9 +1,14 @@ @@ -11,17 +16,22 @@ diff --git a/src/views/occupational_hazards/details.vue b/src/views/occupational_hazards/details.vue index 20406c9..a052be9 100644 --- a/src/views/occupational_hazards/details.vue +++ b/src/views/occupational_hazards/details.vue @@ -1,9 +1,14 @@ @@ -12,18 +17,24 @@ import { ref, onMounted } from "vue"; import { useRoute } from "vue-router"; import { infoOccupationalHazardsView } from "@/request/traffic_occupational_hazards.js"; +import LayoutPdf from "@/components/pdf/index.vue"; +const VITE_FILE_URL = import.meta.env.VITE_FILE_URL; const route = useRoute(); const OCCUPATIONALHAZARDS_ID = route.query.OCCUPATIONALHAZARDS_ID; const loading = ref(true); // 用于指示文件是否正在加载 +const pdfDialog = ref({ visible: false, src: "" }); onMounted(async () => { const response = await infoOccupationalHazardsView({ OCCUPATIONALHAZARDS_ID, }); + + if (response.pd && response.pd.ATTACHMENT_ROUTE) { + pdfDialog.value.src = VITE_FILE_URL + response.pd.ATTACHMENT_ROUTE; + pdfDialog.value.visible = true; + } loading.value = false; // 加载完成 - console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111"); - window.open(response.pd.ATTACHMENT_ROUTE, "_blank"); }); diff --git a/src/views/occupational_hazards/index.vue b/src/views/occupational_hazards/index.vue index a4cc04a..3a635cc 100644 --- a/src/views/occupational_hazards/index.vue +++ b/src/views/occupational_hazards/index.vue @@ -82,7 +82,7 @@ link @click=" router.push({ - path: '/labor_contract/details', + path: '/occupational_hazards/details', query: { OCCUPATIONALHAZARDS_ID: row.OCCUPATIONALHAZARDS_ID, }, diff --git a/src/views/safety_production_related/safety_meeting/meeting_info.vue b/src/views/safety_production_related/safety_meeting/meeting_info.vue index 879bad0..d66621a 100644 --- a/src/views/safety_production_related/safety_meeting/meeting_info.vue +++ b/src/views/safety_production_related/safety_meeting/meeting_info.vue @@ -47,14 +47,14 @@ > - - + +