Преглед на файлове

绍兴妇幼下载文件权限仅开放给文件管理员

zhonghuizhen преди 11 месеца
родител
ревизия
5e40007673
променени са 2 файла, в които са добавени 18 реда и са изтрити 5 реда
  1. 5 1
      src/utils/query.js
  2. 13 4
      src/views/component/fileTraining/index.vue

+ 5 - 1
src/utils/query.js

@@ -216,12 +216,16 @@
                 'displayField': ['deviceno1_', 'devicename1_'],
                 'requireField': ['deviceno1_', 'devicename1_']
             }
-        }
+        },
+        // 纯水机填写参数值是否保留小数(绍兴妇幼不需要保留),true为需要保留,false为不需要保留
+        'baoliuxiaoshu': fasle
     },
     // 系统通用
     'system': {
         // 报表预览、PDF预览页面下载权限
         'highRoles': ['xtgljs', 'syszr', 'zlfzr', 'jsfzr', 'zhsfzr', 'wjglzzc', 'wjgly', 'wjxzjs'],
+        //文件受控查阅下载是否只限制文件管理员(绍兴妇幼只限制文件管理员),true为限制
+        'fileDownRights':true,
         // 体系运行记录盒显示流程编制时间,默认仅展示完成时间
         'reocrdsBoxShowStartDate': false,
         // 体系运行记录盒显示流程完成时间

+ 13 - 4
src/views/component/fileTraining/index.vue

@@ -186,6 +186,7 @@ import Template from '@/business/platform/form/form-print/template.vue'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import FileDialog from './fileDialog.vue'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
+import { getSetting } from '@/utils/query'
 // import * as selectbox from 'bpmn-js-properties-panel/lib/factory/SelectEntryFactory'
 // import func from 'vue-editor-bridge'
 export default {
@@ -346,8 +347,9 @@ export default {
     // 本人修改
     this.removeMouseMoveListener()
   },
-  mounted() {
+  async mounted() {
     this.height = this.getDialogHeightHeight()
+    const { fileDownRights } = (await getSetting('system')) || {}
     // 页面切换时改变计时状态
     document.addEventListener('visibilitychange', this.handlePageChange)
     this.checkDialogBody()
@@ -355,10 +357,17 @@ export default {
     const curRole = this.role.map((i) => i.alias)
     const isPower = curRole.some((item) => roleKey.includes(item))
     this.deleteShow = !!(isPower || this.isPower)
-    const hasRole = localStorage.getItem('hasHighRole') === '1'
-    if (this.isSuper || hasRole) {
-      this.updateShow = true
+    if(fileDownRights){ //绍兴妇幼环境限制只有文件管理员可以显示
+      if (this.isSuper || curRole.some(item => item == 'wjgly') ) {
+        this.updateShow = true
+      }
+    }else{ // 其他环境
+       const hasRole = localStorage.getItem('hasHighRole') === '1'
+      if (this.isSuper || hasRole) {
+        this.updateShow = true
+      }
     }
+    
   },
   methods: {
     getUserName(data) {