1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { ViewBase } from './view-base';
import { IPSAppPortalView, IPSDEDashboard } from '@ibiz/dynamic-model-api';
import { MobPortalViewInterface, ModelTool } from 'ibiz-core';
/**
* 应用看板视图基类
*
* @export
* @class MobPortalViewBase
* @extends {MainViewBase}
*/
export class MobPortalViewBase extends ViewBase implements MobPortalViewInterface {
/**
* 数据视图视图实例
*
* @memberof GanttViewBase
*/
public declare viewInstance: IPSAppPortalView;
/**
* 数据看板实例
*
* @public
* @type {IBizMobDashboardModel}
* @memberof MobPortalViewBase
*/
public dashboardInstance !: IPSDEDashboard;
/**
* 视图挂载
*
* @memberof ViewBase
*/
public containerMounted() {
this.viewState.next({ tag: 'dashboard', action: 'load', data: {} });
}
/**
* 初始化列表视图实例
*
* @memberof MobPortalViewBase
*/
public async viewModelInit() {
await super.viewModelInit();
this.dashboardInstance = ModelTool.findPSControlByName('dashboard', this.viewInstance.getPSControls()) as IPSDEDashboard;
}
/**
* 渲染视图主体内容区
*
* @memberof MobPortalViewBase
*/
public renderMainContent() {
let { targetCtrlName, targetCtrlParam, targetCtrlEvent } = this.computeTargetCtrlData(this.dashboardInstance);
return this.$createElement(targetCtrlName, {
props: targetCtrlParam,
ref: this.dashboardInstance.name,
on: targetCtrlEvent,
});
}
}