cxmo 1 年之前
父节点
当前提交
f60b1b5610
共有 2 个文件被更改,包括 19 次插入7 次删除
  1. 15 3
      src/views/Home.vue
  2. 4 4
      src/vuex/modules/permissionButton.js

+ 15 - 3
src/views/Home.vue

@@ -224,7 +224,7 @@
                     </svg>
                   </div>
                 </el-tooltip> -->
-                <el-dropdown trigger="click" style="width:130px;">
+                <el-dropdown trigger="click" style="width:130px;" v-if="isUpdateLogShow||isHelpDocShow">
                   <span class="el-dropdown-link userinfo-inner help-center-inner">
                     <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" style="color:#333">
                       <path d="M9.24255 14.5C9.24255 14.0858 9.57834 13.75 9.99255 13.75C10.4068 13.75 10.7426 14.0858 10.7426 14.5C10.7426 14.9142 10.4068 15.25 9.99255 15.25C9.57834 15.25 9.24255 14.9142 9.24255 14.5Z" fill="currentColor"/>
@@ -235,10 +235,10 @@
                     <i class="el-icon-arrow-down el-icon--right" />
                   </span>
                   <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item divided @click.native="toDoc"
+                    <el-dropdown-item divided @click.native="toDoc" v-if="isUpdateLogShow"
                       >更新日志</el-dropdown-item
                     >
-                    <el-dropdown-item divided @click.native="toOperation"
+                    <el-dropdown-item divided @click.native="toOperation" v-if="isHelpDocShow"
                       >帮助文档</el-dropdown-item
                     >
                   </el-dropdown-menu>
@@ -359,6 +359,18 @@ export default {
         return "left:0;padding-top:0;height:calc(100vh - 68px)";
       }
     },
+    //帮助文档是否展示
+    isHelpDocShow(){
+        return this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.baseConfigPermission.sysJump_helpDoc
+        )
+    },
+    //更新日志是否展示
+    isUpdateLogShow(){
+        return this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.baseConfigPermission.sysJump_updateLog
+        )
+    }
   },
   data() {
     return {

+ 4 - 4
src/vuex/modules/permissionButton.js

@@ -12,16 +12,16 @@ const permissionButtons = {
     actions:{
         getPermissionButtons({commit}){
             return new Promise((resolve,reject)=>{
-                /* departInterence.getRoleBtnAuth().then(res=>{
+                departInterence.getRoleBtnAuth().then(res=>{
                     const buttons = res.Data || []
                     commit('SET_PERMISSION_BUTTONS',buttons)
                     resolve('获取权限按钮成功')
-                }) */
-                const buttons = [
+                })
+/*                 const buttons = [
                     {ButtonCode: "system:menu:add"},
                 ]
                 commit('SET_PERMISSION_BUTTONS',buttons)
-                resolve('获取权限按钮成功')
+                resolve('获取权限按钮成功') */
             })
         }
     },