|
@@ -22,23 +22,29 @@
|
|
|
<!-- <single-upload v-model="form.filePath" />
|
|
|
<FilesUpload v-model:src="form.filePath" v-model:src-list="form.filePath" /> -->
|
|
|
<div style="height: 100px; width: 100px; overflow: hidden">
|
|
|
- <PDFView
|
|
|
- :need-to-show-pdf="true"
|
|
|
- content-type="button"
|
|
|
- :is-link="true"
|
|
|
- :show-pdf-number="form.showAppointPageNum"
|
|
|
- :pdf-source="pdfPath"
|
|
|
- />
|
|
|
+ <!-- <PDFView-->
|
|
|
+ <!-- :need-to-show-pdf="true"-->
|
|
|
+ <!-- content-type="button"-->
|
|
|
+ <!-- :is-link="true"-->
|
|
|
+ <!-- :show-pdf-number="form.showAppointPageNum"-->
|
|
|
+ <!-- :pdf-source="pdfPath"-->
|
|
|
+ <!-- />-->
|
|
|
+ <el-button link type="primary" @click="toShowPDF(pdfPath,form.showAppointPageNum)">
|
|
|
+ 预览
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #filePath="{ row }">
|
|
|
- <PDFView
|
|
|
- :need-to-show-pdf="true"
|
|
|
- content-type="button"
|
|
|
- btnText="查看PDF"
|
|
|
- :is-link="true"
|
|
|
- :pdf-source="getSOAPpdf(row)"
|
|
|
- />
|
|
|
+ <!-- <PDFView-->
|
|
|
+ <!-- :need-to-show-pdf="true"-->
|
|
|
+ <!-- content-type="button"-->
|
|
|
+ <!-- btnText="查看PDF"-->
|
|
|
+ <!-- :is-link="true"-->
|
|
|
+ <!-- :pdf-source="getSOAPpdf(row)"-->
|
|
|
+ <!-- />-->
|
|
|
+ <el-button link type="primary" @click="toShowPDF(row.filePath,1)">
|
|
|
+ 查看PDF
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
|
|
|
|
|
@@ -82,6 +88,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <PDFDrawerView ref="PDFDrawerViewRef"></PDFDrawerView>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
@@ -144,7 +151,11 @@ const {selectionChange, multipleUpdate} = Methords; //选中和批量删除事
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
const bomVersion = ref(null);
|
|
|
const pdfPath = ref(null);
|
|
|
-
|
|
|
+const PDFDrawerViewRef = ref(null);
|
|
|
+const toShowPDF = (pdfPath, pdfNum) => {
|
|
|
+ let url = import.meta.env.VITE_APP_UPLOAD_URL + pdfPath;
|
|
|
+ PDFDrawerViewRef.value && PDFDrawerViewRef.value.showPdf(url, pdfNum);
|
|
|
+};
|
|
|
// 如果物料采集列表有值,就只能选择当前的版本,否则先选择版本
|
|
|
const versionList = ref([]);
|
|
|
const versionDV = ref(false);
|