|
@@ -64,6 +64,9 @@
|
|
|
<template v-if="config.name === 'table'">
|
|
|
<CustomTable class="content__module text-center overflow-auto" :type="config.type" :columns="config.columns" :data="config.data" />
|
|
|
</template>
|
|
|
+ <template v-if="config.name === 'tabs'">
|
|
|
+ <CustomTabs class="content__module" :type="config.type" :tab-config="config.items" :overflow="config.overflow" />
|
|
|
+ </template>
|
|
|
<template v-if="config.name === 'blast_delta'">
|
|
|
<BlastDelta class="content__module" :pos-monitor="config.data" :canvasSize="{ width: 250, height: 200 }" />
|
|
|
</template>
|
|
@@ -120,6 +123,7 @@
|
|
|
import BlastDelta from '../../../monitorManager/deviceMonitor/components/device/modal/blastDelta.vue';
|
|
|
import QHCurve from './preset/QHCurve.vue';
|
|
|
import MeasureDetail from './preset/MeasureDetail.vue';
|
|
|
+ import CustomTabs from './preset/CustomTabs.vue';
|
|
|
import AIChat from '/@/components/AIChat/MiniChat.vue';
|
|
|
import DeviceAlarm from './preset/DeviceAlarm.vue';
|
|
|
// import FIreWarn from './preset/FIreWarn.vue';
|
|
@@ -166,6 +170,7 @@
|
|
|
const gallery = clone(props.moduleData.gallery) || [];
|
|
|
const complex_list = clone(props.moduleData.complex_list) || [];
|
|
|
const gallery_list = clone(props.moduleData.gallery_list) || [];
|
|
|
+ const tabs = clone(props.moduleData.tabs) || [];
|
|
|
const chart = clone(props.moduleData.chart) || [];
|
|
|
const table = clone(props.moduleData.table) || [];
|
|
|
const preset = clone(props.moduleData.preset) || [];
|
|
@@ -270,6 +275,51 @@
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
+ case 'tabs': {
|
|
|
+ const cfg = tabs.shift();
|
|
|
+ if (!cfg) break;
|
|
|
+ const data = getData(refData, cfg.readFrom, cfg.parser);
|
|
|
+
|
|
|
+ if (cfg.mapFromData) {
|
|
|
+ const firstListItem = cfg.items[0];
|
|
|
+ arr.push({
|
|
|
+ overflow: true,
|
|
|
+ ...item,
|
|
|
+ ...cfg,
|
|
|
+ items: (data || []).map((d) => {
|
|
|
+ return {
|
|
|
+ title: getFormattedText(d, firstListItem.title, firstListItem.trans),
|
|
|
+ contents: firstListItem.contents.map((e) => {
|
|
|
+ return {
|
|
|
+ ...e,
|
|
|
+ label: getFormattedText(d, e.label, e.trans),
|
|
|
+ value: getFormattedText(d, e.value, e.trans),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ arr.push({
|
|
|
+ overflow: true,
|
|
|
+ ...item,
|
|
|
+ ...cfg,
|
|
|
+ items: cfg.items.map((i) => {
|
|
|
+ return {
|
|
|
+ title: getFormattedText(data, i.title, i.trans),
|
|
|
+ contents: i.contents.map((e) => {
|
|
|
+ return {
|
|
|
+ ...e,
|
|
|
+ label: getFormattedText(data, e.label, e.trans),
|
|
|
+ value: getFormattedText(data, e.value, e.trans),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
case 'chart': {
|
|
|
const cfg = chart.shift();
|
|
|
if (!cfg) break;
|