forked from integrated_whb/integrated_whb_vue
parent
a1c8e248d6
commit
3db91701d0
|
@ -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); // 详情 承诺书
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -11,17 +16,22 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
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 STAFFING_ID = route.query.STAFFING_ID;
|
||||
const LABORCONTRACT_ID = route.query.LABORCONTRACT_ID;
|
||||
const loading = ref(true); // 用于指示文件是否正在加载
|
||||
const pdfDialog = ref({ visible: false, src: "" });
|
||||
|
||||
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; // 加载完成
|
||||
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
|
||||
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -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");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/labor_contract/details',
|
||||
path: '/occupational_hazards/details',
|
||||
query: {
|
||||
OCCUPATIONALHAZARDS_ID: row.OCCUPATIONALHAZARDS_ID,
|
||||
},
|
||||
|
|
|
@ -47,14 +47,14 @@
|
|||
>
|
||||
<el-table-column label="头像" align="center">
|
||||
<template #default="{ row }">
|
||||
<img :src="row.USERAVATARURL" alt="Avatar" />
|
||||
<img :src="VITE_FILE_URL + row.USERAVATARURL" alt="Avatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center">
|
||||
<template #default="{ row }"> {{ row.NAME }}<br /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" align="center">
|
||||
<template #default="{ row }"> {{ row.USERNAME }}<br /> </template>
|
||||
<el-table-column label="参会时间" align="center">
|
||||
<template #default="{ row }"> {{ row.OPERATTIME }}<br /> </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参会地址" align="center">
|
||||
<template #default="{ row }">
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -11,16 +16,22 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
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 SAFETYRESPONSIBILITY_ID = route.query.SAFETYRESPONSIBILITY_ID;
|
||||
const loading = ref(true); // 用于指示文件是否正在加载
|
||||
const pdfDialog = ref({ visible: false, src: "" });
|
||||
|
||||
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; // 加载完成
|
||||
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
link
|
||||
@click="
|
||||
router.push({
|
||||
path: '/labor_contract/details',
|
||||
path: '/safety_responsibility/details',
|
||||
query: {
|
||||
SAFETYRESPONSIBILITY_ID: row.SAFETYRESPONSIBILITY_ID,
|
||||
},
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
<layout-card>
|
||||
<!-- 内容,可能是一个加载中的提示或其他内容 -->
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -11,17 +16,22 @@
|
|||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
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 SECURITYCOMMITMENT_ID = route.query.SECURITYCOMMITMENT_ID;
|
||||
const loading = ref(true); // 用于指示文件是否正在加载
|
||||
const pdfDialog = ref({ visible: false, src: "" }); // 控制PDF预览对话框的显示和PDF源地址
|
||||
|
||||
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; // 加载完成
|
||||
console.log(response.pd.ATTACHMENT_ROUTE, "111111111111111111111111111");
|
||||
window.open(response.pd.ATTACHMENT_ROUTE, "_blank");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue