|
|
@@ -38,7 +38,7 @@
|
|
|
@pagination-change="handlePaginationChange"
|
|
|
>
|
|
|
<template #documentId="{ row }">
|
|
|
- {{ getDocumenType(row) }}
|
|
|
+ {{ row.documentName || getDocumenType(row) }}
|
|
|
</template>
|
|
|
<template #enterpriseId="{ row }">
|
|
|
{{ getEnterpriseName(row) }}
|
|
|
@@ -61,6 +61,7 @@
|
|
|
上传附件
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ v-if="getDocumenType(scope.row).includes('送达回证')"
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
@click="handleViewScan(scope.row.scanDocumentUrl)"
|
|
|
@@ -93,6 +94,13 @@
|
|
|
</template>
|
|
|
<template #electronicDocumentUrl="scope">
|
|
|
<el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="handleDocView(scope.row)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
v-if="!isView && !getDocumenType(scope.row).includes('通知书')"
|
|
|
type="text"
|
|
|
size="mini"
|
|
|
@@ -137,7 +145,7 @@
|
|
|
:visible="documentDialogVisible"
|
|
|
width="82%"
|
|
|
:close-on-click-modal="false"
|
|
|
- :z-index="9200"
|
|
|
+ :z-index="9400"
|
|
|
@cancel="handleCancel"
|
|
|
@confirm="handleConfirm"
|
|
|
>
|
|
|
@@ -283,6 +291,7 @@
|
|
|
上传附件
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ v-if="scope.row.dataValue"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="handleViewScan(scope.row.dataValue)"
|
|
|
@@ -312,7 +321,7 @@
|
|
|
:visible="dialogVisible"
|
|
|
:width="dialogWidth"
|
|
|
:close-on-click-modal="false"
|
|
|
- :z-index="9300"
|
|
|
+ :z-index="9500"
|
|
|
@cancel="handleCancel"
|
|
|
@confirm="handleConfirm"
|
|
|
>
|
|
|
@@ -636,7 +645,16 @@
|
|
|
documentName: data ? data.documentName : '',
|
|
|
permissionType: '0',
|
|
|
}).then((res) => {
|
|
|
- this.documentData.list = res.value.value.records
|
|
|
+ let records = res.value.value.records
|
|
|
+ this.documentData.list = records.filter((item) => {
|
|
|
+ const excludeTypes = [
|
|
|
+ '成本监审工作底稿-送达回证',
|
|
|
+ '成本监审提取资料登记表-送达回证',
|
|
|
+ '成本审核初步意见表1-送达回证',
|
|
|
+ '成本监审集体审议记录-送达回证',
|
|
|
+ ]
|
|
|
+ return !excludeTypes.includes(item.documentName)
|
|
|
+ })
|
|
|
this.documentData.pagination.total = res.value.value.total
|
|
|
})
|
|
|
},
|
|
|
@@ -1043,16 +1061,44 @@
|
|
|
// 触发文件选择
|
|
|
input.click()
|
|
|
},
|
|
|
+ // 查看监审文书
|
|
|
+ handleDocView(row) {
|
|
|
+ this.document = {
|
|
|
+ ...row,
|
|
|
+ }
|
|
|
+ // 从API中获取文件URL
|
|
|
+ downDocument({
|
|
|
+ id: row.id,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.state) {
|
|
|
+ // this.fileUrl = res.value || ''
|
|
|
+ this.handleViewScan(res.value || '')
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取文件URL失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.handleTemplateChange()
|
|
|
+ // this.documentDialogVisible = true
|
|
|
+ // getCostProjectDocumentFile({
|
|
|
+ // id: row.id,
|
|
|
+ // }).then((res) => {
|
|
|
+ // this.costDocumentTemplateFiles = res.value || []
|
|
|
+ // })
|
|
|
+ },
|
|
|
// 查看扫描件
|
|
|
handleViewScan(fileUrl) {
|
|
|
if (!fileUrl) {
|
|
|
this.$message.error('暂无文件!')
|
|
|
return
|
|
|
}
|
|
|
+ let _fileUrl = ''
|
|
|
+ if (fileUrl.startsWith('http')) {
|
|
|
+ _fileUrl = fileUrl
|
|
|
+ } else {
|
|
|
+ _fileUrl = window.context.form + fileUrl
|
|
|
+ }
|
|
|
// 对文件URL进行Base64编码
|
|
|
- const encodedUrl = encodeURIComponent(
|
|
|
- Base64.encode(window.context.form + fileUrl)
|
|
|
- )
|
|
|
+ const encodedUrl = encodeURIComponent(Base64.encode(_fileUrl))
|
|
|
|
|
|
// 构建 kkFileView 预览URL
|
|
|
// onlinePreview - 在线预览
|
|
|
@@ -1076,7 +1122,16 @@
|
|
|
// 确保isPushed有值,如果row中没有,设置默认值'1'
|
|
|
isPushed: row.isPushed !== undefined ? row.isPushed : '1',
|
|
|
}
|
|
|
- this.fileUrl = this.document.electronicDocumentUrl
|
|
|
+ // 从API中获取文件URL
|
|
|
+ downDocument({
|
|
|
+ id: row.id,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.state) {
|
|
|
+ this.fileUrl = res.value || ''
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取文件URL失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
this.getDocumentData()
|
|
|
},
|
|
|
|