tree-exp-view-engine.ts 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
import { ExpViewEngine } from './exp-view-engine';

/**
 * 实体树导航视图界面引擎
 *
 * @export
 * @class TreeExpViewEngine
 * @extends {ViewEngine}
 */
export class TreeExpViewEngine extends ExpViewEngine {

    /**
     * 初始化引擎
     *
     * @param {*} options
     * @memberof TreeExpViewEngine
     */
    public init(options: any): void {
        this.expBar = options.treeexpbar;
        super.init(options);
    }

    /**
     * @description 视图销毁
     * @memberof TreeExpViewEngine
     */
    public destroyed() {
        super.destroyed();
        this.expBar = null;
    }
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    
    /**
     * 导航栏数据部件加载之前
     *
     * @protected
     * @param {*} arg
     * @memberof TreeExpViewEngine
     */
    protected handleBeforeLoad(args: any = {}) {
        let otherQueryParam: any = {};
        if (this.view && this.view.quickGroupData) {
            Object.assign(otherQueryParam, this.view.quickGroupData);
        }
        let isSearch = false;
        if (args.query) {
            isSearch = true;
        }
        Object.assign(args, { viewparams: otherQueryParam , isSearch });
    }
50
}