@ibiz-template/runtime 0.1.6 → 0.1.8
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 +401 -161
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +3 -3
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +4 -1
- package/out/constant/sys-uiaction-tag.d.ts +8 -0
- package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
- package/out/constant/sys-uiaction-tag.js +8 -0
- package/out/controller/common/base.controller.js +1 -1
- package/out/controller/common/control/md-control.controller.d.ts +3 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +31 -13
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +13 -3
- package/out/controller/ctx/ctx.d.ts.map +1 -1
- package/out/controller/ctx/ctx.js +1 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +10 -4
- package/out/install.js +2 -2
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts +38 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts.map +1 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/i-icon/i-icon.d.ts +7 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +11 -4
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts +20 -0
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/row-edit-change.event.js +1 -0
- package/out/interface/controller/event/control/i-grid.event.d.ts +13 -1
- package/out/interface/controller/event/control/i-grid.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree.event.d.ts +19 -0
- package/out/interface/controller/event/control/i-tree.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +16 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/work-flow/wf-link.d.ts +9 -0
- package/out/interface/controller/work-flow/wf-link.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +5 -3
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts +5 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts.map +1 -1
- package/out/interface/service/service/i-auth.service.d.ts +29 -0
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -0
- package/out/interface/service/service/i-auth.service.js +1 -0
- package/out/interface/service/service/index.d.ts +5 -4
- package/out/interface/service/service/index.d.ts.map +1 -1
- package/out/interface/service/service/index.js +1 -4
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts +82 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts.map +1 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.js +1 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts +8 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +9 -0
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.js +2 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +24 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +39 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts +27 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/control-event-trigger.js +33 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts +8 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/view-event-trigger.js +8 -0
- package/out/register/helper/editor-register.d.ts.map +1 -1
- package/out/register/helper/editor-register.js +12 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +9 -15
- package/out/service/service/auth/v7-auth.service.d.ts +14 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -0
- package/out/service/service/auth/v7-auth.service.js +47 -0
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +5 -1
- package/out/service/service/index.d.ts +1 -1
- package/out/service/service/index.d.ts.map +1 -1
- package/out/service/service/index.js +1 -1
- package/out/service/vo/control.vo.d.ts +8 -0
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +16 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.js +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +21 -2
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +48 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +12 -1
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +21 -2
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-static-node-data.js +1 -0
- package/out/types.d.ts +21 -4
- package/out/types.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.js +22 -0
- package/out/ui-logic/ui-logic-node/index.d.ts +1 -0
- package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/index.js +1 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +2 -2
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +5 -3
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +2 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts +4 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +27 -26
- package/out/utils/script/script-function.d.ts.map +1 -1
- package/out/utils/script/script-function.js +4 -1
- package/package.json +3 -3
- package/src/command/app/open-app-view/open-app-view.ts +8 -5
- package/src/constant/sys-uiaction-tag.ts +8 -0
- package/src/controller/common/base.controller.ts +1 -1
- package/src/controller/common/control/md-control.controller.ts +37 -14
- package/src/controller/common/view/view.controller.ts +16 -3
- package/src/controller/ctx/ctx.ts +1 -1
- package/src/engine/md-view.engine.ts +13 -4
- package/src/install.ts +2 -2
- package/src/interface/common/i-open-view-options/i-open-view-options.ts +40 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/common/i-icon/i-icon.ts +8 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +12 -4
- package/src/interface/controller/controller/control/i-md-control.controller.ts +9 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +8 -0
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/row-edit-change.event.ts +20 -0
- package/src/interface/controller/event/control/i-grid.event.ts +14 -1
- package/src/interface/controller/event/control/i-tree.event.ts +14 -0
- package/src/interface/controller/state/control/i-grid.state.ts +9 -0
- package/src/interface/controller/state/control/i-tree.state.ts +19 -1
- package/src/interface/controller/work-flow/wf-link.ts +10 -0
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +6 -3
- package/src/interface/logic-scheduler/i-trigger-match-params.ts +6 -0
- package/src/interface/service/service/i-auth.service.ts +29 -0
- package/src/interface/service/service/index.ts +5 -4
- package/src/interface/util/i-confirm-util/i-confirm-util.ts +82 -0
- package/src/interface/util/i-modal-util/i-modal-util.ts +8 -0
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +10 -0
- package/src/interface/util/index.ts +1 -0
- package/src/logic-scheduler/index.ts +5 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +43 -0
- package/src/logic-scheduler/trigger/control-event-trigger.ts +45 -0
- package/src/logic-scheduler/trigger/view-event-trigger.ts +8 -0
- package/src/register/helper/editor-register.ts +17 -1
- package/src/service/dto/method.dto.ts +9 -13
- package/src/service/service/auth/v7-auth.service.ts +49 -0
- package/src/service/service/code-list/code-list.service.ts +8 -1
- package/src/service/service/index.ts +1 -1
- package/src/service/vo/control.vo.ts +17 -1
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +2 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +60 -2
- package/src/service/vo/tree-node-data/tree-node-data.ts +27 -3
- package/src/service/vo/tree-node-data/tree-static-node-data.ts +2 -0
- package/src/types.ts +24 -3
- package/src/ui-action/provider/front-ui-action-provider.ts +1 -1
- package/src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts +30 -0
- package/src/ui-logic/ui-logic-node/index.ts +1 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +5 -2
- package/src/ui-logic/ui-logic.ts +5 -2
- package/src/ui-logic/utils/handle-src-val.ts +3 -6
- package/src/utils/open-redirect-view/open-redirect-view.ts +30 -27
- package/src/utils/script/script-function.ts +4 -1
- package/out/service/service/auth/auth.service.d.ts +0 -30
- package/out/service/service/auth/auth.service.d.ts.map +0 -1
- package/out/service/service/auth/auth.service.js +0 -37
- package/src/service/service/auth/auth.service.ts +0 -44
package/dist/index.esm.js
CHANGED
|
@@ -960,15 +960,15 @@ function getViewEngines(view) {
|
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
963
|
-
async function openRedirectView(appView, context, params = {},
|
|
963
|
+
async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
964
964
|
return openDERedirectView(
|
|
965
965
|
appView,
|
|
966
966
|
context,
|
|
967
967
|
params,
|
|
968
|
-
|
|
968
|
+
opts
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
971
|
+
async function toLocalOpenWFRedirectView(context, linkUrl, opts = {}) {
|
|
972
972
|
const i = linkUrl.lastIndexOf("?");
|
|
973
973
|
const queryStr = decodeURIComponent(
|
|
974
974
|
linkUrl.substring(i + 1, linkUrl.length)
|
|
@@ -1003,10 +1003,12 @@ async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
|
1003
1003
|
OpenAppViewCommand.TAG,
|
|
1004
1004
|
deRdView.id,
|
|
1005
1005
|
context,
|
|
1006
|
-
params
|
|
1006
|
+
params,
|
|
1007
|
+
opts
|
|
1007
1008
|
);
|
|
1008
1009
|
}
|
|
1009
|
-
async function openDERedirectView(appView, context, params = {},
|
|
1010
|
+
async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
1011
|
+
var _a;
|
|
1010
1012
|
const navContext = appView.appViewNavContexts || [];
|
|
1011
1013
|
const navContextData = convertNavData(navContext, context, params);
|
|
1012
1014
|
context = Object.assign(context.clone(), navContextData);
|
|
@@ -1015,7 +1017,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1015
1017
|
Object.assign(params, navParamsData);
|
|
1016
1018
|
const entityId = appView.appDataEntityId;
|
|
1017
1019
|
const key = calcDeCodeNameById(entityId);
|
|
1018
|
-
let curData = data[0] || {};
|
|
1020
|
+
let curData = ((_a = opts.data) == null ? void 0 : _a[0]) || {};
|
|
1019
1021
|
context[key] = curData[key] || context[key] || params[key];
|
|
1020
1022
|
const actionId = appView.getDataAppDEActionId;
|
|
1021
1023
|
const app = ibiz.hub.getApp(appView.appId);
|
|
@@ -1044,7 +1046,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1044
1046
|
});
|
|
1045
1047
|
}
|
|
1046
1048
|
if (linkUrl.startsWith("appredirectview?")) {
|
|
1047
|
-
await toLocalOpenWFRedirectView(context, linkUrl);
|
|
1049
|
+
await toLocalOpenWFRedirectView(context, linkUrl, opts);
|
|
1048
1050
|
return { ok: true, data: [] };
|
|
1049
1051
|
}
|
|
1050
1052
|
return { ok: false, data: [] };
|
|
@@ -1060,7 +1062,8 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1060
1062
|
const deRdTag = "".concat(entity.name.toUpperCase(), ":").concat(rdTag);
|
|
1061
1063
|
const allRefViews = appView.redirectAppViewRefs;
|
|
1062
1064
|
const refView = allRefViews == null ? void 0 : allRefViews.find((view) => {
|
|
1063
|
-
|
|
1065
|
+
const matchKey = view.name || view.id;
|
|
1066
|
+
return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
|
|
1064
1067
|
});
|
|
1065
1068
|
if (refView) {
|
|
1066
1069
|
const viewId = refView.refAppViewId;
|
|
@@ -1070,7 +1073,7 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1070
1073
|
viewId,
|
|
1071
1074
|
context,
|
|
1072
1075
|
params,
|
|
1073
|
-
{ data: [curData] }
|
|
1076
|
+
{ ...opts, data: [curData] }
|
|
1074
1077
|
);
|
|
1075
1078
|
if (result) {
|
|
1076
1079
|
return result;
|
|
@@ -1096,6 +1099,18 @@ async function openDERedirectView(appView, context, params = {}, data = []) {
|
|
|
1096
1099
|
}
|
|
1097
1100
|
async function calcDERdTag(entity, rdView, params, data) {
|
|
1098
1101
|
let rdTag = "";
|
|
1102
|
+
const typeFieldId = rdView.typeAppDEFieldId;
|
|
1103
|
+
if (typeFieldId) {
|
|
1104
|
+
const { codeName } = findFieldById(entity, typeFieldId);
|
|
1105
|
+
const value = data[codeName.toLowerCase()];
|
|
1106
|
+
if (notNilEmpty2(value)) {
|
|
1107
|
+
return "".concat(value);
|
|
1108
|
+
}
|
|
1109
|
+
ibiz.log.warn(
|
|
1110
|
+
"\u91CD\u5B9A\u5411\u89C6\u56FE[".concat(rdView.name, "]\u81EA\u5B9A\u4E49\u7C7B\u522B\u5C5E\u6027[").concat(typeFieldId, "]\u503C\u4E3A\u7A7A"),
|
|
1111
|
+
data
|
|
1112
|
+
);
|
|
1113
|
+
}
|
|
1099
1114
|
const defView = "".concat(ibiz.env.isMob ? "MOB" : "", "EDITVIEW");
|
|
1100
1115
|
const srfWf = params.srfwf;
|
|
1101
1116
|
if (notNilEmpty2(srfWf)) {
|
|
@@ -1105,19 +1120,9 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1105
1120
|
return "".concat(defView, ":").concat(srfWf.toUpperCase());
|
|
1106
1121
|
}
|
|
1107
1122
|
let typeValue = "";
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
const value = data[codeName.toLowerCase()];
|
|
1112
|
-
if (notNilEmpty2(value)) {
|
|
1113
|
-
typeValue = value;
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
if (isNilOrEmpty2(typeValue)) {
|
|
1117
|
-
if (entity.indexTypeAppDEFieldId) {
|
|
1118
|
-
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
1119
|
-
typeValue = data[codeName.toLowerCase()];
|
|
1120
|
-
}
|
|
1123
|
+
if (entity.indexTypeAppDEFieldId) {
|
|
1124
|
+
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
1125
|
+
typeValue = data[codeName.toLowerCase()];
|
|
1121
1126
|
}
|
|
1122
1127
|
if (isNilOrEmpty2(typeValue)) {
|
|
1123
1128
|
if (entity.formTypeAppDEFieldId) {
|
|
@@ -1126,7 +1131,7 @@ async function calcDERdTag(entity, rdView, params, data) {
|
|
|
1126
1131
|
}
|
|
1127
1132
|
}
|
|
1128
1133
|
if (notNilEmpty2(typeValue)) {
|
|
1129
|
-
rdTag = "".concat(defView, ":").concat(typeValue.toUpperCase());
|
|
1134
|
+
rdTag = "".concat(defView, ":").concat(typeValue.toString().toUpperCase());
|
|
1130
1135
|
} else {
|
|
1131
1136
|
rdTag = "".concat(defView);
|
|
1132
1137
|
}
|
|
@@ -1249,7 +1254,10 @@ var ScriptFunction = class {
|
|
|
1249
1254
|
this.options = options;
|
|
1250
1255
|
const code = this.formatCode(scriptCode, options);
|
|
1251
1256
|
this.calcArgKeys(argKeys, options);
|
|
1252
|
-
|
|
1257
|
+
const fn = new Function(...this.argKeys, code);
|
|
1258
|
+
this.scriptFn = function callBack(...args) {
|
|
1259
|
+
return fn.apply({}, args);
|
|
1260
|
+
};
|
|
1253
1261
|
}
|
|
1254
1262
|
/**
|
|
1255
1263
|
* 格式化脚本
|
|
@@ -2135,6 +2143,8 @@ var SysUIActionTag = /* @__PURE__ */ ((SysUIActionTag2) => {
|
|
|
2135
2143
|
SysUIActionTag2["COPY"] = "Copy";
|
|
2136
2144
|
SysUIActionTag2["VIEW"] = "View";
|
|
2137
2145
|
SysUIActionTag2["TOGGLE_ROW_EDIT"] = "ToggleRowEdit";
|
|
2146
|
+
SysUIActionTag2["REFRESH_ALL"] = "RefreshAll";
|
|
2147
|
+
SysUIActionTag2["REFRESH_PARENT"] = "RefreshParent";
|
|
2138
2148
|
SysUIActionTag2["LOAD_MORE"] = "LoadMore";
|
|
2139
2149
|
return SysUIActionTag2;
|
|
2140
2150
|
})(SysUIActionTag || {});
|
|
@@ -2328,7 +2338,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
2328
2338
|
fullViewModel,
|
|
2329
2339
|
context,
|
|
2330
2340
|
params,
|
|
2331
|
-
opts
|
|
2341
|
+
opts
|
|
2332
2342
|
);
|
|
2333
2343
|
}
|
|
2334
2344
|
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
@@ -2397,6 +2407,9 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
2397
2407
|
* @return {*} {Promise<IModalData>}
|
|
2398
2408
|
*/
|
|
2399
2409
|
async openPopover(appView, event, context, params = {}) {
|
|
2410
|
+
if (!event) {
|
|
2411
|
+
throw new RuntimeError4("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
2412
|
+
}
|
|
2400
2413
|
return ibiz.openView.popover(appView, event, context, params);
|
|
2401
2414
|
}
|
|
2402
2415
|
/**
|
|
@@ -3972,8 +3985,15 @@ var CodeListService = class {
|
|
|
3972
3985
|
formatStaticItems(codeItems, isValueNumber) {
|
|
3973
3986
|
return codeItems.map((codeItem) => {
|
|
3974
3987
|
var _a;
|
|
3988
|
+
let text = codeItem.text;
|
|
3989
|
+
if (codeItem.textLanguageRes) {
|
|
3990
|
+
text = ibiz.i18n.t(
|
|
3991
|
+
codeItem.textLanguageRes.lanResTag,
|
|
3992
|
+
codeItem.textLanguageRes.defaultContent
|
|
3993
|
+
);
|
|
3994
|
+
}
|
|
3975
3995
|
const _codeItem = {
|
|
3976
|
-
text
|
|
3996
|
+
text,
|
|
3977
3997
|
value: isValueNumber ? Number(codeItem.value) : codeItem.value,
|
|
3978
3998
|
color: codeItem.color,
|
|
3979
3999
|
id: codeItem.codeName
|
|
@@ -4582,8 +4602,6 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
4582
4602
|
};
|
|
4583
4603
|
|
|
4584
4604
|
// src/service/dto/method.dto.ts
|
|
4585
|
-
import { clone as clone5 } from "ramda";
|
|
4586
|
-
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
4587
4605
|
import { ModelError as ModelError7 } from "@ibiz-template/core";
|
|
4588
4606
|
var MethodDto = class _MethodDto {
|
|
4589
4607
|
constructor(entity, dto) {
|
|
@@ -4611,22 +4629,17 @@ var MethodDto = class _MethodDto {
|
|
|
4611
4629
|
*/
|
|
4612
4630
|
async get(context, data) {
|
|
4613
4631
|
const params = {};
|
|
4614
|
-
const copyData = clone5(data);
|
|
4615
4632
|
for (let i = 0; i < this.fields.length; i++) {
|
|
4616
4633
|
const field = this.fields[i];
|
|
4617
4634
|
const key = field.codeName.toLowerCase();
|
|
4618
4635
|
switch (field.type) {
|
|
4619
4636
|
case "SIMPLE": {
|
|
4620
|
-
const val = copyData[key];
|
|
4621
|
-
if (isNilOrEmpty5(val)) {
|
|
4622
|
-
params[key] = null;
|
|
4623
|
-
} else {
|
|
4624
|
-
params[key] = val;
|
|
4625
|
-
}
|
|
4626
|
-
delete copyData[key];
|
|
4627
4637
|
break;
|
|
4628
4638
|
}
|
|
4629
4639
|
case "DTOS": {
|
|
4640
|
+
if (!field.refAppDataEntityId) {
|
|
4641
|
+
break;
|
|
4642
|
+
}
|
|
4630
4643
|
const dto = await this.getFieldDto(field);
|
|
4631
4644
|
const service = await this.app.deService.getService(
|
|
4632
4645
|
field.refAppDataEntityId
|
|
@@ -4648,8 +4661,7 @@ var MethodDto = class _MethodDto {
|
|
|
4648
4661
|
);
|
|
4649
4662
|
}
|
|
4650
4663
|
}
|
|
4651
|
-
|
|
4652
|
-
return params;
|
|
4664
|
+
return { ...data, ...params };
|
|
4653
4665
|
}
|
|
4654
4666
|
/**
|
|
4655
4667
|
* 设置本地 DTO 存储
|
|
@@ -4666,6 +4678,9 @@ var MethodDto = class _MethodDto {
|
|
|
4666
4678
|
return Promise.all(
|
|
4667
4679
|
data.map(async (datum) => {
|
|
4668
4680
|
const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
|
|
4681
|
+
if (!field.refAppDataEntityId) {
|
|
4682
|
+
return;
|
|
4683
|
+
}
|
|
4669
4684
|
const key = field.codeName.toLowerCase();
|
|
4670
4685
|
const dto = await this.getFieldDto(field);
|
|
4671
4686
|
const items = datum[key];
|
|
@@ -5283,11 +5298,11 @@ var EndNode = class extends DELogicNode {
|
|
|
5283
5298
|
|
|
5284
5299
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
5285
5300
|
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
5286
|
-
import { clone as
|
|
5301
|
+
import { clone as clone6 } from "ramda";
|
|
5287
5302
|
|
|
5288
5303
|
// src/de-logic/utils/handle-src-val.ts
|
|
5289
5304
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
5290
|
-
import { clone as
|
|
5305
|
+
import { clone as clone5 } from "ramda";
|
|
5291
5306
|
function handleSrcVal(ctx, srcValParams) {
|
|
5292
5307
|
const { srcDELogicParamId, srcValueType, srcFieldName, srcValue } = srcValParams;
|
|
5293
5308
|
if (!srcValParams.srcValueType) {
|
|
@@ -5311,7 +5326,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
5311
5326
|
value = ctx.context;
|
|
5312
5327
|
break;
|
|
5313
5328
|
case "ENVPARAM":
|
|
5314
|
-
value =
|
|
5329
|
+
value = clone5(ibiz.env);
|
|
5315
5330
|
break;
|
|
5316
5331
|
default:
|
|
5317
5332
|
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -5367,7 +5382,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
5367
5382
|
copyParam(nodeParam, ctx) {
|
|
5368
5383
|
const { dstDELogicParamId } = nodeParam;
|
|
5369
5384
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
5370
|
-
ctx.params[dstDELogicParamId] =
|
|
5385
|
+
ctx.params[dstDELogicParamId] = clone6(srcVal);
|
|
5371
5386
|
}
|
|
5372
5387
|
/**
|
|
5373
5388
|
* 绑定参数
|
|
@@ -5527,7 +5542,7 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
5527
5542
|
|
|
5528
5543
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
5529
5544
|
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
5530
|
-
import { clone as
|
|
5545
|
+
import { clone as clone7 } from "ramda";
|
|
5531
5546
|
var CopyParamNode = class extends DELogicNode {
|
|
5532
5547
|
async exec(ctx) {
|
|
5533
5548
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
@@ -5538,7 +5553,7 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
5538
5553
|
);
|
|
5539
5554
|
}
|
|
5540
5555
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
5541
|
-
ctx.params[dstDELogicParamId] =
|
|
5556
|
+
ctx.params[dstDELogicParamId] = clone7(srcVal);
|
|
5542
5557
|
}
|
|
5543
5558
|
};
|
|
5544
5559
|
|
|
@@ -5604,7 +5619,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
5604
5619
|
|
|
5605
5620
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
5606
5621
|
import { ModelError as ModelError12 } from "@ibiz-template/core";
|
|
5607
|
-
import { clone as
|
|
5622
|
+
import { clone as clone8 } from "ramda";
|
|
5608
5623
|
var DELogicParam = class {
|
|
5609
5624
|
/**
|
|
5610
5625
|
* Creates an instance of DELogicParam.
|
|
@@ -5632,7 +5647,7 @@ var DELogicParam = class {
|
|
|
5632
5647
|
if (m.default) {
|
|
5633
5648
|
ctx.params[tag] = ctx.data || {};
|
|
5634
5649
|
} else if (m.appGlobalParam) {
|
|
5635
|
-
ctx.params[tag] =
|
|
5650
|
+
ctx.params[tag] = clone8(ibiz.env);
|
|
5636
5651
|
} else if (m.entityListParam) {
|
|
5637
5652
|
ctx.params[tag] = [];
|
|
5638
5653
|
} else if (m.entityPageParam) {
|
|
@@ -5648,7 +5663,7 @@ var DELogicParam = class {
|
|
|
5648
5663
|
} else if (m.simpleParam) {
|
|
5649
5664
|
ctx.params[tag] = {};
|
|
5650
5665
|
} else if (m.cloneParam) {
|
|
5651
|
-
ctx.params[tag] =
|
|
5666
|
+
ctx.params[tag] = clone8(ctx.data || {});
|
|
5652
5667
|
} else if (m.envParam) {
|
|
5653
5668
|
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
5654
5669
|
} else if (m.fileListParam) {
|
|
@@ -6188,7 +6203,7 @@ import {
|
|
|
6188
6203
|
RuntimeModelError as RuntimeModelError19
|
|
6189
6204
|
} from "@ibiz-template/core";
|
|
6190
6205
|
import { ascSort, descSort } from "qx-util";
|
|
6191
|
-
import { clone as
|
|
6206
|
+
import { clone as clone9, equals as equals2, isEmpty as isEmpty7, isNil as isNil7, where as where2 } from "ramda";
|
|
6192
6207
|
var FetchMethod = class extends Method {
|
|
6193
6208
|
async exec(context, data, params) {
|
|
6194
6209
|
if (this.isLocalMode) {
|
|
@@ -6324,7 +6339,7 @@ var FetchMethod = class extends Method {
|
|
|
6324
6339
|
const { page, size } = filter;
|
|
6325
6340
|
const start = page * size;
|
|
6326
6341
|
const end = (page + 1) * size - 1;
|
|
6327
|
-
const items = list.slice(start, end).map((item) =>
|
|
6342
|
+
const items = list.slice(start, end).map((item) => clone9(item));
|
|
6328
6343
|
return items;
|
|
6329
6344
|
}
|
|
6330
6345
|
/**
|
|
@@ -6438,7 +6453,7 @@ var DEService = class {
|
|
|
6438
6453
|
};
|
|
6439
6454
|
|
|
6440
6455
|
// src/service/vo/control.vo.ts
|
|
6441
|
-
import { isNil as isNil8 } from "ramda";
|
|
6456
|
+
import { clone as clone10, isNil as isNil8 } from "ramda";
|
|
6442
6457
|
var ControlVO = class _ControlVO {
|
|
6443
6458
|
/**
|
|
6444
6459
|
* 是否是新建数据,0为新建
|
|
@@ -6596,6 +6611,21 @@ var ControlVO = class _ControlVO {
|
|
|
6596
6611
|
setOrigin(data) {
|
|
6597
6612
|
this.$origin = data instanceof _ControlVO ? data.getOrigin() : data;
|
|
6598
6613
|
}
|
|
6614
|
+
/**
|
|
6615
|
+
* 克隆新的vo数据
|
|
6616
|
+
*
|
|
6617
|
+
* @author lxm
|
|
6618
|
+
* @date 2023-08-16 11:08:29
|
|
6619
|
+
* @return {*} {ControlVO}
|
|
6620
|
+
*/
|
|
6621
|
+
clone() {
|
|
6622
|
+
const cloneOrigin = clone10(this.$origin);
|
|
6623
|
+
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
6624
|
+
Object.keys(this).forEach((key) => {
|
|
6625
|
+
newVal[key] = this[key];
|
|
6626
|
+
});
|
|
6627
|
+
return newVal;
|
|
6628
|
+
}
|
|
6599
6629
|
};
|
|
6600
6630
|
|
|
6601
6631
|
// src/service/service/control/control.service.ts
|
|
@@ -7029,39 +7059,41 @@ var AuthorityService = class {
|
|
|
7029
7059
|
}
|
|
7030
7060
|
};
|
|
7031
7061
|
|
|
7032
|
-
// src/service/service/auth/auth.service.ts
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
const res = await ibiz.net.post(
|
|
7045
|
-
"/v7/login",
|
|
7046
|
-
{ loginname, password },
|
|
7047
|
-
{},
|
|
7048
|
-
{
|
|
7049
|
-
// sass 模式下,注册在 sassMgr 管理平台的应用中心系统标识
|
|
7050
|
-
// srfdcsystem: ibiz.env.dcSystem,
|
|
7062
|
+
// src/service/service/auth/v7-auth.service.ts
|
|
7063
|
+
import { CoreConst } from "@ibiz-template/core";
|
|
7064
|
+
import { clearCookie, setCookie } from "qx-util";
|
|
7065
|
+
var V7AuthService = class {
|
|
7066
|
+
async login(loginname, password) {
|
|
7067
|
+
try {
|
|
7068
|
+
const res = await ibiz.net.post("/v7/login", { loginname, password });
|
|
7069
|
+
const { data } = res;
|
|
7070
|
+
if (data && data.token) {
|
|
7071
|
+
setCookie(CoreConst.TOKEN, data.token, 0, true);
|
|
7072
|
+
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
7073
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), 0, true);
|
|
7051
7074
|
}
|
|
7052
|
-
|
|
7053
|
-
|
|
7075
|
+
return true;
|
|
7076
|
+
} catch (err) {
|
|
7077
|
+
ibiz.notification.error({
|
|
7078
|
+
title: "\u767B\u5F55\u5931\u8D25",
|
|
7079
|
+
desc: err.message || ""
|
|
7080
|
+
});
|
|
7081
|
+
}
|
|
7082
|
+
return false;
|
|
7054
7083
|
}
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7084
|
+
async logout() {
|
|
7085
|
+
try {
|
|
7086
|
+
await ibiz.net.get("/v7/logout");
|
|
7087
|
+
clearCookie(CoreConst.TOKEN);
|
|
7088
|
+
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
7089
|
+
return true;
|
|
7090
|
+
} catch (err) {
|
|
7091
|
+
ibiz.notification.error({
|
|
7092
|
+
title: "\u767B\u51FA\u5931\u8D25",
|
|
7093
|
+
desc: err.message || ""
|
|
7094
|
+
});
|
|
7095
|
+
}
|
|
7096
|
+
return false;
|
|
7065
7097
|
}
|
|
7066
7098
|
};
|
|
7067
7099
|
|
|
@@ -7082,6 +7114,27 @@ var TreeNodeData = class {
|
|
|
7082
7114
|
}
|
|
7083
7115
|
this.nodeId = model.id;
|
|
7084
7116
|
}
|
|
7117
|
+
/**
|
|
7118
|
+
* 计算节点图标
|
|
7119
|
+
* @author lxm
|
|
7120
|
+
* @date 2023-08-15 02:24:55
|
|
7121
|
+
* @protected
|
|
7122
|
+
* @param {IDETreeNode} model
|
|
7123
|
+
* @return {*} {(IIcon | undefined)}
|
|
7124
|
+
*/
|
|
7125
|
+
calcIcon(model) {
|
|
7126
|
+
const { sysImage } = model;
|
|
7127
|
+
const icon = {};
|
|
7128
|
+
if (sysImage) {
|
|
7129
|
+
if (sysImage.cssClass) {
|
|
7130
|
+
icon.cssClass = sysImage.cssClass;
|
|
7131
|
+
}
|
|
7132
|
+
if (sysImage.imagePath) {
|
|
7133
|
+
icon.imagePath = sysImage.imagePath;
|
|
7134
|
+
}
|
|
7135
|
+
}
|
|
7136
|
+
return Object.values(icon).length > 0 ? icon : void 0;
|
|
7137
|
+
}
|
|
7085
7138
|
};
|
|
7086
7139
|
|
|
7087
7140
|
// src/service/vo/tree-node-data/tree-code-list-node-data.ts
|
|
@@ -7102,6 +7155,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
7102
7155
|
}
|
|
7103
7156
|
this.srfkey = this.value;
|
|
7104
7157
|
this.srfmajortext = this.text;
|
|
7158
|
+
this.icon = this.calcIcon(model);
|
|
7105
7159
|
}
|
|
7106
7160
|
};
|
|
7107
7161
|
|
|
@@ -7123,6 +7177,56 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
7123
7177
|
}
|
|
7124
7178
|
this.srfkey = this.deData.srfkey;
|
|
7125
7179
|
this.srfmajortext = this.deData.srfmajortext;
|
|
7180
|
+
this.icon = this.calcIcon(model);
|
|
7181
|
+
this.textHtml = this.calcTextHtml(model);
|
|
7182
|
+
}
|
|
7183
|
+
calcIcon(model) {
|
|
7184
|
+
const icon = super.calcIcon(model) || {};
|
|
7185
|
+
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
7186
|
+
if (iconAppDEFieldId && this.deData[iconAppDEFieldId]) {
|
|
7187
|
+
icon.imagePath = this.deData[iconAppDEFieldId];
|
|
7188
|
+
}
|
|
7189
|
+
if (icon) {
|
|
7190
|
+
this.icon = icon;
|
|
7191
|
+
}
|
|
7192
|
+
const iconDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "icon");
|
|
7193
|
+
if (iconDataItem) {
|
|
7194
|
+
icon.htmlStr = this.calcDataItemScript(iconDataItem);
|
|
7195
|
+
}
|
|
7196
|
+
return Object.values(icon).length > 0 ? icon : void 0;
|
|
7197
|
+
}
|
|
7198
|
+
/**
|
|
7199
|
+
* 计算节点数据项的自定义脚本内容
|
|
7200
|
+
* @author lxm
|
|
7201
|
+
* @date 2023-08-15 02:37:29
|
|
7202
|
+
* @protected
|
|
7203
|
+
* @param {IDETreeNodeDataItem} dataItem
|
|
7204
|
+
* @return {*} {(string | undefined)}
|
|
7205
|
+
*/
|
|
7206
|
+
calcDataItemScript(dataItem) {
|
|
7207
|
+
if (dataItem.customCode && dataItem.scriptCode) {
|
|
7208
|
+
return ScriptFactory.execScriptFn(
|
|
7209
|
+
{ data: this.deData },
|
|
7210
|
+
dataItem.scriptCode
|
|
7211
|
+
);
|
|
7212
|
+
}
|
|
7213
|
+
}
|
|
7214
|
+
/**
|
|
7215
|
+
* 计算节点文本html内容
|
|
7216
|
+
* @author lxm
|
|
7217
|
+
* @date 2023-08-15 02:41:31
|
|
7218
|
+
* @protected
|
|
7219
|
+
* @param {IDETreeDataSetNode} model
|
|
7220
|
+
* @return {*} {(string | undefined)}
|
|
7221
|
+
*/
|
|
7222
|
+
calcTextHtml(model) {
|
|
7223
|
+
let html;
|
|
7224
|
+
const { detreeNodeDataItems } = model;
|
|
7225
|
+
const textDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "text");
|
|
7226
|
+
if (textDataItem) {
|
|
7227
|
+
html = this.calcDataItemScript(textDataItem);
|
|
7228
|
+
}
|
|
7229
|
+
return html;
|
|
7126
7230
|
}
|
|
7127
7231
|
};
|
|
7128
7232
|
|
|
@@ -7148,6 +7252,7 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
7148
7252
|
}
|
|
7149
7253
|
this.srfkey = ((_a = this.deData) == null ? void 0 : _a.srfkey) || this.value;
|
|
7150
7254
|
this.srfmajortext = ((_b = this.deData) == null ? void 0 : _b.srfmajortext) || this.text;
|
|
7255
|
+
this.icon = this.calcIcon(model);
|
|
7151
7256
|
}
|
|
7152
7257
|
};
|
|
7153
7258
|
|
|
@@ -8198,11 +8303,11 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8198
8303
|
return null;
|
|
8199
8304
|
}
|
|
8200
8305
|
if (key === "Edit" /* EDIT */ || key === "View" /* VIEW */) {
|
|
8201
|
-
this.openData(args);
|
|
8306
|
+
await this.openData(args);
|
|
8202
8307
|
return null;
|
|
8203
8308
|
}
|
|
8204
8309
|
if (key === "New" /* NEW */) {
|
|
8205
|
-
this.newData(args);
|
|
8310
|
+
await this.newData(args);
|
|
8206
8311
|
return null;
|
|
8207
8312
|
}
|
|
8208
8313
|
if (key === "Remove" /* REMOVE */) {
|
|
@@ -8332,9 +8437,18 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
8332
8437
|
const params = {};
|
|
8333
8438
|
if (this.searchForm) {
|
|
8334
8439
|
const addParams = this.searchForm.getData()[0];
|
|
8335
|
-
Object.
|
|
8440
|
+
const filteredParams = Object.entries(addParams).reduce(
|
|
8441
|
+
(result, [key, value]) => {
|
|
8442
|
+
if (value !== null && value !== void 0 && value !== "") {
|
|
8443
|
+
result[key] = value;
|
|
8444
|
+
}
|
|
8445
|
+
return result;
|
|
8446
|
+
},
|
|
8447
|
+
{}
|
|
8448
|
+
);
|
|
8449
|
+
Object.assign(params, filteredParams);
|
|
8336
8450
|
}
|
|
8337
|
-
if (this.searchBar) {
|
|
8451
|
+
if (this.searchBar && this.searchBar.state.query) {
|
|
8338
8452
|
const addParams = {
|
|
8339
8453
|
query: this.searchBar.state.query
|
|
8340
8454
|
};
|
|
@@ -8456,7 +8570,7 @@ function getProvider2(key) {
|
|
|
8456
8570
|
}
|
|
8457
8571
|
async function getEditorProvider(model) {
|
|
8458
8572
|
let provider;
|
|
8459
|
-
const { editorType, editorStyle } = model;
|
|
8573
|
+
const { editorType, editorStyle, predefinedType } = model;
|
|
8460
8574
|
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
8461
8575
|
const key = "".concat(editorType, "_").concat(editorStyle);
|
|
8462
8576
|
provider = getProvider2(key);
|
|
@@ -8467,6 +8581,19 @@ async function getEditorProvider(model) {
|
|
|
8467
8581
|
);
|
|
8468
8582
|
}
|
|
8469
8583
|
}
|
|
8584
|
+
if (predefinedType) {
|
|
8585
|
+
let key = "".concat(predefinedType, "_").concat(editorType);
|
|
8586
|
+
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
8587
|
+
key += "_".concat(editorStyle);
|
|
8588
|
+
}
|
|
8589
|
+
provider = getProvider2(key);
|
|
8590
|
+
if (!provider) {
|
|
8591
|
+
ibiz.log.error(
|
|
8592
|
+
"\u627E\u4E0D\u5230\u7F16\u8F91\u5668\u7C7B\u578B\uFF1A[".concat(editorType, "]\u7684\u9884\u7F6E\u7C7B\u578B\uFF1A[").concat(predefinedType, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
8593
|
+
model
|
|
8594
|
+
);
|
|
8595
|
+
}
|
|
8596
|
+
}
|
|
8470
8597
|
if (!provider) {
|
|
8471
8598
|
provider = getProvider2(editorType);
|
|
8472
8599
|
}
|
|
@@ -8641,17 +8768,17 @@ async function getPortletProvider(model) {
|
|
|
8641
8768
|
}
|
|
8642
8769
|
|
|
8643
8770
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
8644
|
-
import { RuntimeModelError as
|
|
8771
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
8645
8772
|
import { isArray as isArray2 } from "qx-util";
|
|
8646
8773
|
|
|
8647
8774
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
8648
|
-
import { RuntimeModelError as
|
|
8775
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
8649
8776
|
|
|
8650
8777
|
// src/ui-logic/index.ts
|
|
8651
|
-
import { RuntimeError as
|
|
8778
|
+
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
8652
8779
|
|
|
8653
8780
|
// src/ui-logic/ui-logic.ts
|
|
8654
|
-
import { ModelError as ModelError22, RuntimeModelError as
|
|
8781
|
+
import { ModelError as ModelError22, RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
8655
8782
|
|
|
8656
8783
|
// src/ui-logic/ui-logic-context.ts
|
|
8657
8784
|
var UILogicContext = class {
|
|
@@ -9087,10 +9214,8 @@ import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
|
9087
9214
|
import { ModelError as ModelError19 } from "@ibiz-template/core";
|
|
9088
9215
|
import { clone as clone11 } from "ramda";
|
|
9089
9216
|
function handleSrcVal2(ctx, srcValParams) {
|
|
9090
|
-
const { srcDEUILogicParamId,
|
|
9091
|
-
|
|
9092
|
-
srcValParams.srcValueType = "SRCDLPARAM";
|
|
9093
|
-
}
|
|
9217
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
9218
|
+
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
9094
9219
|
let value;
|
|
9095
9220
|
switch (srcValueType) {
|
|
9096
9221
|
case "SRCDLPARAM":
|
|
@@ -9192,8 +9317,24 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
9192
9317
|
}
|
|
9193
9318
|
};
|
|
9194
9319
|
|
|
9320
|
+
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
9321
|
+
import { RuntimeModelError as RuntimeModelError26 } from "@ibiz-template/core";
|
|
9322
|
+
var BindParamNode2 = class extends UILogicNode {
|
|
9323
|
+
async exec(ctx) {
|
|
9324
|
+
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
9325
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
9326
|
+
throw new RuntimeModelError26(
|
|
9327
|
+
this.model,
|
|
9328
|
+
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
9329
|
+
);
|
|
9330
|
+
}
|
|
9331
|
+
const srcVal = handleSrcVal2(ctx, this.model);
|
|
9332
|
+
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
9333
|
+
}
|
|
9334
|
+
};
|
|
9335
|
+
|
|
9195
9336
|
// src/ui-logic/ui-logic-param/ui-logic-param.ts
|
|
9196
|
-
import { ModelError as ModelError21,
|
|
9337
|
+
import { ModelError as ModelError21, RuntimeModelError as RuntimeModelError27 } from "@ibiz-template/core";
|
|
9197
9338
|
var UILogicParam = class {
|
|
9198
9339
|
/**
|
|
9199
9340
|
* Creates an instance of UILogicParam.
|
|
@@ -9228,7 +9369,10 @@ var UILogicParam = class {
|
|
|
9228
9369
|
if (control) {
|
|
9229
9370
|
ctx.params[tag] = control;
|
|
9230
9371
|
} else {
|
|
9231
|
-
throw new
|
|
9372
|
+
throw new RuntimeModelError27(
|
|
9373
|
+
this.model,
|
|
9374
|
+
"\u89C6\u56FE\u903B\u8F91\u521D\u59CB\u5316\u53C2\u6570\uFF0C\u672A\u627E\u5230".concat(m.codeName, "\u6307\u5B9A\u90E8\u4EF6\u5BF9\u8C61")
|
|
9375
|
+
);
|
|
9232
9376
|
}
|
|
9233
9377
|
} else if (m.activeViewParam) {
|
|
9234
9378
|
ctx.params[tag] = parameters.view;
|
|
@@ -9309,7 +9453,7 @@ var UILogic = class {
|
|
|
9309
9453
|
this.params = /* @__PURE__ */ new Map();
|
|
9310
9454
|
var _a;
|
|
9311
9455
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
9312
|
-
throw new
|
|
9456
|
+
throw new RuntimeModelError28(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
9313
9457
|
}
|
|
9314
9458
|
model.deuilogicNodes.forEach((node) => {
|
|
9315
9459
|
const { logicNodeType } = node;
|
|
@@ -9330,12 +9474,14 @@ var UILogic = class {
|
|
|
9330
9474
|
case "PREPAREJSPARAM":
|
|
9331
9475
|
logicNode = new PrepareJSParamNode(node);
|
|
9332
9476
|
break;
|
|
9333
|
-
case "RESETPARAM":
|
|
9334
|
-
case "COPYPARAM":
|
|
9335
9477
|
case "BINDPARAM":
|
|
9478
|
+
logicNode = new BindParamNode2(node);
|
|
9479
|
+
break;
|
|
9336
9480
|
case "VIEWCTRLINVOKE":
|
|
9337
9481
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
9338
9482
|
break;
|
|
9483
|
+
case "RESETPARAM":
|
|
9484
|
+
case "COPYPARAM":
|
|
9339
9485
|
case "VIEWCTRLFIREEVENT":
|
|
9340
9486
|
case "APPENDPARAM":
|
|
9341
9487
|
case "SORTPARAM":
|
|
@@ -9400,7 +9546,7 @@ var UILogic = class {
|
|
|
9400
9546
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
9401
9547
|
await this.deepExec(start, ctx);
|
|
9402
9548
|
} else {
|
|
9403
|
-
throw new
|
|
9549
|
+
throw new RuntimeModelError28(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
9404
9550
|
}
|
|
9405
9551
|
if (ctx.isEndNode) {
|
|
9406
9552
|
return ctx.result;
|
|
@@ -9446,7 +9592,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9446
9592
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
9447
9593
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
9448
9594
|
if (!deUILogic) {
|
|
9449
|
-
throw new
|
|
9595
|
+
throw new RuntimeError20(
|
|
9450
9596
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
9451
9597
|
);
|
|
9452
9598
|
}
|
|
@@ -9459,7 +9605,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
9459
9605
|
}
|
|
9460
9606
|
|
|
9461
9607
|
// src/ui-action/uiaction-util.ts
|
|
9462
|
-
import { RuntimeError as
|
|
9608
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9463
9609
|
var UIActionUtil = class {
|
|
9464
9610
|
/**
|
|
9465
9611
|
* 执行界面行为
|
|
@@ -9474,7 +9620,7 @@ var UIActionUtil = class {
|
|
|
9474
9620
|
static async exec(actionId, params) {
|
|
9475
9621
|
const action = await getUIActionById(actionId);
|
|
9476
9622
|
if (!action) {
|
|
9477
|
-
throw new
|
|
9623
|
+
throw new RuntimeError21("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
9478
9624
|
}
|
|
9479
9625
|
const provider = await getUIActionProvider(action);
|
|
9480
9626
|
return provider.exec(action, params);
|
|
@@ -9516,7 +9662,7 @@ var UIActionProviderBase = class {
|
|
|
9516
9662
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
9517
9663
|
if (uilogicAttachMode === "REPLACE") {
|
|
9518
9664
|
if (!appDEUILogicId) {
|
|
9519
|
-
throw new
|
|
9665
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9520
9666
|
}
|
|
9521
9667
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9522
9668
|
return result;
|
|
@@ -9543,7 +9689,7 @@ var UIActionProviderBase = class {
|
|
|
9543
9689
|
}
|
|
9544
9690
|
if (action.uilogicAttachMode === "AFTER") {
|
|
9545
9691
|
if (!appDEUILogicId) {
|
|
9546
|
-
throw new
|
|
9692
|
+
throw new RuntimeModelError29(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9547
9693
|
}
|
|
9548
9694
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
9549
9695
|
}
|
|
@@ -9677,7 +9823,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
9677
9823
|
const entityName = action.appDataEntityId;
|
|
9678
9824
|
const methodName = action.appDEMethodId;
|
|
9679
9825
|
if (!entityName || !methodName) {
|
|
9680
|
-
throw new
|
|
9826
|
+
throw new RuntimeModelError30(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
9681
9827
|
}
|
|
9682
9828
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
9683
9829
|
action,
|
|
@@ -9749,7 +9895,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
9749
9895
|
};
|
|
9750
9896
|
|
|
9751
9897
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
9752
|
-
import { StringUtil, RuntimeModelError as
|
|
9898
|
+
import { StringUtil, RuntimeModelError as RuntimeModelError31, ModelError as ModelError23 } from "@ibiz-template/core";
|
|
9753
9899
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
9754
9900
|
async execAction(action, args) {
|
|
9755
9901
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -9764,7 +9910,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9764
9910
|
case "WIZARD": {
|
|
9765
9911
|
const frontPSAppView = action.frontAppViewId;
|
|
9766
9912
|
if (!frontPSAppView) {
|
|
9767
|
-
throw new
|
|
9913
|
+
throw new RuntimeModelError31(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
9768
9914
|
}
|
|
9769
9915
|
const { resultContext, resultParams } = await this.handleParams(
|
|
9770
9916
|
action,
|
|
@@ -9820,7 +9966,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
9820
9966
|
);
|
|
9821
9967
|
return result || {};
|
|
9822
9968
|
}
|
|
9823
|
-
throw new
|
|
9969
|
+
throw new RuntimeModelError31(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
9824
9970
|
}
|
|
9825
9971
|
};
|
|
9826
9972
|
|
|
@@ -9860,7 +10006,7 @@ function presetUIActionProvider() {
|
|
|
9860
10006
|
}
|
|
9861
10007
|
|
|
9862
10008
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
9863
|
-
import { RuntimeError as
|
|
10009
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
9864
10010
|
var LogicExecutor = class {
|
|
9865
10011
|
/**
|
|
9866
10012
|
* @author lxm
|
|
@@ -9881,7 +10027,7 @@ var LogicExecutor = class {
|
|
|
9881
10027
|
*/
|
|
9882
10028
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9883
10029
|
execute(_executeParams) {
|
|
9884
|
-
throw new
|
|
10030
|
+
throw new RuntimeError22("Method not implemented.");
|
|
9885
10031
|
}
|
|
9886
10032
|
/**
|
|
9887
10033
|
* 销毁方法
|
|
@@ -9930,7 +10076,7 @@ var LogicExecutorFactory = class {
|
|
|
9930
10076
|
};
|
|
9931
10077
|
|
|
9932
10078
|
// src/logic-scheduler/executor/script-executor.ts
|
|
9933
|
-
import { RuntimeError as
|
|
10079
|
+
import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
9934
10080
|
var ScriptExecutor = class extends LogicExecutor {
|
|
9935
10081
|
constructor() {
|
|
9936
10082
|
super(...arguments);
|
|
@@ -9950,7 +10096,7 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9950
10096
|
* @return {*} {IData[]}
|
|
9951
10097
|
*/
|
|
9952
10098
|
convertScriptArgs(_executeParams) {
|
|
9953
|
-
throw new
|
|
10099
|
+
throw new RuntimeError23("\u672A\u8BBE\u7F6E\u811A\u672C\u6267\u884C\u53C2\u6570\u8F6C\u6362\u65B9\u6CD5");
|
|
9954
10100
|
}
|
|
9955
10101
|
/**
|
|
9956
10102
|
* 初始化脚本执行器
|
|
@@ -9977,13 +10123,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
9977
10123
|
};
|
|
9978
10124
|
|
|
9979
10125
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
9980
|
-
import { RuntimeModelError as
|
|
10126
|
+
import { RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
9981
10127
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
9982
10128
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9983
10129
|
execute(executeParams) {
|
|
9984
10130
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
9985
10131
|
if (!appDEUILogicId) {
|
|
9986
|
-
throw new
|
|
10132
|
+
throw new RuntimeModelError32(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
9987
10133
|
}
|
|
9988
10134
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
9989
10135
|
}
|
|
@@ -9995,6 +10141,20 @@ var LogicScheduler = class {
|
|
|
9995
10141
|
constructor(logics) {
|
|
9996
10142
|
this.triggers = /* @__PURE__ */ new Map();
|
|
9997
10143
|
this.executors = /* @__PURE__ */ new Map();
|
|
10144
|
+
/**
|
|
10145
|
+
* 是否有视图事件触发类型逻辑
|
|
10146
|
+
* @author lxm
|
|
10147
|
+
* @date 2023-08-14 02:19:51
|
|
10148
|
+
* @type {boolean}
|
|
10149
|
+
*/
|
|
10150
|
+
this.hasViewEventTrigger = false;
|
|
10151
|
+
/**
|
|
10152
|
+
* 是否有部件事件触发类型逻辑
|
|
10153
|
+
* @author lxm
|
|
10154
|
+
* @date 2023-08-14 02:19:51
|
|
10155
|
+
* @type {boolean}
|
|
10156
|
+
*/
|
|
10157
|
+
this.hasControlEventTrigger = false;
|
|
9998
10158
|
this.logics = logics;
|
|
9999
10159
|
logics.forEach((logic) => {
|
|
10000
10160
|
try {
|
|
@@ -10040,6 +10200,15 @@ var LogicScheduler = class {
|
|
|
10040
10200
|
* @return {*} {LogicTrigger}
|
|
10041
10201
|
*/
|
|
10042
10202
|
createTrigger(logic) {
|
|
10203
|
+
switch (logic.triggerType) {
|
|
10204
|
+
case "VIEWEVENT":
|
|
10205
|
+
this.hasViewEventTrigger = true;
|
|
10206
|
+
break;
|
|
10207
|
+
case "CTRLEVENT":
|
|
10208
|
+
this.hasControlEventTrigger = true;
|
|
10209
|
+
break;
|
|
10210
|
+
default:
|
|
10211
|
+
}
|
|
10043
10212
|
return ibiz.scheduler.triggerFactory.createTrigger(logic, this);
|
|
10044
10213
|
}
|
|
10045
10214
|
/**
|
|
@@ -10164,6 +10333,22 @@ var LogicScheduler = class {
|
|
|
10164
10333
|
const params = this.getExecuteParams(executeParams);
|
|
10165
10334
|
return trigger.execute(params);
|
|
10166
10335
|
}
|
|
10336
|
+
/**
|
|
10337
|
+
* 触发部件事件
|
|
10338
|
+
* @author lxm
|
|
10339
|
+
* @date 2023-06-26 02:26:33
|
|
10340
|
+
* @param {string} itemName 子项名称
|
|
10341
|
+
* @param {Partial<IUILogicParams>} executeParams 执行参数
|
|
10342
|
+
* @return {*} {(boolean | undefined)}
|
|
10343
|
+
*/
|
|
10344
|
+
triggerControlEvent(ctrlName, event) {
|
|
10345
|
+
const matchParams = {
|
|
10346
|
+
ctrlName,
|
|
10347
|
+
eventName: event.eventName,
|
|
10348
|
+
triggerType: "CTRLEVENT"
|
|
10349
|
+
};
|
|
10350
|
+
this.triggerAndExecute(matchParams, event);
|
|
10351
|
+
}
|
|
10167
10352
|
};
|
|
10168
10353
|
|
|
10169
10354
|
// src/logic-scheduler/scheduler/control-logic-scheduler.ts
|
|
@@ -10279,7 +10464,7 @@ var LogicSchedulerCenter = class {
|
|
|
10279
10464
|
};
|
|
10280
10465
|
|
|
10281
10466
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
10282
|
-
import { RuntimeError as
|
|
10467
|
+
import { RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
10283
10468
|
var LogicTrigger = class {
|
|
10284
10469
|
/**
|
|
10285
10470
|
* @author lxm
|
|
@@ -10322,7 +10507,7 @@ var LogicTrigger = class {
|
|
|
10322
10507
|
if (this.executor) {
|
|
10323
10508
|
return this.executor.execute(executeParams);
|
|
10324
10509
|
}
|
|
10325
|
-
throw new
|
|
10510
|
+
throw new RuntimeError24("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
10326
10511
|
}
|
|
10327
10512
|
/**
|
|
10328
10513
|
* 销毁方法
|
|
@@ -10339,12 +10524,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
10339
10524
|
};
|
|
10340
10525
|
|
|
10341
10526
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
10342
|
-
import { RuntimeError as
|
|
10527
|
+
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
10343
10528
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
10344
10529
|
bindExecutor(executor) {
|
|
10345
10530
|
super.bindExecutor(executor);
|
|
10346
10531
|
if (this.executor.type !== "SCRIPT") {
|
|
10347
|
-
throw new
|
|
10532
|
+
throw new RuntimeError25(
|
|
10348
10533
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
10349
10534
|
);
|
|
10350
10535
|
}
|
|
@@ -10371,12 +10556,12 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
10371
10556
|
if (typeof result === "boolean") {
|
|
10372
10557
|
return result;
|
|
10373
10558
|
}
|
|
10374
|
-
throw new
|
|
10559
|
+
throw new RuntimeError25("".concat(this.logic.id, "\u903B\u8F91\u8FD4\u56DE\u503C\u4E0D\u662F\u5E03\u5C14\u503C"));
|
|
10375
10560
|
}
|
|
10376
10561
|
};
|
|
10377
10562
|
|
|
10378
10563
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
10379
|
-
import { RuntimeError as
|
|
10564
|
+
import { RuntimeError as RuntimeError26 } from "@ibiz-template/core";
|
|
10380
10565
|
var TimerTrigger = class extends LogicTrigger {
|
|
10381
10566
|
constructor() {
|
|
10382
10567
|
super(...arguments);
|
|
@@ -10385,7 +10570,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10385
10570
|
start() {
|
|
10386
10571
|
this.timer = setInterval(() => {
|
|
10387
10572
|
if (!this.scheduler.defaultParamsCb) {
|
|
10388
|
-
throw new
|
|
10573
|
+
throw new RuntimeError26("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
10389
10574
|
}
|
|
10390
10575
|
const params = this.scheduler.defaultParamsCb();
|
|
10391
10576
|
this.executor.execute(params);
|
|
@@ -10402,8 +10587,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
10402
10587
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
10403
10588
|
import {
|
|
10404
10589
|
ModelError as ModelError26,
|
|
10405
|
-
RuntimeError as
|
|
10406
|
-
RuntimeModelError as
|
|
10590
|
+
RuntimeError as RuntimeError27,
|
|
10591
|
+
RuntimeModelError as RuntimeModelError33
|
|
10407
10592
|
} from "@ibiz-template/core";
|
|
10408
10593
|
import { notNilEmpty as notNilEmpty5 } from "qx-util";
|
|
10409
10594
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -10438,18 +10623,18 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10438
10623
|
const { context, params, ...rest } = parameters;
|
|
10439
10624
|
const { data } = parameters;
|
|
10440
10625
|
if (!(data == null ? void 0 : data[0])) {
|
|
10441
|
-
throw new
|
|
10626
|
+
throw new RuntimeError27("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
10442
10627
|
}
|
|
10443
10628
|
const openViewRef = appUILogic.openDataAppView;
|
|
10444
10629
|
if (!openViewRef) {
|
|
10445
|
-
throw new
|
|
10630
|
+
throw new RuntimeModelError33(
|
|
10446
10631
|
appUILogic,
|
|
10447
10632
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
10448
10633
|
);
|
|
10449
10634
|
}
|
|
10450
10635
|
const openView = openViewRef.refAppViewId;
|
|
10451
10636
|
if (!openView) {
|
|
10452
|
-
throw new
|
|
10637
|
+
throw new RuntimeModelError33(
|
|
10453
10638
|
appUILogic,
|
|
10454
10639
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
10455
10640
|
);
|
|
@@ -10501,7 +10686,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10501
10686
|
} else {
|
|
10502
10687
|
newViewRef = newDataAppView;
|
|
10503
10688
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
10504
|
-
throw new
|
|
10689
|
+
throw new RuntimeModelError33(
|
|
10505
10690
|
appUILogic,
|
|
10506
10691
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
10507
10692
|
);
|
|
@@ -10547,7 +10732,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10547
10732
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
10548
10733
|
const { context, params, ...rest } = parameters;
|
|
10549
10734
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
10550
|
-
throw new
|
|
10735
|
+
throw new RuntimeModelError33(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
10551
10736
|
}
|
|
10552
10737
|
const result = await ibiz.commands.execute(
|
|
10553
10738
|
OpenAppViewCommand.TAG,
|
|
@@ -10561,12 +10746,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
10561
10746
|
}
|
|
10562
10747
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
10563
10748
|
if (!selectData) {
|
|
10564
|
-
throw new
|
|
10749
|
+
throw new RuntimeError27("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
10565
10750
|
}
|
|
10566
10751
|
const indexType = selectData.srfkey;
|
|
10567
10752
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
10568
10753
|
if (!findView) {
|
|
10569
|
-
throw new
|
|
10754
|
+
throw new RuntimeError27(
|
|
10570
10755
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
10571
10756
|
);
|
|
10572
10757
|
}
|
|
@@ -10599,6 +10784,31 @@ var ViewEventTrigger = class extends LogicTrigger {
|
|
|
10599
10784
|
}
|
|
10600
10785
|
};
|
|
10601
10786
|
|
|
10787
|
+
// src/logic-scheduler/trigger/control-event-trigger.ts
|
|
10788
|
+
var ControlEventTrigger = class extends LogicTrigger {
|
|
10789
|
+
constructor(logic, scheduler) {
|
|
10790
|
+
super(logic, scheduler);
|
|
10791
|
+
this.logic = logic;
|
|
10792
|
+
this.scheduler = scheduler;
|
|
10793
|
+
/**
|
|
10794
|
+
* 监听事件名称集合
|
|
10795
|
+
* @author lxm
|
|
10796
|
+
* @date 2023-07-26 05:48:30
|
|
10797
|
+
* @protected
|
|
10798
|
+
* @type {string[]}
|
|
10799
|
+
*/
|
|
10800
|
+
this.listenEventNames = [];
|
|
10801
|
+
const names = logic.eventNames.split(",");
|
|
10802
|
+
this.listenEventNames = names.map(
|
|
10803
|
+
(name) => StudioControlEvents[name] || name
|
|
10804
|
+
);
|
|
10805
|
+
}
|
|
10806
|
+
match(matchParams) {
|
|
10807
|
+
const superResult = super.match(matchParams);
|
|
10808
|
+
return superResult && matchParams.ctrlName === this.logic.ctrlName && this.listenEventNames.includes(matchParams.eventName);
|
|
10809
|
+
}
|
|
10810
|
+
};
|
|
10811
|
+
|
|
10602
10812
|
// src/logic-scheduler/index.ts
|
|
10603
10813
|
function installLogicSchedule() {
|
|
10604
10814
|
ibiz.scheduler = new LogicSchedulerCenter();
|
|
@@ -10626,6 +10836,10 @@ function installLogicSchedule() {
|
|
|
10626
10836
|
"VIEWEVENT",
|
|
10627
10837
|
(logic, scheduler) => new ViewEventTrigger(logic, scheduler)
|
|
10628
10838
|
);
|
|
10839
|
+
ibiz.scheduler.triggerFactory.register(
|
|
10840
|
+
"CTRLEVENT",
|
|
10841
|
+
(logic, scheduler) => new ControlEventTrigger(logic, scheduler)
|
|
10842
|
+
);
|
|
10629
10843
|
ibiz.scheduler.executorFactory.register(
|
|
10630
10844
|
"SCRIPT",
|
|
10631
10845
|
(logic, scheduler) => new ScriptExecutor(logic, scheduler)
|
|
@@ -10651,7 +10865,7 @@ function install() {
|
|
|
10651
10865
|
ibiz2.hub = new AppHub();
|
|
10652
10866
|
ibiz2.register = new RegisterCenter();
|
|
10653
10867
|
ibiz2.config = new GlobalConfig();
|
|
10654
|
-
ibiz2.auth = new
|
|
10868
|
+
ibiz2.auth = new V7AuthService();
|
|
10655
10869
|
ibiz2.engine = new EngineFactory();
|
|
10656
10870
|
installCommand();
|
|
10657
10871
|
presetUIActionProvider();
|
|
@@ -10770,13 +10984,13 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10770
10984
|
|
|
10771
10985
|
// src/controller/common/view/view.controller.ts
|
|
10772
10986
|
import { createUUID as createUUID2, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10773
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
10987
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
10774
10988
|
|
|
10775
10989
|
// src/controller/utils/loading/loading.state.ts
|
|
10776
10990
|
import { NOOP } from "@ibiz-template/core";
|
|
10777
10991
|
|
|
10778
10992
|
// src/controller/utils/counter/counter.ts
|
|
10779
|
-
import { RuntimeError as
|
|
10993
|
+
import { RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
10780
10994
|
var Counter = class {
|
|
10781
10995
|
/**
|
|
10782
10996
|
* Creates an instance of Counter.
|
|
@@ -10838,7 +11052,7 @@ var Counter = class {
|
|
|
10838
11052
|
return;
|
|
10839
11053
|
}
|
|
10840
11054
|
if (this.count === 0) {
|
|
10841
|
-
throw new
|
|
11055
|
+
throw new RuntimeError28("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
10842
11056
|
}
|
|
10843
11057
|
this.count -= 1;
|
|
10844
11058
|
if (this.count === 0) {
|
|
@@ -10930,7 +11144,7 @@ var CTX = class {
|
|
|
10930
11144
|
* @date 2023-04-26 07:54:46
|
|
10931
11145
|
* @protected
|
|
10932
11146
|
*/
|
|
10933
|
-
this.evt = new QXEvent2();
|
|
11147
|
+
this.evt = new QXEvent2(3e3);
|
|
10934
11148
|
/**
|
|
10935
11149
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
10936
11150
|
* @author lxm
|
|
@@ -11352,8 +11566,8 @@ function getOriginData(data) {
|
|
|
11352
11566
|
}
|
|
11353
11567
|
|
|
11354
11568
|
// src/controller/utils/value-rule/value-rule.ts
|
|
11355
|
-
import { RuntimeError as
|
|
11356
|
-
import { isNilOrEmpty as
|
|
11569
|
+
import { RuntimeError as RuntimeError29 } from "@ibiz-template/core";
|
|
11570
|
+
import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
11357
11571
|
function generateRules(itemVRs, name, valueItemName) {
|
|
11358
11572
|
const rules = [];
|
|
11359
11573
|
itemVRs.forEach((item) => {
|
|
@@ -11391,7 +11605,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11391
11605
|
const valueName = valueItemName || name;
|
|
11392
11606
|
rules.push({
|
|
11393
11607
|
validator: (rule, value, callback, source) => {
|
|
11394
|
-
if (
|
|
11608
|
+
if (isNilOrEmpty5(source[valueName])) {
|
|
11395
11609
|
return true;
|
|
11396
11610
|
}
|
|
11397
11611
|
const { isPast, infoMessage } = verifyDeRules(
|
|
@@ -11400,7 +11614,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
11400
11614
|
deRule.groupCond
|
|
11401
11615
|
);
|
|
11402
11616
|
if (!isPast) {
|
|
11403
|
-
callback(new
|
|
11617
|
+
callback(new RuntimeError29(infoMessage || deRule.ruleInfo));
|
|
11404
11618
|
}
|
|
11405
11619
|
return true;
|
|
11406
11620
|
},
|
|
@@ -11571,7 +11785,7 @@ var BaseController = class {
|
|
|
11571
11785
|
async destroyed() {
|
|
11572
11786
|
await this.onDestroyed();
|
|
11573
11787
|
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onDestroyed"));
|
|
11574
|
-
this._evt.emit("onDestroyed", void 0);
|
|
11788
|
+
await this._evt.emit("onDestroyed", void 0);
|
|
11575
11789
|
this.evt.destroy();
|
|
11576
11790
|
}
|
|
11577
11791
|
/**
|
|
@@ -11780,9 +11994,11 @@ var ViewController = class extends BaseController {
|
|
|
11780
11994
|
this.scheduler.defaultParamsCb = () => {
|
|
11781
11995
|
return this.getEventArgs();
|
|
11782
11996
|
};
|
|
11783
|
-
this.
|
|
11784
|
-
this.
|
|
11785
|
-
|
|
11997
|
+
if (this.scheduler.hasViewEventTrigger) {
|
|
11998
|
+
this.evt.onAll((_eventName, event) => {
|
|
11999
|
+
this.scheduler.triggerViewEvent(event);
|
|
12000
|
+
});
|
|
12001
|
+
}
|
|
11786
12002
|
}
|
|
11787
12003
|
if (this.engines.length) {
|
|
11788
12004
|
await Promise.all(this.engines.map((engine) => engine.onCreated()));
|
|
@@ -11850,7 +12066,7 @@ var ViewController = class extends BaseController {
|
|
|
11850
12066
|
async callUIAction(key, args) {
|
|
11851
12067
|
const result = this.call(key, args);
|
|
11852
12068
|
if (result === void 0) {
|
|
11853
|
-
throw new
|
|
12069
|
+
throw new RuntimeError30("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
11854
12070
|
}
|
|
11855
12071
|
return result;
|
|
11856
12072
|
}
|
|
@@ -11872,6 +12088,7 @@ var ViewController = class extends BaseController {
|
|
|
11872
12088
|
* @param {IViewLayoutPanelController} panel
|
|
11873
12089
|
*/
|
|
11874
12090
|
setLayoutPanel(panel) {
|
|
12091
|
+
var _a;
|
|
11875
12092
|
this.layoutPanel = panel;
|
|
11876
12093
|
if (this.layoutPanel.state.isMounted) {
|
|
11877
12094
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
@@ -11880,6 +12097,14 @@ var ViewController = class extends BaseController {
|
|
|
11880
12097
|
this.mountCounter.attend(this.layoutPanel.model.name);
|
|
11881
12098
|
});
|
|
11882
12099
|
}
|
|
12100
|
+
if ((_a = this.scheduler) == null ? void 0 : _a.hasControlEventTrigger) {
|
|
12101
|
+
panel.evt.on("onControlEvent", (event) => {
|
|
12102
|
+
this.scheduler.triggerControlEvent(
|
|
12103
|
+
event.triggerControlName,
|
|
12104
|
+
event.triggerEvent
|
|
12105
|
+
);
|
|
12106
|
+
});
|
|
12107
|
+
}
|
|
11883
12108
|
}
|
|
11884
12109
|
};
|
|
11885
12110
|
|
|
@@ -11995,7 +12220,7 @@ var EditorController = class {
|
|
|
11995
12220
|
};
|
|
11996
12221
|
|
|
11997
12222
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
11998
|
-
import { RuntimeModelError as
|
|
12223
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
11999
12224
|
var CodeListEditorController = class extends EditorController {
|
|
12000
12225
|
/**
|
|
12001
12226
|
* 加载代码表数据
|
|
@@ -12019,7 +12244,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12019
12244
|
);
|
|
12020
12245
|
return dataItems;
|
|
12021
12246
|
}
|
|
12022
|
-
throw new
|
|
12247
|
+
throw new RuntimeModelError34(this.model, "\u8BF7\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
12023
12248
|
}
|
|
12024
12249
|
};
|
|
12025
12250
|
|
|
@@ -12180,7 +12405,7 @@ var ControlController = class extends BaseController {
|
|
|
12180
12405
|
};
|
|
12181
12406
|
|
|
12182
12407
|
// src/controller/common/control/md-control.controller.ts
|
|
12183
|
-
import { isElementSame, RuntimeError as
|
|
12408
|
+
import { isElementSame, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
12184
12409
|
var MDControlController = class extends ControlController {
|
|
12185
12410
|
get _evt() {
|
|
12186
12411
|
return this.evt;
|
|
@@ -12200,8 +12425,13 @@ var MDControlController = class extends ControlController {
|
|
|
12200
12425
|
this.state.mdctrlActiveMode = 0;
|
|
12201
12426
|
this.state.groups = [];
|
|
12202
12427
|
}
|
|
12428
|
+
async onCreated() {
|
|
12429
|
+
await super.onCreated();
|
|
12430
|
+
this.setSort();
|
|
12431
|
+
}
|
|
12203
12432
|
/**
|
|
12204
12433
|
* 设置排序
|
|
12434
|
+
* 无参数时设置的是默认排序。
|
|
12205
12435
|
*
|
|
12206
12436
|
* @author lxm
|
|
12207
12437
|
* @date 2022-09-28 13:09:44
|
|
@@ -12209,7 +12439,9 @@ var MDControlController = class extends ControlController {
|
|
|
12209
12439
|
* @param {string} order 排序顺序
|
|
12210
12440
|
*/
|
|
12211
12441
|
setSort(key, order) {
|
|
12212
|
-
|
|
12442
|
+
if (key && order) {
|
|
12443
|
+
this.state.sortQuery = "".concat(key, ",").concat(order);
|
|
12444
|
+
}
|
|
12213
12445
|
}
|
|
12214
12446
|
/**
|
|
12215
12447
|
* 获取请求过滤参数(整合了视图参数,各种过滤条件,排序,分页)
|
|
@@ -12306,16 +12538,19 @@ var MDControlController = class extends ControlController {
|
|
|
12306
12538
|
async remove(args) {
|
|
12307
12539
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
12308
12540
|
if (!(data == null ? void 0 : data.length)) {
|
|
12309
|
-
throw new
|
|
12541
|
+
throw new RuntimeError31("\u672A\u9009\u4E2D\u6570\u636E");
|
|
12310
12542
|
}
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12543
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12544
|
+
const del = await ibiz.confirm.error({
|
|
12545
|
+
title: "\u6570\u636E\u5220\u9664",
|
|
12546
|
+
desc: "\u786E\u8BA4\u5220\u9664\u6570\u636E\uFF1F"
|
|
12547
|
+
});
|
|
12548
|
+
if (!del) {
|
|
12549
|
+
return;
|
|
12550
|
+
}
|
|
12317
12551
|
}
|
|
12318
12552
|
await this.startLoading();
|
|
12553
|
+
let needRefresh = false;
|
|
12319
12554
|
try {
|
|
12320
12555
|
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
12321
12556
|
await Promise.allSettled(
|
|
@@ -12324,14 +12559,19 @@ var MDControlController = class extends ControlController {
|
|
|
12324
12559
|
const tempContext = context.clone();
|
|
12325
12560
|
tempContext[deName] = item.srfkey;
|
|
12326
12561
|
await this.service.remove(tempContext, params);
|
|
12562
|
+
needRefresh = true;
|
|
12327
12563
|
}
|
|
12328
12564
|
this.afterRemove(data);
|
|
12329
12565
|
})
|
|
12330
12566
|
);
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12567
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
12568
|
+
ibiz.notification.success({
|
|
12569
|
+
desc: "\u6570\u636E[".concat(data.map((item) => item.srfmajortext).join("\u3001"), "]\u5220\u9664\u6210\u529F!")
|
|
12570
|
+
});
|
|
12571
|
+
}
|
|
12572
|
+
if (needRefresh) {
|
|
12573
|
+
this.refresh();
|
|
12574
|
+
}
|
|
12335
12575
|
} finally {
|
|
12336
12576
|
await this.endLoading();
|
|
12337
12577
|
}
|
|
@@ -12433,7 +12673,6 @@ export {
|
|
|
12433
12673
|
AppDataEntity,
|
|
12434
12674
|
AppFuncCommand,
|
|
12435
12675
|
Application,
|
|
12436
|
-
AuthService,
|
|
12437
12676
|
AuthorityService,
|
|
12438
12677
|
BackendUIActionProvider,
|
|
12439
12678
|
BaseController,
|
|
@@ -12499,6 +12738,7 @@ export {
|
|
|
12499
12738
|
UIActionButtonState,
|
|
12500
12739
|
UIActionUtil,
|
|
12501
12740
|
UIMapField,
|
|
12741
|
+
V7AuthService,
|
|
12502
12742
|
VIEW_PROVIDER_PREFIX,
|
|
12503
12743
|
ViewController,
|
|
12504
12744
|
ViewEngineBase,
|