Просмотр исходного кода

[Feat 0000]皮带巷代码合并

bobo04052021@163.com 1 месяц назад
Родитель
Сommit
f29bd943ed

+ 3 - 2
src/views/vent/home/configurable/belt/beltJcyj.vue

@@ -27,7 +27,7 @@
 import { onMounted, ref } from 'vue';
 import customHeader from './components/customHeader-belt.vue';
 import { useInitConfigs, useInitPage } from '../hooks/useInit';
-import { testYjkf } from './configurable.data';
+import { testJcyj } from './configurable.data';
 import ModuleCommon from './components/ModuleCommonBelt.vue';
 import { getHomeData, sysList, list } from './configurable.api';
 import { message, Modal } from 'ant-design-vue';
@@ -39,12 +39,13 @@ const { configs, fetchConfigs } = useInitConfigs();
 const { updateEnhancedConfigs, data, updateData } = useInitPage('皮带巷智能管控');
 function refresh() {
   fetchConfigs('belt').then(() => {
-    configs.value = testYjkf;
+    configs.value = testJcyj;
     // Promise.resolve(doorMock).then(updateData);
     // getHomeData({}).then(updateData);
     // getDataSource();
   });
 }
+
 function initInterval() {
   setInterval(() => {
     // getHomeData({}).then(updateData);

+ 3 - 5
src/views/vent/home/configurable/belt/beltYjkf.vue

@@ -29,11 +29,10 @@ import customHeader from './components/customHeader-belt.vue';
 import { useInitConfigs, useInitPage } from '../hooks/useInit';
 import { testYjkf } from './configurable.data';
 import ModuleCommon from './components/ModuleCommonBelt.vue';
-import { getHomeData, sysList, list } from './configurable.api';
+import { getSystem } from './configurable.api';
 import { message, Modal } from 'ant-design-vue';
 import BeltNav from './components/BeltNav.vue';
 import { doorMock } from './mock.ts';
-
 // import { BDFireMock } from './mock';
 const { configs, fetchConfigs } = useInitConfigs();
 const { updateEnhancedConfigs, data, updateData } = useInitPage('皮带巷智能管控');
@@ -69,14 +68,13 @@ const readData = ref([
 function refresh() {
   fetchConfigs('belt').then(() => {
     configs.value = testYjkf;
-    Promise.resolve(doorMock).then(updateData);
-    // getHomeData({}).then(updateData);
+    getSystem({}).then(updateData);
     // getDataSource();
   });
 }
 function initInterval() {
   setInterval(() => {
-    // getHomeData({}).then(updateData);
+    getSystem({}).then(updateData);
   }, 60000);
 }
 onMounted(async () => {

+ 2 - 2
src/views/vent/home/configurable/belt/components/BeltNav.vue

@@ -39,12 +39,12 @@ const activeIndex = ref(0);
 const menuList = ref([
   {
     name: '防灭火监测与预警',
-    targatUrl: '/BeltMonitorWarn/index',
+    targatUrl: '/micro-vent-3dModal/beltWarnMonitor/index',
     position: 'left',
   },
   {
     name: '喷淋系统管控',
-    targatUrl: '/SprySystem/index',
+    targatUrl: '/micro-vent-3dModal/SprySystem/index',
     position: 'center',
   },
   {

+ 1 - 1
src/views/vent/home/configurable/belt/components/ModuleCommonBelt.vue

@@ -24,7 +24,7 @@
 </template>
 <script lang="ts" setup>
 import Header from './headerBelt.vue';
-import Content from '../../components/content.vue';
+import Content from './contentBelt.vue';
 // import ModuleLeft from './original/moduleLeft.vue';
 // import ModuleBottom from './original/moduleBottom.vue';
 import { computed, ref } from 'vue';

+ 3 - 0
src/views/vent/home/configurable/belt/components/contentBelt.vue

@@ -65,6 +65,9 @@
             :data="config.data"
           />
         </template>
+        <template v-if="config.name === 'gateBoard'">
+          <GateBoard class="content__module text-center overflow-auto" :data="config.data" />
+        </template>
       </div>
     </div>
   </div>

+ 1 - 1
src/views/vent/home/configurable/belt/components/customHeader-belt.vue

@@ -117,7 +117,7 @@ export default defineComponent({
   .container-title {
     width: 380px;
     height: 34px;
-    top: 20px;
+    top: 0px;
     left: 20px;
     // background: url('/@/assets/images/vent/new-home/container-title-bg.png') no-repeat;
     background: var(--image-select-bg) no-repeat;

+ 26 - 26
src/views/vent/home/configurable/belt/components/detail/gateBoard.vue

@@ -42,32 +42,32 @@ import { get } from 'lodash-es';
 import gateSVG from '../gateSVG.ssl.vue';
 import { config } from 'dotenv';
 let props = defineProps({});
-// const gateData = [
-//   {
-//     label: '前门状态',
-//     value: 'frontStatus',
-//     trans: {
-//       '0': '关闭',
-//       '1': '打开',
-//     },
-//   },
-//   {
-//     label: '后门状态',
-//     value: 'backStatus',
-//     trans: {
-//       '0': '关闭',
-//       '1': '打开',
-//     },
-//   },
-//   {
-//     label: '网络状态',
-//     value: 'networkStatus',
-//     trans: {
-//       '0': '离线',
-//       '1': '在线',
-//     },
-//   },
-// ];
+const gateData = [
+  {
+    label: '前门状态',
+    value: 'frontStatus',
+    trans: {
+      '0': '关闭',
+      '1': '打开',
+    },
+  },
+  {
+    label: '后门状态',
+    value: 'backStatus',
+    trans: {
+      '0': '关闭',
+      '1': '打开',
+    },
+  },
+  {
+    label: '网络状态',
+    value: 'networkStatus',
+    trans: {
+      '0': '离线',
+      '1': '在线',
+    },
+  },
+];
 const childRefs = ref<any[]>([]);
 const setChildRef = (el, index) => {
   childRefs.value[index] = el;

+ 2 - 0
src/views/vent/home/configurable/belt/configurable.api.ts

@@ -19,10 +19,12 @@ enum Api {
   sysTypeWarnList = '/safety/ventanalyAlarmLog/sysTypeWarn',
   getDisasterProportion = '/safety/ventanalyAlarmLog/getDisasterProportion',
   system = '/ventanaly-device/monitor/device',
+  getSystem = '/modelreq/monitor/system',
 }
 
 export const sysList = (params) => defHttp.get({ url: Api.sysList, params });
 export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params });
+export const getSystem = (params) => defHttp.post({ url: Api.getSystem, params });
 
 // 搞这个缓存是由于:目前代码上的设计是多个模块发出多次请求,每个模块自己负责消费前者的响应。
 // 这会导致相同的请求被同时发送多次。

+ 5 - 5
src/views/vent/home/configurable/belt/configurable.data.ts

@@ -1,4 +1,4 @@
-import { Config } from '../../deviceManager/configurationTable/types';
+import { Config } from '../../../deviceManager/configurationTable/types';
 // 皮带巷三级防灭火首页
 export const testBeltLaneFire: Config[] = [
   {
@@ -379,9 +379,9 @@ export const testYjkf: Config[] = [
       // mock: doorMock,
     },
     showStyle: {
-      size: 'width:440px;height:810px;',
+      size: 'width:440px;height:825px;',
       version: '原版',
-      position: 'top:40px;left:25px;',
+      position: 'top:20px;left:25px;',
     },
   },
   {
@@ -576,9 +576,9 @@ export const testJcyj: Config[] = [
       // mock: BDfireMock,
     },
     showStyle: {
-      size: 'width:900px;height:280px;',
+      size: 'width:980px;height:280px;',
       version: '原版',
-      position: 'top:640px;left:410px;',
+      position: 'top:570px;left:480px;',
     },
   },
   {