| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!-- eslint-disable vue/multi-word-component-names -->
- <template>
- <div class="company-home">
- <div class="title-select-area">
- <a-select
- class="title-select"
- ref="select"
- v-model:value="deviceId"
- @change="handleDeviceChange"
- popupClassName="drop"
- :field-names="fieldNames"
- :options="selectorOptions"
- :dropdownStyle="{
- width: '380px',
- background: 'transparent',
- borderBottom: '1px solid #ececec66',
- backdropFilter: 'blur(50px)',
- color: '#fff',
- }"
- />
- </div>
- <!-- 渲染所有模块 -->
- <ModuleCommon
- v-for="cfg in cfgs"
- :key="cfg.deviceType + cfg.moduleName"
- :show-style="cfg.showStyle"
- :module-data="cfg.moduleData"
- :module-name="cfg.moduleName"
- :device-type="cfg.deviceType"
- :data="data"
- :visible="true"
- />
- <!-- <Three3D :modal-name="modalName" /> -->
- </div>
- </template>
- <script lang="ts" setup>
- import { computed, onMounted, onUnmounted, ref } from 'vue';
- import { useInitConfigs, useInitPage } from '@/views/vent/home/configurable/hooks/useInit';
- import { testConfigSealedGoaf } from './configurable.data.sealedGoaf';
- import ModuleCommon from '@/views/vent/home/configurable/components/ModuleCommon.vue';
- import { useGlobSetting } from '/@/hooks/setting';
- const { title = '省局采空区密闭监测与分析系统' } = useGlobSetting();
- const { data, updateData, mainTitle } = useInitPage(title);
- const cfgs = computed(() => configs.value);
- const { configs, fetchConfigs } = useInitConfigs();
- const deviceId = ref('0'); // 当前选中设备ID
- const fieldNames = { label: 'name', value: 'id' }; // 下拉框字段映射
- const selectorOptions = ref([
- { name: '采空区密闭分析', id: '0' },
- { name: '采空区密闭监测', id: '1' },
- ]);
- // 切换设备事件
- function handleDeviceChange(param) {
- console.log('切换下拉框选项');
- }
- onMounted(() => {
- fetchConfigs('sealed_goaf').then(() => {
- configs.value = testConfigSealedGoaf;
- });
- });
- // 数据处理函数
- onUnmounted(() => {});
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- @font-face {
- font-family: 'douyuFont';
- src: url('/@/assets/font/douyuFont.otf');
- }
- @select-single: ~'@{namespace}-select-single';
- @select-selector: ~'@{namespace}-select-selector';
- @selection-item: ~'@{namespace}--select-selection-item';
- .company-home {
- --image-module-title: url('/@/assets/images/sealedGoaf/views/home/module-title.png');
- width: 100%;
- height: 100%;
- color: @white;
- position: relative;
- background: #d7effe;
- :deep(.vent-box1-bg) {
- .box1-top {
- background: unset;
- height: 45px;
- padding-top: 10px;
- .title {
- height: 25px;
- background: var(--image-module-title) no-repeat;
- color: #234e8e;
- justify-content: left;
- background-size: cover;
- font-size: 20px;
- padding-left: 10px;
- div {
- margin-top: -12px;
- }
- }
- }
- .box-container {
- background-color: unset;
- &::before {
- background-image: none;
- }
- &::after {
- background-image: none;
- }
- }
- .box1-bottom {
- background: none;
- }
- }
- .title-select {
- :deep(.@{select-selector}) {
- width: 300px;
- background-color: #2b6ff0;
- box-shadow: none !important;
- border: 1px solid #b3d8ff;
- border-radius: 4px; /* 圆角 */
- padding: 8px 12px; /* 内边距 */
- font-size: 14px;
- color: #333; /* 文字颜色 */
- /* 交互样式 */
- cursor: pointer;
- width: auto;
- :deep(.@{selection-item}) {
- color: #fff !important;
- font-size: 20px;
- }
- }
- }
- }
- </style>
|