|
@@ -48,12 +48,14 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template #menu="{ row, index, type }">
|
|
|
- <PDFView
|
|
|
+<!-- <PDFView
|
|
|
:need-to-show-pdf="true"
|
|
|
content-type="button"
|
|
|
:is-link="true"
|
|
|
:pdf-source="filePath + row.filePath"
|
|
|
- />
|
|
|
+ />-->
|
|
|
+ <el-button link type="primary" @click="toShowPDF(row)">
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
link
|
|
@@ -62,6 +64,7 @@
|
|
|
>绑定</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+ <PDFDrawerView ref="PDFDrawerViewRef"></PDFDrawerView>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
@@ -81,12 +84,20 @@ const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
onMounted(() => {
|
|
|
dataList();
|
|
|
});
|
|
|
+
|
|
|
+const PDFDrawerViewRef = ref(null);
|
|
|
+const toShowPDF = (row) => {
|
|
|
+ let url = import.meta.env.VITE_APP_UPLOAD_URL + row.pdfPath;
|
|
|
+ PDFDrawerViewRef.value && PDFDrawerViewRef.value.showPdf(url);
|
|
|
+};
|
|
|
+
|
|
|
const fileUrl = ref(""); //单文件
|
|
|
const fileNameList = ref([]);
|
|
|
const testFiles = () => {
|
|
|
form.value.filePath = fileUrl.value;
|
|
|
form.value.fileName = fileNameList.value[0];
|
|
|
};
|
|
|
+
|
|
|
const filePath = import.meta.env.VITE_APP_UPLOAD_URL;
|
|
|
option.value = Object.assign(option.value, {
|
|
|
selection: true,
|