소스 검색

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

lxh 10 달 전
부모
커밋
d46275bd6d
2개의 변경된 파일97개의 추가작업 그리고 69개의 파일을 삭제
  1. 1 1
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  2. 96 68
      src/views/vent/monitorManager/safetyMonitor/index.vue

+ 1 - 1
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -498,7 +498,7 @@
   import { message } from 'ant-design-vue';
   import { useCamera } from '/@/hooks/system/useCamera';
   import { CaretRightOutlined } from '@ant-design/icons-vue';
-  // import ConditionAssistance from './components/conditionAssistance.vue';
+  import ConditionAssistance from './components/conditionAssistance.vue';
   import reportInfo from '../comment/components/reportInfo.vue';
   import { save, reportList } from '../../reportManager/reportManager.api';
   import { usePermission } from '/@/hooks/web/usePermission';

+ 96 - 68
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -6,7 +6,98 @@
           <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
         </template>
         <template v-else-if="activeKey == '1' && deviceType">
-          <MonitorTable
+          <template v-if="hasPermission('btn:noGb')">
+            <MonitorTable
+              ref="monitorTable"
+              :columnsType="`${deviceType}_monitor`"
+              :dataSource="dataSource"
+              design-scope="device_monitor"
+              :isShowPagination="false"
+              :isShowActionColumn="isHaveAction.includes(deviceType.split('_')[0]) ? false : true"
+              :is-show-select="false"
+              title="设备监测"
+              :scroll="{ y: 650 }"
+          /></template>
+          <template v-else>
+            <MonitorTable
+              ref="monitorTable"
+              :columnsType="`${deviceType}_monitor`"
+              :dataSource="dataSource"
+              design-scope="device_monitor"
+              :isShowPagination="false"
+              :isShowActionColumn="isHaveAction.includes(deviceType.split('_')[0]) ? false : true"
+              :is-show-select="false"
+              title="设备监测"
+              :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
+              :scroll="{ y: 650 }"
+            >
+              <template #filterCell="{ column, record }">
+                <template v-if="deviceType.startsWith('gate')">
+                  <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
+                    <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
+                      >正在打开</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
+                  </template>
+                  <template v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
+                    <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
+                      >正在关闭</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default"
+                      >关闭</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="default"
+                      >打开</a-tag
+                    >
+                  </template>
+                  <template v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
+                    <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
+                      >正在打开</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
+                  </template>
+                  <template v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
+                    <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
+                      >正在关闭</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default"
+                      >关闭</a-tag
+                    >
+                    <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default"
+                      >打开</a-tag
+                    >
+                  </template>
+                </template>
+                <template v-if="deviceType.startsWith('windrect')">
+                  <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
+                    {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
+                  >
+                  <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
+                    <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
+                      record.isRun == -2 ? '空闲' : '等待'
+                    }}</a-tag>
+                    <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
+                    <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
+                  </template>
+                </template>
+                <template v-if="deviceType.startsWith('safetymonitor')">
+                  <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
+                  <div v-if="!record.V && column.dataIndex === 'V'">-</div>
+                  <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
+                  <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
+                  <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
+                  <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
+                </template>
+                <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
+                  {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
+                >
+                <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
+                  record.netStatus == '0' ? '断开' : '连接'
+                }}</a-tag>
+              </template>
+            </MonitorTable></template
+          >
+          <!-- <MonitorTable
             ref="monitorTable"
             :columnsType="`${deviceType}_monitor`"
             :dataSource="dataSource"
@@ -17,72 +108,7 @@
             title="设备监测"
             :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
             :scroll="{ y: 650 }"
-          >
-            <template #filterCell="{ column, record }">
-              <template v-if="deviceType.startsWith('gate')">
-                <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
-                  <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
-                    >正在打开</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
-                </template>
-                <template v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
-                  <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0" color="red"
-                    >正在关闭</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1" color="default"
-                    >关闭</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0" color="default"
-                    >打开</a-tag
-                  >
-                </template>
-                <template v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
-                  <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
-                    >正在打开</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
-                </template>
-                <template v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
-                  <a-tag v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0" color="red"
-                    >正在关闭</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1" color="default"
-                    >关闭</a-tag
-                  >
-                  <a-tag v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0" color="default"
-                    >打开</a-tag
-                  >
-                </template>
-              </template>
-              <template v-if="deviceType.startsWith('windrect')">
-                <a-tag v-if="column.dataIndex === 'sign'" :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
-                  {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag
-                >
-                <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
-                  <a-tag v-if="record.isRun == -2 || record.isRun == -1" :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
-                    record.isRun == -2 ? '空闲' : '等待'
-                  }}</a-tag>
-                  <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
-                  <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
-                </template>
-              </template>
-              <template v-if="deviceType.startsWith('safetymonitor')">
-                <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
-                <div v-if="!record.V && column.dataIndex === 'V'">-</div>
-                <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
-                <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
-                <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
-                <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
-              </template>
-              <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
-                {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
-              >
-              <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
-                record.netStatus == '0' ? '断开' : '连接'
-              }}</a-tag>
-            </template>
-          </MonitorTable>
+          > -->
         </template>
         <!-- 图表 -->
         <!-- <div style="width:100%;height:280px;margin: 20px 0px;">
@@ -173,8 +199,10 @@
   import { useRouter } from 'vue-router';
   import { formConfig, isHaveAction } from './safety.data';
   import { getDictItemsByCode } from '/@/utils/dict';
+  import { usePermission } from '/@/hooks/web/usePermission';
   import { useGlobSetting } from '/@/hooks/setting';
   const { sysOrgCode } = useGlobSetting();
+  const { hasPermission } = usePermission();
 
   // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
@@ -290,7 +318,7 @@
               tempData1.push(item);
             }
           });
-          if (sysOrgCode == 'zjtzqctmk') {
+          if (sysOrgCode == 'zjtzqctmk' || hasPermission('btn:noGb')) {
             dataSource.value = [...tempData, ...tempData1];
           } else {
             dataSource.value = [...tempData];