|
@@ -15,57 +15,61 @@
|
|
|
<source :src="background.link" />
|
|
|
Not Supportted Link Or Browser
|
|
|
</video>
|
|
|
- <template v-for="config in layoutConfig" :key="config.key">
|
|
|
- <!-- 告示板部分 -->
|
|
|
- <div v-if="config.key === 'board'" class="content__module flex flex-justify-around pt-10px pb-10px">
|
|
|
- <MiniBoard
|
|
|
- v-for="item in config.items"
|
|
|
- :key="item.prop"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :type="config.type"
|
|
|
- :layout="config.layout"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <!-- 图表部分,这部分通常需要填充,有告示板、Header等内容需要填充父级 -->
|
|
|
- <template v-if="config.key === 'chart'">
|
|
|
- <CustomChart class="content__module flex-grow" :chart-config="config.config" :chart-data="config.data" />
|
|
|
- </template>
|
|
|
- <!-- 通常列表部分 -->
|
|
|
- <template v-if="config.key === 'list'">
|
|
|
- <template v-if="config.type === 'timeline'">
|
|
|
- <TimelineList class="content__module" :list-config="config.items" />
|
|
|
+ <div class="flex flex-wrap w-full h-full" :style="{ flexDirection: slice.direction }">
|
|
|
+ <div v-for="(config, i) in layoutConfig" :key="config.key" :style="{ flexBasis: slice.basis[i] }">
|
|
|
+ <!-- 告示板部分 -->
|
|
|
+ <template v-if="config.key === 'board'">
|
|
|
+ <div class="content__module flex flex-justify-around pt-10px pb-10px">
|
|
|
+ <MiniBoard
|
|
|
+ v-for="item in config.items"
|
|
|
+ :key="item.prop"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :type="config.type"
|
|
|
+ :layout="config.layout"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
- <CustomList class="content__module" :type="config.type" :list-config="config.items" />
|
|
|
+ <!-- 图表部分,这部分通常需要填充,有告示板、Header等内容需要填充父级 -->
|
|
|
+ <template v-if="config.key === 'chart'">
|
|
|
+ <CustomChart class="content__module" :chart-config="config.config" :chart-data="config.data" />
|
|
|
</template>
|
|
|
- </template>
|
|
|
- <!-- 画廊部分 -->
|
|
|
- <template v-if="config.key === 'gallery'">
|
|
|
- <CustomGallery class="content__module" :type="config.type" :gallery-config="config.items" />
|
|
|
- </template>
|
|
|
- <!-- 复杂列表部分 -->
|
|
|
- <template v-if="config.key === 'gallery_list'">
|
|
|
- <GalleryList class="content__module" :type="config.type" :list-config="config.items" :gallery-config="config.galleryItems" />
|
|
|
- </template>
|
|
|
- <!-- 复杂列表部分 -->
|
|
|
- <template v-if="config.key === 'complex_list'">
|
|
|
- <ComplexList class="content__module" :type="config.type" :list-config="config.items" />
|
|
|
- </template>
|
|
|
- <!-- 表格部分,这部分通常是占一整个模块的 -->
|
|
|
- <template v-if="config.key === 'table'">
|
|
|
- <CustomTable :type="config.type" :columns="config.columns" :data="config.data" class="content__module text-center flex-grow overflow-auto" />
|
|
|
- </template>
|
|
|
- <template v-if="config.key === 'blast_delta'">
|
|
|
- <BlastDelta class="content__module" :pos-monitor="config.config.mock" :canvas-size="{ width: 250, height: 137 }" />
|
|
|
- </template>
|
|
|
- <template v-if="config.key === 'fire_control'">
|
|
|
+ <!-- 通常列表部分 -->
|
|
|
+ <template v-if="config.key === 'list'">
|
|
|
+ <template v-if="config.type === 'timeline'">
|
|
|
+ <TimelineList class="content__module" :list-config="config.items" />
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <CustomList class="content__module" :type="config.type" :list-config="config.items" />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <!-- 画廊部分 -->
|
|
|
+ <template v-if="config.key === 'gallery'">
|
|
|
+ <CustomGallery class="content__module" :type="config.type" :gallery-config="config.items" />
|
|
|
+ </template>
|
|
|
+ <!-- 复杂列表部分 -->
|
|
|
+ <template v-if="config.key === 'gallery_list'">
|
|
|
+ <GalleryList class="content__module" :type="config.type" :list-config="config.items" :gallery-config="config.galleryItems" />
|
|
|
+ </template>
|
|
|
+ <!-- 复杂列表部分 -->
|
|
|
+ <template v-if="config.key === 'complex_list'">
|
|
|
+ <ComplexList class="content__module" :type="config.type" :list-config="config.items" />
|
|
|
+ </template>
|
|
|
+ <!-- 表格部分,这部分通常是占一整个模块的 -->
|
|
|
+ <template v-if="config.key === 'table'">
|
|
|
+ <CustomTable class="content__module text-center overflow-auto" :type="config.type" :columns="config.columns" :data="config.data" />
|
|
|
+ </template>
|
|
|
+ <template v-if="config.key === 'blast_delta'">
|
|
|
+ <BlastDelta class="content__module" :pos-monitor="config.config.mock" :canvas-size="{ width: 250, height: 137 }" />
|
|
|
+ </template>
|
|
|
+ <!-- <template v-if="config.key === 'fire_control'">
|
|
|
<FIreControl class="content__module" />
|
|
|
</template>
|
|
|
<template v-if="config.key === 'fire_warn'">
|
|
|
<FIreWarn class="content__module" />
|
|
|
- </template>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
@@ -89,15 +93,15 @@
|
|
|
import { get, clone } from 'lodash-es';
|
|
|
import { getFormattedText } from '../../../deviceManager/configurationTable/adapters';
|
|
|
import BlastDelta from '../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
|
|
|
- import FIreWarn from './preset/FIreWarn.vue';
|
|
|
- import FIreControl from './preset/FIreControl.vue';
|
|
|
+ // import FIreWarn from './preset/FIreWarn.vue';
|
|
|
+ // import FIreControl from './preset/FIreControl.vue';
|
|
|
|
|
|
const props = defineProps<{
|
|
|
data: any;
|
|
|
moduleData: Config['moduleData'];
|
|
|
}>();
|
|
|
|
|
|
- const { background, layout } = props.moduleData;
|
|
|
+ const { background, layout, slice } = props.moduleData;
|
|
|
|
|
|
// 额外的 header 相关的变量
|
|
|
|
|
@@ -304,8 +308,10 @@
|
|
|
object-fit: fill;
|
|
|
}
|
|
|
.content__module {
|
|
|
- margin-top: 5px;
|
|
|
- margin-bottom: 5px;
|
|
|
+ // margin-top: 5px;
|
|
|
+ // margin-bottom: 5px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
// .content__module:first-of-type {
|
|
|
// margin-top: 0;
|