|
@@ -31,9 +31,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #filePath="{ row }">
|
|
|
- <el-button link type="primary" @click.stop="imgUrlClick(row)"
|
|
|
- >查看PDF</el-button
|
|
|
- >
|
|
|
+ <PDFView
|
|
|
+ :need-to-show-pdf="true"
|
|
|
+ content-type="button"
|
|
|
+ btnText="查看PDF"
|
|
|
+ :is-link="true"
|
|
|
+ :pdf-source="getSOAPpdf(row)"
|
|
|
+ />
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<CommonTable
|
|
@@ -86,7 +90,7 @@ const { selectionChange, multipleUpdate } = Methords; //选中和批量删除事
|
|
|
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const bomVersion = ref(null);
|
|
|
-const pdfPath = ref(null)
|
|
|
+const pdfPath = ref(null);
|
|
|
const startCreat = () => {
|
|
|
if (props.tableType === "wuliaocaiji") {
|
|
|
if (data.value && data.value.length > 0) {
|
|
@@ -183,7 +187,7 @@ const onSelectedFinish = (itemValue) => {
|
|
|
form.value.unit = itemValue.unit;
|
|
|
} else if (props.tableType === "ESOP") {
|
|
|
form.value.filePath = itemValue.pdfPath;
|
|
|
- pdfPath.value = import.meta.env.VITE_APP_UPLOAD_URL + itemValue.pdfPath
|
|
|
+ pdfPath.value = import.meta.env.VITE_APP_UPLOAD_URL + itemValue.pdfPath;
|
|
|
form.value.drawingCode = itemValue.drawingCode;
|
|
|
form.value.recordVersion = itemValue.drawingVersion;
|
|
|
form.value.sortNum = itemValue.sort;
|
|
@@ -198,6 +202,9 @@ const imgUrlClick = (itemValue) => {
|
|
|
import.meta.env.VITE_APP_UPLOAD_URL + itemValue.filePath;
|
|
|
dialogVisible.value = true;
|
|
|
};
|
|
|
+const getSOAPpdf = (itemValue) => {
|
|
|
+ return import.meta.env.VITE_APP_UPLOAD_URL + itemValue.filePath;
|
|
|
+};
|
|
|
|
|
|
onMounted(() => {
|
|
|
search.value.operationId = route.params.id;
|