@ibiz-template/runtime 0.1.28 → 0.1.29-dev.0
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 +1205 -265
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/app-hub.d.ts +9 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +4 -0
- package/out/application.d.ts +9 -1
- package/out/application.d.ts.map +1 -1
- package/out/application.js +2 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +3 -0
- package/out/controller/common/view/view.controller.d.ts +23 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +52 -0
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +69 -0
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -0
- package/out/controller/control/dashboard/custom-dashboard.controller.js +85 -0
- package/out/controller/control/dashboard/index.d.ts +1 -0
- package/out/controller/control/dashboard/index.d.ts.map +1 -1
- package/out/controller/control/dashboard/index.js +1 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +15 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +26 -9
- package/out/controller/control/index.d.ts +2 -0
- package/out/controller/control/index.d.ts.map +1 -1
- package/out/controller/control/index.js +2 -0
- package/out/controller/control/tree-grid/index.d.ts +3 -0
- package/out/controller/control/tree-grid/index.d.ts.map +1 -0
- package/out/controller/control/tree-grid/index.js +2 -0
- package/out/controller/control/tree-grid/tree-grid.controller.d.ts +5 -0
- package/out/controller/control/tree-grid/tree-grid.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid/tree-grid.controller.js +3 -0
- package/out/controller/control/tree-grid/tree-grid.service.d.ts +13 -0
- package/out/controller/control/tree-grid/tree-grid.service.d.ts.map +1 -0
- package/out/controller/control/tree-grid/tree-grid.service.js +12 -0
- package/out/controller/control/tree-grid-ex/index.d.ts +3 -0
- package/out/controller/control/tree-grid-ex/index.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/index.js +2 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +134 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +240 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts +65 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.js +143 -0
- package/out/controller/utils/event/controller-event.d.ts +7 -0
- package/out/controller/utils/event/controller-event.d.ts.map +1 -1
- package/out/controller/utils/event/controller-event.js +12 -0
- package/out/controller/utils/view-msg/index.d.ts +2 -0
- package/out/controller/utils/view-msg/index.d.ts.map +1 -0
- package/out/controller/utils/view-msg/index.js +1 -0
- package/out/controller/utils/view-msg/view-msg-controller.d.ts +69 -0
- package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -0
- package/out/controller/utils/view-msg/view-msg-controller.js +176 -0
- package/out/de-logic/de-logic-context.d.ts +8 -0
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +11 -0
- package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.d.ts.map +1 -1
- package/out/de-logic/de-logic-node/prepare-param-node/prepare-param-node.js +5 -1
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +19 -8
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +9 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +9 -0
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/common/index.d.ts +1 -0
- package/out/interface/controller/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/index.js +1 -0
- package/out/interface/controller/common/view-message/i-view-message.d.ts +39 -0
- package/out/interface/controller/common/view-message/i-view-message.d.ts.map +1 -0
- package/out/interface/controller/common/view-message/i-view-message.js +1 -0
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +16 -0
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.js +1 -0
- package/out/interface/controller/controller/control/i-tree-grid.controller.d.ts +13 -0
- package/out/interface/controller/controller/control/i-tree-grid.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/i-tree-grid.controller.js +1 -0
- package/out/interface/controller/controller/control/index.d.ts +2 -0
- package/out/interface/controller/controller/control/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.js +2 -0
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +13 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.js +1 -0
- package/out/interface/controller/event/control/i-tree-grid.event.d.ts +13 -0
- package/out/interface/controller/event/control/i-tree-grid.event.d.ts.map +1 -0
- package/out/interface/controller/event/control/i-tree-grid.event.js +1 -0
- package/out/interface/controller/event/control/index.d.ts +2 -0
- package/out/interface/controller/event/control/index.d.ts.map +1 -1
- package/out/interface/controller/event/control/index.js +2 -0
- package/out/interface/controller/event/view/i-tree-grid-ex-view.event.d.ts +12 -0
- package/out/interface/controller/event/view/i-tree-grid-ex-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-tree-grid-ex-view.event.js +1 -0
- package/out/interface/controller/event/view/i-tree-grid-view.event.d.ts +12 -0
- package/out/interface/controller/event/view/i-tree-grid-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-tree-grid-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +2 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +2 -0
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +52 -0
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/i-tree-grid-ex.state.js +1 -0
- package/out/interface/controller/state/control/i-tree-grid.state.d.ts +13 -0
- package/out/interface/controller/state/control/i-tree-grid.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/i-tree-grid.state.js +1 -0
- package/out/interface/controller/state/control/index.d.ts +2 -0
- package/out/interface/controller/state/control/index.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.js +2 -0
- package/out/interface/controller/state/view/i-tree-grid-ex-view.state.d.ts +13 -0
- package/out/interface/controller/state/view/i-tree-grid-ex-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-tree-grid-ex-view.state.js +1 -0
- package/out/interface/controller/state/view/i-tree-grid-view.state.d.ts +13 -0
- package/out/interface/controller/state/view/i-tree-grid-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-tree-grid-view.state.js +1 -0
- package/out/interface/controller/state/view/i-view.state.d.ts +10 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.d.ts +2 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +2 -0
- package/out/interface/provider/i-grid-column.provider.d.ts +2 -1
- package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +9 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/service/service/i-config.service.d.ts +20 -0
- package/out/interface/service/service/i-config.service.d.ts.map +1 -0
- package/out/interface/service/service/i-config.service.js +1 -0
- package/out/interface/service/service/index.d.ts +1 -0
- package/out/interface/service/service/index.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.d.ts +10 -0
- package/out/service/app-data-entity/app-data-entity.d.ts.map +1 -1
- package/out/service/app-data-entity/app-data-entity.js +40 -13
- package/out/service/service/config/config.service.d.ts +43 -0
- package/out/service/service/config/config.service.d.ts.map +1 -0
- package/out/service/service/config/config.service.js +54 -0
- package/out/service/service/entity/de.service.d.ts +9 -0
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +2 -0
- package/out/service/service/index.d.ts +1 -0
- package/out/service/service/index.d.ts.map +1 -1
- package/out/service/service/index.js +1 -0
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +1 -5
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +5 -2
- package/out/ui-action/provider/ui-action-provider-base.d.ts +12 -1
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +55 -5
- package/out/ui-logic/ui-logic-context.d.ts +8 -0
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-context.js +11 -0
- package/out/ui-logic/ui-logic-link/ui-logic-link.js +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +5 -1
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +17 -4
- package/package.json +2 -2
- package/src/app-hub.ts +17 -0
- package/src/application.ts +20 -1
- package/src/controller/common/control/md-control.controller.ts +3 -0
- package/src/controller/common/view/view.controller.ts +67 -0
- package/src/controller/control/dashboard/custom-dashboard.controller.ts +107 -0
- package/src/controller/control/dashboard/index.ts +1 -0
- package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +32 -9
- package/src/controller/control/index.ts +2 -0
- package/src/controller/control/tree-grid/index.ts +2 -0
- package/src/controller/control/tree-grid/tree-grid.controller.ts +6 -0
- package/src/controller/control/tree-grid/tree-grid.service.ts +12 -0
- package/src/controller/control/tree-grid-ex/index.ts +2 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +283 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex.service.ts +171 -0
- package/src/controller/utils/event/controller-event.ts +16 -0
- package/src/controller/utils/view-msg/index.ts +1 -0
- package/src/controller/utils/view-msg/view-msg-controller.ts +250 -0
- package/src/de-logic/de-logic-context.ts +12 -0
- package/src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts +7 -1
- package/src/de-logic/utils/handle-src-val.ts +23 -10
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +10 -0
- package/src/interface/common/i-app-service/i-app-service.ts +10 -0
- package/src/interface/controller/common/index.ts +1 -0
- package/src/interface/controller/common/view-message/i-view-message.ts +42 -0
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +20 -0
- package/src/interface/controller/controller/control/i-tree-grid.controller.ts +12 -0
- package/src/interface/controller/controller/control/index.ts +2 -0
- package/src/interface/controller/controller/control/portlet/i-portlet.controller.ts +8 -0
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +12 -0
- package/src/interface/controller/event/control/i-tree-grid.event.ts +12 -0
- package/src/interface/controller/event/control/index.ts +2 -0
- package/src/interface/controller/event/view/i-tree-grid-ex-view.event.ts +12 -0
- package/src/interface/controller/event/view/i-tree-grid-view.event.ts +12 -0
- package/src/interface/controller/event/view/index.ts +2 -0
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +56 -0
- package/src/interface/controller/state/control/i-tree-grid.state.ts +12 -0
- package/src/interface/controller/state/control/index.ts +2 -0
- package/src/interface/controller/state/view/i-tree-grid-ex-view.state.ts +12 -0
- package/src/interface/controller/state/view/i-tree-grid-view.state.ts +12 -0
- package/src/interface/controller/state/view/i-view.state.ts +9 -0
- package/src/interface/controller/state/view/index.ts +2 -0
- package/src/interface/provider/i-grid-column.provider.ts +2 -1
- package/src/interface/service/service/i-app-de.service.ts +10 -0
- package/src/interface/service/service/i-config.service.ts +20 -0
- package/src/interface/service/service/index.ts +1 -0
- package/src/service/app-data-entity/app-data-entity.ts +44 -13
- package/src/service/service/config/config.service.ts +65 -0
- package/src/service/service/entity/de.service.ts +15 -0
- package/src/service/service/index.ts +1 -0
- package/src/service/vo/control.vo.ts +1 -6
- package/src/ui-action/provider/backend-ui-action-provider.ts +5 -2
- package/src/ui-action/provider/ui-action-provider-base.ts +68 -6
- package/src/ui-logic/ui-logic-context.ts +12 -0
- package/src/ui-logic/ui-logic-link/ui-logic-link.ts +1 -1
- package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +7 -1
- package/src/ui-logic/utils/handle-src-val.ts +20 -4
package/dist/index.esm.js
CHANGED
|
@@ -71,10 +71,10 @@ var require_utils = __commonJS({
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
exports.isFunction = isFunction2;
|
|
74
|
-
var
|
|
74
|
+
var isArray7 = Array.isArray || function(value) {
|
|
75
75
|
return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
|
|
76
76
|
};
|
|
77
|
-
exports.isArray =
|
|
77
|
+
exports.isArray = isArray7;
|
|
78
78
|
function indexOf(array, value) {
|
|
79
79
|
for (var i = 0, len = array.length; i < len; i++) {
|
|
80
80
|
if (array[i] === value) {
|
|
@@ -102,7 +102,7 @@ var require_utils = __commonJS({
|
|
|
102
102
|
function isEmpty9(value) {
|
|
103
103
|
if (!value && value !== 0) {
|
|
104
104
|
return true;
|
|
105
|
-
} else if (
|
|
105
|
+
} else if (isArray7(value) && value.length === 0) {
|
|
106
106
|
return true;
|
|
107
107
|
} else {
|
|
108
108
|
return false;
|
|
@@ -10770,6 +10770,57 @@ var CodeListService = class {
|
|
|
10770
10770
|
}
|
|
10771
10771
|
};
|
|
10772
10772
|
|
|
10773
|
+
// src/service/service/config/config.service.ts
|
|
10774
|
+
var ConfigService = class {
|
|
10775
|
+
/**
|
|
10776
|
+
* Creates an instance of ConfigService.
|
|
10777
|
+
*
|
|
10778
|
+
* @author chitanda
|
|
10779
|
+
* @date 2023-09-22 10:09:16
|
|
10780
|
+
* @param {string} appId 应用标识
|
|
10781
|
+
* @param {string} folder 定义文件夹
|
|
10782
|
+
* @param {string} tag 存储标识
|
|
10783
|
+
*/
|
|
10784
|
+
constructor(appId, folder, tag) {
|
|
10785
|
+
this.appId = appId;
|
|
10786
|
+
this.folder = folder;
|
|
10787
|
+
this.tag = tag;
|
|
10788
|
+
this.app = ibiz.hub.getApp(appId);
|
|
10789
|
+
}
|
|
10790
|
+
/**
|
|
10791
|
+
* 保存配置
|
|
10792
|
+
*
|
|
10793
|
+
* @author chitanda
|
|
10794
|
+
* @date 2023-09-22 10:09:05
|
|
10795
|
+
* @param {IData} data
|
|
10796
|
+
* @return {*} {Promise<boolean>}
|
|
10797
|
+
*/
|
|
10798
|
+
async save(data) {
|
|
10799
|
+
const res = await this.app.net.put(
|
|
10800
|
+
"/configs/".concat(this.folder, "/").concat(this.tag),
|
|
10801
|
+
data
|
|
10802
|
+
);
|
|
10803
|
+
if (res.ok) {
|
|
10804
|
+
return res.data;
|
|
10805
|
+
}
|
|
10806
|
+
return false;
|
|
10807
|
+
}
|
|
10808
|
+
/**
|
|
10809
|
+
* 加载配置
|
|
10810
|
+
*
|
|
10811
|
+
* @author chitanda
|
|
10812
|
+
* @date 2023-09-22 10:09:10
|
|
10813
|
+
* @return {*} {Promise<IData>}
|
|
10814
|
+
*/
|
|
10815
|
+
async load() {
|
|
10816
|
+
const res = await this.app.net.get("/configs/".concat(this.folder, "/").concat(this.tag));
|
|
10817
|
+
if (res.ok) {
|
|
10818
|
+
return res.data;
|
|
10819
|
+
}
|
|
10820
|
+
return {};
|
|
10821
|
+
}
|
|
10822
|
+
};
|
|
10823
|
+
|
|
10773
10824
|
// src/service/service/counter/counter.service.ts
|
|
10774
10825
|
import { RuntimeModelError as RuntimeModelError6 } from "@ibiz-template/core";
|
|
10775
10826
|
var CounterService = class {
|
|
@@ -11183,7 +11234,8 @@ import { RuntimeModelError as RuntimeModelError7 } from "@ibiz-template/core";
|
|
|
11183
11234
|
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
11184
11235
|
|
|
11185
11236
|
// src/service/app-data-entity/app-data-entity.ts
|
|
11186
|
-
import { clone as clone4 } from "ramda";
|
|
11237
|
+
import { clone as clone4, isNil as isNil7 } from "ramda";
|
|
11238
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
11187
11239
|
|
|
11188
11240
|
// src/service/constant/srfuf.ts
|
|
11189
11241
|
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
@@ -11290,7 +11342,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11290
11342
|
*/
|
|
11291
11343
|
defineProperties() {
|
|
11292
11344
|
var _a;
|
|
11293
|
-
const { _data } = this;
|
|
11345
|
+
const { _data, convertVal } = this;
|
|
11294
11346
|
const properties = {};
|
|
11295
11347
|
const keys = Object.keys(_data);
|
|
11296
11348
|
keys.forEach((key) => {
|
|
@@ -11306,17 +11358,16 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11306
11358
|
});
|
|
11307
11359
|
(_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
11308
11360
|
const key = field.codeName.toLowerCase();
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
}
|
|
11361
|
+
properties[key] = {
|
|
11362
|
+
enumerable: true,
|
|
11363
|
+
set(val) {
|
|
11364
|
+
_data[key] = convertVal(val, field.stdDataType);
|
|
11365
|
+
},
|
|
11366
|
+
get() {
|
|
11367
|
+
return _data[key];
|
|
11368
|
+
}
|
|
11369
|
+
};
|
|
11370
|
+
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
11320
11371
|
});
|
|
11321
11372
|
Object.defineProperties(this, properties);
|
|
11322
11373
|
}
|
|
@@ -11348,6 +11399,29 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
11348
11399
|
}
|
|
11349
11400
|
return this;
|
|
11350
11401
|
}
|
|
11402
|
+
/**
|
|
11403
|
+
* 根据属性的数据类型转换值
|
|
11404
|
+
* @author lxm
|
|
11405
|
+
* @date 2023-09-25 03:37:28
|
|
11406
|
+
* @protected
|
|
11407
|
+
* @param {unknown} value
|
|
11408
|
+
* @param {(number | undefined)} dataType
|
|
11409
|
+
* @return {*} {unknown}
|
|
11410
|
+
*/
|
|
11411
|
+
convertVal(value, dataType) {
|
|
11412
|
+
if (isNil7(dataType)) {
|
|
11413
|
+
return value;
|
|
11414
|
+
}
|
|
11415
|
+
if (DataTypes.isNumber(dataType)) {
|
|
11416
|
+
const numVal = !isNil7(value) && value !== "" ? Number(value) : value;
|
|
11417
|
+
if (Number.isNaN(numVal)) {
|
|
11418
|
+
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
11419
|
+
return value;
|
|
11420
|
+
}
|
|
11421
|
+
return numVal;
|
|
11422
|
+
}
|
|
11423
|
+
return value;
|
|
11424
|
+
}
|
|
11351
11425
|
};
|
|
11352
11426
|
|
|
11353
11427
|
// src/service/dto/method.dto.ts
|
|
@@ -11789,6 +11863,17 @@ var DELogicContext = class {
|
|
|
11789
11863
|
get: () => this.lastReturn
|
|
11790
11864
|
});
|
|
11791
11865
|
}
|
|
11866
|
+
/**
|
|
11867
|
+
* 是否是实体参数变量(即后台数据对象)
|
|
11868
|
+
* @author lxm
|
|
11869
|
+
* @date 2023-09-22 03:40:30
|
|
11870
|
+
* @param {string} paramId
|
|
11871
|
+
* @return {*} {boolean}
|
|
11872
|
+
*/
|
|
11873
|
+
isEntityParam(paramId) {
|
|
11874
|
+
const deLogicParams = this.deLogicParams.get(paramId);
|
|
11875
|
+
return !!(deLogicParams && deLogicParams.model.entityParam);
|
|
11876
|
+
}
|
|
11792
11877
|
};
|
|
11793
11878
|
|
|
11794
11879
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
@@ -12092,14 +12177,16 @@ import { clone as clone6 } from "ramda";
|
|
|
12092
12177
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
12093
12178
|
import { clone as clone5 } from "ramda";
|
|
12094
12179
|
function handleSrcVal(ctx, srcValParams) {
|
|
12095
|
-
const { srcDELogicParamId,
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
}
|
|
12180
|
+
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
12181
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
12182
|
+
let srcField = srcFieldName;
|
|
12099
12183
|
let value;
|
|
12100
12184
|
switch (srcValueType) {
|
|
12101
12185
|
case "SRCDLPARAM":
|
|
12102
12186
|
value = ctx.params[srcDELogicParamId];
|
|
12187
|
+
if (ctx.isEntityParam(srcDELogicParamId)) {
|
|
12188
|
+
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
12189
|
+
}
|
|
12103
12190
|
break;
|
|
12104
12191
|
case "NULLVALUE":
|
|
12105
12192
|
return null;
|
|
@@ -12123,9 +12210,20 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
12123
12210
|
default:
|
|
12124
12211
|
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
12125
12212
|
}
|
|
12126
|
-
const srcField = srcFieldName == null ? void 0 : srcFieldName.toLowerCase();
|
|
12127
12213
|
if (value && srcField) {
|
|
12128
|
-
|
|
12214
|
+
try {
|
|
12215
|
+
value = ScriptFactory.execScriptFn(
|
|
12216
|
+
{ srcValue: value },
|
|
12217
|
+
"srcValue.".concat(srcField),
|
|
12218
|
+
{
|
|
12219
|
+
singleRowReturn: true,
|
|
12220
|
+
isAsync: false
|
|
12221
|
+
}
|
|
12222
|
+
);
|
|
12223
|
+
} catch (error) {
|
|
12224
|
+
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
12225
|
+
throw error;
|
|
12226
|
+
}
|
|
12129
12227
|
}
|
|
12130
12228
|
return value;
|
|
12131
12229
|
}
|
|
@@ -12198,7 +12296,10 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
12198
12296
|
*/
|
|
12199
12297
|
setParamValue(nodeParam, ctx) {
|
|
12200
12298
|
const { dstFieldName, dstDELogicParamId } = nodeParam;
|
|
12201
|
-
|
|
12299
|
+
let dstField = dstFieldName;
|
|
12300
|
+
if (ctx.isEntityParam(dstDELogicParamId)) {
|
|
12301
|
+
dstField = dstField == null ? void 0 : dstField.toLowerCase();
|
|
12302
|
+
}
|
|
12202
12303
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
12203
12304
|
if (dstField) {
|
|
12204
12305
|
ctx.params[dstDELogicParamId][dstField] = srcVal;
|
|
@@ -13025,7 +13126,7 @@ import {
|
|
|
13025
13126
|
RuntimeModelError as RuntimeModelError19
|
|
13026
13127
|
} from "@ibiz-template/core";
|
|
13027
13128
|
import { ascSort, descSort } from "qx-util";
|
|
13028
|
-
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as
|
|
13129
|
+
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil8, where as where2 } from "ramda";
|
|
13029
13130
|
var FetchMethod = class extends Method {
|
|
13030
13131
|
get isLocalMode() {
|
|
13031
13132
|
return isLocalMode(this.method);
|
|
@@ -13155,7 +13256,7 @@ var FetchMethod = class extends Method {
|
|
|
13155
13256
|
}
|
|
13156
13257
|
}
|
|
13157
13258
|
}
|
|
13158
|
-
if (!
|
|
13259
|
+
if (!isNil8(filter.sortField) && !isEmpty7(filter.sortField)) {
|
|
13159
13260
|
if (filter.sortMode === "DESC") {
|
|
13160
13261
|
list = descSort(list, filter.sortField);
|
|
13161
13262
|
} else {
|
|
@@ -13223,6 +13324,11 @@ var DEService = class {
|
|
|
13223
13324
|
* @type {DECache}
|
|
13224
13325
|
*/
|
|
13225
13326
|
this.local = new DECache();
|
|
13327
|
+
this.configCache = new ConfigService(
|
|
13328
|
+
model.appId,
|
|
13329
|
+
"PSAppDataEntity",
|
|
13330
|
+
model.codeName
|
|
13331
|
+
);
|
|
13226
13332
|
this.wf = new WorkFlowService(model);
|
|
13227
13333
|
this.file = new FileService(model);
|
|
13228
13334
|
}
|
|
@@ -13279,7 +13385,7 @@ var DEService = class {
|
|
|
13279
13385
|
};
|
|
13280
13386
|
|
|
13281
13387
|
// src/service/vo/control.vo.ts
|
|
13282
|
-
import { clone as clone10, isNil as
|
|
13388
|
+
import { clone as clone10, isNil as isNil9 } from "ramda";
|
|
13283
13389
|
var ControlVO = class _ControlVO {
|
|
13284
13390
|
/**
|
|
13285
13391
|
* 是否是新建数据,0为新建
|
|
@@ -13289,7 +13395,7 @@ var ControlVO = class _ControlVO {
|
|
|
13289
13395
|
* @type {Srfuf}
|
|
13290
13396
|
*/
|
|
13291
13397
|
get srfuf() {
|
|
13292
|
-
if (
|
|
13398
|
+
if (isNil9(this.$origin.srfuf)) {
|
|
13293
13399
|
return this.srfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
13294
13400
|
}
|
|
13295
13401
|
return this.$origin.srfuf;
|
|
@@ -13407,12 +13513,9 @@ var ControlVO = class _ControlVO {
|
|
|
13407
13513
|
return uiKey === "srfkey" ? this.$origin[dataKey] || this.$origin[uiKey] : this.$origin[dataKey];
|
|
13408
13514
|
},
|
|
13409
13515
|
set(val) {
|
|
13410
|
-
this.$origin[dataKey] =
|
|
13516
|
+
this.$origin[dataKey] = val;
|
|
13411
13517
|
}
|
|
13412
13518
|
});
|
|
13413
|
-
if (mapField) {
|
|
13414
|
-
this[uiKey] = mapField.convertVal(this.$origin[dataKey]);
|
|
13415
|
-
}
|
|
13416
13519
|
} else {
|
|
13417
13520
|
Object.defineProperty(this, uiKey, {
|
|
13418
13521
|
enumerable: true,
|
|
@@ -14091,8 +14194,8 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
14091
14194
|
};
|
|
14092
14195
|
|
|
14093
14196
|
// src/service/vo/ui-map-field.ts
|
|
14094
|
-
import { DataTypes } from "@ibiz-template/core";
|
|
14095
|
-
import { isNil as
|
|
14197
|
+
import { DataTypes as DataTypes2 } from "@ibiz-template/core";
|
|
14198
|
+
import { isNil as isNil10 } from "ramda";
|
|
14096
14199
|
var UIMapField = class {
|
|
14097
14200
|
constructor(uiKey, dataKey, opts = {}) {
|
|
14098
14201
|
/**
|
|
@@ -14113,10 +14216,10 @@ var UIMapField = class {
|
|
|
14113
14216
|
this.isRequestNeed = true;
|
|
14114
14217
|
this.uiKey = uiKey;
|
|
14115
14218
|
this.dataKey = dataKey;
|
|
14116
|
-
if (!
|
|
14219
|
+
if (!isNil10(opts.isOriginField)) {
|
|
14117
14220
|
this.isOriginField = opts.isOriginField;
|
|
14118
14221
|
}
|
|
14119
|
-
if (!
|
|
14222
|
+
if (!isNil10(opts.dataType)) {
|
|
14120
14223
|
this.dataType = opts.dataType;
|
|
14121
14224
|
}
|
|
14122
14225
|
}
|
|
@@ -14130,8 +14233,8 @@ var UIMapField = class {
|
|
|
14130
14233
|
if (!this.dataType) {
|
|
14131
14234
|
return value;
|
|
14132
14235
|
}
|
|
14133
|
-
if (
|
|
14134
|
-
const numVal = !
|
|
14236
|
+
if (DataTypes2.isNumber(this.dataType)) {
|
|
14237
|
+
const numVal = !isNil10(value) && value !== "" ? Number(value) : value;
|
|
14135
14238
|
if (Number.isNaN(numVal)) {
|
|
14136
14239
|
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
14137
14240
|
return value;
|
|
@@ -14307,7 +14410,7 @@ var DEServiceUtil = class {
|
|
|
14307
14410
|
};
|
|
14308
14411
|
|
|
14309
14412
|
// src/app-hub.ts
|
|
14310
|
-
import { RuntimeError as
|
|
14413
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
14311
14414
|
|
|
14312
14415
|
// src/application.ts
|
|
14313
14416
|
import { Net } from "@ibiz-template/core";
|
|
@@ -14332,6 +14435,11 @@ var Application = class {
|
|
|
14332
14435
|
this.net = new Net({
|
|
14333
14436
|
baseURL: "".concat(ibiz.env.baseUrl, "/").concat(model.appId)
|
|
14334
14437
|
});
|
|
14438
|
+
this.configCache = new ConfigService(
|
|
14439
|
+
model.appId,
|
|
14440
|
+
"PSSysApp",
|
|
14441
|
+
model.codeName
|
|
14442
|
+
);
|
|
14335
14443
|
this.deService = new DEServiceUtil(model);
|
|
14336
14444
|
this.codeList = new CodeListService(model);
|
|
14337
14445
|
this.authority = new AuthorityService(model);
|
|
@@ -14550,8 +14658,8 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14550
14658
|
|
|
14551
14659
|
// src/controller/common/view/view.controller.ts
|
|
14552
14660
|
import { createUUID as createUUID3, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
14553
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
14554
|
-
import { isEmpty as isEmpty8, isNil as
|
|
14661
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
14662
|
+
import { isEmpty as isEmpty8, isNil as isNil15, isNotNil as isNotNil3 } from "ramda";
|
|
14555
14663
|
|
|
14556
14664
|
// src/controller/utils/loading/loading.state.ts
|
|
14557
14665
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -15120,6 +15228,18 @@ var ControllerEvent = class {
|
|
|
15120
15228
|
}
|
|
15121
15229
|
this.evt.on(name, fn);
|
|
15122
15230
|
}
|
|
15231
|
+
/**
|
|
15232
|
+
* 取消订阅指定事件
|
|
15233
|
+
* @return {*}
|
|
15234
|
+
* @author: zhujiamin
|
|
15235
|
+
* @Date: 2023-09-22 17:45:07
|
|
15236
|
+
*/
|
|
15237
|
+
off(name, fn) {
|
|
15238
|
+
if (this.isDestroyed) {
|
|
15239
|
+
return;
|
|
15240
|
+
}
|
|
15241
|
+
this.evt.off(name, fn);
|
|
15242
|
+
}
|
|
15123
15243
|
/**
|
|
15124
15244
|
* 订阅任意事件
|
|
15125
15245
|
* @author lxm
|
|
@@ -15146,9 +15266,9 @@ var ControllerEvent = class {
|
|
|
15146
15266
|
};
|
|
15147
15267
|
|
|
15148
15268
|
// src/controller/utils/util/util.ts
|
|
15149
|
-
import { isNil as
|
|
15269
|
+
import { isNil as isNil11 } from "ramda";
|
|
15150
15270
|
function isValueChange(value, value2) {
|
|
15151
|
-
if ((
|
|
15271
|
+
if ((isNil11(value) || value === "") && (isNil11(value2) || value2 === "")) {
|
|
15152
15272
|
return false;
|
|
15153
15273
|
}
|
|
15154
15274
|
return value !== value2;
|
|
@@ -15224,7 +15344,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
15224
15344
|
|
|
15225
15345
|
// src/controller/utils/value-ex/value-ex.ts
|
|
15226
15346
|
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
15227
|
-
import { isNil as
|
|
15347
|
+
import { isNil as isNil12, mergeLeft } from "ramda";
|
|
15228
15348
|
var ValueExUtil = class {
|
|
15229
15349
|
/**
|
|
15230
15350
|
* 合并默认值
|
|
@@ -15249,7 +15369,7 @@ var ValueExUtil = class {
|
|
|
15249
15369
|
* @return {*} {string}
|
|
15250
15370
|
*/
|
|
15251
15371
|
static toText(options, value) {
|
|
15252
|
-
if (
|
|
15372
|
+
if (isNil12(value) || value === "") {
|
|
15253
15373
|
return "";
|
|
15254
15374
|
}
|
|
15255
15375
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -15274,12 +15394,12 @@ var ValueExUtil = class {
|
|
|
15274
15394
|
import { RuntimeError as RuntimeError22, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
15275
15395
|
import dayjs from "dayjs";
|
|
15276
15396
|
import { createUUID as createUUID2 } from "qx-util";
|
|
15277
|
-
import { isNil as
|
|
15397
|
+
import { isNil as isNil13, isNotNil as isNotNil2 } from "ramda";
|
|
15278
15398
|
function getDefaultValue(opts, origins) {
|
|
15279
15399
|
var _a;
|
|
15280
15400
|
const { name, valueType, defaultValue, valueFormat } = opts;
|
|
15281
15401
|
const { data, context, params } = origins;
|
|
15282
|
-
if (
|
|
15402
|
+
if (isNil13(valueType) && isNil13(defaultValue)) {
|
|
15283
15403
|
return;
|
|
15284
15404
|
}
|
|
15285
15405
|
if (valueType === "RESET") {
|
|
@@ -15530,6 +15650,205 @@ var BaseController = class {
|
|
|
15530
15650
|
}
|
|
15531
15651
|
};
|
|
15532
15652
|
|
|
15653
|
+
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
15654
|
+
import { RuntimeError as RuntimeError23, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
15655
|
+
import { isNil as isNil14, mergeRight as mergeRight2 } from "ramda";
|
|
15656
|
+
var ViewMsgController = class _ViewMsgController {
|
|
15657
|
+
constructor(msgGroupId) {
|
|
15658
|
+
this.msgGroupId = msgGroupId;
|
|
15659
|
+
/**
|
|
15660
|
+
* 视图消息map
|
|
15661
|
+
* @author lxm
|
|
15662
|
+
* @date 2023-09-22 05:38:03
|
|
15663
|
+
*/
|
|
15664
|
+
this.viewMsgMap = /* @__PURE__ */ new Map();
|
|
15665
|
+
}
|
|
15666
|
+
/**
|
|
15667
|
+
* 初始化方法,从全局获取视图消息组和视图消息的模型
|
|
15668
|
+
* @author lxm
|
|
15669
|
+
* @date 2023-09-22 05:41:08
|
|
15670
|
+
* @param {IContext} context
|
|
15671
|
+
* @return {*} {Promise<void>}
|
|
15672
|
+
*/
|
|
15673
|
+
async init(context) {
|
|
15674
|
+
var _a, _b;
|
|
15675
|
+
const appModel = ibiz.hub.getApp(context.srfappid).model;
|
|
15676
|
+
const msgGroup = (_a = appModel.appViewMsgGroups) == null ? void 0 : _a.find(
|
|
15677
|
+
(item) => item.id === this.msgGroupId
|
|
15678
|
+
);
|
|
15679
|
+
if (!msgGroup) {
|
|
15680
|
+
throw new RuntimeError23("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
15681
|
+
}
|
|
15682
|
+
this.msgGroup = msgGroup;
|
|
15683
|
+
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
15684
|
+
(item) => item.appViewMsgId
|
|
15685
|
+
);
|
|
15686
|
+
(_b = appModel.appViewMsgs) == null ? void 0 : _b.forEach((item) => {
|
|
15687
|
+
const index = msgDetailsViewMsgIds.indexOf(item.id);
|
|
15688
|
+
if (index !== -1) {
|
|
15689
|
+
this.viewMsgMap.set(item.id, item);
|
|
15690
|
+
msgDetailsViewMsgIds.splice(index, 1);
|
|
15691
|
+
}
|
|
15692
|
+
});
|
|
15693
|
+
if (msgDetailsViewMsgIds.length) {
|
|
15694
|
+
throw new RuntimeError23(
|
|
15695
|
+
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
15696
|
+
);
|
|
15697
|
+
}
|
|
15698
|
+
}
|
|
15699
|
+
getDeFieldName(appDataEntity, fieldId) {
|
|
15700
|
+
var _a, _b;
|
|
15701
|
+
if (!fieldId) {
|
|
15702
|
+
return;
|
|
15703
|
+
}
|
|
15704
|
+
return (_b = (_a = findFieldById(appDataEntity, fieldId)) == null ? void 0 : _a.name) == null ? void 0 : _b.toLowerCase();
|
|
15705
|
+
}
|
|
15706
|
+
/**
|
|
15707
|
+
* 查询并获取指定实体的数据集数据
|
|
15708
|
+
* @author lxm
|
|
15709
|
+
* @date 2023-09-20 08:10:57
|
|
15710
|
+
* @static
|
|
15711
|
+
* @param {IPSAppDEDataSetViewMsg} msgModel
|
|
15712
|
+
* @param {IParams} [context={}]
|
|
15713
|
+
* @param {IParams} [params={}]
|
|
15714
|
+
* @return {*} {Promise<IData[]>}
|
|
15715
|
+
*/
|
|
15716
|
+
static async fetchDataSet(msgModel, context, params) {
|
|
15717
|
+
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
15718
|
+
if (!appDEDataSetId) {
|
|
15719
|
+
throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
15720
|
+
}
|
|
15721
|
+
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
15722
|
+
if (res.data.length) {
|
|
15723
|
+
return res.data;
|
|
15724
|
+
}
|
|
15725
|
+
return [];
|
|
15726
|
+
}
|
|
15727
|
+
/**
|
|
15728
|
+
* 计算视图信息呈现数据
|
|
15729
|
+
* @author lxm
|
|
15730
|
+
* @date 2023-09-20 09:16:59
|
|
15731
|
+
* @param {IContext} context
|
|
15732
|
+
* @param {IParams} params
|
|
15733
|
+
* @return {*} {IViewMessage[]}
|
|
15734
|
+
*/
|
|
15735
|
+
async calcViewMessages(context, params) {
|
|
15736
|
+
const details = this.msgGroup.appViewMsgGroupDetails;
|
|
15737
|
+
const result = [];
|
|
15738
|
+
if (details == null ? void 0 : details.length) {
|
|
15739
|
+
await Promise.all(
|
|
15740
|
+
details.map(async (detail) => {
|
|
15741
|
+
const msgModel = this.viewMsgMap.get(detail.appViewMsgId);
|
|
15742
|
+
if (msgModel.dynamicMode === 1) {
|
|
15743
|
+
const msgs = await this.calcDynaMsgs(detail, context, params);
|
|
15744
|
+
result.push(...msgs);
|
|
15745
|
+
} else {
|
|
15746
|
+
const msgData = this.calcStaticMsg(detail);
|
|
15747
|
+
result.push(msgData);
|
|
15748
|
+
}
|
|
15749
|
+
})
|
|
15750
|
+
);
|
|
15751
|
+
}
|
|
15752
|
+
return result;
|
|
15753
|
+
}
|
|
15754
|
+
/**
|
|
15755
|
+
* 计算静态消息数据(或者动态的里面静态的配置)
|
|
15756
|
+
* @author lxm
|
|
15757
|
+
* @date 2023-09-20 09:46:45
|
|
15758
|
+
* @protected
|
|
15759
|
+
* @param {IPSAppViewMsgGroupDetail} detail
|
|
15760
|
+
* @return {*} {IViewMessage}
|
|
15761
|
+
*/
|
|
15762
|
+
calcStaticMsg(detail) {
|
|
15763
|
+
const { position: position1 } = detail;
|
|
15764
|
+
const {
|
|
15765
|
+
title,
|
|
15766
|
+
message,
|
|
15767
|
+
removeMode,
|
|
15768
|
+
position: position2,
|
|
15769
|
+
messageType
|
|
15770
|
+
} = this.viewMsgMap.get(detail.appViewMsgId);
|
|
15771
|
+
const position = position1 || position2;
|
|
15772
|
+
return {
|
|
15773
|
+
title,
|
|
15774
|
+
message,
|
|
15775
|
+
position,
|
|
15776
|
+
messageType,
|
|
15777
|
+
removeMode
|
|
15778
|
+
};
|
|
15779
|
+
}
|
|
15780
|
+
/**
|
|
15781
|
+
* 计算动态视图消息数据
|
|
15782
|
+
* @author lxm
|
|
15783
|
+
* @date 2023-09-20 09:46:26
|
|
15784
|
+
* @protected
|
|
15785
|
+
* @param {IPSAppViewMsgGroupDetail} detail
|
|
15786
|
+
* @param {IContext} context
|
|
15787
|
+
* @param {IParams} params
|
|
15788
|
+
* @return {*} {Promise<IViewMessage[]>}
|
|
15789
|
+
*/
|
|
15790
|
+
async calcDynaMsgs(detail, context, params) {
|
|
15791
|
+
const msgModel = this.viewMsgMap.get(
|
|
15792
|
+
detail.appViewMsgId
|
|
15793
|
+
);
|
|
15794
|
+
const {
|
|
15795
|
+
appDataEntityId,
|
|
15796
|
+
orderValueAppDEFieldId,
|
|
15797
|
+
titleAppDEFieldId,
|
|
15798
|
+
removeFlagAppDEFieldId,
|
|
15799
|
+
msgTypeAppDEFieldId,
|
|
15800
|
+
contentAppDEFieldId,
|
|
15801
|
+
msgPosAppDEFieldId
|
|
15802
|
+
} = msgModel;
|
|
15803
|
+
if (!appDataEntityId) {
|
|
15804
|
+
throw new RuntimeModelError20(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
15805
|
+
}
|
|
15806
|
+
const entity = await ibiz.hub.getAppDataEntity(
|
|
15807
|
+
appDataEntityId,
|
|
15808
|
+
context.srfappid
|
|
15809
|
+
);
|
|
15810
|
+
const fetchParams = { ...params };
|
|
15811
|
+
const sortField = this.getDeFieldName(entity, orderValueAppDEFieldId);
|
|
15812
|
+
if (sortField) {
|
|
15813
|
+
fetchParams.sort = "".concat(sortField, ",asc");
|
|
15814
|
+
}
|
|
15815
|
+
const dataSet = await _ViewMsgController.fetchDataSet(
|
|
15816
|
+
msgModel,
|
|
15817
|
+
context,
|
|
15818
|
+
fetchParams
|
|
15819
|
+
);
|
|
15820
|
+
if (!dataSet.length) {
|
|
15821
|
+
return [];
|
|
15822
|
+
}
|
|
15823
|
+
const basicMsg = this.calcStaticMsg(detail);
|
|
15824
|
+
const titleField = this.getDeFieldName(entity, titleAppDEFieldId);
|
|
15825
|
+
const positionField = this.getDeFieldName(entity, msgPosAppDEFieldId);
|
|
15826
|
+
const messageField = this.getDeFieldName(entity, contentAppDEFieldId);
|
|
15827
|
+
const typeField = this.getDeFieldName(entity, msgTypeAppDEFieldId);
|
|
15828
|
+
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
15829
|
+
const deViewMessages = dataSet.map((item) => {
|
|
15830
|
+
const message = {};
|
|
15831
|
+
if (positionField && !isNil14(item[positionField])) {
|
|
15832
|
+
message.position = item[positionField];
|
|
15833
|
+
}
|
|
15834
|
+
if (titleField && !isNil14(item[titleField])) {
|
|
15835
|
+
message.title = item[titleField];
|
|
15836
|
+
}
|
|
15837
|
+
if (messageField && !isNil14(item[messageField])) {
|
|
15838
|
+
message.message = item[messageField];
|
|
15839
|
+
}
|
|
15840
|
+
if (typeField && !isNil14(item[typeField])) {
|
|
15841
|
+
message.messageType = item[typeField];
|
|
15842
|
+
}
|
|
15843
|
+
if (removeModeField && !isNil14(item[removeModeField])) {
|
|
15844
|
+
message.removeMode = item[removeModeField];
|
|
15845
|
+
}
|
|
15846
|
+
return mergeRight2(basicMsg, message);
|
|
15847
|
+
});
|
|
15848
|
+
return deViewMessages;
|
|
15849
|
+
}
|
|
15850
|
+
};
|
|
15851
|
+
|
|
15533
15852
|
// src/controller/common/view/view.controller.ts
|
|
15534
15853
|
var ViewController = class extends BaseController {
|
|
15535
15854
|
/**
|
|
@@ -15665,6 +15984,7 @@ var ViewController = class extends BaseController {
|
|
|
15665
15984
|
this.state.isLoading = false;
|
|
15666
15985
|
this.state.caption = this.model.caption;
|
|
15667
15986
|
this.state.srfactiveviewdata = null;
|
|
15987
|
+
this.state.viewMessages = {};
|
|
15668
15988
|
}
|
|
15669
15989
|
async onCreated() {
|
|
15670
15990
|
await super.onCreated();
|
|
@@ -15705,6 +16025,7 @@ var ViewController = class extends BaseController {
|
|
|
15705
16025
|
});
|
|
15706
16026
|
}
|
|
15707
16027
|
}
|
|
16028
|
+
this.initViewMsg();
|
|
15708
16029
|
if (this.engines.length) {
|
|
15709
16030
|
await Promise.all(this.engines.map((engine) => engine.onCreated()));
|
|
15710
16031
|
}
|
|
@@ -15739,7 +16060,7 @@ var ViewController = class extends BaseController {
|
|
|
15739
16060
|
*/
|
|
15740
16061
|
handleContextParams() {
|
|
15741
16062
|
this.context.srfappid = this.model.appId;
|
|
15742
|
-
if (
|
|
16063
|
+
if (isNil15(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
15743
16064
|
this.context.srfsessionid = createUUID3();
|
|
15744
16065
|
}
|
|
15745
16066
|
const navContexts = this.model.appViewNavContexts;
|
|
@@ -15771,7 +16092,7 @@ var ViewController = class extends BaseController {
|
|
|
15771
16092
|
async callUIAction(key, args) {
|
|
15772
16093
|
const result = this.call(key, args);
|
|
15773
16094
|
if (result === void 0) {
|
|
15774
|
-
throw new
|
|
16095
|
+
throw new RuntimeError24("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
15775
16096
|
}
|
|
15776
16097
|
return result;
|
|
15777
16098
|
}
|
|
@@ -15811,6 +16132,55 @@ var ViewController = class extends BaseController {
|
|
|
15811
16132
|
});
|
|
15812
16133
|
}
|
|
15813
16134
|
}
|
|
16135
|
+
/**
|
|
16136
|
+
* 初始化视图消息
|
|
16137
|
+
* @author lxm
|
|
16138
|
+
* @date 2023-09-20 09:19:20
|
|
16139
|
+
*/
|
|
16140
|
+
async initViewMsg() {
|
|
16141
|
+
const { appViewMsgGroupId } = this.model;
|
|
16142
|
+
if (appViewMsgGroupId) {
|
|
16143
|
+
this.state.viewMessages = { TOP: [], BOTTOM: [], BODY: [], POPUP: [] };
|
|
16144
|
+
this.viewMsgController = new ViewMsgController(appViewMsgGroupId);
|
|
16145
|
+
await this.viewMsgController.init(this.context);
|
|
16146
|
+
const messages = await this.viewMsgController.calcViewMessages(
|
|
16147
|
+
this.context,
|
|
16148
|
+
this.params
|
|
16149
|
+
);
|
|
16150
|
+
messages.forEach((message) => {
|
|
16151
|
+
if (["TOP", "BOTTOM", "BODY", "POPUP"].includes(message.position)) {
|
|
16152
|
+
this.state.viewMessages[message.position].push(message);
|
|
16153
|
+
}
|
|
16154
|
+
});
|
|
16155
|
+
if (this.state.viewMessages.POPUP.length) {
|
|
16156
|
+
this.alertViewMessage(this.state.viewMessages.POPUP);
|
|
16157
|
+
}
|
|
16158
|
+
}
|
|
16159
|
+
}
|
|
16160
|
+
/**
|
|
16161
|
+
* 弹出视图消息,一个接一个弹
|
|
16162
|
+
* @author lxm
|
|
16163
|
+
* @date 2023-09-20 10:17:42
|
|
16164
|
+
* @param {ViewMessage[]} messages
|
|
16165
|
+
* @return {*} {Promise<void>}
|
|
16166
|
+
*/
|
|
16167
|
+
async alertViewMessage(messages) {
|
|
16168
|
+
const [message, ...rest] = messages;
|
|
16169
|
+
const modalParams = {
|
|
16170
|
+
title: message.title,
|
|
16171
|
+
desc: message.message
|
|
16172
|
+
};
|
|
16173
|
+
if (message.messageType === "WARN") {
|
|
16174
|
+
await ibiz.modal.warning(modalParams);
|
|
16175
|
+
} else if (message.messageType === "ERROR") {
|
|
16176
|
+
await ibiz.modal.error(modalParams);
|
|
16177
|
+
} else {
|
|
16178
|
+
await ibiz.modal.info(modalParams);
|
|
16179
|
+
}
|
|
16180
|
+
if (rest.length) {
|
|
16181
|
+
this.alertViewMessage(rest);
|
|
16182
|
+
}
|
|
16183
|
+
}
|
|
15814
16184
|
};
|
|
15815
16185
|
|
|
15816
16186
|
// src/controller/common/view/mob-view.controller.ts
|
|
@@ -15972,7 +16342,7 @@ var EditorController = class {
|
|
|
15972
16342
|
};
|
|
15973
16343
|
|
|
15974
16344
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
15975
|
-
import { RuntimeModelError as
|
|
16345
|
+
import { RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
15976
16346
|
var CodeListEditorController = class extends EditorController {
|
|
15977
16347
|
/**
|
|
15978
16348
|
* 加载代码表数据
|
|
@@ -15996,13 +16366,13 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15996
16366
|
);
|
|
15997
16367
|
return dataItems;
|
|
15998
16368
|
}
|
|
15999
|
-
throw new
|
|
16369
|
+
throw new RuntimeModelError21(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
16000
16370
|
}
|
|
16001
16371
|
};
|
|
16002
16372
|
|
|
16003
16373
|
// src/controller/common/control/control.controller.ts
|
|
16004
16374
|
import { NoticeError } from "@ibiz-template/core";
|
|
16005
|
-
import { isNil as
|
|
16375
|
+
import { isNil as isNil16 } from "ramda";
|
|
16006
16376
|
var ControlController = class extends BaseController {
|
|
16007
16377
|
/**
|
|
16008
16378
|
* Creates an instance of ControlController.
|
|
@@ -16179,7 +16549,7 @@ var ControlController = class extends BaseController {
|
|
|
16179
16549
|
let message;
|
|
16180
16550
|
let duration;
|
|
16181
16551
|
if (msgItem && msgItem.content) {
|
|
16182
|
-
duration =
|
|
16552
|
+
duration = isNil16(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
16183
16553
|
const scriptParams = { ...this.getEventArgs() };
|
|
16184
16554
|
if (opts == null ? void 0 : opts.data) {
|
|
16185
16555
|
scriptParams.data = opts.data;
|
|
@@ -16218,7 +16588,7 @@ var ControlController = class extends BaseController {
|
|
|
16218
16588
|
};
|
|
16219
16589
|
|
|
16220
16590
|
// src/controller/common/control/md-control.controller.ts
|
|
16221
|
-
import { isElementSame, RuntimeError as
|
|
16591
|
+
import { isElementSame, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
16222
16592
|
var MDControlController = class extends ControlController {
|
|
16223
16593
|
constructor() {
|
|
16224
16594
|
super(...arguments);
|
|
@@ -16333,6 +16703,9 @@ var MDControlController = class extends ControlController {
|
|
|
16333
16703
|
* @date 2022-08-19 14:08:50
|
|
16334
16704
|
*/
|
|
16335
16705
|
async load(args = {}) {
|
|
16706
|
+
if (this.state.isSimple) {
|
|
16707
|
+
return [];
|
|
16708
|
+
}
|
|
16336
16709
|
await this.startLoading();
|
|
16337
16710
|
try {
|
|
16338
16711
|
const isInitialLoad = args.isInitialLoad === true;
|
|
@@ -16400,7 +16773,7 @@ var MDControlController = class extends ControlController {
|
|
|
16400
16773
|
async remove(args) {
|
|
16401
16774
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
16402
16775
|
if (!(data == null ? void 0 : data.length)) {
|
|
16403
|
-
throw new
|
|
16776
|
+
throw new RuntimeError25("\u672A\u9009\u4E2D\u6570\u636E");
|
|
16404
16777
|
}
|
|
16405
16778
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
16406
16779
|
const del = await ibiz.confirm.error({
|
|
@@ -16544,8 +16917,8 @@ var MDControlController = class extends ControlController {
|
|
|
16544
16917
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
16545
16918
|
import {
|
|
16546
16919
|
findRecursiveChild,
|
|
16547
|
-
RuntimeError as
|
|
16548
|
-
RuntimeModelError as
|
|
16920
|
+
RuntimeError as RuntimeError26,
|
|
16921
|
+
RuntimeModelError as RuntimeModelError22
|
|
16549
16922
|
} from "@ibiz-template/core";
|
|
16550
16923
|
var AppMenuController = class extends ControlController {
|
|
16551
16924
|
initState() {
|
|
@@ -16584,14 +16957,14 @@ var AppMenuController = class extends ControlController {
|
|
|
16584
16957
|
childrenFields: ["appMenuItems"]
|
|
16585
16958
|
});
|
|
16586
16959
|
if (!menuItem) {
|
|
16587
|
-
throw new
|
|
16960
|
+
throw new RuntimeError26("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
16588
16961
|
}
|
|
16589
16962
|
this.evt.emit("onClick", {
|
|
16590
16963
|
eventArg: id,
|
|
16591
16964
|
event
|
|
16592
16965
|
});
|
|
16593
16966
|
if (!menuItem.appFuncId) {
|
|
16594
|
-
throw new
|
|
16967
|
+
throw new RuntimeModelError22(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
16595
16968
|
}
|
|
16596
16969
|
const tempContext = this.context.clone();
|
|
16597
16970
|
if (this.routeDepth && useDepth) {
|
|
@@ -16674,8 +17047,8 @@ var AppMenuController = class extends ControlController {
|
|
|
16674
17047
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
16675
17048
|
import {
|
|
16676
17049
|
findRecursiveChild as findRecursiveChild2,
|
|
16677
|
-
RuntimeError as
|
|
16678
|
-
RuntimeModelError as
|
|
17050
|
+
RuntimeError as RuntimeError27,
|
|
17051
|
+
RuntimeModelError as RuntimeModelError23
|
|
16679
17052
|
} from "@ibiz-template/core";
|
|
16680
17053
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
16681
17054
|
async onClickMenuItem(id, event) {
|
|
@@ -16684,14 +17057,14 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
16684
17057
|
childrenFields: ["appMenuItems"]
|
|
16685
17058
|
});
|
|
16686
17059
|
if (!menuItem) {
|
|
16687
|
-
throw new
|
|
17060
|
+
throw new RuntimeError27("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
16688
17061
|
}
|
|
16689
17062
|
this.evt.emit("onClick", {
|
|
16690
17063
|
eventArg: id,
|
|
16691
17064
|
event
|
|
16692
17065
|
});
|
|
16693
17066
|
if (!menuItem.appFuncId) {
|
|
16694
|
-
throw new
|
|
17067
|
+
throw new RuntimeModelError23(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
16695
17068
|
}
|
|
16696
17069
|
const tempContext = this.context.clone();
|
|
16697
17070
|
if (this.routeDepth === 1) {
|
|
@@ -16712,7 +17085,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
16712
17085
|
import dayjs2 from "dayjs";
|
|
16713
17086
|
|
|
16714
17087
|
// src/controller/control/calendar/calendar.service.ts
|
|
16715
|
-
import { RuntimeError as
|
|
17088
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
16716
17089
|
var CalendarService = class extends MDControlService {
|
|
16717
17090
|
/**
|
|
16718
17091
|
* 执行查询多条数据的方法
|
|
@@ -16762,11 +17135,11 @@ var CalendarService = class extends MDControlService {
|
|
|
16762
17135
|
setCalendarConfigData(items, index) {
|
|
16763
17136
|
const { sysCalendarItems } = this.model;
|
|
16764
17137
|
if (!sysCalendarItems) {
|
|
16765
|
-
throw new
|
|
17138
|
+
throw new RuntimeError28("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16766
17139
|
}
|
|
16767
17140
|
const calendarItem = sysCalendarItems[index];
|
|
16768
17141
|
if (!calendarItem) {
|
|
16769
|
-
throw new
|
|
17142
|
+
throw new RuntimeError28("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16770
17143
|
}
|
|
16771
17144
|
return items.map((item) => {
|
|
16772
17145
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -16956,24 +17329,24 @@ var CalendarController = class extends MDControlController {
|
|
|
16956
17329
|
};
|
|
16957
17330
|
|
|
16958
17331
|
// src/controller/control/chart/chart.controller.ts
|
|
16959
|
-
import { RuntimeError as
|
|
17332
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
16960
17333
|
|
|
16961
17334
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
16962
17335
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
16963
|
-
import { RuntimeError as
|
|
17336
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
16964
17337
|
|
|
16965
17338
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
16966
|
-
import { RuntimeModelError as
|
|
17339
|
+
import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
16967
17340
|
|
|
16968
17341
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
16969
|
-
import { RuntimeModelError as
|
|
17342
|
+
import { RuntimeModelError as RuntimeModelError24, toNumberOrNil } from "@ibiz-template/core";
|
|
16970
17343
|
import dayjs3 from "dayjs";
|
|
16971
17344
|
import minMax from "dayjs/plugin/minMax";
|
|
16972
17345
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
16973
17346
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
16974
17347
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
16975
17348
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
16976
|
-
import { clone as clone11, isNil as
|
|
17349
|
+
import { clone as clone11, isNil as isNil17, mergeDeepRight } from "ramda";
|
|
16977
17350
|
dayjs3.extend(minMax);
|
|
16978
17351
|
dayjs3.extend(isSameOrBefore);
|
|
16979
17352
|
dayjs3.extend(quarterOfYear);
|
|
@@ -17009,10 +17382,10 @@ var BaseSeriesGenerator = class {
|
|
|
17009
17382
|
this.chartGenerator = chartGenerator;
|
|
17010
17383
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
17011
17384
|
if (!model.catalogField) {
|
|
17012
|
-
throw new
|
|
17385
|
+
throw new RuntimeModelError24(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
17013
17386
|
}
|
|
17014
17387
|
if (!model.valueField) {
|
|
17015
|
-
throw new
|
|
17388
|
+
throw new RuntimeModelError24(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
17016
17389
|
}
|
|
17017
17390
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
17018
17391
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -17062,10 +17435,10 @@ var BaseSeriesGenerator = class {
|
|
|
17062
17435
|
* @return {*} {(string | undefined)}
|
|
17063
17436
|
*/
|
|
17064
17437
|
translateVal(codeListKey, val, isExclude = false) {
|
|
17065
|
-
if (
|
|
17438
|
+
if (isNil17(val)) {
|
|
17066
17439
|
return void 0;
|
|
17067
17440
|
}
|
|
17068
|
-
if (
|
|
17441
|
+
if (isNil17(codeListKey)) {
|
|
17069
17442
|
return val;
|
|
17070
17443
|
}
|
|
17071
17444
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -17095,7 +17468,7 @@ var BaseSeriesGenerator = class {
|
|
|
17095
17468
|
seriesCodeListId,
|
|
17096
17469
|
item[this.groupField]
|
|
17097
17470
|
);
|
|
17098
|
-
if (
|
|
17471
|
+
if (isNil17(groupVal)) {
|
|
17099
17472
|
return;
|
|
17100
17473
|
}
|
|
17101
17474
|
group = groupVal;
|
|
@@ -17390,10 +17763,10 @@ var BaseSeriesGenerator = class {
|
|
|
17390
17763
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17391
17764
|
calcStaticOptions() {
|
|
17392
17765
|
if (this.xAxisIndex === void 0) {
|
|
17393
|
-
throw new
|
|
17766
|
+
throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17394
17767
|
}
|
|
17395
17768
|
if (this.yAxisIndex === void 0) {
|
|
17396
|
-
throw new
|
|
17769
|
+
throw new RuntimeModelError25(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17397
17770
|
}
|
|
17398
17771
|
const options = super.calcStaticOptions();
|
|
17399
17772
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17409,14 +17782,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
17409
17782
|
};
|
|
17410
17783
|
|
|
17411
17784
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
17412
|
-
import { RuntimeModelError as
|
|
17785
|
+
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
17413
17786
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17414
17787
|
calcStaticOptions() {
|
|
17415
17788
|
if (this.xAxisIndex === void 0) {
|
|
17416
|
-
throw new
|
|
17789
|
+
throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17417
17790
|
}
|
|
17418
17791
|
if (this.yAxisIndex === void 0) {
|
|
17419
|
-
throw new
|
|
17792
|
+
throw new RuntimeModelError26(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17420
17793
|
}
|
|
17421
17794
|
const options = super.calcStaticOptions();
|
|
17422
17795
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17469,14 +17842,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
17469
17842
|
};
|
|
17470
17843
|
|
|
17471
17844
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
17472
|
-
import { RuntimeModelError as
|
|
17845
|
+
import { RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
17473
17846
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
17474
17847
|
calcStaticOptions() {
|
|
17475
17848
|
if (this.xAxisIndex === void 0) {
|
|
17476
|
-
throw new
|
|
17849
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
17477
17850
|
}
|
|
17478
17851
|
if (this.yAxisIndex === void 0) {
|
|
17479
|
-
throw new
|
|
17852
|
+
throw new RuntimeModelError27(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
17480
17853
|
}
|
|
17481
17854
|
const options = super.calcStaticOptions();
|
|
17482
17855
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -17896,7 +18269,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
17896
18269
|
getSrfkeyByParams(params) {
|
|
17897
18270
|
const generator = this.seriesGenerators[params.seriesIndex];
|
|
17898
18271
|
if (!generator) {
|
|
17899
|
-
throw new
|
|
18272
|
+
throw new RuntimeError29("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
17900
18273
|
}
|
|
17901
18274
|
return generator.getSrfkeyByParams(params);
|
|
17902
18275
|
}
|
|
@@ -18008,10 +18381,10 @@ var ChartController = class extends MDControlController {
|
|
|
18008
18381
|
*/
|
|
18009
18382
|
updateChart() {
|
|
18010
18383
|
if (!this.chart) {
|
|
18011
|
-
throw new
|
|
18384
|
+
throw new RuntimeError30("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
18012
18385
|
}
|
|
18013
18386
|
if (!this.options) {
|
|
18014
|
-
throw new
|
|
18387
|
+
throw new RuntimeError30("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
18015
18388
|
}
|
|
18016
18389
|
this.chart.setOption(this.options);
|
|
18017
18390
|
this.resizeChart();
|
|
@@ -18056,20 +18429,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
18056
18429
|
};
|
|
18057
18430
|
|
|
18058
18431
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18059
|
-
import { recursiveIterate, RuntimeError as
|
|
18432
|
+
import { recursiveIterate, RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
18060
18433
|
|
|
18061
18434
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18062
|
-
import { RuntimeModelError as
|
|
18435
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
18063
18436
|
import { isArray as isArray4 } from "qx-util";
|
|
18064
18437
|
|
|
18065
18438
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
18066
|
-
import { RuntimeModelError as
|
|
18439
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
18067
18440
|
|
|
18068
18441
|
// src/ui-logic/index.ts
|
|
18069
|
-
import { RuntimeError as
|
|
18442
|
+
import { RuntimeError as RuntimeError35 } from "@ibiz-template/core";
|
|
18070
18443
|
|
|
18071
18444
|
// src/ui-logic/ui-logic.ts
|
|
18072
|
-
import { ModelError as ModelError24, RuntimeModelError as
|
|
18445
|
+
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
18073
18446
|
|
|
18074
18447
|
// src/ui-logic/ui-logic-context.ts
|
|
18075
18448
|
var UILogicContext = class {
|
|
@@ -18189,23 +18562,34 @@ var UILogicContext = class {
|
|
|
18189
18562
|
get: () => this.lastReturn
|
|
18190
18563
|
});
|
|
18191
18564
|
}
|
|
18565
|
+
/**
|
|
18566
|
+
* 是否是实体参数变量(即后台数据对象)
|
|
18567
|
+
* @author lxm
|
|
18568
|
+
* @date 2023-09-22 03:40:30
|
|
18569
|
+
* @param {string} paramId
|
|
18570
|
+
* @return {*} {boolean}
|
|
18571
|
+
*/
|
|
18572
|
+
isEntityParam(paramId) {
|
|
18573
|
+
const deLogicParams = this.deLogicParams.get(paramId);
|
|
18574
|
+
return !!(deLogicParams && deLogicParams.model.entityParam);
|
|
18575
|
+
}
|
|
18192
18576
|
};
|
|
18193
18577
|
|
|
18194
18578
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
18195
|
-
import { RuntimeModelError as
|
|
18579
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
18196
18580
|
|
|
18197
18581
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
18198
18582
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
18199
18583
|
|
|
18200
18584
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
18201
|
-
import { RuntimeModelError as
|
|
18585
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
18202
18586
|
|
|
18203
18587
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
18204
18588
|
var UILogicLinkCond = class {
|
|
18205
18589
|
};
|
|
18206
18590
|
|
|
18207
18591
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
18208
|
-
import { ModelError as ModelError17, RuntimeModelError as
|
|
18592
|
+
import { ModelError as ModelError17, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
18209
18593
|
var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
18210
18594
|
constructor(model) {
|
|
18211
18595
|
super();
|
|
@@ -18240,7 +18624,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18240
18624
|
switch (this.type) {
|
|
18241
18625
|
case "ENTITYFIELD": {
|
|
18242
18626
|
if (!this.value) {
|
|
18243
|
-
throw new
|
|
18627
|
+
throw new RuntimeModelError28(
|
|
18244
18628
|
this.model,
|
|
18245
18629
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18246
18630
|
);
|
|
@@ -18250,7 +18634,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
18250
18634
|
}
|
|
18251
18635
|
case "SRCENTITYFIELD": {
|
|
18252
18636
|
if (!this.value) {
|
|
18253
|
-
throw new
|
|
18637
|
+
throw new RuntimeModelError28(
|
|
18254
18638
|
this.model,
|
|
18255
18639
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
18256
18640
|
);
|
|
@@ -18313,7 +18697,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
18313
18697
|
test(ctx, context, data) {
|
|
18314
18698
|
let bol = true;
|
|
18315
18699
|
if (this.conds.length === 0) {
|
|
18316
|
-
throw new
|
|
18700
|
+
throw new RuntimeModelError29(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
18317
18701
|
}
|
|
18318
18702
|
for (let i = 0; i < this.conds.length; i++) {
|
|
18319
18703
|
const cond = this.conds[i];
|
|
@@ -18367,7 +18751,7 @@ var UILogicLink = class {
|
|
|
18367
18751
|
*/
|
|
18368
18752
|
this.groupCond = null;
|
|
18369
18753
|
const { linkMode, deuilogicLinkGroupCond } = this.model;
|
|
18370
|
-
if (linkMode === 0) {
|
|
18754
|
+
if ((linkMode || 0) === 0) {
|
|
18371
18755
|
if (deuilogicLinkGroupCond) {
|
|
18372
18756
|
this.groupCond = new UILogicLinkGroupCond(deuilogicLinkGroupCond);
|
|
18373
18757
|
}
|
|
@@ -18439,10 +18823,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18439
18823
|
retDEUILogicParamId
|
|
18440
18824
|
} = this.model;
|
|
18441
18825
|
if (!dstAppDataEntityId) {
|
|
18442
|
-
throw new
|
|
18826
|
+
throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
18443
18827
|
}
|
|
18444
18828
|
if (!dstAppDEActionId) {
|
|
18445
|
-
throw new
|
|
18829
|
+
throw new RuntimeModelError30(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
18446
18830
|
}
|
|
18447
18831
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
18448
18832
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -18460,13 +18844,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18460
18844
|
};
|
|
18461
18845
|
|
|
18462
18846
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
18463
|
-
import { RuntimeModelError as
|
|
18847
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
18464
18848
|
var DEUIActionNode = class extends UILogicNode {
|
|
18465
18849
|
async exec(ctx) {
|
|
18466
18850
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
18467
18851
|
const { data, parameters } = ctx;
|
|
18468
18852
|
if (!dstAppDEUIActionId) {
|
|
18469
|
-
throw new
|
|
18853
|
+
throw new RuntimeModelError31(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
18470
18854
|
}
|
|
18471
18855
|
let actionData = [data];
|
|
18472
18856
|
if (dstDEUILogicParamId) {
|
|
@@ -18533,10 +18917,14 @@ import { clone as clone12 } from "ramda";
|
|
|
18533
18917
|
function handleSrcVal2(ctx, srcValParams) {
|
|
18534
18918
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18535
18919
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
18920
|
+
let srcField = srcFieldName;
|
|
18536
18921
|
let value;
|
|
18537
18922
|
switch (srcValueType) {
|
|
18538
18923
|
case "SRCDLPARAM":
|
|
18539
18924
|
value = ctx.params[srcDEUILogicParamId];
|
|
18925
|
+
if (ctx.isEntityParam(srcDEUILogicParamId)) {
|
|
18926
|
+
srcField = srcField == null ? void 0 : srcField.toLowerCase();
|
|
18927
|
+
}
|
|
18540
18928
|
break;
|
|
18541
18929
|
case "NULLVALUE":
|
|
18542
18930
|
return null;
|
|
@@ -18560,9 +18948,20 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18560
18948
|
default:
|
|
18561
18949
|
throw new ModelError20(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
18562
18950
|
}
|
|
18563
|
-
const srcField = srcFieldName;
|
|
18564
18951
|
if (value && srcField) {
|
|
18565
|
-
|
|
18952
|
+
try {
|
|
18953
|
+
value = ScriptFactory.execScriptFn(
|
|
18954
|
+
{ srcValue: value },
|
|
18955
|
+
"srcValue.".concat(srcField),
|
|
18956
|
+
{
|
|
18957
|
+
singleRowReturn: true,
|
|
18958
|
+
isAsync: false
|
|
18959
|
+
}
|
|
18960
|
+
);
|
|
18961
|
+
} catch (error) {
|
|
18962
|
+
ibiz.log.error("\u4ECE\u6E90\u53C2\u6570\u53D6\u5C5E\u6027".concat(srcField, "\u62A5\u9519\uFF0C\u6E90\u53C2\u6570\uFF1A"), value);
|
|
18963
|
+
throw error;
|
|
18964
|
+
}
|
|
18566
18965
|
}
|
|
18567
18966
|
return value;
|
|
18568
18967
|
}
|
|
@@ -18615,7 +19014,10 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18615
19014
|
*/
|
|
18616
19015
|
setParamValue(nodeParam, ctx) {
|
|
18617
19016
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
18618
|
-
|
|
19017
|
+
let dstField = dstFieldName;
|
|
19018
|
+
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
19019
|
+
dstField = dstField == null ? void 0 : dstField.toLowerCase();
|
|
19020
|
+
}
|
|
18619
19021
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
18620
19022
|
if (dstField) {
|
|
18621
19023
|
ctx.params[dstDEUILogicParamId][dstField] = srcVal;
|
|
@@ -18712,43 +19114,43 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
18712
19114
|
};
|
|
18713
19115
|
|
|
18714
19116
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
18715
|
-
import { RuntimeError as
|
|
19117
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
18716
19118
|
import { isFunction } from "lodash-es";
|
|
18717
19119
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
18718
19120
|
async exec(ctx) {
|
|
18719
19121
|
ctx.isEndNode = true;
|
|
18720
19122
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
18721
19123
|
if (!invokeCtrlId) {
|
|
18722
|
-
throw new
|
|
19124
|
+
throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
18723
19125
|
}
|
|
18724
19126
|
if (!invokeParamId) {
|
|
18725
|
-
throw new
|
|
19127
|
+
throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
18726
19128
|
}
|
|
18727
19129
|
if (!invokeMethod) {
|
|
18728
|
-
throw new
|
|
19130
|
+
throw new RuntimeModelError32(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
18729
19131
|
}
|
|
18730
19132
|
const invokeParam = ctx.params[invokeParamId];
|
|
18731
19133
|
if (!invokeParam) {
|
|
18732
|
-
throw new
|
|
19134
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
18733
19135
|
}
|
|
18734
19136
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
18735
19137
|
if (!invokeCtrl) {
|
|
18736
|
-
throw new
|
|
19138
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
18737
19139
|
}
|
|
18738
19140
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
18739
|
-
throw new
|
|
19141
|
+
throw new RuntimeError31("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
18740
19142
|
}
|
|
18741
19143
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
18742
19144
|
}
|
|
18743
19145
|
};
|
|
18744
19146
|
|
|
18745
19147
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
18746
|
-
import { RuntimeModelError as
|
|
19148
|
+
import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
18747
19149
|
var BindParamNode2 = class extends UILogicNode {
|
|
18748
19150
|
async exec(ctx) {
|
|
18749
19151
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18750
19152
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18751
|
-
throw new
|
|
19153
|
+
throw new RuntimeModelError33(
|
|
18752
19154
|
this.model,
|
|
18753
19155
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18754
19156
|
);
|
|
@@ -18759,7 +19161,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
18759
19161
|
};
|
|
18760
19162
|
|
|
18761
19163
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
18762
|
-
import { ModelError as ModelError22, RuntimeModelError as
|
|
19164
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
18763
19165
|
var MsgBoxNode = class extends UILogicNode {
|
|
18764
19166
|
constructor() {
|
|
18765
19167
|
super(...arguments);
|
|
@@ -18773,10 +19175,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18773
19175
|
async exec(ctx) {
|
|
18774
19176
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
18775
19177
|
if (!msgBoxType) {
|
|
18776
|
-
throw new
|
|
19178
|
+
throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18777
19179
|
}
|
|
18778
19180
|
if (!buttonsType) {
|
|
18779
|
-
throw new
|
|
19181
|
+
throw new RuntimeModelError34(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18780
19182
|
}
|
|
18781
19183
|
let { title } = this.model;
|
|
18782
19184
|
let { message } = this.model;
|
|
@@ -18826,12 +19228,12 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18826
19228
|
};
|
|
18827
19229
|
|
|
18828
19230
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
18829
|
-
import { RuntimeModelError as
|
|
19231
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
18830
19232
|
var DebugParamNode = class extends UILogicNode {
|
|
18831
19233
|
async exec(ctx) {
|
|
18832
19234
|
const { dstDEUILogicParamId, name } = this.model;
|
|
18833
19235
|
if (!dstDEUILogicParamId) {
|
|
18834
|
-
throw new
|
|
19236
|
+
throw new RuntimeModelError35(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18835
19237
|
}
|
|
18836
19238
|
const param = ctx.params[dstDEUILogicParamId];
|
|
18837
19239
|
console.log("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -18839,25 +19241,25 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
18839
19241
|
};
|
|
18840
19242
|
|
|
18841
19243
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
18842
|
-
import { RuntimeModelError as
|
|
19244
|
+
import { RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
18843
19245
|
var ResetParamNode2 = class extends UILogicNode {
|
|
18844
19246
|
async exec(ctx) {
|
|
18845
19247
|
const { dstDEUILogicParamId } = this.model;
|
|
18846
19248
|
if (!dstDEUILogicParamId) {
|
|
18847
|
-
throw new
|
|
19249
|
+
throw new RuntimeModelError36(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18848
19250
|
}
|
|
18849
19251
|
ctx.resetParam(dstDEUILogicParamId);
|
|
18850
19252
|
}
|
|
18851
19253
|
};
|
|
18852
19254
|
|
|
18853
19255
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
18854
|
-
import { RuntimeModelError as
|
|
19256
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
18855
19257
|
import { clone as clone14 } from "ramda";
|
|
18856
19258
|
var CopyParamNode2 = class extends UILogicNode {
|
|
18857
19259
|
async exec(ctx) {
|
|
18858
19260
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
18859
19261
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18860
|
-
throw new
|
|
19262
|
+
throw new RuntimeModelError37(
|
|
18861
19263
|
this.model,
|
|
18862
19264
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18863
19265
|
);
|
|
@@ -18868,7 +19270,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
18868
19270
|
};
|
|
18869
19271
|
|
|
18870
19272
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
18871
|
-
import { RuntimeModelError as
|
|
19273
|
+
import { RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
18872
19274
|
var AppendParamNode2 = class extends UILogicNode {
|
|
18873
19275
|
async exec(ctx) {
|
|
18874
19276
|
const {
|
|
@@ -18879,7 +19281,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
18879
19281
|
srcSize
|
|
18880
19282
|
} = this.model;
|
|
18881
19283
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
18882
|
-
throw new
|
|
19284
|
+
throw new RuntimeModelError38(
|
|
18883
19285
|
this.model,
|
|
18884
19286
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
18885
19287
|
);
|
|
@@ -18897,12 +19299,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
18897
19299
|
};
|
|
18898
19300
|
|
|
18899
19301
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
18900
|
-
import { RuntimeModelError as
|
|
19302
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
18901
19303
|
var SortParamNode2 = class extends UILogicNode {
|
|
18902
19304
|
async exec(ctx) {
|
|
18903
19305
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
18904
19306
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
18905
|
-
throw new
|
|
19307
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
18906
19308
|
}
|
|
18907
19309
|
const key = dstFieldName;
|
|
18908
19310
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -18913,12 +19315,12 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
18913
19315
|
};
|
|
18914
19316
|
|
|
18915
19317
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
18916
|
-
import { RuntimeModelError as
|
|
19318
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
18917
19319
|
var RenewParamNode2 = class extends UILogicNode {
|
|
18918
19320
|
async exec(ctx) {
|
|
18919
19321
|
const { dstDEUILogicParamId } = this.model;
|
|
18920
19322
|
if (!dstDEUILogicParamId) {
|
|
18921
|
-
throw new
|
|
19323
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18922
19324
|
}
|
|
18923
19325
|
ctx.renewParam(dstDEUILogicParamId);
|
|
18924
19326
|
}
|
|
@@ -18949,43 +19351,43 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
18949
19351
|
};
|
|
18950
19352
|
|
|
18951
19353
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
18952
|
-
import { RuntimeError as
|
|
19354
|
+
import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
18953
19355
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
18954
19356
|
async exec(_ctx) {
|
|
18955
19357
|
const { errorInfo } = this.model;
|
|
18956
|
-
throw new
|
|
19358
|
+
throw new RuntimeError32(errorInfo);
|
|
18957
19359
|
}
|
|
18958
19360
|
};
|
|
18959
19361
|
|
|
18960
19362
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
18961
|
-
import { RuntimeError as
|
|
19363
|
+
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
18962
19364
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
18963
19365
|
async exec(ctx) {
|
|
18964
19366
|
ctx.isEndNode = true;
|
|
18965
19367
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
18966
19368
|
if (!fireCtrlId) {
|
|
18967
|
-
throw new
|
|
19369
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
18968
19370
|
}
|
|
18969
19371
|
if (!eventName) {
|
|
18970
|
-
throw new
|
|
19372
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
18971
19373
|
}
|
|
18972
19374
|
if (!eventParamId) {
|
|
18973
|
-
throw new
|
|
19375
|
+
throw new RuntimeModelError41(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
18974
19376
|
}
|
|
18975
19377
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
18976
19378
|
if (!invokeCtrl) {
|
|
18977
|
-
throw new
|
|
19379
|
+
throw new RuntimeError33("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
18978
19380
|
}
|
|
18979
19381
|
const eventParam = ctx.params[eventParamId];
|
|
18980
19382
|
if (!eventParam) {
|
|
18981
|
-
throw new
|
|
19383
|
+
throw new RuntimeError33("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
18982
19384
|
}
|
|
18983
19385
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
18984
19386
|
}
|
|
18985
19387
|
};
|
|
18986
19388
|
|
|
18987
19389
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
18988
|
-
import { RuntimeError as
|
|
19390
|
+
import { RuntimeError as RuntimeError34, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
18989
19391
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
18990
19392
|
async exec(ctx) {
|
|
18991
19393
|
const {
|
|
@@ -18995,17 +19397,17 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
18995
19397
|
retDEUILogicParamId
|
|
18996
19398
|
} = this.model;
|
|
18997
19399
|
if (!dstAppDataEntityId) {
|
|
18998
|
-
throw new
|
|
19400
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
18999
19401
|
}
|
|
19000
19402
|
if (!dstAppDELogicId) {
|
|
19001
|
-
throw new
|
|
19403
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
19002
19404
|
}
|
|
19003
19405
|
if (!dstDEUILogicParamId) {
|
|
19004
|
-
throw new
|
|
19406
|
+
throw new RuntimeModelError42(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
19005
19407
|
}
|
|
19006
19408
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19007
19409
|
if (!dstParam) {
|
|
19008
|
-
throw new
|
|
19410
|
+
throw new RuntimeError34("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
19009
19411
|
}
|
|
19010
19412
|
const result = await execDELogicById(
|
|
19011
19413
|
dstAppDELogicId,
|
|
@@ -19137,7 +19539,7 @@ var UILogic = class {
|
|
|
19137
19539
|
this.params = /* @__PURE__ */ new Map();
|
|
19138
19540
|
var _a;
|
|
19139
19541
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
19140
|
-
throw new
|
|
19542
|
+
throw new RuntimeModelError43(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
19141
19543
|
}
|
|
19142
19544
|
model.deuilogicNodes.forEach((node) => {
|
|
19143
19545
|
const { logicNodeType } = node;
|
|
@@ -19252,7 +19654,7 @@ var UILogic = class {
|
|
|
19252
19654
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
19253
19655
|
await this.deepExec(start, ctx);
|
|
19254
19656
|
} else {
|
|
19255
|
-
throw new
|
|
19657
|
+
throw new RuntimeModelError43(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
19256
19658
|
}
|
|
19257
19659
|
if (ctx.isEndNode) {
|
|
19258
19660
|
return ctx.result;
|
|
@@ -19298,7 +19700,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19298
19700
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
19299
19701
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
19300
19702
|
if (!deUILogic) {
|
|
19301
|
-
throw new
|
|
19703
|
+
throw new RuntimeError35(
|
|
19302
19704
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
19303
19705
|
);
|
|
19304
19706
|
}
|
|
@@ -19311,7 +19713,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19311
19713
|
}
|
|
19312
19714
|
|
|
19313
19715
|
// src/ui-action/uiaction-util.ts
|
|
19314
|
-
import { RuntimeError as
|
|
19716
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
19315
19717
|
var UIActionUtil = class {
|
|
19316
19718
|
/**
|
|
19317
19719
|
* 执行界面行为
|
|
@@ -19326,7 +19728,7 @@ var UIActionUtil = class {
|
|
|
19326
19728
|
static async exec(actionId, params) {
|
|
19327
19729
|
const action = await getUIActionById(actionId);
|
|
19328
19730
|
if (!action) {
|
|
19329
|
-
throw new
|
|
19731
|
+
throw new RuntimeError36("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
19330
19732
|
}
|
|
19331
19733
|
const provider = await getUIActionProvider(action);
|
|
19332
19734
|
return provider.exec(action, params);
|
|
@@ -19382,12 +19784,12 @@ var UIActionProviderBase = class {
|
|
|
19382
19784
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
19383
19785
|
if (uilogicAttachMode === "REPLACE") {
|
|
19384
19786
|
if (!appDEUILogicId) {
|
|
19385
|
-
throw new
|
|
19787
|
+
throw new RuntimeModelError44(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19386
19788
|
}
|
|
19387
19789
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
19388
19790
|
return result;
|
|
19389
19791
|
}
|
|
19390
|
-
if (!await this.isConfirm(action)) {
|
|
19792
|
+
if (!await this.isConfirm(action, args)) {
|
|
19391
19793
|
return this.returnError(result);
|
|
19392
19794
|
}
|
|
19393
19795
|
const _result = await this.execAction(action, args);
|
|
@@ -19409,7 +19811,7 @@ var UIActionProviderBase = class {
|
|
|
19409
19811
|
}
|
|
19410
19812
|
if (action.uilogicAttachMode === "AFTER") {
|
|
19411
19813
|
if (!appDEUILogicId) {
|
|
19412
|
-
throw new
|
|
19814
|
+
throw new RuntimeModelError44(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
19413
19815
|
}
|
|
19414
19816
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
19415
19817
|
}
|
|
@@ -19438,9 +19840,10 @@ var UIActionProviderBase = class {
|
|
|
19438
19840
|
* @param {IAppDEUIAction} action 界面行为模型
|
|
19439
19841
|
* @returns {*} {Promise<boolean>}
|
|
19440
19842
|
*/
|
|
19441
|
-
async isConfirm(action) {
|
|
19442
|
-
|
|
19443
|
-
|
|
19843
|
+
async isConfirm(action, args) {
|
|
19844
|
+
const confirmMsg = this.calcMessage("confirm", action, args);
|
|
19845
|
+
if (action.enableConfirm && confirmMsg) {
|
|
19846
|
+
return ibiz.modal.confirm({ title: confirmMsg });
|
|
19444
19847
|
}
|
|
19445
19848
|
return true;
|
|
19446
19849
|
}
|
|
@@ -19533,6 +19936,54 @@ var UIActionProviderBase = class {
|
|
|
19533
19936
|
);
|
|
19534
19937
|
return { resultContext, resultData, resultParams };
|
|
19535
19938
|
}
|
|
19939
|
+
/**
|
|
19940
|
+
* 计算消息信息(动态,多语言资源)
|
|
19941
|
+
* @author lxm
|
|
19942
|
+
* @date 2023-09-25 03:03:01
|
|
19943
|
+
* @protected
|
|
19944
|
+
* @param {('confirm' | 'success')} type
|
|
19945
|
+
* @param {IAppDEUIAction} action
|
|
19946
|
+
* @param {IUILogicParams} args
|
|
19947
|
+
* @return {*}
|
|
19948
|
+
*/
|
|
19949
|
+
calcMessage(type, action, args) {
|
|
19950
|
+
let msg;
|
|
19951
|
+
let msgRes;
|
|
19952
|
+
const { confirmMsg, cmlanguageRes, successMsg, smlanguageRes } = action;
|
|
19953
|
+
switch (type) {
|
|
19954
|
+
case "confirm":
|
|
19955
|
+
msg = confirmMsg;
|
|
19956
|
+
msgRes = cmlanguageRes;
|
|
19957
|
+
break;
|
|
19958
|
+
case "success":
|
|
19959
|
+
msg = successMsg;
|
|
19960
|
+
msgRes = smlanguageRes;
|
|
19961
|
+
break;
|
|
19962
|
+
default:
|
|
19963
|
+
}
|
|
19964
|
+
if (msgRes) {
|
|
19965
|
+
const msgResContent = ibiz.i18n.t(
|
|
19966
|
+
msgRes.lanResTag,
|
|
19967
|
+
msgRes.defaultContent || msg
|
|
19968
|
+
);
|
|
19969
|
+
if (msgResContent !== msgRes.lanResTag) {
|
|
19970
|
+
msg = msgResContent;
|
|
19971
|
+
}
|
|
19972
|
+
}
|
|
19973
|
+
if (msg) {
|
|
19974
|
+
const { data } = args;
|
|
19975
|
+
const scriptParams = { ...args };
|
|
19976
|
+
if (data.length === 1) {
|
|
19977
|
+
[scriptParams.data] = data;
|
|
19978
|
+
} else if (data.length === 0) {
|
|
19979
|
+
delete scriptParams.data;
|
|
19980
|
+
}
|
|
19981
|
+
return ScriptFactory.execScriptFn(scriptParams, "`".concat(msg, "`"), {
|
|
19982
|
+
isAsync: false,
|
|
19983
|
+
singleRowReturn: true
|
|
19984
|
+
});
|
|
19985
|
+
}
|
|
19986
|
+
}
|
|
19536
19987
|
};
|
|
19537
19988
|
|
|
19538
19989
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
@@ -19543,7 +19994,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
19543
19994
|
const entityName = action.appDataEntityId;
|
|
19544
19995
|
const methodName = action.appDEMethodId;
|
|
19545
19996
|
if (!entityName || !methodName) {
|
|
19546
|
-
throw new
|
|
19997
|
+
throw new RuntimeModelError45(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
19547
19998
|
}
|
|
19548
19999
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
19549
20000
|
action,
|
|
@@ -19589,8 +20040,11 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
19589
20040
|
isMultiData ? _data : _data[0],
|
|
19590
20041
|
tempParams
|
|
19591
20042
|
);
|
|
19592
|
-
if (res.ok
|
|
19593
|
-
|
|
20043
|
+
if (res.ok) {
|
|
20044
|
+
const successMsg = this.calcMessage("success", action, args);
|
|
20045
|
+
if (successMsg) {
|
|
20046
|
+
ibiz.message.success(successMsg);
|
|
20047
|
+
}
|
|
19594
20048
|
}
|
|
19595
20049
|
Object.assign(actionResult, {
|
|
19596
20050
|
data: isArray4(res.data) ? res.data : [res.data],
|
|
@@ -19655,7 +20109,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
19655
20109
|
};
|
|
19656
20110
|
|
|
19657
20111
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
19658
|
-
import { StringUtil, RuntimeModelError as
|
|
20112
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError46, ModelError as ModelError25 } from "@ibiz-template/core";
|
|
19659
20113
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
19660
20114
|
async execAction(action, args) {
|
|
19661
20115
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -19670,7 +20124,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19670
20124
|
case "WIZARD": {
|
|
19671
20125
|
const frontPSAppView = action.frontAppViewId;
|
|
19672
20126
|
if (!frontPSAppView) {
|
|
19673
|
-
throw new
|
|
20127
|
+
throw new RuntimeModelError46(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
19674
20128
|
}
|
|
19675
20129
|
const { resultContext, resultParams } = await this.handleParams(
|
|
19676
20130
|
action,
|
|
@@ -19726,7 +20180,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
19726
20180
|
);
|
|
19727
20181
|
return result || {};
|
|
19728
20182
|
}
|
|
19729
|
-
throw new
|
|
20183
|
+
throw new RuntimeModelError46(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
19730
20184
|
}
|
|
19731
20185
|
};
|
|
19732
20186
|
|
|
@@ -19793,7 +20247,7 @@ var ToolbarController = class extends ControlController {
|
|
|
19793
20247
|
const actionId = item.uiactionId;
|
|
19794
20248
|
const uiAction = await getUIActionById(actionId);
|
|
19795
20249
|
if (!uiAction) {
|
|
19796
|
-
throw new
|
|
20250
|
+
throw new RuntimeError37("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
19797
20251
|
}
|
|
19798
20252
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
19799
20253
|
if (enableLoading) {
|
|
@@ -20015,6 +20469,89 @@ var DashboardController = class extends ControlController {
|
|
|
20015
20469
|
}
|
|
20016
20470
|
};
|
|
20017
20471
|
|
|
20472
|
+
// src/controller/control/dashboard/custom-dashboard.controller.ts
|
|
20473
|
+
var CustomDashboardController = class {
|
|
20474
|
+
/**
|
|
20475
|
+
* Creates an instance of BaseController.
|
|
20476
|
+
* @author lxm
|
|
20477
|
+
* @date 2023-04-26 06:46:21
|
|
20478
|
+
* @param {CTX} ctx 跨组件上下文环境,内部机制不暴露
|
|
20479
|
+
*/
|
|
20480
|
+
constructor(model) {
|
|
20481
|
+
/**
|
|
20482
|
+
* 自定义布局模型数据
|
|
20483
|
+
*
|
|
20484
|
+
* @author: zhujiamin
|
|
20485
|
+
* @Date: 2023-09-20 16:42:36
|
|
20486
|
+
*/
|
|
20487
|
+
this.customModelData = [];
|
|
20488
|
+
/**
|
|
20489
|
+
* 动态设计水平列数
|
|
20490
|
+
*
|
|
20491
|
+
* @author: zhujiamin
|
|
20492
|
+
* @Date: 2023-09-20 16:43:39
|
|
20493
|
+
*/
|
|
20494
|
+
this.layoutColNum = 12;
|
|
20495
|
+
/**
|
|
20496
|
+
* 动态设计单元格高度,80px
|
|
20497
|
+
*
|
|
20498
|
+
* @author: zhujiamin
|
|
20499
|
+
* @Date: 2023-09-20 16:43:39
|
|
20500
|
+
*/
|
|
20501
|
+
this.layoutRowH = 80;
|
|
20502
|
+
/**
|
|
20503
|
+
* 看板模型
|
|
20504
|
+
*
|
|
20505
|
+
* @author: zhujiamin
|
|
20506
|
+
* @Date: 2023-09-20 16:43:39
|
|
20507
|
+
*/
|
|
20508
|
+
this.model = null;
|
|
20509
|
+
var _a, _b;
|
|
20510
|
+
this.model = model;
|
|
20511
|
+
this.config = new ConfigService(
|
|
20512
|
+
model.appId,
|
|
20513
|
+
"dynadashboard",
|
|
20514
|
+
"dashboard_".concat(((_a = this.model.appDataEntityId) == null ? void 0 : _a.toLowerCase()) || "app", "_").concat((_b = this.model.codeName) == null ? void 0 : _b.toLowerCase())
|
|
20515
|
+
);
|
|
20516
|
+
}
|
|
20517
|
+
/**
|
|
20518
|
+
* 加载自定义布局模型数据
|
|
20519
|
+
*
|
|
20520
|
+
* @author: zhujiamin
|
|
20521
|
+
* @Date: 2023-09-20 16:22:49
|
|
20522
|
+
*/
|
|
20523
|
+
async loadCustomModelData() {
|
|
20524
|
+
const res = await this.config.load();
|
|
20525
|
+
if (res.model) {
|
|
20526
|
+
this.customModelData = res.model;
|
|
20527
|
+
}
|
|
20528
|
+
if (res.colNum) {
|
|
20529
|
+
this.layoutColNum = res.colNum;
|
|
20530
|
+
}
|
|
20531
|
+
if (res.rowH) {
|
|
20532
|
+
this.layoutRowH = res.rowH;
|
|
20533
|
+
}
|
|
20534
|
+
return this.customModelData;
|
|
20535
|
+
}
|
|
20536
|
+
/**
|
|
20537
|
+
* 保存自定义布局模型数据
|
|
20538
|
+
*
|
|
20539
|
+
* @author: zhujiamin
|
|
20540
|
+
* @Date: 2023-09-20 16:22:49
|
|
20541
|
+
*/
|
|
20542
|
+
async saveCustomModelData(model) {
|
|
20543
|
+
const res = await this.config.save({
|
|
20544
|
+
model,
|
|
20545
|
+
colNum: this.layoutColNum,
|
|
20546
|
+
rowH: this.layoutRowH
|
|
20547
|
+
});
|
|
20548
|
+
if (res) {
|
|
20549
|
+
this.customModelData = model;
|
|
20550
|
+
}
|
|
20551
|
+
return model;
|
|
20552
|
+
}
|
|
20553
|
+
};
|
|
20554
|
+
|
|
20018
20555
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
|
|
20019
20556
|
var PortletPartState = class {
|
|
20020
20557
|
constructor() {
|
|
@@ -20121,6 +20658,25 @@ var PortletPartController = class {
|
|
|
20121
20658
|
createState() {
|
|
20122
20659
|
return new PortletPartState();
|
|
20123
20660
|
}
|
|
20661
|
+
/**
|
|
20662
|
+
* 数据改变方法
|
|
20663
|
+
* @param {DataChangeEvent} event
|
|
20664
|
+
* @return {*}
|
|
20665
|
+
* @author: zhujiamin
|
|
20666
|
+
* @Date: 2023-09-22 17:39:44
|
|
20667
|
+
*/
|
|
20668
|
+
onDataChange(event) {
|
|
20669
|
+
let data = event.data[0];
|
|
20670
|
+
if (data && data instanceof ControlVO) {
|
|
20671
|
+
data = data.getOrigin();
|
|
20672
|
+
}
|
|
20673
|
+
if (data) {
|
|
20674
|
+
this.state.actionGroupState.update(
|
|
20675
|
+
data,
|
|
20676
|
+
this.dashboard.view.model.appDataEntityId
|
|
20677
|
+
);
|
|
20678
|
+
}
|
|
20679
|
+
}
|
|
20124
20680
|
/**
|
|
20125
20681
|
* 初始化标题右侧界面行为按钮的状态
|
|
20126
20682
|
*
|
|
@@ -20150,15 +20706,7 @@ var PortletPartController = class {
|
|
|
20150
20706
|
this.state.actionGroupState = containerState;
|
|
20151
20707
|
const { appDataEntityId } = this.dashboard.view.model;
|
|
20152
20708
|
if (appDataEntityId) {
|
|
20153
|
-
this.dashboard.view.evt.on("onDataChange",
|
|
20154
|
-
let data = event.data[0];
|
|
20155
|
-
if (data && data instanceof ControlVO) {
|
|
20156
|
-
data = data.getOrigin();
|
|
20157
|
-
}
|
|
20158
|
-
if (data) {
|
|
20159
|
-
this.state.actionGroupState.update(data, appDataEntityId);
|
|
20160
|
-
}
|
|
20161
|
-
});
|
|
20709
|
+
this.dashboard.view.evt.on("onDataChange", this.onDataChange);
|
|
20162
20710
|
}
|
|
20163
20711
|
}
|
|
20164
20712
|
/**
|
|
@@ -20207,6 +20755,15 @@ var PortletPartController = class {
|
|
|
20207
20755
|
}
|
|
20208
20756
|
}
|
|
20209
20757
|
}
|
|
20758
|
+
/**
|
|
20759
|
+
* 销毁
|
|
20760
|
+
* @author lxm
|
|
20761
|
+
* @date 2023-04-25 11:08:54
|
|
20762
|
+
*/
|
|
20763
|
+
async destroyed() {
|
|
20764
|
+
ibiz.log.debug("".concat(this.model.codeName, " onDestroyed"));
|
|
20765
|
+
this.dashboard.view.evt.off("onDataChange", this.onDataChange);
|
|
20766
|
+
}
|
|
20210
20767
|
};
|
|
20211
20768
|
|
|
20212
20769
|
// src/controller/control/dashboard/portlet/container-portlet/container-portlet.controller.ts
|
|
@@ -20218,8 +20775,8 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
20218
20775
|
};
|
|
20219
20776
|
|
|
20220
20777
|
// src/controller/control/data-view/data-view.controller.ts
|
|
20221
|
-
import { RuntimeModelError as
|
|
20222
|
-
import { isNil as
|
|
20778
|
+
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
20779
|
+
import { isNil as isNil18 } from "ramda";
|
|
20223
20780
|
|
|
20224
20781
|
// src/controller/control/data-view/data-view.service.ts
|
|
20225
20782
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -20429,7 +20986,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20429
20986
|
const optItemModel = this.getOptItemModel();
|
|
20430
20987
|
if (optItemModel) {
|
|
20431
20988
|
if (!optItemModel.deuiactionGroup) {
|
|
20432
|
-
throw new
|
|
20989
|
+
throw new RuntimeModelError47(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
20433
20990
|
}
|
|
20434
20991
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
20435
20992
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -20478,7 +21035,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20478
21035
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
20479
21036
|
if (enableGroup && groupMode) {
|
|
20480
21037
|
if (!groupAppDEFieldId) {
|
|
20481
|
-
throw new
|
|
21038
|
+
throw new RuntimeModelError47(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
20482
21039
|
}
|
|
20483
21040
|
if (groupMode === "AUTO") {
|
|
20484
21041
|
this.handleAutoGroup();
|
|
@@ -20499,7 +21056,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20499
21056
|
const groupMap = /* @__PURE__ */ new Map();
|
|
20500
21057
|
items.forEach((item) => {
|
|
20501
21058
|
const groupVal = item[groupAppDEFieldId];
|
|
20502
|
-
if (
|
|
21059
|
+
if (isNil18(groupVal)) {
|
|
20503
21060
|
return;
|
|
20504
21061
|
}
|
|
20505
21062
|
if (!groupMap.has(groupVal)) {
|
|
@@ -20545,7 +21102,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20545
21102
|
async handleCodeListGroup() {
|
|
20546
21103
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
20547
21104
|
if (!groupCodeListId) {
|
|
20548
|
-
throw new
|
|
21105
|
+
throw new RuntimeModelError47(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
20549
21106
|
}
|
|
20550
21107
|
const { items } = this.state;
|
|
20551
21108
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -20632,10 +21189,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
20632
21189
|
};
|
|
20633
21190
|
|
|
20634
21191
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
20635
|
-
import { RuntimeModelError as
|
|
21192
|
+
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
20636
21193
|
|
|
20637
21194
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
20638
|
-
import { RuntimeError as
|
|
21195
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
20639
21196
|
var ExpBarControlController = class extends ControlController {
|
|
20640
21197
|
constructor() {
|
|
20641
21198
|
super(...arguments);
|
|
@@ -20690,7 +21247,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20690
21247
|
get xDataController() {
|
|
20691
21248
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
20692
21249
|
if (!controller) {
|
|
20693
|
-
throw new
|
|
21250
|
+
throw new RuntimeModelError48(
|
|
20694
21251
|
this.model,
|
|
20695
21252
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
20696
21253
|
);
|
|
@@ -20923,7 +21480,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
20923
21480
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
20924
21481
|
return this.XDataModel.navAppViewId;
|
|
20925
21482
|
}
|
|
20926
|
-
throw new
|
|
21483
|
+
throw new RuntimeError38("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
20927
21484
|
}
|
|
20928
21485
|
/**
|
|
20929
21486
|
* 获取导航视图
|
|
@@ -21010,7 +21567,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21010
21567
|
get xDataController() {
|
|
21011
21568
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21012
21569
|
if (!controller) {
|
|
21013
|
-
throw new
|
|
21570
|
+
throw new RuntimeModelError49(
|
|
21014
21571
|
this.model,
|
|
21015
21572
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21016
21573
|
);
|
|
@@ -21065,7 +21622,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
21065
21622
|
};
|
|
21066
21623
|
|
|
21067
21624
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
21068
|
-
import { RuntimeError as
|
|
21625
|
+
import { RuntimeError as RuntimeError39, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
21069
21626
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
21070
21627
|
constructor() {
|
|
21071
21628
|
super(...arguments);
|
|
@@ -21088,7 +21645,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21088
21645
|
get xDataController() {
|
|
21089
21646
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
21090
21647
|
if (!controller) {
|
|
21091
|
-
throw new
|
|
21648
|
+
throw new RuntimeModelError50(
|
|
21092
21649
|
this.model,
|
|
21093
21650
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
21094
21651
|
);
|
|
@@ -21140,7 +21697,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
21140
21697
|
const deData = node.deData || node;
|
|
21141
21698
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
21142
21699
|
if (!nodeModel) {
|
|
21143
|
-
throw new
|
|
21700
|
+
throw new RuntimeError39("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
21144
21701
|
}
|
|
21145
21702
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
21146
21703
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22549,7 +23106,7 @@ var FormMDCtrlContentTypeController = class {
|
|
|
22549
23106
|
};
|
|
22550
23107
|
|
|
22551
23108
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
22552
|
-
import { RuntimeError as
|
|
23109
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
22553
23110
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
22554
23111
|
/**
|
|
22555
23112
|
* 初始化
|
|
@@ -22564,7 +23121,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
22564
23121
|
const { model } = this.parent;
|
|
22565
23122
|
const { contentControl } = model;
|
|
22566
23123
|
if (!contentControl) {
|
|
22567
|
-
throw new
|
|
23124
|
+
throw new RuntimeError40("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
22568
23125
|
}
|
|
22569
23126
|
this.controlModel = contentControl;
|
|
22570
23127
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -22674,7 +23231,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
22674
23231
|
import {
|
|
22675
23232
|
awaitTimeout,
|
|
22676
23233
|
mergeInLeft,
|
|
22677
|
-
RuntimeError as
|
|
23234
|
+
RuntimeError as RuntimeError41,
|
|
22678
23235
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
22679
23236
|
} from "@ibiz-template/core";
|
|
22680
23237
|
import { debounce } from "lodash-es";
|
|
@@ -22682,7 +23239,7 @@ import { debounce } from "lodash-es";
|
|
|
22682
23239
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
22683
23240
|
import {
|
|
22684
23241
|
recursiveIterate as recursiveIterate3,
|
|
22685
|
-
RuntimeModelError as
|
|
23242
|
+
RuntimeModelError as RuntimeModelError51
|
|
22686
23243
|
} from "@ibiz-template/core";
|
|
22687
23244
|
var EditFormService = class extends ControlService {
|
|
22688
23245
|
/**
|
|
@@ -22800,7 +23357,7 @@ var EditFormService = class extends ControlService {
|
|
|
22800
23357
|
const wizardForm = this.model;
|
|
22801
23358
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
22802
23359
|
if (!methodName) {
|
|
22803
|
-
throw new
|
|
23360
|
+
throw new RuntimeModelError51(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
22804
23361
|
}
|
|
22805
23362
|
let res = await this.exec(
|
|
22806
23363
|
methodName,
|
|
@@ -23063,7 +23620,7 @@ var EditFormController = class extends FormController {
|
|
|
23063
23620
|
}
|
|
23064
23621
|
const isValid = await this.validate();
|
|
23065
23622
|
if (!isValid) {
|
|
23066
|
-
throw new
|
|
23623
|
+
throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23067
23624
|
}
|
|
23068
23625
|
await this.startLoading();
|
|
23069
23626
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -23172,7 +23729,7 @@ var EditFormController = class extends FormController {
|
|
|
23172
23729
|
(item) => item.id === formItemUpdateId
|
|
23173
23730
|
);
|
|
23174
23731
|
if (!formItemUpdate) {
|
|
23175
|
-
throw new
|
|
23732
|
+
throw new RuntimeError41("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
23176
23733
|
}
|
|
23177
23734
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
23178
23735
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -23216,7 +23773,7 @@ var EditFormController = class extends FormController {
|
|
|
23216
23773
|
async wfStart(extraParams = {}) {
|
|
23217
23774
|
const isValid = await this.validate();
|
|
23218
23775
|
if (!isValid) {
|
|
23219
|
-
throw new
|
|
23776
|
+
throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23220
23777
|
}
|
|
23221
23778
|
await this.startLoading();
|
|
23222
23779
|
try {
|
|
@@ -23249,7 +23806,7 @@ var EditFormController = class extends FormController {
|
|
|
23249
23806
|
async wfSubmit(extraParams = {}) {
|
|
23250
23807
|
const isValid = await this.validate();
|
|
23251
23808
|
if (!isValid) {
|
|
23252
|
-
throw new
|
|
23809
|
+
throw new RuntimeError41("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
23253
23810
|
}
|
|
23254
23811
|
await this.startLoading();
|
|
23255
23812
|
try {
|
|
@@ -23480,7 +24037,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
23480
24037
|
};
|
|
23481
24038
|
|
|
23482
24039
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
23483
|
-
import { RuntimeError as
|
|
24040
|
+
import { RuntimeError as RuntimeError42, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
23484
24041
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
23485
24042
|
constructor() {
|
|
23486
24043
|
super(...arguments);
|
|
@@ -23585,7 +24142,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
23585
24142
|
const { model } = this.parent;
|
|
23586
24143
|
const { contentControl } = model;
|
|
23587
24144
|
if (!contentControl) {
|
|
23588
|
-
throw new
|
|
24145
|
+
throw new RuntimeError42("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
23589
24146
|
}
|
|
23590
24147
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
23591
24148
|
this.controlModel = contentControl;
|
|
@@ -24297,8 +24854,8 @@ import {
|
|
|
24297
24854
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
24298
24855
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
24299
24856
|
recursiveIterate as recursiveIterate4,
|
|
24300
|
-
RuntimeError as
|
|
24301
|
-
RuntimeModelError as
|
|
24857
|
+
RuntimeError as RuntimeError43,
|
|
24858
|
+
RuntimeModelError as RuntimeModelError52
|
|
24302
24859
|
} from "@ibiz-template/core";
|
|
24303
24860
|
import { clone as clone15 } from "ramda";
|
|
24304
24861
|
|
|
@@ -24494,11 +25051,11 @@ var GridController = class extends MDControlController {
|
|
|
24494
25051
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
24495
25052
|
);
|
|
24496
25053
|
if (!this.groupFieldColumn) {
|
|
24497
|
-
throw new
|
|
25054
|
+
throw new RuntimeModelError52(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
24498
25055
|
}
|
|
24499
25056
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
24500
25057
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
24501
|
-
throw new
|
|
25058
|
+
throw new RuntimeModelError52(
|
|
24502
25059
|
this.groupFieldColumn.model,
|
|
24503
25060
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
24504
25061
|
);
|
|
@@ -24508,7 +25065,7 @@ var GridController = class extends MDControlController {
|
|
|
24508
25065
|
);
|
|
24509
25066
|
if (index !== -1 && index !== 0) {
|
|
24510
25067
|
if (this.isMultistageHeader) {
|
|
24511
|
-
throw new
|
|
25068
|
+
throw new RuntimeModelError52(
|
|
24512
25069
|
this.model,
|
|
24513
25070
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
24514
25071
|
);
|
|
@@ -24518,10 +25075,10 @@ var GridController = class extends MDControlController {
|
|
|
24518
25075
|
}
|
|
24519
25076
|
if (groupMode === "CODELIST") {
|
|
24520
25077
|
if (!groupCodeListId) {
|
|
24521
|
-
throw new
|
|
25078
|
+
throw new RuntimeModelError52(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
24522
25079
|
}
|
|
24523
25080
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
24524
|
-
throw new
|
|
25081
|
+
throw new RuntimeModelError52(
|
|
24525
25082
|
this.model,
|
|
24526
25083
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
24527
25084
|
);
|
|
@@ -24602,7 +25159,7 @@ var GridController = class extends MDControlController {
|
|
|
24602
25159
|
return;
|
|
24603
25160
|
}
|
|
24604
25161
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
24605
|
-
throw new
|
|
25162
|
+
throw new RuntimeModelError52(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
24606
25163
|
}
|
|
24607
25164
|
const params = await this.getFetchParams();
|
|
24608
25165
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -24670,7 +25227,7 @@ var GridController = class extends MDControlController {
|
|
|
24670
25227
|
}
|
|
24671
25228
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24672
25229
|
if (editingRow) {
|
|
24673
|
-
throw new
|
|
25230
|
+
throw new RuntimeError43("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
24674
25231
|
}
|
|
24675
25232
|
const queryParams = { ...this.params };
|
|
24676
25233
|
const defaultData = this.calcDefaultValue({}, true);
|
|
@@ -24709,7 +25266,7 @@ var GridController = class extends MDControlController {
|
|
|
24709
25266
|
(item) => item.data.srfkey === data.srfkey
|
|
24710
25267
|
);
|
|
24711
25268
|
if (!rowState) {
|
|
24712
|
-
throw new
|
|
25269
|
+
throw new RuntimeError43("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
24713
25270
|
}
|
|
24714
25271
|
if (!rowState.modified) {
|
|
24715
25272
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -24721,7 +25278,7 @@ var GridController = class extends MDControlController {
|
|
|
24721
25278
|
}
|
|
24722
25279
|
const isValid = await this.validate(rowState);
|
|
24723
25280
|
if (!isValid) {
|
|
24724
|
-
throw new
|
|
25281
|
+
throw new RuntimeError43("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
24725
25282
|
}
|
|
24726
25283
|
await this.startLoading();
|
|
24727
25284
|
let res;
|
|
@@ -24933,7 +25490,7 @@ var GridController = class extends MDControlController {
|
|
|
24933
25490
|
}
|
|
24934
25491
|
async toggleRowEdit() {
|
|
24935
25492
|
if (!this.model.enableRowNew) {
|
|
24936
|
-
throw new
|
|
25493
|
+
throw new RuntimeError43("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24937
25494
|
}
|
|
24938
25495
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
24939
25496
|
}
|
|
@@ -24966,7 +25523,7 @@ var GridController = class extends MDControlController {
|
|
|
24966
25523
|
} else {
|
|
24967
25524
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
24968
25525
|
if (editingRow) {
|
|
24969
|
-
throw new
|
|
25526
|
+
throw new RuntimeError43("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
24970
25527
|
}
|
|
24971
25528
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
24972
25529
|
row.cacheData = clone15(row.data);
|
|
@@ -25016,7 +25573,7 @@ var GridController = class extends MDControlController {
|
|
|
25016
25573
|
(item) => item.id === updateId
|
|
25017
25574
|
);
|
|
25018
25575
|
if (!findUpdate) {
|
|
25019
|
-
throw new
|
|
25576
|
+
throw new RuntimeError43("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
25020
25577
|
}
|
|
25021
25578
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
25022
25579
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -25125,7 +25682,7 @@ var GridController = class extends MDControlController {
|
|
|
25125
25682
|
data2 = this.getData();
|
|
25126
25683
|
}
|
|
25127
25684
|
if (data2.length === 0) {
|
|
25128
|
-
throw new
|
|
25685
|
+
throw new RuntimeError43("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
25129
25686
|
}
|
|
25130
25687
|
return formatExcelData(data2);
|
|
25131
25688
|
};
|
|
@@ -25144,11 +25701,11 @@ var GridController = class extends MDControlController {
|
|
|
25144
25701
|
);
|
|
25145
25702
|
const data = formatArrayData(filterVal, await getExportData());
|
|
25146
25703
|
if (!ibiz.util.getExportExcel) {
|
|
25147
|
-
throw new
|
|
25704
|
+
throw new RuntimeError43("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
25148
25705
|
}
|
|
25149
25706
|
const exportExcel = await ibiz.util.getExportExcel();
|
|
25150
25707
|
if (!exportExcel) {
|
|
25151
|
-
throw new
|
|
25708
|
+
throw new RuntimeError43("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
25152
25709
|
}
|
|
25153
25710
|
exportExcel.exportJsonToExcel({
|
|
25154
25711
|
header,
|
|
@@ -25194,7 +25751,7 @@ var GridController = class extends MDControlController {
|
|
|
25194
25751
|
};
|
|
25195
25752
|
|
|
25196
25753
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
25197
|
-
import { DataTypes as
|
|
25754
|
+
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
25198
25755
|
import dayjs4 from "dayjs";
|
|
25199
25756
|
import { clone as clone16 } from "ramda";
|
|
25200
25757
|
var GridFieldColumnController = class extends GridColumnController {
|
|
@@ -25420,7 +25977,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
25420
25977
|
if (!this.valueFormat) {
|
|
25421
25978
|
return strVal;
|
|
25422
25979
|
}
|
|
25423
|
-
const isDate =
|
|
25980
|
+
const isDate = DataTypes3.isDate(this.dataType);
|
|
25424
25981
|
if (isDate) {
|
|
25425
25982
|
return dayjs4(strVal).format(this.valueFormat);
|
|
25426
25983
|
}
|
|
@@ -25429,7 +25986,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
25429
25986
|
};
|
|
25430
25987
|
|
|
25431
25988
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
25432
|
-
import { RuntimeModelError as
|
|
25989
|
+
import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
25433
25990
|
var GridUAColumnController = class extends GridColumnController {
|
|
25434
25991
|
/**
|
|
25435
25992
|
* 给rowController初始化操作列的状态
|
|
@@ -25442,7 +25999,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
25442
25999
|
var _a;
|
|
25443
26000
|
const { deuiactionGroup } = this.model;
|
|
25444
26001
|
if (!deuiactionGroup) {
|
|
25445
|
-
throw new
|
|
26002
|
+
throw new RuntimeModelError53(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
25446
26003
|
}
|
|
25447
26004
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
25448
26005
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -25483,7 +26040,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
25483
26040
|
};
|
|
25484
26041
|
|
|
25485
26042
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
25486
|
-
import { RuntimeError as
|
|
26043
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
25487
26044
|
import Schema2 from "async-validator";
|
|
25488
26045
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
25489
26046
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -25617,7 +26174,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
25617
26174
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
25618
26175
|
const result = await this.validate(row);
|
|
25619
26176
|
if (!result) {
|
|
25620
|
-
throw new
|
|
26177
|
+
throw new RuntimeError44(
|
|
25621
26178
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
25622
26179
|
);
|
|
25623
26180
|
}
|
|
@@ -25975,7 +26532,7 @@ var ListController = class extends MDControlController {
|
|
|
25975
26532
|
};
|
|
25976
26533
|
|
|
25977
26534
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
25978
|
-
import { recursiveIterate as recursiveIterate5, RuntimeError as
|
|
26535
|
+
import { recursiveIterate as recursiveIterate5, RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
25979
26536
|
var PanelController = class extends ControlController {
|
|
25980
26537
|
constructor() {
|
|
25981
26538
|
super(...arguments);
|
|
@@ -26073,7 +26630,7 @@ var PanelController = class extends ControlController {
|
|
|
26073
26630
|
async load() {
|
|
26074
26631
|
const data = await this.prepareData();
|
|
26075
26632
|
if (!data) {
|
|
26076
|
-
throw new
|
|
26633
|
+
throw new RuntimeError45("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
26077
26634
|
}
|
|
26078
26635
|
const panelData = this.convertData(data);
|
|
26079
26636
|
this.state.data = panelData;
|
|
@@ -27431,7 +27988,7 @@ var TreeController = class extends MDControlController {
|
|
|
27431
27988
|
};
|
|
27432
27989
|
|
|
27433
27990
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
27434
|
-
import { RuntimeError as
|
|
27991
|
+
import { RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
27435
27992
|
|
|
27436
27993
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
27437
27994
|
var WizardPanelService = class extends ControlService {
|
|
@@ -27590,7 +28147,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27590
28147
|
const { activeFormTag } = this.state;
|
|
27591
28148
|
const controller = this.formControllers.get(activeFormTag);
|
|
27592
28149
|
if (!controller) {
|
|
27593
|
-
throw new
|
|
28150
|
+
throw new RuntimeError46("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
27594
28151
|
}
|
|
27595
28152
|
return controller;
|
|
27596
28153
|
}
|
|
@@ -27665,7 +28222,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27665
28222
|
this.tagHistory.pop();
|
|
27666
28223
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
27667
28224
|
if (!prevTag) {
|
|
27668
|
-
throw new
|
|
28225
|
+
throw new RuntimeError46("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
27669
28226
|
}
|
|
27670
28227
|
this.state.activeFormTag = prevTag;
|
|
27671
28228
|
}
|
|
@@ -27686,7 +28243,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27686
28243
|
}
|
|
27687
28244
|
);
|
|
27688
28245
|
if (!wizardForm) {
|
|
27689
|
-
throw new
|
|
28246
|
+
throw new RuntimeError46("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
27690
28247
|
}
|
|
27691
28248
|
nextTag = data.srfnextform;
|
|
27692
28249
|
} else {
|
|
@@ -27698,7 +28255,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27698
28255
|
});
|
|
27699
28256
|
const nextWizardStep = wizardSteps[index + 1];
|
|
27700
28257
|
if (!nextWizardStep) {
|
|
27701
|
-
throw new
|
|
28258
|
+
throw new RuntimeError46("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
27702
28259
|
}
|
|
27703
28260
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
27704
28261
|
(wizardForm) => {
|
|
@@ -27711,7 +28268,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27711
28268
|
}
|
|
27712
28269
|
}
|
|
27713
28270
|
if (!nextTag) {
|
|
27714
|
-
throw new
|
|
28271
|
+
throw new RuntimeError46("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
27715
28272
|
}
|
|
27716
28273
|
this.state.activeFormTag = nextTag;
|
|
27717
28274
|
this.tagHistory.push(nextTag);
|
|
@@ -27941,8 +28498,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27941
28498
|
};
|
|
27942
28499
|
|
|
27943
28500
|
// src/controller/control/kanban/kanban.controller.ts
|
|
27944
|
-
import { RuntimeError as
|
|
27945
|
-
import { isNil as
|
|
28501
|
+
import { RuntimeError as RuntimeError47, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
28502
|
+
import { isNil as isNil19 } from "ramda";
|
|
27946
28503
|
|
|
27947
28504
|
// src/controller/control/kanban/kanban.service.ts
|
|
27948
28505
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -28016,20 +28573,20 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28016
28573
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
28017
28574
|
const { minorSortDir } = this.model;
|
|
28018
28575
|
if (!sortField) {
|
|
28019
|
-
throw new
|
|
28576
|
+
throw new RuntimeModelError54(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
28020
28577
|
}
|
|
28021
28578
|
if (!minorSortDir) {
|
|
28022
|
-
throw new
|
|
28579
|
+
throw new RuntimeModelError54(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
28023
28580
|
}
|
|
28024
28581
|
const isAsc = minorSortDir === "ASC";
|
|
28025
28582
|
items.forEach((item) => {
|
|
28026
28583
|
const sortValue = item[sortField];
|
|
28027
|
-
if (
|
|
28584
|
+
if (isNil19(sortValue)) {
|
|
28028
28585
|
item[sortField] = 0;
|
|
28029
28586
|
} else {
|
|
28030
28587
|
const toNum = Number(sortValue);
|
|
28031
28588
|
if (Number.isNaN(toNum)) {
|
|
28032
|
-
throw new
|
|
28589
|
+
throw new RuntimeError47(
|
|
28033
28590
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
28034
28591
|
);
|
|
28035
28592
|
}
|
|
@@ -28045,7 +28602,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28045
28602
|
}
|
|
28046
28603
|
handleDataGroup() {
|
|
28047
28604
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
28048
|
-
throw new
|
|
28605
|
+
throw new RuntimeError47("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
28049
28606
|
}
|
|
28050
28607
|
return super.handleDataGroup();
|
|
28051
28608
|
}
|
|
@@ -28168,6 +28725,376 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28168
28725
|
}
|
|
28169
28726
|
};
|
|
28170
28727
|
|
|
28728
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
28729
|
+
import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
28730
|
+
|
|
28731
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
28732
|
+
import { isArray as isArray6 } from "qx-util";
|
|
28733
|
+
var TreeGridExService = class extends TreeService {
|
|
28734
|
+
constructor() {
|
|
28735
|
+
super(...arguments);
|
|
28736
|
+
/**
|
|
28737
|
+
* 表格列映射关系
|
|
28738
|
+
*
|
|
28739
|
+
* @author zk
|
|
28740
|
+
* @date 2023-09-25 05:09:11
|
|
28741
|
+
* @type {Map<string, Map<string, UIMapField>>}
|
|
28742
|
+
* @memberof TreeGridService
|
|
28743
|
+
*/
|
|
28744
|
+
this.multipleUiMap = /* @__PURE__ */ new Map();
|
|
28745
|
+
}
|
|
28746
|
+
/**
|
|
28747
|
+
* 初始化节点属性映射
|
|
28748
|
+
*
|
|
28749
|
+
* @author lxm
|
|
28750
|
+
* @date 2022-08-31 18:08:37
|
|
28751
|
+
*/
|
|
28752
|
+
initUIDataMap() {
|
|
28753
|
+
var _a;
|
|
28754
|
+
super.initUIDataMap();
|
|
28755
|
+
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
|
|
28756
|
+
var _a2;
|
|
28757
|
+
const dataMap = /* @__PURE__ */ new Map();
|
|
28758
|
+
(_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
|
|
28759
|
+
const uiKey = dataItem.id.toLowerCase();
|
|
28760
|
+
const deField = dataItem.appDEFieldId;
|
|
28761
|
+
const deFieldKey = deField.toLowerCase();
|
|
28762
|
+
const mapField = new UIMapField(uiKey, deFieldKey, {
|
|
28763
|
+
isOriginField: true,
|
|
28764
|
+
dataType: dataItem.dataType
|
|
28765
|
+
});
|
|
28766
|
+
dataMap.set(uiKey, mapField);
|
|
28767
|
+
});
|
|
28768
|
+
this.multipleUiMap.set(item.id, dataMap);
|
|
28769
|
+
});
|
|
28770
|
+
}
|
|
28771
|
+
/**
|
|
28772
|
+
* 获取实体数据集数据
|
|
28773
|
+
*
|
|
28774
|
+
* @protected
|
|
28775
|
+
* @param {TreeNodeRSModel} nodeRS
|
|
28776
|
+
* @param {TreeFetchOpts} opts
|
|
28777
|
+
* @returns {*}
|
|
28778
|
+
* @memberof TreeService
|
|
28779
|
+
*/
|
|
28780
|
+
async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
28781
|
+
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
28782
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
28783
|
+
context: opts.context,
|
|
28784
|
+
params: opts.params,
|
|
28785
|
+
navContext: {},
|
|
28786
|
+
navParams: {}
|
|
28787
|
+
};
|
|
28788
|
+
params.size = nodeModel.maxSize || 1e3;
|
|
28789
|
+
if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
|
|
28790
|
+
Object.assign(params, {
|
|
28791
|
+
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
|
|
28792
|
+
});
|
|
28793
|
+
}
|
|
28794
|
+
const response = await this.app.deService.exec(
|
|
28795
|
+
appDataEntityId,
|
|
28796
|
+
appDEDataSetId,
|
|
28797
|
+
context,
|
|
28798
|
+
params
|
|
28799
|
+
);
|
|
28800
|
+
if (response.data.length) {
|
|
28801
|
+
const { data } = this.handleResponseForMultiple(response, nodeModel.id);
|
|
28802
|
+
const nodeDatas = data.map((item) => {
|
|
28803
|
+
return new TreeDataSetNodeData(nodeModel, parentNodeData, {
|
|
28804
|
+
data: item,
|
|
28805
|
+
leaf: !!opts.leaf,
|
|
28806
|
+
navContext,
|
|
28807
|
+
navParams
|
|
28808
|
+
});
|
|
28809
|
+
});
|
|
28810
|
+
return nodeDatas;
|
|
28811
|
+
}
|
|
28812
|
+
return [];
|
|
28813
|
+
}
|
|
28814
|
+
/**
|
|
28815
|
+
* 处理多数据源响应
|
|
28816
|
+
*
|
|
28817
|
+
* @author zk
|
|
28818
|
+
* @date 2023-09-21 04:09:06
|
|
28819
|
+
* @param {IHttpResponse} response
|
|
28820
|
+
* @param {string} tag 多数据源dataUIMap标识
|
|
28821
|
+
* @return {*} {IHttpResponse}
|
|
28822
|
+
* @memberof TreeGridService
|
|
28823
|
+
*/
|
|
28824
|
+
handleResponseForMultiple(response, tag) {
|
|
28825
|
+
const res = super.handleResponse(response);
|
|
28826
|
+
if (res.headers) {
|
|
28827
|
+
if (res.headers["x-page"]) {
|
|
28828
|
+
res.page = Number(res.headers["x-page"]);
|
|
28829
|
+
}
|
|
28830
|
+
if (res.headers["x-per-page"]) {
|
|
28831
|
+
res.size = Number(res.headers["x-per-page"]);
|
|
28832
|
+
}
|
|
28833
|
+
if (res.headers["x-total"]) {
|
|
28834
|
+
res.total = Number(res.headers["x-total"]);
|
|
28835
|
+
}
|
|
28836
|
+
}
|
|
28837
|
+
if (res.ok) {
|
|
28838
|
+
if (isArray6(res.data)) {
|
|
28839
|
+
res.data = res.data.map(
|
|
28840
|
+
(item) => this.toUIDataForMultiple(item, tag)
|
|
28841
|
+
);
|
|
28842
|
+
} else {
|
|
28843
|
+
res.data = this.toUIDataForMultiple(res.data, tag);
|
|
28844
|
+
}
|
|
28845
|
+
}
|
|
28846
|
+
return res;
|
|
28847
|
+
}
|
|
28848
|
+
/**
|
|
28849
|
+
* 实体数据转ui数据
|
|
28850
|
+
*
|
|
28851
|
+
* @author zk
|
|
28852
|
+
* @date 2023-09-21 06:09:06
|
|
28853
|
+
* @param {IData} entityData 实体数据
|
|
28854
|
+
* @param {string} tag 多数据源dataUIMap标识
|
|
28855
|
+
* @return {*} {ControlVO}
|
|
28856
|
+
* @memberof TreeGridService
|
|
28857
|
+
*/
|
|
28858
|
+
toUIDataForMultiple(entityData, tag) {
|
|
28859
|
+
const dataUIMap = this.multipleUiMap.get(tag);
|
|
28860
|
+
return new ControlVO(entityData, dataUIMap);
|
|
28861
|
+
}
|
|
28862
|
+
};
|
|
28863
|
+
|
|
28864
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
28865
|
+
var TreeGridExController = class extends MDControlController {
|
|
28866
|
+
constructor() {
|
|
28867
|
+
super(...arguments);
|
|
28868
|
+
/**
|
|
28869
|
+
* 表格列的适配器
|
|
28870
|
+
*
|
|
28871
|
+
* @author zk
|
|
28872
|
+
* @date 2023-09-21 06:09:04
|
|
28873
|
+
* @type {{ [key: string]: IGridColumnProvider }}
|
|
28874
|
+
* @memberof TreeGridExController
|
|
28875
|
+
*/
|
|
28876
|
+
this.providers = {};
|
|
28877
|
+
/**
|
|
28878
|
+
* 所有表格列控制器集合
|
|
28879
|
+
*
|
|
28880
|
+
* @author zk
|
|
28881
|
+
* @date 2023-09-21 06:09:10
|
|
28882
|
+
* @type {{ [key: string]: GridColumnController }}
|
|
28883
|
+
* @memberof TreeGridExController
|
|
28884
|
+
*/
|
|
28885
|
+
this.columns = {};
|
|
28886
|
+
/**
|
|
28887
|
+
* 所有表格属性列的控制器
|
|
28888
|
+
*
|
|
28889
|
+
* @author zk
|
|
28890
|
+
* @date 2023-09-21 06:09:16
|
|
28891
|
+
* @type {{ [key: string]: GridFieldColumnController }}
|
|
28892
|
+
* @memberof TreeGridExController
|
|
28893
|
+
*/
|
|
28894
|
+
this.fieldColumns = {};
|
|
28895
|
+
/**
|
|
28896
|
+
* 所有表格操作列的控制器
|
|
28897
|
+
*
|
|
28898
|
+
* @author zk
|
|
28899
|
+
* @date 2023-09-21 06:09:21
|
|
28900
|
+
* @type {{ [key: string]: GridUAColumnController }}
|
|
28901
|
+
* @memberof TreeGridExController
|
|
28902
|
+
*/
|
|
28903
|
+
this.uaColumns = {};
|
|
28904
|
+
}
|
|
28905
|
+
initState() {
|
|
28906
|
+
super.initState();
|
|
28907
|
+
this.state.size = 0;
|
|
28908
|
+
this.state.columnStates = [];
|
|
28909
|
+
this.state.defaultExpandedKeys = [];
|
|
28910
|
+
}
|
|
28911
|
+
async onCreated() {
|
|
28912
|
+
await super.onCreated();
|
|
28913
|
+
this.service = new TreeGridExService(this.model);
|
|
28914
|
+
await this.service.init(this.context);
|
|
28915
|
+
this.initColumnStates();
|
|
28916
|
+
await this.initGridColumns();
|
|
28917
|
+
}
|
|
28918
|
+
/**
|
|
28919
|
+
* 初始化表格属性列,操作列,编辑项控制器
|
|
28920
|
+
*
|
|
28921
|
+
* @author zk
|
|
28922
|
+
* @date 2023-09-21 06:09:28
|
|
28923
|
+
* @protected
|
|
28924
|
+
* @return {*} {Promise<void>}
|
|
28925
|
+
* @memberof TreeGridExController
|
|
28926
|
+
*/
|
|
28927
|
+
async initGridColumns() {
|
|
28928
|
+
if (this.model.detreeColumns) {
|
|
28929
|
+
await Promise.all(
|
|
28930
|
+
this.model.detreeColumns.map(
|
|
28931
|
+
async (column) => this.initColumnsController(column)
|
|
28932
|
+
)
|
|
28933
|
+
);
|
|
28934
|
+
}
|
|
28935
|
+
}
|
|
28936
|
+
/**
|
|
28937
|
+
* 初始化表格属性列,操作列,编辑项控制器
|
|
28938
|
+
*
|
|
28939
|
+
* @author zk
|
|
28940
|
+
* @date 2023-09-21 06:09:37
|
|
28941
|
+
* @protected
|
|
28942
|
+
* @param {IDETreeColumn} column
|
|
28943
|
+
* @return {*} {Promise<void>}
|
|
28944
|
+
* @memberof TreeGridExController
|
|
28945
|
+
*/
|
|
28946
|
+
async initColumnsController(column) {
|
|
28947
|
+
const provider = await getGridColumnProvider(column);
|
|
28948
|
+
if (!provider) {
|
|
28949
|
+
return;
|
|
28950
|
+
}
|
|
28951
|
+
this.providers[column.codeName] = provider;
|
|
28952
|
+
const controller = await provider.createController(column, this);
|
|
28953
|
+
this.columns[column.codeName] = controller;
|
|
28954
|
+
if (column.columnType === "DEFGRIDCOLUMN") {
|
|
28955
|
+
this.fieldColumns[column.codeName] = controller;
|
|
28956
|
+
} else if (column.columnType === "UAGRIDCOLUMN") {
|
|
28957
|
+
this.uaColumns[column.codeName] = controller;
|
|
28958
|
+
}
|
|
28959
|
+
}
|
|
28960
|
+
/**
|
|
28961
|
+
* 初始化表格列状态
|
|
28962
|
+
*
|
|
28963
|
+
* @author zk
|
|
28964
|
+
* @date 2023-09-21 06:09:43
|
|
28965
|
+
* @protected
|
|
28966
|
+
* @memberof TreeGridExController
|
|
28967
|
+
*/
|
|
28968
|
+
initColumnStates() {
|
|
28969
|
+
recursiveIterate7(
|
|
28970
|
+
this.model,
|
|
28971
|
+
(column) => {
|
|
28972
|
+
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
28973
|
+
this.state.columnStates.push({
|
|
28974
|
+
key: column.codeName,
|
|
28975
|
+
caption: column.caption,
|
|
28976
|
+
hidden: !!column.hideDefault,
|
|
28977
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
28978
|
+
});
|
|
28979
|
+
}
|
|
28980
|
+
},
|
|
28981
|
+
{ childrenFields: ["detreeColumns"] }
|
|
28982
|
+
);
|
|
28983
|
+
this.calcColumnFixed();
|
|
28984
|
+
}
|
|
28985
|
+
/**
|
|
28986
|
+
* 计算列的固定状态
|
|
28987
|
+
*
|
|
28988
|
+
* @author zk
|
|
28989
|
+
* @date 2023-09-21 06:09:50
|
|
28990
|
+
* @protected
|
|
28991
|
+
* @memberof TreeGridExController
|
|
28992
|
+
*/
|
|
28993
|
+
calcColumnFixed() {
|
|
28994
|
+
const showColumns = this.state.columnStates.filter(
|
|
28995
|
+
(column) => !column.hidden
|
|
28996
|
+
);
|
|
28997
|
+
const allNum = showColumns.length;
|
|
28998
|
+
showColumns.forEach((column, index) => {
|
|
28999
|
+
if (column.uaColumn) {
|
|
29000
|
+
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
29001
|
+
} else {
|
|
29002
|
+
column.fixed = "right";
|
|
29003
|
+
}
|
|
29004
|
+
});
|
|
29005
|
+
}
|
|
29006
|
+
/**
|
|
29007
|
+
* 树部件加载,从根节点开始重新加载
|
|
29008
|
+
*
|
|
29009
|
+
* @author zk
|
|
29010
|
+
* @date 2023-09-21 06:09:56
|
|
29011
|
+
* @param {MDCtrlLoadParams} [args={}]
|
|
29012
|
+
* @return {*} {Promise<ITreeNodeData[]>}
|
|
29013
|
+
* @memberof TreeGridExController
|
|
29014
|
+
*/
|
|
29015
|
+
async load(args = {}) {
|
|
29016
|
+
const isInitialLoad = args.isInitialLoad === true;
|
|
29017
|
+
const nodes = await this.loadNodes();
|
|
29018
|
+
this.state.expandedKeys = this.calcExpandedKeys(nodes);
|
|
29019
|
+
await this.afterLoad(args, nodes);
|
|
29020
|
+
this.state.isLoaded = true;
|
|
29021
|
+
await this.evt.emit("onLoadSuccess", {
|
|
29022
|
+
isInitialLoad
|
|
29023
|
+
});
|
|
29024
|
+
return nodes;
|
|
29025
|
+
}
|
|
29026
|
+
/**
|
|
29027
|
+
* 加载子节点数据
|
|
29028
|
+
*
|
|
29029
|
+
* @author zk
|
|
29030
|
+
* @date 2023-09-21 06:09:02
|
|
29031
|
+
* @param {ITreeNodeData} [parentNode]
|
|
29032
|
+
* @return {*} {Promise<ITreeNodeData[]>}
|
|
29033
|
+
* @memberof TreeGridExController
|
|
29034
|
+
*/
|
|
29035
|
+
async loadNodes(parentNode) {
|
|
29036
|
+
const params = await this.getFetchParams();
|
|
29037
|
+
const hasQuery = !!params.query;
|
|
29038
|
+
const defaultExpandedKeys = !parentNode ? this.state.defaultExpandedKeys : void 0;
|
|
29039
|
+
await this.startLoading();
|
|
29040
|
+
let nodes;
|
|
29041
|
+
try {
|
|
29042
|
+
nodes = await this.service.fetchChildNodes(parentNode, {
|
|
29043
|
+
context: this.context.clone(),
|
|
29044
|
+
params,
|
|
29045
|
+
hasQuery,
|
|
29046
|
+
defaultExpandedKeys
|
|
29047
|
+
}) || [];
|
|
29048
|
+
} finally {
|
|
29049
|
+
await this.endLoading();
|
|
29050
|
+
}
|
|
29051
|
+
if (parentNode) {
|
|
29052
|
+
parentNode.children = nodes;
|
|
29053
|
+
} else {
|
|
29054
|
+
this.state.rootNodes = nodes;
|
|
29055
|
+
}
|
|
29056
|
+
this.state.items = [];
|
|
29057
|
+
recursiveIterate7(
|
|
29058
|
+
{ children: this.state.rootNodes },
|
|
29059
|
+
(node) => {
|
|
29060
|
+
this.state.items.push(node);
|
|
29061
|
+
}
|
|
29062
|
+
);
|
|
29063
|
+
return nodes;
|
|
29064
|
+
}
|
|
29065
|
+
/**
|
|
29066
|
+
* 计算展开节点集合
|
|
29067
|
+
*
|
|
29068
|
+
* @author zk
|
|
29069
|
+
* @date 2023-09-21 06:09:07
|
|
29070
|
+
* @param {ITreeNodeData[]} nodes
|
|
29071
|
+
* @return {*} {string[]}
|
|
29072
|
+
* @memberof TreeGridExController
|
|
29073
|
+
*/
|
|
29074
|
+
calcExpandedKeys(nodes) {
|
|
29075
|
+
let expandedKeys = [];
|
|
29076
|
+
recursiveIterate7({ children: nodes }, (node) => {
|
|
29077
|
+
var _a;
|
|
29078
|
+
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
29079
|
+
expandedKeys.push(node.id);
|
|
29080
|
+
}
|
|
29081
|
+
});
|
|
29082
|
+
if (this.state.defaultExpandedKeys.length) {
|
|
29083
|
+
expandedKeys.push(...this.state.defaultExpandedKeys);
|
|
29084
|
+
expandedKeys = Array.from(new Set(expandedKeys));
|
|
29085
|
+
}
|
|
29086
|
+
return expandedKeys;
|
|
29087
|
+
}
|
|
29088
|
+
};
|
|
29089
|
+
|
|
29090
|
+
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
29091
|
+
var TreeGridController = class extends GridController {
|
|
29092
|
+
};
|
|
29093
|
+
|
|
29094
|
+
// src/controller/control/tree-grid/tree-grid.service.ts
|
|
29095
|
+
var TreeGridService = class extends GridService {
|
|
29096
|
+
};
|
|
29097
|
+
|
|
28171
29098
|
// src/controller/hub.controller.ts
|
|
28172
29099
|
var HubController = class {
|
|
28173
29100
|
constructor() {
|
|
@@ -28383,7 +29310,7 @@ var AppHub = class {
|
|
|
28383
29310
|
this.registerAppView(appView);
|
|
28384
29311
|
return appView;
|
|
28385
29312
|
}
|
|
28386
|
-
throw new
|
|
29313
|
+
throw new RuntimeError48("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
28387
29314
|
}
|
|
28388
29315
|
/**
|
|
28389
29316
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -28414,7 +29341,7 @@ var AppHub = class {
|
|
|
28414
29341
|
this.registerAppDataEntity(entity, appId);
|
|
28415
29342
|
return entity;
|
|
28416
29343
|
}
|
|
28417
|
-
throw new
|
|
29344
|
+
throw new RuntimeError48("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
28418
29345
|
}
|
|
28419
29346
|
/**
|
|
28420
29347
|
* 新建 hub 应用
|
|
@@ -28435,11 +29362,18 @@ var AppHub = class {
|
|
|
28435
29362
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
28436
29363
|
this.registerApp(appModel);
|
|
28437
29364
|
} else {
|
|
28438
|
-
throw new
|
|
29365
|
+
throw new RuntimeError48("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
28439
29366
|
}
|
|
28440
29367
|
const app = new Application(appModel);
|
|
28441
29368
|
this.appMap.set(id, app);
|
|
28442
29369
|
await app.init();
|
|
29370
|
+
if (!this.configCache) {
|
|
29371
|
+
this.configCache = new ConfigService(
|
|
29372
|
+
ibiz.env.appId,
|
|
29373
|
+
"PSSysHub",
|
|
29374
|
+
"Global"
|
|
29375
|
+
);
|
|
29376
|
+
}
|
|
28443
29377
|
return app;
|
|
28444
29378
|
}
|
|
28445
29379
|
/**
|
|
@@ -28526,7 +29460,7 @@ var EngineFactory = class {
|
|
|
28526
29460
|
};
|
|
28527
29461
|
|
|
28528
29462
|
// src/engine/view-base.engine.ts
|
|
28529
|
-
import { RuntimeError as
|
|
29463
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
28530
29464
|
var ViewEngineBase = class {
|
|
28531
29465
|
/**
|
|
28532
29466
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -28714,7 +29648,7 @@ var ViewEngineBase = class {
|
|
|
28714
29648
|
const { appDataEntityId } = this.view.model;
|
|
28715
29649
|
const { evt, context, params } = this.view;
|
|
28716
29650
|
if (!appDataEntityId) {
|
|
28717
|
-
throw new
|
|
29651
|
+
throw new RuntimeError49("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
28718
29652
|
}
|
|
28719
29653
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
28720
29654
|
const res = await app.deService.exec(
|
|
@@ -28735,7 +29669,7 @@ var ViewEngineBase = class {
|
|
|
28735
29669
|
};
|
|
28736
29670
|
|
|
28737
29671
|
// src/engine/md-view.engine.ts
|
|
28738
|
-
import { RuntimeModelError as
|
|
29672
|
+
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
28739
29673
|
var MDViewEngine = class extends ViewEngineBase {
|
|
28740
29674
|
/**
|
|
28741
29675
|
* 多数据部件名称
|
|
@@ -28930,7 +29864,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
28930
29864
|
(item) => item.id === "newdata"
|
|
28931
29865
|
);
|
|
28932
29866
|
if (!openAppViewLogic) {
|
|
28933
|
-
throw new
|
|
29867
|
+
throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
28934
29868
|
}
|
|
28935
29869
|
const context = this.view.context.clone();
|
|
28936
29870
|
if (copyMode) {
|
|
@@ -28946,7 +29880,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
28946
29880
|
if (result instanceof Object && result.ok) {
|
|
28947
29881
|
this.refresh();
|
|
28948
29882
|
} else if (result === -1) {
|
|
28949
|
-
throw new
|
|
29883
|
+
throw new RuntimeModelError55(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
28950
29884
|
}
|
|
28951
29885
|
}
|
|
28952
29886
|
/**
|
|
@@ -29143,7 +30077,7 @@ var GlobalUtil = class {
|
|
|
29143
30077
|
};
|
|
29144
30078
|
|
|
29145
30079
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
29146
|
-
import { RuntimeError as
|
|
30080
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
29147
30081
|
var LogicExecutor = class {
|
|
29148
30082
|
/**
|
|
29149
30083
|
* @author lxm
|
|
@@ -29164,7 +30098,7 @@ var LogicExecutor = class {
|
|
|
29164
30098
|
*/
|
|
29165
30099
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29166
30100
|
execute(_executeParams) {
|
|
29167
|
-
throw new
|
|
30101
|
+
throw new RuntimeError50("Method not implemented.");
|
|
29168
30102
|
}
|
|
29169
30103
|
/**
|
|
29170
30104
|
* 销毁方法
|
|
@@ -29255,13 +30189,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
29255
30189
|
};
|
|
29256
30190
|
|
|
29257
30191
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
29258
|
-
import { RuntimeModelError as
|
|
30192
|
+
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
29259
30193
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
29260
30194
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29261
30195
|
execute(executeParams) {
|
|
29262
30196
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
29263
30197
|
if (!appDEUILogicId) {
|
|
29264
|
-
throw new
|
|
30198
|
+
throw new RuntimeModelError56(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
29265
30199
|
}
|
|
29266
30200
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
29267
30201
|
}
|
|
@@ -29596,7 +30530,7 @@ var LogicSchedulerCenter = class {
|
|
|
29596
30530
|
};
|
|
29597
30531
|
|
|
29598
30532
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
29599
|
-
import { RuntimeError as
|
|
30533
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
29600
30534
|
var LogicTrigger = class {
|
|
29601
30535
|
/**
|
|
29602
30536
|
* @author lxm
|
|
@@ -29656,7 +30590,7 @@ var LogicTrigger = class {
|
|
|
29656
30590
|
if (this.executor) {
|
|
29657
30591
|
return this.executor.execute(executeParams);
|
|
29658
30592
|
}
|
|
29659
|
-
throw new
|
|
30593
|
+
throw new RuntimeError51("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
29660
30594
|
}
|
|
29661
30595
|
/**
|
|
29662
30596
|
* 销毁方法
|
|
@@ -29673,12 +30607,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
29673
30607
|
};
|
|
29674
30608
|
|
|
29675
30609
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
29676
|
-
import { RuntimeError as
|
|
30610
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
29677
30611
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
29678
30612
|
bindExecutor(executor) {
|
|
29679
30613
|
super.bindExecutor(executor);
|
|
29680
30614
|
if (this.executor.type !== "SCRIPT") {
|
|
29681
|
-
throw new
|
|
30615
|
+
throw new RuntimeError52(
|
|
29682
30616
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
29683
30617
|
);
|
|
29684
30618
|
}
|
|
@@ -29712,12 +30646,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
29712
30646
|
if (typeof result === "boolean") {
|
|
29713
30647
|
return result;
|
|
29714
30648
|
}
|
|
29715
|
-
throw new
|
|
30649
|
+
throw new RuntimeError52("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
29716
30650
|
}
|
|
29717
30651
|
};
|
|
29718
30652
|
|
|
29719
30653
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
29720
|
-
import { RuntimeError as
|
|
30654
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
29721
30655
|
var TimerTrigger = class extends LogicTrigger {
|
|
29722
30656
|
constructor() {
|
|
29723
30657
|
super(...arguments);
|
|
@@ -29726,7 +30660,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
29726
30660
|
start() {
|
|
29727
30661
|
this.timer = setInterval(() => {
|
|
29728
30662
|
if (!this.scheduler.defaultParamsCb) {
|
|
29729
|
-
throw new
|
|
30663
|
+
throw new RuntimeError53("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
29730
30664
|
}
|
|
29731
30665
|
const params = this.scheduler.defaultParamsCb();
|
|
29732
30666
|
this.executor.execute(params);
|
|
@@ -29743,8 +30677,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
29743
30677
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
29744
30678
|
import {
|
|
29745
30679
|
ModelError as ModelError30,
|
|
29746
|
-
RuntimeError as
|
|
29747
|
-
RuntimeModelError as
|
|
30680
|
+
RuntimeError as RuntimeError54,
|
|
30681
|
+
RuntimeModelError as RuntimeModelError57
|
|
29748
30682
|
} from "@ibiz-template/core";
|
|
29749
30683
|
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
29750
30684
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -29779,7 +30713,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29779
30713
|
const { context, params, ...rest } = parameters;
|
|
29780
30714
|
const { data } = parameters;
|
|
29781
30715
|
if (!(data == null ? void 0 : data[0])) {
|
|
29782
|
-
throw new
|
|
30716
|
+
throw new RuntimeError54("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
29783
30717
|
}
|
|
29784
30718
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
29785
30719
|
let openViewRef;
|
|
@@ -29788,7 +30722,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29788
30722
|
} else {
|
|
29789
30723
|
openViewRef = appUILogic.openDataAppView;
|
|
29790
30724
|
if (!openViewRef) {
|
|
29791
|
-
throw new
|
|
30725
|
+
throw new RuntimeModelError57(
|
|
29792
30726
|
appUILogic,
|
|
29793
30727
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
29794
30728
|
);
|
|
@@ -29796,7 +30730,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29796
30730
|
}
|
|
29797
30731
|
const openView = openViewRef.refAppViewId;
|
|
29798
30732
|
if (!openView) {
|
|
29799
|
-
throw new
|
|
30733
|
+
throw new RuntimeModelError57(
|
|
29800
30734
|
appUILogic,
|
|
29801
30735
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
29802
30736
|
);
|
|
@@ -29823,7 +30757,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29823
30757
|
const appDataEntityId = parameters.view.model.appDataEntityId;
|
|
29824
30758
|
const formTypeName = await getFormTypeFieldName(appDataEntityId);
|
|
29825
30759
|
if (!formTypeName) {
|
|
29826
|
-
throw new
|
|
30760
|
+
throw new RuntimeModelError57(
|
|
29827
30761
|
appUILogic,
|
|
29828
30762
|
"".concat(appDataEntityId, "\u5B9E\u4F53\u7F3A\u5C11\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027")
|
|
29829
30763
|
);
|
|
@@ -29831,12 +30765,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29831
30765
|
const { data } = parameters;
|
|
29832
30766
|
const formTypeValue = data[0][formTypeName];
|
|
29833
30767
|
if (!formTypeValue) {
|
|
29834
|
-
throw new
|
|
30768
|
+
throw new RuntimeModelError57(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
29835
30769
|
}
|
|
29836
30770
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
29837
30771
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
29838
30772
|
if (!findView) {
|
|
29839
|
-
throw new
|
|
30773
|
+
throw new RuntimeError54(
|
|
29840
30774
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
29841
30775
|
);
|
|
29842
30776
|
}
|
|
@@ -29873,7 +30807,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29873
30807
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
29874
30808
|
});
|
|
29875
30809
|
if (!newViewRef) {
|
|
29876
|
-
throw new
|
|
30810
|
+
throw new RuntimeModelError57(
|
|
29877
30811
|
appUILogic,
|
|
29878
30812
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
29879
30813
|
);
|
|
@@ -29883,7 +30817,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29883
30817
|
} else {
|
|
29884
30818
|
newViewRef = newDataAppView;
|
|
29885
30819
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
29886
|
-
throw new
|
|
30820
|
+
throw new RuntimeModelError57(
|
|
29887
30821
|
appUILogic,
|
|
29888
30822
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
29889
30823
|
);
|
|
@@ -29933,7 +30867,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29933
30867
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
29934
30868
|
const { context, params, ...rest } = parameters;
|
|
29935
30869
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
29936
|
-
throw new
|
|
30870
|
+
throw new RuntimeModelError57(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
29937
30871
|
}
|
|
29938
30872
|
const result = await ibiz.commands.execute(
|
|
29939
30873
|
OpenAppViewCommand.TAG,
|
|
@@ -29947,12 +30881,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29947
30881
|
}
|
|
29948
30882
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
29949
30883
|
if (!selectData) {
|
|
29950
|
-
throw new
|
|
30884
|
+
throw new RuntimeError54("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
29951
30885
|
}
|
|
29952
30886
|
const indexType = selectData.srfkey;
|
|
29953
30887
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
29954
30888
|
if (!findView) {
|
|
29955
|
-
throw new
|
|
30889
|
+
throw new RuntimeError54(
|
|
29956
30890
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
29957
30891
|
);
|
|
29958
30892
|
}
|
|
@@ -29979,7 +30913,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
29979
30913
|
const minorDERs = selfDe.minorAppDERSs;
|
|
29980
30914
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
29981
30915
|
if (!minorDERs) {
|
|
29982
|
-
throw new
|
|
30916
|
+
throw new RuntimeModelError57(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
29983
30917
|
}
|
|
29984
30918
|
let pickParentFieldName;
|
|
29985
30919
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -30252,6 +31186,7 @@ export {
|
|
|
30252
31186
|
ChartService,
|
|
30253
31187
|
CodeListEditorController,
|
|
30254
31188
|
CodeListService,
|
|
31189
|
+
ConfigService,
|
|
30255
31190
|
ContainerPortletController,
|
|
30256
31191
|
ContextMenuController,
|
|
30257
31192
|
ControlController,
|
|
@@ -30261,6 +31196,7 @@ export {
|
|
|
30261
31196
|
ControllerEvent,
|
|
30262
31197
|
Counter,
|
|
30263
31198
|
CounterService,
|
|
31199
|
+
CustomDashboardController,
|
|
30264
31200
|
DECache,
|
|
30265
31201
|
DEDQCondUtil,
|
|
30266
31202
|
DEService,
|
|
@@ -30372,6 +31308,10 @@ export {
|
|
|
30372
31308
|
TreeController,
|
|
30373
31309
|
TreeDataSetNodeData,
|
|
30374
31310
|
TreeExpBarController,
|
|
31311
|
+
TreeGridController,
|
|
31312
|
+
TreeGridExController,
|
|
31313
|
+
TreeGridExService,
|
|
31314
|
+
TreeGridService,
|
|
30375
31315
|
TreeNodeData,
|
|
30376
31316
|
TreeService,
|
|
30377
31317
|
TreeStaticNodeData,
|