diff --git a/src/packages/components/Charts/MyComponents/DeviceStatus/config.ts b/src/packages/components/Charts/MyComponents/DeviceStatus/config.ts index 69775d1..a24c363 100644 --- a/src/packages/components/Charts/MyComponents/DeviceStatus/config.ts +++ b/src/packages/components/Charts/MyComponents/DeviceStatus/config.ts @@ -3,6 +3,26 @@ import { CreateComponentType } from '@/packages/index.d' import { DeviceStatusConfig } from './index' import dataJson from './data.json' +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: dataJson.source, header: ['所属企业', '设备类型', '设备名称'], @@ -22,11 +42,15 @@ export const option = { onlineRate: 75, onlineDevice: 23, totalDevice: 100, - headerBgColor1: '#0059c9', - headerBgColor2: '#003a8c', - legendColors: ['#00E5FF', '#00FF7F', '#FFFFFF'], progressColor: '#00E5FF', - progressBgColor: '#1A385A' + progressBgColor: '#1A385A', + // new properties from AlarmList + fontWeight: 'normal', + fontStyle: 'normal', + paddingX: 40, + paddingY: -19, + letterSpacing: 2, + isShowButton: false } export default class Config extends PublicConfigClass implements CreateComponentType { diff --git a/src/packages/components/Charts/MyComponents/DeviceStatus/config.vue b/src/packages/components/Charts/MyComponents/DeviceStatus/config.vue index b55c8c9..9ece4c5 100644 --- a/src/packages/components/Charts/MyComponents/DeviceStatus/config.vue +++ b/src/packages/components/Charts/MyComponents/DeviceStatus/config.vue @@ -1,40 +1,102 @@ \ No newline at end of file + +const fontWeightOptions = [ + { + label: FontWeightEnum.NORMAL, + value: FontWeightObject[FontWeightEnum.NORMAL] + }, + { + label: FontWeightEnum.BOLD, + value: FontWeightObject[FontWeightEnum.BOLD] + } +] +const fontStyleOptions = [ + { + label: FontStyleEnum.NORMAL, + value: FontStyleObject[FontStyleEnum.NORMAL] + }, + { + label: FontStyleEnum.ITALIC, + value: FontStyleObject[FontStyleEnum.ITALIC] + } +] + diff --git a/src/packages/components/Charts/MyComponents/DeviceStatus/index.vue b/src/packages/components/Charts/MyComponents/DeviceStatus/index.vue index af0c9bd..645cb69 100644 --- a/src/packages/components/Charts/MyComponents/DeviceStatus/index.vue +++ b/src/packages/components/Charts/MyComponents/DeviceStatus/index.vue @@ -1,69 +1,74 @@