提交 7fd029f9 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码

上级 d0b5a968
......@@ -383,6 +383,9 @@ export default class MDViewEngine extends ViewEngine {
if (this.view.viewparams && Object.keys(this.view.viewparams).length > 0) {
Object.assign(arg, this.view.viewparams);
}
if (this.view && this.view.searchbar) {
Object.assign(arg, this.view.searchbar.getData());
}
if (this.getSearchForm() && this.view.isExpandSearchForm) {
Object.assign(arg, this.getSearchForm().getData());
}
......
......@@ -222,6 +222,33 @@ export class ViewBase extends Vue {
*/
protected viewDataChange(newVal: any, oldVal: any): void { }
/**
* 当前组件是否已激活
*
* @protected
* @type {boolean}
* @memberof ViewBase
*/
protected isActive: boolean = true;
/**
* keep-alive缓存激活时调用
*
* @memberof ViewBase
*/
public activated(): void {
this.isActive = true;
}
/**
* keep-alive缓存时调用
*
* @memberof ViewBase
*/
public deactivated(): void {
this.isActive = false;
}
/**
* 组件创建完毕
*
......
......@@ -138,6 +138,33 @@ export class ControlBase extends Vue {
*/
public service: any;
/**
* 当前组件是否已激活
*
* @protected
* @type {boolean}
* @memberof ControlBase
*/
protected isActive: boolean = true;
/**
* keep-alive缓存激活时调用
*
* @memberof ControlBase
*/
public activated(): void {
this.isActive = true;
}
/**
* keep-alive缓存时调用
*
* @memberof ControlBase
*/
public deactivated(): void {
this.isActive = false;
}
/**
* 组件创建完毕
*
......
......@@ -241,7 +241,9 @@ export class GridControllerBase extends MDControlBase {
super.ctrlCreated();
this.setColState();
this.$acc.commandLocal(() => {
this.load()
if (this.isActive) {
this.load();
}
}, 'all', this.appDeName.toUpperCase());
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册