@ibiz-template/runtime 0.1.36 → 0.1.37
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 +442 -66
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/constant/view-call-tag.d.ts +5 -1
- package/out/constant/view-call-tag.d.ts.map +1 -1
- package/out/constant/view-call-tag.js +4 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +1 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +3 -3
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +13 -8
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts +3 -3
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +13 -8
- 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/medit-view-panel/index.d.ts +3 -0
- package/out/controller/control/medit-view-panel/index.d.ts.map +1 -0
- package/out/controller/control/medit-view-panel/index.js +2 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts +119 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts.map +1 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.js +320 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.service.d.ts +11 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.service.d.ts.map +1 -0
- package/out/controller/control/medit-view-panel/medit-view-panel.service.js +9 -0
- package/out/controller/utils/value-rule/value-rule.d.ts +10 -1
- package/out/controller/utils/value-rule/value-rule.d.ts.map +1 -1
- package/out/controller/utils/value-rule/value-rule.js +64 -1
- package/out/interface/controller/controller/control/i-medit-view-panel.controller.d.ts +14 -0
- package/out/interface/controller/controller/control/i-medit-view-panel.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/i-medit-view-panel.controller.js +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/event/control/i-medit-view-panel.event.d.ts +9 -0
- package/out/interface/controller/event/control/i-medit-view-panel.event.d.ts.map +1 -0
- package/out/interface/controller/event/control/i-medit-view-panel.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/event/view/i-medit-view9.event.d.ts +10 -0
- package/out/interface/controller/event/view/i-medit-view9.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-medit-view9.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/control/i-medit-view-panel.state.d.ts +29 -0
- package/out/interface/controller/state/control/i-medit-view-panel.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/i-medit-view-panel.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/controller/state/view/i-medit-view9.state.d.ts +11 -0
- package/out/interface/controller/state/view/i-medit-view9.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-medit-view9.state.js +1 -0
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/package.json +2 -2
- package/src/constant/view-call-tag.ts +4 -0
- package/src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts +2 -0
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +22 -9
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +18 -13
- package/src/controller/control/index.ts +1 -0
- package/src/controller/control/medit-view-panel/index.ts +2 -0
- package/src/controller/control/medit-view-panel/medit-view-panel.controller.ts +375 -0
- package/src/controller/control/medit-view-panel/medit-view-panel.service.ts +10 -0
- package/src/controller/utils/value-rule/value-rule.ts +97 -2
- package/src/interface/controller/controller/control/i-medit-view-panel.controller.ts +17 -0
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/event/control/i-medit-view-panel.event.ts +9 -0
- package/src/interface/controller/event/control/index.ts +1 -0
- package/src/interface/controller/event/view/i-medit-view9.event.ts +10 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/control/i-medit-view-panel.state.ts +36 -0
- package/src/interface/controller/state/control/index.ts +1 -0
- package/src/interface/controller/state/view/i-medit-view9.state.ts +10 -0
- package/src/interface/controller/state/view/index.ts +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -8386,6 +8386,7 @@ var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
|
8386
8386
|
ViewCallTag2["GET_DATA"] = "GetData";
|
|
8387
8387
|
ViewCallTag2["GET_ALL_DATA"] = "GetAllData";
|
|
8388
8388
|
ViewCallTag2["VALIDATE"] = "Validate";
|
|
8389
|
+
ViewCallTag2["TOGGLE_COLLAPSE"] = "ToggleCollapse";
|
|
8389
8390
|
return ViewCallTag2;
|
|
8390
8391
|
})(ViewCallTag || {});
|
|
8391
8392
|
|
|
@@ -14601,7 +14602,7 @@ function installCommand() {
|
|
|
14601
14602
|
}
|
|
14602
14603
|
|
|
14603
14604
|
// src/app-hub.ts
|
|
14604
|
-
import { RuntimeError as
|
|
14605
|
+
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
14605
14606
|
|
|
14606
14607
|
// src/application.ts
|
|
14607
14608
|
import { Net } from "@ibiz-template/core";
|
|
@@ -14850,7 +14851,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
14850
14851
|
// src/controller/common/view/view.controller.ts
|
|
14851
14852
|
import { createUUID as createUUID3, notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
14852
14853
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError24 } from "@ibiz-template/core";
|
|
14853
|
-
import { isEmpty as isEmpty8, isNil as
|
|
14854
|
+
import { isEmpty as isEmpty8, isNil as isNil16, isNotNil as isNotNil2 } from "ramda";
|
|
14854
14855
|
|
|
14855
14856
|
// src/controller/utils/loading/loading.state.ts
|
|
14856
14857
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -15474,7 +15475,8 @@ function getOriginData(data) {
|
|
|
15474
15475
|
|
|
15475
15476
|
// src/controller/utils/value-rule/value-rule.ts
|
|
15476
15477
|
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
15477
|
-
import { isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
15478
|
+
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
15479
|
+
import { isNil as isNil12 } from "ramda";
|
|
15478
15480
|
function generateRules(itemVRs, name, valueItemName) {
|
|
15479
15481
|
const rules = [];
|
|
15480
15482
|
itemVRs.forEach((item) => {
|
|
@@ -15532,10 +15534,68 @@ function generateRules(itemVRs, name, valueItemName) {
|
|
|
15532
15534
|
});
|
|
15533
15535
|
return rules;
|
|
15534
15536
|
}
|
|
15537
|
+
function generateEditorRules(editor) {
|
|
15538
|
+
const rules = [];
|
|
15539
|
+
const { maxLength, minLength } = editor;
|
|
15540
|
+
const { maxValue, minValue } = editor;
|
|
15541
|
+
if (maxLength) {
|
|
15542
|
+
rules.push({
|
|
15543
|
+
validator: (rule, value, callback) => {
|
|
15544
|
+
if (!isNil12(value) && value.length > maxLength) {
|
|
15545
|
+
callback(
|
|
15546
|
+
new Error(
|
|
15547
|
+
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
15548
|
+
)
|
|
15549
|
+
);
|
|
15550
|
+
} else {
|
|
15551
|
+
return true;
|
|
15552
|
+
}
|
|
15553
|
+
}
|
|
15554
|
+
});
|
|
15555
|
+
}
|
|
15556
|
+
if (minLength) {
|
|
15557
|
+
rules.push({
|
|
15558
|
+
validator: (rule, value, callback) => {
|
|
15559
|
+
if (!isNil12(value) && value.length < minLength) {
|
|
15560
|
+
callback(
|
|
15561
|
+
new Error(
|
|
15562
|
+
"\u5185\u5BB9\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minLength, ",\u5F53\u524D\u957F\u5EA6\u4E3A").concat(value.length)
|
|
15563
|
+
)
|
|
15564
|
+
);
|
|
15565
|
+
} else {
|
|
15566
|
+
return true;
|
|
15567
|
+
}
|
|
15568
|
+
}
|
|
15569
|
+
});
|
|
15570
|
+
}
|
|
15571
|
+
if (!isNil12(maxValue)) {
|
|
15572
|
+
rules.push({
|
|
15573
|
+
validator: (rule, value, callback) => {
|
|
15574
|
+
if (!isNil12(value) && isNumber(value) && value > maxValue) {
|
|
15575
|
+
callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
|
|
15576
|
+
} else {
|
|
15577
|
+
return true;
|
|
15578
|
+
}
|
|
15579
|
+
}
|
|
15580
|
+
});
|
|
15581
|
+
}
|
|
15582
|
+
if (!isNil12(minValue)) {
|
|
15583
|
+
rules.push({
|
|
15584
|
+
validator: (rule, value, callback) => {
|
|
15585
|
+
if (!isNil12(value) && isNumber(value) && value < minValue) {
|
|
15586
|
+
callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
|
|
15587
|
+
} else {
|
|
15588
|
+
return true;
|
|
15589
|
+
}
|
|
15590
|
+
}
|
|
15591
|
+
});
|
|
15592
|
+
}
|
|
15593
|
+
return rules;
|
|
15594
|
+
}
|
|
15535
15595
|
|
|
15536
15596
|
// src/controller/utils/value-ex/value-ex.ts
|
|
15537
15597
|
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
15538
|
-
import { isNil as
|
|
15598
|
+
import { isNil as isNil13, mergeLeft } from "ramda";
|
|
15539
15599
|
var ValueExUtil = class {
|
|
15540
15600
|
/**
|
|
15541
15601
|
* 合并默认值
|
|
@@ -15560,7 +15620,7 @@ var ValueExUtil = class {
|
|
|
15560
15620
|
* @return {*} {string}
|
|
15561
15621
|
*/
|
|
15562
15622
|
static toText(options, value) {
|
|
15563
|
-
if (
|
|
15623
|
+
if (isNil13(value) || value === "") {
|
|
15564
15624
|
return "";
|
|
15565
15625
|
}
|
|
15566
15626
|
const { valueType, objectNameField, textSeparator } = this.mergeDefault(options);
|
|
@@ -15585,12 +15645,12 @@ var ValueExUtil = class {
|
|
|
15585
15645
|
import { RuntimeError as RuntimeError22, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
15586
15646
|
import dayjs from "dayjs";
|
|
15587
15647
|
import { createUUID as createUUID2 } from "qx-util";
|
|
15588
|
-
import { isNil as
|
|
15648
|
+
import { isNil as isNil14, isNotNil } from "ramda";
|
|
15589
15649
|
function getDefaultValue(opts, origins) {
|
|
15590
15650
|
var _a;
|
|
15591
15651
|
const { name, valueType, defaultValue, valueFormat } = opts;
|
|
15592
15652
|
const { data, context, params } = origins;
|
|
15593
|
-
if (
|
|
15653
|
+
if (isNil14(valueType) && isNil14(defaultValue)) {
|
|
15594
15654
|
return;
|
|
15595
15655
|
}
|
|
15596
15656
|
if (valueType === "RESET") {
|
|
@@ -15843,7 +15903,7 @@ var BaseController = class {
|
|
|
15843
15903
|
|
|
15844
15904
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
15845
15905
|
import { RuntimeError as RuntimeError23, RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
15846
|
-
import { isNil as
|
|
15906
|
+
import { isNil as isNil15, mergeRight as mergeRight2 } from "ramda";
|
|
15847
15907
|
var ViewMsgController = class _ViewMsgController {
|
|
15848
15908
|
constructor(msgGroupId) {
|
|
15849
15909
|
this.msgGroupId = msgGroupId;
|
|
@@ -16019,19 +16079,19 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
16019
16079
|
const removeModeField = this.getDeFieldName(entity, removeFlagAppDEFieldId);
|
|
16020
16080
|
const deViewMessages = dataSet.map((item) => {
|
|
16021
16081
|
const message = {};
|
|
16022
|
-
if (positionField && !
|
|
16082
|
+
if (positionField && !isNil15(item[positionField])) {
|
|
16023
16083
|
message.position = item[positionField];
|
|
16024
16084
|
}
|
|
16025
|
-
if (titleField && !
|
|
16085
|
+
if (titleField && !isNil15(item[titleField])) {
|
|
16026
16086
|
message.title = item[titleField];
|
|
16027
16087
|
}
|
|
16028
|
-
if (messageField && !
|
|
16088
|
+
if (messageField && !isNil15(item[messageField])) {
|
|
16029
16089
|
message.message = item[messageField];
|
|
16030
16090
|
}
|
|
16031
|
-
if (typeField && !
|
|
16091
|
+
if (typeField && !isNil15(item[typeField])) {
|
|
16032
16092
|
message.messageType = item[typeField];
|
|
16033
16093
|
}
|
|
16034
|
-
if (removeModeField && !
|
|
16094
|
+
if (removeModeField && !isNil15(item[removeModeField])) {
|
|
16035
16095
|
message.removeMode = item[removeModeField];
|
|
16036
16096
|
}
|
|
16037
16097
|
return mergeRight2(basicMsg, message);
|
|
@@ -16251,7 +16311,7 @@ var ViewController = class extends BaseController {
|
|
|
16251
16311
|
*/
|
|
16252
16312
|
handleContextParams() {
|
|
16253
16313
|
this.context.srfappid = this.model.appId;
|
|
16254
|
-
if (
|
|
16314
|
+
if (isNil16(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
16255
16315
|
this.context.srfsessionid = createUUID3();
|
|
16256
16316
|
}
|
|
16257
16317
|
const navContexts = this.model.appViewNavContexts;
|
|
@@ -16566,7 +16626,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
16566
16626
|
|
|
16567
16627
|
// src/controller/common/control/control.controller.ts
|
|
16568
16628
|
import { NoticeError } from "@ibiz-template/core";
|
|
16569
|
-
import { isNil as
|
|
16629
|
+
import { isNil as isNil17 } from "ramda";
|
|
16570
16630
|
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
16571
16631
|
var ControlController = class extends BaseController {
|
|
16572
16632
|
/**
|
|
@@ -16787,7 +16847,7 @@ var ControlController = class extends BaseController {
|
|
|
16787
16847
|
let message;
|
|
16788
16848
|
let duration;
|
|
16789
16849
|
if (msgItem && msgItem.content) {
|
|
16790
|
-
duration =
|
|
16850
|
+
duration = isNil17(msgItem.timeout) ? void 0 : msgItem.timeout / 1e3;
|
|
16791
16851
|
const scriptParams = { ...this.getEventArgs() };
|
|
16792
16852
|
if (opts == null ? void 0 : opts.data) {
|
|
16793
16853
|
scriptParams.data = opts.data;
|
|
@@ -17584,7 +17644,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17584
17644
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17585
17645
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17586
17646
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17587
|
-
import { clone as clone13, isNil as
|
|
17647
|
+
import { clone as clone13, isNil as isNil18, mergeDeepRight } from "ramda";
|
|
17588
17648
|
dayjs3.extend(minMax);
|
|
17589
17649
|
dayjs3.extend(isSameOrBefore);
|
|
17590
17650
|
dayjs3.extend(quarterOfYear);
|
|
@@ -17673,10 +17733,10 @@ var BaseSeriesGenerator = class {
|
|
|
17673
17733
|
* @return {*} {(string | undefined)}
|
|
17674
17734
|
*/
|
|
17675
17735
|
translateVal(codeListKey, val, isExclude = false) {
|
|
17676
|
-
if (
|
|
17736
|
+
if (isNil18(val)) {
|
|
17677
17737
|
return void 0;
|
|
17678
17738
|
}
|
|
17679
|
-
if (
|
|
17739
|
+
if (isNil18(codeListKey)) {
|
|
17680
17740
|
return val;
|
|
17681
17741
|
}
|
|
17682
17742
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -17706,7 +17766,7 @@ var BaseSeriesGenerator = class {
|
|
|
17706
17766
|
seriesCodeListId,
|
|
17707
17767
|
item[this.groupField]
|
|
17708
17768
|
);
|
|
17709
|
-
if (
|
|
17769
|
+
if (isNil18(groupVal)) {
|
|
17710
17770
|
return;
|
|
17711
17771
|
}
|
|
17712
17772
|
group = groupVal;
|
|
@@ -20909,6 +20969,7 @@ var PortletPartController = class {
|
|
|
20909
20969
|
await this.onInit();
|
|
20910
20970
|
}
|
|
20911
20971
|
async onInit() {
|
|
20972
|
+
this.onDataChange = this.onDataChange.bind(this);
|
|
20912
20973
|
const { layoutPos, sysCss } = this.model;
|
|
20913
20974
|
if (layoutPos) {
|
|
20914
20975
|
const { width, height } = calcLayoutHeightWidth(this.model);
|
|
@@ -21052,7 +21113,7 @@ var MenuPortletController = class extends PortletPartController {
|
|
|
21052
21113
|
|
|
21053
21114
|
// src/controller/control/data-view/data-view.controller.ts
|
|
21054
21115
|
import { RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
21055
|
-
import { isNil as
|
|
21116
|
+
import { isNil as isNil19 } from "ramda";
|
|
21056
21117
|
|
|
21057
21118
|
// src/controller/control/data-view/data-view.service.ts
|
|
21058
21119
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -21334,7 +21395,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21334
21395
|
const groupMap = /* @__PURE__ */ new Map();
|
|
21335
21396
|
items.forEach((item) => {
|
|
21336
21397
|
const groupVal = item[groupAppDEFieldId];
|
|
21337
|
-
if (
|
|
21398
|
+
if (isNil19(groupVal)) {
|
|
21338
21399
|
return;
|
|
21339
21400
|
}
|
|
21340
21401
|
if (!groupMap.has(groupVal)) {
|
|
@@ -23088,8 +23149,8 @@ var FormItemController = class extends FormDetailController {
|
|
|
23088
23149
|
* 值规则
|
|
23089
23150
|
*
|
|
23090
23151
|
* @author lxm
|
|
23091
|
-
* @date
|
|
23092
|
-
* @type {IData}
|
|
23152
|
+
* @date 2023-10-18 03:39:23
|
|
23153
|
+
* @type {IData[]}
|
|
23093
23154
|
*/
|
|
23094
23155
|
this.rules = [];
|
|
23095
23156
|
this.context = form.context;
|
|
@@ -23195,15 +23256,22 @@ var FormItemController = class extends FormDetailController {
|
|
|
23195
23256
|
* @returns {*}
|
|
23196
23257
|
*/
|
|
23197
23258
|
async initRules() {
|
|
23259
|
+
this.rules = [];
|
|
23198
23260
|
const formItemsVRs = filterValueRules(
|
|
23199
23261
|
this.form.model.deformItemVRs || [],
|
|
23200
23262
|
this.name
|
|
23201
23263
|
);
|
|
23202
|
-
if (
|
|
23203
|
-
|
|
23264
|
+
if (formItemsVRs) {
|
|
23265
|
+
this.rules.push(
|
|
23266
|
+
...generateRules(formItemsVRs, this.name, this.valueItemName)
|
|
23267
|
+
);
|
|
23268
|
+
}
|
|
23269
|
+
if (this.model.editor) {
|
|
23270
|
+
this.rules.push(...generateEditorRules(this.model.editor));
|
|
23271
|
+
}
|
|
23272
|
+
if (this.rules.length > 0) {
|
|
23273
|
+
this.validator = new Schema({ [this.name]: this.rules });
|
|
23204
23274
|
}
|
|
23205
|
-
this.rules = generateRules(formItemsVRs, this.name, this.valueItemName);
|
|
23206
|
-
this.validator = new Schema({ [this.name]: this.rules });
|
|
23207
23275
|
}
|
|
23208
23276
|
/**
|
|
23209
23277
|
* 计算启用条件的禁用
|
|
@@ -26119,7 +26187,7 @@ var GridController = class extends MDControlController {
|
|
|
26119
26187
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
26120
26188
|
import { DataTypes as DataTypes3, ModelError as ModelError26 } from "@ibiz-template/core";
|
|
26121
26189
|
import dayjs4 from "dayjs";
|
|
26122
|
-
import { clone as clone19, isNil as
|
|
26190
|
+
import { clone as clone19, isNil as isNil20 } from "ramda";
|
|
26123
26191
|
var GridFieldColumnController = class extends GridColumnController {
|
|
26124
26192
|
constructor() {
|
|
26125
26193
|
super(...arguments);
|
|
@@ -26289,7 +26357,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
26289
26357
|
return;
|
|
26290
26358
|
}
|
|
26291
26359
|
const fieldName = aggField || this.model.id;
|
|
26292
|
-
items = items.filter((item) => !
|
|
26360
|
+
items = items.filter((item) => !isNil20(item[fieldName]));
|
|
26293
26361
|
let aggValue;
|
|
26294
26362
|
if (this.grid.model.aggMode === "PAGE") {
|
|
26295
26363
|
switch (aggMode) {
|
|
@@ -26417,8 +26485,8 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26417
26485
|
* 值规则
|
|
26418
26486
|
*
|
|
26419
26487
|
* @author lxm
|
|
26420
|
-
* @date
|
|
26421
|
-
* @type {IData}
|
|
26488
|
+
* @date 2023-10-18 03:39:40
|
|
26489
|
+
* @type {IData[]}
|
|
26422
26490
|
*/
|
|
26423
26491
|
this.rules = [];
|
|
26424
26492
|
}
|
|
@@ -26498,19 +26566,22 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
26498
26566
|
* @returns {*}
|
|
26499
26567
|
*/
|
|
26500
26568
|
async initRules() {
|
|
26569
|
+
this.rules = [];
|
|
26501
26570
|
const editItemsVRs = filterValueRules(
|
|
26502
26571
|
this.grid.model.degridEditItemVRs || [],
|
|
26503
26572
|
this.fieldName
|
|
26504
26573
|
);
|
|
26505
|
-
if (
|
|
26506
|
-
|
|
26574
|
+
if (editItemsVRs) {
|
|
26575
|
+
this.rules.push(
|
|
26576
|
+
...generateRules(editItemsVRs, this.fieldName, this.valueItemName)
|
|
26577
|
+
);
|
|
26578
|
+
}
|
|
26579
|
+
if (this.editItem.editor) {
|
|
26580
|
+
this.rules.push(...generateEditorRules(this.editItem.editor));
|
|
26581
|
+
}
|
|
26582
|
+
if (this.rules.length > 0) {
|
|
26583
|
+
this.validator = new Schema2({ [this.fieldName]: this.rules });
|
|
26507
26584
|
}
|
|
26508
|
-
this.rules = generateRules(
|
|
26509
|
-
editItemsVRs,
|
|
26510
|
-
this.fieldName,
|
|
26511
|
-
this.valueItemName
|
|
26512
|
-
);
|
|
26513
|
-
this.validator = new Schema2({ [this.fieldName]: this.rules });
|
|
26514
26585
|
}
|
|
26515
26586
|
/**
|
|
26516
26587
|
* 设置行属性的值
|
|
@@ -27590,7 +27661,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
27590
27661
|
|
|
27591
27662
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
27592
27663
|
import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
|
|
27593
|
-
import { isNil as
|
|
27664
|
+
import { isNil as isNil21 } from "ramda";
|
|
27594
27665
|
|
|
27595
27666
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
27596
27667
|
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
@@ -27797,7 +27868,7 @@ var SearchBarController = class extends ControlController {
|
|
|
27797
27868
|
let hasError = false;
|
|
27798
27869
|
recursiveIterate6(this.state.filterNodes[0], (node) => {
|
|
27799
27870
|
if (node.leaf) {
|
|
27800
|
-
if (node.field && node.valueOP && !
|
|
27871
|
+
if (node.field && node.valueOP && !isNil21(node.value)) {
|
|
27801
27872
|
hasFilter = true;
|
|
27802
27873
|
} else {
|
|
27803
27874
|
hasError = true;
|
|
@@ -28910,7 +28981,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
28910
28981
|
|
|
28911
28982
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
28912
28983
|
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
28913
|
-
import { isNil as
|
|
28984
|
+
import { isNil as isNil22 } from "ramda";
|
|
28914
28985
|
|
|
28915
28986
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
28916
28987
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -29153,7 +29224,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
29153
29224
|
const groupMap = /* @__PURE__ */ new Map();
|
|
29154
29225
|
items.forEach((item) => {
|
|
29155
29226
|
const groupVal = item[groupAppDEFieldId];
|
|
29156
|
-
if (
|
|
29227
|
+
if (isNil22(groupVal)) {
|
|
29157
29228
|
return;
|
|
29158
29229
|
}
|
|
29159
29230
|
if (!groupMap.has(groupVal)) {
|
|
@@ -29230,7 +29301,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
29230
29301
|
|
|
29231
29302
|
// src/controller/control/kanban/kanban.controller.ts
|
|
29232
29303
|
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
29233
|
-
import { isNil as
|
|
29304
|
+
import { isNil as isNil23 } from "ramda";
|
|
29234
29305
|
|
|
29235
29306
|
// src/controller/control/kanban/kanban.service.ts
|
|
29236
29307
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -29312,7 +29383,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
29312
29383
|
const isAsc = minorSortDir === "ASC";
|
|
29313
29384
|
items.forEach((item) => {
|
|
29314
29385
|
const sortValue = item[sortField];
|
|
29315
|
-
if (
|
|
29386
|
+
if (isNil23(sortValue)) {
|
|
29316
29387
|
item[sortField] = 0;
|
|
29317
29388
|
} else {
|
|
29318
29389
|
const toNum = Number(sortValue);
|
|
@@ -29826,6 +29897,308 @@ var TreeGridController = class extends GridController {
|
|
|
29826
29897
|
var TreeGridService = class extends GridService {
|
|
29827
29898
|
};
|
|
29828
29899
|
|
|
29900
|
+
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
29901
|
+
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
29902
|
+
import { createUUID as createUUID5 } from "qx-util";
|
|
29903
|
+
|
|
29904
|
+
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
29905
|
+
var MEditViewPanelService = class extends MDControlService {
|
|
29906
|
+
};
|
|
29907
|
+
|
|
29908
|
+
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
29909
|
+
var MEditViewPanelController = class extends MDControlController {
|
|
29910
|
+
constructor() {
|
|
29911
|
+
super(...arguments);
|
|
29912
|
+
/**
|
|
29913
|
+
* 是否显示底部按钮
|
|
29914
|
+
*
|
|
29915
|
+
*/
|
|
29916
|
+
this.showButton = true;
|
|
29917
|
+
/**
|
|
29918
|
+
* 关系实体参数对象
|
|
29919
|
+
*
|
|
29920
|
+
*/
|
|
29921
|
+
this.deResParameters = [];
|
|
29922
|
+
/**
|
|
29923
|
+
* 当前应用视图参数对象
|
|
29924
|
+
*
|
|
29925
|
+
*/
|
|
29926
|
+
this.parameters = [];
|
|
29927
|
+
}
|
|
29928
|
+
async onCreated() {
|
|
29929
|
+
await super.onCreated();
|
|
29930
|
+
this.service = new MEditViewPanelService(this.model);
|
|
29931
|
+
await this.service.init(this.context);
|
|
29932
|
+
await this.initParameters();
|
|
29933
|
+
}
|
|
29934
|
+
initState() {
|
|
29935
|
+
super.initState();
|
|
29936
|
+
this.state.panelUiItems = [];
|
|
29937
|
+
this.state.activeTab = "";
|
|
29938
|
+
this.state.size = 1e3;
|
|
29939
|
+
}
|
|
29940
|
+
/**
|
|
29941
|
+
* 格式化视图关系参数
|
|
29942
|
+
*
|
|
29943
|
+
* @param {IContext} context 应用上下文数据
|
|
29944
|
+
* @param {IAppDERS[][]} appDERSPaths 关系路径数据
|
|
29945
|
+
*/
|
|
29946
|
+
async formatAppDERSPath(context, appDERSPaths) {
|
|
29947
|
+
var _a, _b;
|
|
29948
|
+
if (!appDERSPaths || appDERSPaths.length === 0) {
|
|
29949
|
+
return [];
|
|
29950
|
+
}
|
|
29951
|
+
let counter = 0;
|
|
29952
|
+
for (const appDERSPath of appDERSPaths) {
|
|
29953
|
+
const tempData = { isInclude: true, data: [] };
|
|
29954
|
+
for (const singleAppDERSPath of appDERSPath) {
|
|
29955
|
+
const majorPSAppDataEntity = await ibiz.hub.getAppDataEntity(
|
|
29956
|
+
singleAppDERSPath.majorAppDataEntityId
|
|
29957
|
+
);
|
|
29958
|
+
if (majorPSAppDataEntity && majorPSAppDataEntity.codeName) {
|
|
29959
|
+
tempData.isInclude = context[majorPSAppDataEntity.codeName.toLowerCase()] && tempData.isInclude;
|
|
29960
|
+
tempData.data.push({
|
|
29961
|
+
parameterName: (_a = majorPSAppDataEntity.keyAppDEFieldId) == null ? void 0 : _a.toLowerCase(),
|
|
29962
|
+
pathName: (_b = majorPSAppDataEntity.codeName) == null ? void 0 : _b.toLowerCase()
|
|
29963
|
+
});
|
|
29964
|
+
}
|
|
29965
|
+
}
|
|
29966
|
+
counter++;
|
|
29967
|
+
if (tempData.isInclude) {
|
|
29968
|
+
return tempData.data;
|
|
29969
|
+
}
|
|
29970
|
+
if (counter === appDERSPaths.length) {
|
|
29971
|
+
return [];
|
|
29972
|
+
}
|
|
29973
|
+
}
|
|
29974
|
+
return [];
|
|
29975
|
+
}
|
|
29976
|
+
/**
|
|
29977
|
+
* 初始化嵌入应用视图及实体参数对象
|
|
29978
|
+
* @return {*}
|
|
29979
|
+
* @author: zhujiamin
|
|
29980
|
+
* @Date: 2023-10-16 13:56:56
|
|
29981
|
+
*/
|
|
29982
|
+
async initParameters() {
|
|
29983
|
+
var _a, _b;
|
|
29984
|
+
if (this.controlParams.SHOWBUTTON) {
|
|
29985
|
+
this.showButton = !Object.is(this.controlParams.SHOWBUTTON, "false");
|
|
29986
|
+
}
|
|
29987
|
+
if (this.model.embeddedAppViewId) {
|
|
29988
|
+
const embedView = await ibiz.hub.getAppView(this.model.embeddedAppViewId);
|
|
29989
|
+
if (embedView.appDataEntityId) {
|
|
29990
|
+
const embedViewEntity = await ibiz.hub.getAppDataEntity(
|
|
29991
|
+
embedView.appDataEntityId
|
|
29992
|
+
);
|
|
29993
|
+
if (embedView && embedViewEntity) {
|
|
29994
|
+
this.deResParameters = await this.formatAppDERSPath(
|
|
29995
|
+
this.context,
|
|
29996
|
+
embedView.appDERSPaths
|
|
29997
|
+
);
|
|
29998
|
+
this.parameters = [
|
|
29999
|
+
{
|
|
30000
|
+
parameterName: (_a = embedViewEntity.keyAppDEFieldId) == null ? void 0 : _a.toLowerCase(),
|
|
30001
|
+
pathName: (_b = embedViewEntity.codeName) == null ? void 0 : _b.toLowerCase()
|
|
30002
|
+
}
|
|
30003
|
+
];
|
|
30004
|
+
} else {
|
|
30005
|
+
this.deResParameters = [];
|
|
30006
|
+
this.parameters = [];
|
|
30007
|
+
}
|
|
30008
|
+
}
|
|
30009
|
+
}
|
|
30010
|
+
}
|
|
30011
|
+
/**
|
|
30012
|
+
* 部件加载后处理
|
|
30013
|
+
*
|
|
30014
|
+
* @author chitanda
|
|
30015
|
+
* @date 2023-06-21 15:06:44
|
|
30016
|
+
* @param {MDCtrlLoadParams} args 本次请求参数
|
|
30017
|
+
* @param {IData[]} items 上游处理的数据(默认是后台数据)
|
|
30018
|
+
* @return {*} {Promise<IData[]>} 返回给后续处理的数据
|
|
30019
|
+
*/
|
|
30020
|
+
async afterLoad(args, items) {
|
|
30021
|
+
await super.afterLoad(args, items);
|
|
30022
|
+
this.state.panelUiItems = [];
|
|
30023
|
+
this.doItems(items);
|
|
30024
|
+
if (this.model.panelStyle === "TAB_TOP" && this.state.panelUiItems.length > 0) {
|
|
30025
|
+
this.state.activeTab = this.state.panelUiItems[0].id;
|
|
30026
|
+
}
|
|
30027
|
+
return items;
|
|
30028
|
+
}
|
|
30029
|
+
/**
|
|
30030
|
+
* 处理UI所需数据
|
|
30031
|
+
* @param {ControlVO} arg
|
|
30032
|
+
* @return {*}
|
|
30033
|
+
* @author: zhujiamin
|
|
30034
|
+
* @Date: 2023-10-16 17:55:31
|
|
30035
|
+
*/
|
|
30036
|
+
handlePanelItemParams(arg) {
|
|
30037
|
+
const [{ parameterName }] = this.parameters;
|
|
30038
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID5());
|
|
30039
|
+
const item = { id, context: {}, params: {}, data: arg, srfmajortext: "" };
|
|
30040
|
+
Object.assign(item.context, this.context);
|
|
30041
|
+
this.deResParameters.forEach((deResParameter) => {
|
|
30042
|
+
const { parameterName: parameterName2, pathName } = deResParameter;
|
|
30043
|
+
if (this.context[parameterName2] && !Object.is(this.context[parameterName2], "")) {
|
|
30044
|
+
Object.assign(item.context, {
|
|
30045
|
+
[pathName]: this.context[parameterName2]
|
|
30046
|
+
});
|
|
30047
|
+
} else if (arg[parameterName2] && !Object.is(arg[parameterName2], "")) {
|
|
30048
|
+
Object.assign(item.context, {
|
|
30049
|
+
[pathName]: arg[parameterName2]
|
|
30050
|
+
});
|
|
30051
|
+
}
|
|
30052
|
+
});
|
|
30053
|
+
this.parameters.forEach((parameter) => {
|
|
30054
|
+
const { parameterName: parameterName2, pathName } = parameter;
|
|
30055
|
+
if (arg[parameterName2] && !Object.is(arg[parameterName2], "")) {
|
|
30056
|
+
Object.assign(item.context, {
|
|
30057
|
+
[pathName]: arg[parameterName2]
|
|
30058
|
+
});
|
|
30059
|
+
}
|
|
30060
|
+
if (arg.srfmajortext && !Object.is(arg.srfmajortext, "")) {
|
|
30061
|
+
Object.assign(item, { srfmajortext: arg.srfmajortext });
|
|
30062
|
+
} else if (arg.srfuf === 0) {
|
|
30063
|
+
Object.assign(item, { srfmajortext: "\u8349\u7A3F--\u65B0\u5EFA" });
|
|
30064
|
+
}
|
|
30065
|
+
});
|
|
30066
|
+
Object.assign(item.params, this.params);
|
|
30067
|
+
return item;
|
|
30068
|
+
}
|
|
30069
|
+
/**
|
|
30070
|
+
* 处理数据
|
|
30071
|
+
* @param {ControlVO} datas
|
|
30072
|
+
* @return {*}
|
|
30073
|
+
* @author: zhujiamin
|
|
30074
|
+
* @Date: 2023-10-16 15:00:02
|
|
30075
|
+
*/
|
|
30076
|
+
doItems(datas) {
|
|
30077
|
+
datas.forEach((arg) => {
|
|
30078
|
+
const item = this.handlePanelItemParams(arg);
|
|
30079
|
+
this.state.panelUiItems.push(item);
|
|
30080
|
+
});
|
|
30081
|
+
}
|
|
30082
|
+
/**
|
|
30083
|
+
* 处理添加
|
|
30084
|
+
* @return {*}
|
|
30085
|
+
* @author: zhujiamin
|
|
30086
|
+
* @Date: 2023-10-16 15:18:01
|
|
30087
|
+
*/
|
|
30088
|
+
async handleAdd() {
|
|
30089
|
+
this.doItems([{ srfuf: 0 }]);
|
|
30090
|
+
if (this.model.panelStyle === "TAB_TOP") {
|
|
30091
|
+
this.state.activeTab = this.state.panelUiItems[this.state.panelUiItems.length - 1].id;
|
|
30092
|
+
}
|
|
30093
|
+
}
|
|
30094
|
+
/**
|
|
30095
|
+
* 处理删除
|
|
30096
|
+
* @param {IPanelUiItem} item
|
|
30097
|
+
* @return {*}
|
|
30098
|
+
* @author: zhujiamin
|
|
30099
|
+
* @Date: 2023-10-16 15:23:59
|
|
30100
|
+
*/
|
|
30101
|
+
async handleDelete(item) {
|
|
30102
|
+
if (item.data.srfuf === 0) {
|
|
30103
|
+
const index = this.state.panelUiItems.findIndex((value) => {
|
|
30104
|
+
return value === item;
|
|
30105
|
+
});
|
|
30106
|
+
this.state.panelUiItems.splice(index, 1);
|
|
30107
|
+
} else {
|
|
30108
|
+
await this.remove({ data: [item.data] });
|
|
30109
|
+
}
|
|
30110
|
+
}
|
|
30111
|
+
/**
|
|
30112
|
+
* 处理tab删除
|
|
30113
|
+
* @param {IPanelUiItem} item
|
|
30114
|
+
* @return {*}
|
|
30115
|
+
* @author: zhujiamin
|
|
30116
|
+
* @Date: 2023-10-17 14:21:57
|
|
30117
|
+
*/
|
|
30118
|
+
async handleTabDelete(item, index) {
|
|
30119
|
+
let isBackToEnd = false;
|
|
30120
|
+
if (item.id === this.state.activeTab && index === this.state.panelUiItems.length - 1) {
|
|
30121
|
+
if (index > 0) {
|
|
30122
|
+
isBackToEnd = true;
|
|
30123
|
+
}
|
|
30124
|
+
}
|
|
30125
|
+
await this.handleDelete(item);
|
|
30126
|
+
if (isBackToEnd) {
|
|
30127
|
+
this.state.activeTab = this.state.panelUiItems[this.state.panelUiItems.length - 1].id;
|
|
30128
|
+
}
|
|
30129
|
+
}
|
|
30130
|
+
/**
|
|
30131
|
+
* 后台删除结束后界面删除逻辑
|
|
30132
|
+
*
|
|
30133
|
+
* @author lxm
|
|
30134
|
+
* @date 2022-09-06 19:09:10
|
|
30135
|
+
* @param {IData} data
|
|
30136
|
+
*/
|
|
30137
|
+
afterRemove(data) {
|
|
30138
|
+
super.afterRemove(data);
|
|
30139
|
+
const index = this.state.panelUiItems.findIndex(
|
|
30140
|
+
(item) => item.data.srfkey === data.srfkey
|
|
30141
|
+
);
|
|
30142
|
+
if (index !== -1) {
|
|
30143
|
+
this.state.panelUiItems.splice(index, 1);
|
|
30144
|
+
}
|
|
30145
|
+
}
|
|
30146
|
+
/**
|
|
30147
|
+
* 视图数据变化
|
|
30148
|
+
* @param {DataChangeEvent} args
|
|
30149
|
+
* @return {*}
|
|
30150
|
+
* @author: zhujiamin
|
|
30151
|
+
* @Date: 2023-10-16 17:20:45
|
|
30152
|
+
*/
|
|
30153
|
+
onViewDataChange(args, id) {
|
|
30154
|
+
if (args.eventName === "onSaveSuccess") {
|
|
30155
|
+
this.save(args.data[0], id);
|
|
30156
|
+
}
|
|
30157
|
+
}
|
|
30158
|
+
/**
|
|
30159
|
+
* 保存
|
|
30160
|
+
*
|
|
30161
|
+
* @param {ControlVO} data
|
|
30162
|
+
* @returns {*} {Promise<void>}
|
|
30163
|
+
*/
|
|
30164
|
+
async save(data, id) {
|
|
30165
|
+
const panelUiItemIndex = this.state.panelUiItems.findIndex(
|
|
30166
|
+
(item) => item.id === id
|
|
30167
|
+
);
|
|
30168
|
+
if (!panelUiItemIndex) {
|
|
30169
|
+
throw new RuntimeError49("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
30170
|
+
}
|
|
30171
|
+
await this.startLoading();
|
|
30172
|
+
let res;
|
|
30173
|
+
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
30174
|
+
const deName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
30175
|
+
const tempContext = this.context.clone();
|
|
30176
|
+
tempContext[deName] = data.srfkey;
|
|
30177
|
+
try {
|
|
30178
|
+
res = isCreate ? await this.service.create(tempContext, data) : await this.service.update(tempContext, data);
|
|
30179
|
+
} catch (error) {
|
|
30180
|
+
await this.evt.emit("onSaveError", void 0);
|
|
30181
|
+
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
|
|
30182
|
+
error,
|
|
30183
|
+
data: this.state.panelUiItems[panelUiItemIndex].data
|
|
30184
|
+
});
|
|
30185
|
+
throw error;
|
|
30186
|
+
} finally {
|
|
30187
|
+
await this.endLoading();
|
|
30188
|
+
}
|
|
30189
|
+
const index = this.state.items.findIndex(
|
|
30190
|
+
(item) => item.srfkey === data.srfkey
|
|
30191
|
+
);
|
|
30192
|
+
this.state.items.splice(index, 1, res.data);
|
|
30193
|
+
this.state.panelUiItems.splice(
|
|
30194
|
+
panelUiItemIndex,
|
|
30195
|
+
1,
|
|
30196
|
+
this.handlePanelItemParams(res.data)
|
|
30197
|
+
);
|
|
30198
|
+
await this.evt.emit("onSaveSuccess", void 0);
|
|
30199
|
+
}
|
|
30200
|
+
};
|
|
30201
|
+
|
|
29829
30202
|
// src/controller/hub.controller.ts
|
|
29830
30203
|
var HubController = class {
|
|
29831
30204
|
constructor() {
|
|
@@ -30041,7 +30414,7 @@ var AppHub = class {
|
|
|
30041
30414
|
this.registerAppView(appView);
|
|
30042
30415
|
return appView;
|
|
30043
30416
|
}
|
|
30044
|
-
throw new
|
|
30417
|
+
throw new RuntimeError50("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
30045
30418
|
}
|
|
30046
30419
|
/**
|
|
30047
30420
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -30072,7 +30445,7 @@ var AppHub = class {
|
|
|
30072
30445
|
this.registerAppDataEntity(entity, appId);
|
|
30073
30446
|
return entity;
|
|
30074
30447
|
}
|
|
30075
|
-
throw new
|
|
30448
|
+
throw new RuntimeError50("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
30076
30449
|
}
|
|
30077
30450
|
/**
|
|
30078
30451
|
* 新建 hub 应用
|
|
@@ -30093,7 +30466,7 @@ var AppHub = class {
|
|
|
30093
30466
|
appModel = await this.modelLoaderProvider.getApp(id);
|
|
30094
30467
|
this.registerApp(appModel);
|
|
30095
30468
|
} else {
|
|
30096
|
-
throw new
|
|
30469
|
+
throw new RuntimeError50("\u672A\u627E\u5230\u5E94\u7528[".concat(id, "]\u6A21\u578B"));
|
|
30097
30470
|
}
|
|
30098
30471
|
const app = new Application(appModel);
|
|
30099
30472
|
this.appMap.set(id, app);
|
|
@@ -30191,7 +30564,7 @@ var EngineFactory = class {
|
|
|
30191
30564
|
};
|
|
30192
30565
|
|
|
30193
30566
|
// src/engine/view-base.engine.ts
|
|
30194
|
-
import { RuntimeError as
|
|
30567
|
+
import { RuntimeError as RuntimeError51 } from "@ibiz-template/core";
|
|
30195
30568
|
var ViewEngineBase = class {
|
|
30196
30569
|
/**
|
|
30197
30570
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -30379,7 +30752,7 @@ var ViewEngineBase = class {
|
|
|
30379
30752
|
const { appDataEntityId } = this.view.model;
|
|
30380
30753
|
const { evt, context, params } = this.view;
|
|
30381
30754
|
if (!appDataEntityId) {
|
|
30382
|
-
throw new
|
|
30755
|
+
throw new RuntimeError51("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
30383
30756
|
}
|
|
30384
30757
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
30385
30758
|
const res = await app.deService.exec(
|
|
@@ -30731,7 +31104,7 @@ import {
|
|
|
30731
31104
|
ModelError as ModelError28,
|
|
30732
31105
|
HttpError as HttpError4,
|
|
30733
31106
|
NoticeError as NoticeError2,
|
|
30734
|
-
RuntimeError as
|
|
31107
|
+
RuntimeError as RuntimeError52
|
|
30735
31108
|
} from "@ibiz-template/core";
|
|
30736
31109
|
var DefaultErrorHandler = class {
|
|
30737
31110
|
handle(error) {
|
|
@@ -30749,7 +31122,7 @@ var DefaultErrorHandler = class {
|
|
|
30749
31122
|
}
|
|
30750
31123
|
} else if (error instanceof NoticeError2) {
|
|
30751
31124
|
ibiz.message.error(error.message, error.duration, error.duration === 0);
|
|
30752
|
-
} else if (error instanceof
|
|
31125
|
+
} else if (error instanceof RuntimeError52) {
|
|
30753
31126
|
ibiz.message.error(error.message, 10, true);
|
|
30754
31127
|
}
|
|
30755
31128
|
ibiz.log.error(error);
|
|
@@ -30877,7 +31250,7 @@ var GlobalUtil = class {
|
|
|
30877
31250
|
};
|
|
30878
31251
|
|
|
30879
31252
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
30880
|
-
import { RuntimeError as
|
|
31253
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
30881
31254
|
var LogicExecutor = class {
|
|
30882
31255
|
/**
|
|
30883
31256
|
* @author lxm
|
|
@@ -30898,7 +31271,7 @@ var LogicExecutor = class {
|
|
|
30898
31271
|
*/
|
|
30899
31272
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30900
31273
|
execute(_executeParams) {
|
|
30901
|
-
throw new
|
|
31274
|
+
throw new RuntimeError53("Method not implemented.");
|
|
30902
31275
|
}
|
|
30903
31276
|
/**
|
|
30904
31277
|
* 销毁方法
|
|
@@ -31335,7 +31708,7 @@ var LogicSchedulerCenter = class {
|
|
|
31335
31708
|
};
|
|
31336
31709
|
|
|
31337
31710
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
31338
|
-
import { RuntimeError as
|
|
31711
|
+
import { RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
31339
31712
|
var LogicTrigger = class {
|
|
31340
31713
|
/**
|
|
31341
31714
|
* @author lxm
|
|
@@ -31395,7 +31768,7 @@ var LogicTrigger = class {
|
|
|
31395
31768
|
if (this.executor) {
|
|
31396
31769
|
return this.executor.execute(executeParams);
|
|
31397
31770
|
}
|
|
31398
|
-
throw new
|
|
31771
|
+
throw new RuntimeError54("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
31399
31772
|
}
|
|
31400
31773
|
/**
|
|
31401
31774
|
* 销毁方法
|
|
@@ -31412,12 +31785,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
31412
31785
|
};
|
|
31413
31786
|
|
|
31414
31787
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
31415
|
-
import { RuntimeError as
|
|
31788
|
+
import { RuntimeError as RuntimeError55 } from "@ibiz-template/core";
|
|
31416
31789
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
31417
31790
|
bindExecutor(executor) {
|
|
31418
31791
|
super.bindExecutor(executor);
|
|
31419
31792
|
if (this.executor.type !== "SCRIPT") {
|
|
31420
|
-
throw new
|
|
31793
|
+
throw new RuntimeError55(
|
|
31421
31794
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
31422
31795
|
);
|
|
31423
31796
|
}
|
|
@@ -31453,7 +31826,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
31453
31826
|
};
|
|
31454
31827
|
|
|
31455
31828
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
31456
|
-
import { RuntimeError as
|
|
31829
|
+
import { RuntimeError as RuntimeError56 } from "@ibiz-template/core";
|
|
31457
31830
|
var TimerTrigger = class extends LogicTrigger {
|
|
31458
31831
|
constructor() {
|
|
31459
31832
|
super(...arguments);
|
|
@@ -31462,7 +31835,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31462
31835
|
start() {
|
|
31463
31836
|
this.timer = setInterval(() => {
|
|
31464
31837
|
if (!this.scheduler.defaultParamsCb) {
|
|
31465
|
-
throw new
|
|
31838
|
+
throw new RuntimeError56("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
31466
31839
|
}
|
|
31467
31840
|
const params = this.scheduler.defaultParamsCb();
|
|
31468
31841
|
this.executor.execute(params);
|
|
@@ -31479,7 +31852,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31479
31852
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
31480
31853
|
import {
|
|
31481
31854
|
ModelError as ModelError31,
|
|
31482
|
-
RuntimeError as
|
|
31855
|
+
RuntimeError as RuntimeError57,
|
|
31483
31856
|
RuntimeModelError as RuntimeModelError61
|
|
31484
31857
|
} from "@ibiz-template/core";
|
|
31485
31858
|
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
@@ -31515,7 +31888,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31515
31888
|
const { context, params, ...rest } = parameters;
|
|
31516
31889
|
const { data } = parameters;
|
|
31517
31890
|
if (!(data == null ? void 0 : data[0])) {
|
|
31518
|
-
throw new
|
|
31891
|
+
throw new RuntimeError57("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
31519
31892
|
}
|
|
31520
31893
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31521
31894
|
let openViewRef;
|
|
@@ -31572,7 +31945,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31572
31945
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31573
31946
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
31574
31947
|
if (!findView) {
|
|
31575
|
-
throw new
|
|
31948
|
+
throw new RuntimeError57(
|
|
31576
31949
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31577
31950
|
);
|
|
31578
31951
|
}
|
|
@@ -31690,12 +32063,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31690
32063
|
}
|
|
31691
32064
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
31692
32065
|
if (!selectData) {
|
|
31693
|
-
throw new
|
|
32066
|
+
throw new RuntimeError57("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
31694
32067
|
}
|
|
31695
32068
|
const indexType = selectData.srfkey;
|
|
31696
32069
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find((item) => item.refMode === indexType);
|
|
31697
32070
|
if (!findView) {
|
|
31698
|
-
throw new
|
|
32071
|
+
throw new RuntimeError57(
|
|
31699
32072
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31700
32073
|
);
|
|
31701
32074
|
}
|
|
@@ -32091,6 +32464,8 @@ export {
|
|
|
32091
32464
|
MDCtrlController,
|
|
32092
32465
|
MDCtrlService,
|
|
32093
32466
|
MDViewEngine,
|
|
32467
|
+
MEditViewPanelController,
|
|
32468
|
+
MEditViewPanelService,
|
|
32094
32469
|
MenuPortletController,
|
|
32095
32470
|
MethodDto,
|
|
32096
32471
|
MobMDCtrlRowState,
|
|
@@ -32185,6 +32560,7 @@ export {
|
|
|
32185
32560
|
findFieldById,
|
|
32186
32561
|
findModelChild,
|
|
32187
32562
|
formatMultiData,
|
|
32563
|
+
generateEditorRules,
|
|
32188
32564
|
generateRules,
|
|
32189
32565
|
getAppCounterProvider,
|
|
32190
32566
|
getAppViewRef,
|