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 @@ > - - + +