Browse Source

注氮恢复

hongrunxia 1 year ago
parent
commit
b9825d3e5f
1 changed files with 10 additions and 33 deletions
  1. 10 33
      src/views/vent/monitorManager/compressor/index.vue

+ 10 - 33
src/views/vent/monitorManager/compressor/index.vue

@@ -1,12 +1,11 @@
 <template>
   <div class="nitrogen-box">
-    <customHeader>智能注氮管控系统</customHeader>
-    <!-- <nitrogenHome v-if="btnActive == 'nitrogen_page'" /> -->
-    <nitrogenHome1 v-if="btnActive == 'nitrogen_page1'" />
-    <nitrogenEcharts v-if="btnActive == 'yfj_monitor_echarts'"/>
-    <nitrogenHistory v-if="btnActive == 'yfj_history'"/>
-    <nitrogenHandleHistory v-if="btnActive == 'yfj_handler_history'"/>
-    <nitrogenAlarmHistory v-if="btnActive == 'yfj_faultRecord'"/>
+    <customHeader :fieldNames="{ label: 'systemname', value: 'id', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">智能注氮管控系统</customHeader>
+    <nitrogenHome v-if="activeKey == 'nitrogen_page' && optionValue" :device-id="optionValue" :modal-type="modalType" />
+    <nitrogenEcharts v-if="activeKey == 'yfj_monitor_echarts'"/>
+    <nitrogenHistory ref="historyTable" v-if="activeKey == 'yfj_history'"/>
+    <nitrogenHandleHistory ref="alarmHistoryTable" v-if="activeKey == 'yfj_handler_history'"/>
+    <nitrogenAlarmHistory ref="handlerHistoryTable" v-if="activeKey == 'yfj_faultRecord'"/>
     <BottomMenu :nav-list="navList" @change="changeActive"/>
   </div>
   
@@ -14,37 +13,15 @@
 <script lang="ts" setup>
 import { ref, onMounted, onUnmounted, nextTick } from 'vue'
 import customHeader from '/@/views/vent/comment/components/customHeader.vue';
-// import nitrogenHome from './components/nitrogenHome.vue'
-import nitrogenHome1 from './components/nitrogenHome1.vue'
+import nitrogenHome from './components/nitrogenHome.vue'
 import nitrogenEcharts from './components/nitrogenEcharts.vue'
 import nitrogenHistory from './components/nitrogenHistory.vue'
 import nitrogenHandleHistory from './components/nitrogenHandleHistory.vue'
 import nitrogenAlarmHistory from './components/nitrogenAlarmHistory.vue'
 import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
-const loading = ref(true)
-const btnActive = ref('nitrogen_page1')
-const navList = ref([
-  {
-    title: '监控界面',
-    pathName: 'nitrogen_page1',
-    isHover: true
-  },
-  {
-    title: '历史监测记录',
-    pathName: 'yfj_history',
-    isHover: false
-  },
-  {
-    title: '操作历史记录',
-    pathName: 'yfj_handler_history',
-    isHover: false
-  },
-  {
-    title: '故障诊断历史记录',
-    pathName: 'yfj_faultRecord',
-    isHover: false
-  }
-])
+import { useRouter } from 'vue-router';
+import { navList } from './nitrogen.data'
+import { getTableList, systemList,  } from "./nitrogen.api";
 
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };