|
@@ -169,7 +169,7 @@
|
|
|
@selection-change="tableSelectionChange"
|
|
|
>
|
|
|
<template #name="{ row }">
|
|
|
- <span class="text-link" @click="tableRowName(row)">{{ row?.name }}</span>
|
|
|
+ <span v-loading="bussPreviewLoading" class="text-link" @click="tableRowName(row)">{{ row?.name }}</span>
|
|
|
</template>
|
|
|
<template #waitingUserList="{ row }">
|
|
|
<template v-for="item in row.waitingUserList">
|
|
@@ -267,6 +267,7 @@ import { arrToId, arrToKey, downloadBlob, getArrValue, getObjValue, isString } f
|
|
|
import queryApi from '~api/data-fill/query'
|
|
|
import { eVisaTaskCheckApi } from '~api/other'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
|
+import wbsApi from '~api/data-fill/wbs'
|
|
|
|
|
|
//变量
|
|
|
const useAppState = useAppStore()
|
|
@@ -596,14 +597,38 @@ const tableSelectionChange = (rows) => {
|
|
|
//名称被点击
|
|
|
const tableRowName = (row) => {
|
|
|
//如果 evisaPdfUrl 不为空,使用evisaPdfUrl,反之使用pdfUrl
|
|
|
- if (row['evisaPdfUrl']) {
|
|
|
- toPdfPage(row['evisaPdfUrl'])
|
|
|
- //window.open(row['evisaPdfUrl'], '_blank')
|
|
|
- } else if (row['pdfUrl']) {
|
|
|
- toPdfPage(row['pdfUrl'])
|
|
|
- //window.open(row['pdfUrl'], '_blank')
|
|
|
+ // if (row['evisaPdfUrl']) {
|
|
|
+ // toPdfPage(row['evisaPdfUrl'])
|
|
|
+ // //window.open(row['evisaPdfUrl'], '_blank')
|
|
|
+ // } else if (row['pdfUrl']) {
|
|
|
+ // toPdfPage(row['pdfUrl'])
|
|
|
+ // //window.open(row['pdfUrl'], '_blank')
|
|
|
+ // } else {
|
|
|
+ // window.$message?.warning('文件不存在')
|
|
|
+ // }
|
|
|
+ bussPreview()
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//多表预览
|
|
|
+const bussPreviewLoading = ref(false)
|
|
|
+const bussPreview = async () => {
|
|
|
+ const info = nodeDataInfo.value
|
|
|
+ bussPreviewLoading.value = true
|
|
|
+ const { error, code, data } = await wbsApi.getBussPdfs({
|
|
|
+ nodeId: info?.primaryKeyId || '',
|
|
|
+ classify: contractTypeTabKey.value,
|
|
|
+ projectId: projectId.value,
|
|
|
+ // contractId: contractId.value
|
|
|
+ contractId: contractInfo.value?.contractType == 2 ? info?.contractIdRelation : contractId.value,
|
|
|
+ })
|
|
|
+
|
|
|
+ bussPreviewLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ toPdfPage(data)
|
|
|
+ //window.open(data, '_blank')
|
|
|
} else {
|
|
|
- window.$message?.warning('文件不存在')
|
|
|
+ window.$message?.warning('获取PDF失败')
|
|
|
}
|
|
|
}
|
|
|
|