hongrunxia 1 rok temu
rodzic
commit
5e441b304a

+ 2 - 2
public/js/config.js

@@ -3,8 +3,8 @@ const VUE_APP_URL = {
   webRtcUrl: '//192.168.183.216:8000' // rtsp服务器IP地址
 }
 const History_Type = {
-  type: 'remote', // remote、vent
-  // type: 'vent', // remote、vent
+  // type: 'remote', // remote、vent
+  type: 'vent', // remote、vent
   deviceType: []
 }
 

+ 11 - 0
src/components/config/GlobalConfig.vue

@@ -0,0 +1,11 @@
+<template>
+  <!-- <div></div> -->
+</template>
+
+<script setup lang="ts">
+  import { provide } from 'vue';
+  const globalConfig = {
+    // 你的全局配置  
+  };
+  provide('globalConfig', globalConfig);
+</script>

+ 24 - 3
src/layouts/default/sider/bottomSideder.vue

@@ -9,9 +9,18 @@
             </div>
             <div class="vent-flex-row-wrap child-menu" >
               <template v-for="(childMenu, childIndex) in menu.children" :key="childIndex">
-                <div v-if="!childMenu.hideMenu" class="child-menu-item" @click="handleMenuClick(childMenu)">
-                  {{ childMenu.name }}
-                </div>
+                <template v-if="!childMenu.hideMenu">
+                  <template v-if="childMenu['ver'] == 1">
+                    <div class="child-menu-item" @click="handleMenuClick(childMenu)">
+                      {{ childMenu.name }}
+                    </div>
+                  </template>
+                  <template v-else>
+                    <div class="child-menu-item-disabled" :style="{ backgroundColor: '#314671' }">
+                      {{ childMenu.name }}
+                    </div>
+                  </template>
+                </template>
               </template>
             </div>
           </div>
@@ -187,6 +196,18 @@
             background: linear-gradient(#1d89bf, #17aeee);
           }
         }
+        .child-menu-item-disabled{
+          width: 100px;
+          padding: 2px 0;
+          border-radius: 2px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          margin: 5px;
+          cursor: pointer;
+          box-shadow: 0 0 3px #ffffff22 inset;
+          background: linear-gradient(#7b7b7b, #6b6b6b);
+        }
       }
     }
 

+ 2 - 1
src/router/helper/menuHelper.ts

@@ -61,8 +61,9 @@ export function transformRouteToMenu(routeModList: AppRouteModule[], routerMappi
         meta: node.meta,
         name: title,
         hideMenu,
-        alwaysShow:node.alwaysShow||false,
+        alwaysShow: node.alwaysShow || false,
         path: node.path,
+        ver: node.ver,
         ...(node.redirect ? { redirect: node.redirect } : {}),
       };
     },

+ 1 - 0
src/router/types.ts

@@ -14,6 +14,7 @@ export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
   props?: Recordable;
   fullPath?: string;
   alwaysShow?: boolean;
+  ver: string;
 }
 
 export interface MenuTag {

+ 14 - 2
src/views/system/menu/menu.data.ts

@@ -142,8 +142,8 @@ export const formSchema: FormSchema[] = [
     required: true,
     ifShow: ({ values }) => !(values.component === ComponentTypes.IFrame && values.internalOrExternal) && values.menuType !== 2,
     //update-begin-author:zyf date:2022-11-02 for: 聚合路由允许路径重复
-     dynamicRules: ({ model, schema }) => {
-       return checkPermDuplication(model, schema, true);
+    dynamicRules: ({ model, schema }) => {
+      return checkPermDuplication(model, schema, true);
     },
     //update-end-author:zyf date:2022-11-02 for: 聚合路由允许路径重复
   },
@@ -326,6 +326,18 @@ export const formSchema: FormSchema[] = [
     },
     ifShow: ({ values }) => !isButton(values.menuType),
   },
+  {
+    field: 'ver',
+    label: '菜单是否可点',
+    component: 'RadioButtonGroup',
+    defaultValue: '1',
+    componentProps: {
+      options: [
+        { label: '是', value: '1' },
+        { label: '否', value: '0' },
+      ],
+    },
+  },
 ];
 
 export const dataRuleColumns: BasicColumn[] = [

+ 38 - 8
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="history-table">
+    
+
+
     <BasicTable v-if="globalConfig.History_Type == 'vent'" ref="historyTable" @register="registerTable" >
       <template #bodyCell="{ column, record }">
         <slot name="filterCell" v-bind="{ column, record }"></slot>
@@ -200,6 +203,11 @@
           listField: globalConfig.History_Type == 'iot'? 'records': globalConfig.History_Type == 'records'? '': 'datalist.records',
           totalField: globalConfig.History_Type == 'iot' ? 'total' : globalConfig.History_Type == 'total' ? 'total' : 'datalist.total',
         },
+        pagination: {
+          current: 1,
+          pageSize: 20,
+          pageSizeOptions: ['20', '50', '100'],
+        },
         beforeFetch(params) {
           params.strtype = props.deviceType + '*';
           if(props.sysId){
@@ -268,24 +276,36 @@
             componentProps: {
               options: [
                 {
+                  label: '1秒',
+                  value: '1s',
+                },
+                {
                   label: '5秒',
-                  value: '1',
+                  value: '5s',
                 },
                 {
                   label: '10秒',
-                  value: '2',
+                  value: '10s',
+                },
+                {
+                  label: '30秒',
+                  value: '30s',
                 },
                 {
                   label: '1分钟',
-                  value: '3',
+                  value: '1m',
                 },
                 {
                   label: '10分钟',
-                  value: '4',
+                  value: '10m',
+                },
+                {
+                  label: '30分钟',
+                  value: '30m',
                 },
                 {
-                  label: '20分钟',
-                  value: '5',
+                  label: '1小时',
+                  value: '1h',
                 },
               ],
             },
@@ -293,17 +313,26 @@
         ],
         fieldMapToTime: [['tData', ['startTime', 'endTime'], 'YYYY-MM-DD HH:mm:ss']],
       },
-
+      pagination: {
+        current: 1,
+        pageSize: 20,
+        pageSizeOptions: ['20', '50', '100'],
+      },
       beforeFetch(params) {
         params.strtype = props.deviceType + '*';
         if (props.sysId) {
           params.sysId = props.sysId;
         }
         if(params.interval){
-          params.interval = params.interval+'m'
+          params.interval = params.interval
         }else{
           params.interval = '1m'
         }
+        if(props.deviceType.startsWith('location')){
+          params['isEmployee'] = false
+        }else if(props.deviceType.includes('cheliang')){
+          params['isEmployee'] = true
+        }
       },
       afterFetch(result) {
         let dataSource = []
@@ -312,6 +341,7 @@
             Object.assign(item, result['deviceId'], result['deviceName'], result['devicePos'] );
           })
         }
+        
         return dataSource;
       },
     },

+ 4 - 4
src/views/vent/monitorManager/gasPumpMonitor/index.vue

@@ -17,10 +17,10 @@
           <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }" v-for="(device, index) in deviceList" :key="index" @click="deviceChange(index)">{{ device.deviceName }}</div>
         </div>
         <div class="history-container">
-          <gasPumpHistory v-if="activeKey == 'monitor_history'" ref="historyTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType"/>
-          <gasPumpHandleHistoryVue v-if="activeKey == 'handler_history'" ref="alarmHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType" />
-          <gasPumpAlarmHistory v-if="activeKey == 'faultRecord'" ref="handlerHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType"/>
-        </div> 
+          <gasPumpHistory v-if="activeKey == 'monitor_history'" ref="historyTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="currentDeviceType"/>
+          <gasPumpHandleHistoryVue v-if="activeKey == 'handler_history'" ref="alarmHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="currentDeviceType" />
+          <gasPumpAlarmHistory v-if="activeKey == 'faultRecord'" ref="handlerHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="currentDeviceType"/>
+        </div>
       </div>      
     </div>
     <BottomMenu @change="changeActive"/>

+ 1 - 1
src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="nitrogen-history">
-     <HistoryTable columns-type="pressurefan" device-type="pressurefan" :device-list-api="getTableList.bind(null, {devicekind :'pressurefan'})" designScope="pressurefan_history" />
+     <HistoryTable columns-type="forcFan" device-type="forcFan" :device-list-api="getTableList.bind(null, {devicekind :'forcFan'})" designScope="forcFan_history" />
   </div>
 </template>
 <script setup lang="ts">