|
@@ -2,14 +2,14 @@ import _ from 'lodash-es';
|
|
|
import { Config } from './types';
|
|
|
|
|
|
export const ModuleSizeMap = {
|
|
|
- '标准尺寸(450*280)': 'width:450px;height:280px;',
|
|
|
- '纵向拉伸(450*570)': 'width:450px;height:570px;',
|
|
|
- '纵向填充(450*860)': 'width:450px;height:860px;',
|
|
|
- '横向拉伸(1000*280)': 'width:1000px;height:280px;',
|
|
|
- '横向填充(1920*280)': 'width:1920px;height:280px;',
|
|
|
+ 'width:450px;height:280px;': '标准尺寸(450*280)',
|
|
|
+ 'width:450px;height:570px;': '纵向拉伸(450*570)',
|
|
|
+ 'width:450px;height:860px;': '纵向填充(450*860)',
|
|
|
+ 'width:1000px;height:280px;': '横向拉伸(1000*280)',
|
|
|
+ 'width:1920px;height:280px;': '横向填充(1920*280)',
|
|
|
};
|
|
|
-export const ModuleSizeOptions = _.map(ModuleSizeMap, (_, k) => ({
|
|
|
- value: k,
|
|
|
+export const ModuleSizeOptions = _.map(ModuleSizeMap, (v, k) => ({
|
|
|
+ value: v,
|
|
|
label: k,
|
|
|
}));
|
|
|
|
|
@@ -19,17 +19,17 @@ export const ModuleVersionOptions = _.map(['原版', '新版'], (k) => ({
|
|
|
}));
|
|
|
|
|
|
export const ModulePositionMap = {
|
|
|
- 不展示: 'display:none;',
|
|
|
- 左上: 'top:60px;left:0;',
|
|
|
- 左中: 'top:350px;left:0;',
|
|
|
- 左下: 'top:640px;left:0;',
|
|
|
- 右上: 'top:60px;right:0;',
|
|
|
- 右中: 'top:350px;right:0;',
|
|
|
- 右下: 'top:640px;right:0;',
|
|
|
- 中下: 'top:640px;left:460px;',
|
|
|
+ 'display:none;': '不展示',
|
|
|
+ 'top:60px;left:0;': '左上',
|
|
|
+ 'top:350px;left:0;': '左中',
|
|
|
+ 'top:640px;left:0;': '左下',
|
|
|
+ 'top:60px;right:0;': '右上',
|
|
|
+ 'top:350px;right:0;': '右中',
|
|
|
+ 'top:640px;right:0;': '右下',
|
|
|
+ 'top:640px;left:460px;': '中下',
|
|
|
};
|
|
|
-export const ModulePositionOptions = _.map(ModulePositionMap, (_, k) => ({
|
|
|
- value: k,
|
|
|
+export const ModulePositionOptions = _.map(ModulePositionMap, (v, k) => ({
|
|
|
+ value: v,
|
|
|
label: k,
|
|
|
}));
|
|
|
|
|
@@ -80,6 +80,7 @@ export const ModulePresetMap: Record<
|
|
|
{
|
|
|
type: 'A',
|
|
|
layout: 'val-top',
|
|
|
+ readFrom: 'readData',
|
|
|
items: [
|
|
|
{
|
|
|
prop: 'readData.windSpeed1',
|
|
@@ -99,7 +100,7 @@ export const ModulePresetMap: Record<
|
|
|
preset: [],
|
|
|
},
|
|
|
showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
+ size: 'width:450px;height:280px;',
|
|
|
},
|
|
|
},
|
|
|
'折线图(1*1)': {
|
|
@@ -144,7 +145,7 @@ export const ModulePresetMap: Record<
|
|
|
preset: [],
|
|
|
},
|
|
|
showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
+ size: 'width:450px;height:280px;',
|
|
|
},
|
|
|
},
|
|
|
'面积图(1*1)': {
|
|
@@ -188,9 +189,7 @@ export const ModulePresetMap: Record<
|
|
|
table: [],
|
|
|
preset: [],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'饼状图(1*1)': {
|
|
|
moduleData: {
|
|
@@ -230,9 +229,7 @@ export const ModulePresetMap: Record<
|
|
|
table: [],
|
|
|
preset: [],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'柱状图(2*1)': {
|
|
|
moduleData: {
|
|
@@ -268,9 +265,7 @@ export const ModulePresetMap: Record<
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '横向拉伸(1000*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'画廊(1*1)': {
|
|
|
moduleData: {
|
|
@@ -295,6 +290,7 @@ export const ModulePresetMap: Record<
|
|
|
gallery: [
|
|
|
{
|
|
|
type: 'A',
|
|
|
+ readFrom: '',
|
|
|
items: [
|
|
|
{
|
|
|
prop: 'total',
|
|
@@ -328,9 +324,7 @@ export const ModulePresetMap: Record<
|
|
|
chart: [],
|
|
|
preset: [],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'列表(1*1)': {
|
|
|
moduleData: {
|
|
@@ -360,6 +354,7 @@ export const ModulePresetMap: Record<
|
|
|
list: [
|
|
|
{
|
|
|
type: 'timeline',
|
|
|
+ readFrom: '',
|
|
|
items: [
|
|
|
{
|
|
|
label: '正常',
|
|
@@ -395,9 +390,7 @@ export const ModulePresetMap: Record<
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'表格(1*1)': {
|
|
|
moduleData: {
|
|
@@ -448,9 +441,7 @@ export const ModulePresetMap: Record<
|
|
|
],
|
|
|
chart: [],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
'爆炸三角形(1*1)': {
|
|
|
moduleData: {
|
|
@@ -478,9 +469,7 @@ export const ModulePresetMap: Record<
|
|
|
chart: [],
|
|
|
preset: [{}],
|
|
|
},
|
|
|
- showStyle: {
|
|
|
- size: '标准尺寸(450*280)',
|
|
|
- },
|
|
|
+ showStyle: { size: 'width:450px;height:280px;' },
|
|
|
},
|
|
|
};
|
|
|
|