@ibiz-template/runtime 0.4.10 → 0.4.12
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/dist/index.esm.js +996 -290
- package/dist/index.system.min.js +2 -2
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/controller/common/control/control.controller.d.ts +14 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +21 -0
- package/out/controller/common/control/md-control.controller.d.ts +9 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +20 -0
- package/out/controller/common/view/view.controller.d.ts +8 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +12 -4
- 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 +36 -38
- package/out/controller/control/form/edit-form/edit-form.service.d.ts +3 -2
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +11 -2
- package/out/controller/control/form/form/form.controller.d.ts +0 -7
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +0 -11
- package/out/controller/control/form/form/form.service.d.ts +24 -0
- package/out/controller/control/form/form/form.service.d.ts.map +1 -0
- package/out/controller/control/form/form/form.service.js +45 -0
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +8 -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 +14 -5
- 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 +1 -5
- package/out/controller/control/form/search-form/search-form.service.d.ts +4 -3
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +8 -3
- package/out/controller/control/gantt/gantt.controller.d.ts +55 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +150 -0
- package/out/controller/control/gantt/gantt.service.d.ts +69 -6
- package/out/controller/control/gantt/gantt.service.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.service.js +196 -5
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +10 -6
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts +8 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts.map +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.js +22 -7
- 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/controller/controller/control/i-control.controller.d.ts +14 -0
- package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-drbar.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-drbar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts +14 -0
- package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
- package/out/interface/controller/event/view/i-de-index-view.event.d.ts +12 -0
- package/out/interface/controller/event/view/i-de-index-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-de-index-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/control/i-control.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-control.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drbar.state.d.ts +28 -7
- package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-gantt.state.d.ts +94 -3
- package/out/interface/controller/state/control/i-gantt.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-de-index-view.state.d.ts +19 -0
- package/out/interface/controller/state/view/i-de-index-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-de-index-view.state.js +1 -0
- package/out/interface/controller/state/view/i-edit-view2.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-edit-view2.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-view.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/interface/service/service/i-auth.service.d.ts +3 -2
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -1
- package/out/register/helper/ui-action-register.d.ts.map +1 -1
- package/out/register/helper/ui-action-register.js +6 -1
- package/out/service/service/auth/v7-auth.service.d.ts +1 -1
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +12 -7
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +1 -8
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +5 -5
- package/out/service/utils/de-cache/de-cache.d.ts +19 -0
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +54 -4
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts +19 -0
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.js +14 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts +19 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.js +14 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts +9 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.js +19 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts +17 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.js +13 -0
- package/out/service/vo/gantt-node-data/index.d.ts +4 -0
- package/out/service/vo/gantt-node-data/index.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/index.js +3 -0
- package/out/service/vo/index.d.ts +1 -0
- package/out/service/vo/index.d.ts.map +1 -1
- package/out/service/vo/index.js +1 -0
- package/out/ui-action/provider/index.d.ts.map +1 -1
- package/out/ui-action/provider/index.js +4 -0
- package/out/ui-action/provider/loginout-ui-action-provider.d.ts +16 -0
- package/out/ui-action/provider/loginout-ui-action-provider.d.ts.map +1 -0
- package/out/ui-action/provider/loginout-ui-action-provider.js +25 -0
- package/out/utils/layout-panel-util/layout-panel-util.d.ts.map +1 -1
- package/out/utils/layout-panel-util/layout-panel-util.js +16 -2
- package/package.json +3 -3
- package/src/config/global-config.ts +1 -0
- package/src/controller/common/control/control.controller.ts +23 -0
- package/src/controller/common/control/md-control.controller.ts +21 -0
- package/src/controller/common/view/view.controller.ts +12 -5
- package/src/controller/control/form/edit-form/edit-form.controller.ts +59 -58
- package/src/controller/control/form/edit-form/edit-form.service.ts +11 -2
- package/src/controller/control/form/form/form.controller.ts +0 -14
- package/src/controller/control/form/form/form.service.ts +63 -0
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +1 -1
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +15 -5
- package/src/controller/control/form/search-form/search-form.controller.ts +1 -5
- package/src/controller/control/form/search-form/search-form.service.ts +8 -3
- package/src/controller/control/gantt/gantt.controller.ts +179 -1
- package/src/controller/control/gantt/gantt.service.ts +305 -6
- package/src/controller/control/search-bar/search-bar.controller.ts +11 -8
- package/src/controller/control/wizard-panel/wizard-panel.controller.ts +27 -7
- package/src/interface/common/i-global-config/i-global-view-config.ts +8 -0
- package/src/interface/controller/controller/control/i-control.controller.ts +16 -0
- package/src/interface/controller/controller/control/i-drbar.controller.ts +8 -0
- package/src/interface/controller/controller/view/i-view.controller.ts +16 -0
- package/src/interface/controller/event/view/i-de-index-view.event.ts +12 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/control/i-control.state.ts +9 -0
- package/src/interface/controller/state/control/i-drbar.state.ts +32 -8
- package/src/interface/controller/state/control/i-gantt.state.ts +106 -4
- package/src/interface/controller/state/view/i-de-index-view.state.ts +19 -0
- package/src/interface/controller/state/view/i-edit-view2.state.ts +10 -1
- package/src/interface/controller/state/view/i-view.state.ts +9 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/interface/service/service/i-auth.service.ts +3 -2
- package/src/register/helper/ui-action-register.ts +7 -1
- package/src/service/service/auth/v7-auth.service.ts +18 -8
- package/src/service/service/entity/de.service.ts +2 -1
- package/src/service/service/entity/method/de-action.ts +5 -4
- package/src/service/utils/de-cache/de-cache.ts +64 -3
- package/src/service/vo/gantt-node-data/gantt-code-list-node-data.ts +68 -0
- package/src/service/vo/gantt-node-data/gantt-data-set-node-data.ts +68 -0
- package/src/service/vo/gantt-node-data/gantt-node-data-util.ts +26 -0
- package/src/service/vo/gantt-node-data/gantt-static-node-data.ts +50 -0
- package/src/service/vo/gantt-node-data/index.ts +3 -0
- package/src/service/vo/index.ts +1 -0
- package/src/ui-action/provider/index.ts +4 -0
- package/src/ui-action/provider/loginout-ui-action-provider.ts +31 -0
- package/src/utils/layout-panel-util/layout-panel-util.ts +17 -2
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,8 @@ var GlobalConfig = class {
|
|
|
4
4
|
// 全局视图配置
|
|
5
5
|
this.view = {
|
|
6
6
|
enableDataInfoBar: true,
|
|
7
|
-
expCacheMode: "TABEXPPANEL:"
|
|
7
|
+
expCacheMode: "TABEXPPANEL:",
|
|
8
|
+
noNavTabs: false
|
|
8
9
|
};
|
|
9
10
|
// 全局表格配置
|
|
10
11
|
this.grid = {
|
|
@@ -75,7 +76,7 @@ var RegisterCenter = class {
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
// src/command/app/app-func/app-func.ts
|
|
78
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
79
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
79
80
|
|
|
80
81
|
// src/utils/handlebars/utils/helper/helper.ts
|
|
81
82
|
var HelperUtil = class {
|
|
@@ -2028,10 +2029,20 @@ var LayoutPanelUtil = class {
|
|
|
2028
2029
|
} else if (mainMenuAlign) {
|
|
2029
2030
|
exTag = mainMenuAlign.toUpperCase();
|
|
2030
2031
|
}
|
|
2032
|
+
let key = "";
|
|
2031
2033
|
if (exTag !== "") {
|
|
2032
|
-
|
|
2034
|
+
key = "".concat(viewType, "_").concat(viewStyle, "_").concat(exTag);
|
|
2035
|
+
} else {
|
|
2036
|
+
key = "".concat(viewType, "_").concat(viewStyle);
|
|
2037
|
+
}
|
|
2038
|
+
if (ibiz.config.view.noNavTabs && [
|
|
2039
|
+
"APPINDEXVIEW_DEFAULT",
|
|
2040
|
+
"APPINDEXVIEW_DEFAULT_LEFT",
|
|
2041
|
+
"APPINDEXVIEW_DEFAULT_TOP"
|
|
2042
|
+
].includes(key)) {
|
|
2043
|
+
key += "_NO_NAV";
|
|
2033
2044
|
}
|
|
2034
|
-
return
|
|
2045
|
+
return key;
|
|
2035
2046
|
}
|
|
2036
2047
|
};
|
|
2037
2048
|
|
|
@@ -2721,7 +2732,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
2721
2732
|
}
|
|
2722
2733
|
|
|
2723
2734
|
// src/command/app/open-app-view/open-app-view.ts
|
|
2724
|
-
import { ModelError as ModelError14, RuntimeError as
|
|
2735
|
+
import { ModelError as ModelError14, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
2725
2736
|
import { clone as clone14 } from "ramda";
|
|
2726
2737
|
|
|
2727
2738
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
@@ -3445,7 +3456,7 @@ function getProvider8(key) {
|
|
|
3445
3456
|
}
|
|
3446
3457
|
async function getUIActionProvider(model) {
|
|
3447
3458
|
let provider;
|
|
3448
|
-
const { uiactionMode, sysPFPluginId, appId } = model;
|
|
3459
|
+
const { uiactionMode, sysPFPluginId, appId, uiactionTag } = model;
|
|
3449
3460
|
if (sysPFPluginId) {
|
|
3450
3461
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
3451
3462
|
if (pluginKey) {
|
|
@@ -3457,6 +3468,10 @@ async function getUIActionProvider(model) {
|
|
|
3457
3468
|
return provider;
|
|
3458
3469
|
}
|
|
3459
3470
|
}
|
|
3471
|
+
provider = getProvider8("".concat(uiactionMode, "_").concat(uiactionTag));
|
|
3472
|
+
if (provider) {
|
|
3473
|
+
return provider;
|
|
3474
|
+
}
|
|
3460
3475
|
provider = getProvider8(uiactionMode);
|
|
3461
3476
|
if (!provider) {
|
|
3462
3477
|
throw new RuntimeError6("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -4223,6 +4238,7 @@ var DynamicCodeListCache = class {
|
|
|
4223
4238
|
// src/service/utils/de-cache/de-cache.ts
|
|
4224
4239
|
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4225
4240
|
import { createUUID } from "qx-util";
|
|
4241
|
+
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
4226
4242
|
|
|
4227
4243
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
4228
4244
|
import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
@@ -4246,7 +4262,8 @@ function isExistSessionId(funcName, context) {
|
|
|
4246
4262
|
|
|
4247
4263
|
// src/service/utils/de-cache/de-cache.ts
|
|
4248
4264
|
var DECache = class {
|
|
4249
|
-
constructor() {
|
|
4265
|
+
constructor(entity) {
|
|
4266
|
+
this.entity = entity;
|
|
4250
4267
|
/**
|
|
4251
4268
|
* 数据缓存
|
|
4252
4269
|
*
|
|
@@ -4256,6 +4273,18 @@ var DECache = class {
|
|
|
4256
4273
|
*/
|
|
4257
4274
|
this.cacheMap = /* @__PURE__ */ new Map();
|
|
4258
4275
|
}
|
|
4276
|
+
/**
|
|
4277
|
+
* 是否是联合主键
|
|
4278
|
+
* @author lxm
|
|
4279
|
+
* @date 2023-12-12 02:47:18
|
|
4280
|
+
* @readonly
|
|
4281
|
+
* @protected
|
|
4282
|
+
* @type {boolean}
|
|
4283
|
+
*/
|
|
4284
|
+
get isUnionKey() {
|
|
4285
|
+
var _a;
|
|
4286
|
+
return !!((_a = this.entity.unionKeyValueAppDEFieldIds) == null ? void 0 : _a.length);
|
|
4287
|
+
}
|
|
4259
4288
|
/**
|
|
4260
4289
|
* 强制设置数据,忽略其他逻辑
|
|
4261
4290
|
*
|
|
@@ -4307,6 +4336,14 @@ var DECache = class {
|
|
|
4307
4336
|
* @memberof EntityCache
|
|
4308
4337
|
*/
|
|
4309
4338
|
add(context, entity) {
|
|
4339
|
+
if (this.isUnionKey) {
|
|
4340
|
+
this.calcUnionKey(entity);
|
|
4341
|
+
if (this.checkData(context, entity.srfkey)) {
|
|
4342
|
+
throw new RuntimeError13(
|
|
4343
|
+
"\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4344
|
+
);
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4310
4347
|
try {
|
|
4311
4348
|
isExistSessionId("add", context);
|
|
4312
4349
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
@@ -4351,16 +4388,25 @@ var DECache = class {
|
|
|
4351
4388
|
* @memberof EntityCache
|
|
4352
4389
|
*/
|
|
4353
4390
|
update(context, entity) {
|
|
4391
|
+
const oldKey = entity.srfkey;
|
|
4392
|
+
if (this.isUnionKey) {
|
|
4393
|
+
this.calcUnionKey(entity);
|
|
4394
|
+
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
4395
|
+
throw new RuntimeError13(
|
|
4396
|
+
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4397
|
+
);
|
|
4398
|
+
}
|
|
4399
|
+
}
|
|
4354
4400
|
try {
|
|
4355
4401
|
isExistSessionId("update", context);
|
|
4356
4402
|
isExistSrfKey("update", entity);
|
|
4357
4403
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4358
4404
|
const map = this.getCacheByTag(context);
|
|
4359
|
-
const data = map.get(
|
|
4405
|
+
const data = map.get(oldKey);
|
|
4360
4406
|
if (data) {
|
|
4361
4407
|
data.assign(entity);
|
|
4362
|
-
map.set(
|
|
4363
|
-
ibiz.log.warn("update",
|
|
4408
|
+
map.set(oldKey, data);
|
|
4409
|
+
ibiz.log.warn("update", oldKey, entity);
|
|
4364
4410
|
return clone4(data);
|
|
4365
4411
|
}
|
|
4366
4412
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
@@ -4583,6 +4629,27 @@ var DECache = class {
|
|
|
4583
4629
|
}
|
|
4584
4630
|
return this.cacheMap.get(tag);
|
|
4585
4631
|
}
|
|
4632
|
+
/**
|
|
4633
|
+
* 根据联合键值计算主键并赋值
|
|
4634
|
+
* @author lxm
|
|
4635
|
+
* @date 2023-12-12 03:06:30
|
|
4636
|
+
* @param {(IDataEntity | IDataEntity[])} data 需要计算的数据或数据集合
|
|
4637
|
+
*/
|
|
4638
|
+
calcUnionKey(data) {
|
|
4639
|
+
const unionKeys = this.entity.unionKeyValueAppDEFieldIds.map(
|
|
4640
|
+
(id) => {
|
|
4641
|
+
const appField = findModelChild(this.entity.appDEFields || [], id);
|
|
4642
|
+
return appField.codeName.toLowerCase();
|
|
4643
|
+
}
|
|
4644
|
+
);
|
|
4645
|
+
const unionValues = unionKeys.map((key) => {
|
|
4646
|
+
if (isNil5(data[key])) {
|
|
4647
|
+
return "__empty__";
|
|
4648
|
+
}
|
|
4649
|
+
return data[key];
|
|
4650
|
+
});
|
|
4651
|
+
data.srfkey = unionValues.join("||");
|
|
4652
|
+
}
|
|
4586
4653
|
};
|
|
4587
4654
|
|
|
4588
4655
|
// src/service/utils/res-path/res-path.ts
|
|
@@ -4737,7 +4804,7 @@ function fieldValueToBoolean(value) {
|
|
|
4737
4804
|
}
|
|
4738
4805
|
|
|
4739
4806
|
// src/service/service/code-list/code-list.service.ts
|
|
4740
|
-
import { RuntimeError as
|
|
4807
|
+
import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
4741
4808
|
var CodeListService = class {
|
|
4742
4809
|
constructor(appModel) {
|
|
4743
4810
|
this.appModel = appModel;
|
|
@@ -4884,7 +4951,7 @@ var CodeListService = class {
|
|
|
4884
4951
|
async get(tag, context, params) {
|
|
4885
4952
|
const codeList = this.allCodeLists.get(tag);
|
|
4886
4953
|
if (!codeList) {
|
|
4887
|
-
throw new
|
|
4954
|
+
throw new RuntimeError14("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
4888
4955
|
}
|
|
4889
4956
|
if (codeList.codeListType === "STATIC") {
|
|
4890
4957
|
return this.getStatic(codeList);
|
|
@@ -5006,11 +5073,11 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
5006
5073
|
// src/service/service/entity/de.service.ts
|
|
5007
5074
|
import {
|
|
5008
5075
|
ModelError as ModelError5,
|
|
5009
|
-
RuntimeError as
|
|
5076
|
+
RuntimeError as RuntimeError16
|
|
5010
5077
|
} from "@ibiz-template/core";
|
|
5011
5078
|
|
|
5012
5079
|
// src/service/service/work-flow/work-flow.service.ts
|
|
5013
|
-
import { RuntimeError as
|
|
5080
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
5014
5081
|
var WorkFlowService = class {
|
|
5015
5082
|
/**
|
|
5016
5083
|
* Creates an instance of WorkFlowService.
|
|
@@ -5330,7 +5397,7 @@ var WorkFlowService = class {
|
|
|
5330
5397
|
case "sendcopy":
|
|
5331
5398
|
return this.wfSendCopy(context, params, data);
|
|
5332
5399
|
default: {
|
|
5333
|
-
throw new
|
|
5400
|
+
throw new RuntimeError15("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
|
|
5334
5401
|
}
|
|
5335
5402
|
}
|
|
5336
5403
|
}
|
|
@@ -5389,14 +5456,7 @@ var DEService = class {
|
|
|
5389
5456
|
* @type {Map<string, Method>}
|
|
5390
5457
|
*/
|
|
5391
5458
|
this.methodMap = /* @__PURE__ */ new Map();
|
|
5392
|
-
|
|
5393
|
-
* 数据缓存
|
|
5394
|
-
*
|
|
5395
|
-
* @author chitanda
|
|
5396
|
-
* @date 2022-08-18 19:08:40
|
|
5397
|
-
* @type {DECache}
|
|
5398
|
-
*/
|
|
5399
|
-
this.local = new DECache();
|
|
5459
|
+
this.local = new DECache(model);
|
|
5400
5460
|
this.configCache = new ConfigService(
|
|
5401
5461
|
model.appId,
|
|
5402
5462
|
"PSAppDataEntity",
|
|
@@ -5445,7 +5505,7 @@ var DEService = class {
|
|
|
5445
5505
|
if (method) {
|
|
5446
5506
|
return method.exec(context, params, params2);
|
|
5447
5507
|
}
|
|
5448
|
-
throw new
|
|
5508
|
+
throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
5449
5509
|
}
|
|
5450
5510
|
getDraft(context, params, params2) {
|
|
5451
5511
|
return this.exec("GetDraft", context, params, params2);
|
|
@@ -5499,7 +5559,7 @@ var DEService = class {
|
|
|
5499
5559
|
if (method) {
|
|
5500
5560
|
return method.exec(context, params, params2);
|
|
5501
5561
|
}
|
|
5502
|
-
throw new
|
|
5562
|
+
throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
5503
5563
|
}
|
|
5504
5564
|
/**
|
|
5505
5565
|
* 实体级别 AI 聊天会话
|
|
@@ -5868,7 +5928,7 @@ var ControlService = class {
|
|
|
5868
5928
|
};
|
|
5869
5929
|
|
|
5870
5930
|
// src/service/service/control/md-control.service.ts
|
|
5871
|
-
import { RuntimeError as
|
|
5931
|
+
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
5872
5932
|
import { isArray as isArray3 } from "qx-util";
|
|
5873
5933
|
var MDControlService = class extends ControlService {
|
|
5874
5934
|
/**
|
|
@@ -5977,7 +6037,7 @@ var MDControlService = class extends ControlService {
|
|
|
5977
6037
|
* @returns {*} {Promise<IHttpResponse>}
|
|
5978
6038
|
*/
|
|
5979
6039
|
async exportData(_dataExport, _context, _params = {}) {
|
|
5980
|
-
throw new
|
|
6040
|
+
throw new RuntimeError17("\u672A\u5B9E\u73B0");
|
|
5981
6041
|
}
|
|
5982
6042
|
/**
|
|
5983
6043
|
* 处理响应
|
|
@@ -6012,7 +6072,7 @@ var MDControlService = class extends ControlService {
|
|
|
6012
6072
|
};
|
|
6013
6073
|
|
|
6014
6074
|
// src/service/service/authority/authority.service.ts
|
|
6015
|
-
import { RuntimeError as
|
|
6075
|
+
import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
6016
6076
|
|
|
6017
6077
|
// src/service/service/authority/de-authority.service.ts
|
|
6018
6078
|
var DeAuthorityService = class {
|
|
@@ -6148,7 +6208,7 @@ var AuthorityService = class {
|
|
|
6148
6208
|
this.appModel.appId
|
|
6149
6209
|
);
|
|
6150
6210
|
if (!entityModel) {
|
|
6151
|
-
throw new
|
|
6211
|
+
throw new RuntimeError18("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
6152
6212
|
}
|
|
6153
6213
|
const constructor = this.constructorCache.get(id);
|
|
6154
6214
|
let service;
|
|
@@ -6219,21 +6279,24 @@ var AuthorityService = class {
|
|
|
6219
6279
|
import { CoreConst } from "@ibiz-template/core";
|
|
6220
6280
|
import { clearCookie, getCookie, setCookie } from "qx-util";
|
|
6221
6281
|
var V7AuthService = class {
|
|
6222
|
-
async login(
|
|
6282
|
+
async login(loginName, password, remember) {
|
|
6223
6283
|
try {
|
|
6224
6284
|
const res = await ibiz.net.post("/v7/login", {
|
|
6225
|
-
loginname,
|
|
6285
|
+
loginname: loginName,
|
|
6226
6286
|
password,
|
|
6227
|
-
rememberme
|
|
6287
|
+
rememberme: remember
|
|
6228
6288
|
});
|
|
6229
6289
|
const { data } = res;
|
|
6230
6290
|
if (data && data.token) {
|
|
6231
|
-
|
|
6291
|
+
if (remember) {
|
|
6292
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", 7, true);
|
|
6293
|
+
}
|
|
6294
|
+
setCookie(CoreConst.TOKEN, data.token, remember ? 7 : 0, true);
|
|
6232
6295
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
6233
6296
|
setCookie(
|
|
6234
6297
|
CoreConst.TOKEN_EXPIRES,
|
|
6235
6298
|
"".concat(expiredDate),
|
|
6236
|
-
|
|
6299
|
+
remember ? 7 : 0,
|
|
6237
6300
|
true
|
|
6238
6301
|
);
|
|
6239
6302
|
}
|
|
@@ -6251,6 +6314,7 @@ var V7AuthService = class {
|
|
|
6251
6314
|
await ibiz.net.get("/v7/logout");
|
|
6252
6315
|
clearCookie(CoreConst.TOKEN);
|
|
6253
6316
|
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
6317
|
+
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
6254
6318
|
return true;
|
|
6255
6319
|
} catch (err) {
|
|
6256
6320
|
ibiz.notification.error({
|
|
@@ -6263,6 +6327,7 @@ var V7AuthService = class {
|
|
|
6263
6327
|
async extendLogin() {
|
|
6264
6328
|
const token = getCookie(CoreConst.TOKEN);
|
|
6265
6329
|
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
6330
|
+
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
6266
6331
|
if (token && expirein) {
|
|
6267
6332
|
let wait = Number(expirein) - (/* @__PURE__ */ new Date()).getTime();
|
|
6268
6333
|
const early = 5 * 60 * 1e3;
|
|
@@ -6270,9 +6335,14 @@ var V7AuthService = class {
|
|
|
6270
6335
|
setTimeout(async () => {
|
|
6271
6336
|
const res = await ibiz.net.get("/uaa/refreshtoken2");
|
|
6272
6337
|
if (res.ok) {
|
|
6273
|
-
setCookie(CoreConst.TOKEN, res.data.token, 0, true);
|
|
6338
|
+
setCookie(CoreConst.TOKEN, res.data.token, remember ? 7 : 0, true);
|
|
6274
6339
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
6275
|
-
setCookie(
|
|
6340
|
+
setCookie(
|
|
6341
|
+
CoreConst.TOKEN_EXPIRES,
|
|
6342
|
+
"".concat(expiredDate),
|
|
6343
|
+
remember ? 7 : 0,
|
|
6344
|
+
true
|
|
6345
|
+
);
|
|
6276
6346
|
}
|
|
6277
6347
|
this.extendLogin();
|
|
6278
6348
|
}, wait);
|
|
@@ -6312,8 +6382,9 @@ var AsyncActionService = class {
|
|
|
6312
6382
|
|
|
6313
6383
|
// src/service/service/entity/method/de-action.ts
|
|
6314
6384
|
import {
|
|
6385
|
+
HttpError as HttpError4,
|
|
6315
6386
|
HttpResponse as HttpResponse3,
|
|
6316
|
-
RuntimeError as
|
|
6387
|
+
RuntimeError as RuntimeError20,
|
|
6317
6388
|
RuntimeModelError as RuntimeModelError19
|
|
6318
6389
|
} from "@ibiz-template/core";
|
|
6319
6390
|
import { isArray as isArray7, isNil as isNil10 } from "lodash-es";
|
|
@@ -6907,7 +6978,7 @@ var Method = class {
|
|
|
6907
6978
|
};
|
|
6908
6979
|
|
|
6909
6980
|
// src/de-logic/index.ts
|
|
6910
|
-
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as
|
|
6981
|
+
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
6911
6982
|
import { isArray as isArray6 } from "lodash-es";
|
|
6912
6983
|
import { clone as clone12 } from "ramda";
|
|
6913
6984
|
|
|
@@ -7960,7 +8031,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
7960
8031
|
context.srfappid
|
|
7961
8032
|
);
|
|
7962
8033
|
if (!deLogic) {
|
|
7963
|
-
throw new
|
|
8034
|
+
throw new RuntimeError19("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
7964
8035
|
}
|
|
7965
8036
|
return execDELogic(deLogic, context, data, params);
|
|
7966
8037
|
}
|
|
@@ -8119,7 +8190,7 @@ var DEActionMethod = class extends Method {
|
|
|
8119
8190
|
*/
|
|
8120
8191
|
async create(context, data, params) {
|
|
8121
8192
|
if (!data) {
|
|
8122
|
-
throw new
|
|
8193
|
+
throw new RuntimeError20("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8123
8194
|
}
|
|
8124
8195
|
if (this.isLocalMode) {
|
|
8125
8196
|
return this.createTemp(context, this.createEntity(data));
|
|
@@ -8161,7 +8232,7 @@ var DEActionMethod = class extends Method {
|
|
|
8161
8232
|
*/
|
|
8162
8233
|
async update(context, data, params) {
|
|
8163
8234
|
if (!data) {
|
|
8164
|
-
throw new
|
|
8235
|
+
throw new RuntimeError20("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8165
8236
|
}
|
|
8166
8237
|
if (this.isLocalMode) {
|
|
8167
8238
|
return this.updateTemp(context, this.createEntity(data));
|
|
@@ -8237,7 +8308,7 @@ var DEActionMethod = class extends Method {
|
|
|
8237
8308
|
}
|
|
8238
8309
|
return new HttpResponse3(resultData);
|
|
8239
8310
|
} catch (err) {
|
|
8240
|
-
|
|
8311
|
+
throw new HttpError4(err);
|
|
8241
8312
|
}
|
|
8242
8313
|
}
|
|
8243
8314
|
/**
|
|
@@ -8284,7 +8355,7 @@ var DEActionMethod = class extends Method {
|
|
|
8284
8355
|
}
|
|
8285
8356
|
return new HttpResponse3(data, 500);
|
|
8286
8357
|
} catch (err) {
|
|
8287
|
-
|
|
8358
|
+
throw new HttpError4(err);
|
|
8288
8359
|
}
|
|
8289
8360
|
}
|
|
8290
8361
|
/**
|
|
@@ -8313,7 +8384,7 @@ var DEActionMethod = class extends Method {
|
|
|
8313
8384
|
}
|
|
8314
8385
|
return new HttpResponse3(resultData, 500);
|
|
8315
8386
|
} catch (err) {
|
|
8316
|
-
|
|
8387
|
+
throw new HttpError4(err);
|
|
8317
8388
|
}
|
|
8318
8389
|
}
|
|
8319
8390
|
/**
|
|
@@ -8340,7 +8411,7 @@ var DEActionMethod = class extends Method {
|
|
|
8340
8411
|
}
|
|
8341
8412
|
return new HttpResponse3(data, 500);
|
|
8342
8413
|
} catch (err) {
|
|
8343
|
-
|
|
8414
|
+
throw new HttpError4(err);
|
|
8344
8415
|
}
|
|
8345
8416
|
}
|
|
8346
8417
|
/**
|
|
@@ -9062,6 +9133,122 @@ var ChartData = class {
|
|
|
9062
9133
|
}
|
|
9063
9134
|
};
|
|
9064
9135
|
|
|
9136
|
+
// src/service/vo/gantt-node-data/gantt-node-data-util.ts
|
|
9137
|
+
var calcDataItemValue = (fieldCodeName, nodeModel, data = {}) => {
|
|
9138
|
+
let result = "";
|
|
9139
|
+
if (!fieldCodeName || !nodeModel.detreeNodeDataItems) {
|
|
9140
|
+
return result;
|
|
9141
|
+
}
|
|
9142
|
+
const targetTreeNodeDataItem = nodeModel.detreeNodeDataItems.find((nodeDataItem) => {
|
|
9143
|
+
return nodeDataItem.id === fieldCodeName;
|
|
9144
|
+
});
|
|
9145
|
+
if (targetTreeNodeDataItem && targetTreeNodeDataItem.appDEFieldId) {
|
|
9146
|
+
result = data[targetTreeNodeDataItem.appDEFieldId];
|
|
9147
|
+
}
|
|
9148
|
+
return result;
|
|
9149
|
+
};
|
|
9150
|
+
|
|
9151
|
+
// src/service/vo/gantt-node-data/gantt-static-node-data.ts
|
|
9152
|
+
var GanttStaticNodeData = class extends TreeStaticNodeData {
|
|
9153
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9154
|
+
super(nodeModel, parentNodeData, opts);
|
|
9155
|
+
this.sndataIteValue = calcDataItemValue(model.sndataItemName, nodeModel);
|
|
9156
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9157
|
+
model.beginDataItemName,
|
|
9158
|
+
nodeModel
|
|
9159
|
+
);
|
|
9160
|
+
this.endDataItemValue = calcDataItemValue(model.endDataItemName, nodeModel);
|
|
9161
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9162
|
+
model.prevDataItemName,
|
|
9163
|
+
nodeModel
|
|
9164
|
+
);
|
|
9165
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9166
|
+
model.finishDataItemName,
|
|
9167
|
+
nodeModel
|
|
9168
|
+
);
|
|
9169
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9170
|
+
model.totalDataItemName,
|
|
9171
|
+
nodeModel
|
|
9172
|
+
);
|
|
9173
|
+
}
|
|
9174
|
+
};
|
|
9175
|
+
|
|
9176
|
+
// src/service/vo/gantt-node-data/gantt-data-set-node-data.ts
|
|
9177
|
+
var GanttDataSetNodeData = class extends TreeDataSetNodeData {
|
|
9178
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9179
|
+
super(nodeModel, parentNodeData, opts);
|
|
9180
|
+
const { data } = opts;
|
|
9181
|
+
this.sndataIteValue = calcDataItemValue(
|
|
9182
|
+
model.sndataItemName,
|
|
9183
|
+
nodeModel,
|
|
9184
|
+
data
|
|
9185
|
+
);
|
|
9186
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9187
|
+
model.beginDataItemName,
|
|
9188
|
+
nodeModel,
|
|
9189
|
+
data
|
|
9190
|
+
);
|
|
9191
|
+
this.endDataItemValue = calcDataItemValue(
|
|
9192
|
+
model.endDataItemName,
|
|
9193
|
+
nodeModel,
|
|
9194
|
+
data
|
|
9195
|
+
);
|
|
9196
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9197
|
+
model.prevDataItemName,
|
|
9198
|
+
nodeModel,
|
|
9199
|
+
data
|
|
9200
|
+
);
|
|
9201
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9202
|
+
model.finishDataItemName,
|
|
9203
|
+
nodeModel,
|
|
9204
|
+
data
|
|
9205
|
+
);
|
|
9206
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9207
|
+
model.totalDataItemName,
|
|
9208
|
+
nodeModel,
|
|
9209
|
+
data
|
|
9210
|
+
);
|
|
9211
|
+
}
|
|
9212
|
+
};
|
|
9213
|
+
|
|
9214
|
+
// src/service/vo/gantt-node-data/gantt-code-list-node-data.ts
|
|
9215
|
+
var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
9216
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9217
|
+
super(nodeModel, parentNodeData, opts);
|
|
9218
|
+
const { data } = opts;
|
|
9219
|
+
this.sndataIteValue = calcDataItemValue(
|
|
9220
|
+
model.sndataItemName,
|
|
9221
|
+
nodeModel,
|
|
9222
|
+
data
|
|
9223
|
+
);
|
|
9224
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9225
|
+
model.beginDataItemName,
|
|
9226
|
+
nodeModel,
|
|
9227
|
+
data
|
|
9228
|
+
);
|
|
9229
|
+
this.endDataItemValue = calcDataItemValue(
|
|
9230
|
+
model.endDataItemName,
|
|
9231
|
+
nodeModel,
|
|
9232
|
+
data
|
|
9233
|
+
);
|
|
9234
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9235
|
+
model.prevDataItemName,
|
|
9236
|
+
nodeModel,
|
|
9237
|
+
data
|
|
9238
|
+
);
|
|
9239
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9240
|
+
model.finishDataItemName,
|
|
9241
|
+
nodeModel,
|
|
9242
|
+
data
|
|
9243
|
+
);
|
|
9244
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9245
|
+
model.totalDataItemName,
|
|
9246
|
+
nodeModel,
|
|
9247
|
+
data
|
|
9248
|
+
);
|
|
9249
|
+
}
|
|
9250
|
+
};
|
|
9251
|
+
|
|
9065
9252
|
// src/service/mqtt/mqtt.service.ts
|
|
9066
9253
|
import { QXEvent as QXEvent3, createUUID as createUUID5, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
9067
9254
|
var MqttService = class {
|
|
@@ -9156,7 +9343,7 @@ var MqttService = class {
|
|
|
9156
9343
|
};
|
|
9157
9344
|
|
|
9158
9345
|
// src/service/de-service-util.ts
|
|
9159
|
-
import { RuntimeError as
|
|
9346
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9160
9347
|
var DEServiceUtil = class {
|
|
9161
9348
|
/**
|
|
9162
9349
|
* Creates an instance of DEServiceUtil.
|
|
@@ -9211,7 +9398,7 @@ var DEServiceUtil = class {
|
|
|
9211
9398
|
this.appModel.appId
|
|
9212
9399
|
);
|
|
9213
9400
|
if (!entityModel) {
|
|
9214
|
-
throw new
|
|
9401
|
+
throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9215
9402
|
}
|
|
9216
9403
|
const constructor = this.constructorCache.get(id);
|
|
9217
9404
|
let service;
|
|
@@ -9274,7 +9461,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9274
9461
|
const context = clone14(_context);
|
|
9275
9462
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
9276
9463
|
if (!appView) {
|
|
9277
|
-
throw new
|
|
9464
|
+
throw new RuntimeError22("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
9278
9465
|
}
|
|
9279
9466
|
if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
|
|
9280
9467
|
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
@@ -9363,7 +9550,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9363
9550
|
*/
|
|
9364
9551
|
async openPopover(appView, event, context, params = {}) {
|
|
9365
9552
|
if (!event) {
|
|
9366
|
-
throw new
|
|
9553
|
+
throw new RuntimeError22("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
9367
9554
|
}
|
|
9368
9555
|
return ibiz.openView.popover(appView.id, event, context, params);
|
|
9369
9556
|
}
|
|
@@ -9419,7 +9606,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9419
9606
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
9420
9607
|
const appFunc = app.getAppFunc(appFuncId);
|
|
9421
9608
|
if (!appFunc) {
|
|
9422
|
-
throw new
|
|
9609
|
+
throw new RuntimeError23("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
|
|
9423
9610
|
}
|
|
9424
9611
|
const { navigateContexts, navigateParams, appFuncType } = appFunc;
|
|
9425
9612
|
const _context = context.clone();
|
|
@@ -9453,7 +9640,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9453
9640
|
*/
|
|
9454
9641
|
async openAppView(appFunc, context, params, opts) {
|
|
9455
9642
|
if (!appFunc.appViewId) {
|
|
9456
|
-
throw new
|
|
9643
|
+
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
|
|
9457
9644
|
}
|
|
9458
9645
|
return ibiz.commands.execute(
|
|
9459
9646
|
OpenAppViewCommand.TAG,
|
|
@@ -9487,7 +9674,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9487
9674
|
*/
|
|
9488
9675
|
openPdAppFunc(appFunc, context, params) {
|
|
9489
9676
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
9490
|
-
throw new
|
|
9677
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9491
9678
|
}
|
|
9492
9679
|
/**
|
|
9493
9680
|
* 执行 JavaScript 脚本
|
|
@@ -9501,7 +9688,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9501
9688
|
*/
|
|
9502
9689
|
executeJavaScript(appFunc, context, params) {
|
|
9503
9690
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
9504
|
-
throw new
|
|
9691
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9505
9692
|
}
|
|
9506
9693
|
/**
|
|
9507
9694
|
* 自定义应用功能
|
|
@@ -9515,7 +9702,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9515
9702
|
*/
|
|
9516
9703
|
custom(appFunc, context, params) {
|
|
9517
9704
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
9518
|
-
throw new
|
|
9705
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9519
9706
|
}
|
|
9520
9707
|
};
|
|
9521
9708
|
/**
|
|
@@ -9536,7 +9723,7 @@ function installCommand() {
|
|
|
9536
9723
|
}
|
|
9537
9724
|
|
|
9538
9725
|
// src/app-hub.ts
|
|
9539
|
-
import { RuntimeError as
|
|
9726
|
+
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
9540
9727
|
|
|
9541
9728
|
// src/application.ts
|
|
9542
9729
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -9728,7 +9915,7 @@ var Convert = class {
|
|
|
9728
9915
|
};
|
|
9729
9916
|
|
|
9730
9917
|
// src/hub/config/app-view-config-service.ts
|
|
9731
|
-
import { RuntimeError as
|
|
9918
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
9732
9919
|
var AppViewConfigService = class {
|
|
9733
9920
|
constructor() {
|
|
9734
9921
|
/**
|
|
@@ -9748,7 +9935,7 @@ var AppViewConfigService = class {
|
|
|
9748
9935
|
if (!this.viewConfigs.has(key)) {
|
|
9749
9936
|
const model = await ibiz.hub.getAppView(key);
|
|
9750
9937
|
if (!model) {
|
|
9751
|
-
throw new
|
|
9938
|
+
throw new RuntimeError24("\u89C6\u56FE[".concat(key, "]\u4E0D\u5B58\u5728"));
|
|
9752
9939
|
}
|
|
9753
9940
|
this.set(model.id, {
|
|
9754
9941
|
id: model.id,
|
|
@@ -9804,14 +9991,14 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
9804
9991
|
|
|
9805
9992
|
// src/controller/common/view/view.controller.ts
|
|
9806
9993
|
import { createUUID as createUUID7, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
9807
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
9994
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
9808
9995
|
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
9809
9996
|
|
|
9810
9997
|
// src/controller/utils/loading/loading.state.ts
|
|
9811
9998
|
import { NOOP } from "@ibiz-template/core";
|
|
9812
9999
|
|
|
9813
10000
|
// src/controller/utils/counter/counter.ts
|
|
9814
|
-
import { RuntimeError as
|
|
10001
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
9815
10002
|
var Counter = class {
|
|
9816
10003
|
/**
|
|
9817
10004
|
* Creates an instance of Counter.
|
|
@@ -9873,7 +10060,7 @@ var Counter = class {
|
|
|
9873
10060
|
return;
|
|
9874
10061
|
}
|
|
9875
10062
|
if (this.count === 0) {
|
|
9876
|
-
throw new
|
|
10063
|
+
throw new RuntimeError25("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
9877
10064
|
}
|
|
9878
10065
|
this.count -= 1;
|
|
9879
10066
|
if (this.count === 0) {
|
|
@@ -10450,7 +10637,7 @@ function getOriginData(data) {
|
|
|
10450
10637
|
}
|
|
10451
10638
|
|
|
10452
10639
|
// src/controller/utils/value-rule/value-rule.ts
|
|
10453
|
-
import { RuntimeError as
|
|
10640
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10454
10641
|
import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
|
|
10455
10642
|
import { isNil as isNil14 } from "ramda";
|
|
10456
10643
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -10500,7 +10687,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
10500
10687
|
deRule.groupCond
|
|
10501
10688
|
);
|
|
10502
10689
|
if (!isPast) {
|
|
10503
|
-
callback(new
|
|
10690
|
+
callback(new RuntimeError26(infoMessage || deRule.ruleInfo));
|
|
10504
10691
|
}
|
|
10505
10692
|
return true;
|
|
10506
10693
|
},
|
|
@@ -10570,7 +10757,7 @@ function generateEditorRules(editor) {
|
|
|
10570
10757
|
}
|
|
10571
10758
|
|
|
10572
10759
|
// src/controller/utils/value-ex/value-ex.ts
|
|
10573
|
-
import { RuntimeError as
|
|
10760
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
10574
10761
|
import { isNil as isNil15, mergeLeft } from "ramda";
|
|
10575
10762
|
var ValueExUtil = class {
|
|
10576
10763
|
/**
|
|
@@ -10602,7 +10789,7 @@ var ValueExUtil = class {
|
|
|
10602
10789
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
10603
10790
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
10604
10791
|
if (!objectNameField) {
|
|
10605
|
-
throw new
|
|
10792
|
+
throw new RuntimeError27("\u7F3A\u5C11objectNameField");
|
|
10606
10793
|
}
|
|
10607
10794
|
const textKey = objectNameField.toLowerCase();
|
|
10608
10795
|
if (valueType === "OBJECTS") {
|
|
@@ -10618,7 +10805,7 @@ var ValueExUtil = class {
|
|
|
10618
10805
|
};
|
|
10619
10806
|
|
|
10620
10807
|
// src/controller/utils/value-default/value-default.ts
|
|
10621
|
-
import { RuntimeError as
|
|
10808
|
+
import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
10622
10809
|
import dayjs from "dayjs";
|
|
10623
10810
|
import { createUUID as createUUID6 } from "qx-util";
|
|
10624
10811
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
@@ -10659,7 +10846,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10659
10846
|
case "SESSION":
|
|
10660
10847
|
case "APPLICATION":
|
|
10661
10848
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
10662
|
-
throw new
|
|
10849
|
+
throw new RuntimeError28("appdata.context\u4E0D\u5B58\u5728");
|
|
10663
10850
|
}
|
|
10664
10851
|
return ibiz.appData.context[defaultValue];
|
|
10665
10852
|
case "CONTEXT":
|
|
@@ -10673,7 +10860,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10673
10860
|
|
|
10674
10861
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
10675
10862
|
import {
|
|
10676
|
-
RuntimeError as
|
|
10863
|
+
RuntimeError as RuntimeError29
|
|
10677
10864
|
} from "@ibiz-template/core";
|
|
10678
10865
|
var asyncImportUrl = "asyncimportdata2";
|
|
10679
10866
|
var importUrl = "importdata2";
|
|
@@ -10727,11 +10914,11 @@ async function importData(file, appDataEntity, dataImport) {
|
|
|
10727
10914
|
}
|
|
10728
10915
|
async function exportData(header, data, fileName) {
|
|
10729
10916
|
if (!ibiz.util.getExcelUtil) {
|
|
10730
|
-
throw new
|
|
10917
|
+
throw new RuntimeError29("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
10731
10918
|
}
|
|
10732
10919
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
10733
10920
|
if (!exportExcel) {
|
|
10734
|
-
throw new
|
|
10921
|
+
throw new RuntimeError29("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
10735
10922
|
}
|
|
10736
10923
|
try {
|
|
10737
10924
|
exportExcel.exportJsonToExcel({
|
|
@@ -10957,7 +11144,7 @@ var BaseController = class {
|
|
|
10957
11144
|
};
|
|
10958
11145
|
|
|
10959
11146
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
10960
|
-
import { RuntimeError as
|
|
11147
|
+
import { RuntimeError as RuntimeError30, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
10961
11148
|
import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
|
|
10962
11149
|
var ViewMsgController = class _ViewMsgController {
|
|
10963
11150
|
constructor(msgGroupId) {
|
|
@@ -10983,7 +11170,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10983
11170
|
(item) => item.id === this.msgGroupId
|
|
10984
11171
|
);
|
|
10985
11172
|
if (!msgGroup) {
|
|
10986
|
-
throw new
|
|
11173
|
+
throw new RuntimeError30("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
10987
11174
|
}
|
|
10988
11175
|
this.msgGroup = msgGroup;
|
|
10989
11176
|
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
@@ -10997,7 +11184,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10997
11184
|
}
|
|
10998
11185
|
});
|
|
10999
11186
|
if (msgDetailsViewMsgIds.length) {
|
|
11000
|
-
throw new
|
|
11187
|
+
throw new RuntimeError30(
|
|
11001
11188
|
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
11002
11189
|
);
|
|
11003
11190
|
}
|
|
@@ -11200,7 +11387,6 @@ var ViewController = class extends BaseController {
|
|
|
11200
11387
|
* @type {boolean}
|
|
11201
11388
|
*/
|
|
11202
11389
|
this.isCloseView = false;
|
|
11203
|
-
this._isActive = true;
|
|
11204
11390
|
if (ctx) {
|
|
11205
11391
|
ctx.registerController(this.model.name, this);
|
|
11206
11392
|
}
|
|
@@ -11221,8 +11407,16 @@ var ViewController = class extends BaseController {
|
|
|
11221
11407
|
var _a;
|
|
11222
11408
|
return (_a = this.ctx.parent) == null ? void 0 : _a.view;
|
|
11223
11409
|
}
|
|
11410
|
+
/**
|
|
11411
|
+
* 当前是否为激活状态(缓存下的激活状态,一般与框架的生命周期相同)
|
|
11412
|
+
*
|
|
11413
|
+
* @author chitanda
|
|
11414
|
+
* @date 2023-12-13 11:12:48
|
|
11415
|
+
* @readonly
|
|
11416
|
+
* @type {boolean}
|
|
11417
|
+
*/
|
|
11224
11418
|
get isActive() {
|
|
11225
|
-
return this.
|
|
11419
|
+
return this.state.activated;
|
|
11226
11420
|
}
|
|
11227
11421
|
/**
|
|
11228
11422
|
* 视图重新激活
|
|
@@ -11231,7 +11425,7 @@ var ViewController = class extends BaseController {
|
|
|
11231
11425
|
* @date 2023-07-12 17:07:55
|
|
11232
11426
|
*/
|
|
11233
11427
|
onActivated() {
|
|
11234
|
-
this.
|
|
11428
|
+
this.state.activated = true;
|
|
11235
11429
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6FC0\u6D3B"));
|
|
11236
11430
|
}
|
|
11237
11431
|
/**
|
|
@@ -11241,7 +11435,7 @@ var ViewController = class extends BaseController {
|
|
|
11241
11435
|
* @date 2023-07-12 17:07:06
|
|
11242
11436
|
*/
|
|
11243
11437
|
onDeactivated() {
|
|
11244
|
-
this.
|
|
11438
|
+
this.state.activated = false;
|
|
11245
11439
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6682\u505C"));
|
|
11246
11440
|
}
|
|
11247
11441
|
/**
|
|
@@ -11302,6 +11496,7 @@ var ViewController = class extends BaseController {
|
|
|
11302
11496
|
}
|
|
11303
11497
|
initState() {
|
|
11304
11498
|
super.initState();
|
|
11499
|
+
this.state.activated = true;
|
|
11305
11500
|
this.state.isLoading = false;
|
|
11306
11501
|
this.state.caption = this.model.caption;
|
|
11307
11502
|
this.state.srfactiveviewdata = null;
|
|
@@ -11413,7 +11608,7 @@ var ViewController = class extends BaseController {
|
|
|
11413
11608
|
async callUIAction(key, args) {
|
|
11414
11609
|
const result = this.call(key, args);
|
|
11415
11610
|
if (result === void 0) {
|
|
11416
|
-
throw new
|
|
11611
|
+
throw new RuntimeError31("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11417
11612
|
}
|
|
11418
11613
|
return result;
|
|
11419
11614
|
}
|
|
@@ -11779,6 +11974,7 @@ var ControlController = class extends BaseController {
|
|
|
11779
11974
|
}
|
|
11780
11975
|
initState() {
|
|
11781
11976
|
super.initState();
|
|
11977
|
+
this.state.activated = true;
|
|
11782
11978
|
this.state.isLoading = false;
|
|
11783
11979
|
}
|
|
11784
11980
|
async onCreated() {
|
|
@@ -11879,6 +12075,26 @@ var ControlController = class extends BaseController {
|
|
|
11879
12075
|
this.state.isLoading = false;
|
|
11880
12076
|
this.ctx.endLoading();
|
|
11881
12077
|
}
|
|
12078
|
+
/**
|
|
12079
|
+
* 部件重新激活
|
|
12080
|
+
*
|
|
12081
|
+
* @author chitanda
|
|
12082
|
+
* @date 2023-07-12 17:07:55
|
|
12083
|
+
*/
|
|
12084
|
+
onActivated() {
|
|
12085
|
+
this.state.activated = true;
|
|
12086
|
+
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6FC0\u6D3B"));
|
|
12087
|
+
}
|
|
12088
|
+
/**
|
|
12089
|
+
* 部件暂时停用
|
|
12090
|
+
*
|
|
12091
|
+
* @author chitanda
|
|
12092
|
+
* @date 2023-07-12 17:07:06
|
|
12093
|
+
*/
|
|
12094
|
+
onDeactivated() {
|
|
12095
|
+
this.state.activated = false;
|
|
12096
|
+
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6682\u505C"));
|
|
12097
|
+
}
|
|
11882
12098
|
/**
|
|
11883
12099
|
* 处理数据能力方法通用参数,返回能力执行最终使用的参数
|
|
11884
12100
|
* @author lxm
|
|
@@ -12007,11 +12223,19 @@ var ControlController = class extends BaseController {
|
|
|
12007
12223
|
};
|
|
12008
12224
|
|
|
12009
12225
|
// src/controller/common/control/md-control.controller.ts
|
|
12010
|
-
import { isElementSame, RuntimeError as
|
|
12226
|
+
import { isElementSame, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
12011
12227
|
import { debounce } from "lodash-es";
|
|
12012
12228
|
var MDControlController = class extends ControlController {
|
|
12013
12229
|
constructor() {
|
|
12014
12230
|
super(...arguments);
|
|
12231
|
+
/**
|
|
12232
|
+
* 在未激活时记录是否有 command 数据变更事件,有就记录。等待激活时刷新
|
|
12233
|
+
*
|
|
12234
|
+
* @author chitanda
|
|
12235
|
+
* @date 2023-12-13 11:12:19
|
|
12236
|
+
* @protected
|
|
12237
|
+
*/
|
|
12238
|
+
this.commandDataChange = false;
|
|
12015
12239
|
/**
|
|
12016
12240
|
* 实体属性映射,key是id,value是name
|
|
12017
12241
|
* @author lxm
|
|
@@ -12075,7 +12299,18 @@ var MDControlController = class extends ControlController {
|
|
|
12075
12299
|
*/
|
|
12076
12300
|
onDataChange(msg) {
|
|
12077
12301
|
if (msg.data && msg.data.srfdecodename === this.dataEntity.codeName) {
|
|
12302
|
+
if (this.state.activated) {
|
|
12303
|
+
this.refresh();
|
|
12304
|
+
} else {
|
|
12305
|
+
this.commandDataChange = true;
|
|
12306
|
+
}
|
|
12307
|
+
}
|
|
12308
|
+
}
|
|
12309
|
+
onActivated() {
|
|
12310
|
+
super.onActivated();
|
|
12311
|
+
if (this.commandDataChange) {
|
|
12078
12312
|
this.refresh();
|
|
12313
|
+
this.commandDataChange = false;
|
|
12079
12314
|
}
|
|
12080
12315
|
}
|
|
12081
12316
|
/**
|
|
@@ -12200,7 +12435,7 @@ var MDControlController = class extends ControlController {
|
|
|
12200
12435
|
async remove(args) {
|
|
12201
12436
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12202
12437
|
if (!(data == null ? void 0 : data.length)) {
|
|
12203
|
-
throw new
|
|
12438
|
+
throw new RuntimeError32("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12204
12439
|
}
|
|
12205
12440
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12206
12441
|
const del = await ibiz.confirm.error({
|
|
@@ -12339,7 +12574,7 @@ var MDControlController = class extends ControlController {
|
|
|
12339
12574
|
(importItem) => importItem.id === dedataImportId
|
|
12340
12575
|
);
|
|
12341
12576
|
if (!dataImport) {
|
|
12342
|
-
throw new
|
|
12577
|
+
throw new RuntimeError32("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
12343
12578
|
}
|
|
12344
12579
|
let importName = "DataImport";
|
|
12345
12580
|
if (dataImport.enableCustomized) {
|
|
@@ -12373,7 +12608,7 @@ var MDControlController = class extends ControlController {
|
|
|
12373
12608
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
12374
12609
|
import {
|
|
12375
12610
|
findRecursiveChild,
|
|
12376
|
-
RuntimeError as
|
|
12611
|
+
RuntimeError as RuntimeError33,
|
|
12377
12612
|
RuntimeModelError as RuntimeModelError23
|
|
12378
12613
|
} from "@ibiz-template/core";
|
|
12379
12614
|
var AppMenuController = class extends ControlController {
|
|
@@ -12413,7 +12648,7 @@ var AppMenuController = class extends ControlController {
|
|
|
12413
12648
|
childrenFields: ["appMenuItems"]
|
|
12414
12649
|
});
|
|
12415
12650
|
if (!menuItem) {
|
|
12416
|
-
throw new
|
|
12651
|
+
throw new RuntimeError33("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
12417
12652
|
}
|
|
12418
12653
|
this.evt.emit("onClick", {
|
|
12419
12654
|
eventArg: id,
|
|
@@ -12504,7 +12739,7 @@ var AppMenuController = class extends ControlController {
|
|
|
12504
12739
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
12505
12740
|
import {
|
|
12506
12741
|
findRecursiveChild as findRecursiveChild2,
|
|
12507
|
-
RuntimeError as
|
|
12742
|
+
RuntimeError as RuntimeError34,
|
|
12508
12743
|
RuntimeModelError as RuntimeModelError24
|
|
12509
12744
|
} from "@ibiz-template/core";
|
|
12510
12745
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -12514,7 +12749,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
12514
12749
|
childrenFields: ["appMenuItems"]
|
|
12515
12750
|
});
|
|
12516
12751
|
if (!menuItem) {
|
|
12517
|
-
throw new
|
|
12752
|
+
throw new RuntimeError34("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
12518
12753
|
}
|
|
12519
12754
|
this.evt.emit("onClick", {
|
|
12520
12755
|
eventArg: id,
|
|
@@ -12542,7 +12777,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
12542
12777
|
import dayjs2 from "dayjs";
|
|
12543
12778
|
|
|
12544
12779
|
// src/controller/control/calendar/calendar.service.ts
|
|
12545
|
-
import { RuntimeError as
|
|
12780
|
+
import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
|
|
12546
12781
|
var CalendarService = class extends MDControlService {
|
|
12547
12782
|
/**
|
|
12548
12783
|
* 执行查询多条数据的方法
|
|
@@ -12592,11 +12827,11 @@ var CalendarService = class extends MDControlService {
|
|
|
12592
12827
|
setCalendarConfigData(items, index) {
|
|
12593
12828
|
const { sysCalendarItems } = this.model;
|
|
12594
12829
|
if (!sysCalendarItems) {
|
|
12595
|
-
throw new
|
|
12830
|
+
throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
12596
12831
|
}
|
|
12597
12832
|
const calendarItem = sysCalendarItems[index];
|
|
12598
12833
|
if (!calendarItem) {
|
|
12599
|
-
throw new
|
|
12834
|
+
throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
12600
12835
|
}
|
|
12601
12836
|
return items.map((item) => {
|
|
12602
12837
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -12810,11 +13045,11 @@ var CalendarController = class extends MDControlController {
|
|
|
12810
13045
|
};
|
|
12811
13046
|
|
|
12812
13047
|
// src/controller/control/chart/chart.controller.ts
|
|
12813
|
-
import { RuntimeError as
|
|
13048
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
12814
13049
|
|
|
12815
13050
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
12816
13051
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
12817
|
-
import { RuntimeError as
|
|
13052
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
12818
13053
|
|
|
12819
13054
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
12820
13055
|
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
@@ -13823,7 +14058,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
13823
14058
|
getChartDataByParams(params) {
|
|
13824
14059
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
13825
14060
|
if (!generator) {
|
|
13826
|
-
throw new
|
|
14061
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
13827
14062
|
}
|
|
13828
14063
|
return generator.getChartDataByParams(params);
|
|
13829
14064
|
}
|
|
@@ -13936,10 +14171,10 @@ var ChartController = class extends MDControlController {
|
|
|
13936
14171
|
*/
|
|
13937
14172
|
updateChart() {
|
|
13938
14173
|
if (!this.chart) {
|
|
13939
|
-
throw new
|
|
14174
|
+
throw new RuntimeError37("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
13940
14175
|
}
|
|
13941
14176
|
if (!this.options) {
|
|
13942
|
-
throw new
|
|
14177
|
+
throw new RuntimeError37("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
13943
14178
|
}
|
|
13944
14179
|
this.chart.setOption(this.options);
|
|
13945
14180
|
this.resizeChart();
|
|
@@ -13984,7 +14219,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
13984
14219
|
};
|
|
13985
14220
|
|
|
13986
14221
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
13987
|
-
import { recursiveIterate, RuntimeError as
|
|
14222
|
+
import { recursiveIterate, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
13988
14223
|
|
|
13989
14224
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
13990
14225
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
@@ -13994,7 +14229,7 @@ import { isArray as isArray9 } from "qx-util";
|
|
|
13994
14229
|
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
13995
14230
|
|
|
13996
14231
|
// src/ui-logic/index.ts
|
|
13997
|
-
import { RuntimeError as
|
|
14232
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
13998
14233
|
|
|
13999
14234
|
// src/ui-logic/ui-logic.ts
|
|
14000
14235
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
@@ -14545,7 +14780,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
14545
14780
|
};
|
|
14546
14781
|
|
|
14547
14782
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
14548
|
-
import { ModelError as ModelError21, RuntimeError as
|
|
14783
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
14549
14784
|
import { clone as clone18 } from "ramda";
|
|
14550
14785
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
14551
14786
|
async exec(ctx) {
|
|
@@ -14595,7 +14830,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14595
14830
|
setParamValue(nodeParam, ctx) {
|
|
14596
14831
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
14597
14832
|
if (!dstDEUILogicParamId) {
|
|
14598
|
-
throw new
|
|
14833
|
+
throw new RuntimeError38("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
14599
14834
|
}
|
|
14600
14835
|
let dstField = dstFieldName;
|
|
14601
14836
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -14712,7 +14947,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14712
14947
|
};
|
|
14713
14948
|
|
|
14714
14949
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
14715
|
-
import { RuntimeError as
|
|
14950
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
14716
14951
|
import { isFunction } from "lodash-es";
|
|
14717
14952
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
14718
14953
|
async exec(ctx) {
|
|
@@ -14729,14 +14964,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
14729
14964
|
}
|
|
14730
14965
|
const invokeParam = ctx.params[invokeParamId];
|
|
14731
14966
|
if (!invokeParam) {
|
|
14732
|
-
throw new
|
|
14967
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
14733
14968
|
}
|
|
14734
14969
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
14735
14970
|
if (!invokeCtrl) {
|
|
14736
|
-
throw new
|
|
14971
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
14737
14972
|
}
|
|
14738
14973
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
14739
|
-
throw new
|
|
14974
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
14740
14975
|
}
|
|
14741
14976
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
14742
14977
|
}
|
|
@@ -14962,16 +15197,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
14962
15197
|
};
|
|
14963
15198
|
|
|
14964
15199
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
14965
|
-
import { RuntimeError as
|
|
15200
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
14966
15201
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
14967
15202
|
async exec(_ctx) {
|
|
14968
15203
|
const { errorInfo } = this.model;
|
|
14969
|
-
throw new
|
|
15204
|
+
throw new RuntimeError40(errorInfo);
|
|
14970
15205
|
}
|
|
14971
15206
|
};
|
|
14972
15207
|
|
|
14973
15208
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
14974
|
-
import { RuntimeError as
|
|
15209
|
+
import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
14975
15210
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
14976
15211
|
async exec(ctx) {
|
|
14977
15212
|
ctx.isEndNode = true;
|
|
@@ -14987,18 +15222,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
14987
15222
|
}
|
|
14988
15223
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
14989
15224
|
if (!invokeCtrl) {
|
|
14990
|
-
throw new
|
|
15225
|
+
throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
14991
15226
|
}
|
|
14992
15227
|
const eventParam = ctx.params[eventParamId];
|
|
14993
15228
|
if (!eventParam) {
|
|
14994
|
-
throw new
|
|
15229
|
+
throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
14995
15230
|
}
|
|
14996
15231
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
14997
15232
|
}
|
|
14998
15233
|
};
|
|
14999
15234
|
|
|
15000
15235
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
15001
|
-
import { RuntimeError as
|
|
15236
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
15002
15237
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
15003
15238
|
async exec(ctx) {
|
|
15004
15239
|
const {
|
|
@@ -15018,7 +15253,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
15018
15253
|
}
|
|
15019
15254
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
15020
15255
|
if (!dstParam) {
|
|
15021
|
-
throw new
|
|
15256
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
15022
15257
|
}
|
|
15023
15258
|
const result = await execDELogicById(
|
|
15024
15259
|
dstAppDELogicId,
|
|
@@ -15342,7 +15577,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
15342
15577
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
15343
15578
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
15344
15579
|
if (!deUILogic) {
|
|
15345
|
-
throw new
|
|
15580
|
+
throw new RuntimeError43(
|
|
15346
15581
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
15347
15582
|
);
|
|
15348
15583
|
}
|
|
@@ -15355,7 +15590,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
15355
15590
|
}
|
|
15356
15591
|
|
|
15357
15592
|
// src/ui-action/uiaction-util.ts
|
|
15358
|
-
import { RuntimeError as
|
|
15593
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
15359
15594
|
var UIActionUtil = class {
|
|
15360
15595
|
/**
|
|
15361
15596
|
* 执行界面行为
|
|
@@ -15370,7 +15605,7 @@ var UIActionUtil = class {
|
|
|
15370
15605
|
static async exec(actionId, params, appId) {
|
|
15371
15606
|
const action = await getUIActionById(actionId, appId);
|
|
15372
15607
|
if (!action) {
|
|
15373
|
-
throw new
|
|
15608
|
+
throw new RuntimeError44("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
15374
15609
|
}
|
|
15375
15610
|
if (action.actionTarget === "SINGLEDATA") {
|
|
15376
15611
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -15783,7 +16018,7 @@ import {
|
|
|
15783
16018
|
StringUtil,
|
|
15784
16019
|
RuntimeModelError as RuntimeModelError48,
|
|
15785
16020
|
ModelError as ModelError25,
|
|
15786
|
-
RuntimeError as
|
|
16021
|
+
RuntimeError as RuntimeError45
|
|
15787
16022
|
} from "@ibiz-template/core";
|
|
15788
16023
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
15789
16024
|
async execAction(action, args) {
|
|
@@ -15893,7 +16128,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15893
16128
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
15894
16129
|
requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
15895
16130
|
} else {
|
|
15896
|
-
throw new
|
|
16131
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
15897
16132
|
}
|
|
15898
16133
|
const res = await ibiz.net.request(requestUrl, {
|
|
15899
16134
|
method: "get",
|
|
@@ -15920,10 +16155,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15920
16155
|
window.open(link, "_blank");
|
|
15921
16156
|
}
|
|
15922
16157
|
} else {
|
|
15923
|
-
throw new
|
|
16158
|
+
throw new RuntimeError45("\u6253\u5370\u5931\u8D25");
|
|
15924
16159
|
}
|
|
15925
16160
|
} else {
|
|
15926
|
-
throw new
|
|
16161
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
15927
16162
|
}
|
|
15928
16163
|
}
|
|
15929
16164
|
/**
|
|
@@ -15966,7 +16201,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15966
16201
|
refreshMode: 1
|
|
15967
16202
|
};
|
|
15968
16203
|
}
|
|
15969
|
-
throw new
|
|
16204
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
15970
16205
|
}
|
|
15971
16206
|
/**
|
|
15972
16207
|
* 执行导出行为
|
|
@@ -16017,10 +16252,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16017
16252
|
URL.revokeObjectURL(elink.href);
|
|
16018
16253
|
document.body.removeChild(elink);
|
|
16019
16254
|
} else {
|
|
16020
|
-
throw new
|
|
16255
|
+
throw new RuntimeError45("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
16021
16256
|
}
|
|
16022
16257
|
} else {
|
|
16023
|
-
throw new
|
|
16258
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
16024
16259
|
}
|
|
16025
16260
|
}
|
|
16026
16261
|
};
|
|
@@ -16045,6 +16280,23 @@ var WFWithdrawUIActionProvider = class extends UIActionProviderBase {
|
|
|
16045
16280
|
}
|
|
16046
16281
|
};
|
|
16047
16282
|
|
|
16283
|
+
// src/ui-action/provider/loginout-ui-action-provider.ts
|
|
16284
|
+
var LoginOutUIActionProvider = class extends UIActionProviderBase {
|
|
16285
|
+
async execAction(_action, _params) {
|
|
16286
|
+
const confirm = await ibiz.confirm.info({
|
|
16287
|
+
title: "\u786E\u8BA4\u9000\u51FA\u767B\u5F55",
|
|
16288
|
+
desc: "\u60A8\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F\u9000\u51FA\u540E\u60A8\u5C06\u65E0\u6CD5\u7EE7\u7EED\u8BBF\u95EE\u5DF2\u767B\u5F55\u72B6\u6001\u7684\u529F\u80FD\u548C\u4FE1\u606F\uFF0C\u8BF7\u786E\u4FDD\u60A8\u5DF2\u4FDD\u5B58\u6240\u6709\u672A\u5B8C\u6210\u7684\u64CD\u4F5C\u3002"
|
|
16289
|
+
});
|
|
16290
|
+
if (confirm) {
|
|
16291
|
+
const bol = await ibiz.auth.logout();
|
|
16292
|
+
if (bol) {
|
|
16293
|
+
window.location.reload();
|
|
16294
|
+
}
|
|
16295
|
+
}
|
|
16296
|
+
return {};
|
|
16297
|
+
}
|
|
16298
|
+
};
|
|
16299
|
+
|
|
16048
16300
|
// src/ui-action/provider/index.ts
|
|
16049
16301
|
function presetUIActionProvider() {
|
|
16050
16302
|
const frontUIActionProvider = new FrontUIActionProvider();
|
|
@@ -16058,6 +16310,8 @@ function presetUIActionProvider() {
|
|
|
16058
16310
|
"DEUIACTION_WFWithdraw",
|
|
16059
16311
|
() => wfWithdrawUIActionProvider
|
|
16060
16312
|
);
|
|
16313
|
+
const loginOutUIActionProvider = new LoginOutUIActionProvider();
|
|
16314
|
+
registerUIActionProvider("SYS_Logout", () => loginOutUIActionProvider);
|
|
16061
16315
|
}
|
|
16062
16316
|
|
|
16063
16317
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
@@ -16088,7 +16342,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16088
16342
|
const actionId = item.uiactionId;
|
|
16089
16343
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
16090
16344
|
if (!uiAction) {
|
|
16091
|
-
throw new
|
|
16345
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
16092
16346
|
}
|
|
16093
16347
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
16094
16348
|
if (enableLoading) {
|
|
@@ -17133,7 +17387,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17133
17387
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
17134
17388
|
|
|
17135
17389
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
17136
|
-
import { RuntimeError as
|
|
17390
|
+
import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
17137
17391
|
var ExpBarControlController = class extends ControlController {
|
|
17138
17392
|
constructor() {
|
|
17139
17393
|
super(...arguments);
|
|
@@ -17459,7 +17713,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
17459
17713
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
17460
17714
|
return this.XDataModel.navAppViewId;
|
|
17461
17715
|
}
|
|
17462
|
-
throw new
|
|
17716
|
+
throw new RuntimeError47("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
17463
17717
|
}
|
|
17464
17718
|
/**
|
|
17465
17719
|
* 获取导航视图
|
|
@@ -17602,7 +17856,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
17602
17856
|
};
|
|
17603
17857
|
|
|
17604
17858
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
17605
|
-
import { RuntimeError as
|
|
17859
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17606
17860
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
17607
17861
|
constructor() {
|
|
17608
17862
|
super(...arguments);
|
|
@@ -17677,7 +17931,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
17677
17931
|
const deData = node.deData || node;
|
|
17678
17932
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
17679
17933
|
if (!nodeModel) {
|
|
17680
|
-
throw new
|
|
17934
|
+
throw new RuntimeError48("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
17681
17935
|
}
|
|
17682
17936
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
17683
17937
|
result.context.currentSrfNav = nodeId;
|
|
@@ -17868,7 +18122,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
17868
18122
|
};
|
|
17869
18123
|
|
|
17870
18124
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
17871
|
-
import { RuntimeError as
|
|
18125
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
17872
18126
|
|
|
17873
18127
|
// src/controller/control/form/form/form.controller.ts
|
|
17874
18128
|
import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate2 } from "@ibiz-template/core";
|
|
@@ -17981,19 +18235,6 @@ var FormController = class extends ControlController {
|
|
|
17981
18235
|
);
|
|
17982
18236
|
});
|
|
17983
18237
|
}
|
|
17984
|
-
/**
|
|
17985
|
-
* 获取加载草稿额外参数,新建默认值
|
|
17986
|
-
* @author lxm
|
|
17987
|
-
* @date 2023-04-27 10:32:06
|
|
17988
|
-
* @return {*}
|
|
17989
|
-
*/
|
|
17990
|
-
async getDraftParams() {
|
|
17991
|
-
const result = {};
|
|
17992
|
-
await Promise.all(
|
|
17993
|
-
this.formItems.map((item) => item.setDefaultValue(true, result))
|
|
17994
|
-
);
|
|
17995
|
-
return result;
|
|
17996
|
-
}
|
|
17997
18238
|
/**
|
|
17998
18239
|
* 初始化表单成员控制器
|
|
17999
18240
|
*
|
|
@@ -18112,8 +18353,52 @@ var FormController = class extends ControlController {
|
|
|
18112
18353
|
};
|
|
18113
18354
|
|
|
18114
18355
|
// src/controller/control/form/search-form/search-form.service.ts
|
|
18356
|
+
import { recursiveIterate as recursiveIterate4 } from "@ibiz-template/core";
|
|
18357
|
+
|
|
18358
|
+
// src/controller/control/form/form/form.service.ts
|
|
18115
18359
|
import { recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
|
|
18116
|
-
var
|
|
18360
|
+
var FormService = class extends ControlService {
|
|
18361
|
+
/**
|
|
18362
|
+
* 设置表单项的默认值
|
|
18363
|
+
* @author lxm
|
|
18364
|
+
* @date 2023-12-13 03:16:19
|
|
18365
|
+
* @param {IData} data 表单数据
|
|
18366
|
+
* @param {IParams} context 上下文
|
|
18367
|
+
* @param {IParams} params 视图参数
|
|
18368
|
+
* @param {('create' | 'update')} type 新建还是更新
|
|
18369
|
+
*/
|
|
18370
|
+
setDefault(data, context, params, type) {
|
|
18371
|
+
recursiveIterate3(
|
|
18372
|
+
this.model,
|
|
18373
|
+
(item) => {
|
|
18374
|
+
if (item.detailType === "FORMITEM") {
|
|
18375
|
+
const { createDVT, createDV, updateDVT, updateDV, valueFormat } = item;
|
|
18376
|
+
const valueType = type === "create" ? createDVT : updateDVT;
|
|
18377
|
+
const defaultValue = type === "create" ? createDV : updateDV;
|
|
18378
|
+
const name = item.id.toLowerCase();
|
|
18379
|
+
const defaultVal = getDefaultValue(
|
|
18380
|
+
{
|
|
18381
|
+
name,
|
|
18382
|
+
valueType,
|
|
18383
|
+
defaultValue,
|
|
18384
|
+
valueFormat
|
|
18385
|
+
},
|
|
18386
|
+
{ data, context, params }
|
|
18387
|
+
);
|
|
18388
|
+
if (defaultVal !== void 0) {
|
|
18389
|
+
data[name] = defaultVal;
|
|
18390
|
+
}
|
|
18391
|
+
}
|
|
18392
|
+
},
|
|
18393
|
+
{
|
|
18394
|
+
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
18395
|
+
}
|
|
18396
|
+
);
|
|
18397
|
+
}
|
|
18398
|
+
};
|
|
18399
|
+
|
|
18400
|
+
// src/controller/control/form/search-form/search-form.service.ts
|
|
18401
|
+
var SearchFormService = class extends FormService {
|
|
18117
18402
|
/**
|
|
18118
18403
|
* 执行获取草稿方法
|
|
18119
18404
|
*
|
|
@@ -18123,10 +18408,13 @@ var SearchFormService = class extends ControlService {
|
|
|
18123
18408
|
* @param {IParams} [params={}] 视图参数
|
|
18124
18409
|
* @returns {*} {Promise<IHttpResponse>}
|
|
18125
18410
|
*/
|
|
18126
|
-
async getDraft(
|
|
18411
|
+
async getDraft(context, params = {}) {
|
|
18127
18412
|
const tempData = this.getFilteredData({ ...params });
|
|
18128
18413
|
let res = { ok: true, status: 200, data: tempData };
|
|
18129
18414
|
res = this.handleResponse(res);
|
|
18415
|
+
if (res.ok && res.data) {
|
|
18416
|
+
this.setDefault(res.data, context, params, "create");
|
|
18417
|
+
}
|
|
18130
18418
|
return res;
|
|
18131
18419
|
}
|
|
18132
18420
|
/**
|
|
@@ -18136,7 +18424,7 @@ var SearchFormService = class extends ControlService {
|
|
|
18136
18424
|
* @date 2022-08-31 18:08:37
|
|
18137
18425
|
*/
|
|
18138
18426
|
initUIDataMap() {
|
|
18139
|
-
|
|
18427
|
+
recursiveIterate4(
|
|
18140
18428
|
this.model,
|
|
18141
18429
|
(item) => {
|
|
18142
18430
|
if (item.detailType === "FORMITEM") {
|
|
@@ -18211,8 +18499,6 @@ var SearchFormController = class extends FormController {
|
|
|
18211
18499
|
*/
|
|
18212
18500
|
async load() {
|
|
18213
18501
|
const queryParams = { ...this.params };
|
|
18214
|
-
const params = await this.getDraftParams();
|
|
18215
|
-
Object.assign(queryParams, params);
|
|
18216
18502
|
await this.evt.emit("onBeforeLoadDraft", { params: queryParams });
|
|
18217
18503
|
let res;
|
|
18218
18504
|
try {
|
|
@@ -18224,7 +18510,6 @@ var SearchFormController = class extends FormController {
|
|
|
18224
18510
|
throw error;
|
|
18225
18511
|
}
|
|
18226
18512
|
this.state.data = res.data;
|
|
18227
|
-
mergeDefaultInLeft(this.data, params);
|
|
18228
18513
|
this.state.isLoaded = true;
|
|
18229
18514
|
this.formStateNotify("DRAFT" /* DRAFT */);
|
|
18230
18515
|
this.actionNotification("GETDRAFTSUCCESS");
|
|
@@ -18398,7 +18683,7 @@ var SearchFormController = class extends FormController {
|
|
|
18398
18683
|
applyStoredFilter(index) {
|
|
18399
18684
|
const filter = this.state.storedFilters[index];
|
|
18400
18685
|
if (!filter) {
|
|
18401
|
-
throw new
|
|
18686
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
|
|
18402
18687
|
}
|
|
18403
18688
|
if (filter.data) {
|
|
18404
18689
|
Object.assign(this.data, filter.data);
|
|
@@ -18414,7 +18699,7 @@ var SearchFormController = class extends FormController {
|
|
|
18414
18699
|
async removeStoredFilter(index) {
|
|
18415
18700
|
const filter = this.state.storedFilters[index];
|
|
18416
18701
|
if (!filter) {
|
|
18417
|
-
throw new
|
|
18702
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
|
|
18418
18703
|
}
|
|
18419
18704
|
this.state.storedFilters.splice(index, 1);
|
|
18420
18705
|
await this.saveConfig();
|
|
@@ -18912,7 +19197,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
18912
19197
|
*/
|
|
18913
19198
|
this.refreshItems = ["srfkey"];
|
|
18914
19199
|
/**
|
|
18915
|
-
*
|
|
19200
|
+
* 参数项名称(这个模型暂不使用,相关场景可以通过配置导航参数实现)
|
|
18916
19201
|
*
|
|
18917
19202
|
* @author lxm
|
|
18918
19203
|
* @date 2022-09-15 19:09:36
|
|
@@ -19252,6 +19537,20 @@ var FormItemController = class extends FormDetailController {
|
|
|
19252
19537
|
}
|
|
19253
19538
|
return void 0;
|
|
19254
19539
|
}
|
|
19540
|
+
/**
|
|
19541
|
+
* 标签标题
|
|
19542
|
+
* @author lxm
|
|
19543
|
+
* @date 2023-12-12 09:48:21
|
|
19544
|
+
* @readonly
|
|
19545
|
+
* @type {(string | undefined)}
|
|
19546
|
+
*/
|
|
19547
|
+
get labelCaption() {
|
|
19548
|
+
const { captionItemName } = this.model;
|
|
19549
|
+
if (captionItemName) {
|
|
19550
|
+
return this.data[captionItemName];
|
|
19551
|
+
}
|
|
19552
|
+
return this.model.caption;
|
|
19553
|
+
}
|
|
19255
19554
|
/**
|
|
19256
19555
|
* 单位
|
|
19257
19556
|
* @author lxm
|
|
@@ -19376,9 +19675,6 @@ var FormItemController = class extends FormDetailController {
|
|
|
19376
19675
|
async formStateNotify(state) {
|
|
19377
19676
|
super.formStateNotify(state);
|
|
19378
19677
|
this.calcEnableCond();
|
|
19379
|
-
if (state === "LOAD" /* LOAD */) {
|
|
19380
|
-
this.setDefaultValue(false);
|
|
19381
|
-
}
|
|
19382
19678
|
}
|
|
19383
19679
|
calcDynamicLogic(names, mustCalc = false) {
|
|
19384
19680
|
if (!this.model.hidden) {
|
|
@@ -19677,7 +19973,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
19677
19973
|
};
|
|
19678
19974
|
|
|
19679
19975
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
19680
|
-
import { RuntimeError as
|
|
19976
|
+
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
19681
19977
|
import { createUUID as createUUID9 } from "qx-util";
|
|
19682
19978
|
|
|
19683
19979
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -19788,7 +20084,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
19788
20084
|
async remove(id) {
|
|
19789
20085
|
const controller = this.formMap.get(id);
|
|
19790
20086
|
if (!controller) {
|
|
19791
|
-
throw new
|
|
20087
|
+
throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
19792
20088
|
}
|
|
19793
20089
|
await controller.remove();
|
|
19794
20090
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
@@ -20051,8 +20347,7 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
20051
20347
|
import {
|
|
20052
20348
|
awaitTimeout,
|
|
20053
20349
|
mergeInLeft as mergeInLeft2,
|
|
20054
|
-
RuntimeError as
|
|
20055
|
-
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
20350
|
+
RuntimeError as RuntimeError51
|
|
20056
20351
|
} from "@ibiz-template/core";
|
|
20057
20352
|
import { debounce as debounce2 } from "lodash-es";
|
|
20058
20353
|
import { createUUID as createUUID10 } from "qx-util";
|
|
@@ -20060,10 +20355,10 @@ import { clone as clone21 } from "ramda";
|
|
|
20060
20355
|
|
|
20061
20356
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
20062
20357
|
import {
|
|
20063
|
-
recursiveIterate as
|
|
20358
|
+
recursiveIterate as recursiveIterate5,
|
|
20064
20359
|
RuntimeModelError as RuntimeModelError55
|
|
20065
20360
|
} from "@ibiz-template/core";
|
|
20066
|
-
var EditFormService = class extends
|
|
20361
|
+
var EditFormService = class extends FormService {
|
|
20067
20362
|
/**
|
|
20068
20363
|
* 执行获取单条数据方法
|
|
20069
20364
|
*
|
|
@@ -20082,6 +20377,9 @@ var EditFormService = class extends ControlService {
|
|
|
20082
20377
|
params
|
|
20083
20378
|
);
|
|
20084
20379
|
res = this.handleResponse(res);
|
|
20380
|
+
if (res.ok && res.data) {
|
|
20381
|
+
this.setDefault(res.data, context, params, "update");
|
|
20382
|
+
}
|
|
20085
20383
|
return res;
|
|
20086
20384
|
}
|
|
20087
20385
|
/**
|
|
@@ -20102,6 +20400,9 @@ var EditFormService = class extends ControlService {
|
|
|
20102
20400
|
params
|
|
20103
20401
|
);
|
|
20104
20402
|
res = this.handleResponse(res);
|
|
20403
|
+
if (res.ok && res.data) {
|
|
20404
|
+
this.setDefault(res.data, context, params, "create");
|
|
20405
|
+
}
|
|
20105
20406
|
return res;
|
|
20106
20407
|
}
|
|
20107
20408
|
/**
|
|
@@ -20276,7 +20577,7 @@ var EditFormService = class extends ControlService {
|
|
|
20276
20577
|
// 向导预置
|
|
20277
20578
|
"srfnextform"
|
|
20278
20579
|
];
|
|
20279
|
-
|
|
20580
|
+
recursiveIterate5(
|
|
20280
20581
|
this.model,
|
|
20281
20582
|
(item) => {
|
|
20282
20583
|
if (item.detailType === "FORMITEM" || item.detailType === "MDCTRL") {
|
|
@@ -20371,8 +20672,6 @@ var EditFormController = class extends FormController {
|
|
|
20371
20672
|
*/
|
|
20372
20673
|
async loadDraft(args) {
|
|
20373
20674
|
const { context, params: queryParams } = this.handlerAbilityParams(args);
|
|
20374
|
-
const params = await this.getDraftParams();
|
|
20375
|
-
Object.assign(queryParams, params);
|
|
20376
20675
|
let res;
|
|
20377
20676
|
try {
|
|
20378
20677
|
await this.startLoading();
|
|
@@ -20388,7 +20687,6 @@ var EditFormController = class extends FormController {
|
|
|
20388
20687
|
await this.endLoading();
|
|
20389
20688
|
}
|
|
20390
20689
|
this.state.data = res.data;
|
|
20391
|
-
mergeDefaultInLeft2(this.data, params);
|
|
20392
20690
|
this.formStateNotify("DRAFT" /* DRAFT */);
|
|
20393
20691
|
await this.evt.emit("onLoadDraftSuccess", void 0);
|
|
20394
20692
|
this.actionNotification("GETDRAFTSUCCESS");
|
|
@@ -20498,7 +20796,7 @@ var EditFormController = class extends FormController {
|
|
|
20498
20796
|
}
|
|
20499
20797
|
const isValid = await this.validate();
|
|
20500
20798
|
if (!isValid) {
|
|
20501
|
-
throw new
|
|
20799
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20502
20800
|
}
|
|
20503
20801
|
if (!silent) {
|
|
20504
20802
|
await this.startLoading();
|
|
@@ -20539,12 +20837,10 @@ var EditFormController = class extends FormController {
|
|
|
20539
20837
|
default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
|
|
20540
20838
|
});
|
|
20541
20839
|
}
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
);
|
|
20547
|
-
}
|
|
20840
|
+
ibiz.mc.command.send(
|
|
20841
|
+
this.data.$origin,
|
|
20842
|
+
isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
|
|
20843
|
+
);
|
|
20548
20844
|
return this.data;
|
|
20549
20845
|
}
|
|
20550
20846
|
/**
|
|
@@ -20585,9 +20881,7 @@ var EditFormController = class extends FormController {
|
|
|
20585
20881
|
this.state.modified = false;
|
|
20586
20882
|
await this.evt.emit("onRemoveSuccess", void 0);
|
|
20587
20883
|
this.actionNotification("REMOVESUCCESS");
|
|
20588
|
-
|
|
20589
|
-
ibiz.mc.command.send(this.data.$origin, "OBJECTREMOVED");
|
|
20590
|
-
}
|
|
20884
|
+
ibiz.mc.command.send(this.data.$origin, "OBJECTREMOVED");
|
|
20591
20885
|
return ok;
|
|
20592
20886
|
}
|
|
20593
20887
|
/**
|
|
@@ -20624,37 +20918,53 @@ var EditFormController = class extends FormController {
|
|
|
20624
20918
|
(item) => item.id === formItemUpdateId
|
|
20625
20919
|
);
|
|
20626
20920
|
if (!formItemUpdate) {
|
|
20627
|
-
throw new
|
|
20921
|
+
throw new RuntimeError51("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
20628
20922
|
}
|
|
20629
|
-
const {
|
|
20923
|
+
const {
|
|
20924
|
+
appDEMethodId,
|
|
20925
|
+
defiupdateDetails,
|
|
20926
|
+
customCode,
|
|
20927
|
+
scriptCode,
|
|
20928
|
+
showBusyIndicator
|
|
20929
|
+
} = formItemUpdate;
|
|
20630
20930
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
params
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20931
|
+
try {
|
|
20932
|
+
if (showBusyIndicator) {
|
|
20933
|
+
this.startLoading();
|
|
20934
|
+
}
|
|
20935
|
+
let updateData;
|
|
20936
|
+
if (customCode && scriptCode) {
|
|
20937
|
+
updateData = ScriptFactory.execScriptFn(
|
|
20938
|
+
{
|
|
20939
|
+
...this.getEventArgs(),
|
|
20940
|
+
data: this.data
|
|
20941
|
+
},
|
|
20942
|
+
scriptCode,
|
|
20943
|
+
{
|
|
20944
|
+
isAsync: false
|
|
20945
|
+
}
|
|
20946
|
+
);
|
|
20947
|
+
} else {
|
|
20948
|
+
const params = { ...this.params, ...this.data.getOrigin() };
|
|
20949
|
+
const res = await this.service.updateFormItem(
|
|
20950
|
+
appDEMethodId,
|
|
20951
|
+
this.context,
|
|
20952
|
+
params
|
|
20953
|
+
);
|
|
20954
|
+
updateData = res.data;
|
|
20955
|
+
}
|
|
20956
|
+
if (updateData && (updateItems == null ? void 0 : updateItems.length)) {
|
|
20957
|
+
await Promise.all(
|
|
20958
|
+
updateItems.map(
|
|
20959
|
+
(itemName) => this.setDataValue(itemName, updateData[itemName])
|
|
20960
|
+
)
|
|
20961
|
+
);
|
|
20962
|
+
}
|
|
20963
|
+
await awaitTimeout(2e3);
|
|
20964
|
+
} finally {
|
|
20965
|
+
if (showBusyIndicator) {
|
|
20966
|
+
this.endLoading();
|
|
20967
|
+
}
|
|
20658
20968
|
}
|
|
20659
20969
|
}
|
|
20660
20970
|
/**
|
|
@@ -20668,16 +20978,14 @@ var EditFormController = class extends FormController {
|
|
|
20668
20978
|
async wfStart(args) {
|
|
20669
20979
|
const isValid = await this.validate();
|
|
20670
20980
|
if (!isValid) {
|
|
20671
|
-
throw new
|
|
20981
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20672
20982
|
}
|
|
20673
20983
|
await this.startLoading();
|
|
20674
20984
|
const { context, params } = this.handlerAbilityParams(args);
|
|
20675
20985
|
try {
|
|
20676
20986
|
await this.service.wfStart(context, params, this.data);
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
|
|
20680
|
-
}
|
|
20987
|
+
ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
|
|
20988
|
+
ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
|
|
20681
20989
|
} catch (error) {
|
|
20682
20990
|
this.actionNotification("WFSTARTERROR", {
|
|
20683
20991
|
error
|
|
@@ -20699,16 +21007,14 @@ var EditFormController = class extends FormController {
|
|
|
20699
21007
|
async wfSubmit(args) {
|
|
20700
21008
|
const isValid = await this.validate();
|
|
20701
21009
|
if (!isValid) {
|
|
20702
|
-
throw new
|
|
21010
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20703
21011
|
}
|
|
20704
21012
|
await this.startLoading();
|
|
20705
21013
|
const { context, params } = this.handlerAbilityParams(args);
|
|
20706
21014
|
try {
|
|
20707
21015
|
await this.service.wfSubmit(context, params, this.data);
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
|
|
20711
|
-
}
|
|
21016
|
+
ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
|
|
21017
|
+
ibiz.mc.command.send({ srfdecodename: "SysTodo" }, "OBJECTUPDATED");
|
|
20712
21018
|
} catch (error) {
|
|
20713
21019
|
this.actionNotification("WFSUBMITERROR", {
|
|
20714
21020
|
error
|
|
@@ -20976,9 +21282,9 @@ var GridRowState = class {
|
|
|
20976
21282
|
import {
|
|
20977
21283
|
awaitTimeout as awaitTimeout2,
|
|
20978
21284
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
20979
|
-
mergeDefaultInLeft
|
|
20980
|
-
recursiveIterate as
|
|
20981
|
-
RuntimeError as
|
|
21285
|
+
mergeDefaultInLeft,
|
|
21286
|
+
recursiveIterate as recursiveIterate6,
|
|
21287
|
+
RuntimeError as RuntimeError52,
|
|
20982
21288
|
RuntimeModelError as RuntimeModelError56
|
|
20983
21289
|
} from "@ibiz-template/core";
|
|
20984
21290
|
import { clone as clone22 } from "ramda";
|
|
@@ -21362,7 +21668,7 @@ var GridController = class extends MDControlController {
|
|
|
21362
21668
|
if (editShowMode === "row") {
|
|
21363
21669
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
21364
21670
|
if (editingRow) {
|
|
21365
|
-
throw new
|
|
21671
|
+
throw new RuntimeError52("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
21366
21672
|
}
|
|
21367
21673
|
}
|
|
21368
21674
|
const queryParams = { ...this.params };
|
|
@@ -21378,7 +21684,7 @@ var GridController = class extends MDControlController {
|
|
|
21378
21684
|
throw error;
|
|
21379
21685
|
}
|
|
21380
21686
|
const draftData = res.data;
|
|
21381
|
-
|
|
21687
|
+
mergeDefaultInLeft(draftData, defaultData);
|
|
21382
21688
|
this.state.items.unshift(draftData);
|
|
21383
21689
|
const newRow = new GridRowState(draftData, this);
|
|
21384
21690
|
this.state.rows.unshift(newRow);
|
|
@@ -21403,7 +21709,7 @@ var GridController = class extends MDControlController {
|
|
|
21403
21709
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
21404
21710
|
const rowState = this.findRowState(data);
|
|
21405
21711
|
if (!rowState) {
|
|
21406
|
-
throw new
|
|
21712
|
+
throw new RuntimeError52("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
21407
21713
|
}
|
|
21408
21714
|
if (!rowState.modified) {
|
|
21409
21715
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -21415,7 +21721,7 @@ var GridController = class extends MDControlController {
|
|
|
21415
21721
|
}
|
|
21416
21722
|
const isValid = await this.validate(rowState);
|
|
21417
21723
|
if (!isValid) {
|
|
21418
|
-
throw new
|
|
21724
|
+
throw new RuntimeError52("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
21419
21725
|
}
|
|
21420
21726
|
let res;
|
|
21421
21727
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
@@ -21489,7 +21795,7 @@ var GridController = class extends MDControlController {
|
|
|
21489
21795
|
* @return {*} {Promise<void>}
|
|
21490
21796
|
*/
|
|
21491
21797
|
initColumnStates() {
|
|
21492
|
-
|
|
21798
|
+
recursiveIterate6(
|
|
21493
21799
|
this.model,
|
|
21494
21800
|
(column) => {
|
|
21495
21801
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -21612,7 +21918,7 @@ var GridController = class extends MDControlController {
|
|
|
21612
21918
|
}
|
|
21613
21919
|
async toggleRowEdit() {
|
|
21614
21920
|
if (!this.model.enableRowNew) {
|
|
21615
|
-
throw new
|
|
21921
|
+
throw new RuntimeError52("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21616
21922
|
}
|
|
21617
21923
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
21618
21924
|
}
|
|
@@ -21645,7 +21951,7 @@ var GridController = class extends MDControlController {
|
|
|
21645
21951
|
} else {
|
|
21646
21952
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
21647
21953
|
if (editingRow) {
|
|
21648
|
-
throw new
|
|
21954
|
+
throw new RuntimeError52("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21649
21955
|
}
|
|
21650
21956
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
21651
21957
|
row.cacheData = clone22(row.data);
|
|
@@ -21695,7 +22001,7 @@ var GridController = class extends MDControlController {
|
|
|
21695
22001
|
(item) => item.id === updateId
|
|
21696
22002
|
);
|
|
21697
22003
|
if (!findUpdate) {
|
|
21698
|
-
throw new
|
|
22004
|
+
throw new RuntimeError52("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
21699
22005
|
}
|
|
21700
22006
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
21701
22007
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -21850,7 +22156,7 @@ var GridController = class extends MDControlController {
|
|
|
21850
22156
|
data2 = this.getData();
|
|
21851
22157
|
}
|
|
21852
22158
|
if (data2.length === 0) {
|
|
21853
|
-
throw new
|
|
22159
|
+
throw new RuntimeError52("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
21854
22160
|
}
|
|
21855
22161
|
return formatExcelData(data2);
|
|
21856
22162
|
};
|
|
@@ -22263,7 +22569,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
22263
22569
|
};
|
|
22264
22570
|
|
|
22265
22571
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
22266
|
-
import { RuntimeError as
|
|
22572
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
22267
22573
|
import Schema2 from "async-validator";
|
|
22268
22574
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
22269
22575
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -22412,7 +22718,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
22412
22718
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
22413
22719
|
const result = await this.validate(row);
|
|
22414
22720
|
if (!result) {
|
|
22415
|
-
throw new
|
|
22721
|
+
throw new RuntimeError53(
|
|
22416
22722
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
22417
22723
|
);
|
|
22418
22724
|
}
|
|
@@ -22770,7 +23076,7 @@ var ListController = class extends MDControlController {
|
|
|
22770
23076
|
};
|
|
22771
23077
|
|
|
22772
23078
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
22773
|
-
import { recursiveIterate as
|
|
23079
|
+
import { recursiveIterate as recursiveIterate7, RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
22774
23080
|
var PanelController = class extends ControlController {
|
|
22775
23081
|
constructor(model, context, params, ctx, container) {
|
|
22776
23082
|
super(model, context, params, ctx);
|
|
@@ -22894,7 +23200,7 @@ var PanelController = class extends ControlController {
|
|
|
22894
23200
|
var _a, _b;
|
|
22895
23201
|
const data = await this.prepareData();
|
|
22896
23202
|
if (!data) {
|
|
22897
|
-
throw new
|
|
23203
|
+
throw new RuntimeError54("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
22898
23204
|
}
|
|
22899
23205
|
const panelData = this.convertData(data);
|
|
22900
23206
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -22979,7 +23285,7 @@ var PanelController = class extends ControlController {
|
|
|
22979
23285
|
}
|
|
22980
23286
|
initControlScheduler(logics = []) {
|
|
22981
23287
|
const actualLogics = [...logics];
|
|
22982
|
-
|
|
23288
|
+
recursiveIterate7(
|
|
22983
23289
|
this.model,
|
|
22984
23290
|
(item) => {
|
|
22985
23291
|
if (item.controlLogics) {
|
|
@@ -23489,7 +23795,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
23489
23795
|
};
|
|
23490
23796
|
|
|
23491
23797
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
23492
|
-
import { recursiveIterate as
|
|
23798
|
+
import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
|
|
23493
23799
|
import { isNil as isNil23 } from "ramda";
|
|
23494
23800
|
|
|
23495
23801
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -23646,7 +23952,7 @@ var SearchBarController = class extends ControlController {
|
|
|
23646
23952
|
}
|
|
23647
23953
|
const filters = this.calcFilters();
|
|
23648
23954
|
if (filters) {
|
|
23649
|
-
params.
|
|
23955
|
+
params.searchconds = filters;
|
|
23650
23956
|
}
|
|
23651
23957
|
return params;
|
|
23652
23958
|
}
|
|
@@ -23695,7 +24001,7 @@ var SearchBarController = class extends ControlController {
|
|
|
23695
24001
|
}
|
|
23696
24002
|
let hasFilter = false;
|
|
23697
24003
|
let hasError = false;
|
|
23698
|
-
|
|
24004
|
+
recursiveIterate8(this.state.filterNodes[0], (node) => {
|
|
23699
24005
|
if (node.leaf) {
|
|
23700
24006
|
if (node.field && node.valueOP && !isNil23(node.value)) {
|
|
23701
24007
|
hasFilter = true;
|
|
@@ -23705,7 +24011,7 @@ var SearchBarController = class extends ControlController {
|
|
|
23705
24011
|
}
|
|
23706
24012
|
});
|
|
23707
24013
|
if (hasFilter && !hasError) {
|
|
23708
|
-
const filter = this.formatFilters(this.state.filterNodes[0]);
|
|
24014
|
+
const filter = [this.formatFilters(this.state.filterNodes[0])];
|
|
23709
24015
|
return filter;
|
|
23710
24016
|
}
|
|
23711
24017
|
}
|
|
@@ -23719,15 +24025,17 @@ var SearchBarController = class extends ControlController {
|
|
|
23719
24025
|
formatFilters(node) {
|
|
23720
24026
|
if (!node.leaf) {
|
|
23721
24027
|
return {
|
|
23722
|
-
|
|
23723
|
-
|
|
23724
|
-
|
|
24028
|
+
condtype: "GROUP",
|
|
24029
|
+
condop: node.logicType,
|
|
24030
|
+
bnotmode: false,
|
|
24031
|
+
searchcondlist: node.children.map((item) => this.formatFilters(item))
|
|
23725
24032
|
};
|
|
23726
24033
|
}
|
|
23727
24034
|
return {
|
|
23728
|
-
|
|
23729
|
-
|
|
23730
|
-
|
|
24035
|
+
condtype: "DEFIELD",
|
|
24036
|
+
fieldname: node.field,
|
|
24037
|
+
condop: node.valueOP,
|
|
24038
|
+
value: node.value
|
|
23731
24039
|
};
|
|
23732
24040
|
}
|
|
23733
24041
|
};
|
|
@@ -23969,7 +24277,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
23969
24277
|
};
|
|
23970
24278
|
|
|
23971
24279
|
// src/controller/control/tree/tree.controller.ts
|
|
23972
|
-
import { recursiveIterate as
|
|
24280
|
+
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
23973
24281
|
|
|
23974
24282
|
// src/controller/control/tree/tree.service.ts
|
|
23975
24283
|
import { ModelError as ModelError29 } from "@ibiz-template/core";
|
|
@@ -24380,7 +24688,7 @@ var TreeController = class extends MDControlController {
|
|
|
24380
24688
|
this.state.rootNodes = nodes;
|
|
24381
24689
|
}
|
|
24382
24690
|
this.state.items = [];
|
|
24383
|
-
|
|
24691
|
+
recursiveIterate9(
|
|
24384
24692
|
{ children: this.state.rootNodes },
|
|
24385
24693
|
(node) => {
|
|
24386
24694
|
this.state.items.push(node);
|
|
@@ -24534,7 +24842,7 @@ var TreeController = class extends MDControlController {
|
|
|
24534
24842
|
*/
|
|
24535
24843
|
calcExpandedKeys(nodes) {
|
|
24536
24844
|
let expandedKeys = [...this.state.expandedKeys];
|
|
24537
|
-
|
|
24845
|
+
recursiveIterate9({ children: nodes }, (node) => {
|
|
24538
24846
|
var _a;
|
|
24539
24847
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
24540
24848
|
expandedKeys.push(node.id);
|
|
@@ -24597,7 +24905,7 @@ var TreeController = class extends MDControlController {
|
|
|
24597
24905
|
};
|
|
24598
24906
|
|
|
24599
24907
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
24600
|
-
import { RuntimeError as
|
|
24908
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
24601
24909
|
|
|
24602
24910
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
24603
24911
|
var WizardPanelService = class extends ControlService {
|
|
@@ -24685,6 +24993,13 @@ var WizardPanelController = class extends ControlController {
|
|
|
24685
24993
|
* @Date: 2023-06-07 15:13:21
|
|
24686
24994
|
*/
|
|
24687
24995
|
this.stepTags = {};
|
|
24996
|
+
/**
|
|
24997
|
+
* 向导表单数据
|
|
24998
|
+
* @return {*}
|
|
24999
|
+
* @author: zhujiamin
|
|
25000
|
+
* @Date: 2023-12-12 13:43:07
|
|
25001
|
+
*/
|
|
25002
|
+
this.formData = {};
|
|
24688
25003
|
}
|
|
24689
25004
|
initState() {
|
|
24690
25005
|
super.initState();
|
|
@@ -24756,7 +25071,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24756
25071
|
const { activeFormTag } = this.state;
|
|
24757
25072
|
const controller = this.formControllers.get(activeFormTag);
|
|
24758
25073
|
if (!controller) {
|
|
24759
|
-
throw new
|
|
25074
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
24760
25075
|
}
|
|
24761
25076
|
return controller;
|
|
24762
25077
|
}
|
|
@@ -24767,10 +25082,11 @@ var WizardPanelController = class extends ControlController {
|
|
|
24767
25082
|
* @author: zhujiamin
|
|
24768
25083
|
* @Date: 2023-06-07 15:14:05
|
|
24769
25084
|
*/
|
|
24770
|
-
onFormMounted(activeFormTag, event) {
|
|
25085
|
+
async onFormMounted(activeFormTag, event) {
|
|
24771
25086
|
const formController = event.ctrl;
|
|
24772
25087
|
this.formControllers.set(activeFormTag, formController);
|
|
24773
|
-
formController.load();
|
|
25088
|
+
const data = await formController.load();
|
|
25089
|
+
Object.assign(this.formData, data);
|
|
24774
25090
|
}
|
|
24775
25091
|
/**
|
|
24776
25092
|
* 表单保存后,如果上下文里没有主键,赋予主键
|
|
@@ -24781,6 +25097,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24781
25097
|
*/
|
|
24782
25098
|
onFormSaved(event) {
|
|
24783
25099
|
const data = event.data[0];
|
|
25100
|
+
Object.assign(this.formData, data);
|
|
24784
25101
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
24785
25102
|
if (!this.context[deName] && data && data.srfkey) {
|
|
24786
25103
|
this.context[deName] = data.srfkey;
|
|
@@ -24796,7 +25113,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24796
25113
|
getWizardFormByTag(tag) {
|
|
24797
25114
|
var _a;
|
|
24798
25115
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
24799
|
-
throw new
|
|
25116
|
+
throw new RuntimeError55("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
24800
25117
|
return;
|
|
24801
25118
|
}
|
|
24802
25119
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -24805,7 +25122,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24805
25122
|
}
|
|
24806
25123
|
);
|
|
24807
25124
|
if (!wizardForm) {
|
|
24808
|
-
throw new
|
|
25125
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
24809
25126
|
}
|
|
24810
25127
|
return wizardForm;
|
|
24811
25128
|
}
|
|
@@ -24819,9 +25136,10 @@ var WizardPanelController = class extends ControlController {
|
|
|
24819
25136
|
var _a;
|
|
24820
25137
|
const initAction = (_a = this.model.initControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
24821
25138
|
if (initAction) {
|
|
24822
|
-
const res = await this.service.initialize(this.context, this.params);
|
|
25139
|
+
const res = await this.service.initialize(this.context, {}, this.params);
|
|
24823
25140
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
24824
25141
|
if (res.data && res.data.srfkey) {
|
|
25142
|
+
this.formData = res.data;
|
|
24825
25143
|
this.context[deName] = res.data.srfkey;
|
|
24826
25144
|
}
|
|
24827
25145
|
if (res.data && this.model.stateAppDEFieldId && res.data[this.model.stateAppDEFieldId]) {
|
|
@@ -24847,7 +25165,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24847
25165
|
* @memberof WizardPanelController
|
|
24848
25166
|
*/
|
|
24849
25167
|
async finish() {
|
|
24850
|
-
await this.service.finish(this.context, this.params);
|
|
25168
|
+
await this.service.finish(this.context, this.formData, this.params);
|
|
24851
25169
|
this.evt.emit("onFinishSuccess", void 0);
|
|
24852
25170
|
}
|
|
24853
25171
|
/**
|
|
@@ -24858,9 +25176,12 @@ var WizardPanelController = class extends ControlController {
|
|
|
24858
25176
|
* @memberof WizardPanelController
|
|
24859
25177
|
*/
|
|
24860
25178
|
async onPrevClick() {
|
|
24861
|
-
|
|
25179
|
+
let data;
|
|
25180
|
+
if (this.activeFormController.model.goBackControlAction) {
|
|
25181
|
+
data = await this.activeFormController.goBack();
|
|
25182
|
+
}
|
|
24862
25183
|
let prevTag;
|
|
24863
|
-
if (this.model.stateAppDEFieldId && data[this.model.stateAppDEFieldId]) {
|
|
25184
|
+
if (this.model.stateAppDEFieldId && data && data[this.model.stateAppDEFieldId]) {
|
|
24864
25185
|
const wizardForm = this.getWizardFormByTag(
|
|
24865
25186
|
data[this.model.stateAppDEFieldId]
|
|
24866
25187
|
);
|
|
@@ -24872,7 +25193,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24872
25193
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
24873
25194
|
}
|
|
24874
25195
|
if (!prevTag) {
|
|
24875
|
-
throw new
|
|
25196
|
+
throw new RuntimeError55("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
24876
25197
|
}
|
|
24877
25198
|
this.state.activeFormTag = prevTag;
|
|
24878
25199
|
}
|
|
@@ -24908,7 +25229,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24908
25229
|
});
|
|
24909
25230
|
const nextWizardStep = wizardSteps[index + 1];
|
|
24910
25231
|
if (!nextWizardStep) {
|
|
24911
|
-
throw new
|
|
25232
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
24912
25233
|
}
|
|
24913
25234
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
24914
25235
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -24917,7 +25238,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24917
25238
|
}
|
|
24918
25239
|
}
|
|
24919
25240
|
if (!nextTag) {
|
|
24920
|
-
throw new
|
|
25241
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
24921
25242
|
}
|
|
24922
25243
|
this.state.activeFormTag = nextTag;
|
|
24923
25244
|
this.tagHistory.push(nextTag);
|
|
@@ -25260,7 +25581,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
25260
25581
|
};
|
|
25261
25582
|
|
|
25262
25583
|
// src/controller/control/kanban/kanban.controller.ts
|
|
25263
|
-
import { RuntimeError as
|
|
25584
|
+
import { RuntimeError as RuntimeError56, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
25264
25585
|
import { isNil as isNil25 } from "ramda";
|
|
25265
25586
|
|
|
25266
25587
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -25348,7 +25669,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
25348
25669
|
} else {
|
|
25349
25670
|
const toNum = Number(sortValue);
|
|
25350
25671
|
if (Number.isNaN(toNum)) {
|
|
25351
|
-
throw new
|
|
25672
|
+
throw new RuntimeError56(
|
|
25352
25673
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
25353
25674
|
);
|
|
25354
25675
|
}
|
|
@@ -25364,7 +25685,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
25364
25685
|
}
|
|
25365
25686
|
handleDataGroup() {
|
|
25366
25687
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
25367
|
-
throw new
|
|
25688
|
+
throw new RuntimeError56("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
25368
25689
|
}
|
|
25369
25690
|
return super.handleDataGroup();
|
|
25370
25691
|
}
|
|
@@ -25488,7 +25809,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
25488
25809
|
};
|
|
25489
25810
|
|
|
25490
25811
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
25491
|
-
import { recursiveIterate as
|
|
25812
|
+
import { recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
25492
25813
|
|
|
25493
25814
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
25494
25815
|
import { isArray as isArray10 } from "qx-util";
|
|
@@ -25728,7 +26049,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
25728
26049
|
* @memberof TreeGridExController
|
|
25729
26050
|
*/
|
|
25730
26051
|
initColumnStates() {
|
|
25731
|
-
|
|
26052
|
+
recursiveIterate10(
|
|
25732
26053
|
this.model,
|
|
25733
26054
|
(column) => {
|
|
25734
26055
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -25816,7 +26137,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
25816
26137
|
this.state.rootNodes = nodes;
|
|
25817
26138
|
}
|
|
25818
26139
|
this.state.items = [];
|
|
25819
|
-
|
|
26140
|
+
recursiveIterate10(
|
|
25820
26141
|
{ children: this.state.rootNodes },
|
|
25821
26142
|
(node) => {
|
|
25822
26143
|
this.state.items.push(node);
|
|
@@ -25835,7 +26156,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
25835
26156
|
*/
|
|
25836
26157
|
calcExpandedKeys(nodes) {
|
|
25837
26158
|
let expandedKeys = [];
|
|
25838
|
-
|
|
26159
|
+
recursiveIterate10({ children: nodes }, (node) => {
|
|
25839
26160
|
var _a;
|
|
25840
26161
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
25841
26162
|
expandedKeys.push(node.id);
|
|
@@ -25858,7 +26179,7 @@ var TreeGridService = class extends GridService {
|
|
|
25858
26179
|
};
|
|
25859
26180
|
|
|
25860
26181
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
25861
|
-
import { RuntimeError as
|
|
26182
|
+
import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
25862
26183
|
import { createUUID as createUUID11 } from "qx-util";
|
|
25863
26184
|
|
|
25864
26185
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -26074,7 +26395,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
26074
26395
|
(item) => item.id === id
|
|
26075
26396
|
);
|
|
26076
26397
|
if (panelUiItemIndex < 0) {
|
|
26077
|
-
throw new
|
|
26398
|
+
throw new RuntimeError57("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
26078
26399
|
}
|
|
26079
26400
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
26080
26401
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -26580,16 +26901,398 @@ var ReportPanelController = class extends ControlController {
|
|
|
26580
26901
|
}
|
|
26581
26902
|
};
|
|
26582
26903
|
|
|
26904
|
+
// src/controller/control/gantt/gantt.controller.ts
|
|
26905
|
+
import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
|
|
26906
|
+
|
|
26583
26907
|
// src/controller/control/gantt/gantt.service.ts
|
|
26584
|
-
|
|
26908
|
+
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
26909
|
+
var GanttService = class extends TreeService {
|
|
26910
|
+
/**
|
|
26911
|
+
* 获取子节点数据
|
|
26912
|
+
*
|
|
26913
|
+
* @author tony001
|
|
26914
|
+
* @date 2023-12-11 18:12:58
|
|
26915
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
26916
|
+
* @param {TreeFetchOpts} opts
|
|
26917
|
+
* @return {*} {(Promise<IGanttNodeData[] | undefined>)}
|
|
26918
|
+
*/
|
|
26919
|
+
async fetchGanttChildNodes(parentNodeData, opts) {
|
|
26920
|
+
const { hasQuery } = opts;
|
|
26921
|
+
let childrenNodes = [];
|
|
26922
|
+
if (!parentNodeData) {
|
|
26923
|
+
const rootNode = getRootNode(this.model);
|
|
26924
|
+
childrenNodes = await this.fetchGanttNodeDatasByType(
|
|
26925
|
+
rootNode,
|
|
26926
|
+
void 0,
|
|
26927
|
+
void 0,
|
|
26928
|
+
opts
|
|
26929
|
+
);
|
|
26930
|
+
} else {
|
|
26931
|
+
const childNodeRSs = getChildNodeRSs(this.model, {
|
|
26932
|
+
parentId: parentNodeData.nodeId,
|
|
26933
|
+
hasQuery
|
|
26934
|
+
});
|
|
26935
|
+
if (childNodeRSs.length === 0) {
|
|
26936
|
+
return;
|
|
26937
|
+
}
|
|
26938
|
+
const results = await handleAllSettled(
|
|
26939
|
+
childNodeRSs.map(async (childNodeRS) => {
|
|
26940
|
+
const childNode = getTreeNode(
|
|
26941
|
+
this.model,
|
|
26942
|
+
childNodeRS.childDETreeNodeId
|
|
26943
|
+
);
|
|
26944
|
+
return this.fetchGanttNodeDatasByType(
|
|
26945
|
+
childNode,
|
|
26946
|
+
childNodeRS,
|
|
26947
|
+
parentNodeData,
|
|
26948
|
+
opts
|
|
26949
|
+
);
|
|
26950
|
+
}),
|
|
26951
|
+
false
|
|
26952
|
+
);
|
|
26953
|
+
results.forEach((result) => {
|
|
26954
|
+
childrenNodes.push(...result);
|
|
26955
|
+
});
|
|
26956
|
+
}
|
|
26957
|
+
return childrenNodes;
|
|
26958
|
+
}
|
|
26959
|
+
/**
|
|
26960
|
+
* 通过节点类型加载节点数据
|
|
26961
|
+
*
|
|
26962
|
+
* @author tony001
|
|
26963
|
+
* @date 2023-12-11 18:12:35
|
|
26964
|
+
* @protected
|
|
26965
|
+
* @param {IDETreeNode} nodeModel
|
|
26966
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
26967
|
+
* @param {(ITreeNodeData | undefined)} parentNodeData
|
|
26968
|
+
* @param {TreeFetchOpts} opts
|
|
26969
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
26970
|
+
*/
|
|
26971
|
+
async fetchGanttNodeDatasByType(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26972
|
+
const leaf = getChildNodeRSs(this.model, {
|
|
26973
|
+
parentId: nodeModel.id,
|
|
26974
|
+
hasQuery: opts.hasQuery
|
|
26975
|
+
}).length === 0;
|
|
26976
|
+
const tempOpts = { ...opts, leaf };
|
|
26977
|
+
let result = [];
|
|
26978
|
+
switch (nodeModel.treeNodeType) {
|
|
26979
|
+
case "STATIC":
|
|
26980
|
+
{
|
|
26981
|
+
const nodeData = await this.getStaticGanttNodeData(
|
|
26982
|
+
nodeModel,
|
|
26983
|
+
nodeRS,
|
|
26984
|
+
parentNodeData,
|
|
26985
|
+
tempOpts
|
|
26986
|
+
);
|
|
26987
|
+
result = [nodeData];
|
|
26988
|
+
}
|
|
26989
|
+
break;
|
|
26990
|
+
case "DE":
|
|
26991
|
+
result = await this.getDEGanttNodeDatas(
|
|
26992
|
+
nodeModel,
|
|
26993
|
+
nodeRS,
|
|
26994
|
+
parentNodeData,
|
|
26995
|
+
tempOpts
|
|
26996
|
+
);
|
|
26997
|
+
break;
|
|
26998
|
+
case "CODELIST":
|
|
26999
|
+
result = await this.getCodeListGanttNodeDatas(
|
|
27000
|
+
nodeModel,
|
|
27001
|
+
nodeRS,
|
|
27002
|
+
parentNodeData,
|
|
27003
|
+
tempOpts
|
|
27004
|
+
);
|
|
27005
|
+
break;
|
|
27006
|
+
default:
|
|
27007
|
+
throw new ModelError30(
|
|
27008
|
+
nodeModel,
|
|
27009
|
+
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
27010
|
+
);
|
|
27011
|
+
}
|
|
27012
|
+
const { expandFirstOnly, expanded, rootNode } = nodeModel;
|
|
27013
|
+
const isExpandedRoot = rootNode && !this.model.rootVisible;
|
|
27014
|
+
if (!leaf) {
|
|
27015
|
+
await Promise.all(
|
|
27016
|
+
result.map(async (childNode, index) => {
|
|
27017
|
+
if (expanded && // 全展开合只展开首节点expanded都为true
|
|
27018
|
+
(!expandFirstOnly || expandFirstOnly && index === 0) || isExpandedRoot) {
|
|
27019
|
+
const subChildrenNodes = await this.fetchGanttChildNodes(
|
|
27020
|
+
childNode,
|
|
27021
|
+
opts
|
|
27022
|
+
);
|
|
27023
|
+
childNode.children = subChildrenNodes;
|
|
27024
|
+
}
|
|
27025
|
+
})
|
|
27026
|
+
);
|
|
27027
|
+
}
|
|
27028
|
+
return result;
|
|
27029
|
+
}
|
|
27030
|
+
/**
|
|
27031
|
+
* 获取静态节点数据
|
|
27032
|
+
*
|
|
27033
|
+
* @author tony001
|
|
27034
|
+
* @date 2023-12-11 18:12:06
|
|
27035
|
+
* @protected
|
|
27036
|
+
* @param {IDETreeNode} nodeModel
|
|
27037
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
27038
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
27039
|
+
* @param {TreeFetchOpts} opts
|
|
27040
|
+
* @return {*} {Promise<IGanttNodeData>}
|
|
27041
|
+
*/
|
|
27042
|
+
async getStaticGanttNodeData(nodeModel, nodeRS, parentNodeData, opts) {
|
|
27043
|
+
const nodeData = new GanttStaticNodeData(
|
|
27044
|
+
this.model,
|
|
27045
|
+
nodeModel,
|
|
27046
|
+
parentNodeData,
|
|
27047
|
+
{ parentValueLevel: nodeRS == null ? void 0 : nodeRS.parentValueLevel, leaf: !!opts.leaf }
|
|
27048
|
+
);
|
|
27049
|
+
return nodeData;
|
|
27050
|
+
}
|
|
27051
|
+
/**
|
|
27052
|
+
* 获取实体数据集数据
|
|
27053
|
+
*
|
|
27054
|
+
* @author tony001
|
|
27055
|
+
* @date 2023-12-11 18:12:23
|
|
27056
|
+
* @protected
|
|
27057
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
27058
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
27059
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
27060
|
+
* @param {TreeFetchOpts} opts
|
|
27061
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27062
|
+
*/
|
|
27063
|
+
async getDEGanttNodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
27064
|
+
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
27065
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
27066
|
+
context: opts.context,
|
|
27067
|
+
params: opts.params,
|
|
27068
|
+
navContext: {},
|
|
27069
|
+
navParams: {}
|
|
27070
|
+
};
|
|
27071
|
+
params.size = nodeModel.maxSize || 1e3;
|
|
27072
|
+
if (nodeModel.sortAppDEFieldId) {
|
|
27073
|
+
Object.assign(params, {
|
|
27074
|
+
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir ? nodeModel.sortDir.toLowerCase() : "asc")
|
|
27075
|
+
});
|
|
27076
|
+
}
|
|
27077
|
+
const response = await this.app.deService.exec(
|
|
27078
|
+
appDataEntityId,
|
|
27079
|
+
appDEDataSetId,
|
|
27080
|
+
context,
|
|
27081
|
+
params
|
|
27082
|
+
);
|
|
27083
|
+
if (response.data.length) {
|
|
27084
|
+
const nodeDatas = response.data.map((item) => {
|
|
27085
|
+
return new GanttDataSetNodeData(this.model, nodeModel, parentNodeData, {
|
|
27086
|
+
data: item,
|
|
27087
|
+
leaf: !!opts.leaf,
|
|
27088
|
+
navContext,
|
|
27089
|
+
navParams
|
|
27090
|
+
});
|
|
27091
|
+
});
|
|
27092
|
+
return nodeDatas;
|
|
27093
|
+
}
|
|
27094
|
+
return [];
|
|
27095
|
+
}
|
|
27096
|
+
/**
|
|
27097
|
+
* 获取代码表节点数据
|
|
27098
|
+
*
|
|
27099
|
+
* @author tony001
|
|
27100
|
+
* @date 2023-12-11 18:12:35
|
|
27101
|
+
* @protected
|
|
27102
|
+
* @param {IDETreeCodeListNode} nodeModel
|
|
27103
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
27104
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
27105
|
+
* @param {TreeFetchOpts} opts
|
|
27106
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27107
|
+
*/
|
|
27108
|
+
async getCodeListGanttNodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
27109
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
27110
|
+
context: opts.context,
|
|
27111
|
+
params: opts.params,
|
|
27112
|
+
navContext: {},
|
|
27113
|
+
navParams: {}
|
|
27114
|
+
};
|
|
27115
|
+
const items = await this.app.codeList.get(
|
|
27116
|
+
nodeModel.codeListId,
|
|
27117
|
+
context,
|
|
27118
|
+
params
|
|
27119
|
+
);
|
|
27120
|
+
if (items.length) {
|
|
27121
|
+
const nodeDatas = items.map((item) => {
|
|
27122
|
+
return new GanttCodeListNodeData(
|
|
27123
|
+
this.model,
|
|
27124
|
+
nodeModel,
|
|
27125
|
+
parentNodeData,
|
|
27126
|
+
{
|
|
27127
|
+
data: item,
|
|
27128
|
+
leaf: !!opts.leaf,
|
|
27129
|
+
navContext,
|
|
27130
|
+
navParams
|
|
27131
|
+
}
|
|
27132
|
+
);
|
|
27133
|
+
});
|
|
27134
|
+
return nodeDatas;
|
|
27135
|
+
}
|
|
27136
|
+
return [];
|
|
27137
|
+
}
|
|
26585
27138
|
};
|
|
26586
27139
|
|
|
26587
27140
|
// src/controller/control/gantt/gantt.controller.ts
|
|
26588
27141
|
var GanttController = class extends MDControlController {
|
|
27142
|
+
constructor() {
|
|
27143
|
+
super(...arguments);
|
|
27144
|
+
/**
|
|
27145
|
+
* 上下文菜单控制器
|
|
27146
|
+
*
|
|
27147
|
+
* @author tony001
|
|
27148
|
+
* @date 2023-12-11 16:12:57
|
|
27149
|
+
* @type {{ [p: string]: ContextMenuController }}
|
|
27150
|
+
*/
|
|
27151
|
+
this.contextMenus = {};
|
|
27152
|
+
/**
|
|
27153
|
+
* 是否启用快速搜索
|
|
27154
|
+
*
|
|
27155
|
+
* @author tony001
|
|
27156
|
+
* @date 2023-12-11 16:12:13
|
|
27157
|
+
* @type {boolean}
|
|
27158
|
+
*/
|
|
27159
|
+
this.enableQuickSearch = false;
|
|
27160
|
+
}
|
|
27161
|
+
/**
|
|
27162
|
+
* 初始化状态
|
|
27163
|
+
*
|
|
27164
|
+
* @author tony001
|
|
27165
|
+
* @date 2023-12-11 16:12:20
|
|
27166
|
+
* @protected
|
|
27167
|
+
*/
|
|
27168
|
+
initState() {
|
|
27169
|
+
super.initState();
|
|
27170
|
+
this.state.size = 0;
|
|
27171
|
+
this.state.query = "";
|
|
27172
|
+
}
|
|
26589
27173
|
async onCreated() {
|
|
27174
|
+
var _a, _b;
|
|
26590
27175
|
await super.onCreated();
|
|
27176
|
+
if ((_a = this.model.detreeNodes) == null ? void 0 : _a[0].enableQuickSearch) {
|
|
27177
|
+
this.enableQuickSearch = true;
|
|
27178
|
+
}
|
|
27179
|
+
if (this.dataEntity) {
|
|
27180
|
+
const searchFields = (_b = this.dataEntity.appDEFields) == null ? void 0 : _b.filter((field) => {
|
|
27181
|
+
return field.enableQuickSearch;
|
|
27182
|
+
});
|
|
27183
|
+
const placeHolders = [];
|
|
27184
|
+
searchFields == null ? void 0 : searchFields.forEach((searchField) => {
|
|
27185
|
+
if ((searchField == null ? void 0 : searchField.lnlanguageRes) && searchField.lnlanguageRes.lanResTag) {
|
|
27186
|
+
placeHolders.push(
|
|
27187
|
+
ibiz.i18n.t(
|
|
27188
|
+
searchField.lnlanguageRes.lanResTag,
|
|
27189
|
+
searchField.logicName
|
|
27190
|
+
)
|
|
27191
|
+
);
|
|
27192
|
+
} else if (searchField == null ? void 0 : searchField.logicName) {
|
|
27193
|
+
placeHolders.push(searchField.logicName);
|
|
27194
|
+
}
|
|
27195
|
+
});
|
|
27196
|
+
if (placeHolders.length > 0) {
|
|
27197
|
+
this.state.placeHolder = placeHolders.join("\u3001");
|
|
27198
|
+
}
|
|
27199
|
+
}
|
|
26591
27200
|
this.service = new GanttService(this.model);
|
|
26592
27201
|
await this.service.init(this.context);
|
|
27202
|
+
this.model.detreeNodes.forEach((node) => {
|
|
27203
|
+
var _a2, _b2;
|
|
27204
|
+
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
27205
|
+
this.contextMenus[node.decontextMenu.id] = new ContextMenuController(
|
|
27206
|
+
node.decontextMenu,
|
|
27207
|
+
this.context,
|
|
27208
|
+
this.params,
|
|
27209
|
+
this.ctx
|
|
27210
|
+
);
|
|
27211
|
+
}
|
|
27212
|
+
});
|
|
27213
|
+
await Promise.all(
|
|
27214
|
+
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
27215
|
+
);
|
|
27216
|
+
}
|
|
27217
|
+
/**
|
|
27218
|
+
* 加载
|
|
27219
|
+
*
|
|
27220
|
+
* @author tony001
|
|
27221
|
+
* @date 2023-12-12 11:12:08
|
|
27222
|
+
* @param {MDCtrlLoadParams} [args={}]
|
|
27223
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27224
|
+
*/
|
|
27225
|
+
async load(args = {}) {
|
|
27226
|
+
const isInitialLoad = args.isInitialLoad === true;
|
|
27227
|
+
if (isInitialLoad) {
|
|
27228
|
+
await this.startLoading();
|
|
27229
|
+
}
|
|
27230
|
+
let nodes;
|
|
27231
|
+
try {
|
|
27232
|
+
nodes = await this.loadNodes();
|
|
27233
|
+
} finally {
|
|
27234
|
+
if (isInitialLoad) {
|
|
27235
|
+
await this.endLoading();
|
|
27236
|
+
}
|
|
27237
|
+
}
|
|
27238
|
+
await this.afterLoad(args, nodes);
|
|
27239
|
+
this.state.isLoaded = true;
|
|
27240
|
+
await this.evt.emit("onLoadSuccess", {
|
|
27241
|
+
isInitialLoad
|
|
27242
|
+
});
|
|
27243
|
+
return nodes;
|
|
27244
|
+
}
|
|
27245
|
+
/**
|
|
27246
|
+
* 获取查询参数
|
|
27247
|
+
*
|
|
27248
|
+
* @author tony001
|
|
27249
|
+
* @date 2023-12-12 11:12:22
|
|
27250
|
+
* @param {IParams} [extraParams]
|
|
27251
|
+
* @return {*} {Promise<IParams>}
|
|
27252
|
+
*/
|
|
27253
|
+
async getFetchParams(extraParams) {
|
|
27254
|
+
const params = await super.getFetchParams(extraParams);
|
|
27255
|
+
if (this.state.query) {
|
|
27256
|
+
params.query = this.state.query;
|
|
27257
|
+
}
|
|
27258
|
+
return params;
|
|
27259
|
+
}
|
|
27260
|
+
/**
|
|
27261
|
+
* 加载节点
|
|
27262
|
+
*
|
|
27263
|
+
* @author tony001
|
|
27264
|
+
* @date 2023-12-12 11:12:33
|
|
27265
|
+
* @param {IGanttNodeData} [parentNode]
|
|
27266
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27267
|
+
*/
|
|
27268
|
+
async loadNodes(parentNode) {
|
|
27269
|
+
const params = await this.getFetchParams();
|
|
27270
|
+
const hasQuery = !!params.query;
|
|
27271
|
+
this.state.isLoading = true;
|
|
27272
|
+
let nodes;
|
|
27273
|
+
try {
|
|
27274
|
+
nodes = await this.service.fetchGanttChildNodes(parentNode, {
|
|
27275
|
+
context: this.context.clone(),
|
|
27276
|
+
params,
|
|
27277
|
+
hasQuery,
|
|
27278
|
+
defaultExpandedKeys: []
|
|
27279
|
+
}) || [];
|
|
27280
|
+
} finally {
|
|
27281
|
+
this.state.isLoading = false;
|
|
27282
|
+
}
|
|
27283
|
+
if (parentNode) {
|
|
27284
|
+
parentNode.children = nodes;
|
|
27285
|
+
} else {
|
|
27286
|
+
this.state.rootNodes = nodes;
|
|
27287
|
+
}
|
|
27288
|
+
this.state.items = [];
|
|
27289
|
+
recursiveIterate11(
|
|
27290
|
+
{ children: this.state.rootNodes },
|
|
27291
|
+
(node) => {
|
|
27292
|
+
this.state.items.push(node);
|
|
27293
|
+
}
|
|
27294
|
+
);
|
|
27295
|
+
return nodes;
|
|
26593
27296
|
}
|
|
26594
27297
|
};
|
|
26595
27298
|
|
|
@@ -26789,7 +27492,7 @@ var AppHub = class {
|
|
|
26789
27492
|
this.registerAppView(appView);
|
|
26790
27493
|
return appView;
|
|
26791
27494
|
}
|
|
26792
|
-
throw new
|
|
27495
|
+
throw new RuntimeError58("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
26793
27496
|
}
|
|
26794
27497
|
/**
|
|
26795
27498
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -26820,7 +27523,7 @@ var AppHub = class {
|
|
|
26820
27523
|
this.registerAppDataEntity(entity, appId);
|
|
26821
27524
|
return entity;
|
|
26822
27525
|
}
|
|
26823
|
-
throw new
|
|
27526
|
+
throw new RuntimeError58("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
26824
27527
|
}
|
|
26825
27528
|
/**
|
|
26826
27529
|
* 新建 hub 应用
|
|
@@ -26835,7 +27538,7 @@ var AppHub = class {
|
|
|
26835
27538
|
return this.appMap.get(id);
|
|
26836
27539
|
}
|
|
26837
27540
|
if (!this.modelLoaderProvider) {
|
|
26838
|
-
throw new
|
|
27541
|
+
throw new RuntimeError58("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
26839
27542
|
}
|
|
26840
27543
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
26841
27544
|
const app = new Application(appModel);
|
|
@@ -26935,7 +27638,7 @@ var EngineFactory = class {
|
|
|
26935
27638
|
};
|
|
26936
27639
|
|
|
26937
27640
|
// src/engine/view-base.engine.ts
|
|
26938
|
-
import { RuntimeError as
|
|
27641
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
26939
27642
|
var ViewEngineBase = class {
|
|
26940
27643
|
/**
|
|
26941
27644
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -27123,7 +27826,7 @@ var ViewEngineBase = class {
|
|
|
27123
27826
|
const { appDataEntityId } = this.view.model;
|
|
27124
27827
|
const { evt, context, params } = this.view;
|
|
27125
27828
|
if (!appDataEntityId) {
|
|
27126
|
-
throw new
|
|
27829
|
+
throw new RuntimeError59("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
27127
27830
|
}
|
|
27128
27831
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
27129
27832
|
const res = await app.deService.exec(
|
|
@@ -27485,16 +28188,16 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27485
28188
|
// src/utils/error-handler/default-error-handler.ts
|
|
27486
28189
|
import {
|
|
27487
28190
|
RuntimeModelError as RuntimeModelError62,
|
|
27488
|
-
ModelError as
|
|
27489
|
-
HttpError as
|
|
28191
|
+
ModelError as ModelError31,
|
|
28192
|
+
HttpError as HttpError5,
|
|
27490
28193
|
NoticeError as NoticeError2,
|
|
27491
|
-
RuntimeError as
|
|
28194
|
+
RuntimeError as RuntimeError60
|
|
27492
28195
|
} from "@ibiz-template/core";
|
|
27493
28196
|
var DefaultErrorHandler = class {
|
|
27494
28197
|
handle(error) {
|
|
27495
|
-
if (error instanceof RuntimeModelError62 || error instanceof
|
|
28198
|
+
if (error instanceof RuntimeModelError62 || error instanceof ModelError31) {
|
|
27496
28199
|
ibiz.message.error(error.message, 10, true);
|
|
27497
|
-
} else if (error instanceof
|
|
28200
|
+
} else if (error instanceof HttpError5) {
|
|
27498
28201
|
if (error.status === 401) {
|
|
27499
28202
|
ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
|
|
27500
28203
|
} else {
|
|
@@ -27506,7 +28209,7 @@ var DefaultErrorHandler = class {
|
|
|
27506
28209
|
}
|
|
27507
28210
|
} else if (error instanceof NoticeError2) {
|
|
27508
28211
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
27509
|
-
} else if (error instanceof
|
|
28212
|
+
} else if (error instanceof RuntimeError60) {
|
|
27510
28213
|
ibiz.message.error(error.message, 10, true);
|
|
27511
28214
|
}
|
|
27512
28215
|
ibiz.log.error(error);
|
|
@@ -27648,7 +28351,7 @@ var GlobalUtil = class {
|
|
|
27648
28351
|
};
|
|
27649
28352
|
|
|
27650
28353
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27651
|
-
import { RuntimeError as
|
|
28354
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
27652
28355
|
var LogicExecutor = class {
|
|
27653
28356
|
/**
|
|
27654
28357
|
* @author lxm
|
|
@@ -27669,7 +28372,7 @@ var LogicExecutor = class {
|
|
|
27669
28372
|
*/
|
|
27670
28373
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27671
28374
|
execute(_executeParams) {
|
|
27672
|
-
throw new
|
|
28375
|
+
throw new RuntimeError61("Method not implemented.");
|
|
27673
28376
|
}
|
|
27674
28377
|
/**
|
|
27675
28378
|
* 销毁方法
|
|
@@ -27681,7 +28384,7 @@ var LogicExecutor = class {
|
|
|
27681
28384
|
};
|
|
27682
28385
|
|
|
27683
28386
|
// src/logic-scheduler/executor/logic-executor-factory.ts
|
|
27684
|
-
import { ModelError as
|
|
28387
|
+
import { ModelError as ModelError32 } from "@ibiz-template/core";
|
|
27685
28388
|
var LogicExecutorFactory = class {
|
|
27686
28389
|
constructor() {
|
|
27687
28390
|
/**
|
|
@@ -27711,7 +28414,7 @@ var LogicExecutorFactory = class {
|
|
|
27711
28414
|
createExecutor(logic, scheduler) {
|
|
27712
28415
|
const constructor = this.constructorMap.get(logic.logicType);
|
|
27713
28416
|
if (!constructor) {
|
|
27714
|
-
throw new
|
|
28417
|
+
throw new ModelError32(logic, "\u903B\u8F91\u7C7B\u578B ".concat(logic.logicType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27715
28418
|
}
|
|
27716
28419
|
return constructor(logic, scheduler);
|
|
27717
28420
|
}
|
|
@@ -28029,7 +28732,7 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
28029
28732
|
};
|
|
28030
28733
|
|
|
28031
28734
|
// src/logic-scheduler/trigger/logic-trigger-factory.ts
|
|
28032
|
-
import { ModelError as
|
|
28735
|
+
import { ModelError as ModelError33 } from "@ibiz-template/core";
|
|
28033
28736
|
var LogicTriggerFactory = class {
|
|
28034
28737
|
constructor() {
|
|
28035
28738
|
/**
|
|
@@ -28059,7 +28762,7 @@ var LogicTriggerFactory = class {
|
|
|
28059
28762
|
createTrigger(logic, scheduler) {
|
|
28060
28763
|
const constructor = this.constructorMap.get(logic.triggerType);
|
|
28061
28764
|
if (!constructor) {
|
|
28062
|
-
throw new
|
|
28765
|
+
throw new ModelError33(logic, "\u89E6\u53D1\u5668\u7C7B\u578B ".concat(logic.triggerType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
28063
28766
|
}
|
|
28064
28767
|
return constructor(logic, scheduler);
|
|
28065
28768
|
}
|
|
@@ -28106,7 +28809,7 @@ var LogicSchedulerCenter = class {
|
|
|
28106
28809
|
};
|
|
28107
28810
|
|
|
28108
28811
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
28109
|
-
import { RuntimeError as
|
|
28812
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
28110
28813
|
var LogicTrigger = class {
|
|
28111
28814
|
/**
|
|
28112
28815
|
* @author lxm
|
|
@@ -28166,7 +28869,7 @@ var LogicTrigger = class {
|
|
|
28166
28869
|
if (this.executor) {
|
|
28167
28870
|
return this.executor.execute(executeParams);
|
|
28168
28871
|
}
|
|
28169
|
-
throw new
|
|
28872
|
+
throw new RuntimeError62("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
28170
28873
|
}
|
|
28171
28874
|
/**
|
|
28172
28875
|
* 销毁方法
|
|
@@ -28183,12 +28886,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
28183
28886
|
};
|
|
28184
28887
|
|
|
28185
28888
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
28186
|
-
import { RuntimeError as
|
|
28889
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
28187
28890
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
28188
28891
|
bindExecutor(executor) {
|
|
28189
28892
|
super.bindExecutor(executor);
|
|
28190
28893
|
if (this.executor.type !== "SCRIPT") {
|
|
28191
|
-
throw new
|
|
28894
|
+
throw new RuntimeError63(
|
|
28192
28895
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
28193
28896
|
);
|
|
28194
28897
|
}
|
|
@@ -28224,7 +28927,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
28224
28927
|
};
|
|
28225
28928
|
|
|
28226
28929
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
28227
|
-
import { RuntimeError as
|
|
28930
|
+
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
28228
28931
|
var TimerTrigger = class extends LogicTrigger {
|
|
28229
28932
|
constructor() {
|
|
28230
28933
|
super(...arguments);
|
|
@@ -28236,7 +28939,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28236
28939
|
}
|
|
28237
28940
|
this.timer = setInterval(() => {
|
|
28238
28941
|
if (!this.scheduler.defaultParamsCb) {
|
|
28239
|
-
throw new
|
|
28942
|
+
throw new RuntimeError64("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
28240
28943
|
}
|
|
28241
28944
|
const params = this.scheduler.defaultParamsCb();
|
|
28242
28945
|
this.executor.execute(params);
|
|
@@ -28252,8 +28955,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28252
28955
|
|
|
28253
28956
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28254
28957
|
import {
|
|
28255
|
-
ModelError as
|
|
28256
|
-
RuntimeError as
|
|
28958
|
+
ModelError as ModelError34,
|
|
28959
|
+
RuntimeError as RuntimeError65,
|
|
28257
28960
|
RuntimeModelError as RuntimeModelError65
|
|
28258
28961
|
} from "@ibiz-template/core";
|
|
28259
28962
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -28291,7 +28994,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28291
28994
|
const { context, params, ...rest } = parameters;
|
|
28292
28995
|
const { data } = parameters;
|
|
28293
28996
|
if (!(data == null ? void 0 : data[0])) {
|
|
28294
|
-
throw new
|
|
28997
|
+
throw new RuntimeError65("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
28295
28998
|
}
|
|
28296
28999
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28297
29000
|
let openViewRef;
|
|
@@ -28351,7 +29054,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28351
29054
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28352
29055
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
28353
29056
|
if (!findView) {
|
|
28354
|
-
throw new
|
|
29057
|
+
throw new RuntimeError65(
|
|
28355
29058
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28356
29059
|
);
|
|
28357
29060
|
}
|
|
@@ -28394,7 +29097,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28394
29097
|
);
|
|
28395
29098
|
}
|
|
28396
29099
|
} else if (batchAddOnly) {
|
|
28397
|
-
throw new
|
|
29100
|
+
throw new ModelError34(appUILogic, "batchAddOnly\u6682\u672A\u652F\u6301");
|
|
28398
29101
|
} else {
|
|
28399
29102
|
newViewRef = newDataAppView;
|
|
28400
29103
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
@@ -28470,7 +29173,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28470
29173
|
}
|
|
28471
29174
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
28472
29175
|
if (!selectData) {
|
|
28473
|
-
throw new
|
|
29176
|
+
throw new RuntimeError65("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
28474
29177
|
}
|
|
28475
29178
|
const indexType = selectData.srfkey;
|
|
28476
29179
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -28480,7 +29183,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28480
29183
|
}
|
|
28481
29184
|
);
|
|
28482
29185
|
if (!findView) {
|
|
28483
|
-
throw new
|
|
29186
|
+
throw new RuntimeError65(
|
|
28484
29187
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28485
29188
|
);
|
|
28486
29189
|
}
|
|
@@ -28872,8 +29575,11 @@ export {
|
|
|
28872
29575
|
FormTabPanelState,
|
|
28873
29576
|
FrontUIActionProvider,
|
|
28874
29577
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
29578
|
+
GanttCodeListNodeData,
|
|
28875
29579
|
GanttController,
|
|
29580
|
+
GanttDataSetNodeData,
|
|
28876
29581
|
GanttService,
|
|
29582
|
+
GanttStaticNodeData,
|
|
28877
29583
|
GridColumnController,
|
|
28878
29584
|
GridController,
|
|
28879
29585
|
GridFieldColumnController,
|