@ibiz-template/runtime 0.2.7 → 0.2.9
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 +912 -327
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +21 -22
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +6 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +11 -11
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +22 -16
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +2 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.js +4 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts +20 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +57 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +19 -36
- package/out/controller/control/index.d.ts +1 -0
- package/out/controller/control/index.d.ts.map +1 -1
- package/out/controller/control/index.js +1 -0
- package/out/controller/control/map/index.d.ts +3 -0
- package/out/controller/control/map/index.d.ts.map +1 -0
- package/out/controller/control/map/index.js +2 -0
- package/out/controller/control/map/map.controller.d.ts +45 -0
- package/out/controller/control/map/map.controller.d.ts.map +1 -0
- package/out/controller/control/map/map.controller.js +135 -0
- package/out/controller/control/map/map.service.d.ts +25 -0
- package/out/controller/control/map/map.service.d.ts.map +1 -0
- package/out/controller/control/map/map.service.js +55 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts +3 -3
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +22 -16
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +4 -20
- package/out/controller/utils/data-file-util/data-file-util.d.ts +45 -0
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -0
- package/out/controller/utils/data-file-util/data-file-util.js +121 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/global/global-util/global-util.d.ts +2 -2
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-map.controller.d.ts +15 -0
- package/out/interface/controller/controller/control/i-map.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/index.d.ts +1 -0
- package/out/interface/controller/controller/control/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.js +1 -0
- package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-map.event.d.ts +54 -0
- package/out/interface/controller/event/control/i-map.event.d.ts.map +1 -0
- package/out/interface/controller/event/control/i-map.event.js +1 -0
- package/out/interface/controller/event/control/index.d.ts +1 -0
- package/out/interface/controller/event/control/index.d.ts.map +1 -1
- package/out/interface/controller/event/control/index.js +1 -0
- package/out/interface/controller/state/control/i-map.state.d.ts +132 -0
- package/out/interface/controller/state/control/i-map.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/i-map.state.js +1 -0
- package/out/interface/controller/state/control/index.d.ts +1 -0
- package/out/interface/controller/state/control/index.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.js +1 -0
- package/out/interface/index.d.ts +2 -1
- package/out/interface/index.d.ts.map +1 -1
- package/out/interface/index.js +2 -1
- package/out/interface/provider/i-ui-login-node.provider.d.ts +23 -0
- package/out/interface/provider/i-ui-login-node.provider.d.ts.map +1 -0
- package/out/interface/provider/i-ui-login-node.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/ui-login/i-ui-logic-context.d.ts +85 -0
- package/out/interface/ui-login/i-ui-logic-context.d.ts.map +1 -0
- package/out/interface/ui-login/i-ui-logic-context.js +1 -0
- package/out/interface/ui-login/index.d.ts +2 -0
- package/out/interface/ui-login/index.d.ts.map +1 -0
- package/out/interface/ui-login/index.js +1 -0
- package/out/interface/util/{i-export-excel/i-export-excel.d.ts → i-excel-util/i-excel-util.d.ts} +4 -4
- package/out/interface/util/i-excel-util/i-excel-util.d.ts.map +1 -0
- package/out/interface/util/i-excel-util/i-excel-util.js +1 -0
- package/out/interface/util/index.d.ts +1 -1
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/model/panel/index.d.ts +1 -0
- package/out/model/panel/index.d.ts.map +1 -1
- package/out/model/panel/index.js +1 -0
- package/out/model/panel/panel-field.d.ts +11 -0
- package/out/model/panel/panel-field.d.ts.map +1 -0
- package/out/model/panel/panel-field.js +35 -0
- package/out/model/utils/util.d.ts +12 -1
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +18 -0
- package/out/register/helper/common-register.js +1 -1
- package/out/register/helper/index.d.ts +3 -2
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +3 -2
- package/out/register/helper/ui-logic-node-register.d.ts +25 -0
- package/out/register/helper/ui-logic-node-register.d.ts.map +1 -0
- package/out/register/helper/ui-logic-node-register.js +37 -0
- package/out/service/mqtt/mqtt.service.d.ts +2 -0
- package/out/service/mqtt/mqtt.service.d.ts.map +1 -1
- package/out/service/mqtt/mqtt.service.js +3 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +3 -0
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +1 -1
- package/out/service/vo/index.d.ts +2 -0
- package/out/service/vo/index.d.ts.map +1 -1
- package/out/service/vo/index.js +2 -0
- package/out/service/vo/map-data/index.d.ts +2 -0
- package/out/service/vo/map-data/index.d.ts.map +1 -0
- package/out/service/vo/map-data/index.js +1 -0
- package/out/service/vo/map-data/map-data.d.ts +17 -0
- package/out/service/vo/map-data/map-data.d.ts.map +1 -0
- package/out/service/vo/map-data/map-data.js +87 -0
- package/out/service/vo/panel-data/index.d.ts +2 -0
- package/out/service/vo/panel-data/index.d.ts.map +1 -0
- package/out/service/vo/panel-data/index.js +1 -0
- package/out/service/vo/panel-data/panel-data.d.ts +21 -0
- package/out/service/vo/panel-data/panel-data.d.ts.map +1 -0
- package/out/service/vo/panel-data/panel-data.js +73 -0
- 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 +6 -2
- package/out/ui-logic/ui-logic-context.d.ts +7 -2
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-context.js +5 -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-node/pf-plugin-node/pf-plugin-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.js +19 -0
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +3 -1
- package/out/utils/script/script-function.d.ts.map +1 -1
- package/out/utils/script/script-function.js +7 -1
- package/package.json +4 -4
- package/src/controller/common/control/md-control.controller.ts +29 -23
- package/src/controller/control/form/edit-form/edit-form.controller.ts +6 -0
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +35 -25
- package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +2 -2
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.ts +2 -2
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts +66 -1
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.ts +1 -1
- package/src/controller/control/grid/grid/grid.controller.ts +20 -36
- package/src/controller/control/index.ts +1 -0
- package/src/controller/control/map/index.ts +2 -0
- package/src/controller/control/map/map.controller.ts +163 -0
- package/src/controller/control/map/map.service.ts +79 -0
- package/src/controller/control/panel/panel/panel-item.controller.ts +27 -17
- package/src/controller/control/panel/panel/panel.controller.ts +4 -21
- package/src/controller/utils/data-file-util/data-file-util.ts +156 -0
- package/src/controller/utils/index.ts +1 -0
- package/src/global/global-util/global-util.ts +2 -2
- package/src/interface/controller/controller/control/i-map.controller.ts +15 -0
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/controller/control/panel-item/i-panel-data-container.controller.ts +1 -1
- package/src/interface/controller/event/control/i-map.event.ts +48 -0
- package/src/interface/controller/event/control/index.ts +1 -0
- package/src/interface/controller/state/control/i-map.state.ts +148 -0
- package/src/interface/controller/state/control/index.ts +1 -0
- package/src/interface/index.ts +2 -1
- package/src/interface/provider/i-ui-login-node.provider.ts +23 -0
- package/src/interface/provider/index.ts +1 -0
- package/src/interface/ui-login/i-ui-logic-context.ts +95 -0
- package/src/interface/ui-login/index.ts +1 -0
- package/src/interface/util/{i-export-excel/i-export-excel.ts → i-excel-util/i-excel-util.ts} +3 -3
- package/src/interface/util/index.ts +1 -1
- package/src/model/panel/index.ts +1 -0
- package/src/model/panel/panel-field.ts +49 -0
- package/src/model/utils/util.ts +20 -0
- package/src/register/helper/common-register.ts +1 -1
- package/src/register/helper/index.ts +3 -2
- package/src/register/helper/ui-logic-node-register.ts +52 -0
- package/src/service/mqtt/mqtt.service.ts +3 -2
- package/src/service/service/entity/method/de-action.ts +4 -1
- package/src/service/service/entity/method/fetch.ts +7 -1
- package/src/service/vo/index.ts +2 -0
- package/src/service/vo/map-data/index.ts +1 -0
- package/src/service/vo/map-data/map-data.ts +123 -0
- package/src/service/vo/panel-data/index.ts +1 -0
- package/src/service/vo/panel-data/panel-data.ts +93 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +6 -2
- package/src/ui-logic/ui-logic-context.ts +7 -2
- package/src/ui-logic/ui-logic-node/index.ts +1 -0
- package/src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts +24 -0
- package/src/ui-logic/ui-logic.ts +3 -0
- package/src/utils/script/script-function.ts +6 -1
- package/out/interface/util/i-export-excel/i-export-excel.d.ts.map +0 -1
- /package/out/interface/{util/i-export-excel/i-export-excel.js → controller/controller/control/i-map.controller.js} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -18027,7 +18027,7 @@ var RegisterCenter = class {
|
|
|
18027
18027
|
};
|
|
18028
18028
|
|
|
18029
18029
|
// src/command/app/app-func/app-func.ts
|
|
18030
|
-
import { ModelError as ModelError15, RuntimeError as
|
|
18030
|
+
import { ModelError as ModelError15, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
18031
18031
|
|
|
18032
18032
|
// src/utils/handlebars/utils/helper/helper.ts
|
|
18033
18033
|
var HelperUtil = class {
|
|
@@ -18632,6 +18632,14 @@ function parseUserParams(userParams) {
|
|
|
18632
18632
|
}
|
|
18633
18633
|
return { navigateContexts, navigateParams, other };
|
|
18634
18634
|
}
|
|
18635
|
+
function getPFPlugin(app, id) {
|
|
18636
|
+
var _a;
|
|
18637
|
+
const plugin = (_a = app.appPFPluginRefs) == null ? void 0 : _a.find((item) => item.id === id);
|
|
18638
|
+
if (!plugin) {
|
|
18639
|
+
throw new Error("\u672A\u627E\u5230\u63D2\u4EF6".concat(id));
|
|
18640
|
+
}
|
|
18641
|
+
return plugin;
|
|
18642
|
+
}
|
|
18635
18643
|
|
|
18636
18644
|
// src/model/layout/layout.ts
|
|
18637
18645
|
import { isArray as isArray2, isObject, isString } from "lodash-es";
|
|
@@ -18922,6 +18930,31 @@ function isDataContainer(panelItem) {
|
|
|
18922
18930
|
);
|
|
18923
18931
|
}
|
|
18924
18932
|
|
|
18933
|
+
// src/model/panel/panel-field.ts
|
|
18934
|
+
var ChildKeys = ["panelItems", "panelTabPages", "rootPanelItems"];
|
|
18935
|
+
function _getAllPanelField(model) {
|
|
18936
|
+
let childItems = [];
|
|
18937
|
+
for (const key of ChildKeys) {
|
|
18938
|
+
if (model[key]) {
|
|
18939
|
+
childItems = model[key];
|
|
18940
|
+
break;
|
|
18941
|
+
}
|
|
18942
|
+
}
|
|
18943
|
+
const fields = [];
|
|
18944
|
+
if (childItems.length) {
|
|
18945
|
+
fields.push(...childItems.filter((item) => item.itemType === "FIELD"));
|
|
18946
|
+
childItems.forEach((item) => {
|
|
18947
|
+
if (!isDataContainer(item)) {
|
|
18948
|
+
fields.push(..._getAllPanelField(item));
|
|
18949
|
+
}
|
|
18950
|
+
});
|
|
18951
|
+
}
|
|
18952
|
+
return fields;
|
|
18953
|
+
}
|
|
18954
|
+
function getAllPanelField(model) {
|
|
18955
|
+
return _getAllPanelField(model);
|
|
18956
|
+
}
|
|
18957
|
+
|
|
18925
18958
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
18926
18959
|
async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
18927
18960
|
return openDERedirectView(
|
|
@@ -19220,7 +19253,12 @@ var ScriptFunction = class {
|
|
|
19220
19253
|
this.calcArgKeys(argKeys, options);
|
|
19221
19254
|
const fn = new Function(...this.argKeys, code);
|
|
19222
19255
|
this.scriptFn = function callBack(...args) {
|
|
19223
|
-
|
|
19256
|
+
try {
|
|
19257
|
+
return fn.apply({}, args);
|
|
19258
|
+
} catch (error) {
|
|
19259
|
+
console.log("\u62A5\u9519\u811A\u672C", code);
|
|
19260
|
+
throw error;
|
|
19261
|
+
}
|
|
19224
19262
|
};
|
|
19225
19263
|
}
|
|
19226
19264
|
/**
|
|
@@ -20497,7 +20535,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
20497
20535
|
}
|
|
20498
20536
|
|
|
20499
20537
|
// src/command/app/open-app-view/open-app-view.ts
|
|
20500
|
-
import { ModelError as ModelError14, RuntimeError as
|
|
20538
|
+
import { ModelError as ModelError14, RuntimeError as RuntimeError18 } from "@ibiz-template/core";
|
|
20501
20539
|
import { clone as clone13 } from "ramda";
|
|
20502
20540
|
|
|
20503
20541
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
@@ -20875,6 +20913,9 @@ _PSDEDQCondEngine.PARAMTYPE_DATACONTEXT = "DATACONTEXT";
|
|
|
20875
20913
|
_PSDEDQCondEngine.PARAMTYPE_WEBCONTEXT = "WEBCONTEXT";
|
|
20876
20914
|
var PSDEDQCondEngine = _PSDEDQCondEngine;
|
|
20877
20915
|
|
|
20916
|
+
// src/register/helper/app-counter-register.ts
|
|
20917
|
+
import { RuntimeError as RuntimeError5 } from "@ibiz-template/core";
|
|
20918
|
+
|
|
20878
20919
|
// src/register/helper/common-register.ts
|
|
20879
20920
|
async function getPluginRegisterKey(pluginId, appId) {
|
|
20880
20921
|
var _a;
|
|
@@ -20883,19 +20924,59 @@ async function getPluginRegisterKey(pluginId, appId) {
|
|
|
20883
20924
|
(item) => item.pluginCode.toLowerCase() === pluginId
|
|
20884
20925
|
);
|
|
20885
20926
|
if (!plugin) {
|
|
20886
|
-
ibiz.log.error("\
|
|
20927
|
+
ibiz.log.error("\u672A\u5339\u914D\u5230\u63D2\u4EF6[".concat(pluginId, "]\u6A21\u578B"));
|
|
20887
20928
|
return;
|
|
20888
20929
|
}
|
|
20889
20930
|
await ibiz.plugin.loadPlugin(plugin);
|
|
20890
20931
|
return "".concat(plugin.pluginType, "_").concat(plugin.pluginCode);
|
|
20891
20932
|
}
|
|
20892
20933
|
|
|
20934
|
+
// src/register/helper/app-counter-register.ts
|
|
20935
|
+
var APP_COUNTER_PROVIDER_PREFIX = "APPCOUNTER";
|
|
20936
|
+
function registerAppCounterProvider(key, callback) {
|
|
20937
|
+
ibiz.register.register("".concat(APP_COUNTER_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
20938
|
+
}
|
|
20939
|
+
function getProvider(key) {
|
|
20940
|
+
return ibiz.register.get(
|
|
20941
|
+
"".concat(APP_COUNTER_PROVIDER_PREFIX, "_").concat(key)
|
|
20942
|
+
);
|
|
20943
|
+
}
|
|
20944
|
+
async function getAppCounterProvider(model) {
|
|
20945
|
+
let provider;
|
|
20946
|
+
const { codeName, counterType, sysPFPluginId, appId } = model;
|
|
20947
|
+
if (sysPFPluginId) {
|
|
20948
|
+
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
20949
|
+
if (pluginKey) {
|
|
20950
|
+
provider = getProvider(pluginKey);
|
|
20951
|
+
}
|
|
20952
|
+
if (!provider) {
|
|
20953
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u7CFB\u7EDF\u8BA1\u6570\u5668\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
20954
|
+
} else {
|
|
20955
|
+
return provider;
|
|
20956
|
+
}
|
|
20957
|
+
}
|
|
20958
|
+
if (counterType === "CUSTOM") {
|
|
20959
|
+
provider = getProvider(codeName);
|
|
20960
|
+
if (!provider) {
|
|
20961
|
+
throw new RuntimeError5("\u627E\u4E0D\u5230\u81EA\u5B9A\u4E49\u7CFB\u7EDF\u8BA1\u6570\u5668".concat(codeName, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
20962
|
+
} else {
|
|
20963
|
+
return provider;
|
|
20964
|
+
}
|
|
20965
|
+
}
|
|
20966
|
+
provider = getProvider(counterType);
|
|
20967
|
+
if (!provider) {
|
|
20968
|
+
throw new RuntimeError5("\u627E\u4E0D\u7CFB\u7EDF\u8BA1\u6570\u5668\u7C7B\u578B".concat(counterType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
20969
|
+
} else {
|
|
20970
|
+
return provider;
|
|
20971
|
+
}
|
|
20972
|
+
}
|
|
20973
|
+
|
|
20893
20974
|
// src/register/helper/control-register.ts
|
|
20894
20975
|
var CONTROL_PROVIDER_PREFIX = "CONTROL";
|
|
20895
20976
|
function registerControlProvider(key, callback) {
|
|
20896
20977
|
ibiz.register.register("".concat(CONTROL_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
20897
20978
|
}
|
|
20898
|
-
function
|
|
20979
|
+
function getProvider2(key) {
|
|
20899
20980
|
return ibiz.register.get(
|
|
20900
20981
|
"".concat(CONTROL_PROVIDER_PREFIX, "_").concat(key)
|
|
20901
20982
|
);
|
|
@@ -20906,7 +20987,7 @@ async function getControlProvider(model) {
|
|
|
20906
20987
|
if (sysPFPluginId) {
|
|
20907
20988
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
20908
20989
|
if (pluginKey) {
|
|
20909
|
-
provider =
|
|
20990
|
+
provider = getProvider2(pluginKey);
|
|
20910
20991
|
}
|
|
20911
20992
|
if (!provider) {
|
|
20912
20993
|
ibiz.log.error("\u627E\u4E0D\u5230\u90E8\u4EF6\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -20916,7 +20997,7 @@ async function getControlProvider(model) {
|
|
|
20916
20997
|
}
|
|
20917
20998
|
if (controlStyle && controlStyle !== "DEFAULT") {
|
|
20918
20999
|
const key = "".concat(controlType, "_").concat(controlStyle);
|
|
20919
|
-
provider =
|
|
21000
|
+
provider = getProvider2(key);
|
|
20920
21001
|
if (!provider) {
|
|
20921
21002
|
ibiz.log.error(
|
|
20922
21003
|
"\u627E\u4E0D\u5230\u90E8\u4EF6\u7C7B\u578B\uFF1A[".concat(controlType, "]\u7684\u90E8\u4EF6\u6837\u5F0F\uFF1A[").concat(controlStyle, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
@@ -20926,7 +21007,7 @@ async function getControlProvider(model) {
|
|
|
20926
21007
|
return provider;
|
|
20927
21008
|
}
|
|
20928
21009
|
}
|
|
20929
|
-
provider =
|
|
21010
|
+
provider = getProvider2(controlType);
|
|
20930
21011
|
if (!provider) {
|
|
20931
21012
|
switch (controlType) {
|
|
20932
21013
|
case "DATAINFOBAR":
|
|
@@ -20944,7 +21025,7 @@ var EDITOR_PROVIDER_PREFIX = "EDITOR";
|
|
|
20944
21025
|
function registerEditorProvider(key, callback) {
|
|
20945
21026
|
ibiz.register.register("".concat(EDITOR_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
20946
21027
|
}
|
|
20947
|
-
function
|
|
21028
|
+
function getProvider3(key) {
|
|
20948
21029
|
return ibiz.register.get(
|
|
20949
21030
|
"".concat(EDITOR_PROVIDER_PREFIX, "_").concat(key)
|
|
20950
21031
|
);
|
|
@@ -20955,7 +21036,7 @@ async function getEditorProvider(model) {
|
|
|
20955
21036
|
if (sysPFPluginId) {
|
|
20956
21037
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
20957
21038
|
if (pluginKey) {
|
|
20958
|
-
provider =
|
|
21039
|
+
provider = getProvider3(pluginKey);
|
|
20959
21040
|
}
|
|
20960
21041
|
if (!provider) {
|
|
20961
21042
|
ibiz.log.error("\u627E\u4E0D\u5230\u7F16\u8F91\u5668\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -20965,7 +21046,7 @@ async function getEditorProvider(model) {
|
|
|
20965
21046
|
}
|
|
20966
21047
|
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
20967
21048
|
const key = "".concat(editorType, "_").concat(editorStyle);
|
|
20968
|
-
provider =
|
|
21049
|
+
provider = getProvider3(key);
|
|
20969
21050
|
if (!provider) {
|
|
20970
21051
|
ibiz.log.error(
|
|
20971
21052
|
"\u627E\u4E0D\u5230\u7F16\u8F91\u5668\u7C7B\u578B\uFF1A[".concat(editorType, "]\u7684\u7F16\u8F91\u5668\u6837\u5F0F\uFF1A[").concat(editorStyle, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
@@ -20980,7 +21061,7 @@ async function getEditorProvider(model) {
|
|
|
20980
21061
|
if (editorStyle && editorStyle !== "DEFAULT") {
|
|
20981
21062
|
key += "_".concat(editorStyle);
|
|
20982
21063
|
}
|
|
20983
|
-
provider =
|
|
21064
|
+
provider = getProvider3(key);
|
|
20984
21065
|
if (!provider) {
|
|
20985
21066
|
ibiz.log.error(
|
|
20986
21067
|
"\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"),
|
|
@@ -20990,7 +21071,7 @@ async function getEditorProvider(model) {
|
|
|
20990
21071
|
return provider;
|
|
20991
21072
|
}
|
|
20992
21073
|
}
|
|
20993
|
-
provider =
|
|
21074
|
+
provider = getProvider3(editorType);
|
|
20994
21075
|
if (!provider) {
|
|
20995
21076
|
ibiz.log.error("\u627E\u4E0D\u5230\u7F16\u8F91\u5668\u7C7B\u578B".concat(editorType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
20996
21077
|
} else {
|
|
@@ -21003,7 +21084,7 @@ var FORMDETAIL_PROVIDER_PREFIX = "FORMDETAIL";
|
|
|
21003
21084
|
function registerFormDetailProvider(key, callback) {
|
|
21004
21085
|
ibiz.register.register("".concat(FORMDETAIL_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21005
21086
|
}
|
|
21006
|
-
function
|
|
21087
|
+
function getProvider4(key) {
|
|
21007
21088
|
return ibiz.register.get(
|
|
21008
21089
|
"".concat(FORMDETAIL_PROVIDER_PREFIX, "_").concat(key)
|
|
21009
21090
|
);
|
|
@@ -21014,7 +21095,7 @@ async function getFormDetailProvider(model) {
|
|
|
21014
21095
|
if (sysPFPluginId) {
|
|
21015
21096
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21016
21097
|
if (pluginKey) {
|
|
21017
|
-
provider =
|
|
21098
|
+
provider = getProvider4(pluginKey);
|
|
21018
21099
|
}
|
|
21019
21100
|
if (!provider) {
|
|
21020
21101
|
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u5355\u6210\u5458\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -21022,7 +21103,7 @@ async function getFormDetailProvider(model) {
|
|
|
21022
21103
|
return provider;
|
|
21023
21104
|
}
|
|
21024
21105
|
}
|
|
21025
|
-
provider =
|
|
21106
|
+
provider = getProvider4(detailType);
|
|
21026
21107
|
if (!provider) {
|
|
21027
21108
|
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u5355\u6210\u5458\u7C7B\u578B".concat(detailType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21028
21109
|
} else {
|
|
@@ -21035,7 +21116,7 @@ var GRIDCOLUMN_PROVIDER_PREFIX = "GRIDCOLUMN";
|
|
|
21035
21116
|
function registerGridColumnProvider(key, callback) {
|
|
21036
21117
|
ibiz.register.register("".concat(GRIDCOLUMN_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21037
21118
|
}
|
|
21038
|
-
function
|
|
21119
|
+
function getProvider5(key) {
|
|
21039
21120
|
return ibiz.register.get(
|
|
21040
21121
|
"".concat(GRIDCOLUMN_PROVIDER_PREFIX, "_").concat(key)
|
|
21041
21122
|
);
|
|
@@ -21046,7 +21127,7 @@ async function getGridColumnProvider(model) {
|
|
|
21046
21127
|
if (sysPFPluginId) {
|
|
21047
21128
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21048
21129
|
if (pluginKey) {
|
|
21049
|
-
provider =
|
|
21130
|
+
provider = getProvider5(pluginKey);
|
|
21050
21131
|
}
|
|
21051
21132
|
if (!provider) {
|
|
21052
21133
|
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -21055,7 +21136,7 @@ async function getGridColumnProvider(model) {
|
|
|
21055
21136
|
}
|
|
21056
21137
|
}
|
|
21057
21138
|
const key = enableRowEdit ? "".concat(columnType, "_EDIT") : columnType;
|
|
21058
|
-
provider =
|
|
21139
|
+
provider = getProvider5(key);
|
|
21059
21140
|
if (!provider) {
|
|
21060
21141
|
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u683C\u5217\u7C7B\u578B".concat(key, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21061
21142
|
} else {
|
|
@@ -21071,7 +21152,7 @@ function registerPanelItemProvider(key, callback) {
|
|
|
21071
21152
|
callback
|
|
21072
21153
|
);
|
|
21073
21154
|
}
|
|
21074
|
-
function
|
|
21155
|
+
function getProvider6(key) {
|
|
21075
21156
|
return ibiz.register.get(
|
|
21076
21157
|
"".concat(PANELITEM_PROVIDER_PREFIX, "_").concat(key.toUpperCase())
|
|
21077
21158
|
);
|
|
@@ -21083,7 +21164,7 @@ async function getPanelItemProvider(model) {
|
|
|
21083
21164
|
if (sysPFPluginId) {
|
|
21084
21165
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21085
21166
|
if (pluginKey) {
|
|
21086
|
-
provider =
|
|
21167
|
+
provider = getProvider6(pluginKey);
|
|
21087
21168
|
}
|
|
21088
21169
|
if (!provider) {
|
|
21089
21170
|
ibiz.log.error("\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
@@ -21094,7 +21175,7 @@ async function getPanelItemProvider(model) {
|
|
|
21094
21175
|
if (itemType === "CONTAINER") {
|
|
21095
21176
|
const predefinedType = model.predefinedType || "DEFAULT";
|
|
21096
21177
|
const key = "CONTAINER_".concat(predefinedType);
|
|
21097
|
-
provider =
|
|
21178
|
+
provider = getProvider6(key);
|
|
21098
21179
|
if (!provider) {
|
|
21099
21180
|
ibiz.log.error("\u627E\u4E0D\u5230\u9762\u677F\u5BB9\u5668\u9884\u7F6E\u7C7B\u578B\u4E3A".concat(predefinedType, "\u7684\u9002\u914D\u5668"));
|
|
21100
21181
|
} else {
|
|
@@ -21104,7 +21185,7 @@ async function getPanelItemProvider(model) {
|
|
|
21104
21185
|
if (itemType === "RAWITEM") {
|
|
21105
21186
|
const predefinedType = ((_a = model.rawItem) == null ? void 0 : _a.predefinedType) || "DEFAULT";
|
|
21106
21187
|
const key = "RAWITEM_".concat(predefinedType);
|
|
21107
|
-
provider =
|
|
21188
|
+
provider = getProvider6(key);
|
|
21108
21189
|
if (!provider) {
|
|
21109
21190
|
ibiz.log.error(
|
|
21110
21191
|
"\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u76F4\u63A5\u5185\u5BB9\u9884\u7F6E\u7C7B\u578B\u4E3A".concat(predefinedType, "\u7684\u9002\u914D\u5668")
|
|
@@ -21113,7 +21194,7 @@ async function getPanelItemProvider(model) {
|
|
|
21113
21194
|
return provider;
|
|
21114
21195
|
}
|
|
21115
21196
|
}
|
|
21116
|
-
provider =
|
|
21197
|
+
provider = getProvider6(itemType);
|
|
21117
21198
|
if (!provider) {
|
|
21118
21199
|
ibiz.log.error("\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u7C7B\u578B".concat(itemType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21119
21200
|
} else {
|
|
@@ -21121,157 +21202,139 @@ async function getPanelItemProvider(model) {
|
|
|
21121
21202
|
}
|
|
21122
21203
|
}
|
|
21123
21204
|
|
|
21124
|
-
// src/register/helper/
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21205
|
+
// src/register/helper/portlet-register.ts
|
|
21206
|
+
var PORTLET_PROVIDER_PREFIX = "PORTLET";
|
|
21207
|
+
function registerPortletProvider(key, callback) {
|
|
21208
|
+
ibiz.register.register("".concat(PORTLET_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21129
21209
|
}
|
|
21130
|
-
function
|
|
21210
|
+
function getProvider7(key) {
|
|
21131
21211
|
return ibiz.register.get(
|
|
21132
|
-
"".concat(
|
|
21212
|
+
"".concat(PORTLET_PROVIDER_PREFIX, "_").concat(key)
|
|
21133
21213
|
);
|
|
21134
21214
|
}
|
|
21135
|
-
async function
|
|
21215
|
+
async function getPortletProvider(model) {
|
|
21136
21216
|
let provider;
|
|
21137
|
-
const {
|
|
21217
|
+
const { portletType, sysPFPluginId, appId } = model;
|
|
21138
21218
|
if (sysPFPluginId) {
|
|
21139
21219
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21140
21220
|
if (pluginKey) {
|
|
21141
|
-
provider =
|
|
21221
|
+
provider = getProvider7(pluginKey);
|
|
21142
21222
|
}
|
|
21143
21223
|
if (!provider) {
|
|
21144
|
-
ibiz.log.error("\u627E\u4E0D\u5230\
|
|
21224
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u95E8\u6237\u90E8\u4EF6\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21145
21225
|
} else {
|
|
21146
21226
|
return provider;
|
|
21147
21227
|
}
|
|
21148
21228
|
}
|
|
21149
|
-
provider =
|
|
21229
|
+
provider = getProvider7(portletType);
|
|
21150
21230
|
if (!provider) {
|
|
21151
|
-
|
|
21231
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u95E8\u6237\u90E8\u4EF6\u6210\u5458\u7C7B\u578B".concat(portletType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21152
21232
|
} else {
|
|
21153
21233
|
return provider;
|
|
21154
21234
|
}
|
|
21155
21235
|
}
|
|
21156
21236
|
|
|
21157
|
-
// src/register/helper/
|
|
21158
|
-
|
|
21159
|
-
|
|
21160
|
-
|
|
21237
|
+
// src/register/helper/ui-action-register.ts
|
|
21238
|
+
import { RuntimeError as RuntimeError6 } from "@ibiz-template/core";
|
|
21239
|
+
var UIACTION_PROVIDER_PREFIX = "UIACTION";
|
|
21240
|
+
function registerUIActionProvider(key, callback) {
|
|
21241
|
+
ibiz.register.register("".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21161
21242
|
}
|
|
21162
|
-
function
|
|
21163
|
-
return ibiz.register.get(
|
|
21243
|
+
function getProvider8(key) {
|
|
21244
|
+
return ibiz.register.get(
|
|
21245
|
+
"".concat(UIACTION_PROVIDER_PREFIX, "_").concat(key)
|
|
21246
|
+
);
|
|
21164
21247
|
}
|
|
21165
|
-
async function
|
|
21248
|
+
async function getUIActionProvider(model) {
|
|
21166
21249
|
let provider;
|
|
21167
|
-
const {
|
|
21250
|
+
const { uiactionMode, sysPFPluginId, appId } = model;
|
|
21168
21251
|
if (sysPFPluginId) {
|
|
21169
21252
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21170
21253
|
if (pluginKey) {
|
|
21171
|
-
provider =
|
|
21172
|
-
}
|
|
21173
|
-
if (!provider) {
|
|
21174
|
-
ibiz.log.error("\u627E\u4E0D\u5230\u89C6\u56FE\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21175
|
-
} else {
|
|
21176
|
-
return provider;
|
|
21254
|
+
provider = getProvider8(pluginKey);
|
|
21177
21255
|
}
|
|
21178
|
-
}
|
|
21179
|
-
if (viewStyle && viewStyle !== "DEFAULT") {
|
|
21180
|
-
const key = "".concat(viewType, "_").concat(viewStyle);
|
|
21181
|
-
provider = getProvider7(key);
|
|
21182
21256
|
if (!provider) {
|
|
21183
|
-
ibiz.log.error(
|
|
21184
|
-
"\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[".concat(viewType, "]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[").concat(viewStyle, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
21185
|
-
model
|
|
21186
|
-
);
|
|
21257
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u754C\u9762\u884C\u4E3A\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21187
21258
|
} else {
|
|
21188
21259
|
return provider;
|
|
21189
21260
|
}
|
|
21190
21261
|
}
|
|
21262
|
+
provider = getProvider8(uiactionMode);
|
|
21191
21263
|
if (!provider) {
|
|
21192
|
-
|
|
21193
|
-
}
|
|
21194
|
-
|
|
21195
|
-
provider = getProvider7("DEFAULT");
|
|
21264
|
+
throw new RuntimeError6("\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F".concat(uiactionMode, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21265
|
+
} else {
|
|
21266
|
+
return provider;
|
|
21196
21267
|
}
|
|
21197
|
-
return provider;
|
|
21198
21268
|
}
|
|
21199
21269
|
|
|
21200
|
-
// src/register/helper/
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21205
|
-
function getProvider8(key) {
|
|
21206
|
-
return ibiz.register.get(
|
|
21207
|
-
"".concat(PORTLET_PROVIDER_PREFIX, "_").concat(key)
|
|
21208
|
-
);
|
|
21270
|
+
// src/register/helper/ui-logic-node-register.ts
|
|
21271
|
+
import { RuntimeError as RuntimeError7 } from "@ibiz-template/core";
|
|
21272
|
+
var UILOGINNODE_PROVIDER_PREFIX = "UI_LOGIN_NODE";
|
|
21273
|
+
function registerUILogicNodeProvider(key, callback) {
|
|
21274
|
+
ibiz.register.register("".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21209
21275
|
}
|
|
21210
|
-
async function
|
|
21276
|
+
async function getUILogicNodeProvider(model) {
|
|
21211
21277
|
let provider;
|
|
21212
|
-
const {
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
if (
|
|
21219
|
-
ibiz.log.error("\u627E\u4E0D\u5230\u95E8\u6237\u90E8\u4EF6\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21220
|
-
} else {
|
|
21278
|
+
const { sysPFPluginId, appId } = model;
|
|
21279
|
+
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21280
|
+
if (pluginKey) {
|
|
21281
|
+
provider = ibiz.register.get(
|
|
21282
|
+
"".concat(UILOGINNODE_PROVIDER_PREFIX, "_").concat(pluginKey)
|
|
21283
|
+
);
|
|
21284
|
+
if (provider) {
|
|
21221
21285
|
return provider;
|
|
21222
21286
|
}
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
ibiz.log.error("\u627E\u4E0D\u5230\u95E8\u6237\u90E8\u4EF6\u6210\u5458\u7C7B\u578B".concat(portletType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21227
|
-
} else {
|
|
21228
|
-
return provider;
|
|
21287
|
+
throw new RuntimeError7(
|
|
21288
|
+
"\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668")
|
|
21289
|
+
);
|
|
21229
21290
|
}
|
|
21230
21291
|
}
|
|
21231
21292
|
|
|
21232
|
-
// src/register/helper/
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
ibiz.register.register("".concat(APP_COUNTER_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21293
|
+
// src/register/helper/view-register.ts
|
|
21294
|
+
var VIEW_PROVIDER_PREFIX = "VIEW";
|
|
21295
|
+
function registerViewProvider(key, callback) {
|
|
21296
|
+
ibiz.register.register("".concat(VIEW_PROVIDER_PREFIX, "_").concat(key), callback);
|
|
21237
21297
|
}
|
|
21238
21298
|
function getProvider9(key) {
|
|
21239
|
-
return ibiz.register.get(
|
|
21240
|
-
"".concat(APP_COUNTER_PROVIDER_PREFIX, "_").concat(key)
|
|
21241
|
-
);
|
|
21299
|
+
return ibiz.register.get("".concat(VIEW_PROVIDER_PREFIX, "_").concat(key));
|
|
21242
21300
|
}
|
|
21243
|
-
async function
|
|
21301
|
+
async function getViewProvider(model) {
|
|
21244
21302
|
let provider;
|
|
21245
|
-
const {
|
|
21303
|
+
const { viewType, viewStyle, sysPFPluginId, appId } = model;
|
|
21246
21304
|
if (sysPFPluginId) {
|
|
21247
21305
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
21248
21306
|
if (pluginKey) {
|
|
21249
21307
|
provider = getProvider9(pluginKey);
|
|
21250
21308
|
}
|
|
21251
21309
|
if (!provider) {
|
|
21252
|
-
ibiz.log.error("\u627E\u4E0D\u5230\
|
|
21310
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u89C6\u56FE\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
21253
21311
|
} else {
|
|
21254
21312
|
return provider;
|
|
21255
21313
|
}
|
|
21256
21314
|
}
|
|
21257
|
-
if (
|
|
21258
|
-
|
|
21315
|
+
if (viewStyle && viewStyle !== "DEFAULT") {
|
|
21316
|
+
const key = "".concat(viewType, "_").concat(viewStyle);
|
|
21317
|
+
provider = getProvider9(key);
|
|
21259
21318
|
if (!provider) {
|
|
21260
|
-
|
|
21319
|
+
ibiz.log.error(
|
|
21320
|
+
"\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[".concat(viewType, "]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[").concat(viewStyle, "]\u5BF9\u5E94\u7684\u9002\u914D\u5668"),
|
|
21321
|
+
model
|
|
21322
|
+
);
|
|
21261
21323
|
} else {
|
|
21262
21324
|
return provider;
|
|
21263
21325
|
}
|
|
21264
21326
|
}
|
|
21265
|
-
provider = getProvider9(counterType);
|
|
21266
21327
|
if (!provider) {
|
|
21267
|
-
|
|
21268
|
-
}
|
|
21269
|
-
|
|
21328
|
+
provider = getProvider9(viewType);
|
|
21329
|
+
}
|
|
21330
|
+
if (!provider) {
|
|
21331
|
+
provider = getProvider9("DEFAULT");
|
|
21270
21332
|
}
|
|
21333
|
+
return provider;
|
|
21271
21334
|
}
|
|
21272
21335
|
|
|
21273
21336
|
// src/service/utils/app-counter/app-counter.ts
|
|
21274
|
-
import { IBizContext, RuntimeError as
|
|
21337
|
+
import { IBizContext, RuntimeError as RuntimeError8 } from "@ibiz-template/core";
|
|
21275
21338
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
21276
21339
|
import { clone as clone2 } from "ramda";
|
|
21277
21340
|
var AppCounter = class {
|
|
@@ -21376,7 +21439,7 @@ var AppCounter = class {
|
|
|
21376
21439
|
* @return {*} {Promise<IData>}
|
|
21377
21440
|
*/
|
|
21378
21441
|
async load() {
|
|
21379
|
-
throw new
|
|
21442
|
+
throw new RuntimeError8("\u672A\u5B9E\u73B0\u8BA1\u6570\u5668\u52A0\u8F7D\u65B9\u6CD5");
|
|
21380
21443
|
}
|
|
21381
21444
|
/**
|
|
21382
21445
|
* 计数器刷新
|
|
@@ -21809,7 +21872,7 @@ import { where, equals, clone as clone3, isNil as isNil5, isEmpty as isEmpty5 }
|
|
|
21809
21872
|
import { createUUID } from "qx-util";
|
|
21810
21873
|
|
|
21811
21874
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
21812
|
-
import { RuntimeError as
|
|
21875
|
+
import { RuntimeError as RuntimeError9 } from "@ibiz-template/core";
|
|
21813
21876
|
import { isEmpty as isEmpty4, isNil as isNil4 } from "ramda";
|
|
21814
21877
|
function isExistSrfKey(funcName, entity) {
|
|
21815
21878
|
if (entity != null) {
|
|
@@ -21818,14 +21881,14 @@ function isExistSrfKey(funcName, entity) {
|
|
|
21818
21881
|
return true;
|
|
21819
21882
|
}
|
|
21820
21883
|
}
|
|
21821
|
-
throw new
|
|
21884
|
+
throw new RuntimeError9("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfkey\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
21822
21885
|
}
|
|
21823
21886
|
function isExistSessionId(funcName, context) {
|
|
21824
21887
|
const { srfsessionid } = context;
|
|
21825
21888
|
if (!isNil4(srfsessionid) && !isEmpty4(srfsessionid)) {
|
|
21826
21889
|
return true;
|
|
21827
21890
|
}
|
|
21828
|
-
throw new
|
|
21891
|
+
throw new RuntimeError9("\u6267\u884C\u300C".concat(funcName, "\u300D\u4E0D\u5B58\u5728\u300Csrfsessionid\u300D\u65E0\u6CD5\u5904\u7406"));
|
|
21829
21892
|
}
|
|
21830
21893
|
|
|
21831
21894
|
// src/service/utils/de-cache/de-cache.ts
|
|
@@ -22316,7 +22379,7 @@ var SearchFilter = class {
|
|
|
22316
22379
|
};
|
|
22317
22380
|
|
|
22318
22381
|
// src/service/service/code-list/code-list.service.ts
|
|
22319
|
-
import { RuntimeError as
|
|
22382
|
+
import { RuntimeError as RuntimeError10 } from "@ibiz-template/core";
|
|
22320
22383
|
var CodeListService = class {
|
|
22321
22384
|
constructor(appModel) {
|
|
22322
22385
|
this.appModel = appModel;
|
|
@@ -22463,7 +22526,7 @@ var CodeListService = class {
|
|
|
22463
22526
|
async get(tag, context, params) {
|
|
22464
22527
|
const codeList = this.allCodeLists.get(tag);
|
|
22465
22528
|
if (!codeList) {
|
|
22466
|
-
throw new
|
|
22529
|
+
throw new RuntimeError10("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
22467
22530
|
}
|
|
22468
22531
|
if (codeList.codeListType === "STATIC") {
|
|
22469
22532
|
return this.getStatic(codeList);
|
|
@@ -22585,11 +22648,11 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
22585
22648
|
// src/service/service/entity/de.service.ts
|
|
22586
22649
|
import {
|
|
22587
22650
|
ModelError as ModelError13,
|
|
22588
|
-
RuntimeError as
|
|
22651
|
+
RuntimeError as RuntimeError14
|
|
22589
22652
|
} from "@ibiz-template/core";
|
|
22590
22653
|
|
|
22591
22654
|
// src/service/service/work-flow/work-flow.service.ts
|
|
22592
|
-
import { RuntimeError as
|
|
22655
|
+
import { RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
22593
22656
|
var WorkFlowService = class {
|
|
22594
22657
|
/**
|
|
22595
22658
|
* Creates an instance of WorkFlowService.
|
|
@@ -22892,7 +22955,7 @@ var WorkFlowService = class {
|
|
|
22892
22955
|
case "sendcopy":
|
|
22893
22956
|
return this.wfSendCopy(context, params, data);
|
|
22894
22957
|
default: {
|
|
22895
|
-
throw new
|
|
22958
|
+
throw new RuntimeError11("\u300C".concat(methodName, "\u300D\u672A\u5B9E\u73B0"));
|
|
22896
22959
|
}
|
|
22897
22960
|
}
|
|
22898
22961
|
}
|
|
@@ -22934,7 +22997,7 @@ var FileService = class {
|
|
|
22934
22997
|
// src/service/service/entity/method/de-action.ts
|
|
22935
22998
|
import {
|
|
22936
22999
|
HttpResponse as HttpResponse3,
|
|
22937
|
-
RuntimeError as
|
|
23000
|
+
RuntimeError as RuntimeError13,
|
|
22938
23001
|
RuntimeModelError as RuntimeModelError18
|
|
22939
23002
|
} from "@ibiz-template/core";
|
|
22940
23003
|
import { isArray as isArray6, isNil as isNil8 } from "lodash-es";
|
|
@@ -23491,7 +23554,7 @@ var Method = class {
|
|
|
23491
23554
|
};
|
|
23492
23555
|
|
|
23493
23556
|
// src/de-logic/index.ts
|
|
23494
|
-
import { HttpError as HttpError2, HttpResponse as HttpResponse2, RuntimeError as
|
|
23557
|
+
import { HttpError as HttpError2, HttpResponse as HttpResponse2, RuntimeError as RuntimeError12 } from "@ibiz-template/core";
|
|
23495
23558
|
import { isArray as isArray5 } from "lodash-es";
|
|
23496
23559
|
import { clone as clone9 } from "ramda";
|
|
23497
23560
|
|
|
@@ -24544,7 +24607,7 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
24544
24607
|
context.srfappid
|
|
24545
24608
|
);
|
|
24546
24609
|
if (!deLogic) {
|
|
24547
|
-
throw new
|
|
24610
|
+
throw new RuntimeError12("".concat(dataEntityId, "\u627E\u4E0D\u5230\u5B9E\u4F53\u903B\u8F91").concat(deDELogicId));
|
|
24548
24611
|
}
|
|
24549
24612
|
return execDELogic(deLogic, context, data, params);
|
|
24550
24613
|
}
|
|
@@ -24619,6 +24682,9 @@ var DEActionMethod = class extends Method {
|
|
|
24619
24682
|
return this.input.handle(context, data);
|
|
24620
24683
|
}
|
|
24621
24684
|
async exec(context, data, params) {
|
|
24685
|
+
if (data) {
|
|
24686
|
+
await execFieldLogics(this.entity, "change", context, data, params);
|
|
24687
|
+
}
|
|
24622
24688
|
if (this.method.actionType === "DELOGIC") {
|
|
24623
24689
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
24624
24690
|
if (!deLogic) {
|
|
@@ -24700,7 +24766,7 @@ var DEActionMethod = class extends Method {
|
|
|
24700
24766
|
*/
|
|
24701
24767
|
async create(context, data, params) {
|
|
24702
24768
|
if (!data) {
|
|
24703
|
-
throw new
|
|
24769
|
+
throw new RuntimeError13("create\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
24704
24770
|
}
|
|
24705
24771
|
if (this.isLocalMode) {
|
|
24706
24772
|
return this.createTemp(context, this.createEntity(data));
|
|
@@ -24742,7 +24808,7 @@ var DEActionMethod = class extends Method {
|
|
|
24742
24808
|
*/
|
|
24743
24809
|
async update(context, data, params) {
|
|
24744
24810
|
if (!data) {
|
|
24745
|
-
throw new
|
|
24811
|
+
throw new RuntimeError13("update\u884C\u4E3A\u6CA1\u6709\u4F20data");
|
|
24746
24812
|
}
|
|
24747
24813
|
if (this.isLocalMode) {
|
|
24748
24814
|
return this.updateTemp(context, this.createEntity(data));
|
|
@@ -24980,7 +25046,13 @@ var FetchMethod = class extends Method {
|
|
|
24980
25046
|
const items = res.data || [];
|
|
24981
25047
|
res.data = items.map((item) => this.createEntity(item));
|
|
24982
25048
|
if (res.data) {
|
|
24983
|
-
execFieldLogics(
|
|
25049
|
+
await execFieldLogics(
|
|
25050
|
+
this.entity,
|
|
25051
|
+
"compute",
|
|
25052
|
+
context,
|
|
25053
|
+
res.data,
|
|
25054
|
+
searchParams
|
|
25055
|
+
);
|
|
24984
25056
|
}
|
|
24985
25057
|
return res;
|
|
24986
25058
|
}
|
|
@@ -25208,7 +25280,7 @@ var DEService = class {
|
|
|
25208
25280
|
if (method) {
|
|
25209
25281
|
return method.exec(context, params, params2);
|
|
25210
25282
|
}
|
|
25211
|
-
throw new
|
|
25283
|
+
throw new RuntimeError14("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
25212
25284
|
}
|
|
25213
25285
|
/**
|
|
25214
25286
|
* 执行服务方法 ac 模式
|
|
@@ -25226,7 +25298,7 @@ var DEService = class {
|
|
|
25226
25298
|
if (method) {
|
|
25227
25299
|
return method.exec(context, params, params2);
|
|
25228
25300
|
}
|
|
25229
|
-
throw new
|
|
25301
|
+
throw new RuntimeError14("".concat(this.model.codeName, "\u672A\u652F\u6301\u300C").concat(id, "\u300D\u65B9\u6CD5"));
|
|
25230
25302
|
}
|
|
25231
25303
|
/**
|
|
25232
25304
|
* 实体级别 AI 聊天会话
|
|
@@ -25576,7 +25648,7 @@ var ControlService = class {
|
|
|
25576
25648
|
};
|
|
25577
25649
|
|
|
25578
25650
|
// src/service/service/control/md-control.service.ts
|
|
25579
|
-
import { RuntimeError as
|
|
25651
|
+
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
25580
25652
|
import { isArray as isArray8 } from "qx-util";
|
|
25581
25653
|
var MDControlService = class extends ControlService {
|
|
25582
25654
|
/**
|
|
@@ -25685,7 +25757,7 @@ var MDControlService = class extends ControlService {
|
|
|
25685
25757
|
* @returns {*} {Promise<IHttpResponse>}
|
|
25686
25758
|
*/
|
|
25687
25759
|
async exportData(_dataExport, _context, _params = {}) {
|
|
25688
|
-
throw new
|
|
25760
|
+
throw new RuntimeError15("\u672A\u5B9E\u73B0");
|
|
25689
25761
|
}
|
|
25690
25762
|
/**
|
|
25691
25763
|
* 处理响应
|
|
@@ -25720,7 +25792,7 @@ var MDControlService = class extends ControlService {
|
|
|
25720
25792
|
};
|
|
25721
25793
|
|
|
25722
25794
|
// src/service/service/authority/authority.service.ts
|
|
25723
|
-
import { RuntimeError as
|
|
25795
|
+
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
25724
25796
|
|
|
25725
25797
|
// src/service/service/authority/de-authority.service.ts
|
|
25726
25798
|
var DeAuthorityService = class {
|
|
@@ -25856,7 +25928,7 @@ var AuthorityService = class {
|
|
|
25856
25928
|
this.appModel.appId
|
|
25857
25929
|
);
|
|
25858
25930
|
if (!entityModel) {
|
|
25859
|
-
throw new
|
|
25931
|
+
throw new RuntimeError16("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
25860
25932
|
}
|
|
25861
25933
|
const constructor = this.constructorCache.get(id);
|
|
25862
25934
|
let service;
|
|
@@ -26029,8 +26101,8 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
26029
26101
|
super(model, parentNodeData, opts);
|
|
26030
26102
|
const { data } = opts;
|
|
26031
26103
|
this.deData = data;
|
|
26032
|
-
this.text = data.srfmajortext;
|
|
26033
|
-
this.value = data.srfkey;
|
|
26104
|
+
this.text = model.textAppDEFieldId ? data[model.textAppDEFieldId] : data.srfmajortext;
|
|
26105
|
+
this.value = model.idAppDEFieldId ? data[model.idAppDEFieldId] : data.srfkey;
|
|
26034
26106
|
this.id = parentNodeData ? "".concat(parentNodeData.id, ":").concat(model.id, "@").concat(data.srfkey) : model.id + data.srfkey;
|
|
26035
26107
|
this.id = this.id.toLowerCase();
|
|
26036
26108
|
if (model.appDataEntityId) {
|
|
@@ -26240,6 +26312,154 @@ var CalendarItemData = class {
|
|
|
26240
26312
|
}
|
|
26241
26313
|
};
|
|
26242
26314
|
|
|
26315
|
+
// src/service/vo/map-data/map-data.ts
|
|
26316
|
+
function updateKeyDefine(target, keys) {
|
|
26317
|
+
keys.forEach((key) => {
|
|
26318
|
+
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
26319
|
+
Object.defineProperty(target, key, {
|
|
26320
|
+
enumerable: true,
|
|
26321
|
+
configurable: true,
|
|
26322
|
+
writable: true,
|
|
26323
|
+
value: void 0
|
|
26324
|
+
});
|
|
26325
|
+
}
|
|
26326
|
+
});
|
|
26327
|
+
}
|
|
26328
|
+
var MapData = class {
|
|
26329
|
+
constructor(deData, mapItem) {
|
|
26330
|
+
this._longitude = void 0;
|
|
26331
|
+
this._latitude = void 0;
|
|
26332
|
+
this._areaCode = void 0;
|
|
26333
|
+
this._tooltip = void 0;
|
|
26334
|
+
this._value = void 0;
|
|
26335
|
+
this._text = void 0;
|
|
26336
|
+
this._symbol = void 0;
|
|
26337
|
+
const {
|
|
26338
|
+
id,
|
|
26339
|
+
itemType,
|
|
26340
|
+
longitudeAppDEFieldId,
|
|
26341
|
+
latitudeAppDEFieldId,
|
|
26342
|
+
textAppDEFieldId,
|
|
26343
|
+
dataAppDEFieldId,
|
|
26344
|
+
tipsAppDEFieldId,
|
|
26345
|
+
sysImage
|
|
26346
|
+
} = mapItem;
|
|
26347
|
+
const keyMap = /* @__PURE__ */ new Map();
|
|
26348
|
+
this._id = id + deData.srfkey;
|
|
26349
|
+
this._type = itemType;
|
|
26350
|
+
this._mapItemId = id;
|
|
26351
|
+
if (itemType === "area") {
|
|
26352
|
+
if (longitudeAppDEFieldId) {
|
|
26353
|
+
keyMap.set("_areaCode", longitudeAppDEFieldId);
|
|
26354
|
+
}
|
|
26355
|
+
} else {
|
|
26356
|
+
if (longitudeAppDEFieldId) {
|
|
26357
|
+
keyMap.set("_longitude", longitudeAppDEFieldId);
|
|
26358
|
+
}
|
|
26359
|
+
if (latitudeAppDEFieldId) {
|
|
26360
|
+
keyMap.set("_latitude", latitudeAppDEFieldId);
|
|
26361
|
+
}
|
|
26362
|
+
}
|
|
26363
|
+
if (tipsAppDEFieldId) {
|
|
26364
|
+
keyMap.set("_tooltip", tipsAppDEFieldId);
|
|
26365
|
+
}
|
|
26366
|
+
if (textAppDEFieldId) {
|
|
26367
|
+
keyMap.set("_text", textAppDEFieldId);
|
|
26368
|
+
}
|
|
26369
|
+
if (dataAppDEFieldId) {
|
|
26370
|
+
keyMap.set("_value", dataAppDEFieldId);
|
|
26371
|
+
}
|
|
26372
|
+
if (sysImage) {
|
|
26373
|
+
this._symbol = sysImage.rawContent || sysImage.imagePath;
|
|
26374
|
+
}
|
|
26375
|
+
return new Proxy(this, {
|
|
26376
|
+
set(target, p, value) {
|
|
26377
|
+
if (Object.prototype.hasOwnProperty.call(deData, p)) {
|
|
26378
|
+
deData[p] = value;
|
|
26379
|
+
} else if (keyMap.has(p)) {
|
|
26380
|
+
deData[keyMap.get(p)] = value;
|
|
26381
|
+
} else {
|
|
26382
|
+
target[p] = value;
|
|
26383
|
+
}
|
|
26384
|
+
return true;
|
|
26385
|
+
},
|
|
26386
|
+
get(target, p, _receiver) {
|
|
26387
|
+
if (target[p] !== void 0) {
|
|
26388
|
+
return target[p];
|
|
26389
|
+
}
|
|
26390
|
+
if (keyMap.has(p)) {
|
|
26391
|
+
return deData[keyMap.get(p)];
|
|
26392
|
+
}
|
|
26393
|
+
if (deData[p] !== void 0) {
|
|
26394
|
+
return deData[p];
|
|
26395
|
+
}
|
|
26396
|
+
},
|
|
26397
|
+
ownKeys(target) {
|
|
26398
|
+
const allKeys = [
|
|
26399
|
+
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
26400
|
+
];
|
|
26401
|
+
updateKeyDefine(target, allKeys);
|
|
26402
|
+
return allKeys;
|
|
26403
|
+
}
|
|
26404
|
+
});
|
|
26405
|
+
}
|
|
26406
|
+
};
|
|
26407
|
+
|
|
26408
|
+
// src/service/vo/panel-data/panel-data.ts
|
|
26409
|
+
function updateKeyDefine2(target, keys) {
|
|
26410
|
+
keys.forEach((key) => {
|
|
26411
|
+
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
26412
|
+
Object.defineProperty(target, key, {
|
|
26413
|
+
enumerable: true,
|
|
26414
|
+
configurable: true,
|
|
26415
|
+
writable: true,
|
|
26416
|
+
value: void 0
|
|
26417
|
+
});
|
|
26418
|
+
}
|
|
26419
|
+
});
|
|
26420
|
+
}
|
|
26421
|
+
var PanelData = class {
|
|
26422
|
+
constructor(fields, origin) {
|
|
26423
|
+
const keyMap = {};
|
|
26424
|
+
const reverseKeyMap = {};
|
|
26425
|
+
fields.forEach((field) => {
|
|
26426
|
+
var _a;
|
|
26427
|
+
keyMap[field.id] = (_a = field.viewFieldName) == null ? void 0 : _a.toLowerCase();
|
|
26428
|
+
if (field.viewFieldName) {
|
|
26429
|
+
reverseKeyMap[field.viewFieldName.toLowerCase()] = field.id;
|
|
26430
|
+
}
|
|
26431
|
+
});
|
|
26432
|
+
return new Proxy(this, {
|
|
26433
|
+
set(target, p, value) {
|
|
26434
|
+
if (Object.prototype.hasOwnProperty.call(keyMap, p)) {
|
|
26435
|
+
if (keyMap[p]) {
|
|
26436
|
+
origin[keyMap[p]] = value;
|
|
26437
|
+
} else {
|
|
26438
|
+
target[p] = value;
|
|
26439
|
+
}
|
|
26440
|
+
} else {
|
|
26441
|
+
origin[keyMap[p]] = value;
|
|
26442
|
+
}
|
|
26443
|
+
return true;
|
|
26444
|
+
},
|
|
26445
|
+
get(target, p, _receiver) {
|
|
26446
|
+
if (keyMap[p]) {
|
|
26447
|
+
return origin[keyMap[p]];
|
|
26448
|
+
}
|
|
26449
|
+
if (Object.prototype.hasOwnProperty.call(origin, p)) {
|
|
26450
|
+
return origin[p];
|
|
26451
|
+
}
|
|
26452
|
+
return target[p];
|
|
26453
|
+
},
|
|
26454
|
+
ownKeys(target) {
|
|
26455
|
+
const allKeys = Object.keys(origin);
|
|
26456
|
+
updateKeyDefine2(target, allKeys);
|
|
26457
|
+
return allKeys;
|
|
26458
|
+
}
|
|
26459
|
+
});
|
|
26460
|
+
}
|
|
26461
|
+
};
|
|
26462
|
+
|
|
26243
26463
|
// src/service/mqtt/mqtt.service.ts
|
|
26244
26464
|
import { QXEvent as QXEvent2, createUUID as createUUID4, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
26245
26465
|
var MqttService = class {
|
|
@@ -26253,6 +26473,8 @@ var MqttService = class {
|
|
|
26253
26473
|
* @param {string} appId
|
|
26254
26474
|
*/
|
|
26255
26475
|
constructor(mqttTopic, token, appId) {
|
|
26476
|
+
this.mqttTopic = mqttTopic;
|
|
26477
|
+
this.token = token;
|
|
26256
26478
|
this.appId = appId;
|
|
26257
26479
|
/**
|
|
26258
26480
|
* 接受消息通知
|
|
@@ -26302,6 +26524,7 @@ var MqttService = class {
|
|
|
26302
26524
|
this.options
|
|
26303
26525
|
);
|
|
26304
26526
|
this.client.on("connect", () => {
|
|
26527
|
+
this.client.subscribe(this.mqttTopic);
|
|
26305
26528
|
ibiz.log.debug("mqtt connect");
|
|
26306
26529
|
});
|
|
26307
26530
|
this.client.on("error", (error) => {
|
|
@@ -26331,7 +26554,7 @@ var MqttService = class {
|
|
|
26331
26554
|
};
|
|
26332
26555
|
|
|
26333
26556
|
// src/service/de-service-util.ts
|
|
26334
|
-
import { RuntimeError as
|
|
26557
|
+
import { RuntimeError as RuntimeError17 } from "@ibiz-template/core";
|
|
26335
26558
|
var DEServiceUtil = class {
|
|
26336
26559
|
/**
|
|
26337
26560
|
* Creates an instance of DEServiceUtil.
|
|
@@ -26386,7 +26609,7 @@ var DEServiceUtil = class {
|
|
|
26386
26609
|
this.appModel.appId
|
|
26387
26610
|
);
|
|
26388
26611
|
if (!entityModel) {
|
|
26389
|
-
throw new
|
|
26612
|
+
throw new RuntimeError17("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
26390
26613
|
}
|
|
26391
26614
|
const constructor = this.constructorCache.get(id);
|
|
26392
26615
|
let service;
|
|
@@ -26449,7 +26672,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
26449
26672
|
const context = clone13(_context);
|
|
26450
26673
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
26451
26674
|
if (!appView) {
|
|
26452
|
-
throw new
|
|
26675
|
+
throw new RuntimeError18("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
26453
26676
|
}
|
|
26454
26677
|
if ((context.srfkey || params.srfuf === 0 /* CREATE */) && appView.appDataEntityId) {
|
|
26455
26678
|
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
@@ -26538,7 +26761,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
26538
26761
|
*/
|
|
26539
26762
|
async openPopover(appView, event, context, params = {}) {
|
|
26540
26763
|
if (!event) {
|
|
26541
|
-
throw new
|
|
26764
|
+
throw new RuntimeError18("\u6C14\u6CE1\u6253\u5F00\u7F3A\u5C11event");
|
|
26542
26765
|
}
|
|
26543
26766
|
return ibiz.openView.popover(appView.id, event, context, params);
|
|
26544
26767
|
}
|
|
@@ -26593,7 +26816,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
26593
26816
|
async exec(appFuncId, context, params = {}, opts = {}) {
|
|
26594
26817
|
const appFunc = ibiz.hub.getApp(context.srfappid).getAppFunc(appFuncId);
|
|
26595
26818
|
if (!appFunc) {
|
|
26596
|
-
throw new
|
|
26819
|
+
throw new RuntimeError19("\u627E\u4E0D\u5230\u53EB".concat(appFuncId, "\u7684\u5E94\u7528\u529F\u80FD"));
|
|
26597
26820
|
}
|
|
26598
26821
|
const { navigateContexts, navigateParams, appFuncType } = appFunc;
|
|
26599
26822
|
const _context = context.clone();
|
|
@@ -26627,7 +26850,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
26627
26850
|
*/
|
|
26628
26851
|
async openAppView(appFunc, context, params, opts) {
|
|
26629
26852
|
if (!appFunc.appViewId) {
|
|
26630
|
-
throw new
|
|
26853
|
+
throw new RuntimeError19("\u5E94\u7528\u89C6\u56FE[".concat(appFunc.appViewId, "]\u4E0D\u5B58\u5728"));
|
|
26631
26854
|
}
|
|
26632
26855
|
return ibiz.commands.execute(
|
|
26633
26856
|
OpenAppViewCommand.TAG,
|
|
@@ -26661,7 +26884,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
26661
26884
|
*/
|
|
26662
26885
|
openPdAppFunc(appFunc, context, params) {
|
|
26663
26886
|
ibiz.log.warn("openPdAppFunc", appFunc, context, params);
|
|
26664
|
-
throw new
|
|
26887
|
+
throw new RuntimeError19("\u672A\u5B9E\u73B0");
|
|
26665
26888
|
}
|
|
26666
26889
|
/**
|
|
26667
26890
|
* 执行 JavaScript 脚本
|
|
@@ -26675,7 +26898,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
26675
26898
|
*/
|
|
26676
26899
|
executeJavaScript(appFunc, context, params) {
|
|
26677
26900
|
ibiz.log.warn("executeJavaScript", appFunc, context, params);
|
|
26678
|
-
throw new
|
|
26901
|
+
throw new RuntimeError19("\u672A\u5B9E\u73B0");
|
|
26679
26902
|
}
|
|
26680
26903
|
/**
|
|
26681
26904
|
* 自定义应用功能
|
|
@@ -26689,7 +26912,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
26689
26912
|
*/
|
|
26690
26913
|
custom(appFunc, context, params) {
|
|
26691
26914
|
ibiz.log.warn("custom", appFunc, context, params);
|
|
26692
|
-
throw new
|
|
26915
|
+
throw new RuntimeError19("\u672A\u5B9E\u73B0");
|
|
26693
26916
|
}
|
|
26694
26917
|
};
|
|
26695
26918
|
/**
|
|
@@ -26710,7 +26933,7 @@ function installCommand() {
|
|
|
26710
26933
|
}
|
|
26711
26934
|
|
|
26712
26935
|
// src/app-hub.ts
|
|
26713
|
-
import { RuntimeError as
|
|
26936
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
26714
26937
|
|
|
26715
26938
|
// src/application.ts
|
|
26716
26939
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -26902,7 +27125,7 @@ var Convert = class {
|
|
|
26902
27125
|
};
|
|
26903
27126
|
|
|
26904
27127
|
// src/hub/config/app-view-config-service.ts
|
|
26905
|
-
import { RuntimeError as
|
|
27128
|
+
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
26906
27129
|
var AppViewConfigService = class {
|
|
26907
27130
|
constructor() {
|
|
26908
27131
|
/**
|
|
@@ -26922,7 +27145,7 @@ var AppViewConfigService = class {
|
|
|
26922
27145
|
if (!this.viewConfigs.has(key)) {
|
|
26923
27146
|
const model = await ibiz.hub.getAppView(key);
|
|
26924
27147
|
if (!model) {
|
|
26925
|
-
throw new
|
|
27148
|
+
throw new RuntimeError20("\u89C6\u56FE[".concat(key, "]\u4E0D\u5B58\u5728"));
|
|
26926
27149
|
}
|
|
26927
27150
|
this.set(model.id, {
|
|
26928
27151
|
id: model.id,
|
|
@@ -26978,14 +27201,14 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
26978
27201
|
|
|
26979
27202
|
// src/controller/common/view/view.controller.ts
|
|
26980
27203
|
import { createUUID as createUUID6, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
26981
|
-
import { IBizContext as IBizContext2, RuntimeError as
|
|
27204
|
+
import { IBizContext as IBizContext2, RuntimeError as RuntimeError27 } from "@ibiz-template/core";
|
|
26982
27205
|
import { isEmpty as isEmpty8, isNil as isNil17, isNotNil as isNotNil2 } from "ramda";
|
|
26983
27206
|
|
|
26984
27207
|
// src/controller/utils/loading/loading.state.ts
|
|
26985
27208
|
import { NOOP } from "@ibiz-template/core";
|
|
26986
27209
|
|
|
26987
27210
|
// src/controller/utils/counter/counter.ts
|
|
26988
|
-
import { RuntimeError as
|
|
27211
|
+
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
26989
27212
|
var Counter = class {
|
|
26990
27213
|
/**
|
|
26991
27214
|
* Creates an instance of Counter.
|
|
@@ -27047,7 +27270,7 @@ var Counter = class {
|
|
|
27047
27270
|
return;
|
|
27048
27271
|
}
|
|
27049
27272
|
if (this.count === 0) {
|
|
27050
|
-
throw new
|
|
27273
|
+
throw new RuntimeError21("\u9519\u8BEF\u7684\u8C03\u7528\uFF01decrement\u4E0D\u80FD\u5BF9count\u4E3A0\u8C03\u7528");
|
|
27051
27274
|
}
|
|
27052
27275
|
this.count -= 1;
|
|
27053
27276
|
if (this.count === 0) {
|
|
@@ -27602,7 +27825,7 @@ function getOriginData(data) {
|
|
|
27602
27825
|
}
|
|
27603
27826
|
|
|
27604
27827
|
// src/controller/utils/value-rule/value-rule.ts
|
|
27605
|
-
import { RuntimeError as
|
|
27828
|
+
import { RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
27606
27829
|
import { isNilOrEmpty as isNilOrEmpty7, isNumber } from "qx-util";
|
|
27607
27830
|
import { isNil as isNil13 } from "ramda";
|
|
27608
27831
|
function generateRules(itemVRs, name, valueItemName) {
|
|
@@ -27652,7 +27875,7 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
27652
27875
|
deRule.groupCond
|
|
27653
27876
|
);
|
|
27654
27877
|
if (!isPast) {
|
|
27655
|
-
callback(new
|
|
27878
|
+
callback(new RuntimeError22(infoMessage || deRule.ruleInfo));
|
|
27656
27879
|
}
|
|
27657
27880
|
return true;
|
|
27658
27881
|
},
|
|
@@ -27722,7 +27945,7 @@ function generateEditorRules(editor) {
|
|
|
27722
27945
|
}
|
|
27723
27946
|
|
|
27724
27947
|
// src/controller/utils/value-ex/value-ex.ts
|
|
27725
|
-
import { RuntimeError as
|
|
27948
|
+
import { RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
27726
27949
|
import { isNil as isNil14, mergeLeft } from "ramda";
|
|
27727
27950
|
var ValueExUtil = class {
|
|
27728
27951
|
/**
|
|
@@ -27754,7 +27977,7 @@ var ValueExUtil = class {
|
|
|
27754
27977
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
27755
27978
|
if (["OBJECTS", "OBJECT"].includes(valueType)) {
|
|
27756
27979
|
if (!objectNameField) {
|
|
27757
|
-
throw new
|
|
27980
|
+
throw new RuntimeError23("\u7F3A\u5C11objectNameField");
|
|
27758
27981
|
}
|
|
27759
27982
|
const textKey = objectNameField.toLowerCase();
|
|
27760
27983
|
if (valueType === "OBJECTS") {
|
|
@@ -27770,7 +27993,7 @@ var ValueExUtil = class {
|
|
|
27770
27993
|
};
|
|
27771
27994
|
|
|
27772
27995
|
// src/controller/utils/value-default/value-default.ts
|
|
27773
|
-
import { RuntimeError as
|
|
27996
|
+
import { RuntimeError as RuntimeError24, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
27774
27997
|
import dayjs from "dayjs";
|
|
27775
27998
|
import { createUUID as createUUID5 } from "qx-util";
|
|
27776
27999
|
import { isNil as isNil15, isNotNil } from "ramda";
|
|
@@ -27811,7 +28034,7 @@ function getDefaultValue(opts, origins) {
|
|
|
27811
28034
|
case "SESSION":
|
|
27812
28035
|
case "APPLICATION":
|
|
27813
28036
|
if (!((_a = ibiz.appData) == null ? void 0 : _a.context)) {
|
|
27814
|
-
throw new
|
|
28037
|
+
throw new RuntimeError24("appdata.context\u4E0D\u5B58\u5728");
|
|
27815
28038
|
}
|
|
27816
28039
|
return ibiz.appData.context[defaultValue];
|
|
27817
28040
|
case "CONTEXT":
|
|
@@ -27823,6 +28046,86 @@ function getDefaultValue(opts, origins) {
|
|
|
27823
28046
|
}
|
|
27824
28047
|
}
|
|
27825
28048
|
|
|
28049
|
+
// src/controller/utils/data-file-util/data-file-util.ts
|
|
28050
|
+
import {
|
|
28051
|
+
RuntimeError as RuntimeError25
|
|
28052
|
+
} from "@ibiz-template/core";
|
|
28053
|
+
var asyncImportUrl = "/asyncimportdata2";
|
|
28054
|
+
var importUrl = "/importdata2";
|
|
28055
|
+
function listenAsyncAction(id) {
|
|
28056
|
+
return new Promise((resolve) => {
|
|
28057
|
+
const callBack = (msg) => {
|
|
28058
|
+
const messageid = msg.messageid || msg.data.asyncacitonid;
|
|
28059
|
+
if (id === messageid && msg.data.actionstate === 30) {
|
|
28060
|
+
try {
|
|
28061
|
+
const result = JSON.parse(
|
|
28062
|
+
msg.data.actionresult
|
|
28063
|
+
);
|
|
28064
|
+
resolve(result);
|
|
28065
|
+
} catch (error) {
|
|
28066
|
+
throw new RuntimeError25("\u89E3\u6790\u6570\u636E\u53D1\u751F\u9519\u8BEF");
|
|
28067
|
+
} finally {
|
|
28068
|
+
ibiz.mc.command.asyncAction.off(callBack);
|
|
28069
|
+
}
|
|
28070
|
+
} else if (msg.data.actionstate === 40) {
|
|
28071
|
+
resolve({
|
|
28072
|
+
total: 0,
|
|
28073
|
+
success: 0,
|
|
28074
|
+
message: msg.data.actionresult
|
|
28075
|
+
});
|
|
28076
|
+
ibiz.mc.command.asyncAction.off(callBack);
|
|
28077
|
+
}
|
|
28078
|
+
};
|
|
28079
|
+
ibiz.mc.command.asyncAction.on(callBack);
|
|
28080
|
+
});
|
|
28081
|
+
}
|
|
28082
|
+
async function asyncImportData(file, appDataEntity) {
|
|
28083
|
+
const data = new FormData();
|
|
28084
|
+
data.append("file", file);
|
|
28085
|
+
const url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(asyncImportUrl);
|
|
28086
|
+
const res = await ibiz.net.request(url, {
|
|
28087
|
+
method: "post",
|
|
28088
|
+
data,
|
|
28089
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
28090
|
+
});
|
|
28091
|
+
return listenAsyncAction(res.data.asyncacitonid);
|
|
28092
|
+
}
|
|
28093
|
+
async function importData(file, appDataEntity) {
|
|
28094
|
+
const data = new FormData();
|
|
28095
|
+
data.append("file", file);
|
|
28096
|
+
const url = "".concat(appDataEntity.codeName2.toLowerCase(), "/").concat(importUrl);
|
|
28097
|
+
const res = await ibiz.net.request(url, {
|
|
28098
|
+
method: "post",
|
|
28099
|
+
data,
|
|
28100
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
28101
|
+
});
|
|
28102
|
+
return res.data;
|
|
28103
|
+
}
|
|
28104
|
+
async function exportData(header, data, fileName) {
|
|
28105
|
+
if (!ibiz.util.getExcelUtil) {
|
|
28106
|
+
throw new RuntimeError25("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
28107
|
+
}
|
|
28108
|
+
const exportExcel = await ibiz.util.getExcelUtil();
|
|
28109
|
+
if (!exportExcel) {
|
|
28110
|
+
throw new RuntimeError25("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
28111
|
+
}
|
|
28112
|
+
try {
|
|
28113
|
+
exportExcel.exportJsonToExcel({
|
|
28114
|
+
header,
|
|
28115
|
+
// 表头内容 数组格式
|
|
28116
|
+
data,
|
|
28117
|
+
// 具体数据 这是个二维数组
|
|
28118
|
+
filename: fileName,
|
|
28119
|
+
// 文件名称
|
|
28120
|
+
autoWidth: true
|
|
28121
|
+
// 单元格是否自适应
|
|
28122
|
+
});
|
|
28123
|
+
return { ok: true };
|
|
28124
|
+
} catch (error) {
|
|
28125
|
+
return { ok: false };
|
|
28126
|
+
}
|
|
28127
|
+
}
|
|
28128
|
+
|
|
27826
28129
|
// src/controller/common/base.controller.ts
|
|
27827
28130
|
var SELF_KEY = "__self";
|
|
27828
28131
|
var BaseController = class {
|
|
@@ -28030,7 +28333,7 @@ var BaseController = class {
|
|
|
28030
28333
|
};
|
|
28031
28334
|
|
|
28032
28335
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
28033
|
-
import { RuntimeError as
|
|
28336
|
+
import { RuntimeError as RuntimeError26, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
28034
28337
|
import { isNil as isNil16, mergeRight as mergeRight2 } from "ramda";
|
|
28035
28338
|
var ViewMsgController = class _ViewMsgController {
|
|
28036
28339
|
constructor(msgGroupId) {
|
|
@@ -28056,7 +28359,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
28056
28359
|
(item) => item.id === this.msgGroupId
|
|
28057
28360
|
);
|
|
28058
28361
|
if (!msgGroup) {
|
|
28059
|
-
throw new
|
|
28362
|
+
throw new RuntimeError26("\u627E\u4E0D\u5230\u89C6\u56FE\u6D88\u606F\u7EC4".concat(this.msgGroupId, "\u7684\u6A21\u578B"));
|
|
28060
28363
|
}
|
|
28061
28364
|
this.msgGroup = msgGroup;
|
|
28062
28365
|
const msgDetailsViewMsgIds = msgGroup.appViewMsgGroupDetails.map(
|
|
@@ -28070,7 +28373,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
28070
28373
|
}
|
|
28071
28374
|
});
|
|
28072
28375
|
if (msgDetailsViewMsgIds.length) {
|
|
28073
|
-
throw new
|
|
28376
|
+
throw new RuntimeError26(
|
|
28074
28377
|
"\u6CA1\u6709\u627E\u5230".concat(msgDetailsViewMsgIds.join(","), "\u89C6\u56FE\u6D88\u606F\u6A21\u578B")
|
|
28075
28378
|
);
|
|
28076
28379
|
}
|
|
@@ -28473,7 +28776,7 @@ var ViewController = class extends BaseController {
|
|
|
28473
28776
|
async callUIAction(key, args) {
|
|
28474
28777
|
const result = this.call(key, args);
|
|
28475
28778
|
if (result === void 0) {
|
|
28476
|
-
throw new
|
|
28779
|
+
throw new RuntimeError27("\u6CA1\u6709\u5F15\u64CE\u652F\u6301\u9884\u7F6E\u754C\u9762\u884C\u4E3A".concat(key));
|
|
28477
28780
|
}
|
|
28478
28781
|
return result;
|
|
28479
28782
|
}
|
|
@@ -29059,7 +29362,8 @@ var ControlController = class extends BaseController {
|
|
|
29059
29362
|
};
|
|
29060
29363
|
|
|
29061
29364
|
// src/controller/common/control/md-control.controller.ts
|
|
29062
|
-
import { isElementSame, RuntimeError as
|
|
29365
|
+
import { isElementSame, RuntimeError as RuntimeError28 } from "@ibiz-template/core";
|
|
29366
|
+
import { debounce } from "lodash-es";
|
|
29063
29367
|
var MDControlController = class extends ControlController {
|
|
29064
29368
|
constructor() {
|
|
29065
29369
|
super(...arguments);
|
|
@@ -29098,7 +29402,10 @@ var MDControlController = class extends ControlController {
|
|
|
29098
29402
|
(_a = this.dataEntity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
29099
29403
|
this.fieldIdNameMap.set(field.id, field.name);
|
|
29100
29404
|
});
|
|
29101
|
-
|
|
29405
|
+
const fn = this.onDataChange.bind(this);
|
|
29406
|
+
this.onDataChange = debounce((msg) => {
|
|
29407
|
+
fn(msg);
|
|
29408
|
+
}, 300);
|
|
29102
29409
|
ibiz.mc.command.change.on(this.onDataChange);
|
|
29103
29410
|
this.setSort();
|
|
29104
29411
|
}
|
|
@@ -29247,7 +29554,7 @@ var MDControlController = class extends ControlController {
|
|
|
29247
29554
|
async remove(args) {
|
|
29248
29555
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
29249
29556
|
if (!(data == null ? void 0 : data.length)) {
|
|
29250
|
-
throw new
|
|
29557
|
+
throw new RuntimeError28("\u672A\u9009\u4E2D\u6570\u636E");
|
|
29251
29558
|
}
|
|
29252
29559
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
29253
29560
|
const del = await ibiz.confirm.error({
|
|
@@ -29376,6 +29683,28 @@ var MDControlController = class extends ControlController {
|
|
|
29376
29683
|
* @returns {*} {Promise<void>}
|
|
29377
29684
|
*/
|
|
29378
29685
|
async importData() {
|
|
29686
|
+
var _a;
|
|
29687
|
+
const { appDataEntityId, dedataImportId } = this.model;
|
|
29688
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(appDataEntityId);
|
|
29689
|
+
const dataImport = (_a = appDataEntity.appDEDataImports) == null ? void 0 : _a.find(
|
|
29690
|
+
(importItem) => importItem.id === dedataImportId
|
|
29691
|
+
);
|
|
29692
|
+
if (!dataImport) {
|
|
29693
|
+
throw new RuntimeError28("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
29694
|
+
}
|
|
29695
|
+
const modal = ibiz.overlay.createModal(
|
|
29696
|
+
"DataImport",
|
|
29697
|
+
{
|
|
29698
|
+
dismiss: () => modal.dismiss(),
|
|
29699
|
+
appDataEntity
|
|
29700
|
+
},
|
|
29701
|
+
{
|
|
29702
|
+
width: "auto",
|
|
29703
|
+
placement: "center"
|
|
29704
|
+
}
|
|
29705
|
+
);
|
|
29706
|
+
modal.present();
|
|
29707
|
+
await modal.onWillDismiss();
|
|
29379
29708
|
}
|
|
29380
29709
|
/**
|
|
29381
29710
|
* 数据导出
|
|
@@ -29391,7 +29720,7 @@ var MDControlController = class extends ControlController {
|
|
|
29391
29720
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
29392
29721
|
import {
|
|
29393
29722
|
findRecursiveChild,
|
|
29394
|
-
RuntimeError as
|
|
29723
|
+
RuntimeError as RuntimeError29,
|
|
29395
29724
|
RuntimeModelError as RuntimeModelError22
|
|
29396
29725
|
} from "@ibiz-template/core";
|
|
29397
29726
|
var AppMenuController = class extends ControlController {
|
|
@@ -29431,7 +29760,7 @@ var AppMenuController = class extends ControlController {
|
|
|
29431
29760
|
childrenFields: ["appMenuItems"]
|
|
29432
29761
|
});
|
|
29433
29762
|
if (!menuItem) {
|
|
29434
|
-
throw new
|
|
29763
|
+
throw new RuntimeError29("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
29435
29764
|
}
|
|
29436
29765
|
this.evt.emit("onClick", {
|
|
29437
29766
|
eventArg: id,
|
|
@@ -29521,7 +29850,7 @@ var AppMenuController = class extends ControlController {
|
|
|
29521
29850
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
29522
29851
|
import {
|
|
29523
29852
|
findRecursiveChild as findRecursiveChild2,
|
|
29524
|
-
RuntimeError as
|
|
29853
|
+
RuntimeError as RuntimeError30,
|
|
29525
29854
|
RuntimeModelError as RuntimeModelError23
|
|
29526
29855
|
} from "@ibiz-template/core";
|
|
29527
29856
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -29531,7 +29860,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
29531
29860
|
childrenFields: ["appMenuItems"]
|
|
29532
29861
|
});
|
|
29533
29862
|
if (!menuItem) {
|
|
29534
|
-
throw new
|
|
29863
|
+
throw new RuntimeError30("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
29535
29864
|
}
|
|
29536
29865
|
this.evt.emit("onClick", {
|
|
29537
29866
|
eventArg: id,
|
|
@@ -29559,7 +29888,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
29559
29888
|
import dayjs2 from "dayjs";
|
|
29560
29889
|
|
|
29561
29890
|
// src/controller/control/calendar/calendar.service.ts
|
|
29562
|
-
import { RuntimeError as
|
|
29891
|
+
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
29563
29892
|
var CalendarService = class extends MDControlService {
|
|
29564
29893
|
/**
|
|
29565
29894
|
* 执行查询多条数据的方法
|
|
@@ -29609,11 +29938,11 @@ var CalendarService = class extends MDControlService {
|
|
|
29609
29938
|
setCalendarConfigData(items, index) {
|
|
29610
29939
|
const { sysCalendarItems } = this.model;
|
|
29611
29940
|
if (!sysCalendarItems) {
|
|
29612
|
-
throw new
|
|
29941
|
+
throw new RuntimeError31("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
29613
29942
|
}
|
|
29614
29943
|
const calendarItem = sysCalendarItems[index];
|
|
29615
29944
|
if (!calendarItem) {
|
|
29616
|
-
throw new
|
|
29945
|
+
throw new RuntimeError31("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
29617
29946
|
}
|
|
29618
29947
|
return items.map((item) => {
|
|
29619
29948
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -29803,11 +30132,11 @@ var CalendarController = class extends MDControlController {
|
|
|
29803
30132
|
};
|
|
29804
30133
|
|
|
29805
30134
|
// src/controller/control/chart/chart.controller.ts
|
|
29806
|
-
import { RuntimeError as
|
|
30135
|
+
import { RuntimeError as RuntimeError33 } from "@ibiz-template/core";
|
|
29807
30136
|
|
|
29808
30137
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
29809
30138
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
29810
|
-
import { RuntimeError as
|
|
30139
|
+
import { RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
29811
30140
|
|
|
29812
30141
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
29813
30142
|
import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
@@ -30750,7 +31079,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
30750
31079
|
getSrfkeyByParams(params) {
|
|
30751
31080
|
const generator = this.seriesGenerators[params.seriesIndex];
|
|
30752
31081
|
if (!generator) {
|
|
30753
|
-
throw new
|
|
31082
|
+
throw new RuntimeError32("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
30754
31083
|
}
|
|
30755
31084
|
return generator.getSrfkeyByParams(params);
|
|
30756
31085
|
}
|
|
@@ -30862,10 +31191,10 @@ var ChartController = class extends MDControlController {
|
|
|
30862
31191
|
*/
|
|
30863
31192
|
updateChart() {
|
|
30864
31193
|
if (!this.chart) {
|
|
30865
|
-
throw new
|
|
31194
|
+
throw new RuntimeError33("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
30866
31195
|
}
|
|
30867
31196
|
if (!this.options) {
|
|
30868
|
-
throw new
|
|
31197
|
+
throw new RuntimeError33("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
30869
31198
|
}
|
|
30870
31199
|
this.chart.setOption(this.options);
|
|
30871
31200
|
this.resizeChart();
|
|
@@ -30910,7 +31239,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
30910
31239
|
};
|
|
30911
31240
|
|
|
30912
31241
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
30913
|
-
import { recursiveIterate, RuntimeError as
|
|
31242
|
+
import { recursiveIterate, RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
30914
31243
|
|
|
30915
31244
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
30916
31245
|
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
@@ -30920,7 +31249,7 @@ import { isArray as isArray9 } from "qx-util";
|
|
|
30920
31249
|
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
30921
31250
|
|
|
30922
31251
|
// src/ui-logic/index.ts
|
|
30923
|
-
import { RuntimeError as
|
|
31252
|
+
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
30924
31253
|
|
|
30925
31254
|
// src/ui-logic/ui-logic.ts
|
|
30926
31255
|
import { ModelError as ModelError24, RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
@@ -30999,6 +31328,7 @@ var UILogicContext = class {
|
|
|
30999
31328
|
}
|
|
31000
31329
|
/**
|
|
31001
31330
|
* 重置实体逻辑参数
|
|
31331
|
+
*
|
|
31002
31332
|
* @author lxm
|
|
31003
31333
|
* @date 2023-03-24 09:18:02
|
|
31004
31334
|
* @param {string} name
|
|
@@ -31009,6 +31339,7 @@ var UILogicContext = class {
|
|
|
31009
31339
|
}
|
|
31010
31340
|
/**
|
|
31011
31341
|
* 重新建立变量
|
|
31342
|
+
*
|
|
31012
31343
|
* @author lxm
|
|
31013
31344
|
* @date 2023-03-24 09:20:24
|
|
31014
31345
|
* @param {string} name
|
|
@@ -31019,6 +31350,7 @@ var UILogicContext = class {
|
|
|
31019
31350
|
}
|
|
31020
31351
|
/**
|
|
31021
31352
|
* 设置上一次返回值
|
|
31353
|
+
*
|
|
31022
31354
|
* @author lxm
|
|
31023
31355
|
* @date 2023-09-04 09:23:52
|
|
31024
31356
|
* @param {unknown} value
|
|
@@ -31028,6 +31360,7 @@ var UILogicContext = class {
|
|
|
31028
31360
|
}
|
|
31029
31361
|
/**
|
|
31030
31362
|
* 初始化上一次返回参数类型的逻辑参数
|
|
31363
|
+
*
|
|
31031
31364
|
* @author lxm
|
|
31032
31365
|
* @date 2023-09-04 09:52:00
|
|
31033
31366
|
* @param {string} tag
|
|
@@ -31041,6 +31374,7 @@ var UILogicContext = class {
|
|
|
31041
31374
|
}
|
|
31042
31375
|
/**
|
|
31043
31376
|
* 是否是实体参数变量(即后台数据对象)
|
|
31377
|
+
*
|
|
31044
31378
|
* @author lxm
|
|
31045
31379
|
* @date 2023-09-22 03:40:30
|
|
31046
31380
|
* @param {string} paramId
|
|
@@ -31451,7 +31785,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
31451
31785
|
};
|
|
31452
31786
|
|
|
31453
31787
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
31454
|
-
import { ModelError as ModelError21, RuntimeError as
|
|
31788
|
+
import { ModelError as ModelError21, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
31455
31789
|
import { clone as clone16 } from "ramda";
|
|
31456
31790
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
31457
31791
|
async exec(ctx) {
|
|
@@ -31501,7 +31835,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
31501
31835
|
setParamValue(nodeParam, ctx) {
|
|
31502
31836
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
31503
31837
|
if (!dstDEUILogicParamId) {
|
|
31504
|
-
throw new
|
|
31838
|
+
throw new RuntimeError34("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
31505
31839
|
}
|
|
31506
31840
|
let dstField = dstFieldName;
|
|
31507
31841
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -31618,7 +31952,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
31618
31952
|
};
|
|
31619
31953
|
|
|
31620
31954
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
31621
|
-
import { RuntimeError as
|
|
31955
|
+
import { RuntimeError as RuntimeError35, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
31622
31956
|
import { isFunction } from "lodash-es";
|
|
31623
31957
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
31624
31958
|
async exec(ctx) {
|
|
@@ -31635,14 +31969,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
31635
31969
|
}
|
|
31636
31970
|
const invokeParam = ctx.params[invokeParamId];
|
|
31637
31971
|
if (!invokeParam) {
|
|
31638
|
-
throw new
|
|
31972
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
31639
31973
|
}
|
|
31640
31974
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
31641
31975
|
if (!invokeCtrl) {
|
|
31642
|
-
throw new
|
|
31976
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
31643
31977
|
}
|
|
31644
31978
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
31645
|
-
throw new
|
|
31979
|
+
throw new RuntimeError35("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
31646
31980
|
}
|
|
31647
31981
|
await invokeCtrl[invokeMethod](invokeParam);
|
|
31648
31982
|
}
|
|
@@ -31731,6 +32065,16 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
31731
32065
|
}
|
|
31732
32066
|
};
|
|
31733
32067
|
|
|
32068
|
+
// src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts
|
|
32069
|
+
var PFPluginNode = class extends UILogicNode {
|
|
32070
|
+
async exec(ctx) {
|
|
32071
|
+
const provider = await getUILogicNodeProvider(this.model);
|
|
32072
|
+
if (provider) {
|
|
32073
|
+
await provider.exec(this.model, ctx);
|
|
32074
|
+
}
|
|
32075
|
+
}
|
|
32076
|
+
};
|
|
32077
|
+
|
|
31734
32078
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
31735
32079
|
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
31736
32080
|
var DebugParamNode = class extends UILogicNode {
|
|
@@ -31858,16 +32202,16 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
31858
32202
|
};
|
|
31859
32203
|
|
|
31860
32204
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
31861
|
-
import { RuntimeError as
|
|
32205
|
+
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
31862
32206
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
31863
32207
|
async exec(_ctx) {
|
|
31864
32208
|
const { errorInfo } = this.model;
|
|
31865
|
-
throw new
|
|
32209
|
+
throw new RuntimeError36(errorInfo);
|
|
31866
32210
|
}
|
|
31867
32211
|
};
|
|
31868
32212
|
|
|
31869
32213
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
31870
|
-
import { RuntimeError as
|
|
32214
|
+
import { RuntimeError as RuntimeError37, RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
31871
32215
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
31872
32216
|
async exec(ctx) {
|
|
31873
32217
|
ctx.isEndNode = true;
|
|
@@ -31883,18 +32227,18 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
31883
32227
|
}
|
|
31884
32228
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
31885
32229
|
if (!invokeCtrl) {
|
|
31886
|
-
throw new
|
|
32230
|
+
throw new RuntimeError37("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
31887
32231
|
}
|
|
31888
32232
|
const eventParam = ctx.params[eventParamId];
|
|
31889
32233
|
if (!eventParam) {
|
|
31890
|
-
throw new
|
|
32234
|
+
throw new RuntimeError37("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
31891
32235
|
}
|
|
31892
32236
|
await invokeCtrl.evt.emit(eventName, eventParam);
|
|
31893
32237
|
}
|
|
31894
32238
|
};
|
|
31895
32239
|
|
|
31896
32240
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
31897
|
-
import { RuntimeError as
|
|
32241
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
31898
32242
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
31899
32243
|
async exec(ctx) {
|
|
31900
32244
|
const {
|
|
@@ -31914,7 +32258,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
31914
32258
|
}
|
|
31915
32259
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
31916
32260
|
if (!dstParam) {
|
|
31917
|
-
throw new
|
|
32261
|
+
throw new RuntimeError38("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
31918
32262
|
}
|
|
31919
32263
|
const result = await execDELogicById(
|
|
31920
32264
|
dstAppDELogicId,
|
|
@@ -32116,6 +32460,8 @@ var UILogic = class {
|
|
|
32116
32460
|
logicNode = new ExecuteDELogicNode(node);
|
|
32117
32461
|
break;
|
|
32118
32462
|
case "PFPLUGIN":
|
|
32463
|
+
logicNode = new PFPluginNode(node);
|
|
32464
|
+
break;
|
|
32119
32465
|
default:
|
|
32120
32466
|
throw new ModelError24(node, "\u672A\u652F\u6301\u7684\u903B\u8F91\u8282\u70B9\u7C7B\u578B: ".concat(logicNodeType));
|
|
32121
32467
|
}
|
|
@@ -32216,7 +32562,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
32216
32562
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
32217
32563
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
32218
32564
|
if (!deUILogic) {
|
|
32219
|
-
throw new
|
|
32565
|
+
throw new RuntimeError39(
|
|
32220
32566
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
32221
32567
|
);
|
|
32222
32568
|
}
|
|
@@ -32229,7 +32575,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
32229
32575
|
}
|
|
32230
32576
|
|
|
32231
32577
|
// src/ui-action/uiaction-util.ts
|
|
32232
|
-
import { RuntimeError as
|
|
32578
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
32233
32579
|
var UIActionUtil = class {
|
|
32234
32580
|
/**
|
|
32235
32581
|
* 执行界面行为
|
|
@@ -32244,7 +32590,7 @@ var UIActionUtil = class {
|
|
|
32244
32590
|
static async exec(actionId, params) {
|
|
32245
32591
|
const action = await getUIActionById(actionId);
|
|
32246
32592
|
if (!action) {
|
|
32247
|
-
throw new
|
|
32593
|
+
throw new RuntimeError40("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
32248
32594
|
}
|
|
32249
32595
|
if (action.actionTarget === "SINGLEDATA") {
|
|
32250
32596
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -32774,7 +33120,7 @@ var ToolbarController = class extends ControlController {
|
|
|
32774
33120
|
const actionId = item.uiactionId;
|
|
32775
33121
|
const uiAction = await getUIActionById(actionId);
|
|
32776
33122
|
if (!uiAction) {
|
|
32777
|
-
throw new
|
|
33123
|
+
throw new RuntimeError41("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
32778
33124
|
}
|
|
32779
33125
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
32780
33126
|
if (enableLoading) {
|
|
@@ -33796,7 +34142,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
33796
34142
|
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
33797
34143
|
|
|
33798
34144
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
33799
|
-
import { RuntimeError as
|
|
34145
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
33800
34146
|
var ExpBarControlController = class extends ControlController {
|
|
33801
34147
|
constructor() {
|
|
33802
34148
|
super(...arguments);
|
|
@@ -34110,7 +34456,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
34110
34456
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
34111
34457
|
return this.XDataModel.navAppViewId;
|
|
34112
34458
|
}
|
|
34113
|
-
throw new
|
|
34459
|
+
throw new RuntimeError42("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
34114
34460
|
}
|
|
34115
34461
|
/**
|
|
34116
34462
|
* 获取导航视图
|
|
@@ -34253,7 +34599,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
34253
34599
|
};
|
|
34254
34600
|
|
|
34255
34601
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
34256
|
-
import { RuntimeError as
|
|
34602
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
34257
34603
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
34258
34604
|
constructor() {
|
|
34259
34605
|
super(...arguments);
|
|
@@ -34328,7 +34674,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
34328
34674
|
const deData = node.deData || node;
|
|
34329
34675
|
const nodeModel = this.getNodeModel(node.nodeId);
|
|
34330
34676
|
if (!nodeModel) {
|
|
34331
|
-
throw new
|
|
34677
|
+
throw new RuntimeError43("\u627E\u4E0D\u5230".concat(node.nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
34332
34678
|
}
|
|
34333
34679
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
34334
34680
|
result.context.currentSrfNav = nodeId;
|
|
@@ -34899,9 +35245,9 @@ var FormDetailController = class {
|
|
|
34899
35245
|
* @protected
|
|
34900
35246
|
*/
|
|
34901
35247
|
this.dynaLogicResult = {
|
|
34902
|
-
visible:
|
|
34903
|
-
disabled:
|
|
34904
|
-
required:
|
|
35248
|
+
visible: void 0,
|
|
35249
|
+
disabled: void 0,
|
|
35250
|
+
required: void 0
|
|
34905
35251
|
};
|
|
34906
35252
|
this.model = model;
|
|
34907
35253
|
this.form = form;
|
|
@@ -35075,16 +35421,18 @@ var FormDetailController = class {
|
|
|
35075
35421
|
* @param {IData} data
|
|
35076
35422
|
*/
|
|
35077
35423
|
calcDetailDisabled(data) {
|
|
35078
|
-
let
|
|
35079
|
-
if (
|
|
35424
|
+
let { disabled } = this.dynaLogicResult;
|
|
35425
|
+
if (disabled !== true && this.form.scheduler) {
|
|
35080
35426
|
const itemEnable = this.form.scheduler.triggerItemEnable(this.model.id, {
|
|
35081
35427
|
data: [data]
|
|
35082
35428
|
});
|
|
35083
35429
|
if (itemEnable !== void 0) {
|
|
35084
|
-
|
|
35430
|
+
disabled = !itemEnable;
|
|
35085
35431
|
}
|
|
35086
35432
|
}
|
|
35087
|
-
|
|
35433
|
+
if (disabled !== void 0) {
|
|
35434
|
+
this.state.disabled = disabled;
|
|
35435
|
+
}
|
|
35088
35436
|
}
|
|
35089
35437
|
/**
|
|
35090
35438
|
* 计算项的显示状态
|
|
@@ -35093,7 +35441,7 @@ var FormDetailController = class {
|
|
|
35093
35441
|
*/
|
|
35094
35442
|
calcDetailVisible(data) {
|
|
35095
35443
|
let { visible } = this.dynaLogicResult;
|
|
35096
|
-
if (visible && this.form.scheduler) {
|
|
35444
|
+
if (visible !== false && this.form.scheduler) {
|
|
35097
35445
|
const itemVIsible = this.form.scheduler.triggerItemVisible(
|
|
35098
35446
|
this.model.id,
|
|
35099
35447
|
{
|
|
@@ -35104,7 +35452,9 @@ var FormDetailController = class {
|
|
|
35104
35452
|
visible = itemVIsible;
|
|
35105
35453
|
}
|
|
35106
35454
|
}
|
|
35107
|
-
|
|
35455
|
+
if (visible !== void 0) {
|
|
35456
|
+
this.state.visible = visible;
|
|
35457
|
+
}
|
|
35108
35458
|
}
|
|
35109
35459
|
/**
|
|
35110
35460
|
* 计算项的必填状态
|
|
@@ -35112,8 +35462,8 @@ var FormDetailController = class {
|
|
|
35112
35462
|
* @param {IData} data
|
|
35113
35463
|
*/
|
|
35114
35464
|
calcDetailRequired(data) {
|
|
35115
|
-
let
|
|
35116
|
-
if (
|
|
35465
|
+
let { required } = this.dynaLogicResult;
|
|
35466
|
+
if (required !== true && this.form.scheduler) {
|
|
35117
35467
|
const itemAllowEmpty = this.form.scheduler.triggerItemBlank(
|
|
35118
35468
|
this.model.id,
|
|
35119
35469
|
{
|
|
@@ -35121,10 +35471,12 @@ var FormDetailController = class {
|
|
|
35121
35471
|
}
|
|
35122
35472
|
);
|
|
35123
35473
|
if (itemAllowEmpty !== void 0) {
|
|
35124
|
-
|
|
35474
|
+
required = !itemAllowEmpty;
|
|
35125
35475
|
}
|
|
35126
35476
|
}
|
|
35127
|
-
|
|
35477
|
+
if (required !== void 0) {
|
|
35478
|
+
this.state.required = required;
|
|
35479
|
+
}
|
|
35128
35480
|
}
|
|
35129
35481
|
};
|
|
35130
35482
|
|
|
@@ -35423,8 +35775,8 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
35423
35775
|
super.onInit();
|
|
35424
35776
|
await this.initActionStates();
|
|
35425
35777
|
}
|
|
35426
|
-
async formStateNotify(
|
|
35427
|
-
super.
|
|
35778
|
+
async formStateNotify(state) {
|
|
35779
|
+
super.formStateNotify(state);
|
|
35428
35780
|
if (this.state.actionGroupState) {
|
|
35429
35781
|
this.state.actionGroupState.update(this.form.data.getOrigin());
|
|
35430
35782
|
}
|
|
@@ -35837,10 +36189,11 @@ var FormMDCtrlContentTypeController = class {
|
|
|
35837
36189
|
* @memberof FormMDCtrlController
|
|
35838
36190
|
*/
|
|
35839
36191
|
onDataRemove(index) {
|
|
36192
|
+
var _a;
|
|
35840
36193
|
if (index < 0) {
|
|
35841
36194
|
return;
|
|
35842
36195
|
}
|
|
35843
|
-
this.parent.state.contentCtrlData.splice(index, 1);
|
|
36196
|
+
(_a = this.parent.state.contentCtrlData) == null ? void 0 : _a.splice(index, 1);
|
|
35844
36197
|
this.parent.setFormDataValue();
|
|
35845
36198
|
}
|
|
35846
36199
|
/**
|
|
@@ -35852,7 +36205,8 @@ var FormMDCtrlContentTypeController = class {
|
|
|
35852
36205
|
* @memberof FormMDCtrlContentTypeController
|
|
35853
36206
|
*/
|
|
35854
36207
|
onDataInsert(data) {
|
|
35855
|
-
|
|
36208
|
+
var _a;
|
|
36209
|
+
(_a = this.parent.state.contentCtrlData) == null ? void 0 : _a.push(data || {});
|
|
35856
36210
|
this.parent.setFormDataValue();
|
|
35857
36211
|
}
|
|
35858
36212
|
/**
|
|
@@ -35891,8 +36245,11 @@ var FormMDCtrlContentTypeController = class {
|
|
|
35891
36245
|
}
|
|
35892
36246
|
};
|
|
35893
36247
|
|
|
36248
|
+
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
36249
|
+
import { clone as clone19 } from "ramda";
|
|
36250
|
+
|
|
35894
36251
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-control/form-mdctrl-control.controller.ts
|
|
35895
|
-
import { RuntimeError as
|
|
36252
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
35896
36253
|
var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController {
|
|
35897
36254
|
/**
|
|
35898
36255
|
* 初始化
|
|
@@ -35907,7 +36264,7 @@ var FormMDCtrlControlController = class extends FormMDCtrlContentTypeController
|
|
|
35907
36264
|
const { model } = this.parent;
|
|
35908
36265
|
const { contentControl } = model;
|
|
35909
36266
|
if (!contentControl) {
|
|
35910
|
-
throw new
|
|
36267
|
+
throw new RuntimeError44("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
35911
36268
|
}
|
|
35912
36269
|
this.controlModel = contentControl;
|
|
35913
36270
|
const controlProvider = await getControlProvider(this.controlModel);
|
|
@@ -36017,10 +36374,10 @@ import { isArray as isArray10 } from "lodash-es";
|
|
|
36017
36374
|
import {
|
|
36018
36375
|
awaitTimeout,
|
|
36019
36376
|
mergeInLeft,
|
|
36020
|
-
RuntimeError as
|
|
36377
|
+
RuntimeError as RuntimeError45,
|
|
36021
36378
|
mergeDefaultInLeft as mergeDefaultInLeft2
|
|
36022
36379
|
} from "@ibiz-template/core";
|
|
36023
|
-
import { debounce } from "lodash-es";
|
|
36380
|
+
import { debounce as debounce2 } from "lodash-es";
|
|
36024
36381
|
import { createUUID as createUUID8 } from "qx-util";
|
|
36025
36382
|
import { clone as clone18 } from "ramda";
|
|
36026
36383
|
|
|
@@ -36319,7 +36676,7 @@ var EditFormController = class extends FormController {
|
|
|
36319
36676
|
await super.onCreated();
|
|
36320
36677
|
this.service = new EditFormService(this.model);
|
|
36321
36678
|
await this.service.init(this.context);
|
|
36322
|
-
this.autoSave =
|
|
36679
|
+
this.autoSave = debounce2(this.autoSave.bind(this), 500, {
|
|
36323
36680
|
trailing: true
|
|
36324
36681
|
});
|
|
36325
36682
|
}
|
|
@@ -36462,7 +36819,7 @@ var EditFormController = class extends FormController {
|
|
|
36462
36819
|
}
|
|
36463
36820
|
const isValid = await this.validate();
|
|
36464
36821
|
if (!isValid) {
|
|
36465
|
-
throw new
|
|
36822
|
+
throw new RuntimeError45("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
36466
36823
|
}
|
|
36467
36824
|
await this.startLoading();
|
|
36468
36825
|
await this.evt.emit("onBeforeSave", void 0);
|
|
@@ -36575,7 +36932,7 @@ var EditFormController = class extends FormController {
|
|
|
36575
36932
|
(item) => item.id === formItemUpdateId
|
|
36576
36933
|
);
|
|
36577
36934
|
if (!formItemUpdate) {
|
|
36578
|
-
throw new
|
|
36935
|
+
throw new RuntimeError45("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
36579
36936
|
}
|
|
36580
36937
|
const { appDEMethodId, defiupdateDetails, customCode, scriptCode } = formItemUpdate;
|
|
36581
36938
|
const updateItems = defiupdateDetails == null ? void 0 : defiupdateDetails.map((item) => item.id);
|
|
@@ -36619,12 +36976,15 @@ var EditFormController = class extends FormController {
|
|
|
36619
36976
|
async wfStart(args) {
|
|
36620
36977
|
const isValid = await this.validate();
|
|
36621
36978
|
if (!isValid) {
|
|
36622
|
-
throw new
|
|
36979
|
+
throw new RuntimeError45("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
36623
36980
|
}
|
|
36624
36981
|
await this.startLoading();
|
|
36625
36982
|
const { context, params } = this.handlerAbilityParams(args);
|
|
36626
36983
|
try {
|
|
36627
36984
|
await this.service.wfStart(context, params, this.data);
|
|
36985
|
+
if (this.view.modal.mode === "ROUTE") {
|
|
36986
|
+
ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
|
|
36987
|
+
}
|
|
36628
36988
|
} catch (error) {
|
|
36629
36989
|
this.actionNotification("WFSTARTERROR", {
|
|
36630
36990
|
error
|
|
@@ -36646,12 +37006,15 @@ var EditFormController = class extends FormController {
|
|
|
36646
37006
|
async wfSubmit(args) {
|
|
36647
37007
|
const isValid = await this.validate();
|
|
36648
37008
|
if (!isValid) {
|
|
36649
|
-
throw new
|
|
37009
|
+
throw new RuntimeError45("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
36650
37010
|
}
|
|
36651
37011
|
await this.startLoading();
|
|
36652
37012
|
const { context, params } = this.handlerAbilityParams(args);
|
|
36653
37013
|
try {
|
|
36654
37014
|
await this.service.wfSubmit(context, params, this.data);
|
|
37015
|
+
if (this.view.modal.mode === "ROUTE") {
|
|
37016
|
+
ibiz.mc.command.send(this.data.$origin, "OBJECTUPDATED");
|
|
37017
|
+
}
|
|
36655
37018
|
} catch (error) {
|
|
36656
37019
|
this.actionNotification("WFSUBMITERROR", {
|
|
36657
37020
|
error
|
|
@@ -36871,7 +37234,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlControlController {
|
|
|
36871
37234
|
};
|
|
36872
37235
|
|
|
36873
37236
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-grid/form-mdctrl-grid.controller.ts
|
|
36874
|
-
import { RuntimeError as
|
|
37237
|
+
import { RuntimeError as RuntimeError46, mergeInLeft as mergeInLeft3 } from "@ibiz-template/core";
|
|
36875
37238
|
var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
36876
37239
|
constructor() {
|
|
36877
37240
|
super(...arguments);
|
|
@@ -36976,7 +37339,7 @@ var FormMDCtrlGridController = class extends FormMDCtrlControlController {
|
|
|
36976
37339
|
const { model } = this.parent;
|
|
36977
37340
|
const { contentControl } = model;
|
|
36978
37341
|
if (!contentControl) {
|
|
36979
|
-
throw new
|
|
37342
|
+
throw new RuntimeError46("\u8868\u5355\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5D4C\u5165\u90E8\u4EF6");
|
|
36980
37343
|
}
|
|
36981
37344
|
mergeInLeft3(contentControl, { enableRowEdit: true, enableRowNew: true });
|
|
36982
37345
|
this.controlModel = contentControl;
|
|
@@ -37284,6 +37647,28 @@ var FormMDCtrlState = class extends FormDetailState {
|
|
|
37284
37647
|
|
|
37285
37648
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
37286
37649
|
var FormMDCtrlController = class extends FormDetailController {
|
|
37650
|
+
/**
|
|
37651
|
+
* 是否显示添加按钮
|
|
37652
|
+
*
|
|
37653
|
+
* @memberof FormMDCtrlController
|
|
37654
|
+
*/
|
|
37655
|
+
get isCreate() {
|
|
37656
|
+
if (this.model.buildInActions) {
|
|
37657
|
+
return [1, 3, 5, 7].includes(this.model.buildInActions);
|
|
37658
|
+
}
|
|
37659
|
+
return false;
|
|
37660
|
+
}
|
|
37661
|
+
/**
|
|
37662
|
+
* 是否显示删除按钮
|
|
37663
|
+
*
|
|
37664
|
+
* @memberof FormMDCtrlController
|
|
37665
|
+
*/
|
|
37666
|
+
get isDelete() {
|
|
37667
|
+
if (this.model.buildInActions) {
|
|
37668
|
+
return [4, 5, 6, 7].includes(this.model.buildInActions);
|
|
37669
|
+
}
|
|
37670
|
+
return false;
|
|
37671
|
+
}
|
|
37287
37672
|
/**
|
|
37288
37673
|
* Creates an instance of FormMDCtrlController.
|
|
37289
37674
|
*
|
|
@@ -37362,7 +37747,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
37362
37747
|
setFormDataValue() {
|
|
37363
37748
|
const name = this.model.appDEFieldId || this.model.fieldName || this.model.id;
|
|
37364
37749
|
if (name) {
|
|
37365
|
-
this.form.setDataValue(name, this.state.contentCtrlData);
|
|
37750
|
+
this.form.setDataValue(name, clone19(this.state.contentCtrlData));
|
|
37366
37751
|
}
|
|
37367
37752
|
}
|
|
37368
37753
|
/**
|
|
@@ -37384,6 +37769,38 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
37384
37769
|
*/
|
|
37385
37770
|
setDefaultValue() {
|
|
37386
37771
|
}
|
|
37772
|
+
/**
|
|
37773
|
+
* 表单数据变更通知
|
|
37774
|
+
*
|
|
37775
|
+
* @author lxm
|
|
37776
|
+
* @date 2022-09-20 18:09:56
|
|
37777
|
+
* @param {string[]} names
|
|
37778
|
+
*/
|
|
37779
|
+
async dataChangeNotify(names) {
|
|
37780
|
+
await super.dataChangeNotify(names);
|
|
37781
|
+
const { resetItemNames } = this.model;
|
|
37782
|
+
const mdctrlName = this.model.appDEFieldId || this.model.fieldName || this.model.id;
|
|
37783
|
+
let isReset = false;
|
|
37784
|
+
if (resetItemNames && resetItemNames.length > 0) {
|
|
37785
|
+
resetItemNames.forEach((resetItemName) => {
|
|
37786
|
+
if (names.includes(resetItemName)) {
|
|
37787
|
+
isReset = true;
|
|
37788
|
+
}
|
|
37789
|
+
});
|
|
37790
|
+
}
|
|
37791
|
+
if (isReset) {
|
|
37792
|
+
this.state.contentCtrlData = null;
|
|
37793
|
+
this.setFormDataValue();
|
|
37794
|
+
}
|
|
37795
|
+
if (names.includes(mdctrlName)) {
|
|
37796
|
+
this.validate();
|
|
37797
|
+
}
|
|
37798
|
+
if (names.includes(mdctrlName) && this.model.deformItemUpdateId) {
|
|
37799
|
+
await this.form.updateFormItem(
|
|
37800
|
+
this.model.deformItemUpdateId
|
|
37801
|
+
);
|
|
37802
|
+
}
|
|
37803
|
+
}
|
|
37387
37804
|
};
|
|
37388
37805
|
|
|
37389
37806
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-item.controller.ts
|
|
@@ -37687,10 +38104,10 @@ import {
|
|
|
37687
38104
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
37688
38105
|
mergeDefaultInLeft as mergeDefaultInLeft3,
|
|
37689
38106
|
recursiveIterate as recursiveIterate5,
|
|
37690
|
-
RuntimeError as
|
|
38107
|
+
RuntimeError as RuntimeError47,
|
|
37691
38108
|
RuntimeModelError as RuntimeModelError53
|
|
37692
38109
|
} from "@ibiz-template/core";
|
|
37693
|
-
import { clone as
|
|
38110
|
+
import { clone as clone20 } from "ramda";
|
|
37694
38111
|
|
|
37695
38112
|
// src/controller/control/grid/grid/grid.service.ts
|
|
37696
38113
|
var GridService = class extends MDControlService {
|
|
@@ -38061,7 +38478,7 @@ var GridController = class extends MDControlController {
|
|
|
38061
38478
|
if (editShowMode === "row") {
|
|
38062
38479
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
38063
38480
|
if (editingRow) {
|
|
38064
|
-
throw new
|
|
38481
|
+
throw new RuntimeError47("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
38065
38482
|
}
|
|
38066
38483
|
}
|
|
38067
38484
|
const queryParams = { ...this.params };
|
|
@@ -38102,7 +38519,7 @@ var GridController = class extends MDControlController {
|
|
|
38102
38519
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
38103
38520
|
const rowState = this.findRowState(data);
|
|
38104
38521
|
if (!rowState) {
|
|
38105
|
-
throw new
|
|
38522
|
+
throw new RuntimeError47("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
38106
38523
|
}
|
|
38107
38524
|
if (!rowState.modified) {
|
|
38108
38525
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -38114,7 +38531,7 @@ var GridController = class extends MDControlController {
|
|
|
38114
38531
|
}
|
|
38115
38532
|
const isValid = await this.validate(rowState);
|
|
38116
38533
|
if (!isValid) {
|
|
38117
|
-
throw new
|
|
38534
|
+
throw new RuntimeError47("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
38118
38535
|
}
|
|
38119
38536
|
await this.startLoading();
|
|
38120
38537
|
let res;
|
|
@@ -38137,10 +38554,6 @@ var GridController = class extends MDControlController {
|
|
|
38137
38554
|
this.state.items.splice(index, 1, res.data);
|
|
38138
38555
|
rowState.data = res.data;
|
|
38139
38556
|
rowState.modified = false;
|
|
38140
|
-
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "SUCCESS"), {
|
|
38141
|
-
default: "".concat(res.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F"),
|
|
38142
|
-
data: res.data
|
|
38143
|
-
});
|
|
38144
38557
|
this.gridStateNotify(rowState, "SAVE" /* SAVE */);
|
|
38145
38558
|
await this.evt.emit("onSaveSuccess", void 0);
|
|
38146
38559
|
}
|
|
@@ -38318,7 +38731,7 @@ var GridController = class extends MDControlController {
|
|
|
38318
38731
|
}
|
|
38319
38732
|
async toggleRowEdit() {
|
|
38320
38733
|
if (!this.model.enableRowNew) {
|
|
38321
|
-
throw new
|
|
38734
|
+
throw new RuntimeError47("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
38322
38735
|
}
|
|
38323
38736
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
38324
38737
|
}
|
|
@@ -38351,10 +38764,10 @@ var GridController = class extends MDControlController {
|
|
|
38351
38764
|
} else {
|
|
38352
38765
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
38353
38766
|
if (editingRow) {
|
|
38354
|
-
throw new
|
|
38767
|
+
throw new RuntimeError47("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
38355
38768
|
}
|
|
38356
38769
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
38357
|
-
row.cacheData =
|
|
38770
|
+
row.cacheData = clone20(row.data);
|
|
38358
38771
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
38359
38772
|
Object.assign(row.data, defaultVal);
|
|
38360
38773
|
}
|
|
@@ -38401,7 +38814,7 @@ var GridController = class extends MDControlController {
|
|
|
38401
38814
|
(item) => item.id === updateId
|
|
38402
38815
|
);
|
|
38403
38816
|
if (!findUpdate) {
|
|
38404
|
-
throw new
|
|
38817
|
+
throw new RuntimeError47("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
38405
38818
|
}
|
|
38406
38819
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
38407
38820
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -38465,28 +38878,11 @@ var GridController = class extends MDControlController {
|
|
|
38465
38878
|
async exportData(_args) {
|
|
38466
38879
|
const items = this.fieldColumns;
|
|
38467
38880
|
const formatExcelData = (data2) => {
|
|
38468
|
-
const
|
|
38469
|
-
Object.keys(items).forEach((key) => {
|
|
38470
|
-
if (items[key].codeList) {
|
|
38471
|
-
codeListMap.set(key, items[key].codeListItems);
|
|
38472
|
-
}
|
|
38473
|
-
});
|
|
38474
|
-
const cloneData = clone19(
|
|
38881
|
+
const cloneData = clone20(
|
|
38475
38882
|
data2.map((item) => {
|
|
38476
38883
|
return item.getOrigin();
|
|
38477
38884
|
})
|
|
38478
38885
|
);
|
|
38479
|
-
cloneData.forEach((item) => {
|
|
38480
|
-
const fields = Object.keys(item);
|
|
38481
|
-
fields.forEach((key) => {
|
|
38482
|
-
var _a;
|
|
38483
|
-
if (codeListMap.get(key)) {
|
|
38484
|
-
item[key] = ((_a = codeListMap.get(key).find((_item) => {
|
|
38485
|
-
return _item.value === item[key];
|
|
38486
|
-
})) == null ? void 0 : _a.text) || item[key];
|
|
38487
|
-
}
|
|
38488
|
-
});
|
|
38489
|
-
});
|
|
38490
38886
|
return cloneData;
|
|
38491
38887
|
};
|
|
38492
38888
|
const getExportData = async () => {
|
|
@@ -38510,7 +38906,7 @@ var GridController = class extends MDControlController {
|
|
|
38510
38906
|
data2 = this.getData();
|
|
38511
38907
|
}
|
|
38512
38908
|
if (data2.length === 0) {
|
|
38513
|
-
throw new
|
|
38909
|
+
throw new RuntimeError47("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
38514
38910
|
}
|
|
38515
38911
|
return formatExcelData(data2);
|
|
38516
38912
|
};
|
|
@@ -38528,23 +38924,7 @@ var GridController = class extends MDControlController {
|
|
|
38528
38924
|
(key) => items[key].model.caption
|
|
38529
38925
|
);
|
|
38530
38926
|
const data = formatArrayData(filterVal, await getExportData());
|
|
38531
|
-
|
|
38532
|
-
throw new RuntimeError45("ibiz.util.getExportExcel\u4E0D\u5B58\u5728");
|
|
38533
|
-
}
|
|
38534
|
-
const exportExcel = await ibiz.util.getExportExcel();
|
|
38535
|
-
if (!exportExcel) {
|
|
38536
|
-
throw new RuntimeError45("\u5BFC\u51FA\u6A21\u5757\u52A0\u8F7D\u9519\u8BEF");
|
|
38537
|
-
}
|
|
38538
|
-
exportExcel.exportJsonToExcel({
|
|
38539
|
-
header,
|
|
38540
|
-
// 表头内容 数组格式
|
|
38541
|
-
data,
|
|
38542
|
-
// 具体数据 这是个二维数组
|
|
38543
|
-
filename: this.model.logicName,
|
|
38544
|
-
// 文件名称
|
|
38545
|
-
autoWidth: true
|
|
38546
|
-
// 单元格是否自适应
|
|
38547
|
-
});
|
|
38927
|
+
await exportData(header, data, this.model.logicName);
|
|
38548
38928
|
}
|
|
38549
38929
|
/**
|
|
38550
38930
|
* 计算默认值并返回一个对象,对象里的属性就是要填充的默认值
|
|
@@ -38606,8 +38986,8 @@ var GridController = class extends MDControlController {
|
|
|
38606
38986
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
38607
38987
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
38608
38988
|
import dayjs4 from "dayjs";
|
|
38609
|
-
import { debounce as
|
|
38610
|
-
import { clone as
|
|
38989
|
+
import { debounce as debounce3 } from "lodash-es";
|
|
38990
|
+
import { clone as clone21, isNil as isNil21 } from "ramda";
|
|
38611
38991
|
var GridFieldColumnController = class extends GridColumnController {
|
|
38612
38992
|
constructor() {
|
|
38613
38993
|
super(...arguments);
|
|
@@ -38642,7 +39022,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38642
39022
|
}
|
|
38643
39023
|
async onInit() {
|
|
38644
39024
|
await super.onInit();
|
|
38645
|
-
this.loadCodeList =
|
|
39025
|
+
this.loadCodeList = debounce3(this.loadCodeList, 300, {
|
|
38646
39026
|
leading: true,
|
|
38647
39027
|
trailing: false
|
|
38648
39028
|
});
|
|
@@ -38711,7 +39091,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
38711
39091
|
srfkey: value,
|
|
38712
39092
|
...wfContext
|
|
38713
39093
|
});
|
|
38714
|
-
const tempParams =
|
|
39094
|
+
const tempParams = clone21(this.params);
|
|
38715
39095
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
38716
39096
|
row.data,
|
|
38717
39097
|
tempContext,
|
|
@@ -38907,7 +39287,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
38907
39287
|
};
|
|
38908
39288
|
|
|
38909
39289
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
38910
|
-
import { RuntimeError as
|
|
39290
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
38911
39291
|
import Schema2 from "async-validator";
|
|
38912
39292
|
import { isNilOrEmpty as isNilOrEmpty9 } from "qx-util";
|
|
38913
39293
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -39044,7 +39424,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
39044
39424
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
39045
39425
|
const result = await this.validate(row);
|
|
39046
39426
|
if (!result) {
|
|
39047
|
-
throw new
|
|
39427
|
+
throw new RuntimeError48(
|
|
39048
39428
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
39049
39429
|
);
|
|
39050
39430
|
}
|
|
@@ -39402,7 +39782,7 @@ var ListController = class extends MDControlController {
|
|
|
39402
39782
|
};
|
|
39403
39783
|
|
|
39404
39784
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
39405
|
-
import { recursiveIterate as recursiveIterate6, RuntimeError as
|
|
39785
|
+
import { recursiveIterate as recursiveIterate6, RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
39406
39786
|
var PanelController = class extends ControlController {
|
|
39407
39787
|
constructor() {
|
|
39408
39788
|
super(...arguments);
|
|
@@ -39516,7 +39896,7 @@ var PanelController = class extends ControlController {
|
|
|
39516
39896
|
async load() {
|
|
39517
39897
|
const data = await this.prepareData();
|
|
39518
39898
|
if (!data) {
|
|
39519
|
-
throw new
|
|
39899
|
+
throw new RuntimeError49("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
39520
39900
|
}
|
|
39521
39901
|
const panelData = this.convertData(data);
|
|
39522
39902
|
this.state.data = panelData;
|
|
@@ -39553,7 +39933,8 @@ var PanelController = class extends ControlController {
|
|
|
39553
39933
|
* @memberof PanelController
|
|
39554
39934
|
*/
|
|
39555
39935
|
convertData(data) {
|
|
39556
|
-
|
|
39936
|
+
const fields = getAllPanelField(this.model);
|
|
39937
|
+
return new PanelData(fields, data);
|
|
39557
39938
|
}
|
|
39558
39939
|
/**
|
|
39559
39940
|
* 通知所有面板成员面板操作过程中的数据变更
|
|
@@ -39742,9 +40123,9 @@ var PanelItemController = class {
|
|
|
39742
40123
|
* @protected
|
|
39743
40124
|
*/
|
|
39744
40125
|
this.dynaLogicResult = {
|
|
39745
|
-
visible:
|
|
39746
|
-
disabled:
|
|
39747
|
-
required:
|
|
40126
|
+
visible: void 0,
|
|
40127
|
+
disabled: void 0,
|
|
40128
|
+
required: void 0
|
|
39748
40129
|
};
|
|
39749
40130
|
this.state = this.createState();
|
|
39750
40131
|
}
|
|
@@ -39858,8 +40239,8 @@ var PanelItemController = class {
|
|
|
39858
40239
|
* @param {IData} data
|
|
39859
40240
|
*/
|
|
39860
40241
|
calcItemDisabled(data) {
|
|
39861
|
-
let
|
|
39862
|
-
if (
|
|
40242
|
+
let { disabled } = this.dynaLogicResult;
|
|
40243
|
+
if (disabled !== true && this.panel.scheduler) {
|
|
39863
40244
|
const itemEnable = this.panel.scheduler.triggerItemEnable(
|
|
39864
40245
|
this.model.id,
|
|
39865
40246
|
{
|
|
@@ -39867,10 +40248,12 @@ var PanelItemController = class {
|
|
|
39867
40248
|
}
|
|
39868
40249
|
);
|
|
39869
40250
|
if (itemEnable !== void 0) {
|
|
39870
|
-
|
|
40251
|
+
disabled = !itemEnable;
|
|
39871
40252
|
}
|
|
39872
40253
|
}
|
|
39873
|
-
|
|
40254
|
+
if (disabled !== void 0) {
|
|
40255
|
+
this.state.disabled = disabled;
|
|
40256
|
+
}
|
|
39874
40257
|
}
|
|
39875
40258
|
/**
|
|
39876
40259
|
* 计算项的显示状态
|
|
@@ -39880,7 +40263,7 @@ var PanelItemController = class {
|
|
|
39880
40263
|
*/
|
|
39881
40264
|
calcItemVisible(data) {
|
|
39882
40265
|
let { visible } = this.dynaLogicResult;
|
|
39883
|
-
if (visible && this.panel.scheduler) {
|
|
40266
|
+
if (visible !== false && this.panel.scheduler) {
|
|
39884
40267
|
const itemVIsible = this.panel.scheduler.triggerItemVisible(
|
|
39885
40268
|
this.model.id,
|
|
39886
40269
|
{
|
|
@@ -39891,7 +40274,9 @@ var PanelItemController = class {
|
|
|
39891
40274
|
visible = itemVIsible;
|
|
39892
40275
|
}
|
|
39893
40276
|
}
|
|
39894
|
-
|
|
40277
|
+
if (visible !== void 0) {
|
|
40278
|
+
this.state.visible = visible;
|
|
40279
|
+
}
|
|
39895
40280
|
}
|
|
39896
40281
|
/**
|
|
39897
40282
|
* 计算项的必填状态
|
|
@@ -39900,8 +40285,8 @@ var PanelItemController = class {
|
|
|
39900
40285
|
* @param {IData} data
|
|
39901
40286
|
*/
|
|
39902
40287
|
calcItemRequired(data) {
|
|
39903
|
-
let
|
|
39904
|
-
if (
|
|
40288
|
+
let { required } = this.dynaLogicResult;
|
|
40289
|
+
if (required !== true && this.panel.scheduler) {
|
|
39905
40290
|
const itemAllowEmpty = this.panel.scheduler.triggerItemBlank(
|
|
39906
40291
|
this.model.id,
|
|
39907
40292
|
{
|
|
@@ -39909,10 +40294,12 @@ var PanelItemController = class {
|
|
|
39909
40294
|
}
|
|
39910
40295
|
);
|
|
39911
40296
|
if (itemAllowEmpty !== void 0) {
|
|
39912
|
-
|
|
40297
|
+
required = !itemAllowEmpty;
|
|
39913
40298
|
}
|
|
39914
40299
|
}
|
|
39915
|
-
|
|
40300
|
+
if (required !== void 0) {
|
|
40301
|
+
this.state.required = required;
|
|
40302
|
+
}
|
|
39916
40303
|
}
|
|
39917
40304
|
/**
|
|
39918
40305
|
* 计算动态逻辑
|
|
@@ -41116,7 +41503,7 @@ var TreeController = class extends MDControlController {
|
|
|
41116
41503
|
};
|
|
41117
41504
|
|
|
41118
41505
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
41119
|
-
import { RuntimeError as
|
|
41506
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
41120
41507
|
|
|
41121
41508
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
41122
41509
|
var WizardPanelService = class extends ControlService {
|
|
@@ -41275,7 +41662,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
41275
41662
|
const { activeFormTag } = this.state;
|
|
41276
41663
|
const controller = this.formControllers.get(activeFormTag);
|
|
41277
41664
|
if (!controller) {
|
|
41278
|
-
throw new
|
|
41665
|
+
throw new RuntimeError50("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
41279
41666
|
}
|
|
41280
41667
|
return controller;
|
|
41281
41668
|
}
|
|
@@ -41350,7 +41737,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
41350
41737
|
this.tagHistory.pop();
|
|
41351
41738
|
const prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
41352
41739
|
if (!prevTag) {
|
|
41353
|
-
throw new
|
|
41740
|
+
throw new RuntimeError50("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
41354
41741
|
}
|
|
41355
41742
|
this.state.activeFormTag = prevTag;
|
|
41356
41743
|
}
|
|
@@ -41371,7 +41758,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
41371
41758
|
}
|
|
41372
41759
|
);
|
|
41373
41760
|
if (!wizardForm) {
|
|
41374
|
-
throw new
|
|
41761
|
+
throw new RuntimeError50("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(data.srfnextform, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
41375
41762
|
}
|
|
41376
41763
|
nextTag = data.srfnextform;
|
|
41377
41764
|
} else {
|
|
@@ -41383,7 +41770,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
41383
41770
|
});
|
|
41384
41771
|
const nextWizardStep = wizardSteps[index + 1];
|
|
41385
41772
|
if (!nextWizardStep) {
|
|
41386
|
-
throw new
|
|
41773
|
+
throw new RuntimeError50("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
41387
41774
|
}
|
|
41388
41775
|
const nextWizardForm = this.model.dewizard.dewizardForms.find(
|
|
41389
41776
|
(wizardForm) => {
|
|
@@ -41396,7 +41783,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
41396
41783
|
}
|
|
41397
41784
|
}
|
|
41398
41785
|
if (!nextTag) {
|
|
41399
|
-
throw new
|
|
41786
|
+
throw new RuntimeError50("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
41400
41787
|
}
|
|
41401
41788
|
this.state.activeFormTag = nextTag;
|
|
41402
41789
|
this.tagHistory.push(nextTag);
|
|
@@ -41735,7 +42122,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
41735
42122
|
};
|
|
41736
42123
|
|
|
41737
42124
|
// src/controller/control/kanban/kanban.controller.ts
|
|
41738
|
-
import { RuntimeError as
|
|
42125
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
41739
42126
|
import { isNil as isNil24 } from "ramda";
|
|
41740
42127
|
|
|
41741
42128
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -41823,7 +42210,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
41823
42210
|
} else {
|
|
41824
42211
|
const toNum = Number(sortValue);
|
|
41825
42212
|
if (Number.isNaN(toNum)) {
|
|
41826
|
-
throw new
|
|
42213
|
+
throw new RuntimeError51(
|
|
41827
42214
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
41828
42215
|
);
|
|
41829
42216
|
}
|
|
@@ -41839,7 +42226,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
41839
42226
|
}
|
|
41840
42227
|
handleDataGroup() {
|
|
41841
42228
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
41842
|
-
throw new
|
|
42229
|
+
throw new RuntimeError51("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
41843
42230
|
}
|
|
41844
42231
|
return super.handleDataGroup();
|
|
41845
42232
|
}
|
|
@@ -42333,7 +42720,7 @@ var TreeGridService = class extends GridService {
|
|
|
42333
42720
|
};
|
|
42334
42721
|
|
|
42335
42722
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
42336
|
-
import { RuntimeError as
|
|
42723
|
+
import { RuntimeError as RuntimeError52 } from "@ibiz-template/core";
|
|
42337
42724
|
import { createUUID as createUUID9 } from "qx-util";
|
|
42338
42725
|
|
|
42339
42726
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -42544,7 +42931,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
42544
42931
|
(item) => item.id === id
|
|
42545
42932
|
);
|
|
42546
42933
|
if (!panelUiItemIndex) {
|
|
42547
|
-
throw new
|
|
42934
|
+
throw new RuntimeError52("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
42548
42935
|
}
|
|
42549
42936
|
await this.startLoading();
|
|
42550
42937
|
let res;
|
|
@@ -42577,6 +42964,192 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
42577
42964
|
}
|
|
42578
42965
|
};
|
|
42579
42966
|
|
|
42967
|
+
// src/controller/control/map/map.service.ts
|
|
42968
|
+
import { HttpResponse as HttpResponse6 } from "@ibiz-template/core";
|
|
42969
|
+
var MapService = class extends MDControlService {
|
|
42970
|
+
async init(context) {
|
|
42971
|
+
await super.init(context);
|
|
42972
|
+
}
|
|
42973
|
+
/**
|
|
42974
|
+
* 加载所有地图项的数据
|
|
42975
|
+
* @author lxm
|
|
42976
|
+
* @date 2023-10-30 06:27:32
|
|
42977
|
+
* @param {IParams} context
|
|
42978
|
+
* @param {IParams} [params={}]
|
|
42979
|
+
* @return {*} {Promise<IHttpResponse<IMapData[]>>}
|
|
42980
|
+
*/
|
|
42981
|
+
async fetchAll(context, params = {}) {
|
|
42982
|
+
var _a;
|
|
42983
|
+
const allData = [];
|
|
42984
|
+
if ((_a = this.model.sysMapItems) == null ? void 0 : _a.length) {
|
|
42985
|
+
const app = ibiz.hub.getApp(context.srfappid);
|
|
42986
|
+
await Promise.all(
|
|
42987
|
+
this.model.sysMapItems.map(async (mapItem) => {
|
|
42988
|
+
const { appDataEntityId, appDEDataSetId, customCond } = mapItem;
|
|
42989
|
+
const _context = context.clone();
|
|
42990
|
+
const _params = { ...params };
|
|
42991
|
+
if (customCond) {
|
|
42992
|
+
const customParams = ScriptFactory.execSingleLine(
|
|
42993
|
+
customCond
|
|
42994
|
+
);
|
|
42995
|
+
if (customParams) {
|
|
42996
|
+
const { navigateContexts, navigateParams } = parseUserParams(customParams);
|
|
42997
|
+
if (navigateContexts) {
|
|
42998
|
+
Object.assign(
|
|
42999
|
+
_context,
|
|
43000
|
+
convertNavData(navigateContexts, params, context)
|
|
43001
|
+
);
|
|
43002
|
+
}
|
|
43003
|
+
if (navigateParams) {
|
|
43004
|
+
Object.assign(
|
|
43005
|
+
_params,
|
|
43006
|
+
convertNavData(navigateContexts, params, context)
|
|
43007
|
+
);
|
|
43008
|
+
}
|
|
43009
|
+
}
|
|
43010
|
+
}
|
|
43011
|
+
const res = await app.deService.exec(
|
|
43012
|
+
appDataEntityId,
|
|
43013
|
+
appDEDataSetId,
|
|
43014
|
+
_context,
|
|
43015
|
+
_params
|
|
43016
|
+
);
|
|
43017
|
+
if (res.data) {
|
|
43018
|
+
allData.push(...res.data.map((item) => new MapData(item, mapItem)));
|
|
43019
|
+
}
|
|
43020
|
+
})
|
|
43021
|
+
);
|
|
43022
|
+
}
|
|
43023
|
+
return new HttpResponse6(allData, 200);
|
|
43024
|
+
}
|
|
43025
|
+
};
|
|
43026
|
+
|
|
43027
|
+
// src/controller/control/map/map.controller.ts
|
|
43028
|
+
var MapController = class extends MDControlController {
|
|
43029
|
+
initState() {
|
|
43030
|
+
super.initState();
|
|
43031
|
+
this.state.size = 1e3;
|
|
43032
|
+
this.state.pointData = [];
|
|
43033
|
+
this.state.areaData = [];
|
|
43034
|
+
this.calcDefaultOptions();
|
|
43035
|
+
}
|
|
43036
|
+
async onCreated() {
|
|
43037
|
+
await super.onCreated();
|
|
43038
|
+
this.service = new MapService(this.model);
|
|
43039
|
+
await this.service.init(this.context);
|
|
43040
|
+
}
|
|
43041
|
+
/**
|
|
43042
|
+
* 部件加载数据行为
|
|
43043
|
+
*
|
|
43044
|
+
* @author lxm
|
|
43045
|
+
* @date 2022-08-19 14:08:50
|
|
43046
|
+
*/
|
|
43047
|
+
async load(args = {}) {
|
|
43048
|
+
if (this.state.isSimple) {
|
|
43049
|
+
return [];
|
|
43050
|
+
}
|
|
43051
|
+
await this.startLoading();
|
|
43052
|
+
try {
|
|
43053
|
+
const isInitialLoad = args.isInitialLoad === true;
|
|
43054
|
+
const { context } = this.handlerAbilityParams(args);
|
|
43055
|
+
const params = await this.getFetchParams(args == null ? void 0 : args.viewParam);
|
|
43056
|
+
context.srfareacode = this.state.areaCode;
|
|
43057
|
+
const res = await this.service.fetchAll(context, params);
|
|
43058
|
+
this.state.items = res.data;
|
|
43059
|
+
await this.afterLoad(args, res.data);
|
|
43060
|
+
this.state.isLoaded = true;
|
|
43061
|
+
await this._evt.emit("onLoadSuccess", {
|
|
43062
|
+
isInitialLoad
|
|
43063
|
+
});
|
|
43064
|
+
} catch (error) {
|
|
43065
|
+
await this._evt.emit("onLoadError", void 0);
|
|
43066
|
+
this.actionNotification("FETCHERROR", {
|
|
43067
|
+
error
|
|
43068
|
+
});
|
|
43069
|
+
throw error;
|
|
43070
|
+
} finally {
|
|
43071
|
+
await this.endLoading();
|
|
43072
|
+
}
|
|
43073
|
+
this.actionNotification("FETCHSUCCESS");
|
|
43074
|
+
return this.state.items;
|
|
43075
|
+
}
|
|
43076
|
+
async afterLoad(args, items) {
|
|
43077
|
+
const result = await super.afterLoad(args, items);
|
|
43078
|
+
const tempareaData = [];
|
|
43079
|
+
const temppointData = [];
|
|
43080
|
+
result.forEach((item) => {
|
|
43081
|
+
if (item._type === "area") {
|
|
43082
|
+
tempareaData.push(item);
|
|
43083
|
+
} else if (item._type === "point") {
|
|
43084
|
+
temppointData.push(item);
|
|
43085
|
+
}
|
|
43086
|
+
});
|
|
43087
|
+
this.state.pointData = temppointData;
|
|
43088
|
+
this.state.areaData = tempareaData;
|
|
43089
|
+
return result;
|
|
43090
|
+
}
|
|
43091
|
+
/**
|
|
43092
|
+
* 计算默认选项
|
|
43093
|
+
* @author lxm
|
|
43094
|
+
* @date 2023-11-01 03:23:33
|
|
43095
|
+
*/
|
|
43096
|
+
calcDefaultOptions() {
|
|
43097
|
+
var _a;
|
|
43098
|
+
this.state.strAreaCode = false;
|
|
43099
|
+
this.state.defaultAreaCode = 1e5;
|
|
43100
|
+
if ((_a = this.model.controlParam) == null ? void 0 : _a.ctrlParams) {
|
|
43101
|
+
const { ctrlParams } = this.model.controlParam;
|
|
43102
|
+
Object.keys(ctrlParams).forEach((key) => {
|
|
43103
|
+
const value = ctrlParams[key];
|
|
43104
|
+
switch (key.toLowerCase()) {
|
|
43105
|
+
case "defaultareacode":
|
|
43106
|
+
this.state.defaultAreaCode = value;
|
|
43107
|
+
break;
|
|
43108
|
+
case "strareacode":
|
|
43109
|
+
this.state.strAreaCode = value === "true";
|
|
43110
|
+
break;
|
|
43111
|
+
case "jsonbaseurl":
|
|
43112
|
+
this.state.jsonBaseUrl = value;
|
|
43113
|
+
break;
|
|
43114
|
+
default:
|
|
43115
|
+
break;
|
|
43116
|
+
}
|
|
43117
|
+
});
|
|
43118
|
+
}
|
|
43119
|
+
this.state.defaultAreaCode = this.state.strAreaCode ? "".concat(this.state.defaultAreaCode) : Number(this.state.defaultAreaCode);
|
|
43120
|
+
this.state.areaCode = this.state.defaultAreaCode;
|
|
43121
|
+
}
|
|
43122
|
+
/**
|
|
43123
|
+
* 地图变更事件处理
|
|
43124
|
+
* @author lxm
|
|
43125
|
+
* @date 2023-10-31 05:28:36
|
|
43126
|
+
* @param {(string | number)} areaCode
|
|
43127
|
+
*/
|
|
43128
|
+
onMapChange(areaCode) {
|
|
43129
|
+
this.state.areaCode = areaCode;
|
|
43130
|
+
this.load({});
|
|
43131
|
+
this.evt.emit("onMapChange", { areaCode });
|
|
43132
|
+
}
|
|
43133
|
+
/**
|
|
43134
|
+
* 地图区域点击事件处理
|
|
43135
|
+
* @author lxm
|
|
43136
|
+
* @date 2023-10-31 05:30:54
|
|
43137
|
+
* @param {IMapData} mapData
|
|
43138
|
+
*/
|
|
43139
|
+
onAreaClick(mapData) {
|
|
43140
|
+
this.evt.emit("onAreaClick", { data: [mapData] });
|
|
43141
|
+
}
|
|
43142
|
+
/**
|
|
43143
|
+
* 地图散点点击事件处理
|
|
43144
|
+
* @author lxm
|
|
43145
|
+
* @date 2023-10-31 05:30:58
|
|
43146
|
+
* @param {IMapData} mapData
|
|
43147
|
+
*/
|
|
43148
|
+
onPointClick(mapData) {
|
|
43149
|
+
this.evt.emit("onPointClick", { data: [mapData] });
|
|
43150
|
+
}
|
|
43151
|
+
};
|
|
43152
|
+
|
|
42580
43153
|
// src/controller/hub.controller.ts
|
|
42581
43154
|
var HubController = class {
|
|
42582
43155
|
constructor() {
|
|
@@ -42792,7 +43365,7 @@ var AppHub = class {
|
|
|
42792
43365
|
this.registerAppView(appView);
|
|
42793
43366
|
return appView;
|
|
42794
43367
|
}
|
|
42795
|
-
throw new
|
|
43368
|
+
throw new RuntimeError53("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
42796
43369
|
}
|
|
42797
43370
|
/**
|
|
42798
43371
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -42823,7 +43396,7 @@ var AppHub = class {
|
|
|
42823
43396
|
this.registerAppDataEntity(entity, appId);
|
|
42824
43397
|
return entity;
|
|
42825
43398
|
}
|
|
42826
|
-
throw new
|
|
43399
|
+
throw new RuntimeError53("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
42827
43400
|
}
|
|
42828
43401
|
/**
|
|
42829
43402
|
* 新建 hub 应用
|
|
@@ -42844,7 +43417,7 @@ var AppHub = class {
|
|
|
42844
43417
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
42845
43418
|
this.registerApp(appModel);
|
|
42846
43419
|
} else {
|
|
42847
|
-
throw new
|
|
43420
|
+
throw new RuntimeError53("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
42848
43421
|
}
|
|
42849
43422
|
const app = new Application(appModel);
|
|
42850
43423
|
this.appMap.set(id, app);
|
|
@@ -42942,7 +43515,7 @@ var EngineFactory = class {
|
|
|
42942
43515
|
};
|
|
42943
43516
|
|
|
42944
43517
|
// src/engine/view-base.engine.ts
|
|
42945
|
-
import { RuntimeError as
|
|
43518
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
42946
43519
|
var ViewEngineBase = class {
|
|
42947
43520
|
/**
|
|
42948
43521
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -43130,7 +43703,7 @@ var ViewEngineBase = class {
|
|
|
43130
43703
|
const { appDataEntityId } = this.view.model;
|
|
43131
43704
|
const { evt, context, params } = this.view;
|
|
43132
43705
|
if (!appDataEntityId) {
|
|
43133
|
-
throw new
|
|
43706
|
+
throw new RuntimeError54("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
43134
43707
|
}
|
|
43135
43708
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
43136
43709
|
const res = await app.deService.exec(
|
|
@@ -43152,7 +43725,7 @@ var ViewEngineBase = class {
|
|
|
43152
43725
|
|
|
43153
43726
|
// src/engine/md-view.engine.ts
|
|
43154
43727
|
import { RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
43155
|
-
import { clone as
|
|
43728
|
+
import { clone as clone22 } from "ramda";
|
|
43156
43729
|
var MDViewEngine = class extends ViewEngineBase {
|
|
43157
43730
|
/**
|
|
43158
43731
|
* 多数据部件名称
|
|
@@ -43349,7 +43922,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
43349
43922
|
if (!openAppViewLogic) {
|
|
43350
43923
|
throw new RuntimeModelError58(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
43351
43924
|
}
|
|
43352
|
-
const params =
|
|
43925
|
+
const params = clone22(this.view.params);
|
|
43353
43926
|
if (copyMode) {
|
|
43354
43927
|
params.srfcopymode = copyMode;
|
|
43355
43928
|
}
|
|
@@ -43484,7 +44057,7 @@ import {
|
|
|
43484
44057
|
ModelError as ModelError28,
|
|
43485
44058
|
HttpError as HttpError4,
|
|
43486
44059
|
NoticeError as NoticeError2,
|
|
43487
|
-
RuntimeError as
|
|
44060
|
+
RuntimeError as RuntimeError55
|
|
43488
44061
|
} from "@ibiz-template/core";
|
|
43489
44062
|
var DefaultErrorHandler = class {
|
|
43490
44063
|
handle(error) {
|
|
@@ -43502,7 +44075,7 @@ var DefaultErrorHandler = class {
|
|
|
43502
44075
|
}
|
|
43503
44076
|
} else if (error instanceof NoticeError2) {
|
|
43504
44077
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
43505
|
-
} else if (error instanceof
|
|
44078
|
+
} else if (error instanceof RuntimeError55) {
|
|
43506
44079
|
ibiz.message.error(error.message, 10, true);
|
|
43507
44080
|
}
|
|
43508
44081
|
ibiz.log.error(error);
|
|
@@ -43630,7 +44203,7 @@ var GlobalUtil = class {
|
|
|
43630
44203
|
};
|
|
43631
44204
|
|
|
43632
44205
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
43633
|
-
import { RuntimeError as
|
|
44206
|
+
import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
|
|
43634
44207
|
var LogicExecutor = class {
|
|
43635
44208
|
/**
|
|
43636
44209
|
* @author lxm
|
|
@@ -43651,7 +44224,7 @@ var LogicExecutor = class {
|
|
|
43651
44224
|
*/
|
|
43652
44225
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43653
44226
|
execute(_executeParams) {
|
|
43654
|
-
throw new
|
|
44227
|
+
throw new RuntimeError56("Method not implemented.");
|
|
43655
44228
|
}
|
|
43656
44229
|
/**
|
|
43657
44230
|
* 销毁方法
|
|
@@ -44088,7 +44661,7 @@ var LogicSchedulerCenter = class {
|
|
|
44088
44661
|
};
|
|
44089
44662
|
|
|
44090
44663
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
44091
|
-
import { RuntimeError as
|
|
44664
|
+
import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
44092
44665
|
var LogicTrigger = class {
|
|
44093
44666
|
/**
|
|
44094
44667
|
* @author lxm
|
|
@@ -44148,7 +44721,7 @@ var LogicTrigger = class {
|
|
|
44148
44721
|
if (this.executor) {
|
|
44149
44722
|
return this.executor.execute(executeParams);
|
|
44150
44723
|
}
|
|
44151
|
-
throw new
|
|
44724
|
+
throw new RuntimeError57("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
44152
44725
|
}
|
|
44153
44726
|
/**
|
|
44154
44727
|
* 销毁方法
|
|
@@ -44165,12 +44738,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
44165
44738
|
};
|
|
44166
44739
|
|
|
44167
44740
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
44168
|
-
import { RuntimeError as
|
|
44741
|
+
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
44169
44742
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
44170
44743
|
bindExecutor(executor) {
|
|
44171
44744
|
super.bindExecutor(executor);
|
|
44172
44745
|
if (this.executor.type !== "SCRIPT") {
|
|
44173
|
-
throw new
|
|
44746
|
+
throw new RuntimeError58(
|
|
44174
44747
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
44175
44748
|
);
|
|
44176
44749
|
}
|
|
@@ -44206,7 +44779,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
44206
44779
|
};
|
|
44207
44780
|
|
|
44208
44781
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
44209
|
-
import { RuntimeError as
|
|
44782
|
+
import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
44210
44783
|
var TimerTrigger = class extends LogicTrigger {
|
|
44211
44784
|
constructor() {
|
|
44212
44785
|
super(...arguments);
|
|
@@ -44218,7 +44791,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
44218
44791
|
}
|
|
44219
44792
|
this.timer = setInterval(() => {
|
|
44220
44793
|
if (!this.scheduler.defaultParamsCb) {
|
|
44221
|
-
throw new
|
|
44794
|
+
throw new RuntimeError59("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
44222
44795
|
}
|
|
44223
44796
|
const params = this.scheduler.defaultParamsCb();
|
|
44224
44797
|
this.executor.execute(params);
|
|
@@ -44235,7 +44808,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
44235
44808
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
44236
44809
|
import {
|
|
44237
44810
|
ModelError as ModelError31,
|
|
44238
|
-
RuntimeError as
|
|
44811
|
+
RuntimeError as RuntimeError60,
|
|
44239
44812
|
RuntimeModelError as RuntimeModelError62
|
|
44240
44813
|
} from "@ibiz-template/core";
|
|
44241
44814
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -44271,7 +44844,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44271
44844
|
const { context, params, ...rest } = parameters;
|
|
44272
44845
|
const { data } = parameters;
|
|
44273
44846
|
if (!(data == null ? void 0 : data[0])) {
|
|
44274
|
-
throw new
|
|
44847
|
+
throw new RuntimeError60("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
44275
44848
|
}
|
|
44276
44849
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
44277
44850
|
let openViewRef;
|
|
@@ -44328,7 +44901,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44328
44901
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
44329
44902
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
44330
44903
|
if (!findView) {
|
|
44331
|
-
throw new
|
|
44904
|
+
throw new RuntimeError60(
|
|
44332
44905
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
44333
44906
|
);
|
|
44334
44907
|
}
|
|
@@ -44446,12 +45019,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
44446
45019
|
}
|
|
44447
45020
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
44448
45021
|
if (!selectData) {
|
|
44449
|
-
throw new
|
|
45022
|
+
throw new RuntimeError60("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
44450
45023
|
}
|
|
44451
45024
|
const indexType = selectData.srfkey;
|
|
44452
45025
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
44453
45026
|
if (!findView) {
|
|
44454
|
-
throw new
|
|
45027
|
+
throw new RuntimeError60(
|
|
44455
45028
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
44456
45029
|
);
|
|
44457
45030
|
}
|
|
@@ -44854,6 +45427,9 @@ export {
|
|
|
44854
45427
|
MDViewEngine,
|
|
44855
45428
|
MEditViewPanelController,
|
|
44856
45429
|
MEditViewPanelService,
|
|
45430
|
+
MapController,
|
|
45431
|
+
MapData,
|
|
45432
|
+
MapService,
|
|
44857
45433
|
MenuPortletController,
|
|
44858
45434
|
MethodDto,
|
|
44859
45435
|
MobMDCtrlRowState,
|
|
@@ -44865,6 +45441,7 @@ export {
|
|
|
44865
45441
|
PORTLET_PROVIDER_PREFIX,
|
|
44866
45442
|
PSDEDQCondEngine,
|
|
44867
45443
|
PanelController,
|
|
45444
|
+
PanelData,
|
|
44868
45445
|
PanelItemController,
|
|
44869
45446
|
PanelItemState,
|
|
44870
45447
|
PanelNotifyState,
|
|
@@ -44906,6 +45483,7 @@ export {
|
|
|
44906
45483
|
UIACTION_PROVIDER_PREFIX,
|
|
44907
45484
|
UIActionButtonState,
|
|
44908
45485
|
UIActionUtil,
|
|
45486
|
+
UILOGINNODE_PROVIDER_PREFIX,
|
|
44909
45487
|
UIMapField,
|
|
44910
45488
|
V7AuthService,
|
|
44911
45489
|
VIEW_PROVIDER_PREFIX,
|
|
@@ -44923,6 +45501,7 @@ export {
|
|
|
44923
45501
|
WizardPanelController,
|
|
44924
45502
|
WizardPanelService,
|
|
44925
45503
|
WorkFlowService,
|
|
45504
|
+
asyncImportData,
|
|
44926
45505
|
calcContentAlignStyle,
|
|
44927
45506
|
calcDeCodeNameById,
|
|
44928
45507
|
calcDynaClass,
|
|
@@ -44942,6 +45521,7 @@ export {
|
|
|
44942
45521
|
execDELogicById,
|
|
44943
45522
|
execFieldLogics,
|
|
44944
45523
|
execUILogic,
|
|
45524
|
+
exportData,
|
|
44945
45525
|
filterFieldLogics,
|
|
44946
45526
|
filterValueRules,
|
|
44947
45527
|
findChildFormDetails,
|
|
@@ -44952,6 +45532,7 @@ export {
|
|
|
44952
45532
|
formatMultiData,
|
|
44953
45533
|
generateEditorRules,
|
|
44954
45534
|
generateRules,
|
|
45535
|
+
getAllPanelField,
|
|
44955
45536
|
getAppCounterProvider,
|
|
44956
45537
|
getAppViewRef,
|
|
44957
45538
|
getChildNodeRSs,
|
|
@@ -44966,12 +45547,14 @@ export {
|
|
|
44966
45547
|
getGridColumnProvider,
|
|
44967
45548
|
getMatchResPath,
|
|
44968
45549
|
getOriginData,
|
|
45550
|
+
getPFPlugin,
|
|
44969
45551
|
getPanelItemProvider,
|
|
44970
45552
|
getPortletProvider,
|
|
44971
45553
|
getRootNode,
|
|
44972
45554
|
getTreeNode,
|
|
44973
45555
|
getUIActionById,
|
|
44974
45556
|
getUIActionProvider,
|
|
45557
|
+
getUILogicNodeProvider,
|
|
44975
45558
|
getViewEngines,
|
|
44976
45559
|
getViewLogics,
|
|
44977
45560
|
getViewProvider,
|
|
@@ -44979,6 +45562,7 @@ export {
|
|
|
44979
45562
|
getWFSubmitViewId,
|
|
44980
45563
|
handleAllSettled,
|
|
44981
45564
|
hasDeCodeName,
|
|
45565
|
+
importData,
|
|
44982
45566
|
install,
|
|
44983
45567
|
installCommand,
|
|
44984
45568
|
isDataContainer,
|
|
@@ -44996,6 +45580,7 @@ export {
|
|
|
44996
45580
|
registerPanelItemProvider,
|
|
44997
45581
|
registerPortletProvider,
|
|
44998
45582
|
registerUIActionProvider,
|
|
45583
|
+
registerUILogicNodeProvider,
|
|
44999
45584
|
registerViewProvider,
|
|
45000
45585
|
strContain,
|
|
45001
45586
|
testCond,
|