Browse Source

[Feat 0000] 公司端首页适配项目配置-数据类型项

houzekong 1 month ago
parent
commit
5788da6ee6
2 changed files with 12 additions and 4 deletions
  1. 11 3
      src/views/vent/home/clique/index.vue
  2. 1 1
      src/views/vent/home/configurable/vent_v5.vue

+ 11 - 3
src/views/vent/home/clique/index.vue

@@ -23,7 +23,13 @@
               <iconLight @show-detail="showDetail" :warningList="warningList" />
             </div>
           </div>
-          <div :class="{ 'realtime-mode': isDataRealTime }" alt="切换数据模式" class="switch-button report-mode" @click="switchDataMode"></div>
+          <div
+            v-if="sysDataType === 'all'"
+            :class="{ 'realtime-mode': isDataRealTime }"
+            alt="切换数据模式"
+            class="switch-button report-mode"
+            @click="switchDataMode"
+          ></div>
           <!-- 榆家梁矿 -->
           <!-- <div class="area-card2">
             
@@ -63,7 +69,9 @@
   import iconLight from './components/icon-light.vue';
   import dialogModal from './components/dialog-modal.vue';
   import { getHomeData, getList } from './clique.api';
-  import { EllipsisOutlined } from '@ant-design/icons-vue';
+  import { useGlobSetting } from '/@/hooks/setting';
+
+  const { sysDataType = 'monitor' } = useGlobSetting();
 
   const dialogModalRef = ref();
   let mainTitle = ref('国能神东一通三防管控平台');
@@ -99,7 +107,7 @@
   let orgcode = ref('');
 
   /** 数据是否使用实时数据,使用实时数据/报表数据对应某些数据的不同字段 */
-  const isDataRealTime = ref(false);
+  const isDataRealTime = ref(sysDataType === 'monitor');
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;

+ 1 - 1
src/views/vent/home/configurable/vent_v5.vue

@@ -95,7 +95,7 @@
   import { useGlobSetting } from '/@/hooks/setting';
   // import { testConfigVent, testConfigVentRealtime } from './configurable.data';
 
-  const { sysDataType } = useGlobSetting();
+  const { sysDataType = 'monitor' } = useGlobSetting();
   const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
   const { mainTitle, enhancedConfigs, hiddenList, data, updateData, updateEnhancedConfigs } = useInitPage('智能通风管控系统');
   const route = useRoute();