@ibiz-template/runtime 0.7.38-alpha.57 → 0.7.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +230 -0
- package/dist/index.esm.js +3502 -2828
- package/dist/index.system.min.js +1 -1
- package/out/application.d.ts +9 -1
- package/out/application.d.ts.map +1 -1
- package/out/application.js +11 -0
- package/out/command/app/app-func/app-func.d.ts +10 -0
- package/out/command/app/app-func/app-func.d.ts.map +1 -1
- package/out/command/app/app-func/app-func.js +21 -0
- package/out/command/app/open-app-view/open-app-view.d.ts +15 -12
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +20 -17
- package/out/config/global-config.d.ts +2 -0
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +5 -0
- package/out/controller/common/base.controller.d.ts +1 -0
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +3 -0
- package/out/controller/common/control/md-control.controller.d.ts +10 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +21 -0
- package/out/controller/common/editor/editor.controller.d.ts +9 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +15 -0
- package/out/controller/common/view/view.controller.d.ts +50 -5
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +78 -8
- package/out/controller/control/app-menu/app-menu.controller.js +1 -1
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +8 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +2 -1
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +24 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +102 -15
- package/out/controller/control/form/form-detail/form-button/form-button.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button/form-button.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-button-list/form-button-list.controller.d.ts +42 -2
- package/out/controller/control/form/form-detail/form-button-list/form-button-list.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-button-list/form-button-list.controller.js +86 -3
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +21 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +77 -4
- package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts +14 -0
- package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.state.js +14 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.js +4 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.js +4 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +4 -0
- package/out/controller/control/form/search-form/search-form.controller.d.ts +17 -0
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +35 -1
- package/out/controller/control/grid/grid/auto-grid.util.d.ts.map +1 -1
- package/out/controller/control/grid/grid/auto-grid.util.js +38 -44
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +5 -0
- package/out/controller/control/toolbar/toolbar.controller.d.ts +8 -1
- package/out/controller/control/toolbar/toolbar.controller.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controller.js +22 -5
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +2 -1
- package/out/engine/de-main-view.engine.d.ts +12 -5
- package/out/engine/de-main-view.engine.d.ts.map +1 -1
- package/out/engine/de-main-view.engine.js +51 -12
- package/out/interface/common/i-app-service/i-app-service.d.ts +9 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/common/i-global-config/i-global-config.d.ts +16 -0
- package/out/interface/common/i-global-config/i-global-config.d.ts.map +1 -1
- package/out/interface/common/i-global-config/i-global-view-config.d.ts +7 -0
- package/out/interface/common/i-global-config/i-global-view-config.d.ts.map +1 -1
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts +9 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts.map +1 -1
- package/out/interface/common/i-overlay-container-options/i-overlay-container-options.d.ts +20 -0
- package/out/interface/common/i-overlay-container-options/i-overlay-container-options.d.ts.map +1 -0
- package/out/interface/common/i-overlay-container-options/i-overlay-container-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/controller/i.controller.d.ts +9 -0
- package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts +6 -0
- package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-dashboard.event.d.ts +12 -12
- package/out/interface/controller/event/control/i-dashboard.event.d.ts.map +1 -1
- package/out/interface/controller/event/view/i-view.event.d.ts +13 -0
- package/out/interface/controller/event/view/i-view.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-chart.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-chart.state.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +12 -1
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/util/i-app-util/i-app-util.d.ts +69 -0
- package/out/interface/util/i-app-util/i-app-util.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +31 -13
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +1 -1
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +4 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +4 -0
- package/out/locale/zh-CN/index.d.ts +4 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +4 -0
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +11 -8
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +11 -0
- package/out/service/service/entity/de.service.d.ts +12 -1
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +31 -5
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +16 -3
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +6 -2
- package/out/service/utils/de-dq-cond/ps-de-dq-cond-engine.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond/ps-de-dq-cond-engine.js +7 -1
- package/out/service/utils/de-dq-cond/ps-model-single-cond-base.d.ts +11 -0
- package/out/service/utils/de-dq-cond/ps-model-single-cond-base.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond/ps-model-single-cond-base.js +10 -0
- package/out/service/utils/de-dq-cond-util/de-dq-cond-util.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond-util/de-dq-cond-util.js +6 -2
- package/out/ui-action/provider/backend-ui-action-provider.js +2 -2
- package/out/ui-action/provider/front-ui-action-provider.d.ts +10 -2
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +36 -5
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +6 -1
- package/out/utils/theme-util/theme-util.js +1 -1
- package/out/utils/ui-domain/ui-domain.d.ts +22 -6
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +20 -7
- package/package.json +10 -12
|
@@ -24,14 +24,14 @@ export class ViewController extends BaseController {
|
|
|
24
24
|
return this.evt;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
31
|
-
* @
|
|
27
|
+
* 超时周期
|
|
28
|
+
* - 默认300秒
|
|
29
|
+
* @readonly
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ViewController
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
get timeoutDuration() {
|
|
34
|
+
return ibiz.config.view.timeoutDuration;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* 上层视图控制器
|
|
@@ -100,6 +100,22 @@ export class ViewController extends BaseController {
|
|
|
100
100
|
* @type {('DEFAULT' | 'MANUAL')}
|
|
101
101
|
*/
|
|
102
102
|
this.operateState = 'DEFAULT';
|
|
103
|
+
/**
|
|
104
|
+
* 定时器开始时间
|
|
105
|
+
*
|
|
106
|
+
* @protected
|
|
107
|
+
* @type {number}
|
|
108
|
+
* @memberof ViewController
|
|
109
|
+
*/
|
|
110
|
+
this.startTime = Date.now();
|
|
111
|
+
/**
|
|
112
|
+
* 用户上次活动时间
|
|
113
|
+
*
|
|
114
|
+
* @protected
|
|
115
|
+
* @type {number}
|
|
116
|
+
* @memberof ViewController
|
|
117
|
+
*/
|
|
118
|
+
this.lastActivityTime = Date.now();
|
|
103
119
|
// 如果视图有上层ctx,作为上层的子在上层注册自身
|
|
104
120
|
if (ctx) {
|
|
105
121
|
ctx.registerController(this.model.name, this);
|
|
@@ -108,6 +124,55 @@ export class ViewController extends BaseController {
|
|
|
108
124
|
this.initEngines();
|
|
109
125
|
this.handleViewError = this.handleViewError.bind(this);
|
|
110
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* 设置操作状态
|
|
129
|
+
*
|
|
130
|
+
* @author tony001
|
|
131
|
+
* @date 2025-01-17 17:01:13
|
|
132
|
+
* @param {('DEFAULT' | 'MANUAL')} state
|
|
133
|
+
*/
|
|
134
|
+
setOperateState(state) {
|
|
135
|
+
this.operateState = state;
|
|
136
|
+
this.lastActivityTime = Date.now();
|
|
137
|
+
// 超时时用户活动则更新用户访问状态
|
|
138
|
+
if (this.lastActivityTime - this.startTime > this.timeoutDuration)
|
|
139
|
+
this.updateAccessState();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 更新用户访问状态
|
|
143
|
+
*
|
|
144
|
+
* @memberof ViewController
|
|
145
|
+
*/
|
|
146
|
+
async updateAccessState() {
|
|
147
|
+
// 清除定时器
|
|
148
|
+
clearInterval(this.intervalTimer);
|
|
149
|
+
// 发送更新通知
|
|
150
|
+
await this._evt.emit('onUpdateAccessState', undefined);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* 初始化定时器监听用户活动
|
|
154
|
+
*
|
|
155
|
+
* @memberof ViewController
|
|
156
|
+
*/
|
|
157
|
+
initTimeoutTimer() {
|
|
158
|
+
// 计时
|
|
159
|
+
let time = 0;
|
|
160
|
+
this.startTime = Date.now();
|
|
161
|
+
this.intervalTimer = setInterval(() => {
|
|
162
|
+
time += 1000;
|
|
163
|
+
if (this.lastActivityTime) {
|
|
164
|
+
const lastActivity = this.lastActivityTime - this.startTime;
|
|
165
|
+
// 如果临界时间用户活动则更新用户访问状态(临界时间60秒)
|
|
166
|
+
if (lastActivity >= this.timeoutDuration - 60 * 1000 &&
|
|
167
|
+
lastActivity <= this.timeoutDuration) {
|
|
168
|
+
this.updateAccessState();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// 超时清除定时器
|
|
172
|
+
if (time > this.timeoutDuration)
|
|
173
|
+
clearInterval(this.intervalTimer);
|
|
174
|
+
}, 1000);
|
|
175
|
+
}
|
|
111
176
|
/**
|
|
112
177
|
* 视图重新激活
|
|
113
178
|
*
|
|
@@ -326,10 +391,15 @@ export class ViewController extends BaseController {
|
|
|
326
391
|
* @protected
|
|
327
392
|
*/
|
|
328
393
|
handleContextParams() {
|
|
394
|
+
var _a;
|
|
329
395
|
this.context.srfappid = this.model.appId || ibiz.env.appId;
|
|
396
|
+
// 新增识别srfrenewsession视图动态参数,值为true时,强制重新构建界面域
|
|
397
|
+
const { appViewParams } = this.model;
|
|
398
|
+
const renewSessionValue = (_a = appViewParams === null || appViewParams === void 0 ? void 0 : appViewParams.find(item => item.id.toLowerCase() === 'srfrenewsession')) === null || _a === void 0 ? void 0 : _a.value;
|
|
330
399
|
// 只要上下文中无 srfsessionid 则生成一个
|
|
331
400
|
if (isNil(this.context.srfsessionid) ||
|
|
332
|
-
isEmpty(this.context.srfsessionid)
|
|
401
|
+
isEmpty(this.context.srfsessionid) ||
|
|
402
|
+
renewSessionValue === 'true') {
|
|
333
403
|
// 生成一个界面域,界面域标识为当前控制器实例的标识
|
|
334
404
|
const domain = ibiz.uiDomainManager.create(this.id);
|
|
335
405
|
this.context.srfsessionid = domain.id;
|
|
@@ -168,7 +168,7 @@ export class AppMenuController extends ControlController {
|
|
|
168
168
|
toRouteDepth: this.routeDepth + 1,
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
await ibiz.commands.execute(AppFuncCommand.TAG, menuItem.appFuncId, tempContext, this.params, opts);
|
|
171
|
+
await ibiz.commands.execute(AppFuncCommand.TAG, menuItem.appFuncId, tempContext, this.params, Object.assign(Object.assign({}, opts), { view: this.view }));
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
* 初始化菜单项状态
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/chart/chart.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,qBAAa,eACX,SAAQ,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAC9D,YAAW,gBAAgB;IAEnB,OAAO,EAAE,YAAY,CAAC;IAE9B,SAAS,KAAK,IAAI,IAAI,eAAe,CAAC,WAAW,CAAC,CAEjD;IAED;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;;OAKG;IACH,SAAS,EAAG,qBAAqB,CAAC;IAElC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,YAAY,UAAQ;IAEpB,SAAS,CAAC,SAAS,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"chart.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/chart/chart.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EA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AAG,IAAI;IAanC;;;;;;OAMG;IACG,WAAW,CAAC,IAAI,GAAE,KAAK,EAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBlE;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBlC;;;;OAIG;IACH,WAAW,IAAI,IAAI;cAMH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7C"}
|
|
@@ -22,6 +22,7 @@ export class ChartController extends MDControlController {
|
|
|
22
22
|
this.state.gridHeaders = [];
|
|
23
23
|
this.state.gridData = [];
|
|
24
24
|
this.state.gridPosition = 'bottom';
|
|
25
|
+
this.state.optionsReady = false;
|
|
25
26
|
}
|
|
26
27
|
async onCreated() {
|
|
27
28
|
await super.onCreated();
|
|
@@ -377,6 +378,9 @@ export class ChartController extends MDControlController {
|
|
|
377
378
|
this.setActive(activeData);
|
|
378
379
|
}
|
|
379
380
|
});
|
|
381
|
+
if (this.state.optionsReady) {
|
|
382
|
+
this.updateChart();
|
|
383
|
+
}
|
|
380
384
|
}
|
|
381
385
|
/**
|
|
382
386
|
* 根据数据计算最终的options
|
|
@@ -391,7 +395,10 @@ export class ChartController extends MDControlController {
|
|
|
391
395
|
// 开启图表表格后才会计算表格的数据
|
|
392
396
|
this.computeGridData();
|
|
393
397
|
}
|
|
394
|
-
this.
|
|
398
|
+
this.state.optionsReady = true;
|
|
399
|
+
if (this.chart) {
|
|
400
|
+
this.updateChart();
|
|
401
|
+
}
|
|
395
402
|
}
|
|
396
403
|
/**
|
|
397
404
|
* 更新echart图表
|
package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portlet-part.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAQxE,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AMG;IACH,UAAU,IAAI,IAAI;IAalB;;;;;OAKG;IACG,SAAS,CAAC,MAAM,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7C;;;;OAIG;IACH,WAAW,IAAI,IAAI;IAcnB;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAc1C;;;;;;OAMG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"portlet-part.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAQxE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,2BAA2B,EAC3B,eAAe,EACf,WAAW,EAEZ,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;;;;;GAQG;AACH,qBAAa,qBAAqB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,CAC1E,YAAW,kBAAkB;IAE7B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAElB;;;;;OAKG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IAEzC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,2BAA2B,CAAC;IAE9C;;;;;;;OAOG;IACH,IAAI,OAAO,IAAI,QAAQ,CAEtB;IAED;;;;;;OAMG;IACI,MAAM,EAAE,OAAO,CAAC;IAEvB;;;;;OAKG;IACI,MAAM,EAAE,KAAK,CAAM;IAE1B;;;;;;OAMG;IACH,IAAI,cAAc,IAAI,MAAM,EAAE,CAE7B;IAED;;;;;;OAMG;IACH,IAAI,iBAAiB,IAAI,WAAW,GAAG,SAAS,CAK/C;IAED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|
-
|
|
266
|
+
const viewData = this.dashboard.view.state.srfactiveviewdata || undefined;
|
|
267
|
+
await containerState.update(this.dashboard.context, viewData);
|
|
267
268
|
this.state.actionGroupState = containerState;
|
|
268
269
|
// 实体门户视图监听视图数据变更,刷新界面行为组的状态。
|
|
269
270
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
@@ -39,6 +39,14 @@ export declare class EditFormController extends FormController<IDEEditForm, IEdi
|
|
|
39
39
|
* @memberof EditFormController
|
|
40
40
|
*/
|
|
41
41
|
anchorData: IData[];
|
|
42
|
+
/**
|
|
43
|
+
* 是否打开消息弹窗
|
|
44
|
+
*
|
|
45
|
+
* @protected
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof EditFormController
|
|
48
|
+
*/
|
|
49
|
+
protected hasOpenConfirm: boolean;
|
|
42
50
|
/**
|
|
43
51
|
* 初始化方法
|
|
44
52
|
*
|
|
@@ -166,6 +174,14 @@ export declare class EditFormController extends FormController<IDEEditForm, IEdi
|
|
|
166
174
|
* @param {IData} data
|
|
167
175
|
*/
|
|
168
176
|
setSimpleData(data: IData): void;
|
|
177
|
+
/**
|
|
178
|
+
* 刷新确认
|
|
179
|
+
*
|
|
180
|
+
* @protected
|
|
181
|
+
* @return {*} {Promise<boolean>}
|
|
182
|
+
* @memberof ControlController
|
|
183
|
+
*/
|
|
184
|
+
protected reloadConfirm(): Promise<boolean>;
|
|
169
185
|
/**
|
|
170
186
|
* 检测实体数据变更
|
|
171
187
|
*
|
|
@@ -176,5 +192,13 @@ export declare class EditFormController extends FormController<IDEEditForm, IEdi
|
|
|
176
192
|
* @return {*} {void}
|
|
177
193
|
*/
|
|
178
194
|
protected onDEDataChange(msg: IPortalMessage): void;
|
|
195
|
+
/**
|
|
196
|
+
* 过滤成员
|
|
197
|
+
*
|
|
198
|
+
* @param {string} filter 过滤值
|
|
199
|
+
* @return {*} {void}
|
|
200
|
+
* @memberof EditFormController
|
|
201
|
+
*/
|
|
202
|
+
filterDetail(filter: string): void;
|
|
179
203
|
}
|
|
180
204
|
//# sourceMappingURL=edit-form.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-form.controller.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/form/edit-form/edit-form.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EAIf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"edit-form.controller.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/form/edit-form/edit-form.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EAIf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,WAAW,EAEX,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAS,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,qBAAa,kBACX,SAAQ,cAAc,CAAC,WAAW,EAAE,cAAc,EAAE,cAAc,CAClE,YAAW,mBAAmB;IAE9B;;;;;OAKG;IACH,OAAO,EAAG,eAAe,CAAC;IAE1B,IAAI,IAAI,IAAI,eAAe,CAAC,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC,CAM1E;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,OAAO,EAAE,KAAK,CAAmB;IAE3C;;;;;OAKG;IACI,UAAU,EAAE,KAAK,EAAE,CAAM;IAEhC;;;;;;OAMG;IACH,SAAS,CAAC,cAAc,EAAE,OAAO,CAAS;IAE1C;;;;;;;OAOG;cACa,SAAS,IAAI,OAAO,CAAC,I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KG;IACH,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IAyBhC;;;;;;OAMG;cACa,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAcjD;;;;;;;;OAQG;IACH,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IA4CnD;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAyBnC"}
|
|
@@ -2,7 +2,7 @@ import { awaitTimeout, IBizContext, isElementSame, mergeInLeft, RuntimeError, }
|
|
|
2
2
|
import { debounce } from 'lodash-es';
|
|
3
3
|
import { createUUID } from 'qx-util';
|
|
4
4
|
import { clone, isNil } from 'ramda';
|
|
5
|
-
import { calcDeCodeNameById, hasDeCodeName } from '../../../../model';
|
|
5
|
+
import { calcDeCodeNameById, findChildFormDetails, hasDeCodeName, } from '../../../../model';
|
|
6
6
|
import { Srfuf, ControlVO } from '../../../../service';
|
|
7
7
|
import { ScriptFactory } from '../../../../utils';
|
|
8
8
|
import { FormNotifyState } from '../../../constant';
|
|
@@ -37,6 +37,14 @@ export class EditFormController extends FormController {
|
|
|
37
37
|
* @memberof EditFormController
|
|
38
38
|
*/
|
|
39
39
|
this.anchorData = [];
|
|
40
|
+
/**
|
|
41
|
+
* 是否打开消息弹窗
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof EditFormController
|
|
46
|
+
*/
|
|
47
|
+
this.hasOpenConfirm = false;
|
|
40
48
|
}
|
|
41
49
|
get view() {
|
|
42
50
|
return this.ctx.view;
|
|
@@ -268,6 +276,12 @@ export class EditFormController extends FormController {
|
|
|
268
276
|
await this.startLoading();
|
|
269
277
|
}
|
|
270
278
|
const { context, data } = this.handlerAbilityParams(args);
|
|
279
|
+
// 表单未修改则阻止触发界面域变更,防止自动保存引发界面域状态异常状态(场景:仅值项填充文本触发表单自动保存)
|
|
280
|
+
if (!this.state.modified) {
|
|
281
|
+
Object.assign(context, {
|
|
282
|
+
srfactiontrusted: false,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
271
285
|
const saveData = data[0];
|
|
272
286
|
await this.checkIgnoreInput(saveData);
|
|
273
287
|
const isCreate = saveData.srfuf === Srfuf.CREATE;
|
|
@@ -653,6 +667,27 @@ export class EditFormController extends FormController {
|
|
|
653
667
|
this.dataChangeNotify(Object.keys(diffData));
|
|
654
668
|
}
|
|
655
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* 刷新确认
|
|
672
|
+
*
|
|
673
|
+
* @protected
|
|
674
|
+
* @return {*} {Promise<boolean>}
|
|
675
|
+
* @memberof ControlController
|
|
676
|
+
*/
|
|
677
|
+
async reloadConfirm() {
|
|
678
|
+
// 如果之前已经打开了则直接返回false
|
|
679
|
+
if (this.hasOpenConfirm)
|
|
680
|
+
return false;
|
|
681
|
+
// 标记已打开消息弹窗
|
|
682
|
+
this.hasOpenConfirm = true;
|
|
683
|
+
const result = await ibiz.confirm.info({
|
|
684
|
+
title: ibiz.i18n.t('runtime.controller.control.form.refreshPrompt'),
|
|
685
|
+
desc: ibiz.i18n.t('runtime.controller.control.form.refreshPagePrompt'),
|
|
686
|
+
});
|
|
687
|
+
// 标记已关闭消息弹窗
|
|
688
|
+
this.hasOpenConfirm = false;
|
|
689
|
+
return result;
|
|
690
|
+
}
|
|
656
691
|
/**
|
|
657
692
|
* 检测实体数据变更
|
|
658
693
|
*
|
|
@@ -663,27 +698,79 @@ export class EditFormController extends FormController {
|
|
|
663
698
|
* @return {*} {void}
|
|
664
699
|
*/
|
|
665
700
|
onDEDataChange(msg) {
|
|
666
|
-
var _a;
|
|
701
|
+
var _a, _b;
|
|
702
|
+
const { appDataEntityId } = this.model;
|
|
667
703
|
// 表单只关心更新
|
|
668
|
-
if (msg.subtype !== 'OBJECTUPDATED')
|
|
704
|
+
if (msg.subtype !== 'OBJECTUPDATED' || !appDataEntityId)
|
|
669
705
|
return;
|
|
670
|
-
}
|
|
671
706
|
// msg.triggerKey 不为空,且与当前控制器的triggerKey一致时,则不处理
|
|
672
|
-
if (!isNil(msg.triggerKey) && msg.triggerKey === this.triggerKey)
|
|
707
|
+
if (!isNil(msg.triggerKey) && msg.triggerKey === this.triggerKey)
|
|
673
708
|
return;
|
|
709
|
+
let data;
|
|
710
|
+
try {
|
|
711
|
+
data = msg.data || (msg.content ? JSON.parse(msg.content) : undefined);
|
|
674
712
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
713
|
+
catch (error) {
|
|
714
|
+
ibiz.log.error(error);
|
|
715
|
+
}
|
|
716
|
+
// 没有信息内容不处理
|
|
717
|
+
if (!data)
|
|
718
|
+
return;
|
|
719
|
+
// 当前实体名称
|
|
720
|
+
const dename = calcDeCodeNameById(appDataEntityId);
|
|
721
|
+
// 是否启用脏检查(后台消息启用脏检查)
|
|
722
|
+
const enableDirtyChecking = !msg.data;
|
|
723
|
+
// 是否重载(必须同实体同主键才做刷新处理)
|
|
724
|
+
const isReload = (((_a = data.srfdecodename) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === dename ||
|
|
725
|
+
((_b = data.srfdename) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === dename) &&
|
|
726
|
+
data.srfkey === this.data.srfkey;
|
|
727
|
+
if (isReload) {
|
|
728
|
+
this.doNextActive(async () => {
|
|
729
|
+
if (!this.ctx.isDestroyed) {
|
|
730
|
+
if (enableDirtyChecking && this.state.modified) {
|
|
731
|
+
const result = await this.reloadConfirm();
|
|
732
|
+
if (!result)
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
this.load();
|
|
736
|
+
}
|
|
737
|
+
}, {
|
|
685
738
|
key: 'load',
|
|
686
739
|
});
|
|
687
740
|
}
|
|
688
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* 过滤成员
|
|
744
|
+
*
|
|
745
|
+
* @param {string} filter 过滤值
|
|
746
|
+
* @return {*} {void}
|
|
747
|
+
* @memberof EditFormController
|
|
748
|
+
*/
|
|
749
|
+
filterDetail(filter) {
|
|
750
|
+
const { deformPages } = this.model;
|
|
751
|
+
if (!deformPages || !deformPages.length)
|
|
752
|
+
return;
|
|
753
|
+
// 递归计算成员显示状态
|
|
754
|
+
const clacVisible = (detail) => {
|
|
755
|
+
var _a;
|
|
756
|
+
// 默认设置为不可见
|
|
757
|
+
let visible = false;
|
|
758
|
+
// 如果成员标题包含过滤值,设置为可见
|
|
759
|
+
if ((_a = detail.caption) === null || _a === void 0 ? void 0 : _a.includes(filter)) {
|
|
760
|
+
visible = true;
|
|
761
|
+
}
|
|
762
|
+
// 递归处理子成员
|
|
763
|
+
const childDetails = findChildFormDetails(detail);
|
|
764
|
+
if (childDetails.length) {
|
|
765
|
+
const children = childDetails.map(clacVisible);
|
|
766
|
+
// 如果子成员中有可见的,父成员也必须可见
|
|
767
|
+
if (children.some(_v => _v))
|
|
768
|
+
visible = true;
|
|
769
|
+
}
|
|
770
|
+
if (this.details[detail.id])
|
|
771
|
+
this.details[detail.id].state.visible = visible;
|
|
772
|
+
return visible;
|
|
773
|
+
};
|
|
774
|
+
deformPages.forEach(clacVisible);
|
|
775
|
+
}
|
|
689
776
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-button.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/form/form-detail/form-button/form-button.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAc,MAAM,0BAA0B,CAAC;AAIpE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,oBAAoB,CAAC,aAAa,CAAC;IACnE,KAAK,EAAE,eAAe,CAAC;IAE/B;;;;;OAKG;IACH,WAAW,EAAE,YAAY,GAAG,IAAI,CAAQ;IAExC,SAAS,CAAC,WAAW,IAAI,eAAe;cAIxB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvC;;;;;OAKG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYvC;;;;;OAKG;IACG,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"form-button.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/form/form-detail/form-button/form-button.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAc,MAAM,0BAA0B,CAAC;AAIpE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,oBAAoB,CAAC,aAAa,CAAC;IACnE,KAAK,EAAE,eAAe,CAAC;IAE/B;;;;;OAKG;IACH,WAAW,EAAE,YAAY,GAAG,IAAI,CAAQ;IAExC,SAAS,CAAC,WAAW,IAAI,eAAe;cAIxB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvC;;;;;OAKG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYvC;;;;;OAKG;IACG,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7D;;;;OAIG;IACH,kBAAkB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IAUrC;;;;OAIG;IACH,iBAAiB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IAQpC;;;;;;OAMG;IACG,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAc/C;;;;;;;OAOG;IACG,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBlD;;;;;;;;OAQG;IACI,kBAAkB,CACvB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,GACd;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE;IAezC;;;;;;OAMG;IACG,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CA+BzD"}
|
|
@@ -54,7 +54,7 @@ export class FormButtonController extends FormDetailController {
|
|
|
54
54
|
*/
|
|
55
55
|
async formStateNotify(_state) {
|
|
56
56
|
if (this.actionState) {
|
|
57
|
-
const deCodeName = calcDeCodeNameById(this.form.model.appDataEntityId);
|
|
57
|
+
const deCodeName = calcDeCodeNameById(this.form.model.appDataEntityId || '');
|
|
58
58
|
await this.actionState.update(this.context, this.data, deCodeName);
|
|
59
59
|
}
|
|
60
60
|
await super.formStateNotify(_state);
|
package/out/controller/control/form/form-detail/form-button-list/form-button-list.controller.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDEFormButtonList } from '@ibiz/model-core';
|
|
1
|
+
import { IDEFormButton, IDEFormButtonList } from '@ibiz/model-core';
|
|
2
2
|
import { FormDetailController } from '../form-detail';
|
|
3
3
|
import { FormNotifyState } from '../../../../constant';
|
|
4
4
|
import { FormButtonListState } from './form-button-list.state';
|
|
@@ -54,6 +54,15 @@ export declare class FormButtonListController extends FormDetailController<IDEFo
|
|
|
54
54
|
* @memberof FormButtonListController
|
|
55
55
|
*/
|
|
56
56
|
calcDetailVisible(data: IData): void;
|
|
57
|
+
/**
|
|
58
|
+
* 通过项标识获取项模型
|
|
59
|
+
*
|
|
60
|
+
* @private
|
|
61
|
+
* @param {string} id
|
|
62
|
+
* @return {*} {(IDEFormButton | IUIActionGroupDetail | undefined)}
|
|
63
|
+
* @memberof FormButtonListController
|
|
64
|
+
*/
|
|
65
|
+
private getModelById;
|
|
57
66
|
/**
|
|
58
67
|
* 执行界面行为
|
|
59
68
|
*
|
|
@@ -62,6 +71,37 @@ export declare class FormButtonListController extends FormDetailController<IDEFo
|
|
|
62
71
|
* @return {*} {Promise<void>}
|
|
63
72
|
* @memberof FormButtonListController
|
|
64
73
|
*/
|
|
65
|
-
doUIAction(actionId: string, event?: MouseEvent): Promise<void>;
|
|
74
|
+
doUIAction(actionId: string, appId: string, event?: MouseEvent): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* 处理公共参数
|
|
77
|
+
*
|
|
78
|
+
* @param {IData} data
|
|
79
|
+
* @param {IContext} context
|
|
80
|
+
* @param {IParams} params
|
|
81
|
+
* @return {*} {{ context: IContext; params: IParams }}
|
|
82
|
+
* @memberof FormButtonListController
|
|
83
|
+
*/
|
|
84
|
+
handlePublicParams(model: IDEFormButton, data: IData, context: IContext, params: IParams): {
|
|
85
|
+
context: IContext;
|
|
86
|
+
params: IParams;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* 执行表单项更新
|
|
90
|
+
*
|
|
91
|
+
* @param {IDEFormButton} model
|
|
92
|
+
* @param {MouseEvent} [event]
|
|
93
|
+
* @return {*} {Promise<void>}
|
|
94
|
+
* @memberof FormButtonListController
|
|
95
|
+
*/
|
|
96
|
+
doFormItemUpdate(model: IDEFormButton, event?: MouseEvent): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* 处理按钮点击
|
|
99
|
+
*
|
|
100
|
+
* @param {string} id
|
|
101
|
+
* @param {MouseEvent} [event]
|
|
102
|
+
* @return {*} {Promise<void>}
|
|
103
|
+
* @memberof FormButtonListController
|
|
104
|
+
*/
|
|
105
|
+
handleClick(id: string, event?: MouseEvent): Promise<void>;
|
|
66
106
|
}
|
|
67
107
|
//# sourceMappingURL=form-button-list.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-button-list.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/form/form-detail/form-button-list/form-button-list.controller.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"form-button-list.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/controller/control/form/form-detail/form-button-list/form-button-list.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EAElB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAE/B,MAAM,0BAA0B,CAAC;AAKlC;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC3E,KAAK,EAAE,mBAAmB,CAAC;IAEnC,SAAS,CAAC,WAAW,IAAI,mBAAmB;IAI5C;;;;;;OAMG;gBAED,KAAK,EAAE,iBAAiB,EACxB,IAAI,EAAE,cAAc,EACpB,MAAM,CAAC,EAAE,8BAA8B;cAMzB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvC;;;;;OAKG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BvC;;;;;;OAMG;IACG,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7D;;;;;;OAMG;IACH,kBAAkB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IASrC;;;;;;OAMG;IACH,iBAAiB,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IASpC;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAWpB;;;;;;;OAOG;IACG,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,UAAU,GACjB,OAAO,CAAC,IAAI,CAAC;IAgBhB;;;;;;;;OAQG;IACI,kBAAkB,CACvB,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,GACd;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE;IAezC;;;;;;;OAOG;IACG,gBAAgB,CACpB,KAAK,EAAE,aAAa,EACpB,KAAK,CAAC,EAAE,UAAU,GACjB,OAAO,CAAC,IAAI,CAAC;IA+BhB;;;;;;;OAOG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CASjE"}
|
package/out/controller/control/form/form-detail/form-button-list/form-button-list.controller.js
CHANGED
|
@@ -2,6 +2,8 @@ import { UIActionUtil } from '../../../../../ui-action';
|
|
|
2
2
|
import { FormDetailController } from '../form-detail';
|
|
3
3
|
import { ButtonContainerState, UIActionButtonState } from '../../../../utils';
|
|
4
4
|
import { FormButtonListState } from './form-button-list.state';
|
|
5
|
+
import { OpenAppViewCommand } from '../../../../../command';
|
|
6
|
+
import { convertNavData } from '../../../../../utils';
|
|
5
7
|
/**
|
|
6
8
|
* 表单按钮组控制器
|
|
7
9
|
*
|
|
@@ -41,7 +43,7 @@ export class FormButtonListController extends FormDetailController {
|
|
|
41
43
|
if (buttonListType === 'UIACTIONGROUP') {
|
|
42
44
|
(_a = uiactionGroup === null || uiactionGroup === void 0 ? void 0 : uiactionGroup.uiactionGroupDetails) === null || _a === void 0 ? void 0 : _a.forEach(detail => {
|
|
43
45
|
if (detail.uiactionId) {
|
|
44
|
-
const buttonState = new UIActionButtonState(detail.id,
|
|
46
|
+
const buttonState = new UIActionButtonState(detail.id, detail.appId, detail.uiactionId, detail);
|
|
45
47
|
this.state.buttonsState.addState(detail.id, buttonState);
|
|
46
48
|
}
|
|
47
49
|
});
|
|
@@ -97,6 +99,21 @@ export class FormButtonListController extends FormDetailController {
|
|
|
97
99
|
}
|
|
98
100
|
super.calcDetailVisible(data);
|
|
99
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* 通过项标识获取项模型
|
|
104
|
+
*
|
|
105
|
+
* @private
|
|
106
|
+
* @param {string} id
|
|
107
|
+
* @return {*} {(IDEFormButton | IUIActionGroupDetail | undefined)}
|
|
108
|
+
* @memberof FormButtonListController
|
|
109
|
+
*/
|
|
110
|
+
getModelById(id) {
|
|
111
|
+
var _a;
|
|
112
|
+
const { buttonListType, uiactionGroup, deformButtons } = this.model;
|
|
113
|
+
if (buttonListType === 'UIACTIONGROUP')
|
|
114
|
+
return (_a = uiactionGroup === null || uiactionGroup === void 0 ? void 0 : uiactionGroup.uiactionGroupDetails) === null || _a === void 0 ? void 0 : _a.find(detail => detail.id === id);
|
|
115
|
+
return deformButtons === null || deformButtons === void 0 ? void 0 : deformButtons.find(button => button.id === id);
|
|
116
|
+
}
|
|
100
117
|
/**
|
|
101
118
|
* 执行界面行为
|
|
102
119
|
*
|
|
@@ -105,7 +122,7 @@ export class FormButtonListController extends FormDetailController {
|
|
|
105
122
|
* @return {*} {Promise<void>}
|
|
106
123
|
* @memberof FormButtonListController
|
|
107
124
|
*/
|
|
108
|
-
async doUIAction(actionId, event) {
|
|
125
|
+
async doUIAction(actionId, appId, event) {
|
|
109
126
|
await UIActionUtil.execAndResolved(actionId, {
|
|
110
127
|
context: this.form.context,
|
|
111
128
|
params: this.form.params,
|
|
@@ -114,6 +131,72 @@ export class FormButtonListController extends FormDetailController {
|
|
|
114
131
|
ctrl: this.form,
|
|
115
132
|
event,
|
|
116
133
|
noWaitRoute: true,
|
|
117
|
-
}, this.model.appId);
|
|
134
|
+
}, appId || this.model.appId);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 处理公共参数
|
|
138
|
+
*
|
|
139
|
+
* @param {IData} data
|
|
140
|
+
* @param {IContext} context
|
|
141
|
+
* @param {IParams} params
|
|
142
|
+
* @return {*} {{ context: IContext; params: IParams }}
|
|
143
|
+
* @memberof FormButtonListController
|
|
144
|
+
*/
|
|
145
|
+
handlePublicParams(model, data, context, params) {
|
|
146
|
+
const { navigateContexts, navigateParams } = model;
|
|
147
|
+
let selfContext = {};
|
|
148
|
+
if (navigateContexts && data) {
|
|
149
|
+
selfContext = convertNavData(navigateContexts, data, params, context);
|
|
150
|
+
}
|
|
151
|
+
const _context = Object.assign(context.clone(), selfContext);
|
|
152
|
+
let _params = {};
|
|
153
|
+
if (navigateParams && data) {
|
|
154
|
+
_params = convertNavData(navigateParams, data, params, context);
|
|
155
|
+
}
|
|
156
|
+
return { context: _context, params: _params };
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 执行表单项更新
|
|
160
|
+
*
|
|
161
|
+
* @param {IDEFormButton} model
|
|
162
|
+
* @param {MouseEvent} [event]
|
|
163
|
+
* @return {*} {Promise<void>}
|
|
164
|
+
* @memberof FormButtonListController
|
|
165
|
+
*/
|
|
166
|
+
async doFormItemUpdate(model, event) {
|
|
167
|
+
const { deformItemUpdateId, paramPickupAppViewId, actionType } = model;
|
|
168
|
+
if (!deformItemUpdateId || actionType !== 'FIUPDATE')
|
|
169
|
+
return;
|
|
170
|
+
if (paramPickupAppViewId) {
|
|
171
|
+
const { context, params } = this.handlePublicParams(model, this.data, this.context, this.params);
|
|
172
|
+
const res = await ibiz.commands.execute(OpenAppViewCommand.TAG, paramPickupAppViewId, context, params, { event, noWaitRoute: true });
|
|
173
|
+
if ((res === null || res === void 0 ? void 0 : res.ok) && res.data) {
|
|
174
|
+
this.data.srfactionparam = res.data;
|
|
175
|
+
await this.form.updateFormItem(deformItemUpdateId);
|
|
176
|
+
this.data.srfactionparam = undefined;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
await this.form.updateFormItem(deformItemUpdateId);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* 处理按钮点击
|
|
185
|
+
*
|
|
186
|
+
* @param {string} id
|
|
187
|
+
* @param {MouseEvent} [event]
|
|
188
|
+
* @return {*} {Promise<void>}
|
|
189
|
+
* @memberof FormButtonListController
|
|
190
|
+
*/
|
|
191
|
+
async handleClick(id, event) {
|
|
192
|
+
const action = this.getModelById(id);
|
|
193
|
+
if (!action)
|
|
194
|
+
return;
|
|
195
|
+
if (action.uiactionId) {
|
|
196
|
+
await this.doUIAction(action.uiactionId, action.appId, event);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
await this.doFormItemUpdate(action, event);
|
|
200
|
+
}
|
|
118
201
|
}
|
|
119
202
|
}
|
|
@@ -107,6 +107,13 @@ export declare class FormItemController extends FormDetailController<IDEFormItem
|
|
|
107
107
|
* @type {(number | undefined)}
|
|
108
108
|
*/
|
|
109
109
|
get dataType(): number | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* tips缓存标识
|
|
112
|
+
*
|
|
113
|
+
* @private
|
|
114
|
+
* @memberof FormItemController
|
|
115
|
+
*/
|
|
116
|
+
private TIPS_CHCHE;
|
|
110
117
|
/**
|
|
111
118
|
* 初始化
|
|
112
119
|
*
|
|
@@ -116,6 +123,13 @@ export declare class FormItemController extends FormDetailController<IDEFormItem
|
|
|
116
123
|
* @returns {*} {Promise<void>}
|
|
117
124
|
*/
|
|
118
125
|
protected onInit(): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* 初始化tips
|
|
128
|
+
*
|
|
129
|
+
* @protected
|
|
130
|
+
* @memberof FormItemController
|
|
131
|
+
*/
|
|
132
|
+
protected initTips(): void;
|
|
119
133
|
/**
|
|
120
134
|
* 初始化值规则
|
|
121
135
|
*
|
|
@@ -185,5 +199,12 @@ export declare class FormItemController extends FormDetailController<IDEFormItem
|
|
|
185
199
|
* @date 2024-08-06 10:03:26
|
|
186
200
|
*/
|
|
187
201
|
onClick(event?: MouseEvent, params?: IParams): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* 加载输入提示信息
|
|
204
|
+
*
|
|
205
|
+
* @return {*} {Promise<void>}
|
|
206
|
+
* @memberof FormItemController
|
|
207
|
+
*/
|
|
208
|
+
loadInputTip(): Promise<void>;
|
|
188
209
|
}
|
|
189
210
|
//# sourceMappingURL=form-item.controller.d.ts.map
|