Bläddra i källkod

文件与记录-设备档案使用最新版本(判断页面操作权限)

shenqilong 8 månader sedan
förälder
incheckning
f8411f966b
1 ändrade filer med 11 tillägg och 4 borttagningar
  1. 11 4
      src/views/component/device/index.vue

+ 11 - 4
src/views/component/device/index.vue

@@ -7,7 +7,11 @@
           ref="crud"
           :data="listData"
           :toolbars="
-            config
+            readOnly
+              ? listConfig.toolbars.filter((obj) => {
+                  return obj.key == 'search'
+                })
+              : config
               ? listConfig.toolbars.filter((obj) => {
                   return obj.key !== 'customSetting'
                 })
@@ -85,9 +89,11 @@
           <template slot="customButton" slot-scope="{ row }">
             <el-button
               type="text"
-              :icon="hasRole ? 'el-icon-edit-outline' : 'ibps-icon-eye'"
+              :icon="
+                hasRole && !readOnly ? 'el-icon-edit-outline' : 'ibps-icon-eye'
+              "
               @click="goEdit(row)"
-              >{{ hasRole ? '修改' : '查阅' }}</el-button
+              >{{ hasRole && !readOnly ? '修改' : '查阅' }}</el-button
             >
             <!-- <el-button type="text" icon="el-icon-view" @click="goLook(row)">查阅</el-button> -->
             <el-button
@@ -383,7 +389,7 @@
       :hide-sys-device-no="hideSysDeviceNo"
       :has-fu-ze-ren-dian-hua="hasFuZeRenDianHua"
       :has-chang-jia-lian-xi-ren="hasChangJiaLianXiRen"
-      :readonly="!hasRole"
+      :readonly="!hasRole || readOnly"
       @close="close"
     />
     <input
@@ -912,6 +918,7 @@ export default {
       hasChangJiaLianXiRen: false,
       tabList: {},
       hasRole: true,
+      readOnly: this.$route.fullPath === '/xxgl/sbda',
       typeList: {
         检验系统: '检验系统',
         通用设备: '通用设备',