sealedGoaf.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <div class="title-select-area">
  5. <a-select
  6. class="title-select"
  7. ref="select"
  8. v-model:value="deviceId"
  9. @change="handleDeviceChange"
  10. popupClassName="drop"
  11. :field-names="fieldNames"
  12. :options="selectorOptions"
  13. :dropdownStyle="{
  14. width: '380px',
  15. background: 'transparent',
  16. borderBottom: '1px solid #ececec66',
  17. backdropFilter: 'blur(50px)',
  18. color: '#fff',
  19. }"
  20. />
  21. </div>
  22. <!-- 渲染所有模块 -->
  23. <ModuleCommon
  24. v-for="cfg in cfgs"
  25. :key="cfg.deviceType + cfg.moduleName"
  26. :show-style="cfg.showStyle"
  27. :module-data="cfg.moduleData"
  28. :module-name="cfg.moduleName"
  29. :device-type="cfg.deviceType"
  30. :data="data"
  31. :visible="true"
  32. />
  33. <!-- <Three3D :modal-name="modalName" /> -->
  34. </div>
  35. </template>
  36. <script lang="ts" setup>
  37. import { computed, onMounted, onUnmounted, ref } from 'vue';
  38. import { useInitConfigs, useInitPage } from '@/views/vent/home/configurable/hooks/useInit';
  39. import { testConfigSealedGoaf } from './configurable.data.sealedGoaf';
  40. import ModuleCommon from '@/views/vent/home/configurable/components/ModuleCommon.vue';
  41. import { useGlobSetting } from '/@/hooks/setting';
  42. const { title = '省局采空区密闭监测与分析系统' } = useGlobSetting();
  43. const { data, updateData, mainTitle } = useInitPage(title);
  44. const cfgs = computed(() => configs.value);
  45. const { configs, fetchConfigs } = useInitConfigs();
  46. const deviceId = ref('0'); // 当前选中设备ID
  47. const fieldNames = { label: 'name', value: 'id' }; // 下拉框字段映射
  48. const selectorOptions = ref([
  49. { name: '采空区密闭分析', id: '0' },
  50. { name: '采空区密闭监测', id: '1' },
  51. ]);
  52. // 切换设备事件
  53. function handleDeviceChange(param) {
  54. console.log('切换下拉框选项');
  55. }
  56. onMounted(() => {
  57. fetchConfigs('sealed_goaf').then(() => {
  58. configs.value = testConfigSealedGoaf;
  59. });
  60. });
  61. // 数据处理函数
  62. onUnmounted(() => {});
  63. </script>
  64. <style lang="less" scoped>
  65. @import '/@/design/theme.less';
  66. @font-face {
  67. font-family: 'douyuFont';
  68. src: url('/@/assets/font/douyuFont.otf');
  69. }
  70. @select-single: ~'@{namespace}-select-single';
  71. @select-selector: ~'@{namespace}-select-selector';
  72. @selection-item: ~'@{namespace}--select-selection-item';
  73. .company-home {
  74. --image-module-title: url('/@/assets/images/sealedGoaf/views/home/module-title.png');
  75. width: 100%;
  76. height: 100%;
  77. color: @white;
  78. position: relative;
  79. background: #d7effe;
  80. :deep(.vent-box1-bg) {
  81. .box1-top {
  82. background: unset;
  83. height: 45px;
  84. padding-top: 10px;
  85. .title {
  86. height: 25px;
  87. background: var(--image-module-title) no-repeat;
  88. color: #234e8e;
  89. justify-content: left;
  90. background-size: cover;
  91. font-size: 20px;
  92. padding-left: 10px;
  93. div {
  94. margin-top: -12px;
  95. }
  96. }
  97. }
  98. .box-container {
  99. background-color: unset;
  100. &::before {
  101. background-image: none;
  102. }
  103. &::after {
  104. background-image: none;
  105. }
  106. }
  107. .box1-bottom {
  108. background: none;
  109. }
  110. }
  111. .title-select {
  112. :deep(.@{select-selector}) {
  113. width: 300px;
  114. background-color: #2b6ff0;
  115. box-shadow: none !important;
  116. border: 1px solid #b3d8ff;
  117. border-radius: 4px; /* 圆角 */
  118. padding: 8px 12px; /* 内边距 */
  119. font-size: 14px;
  120. color: #333; /* 文字颜色 */
  121. /* 交互样式 */
  122. cursor: pointer;
  123. width: auto;
  124. :deep(.@{selection-item}) {
  125. color: #fff !important;
  126. font-size: 20px;
  127. }
  128. }
  129. }
  130. }
  131. </style>