|
|
@@ -175,11 +175,20 @@
|
|
|
<!-- 档案详情预览弹窗 -->
|
|
|
<el-dialog
|
|
|
:visible.sync="previewDialogVisible"
|
|
|
- width="65%"
|
|
|
+ :width="isMaximized ? '95%' : '65%'"
|
|
|
title="档案详情预览"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <div class="preview-container">
|
|
|
+ <div slot="title" class="dialog-header-with-actions">
|
|
|
+ <span>档案详情预览</span>
|
|
|
+ <el-button type="text" size="small" @click="toggleMaximized">
|
|
|
+ <i :class="isMaximized ? 'el-icon-crop' : 'el-icon-full-screen'"></i>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="preview-container"
|
|
|
+ :style="{ height: isMaximized ? '80vh' : '600px' }"
|
|
|
+ >
|
|
|
<iframe
|
|
|
v-if="previewUrl"
|
|
|
:src="previewUrl"
|
|
|
@@ -196,6 +205,7 @@
|
|
|
import { getArchiveList } from '@/api/audit/archive'
|
|
|
import { getSysPropertiesAlias } from '@/api/properties'
|
|
|
import { regionMixin } from '@/mixins/useDict'
|
|
|
+ import { Base64 } from 'js-base64'
|
|
|
export default {
|
|
|
name: 'ArchiveList',
|
|
|
components: {
|
|
|
@@ -220,15 +230,17 @@
|
|
|
activeTab: 'list',
|
|
|
// 系统属性值
|
|
|
sysKkUrl: '',
|
|
|
+ sysPlatUrl: '',
|
|
|
// 预览对话框
|
|
|
previewDialogVisible: false,
|
|
|
- previewUrl:
|
|
|
- 'http://1.71.9.215:8012/onlinePreview?url=aHR0cDovLzEuNzEuOS4yMTU6ODAxMi9kZW1vL%2BWNt%2BWul18xOTk5MzA5NDM3MzY2NTQyMzM2XzIwMjUxMjEyMTQwNjI4XzM5MygxKS5kb2N4',
|
|
|
+ previewUrl: '',
|
|
|
+ // 弹窗最大化状态
|
|
|
+ isMaximized: false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.fetchData()
|
|
|
- this.getSysKkUrl()
|
|
|
+ this.getSysProperties()
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取数据
|
|
|
@@ -299,12 +311,19 @@
|
|
|
// 打开任务详情弹窗
|
|
|
this.$refs.taskDetail.open(row, 'chengben')
|
|
|
},
|
|
|
- // 获取系统属性值 sys.kk.url
|
|
|
- async getSysKkUrl() {
|
|
|
+ // 获取系统属性值
|
|
|
+ async getSysProperties() {
|
|
|
try {
|
|
|
- const response = await getSysPropertiesAlias('sys_kk_url')
|
|
|
- if (response) {
|
|
|
- this.sysKkUrl = response
|
|
|
+ // 获取 sys.kk.url
|
|
|
+ const kkUrlResponse = await getSysPropertiesAlias('sys_kk_url')
|
|
|
+ if (kkUrlResponse) {
|
|
|
+ this.sysKkUrl = kkUrlResponse
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取 sys.plat.url
|
|
|
+ const platUrlResponse = await getSysPropertiesAlias('sys_plat_url')
|
|
|
+ if (platUrlResponse) {
|
|
|
+ this.sysPlatUrl = platUrlResponse
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('获取系统属性值失败:', error)
|
|
|
@@ -348,11 +367,14 @@
|
|
|
// 拼接预览URL
|
|
|
this.previewUrl =
|
|
|
this.sysKkUrl +
|
|
|
- encodeURIComponent(
|
|
|
- Base64.encode('http://1.71.9.215:9506' + row.archiveUrl)
|
|
|
- )
|
|
|
+ encodeURIComponent(Base64.encode(this.sysPlatUrl + row.archiveUrl))
|
|
|
// 打开预览弹窗
|
|
|
this.previewDialogVisible = true
|
|
|
+ this.isMaximized = false
|
|
|
+ },
|
|
|
+ // 切换弹窗最大化状态
|
|
|
+ toggleMaximized() {
|
|
|
+ this.isMaximized = !this.isMaximized
|
|
|
},
|
|
|
backToList() {
|
|
|
this.activeTab = 'list'
|
|
|
@@ -404,4 +426,22 @@
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+
|
|
|
+ .dialog-header-with-actions {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 36px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dialog-header-with-actions .el-button {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 36px;
|
|
|
+ margin-right: 40px;
|
|
|
+ margin-top: -10px;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
</style>
|