瀏覽代碼

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 4 月之前
父節點
當前提交
e8d28e5dbd

+ 20 - 1
src/design/theme.less

@@ -1,4 +1,9 @@
+@import './themify/dark.less';
+@import './themify/light.less';
+@import './themify/vent1.less';
+
 @ventSpace: zxm;
+
 .bg-white {
   background-color: @component-background !important;
 }
@@ -7,22 +12,27 @@ html[data-theme='light'] {
   .text-secondary {
     color: rgba(0, 0, 0, 0.45);
   }
+
   /*【美化】自定义table字体颜色*/
   .@{ventSpace}-table {
     color: rgba(0, 0, 0, 0.65);
   }
+
   /*【美化】自定义table字体颜色*/
   /*【美化】自定义form字体颜色*/
   .@{ventSpace}-select-multiple .@{ventSpace}-select-selection-item-content {
     color: rgba(0, 0, 0, 0.65);
   }
-  .@{ventSpace}-input-affix-wrapper > input.@{ventSpace}-input {
+
+  .@{ventSpace}-input-affix-wrapper>input.@{ventSpace}-input {
     color: rgba(0, 0, 0, 0.65);
   }
+
   .@{ventSpace}-select-single.@{ventSpace}-select-show-arrow .@{ventSpace}-select-selection-item,
   .@{ventSpace}-select-single.@{ventSpace}-select-show-arrow .@{ventSpace}-select-selection-placeholder {
     color: rgba(0, 0, 0, 0.65);
   }
+
   /*【美化】自定义form字体颜色*/
 
   .@{ventSpace}-alert-success {
@@ -39,6 +49,7 @@ html[data-theme='light'] {
     background-color: #fffbe6;
     border: 1px solid #ffe58f;
   }
+
   :not(:root):fullscreen::backdrop {
     background-color: @layout-body-background !important;
   }
@@ -65,3 +76,11 @@ html[data-theme='light'] {
     color: rgba(0, 0, 0, 0.9);
   }
 }
+
+// 下面的代码负责将 themify 文件夹下声明的 css 变量赋给 less 变量
+@themify-text-primary: var(--themify-text-primary);
+
+// 下面的代码负责将主题相关的选择器、图片前缀等 less 变量声明
+@theme-dark: ~"html[data-theme='dark2']";
+@theme-light: ~"html[data-theme='light']";
+@theme-vent1: ~"html[data-theme='vent1']";

+ 3 - 0
src/design/themify/dark.less

@@ -0,0 +1,3 @@
+html[data-theme='dark2'] {
+    --themify-text-primary: #ddd;
+}

+ 3 - 0
src/design/themify/light.less

@@ -0,0 +1,3 @@
+html[data-theme='light'] {
+    --themify-text-primary: #333;
+}

+ 3 - 0
src/design/themify/vent1.less

@@ -0,0 +1,3 @@
+html[data-theme='vent1'] {
+    --themify-text-primary: #fff;
+}

+ 2 - 2
src/layouts/default/header/components/user-dropdown/ThemeSelect.vue

@@ -1,6 +1,6 @@
 <template>
-  <BasicModal v-bind="config" title="切换主题" v-model:visible="visible" wrapClassName="themeSelectModal">
-    <a-radio-group v-model:value="themeSelected" name="radioGroup" @change="change">
+  <BasicModal v-bind="config" title="切换主题" v-model:visible="visible" style="padding: 0 10px">
+    <a-radio-group v-model:value="themeSelected" @change="change">
       <a-radio v-for="item in options" :key="item.value" :value="item.value">{{ item.label }}</a-radio>
     </a-radio-group>
   </BasicModal>

+ 2 - 2
src/logics/theme/dark.ts

@@ -1,7 +1,7 @@
 import { darkCssIsReady, loadDarkThemeCss } from '@rys-fe/vite-plugin-theme/es/client';
 import { addClass, hasClass, removeClass } from '/@/utils/domUtils';
 
-export async function updateDarkTheme(mode: string | null = 'light') {
+export async function updateDarkTheme(mode: string = 'light') {
   const htmlRoot = document.getElementById('htmlRoot');
   if (!htmlRoot) {
     return;
@@ -16,7 +16,7 @@ export async function updateDarkTheme(mode: string | null = 'light') {
       addClass(htmlRoot, 'dark');
     }
   } else {
-    htmlRoot.setAttribute('data-theme', 'light');
+    htmlRoot.setAttribute('data-theme', mode);
     if (hasDarkClass) {
       removeClass(htmlRoot, 'dark');
     }

+ 11 - 0
src/views/sys/login/Login.vue

@@ -45,6 +45,7 @@
   handleBackLogin();
 </script>
 <style lang="less" scoped>
+  @import '/@/design/theme.less';
   @prefix-cls: ~'@{namespace}-login';
   @logo-prefix-cls: ~'@{namespace}-app-logo';
   @countdown-prefix-cls: ~'@{namespace}-countdown-input';
@@ -84,7 +85,17 @@
     }
   }
 
+  @{theme-dark} {
+    .login-container {
+      background: #021632;
+      &::before {
+        background-image: none;
+      }
+    }
+  }
+
   .login-container {
+    color: @themify-text-primary;
     width: 100vw;
     height: 100%;
     background: linear-gradient(to bottom, #000c37, #001e63);

+ 1 - 1
src/views/vent/deviceManager/configurationTable/configuration.data.ts

@@ -106,7 +106,7 @@ export const formSchema: FormSchema[] = [
     label: '原始预设名称',
     field: 'desc',
     component: 'Select',
-    required: true,
+    required: false,
     componentProps: {
       options: ModulePresetOptions,
     },

+ 1 - 1
src/views/vent/home/configurable/configurable.data.ts

@@ -615,7 +615,7 @@ export const testConfigDust: Config[] = [
     },
     showStyle: {
       size: 'width:450px;height:860px;',
-      version: '保德',
+      version: '新版',
       position: 'top:60px;left:0;',
     },
   },

+ 48 - 15
src/views/vent/monitorManager/alarmMonitor/common.data.ts

@@ -1,5 +1,6 @@
 import { reactive, markRaw, defineAsyncComponent } from 'vue';
 import { getAssetURL } from '/@/utils/ui';
+import { useGlobSetting } from '/@/hooks/setting';
 
 //中间区域数据-通风
 export const centerAreaListT1 = [
@@ -26,7 +27,19 @@ export const centerAreaListB1 = [
 //内外因火灾菜单列表
 export const typeMenuList = [{ name: '内因火灾' }, { name: '外因火灾' }, { name: '火灾指标' }];
 //瓦斯监测菜单列表
-export const typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' },{ name: '瓦斯参数' },];
+export function getMonitorComponent() {
+  const { sysOrgCode } = useGlobSetting();
+  let typeMenuListGas;
+  switch (sysOrgCode) {
+    case 'sdmtjtdltmk': //大柳塔
+      typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' },];
+      return typeMenuListGas;
+    default:
+      typeMenuListGas = [{ name: '预警监测' }, { name: '预警指标' }, { name: '瓦斯参数' },];
+      return typeMenuListGas;
+  }
+}
+
 //当前加载组件
 export const componentName = {
   fireWork: markRaw(defineAsyncComponent(() => import('./common/fireWork.vue'))),
@@ -101,17 +114,17 @@ export const ventilateTopList = [
     list: [],
   },
   { id: 3, imgSrc: false, label: '', value: null, text: '--', list: [] },
-  {
-    id: 4,
-    imgSrc: false,
-    label: '其他信息',
-    value: null,
-    text: '',
-    list: [
-      { id: 0, label: 'O₂', value: '--' },
-      { id: 1, label: 'CO', value: '--' },
-    ],
-  },
+  // {
+  //   id: 4,
+  //   imgSrc: false,
+  //   label: '其他信息',
+  //   value: null,
+  //   text: '',
+  //   list: [
+  //     { id: 0, label: 'O₂', value: '--' },
+  //     { id: 1, label: 'CO', value: '--' },
+  //   ],
+  // },
 ];
 //束管监测选项列表
 export const contentList = [
@@ -231,14 +244,34 @@ export const tabLists = [
 ];
 //外因火灾-传感器table列
 export const columns = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }) => {
+      return `${index + 1}`;
+    },
+  },
   { rowIndex: 1, dataIndex: 'strinstallpos', title: '名称', type: '1', align: 'center' },
-  { rowIndex: 2, dataIndex: 'warnLevel_str', title: '状态', type: '1', align: 'center' },
+  { rowIndex: 2, dataIndex: 'warnLevel_str',width:80, title: '状态', type: '1', align: 'center' },
   { rowIndex: 3, dataIndex: 'readTime', title: '时间', type: '1', align: 'center' },
 ];
 //外因火灾-烟雾传感器table列
 export const columnsSmoke = [
+  {
+    title: '序号',
+    dataIndex: '',
+    key: 'rowIndex',
+    width: 60,
+    align: 'center',
+    customRender: ({ index }) => {
+      return `${index + 1}`;
+    },
+  },
   { rowIndex: 1, dataIndex: 'strinstallpos', title: '名称', type: '1', align: 'center' },
-  { rowIndex: 2, dataIndex: 'val', title: '值', type: '1', align: 'center' },
-  { rowIndex: 3, dataIndex: 'warnLevel_str', title: '状态', type: '1', align: 'center' },
+  { rowIndex: 2, dataIndex: 'val', width:80, title: '值', type: '1', align: 'center' },
+  { rowIndex: 3, dataIndex: 'warnLevel_str', width:80,title: '状态', type: '1', align: 'center' },
   { rowIndex: 4, dataIndex: 'readTime', title: '时间', type: '1', align: 'center' },
 ];

+ 9 - 9
src/views/vent/monitorManager/alarmMonitor/common/mainWell.vue

@@ -48,7 +48,7 @@
             :data-source="monitorlistYw" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"></span>
@@ -57,7 +57,7 @@
             :pagination="false" :scroll="{ y: 273 }">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -66,7 +66,7 @@
             :data-source="monitorlistPl" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -86,7 +86,7 @@
             :columns="columnsSmoke" :data-source="monitorlistYw" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"></span>
@@ -96,7 +96,7 @@
             :columns="columnsSmoke" :data-source="monitorlistWd" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -105,7 +105,7 @@
             :columns="columns" :data-source="monitorlistPl" :pagination="false">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -114,7 +114,7 @@
             :pagination="false" :scroll="{ y: listData.fiber.length != 0 ? 60 : 120 }">
             <template #bodyCell="{ column, text }">
               <template v-if="column.dataIndex === 'warnLevel_str'">
-                <div :style="{color:text=='报警' ? '#ff0000' : '#91e609'}">{{ text }}</div>
+                <div :style="{ color: text == '报警' ? '#ff0000' : '#91e609' }">{{ text }}</div>
               </template>
             </template>
             <span slot="action" slot-scope="text, record"> </span>
@@ -419,7 +419,7 @@ watch(
           monitorlistYw.push({
             strinstallpos: el.strinstallpos,
             val: el.readData.smokeval,
-            // warnLevel_str: el.warnLevel_str == '正常' ? '低风险' : el.warnLevel_str,
+            warnLevel_str: el.warnLevel_str,
             readTime: el.readTime,
           });
         });
@@ -442,7 +442,7 @@ watch(
           monitorlistWd.push({
             strinstallpos: el.strinstallpos,
             val: el.readData.fireval,
-            // warnLevel_str: el.warnLevel_str == '正常' ? '低风险' : el.warnLevel_str,
+            warnLevel_str:el.warnLevel_str,
             readTime: el.readTime,
           });
         });

+ 5 - 2
src/views/vent/monitorManager/alarmMonitor/warn/gasWarn.vue

@@ -5,7 +5,7 @@
       style="position: absolute; left: 15px; top: 15px; color: #fff" @click="getBack">返回</a-button>
     <div class="alarm-menu">
       <div class="type-btn">
-        <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuListGas" :key="index"
+        <div :class="activeIndex == index ? 'btn1' : 'btn'" :style="{width:sysOrgCode=='sdmtjtdltmk' ? '50%' : '33.33%' }" v-for="(item, index) in typeMenuListGas" :key="index"
           @click="btnClick(index)">
           {{ item.name }}
         </div>
@@ -103,9 +103,12 @@ import { useRouter } from 'vue-router';
 import CustomHeader from '/@/components/vent/customHeader.vue';
 import warnTargetGas from '../common/warnTargetGas.vue';
 import gasParamter from '../common/gasParamter.vue';
-import { typeMenuListGas } from '../common.data';
+import { getMonitorComponent } from '../common.data';
 import { usePermission } from '/@/hooks/web/usePermission';
+import { useGlobSetting } from '/@/hooks/setting';
 
+let typeMenuListGas=getMonitorComponent()
+const { sysOrgCode } = useGlobSetting();
 const { hasPermission } = usePermission();
 const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
 //当前左侧激活菜单的索引

+ 41 - 41
src/views/vent/monitorManager/alarmMonitor/warn/ventilateWarn.vue

@@ -24,15 +24,15 @@
             <div :style="{ color: item.text == '正常' ? '#00d8ff' : '#ff2313' }"
               style="width: 100%; padding: 0px 10px; text-align: center; font-weight: bold" v-if="item.text">{{
                 item.text }}</div>
-            <div class="percent" v-if="item.list.length != 0">
-              <div class="title">{{ item.label }}</div>
-              <div class="value">
-                <div class="content-box" v-for="(items, ind) in item.list" :key="ind">
-                  <span style="color: #b3b8cc">{{ `${items.label} :` }}</span>
-                  <span style="color: #3df6ff; margin-left: 10px">{{ items.value }}</span>
-                </div>
-              </div>
-            </div>
+            // <div class="percent" v-if="item.list.length != 0">
+            //   <div class="title">{{ item.label }}</div>
+            //   <div class="value">
+            //     <div class="content-box" v-for="(items, ind) in item.list" :key="ind">
+            //       <span style="color: #b3b8cc">{{ `${items.label} :` }}</span>
+            //       <span style="color: #3df6ff; margin-left: 10px">{{ items.value }}</span>
+            //     </div>
+            //   </div>
+            // </div>
           </div>
         </div>
         <div class="bot-area">
@@ -381,7 +381,7 @@ onUnmounted(() => {
           }
 
           &:nth-child(4) {
-            flex: 0.6;
+            flex: 1;
             color: #b3b8cc;
             font-size: 16px;
             height: 100%;
@@ -389,37 +389,37 @@ onUnmounted(() => {
             border-image: linear-gradient(to bottom, transparent, rgba(2, 70, 136, 1), transparent) 1 1 1;
           }
 
-          &:nth-child(5) {
-            flex: 1.4;
-            height: 100%;
-
-            .percent {
-              width: 100%;
-              height: 82%;
-              padding: 0px 20px;
-              box-sizing: border-box;
-              display: flex;
-              flex-direction: column;
-              justify-content: space-around;
-
-              .title {
-                font-size: 14px;
-                padding: 5px 0px;
-                color: #b3b8cc;
-                text-align: center;
-              }
-
-              .value {
-                display: flex;
-                justify-content: space-between;
-
-                span {
-                  font-family: 'douyuFont';
-                  font-size: 18px;
-                }
-              }
-            }
-          }
+          // &:nth-child(5) {
+          //   flex: 1.4;
+          //   height: 100%;
+
+          //   .percent {
+          //     width: 100%;
+          //     height: 82%;
+          //     padding: 0px 20px;
+          //     box-sizing: border-box;
+          //     display: flex;
+          //     flex-direction: column;
+          //     justify-content: space-around;
+
+          //     .title {
+          //       font-size: 14px;
+          //       padding: 5px 0px;
+          //       color: #b3b8cc;
+          //       text-align: center;
+          //     }
+
+          //     .value {
+          //       display: flex;
+          //       justify-content: space-between;
+
+          //       span {
+          //         font-family: 'douyuFont';
+          //         font-size: 18px;
+          //       }
+          //     }
+          //   }
+          // }
 
           .pic {
             width: 30%;