import { RhDynamicFieldBaseDto, RhBaseSettingDto, WithNil } from 'rh-base/model'; import { NzSizeMDSType } from 'ng-zorro-antd/core/types'; //#region 动态list区域 /** * 工控端动态list整体配置模型 */ export class RhDynamicListConfigDto { constructor( /** table配置 */ public config: WithNil ) { // } static create(config?: RhDynamicListSettingDto) { return new RhDynamicListConfigDto(config); } } /** * 工控端动态list字段模型 */ export class RhDynamicListFieldDto extends RhDynamicFieldBaseDto { public color = 'white'; constructor() { super(); } static override create(name?: string, displayName?: string) { const temp = new RhDynamicListFieldDto(); temp.name = name || ''; temp.displayName = displayName || ''; return temp; } } /** * 工控端动态list host配置模型 */ export class RhDynamicListSettingDto extends RhBaseSettingDto { /** 文字大小 */ public rhFontSize = '16px'; /** 文字颜色 */ public rhColor = 'white'; public rhBackColor = '#001529'; public rhBold = false; constructor( /** 尺寸 */ public rhSize: NzSizeMDSType, /** 是否带边框 */ public rhBordered: boolean, // /** 一行的 nz-descriptions-item 的数量 */ // public rhColumn: number, public rhGridRowSetting: string, public rhGridColumnSetting: string, /** 是否在标题后显示冒号 */ public rhColon: boolean, /** 一行显示多少条数据 */ public rhPageSize: number, /** 分页模式:0:后端分页;1:前端分页;2:不分页*/ public rhFrontPagination: 0 | 1 | 2 | null ) { super(); } static create() { return new RhDynamicListSettingDto('default', true, '33.33% 33.33% 33.33%', '24px 24px', true, 10, 1); } } //#endregion 动态list区域结束 //#region 动态card区域 export class RhDynamicCardConfigDto { constructor( /** table配置 */ public config: WithNil ) { // } static create(config?: RhDynamicCardSettingDto) { return new RhDynamicCardConfigDto(config); } } /** * 工控端动态list字段模型 */ export class RhDynamicCardFieldDto extends RhDynamicFieldBaseDto { public color = '#ffffff'; public backColor = '#2A2C3A'; constructor() { super(); } static override create(name?: string, displayName?: string) { const temp = new RhDynamicCardFieldDto(); temp.name = name || ''; temp.displayName = displayName || ''; return temp; } } /** * 工控端动态list host配置模型 */ export class RhDynamicCardSettingDto extends RhBaseSettingDto { /** 文字大小 */ public rhFontSize = '24px'; /** 文字颜色 */ public rhColor = '#2A2C3A'; public rhBackColor = '#ffffff'; public rhBold = false; public rhRowGap = '6px'; public rhColumnGap = '6px'; constructor( /** 尺寸 */ public rhSize: NzSizeMDSType, /** 是否带边框 */ public rhBordered: boolean, // /** 一行的 nz-descriptions-item 的数量 */ // public rhColumn: number, public rhGridRowSetting: string, public rhGridColumnSetting: string, /** 是否在标题后显示冒号 */ public rhColon: boolean // /** 一行显示多少条数据 */ // public rhPageSize: number ) { super(); } static create() { const temp = new RhDynamicCardSettingDto('default', true, '50% 50%', '2.4vw 2.4vw', true); return temp; } } //#endregion 动态list区域结束