|
|
@@ -30,7 +30,11 @@
|
|
|
<template #title>
|
|
|
<el-row>
|
|
|
<el-col :span="11" class="titleHander">{{ title }}</el-col>
|
|
|
- <el-col v-show="showYueDuLiangRights" :span="3" class="read" style="text-align: right"
|
|
|
+ <el-col
|
|
|
+ v-show="showYueDuLiangRights"
|
|
|
+ :span="3"
|
|
|
+ class="read"
|
|
|
+ style="text-align: right"
|
|
|
>阅读量:{{ lookNum }}</el-col
|
|
|
>
|
|
|
<el-col :span="10" style="text-align: right">
|
|
|
@@ -57,11 +61,15 @@
|
|
|
<el-button type="primary" icon="el-icon-view" @click="lookFile"
|
|
|
>查看文件信息</el-button
|
|
|
>
|
|
|
- <el-button v-if="showfilehistory" type="primary" icon="el-icon-s-fold" @click="hideLeft">{{
|
|
|
- leftContent
|
|
|
- }}</el-button>
|
|
|
<el-button
|
|
|
- v-if="updateShow"
|
|
|
+ v-if="showfilehistory"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-s-fold"
|
|
|
+ @click="hideLeft"
|
|
|
+ >{{ leftContent }}</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="updateShow && typeControl"
|
|
|
type="primary"
|
|
|
icon="el-icon-download"
|
|
|
@click="updateFile"
|
|
|
@@ -131,15 +139,16 @@
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</el-col>
|
|
|
- <el-col :span="computedSpan"
|
|
|
- ><fView
|
|
|
+ <el-col :span="computedSpan">
|
|
|
+ <fView
|
|
|
v-if="refresh"
|
|
|
ref="fvView"
|
|
|
:option-file="optionFile"
|
|
|
:operation_status="operation_status"
|
|
|
:copy="updateShow"
|
|
|
@hadLoadedFile="hadLoadedFile"
|
|
|
- /></el-col>
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<!-- 查看文件信息弹窗 @close="closeDialog"-->
|
|
|
@@ -251,6 +260,7 @@ export default {
|
|
|
showYueDuLiangRights: true,
|
|
|
leftContent: '隐藏修订历史',
|
|
|
showfilehistory: true,
|
|
|
+ fileDownloadType: null
|
|
|
}
|
|
|
},
|
|
|
// 本人修改
|
|
|
@@ -263,6 +273,20 @@ export default {
|
|
|
return 0
|
|
|
}
|
|
|
return this.leftData.findIndex((i) => i === this.digData)
|
|
|
+ },
|
|
|
+ // fileDownloadType 为空或未获取到时允许下载;否则仅当文件权限类型在配置中时显示
|
|
|
+ typeControl() {
|
|
|
+ const types = this.fileDownloadType
|
|
|
+ if (!types || !Array.isArray(types) || types.length === 0) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ const current = Array.isArray(this.fileInfos)
|
|
|
+ ? this.fileInfos[0]
|
|
|
+ : this.fileInfos
|
|
|
+ if (!current) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return types.includes(current.wen_jian_lei_xing)
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -339,7 +363,10 @@ export default {
|
|
|
},
|
|
|
async mounted() {
|
|
|
this.height = this.getDialogHeightHeight()
|
|
|
- const { fileDownRights,fileYueDuLiangRights,projectName } = (await getSetting('system')) || {}
|
|
|
+ const { fileDownRights, fileYueDuLiangRights, projectName } =
|
|
|
+ (await getSetting('system')) || {}
|
|
|
+ const { fileDownloadType } = (await getSetting('documentReview')) || {}
|
|
|
+ this.fileDownloadType = fileDownloadType || []
|
|
|
|
|
|
// 页面切换时改变计时状态
|
|
|
document.addEventListener('visibilitychange', this.handlePageChange)
|
|
|
@@ -361,17 +388,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (fileYueDuLiangRights) {
|
|
|
- //绍兴妇幼环境限制不显示阅读量
|
|
|
- this.showYueDuLiangRights = false
|
|
|
+ //绍兴妇幼环境限制不显示阅读量
|
|
|
+ this.showYueDuLiangRights = false
|
|
|
}
|
|
|
//大方 历史按钮只展示给 系统管理员,主任,质量负责人,技术负责人,专业组组长,文件管理组组长和文件管理员
|
|
|
if (projectName == 'demo11') {
|
|
|
- const allowRole = ['xtgljs','syszr','zlfzr','jsfzr','zhsfzr','wjglzzc','wjgly']
|
|
|
+ const allowRole = [
|
|
|
+ 'xtgljs',
|
|
|
+ 'syszr',
|
|
|
+ 'zlfzr',
|
|
|
+ 'jsfzr',
|
|
|
+ 'zhsfzr',
|
|
|
+ 'wjglzzc',
|
|
|
+ 'wjgly'
|
|
|
+ ]
|
|
|
const fileHistoryPower = curRole.some((item) => allowRole.includes(item))
|
|
|
- if(!fileHistoryPower){
|
|
|
- this.showfilehistory = false
|
|
|
- this.leftShow = false
|
|
|
- }
|
|
|
+ if (!fileHistoryPower) {
|
|
|
+ this.showfilehistory = false
|
|
|
+ this.leftShow = false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|