新增危化品场景相关组件包括折线图、饼图、报警列表、摄像头等,并添加对应的配置文件和样式。扩展图表分类枚举和导出列表,优化现有组件命名规范。 主要变更: - 新增LineGraph01Haz、PieCenterHaz等组件 - 添加配置文件和示例数据 - 扩展图表分类枚举 - 优化组件命名规范 - 新增SmallBorder通用边框组件
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
import { PublicConfigClass } from '@/packages/public'
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
import { MaxTrimConfig } from './index'
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
import { chartInitConfig } from '@/settings/designSetting'
|
|
|
|
export enum WritingModeEnum {
|
|
HORIZONTAL = '水平',
|
|
VERTICAL = '垂直'
|
|
}
|
|
|
|
export const WritingModeObject = {
|
|
[WritingModeEnum.HORIZONTAL]: 'horizontal-tb',
|
|
[WritingModeEnum.VERTICAL]: 'vertical-rl'
|
|
}
|
|
|
|
export enum FontWeightEnum {
|
|
NORMAL = '常规',
|
|
BOLD = '加粗',
|
|
}
|
|
|
|
export enum FontStyleEnum {
|
|
NORMAL = '常规',
|
|
ITALIC = '斜体',
|
|
}
|
|
|
|
export const FontWeightObject = {
|
|
[FontWeightEnum.NORMAL]: 'normal',
|
|
[FontWeightEnum.BOLD]: 'bold',
|
|
}
|
|
|
|
export const FontStyleObject = {
|
|
[FontStyleEnum.NORMAL]: 'normal',
|
|
[FontStyleEnum.ITALIC]: 'italic',
|
|
}
|
|
|
|
export const option = {
|
|
dataset: '危化品库场景数据看板',
|
|
fontSize: 38,
|
|
fontColor: '#ffffff',
|
|
paddingX: 35,
|
|
paddingY: 6,
|
|
textAlign: 'start', // 水平对齐方式
|
|
fontWeight: 'bold',
|
|
fontStyle: 'italic',
|
|
// 字间距
|
|
letterSpacing: 10,
|
|
writingMode: 'horizontal-tb',
|
|
backgroundColor: '#00000000'
|
|
}
|
|
|
|
|
|
export default class Config extends PublicConfigClass implements CreateComponentType {
|
|
public key = MaxTrimConfig.key
|
|
public chartConfig = cloneDeep(MaxTrimConfig)
|
|
public attr = { ...chartInitConfig, x: 0, y: 0, w: 1920, h: 94, zIndex: 1 }
|
|
public option = cloneDeep(option)
|
|
}
|