提交 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'; ...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class CalendarExpViewEngine * @class CalendarExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class CalendarExpViewEngine extends ViewEngine { export default class CalendarExpViewEngine extends ExpViewEngine {
/**
* 日历导航栏部件
*
* @type {*}
* @memberof CalendarExpViewEngine
*/
public calendarExpBar: any = null;
/**
* Creates an instance of CalendarExpViewEngine.
*
* @memberof CalendarExpViewEngine
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
...@@ -33,78 +16,17 @@ export default class CalendarExpViewEngine extends ViewEngine { ...@@ -33,78 +16,17 @@ export default class CalendarExpViewEngine extends ViewEngine {
* @memberof CalendarExpViewEngine * @memberof CalendarExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.calendarExpBar = options.calendarexpbar; this.expBar = options.calendarexpbar;
super.init(options); 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 * @memberof CalendarExpViewEngine
*/ */
public destroy() { public destroyed() {
super.destroy(); super.destroyed();
this.calendarExpBar = null; 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'; ...@@ -7,24 +7,7 @@ import ViewEngine from './view-engine';
* @class DataViewExpViewEngine * @class DataViewExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class DataViewExpViewEngine extends ViewEngine { export default class DataViewExpViewEngine extends ExpViewEngine {
/**
* 卡片导航栏部件
*
* @type {*}
* @memberof DataViewExpViewEngine
*/
public dataviewExpBar: any = null;
/**
* Creates an instance of DataViewExpViewEngine.
*
* @memberof DataViewExpViewEngine
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
...@@ -33,79 +16,17 @@ export default class DataViewExpViewEngine extends ViewEngine { ...@@ -33,79 +16,17 @@ export default class DataViewExpViewEngine extends ViewEngine {
* @memberof DataViewExpViewEngine * @memberof DataViewExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.dataviewExpBar = options.dataviewexpbar; this.expBar = options.dataviewexpbar;
super.init(options); super.init(options);
} }
/** /**
* 引擎加载 * @description 视图销毁
*
* @memberof DataViewExpViewEngine * @memberof DataViewExpViewEngine
*/ */
public load(): void { public destroyed() {
super.load(); super.destroyed();
if (this.getDataviewExpBar() && this.isLoadDefault) { this.expBar = null;
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);
}
} }
/**
* 卡片导航事件
*
* @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 * @export
* @class TreeExpView * @class TreeExpViewEngine
* @extends {ViewEngine} * @extends {ViewEngine}
*/ */
export default class TreeExpView extends ViewEngine { export default class TreeExpViewEngine extends ExpViewEngine {
/**
* 选择视图面板
*
* @type {*}
* @memberof TreeExpView
*/
public treeExpBar: any = null;
/**
* Creates an instance of TreeExpView.
*
* @memberof TreeExpView
*/
constructor() {
super();
}
/** /**
* 初始化引擎 * 初始化引擎
* *
* @param {*} options * @param {*} options
* @memberof TreeExpView * @memberof TreeExpViewEngine
*/ */
public init(options: any): void { public init(options: any): void {
this.treeExpBar = options.treeexpbar; this.expBar = options.treeexpbar;
super.init(options); 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
*/
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);
}
}
/**
* 获取部件对象那
*
* @returns {*}
* @memberof TreeExpView
*/
public getTreeExpBar(): any {
return this.treeExpBar;
}
/** /**
* @description 销毁 * @description 视图销毁
* @memberof TreeExpView * @memberof TreeExpViewEngine
*/ */
public destroy() { public destroyed() {
super.destroy(); super.destroyed();
this.treeExpBar = null; this.expBar = null;
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册