|
@@ -453,7 +453,7 @@
|
|
|
</div>
|
|
|
<div class="hc-csc-action-box-height">
|
|
|
<div class="btn-box">
|
|
|
- <el-button hc-btn @click="onCarrySpotChecksDrawerClose">
|
|
|
+ <el-button hc-btn size="large" style="height: 40px; padding: 0 15px;" type="warning" @click="onCarrySpotChecksDrawerClose">
|
|
|
<HcIcon name="close" />
|
|
|
<span>取消查阅</span>
|
|
|
</el-button>
|
|
@@ -1110,18 +1110,24 @@ const tableFileColumn = ref([
|
|
|
const tableFileData = ref([])
|
|
|
//获取卷内文件数据
|
|
|
const getArchiveFileListData = async () => {
|
|
|
+ tableFileLoading.value = true
|
|
|
const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
|
|
|
id: fileInfo.value.id, //案卷id
|
|
|
})
|
|
|
+ tableFileLoading.value = false
|
|
|
//处理返回数据
|
|
|
if (!error && code === 200) {
|
|
|
fileInfo.value.pageNumber = data.pageNumber
|
|
|
tableFileData.value = getArrValue(data['approvalFileList'])
|
|
|
cscTableData1.value = getArrValue(data['approvalFileList'])
|
|
|
+ pdfUrl.value = tableFileData.value[0]?.pdfFileUrl
|
|
|
+ checkId.value = tableFileData.value[0]?.id
|
|
|
|
|
|
} else {
|
|
|
tableFileData.value = []
|
|
|
cscTableData1.value = []
|
|
|
+ pdfUrl.value = ''
|
|
|
+ checkId.value = ''
|
|
|
}
|
|
|
}
|
|
|
const tableFileLoading = ref(false)
|
|
@@ -1142,46 +1148,51 @@ const tableFileCloseClick = () => {
|
|
|
tableAllShow.value = false
|
|
|
tableFileShow.value = false
|
|
|
}
|
|
|
-const viewPdf = async (id, outUrl) => {
|
|
|
- if (outUrl.indexOf(',') === -1) {
|
|
|
- return outUrl
|
|
|
-}
|
|
|
+const viewPdf = async (id, row) => {
|
|
|
+// 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('文件不存在')
|
|
|
+// }
|
|
|
+// }
|
|
|
+//展示卷内文件的第一个
|
|
|
|
|
|
-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) => {
|
|
|
- isCarrySpotChecksDrawer.value = true
|
|
|
- isFile.value = type
|
|
|
+
|
|
|
if (type === 1) {
|
|
|
//查阅案卷
|
|
|
getArchivesAutoView(row.id)
|
|
|
fileInfo.value = row
|
|
|
- getArchiveFileListData()
|
|
|
- const url = await viewPdf(row.id, row.outUrl)
|
|
|
- pdfUrl.value = url
|
|
|
- checkId.value = ''
|
|
|
+ await getArchiveFileListData()
|
|
|
+ isCarrySpotChecksDrawer.value = true
|
|
|
+ // const url = await viewPdf(row.id, row)
|
|
|
+ // pdfUrl.value = url
|
|
|
+ // checkId.value = ''
|
|
|
|
|
|
|
|
|
} else if (type == 2) {//查阅卷内文件
|
|
|
checkId.value = row.id
|
|
|
pdfUrl.value = row.pdfFileUrl
|
|
|
getmetaInfo(checkId.value)
|
|
|
+ isCarrySpotChecksDrawer.value = true
|
|
|
}
|
|
|
+
|
|
|
+ isFile.value = type
|
|
|
|
|
|
|
|
|
}
|