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

update:更新引擎

上级 735b2c6d
......@@ -60,7 +60,7 @@ export default class EditView2Engine extends EditViewEngine {
* @param {any[]} args
* @memberof EditView2Engine
*/
public drbarEvent(eventName: string, args: any[]): void {
public drbarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'selectionchange')) {
this.drBarSelectionChange(args);
}
......@@ -72,13 +72,15 @@ export default class EditView2Engine extends EditViewEngine {
* @param {any[]} args
* @memberof EditView2Engine
*/
public drBarSelectionChange(args: any[]): void {
const item = args[0];
if (!item || Object.keys(item).length === 0) {
return;
public drBarSelectionChange(data: any): void {
if (data) {
this.view.drItem = data;
if (this.getDRBar()) {
this.setViewState2({ tag: this.getDRBar().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
}
this.view.selection = {};
Object.assign(this.view.selection, JSON.parse(JSON.stringify(item)));
this.view.$emit('selectionchange', data);
}
/**
......@@ -89,10 +91,13 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.vieparams });
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
......@@ -104,10 +109,13 @@ export default class EditView2Engine extends EditViewEngine {
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
this.view.formData = arg;
if (this.getDRBar()) {
const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
......@@ -122,7 +130,7 @@ export default class EditView2Engine extends EditViewEngine {
}
/**
* @description 销毁
* @description 视图销毁
* @memberof EditView2Engine
*/
public destroy() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册