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

update:多数据视图快速分组调整

上级 11e1237f
import { IActionParam, IParam, MainView, MDViewState, ViewUtil } from '@core'; import { deepCopy, IActionParam, IParam, isExistAndNotEmpty, MainView, MDViewState, ViewUtil } from '@core';
/** /**
* 多数据视图 * 多数据视图
...@@ -121,9 +121,12 @@ export class MDView extends MainView { ...@@ -121,9 +121,12 @@ export class MDView extends MainView {
*/ */
public handleQuickGroupSearch(args: any = {}): void { public handleQuickGroupSearch(args: any = {}): void {
const { viewParams } = this.state; const { viewParams } = this.state;
Object.assign(viewParams, { quickGroup: args.data }); const tempViewParams = deepCopy(viewParams);
if (args && isExistAndNotEmpty(args.data) && typeof args.data === 'string') {
Object.assign(tempViewParams, JSON.parse(args.data));
}
const tag = this.getMDCtrl().name; const tag = this.getMDCtrl().name;
this.next({ tag: tag, action: 'load', data: viewParams }); this.next({ tag: tag, action: 'load', data: tempViewParams });
} }
/** /**
...@@ -282,7 +285,7 @@ export class MDView extends MainView { ...@@ -282,7 +285,7 @@ export class MDView extends MainView {
*/ */
public onQuickGroupEvent($event: IActionParam) { public onQuickGroupEvent($event: IActionParam) {
if ($event) { if ($event) {
this.handleQuickGroupSearch($event); this.handleQuickGroupSearch($event.data);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册