ソースを参照

1. 5.5首页三维巷道界面上的监测数据添加权限

hongrunxia 10 ヶ月 前
コミット
894868a748
1 ファイル変更10 行追加8 行削除
  1. 10 8
      src/views/vent/home/colliery/index.vue

+ 10 - 8
src/views/vent/home/colliery/index.vue

@@ -27,7 +27,7 @@
         <div class="center-content">
           <!-- 三维模型 -->
           <div class="three-box">
-            <div class="three-nav">
+            <div class="three-nav" v-if="hasPermission('monitor:show')">
               <template v-for="(item, index) in navList" :key="index">
                 <div class="nav-item" v-if="(item.valList && item.valList.length > 0) || item.val">
                   <div class="item-label">{{ item.name }}</div>
@@ -45,7 +45,8 @@
               <!-- <div class="btn-icon" @click="goModalDetail"></div> -->
               <!-- 展会不显示按钮 -->
               <div v-if="sysOrgCode !== 'mkyzhpt'" class="btn-icon" @click="goModalDetail"></div>
-              <VentModal ref="centerModalRef" style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute" />
+              <VentModal ref="centerModalRef"
+                style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute" />
             </div>
           </div>
           <!-- 风量监测 -->
@@ -70,12 +71,10 @@
       </div>
     </div>
   </div>
-  <Network ref="NetworkRef" v-if="pageType == 'timesolution'" :pageResult="pageResult" @changePageType="changePageType" style="position: absolute" />
-  <VentModal
-    v-if="pageType == 'model3D' || pageType == 'timesolution'"
-    ref="fullModalRef"
-    style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute"
-  />
+  <Network ref="NetworkRef" v-if="pageType == 'timesolution'" :pageResult="pageResult" @changePageType="changePageType"
+    style="position: absolute" />
+  <VentModal v-if="pageType == 'model3D' || pageType == 'timesolution'" ref="fullModalRef"
+    style="width: calc(100% - 30px); height: calc(100% - 30px); position: absolute" />
 </template>
 <script lang="ts" setup>
   import { reactive, onMounted, ref, nextTick, computed, unref, inject, onBeforeUnmount, onUnmounted } from 'vue';
@@ -98,8 +97,11 @@
   import { unmountMicroApps, mountMicroApp } from '/@/qiankun';
   import { getDate } from './clique.data';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { usePermission } from '/@/hooks/web/usePermission';
 
   const { currentRoute } = useRouter();
+  const { hasPermission } = usePermission();
+
   const { title, logoUrl, sysOrgCode } = useGlobSetting();
   const actions = getActions();
   let timer: NodeJS.Timeout | null = null;