@ibiz-template/runtime 0.4.9 → 0.4.11
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 +847 -211
- package/dist/index.system.min.js +2 -2
- 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 +27 -16
- 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 -0
- 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/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/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/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-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/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 +8 -0
- 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 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +23 -3
- 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/package.json +5 -5
- package/src/controller/control/form/edit-form/edit-form.controller.ts +48 -32
- 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 -0
- package/src/controller/control/gantt/gantt.controller.ts +179 -1
- package/src/controller/control/gantt/gantt.service.ts +305 -6
- package/src/controller/control/wizard-panel/wizard-panel.controller.ts +27 -7
- package/src/interface/controller/controller/control/i-drbar.controller.ts +8 -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-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/index.ts +1 -0
- package/src/interface/service/service/i-auth.service.ts +9 -0
- package/src/register/helper/ui-action-register.ts +7 -1
- package/src/service/service/auth/v7-auth.service.ts +30 -3
- 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/dist/index.esm.js
CHANGED
|
@@ -75,7 +75,7 @@ var RegisterCenter = class {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
// src/command/app/app-func/app-func.ts
|
|
78
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
78
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
79
79
|
|
|
80
80
|
// src/utils/handlebars/utils/helper/helper.ts
|
|
81
81
|
var HelperUtil = class {
|
|
@@ -2721,7 +2721,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
2721
2721
|
}
|
|
2722
2722
|
|
|
2723
2723
|
// src/command/app/open-app-view/open-app-view.ts
|
|
2724
|
-
import { ModelError as ModelError14, RuntimeError as
|
|
2724
|
+
import { ModelError as ModelError14, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
2725
2725
|
import { clone as clone14 } from "ramda";
|
|
2726
2726
|
|
|
2727
2727
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
@@ -3445,7 +3445,7 @@ function getProvider8(key) {
|
|
|
3445
3445
|
}
|
|
3446
3446
|
async function getUIActionProvider(model) {
|
|
3447
3447
|
let provider;
|
|
3448
|
-
const { uiactionMode, sysPFPluginId, appId } = model;
|
|
3448
|
+
const { uiactionMode, sysPFPluginId, appId, uiactionTag } = model;
|
|
3449
3449
|
if (sysPFPluginId) {
|
|
3450
3450
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
3451
3451
|
if (pluginKey) {
|
|
@@ -3457,6 +3457,10 @@ async function getUIActionProvider(model) {
|
|
|
3457
3457
|
return provider;
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
+
provider = getProvider8("".concat(uiactionMode, "_").concat(uiactionTag));
|
|
3461
|
+
if (provider) {
|
|
3462
|
+
return provider;
|
|
3463
|
+
}
|
|
3460
3464
|
provider = getProvider8(uiactionMode);
|
|
3461
3465
|
if (!provider) {
|
|
3462
3466
|
throw new RuntimeError6("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -4223,6 +4227,7 @@ var DynamicCodeListCache = class {
|
|
|
4223
4227
|
// src/service/utils/de-cache/de-cache.ts
|
|
4224
4228
|
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4225
4229
|
import { createUUID } from "qx-util";
|
|
4230
|
+
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
4226
4231
|
|
|
4227
4232
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
4228
4233
|
import { RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
@@ -4246,7 +4251,8 @@ function isExistSessionId(funcName, context) {
|
|
|
4246
4251
|
|
|
4247
4252
|
// src/service/utils/de-cache/de-cache.ts
|
|
4248
4253
|
var DECache = class {
|
|
4249
|
-
constructor() {
|
|
4254
|
+
constructor(entity) {
|
|
4255
|
+
this.entity = entity;
|
|
4250
4256
|
/**
|
|
4251
4257
|
* 数据缓存
|
|
4252
4258
|
*
|
|
@@ -4256,6 +4262,18 @@ var DECache = class {
|
|
|
4256
4262
|
*/
|
|
4257
4263
|
this.cacheMap = /* @__PURE__ */ new Map();
|
|
4258
4264
|
}
|
|
4265
|
+
/**
|
|
4266
|
+
* 是否是联合主键
|
|
4267
|
+
* @author lxm
|
|
4268
|
+
* @date 2023-12-12 02:47:18
|
|
4269
|
+
* @readonly
|
|
4270
|
+
* @protected
|
|
4271
|
+
* @type {boolean}
|
|
4272
|
+
*/
|
|
4273
|
+
get isUnionKey() {
|
|
4274
|
+
var _a;
|
|
4275
|
+
return !!((_a = this.entity.unionKeyValueAppDEFieldIds) == null ? void 0 : _a.length);
|
|
4276
|
+
}
|
|
4259
4277
|
/**
|
|
4260
4278
|
* 强制设置数据,忽略其他逻辑
|
|
4261
4279
|
*
|
|
@@ -4307,6 +4325,14 @@ var DECache = class {
|
|
|
4307
4325
|
* @memberof EntityCache
|
|
4308
4326
|
*/
|
|
4309
4327
|
add(context, entity) {
|
|
4328
|
+
if (this.isUnionKey) {
|
|
4329
|
+
this.calcUnionKey(entity);
|
|
4330
|
+
if (this.checkData(context, entity.srfkey)) {
|
|
4331
|
+
throw new RuntimeError13(
|
|
4332
|
+
"\u65B0\u5EFA\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4333
|
+
);
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4310
4336
|
try {
|
|
4311
4337
|
isExistSessionId("add", context);
|
|
4312
4338
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
@@ -4351,16 +4377,25 @@ var DECache = class {
|
|
|
4351
4377
|
* @memberof EntityCache
|
|
4352
4378
|
*/
|
|
4353
4379
|
update(context, entity) {
|
|
4380
|
+
const oldKey = entity.srfkey;
|
|
4381
|
+
if (this.isUnionKey) {
|
|
4382
|
+
this.calcUnionKey(entity);
|
|
4383
|
+
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
4384
|
+
throw new RuntimeError13(
|
|
4385
|
+
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
4386
|
+
);
|
|
4387
|
+
}
|
|
4388
|
+
}
|
|
4354
4389
|
try {
|
|
4355
4390
|
isExistSessionId("update", context);
|
|
4356
4391
|
isExistSrfKey("update", entity);
|
|
4357
4392
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4358
4393
|
const map = this.getCacheByTag(context);
|
|
4359
|
-
const data = map.get(
|
|
4394
|
+
const data = map.get(oldKey);
|
|
4360
4395
|
if (data) {
|
|
4361
4396
|
data.assign(entity);
|
|
4362
|
-
map.set(
|
|
4363
|
-
ibiz.log.warn("update",
|
|
4397
|
+
map.set(oldKey, data);
|
|
4398
|
+
ibiz.log.warn("update", oldKey, entity);
|
|
4364
4399
|
return clone4(data);
|
|
4365
4400
|
}
|
|
4366
4401
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
@@ -4583,6 +4618,27 @@ var DECache = class {
|
|
|
4583
4618
|
}
|
|
4584
4619
|
return this.cacheMap.get(tag);
|
|
4585
4620
|
}
|
|
4621
|
+
/**
|
|
4622
|
+
* 根据联合键值计算主键并赋值
|
|
4623
|
+
* @author lxm
|
|
4624
|
+
* @date 2023-12-12 03:06:30
|
|
4625
|
+
* @param {(IDataEntity | IDataEntity[])} data 需要计算的数据或数据集合
|
|
4626
|
+
*/
|
|
4627
|
+
calcUnionKey(data) {
|
|
4628
|
+
const unionKeys = this.entity.unionKeyValueAppDEFieldIds.map(
|
|
4629
|
+
(id) => {
|
|
4630
|
+
const appField = findModelChild(this.entity.appDEFields || [], id);
|
|
4631
|
+
return appField.codeName.toLowerCase();
|
|
4632
|
+
}
|
|
4633
|
+
);
|
|
4634
|
+
const unionValues = unionKeys.map((key) => {
|
|
4635
|
+
if (isNil5(data[key])) {
|
|
4636
|
+
throw new RuntimeError13("\u8054\u5408\u952E\u503C\u8BA1\u7B97\u5F02\u5E38\uFF0C".concat(key, "\u5C5E\u6027\u4E3A\u7A7A\u503C\uFF01"));
|
|
4637
|
+
}
|
|
4638
|
+
return data[key];
|
|
4639
|
+
});
|
|
4640
|
+
data.srfkey = unionValues.join("");
|
|
4641
|
+
}
|
|
4586
4642
|
};
|
|
4587
4643
|
|
|
4588
4644
|
// src/service/utils/res-path/res-path.ts
|
|
@@ -4737,7 +4793,7 @@ function fieldValueToBoolean(value) {
|
|
|
4737
4793
|
}
|
|
4738
4794
|
|
|
4739
4795
|
// src/service/service/code-list/code-list.service.ts
|
|
4740
|
-
import { RuntimeError as
|
|
4796
|
+
import { RuntimeError as RuntimeError14 } from "@ibiz-template/core";
|
|
4741
4797
|
var CodeListService = class {
|
|
4742
4798
|
constructor(appModel) {
|
|
4743
4799
|
this.appModel = appModel;
|
|
@@ -4884,7 +4940,7 @@ var CodeListService = class {
|
|
|
4884
4940
|
async get(tag, context, params) {
|
|
4885
4941
|
const codeList = this.allCodeLists.get(tag);
|
|
4886
4942
|
if (!codeList) {
|
|
4887
|
-
throw new
|
|
4943
|
+
throw new RuntimeError14("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
4888
4944
|
}
|
|
4889
4945
|
if (codeList.codeListType === "STATIC") {
|
|
4890
4946
|
return this.getStatic(codeList);
|
|
@@ -5006,11 +5062,11 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
5006
5062
|
// src/service/service/entity/de.service.ts
|
|
5007
5063
|
import {
|
|
5008
5064
|
ModelError as ModelError5,
|
|
5009
|
-
RuntimeError as
|
|
5065
|
+
RuntimeError as RuntimeError16
|
|
5010
5066
|
} from "@ibiz-template/core";
|
|
5011
5067
|
|
|
5012
5068
|
// src/service/service/work-flow/work-flow.service.ts
|
|
5013
|
-
import { RuntimeError as
|
|
5069
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
5014
5070
|
var WorkFlowService = class {
|
|
5015
5071
|
/**
|
|
5016
5072
|
* Creates an instance of WorkFlowService.
|
|
@@ -5330,7 +5386,7 @@ var WorkFlowService = class {
|
|
|
5330
5386
|
case "sendcopy":
|
|
5331
5387
|
return this.wfSendCopy(context, params, data);
|
|
5332
5388
|
default: {
|
|
5333
|
-
throw new
|
|
5389
|
+
throw new RuntimeError15("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
|
|
5334
5390
|
}
|
|
5335
5391
|
}
|
|
5336
5392
|
}
|
|
@@ -5389,14 +5445,7 @@ var DEService = class {
|
|
|
5389
5445
|
* @type {Map<string, Method>}
|
|
5390
5446
|
*/
|
|
5391
5447
|
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();
|
|
5448
|
+
this.local = new DECache(model);
|
|
5400
5449
|
this.configCache = new ConfigService(
|
|
5401
5450
|
model.appId,
|
|
5402
5451
|
"PSAppDataEntity",
|
|
@@ -5445,7 +5494,7 @@ var DEService = class {
|
|
|
5445
5494
|
if (method) {
|
|
5446
5495
|
return method.exec(context, params, params2);
|
|
5447
5496
|
}
|
|
5448
|
-
throw new
|
|
5497
|
+
throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
5449
5498
|
}
|
|
5450
5499
|
getDraft(context, params, params2) {
|
|
5451
5500
|
return this.exec("GetDraft", context, params, params2);
|
|
@@ -5499,7 +5548,7 @@ var DEService = class {
|
|
|
5499
5548
|
if (method) {
|
|
5500
5549
|
return method.exec(context, params, params2);
|
|
5501
5550
|
}
|
|
5502
|
-
throw new
|
|
5551
|
+
throw new RuntimeError16("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
5503
5552
|
}
|
|
5504
5553
|
/**
|
|
5505
5554
|
* 实体级别 AI 聊天会话
|
|
@@ -5868,7 +5917,7 @@ var ControlService = class {
|
|
|
5868
5917
|
};
|
|
5869
5918
|
|
|
5870
5919
|
// src/service/service/control/md-control.service.ts
|
|
5871
|
-
import { RuntimeError as
|
|
5920
|
+
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
5872
5921
|
import { isArray as isArray3 } from "qx-util";
|
|
5873
5922
|
var MDControlService = class extends ControlService {
|
|
5874
5923
|
/**
|
|
@@ -5977,7 +6026,7 @@ var MDControlService = class extends ControlService {
|
|
|
5977
6026
|
* @returns {*} {Promise<IHttpResponse>}
|
|
5978
6027
|
*/
|
|
5979
6028
|
async exportData(_dataExport, _context, _params = {}) {
|
|
5980
|
-
throw new
|
|
6029
|
+
throw new RuntimeError17("\u672A\u5B9E\u73B0");
|
|
5981
6030
|
}
|
|
5982
6031
|
/**
|
|
5983
6032
|
* 处理响应
|
|
@@ -6012,7 +6061,7 @@ var MDControlService = class extends ControlService {
|
|
|
6012
6061
|
};
|
|
6013
6062
|
|
|
6014
6063
|
// src/service/service/authority/authority.service.ts
|
|
6015
|
-
import { RuntimeError as
|
|
6064
|
+
import { RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
6016
6065
|
|
|
6017
6066
|
// src/service/service/authority/de-authority.service.ts
|
|
6018
6067
|
var DeAuthorityService = class {
|
|
@@ -6148,7 +6197,7 @@ var AuthorityService = class {
|
|
|
6148
6197
|
this.appModel.appId
|
|
6149
6198
|
);
|
|
6150
6199
|
if (!entityModel) {
|
|
6151
|
-
throw new
|
|
6200
|
+
throw new RuntimeError18("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
6152
6201
|
}
|
|
6153
6202
|
const constructor = this.constructorCache.get(id);
|
|
6154
6203
|
let service;
|
|
@@ -6217,7 +6266,7 @@ var AuthorityService = class {
|
|
|
6217
6266
|
|
|
6218
6267
|
// src/service/service/auth/v7-auth.service.ts
|
|
6219
6268
|
import { CoreConst } from "@ibiz-template/core";
|
|
6220
|
-
import { clearCookie, setCookie } from "qx-util";
|
|
6269
|
+
import { clearCookie, getCookie, setCookie } from "qx-util";
|
|
6221
6270
|
var V7AuthService = class {
|
|
6222
6271
|
async login(loginname, password, rememberme) {
|
|
6223
6272
|
try {
|
|
@@ -6228,9 +6277,14 @@ var V7AuthService = class {
|
|
|
6228
6277
|
});
|
|
6229
6278
|
const { data } = res;
|
|
6230
6279
|
if (data && data.token) {
|
|
6231
|
-
setCookie(CoreConst.TOKEN, data.token, 0, true);
|
|
6280
|
+
setCookie(CoreConst.TOKEN, data.token, rememberme ? 7 : 0, true);
|
|
6232
6281
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
6233
|
-
setCookie(
|
|
6282
|
+
setCookie(
|
|
6283
|
+
CoreConst.TOKEN_EXPIRES,
|
|
6284
|
+
"".concat(expiredDate),
|
|
6285
|
+
rememberme ? 7 : 0,
|
|
6286
|
+
true
|
|
6287
|
+
);
|
|
6234
6288
|
}
|
|
6235
6289
|
return true;
|
|
6236
6290
|
} catch (err) {
|
|
@@ -6255,6 +6309,24 @@ var V7AuthService = class {
|
|
|
6255
6309
|
}
|
|
6256
6310
|
return false;
|
|
6257
6311
|
}
|
|
6312
|
+
async extendLogin() {
|
|
6313
|
+
const token = getCookie(CoreConst.TOKEN);
|
|
6314
|
+
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
6315
|
+
if (token && expirein) {
|
|
6316
|
+
let wait = Number(expirein) - (/* @__PURE__ */ new Date()).getTime();
|
|
6317
|
+
const early = 5 * 60 * 1e3;
|
|
6318
|
+
wait = wait > early ? wait - early : 0;
|
|
6319
|
+
setTimeout(async () => {
|
|
6320
|
+
const res = await ibiz.net.get("/uaa/refreshtoken2");
|
|
6321
|
+
if (res.ok) {
|
|
6322
|
+
setCookie(CoreConst.TOKEN, res.data.token, 0, true);
|
|
6323
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
6324
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), 0, true);
|
|
6325
|
+
}
|
|
6326
|
+
this.extendLogin();
|
|
6327
|
+
}, wait);
|
|
6328
|
+
}
|
|
6329
|
+
}
|
|
6258
6330
|
};
|
|
6259
6331
|
|
|
6260
6332
|
// src/service/service/async-action/async-action.service.ts
|
|
@@ -6289,8 +6361,9 @@ var AsyncActionService = class {
|
|
|
6289
6361
|
|
|
6290
6362
|
// src/service/service/entity/method/de-action.ts
|
|
6291
6363
|
import {
|
|
6364
|
+
HttpError as HttpError4,
|
|
6292
6365
|
HttpResponse as HttpResponse3,
|
|
6293
|
-
RuntimeError as
|
|
6366
|
+
RuntimeError as RuntimeError20,
|
|
6294
6367
|
RuntimeModelError as RuntimeModelError19
|
|
6295
6368
|
} from "@ibiz-template/core";
|
|
6296
6369
|
import { isArray as isArray7, isNil as isNil10 } from "lodash-es";
|
|
@@ -6884,7 +6957,7 @@ var Method = class {
|
|
|
6884
6957
|
};
|
|
6885
6958
|
|
|
6886
6959
|
// src/de-logic/index.ts
|
|
6887
|
-
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as
|
|
6960
|
+
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
6888
6961
|
import { isArray as isArray6 } from "lodash-es";
|
|
6889
6962
|
import { clone as clone12 } from "ramda";
|
|
6890
6963
|
|
|
@@ -7937,7 +8010,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
7937
8010
|
context.srfappid
|
|
7938
8011
|
);
|
|
7939
8012
|
if (!deLogic) {
|
|
7940
|
-
throw new
|
|
8013
|
+
throw new RuntimeError19("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
7941
8014
|
}
|
|
7942
8015
|
return execDELogic(deLogic, context, data, params);
|
|
7943
8016
|
}
|
|
@@ -8096,7 +8169,7 @@ var DEActionMethod = class extends Method {
|
|
|
8096
8169
|
*/
|
|
8097
8170
|
async create(context, data, params) {
|
|
8098
8171
|
if (!data) {
|
|
8099
|
-
throw new
|
|
8172
|
+
throw new RuntimeError20("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8100
8173
|
}
|
|
8101
8174
|
if (this.isLocalMode) {
|
|
8102
8175
|
return this.createTemp(context, this.createEntity(data));
|
|
@@ -8138,7 +8211,7 @@ var DEActionMethod = class extends Method {
|
|
|
8138
8211
|
*/
|
|
8139
8212
|
async update(context, data, params) {
|
|
8140
8213
|
if (!data) {
|
|
8141
|
-
throw new
|
|
8214
|
+
throw new RuntimeError20("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
8142
8215
|
}
|
|
8143
8216
|
if (this.isLocalMode) {
|
|
8144
8217
|
return this.updateTemp(context, this.createEntity(data));
|
|
@@ -8214,7 +8287,7 @@ var DEActionMethod = class extends Method {
|
|
|
8214
8287
|
}
|
|
8215
8288
|
return new HttpResponse3(resultData);
|
|
8216
8289
|
} catch (err) {
|
|
8217
|
-
|
|
8290
|
+
throw new HttpError4(err);
|
|
8218
8291
|
}
|
|
8219
8292
|
}
|
|
8220
8293
|
/**
|
|
@@ -8261,7 +8334,7 @@ var DEActionMethod = class extends Method {
|
|
|
8261
8334
|
}
|
|
8262
8335
|
return new HttpResponse3(data, 500);
|
|
8263
8336
|
} catch (err) {
|
|
8264
|
-
|
|
8337
|
+
throw new HttpError4(err);
|
|
8265
8338
|
}
|
|
8266
8339
|
}
|
|
8267
8340
|
/**
|
|
@@ -8290,7 +8363,7 @@ var DEActionMethod = class extends Method {
|
|
|
8290
8363
|
}
|
|
8291
8364
|
return new HttpResponse3(resultData, 500);
|
|
8292
8365
|
} catch (err) {
|
|
8293
|
-
|
|
8366
|
+
throw new HttpError4(err);
|
|
8294
8367
|
}
|
|
8295
8368
|
}
|
|
8296
8369
|
/**
|
|
@@ -8317,7 +8390,7 @@ var DEActionMethod = class extends Method {
|
|
|
8317
8390
|
}
|
|
8318
8391
|
return new HttpResponse3(data, 500);
|
|
8319
8392
|
} catch (err) {
|
|
8320
|
-
|
|
8393
|
+
throw new HttpError4(err);
|
|
8321
8394
|
}
|
|
8322
8395
|
}
|
|
8323
8396
|
/**
|
|
@@ -9039,6 +9112,122 @@ var ChartData = class {
|
|
|
9039
9112
|
}
|
|
9040
9113
|
};
|
|
9041
9114
|
|
|
9115
|
+
// src/service/vo/gantt-node-data/gantt-node-data-util.ts
|
|
9116
|
+
var calcDataItemValue = (fieldCodeName, nodeModel, data = {}) => {
|
|
9117
|
+
let result = "";
|
|
9118
|
+
if (!fieldCodeName || !nodeModel.detreeNodeDataItems) {
|
|
9119
|
+
return result;
|
|
9120
|
+
}
|
|
9121
|
+
const targetTreeNodeDataItem = nodeModel.detreeNodeDataItems.find((nodeDataItem) => {
|
|
9122
|
+
return nodeDataItem.id === fieldCodeName;
|
|
9123
|
+
});
|
|
9124
|
+
if (targetTreeNodeDataItem && targetTreeNodeDataItem.appDEFieldId) {
|
|
9125
|
+
result = data[targetTreeNodeDataItem.appDEFieldId];
|
|
9126
|
+
}
|
|
9127
|
+
return result;
|
|
9128
|
+
};
|
|
9129
|
+
|
|
9130
|
+
// src/service/vo/gantt-node-data/gantt-static-node-data.ts
|
|
9131
|
+
var GanttStaticNodeData = class extends TreeStaticNodeData {
|
|
9132
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9133
|
+
super(nodeModel, parentNodeData, opts);
|
|
9134
|
+
this.sndataIteValue = calcDataItemValue(model.sndataItemName, nodeModel);
|
|
9135
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9136
|
+
model.beginDataItemName,
|
|
9137
|
+
nodeModel
|
|
9138
|
+
);
|
|
9139
|
+
this.endDataItemValue = calcDataItemValue(model.endDataItemName, nodeModel);
|
|
9140
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9141
|
+
model.prevDataItemName,
|
|
9142
|
+
nodeModel
|
|
9143
|
+
);
|
|
9144
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9145
|
+
model.finishDataItemName,
|
|
9146
|
+
nodeModel
|
|
9147
|
+
);
|
|
9148
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9149
|
+
model.totalDataItemName,
|
|
9150
|
+
nodeModel
|
|
9151
|
+
);
|
|
9152
|
+
}
|
|
9153
|
+
};
|
|
9154
|
+
|
|
9155
|
+
// src/service/vo/gantt-node-data/gantt-data-set-node-data.ts
|
|
9156
|
+
var GanttDataSetNodeData = class extends TreeDataSetNodeData {
|
|
9157
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9158
|
+
super(nodeModel, parentNodeData, opts);
|
|
9159
|
+
const { data } = opts;
|
|
9160
|
+
this.sndataIteValue = calcDataItemValue(
|
|
9161
|
+
model.sndataItemName,
|
|
9162
|
+
nodeModel,
|
|
9163
|
+
data
|
|
9164
|
+
);
|
|
9165
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9166
|
+
model.beginDataItemName,
|
|
9167
|
+
nodeModel,
|
|
9168
|
+
data
|
|
9169
|
+
);
|
|
9170
|
+
this.endDataItemValue = calcDataItemValue(
|
|
9171
|
+
model.endDataItemName,
|
|
9172
|
+
nodeModel,
|
|
9173
|
+
data
|
|
9174
|
+
);
|
|
9175
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9176
|
+
model.prevDataItemName,
|
|
9177
|
+
nodeModel,
|
|
9178
|
+
data
|
|
9179
|
+
);
|
|
9180
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9181
|
+
model.finishDataItemName,
|
|
9182
|
+
nodeModel,
|
|
9183
|
+
data
|
|
9184
|
+
);
|
|
9185
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9186
|
+
model.totalDataItemName,
|
|
9187
|
+
nodeModel,
|
|
9188
|
+
data
|
|
9189
|
+
);
|
|
9190
|
+
}
|
|
9191
|
+
};
|
|
9192
|
+
|
|
9193
|
+
// src/service/vo/gantt-node-data/gantt-code-list-node-data.ts
|
|
9194
|
+
var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
9195
|
+
constructor(model, nodeModel, parentNodeData, opts) {
|
|
9196
|
+
super(nodeModel, parentNodeData, opts);
|
|
9197
|
+
const { data } = opts;
|
|
9198
|
+
this.sndataIteValue = calcDataItemValue(
|
|
9199
|
+
model.sndataItemName,
|
|
9200
|
+
nodeModel,
|
|
9201
|
+
data
|
|
9202
|
+
);
|
|
9203
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
9204
|
+
model.beginDataItemName,
|
|
9205
|
+
nodeModel,
|
|
9206
|
+
data
|
|
9207
|
+
);
|
|
9208
|
+
this.endDataItemValue = calcDataItemValue(
|
|
9209
|
+
model.endDataItemName,
|
|
9210
|
+
nodeModel,
|
|
9211
|
+
data
|
|
9212
|
+
);
|
|
9213
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
9214
|
+
model.prevDataItemName,
|
|
9215
|
+
nodeModel,
|
|
9216
|
+
data
|
|
9217
|
+
);
|
|
9218
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
9219
|
+
model.finishDataItemName,
|
|
9220
|
+
nodeModel,
|
|
9221
|
+
data
|
|
9222
|
+
);
|
|
9223
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
9224
|
+
model.totalDataItemName,
|
|
9225
|
+
nodeModel,
|
|
9226
|
+
data
|
|
9227
|
+
);
|
|
9228
|
+
}
|
|
9229
|
+
};
|
|
9230
|
+
|
|
9042
9231
|
// src/service/mqtt/mqtt.service.ts
|
|
9043
9232
|
import { QXEvent as QXEvent3, createUUID as createUUID5, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
9044
9233
|
var MqttService = class {
|
|
@@ -9133,7 +9322,7 @@ var MqttService = class {
|
|
|
9133
9322
|
};
|
|
9134
9323
|
|
|
9135
9324
|
// src/service/de-service-util.ts
|
|
9136
|
-
import { RuntimeError as
|
|
9325
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9137
9326
|
var DEServiceUtil = class {
|
|
9138
9327
|
/**
|
|
9139
9328
|
* Creates an instance of DEServiceUtil.
|
|
@@ -9188,7 +9377,7 @@ var DEServiceUtil = class {
|
|
|
9188
9377
|
this.appModel.appId
|
|
9189
9378
|
);
|
|
9190
9379
|
if (!entityModel) {
|
|
9191
|
-
throw new
|
|
9380
|
+
throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9192
9381
|
}
|
|
9193
9382
|
const constructor = this.constructorCache.get(id);
|
|
9194
9383
|
let service;
|
|
@@ -9251,7 +9440,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9251
9440
|
const context = clone14(_context);
|
|
9252
9441
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
9253
9442
|
if (!appView) {
|
|
9254
|
-
throw new
|
|
9443
|
+
throw new RuntimeError22("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
9255
9444
|
}
|
|
9256
9445
|
if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
|
|
9257
9446
|
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
@@ -9340,7 +9529,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
9340
9529
|
*/
|
|
9341
9530
|
async openPopover(appView, event, context, params = {}) {
|
|
9342
9531
|
if (!event) {
|
|
9343
|
-
throw new
|
|
9532
|
+
throw new RuntimeError22("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
9344
9533
|
}
|
|
9345
9534
|
return ibiz.openView.popover(appView.id, event, context, params);
|
|
9346
9535
|
}
|
|
@@ -9396,7 +9585,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9396
9585
|
const app = await ibiz.hub.getAppAsync(context.srfappid);
|
|
9397
9586
|
const appFunc = app.getAppFunc(appFuncId);
|
|
9398
9587
|
if (!appFunc) {
|
|
9399
|
-
throw new
|
|
9588
|
+
throw new RuntimeError23("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
|
|
9400
9589
|
}
|
|
9401
9590
|
const { navigateContexts, navigateParams, appFuncType } = appFunc;
|
|
9402
9591
|
const _context = context.clone();
|
|
@@ -9430,7 +9619,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9430
9619
|
*/
|
|
9431
9620
|
async openAppView(appFunc, context, params, opts) {
|
|
9432
9621
|
if (!appFunc.appViewId) {
|
|
9433
|
-
throw new
|
|
9622
|
+
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
|
|
9434
9623
|
}
|
|
9435
9624
|
return ibiz.commands.execute(
|
|
9436
9625
|
OpenAppViewCommand.TAG,
|
|
@@ -9464,7 +9653,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9464
9653
|
*/
|
|
9465
9654
|
openPdAppFunc(appFunc, context, params) {
|
|
9466
9655
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
9467
|
-
throw new
|
|
9656
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9468
9657
|
}
|
|
9469
9658
|
/**
|
|
9470
9659
|
* 执行 JavaScript 脚本
|
|
@@ -9478,7 +9667,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9478
9667
|
*/
|
|
9479
9668
|
executeJavaScript(appFunc, context, params) {
|
|
9480
9669
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
9481
|
-
throw new
|
|
9670
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9482
9671
|
}
|
|
9483
9672
|
/**
|
|
9484
9673
|
* 自定义应用功能
|
|
@@ -9492,7 +9681,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
9492
9681
|
*/
|
|
9493
9682
|
custom(appFunc, context, params) {
|
|
9494
9683
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
9495
|
-
throw new
|
|
9684
|
+
throw new RuntimeError23("\u672A\u5B9E\u73B0");
|
|
9496
9685
|
}
|
|
9497
9686
|
};
|
|
9498
9687
|
/**
|
|
@@ -9513,7 +9702,7 @@ function installCommand() {
|
|
|
9513
9702
|
}
|
|
9514
9703
|
|
|
9515
9704
|
// src/app-hub.ts
|
|
9516
|
-
import { RuntimeError as
|
|
9705
|
+
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
9517
9706
|
|
|
9518
9707
|
// src/application.ts
|
|
9519
9708
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -9705,7 +9894,7 @@ var Convert = class {
|
|
|
9705
9894
|
};
|
|
9706
9895
|
|
|
9707
9896
|
// src/hub/config/app-view-config-service.ts
|
|
9708
|
-
import { RuntimeError as
|
|
9897
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
9709
9898
|
var AppViewConfigService = class {
|
|
9710
9899
|
constructor() {
|
|
9711
9900
|
/**
|
|
@@ -9725,7 +9914,7 @@ var AppViewConfigService = class {
|
|
|
9725
9914
|
if (!this.viewConfigs.has(key)) {
|
|
9726
9915
|
const model = await ibiz.hub.getAppView(key);
|
|
9727
9916
|
if (!model) {
|
|
9728
|
-
throw new
|
|
9917
|
+
throw new RuntimeError24("\u89C6\u56FE[".concat(key, "]\u4E0D\u5B58\u5728"));
|
|
9729
9918
|
}
|
|
9730
9919
|
this.set(model.id, {
|
|
9731
9920
|
id: model.id,
|
|
@@ -9781,14 +9970,14 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
9781
9970
|
|
|
9782
9971
|
// src/controller/common/view/view.controller.ts
|
|
9783
9972
|
import { createUUID as createUUID7, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
9784
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
9973
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
9785
9974
|
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
9786
9975
|
|
|
9787
9976
|
// src/controller/utils/loading/loading.state.ts
|
|
9788
9977
|
import { NOOP } from "@ibiz-template/core";
|
|
9789
9978
|
|
|
9790
9979
|
// src/controller/utils/counter/counter.ts
|
|
9791
|
-
import { RuntimeError as
|
|
9980
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
9792
9981
|
var Counter = class {
|
|
9793
9982
|
/**
|
|
9794
9983
|
* Creates an instance of Counter.
|
|
@@ -9850,7 +10039,7 @@ var Counter = class {
|
|
|
9850
10039
|
return;
|
|
9851
10040
|
}
|
|
9852
10041
|
if (this.count === 0) {
|
|
9853
|
-
throw new
|
|
10042
|
+
throw new RuntimeError25("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
9854
10043
|
}
|
|
9855
10044
|
this.count -= 1;
|
|
9856
10045
|
if (this.count === 0) {
|
|
@@ -10427,7 +10616,7 @@ function getOriginData(data) {
|
|
|
10427
10616
|
}
|
|
10428
10617
|
|
|
10429
10618
|
// src/controller/utils/value-rule/value-rule.ts
|
|
10430
|
-
import { RuntimeError as
|
|
10619
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10431
10620
|
import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
|
|
10432
10621
|
import { isNil as isNil14 } from "ramda";
|
|
10433
10622
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -10477,7 +10666,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
10477
10666
|
deRule.groupCond
|
|
10478
10667
|
);
|
|
10479
10668
|
if (!isPast) {
|
|
10480
|
-
callback(new
|
|
10669
|
+
callback(new RuntimeError26(infoMessage || deRule.ruleInfo));
|
|
10481
10670
|
}
|
|
10482
10671
|
return true;
|
|
10483
10672
|
},
|
|
@@ -10547,7 +10736,7 @@ function generateEditorRules(editor) {
|
|
|
10547
10736
|
}
|
|
10548
10737
|
|
|
10549
10738
|
// src/controller/utils/value-ex/value-ex.ts
|
|
10550
|
-
import { RuntimeError as
|
|
10739
|
+
import { RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
10551
10740
|
import { isNil as isNil15, mergeLeft } from "ramda";
|
|
10552
10741
|
var ValueExUtil = class {
|
|
10553
10742
|
/**
|
|
@@ -10579,7 +10768,7 @@ var ValueExUtil = class {
|
|
|
10579
10768
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
10580
10769
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
10581
10770
|
if (!objectNameField) {
|
|
10582
|
-
throw new
|
|
10771
|
+
throw new RuntimeError27("\u7F3A\u5C11objectNameField");
|
|
10583
10772
|
}
|
|
10584
10773
|
const textKey = objectNameField.toLowerCase();
|
|
10585
10774
|
if (valueType === "OBJECTS") {
|
|
@@ -10595,7 +10784,7 @@ var ValueExUtil = class {
|
|
|
10595
10784
|
};
|
|
10596
10785
|
|
|
10597
10786
|
// src/controller/utils/value-default/value-default.ts
|
|
10598
|
-
import { RuntimeError as
|
|
10787
|
+
import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
10599
10788
|
import dayjs from "dayjs";
|
|
10600
10789
|
import { createUUID as createUUID6 } from "qx-util";
|
|
10601
10790
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
@@ -10636,7 +10825,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10636
10825
|
case "SESSION":
|
|
10637
10826
|
case "APPLICATION":
|
|
10638
10827
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
10639
|
-
throw new
|
|
10828
|
+
throw new RuntimeError28("appdata.context\u4E0D\u5B58\u5728");
|
|
10640
10829
|
}
|
|
10641
10830
|
return ibiz.appData.context[defaultValue];
|
|
10642
10831
|
case "CONTEXT":
|
|
@@ -10650,7 +10839,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10650
10839
|
|
|
10651
10840
|
// src/controller/utils/data-file-util/data-file-util.ts
|
|
10652
10841
|
import {
|
|
10653
|
-
RuntimeError as
|
|
10842
|
+
RuntimeError as RuntimeError29
|
|
10654
10843
|
} from "@ibiz-template/core";
|
|
10655
10844
|
var asyncImportUrl = "asyncimportdata2";
|
|
10656
10845
|
var importUrl = "importdata2";
|
|
@@ -10704,11 +10893,11 @@ async function importData(file, appDataEntity, dataImport) {
|
|
|
10704
10893
|
}
|
|
10705
10894
|
async function exportData(header, data, fileName) {
|
|
10706
10895
|
if (!ibiz.util.getExcelUtil) {
|
|
10707
|
-
throw new
|
|
10896
|
+
throw new RuntimeError29("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
10708
10897
|
}
|
|
10709
10898
|
const exportExcel = await ibiz.util.getExcelUtil();
|
|
10710
10899
|
if (!exportExcel) {
|
|
10711
|
-
throw new
|
|
10900
|
+
throw new RuntimeError29("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
10712
10901
|
}
|
|
10713
10902
|
try {
|
|
10714
10903
|
exportExcel.exportJsonToExcel({
|
|
@@ -10934,7 +11123,7 @@ var BaseController = class {
|
|
|
10934
11123
|
};
|
|
10935
11124
|
|
|
10936
11125
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
10937
|
-
import { RuntimeError as
|
|
11126
|
+
import { RuntimeError as RuntimeError30, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
10938
11127
|
import { isNil as isNil17, mergeRight as mergeRight2 } from "ramda";
|
|
10939
11128
|
var ViewMsgController = class _ViewMsgController {
|
|
10940
11129
|
constructor(msgGroupId) {
|
|
@@ -10960,7 +11149,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10960
11149
|
(item) => item.id === this.msgGroupId
|
|
10961
11150
|
);
|
|
10962
11151
|
if (!msgGroup) {
|
|
10963
|
-
throw new
|
|
11152
|
+
throw new RuntimeError30("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
10964
11153
|
}
|
|
10965
11154
|
this.msgGroup = msgGroup;
|
|
10966
11155
|
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
@@ -10974,7 +11163,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
10974
11163
|
}
|
|
10975
11164
|
});
|
|
10976
11165
|
if (msgDetailsViewMsgIds.length) {
|
|
10977
|
-
throw new
|
|
11166
|
+
throw new RuntimeError30(
|
|
10978
11167
|
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
10979
11168
|
);
|
|
10980
11169
|
}
|
|
@@ -11390,7 +11579,7 @@ var ViewController = class extends BaseController {
|
|
|
11390
11579
|
async callUIAction(key, args) {
|
|
11391
11580
|
const result = this.call(key, args);
|
|
11392
11581
|
if (result === void 0) {
|
|
11393
|
-
throw new
|
|
11582
|
+
throw new RuntimeError31("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11394
11583
|
}
|
|
11395
11584
|
return result;
|
|
11396
11585
|
}
|
|
@@ -11984,7 +12173,7 @@ var ControlController = class extends BaseController {
|
|
|
11984
12173
|
};
|
|
11985
12174
|
|
|
11986
12175
|
// src/controller/common/control/md-control.controller.ts
|
|
11987
|
-
import { isElementSame, RuntimeError as
|
|
12176
|
+
import { isElementSame, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
11988
12177
|
import { debounce } from "lodash-es";
|
|
11989
12178
|
var MDControlController = class extends ControlController {
|
|
11990
12179
|
constructor() {
|
|
@@ -12177,7 +12366,7 @@ var MDControlController = class extends ControlController {
|
|
|
12177
12366
|
async remove(args) {
|
|
12178
12367
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12179
12368
|
if (!(data == null ? void 0 : data.length)) {
|
|
12180
|
-
throw new
|
|
12369
|
+
throw new RuntimeError32("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12181
12370
|
}
|
|
12182
12371
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12183
12372
|
const del = await ibiz.confirm.error({
|
|
@@ -12316,7 +12505,7 @@ var MDControlController = class extends ControlController {
|
|
|
12316
12505
|
(importItem) => importItem.id === dedataImportId
|
|
12317
12506
|
);
|
|
12318
12507
|
if (!dataImport) {
|
|
12319
|
-
throw new
|
|
12508
|
+
throw new RuntimeError32("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
12320
12509
|
}
|
|
12321
12510
|
let importName = "DataImport";
|
|
12322
12511
|
if (dataImport.enableCustomized) {
|
|
@@ -12350,7 +12539,7 @@ var MDControlController = class extends ControlController {
|
|
|
12350
12539
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
12351
12540
|
import {
|
|
12352
12541
|
findRecursiveChild,
|
|
12353
|
-
RuntimeError as
|
|
12542
|
+
RuntimeError as RuntimeError33,
|
|
12354
12543
|
RuntimeModelError as RuntimeModelError23
|
|
12355
12544
|
} from "@ibiz-template/core";
|
|
12356
12545
|
var AppMenuController = class extends ControlController {
|
|
@@ -12390,7 +12579,7 @@ var AppMenuController = class extends ControlController {
|
|
|
12390
12579
|
childrenFields: ["appMenuItems"]
|
|
12391
12580
|
});
|
|
12392
12581
|
if (!menuItem) {
|
|
12393
|
-
throw new
|
|
12582
|
+
throw new RuntimeError33("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
12394
12583
|
}
|
|
12395
12584
|
this.evt.emit("onClick", {
|
|
12396
12585
|
eventArg: id,
|
|
@@ -12481,7 +12670,7 @@ var AppMenuController = class extends ControlController {
|
|
|
12481
12670
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
12482
12671
|
import {
|
|
12483
12672
|
findRecursiveChild as findRecursiveChild2,
|
|
12484
|
-
RuntimeError as
|
|
12673
|
+
RuntimeError as RuntimeError34,
|
|
12485
12674
|
RuntimeModelError as RuntimeModelError24
|
|
12486
12675
|
} from "@ibiz-template/core";
|
|
12487
12676
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -12491,7 +12680,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
12491
12680
|
childrenFields: ["appMenuItems"]
|
|
12492
12681
|
});
|
|
12493
12682
|
if (!menuItem) {
|
|
12494
|
-
throw new
|
|
12683
|
+
throw new RuntimeError34("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
12495
12684
|
}
|
|
12496
12685
|
this.evt.emit("onClick", {
|
|
12497
12686
|
eventArg: id,
|
|
@@ -12519,7 +12708,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
12519
12708
|
import dayjs2 from "dayjs";
|
|
12520
12709
|
|
|
12521
12710
|
// src/controller/control/calendar/calendar.service.ts
|
|
12522
|
-
import { RuntimeError as
|
|
12711
|
+
import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
|
|
12523
12712
|
var CalendarService = class extends MDControlService {
|
|
12524
12713
|
/**
|
|
12525
12714
|
* 执行查询多条数据的方法
|
|
@@ -12569,11 +12758,11 @@ var CalendarService = class extends MDControlService {
|
|
|
12569
12758
|
setCalendarConfigData(items, index) {
|
|
12570
12759
|
const { sysCalendarItems } = this.model;
|
|
12571
12760
|
if (!sysCalendarItems) {
|
|
12572
|
-
throw new
|
|
12761
|
+
throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
12573
12762
|
}
|
|
12574
12763
|
const calendarItem = sysCalendarItems[index];
|
|
12575
12764
|
if (!calendarItem) {
|
|
12576
|
-
throw new
|
|
12765
|
+
throw new RuntimeError35("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
12577
12766
|
}
|
|
12578
12767
|
return items.map((item) => {
|
|
12579
12768
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -12787,11 +12976,11 @@ var CalendarController = class extends MDControlController {
|
|
|
12787
12976
|
};
|
|
12788
12977
|
|
|
12789
12978
|
// src/controller/control/chart/chart.controller.ts
|
|
12790
|
-
import { RuntimeError as
|
|
12979
|
+
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
12791
12980
|
|
|
12792
12981
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
12793
12982
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
12794
|
-
import { RuntimeError as
|
|
12983
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
12795
12984
|
|
|
12796
12985
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
12797
12986
|
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
@@ -13800,7 +13989,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
13800
13989
|
getChartDataByParams(params) {
|
|
13801
13990
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
13802
13991
|
if (!generator) {
|
|
13803
|
-
throw new
|
|
13992
|
+
throw new RuntimeError36("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
13804
13993
|
}
|
|
13805
13994
|
return generator.getChartDataByParams(params);
|
|
13806
13995
|
}
|
|
@@ -13913,10 +14102,10 @@ var ChartController = class extends MDControlController {
|
|
|
13913
14102
|
*/
|
|
13914
14103
|
updateChart() {
|
|
13915
14104
|
if (!this.chart) {
|
|
13916
|
-
throw new
|
|
14105
|
+
throw new RuntimeError37("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
13917
14106
|
}
|
|
13918
14107
|
if (!this.options) {
|
|
13919
|
-
throw new
|
|
14108
|
+
throw new RuntimeError37("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
13920
14109
|
}
|
|
13921
14110
|
this.chart.setOption(this.options);
|
|
13922
14111
|
this.resizeChart();
|
|
@@ -13961,7 +14150,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
13961
14150
|
};
|
|
13962
14151
|
|
|
13963
14152
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
13964
|
-
import { recursiveIterate, RuntimeError as
|
|
14153
|
+
import { recursiveIterate, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
13965
14154
|
|
|
13966
14155
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
13967
14156
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
@@ -13971,7 +14160,7 @@ import { isArray as isArray9 } from "qx-util";
|
|
|
13971
14160
|
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
13972
14161
|
|
|
13973
14162
|
// src/ui-logic/index.ts
|
|
13974
|
-
import { RuntimeError as
|
|
14163
|
+
import { RuntimeError as RuntimeError43 } from "@ibiz-template/core";
|
|
13975
14164
|
|
|
13976
14165
|
// src/ui-logic/ui-logic.ts
|
|
13977
14166
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
@@ -14522,7 +14711,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
14522
14711
|
};
|
|
14523
14712
|
|
|
14524
14713
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
14525
|
-
import { ModelError as ModelError21, RuntimeError as
|
|
14714
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError38 } from "@ibiz-template/core";
|
|
14526
14715
|
import { clone as clone18 } from "ramda";
|
|
14527
14716
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
14528
14717
|
async exec(ctx) {
|
|
@@ -14572,7 +14761,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14572
14761
|
setParamValue(nodeParam, ctx) {
|
|
14573
14762
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
14574
14763
|
if (!dstDEUILogicParamId) {
|
|
14575
|
-
throw new
|
|
14764
|
+
throw new RuntimeError38("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
14576
14765
|
}
|
|
14577
14766
|
let dstField = dstFieldName;
|
|
14578
14767
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -14689,7 +14878,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
14689
14878
|
};
|
|
14690
14879
|
|
|
14691
14880
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
14692
|
-
import { RuntimeError as
|
|
14881
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
14693
14882
|
import { isFunction } from "lodash-es";
|
|
14694
14883
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
14695
14884
|
async exec(ctx) {
|
|
@@ -14706,14 +14895,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
14706
14895
|
}
|
|
14707
14896
|
const invokeParam = ctx.params[invokeParamId];
|
|
14708
14897
|
if (!invokeParam) {
|
|
14709
|
-
throw new
|
|
14898
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
14710
14899
|
}
|
|
14711
14900
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
14712
14901
|
if (!invokeCtrl) {
|
|
14713
|
-
throw new
|
|
14902
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
14714
14903
|
}
|
|
14715
14904
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
14716
|
-
throw new
|
|
14905
|
+
throw new RuntimeError39("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
14717
14906
|
}
|
|
14718
14907
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
14719
14908
|
}
|
|
@@ -14939,16 +15128,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
14939
15128
|
};
|
|
14940
15129
|
|
|
14941
15130
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
14942
|
-
import { RuntimeError as
|
|
15131
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
14943
15132
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
14944
15133
|
async exec(_ctx) {
|
|
14945
15134
|
const { errorInfo } = this.model;
|
|
14946
|
-
throw new
|
|
15135
|
+
throw new RuntimeError40(errorInfo);
|
|
14947
15136
|
}
|
|
14948
15137
|
};
|
|
14949
15138
|
|
|
14950
15139
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
14951
|
-
import { RuntimeError as
|
|
15140
|
+
import { RuntimeError as RuntimeError41, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
14952
15141
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
14953
15142
|
async exec(ctx) {
|
|
14954
15143
|
ctx.isEndNode = true;
|
|
@@ -14964,18 +15153,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
14964
15153
|
}
|
|
14965
15154
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
14966
15155
|
if (!invokeCtrl) {
|
|
14967
|
-
throw new
|
|
15156
|
+
throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
14968
15157
|
}
|
|
14969
15158
|
const eventParam = ctx.params[eventParamId];
|
|
14970
15159
|
if (!eventParam) {
|
|
14971
|
-
throw new
|
|
15160
|
+
throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
14972
15161
|
}
|
|
14973
15162
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
14974
15163
|
}
|
|
14975
15164
|
};
|
|
14976
15165
|
|
|
14977
15166
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
14978
|
-
import { RuntimeError as
|
|
15167
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
14979
15168
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
14980
15169
|
async exec(ctx) {
|
|
14981
15170
|
const {
|
|
@@ -14995,7 +15184,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
14995
15184
|
}
|
|
14996
15185
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
14997
15186
|
if (!dstParam) {
|
|
14998
|
-
throw new
|
|
15187
|
+
throw new RuntimeError42("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
14999
15188
|
}
|
|
15000
15189
|
const result = await execDELogicById(
|
|
15001
15190
|
dstAppDELogicId,
|
|
@@ -15319,7 +15508,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
15319
15508
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
15320
15509
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
15321
15510
|
if (!deUILogic) {
|
|
15322
|
-
throw new
|
|
15511
|
+
throw new RuntimeError43(
|
|
15323
15512
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
15324
15513
|
);
|
|
15325
15514
|
}
|
|
@@ -15332,7 +15521,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
15332
15521
|
}
|
|
15333
15522
|
|
|
15334
15523
|
// src/ui-action/uiaction-util.ts
|
|
15335
|
-
import { RuntimeError as
|
|
15524
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
15336
15525
|
var UIActionUtil = class {
|
|
15337
15526
|
/**
|
|
15338
15527
|
* 执行界面行为
|
|
@@ -15347,7 +15536,7 @@ var UIActionUtil = class {
|
|
|
15347
15536
|
static async exec(actionId, params, appId) {
|
|
15348
15537
|
const action = await getUIActionById(actionId, appId);
|
|
15349
15538
|
if (!action) {
|
|
15350
|
-
throw new
|
|
15539
|
+
throw new RuntimeError44("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
15351
15540
|
}
|
|
15352
15541
|
if (action.actionTarget === "SINGLEDATA") {
|
|
15353
15542
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -15760,7 +15949,7 @@ import {
|
|
|
15760
15949
|
StringUtil,
|
|
15761
15950
|
RuntimeModelError as RuntimeModelError48,
|
|
15762
15951
|
ModelError as ModelError25,
|
|
15763
|
-
RuntimeError as
|
|
15952
|
+
RuntimeError as RuntimeError45
|
|
15764
15953
|
} from "@ibiz-template/core";
|
|
15765
15954
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
15766
15955
|
async execAction(action, args) {
|
|
@@ -15870,7 +16059,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15870
16059
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
15871
16060
|
requestUrl += "/".concat((_b = appDataEntity.codeName2) == null ? void 0 : _b.toLowerCase(), "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
15872
16061
|
} else {
|
|
15873
|
-
throw new
|
|
16062
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
15874
16063
|
}
|
|
15875
16064
|
const res = await ibiz.net.request(requestUrl, {
|
|
15876
16065
|
method: "get",
|
|
@@ -15897,10 +16086,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15897
16086
|
window.open(link, "_blank");
|
|
15898
16087
|
}
|
|
15899
16088
|
} else {
|
|
15900
|
-
throw new
|
|
16089
|
+
throw new RuntimeError45("\u6253\u5370\u5931\u8D25");
|
|
15901
16090
|
}
|
|
15902
16091
|
} else {
|
|
15903
|
-
throw new
|
|
16092
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
15904
16093
|
}
|
|
15905
16094
|
}
|
|
15906
16095
|
/**
|
|
@@ -15943,7 +16132,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15943
16132
|
refreshMode: 1
|
|
15944
16133
|
};
|
|
15945
16134
|
}
|
|
15946
|
-
throw new
|
|
16135
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
15947
16136
|
}
|
|
15948
16137
|
/**
|
|
15949
16138
|
* 执行导出行为
|
|
@@ -15994,10 +16183,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
15994
16183
|
URL.revokeObjectURL(elink.href);
|
|
15995
16184
|
document.body.removeChild(elink);
|
|
15996
16185
|
} else {
|
|
15997
|
-
throw new
|
|
16186
|
+
throw new RuntimeError45("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
15998
16187
|
}
|
|
15999
16188
|
} else {
|
|
16000
|
-
throw new
|
|
16189
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
16001
16190
|
}
|
|
16002
16191
|
}
|
|
16003
16192
|
};
|
|
@@ -16022,6 +16211,23 @@ var WFWithdrawUIActionProvider = class extends UIActionProviderBase {
|
|
|
16022
16211
|
}
|
|
16023
16212
|
};
|
|
16024
16213
|
|
|
16214
|
+
// src/ui-action/provider/loginout-ui-action-provider.ts
|
|
16215
|
+
var LoginOutUIActionProvider = class extends UIActionProviderBase {
|
|
16216
|
+
async execAction(_action, _params) {
|
|
16217
|
+
const confirm = await ibiz.confirm.info({
|
|
16218
|
+
title: "\u786E\u8BA4\u9000\u51FA\u767B\u5F55",
|
|
16219
|
+
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"
|
|
16220
|
+
});
|
|
16221
|
+
if (confirm) {
|
|
16222
|
+
const bol = await ibiz.auth.logout();
|
|
16223
|
+
if (bol) {
|
|
16224
|
+
window.location.reload();
|
|
16225
|
+
}
|
|
16226
|
+
}
|
|
16227
|
+
return {};
|
|
16228
|
+
}
|
|
16229
|
+
};
|
|
16230
|
+
|
|
16025
16231
|
// src/ui-action/provider/index.ts
|
|
16026
16232
|
function presetUIActionProvider() {
|
|
16027
16233
|
const frontUIActionProvider = new FrontUIActionProvider();
|
|
@@ -16035,6 +16241,8 @@ function presetUIActionProvider() {
|
|
|
16035
16241
|
"DEUIACTION_WFWithdraw",
|
|
16036
16242
|
() => wfWithdrawUIActionProvider
|
|
16037
16243
|
);
|
|
16244
|
+
const loginOutUIActionProvider = new LoginOutUIActionProvider();
|
|
16245
|
+
registerUIActionProvider("SYS_Logout", () => loginOutUIActionProvider);
|
|
16038
16246
|
}
|
|
16039
16247
|
|
|
16040
16248
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
@@ -16065,7 +16273,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16065
16273
|
const actionId = item.uiactionId;
|
|
16066
16274
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
16067
16275
|
if (!uiAction) {
|
|
16068
|
-
throw new
|
|
16276
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
16069
16277
|
}
|
|
16070
16278
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
16071
16279
|
if (enableLoading) {
|
|
@@ -17110,7 +17318,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17110
17318
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
17111
17319
|
|
|
17112
17320
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
17113
|
-
import { RuntimeError as
|
|
17321
|
+
import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
17114
17322
|
var ExpBarControlController = class extends ControlController {
|
|
17115
17323
|
constructor() {
|
|
17116
17324
|
super(...arguments);
|
|
@@ -17436,7 +17644,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
17436
17644
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
17437
17645
|
return this.XDataModel.navAppViewId;
|
|
17438
17646
|
}
|
|
17439
|
-
throw new
|
|
17647
|
+
throw new RuntimeError47("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
17440
17648
|
}
|
|
17441
17649
|
/**
|
|
17442
17650
|
* 获取导航视图
|
|
@@ -17579,7 +17787,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
17579
17787
|
};
|
|
17580
17788
|
|
|
17581
17789
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
17582
|
-
import { RuntimeError as
|
|
17790
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17583
17791
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
17584
17792
|
constructor() {
|
|
17585
17793
|
super(...arguments);
|
|
@@ -17654,7 +17862,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
17654
17862
|
const deData = node.deData || node;
|
|
17655
17863
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
17656
17864
|
if (!nodeModel) {
|
|
17657
|
-
throw new
|
|
17865
|
+
throw new RuntimeError48("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
17658
17866
|
}
|
|
17659
17867
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
17660
17868
|
result.context.currentSrfNav = nodeId;
|
|
@@ -17845,7 +18053,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
17845
18053
|
};
|
|
17846
18054
|
|
|
17847
18055
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
17848
|
-
import { RuntimeError as
|
|
18056
|
+
import { RuntimeError as RuntimeError49, mergeDefaultInLeft } from "@ibiz-template/core";
|
|
17849
18057
|
|
|
17850
18058
|
// src/controller/control/form/form/form.controller.ts
|
|
17851
18059
|
import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate2 } from "@ibiz-template/core";
|
|
@@ -18375,7 +18583,7 @@ var SearchFormController = class extends FormController {
|
|
|
18375
18583
|
applyStoredFilter(index) {
|
|
18376
18584
|
const filter = this.state.storedFilters[index];
|
|
18377
18585
|
if (!filter) {
|
|
18378
|
-
throw new
|
|
18586
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
|
|
18379
18587
|
}
|
|
18380
18588
|
if (filter.data) {
|
|
18381
18589
|
Object.assign(this.data, filter.data);
|
|
@@ -18391,7 +18599,7 @@ var SearchFormController = class extends FormController {
|
|
|
18391
18599
|
async removeStoredFilter(index) {
|
|
18392
18600
|
const filter = this.state.storedFilters[index];
|
|
18393
18601
|
if (!filter) {
|
|
18394
|
-
throw new
|
|
18602
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
|
|
18395
18603
|
}
|
|
18396
18604
|
this.state.storedFilters.splice(index, 1);
|
|
18397
18605
|
await this.saveConfig();
|
|
@@ -18889,7 +19097,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
18889
19097
|
*/
|
|
18890
19098
|
this.refreshItems = ["srfkey"];
|
|
18891
19099
|
/**
|
|
18892
|
-
*
|
|
19100
|
+
* 参数项名称(这个模型暂不使用,相关场景可以通过配置导航参数实现)
|
|
18893
19101
|
*
|
|
18894
19102
|
* @author lxm
|
|
18895
19103
|
* @date 2022-09-15 19:09:36
|
|
@@ -19229,6 +19437,20 @@ var FormItemController = class extends FormDetailController {
|
|
|
19229
19437
|
}
|
|
19230
19438
|
return void 0;
|
|
19231
19439
|
}
|
|
19440
|
+
/**
|
|
19441
|
+
* 标签标题
|
|
19442
|
+
* @author lxm
|
|
19443
|
+
* @date 2023-12-12 09:48:21
|
|
19444
|
+
* @readonly
|
|
19445
|
+
* @type {(string | undefined)}
|
|
19446
|
+
*/
|
|
19447
|
+
get labelCaption() {
|
|
19448
|
+
const { captionItemName } = this.model;
|
|
19449
|
+
if (captionItemName) {
|
|
19450
|
+
return this.data[captionItemName];
|
|
19451
|
+
}
|
|
19452
|
+
return this.model.caption;
|
|
19453
|
+
}
|
|
19232
19454
|
/**
|
|
19233
19455
|
* 单位
|
|
19234
19456
|
* @author lxm
|
|
@@ -19654,7 +19876,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
19654
19876
|
};
|
|
19655
19877
|
|
|
19656
19878
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
19657
|
-
import { RuntimeError as
|
|
19879
|
+
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
19658
19880
|
import { createUUID as createUUID9 } from "qx-util";
|
|
19659
19881
|
|
|
19660
19882
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -19765,7 +19987,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
19765
19987
|
async remove(id) {
|
|
19766
19988
|
const controller = this.formMap.get(id);
|
|
19767
19989
|
if (!controller) {
|
|
19768
|
-
throw new
|
|
19990
|
+
throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
19769
19991
|
}
|
|
19770
19992
|
await controller.remove();
|
|
19771
19993
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
@@ -20028,7 +20250,7 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
20028
20250
|
import {
|
|
20029
20251
|
awaitTimeout,
|
|
20030
20252
|
mergeInLeft as mergeInLeft2,
|
|
20031
|
-
RuntimeError as
|
|
20253
|
+
RuntimeError as RuntimeError51,
|
|
20032
20254
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
20033
20255
|
} from "@ibiz-template/core";
|
|
20034
20256
|
import { debounce as debounce2 } from "lodash-es";
|
|
@@ -20475,7 +20697,7 @@ var EditFormController = class extends FormController {
|
|
|
20475
20697
|
}
|
|
20476
20698
|
const isValid = await this.validate();
|
|
20477
20699
|
if (!isValid) {
|
|
20478
|
-
throw new
|
|
20700
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20479
20701
|
}
|
|
20480
20702
|
if (!silent) {
|
|
20481
20703
|
await this.startLoading();
|
|
@@ -20601,37 +20823,53 @@ var EditFormController = class extends FormController {
|
|
|
20601
20823
|
(item) => item.id === formItemUpdateId
|
|
20602
20824
|
);
|
|
20603
20825
|
if (!formItemUpdate) {
|
|
20604
|
-
throw new
|
|
20826
|
+
throw new RuntimeError51("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
20605
20827
|
}
|
|
20606
|
-
const {
|
|
20828
|
+
const {
|
|
20829
|
+
appDEMethodId,
|
|
20830
|
+
defiupdateDetails,
|
|
20831
|
+
customCode,
|
|
20832
|
+
scriptCode,
|
|
20833
|
+
showBusyIndicator
|
|
20834
|
+
} = formItemUpdate;
|
|
20607
20835
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
params
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20836
|
+
try {
|
|
20837
|
+
if (showBusyIndicator) {
|
|
20838
|
+
this.startLoading();
|
|
20839
|
+
}
|
|
20840
|
+
let updateData;
|
|
20841
|
+
if (customCode && scriptCode) {
|
|
20842
|
+
updateData = ScriptFactory.execScriptFn(
|
|
20843
|
+
{
|
|
20844
|
+
...this.getEventArgs(),
|
|
20845
|
+
data: this.data
|
|
20846
|
+
},
|
|
20847
|
+
scriptCode,
|
|
20848
|
+
{
|
|
20849
|
+
isAsync: false
|
|
20850
|
+
}
|
|
20851
|
+
);
|
|
20852
|
+
} else {
|
|
20853
|
+
const params = { ...this.params, ...this.data.getOrigin() };
|
|
20854
|
+
const res = await this.service.updateFormItem(
|
|
20855
|
+
appDEMethodId,
|
|
20856
|
+
this.context,
|
|
20857
|
+
params
|
|
20858
|
+
);
|
|
20859
|
+
updateData = res.data;
|
|
20860
|
+
}
|
|
20861
|
+
if (updateData && (updateItems == null ? void 0 : updateItems.length)) {
|
|
20862
|
+
await Promise.all(
|
|
20863
|
+
updateItems.map(
|
|
20864
|
+
(itemName) => this.setDataValue(itemName, updateData[itemName])
|
|
20865
|
+
)
|
|
20866
|
+
);
|
|
20867
|
+
}
|
|
20868
|
+
await awaitTimeout(2e3);
|
|
20869
|
+
} finally {
|
|
20870
|
+
if (showBusyIndicator) {
|
|
20871
|
+
this.endLoading();
|
|
20872
|
+
}
|
|
20635
20873
|
}
|
|
20636
20874
|
}
|
|
20637
20875
|
/**
|
|
@@ -20645,7 +20883,7 @@ var EditFormController = class extends FormController {
|
|
|
20645
20883
|
async wfStart(args) {
|
|
20646
20884
|
const isValid = await this.validate();
|
|
20647
20885
|
if (!isValid) {
|
|
20648
|
-
throw new
|
|
20886
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20649
20887
|
}
|
|
20650
20888
|
await this.startLoading();
|
|
20651
20889
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -20676,7 +20914,7 @@ var EditFormController = class extends FormController {
|
|
|
20676
20914
|
async wfSubmit(args) {
|
|
20677
20915
|
const isValid = await this.validate();
|
|
20678
20916
|
if (!isValid) {
|
|
20679
|
-
throw new
|
|
20917
|
+
throw new RuntimeError51("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
20680
20918
|
}
|
|
20681
20919
|
await this.startLoading();
|
|
20682
20920
|
const { context, params } = this.handlerAbilityParams(args);
|
|
@@ -20955,7 +21193,7 @@ import {
|
|
|
20955
21193
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
20956
21194
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
20957
21195
|
recursiveIterate as recursiveIterate5,
|
|
20958
|
-
RuntimeError as
|
|
21196
|
+
RuntimeError as RuntimeError52,
|
|
20959
21197
|
RuntimeModelError as RuntimeModelError56
|
|
20960
21198
|
} from "@ibiz-template/core";
|
|
20961
21199
|
import { clone as clone22 } from "ramda";
|
|
@@ -21339,7 +21577,7 @@ var GridController = class extends MDControlController {
|
|
|
21339
21577
|
if (editShowMode === "row") {
|
|
21340
21578
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
21341
21579
|
if (editingRow) {
|
|
21342
|
-
throw new
|
|
21580
|
+
throw new RuntimeError52("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
21343
21581
|
}
|
|
21344
21582
|
}
|
|
21345
21583
|
const queryParams = { ...this.params };
|
|
@@ -21380,7 +21618,7 @@ var GridController = class extends MDControlController {
|
|
|
21380
21618
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
21381
21619
|
const rowState = this.findRowState(data);
|
|
21382
21620
|
if (!rowState) {
|
|
21383
|
-
throw new
|
|
21621
|
+
throw new RuntimeError52("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
21384
21622
|
}
|
|
21385
21623
|
if (!rowState.modified) {
|
|
21386
21624
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -21392,7 +21630,7 @@ var GridController = class extends MDControlController {
|
|
|
21392
21630
|
}
|
|
21393
21631
|
const isValid = await this.validate(rowState);
|
|
21394
21632
|
if (!isValid) {
|
|
21395
|
-
throw new
|
|
21633
|
+
throw new RuntimeError52("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
21396
21634
|
}
|
|
21397
21635
|
let res;
|
|
21398
21636
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
@@ -21589,7 +21827,7 @@ var GridController = class extends MDControlController {
|
|
|
21589
21827
|
}
|
|
21590
21828
|
async toggleRowEdit() {
|
|
21591
21829
|
if (!this.model.enableRowNew) {
|
|
21592
|
-
throw new
|
|
21830
|
+
throw new RuntimeError52("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21593
21831
|
}
|
|
21594
21832
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
21595
21833
|
}
|
|
@@ -21622,7 +21860,7 @@ var GridController = class extends MDControlController {
|
|
|
21622
21860
|
} else {
|
|
21623
21861
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
21624
21862
|
if (editingRow) {
|
|
21625
|
-
throw new
|
|
21863
|
+
throw new RuntimeError52("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
21626
21864
|
}
|
|
21627
21865
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
21628
21866
|
row.cacheData = clone22(row.data);
|
|
@@ -21672,7 +21910,7 @@ var GridController = class extends MDControlController {
|
|
|
21672
21910
|
(item) => item.id === updateId
|
|
21673
21911
|
);
|
|
21674
21912
|
if (!findUpdate) {
|
|
21675
|
-
throw new
|
|
21913
|
+
throw new RuntimeError52("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
21676
21914
|
}
|
|
21677
21915
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
21678
21916
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -21827,7 +22065,7 @@ var GridController = class extends MDControlController {
|
|
|
21827
22065
|
data2 = this.getData();
|
|
21828
22066
|
}
|
|
21829
22067
|
if (data2.length === 0) {
|
|
21830
|
-
throw new
|
|
22068
|
+
throw new RuntimeError52("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
21831
22069
|
}
|
|
21832
22070
|
return formatExcelData(data2);
|
|
21833
22071
|
};
|
|
@@ -22240,7 +22478,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
22240
22478
|
};
|
|
22241
22479
|
|
|
22242
22480
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
22243
|
-
import { RuntimeError as
|
|
22481
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
22244
22482
|
import Schema2 from "async-validator";
|
|
22245
22483
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
22246
22484
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -22389,7 +22627,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
22389
22627
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
22390
22628
|
const result = await this.validate(row);
|
|
22391
22629
|
if (!result) {
|
|
22392
|
-
throw new
|
|
22630
|
+
throw new RuntimeError53(
|
|
22393
22631
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
22394
22632
|
);
|
|
22395
22633
|
}
|
|
@@ -22747,7 +22985,7 @@ var ListController = class extends MDControlController {
|
|
|
22747
22985
|
};
|
|
22748
22986
|
|
|
22749
22987
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
22750
|
-
import { recursiveIterate as recursiveIterate6, RuntimeError as
|
|
22988
|
+
import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
22751
22989
|
var PanelController = class extends ControlController {
|
|
22752
22990
|
constructor(model, context, params, ctx, container) {
|
|
22753
22991
|
super(model, context, params, ctx);
|
|
@@ -22871,7 +23109,7 @@ var PanelController = class extends ControlController {
|
|
|
22871
23109
|
var _a, _b;
|
|
22872
23110
|
const data = await this.prepareData();
|
|
22873
23111
|
if (!data) {
|
|
22874
|
-
throw new
|
|
23112
|
+
throw new RuntimeError54("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
22875
23113
|
}
|
|
22876
23114
|
const panelData = this.convertData(data);
|
|
22877
23115
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -24574,7 +24812,7 @@ var TreeController = class extends MDControlController {
|
|
|
24574
24812
|
};
|
|
24575
24813
|
|
|
24576
24814
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
24577
|
-
import { RuntimeError as
|
|
24815
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
24578
24816
|
|
|
24579
24817
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
24580
24818
|
var WizardPanelService = class extends ControlService {
|
|
@@ -24662,6 +24900,13 @@ var WizardPanelController = class extends ControlController {
|
|
|
24662
24900
|
* @Date: 2023-06-07 15:13:21
|
|
24663
24901
|
*/
|
|
24664
24902
|
this.stepTags = {};
|
|
24903
|
+
/**
|
|
24904
|
+
* 向导表单数据
|
|
24905
|
+
* @return {*}
|
|
24906
|
+
* @author: zhujiamin
|
|
24907
|
+
* @Date: 2023-12-12 13:43:07
|
|
24908
|
+
*/
|
|
24909
|
+
this.formData = {};
|
|
24665
24910
|
}
|
|
24666
24911
|
initState() {
|
|
24667
24912
|
super.initState();
|
|
@@ -24733,7 +24978,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24733
24978
|
const { activeFormTag } = this.state;
|
|
24734
24979
|
const controller = this.formControllers.get(activeFormTag);
|
|
24735
24980
|
if (!controller) {
|
|
24736
|
-
throw new
|
|
24981
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
24737
24982
|
}
|
|
24738
24983
|
return controller;
|
|
24739
24984
|
}
|
|
@@ -24744,10 +24989,11 @@ var WizardPanelController = class extends ControlController {
|
|
|
24744
24989
|
* @author: zhujiamin
|
|
24745
24990
|
* @Date: 2023-06-07 15:14:05
|
|
24746
24991
|
*/
|
|
24747
|
-
onFormMounted(activeFormTag, event) {
|
|
24992
|
+
async onFormMounted(activeFormTag, event) {
|
|
24748
24993
|
const formController = event.ctrl;
|
|
24749
24994
|
this.formControllers.set(activeFormTag, formController);
|
|
24750
|
-
formController.load();
|
|
24995
|
+
const data = await formController.load();
|
|
24996
|
+
Object.assign(this.formData, data);
|
|
24751
24997
|
}
|
|
24752
24998
|
/**
|
|
24753
24999
|
* 表单保存后,如果上下文里没有主键,赋予主键
|
|
@@ -24758,6 +25004,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24758
25004
|
*/
|
|
24759
25005
|
onFormSaved(event) {
|
|
24760
25006
|
const data = event.data[0];
|
|
25007
|
+
Object.assign(this.formData, data);
|
|
24761
25008
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
24762
25009
|
if (!this.context[deName] && data && data.srfkey) {
|
|
24763
25010
|
this.context[deName] = data.srfkey;
|
|
@@ -24773,7 +25020,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24773
25020
|
getWizardFormByTag(tag) {
|
|
24774
25021
|
var _a;
|
|
24775
25022
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
24776
|
-
throw new
|
|
25023
|
+
throw new RuntimeError55("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
24777
25024
|
return;
|
|
24778
25025
|
}
|
|
24779
25026
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -24782,7 +25029,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24782
25029
|
}
|
|
24783
25030
|
);
|
|
24784
25031
|
if (!wizardForm) {
|
|
24785
|
-
throw new
|
|
25032
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
24786
25033
|
}
|
|
24787
25034
|
return wizardForm;
|
|
24788
25035
|
}
|
|
@@ -24796,9 +25043,10 @@ var WizardPanelController = class extends ControlController {
|
|
|
24796
25043
|
var _a;
|
|
24797
25044
|
const initAction = (_a = this.model.initControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
24798
25045
|
if (initAction) {
|
|
24799
|
-
const res = await this.service.initialize(this.context, this.params);
|
|
25046
|
+
const res = await this.service.initialize(this.context, {}, this.params);
|
|
24800
25047
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
24801
25048
|
if (res.data && res.data.srfkey) {
|
|
25049
|
+
this.formData = res.data;
|
|
24802
25050
|
this.context[deName] = res.data.srfkey;
|
|
24803
25051
|
}
|
|
24804
25052
|
if (res.data && this.model.stateAppDEFieldId && res.data[this.model.stateAppDEFieldId]) {
|
|
@@ -24824,7 +25072,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24824
25072
|
* @memberof WizardPanelController
|
|
24825
25073
|
*/
|
|
24826
25074
|
async finish() {
|
|
24827
|
-
await this.service.finish(this.context, this.params);
|
|
25075
|
+
await this.service.finish(this.context, this.formData, this.params);
|
|
24828
25076
|
this.evt.emit("onFinishSuccess", void 0);
|
|
24829
25077
|
}
|
|
24830
25078
|
/**
|
|
@@ -24835,9 +25083,12 @@ var WizardPanelController = class extends ControlController {
|
|
|
24835
25083
|
* @memberof WizardPanelController
|
|
24836
25084
|
*/
|
|
24837
25085
|
async onPrevClick() {
|
|
24838
|
-
|
|
25086
|
+
let data;
|
|
25087
|
+
if (this.activeFormController.model.goBackControlAction) {
|
|
25088
|
+
data = await this.activeFormController.goBack();
|
|
25089
|
+
}
|
|
24839
25090
|
let prevTag;
|
|
24840
|
-
if (this.model.stateAppDEFieldId && data[this.model.stateAppDEFieldId]) {
|
|
25091
|
+
if (this.model.stateAppDEFieldId && data && data[this.model.stateAppDEFieldId]) {
|
|
24841
25092
|
const wizardForm = this.getWizardFormByTag(
|
|
24842
25093
|
data[this.model.stateAppDEFieldId]
|
|
24843
25094
|
);
|
|
@@ -24849,7 +25100,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24849
25100
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
24850
25101
|
}
|
|
24851
25102
|
if (!prevTag) {
|
|
24852
|
-
throw new
|
|
25103
|
+
throw new RuntimeError55("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
24853
25104
|
}
|
|
24854
25105
|
this.state.activeFormTag = prevTag;
|
|
24855
25106
|
}
|
|
@@ -24885,7 +25136,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24885
25136
|
});
|
|
24886
25137
|
const nextWizardStep = wizardSteps[index + 1];
|
|
24887
25138
|
if (!nextWizardStep) {
|
|
24888
|
-
throw new
|
|
25139
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
24889
25140
|
}
|
|
24890
25141
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
24891
25142
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -24894,7 +25145,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
24894
25145
|
}
|
|
24895
25146
|
}
|
|
24896
25147
|
if (!nextTag) {
|
|
24897
|
-
throw new
|
|
25148
|
+
throw new RuntimeError55("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
24898
25149
|
}
|
|
24899
25150
|
this.state.activeFormTag = nextTag;
|
|
24900
25151
|
this.tagHistory.push(nextTag);
|
|
@@ -25237,7 +25488,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
25237
25488
|
};
|
|
25238
25489
|
|
|
25239
25490
|
// src/controller/control/kanban/kanban.controller.ts
|
|
25240
|
-
import { RuntimeError as
|
|
25491
|
+
import { RuntimeError as RuntimeError56, RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
25241
25492
|
import { isNil as isNil25 } from "ramda";
|
|
25242
25493
|
|
|
25243
25494
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -25325,7 +25576,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
25325
25576
|
} else {
|
|
25326
25577
|
const toNum = Number(sortValue);
|
|
25327
25578
|
if (Number.isNaN(toNum)) {
|
|
25328
|
-
throw new
|
|
25579
|
+
throw new RuntimeError56(
|
|
25329
25580
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
25330
25581
|
);
|
|
25331
25582
|
}
|
|
@@ -25341,7 +25592,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
25341
25592
|
}
|
|
25342
25593
|
handleDataGroup() {
|
|
25343
25594
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
25344
|
-
throw new
|
|
25595
|
+
throw new RuntimeError56("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
25345
25596
|
}
|
|
25346
25597
|
return super.handleDataGroup();
|
|
25347
25598
|
}
|
|
@@ -25835,7 +26086,7 @@ var TreeGridService = class extends GridService {
|
|
|
25835
26086
|
};
|
|
25836
26087
|
|
|
25837
26088
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
25838
|
-
import { RuntimeError as
|
|
26089
|
+
import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
25839
26090
|
import { createUUID as createUUID11 } from "qx-util";
|
|
25840
26091
|
|
|
25841
26092
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -26051,7 +26302,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
26051
26302
|
(item) => item.id === id
|
|
26052
26303
|
);
|
|
26053
26304
|
if (panelUiItemIndex < 0) {
|
|
26054
|
-
throw new
|
|
26305
|
+
throw new RuntimeError57("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
26055
26306
|
}
|
|
26056
26307
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
26057
26308
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -26557,16 +26808,398 @@ var ReportPanelController = class extends ControlController {
|
|
|
26557
26808
|
}
|
|
26558
26809
|
};
|
|
26559
26810
|
|
|
26811
|
+
// src/controller/control/gantt/gantt.controller.ts
|
|
26812
|
+
import { recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
26813
|
+
|
|
26560
26814
|
// src/controller/control/gantt/gantt.service.ts
|
|
26561
|
-
|
|
26815
|
+
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
26816
|
+
var GanttService = class extends TreeService {
|
|
26817
|
+
/**
|
|
26818
|
+
* 获取子节点数据
|
|
26819
|
+
*
|
|
26820
|
+
* @author tony001
|
|
26821
|
+
* @date 2023-12-11 18:12:58
|
|
26822
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
26823
|
+
* @param {TreeFetchOpts} opts
|
|
26824
|
+
* @return {*} {(Promise<IGanttNodeData[] | undefined>)}
|
|
26825
|
+
*/
|
|
26826
|
+
async fetchGanttChildNodes(parentNodeData, opts) {
|
|
26827
|
+
const { hasQuery } = opts;
|
|
26828
|
+
let childrenNodes = [];
|
|
26829
|
+
if (!parentNodeData) {
|
|
26830
|
+
const rootNode = getRootNode(this.model);
|
|
26831
|
+
childrenNodes = await this.fetchGanttNodeDatasByType(
|
|
26832
|
+
rootNode,
|
|
26833
|
+
void 0,
|
|
26834
|
+
void 0,
|
|
26835
|
+
opts
|
|
26836
|
+
);
|
|
26837
|
+
} else {
|
|
26838
|
+
const childNodeRSs = getChildNodeRSs(this.model, {
|
|
26839
|
+
parentId: parentNodeData.nodeId,
|
|
26840
|
+
hasQuery
|
|
26841
|
+
});
|
|
26842
|
+
if (childNodeRSs.length === 0) {
|
|
26843
|
+
return;
|
|
26844
|
+
}
|
|
26845
|
+
const results = await handleAllSettled(
|
|
26846
|
+
childNodeRSs.map(async (childNodeRS) => {
|
|
26847
|
+
const childNode = getTreeNode(
|
|
26848
|
+
this.model,
|
|
26849
|
+
childNodeRS.childDETreeNodeId
|
|
26850
|
+
);
|
|
26851
|
+
return this.fetchGanttNodeDatasByType(
|
|
26852
|
+
childNode,
|
|
26853
|
+
childNodeRS,
|
|
26854
|
+
parentNodeData,
|
|
26855
|
+
opts
|
|
26856
|
+
);
|
|
26857
|
+
}),
|
|
26858
|
+
false
|
|
26859
|
+
);
|
|
26860
|
+
results.forEach((result) => {
|
|
26861
|
+
childrenNodes.push(...result);
|
|
26862
|
+
});
|
|
26863
|
+
}
|
|
26864
|
+
return childrenNodes;
|
|
26865
|
+
}
|
|
26866
|
+
/**
|
|
26867
|
+
* 通过节点类型加载节点数据
|
|
26868
|
+
*
|
|
26869
|
+
* @author tony001
|
|
26870
|
+
* @date 2023-12-11 18:12:35
|
|
26871
|
+
* @protected
|
|
26872
|
+
* @param {IDETreeNode} nodeModel
|
|
26873
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
26874
|
+
* @param {(ITreeNodeData | undefined)} parentNodeData
|
|
26875
|
+
* @param {TreeFetchOpts} opts
|
|
26876
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
26877
|
+
*/
|
|
26878
|
+
async fetchGanttNodeDatasByType(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26879
|
+
const leaf = getChildNodeRSs(this.model, {
|
|
26880
|
+
parentId: nodeModel.id,
|
|
26881
|
+
hasQuery: opts.hasQuery
|
|
26882
|
+
}).length === 0;
|
|
26883
|
+
const tempOpts = { ...opts, leaf };
|
|
26884
|
+
let result = [];
|
|
26885
|
+
switch (nodeModel.treeNodeType) {
|
|
26886
|
+
case "STATIC":
|
|
26887
|
+
{
|
|
26888
|
+
const nodeData = await this.getStaticGanttNodeData(
|
|
26889
|
+
nodeModel,
|
|
26890
|
+
nodeRS,
|
|
26891
|
+
parentNodeData,
|
|
26892
|
+
tempOpts
|
|
26893
|
+
);
|
|
26894
|
+
result = [nodeData];
|
|
26895
|
+
}
|
|
26896
|
+
break;
|
|
26897
|
+
case "DE":
|
|
26898
|
+
result = await this.getDEGanttNodeDatas(
|
|
26899
|
+
nodeModel,
|
|
26900
|
+
nodeRS,
|
|
26901
|
+
parentNodeData,
|
|
26902
|
+
tempOpts
|
|
26903
|
+
);
|
|
26904
|
+
break;
|
|
26905
|
+
case "CODELIST":
|
|
26906
|
+
result = await this.getCodeListGanttNodeDatas(
|
|
26907
|
+
nodeModel,
|
|
26908
|
+
nodeRS,
|
|
26909
|
+
parentNodeData,
|
|
26910
|
+
tempOpts
|
|
26911
|
+
);
|
|
26912
|
+
break;
|
|
26913
|
+
default:
|
|
26914
|
+
throw new ModelError30(
|
|
26915
|
+
nodeModel,
|
|
26916
|
+
"".concat(nodeModel.treeNodeType, "\u8282\u70B9\u7C7B\u578B\u672A\u652F\u6301")
|
|
26917
|
+
);
|
|
26918
|
+
}
|
|
26919
|
+
const { expandFirstOnly, expanded, rootNode } = nodeModel;
|
|
26920
|
+
const isExpandedRoot = rootNode && !this.model.rootVisible;
|
|
26921
|
+
if (!leaf) {
|
|
26922
|
+
await Promise.all(
|
|
26923
|
+
result.map(async (childNode, index) => {
|
|
26924
|
+
if (expanded && // 全展开合只展开首节点expanded都为true
|
|
26925
|
+
(!expandFirstOnly || expandFirstOnly && index === 0) || isExpandedRoot) {
|
|
26926
|
+
const subChildrenNodes = await this.fetchGanttChildNodes(
|
|
26927
|
+
childNode,
|
|
26928
|
+
opts
|
|
26929
|
+
);
|
|
26930
|
+
childNode.children = subChildrenNodes;
|
|
26931
|
+
}
|
|
26932
|
+
})
|
|
26933
|
+
);
|
|
26934
|
+
}
|
|
26935
|
+
return result;
|
|
26936
|
+
}
|
|
26937
|
+
/**
|
|
26938
|
+
* 获取静态节点数据
|
|
26939
|
+
*
|
|
26940
|
+
* @author tony001
|
|
26941
|
+
* @date 2023-12-11 18:12:06
|
|
26942
|
+
* @protected
|
|
26943
|
+
* @param {IDETreeNode} nodeModel
|
|
26944
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
26945
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
26946
|
+
* @param {TreeFetchOpts} opts
|
|
26947
|
+
* @return {*} {Promise<IGanttNodeData>}
|
|
26948
|
+
*/
|
|
26949
|
+
async getStaticGanttNodeData(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26950
|
+
const nodeData = new GanttStaticNodeData(
|
|
26951
|
+
this.model,
|
|
26952
|
+
nodeModel,
|
|
26953
|
+
parentNodeData,
|
|
26954
|
+
{ parentValueLevel: nodeRS == null ? void 0 : nodeRS.parentValueLevel, leaf: !!opts.leaf }
|
|
26955
|
+
);
|
|
26956
|
+
return nodeData;
|
|
26957
|
+
}
|
|
26958
|
+
/**
|
|
26959
|
+
* 获取实体数据集数据
|
|
26960
|
+
*
|
|
26961
|
+
* @author tony001
|
|
26962
|
+
* @date 2023-12-11 18:12:23
|
|
26963
|
+
* @protected
|
|
26964
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
26965
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
26966
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
26967
|
+
* @param {TreeFetchOpts} opts
|
|
26968
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
26969
|
+
*/
|
|
26970
|
+
async getDEGanttNodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26971
|
+
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
26972
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
26973
|
+
context: opts.context,
|
|
26974
|
+
params: opts.params,
|
|
26975
|
+
navContext: {},
|
|
26976
|
+
navParams: {}
|
|
26977
|
+
};
|
|
26978
|
+
params.size = nodeModel.maxSize || 1e3;
|
|
26979
|
+
if (nodeModel.sortAppDEFieldId) {
|
|
26980
|
+
Object.assign(params, {
|
|
26981
|
+
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir ? nodeModel.sortDir.toLowerCase() : "asc")
|
|
26982
|
+
});
|
|
26983
|
+
}
|
|
26984
|
+
const response = await this.app.deService.exec(
|
|
26985
|
+
appDataEntityId,
|
|
26986
|
+
appDEDataSetId,
|
|
26987
|
+
context,
|
|
26988
|
+
params
|
|
26989
|
+
);
|
|
26990
|
+
if (response.data.length) {
|
|
26991
|
+
const nodeDatas = response.data.map((item) => {
|
|
26992
|
+
return new GanttDataSetNodeData(this.model, nodeModel, parentNodeData, {
|
|
26993
|
+
data: item,
|
|
26994
|
+
leaf: !!opts.leaf,
|
|
26995
|
+
navContext,
|
|
26996
|
+
navParams
|
|
26997
|
+
});
|
|
26998
|
+
});
|
|
26999
|
+
return nodeDatas;
|
|
27000
|
+
}
|
|
27001
|
+
return [];
|
|
27002
|
+
}
|
|
27003
|
+
/**
|
|
27004
|
+
* 获取代码表节点数据
|
|
27005
|
+
*
|
|
27006
|
+
* @author tony001
|
|
27007
|
+
* @date 2023-12-11 18:12:35
|
|
27008
|
+
* @protected
|
|
27009
|
+
* @param {IDETreeCodeListNode} nodeModel
|
|
27010
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
27011
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
27012
|
+
* @param {TreeFetchOpts} opts
|
|
27013
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27014
|
+
*/
|
|
27015
|
+
async getCodeListGanttNodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
27016
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
27017
|
+
context: opts.context,
|
|
27018
|
+
params: opts.params,
|
|
27019
|
+
navContext: {},
|
|
27020
|
+
navParams: {}
|
|
27021
|
+
};
|
|
27022
|
+
const items = await this.app.codeList.get(
|
|
27023
|
+
nodeModel.codeListId,
|
|
27024
|
+
context,
|
|
27025
|
+
params
|
|
27026
|
+
);
|
|
27027
|
+
if (items.length) {
|
|
27028
|
+
const nodeDatas = items.map((item) => {
|
|
27029
|
+
return new GanttCodeListNodeData(
|
|
27030
|
+
this.model,
|
|
27031
|
+
nodeModel,
|
|
27032
|
+
parentNodeData,
|
|
27033
|
+
{
|
|
27034
|
+
data: item,
|
|
27035
|
+
leaf: !!opts.leaf,
|
|
27036
|
+
navContext,
|
|
27037
|
+
navParams
|
|
27038
|
+
}
|
|
27039
|
+
);
|
|
27040
|
+
});
|
|
27041
|
+
return nodeDatas;
|
|
27042
|
+
}
|
|
27043
|
+
return [];
|
|
27044
|
+
}
|
|
26562
27045
|
};
|
|
26563
27046
|
|
|
26564
27047
|
// src/controller/control/gantt/gantt.controller.ts
|
|
26565
27048
|
var GanttController = class extends MDControlController {
|
|
27049
|
+
constructor() {
|
|
27050
|
+
super(...arguments);
|
|
27051
|
+
/**
|
|
27052
|
+
* 上下文菜单控制器
|
|
27053
|
+
*
|
|
27054
|
+
* @author tony001
|
|
27055
|
+
* @date 2023-12-11 16:12:57
|
|
27056
|
+
* @type {{ [p: string]: ContextMenuController }}
|
|
27057
|
+
*/
|
|
27058
|
+
this.contextMenus = {};
|
|
27059
|
+
/**
|
|
27060
|
+
* 是否启用快速搜索
|
|
27061
|
+
*
|
|
27062
|
+
* @author tony001
|
|
27063
|
+
* @date 2023-12-11 16:12:13
|
|
27064
|
+
* @type {boolean}
|
|
27065
|
+
*/
|
|
27066
|
+
this.enableQuickSearch = false;
|
|
27067
|
+
}
|
|
27068
|
+
/**
|
|
27069
|
+
* 初始化状态
|
|
27070
|
+
*
|
|
27071
|
+
* @author tony001
|
|
27072
|
+
* @date 2023-12-11 16:12:20
|
|
27073
|
+
* @protected
|
|
27074
|
+
*/
|
|
27075
|
+
initState() {
|
|
27076
|
+
super.initState();
|
|
27077
|
+
this.state.size = 0;
|
|
27078
|
+
this.state.query = "";
|
|
27079
|
+
}
|
|
26566
27080
|
async onCreated() {
|
|
27081
|
+
var _a, _b;
|
|
26567
27082
|
await super.onCreated();
|
|
27083
|
+
if ((_a = this.model.detreeNodes) == null ? void 0 : _a[0].enableQuickSearch) {
|
|
27084
|
+
this.enableQuickSearch = true;
|
|
27085
|
+
}
|
|
27086
|
+
if (this.dataEntity) {
|
|
27087
|
+
const searchFields = (_b = this.dataEntity.appDEFields) == null ? void 0 : _b.filter((field) => {
|
|
27088
|
+
return field.enableQuickSearch;
|
|
27089
|
+
});
|
|
27090
|
+
const placeHolders = [];
|
|
27091
|
+
searchFields == null ? void 0 : searchFields.forEach((searchField) => {
|
|
27092
|
+
if ((searchField == null ? void 0 : searchField.lnlanguageRes) && searchField.lnlanguageRes.lanResTag) {
|
|
27093
|
+
placeHolders.push(
|
|
27094
|
+
ibiz.i18n.t(
|
|
27095
|
+
searchField.lnlanguageRes.lanResTag,
|
|
27096
|
+
searchField.logicName
|
|
27097
|
+
)
|
|
27098
|
+
);
|
|
27099
|
+
} else if (searchField == null ? void 0 : searchField.logicName) {
|
|
27100
|
+
placeHolders.push(searchField.logicName);
|
|
27101
|
+
}
|
|
27102
|
+
});
|
|
27103
|
+
if (placeHolders.length > 0) {
|
|
27104
|
+
this.state.placeHolder = placeHolders.join("\u3001");
|
|
27105
|
+
}
|
|
27106
|
+
}
|
|
26568
27107
|
this.service = new GanttService(this.model);
|
|
26569
27108
|
await this.service.init(this.context);
|
|
27109
|
+
this.model.detreeNodes.forEach((node) => {
|
|
27110
|
+
var _a2, _b2;
|
|
27111
|
+
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
27112
|
+
this.contextMenus[node.decontextMenu.id] = new ContextMenuController(
|
|
27113
|
+
node.decontextMenu,
|
|
27114
|
+
this.context,
|
|
27115
|
+
this.params,
|
|
27116
|
+
this.ctx
|
|
27117
|
+
);
|
|
27118
|
+
}
|
|
27119
|
+
});
|
|
27120
|
+
await Promise.all(
|
|
27121
|
+
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
27122
|
+
);
|
|
27123
|
+
}
|
|
27124
|
+
/**
|
|
27125
|
+
* 加载
|
|
27126
|
+
*
|
|
27127
|
+
* @author tony001
|
|
27128
|
+
* @date 2023-12-12 11:12:08
|
|
27129
|
+
* @param {MDCtrlLoadParams} [args={}]
|
|
27130
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27131
|
+
*/
|
|
27132
|
+
async load(args = {}) {
|
|
27133
|
+
const isInitialLoad = args.isInitialLoad === true;
|
|
27134
|
+
if (isInitialLoad) {
|
|
27135
|
+
await this.startLoading();
|
|
27136
|
+
}
|
|
27137
|
+
let nodes;
|
|
27138
|
+
try {
|
|
27139
|
+
nodes = await this.loadNodes();
|
|
27140
|
+
} finally {
|
|
27141
|
+
if (isInitialLoad) {
|
|
27142
|
+
await this.endLoading();
|
|
27143
|
+
}
|
|
27144
|
+
}
|
|
27145
|
+
await this.afterLoad(args, nodes);
|
|
27146
|
+
this.state.isLoaded = true;
|
|
27147
|
+
await this.evt.emit("onLoadSuccess", {
|
|
27148
|
+
isInitialLoad
|
|
27149
|
+
});
|
|
27150
|
+
return nodes;
|
|
27151
|
+
}
|
|
27152
|
+
/**
|
|
27153
|
+
* 获取查询参数
|
|
27154
|
+
*
|
|
27155
|
+
* @author tony001
|
|
27156
|
+
* @date 2023-12-12 11:12:22
|
|
27157
|
+
* @param {IParams} [extraParams]
|
|
27158
|
+
* @return {*} {Promise<IParams>}
|
|
27159
|
+
*/
|
|
27160
|
+
async getFetchParams(extraParams) {
|
|
27161
|
+
const params = await super.getFetchParams(extraParams);
|
|
27162
|
+
if (this.state.query) {
|
|
27163
|
+
params.query = this.state.query;
|
|
27164
|
+
}
|
|
27165
|
+
return params;
|
|
27166
|
+
}
|
|
27167
|
+
/**
|
|
27168
|
+
* 加载节点
|
|
27169
|
+
*
|
|
27170
|
+
* @author tony001
|
|
27171
|
+
* @date 2023-12-12 11:12:33
|
|
27172
|
+
* @param {IGanttNodeData} [parentNode]
|
|
27173
|
+
* @return {*} {Promise<IGanttNodeData[]>}
|
|
27174
|
+
*/
|
|
27175
|
+
async loadNodes(parentNode) {
|
|
27176
|
+
const params = await this.getFetchParams();
|
|
27177
|
+
const hasQuery = !!params.query;
|
|
27178
|
+
this.state.isLoading = true;
|
|
27179
|
+
let nodes;
|
|
27180
|
+
try {
|
|
27181
|
+
nodes = await this.service.fetchGanttChildNodes(parentNode, {
|
|
27182
|
+
context: this.context.clone(),
|
|
27183
|
+
params,
|
|
27184
|
+
hasQuery,
|
|
27185
|
+
defaultExpandedKeys: []
|
|
27186
|
+
}) || [];
|
|
27187
|
+
} finally {
|
|
27188
|
+
this.state.isLoading = false;
|
|
27189
|
+
}
|
|
27190
|
+
if (parentNode) {
|
|
27191
|
+
parentNode.children = nodes;
|
|
27192
|
+
} else {
|
|
27193
|
+
this.state.rootNodes = nodes;
|
|
27194
|
+
}
|
|
27195
|
+
this.state.items = [];
|
|
27196
|
+
recursiveIterate10(
|
|
27197
|
+
{ children: this.state.rootNodes },
|
|
27198
|
+
(node) => {
|
|
27199
|
+
this.state.items.push(node);
|
|
27200
|
+
}
|
|
27201
|
+
);
|
|
27202
|
+
return nodes;
|
|
26570
27203
|
}
|
|
26571
27204
|
};
|
|
26572
27205
|
|
|
@@ -26766,7 +27399,7 @@ var AppHub = class {
|
|
|
26766
27399
|
this.registerAppView(appView);
|
|
26767
27400
|
return appView;
|
|
26768
27401
|
}
|
|
26769
|
-
throw new
|
|
27402
|
+
throw new RuntimeError58("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
26770
27403
|
}
|
|
26771
27404
|
/**
|
|
26772
27405
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -26797,7 +27430,7 @@ var AppHub = class {
|
|
|
26797
27430
|
this.registerAppDataEntity(entity, appId);
|
|
26798
27431
|
return entity;
|
|
26799
27432
|
}
|
|
26800
|
-
throw new
|
|
27433
|
+
throw new RuntimeError58("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
26801
27434
|
}
|
|
26802
27435
|
/**
|
|
26803
27436
|
* 新建 hub 应用
|
|
@@ -26812,7 +27445,7 @@ var AppHub = class {
|
|
|
26812
27445
|
return this.appMap.get(id);
|
|
26813
27446
|
}
|
|
26814
27447
|
if (!this.modelLoaderProvider) {
|
|
26815
|
-
throw new
|
|
27448
|
+
throw new RuntimeError58("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
26816
27449
|
}
|
|
26817
27450
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
26818
27451
|
const app = new Application(appModel);
|
|
@@ -26912,7 +27545,7 @@ var EngineFactory = class {
|
|
|
26912
27545
|
};
|
|
26913
27546
|
|
|
26914
27547
|
// src/engine/view-base.engine.ts
|
|
26915
|
-
import { RuntimeError as
|
|
27548
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
26916
27549
|
var ViewEngineBase = class {
|
|
26917
27550
|
/**
|
|
26918
27551
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -27100,7 +27733,7 @@ var ViewEngineBase = class {
|
|
|
27100
27733
|
const { appDataEntityId } = this.view.model;
|
|
27101
27734
|
const { evt, context, params } = this.view;
|
|
27102
27735
|
if (!appDataEntityId) {
|
|
27103
|
-
throw new
|
|
27736
|
+
throw new RuntimeError59("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
27104
27737
|
}
|
|
27105
27738
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
27106
27739
|
const res = await app.deService.exec(
|
|
@@ -27462,16 +28095,16 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
27462
28095
|
// src/utils/error-handler/default-error-handler.ts
|
|
27463
28096
|
import {
|
|
27464
28097
|
RuntimeModelError as RuntimeModelError62,
|
|
27465
|
-
ModelError as
|
|
27466
|
-
HttpError as
|
|
28098
|
+
ModelError as ModelError31,
|
|
28099
|
+
HttpError as HttpError5,
|
|
27467
28100
|
NoticeError as NoticeError2,
|
|
27468
|
-
RuntimeError as
|
|
28101
|
+
RuntimeError as RuntimeError60
|
|
27469
28102
|
} from "@ibiz-template/core";
|
|
27470
28103
|
var DefaultErrorHandler = class {
|
|
27471
28104
|
handle(error) {
|
|
27472
|
-
if (error instanceof RuntimeModelError62 || error instanceof
|
|
28105
|
+
if (error instanceof RuntimeModelError62 || error instanceof ModelError31) {
|
|
27473
28106
|
ibiz.message.error(error.message, 10, true);
|
|
27474
|
-
} else if (error instanceof
|
|
28107
|
+
} else if (error instanceof HttpError5) {
|
|
27475
28108
|
if (error.status === 401) {
|
|
27476
28109
|
ibiz.message.error("\u6CA1\u6709\u6CE8\u518C\u65E0\u6743\u9650\u9519\u8BEF\u5904\u7406\u5668");
|
|
27477
28110
|
} else {
|
|
@@ -27483,7 +28116,7 @@ var DefaultErrorHandler = class {
|
|
|
27483
28116
|
}
|
|
27484
28117
|
} else if (error instanceof NoticeError2) {
|
|
27485
28118
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
27486
|
-
} else if (error instanceof
|
|
28119
|
+
} else if (error instanceof RuntimeError60) {
|
|
27487
28120
|
ibiz.message.error(error.message, 10, true);
|
|
27488
28121
|
}
|
|
27489
28122
|
ibiz.log.error(error);
|
|
@@ -27625,7 +28258,7 @@ var GlobalUtil = class {
|
|
|
27625
28258
|
};
|
|
27626
28259
|
|
|
27627
28260
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
27628
|
-
import { RuntimeError as
|
|
28261
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
27629
28262
|
var LogicExecutor = class {
|
|
27630
28263
|
/**
|
|
27631
28264
|
* @author lxm
|
|
@@ -27646,7 +28279,7 @@ var LogicExecutor = class {
|
|
|
27646
28279
|
*/
|
|
27647
28280
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27648
28281
|
execute(_executeParams) {
|
|
27649
|
-
throw new
|
|
28282
|
+
throw new RuntimeError61("Method not implemented.");
|
|
27650
28283
|
}
|
|
27651
28284
|
/**
|
|
27652
28285
|
* 销毁方法
|
|
@@ -27658,7 +28291,7 @@ var LogicExecutor = class {
|
|
|
27658
28291
|
};
|
|
27659
28292
|
|
|
27660
28293
|
// src/logic-scheduler/executor/logic-executor-factory.ts
|
|
27661
|
-
import { ModelError as
|
|
28294
|
+
import { ModelError as ModelError32 } from "@ibiz-template/core";
|
|
27662
28295
|
var LogicExecutorFactory = class {
|
|
27663
28296
|
constructor() {
|
|
27664
28297
|
/**
|
|
@@ -27688,7 +28321,7 @@ var LogicExecutorFactory = class {
|
|
|
27688
28321
|
createExecutor(logic, scheduler) {
|
|
27689
28322
|
const constructor = this.constructorMap.get(logic.logicType);
|
|
27690
28323
|
if (!constructor) {
|
|
27691
|
-
throw new
|
|
28324
|
+
throw new ModelError32(logic, "\u903B\u8F91\u7C7B\u578B ".concat(logic.logicType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
27692
28325
|
}
|
|
27693
28326
|
return constructor(logic, scheduler);
|
|
27694
28327
|
}
|
|
@@ -28006,7 +28639,7 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
28006
28639
|
};
|
|
28007
28640
|
|
|
28008
28641
|
// src/logic-scheduler/trigger/logic-trigger-factory.ts
|
|
28009
|
-
import { ModelError as
|
|
28642
|
+
import { ModelError as ModelError33 } from "@ibiz-template/core";
|
|
28010
28643
|
var LogicTriggerFactory = class {
|
|
28011
28644
|
constructor() {
|
|
28012
28645
|
/**
|
|
@@ -28036,7 +28669,7 @@ var LogicTriggerFactory = class {
|
|
|
28036
28669
|
createTrigger(logic, scheduler) {
|
|
28037
28670
|
const constructor = this.constructorMap.get(logic.triggerType);
|
|
28038
28671
|
if (!constructor) {
|
|
28039
|
-
throw new
|
|
28672
|
+
throw new ModelError33(logic, "\u89E6\u53D1\u5668\u7C7B\u578B ".concat(logic.triggerType, " \u6682\u672A\u652F\u6301\uFF01"));
|
|
28040
28673
|
}
|
|
28041
28674
|
return constructor(logic, scheduler);
|
|
28042
28675
|
}
|
|
@@ -28083,7 +28716,7 @@ var LogicSchedulerCenter = class {
|
|
|
28083
28716
|
};
|
|
28084
28717
|
|
|
28085
28718
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
28086
|
-
import { RuntimeError as
|
|
28719
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
28087
28720
|
var LogicTrigger = class {
|
|
28088
28721
|
/**
|
|
28089
28722
|
* @author lxm
|
|
@@ -28143,7 +28776,7 @@ var LogicTrigger = class {
|
|
|
28143
28776
|
if (this.executor) {
|
|
28144
28777
|
return this.executor.execute(executeParams);
|
|
28145
28778
|
}
|
|
28146
|
-
throw new
|
|
28779
|
+
throw new RuntimeError62("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
28147
28780
|
}
|
|
28148
28781
|
/**
|
|
28149
28782
|
* 销毁方法
|
|
@@ -28160,12 +28793,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
28160
28793
|
};
|
|
28161
28794
|
|
|
28162
28795
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
28163
|
-
import { RuntimeError as
|
|
28796
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
28164
28797
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
28165
28798
|
bindExecutor(executor) {
|
|
28166
28799
|
super.bindExecutor(executor);
|
|
28167
28800
|
if (this.executor.type !== "SCRIPT") {
|
|
28168
|
-
throw new
|
|
28801
|
+
throw new RuntimeError63(
|
|
28169
28802
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
28170
28803
|
);
|
|
28171
28804
|
}
|
|
@@ -28201,7 +28834,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
28201
28834
|
};
|
|
28202
28835
|
|
|
28203
28836
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
28204
|
-
import { RuntimeError as
|
|
28837
|
+
import { RuntimeError as RuntimeError64, RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
28205
28838
|
var TimerTrigger = class extends LogicTrigger {
|
|
28206
28839
|
constructor() {
|
|
28207
28840
|
super(...arguments);
|
|
@@ -28213,7 +28846,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28213
28846
|
}
|
|
28214
28847
|
this.timer = setInterval(() => {
|
|
28215
28848
|
if (!this.scheduler.defaultParamsCb) {
|
|
28216
|
-
throw new
|
|
28849
|
+
throw new RuntimeError64("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
28217
28850
|
}
|
|
28218
28851
|
const params = this.scheduler.defaultParamsCb();
|
|
28219
28852
|
this.executor.execute(params);
|
|
@@ -28229,8 +28862,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
28229
28862
|
|
|
28230
28863
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
28231
28864
|
import {
|
|
28232
|
-
ModelError as
|
|
28233
|
-
RuntimeError as
|
|
28865
|
+
ModelError as ModelError34,
|
|
28866
|
+
RuntimeError as RuntimeError65,
|
|
28234
28867
|
RuntimeModelError as RuntimeModelError65
|
|
28235
28868
|
} from "@ibiz-template/core";
|
|
28236
28869
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -28268,7 +28901,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28268
28901
|
const { context, params, ...rest } = parameters;
|
|
28269
28902
|
const { data } = parameters;
|
|
28270
28903
|
if (!(data == null ? void 0 : data[0])) {
|
|
28271
|
-
throw new
|
|
28904
|
+
throw new RuntimeError65("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
28272
28905
|
}
|
|
28273
28906
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28274
28907
|
let openViewRef;
|
|
@@ -28328,7 +28961,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28328
28961
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
28329
28962
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
28330
28963
|
if (!findView) {
|
|
28331
|
-
throw new
|
|
28964
|
+
throw new RuntimeError65(
|
|
28332
28965
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28333
28966
|
);
|
|
28334
28967
|
}
|
|
@@ -28371,7 +29004,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28371
29004
|
);
|
|
28372
29005
|
}
|
|
28373
29006
|
} else if (batchAddOnly) {
|
|
28374
|
-
throw new
|
|
29007
|
+
throw new ModelError34(appUILogic, "batchAddOnly\u6682\u672A\u652F\u6301");
|
|
28375
29008
|
} else {
|
|
28376
29009
|
newViewRef = newDataAppView;
|
|
28377
29010
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
@@ -28447,7 +29080,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28447
29080
|
}
|
|
28448
29081
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
28449
29082
|
if (!selectData) {
|
|
28450
|
-
throw new
|
|
29083
|
+
throw new RuntimeError65("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
28451
29084
|
}
|
|
28452
29085
|
const indexType = selectData.srfkey;
|
|
28453
29086
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -28457,7 +29090,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
28457
29090
|
}
|
|
28458
29091
|
);
|
|
28459
29092
|
if (!findView) {
|
|
28460
|
-
throw new
|
|
29093
|
+
throw new RuntimeError65(
|
|
28461
29094
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
28462
29095
|
);
|
|
28463
29096
|
}
|
|
@@ -28849,8 +29482,11 @@ export {
|
|
|
28849
29482
|
FormTabPanelState,
|
|
28850
29483
|
FrontUIActionProvider,
|
|
28851
29484
|
GRIDCOLUMN_PROVIDER_PREFIX,
|
|
29485
|
+
GanttCodeListNodeData,
|
|
28852
29486
|
GanttController,
|
|
29487
|
+
GanttDataSetNodeData,
|
|
28853
29488
|
GanttService,
|
|
29489
|
+
GanttStaticNodeData,
|
|
28854
29490
|
GridColumnController,
|
|
28855
29491
|
GridController,
|
|
28856
29492
|
GridFieldColumnController,
|