form-group-panel.ts 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import { FormDetailModel } from './form-detail';

/**
 * 分组面板模型
 *
 * @export
 * @class FormGroupPanelModel
 * @extends {FormDetailModel}
 */
export class FormGroupPanelModel extends FormDetailModel {

    /**
     * 实体界面行为组
     *
     * @type {*}
     * @memberof FormGroupPanelModel
     */
    public uiActionGroup: any = {};
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    
    /**
     * 受控内容组
     *
     * @type {*}
     * @memberof FormGroupPanelModel
     */
    public showMoreModeItems: any = [];

    /**
     * 是否为管理容器
     *
     * @type {*}
     * @memberof FormGroupPanelModel
     */
    public isManageContainer: boolean = false;

    /**
     * 管理容器状态 true显示 false隐藏
     *
     * @type {*}
     * @memberof FormGroupPanelModel
     */
42
    public manageContainerStatus: boolean = true;
43 44 45 46 47 48 49 50 51 52 53

    /**
     * Creates an instance of FormGroupPanelModel.
     * 创建 FormGroupPanelModel 实例
     * 
     * @param {*} [opts={}]
     * @memberof FormGroupPanelModel
     */
    constructor(opts: any = {}) {
        super(opts);
        Object.assign(this.uiActionGroup, opts.uiActionGroup);
54 55 56 57 58 59 60 61 62 63 64
        this.showMoreModeItems = opts.showMoreModeItems;
        this.isManageContainer = opts.isManageContainer ? true : false;
    }

    /**
     * 设置管理容器状态
     *
     * @param {boolean} state
     * @memberof FormGroupPanelModel
     */
    public setManageContainerStatus(state: boolean): void {
65
        this.manageContainerStatus = state;
66 67
    }
}