安全例会优化

岗位安全承诺书开发
岗位安全责任书开发
dev
WenShiJun 2024-03-11 18:09:41 +08:00
parent a1c8e248d6
commit 3db91701d0
8 changed files with 72 additions and 27 deletions

View File

@ -6,3 +6,6 @@ export const addCommitmentView = (params) => upload("/commitment/add", params);
export const editCommitmentView = (params) => export const editCommitmentView = (params) =>
upload("/commitment/edit", params); // 修改 承诺书 upload("/commitment/edit", params); // 修改 承诺书
export const infoCommitmentView = (params) =>
upload("/commitment/goEdit", params); // 详情 承诺书

View File

@ -1,9 +1,14 @@
<template> <template>
<div> <div>
<layout-card> <layout-card>
<!-- 内容可能是一个加载中的提示或其他内容 -->
<div v-if="loading">...</div> <div v-if="loading">...</div>
<div v-else></div> <div v-else>
<layout-pdf
v-model:visible="pdfDialog.visible"
:src="pdfDialog.src"
append-to-body
></layout-pdf>
</div>
</layout-card> </layout-card>
</div> </div>
</template> </template>
@ -11,17 +16,22 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { infoStaffingView } from "@/request/traffic_safety_staffing.js"; import LayoutPdf from "@/components/pdf/index.vue";
import { infoContractView } from "@/request/traffic_safety_contract.js";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const route = useRoute(); const route = useRoute();
const STAFFING_ID = route.query.STAFFING_ID; const LABORCONTRACT_ID = route.query.LABORCONTRACT_ID;
const loading = ref(true); // const loading = ref(true); //
const pdfDialog = ref({ visible: false, src: "" });
onMounted(async () => { onMounted(async () => {
const response = await infoStaffingView({ STAFFING_ID }); const response = await infoContractView({ LABORCONTRACT_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; // loading.value = false; //
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
}); });
</script> </script>

View File

@ -1,9 +1,14 @@
<template> <template>
<div> <div>
<layout-card> <layout-card>
<!-- 内容可能是一个加载中的提示或其他内容 -->
<div v-if="loading">...</div> <div v-if="loading">...</div>
<div v-else></div> <div v-else>
<layout-pdf
v-model:visible="pdfDialog.visible"
:src="pdfDialog.src"
append-to-body
></layout-pdf>
</div>
</layout-card> </layout-card>
</div> </div>
</template> </template>
@ -12,18 +17,24 @@
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { infoOccupationalHazardsView } from "@/request/traffic_occupational_hazards.js"; 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 route = useRoute();
const OCCUPATIONALHAZARDS_ID = route.query.OCCUPATIONALHAZARDS_ID; const OCCUPATIONALHAZARDS_ID = route.query.OCCUPATIONALHAZARDS_ID;
const loading = ref(true); // const loading = ref(true); //
const pdfDialog = ref({ visible: false, src: "" });
onMounted(async () => { onMounted(async () => {
const response = await infoOccupationalHazardsView({ const response = await infoOccupationalHazardsView({
OCCUPATIONALHAZARDS_ID, 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; // loading.value = false; //
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
}); });
</script> </script>

View File

@ -82,7 +82,7 @@
link link
@click=" @click="
router.push({ router.push({
path: '/labor_contract/details', path: '/occupational_hazards/details',
query: { query: {
OCCUPATIONALHAZARDS_ID: row.OCCUPATIONALHAZARDS_ID, OCCUPATIONALHAZARDS_ID: row.OCCUPATIONALHAZARDS_ID,
}, },

View File

@ -47,14 +47,14 @@
> >
<el-table-column label="头像" align="center"> <el-table-column label="头像" align="center">
<template #default="{ row }"> <template #default="{ row }">
<img :src="row.USERAVATARURL" alt="Avatar" /> <img :src="VITE_FILE_URL + row.USERAVATARURL" alt="Avatar" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" align="center"> <el-table-column label="姓名" align="center">
<template #default="{ row }"> {{ row.NAME }}<br /> </template> <template #default="{ row }"> {{ row.NAME }}<br /> </template>
</el-table-column> </el-table-column>
<el-table-column label="手机号" align="center"> <el-table-column label="参会时间" align="center">
<template #default="{ row }"> {{ row.USERNAME }}<br /> </template> <template #default="{ row }"> {{ row.OPERATTIME }}<br /> </template>
</el-table-column> </el-table-column>
<el-table-column label="参会地址" align="center"> <el-table-column label="参会地址" align="center">
<template #default="{ row }"> <template #default="{ row }">

View File

@ -1,9 +1,14 @@
<template> <template>
<div> <div>
<layout-card> <layout-card>
<!-- 内容可能是一个加载中的提示或其他内容 -->
<div v-if="loading">...</div> <div v-if="loading">...</div>
<div v-else></div> <div v-else>
<layout-pdf
v-model:visible="pdfDialog.visible"
:src="pdfDialog.src"
append-to-body
></layout-pdf>
</div>
</layout-card> </layout-card>
</div> </div>
</template> </template>
@ -11,16 +16,22 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { infoStaffingView } from "@/request/traffic_safety_staffing.js"; import LayoutPdf from "@/components/pdf/index.vue";
import { infoResponsibilityView } from "@/request/traffic_safety_responsibility.js";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const route = useRoute(); const route = useRoute();
const SAFETYRESPONSIBILITY_ID = route.query.SAFETYRESPONSIBILITY_ID; const SAFETYRESPONSIBILITY_ID = route.query.SAFETYRESPONSIBILITY_ID;
const loading = ref(true); // const loading = ref(true); //
const pdfDialog = ref({ visible: false, src: "" });
onMounted(async () => { onMounted(async () => {
const response = await infoStaffingView({ SAFETYRESPONSIBILITY_ID }); const response = await infoResponsibilityView({ SAFETYRESPONSIBILITY_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; // loading.value = false; //
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
}); });
</script> </script>

View File

@ -82,7 +82,7 @@
link link
@click=" @click="
router.push({ router.push({
path: '/labor_contract/details', path: '/safety_responsibility/details',
query: { query: {
SAFETYRESPONSIBILITY_ID: row.SAFETYRESPONSIBILITY_ID, SAFETYRESPONSIBILITY_ID: row.SAFETYRESPONSIBILITY_ID,
}, },

View File

@ -1,9 +1,14 @@
<template> <template>
<div> <div>
<layout-card> <layout-card>
<!-- 内容可能是一个加载中的提示或其他内容 -->
<div v-if="loading">...</div> <div v-if="loading">...</div>
<div v-else></div> <div v-else>
<layout-pdf
v-model:visible="pdfDialog.visible"
:src="pdfDialog.src"
append-to-body
></layout-pdf>
</div>
</layout-card> </layout-card>
</div> </div>
</template> </template>
@ -11,17 +16,22 @@
<script setup> <script setup>
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { infoStaffingView } from "@/request/traffic_safety_staffing.js"; import LayoutPdf from "@/components/pdf/index.vue"; // LayoutPdf
import { infoCommitmentView } from "@/request/traffic_safety_commitment.js";
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const route = useRoute(); const route = useRoute();
const SECURITYCOMMITMENT_ID = route.query.SECURITYCOMMITMENT_ID; const SECURITYCOMMITMENT_ID = route.query.SECURITYCOMMITMENT_ID;
const loading = ref(true); // const loading = ref(true); //
const pdfDialog = ref({ visible: false, src: "" }); // PDFPDF
onMounted(async () => { onMounted(async () => {
const response = await infoStaffingView({ SECURITYCOMMITMENT_ID }); const response = await infoCommitmentView({ SECURITYCOMMITMENT_ID });
if (response.pd && response.pd.ATTACHMENT_ROUTE) {
pdfDialog.value.src = VITE_FILE_URL + response.pd.ATTACHMENT_ROUTE; // PDF
pdfDialog.value.visible = true; // PDF
}
loading.value = false; // loading.value = false; //
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
}); });
</script> </script>