beltYjkf.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <div class="border">
  5. <customHeader :fieldNames="{ label: 'systemname', value: 'id', options: 'children' }">皮带巷智能管控</customHeader>
  6. <div class="top-bg">
  7. <BeltNav />
  8. </div>
  9. <div class="box-container">
  10. <ModuleCommon
  11. v-for="cfg in configs"
  12. :key="cfg.deviceType"
  13. :show-style="cfg.showStyle"
  14. :module-data="cfg.moduleData"
  15. :module-name="cfg.moduleName"
  16. :device-type="cfg.deviceType"
  17. :page-type="cfg.pageType"
  18. :data="data"
  19. :visible="true"
  20. />
  21. </div>
  22. <!-- 巷道模型组件 -->
  23. </div>
  24. </div>
  25. </template>
  26. <script setup lang="ts">
  27. import { onMounted, ref } from 'vue';
  28. import customHeader from './components/customHeader-belt.vue';
  29. import { useInitConfigs, useInitPage } from '../hooks/useInit';
  30. import { testYjkf } from './configurable.data';
  31. import ModuleCommon from './components/ModuleCommonBelt.vue';
  32. import { getSystem } from './configurable.api';
  33. import { message, Modal } from 'ant-design-vue';
  34. import BeltNav from './components/BeltNav.vue';
  35. import { doorMock } from './mock.ts';
  36. // import { BDFireMock } from './mock';
  37. const { configs, fetchConfigs } = useInitConfigs();
  38. const { updateEnhancedConfigs, data, updateData } = useInitPage('皮带巷智能管控');
  39. const readData = ref([
  40. {
  41. id: 1,
  42. position: '16联巷短路风门',
  43. frontStatus: '关闭',
  44. backStatus: '关闭',
  45. networkStatus: '在线',
  46. modelImg: '',
  47. open: true,
  48. },
  49. {
  50. id: 2,
  51. position: '18联巷短路风门',
  52. frontStatus: '打开',
  53. backStatus: '打开',
  54. networkStatus: '在线',
  55. modelImg: '',
  56. open: true,
  57. },
  58. {
  59. id: 3,
  60. position: '23联巷短路风门',
  61. frontStatus: '关闭',
  62. backStatus: '关闭',
  63. networkStatus: '在线',
  64. modelImg: '',
  65. open: false,
  66. },
  67. ]);
  68. function refresh() {
  69. fetchConfigs('belt').then(() => {
  70. configs.value = testYjkf;
  71. getSystem({}).then(updateData);
  72. // getDataSource();
  73. });
  74. }
  75. function initInterval() {
  76. setInterval(() => {
  77. getSystem({}).then(updateData);
  78. }, 60000);
  79. }
  80. onMounted(async () => {
  81. refresh();
  82. initInterval();
  83. });
  84. </script>
  85. <style lang="less" scoped>
  86. .spray-wrapper {
  87. width: 100%;
  88. height: 100%;
  89. background-image: url('/@/assets/images/beltFire/baseMap.png');
  90. background-size: cover;
  91. }
  92. #spray3D {
  93. pointer-events: all;
  94. }
  95. .spray-wrapper :deep(.list-item_L .list-item__icon_L) {
  96. background-image: url('/@/assets/images/home-container/configurable/minehome/list-icon-file.png');
  97. }
  98. .spray-wrapper :deep(.list-item_N:nth-child(1)) {
  99. background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n5.png');
  100. }
  101. .spray-wrapper :deep(.list-item_N:nth-child(2)) {
  102. background-image: url('/@/assets/images/home-container/configurable/minehome/list-bg-n6.png');
  103. }
  104. .company-home {
  105. background: url('/@/assets/images/beltFire/baseMap.png') no-repeat center;
  106. width: 100%;
  107. height: 100%;
  108. color: @white;
  109. position: relative;
  110. .border {
  111. width: 100%;
  112. height: 94%;
  113. background: url('/@/assets/images/beltFire/mainbj.png') no-repeat;
  114. background-size: 100% 100%;
  115. margin-top: 55px;
  116. }
  117. .top-bg {
  118. width: 100%;
  119. height: 56px;
  120. position: absolute;
  121. margin-top: -20px;
  122. z-index: 1;
  123. }
  124. }
  125. </style>