提交 ebd48b5b 编写于 作者: Mosher's avatar Mosher

update:更新

上级 f664555a
import ViewEngine from './view-engine';
import { ExpViewEngine } from './exp-view-engine';
/**
* 日历导航视图界面引擎
......@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class CalendarExpViewEngine
* @extends {ViewEngine}
*/
export default class CalendarExpViewEngine extends ViewEngine {
/**
* 日历导航栏部件
*
* @type {*}
* @memberof CalendarExpViewEngine
*/
public calendarExpBar: any = null;
/**
* Creates an instance of CalendarExpViewEngine.
*
* @memberof CalendarExpViewEngine
*/
constructor() {
super();
}
export default class CalendarExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
......@@ -33,78 +16,17 @@ export default class CalendarExpViewEngine extends ViewEngine {
* @memberof CalendarExpViewEngine
*/
public init(options: any): void {
this.calendarExpBar = options.calendarexpbar;
this.expBar = options.calendarexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof CalendarExpViewEngine
*/
public load(): void {
super.load();
if (this.getCalendarExpBar() && this.isLoadDefault) {
const tag = this.getCalendarExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'calendarexpbar')) {
this.calendarExpBarEvent(eventName, args);
}
}
/**
* 日历导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof CalendarExpViewEngine
*/
public calendarExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof CalendarExpViewEngine
*/
public getCalendarExpBar(): any {
return this.calendarExpBar;
}
/**
* @description 销毁
* @description 视图销毁
* @memberof CalendarExpViewEngine
*/
public destroy() {
super.destroy();
this.calendarExpBar = null;
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
import { ExpViewEngine } from './exp-view-engine';
/**
* 卡片视图导航视图界面引擎
......@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class DataViewExpViewEngine
* @extends {ViewEngine}
*/
export default class DataViewExpViewEngine extends ViewEngine {
/**
* 卡片导航栏部件
*
* @type {*}
* @memberof DataViewExpViewEngine
*/
public dataviewExpBar: any = null;
/**
* Creates an instance of DataViewExpViewEngine.
*
* @memberof DataViewExpViewEngine
*/
constructor() {
super();
}
export default class DataViewExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
......@@ -33,79 +16,17 @@ export default class DataViewExpViewEngine extends ViewEngine {
* @memberof DataViewExpViewEngine
*/
public init(options: any): void {
this.dataviewExpBar = options.dataviewexpbar;
this.expBar = options.dataviewexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @description 视图销毁
* @memberof DataViewExpViewEngine
*/
public load(): void {
super.load();
if (this.getDataviewExpBar() && this.isLoadDefault) {
const tag = this.getDataviewExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'dataviewexpbar')) {
this.dataviewExpBarEvent(eventName, args);
}
public destroyed() {
super.destroyed();
this.expBar = null;
}
/**
* 卡片导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof DataViewExpViewEngine
*/
public dataviewExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
}
}
/**
* 获取部件对象
*
* @returns {*}
* @memberof DataViewExpViewEngine
*/
public getDataviewExpBar(): any {
return this.dataviewExpBar;
}
/**
* @description 销毁
* @memberof DataViewExpViewEngine
*/
public destroy() {
super.destroy();
this.dataviewExpBar = null;
}
}
\ No newline at end of file
import ViewEngine from './view-engine';
import { ExpViewEngine } from './exp-view-engine';
/**
* 实体树导航视图界面引擎
*
* @export
* @class TreeExpView
* @class TreeExpViewEngine
* @extends {ViewEngine}
*/
export default class TreeExpView extends ViewEngine {
/**
* 选择视图面板
*
* @type {*}
* @memberof TreeExpView
*/
public treeExpBar: any = null;
/**
* Creates an instance of TreeExpView.
*
* @memberof TreeExpView
*/
constructor() {
super();
}
export default class TreeExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof TreeExpView
* @memberof TreeExpViewEngine
*/
public init(options: any): void {
this.treeExpBar = options.treeexpbar;
this.expBar = options.treeexpbar;
super.init(options);
}
/**
* 引擎加载
*
* @memberof TreeExpView
*/
public load(): void {
super.load();
if (this.getTreeExpBar() && this.isLoadDefault) {
const tag = this.getTreeExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.context });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof TreeExpView
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'treeexpbar')) {
this.treeExpBarEvent(eventName, args);
}
}
/**
* 树导航事件
*
* @param {string} eventName
* @param {*} args
* @memberof TreeExpView
* @description 视图销毁
* @memberof TreeExpViewEngine
*/
public treeExpBarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.view.$emit('viewload', args);
}
if (Object.is(eventName, 'selectionchange')) {
this.view.$emit('viewdataschange', args);
}
if (Object.is(eventName, 'activated')) {
this.view.$emit('viewdatasactivated', args);
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
/**
* 获取部件对象那
*
* @returns {*}
* @memberof TreeExpView
*/
public getTreeExpBar(): any {
return this.treeExpBar;
}
/**
* @description 销毁
* @memberof TreeExpView
*/
public destroy() {
super.destroy();
this.treeExpBar = null;
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册