|
@@ -52,7 +52,7 @@
|
|
|
</video>
|
|
|
<template v-for="config in layoutConfig" :key="config.key">
|
|
|
<!-- 告示板部分 -->
|
|
|
- <div v-if="config.key === 'board'" class="flex flex-justify-around pt-10px pb-10px">
|
|
|
+ <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"
|
|
@@ -64,19 +64,22 @@
|
|
|
</div>
|
|
|
<!-- 图表部分,这部分通常需要填充,有告示板、Header等内容需要填充父级 -->
|
|
|
<template v-if="config.key === 'chart'">
|
|
|
- <CustomChart :chart-config="config.config" :chart-data="config.data" class="flex-grow" />
|
|
|
+ <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 :list-config="config.items" />
|
|
|
+ <TimelineList class="content__module" :list-config="config.items" />
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <CustomList :type="config.type" :list-config="config.items" />
|
|
|
+ <CustomList class="content__module" :type="config.type" :list-config="config.items" />
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-if="config.key === 'gallery'">
|
|
|
- <CustomGallery :type="config.type" :gallery-config="config.items" />
|
|
|
+ <CustomGallery class="content__module" :type="config.type" :gallery-config="config.items" />
|
|
|
+ </template>
|
|
|
+ <template v-if="config.key === 'complex_list'">
|
|
|
+ <ComplexList class="content__module" :type="config.type" :list-config="config.items" :gallery-config="config.galleryItems" />
|
|
|
</template>
|
|
|
<!-- 表格部分,这部分通常是占一整个模块的 -->
|
|
|
<template v-if="config.key === 'table'">
|
|
@@ -84,24 +87,24 @@
|
|
|
v-if="config.type === 'A'"
|
|
|
:columns="config.columns"
|
|
|
:data="tableData"
|
|
|
- class="mt-20px mb-10px text-center flex-grow overflow-auto"
|
|
|
+ class="content__module text-center flex-grow overflow-auto"
|
|
|
/>
|
|
|
<CustomTable
|
|
|
v-else
|
|
|
:type="config.type"
|
|
|
:columns="config.columns"
|
|
|
:data="tableData"
|
|
|
- class="mt-20px mb-10px text-center flex-grow overflow-auto"
|
|
|
+ class="content__module text-center flex-grow overflow-auto"
|
|
|
/>
|
|
|
</template>
|
|
|
<template v-if="config.key === 'blast_delta'">
|
|
|
- <BlastDelta class="mt-10px mb-10px" :pos-monitor="blastDeltaData" :canvas-size="{ width: 250, height: 147 }" />
|
|
|
+ <BlastDelta class="content__module" :pos-monitor="blastDeltaData" :canvas-size="{ width: 250, height: 137 }" />
|
|
|
</template>
|
|
|
<template v-if="config.key === 'fire_control'">
|
|
|
- <FIreControl class="mt-10px mb-10px" />
|
|
|
+ <FIreControl class="content__module" />
|
|
|
</template>
|
|
|
<template v-if="config.key === 'fire_warn'">
|
|
|
- <FIreWarn class="mt-10px mb-10px" />
|
|
|
+ <FIreWarn class="content__module" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -123,6 +126,7 @@
|
|
|
import TimelineList from './TimelineList.vue';
|
|
|
import CustomList from './CustomList.vue';
|
|
|
import CustomGallery from './CustomGallery.vue';
|
|
|
+ import ComplexList from './ComplexList.vue';
|
|
|
import CustomTable from './CustomTable.vue';
|
|
|
import { getFormattedText } from '../../../deviceManager/configurationTable/adapters';
|
|
|
import CustomChart from './CustomChart.vue';
|
|
@@ -147,6 +151,7 @@
|
|
|
const board = clone(props.moduleData.board);
|
|
|
const list = clone(props.moduleData.list);
|
|
|
const gallery = clone(props.moduleData.gallery);
|
|
|
+ const complex_list = clone(props.moduleData.complex_list);
|
|
|
const chart = clone(props.moduleData.chart);
|
|
|
const table = clone(props.moduleData.table);
|
|
|
const preset = clone(props.moduleData.preset);
|
|
@@ -203,6 +208,29 @@
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
+ case 'complex_list': {
|
|
|
+ const cfg = complex_list.shift();
|
|
|
+ if (!cfg) break;
|
|
|
+ const data = mock || cfg.readFrom ? get(refData, cfg.readFrom) : refData;
|
|
|
+
|
|
|
+ arr.push({
|
|
|
+ ...cfg,
|
|
|
+ key,
|
|
|
+ items: cfg.items.map((i) => {
|
|
|
+ return {
|
|
|
+ ...i,
|
|
|
+ value: getFormattedText(data, i.prop, i.formatter),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ galleryItems: cfg.galleryItems.map((i) => {
|
|
|
+ return {
|
|
|
+ ...i,
|
|
|
+ value: getFormattedText(data, i.prop, i.formatter),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
case 'chart': {
|
|
|
const cfg = chart.shift();
|
|
|
if (!cfg) break;
|
|
@@ -394,6 +422,16 @@
|
|
|
z-index: -1;
|
|
|
object-fit: fill;
|
|
|
}
|
|
|
+ .content__module {
|
|
|
+ margin-top: 5px;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+ .content__module:first-of-type {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+ .content__module:last-of-type {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
|
|
|
/* background-color: transparent; */
|
|
|
color: #fff;
|