|
@@ -1142,22 +1142,26 @@ const tableFileCloseClick = () => {
|
|
|
tableAllShow.value = false
|
|
|
tableFileShow.value = false
|
|
|
}
|
|
|
-const viewPdf = async (id) => {
|
|
|
- window.$message?.info('预览案卷需要合并pdf,需要一点时间')
|
|
|
- pdfLoading.value = true
|
|
|
- const { error, code, data, msg } = await tuningApi.printArchive({
|
|
|
- id: id,
|
|
|
- })
|
|
|
- pdfLoading.value = false
|
|
|
- if (!error && code === 200) {
|
|
|
- if (data) {
|
|
|
- return data
|
|
|
- } else {
|
|
|
- window.$message?.warning('文件不存在')
|
|
|
- }
|
|
|
+const viewPdf = async (id, outUrl) => {
|
|
|
+ if (outUrl.indexOf(',') === -1) {
|
|
|
+ return outUrl
|
|
|
+}
|
|
|
|
|
|
+window.$message?.info('预览案卷需要合并pdf,需要一点时间')
|
|
|
+pdfLoading.value = true
|
|
|
+const { error, code, data, msg } = await tuningApi.printArchive({
|
|
|
+ id: id,
|
|
|
+})
|
|
|
+pdfLoading.value = false
|
|
|
+if (!error && code === 200) {
|
|
|
+ if (data) {
|
|
|
+ return data
|
|
|
+ } else {
|
|
|
+ window.$message?.warning('文件不存在')
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+}
|
|
|
const isFile = ref('')//查阅案卷或者查阅文件
|
|
|
const checkId = ref('')
|
|
|
const consultFileClick = async (row, type) => {
|
|
@@ -1168,7 +1172,7 @@ const consultFileClick = async (row, type) => {
|
|
|
getArchivesAutoView(row.id)
|
|
|
fileInfo.value = row
|
|
|
getArchiveFileListData()
|
|
|
- const url = await viewPdf(row.id)
|
|
|
+ const url = await viewPdf(row.id, row.outUrl)
|
|
|
pdfUrl.value = url
|
|
|
checkId.value = ''
|
|
|
|