@ibiz-template/runtime 0.7.41-alpha.2 → 0.7.41-alpha.4
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 +441 -186
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts +1 -0
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +3 -0
- package/out/controller/common/control/md-control.controller.d.ts +17 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +17 -0
- package/out/controller/control/data-view/data-view.controller.d.ts +10 -2
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +60 -11
- 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 +17 -9
- package/out/controller/control/form/form/form.service.d.ts.map +1 -1
- package/out/controller/control/form/form/form.service.js +4 -0
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +19 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +49 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts +9 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +40 -5
- package/out/controller/control/list/list.controller.d.ts +9 -1
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +66 -9
- package/out/controller/utils/util/util.d.ts +8 -0
- package/out/controller/utils/util/util.d.ts.map +1 -1
- package/out/controller/utils/util/util.js +39 -0
- package/out/interface/api/common/global-config/i-api-global-app-menu-config.d.ts +6 -0
- package/out/interface/api/common/global-config/i-api-global-app-menu-config.d.ts.map +1 -1
- package/out/interface/api/common/global-config/i-api-global-config.d.ts +7 -0
- package/out/interface/api/common/global-config/i-api-global-config.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-md-control.controller.d.ts +40 -1
- package/out/interface/api/controller/control/i-api-md-control.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/index.d.ts +1 -1
- package/out/interface/api/controller/control/index.d.ts.map +1 -1
- package/out/interface/api/state/control/i-api-md-control.state.d.ts +6 -0
- package/out/interface/api/state/control/i-api-md-control.state.d.ts.map +1 -1
- package/out/interface/provider/i-app-menu-item.provider.d.ts +8 -8
- package/out/interface/provider/i-app-menu-item.provider.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +6 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +6 -0
- package/out/locale/zh-CN/index.d.ts +6 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +6 -0
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +5 -2
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +8 -0
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +12 -7
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -16623,25 +16623,25 @@ var require_html2canvas = __commonJS({
|
|
|
16623
16623
|
if (isStyleElement(node)) {
|
|
16624
16624
|
return this.createStyleClone(node);
|
|
16625
16625
|
}
|
|
16626
|
-
var
|
|
16627
|
-
if (isImageElement(
|
|
16626
|
+
var clone54 = node.cloneNode(false);
|
|
16627
|
+
if (isImageElement(clone54)) {
|
|
16628
16628
|
if (isImageElement(node) && node.currentSrc && node.currentSrc !== node.src) {
|
|
16629
|
-
|
|
16630
|
-
|
|
16629
|
+
clone54.src = node.currentSrc;
|
|
16630
|
+
clone54.srcset = "";
|
|
16631
16631
|
}
|
|
16632
|
-
if (
|
|
16633
|
-
|
|
16632
|
+
if (clone54.loading === "lazy") {
|
|
16633
|
+
clone54.loading = "eager";
|
|
16634
16634
|
}
|
|
16635
16635
|
}
|
|
16636
|
-
if (isCustomElement(
|
|
16637
|
-
return this.createCustomElementClone(
|
|
16636
|
+
if (isCustomElement(clone54)) {
|
|
16637
|
+
return this.createCustomElementClone(clone54);
|
|
16638
16638
|
}
|
|
16639
|
-
return
|
|
16639
|
+
return clone54;
|
|
16640
16640
|
};
|
|
16641
16641
|
DocumentCloner2.prototype.createCustomElementClone = function(node) {
|
|
16642
|
-
var
|
|
16643
|
-
copyCSSStyles(node.style,
|
|
16644
|
-
return
|
|
16642
|
+
var clone54 = document.createElement("html2canvascustomelement");
|
|
16643
|
+
copyCSSStyles(node.style, clone54);
|
|
16644
|
+
return clone54;
|
|
16645
16645
|
};
|
|
16646
16646
|
DocumentCloner2.prototype.createStyleClone = function(node) {
|
|
16647
16647
|
try {
|
|
@@ -16723,25 +16723,25 @@ var require_html2canvas = __commonJS({
|
|
|
16723
16723
|
blankCanvas.height = video.offsetHeight;
|
|
16724
16724
|
return blankCanvas;
|
|
16725
16725
|
};
|
|
16726
|
-
DocumentCloner2.prototype.appendChildNode = function(
|
|
16726
|
+
DocumentCloner2.prototype.appendChildNode = function(clone54, child, copyStyles) {
|
|
16727
16727
|
if (!isElementNode(child) || !isScriptElement(child) && !child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== "function" || !this.options.ignoreElements(child))) {
|
|
16728
16728
|
if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) {
|
|
16729
|
-
|
|
16729
|
+
clone54.appendChild(this.cloneNode(child, copyStyles));
|
|
16730
16730
|
}
|
|
16731
16731
|
}
|
|
16732
16732
|
};
|
|
16733
|
-
DocumentCloner2.prototype.cloneChildNodes = function(node,
|
|
16733
|
+
DocumentCloner2.prototype.cloneChildNodes = function(node, clone54, copyStyles) {
|
|
16734
16734
|
var _this = this;
|
|
16735
16735
|
for (var child = node.shadowRoot ? node.shadowRoot.firstChild : node.firstChild; child; child = child.nextSibling) {
|
|
16736
16736
|
if (isElementNode(child) && isSlotElement(child) && typeof child.assignedNodes === "function") {
|
|
16737
16737
|
var assignedNodes = child.assignedNodes();
|
|
16738
16738
|
if (assignedNodes.length) {
|
|
16739
16739
|
assignedNodes.forEach(function(assignedNode) {
|
|
16740
|
-
return _this.appendChildNode(
|
|
16740
|
+
return _this.appendChildNode(clone54, assignedNode, copyStyles);
|
|
16741
16741
|
});
|
|
16742
16742
|
}
|
|
16743
16743
|
} else {
|
|
16744
|
-
this.appendChildNode(
|
|
16744
|
+
this.appendChildNode(clone54, child, copyStyles);
|
|
16745
16745
|
}
|
|
16746
16746
|
}
|
|
16747
16747
|
};
|
|
@@ -16754,53 +16754,53 @@ var require_html2canvas = __commonJS({
|
|
|
16754
16754
|
}
|
|
16755
16755
|
var window2 = node.ownerDocument.defaultView;
|
|
16756
16756
|
if (window2 && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) {
|
|
16757
|
-
var
|
|
16758
|
-
|
|
16757
|
+
var clone54 = this.createElementClone(node);
|
|
16758
|
+
clone54.style.transitionProperty = "none";
|
|
16759
16759
|
var style = window2.getComputedStyle(node);
|
|
16760
16760
|
var styleBefore = window2.getComputedStyle(node, ":before");
|
|
16761
16761
|
var styleAfter = window2.getComputedStyle(node, ":after");
|
|
16762
|
-
if (this.referenceElement === node && isHTMLElementNode(
|
|
16763
|
-
this.clonedReferenceElement =
|
|
16762
|
+
if (this.referenceElement === node && isHTMLElementNode(clone54)) {
|
|
16763
|
+
this.clonedReferenceElement = clone54;
|
|
16764
16764
|
}
|
|
16765
|
-
if (isBodyElement(
|
|
16766
|
-
createPseudoHideStyles(
|
|
16765
|
+
if (isBodyElement(clone54)) {
|
|
16766
|
+
createPseudoHideStyles(clone54);
|
|
16767
16767
|
}
|
|
16768
16768
|
var counters = this.counters.parse(new CSSParsedCounterDeclaration(this.context, style));
|
|
16769
|
-
var before = this.resolvePseudoContent(node,
|
|
16769
|
+
var before = this.resolvePseudoContent(node, clone54, styleBefore, PseudoElementType.BEFORE);
|
|
16770
16770
|
if (isCustomElement(node)) {
|
|
16771
16771
|
copyStyles = true;
|
|
16772
16772
|
}
|
|
16773
16773
|
if (!isVideoElement(node)) {
|
|
16774
|
-
this.cloneChildNodes(node,
|
|
16774
|
+
this.cloneChildNodes(node, clone54, copyStyles);
|
|
16775
16775
|
}
|
|
16776
16776
|
if (before) {
|
|
16777
|
-
|
|
16777
|
+
clone54.insertBefore(before, clone54.firstChild);
|
|
16778
16778
|
}
|
|
16779
|
-
var after = this.resolvePseudoContent(node,
|
|
16779
|
+
var after = this.resolvePseudoContent(node, clone54, styleAfter, PseudoElementType.AFTER);
|
|
16780
16780
|
if (after) {
|
|
16781
|
-
|
|
16781
|
+
clone54.appendChild(after);
|
|
16782
16782
|
}
|
|
16783
16783
|
this.counters.pop(counters);
|
|
16784
16784
|
if (style && (this.options.copyStyles || isSVGElementNode(node)) && !isIFrameElement(node) || copyStyles) {
|
|
16785
|
-
copyCSSStyles(style,
|
|
16785
|
+
copyCSSStyles(style, clone54);
|
|
16786
16786
|
}
|
|
16787
16787
|
if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
|
|
16788
|
-
this.scrolledElements.push([
|
|
16788
|
+
this.scrolledElements.push([clone54, node.scrollLeft, node.scrollTop]);
|
|
16789
16789
|
}
|
|
16790
|
-
if ((isTextareaElement(node) || isSelectElement(node)) && (isTextareaElement(
|
|
16791
|
-
|
|
16790
|
+
if ((isTextareaElement(node) || isSelectElement(node)) && (isTextareaElement(clone54) || isSelectElement(clone54))) {
|
|
16791
|
+
clone54.value = node.value;
|
|
16792
16792
|
}
|
|
16793
|
-
return
|
|
16793
|
+
return clone54;
|
|
16794
16794
|
}
|
|
16795
16795
|
return node.cloneNode(false);
|
|
16796
16796
|
};
|
|
16797
|
-
DocumentCloner2.prototype.resolvePseudoContent = function(node,
|
|
16797
|
+
DocumentCloner2.prototype.resolvePseudoContent = function(node, clone54, style, pseudoElt) {
|
|
16798
16798
|
var _this = this;
|
|
16799
16799
|
if (!style) {
|
|
16800
16800
|
return;
|
|
16801
16801
|
}
|
|
16802
16802
|
var value = style.content;
|
|
16803
|
-
var document2 =
|
|
16803
|
+
var document2 = clone54.ownerDocument;
|
|
16804
16804
|
if (!document2 || !value || value === "none" || value === "-moz-alt-content" || style.display === "none") {
|
|
16805
16805
|
return;
|
|
16806
16806
|
}
|
|
@@ -16857,10 +16857,10 @@ var require_html2canvas = __commonJS({
|
|
|
16857
16857
|
});
|
|
16858
16858
|
anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
|
16859
16859
|
var newClassName = pseudoElt === PseudoElementType.BEFORE ? " " + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
|
16860
|
-
if (isSVGElementNode(
|
|
16861
|
-
|
|
16860
|
+
if (isSVGElementNode(clone54)) {
|
|
16861
|
+
clone54.className.baseValue += newClassName;
|
|
16862
16862
|
} else {
|
|
16863
|
-
|
|
16863
|
+
clone54.className += newClassName;
|
|
16864
16864
|
}
|
|
16865
16865
|
return anonymousReplacedElement;
|
|
16866
16866
|
};
|
|
@@ -19179,7 +19179,8 @@ var GlobalConfig = class {
|
|
|
19179
19179
|
// 全局菜单配置
|
|
19180
19180
|
this.appMenu = {
|
|
19181
19181
|
enableEcho: true,
|
|
19182
|
-
echoMode: "VIEW"
|
|
19182
|
+
echoMode: "VIEW",
|
|
19183
|
+
defaultCollapse: false
|
|
19183
19184
|
};
|
|
19184
19185
|
// 全局代码表配置
|
|
19185
19186
|
this.codeList = {
|
|
@@ -19216,6 +19217,8 @@ var GlobalConfig = class {
|
|
|
19216
19217
|
this.mdctrlrefreshmode = "cache";
|
|
19217
19218
|
// 下拉选择类编辑器默认排序配置
|
|
19218
19219
|
this.pickerdefaultsort = "";
|
|
19220
|
+
// 提示框信息绘制模式
|
|
19221
|
+
this.tooltiprendermode = "md";
|
|
19219
19222
|
}
|
|
19220
19223
|
};
|
|
19221
19224
|
|
|
@@ -22426,7 +22429,7 @@ var TextUtil = class {
|
|
|
22426
22429
|
};
|
|
22427
22430
|
|
|
22428
22431
|
// src/utils/theme-util/theme-util.ts
|
|
22429
|
-
import { clone as
|
|
22432
|
+
import { clone as clone48 } from "ramda";
|
|
22430
22433
|
|
|
22431
22434
|
// src/utils/theme-util/custom-theme-util.ts
|
|
22432
22435
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
@@ -24311,7 +24314,8 @@ var BuildInKeys = [
|
|
|
24311
24314
|
"tempsrfkey",
|
|
24312
24315
|
"srfuf",
|
|
24313
24316
|
"srfdeid",
|
|
24314
|
-
"srfdecodename"
|
|
24317
|
+
"srfdecodename",
|
|
24318
|
+
"srfexdata"
|
|
24315
24319
|
];
|
|
24316
24320
|
var ControlVO = class _ControlVO {
|
|
24317
24321
|
/**
|
|
@@ -24415,6 +24419,12 @@ var ControlVO = class _ControlVO {
|
|
|
24415
24419
|
});
|
|
24416
24420
|
}
|
|
24417
24421
|
);
|
|
24422
|
+
Object.defineProperty(this, "srfexdata", {
|
|
24423
|
+
enumerable: false,
|
|
24424
|
+
configurable: true,
|
|
24425
|
+
writable: true,
|
|
24426
|
+
value: {}
|
|
24427
|
+
});
|
|
24418
24428
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
24419
24429
|
const value = mapField.dataKey;
|
|
24420
24430
|
this.linkProperty(key, value, mapField);
|
|
@@ -28042,7 +28052,13 @@ var MethodDto = class {
|
|
|
28042
28052
|
};
|
|
28043
28053
|
}
|
|
28044
28054
|
}
|
|
28045
|
-
if (
|
|
28055
|
+
if (field.refAppDEDataSetId) {
|
|
28056
|
+
res = await service.exec(
|
|
28057
|
+
field.refAppDEDataSetId,
|
|
28058
|
+
_context,
|
|
28059
|
+
_params
|
|
28060
|
+
);
|
|
28061
|
+
} else if (deRs.nestedAppDEDataSetId) {
|
|
28046
28062
|
res = await service.exec(
|
|
28047
28063
|
deRs.nestedAppDEDataSetId,
|
|
28048
28064
|
_context,
|
|
@@ -28052,7 +28068,10 @@ var MethodDto = class {
|
|
|
28052
28068
|
res = await service.exec("FetchDefault", _context, _params);
|
|
28053
28069
|
}
|
|
28054
28070
|
} else if (dto.entity.id !== this.entity.id) {
|
|
28055
|
-
res = await service.exec(
|
|
28071
|
+
res = await service.exec(
|
|
28072
|
+
field.refAppDEDataSetId || "FetchDefault",
|
|
28073
|
+
context
|
|
28074
|
+
);
|
|
28056
28075
|
} else {
|
|
28057
28076
|
throw new RuntimeModelError7(
|
|
28058
28077
|
field,
|
|
@@ -34447,6 +34466,7 @@ function hasSubRoute(routeDepth) {
|
|
|
34447
34466
|
|
|
34448
34467
|
// src/controller/utils/util/util.ts
|
|
34449
34468
|
import { isNil as isNil18 } from "ramda";
|
|
34469
|
+
import dayjs from "dayjs";
|
|
34450
34470
|
function isValueChange(value, value2) {
|
|
34451
34471
|
if ((isNil18(value) || value === "") && (isNil18(value2) || value2 === "")) {
|
|
34452
34472
|
return false;
|
|
@@ -34562,6 +34582,35 @@ function formatSeparator(type, items, state, opts) {
|
|
|
34562
34582
|
calcChildrenFormat(items);
|
|
34563
34583
|
return hideSeparator;
|
|
34564
34584
|
}
|
|
34585
|
+
function formatDate(val, format) {
|
|
34586
|
+
let value = val;
|
|
34587
|
+
const date = new Date(val);
|
|
34588
|
+
if (!val || isNaN(date.getTime()))
|
|
34589
|
+
return value;
|
|
34590
|
+
const year = dayjs(date).year();
|
|
34591
|
+
const month = dayjs(date).month() + 1;
|
|
34592
|
+
switch (format) {
|
|
34593
|
+
case "year":
|
|
34594
|
+
value = "".concat(year);
|
|
34595
|
+
break;
|
|
34596
|
+
case "quarter":
|
|
34597
|
+
value = "".concat(year, " ").concat(Math.ceil(month / 3)).concat(ibiz.i18n.t("runtime.controller.utils.util.quarter"));
|
|
34598
|
+
break;
|
|
34599
|
+
case "month":
|
|
34600
|
+
value = "".concat(year, " ").concat(month).concat(ibiz.i18n.t("runtime.controller.utils.util.month"));
|
|
34601
|
+
break;
|
|
34602
|
+
case "week":
|
|
34603
|
+
const week = dayjs(date).week();
|
|
34604
|
+
value = "".concat(year, " ").concat(week).concat(ibiz.i18n.t("runtime.controller.utils.util.week"));
|
|
34605
|
+
break;
|
|
34606
|
+
case "day":
|
|
34607
|
+
value = dayjs(date).format("YYYY-MM-DD");
|
|
34608
|
+
break;
|
|
34609
|
+
default:
|
|
34610
|
+
break;
|
|
34611
|
+
}
|
|
34612
|
+
return value;
|
|
34613
|
+
}
|
|
34565
34614
|
|
|
34566
34615
|
// src/controller/utils/value-rule/value-rule.ts
|
|
34567
34616
|
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
@@ -34753,7 +34802,7 @@ var ValueExUtil = class {
|
|
|
34753
34802
|
|
|
34754
34803
|
// src/controller/utils/value-default/value-default.ts
|
|
34755
34804
|
import { RuntimeError as RuntimeError27, ModelError as ModelError15 } from "@ibiz-template/core";
|
|
34756
|
-
import
|
|
34805
|
+
import dayjs2 from "dayjs";
|
|
34757
34806
|
import { createUUID as createUUID9 } from "qx-util";
|
|
34758
34807
|
import { isNil as isNil21, isNotNil } from "ramda";
|
|
34759
34808
|
function getDefaultValue(opts, origins) {
|
|
@@ -34787,7 +34836,7 @@ function getDefaultValue(opts, origins) {
|
|
|
34787
34836
|
case "OPERATOR":
|
|
34788
34837
|
return context.srfuserid;
|
|
34789
34838
|
case "CURTIME":
|
|
34790
|
-
return
|
|
34839
|
+
return dayjs2().format(valueFormat);
|
|
34791
34840
|
case "PARAM":
|
|
34792
34841
|
return data[defaultValue];
|
|
34793
34842
|
case "SESSION":
|
|
@@ -36482,7 +36531,7 @@ var WFStepTraceViewController = class extends ViewController {
|
|
|
36482
36531
|
|
|
36483
36532
|
// src/controller/common/editor/editor.controller.ts
|
|
36484
36533
|
import { DataTypes as DataTypes3 } from "@ibiz-template/core";
|
|
36485
|
-
import
|
|
36534
|
+
import dayjs3 from "dayjs";
|
|
36486
36535
|
var EditorController = class {
|
|
36487
36536
|
/**
|
|
36488
36537
|
* Creates an instance of EditorController.
|
|
@@ -36714,7 +36763,7 @@ var EditorController = class {
|
|
|
36714
36763
|
}
|
|
36715
36764
|
const isDate = DataTypes3.isDate(this.dataType);
|
|
36716
36765
|
if (isDate) {
|
|
36717
|
-
const formatVal =
|
|
36766
|
+
const formatVal = dayjs3(strVal).format(this.valueFormat);
|
|
36718
36767
|
if (formatVal !== "Invalid Date") {
|
|
36719
36768
|
return formatVal;
|
|
36720
36769
|
}
|
|
@@ -37375,6 +37424,13 @@ var MDControlController = class extends ControlController {
|
|
|
37375
37424
|
* @type {boolean}
|
|
37376
37425
|
*/
|
|
37377
37426
|
this.enableLoad = true;
|
|
37427
|
+
/**
|
|
37428
|
+
* @description 分组日期格式化
|
|
37429
|
+
* @protected
|
|
37430
|
+
* @type {(('year' | 'quarter' | 'month' | 'week' | 'day')[])}
|
|
37431
|
+
* @memberof MDControlController
|
|
37432
|
+
*/
|
|
37433
|
+
this.groupDateFormat = [];
|
|
37378
37434
|
/**
|
|
37379
37435
|
* 实体属性映射,key是id,value是name
|
|
37380
37436
|
* @author lxm
|
|
@@ -37438,6 +37494,7 @@ var MDControlController = class extends ControlController {
|
|
|
37438
37494
|
this.state.mdctrlActiveMode = 0;
|
|
37439
37495
|
this.state.groups = [];
|
|
37440
37496
|
this.state.hideNoDataImage = false;
|
|
37497
|
+
this.state.enableGroup = !!this.model.enableGroup;
|
|
37441
37498
|
}
|
|
37442
37499
|
/**
|
|
37443
37500
|
* 批操作工具栏
|
|
@@ -37491,6 +37548,16 @@ var MDControlController = class extends ControlController {
|
|
|
37491
37548
|
this.load({ isInitialLoad: true });
|
|
37492
37549
|
}
|
|
37493
37550
|
}
|
|
37551
|
+
/**
|
|
37552
|
+
* @description 执行多数据分组
|
|
37553
|
+
* - 子类实现
|
|
37554
|
+
* @param {IApiMDGroupParams[]} [_arg] 分组参数集合(多层分组暂未支持)
|
|
37555
|
+
* @param {IParams} [_params] 额外参数
|
|
37556
|
+
* @returns {*} {Promise<void>}
|
|
37557
|
+
* @memberof MDControlController
|
|
37558
|
+
*/
|
|
37559
|
+
async execGroup(_arg, _params) {
|
|
37560
|
+
}
|
|
37494
37561
|
/**
|
|
37495
37562
|
* 获取部件默认排序模型
|
|
37496
37563
|
* @return {*}
|
|
@@ -38617,7 +38684,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
38617
38684
|
};
|
|
38618
38685
|
|
|
38619
38686
|
// src/controller/control/calendar/calendar.controller.ts
|
|
38620
|
-
import
|
|
38687
|
+
import dayjs4 from "dayjs";
|
|
38621
38688
|
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
38622
38689
|
|
|
38623
38690
|
// src/controller/control/calendar/calendar.service.ts
|
|
@@ -40852,12 +40919,9 @@ var UIActionProviderBase = class {
|
|
|
40852
40919
|
*/
|
|
40853
40920
|
async handleParams(action, context, data, params) {
|
|
40854
40921
|
let resultData = [];
|
|
40855
|
-
const deName = calcDeCodeNameById(action.appDataEntityId);
|
|
40856
|
-
const entity = await ibiz.hub.getAppDataEntity(
|
|
40857
|
-
|
|
40858
|
-
action.appId
|
|
40859
|
-
);
|
|
40860
|
-
const keyField = entity.keyAppDEFieldId;
|
|
40922
|
+
const deName = action.appDataEntityId ? calcDeCodeNameById(action.appDataEntityId) : void 0;
|
|
40923
|
+
const entity = action.appDataEntityId ? await ibiz.hub.getAppDataEntity(action.appDataEntityId, action.appId) : void 0;
|
|
40924
|
+
const keyField = entity == null ? void 0 : entity.keyAppDEFieldId;
|
|
40861
40925
|
switch (action.actionTarget) {
|
|
40862
40926
|
case "NONE":
|
|
40863
40927
|
resultData = [];
|
|
@@ -40869,12 +40933,12 @@ var UIActionProviderBase = class {
|
|
|
40869
40933
|
resultData = data;
|
|
40870
40934
|
break;
|
|
40871
40935
|
case "MULTIKEY":
|
|
40872
|
-
resultData = deName && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
40936
|
+
resultData = deName && keyField && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
40873
40937
|
break;
|
|
40874
40938
|
case "SINGLEKEY":
|
|
40875
40939
|
{
|
|
40876
40940
|
const originData = data[0] || {};
|
|
40877
|
-
resultData = deName ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
40941
|
+
resultData = deName && keyField ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
40878
40942
|
}
|
|
40879
40943
|
break;
|
|
40880
40944
|
default:
|
|
@@ -42327,9 +42391,9 @@ var CalendarController = class extends MDControlController {
|
|
|
42327
42391
|
let result = 0;
|
|
42328
42392
|
const x = a[sortField];
|
|
42329
42393
|
const y = b[sortField];
|
|
42330
|
-
if (
|
|
42394
|
+
if (dayjs4(x).isAfter(y)) {
|
|
42331
42395
|
result = -1;
|
|
42332
|
-
} else if (
|
|
42396
|
+
} else if (dayjs4(x).isBefore(y)) {
|
|
42333
42397
|
result = 1;
|
|
42334
42398
|
}
|
|
42335
42399
|
return result;
|
|
@@ -42401,8 +42465,8 @@ var CalendarController = class extends MDControlController {
|
|
|
42401
42465
|
break;
|
|
42402
42466
|
}
|
|
42403
42467
|
return {
|
|
42404
|
-
srfstartdate:
|
|
42405
|
-
srfenddate:
|
|
42468
|
+
srfstartdate: dayjs4(srfstartdate).format("YYYY-MM-DD HH:mm:ss"),
|
|
42469
|
+
srfenddate: dayjs4(srfenddate).format("YYYY-MM-DD HH:mm:ss")
|
|
42406
42470
|
};
|
|
42407
42471
|
}
|
|
42408
42472
|
return { srfstartdate, srfenddate };
|
|
@@ -42509,18 +42573,18 @@ import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
|
42509
42573
|
|
|
42510
42574
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
42511
42575
|
import { plus, RuntimeModelError as RuntimeModelError49, toNumberOrNil } from "@ibiz-template/core";
|
|
42512
|
-
import
|
|
42576
|
+
import dayjs5 from "dayjs";
|
|
42513
42577
|
import minMax from "dayjs/plugin/minMax";
|
|
42514
42578
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
42515
42579
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
42516
42580
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
42517
42581
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
42518
42582
|
import { clone as clone26, isNil as isNil26, mergeDeepRight } from "ramda";
|
|
42519
|
-
|
|
42520
|
-
|
|
42521
|
-
|
|
42522
|
-
|
|
42523
|
-
|
|
42583
|
+
dayjs5.extend(minMax);
|
|
42584
|
+
dayjs5.extend(isSameOrBefore);
|
|
42585
|
+
dayjs5.extend(quarterOfYear);
|
|
42586
|
+
dayjs5.extend(weekOfYear);
|
|
42587
|
+
dayjs5.extend(isoWeek);
|
|
42524
42588
|
var DEFAULT_GROUP = "$default_group";
|
|
42525
42589
|
var BaseSeriesGenerator = class {
|
|
42526
42590
|
/**
|
|
@@ -43143,25 +43207,25 @@ var BaseSeriesGenerator = class {
|
|
|
43143
43207
|
format = "YYYY-MM";
|
|
43144
43208
|
}
|
|
43145
43209
|
if (singleData[this.catalogField]) {
|
|
43146
|
-
const formattedDate =
|
|
43210
|
+
const formattedDate = dayjs5(singleData[this.catalogField]).format(
|
|
43147
43211
|
format
|
|
43148
43212
|
);
|
|
43149
43213
|
singleData[this.catalogField] = formattedDate;
|
|
43150
43214
|
}
|
|
43151
43215
|
} else if (groupMode === "QUARTER") {
|
|
43152
43216
|
if (singleData[this.catalogField]) {
|
|
43153
|
-
const formattedDate = "".concat(
|
|
43217
|
+
const formattedDate = "".concat(dayjs5(
|
|
43154
43218
|
singleData[this.catalogField]
|
|
43155
|
-
).format("YYYY"), "-").concat(
|
|
43219
|
+
).format("YYYY"), "-").concat(dayjs5(
|
|
43156
43220
|
singleData[this.catalogField]
|
|
43157
43221
|
).quarter());
|
|
43158
43222
|
singleData[this.catalogField] = formattedDate;
|
|
43159
43223
|
}
|
|
43160
43224
|
} else if (groupMode === "YEARWEEK") {
|
|
43161
43225
|
if (singleData[this.catalogField]) {
|
|
43162
|
-
const formattedDate = "".concat(
|
|
43226
|
+
const formattedDate = "".concat(dayjs5(
|
|
43163
43227
|
singleData[this.catalogField]
|
|
43164
|
-
).format("YYYY"), "-").concat(
|
|
43228
|
+
).format("YYYY"), "-").concat(dayjs5(singleData[this.catalogField]).week());
|
|
43165
43229
|
singleData[this.catalogField] = formattedDate;
|
|
43166
43230
|
}
|
|
43167
43231
|
}
|
|
@@ -43183,7 +43247,7 @@ var BaseSeriesGenerator = class {
|
|
|
43183
43247
|
let sortedKeys = [];
|
|
43184
43248
|
if (groupMode === "DAY" || groupMode === "YEAR" || groupMode === "MONTH") {
|
|
43185
43249
|
sortedKeys = Array.from(dateMap.keys()).sort(
|
|
43186
|
-
(a, b) =>
|
|
43250
|
+
(a, b) => dayjs5(a).diff(dayjs5(b))
|
|
43187
43251
|
);
|
|
43188
43252
|
} else if (groupMode === "QUARTER" || groupMode === "YEARWEEK") {
|
|
43189
43253
|
sortedKeys = Array.from(dateMap.keys()).sort((a, b) => {
|
|
@@ -43217,11 +43281,11 @@ var BaseSeriesGenerator = class {
|
|
|
43217
43281
|
const dates = [];
|
|
43218
43282
|
Object.keys(data).forEach((key) => {
|
|
43219
43283
|
data[key].forEach((_val, date) => {
|
|
43220
|
-
dates.push(
|
|
43284
|
+
dates.push(dayjs5(date));
|
|
43221
43285
|
});
|
|
43222
43286
|
});
|
|
43223
|
-
const maxDate =
|
|
43224
|
-
const minDate =
|
|
43287
|
+
const maxDate = dayjs5.max(dates);
|
|
43288
|
+
const minDate = dayjs5.min(dates);
|
|
43225
43289
|
if (groupMode === "DAY") {
|
|
43226
43290
|
let currentDate = minDate;
|
|
43227
43291
|
const endDate = maxDate;
|
|
@@ -43303,7 +43367,7 @@ var BaseSeriesGenerator = class {
|
|
|
43303
43367
|
const [minYear] = minYearWeek.split("-");
|
|
43304
43368
|
const [maxYear] = maxYearWeek.split("-");
|
|
43305
43369
|
for (let year = parseInt(minYear, 10); year <= parseInt(maxYear, 10); year++) {
|
|
43306
|
-
const numWeeks =
|
|
43370
|
+
const numWeeks = dayjs5("".concat(year, "-12-31")).isoWeek();
|
|
43307
43371
|
for (let week = 1; week <= numWeeks; week++) {
|
|
43308
43372
|
const yearWeek = "".concat(year, "-").concat(week);
|
|
43309
43373
|
Object.keys(data).forEach((key) => {
|
|
@@ -48588,9 +48652,9 @@ var FilterPortletController = class extends PortletPartController {
|
|
|
48588
48652
|
};
|
|
48589
48653
|
|
|
48590
48654
|
// src/controller/control/data-view/data-view.controller.ts
|
|
48591
|
-
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
48592
|
-
import { isNil as isNil29 } from "ramda";
|
|
48593
|
-
import { isBoolean } from "qx-util";
|
|
48655
|
+
import { RuntimeModelError as RuntimeModelError56, isElementSame as isElementSame2 } from "@ibiz-template/core";
|
|
48656
|
+
import { clone as clone34, isNil as isNil29 } from "ramda";
|
|
48657
|
+
import { createUUID as createUUID11, isBoolean } from "qx-util";
|
|
48594
48658
|
|
|
48595
48659
|
// src/controller/control/data-view/data-view.service.ts
|
|
48596
48660
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -48912,13 +48976,40 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48912
48976
|
detail.appId
|
|
48913
48977
|
);
|
|
48914
48978
|
}
|
|
48979
|
+
/**
|
|
48980
|
+
* @description 执行多数据分组
|
|
48981
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
48982
|
+
* @param {IParams} [_params] 额外参数
|
|
48983
|
+
* @returns {*} {Promise<void>}
|
|
48984
|
+
* @memberof DataViewControlController
|
|
48985
|
+
*/
|
|
48986
|
+
async execGroup(arg, _params) {
|
|
48987
|
+
const group = arg[0];
|
|
48988
|
+
this.model = clone34(this.model);
|
|
48989
|
+
this.model.groupMode = "AUTO";
|
|
48990
|
+
if (!group || !group.groupFieldId) {
|
|
48991
|
+
this.state.groups = [];
|
|
48992
|
+
this.model.groupMode = "NONE";
|
|
48993
|
+
this.state.enableGroup = false;
|
|
48994
|
+
this.model.groupCodeListId = void 0;
|
|
48995
|
+
this.model.groupAppDEFieldId = void 0;
|
|
48996
|
+
this.groupDateFormat = [];
|
|
48997
|
+
} else if (group.groupFieldId !== this.model.groupAppDEFieldId || group.dateFormat && !isElementSame2(group.dateFormat, this.groupDateFormat)) {
|
|
48998
|
+
this.state.enableGroup = true;
|
|
48999
|
+
this.model.groupAppDEFieldId = group.groupFieldId;
|
|
49000
|
+
this.model.groupCodeListId = group.groupCodeListId;
|
|
49001
|
+
this.groupDateFormat = group.dateFormat || [];
|
|
49002
|
+
await this.handleDataGroup();
|
|
49003
|
+
}
|
|
49004
|
+
}
|
|
48915
49005
|
/**
|
|
48916
49006
|
* 处理数据分组
|
|
48917
49007
|
*
|
|
48918
49008
|
* @memberof DataViewControlController
|
|
48919
49009
|
*/
|
|
48920
49010
|
async handleDataGroup() {
|
|
48921
|
-
const {
|
|
49011
|
+
const { groupMode, groupAppDEFieldId } = this.model;
|
|
49012
|
+
const { enableGroup } = this.state;
|
|
48922
49013
|
if (enableGroup && groupMode) {
|
|
48923
49014
|
if (!groupAppDEFieldId) {
|
|
48924
49015
|
throw new RuntimeModelError56(
|
|
@@ -48941,6 +49032,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48941
49032
|
* @memberof DataViewControlController
|
|
48942
49033
|
*/
|
|
48943
49034
|
async handleAutoGroup() {
|
|
49035
|
+
var _a3;
|
|
48944
49036
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
48945
49037
|
let codeList = [];
|
|
48946
49038
|
if (groupCodeListId) {
|
|
@@ -48953,16 +49045,28 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48953
49045
|
}
|
|
48954
49046
|
if (groupAppDEFieldId) {
|
|
48955
49047
|
const { items } = this.state;
|
|
49048
|
+
const deRss = (_a3 = this.dataEntity.minorAppDERSs) == null ? void 0 : _a3.find(
|
|
49049
|
+
(rss) => rss.parentAppDEFieldId === groupAppDEFieldId
|
|
49050
|
+
);
|
|
49051
|
+
const textDEFieldId = deRss == null ? void 0 : deRss.parentTextAppDEFieldId;
|
|
49052
|
+
const dateFormat = this.groupDateFormat[0];
|
|
48956
49053
|
const groupMap = /* @__PURE__ */ new Map();
|
|
49054
|
+
const unclassified = {
|
|
49055
|
+
key: createUUID11(),
|
|
49056
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
49057
|
+
children: []
|
|
49058
|
+
};
|
|
48957
49059
|
items.forEach((item) => {
|
|
48958
|
-
|
|
49060
|
+
let groupVal = item[textDEFieldId || groupAppDEFieldId];
|
|
49061
|
+
if (dateFormat)
|
|
49062
|
+
groupVal = formatDate(groupVal, dateFormat);
|
|
48959
49063
|
if (isNil29(groupVal)) {
|
|
49064
|
+
unclassified.children.push(item);
|
|
48960
49065
|
return;
|
|
48961
49066
|
}
|
|
48962
|
-
|
|
48963
|
-
|
|
48964
|
-
|
|
48965
|
-
groupMap.get(groupVal).push(item);
|
|
49067
|
+
const children = groupMap.get(groupVal) || [];
|
|
49068
|
+
children.push(item);
|
|
49069
|
+
groupMap.set(groupVal, children);
|
|
48966
49070
|
});
|
|
48967
49071
|
const groups = [];
|
|
48968
49072
|
groupMap.forEach((value, key) => {
|
|
@@ -48973,6 +49077,8 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48973
49077
|
children: [...value]
|
|
48974
49078
|
});
|
|
48975
49079
|
});
|
|
49080
|
+
if (unclassified.children.length)
|
|
49081
|
+
groups.push(unclassified);
|
|
48976
49082
|
this.state.groups = groups;
|
|
48977
49083
|
}
|
|
48978
49084
|
}
|
|
@@ -50022,7 +50128,7 @@ import {
|
|
|
50022
50128
|
RuntimeError as RuntimeError51
|
|
50023
50129
|
} from "@ibiz-template/core";
|
|
50024
50130
|
import { isBoolean as isBoolean2 } from "qx-util";
|
|
50025
|
-
import { clone as
|
|
50131
|
+
import { clone as clone35 } from "ramda";
|
|
50026
50132
|
var FormController = class extends ControlController {
|
|
50027
50133
|
constructor() {
|
|
50028
50134
|
super(...arguments);
|
|
@@ -50296,7 +50402,7 @@ var FormController = class extends ControlController {
|
|
|
50296
50402
|
* @return {*} {Promise<void>}
|
|
50297
50403
|
*/
|
|
50298
50404
|
async checkIgnoreInput(data) {
|
|
50299
|
-
const formData =
|
|
50405
|
+
const formData = clone35(data);
|
|
50300
50406
|
const formDataUIMap = formData.$dataUIMap;
|
|
50301
50407
|
const isCreate = formData.srfuf === 0 /* CREATE */;
|
|
50302
50408
|
this.formItems.forEach((formItem) => {
|
|
@@ -50496,7 +50602,7 @@ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
|
50496
50602
|
|
|
50497
50603
|
// src/controller/control/form/form/form.service.ts
|
|
50498
50604
|
import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
|
|
50499
|
-
import { clone as
|
|
50605
|
+
import { clone as clone36, isNil as isNil30, isNotNil as isNotNil3 } from "ramda";
|
|
50500
50606
|
var FormService = class extends ControlService {
|
|
50501
50607
|
constructor() {
|
|
50502
50608
|
super(...arguments);
|
|
@@ -50558,7 +50664,7 @@ var FormService = class extends ControlService {
|
|
|
50558
50664
|
* @return {*} {IParams}
|
|
50559
50665
|
*/
|
|
50560
50666
|
getLoadParams(params) {
|
|
50561
|
-
const copyArgs =
|
|
50667
|
+
const copyArgs = clone36(params);
|
|
50562
50668
|
const defaultData = {};
|
|
50563
50669
|
if (copyArgs.srfdefdata) {
|
|
50564
50670
|
Object.assign(defaultData, copyArgs.srfdefdata);
|
|
@@ -50608,6 +50714,9 @@ var FormService = class extends ControlService {
|
|
|
50608
50714
|
getFilteredData(data) {
|
|
50609
50715
|
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
50610
50716
|
const tempData = {};
|
|
50717
|
+
if (data.srfexdata && Object.keys(data.srfexdata).length > 0) {
|
|
50718
|
+
Object.assign(tempData, { ...data.srfexdata });
|
|
50719
|
+
}
|
|
50611
50720
|
let tempDataUIMap = this.dataUIMap;
|
|
50612
50721
|
if (data.$dataUIMap && data.$dataUIMap.size > 0) {
|
|
50613
50722
|
tempDataUIMap = data.$dataUIMap;
|
|
@@ -51623,7 +51732,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
51623
51732
|
|
|
51624
51733
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
51625
51734
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
51626
|
-
import { createUUID as
|
|
51735
|
+
import { createUUID as createUUID12, notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
51627
51736
|
|
|
51628
51737
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
51629
51738
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -51661,6 +51770,12 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51661
51770
|
* @memberof FormDRUIPartController
|
|
51662
51771
|
*/
|
|
51663
51772
|
this.isNewData = false;
|
|
51773
|
+
/**
|
|
51774
|
+
* @description 是否同步子界面数据服务(处理子应用同实体表单合并关系界面)
|
|
51775
|
+
* @type {boolean}
|
|
51776
|
+
* @memberof FormDRUIPartController
|
|
51777
|
+
*/
|
|
51778
|
+
this.isNeedSyncEmbed = false;
|
|
51664
51779
|
}
|
|
51665
51780
|
createState() {
|
|
51666
51781
|
var _a3;
|
|
@@ -51685,6 +51800,17 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51685
51800
|
if (this.model.paramItem) {
|
|
51686
51801
|
this.paramItem = this.model.paramItem;
|
|
51687
51802
|
}
|
|
51803
|
+
this.isNeedSyncEmbed = this.model.appId !== ibiz.env.appId && !!this.model.needSave;
|
|
51804
|
+
const embedView = await ibiz.hub.getAppView(this.model.appViewId);
|
|
51805
|
+
const app = ibiz.hub.getApp(embedView.appId);
|
|
51806
|
+
const tempContext = this.context.clone();
|
|
51807
|
+
tempContext.srfappid = embedView.appId;
|
|
51808
|
+
if (embedView.appDataEntityId) {
|
|
51809
|
+
this.embedDataService = await app.deService.getService(
|
|
51810
|
+
tempContext,
|
|
51811
|
+
embedView.appDataEntityId
|
|
51812
|
+
);
|
|
51813
|
+
}
|
|
51688
51814
|
}
|
|
51689
51815
|
/**
|
|
51690
51816
|
* @description 表单数据变更通知(由表单控制器调用)
|
|
@@ -51695,6 +51821,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51695
51821
|
async dataChangeNotify(names) {
|
|
51696
51822
|
await super.dataChangeNotify(names);
|
|
51697
51823
|
if (isOverlap2(this.refreshItems, names)) {
|
|
51824
|
+
await this.SyncDataToEmbedService();
|
|
51698
51825
|
this.calcViewParams();
|
|
51699
51826
|
}
|
|
51700
51827
|
}
|
|
@@ -51711,9 +51838,25 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51711
51838
|
this.state.showMask = this.isNewData;
|
|
51712
51839
|
}
|
|
51713
51840
|
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */ || state === "SAVE" /* SAVE */) {
|
|
51841
|
+
await this.SyncDataToEmbedService();
|
|
51714
51842
|
this.calcViewParams();
|
|
51715
51843
|
}
|
|
51716
51844
|
}
|
|
51845
|
+
/**
|
|
51846
|
+
* @description 同步当前表单数据至子界面数据服务
|
|
51847
|
+
* @returns {*} {Promise<void>}
|
|
51848
|
+
* @memberof FormDRUIPartController
|
|
51849
|
+
*/
|
|
51850
|
+
async SyncDataToEmbedService() {
|
|
51851
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
51852
|
+
const tempContext = this.context.clone();
|
|
51853
|
+
tempContext.srfappid = this.model.appId;
|
|
51854
|
+
const originData = this.form.state.data.$origin;
|
|
51855
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
51856
|
+
const syncAction = res.data ? "updateTemp" : "createTemp";
|
|
51857
|
+
await this.embedDataService[syncAction](tempContext, originData);
|
|
51858
|
+
}
|
|
51859
|
+
}
|
|
51717
51860
|
/**
|
|
51718
51861
|
* @description 计算视图上下文和视图参数, 调用该方法一定会刷新视图。
|
|
51719
51862
|
* @returns {*} {void}
|
|
@@ -51721,6 +51864,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51721
51864
|
*/
|
|
51722
51865
|
calcViewParams() {
|
|
51723
51866
|
let newContext = this.form.context.clone();
|
|
51867
|
+
newContext.srfignorechange = this.isNeedSyncEmbed;
|
|
51724
51868
|
const navContexts = this.model.navigateContexts;
|
|
51725
51869
|
if (notNilEmpty10(navContexts)) {
|
|
51726
51870
|
newContext = Object.assign(
|
|
@@ -51740,7 +51884,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51740
51884
|
this.form.context
|
|
51741
51885
|
);
|
|
51742
51886
|
if (!this.state.viewComponentKey) {
|
|
51743
|
-
this.state.viewComponentKey =
|
|
51887
|
+
this.state.viewComponentKey = createUUID12();
|
|
51744
51888
|
this.navContext = newContext;
|
|
51745
51889
|
this.navParams = newParams;
|
|
51746
51890
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -51766,7 +51910,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51766
51910
|
this.embedView.call("Load" /* LOAD */);
|
|
51767
51911
|
}
|
|
51768
51912
|
});
|
|
51769
|
-
this.embedView.evt.on("onDataChange", (event) => {
|
|
51913
|
+
this.embedView.evt.on("onDataChange", async (event) => {
|
|
51770
51914
|
if (["LOAD", "LOADDRAFT"].includes(event.actionType)) {
|
|
51771
51915
|
return;
|
|
51772
51916
|
}
|
|
@@ -51779,6 +51923,14 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51779
51923
|
this.model.deformItemUpdateId
|
|
51780
51924
|
);
|
|
51781
51925
|
}
|
|
51926
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
51927
|
+
const tempContext = this.context.clone();
|
|
51928
|
+
tempContext.srfappid = this.model.appId;
|
|
51929
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
51930
|
+
const childData = res.data || {};
|
|
51931
|
+
const exData = this.form.state.data.srfexdata || {};
|
|
51932
|
+
this.form.state.data.srfexdata = Object.assign(exData, childData);
|
|
51933
|
+
}
|
|
51782
51934
|
});
|
|
51783
51935
|
}
|
|
51784
51936
|
/**
|
|
@@ -51822,7 +51974,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51822
51974
|
};
|
|
51823
51975
|
|
|
51824
51976
|
// src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
|
|
51825
|
-
import { clone as
|
|
51977
|
+
import { clone as clone37 } from "ramda";
|
|
51826
51978
|
|
|
51827
51979
|
// src/controller/control/form/form-detail/form-group-panel/form-group-panel.state.ts
|
|
51828
51980
|
var FormGroupPanelState = class extends FormDetailState {
|
|
@@ -51930,7 +52082,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
51930
52082
|
*/
|
|
51931
52083
|
async onActionClick(detail, event, args) {
|
|
51932
52084
|
const actionId = detail.uiactionId;
|
|
51933
|
-
const tempParams =
|
|
52085
|
+
const tempParams = clone37(this.form.params);
|
|
51934
52086
|
if (args) {
|
|
51935
52087
|
Object.assign(tempParams, args);
|
|
51936
52088
|
}
|
|
@@ -52782,7 +52934,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
52782
52934
|
|
|
52783
52935
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
52784
52936
|
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
52785
|
-
import { createUUID as
|
|
52937
|
+
import { createUUID as createUUID13 } from "qx-util";
|
|
52786
52938
|
|
|
52787
52939
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
52788
52940
|
var FormMDCtrlFormState = class extends FormMDCtrlState {
|
|
@@ -52986,7 +53138,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
52986
53138
|
this.state.items = [];
|
|
52987
53139
|
}
|
|
52988
53140
|
const item = {
|
|
52989
|
-
id:
|
|
53141
|
+
id: createUUID13(),
|
|
52990
53142
|
context,
|
|
52991
53143
|
params
|
|
52992
53144
|
};
|
|
@@ -53045,7 +53197,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
53045
53197
|
|
|
53046
53198
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
53047
53199
|
import { ModelError as ModelError26 } from "@ibiz-template/core";
|
|
53048
|
-
import { clone as
|
|
53200
|
+
import { clone as clone38 } from "ramda";
|
|
53049
53201
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
53050
53202
|
constructor() {
|
|
53051
53203
|
super(...arguments);
|
|
@@ -53150,7 +53302,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
53150
53302
|
copyFields.forEach((key) => {
|
|
53151
53303
|
tempForm[key] = this.form.model[key];
|
|
53152
53304
|
});
|
|
53153
|
-
this.repeatedForm =
|
|
53305
|
+
this.repeatedForm = clone38(tempForm);
|
|
53154
53306
|
}
|
|
53155
53307
|
/**
|
|
53156
53308
|
* @description 设置重复器控制器
|
|
@@ -53628,13 +53780,13 @@ var FormButtonListController = class extends FormDetailController {
|
|
|
53628
53780
|
import {
|
|
53629
53781
|
awaitTimeout,
|
|
53630
53782
|
IBizContext as IBizContext7,
|
|
53631
|
-
isElementSame as
|
|
53783
|
+
isElementSame as isElementSame3,
|
|
53632
53784
|
mergeInLeft as mergeInLeft3,
|
|
53633
53785
|
RuntimeError as RuntimeError54
|
|
53634
53786
|
} from "@ibiz-template/core";
|
|
53635
53787
|
import { debounce } from "lodash-es";
|
|
53636
|
-
import { createUUID as
|
|
53637
|
-
import { clone as
|
|
53788
|
+
import { createUUID as createUUID14 } from "qx-util";
|
|
53789
|
+
import { clone as clone39, isNil as isNil31 } from "ramda";
|
|
53638
53790
|
|
|
53639
53791
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
53640
53792
|
import {
|
|
@@ -54056,8 +54208,8 @@ var EditFormController = class extends FormController {
|
|
|
54056
54208
|
* @return {*} {Promise<IData>}
|
|
54057
54209
|
*/
|
|
54058
54210
|
async copy() {
|
|
54059
|
-
const context =
|
|
54060
|
-
const queryParams =
|
|
54211
|
+
const context = clone39(this.context);
|
|
54212
|
+
const queryParams = clone39(this.params);
|
|
54061
54213
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
54062
54214
|
this.model.appDataEntityId,
|
|
54063
54215
|
this.model.appId
|
|
@@ -54086,7 +54238,7 @@ var EditFormController = class extends FormController {
|
|
|
54086
54238
|
await this.endLoading();
|
|
54087
54239
|
}
|
|
54088
54240
|
res.data.srfkey = void 0;
|
|
54089
|
-
res.data.tempsrfkey =
|
|
54241
|
+
res.data.tempsrfkey = createUUID14();
|
|
54090
54242
|
this.state.modified = false;
|
|
54091
54243
|
this.state.data = res.data;
|
|
54092
54244
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -54114,7 +54266,7 @@ var EditFormController = class extends FormController {
|
|
|
54114
54266
|
return this.loadDraft();
|
|
54115
54267
|
}
|
|
54116
54268
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54117
|
-
const queryParams =
|
|
54269
|
+
const queryParams = clone39(params);
|
|
54118
54270
|
const silent = this.getSilent(args) === true;
|
|
54119
54271
|
let res;
|
|
54120
54272
|
try {
|
|
@@ -54219,7 +54371,9 @@ var EditFormController = class extends FormController {
|
|
|
54219
54371
|
)
|
|
54220
54372
|
});
|
|
54221
54373
|
}
|
|
54222
|
-
this.
|
|
54374
|
+
if (!this.context.srfignorechange) {
|
|
54375
|
+
this.emitDEDataChange(isCreate ? "create" : "update", res.data);
|
|
54376
|
+
}
|
|
54223
54377
|
return this.data;
|
|
54224
54378
|
}
|
|
54225
54379
|
/**
|
|
@@ -54270,7 +54424,9 @@ var EditFormController = class extends FormController {
|
|
|
54270
54424
|
}
|
|
54271
54425
|
ok = res.ok;
|
|
54272
54426
|
}
|
|
54273
|
-
|
|
54427
|
+
if (!this.context.srfignorechange) {
|
|
54428
|
+
this.emitDEDataChange("remove", this.data);
|
|
54429
|
+
}
|
|
54274
54430
|
this.state.data = new ControlVO();
|
|
54275
54431
|
this.state.modified = false;
|
|
54276
54432
|
await this.evt.emit("onRemoveSuccess", { args: this.data });
|
|
@@ -54383,8 +54539,10 @@ var EditFormController = class extends FormController {
|
|
|
54383
54539
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54384
54540
|
try {
|
|
54385
54541
|
await this.service.wfStart(context, params, this.data);
|
|
54386
|
-
|
|
54387
|
-
|
|
54542
|
+
if (!this.context.srfignorechange) {
|
|
54543
|
+
this.emitDEDataChange("update", this.data);
|
|
54544
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
54545
|
+
}
|
|
54388
54546
|
} catch (error) {
|
|
54389
54547
|
this.actionNotification("WFSTARTERROR", {
|
|
54390
54548
|
error
|
|
@@ -54421,8 +54579,10 @@ var EditFormController = class extends FormController {
|
|
|
54421
54579
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54422
54580
|
try {
|
|
54423
54581
|
await this.service.wfSubmit(context, params, this.data);
|
|
54424
|
-
|
|
54425
|
-
|
|
54582
|
+
if (!this.context.srfignorechange) {
|
|
54583
|
+
this.emitDEDataChange("update", this.data);
|
|
54584
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
54585
|
+
}
|
|
54426
54586
|
} catch (error) {
|
|
54427
54587
|
this.actionNotification("WFSUBMITERROR", {
|
|
54428
54588
|
error
|
|
@@ -54514,7 +54674,7 @@ var EditFormController = class extends FormController {
|
|
|
54514
54674
|
const diffData = {};
|
|
54515
54675
|
Object.keys(data).forEach((key) => {
|
|
54516
54676
|
if (Array.isArray(data[key])) {
|
|
54517
|
-
if (!
|
|
54677
|
+
if (!isElementSame3(data[key], this.oldData[key])) {
|
|
54518
54678
|
diffData[key] = data[key];
|
|
54519
54679
|
}
|
|
54520
54680
|
} else if (data[key] !== this.oldData[key] || key === data.srfkeyfield) {
|
|
@@ -54965,8 +55125,8 @@ import {
|
|
|
54965
55125
|
mergeDefaultInLeft as mergeDefaultInLeft2,
|
|
54966
55126
|
debounceAndAsyncMerge as debounceAndAsyncMerge2
|
|
54967
55127
|
} from "@ibiz-template/core";
|
|
54968
|
-
import { clone as
|
|
54969
|
-
import
|
|
55128
|
+
import { clone as clone41, isNil as isNil32 } from "ramda";
|
|
55129
|
+
import dayjs6 from "dayjs";
|
|
54970
55130
|
|
|
54971
55131
|
// src/controller/control/grid/grid/grid.service.ts
|
|
54972
55132
|
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
@@ -55136,7 +55296,7 @@ async function calcColumnModelBySchema(json, c) {
|
|
|
55136
55296
|
}
|
|
55137
55297
|
|
|
55138
55298
|
// src/controller/control/grid/grid/auto-grid.util.ts
|
|
55139
|
-
import { clone as
|
|
55299
|
+
import { clone as clone40 } from "ramda";
|
|
55140
55300
|
import { mergeDefaultInLeft } from "@ibiz-template/core";
|
|
55141
55301
|
var TypeToDataType2 = {
|
|
55142
55302
|
string: 25,
|
|
@@ -55189,7 +55349,7 @@ function getEditorModel(item, appId2, enableCond, isSingleSelect = false) {
|
|
|
55189
55349
|
type = "dropdown";
|
|
55190
55350
|
if (enableCond === 0)
|
|
55191
55351
|
type = "span";
|
|
55192
|
-
const model = Object.assign(
|
|
55352
|
+
const model = Object.assign(clone40(TypeToEditor[type]), {
|
|
55193
55353
|
appId: appId2
|
|
55194
55354
|
});
|
|
55195
55355
|
if (type === "dropdown" && isSingleSelect)
|
|
@@ -55340,7 +55500,7 @@ async function initModelByEntitySchema(c) {
|
|
|
55340
55500
|
if (!json)
|
|
55341
55501
|
return;
|
|
55342
55502
|
const { degridColumns, degridDataItems, degridEditItems, degridEditItemVRs } = await calcColumnModelBySchema2(json, c);
|
|
55343
|
-
c.model =
|
|
55503
|
+
c.model = clone40(c.model);
|
|
55344
55504
|
const uaColumns = ((_a3 = c.model.degridColumns) == null ? void 0 : _a3.filter(
|
|
55345
55505
|
(column) => column.columnType === "UAGRIDCOLUMN"
|
|
55346
55506
|
)) || [];
|
|
@@ -55387,7 +55547,7 @@ async function switchRowEditDynamic(c, row, editable, _isSave = true) {
|
|
|
55387
55547
|
await switchRowEditDynamic(c, editingRow);
|
|
55388
55548
|
}
|
|
55389
55549
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
55390
|
-
row.cacheData =
|
|
55550
|
+
row.cacheData = clone40(row.data);
|
|
55391
55551
|
const defaultVal = c.calcDefaultValue(row.data, false);
|
|
55392
55552
|
Object.assign(row.data, defaultVal);
|
|
55393
55553
|
}
|
|
@@ -55548,8 +55708,8 @@ var GridController = class extends MDControlController {
|
|
|
55548
55708
|
if (!valueFormat) {
|
|
55549
55709
|
return strVal;
|
|
55550
55710
|
}
|
|
55551
|
-
if (isDate &&
|
|
55552
|
-
const formatVal =
|
|
55711
|
+
if (isDate && dayjs6(strVal, valueFormat, true).isValid()) {
|
|
55712
|
+
const formatVal = dayjs6(strVal).format(valueFormat);
|
|
55553
55713
|
return formatVal;
|
|
55554
55714
|
}
|
|
55555
55715
|
return ibiz.util.text.format(strVal, valueFormat);
|
|
@@ -55759,7 +55919,7 @@ var GridController = class extends MDControlController {
|
|
|
55759
55919
|
if (!this.addSchemaColumn) {
|
|
55760
55920
|
return;
|
|
55761
55921
|
}
|
|
55762
|
-
const tempParams =
|
|
55922
|
+
const tempParams = clone41(this.jsonSchemaParams);
|
|
55763
55923
|
Object.assign(tempParams, this.params);
|
|
55764
55924
|
const json = await getEntitySchema(
|
|
55765
55925
|
this.model.appDataEntityId,
|
|
@@ -55773,7 +55933,7 @@ var GridController = class extends MDControlController {
|
|
|
55773
55933
|
if (result && result.degridColumns.length > 0) {
|
|
55774
55934
|
const { degridColumns, degridDataItems } = result;
|
|
55775
55935
|
this.allCustomColumns = degridColumns;
|
|
55776
|
-
this.model =
|
|
55936
|
+
this.model = clone41(this.model);
|
|
55777
55937
|
this.model.degridColumns = [
|
|
55778
55938
|
...this.model.degridColumns || [],
|
|
55779
55939
|
...degridColumns
|
|
@@ -55860,9 +56020,8 @@ var GridController = class extends MDControlController {
|
|
|
55860
56020
|
* @return {*} {Promise<void>}
|
|
55861
56021
|
*/
|
|
55862
56022
|
async initGroup() {
|
|
55863
|
-
if (!this.
|
|
56023
|
+
if (!this.state.enableGroup)
|
|
55864
56024
|
return;
|
|
55865
|
-
}
|
|
55866
56025
|
const { groupAppDEFieldId, groupCodeListId, groupMode } = this.model;
|
|
55867
56026
|
this.groupFieldColumn = Object.values(this.fieldColumns).find(
|
|
55868
56027
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
@@ -55986,6 +56145,39 @@ var GridController = class extends MDControlController {
|
|
|
55986
56145
|
]);
|
|
55987
56146
|
}
|
|
55988
56147
|
}
|
|
56148
|
+
/**
|
|
56149
|
+
* @description 执行多数据分组
|
|
56150
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
56151
|
+
* @param {IParams} [_params] 额外参数
|
|
56152
|
+
* @returns {*} {Promise<void>}
|
|
56153
|
+
* @memberof MDControlController
|
|
56154
|
+
*/
|
|
56155
|
+
async execGroup(arg, _params) {
|
|
56156
|
+
var _a3;
|
|
56157
|
+
const group = arg[0];
|
|
56158
|
+
this.model = clone41(this.model);
|
|
56159
|
+
this.model.groupMode = "AUTO";
|
|
56160
|
+
const { columnStates } = this.state;
|
|
56161
|
+
const column = (_a3 = this.model.degridColumns) == null ? void 0 : _a3.find(
|
|
56162
|
+
(c) => {
|
|
56163
|
+
var _a4, _b2;
|
|
56164
|
+
return (group == null ? void 0 : group.groupFieldId) && c.columnType === "DEFGRIDCOLUMN" && ((_a4 = c.appDEFieldId) == null ? void 0 : _a4.toLowerCase()) === ((_b2 = group == null ? void 0 : group.groupFieldId) == null ? void 0 : _b2.toLowerCase());
|
|
56165
|
+
}
|
|
56166
|
+
);
|
|
56167
|
+
const columnState = columnStates.find(
|
|
56168
|
+
(c) => !c.hidden && (column == null ? void 0 : column.codeName) === c.key
|
|
56169
|
+
);
|
|
56170
|
+
const groupAppDEFieldId = column == null ? void 0 : column.appDEFieldId;
|
|
56171
|
+
if (!groupAppDEFieldId || !columnState) {
|
|
56172
|
+
this.state.groups = [];
|
|
56173
|
+
this.state.enableGroup = false;
|
|
56174
|
+
} else if (groupAppDEFieldId !== this.model.groupAppDEFieldId) {
|
|
56175
|
+
this.state.enableGroup = true;
|
|
56176
|
+
this.model.groupAppDEFieldId = groupAppDEFieldId;
|
|
56177
|
+
await this.initGroup();
|
|
56178
|
+
this.calcGroupData(this.state.items);
|
|
56179
|
+
}
|
|
56180
|
+
}
|
|
55989
56181
|
/**
|
|
55990
56182
|
* 计算分组数据
|
|
55991
56183
|
* @author lxm
|
|
@@ -55994,7 +56186,8 @@ var GridController = class extends MDControlController {
|
|
|
55994
56186
|
* @param {IData[]} items
|
|
55995
56187
|
*/
|
|
55996
56188
|
calcGroupData(items) {
|
|
55997
|
-
const { enableGroup
|
|
56189
|
+
const { enableGroup } = this.state;
|
|
56190
|
+
const { groupMode } = this.model;
|
|
55998
56191
|
if (enableGroup) {
|
|
55999
56192
|
const groupMap = /* @__PURE__ */ new Map();
|
|
56000
56193
|
const codeListGroup = groupMode === "CODELIST";
|
|
@@ -56500,7 +56693,7 @@ var GridController = class extends MDControlController {
|
|
|
56500
56693
|
await this.switchRowEdit(editingRow, false, false);
|
|
56501
56694
|
}
|
|
56502
56695
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
56503
|
-
row.cacheData =
|
|
56696
|
+
row.cacheData = clone41(row.data);
|
|
56504
56697
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
56505
56698
|
Object.assign(row.data, defaultVal);
|
|
56506
56699
|
}
|
|
@@ -56674,7 +56867,7 @@ var GridController = class extends MDControlController {
|
|
|
56674
56867
|
* @Date: 2024-03-20 17:54:16
|
|
56675
56868
|
*/
|
|
56676
56869
|
formatExcelData(data, fields) {
|
|
56677
|
-
const cloneData =
|
|
56870
|
+
const cloneData = clone41(
|
|
56678
56871
|
data.map((item) => {
|
|
56679
56872
|
return fields.reduce((obj, key) => {
|
|
56680
56873
|
obj[key] = item[key];
|
|
@@ -57155,9 +57348,9 @@ import {
|
|
|
57155
57348
|
ModelError as ModelError27,
|
|
57156
57349
|
base64ToStr
|
|
57157
57350
|
} from "@ibiz-template/core";
|
|
57158
|
-
import
|
|
57351
|
+
import dayjs7 from "dayjs";
|
|
57159
57352
|
import { debounce as debounce2 } from "lodash-es";
|
|
57160
|
-
import { clone as
|
|
57353
|
+
import { clone as clone42, isNil as isNil33 } from "ramda";
|
|
57161
57354
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
57162
57355
|
var GridFieldColumnController = class extends GridColumnController {
|
|
57163
57356
|
constructor() {
|
|
@@ -57349,7 +57542,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
57349
57542
|
srfkey: value,
|
|
57350
57543
|
...wfContext
|
|
57351
57544
|
});
|
|
57352
|
-
const tempParams =
|
|
57545
|
+
const tempParams = clone42(this.params);
|
|
57353
57546
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
57354
57547
|
row.data,
|
|
57355
57548
|
tempContext,
|
|
@@ -57529,7 +57722,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
57529
57722
|
}
|
|
57530
57723
|
const isDate = DataTypes5.isDate(this.dataType);
|
|
57531
57724
|
if (isDate) {
|
|
57532
|
-
const formatVal =
|
|
57725
|
+
const formatVal = dayjs7(strVal).format(this.valueFormat);
|
|
57533
57726
|
if (formatVal !== "Invalid Date") {
|
|
57534
57727
|
return formatVal;
|
|
57535
57728
|
}
|
|
@@ -57907,7 +58100,9 @@ var GridGroupColumnController = class extends GridColumnController {
|
|
|
57907
58100
|
};
|
|
57908
58101
|
|
|
57909
58102
|
// src/controller/control/list/list.controller.ts
|
|
57910
|
-
import { isBoolean as isBoolean3 } from "qx-util";
|
|
58103
|
+
import { createUUID as createUUID15, isBoolean as isBoolean3 } from "qx-util";
|
|
58104
|
+
import { clone as clone43, isNil as isNil34 } from "ramda";
|
|
58105
|
+
import { isElementSame as isElementSame4 } from "@ibiz-template/core";
|
|
57911
58106
|
|
|
57912
58107
|
// src/controller/control/list/list.service.ts
|
|
57913
58108
|
var ListService = class extends MDControlService {
|
|
@@ -58101,13 +58296,40 @@ var ListController = class extends MDControlController {
|
|
|
58101
58296
|
getAllData() {
|
|
58102
58297
|
return this.state.items;
|
|
58103
58298
|
}
|
|
58299
|
+
/**
|
|
58300
|
+
* @description 执行多数据分组
|
|
58301
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
58302
|
+
* @param {IParams} [_params]
|
|
58303
|
+
* @returns {*} {Promise<void>}
|
|
58304
|
+
* @memberof ListController
|
|
58305
|
+
*/
|
|
58306
|
+
async execGroup(arg, _params) {
|
|
58307
|
+
const group = arg[0];
|
|
58308
|
+
this.model = clone43(this.model);
|
|
58309
|
+
this.model.groupMode = "AUTO";
|
|
58310
|
+
if (!group || !group.groupFieldId) {
|
|
58311
|
+
this.state.groups = [];
|
|
58312
|
+
this.model.groupMode = "NONE";
|
|
58313
|
+
this.state.enableGroup = false;
|
|
58314
|
+
this.model.groupCodeListId = void 0;
|
|
58315
|
+
this.model.groupAppDEFieldId = void 0;
|
|
58316
|
+
this.groupDateFormat = [];
|
|
58317
|
+
} else if (group.groupFieldId !== this.model.groupAppDEFieldId || group.dateFormat && !isElementSame4(group.dateFormat, this.groupDateFormat)) {
|
|
58318
|
+
this.state.enableGroup = true;
|
|
58319
|
+
this.model.groupAppDEFieldId = group.groupFieldId;
|
|
58320
|
+
this.model.groupCodeListId = group.groupCodeListId;
|
|
58321
|
+
this.groupDateFormat = group.dateFormat || [];
|
|
58322
|
+
await this.handleDataGroup();
|
|
58323
|
+
}
|
|
58324
|
+
}
|
|
58104
58325
|
/**
|
|
58105
58326
|
* 处理数据分组
|
|
58106
58327
|
*
|
|
58107
58328
|
* @memberof DataViewControlController
|
|
58108
58329
|
*/
|
|
58109
58330
|
async handleDataGroup() {
|
|
58110
|
-
const {
|
|
58331
|
+
const { groupMode } = this.model;
|
|
58332
|
+
const { enableGroup } = this.state;
|
|
58111
58333
|
if (enableGroup && groupMode) {
|
|
58112
58334
|
if (groupMode === "AUTO") {
|
|
58113
58335
|
await this.handleAutoGroup();
|
|
@@ -58125,6 +58347,7 @@ var ListController = class extends MDControlController {
|
|
|
58125
58347
|
* @memberof DataViewControlController
|
|
58126
58348
|
*/
|
|
58127
58349
|
async handleAutoGroup() {
|
|
58350
|
+
var _a3;
|
|
58128
58351
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
58129
58352
|
let codeList = [];
|
|
58130
58353
|
if (groupCodeListId) {
|
|
@@ -58137,14 +58360,31 @@ var ListController = class extends MDControlController {
|
|
|
58137
58360
|
}
|
|
58138
58361
|
if (groupAppDEFieldId) {
|
|
58139
58362
|
const { items } = this.state;
|
|
58140
|
-
const
|
|
58363
|
+
const deRss = (_a3 = this.dataEntity.minorAppDERSs) == null ? void 0 : _a3.find(
|
|
58364
|
+
(rss) => rss.parentAppDEFieldId === groupAppDEFieldId
|
|
58365
|
+
);
|
|
58366
|
+
const textDEFieldId = deRss == null ? void 0 : deRss.parentTextAppDEFieldId;
|
|
58367
|
+
const dateFormat = this.groupDateFormat[0];
|
|
58368
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
58369
|
+
const unclassified = {
|
|
58370
|
+
key: createUUID15(),
|
|
58371
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58372
|
+
children: []
|
|
58373
|
+
};
|
|
58141
58374
|
items.forEach((item) => {
|
|
58142
|
-
|
|
58375
|
+
let groupVal = item[textDEFieldId || groupAppDEFieldId];
|
|
58376
|
+
if (dateFormat)
|
|
58377
|
+
groupVal = formatDate(groupVal, dateFormat);
|
|
58378
|
+
if (isNil34(groupVal)) {
|
|
58379
|
+
unclassified.children.push(item);
|
|
58380
|
+
return;
|
|
58381
|
+
}
|
|
58382
|
+
const children = groupMap.get(groupVal) || [];
|
|
58143
58383
|
children.push(item);
|
|
58144
|
-
|
|
58384
|
+
groupMap.set(groupVal, children);
|
|
58145
58385
|
});
|
|
58146
58386
|
const groups = [];
|
|
58147
|
-
|
|
58387
|
+
groupMap.forEach((value, key) => {
|
|
58148
58388
|
const codeListItem = codeList.find((x) => x.value === key);
|
|
58149
58389
|
groups.push({
|
|
58150
58390
|
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
@@ -58152,6 +58392,8 @@ var ListController = class extends MDControlController {
|
|
|
58152
58392
|
children: [...value]
|
|
58153
58393
|
});
|
|
58154
58394
|
});
|
|
58395
|
+
if (unclassified.children.length)
|
|
58396
|
+
groups.push(unclassified);
|
|
58155
58397
|
this.state.groups = groups;
|
|
58156
58398
|
}
|
|
58157
58399
|
}
|
|
@@ -58188,8 +58430,8 @@ var ListController = class extends MDControlController {
|
|
|
58188
58430
|
);
|
|
58189
58431
|
if (otherGroup.length > 0) {
|
|
58190
58432
|
groups.push({
|
|
58191
|
-
caption: "
|
|
58192
|
-
key: "
|
|
58433
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58434
|
+
key: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58193
58435
|
children: [...otherGroup]
|
|
58194
58436
|
});
|
|
58195
58437
|
}
|
|
@@ -59045,7 +59287,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
59045
59287
|
};
|
|
59046
59288
|
|
|
59047
59289
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
59048
|
-
import { createUUID as
|
|
59290
|
+
import { createUUID as createUUID16 } from "qx-util";
|
|
59049
59291
|
var TabExpPanelController = class extends ControlController {
|
|
59050
59292
|
constructor() {
|
|
59051
59293
|
super(...arguments);
|
|
@@ -59284,7 +59526,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
59284
59526
|
}
|
|
59285
59527
|
refresh() {
|
|
59286
59528
|
const navViewMsg = this.getNavViewMsg(this.activeTabViewPanelModel);
|
|
59287
|
-
navViewMsg.key +=
|
|
59529
|
+
navViewMsg.key += createUUID16();
|
|
59288
59530
|
this.evt.emit("onNavViewChange", { navViewMsg });
|
|
59289
59531
|
}
|
|
59290
59532
|
};
|
|
@@ -59295,7 +59537,7 @@ import {
|
|
|
59295
59537
|
RuntimeModelError as RuntimeModelError67,
|
|
59296
59538
|
recursiveIterate as recursiveIterate11
|
|
59297
59539
|
} from "@ibiz-template/core";
|
|
59298
|
-
import { isNil as
|
|
59540
|
+
import { isNil as isNil35 } from "ramda";
|
|
59299
59541
|
import { isBoolean as isBoolean4 } from "qx-util";
|
|
59300
59542
|
|
|
59301
59543
|
// src/controller/control/tree/tree.service.ts
|
|
@@ -60713,7 +60955,7 @@ var TreeController = class extends MDControlController {
|
|
|
60713
60955
|
* @return {*} {void}
|
|
60714
60956
|
*/
|
|
60715
60957
|
onDEDataChange(msg) {
|
|
60716
|
-
if (!
|
|
60958
|
+
if (!isNil35(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
60717
60959
|
return;
|
|
60718
60960
|
}
|
|
60719
60961
|
if (msg.subtype === "OBJECTCREATED") {
|
|
@@ -61295,7 +61537,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
61295
61537
|
|
|
61296
61538
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
61297
61539
|
import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
61298
|
-
import { isNil as
|
|
61540
|
+
import { isNil as isNil36 } from "ramda";
|
|
61299
61541
|
|
|
61300
61542
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
61301
61543
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -61558,7 +61800,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61558
61800
|
const groupMap = /* @__PURE__ */ new Map();
|
|
61559
61801
|
items.forEach((item) => {
|
|
61560
61802
|
const groupVal = item[groupAppDEFieldId];
|
|
61561
|
-
if (
|
|
61803
|
+
if (isNil36(groupVal)) {
|
|
61562
61804
|
return;
|
|
61563
61805
|
}
|
|
61564
61806
|
if (!groupMap.has(groupVal)) {
|
|
@@ -61663,10 +61905,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61663
61905
|
|
|
61664
61906
|
// src/controller/control/kanban/kanban.controller.ts
|
|
61665
61907
|
import { RuntimeError as RuntimeError60, RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
61666
|
-
import { clone as
|
|
61908
|
+
import { clone as clone45, isNil as isNil37 } from "ramda";
|
|
61667
61909
|
|
|
61668
61910
|
// src/controller/control/kanban/kanban.service.ts
|
|
61669
|
-
import { clone as
|
|
61911
|
+
import { clone as clone44 } from "ramda";
|
|
61670
61912
|
var KanbanService = class extends DataViewControlService {
|
|
61671
61913
|
/**
|
|
61672
61914
|
* 更新分组数据
|
|
@@ -61695,7 +61937,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
61695
61937
|
*/
|
|
61696
61938
|
async moveOrderItem(context, data, args) {
|
|
61697
61939
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
61698
|
-
const params =
|
|
61940
|
+
const params = clone44(data.getOrigin());
|
|
61699
61941
|
Object.assign(params, args);
|
|
61700
61942
|
let res = await this.exec(moveAction, context, params, {
|
|
61701
61943
|
srfupdateitem: true
|
|
@@ -61776,7 +62018,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61776
62018
|
const isAsc = minorSortDir === "ASC";
|
|
61777
62019
|
items.forEach((item) => {
|
|
61778
62020
|
const sortValue = item[sortField];
|
|
61779
|
-
if (
|
|
62021
|
+
if (isNil37(sortValue)) {
|
|
61780
62022
|
item[sortField] = 0;
|
|
61781
62023
|
} else {
|
|
61782
62024
|
const toNum = Number(sortValue);
|
|
@@ -62032,7 +62274,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
62032
62274
|
}
|
|
62033
62275
|
return moveData;
|
|
62034
62276
|
};
|
|
62035
|
-
const draggedItem =
|
|
62277
|
+
const draggedItem = clone45(fromGroup.children[fromIndex]);
|
|
62036
62278
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
62037
62279
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
62038
62280
|
if (info.from !== info.to) {
|
|
@@ -62307,7 +62549,7 @@ import {
|
|
|
62307
62549
|
awaitTimeout as awaitTimeout3,
|
|
62308
62550
|
recursiveIterate as recursiveIterate12
|
|
62309
62551
|
} from "@ibiz-template/core";
|
|
62310
|
-
import { clone as
|
|
62552
|
+
import { clone as clone46 } from "ramda";
|
|
62311
62553
|
|
|
62312
62554
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
62313
62555
|
var TreeGridExService = class extends TreeService {
|
|
@@ -62859,7 +63101,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
62859
63101
|
);
|
|
62860
63102
|
}
|
|
62861
63103
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
62862
|
-
row.cacheData =
|
|
63104
|
+
row.cacheData = clone46(row.data);
|
|
62863
63105
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
62864
63106
|
Object.assign(row.data, defaultVal);
|
|
62865
63107
|
}
|
|
@@ -63046,8 +63288,8 @@ import {
|
|
|
63046
63288
|
RuntimeError as RuntimeError62,
|
|
63047
63289
|
RuntimeModelError as RuntimeModelError71
|
|
63048
63290
|
} from "@ibiz-template/core";
|
|
63049
|
-
import { clone as
|
|
63050
|
-
import
|
|
63291
|
+
import { clone as clone47 } from "ramda";
|
|
63292
|
+
import dayjs8 from "dayjs";
|
|
63051
63293
|
var TreeGridExNodeColumnController = class {
|
|
63052
63294
|
/**
|
|
63053
63295
|
* @author lxm
|
|
@@ -63254,7 +63496,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
63254
63496
|
srfkey: value,
|
|
63255
63497
|
...wfContext
|
|
63256
63498
|
});
|
|
63257
|
-
const tempParams =
|
|
63499
|
+
const tempParams = clone47(this.params);
|
|
63258
63500
|
const { userParam } = this.nodeColumn;
|
|
63259
63501
|
if (userParam) {
|
|
63260
63502
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -63345,7 +63587,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
63345
63587
|
}
|
|
63346
63588
|
const isDate = DataTypes6.isDate(this.dataType);
|
|
63347
63589
|
if (isDate || this.fieldColumn.name === "createdate") {
|
|
63348
|
-
const formatVal =
|
|
63590
|
+
const formatVal = dayjs8(strVal).format(this.valueFormat);
|
|
63349
63591
|
if (formatVal !== "Invalid Date") {
|
|
63350
63592
|
return formatVal;
|
|
63351
63593
|
}
|
|
@@ -63736,7 +63978,7 @@ var TreeGridService = class extends GridService {
|
|
|
63736
63978
|
|
|
63737
63979
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
63738
63980
|
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
63739
|
-
import { createUUID as
|
|
63981
|
+
import { createUUID as createUUID17 } from "qx-util";
|
|
63740
63982
|
|
|
63741
63983
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
63742
63984
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -63823,7 +64065,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
63823
64065
|
*/
|
|
63824
64066
|
handlePanelItemParams(arg) {
|
|
63825
64067
|
const [{ parameterName }] = this.parameters;
|
|
63826
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
64068
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID17());
|
|
63827
64069
|
const item = {
|
|
63828
64070
|
id,
|
|
63829
64071
|
context: this.context.clone(),
|
|
@@ -65723,7 +65965,7 @@ var ThemeUtil = class {
|
|
|
65723
65965
|
* @memberof ThemeUtil
|
|
65724
65966
|
*/
|
|
65725
65967
|
async loadTheme(theme, type = "COLOR") {
|
|
65726
|
-
const data =
|
|
65968
|
+
const data = clone48(theme.themeParams || {});
|
|
65727
65969
|
const path2 = data["theme-package-path"] || theme.themeUrl;
|
|
65728
65970
|
delete data.appId;
|
|
65729
65971
|
delete data["theme-package-path"];
|
|
@@ -65909,7 +66151,7 @@ var ThemeUtil = class {
|
|
|
65909
66151
|
};
|
|
65910
66152
|
|
|
65911
66153
|
// src/utils/ui-domain/ui-domain.ts
|
|
65912
|
-
import { QXEvent as QXEvent9, createUUID as
|
|
66154
|
+
import { QXEvent as QXEvent9, createUUID as createUUID18 } from "qx-util";
|
|
65913
66155
|
|
|
65914
66156
|
// src/utils/ui-domain/transaction.ts
|
|
65915
66157
|
var Transaction = class {
|
|
@@ -66061,7 +66303,7 @@ var UIDomain = class {
|
|
|
66061
66303
|
if (id) {
|
|
66062
66304
|
this.id = id;
|
|
66063
66305
|
} else {
|
|
66064
|
-
this.id =
|
|
66306
|
+
this.id = createUUID18();
|
|
66065
66307
|
}
|
|
66066
66308
|
}
|
|
66067
66309
|
/**
|
|
@@ -66371,8 +66613,8 @@ var baseStyle = {
|
|
|
66371
66613
|
position: "fixed",
|
|
66372
66614
|
zIndex: "10000"
|
|
66373
66615
|
};
|
|
66374
|
-
function cloneElement(
|
|
66375
|
-
const element = getAnimationElement(
|
|
66616
|
+
function cloneElement(clone54, teleport = document.body, isRemoveChild = true) {
|
|
66617
|
+
const element = getAnimationElement(clone54);
|
|
66376
66618
|
if (element == null) {
|
|
66377
66619
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
66378
66620
|
}
|
|
@@ -66791,11 +67033,11 @@ function arrayContains(arr, val) {
|
|
|
66791
67033
|
});
|
|
66792
67034
|
}
|
|
66793
67035
|
function cloneObject(o) {
|
|
66794
|
-
var
|
|
67036
|
+
var clone54 = {};
|
|
66795
67037
|
for (var p in o) {
|
|
66796
|
-
|
|
67038
|
+
clone54[p] = o[p];
|
|
66797
67039
|
}
|
|
66798
|
-
return
|
|
67040
|
+
return clone54;
|
|
66799
67041
|
}
|
|
66800
67042
|
function replaceObjectProps(o1, o2) {
|
|
66801
67043
|
var o = cloneObject(o1);
|
|
@@ -68344,7 +68586,7 @@ var ShortCutUtil = class {
|
|
|
68344
68586
|
};
|
|
68345
68587
|
|
|
68346
68588
|
// src/utils/bi-report-util/bi-report-util.ts
|
|
68347
|
-
import { clone as
|
|
68589
|
+
import { clone as clone49 } from "ramda";
|
|
68348
68590
|
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
68349
68591
|
var BIReportUtil = class {
|
|
68350
68592
|
/**
|
|
@@ -68360,7 +68602,7 @@ var BIReportUtil = class {
|
|
|
68360
68602
|
async openDesignPage(context, params, data) {
|
|
68361
68603
|
if (!data.mode)
|
|
68362
68604
|
data.mode = "DATA";
|
|
68363
|
-
const tempContext =
|
|
68605
|
+
const tempContext = clone49(context);
|
|
68364
68606
|
let config = {};
|
|
68365
68607
|
if (data.mode === "DATA") {
|
|
68366
68608
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
@@ -68778,7 +69020,7 @@ var BIReportUtil = class {
|
|
|
68778
69020
|
|
|
68779
69021
|
// src/utils/record-nav-util/record-nav-util.ts
|
|
68780
69022
|
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
68781
|
-
import { createUUID as
|
|
69023
|
+
import { createUUID as createUUID19 } from "qx-util";
|
|
68782
69024
|
var RecordNavUtil = class {
|
|
68783
69025
|
constructor() {
|
|
68784
69026
|
/**
|
|
@@ -68821,7 +69063,7 @@ var RecordNavUtil = class {
|
|
|
68821
69063
|
* @param {IData} tempContext
|
|
68822
69064
|
*/
|
|
68823
69065
|
addTriggerLogic(viewId, data, tempContext) {
|
|
68824
|
-
const triggerLogicId = "".concat(viewId, ":").concat(
|
|
69066
|
+
const triggerLogicId = "".concat(viewId, ":").concat(createUUID19());
|
|
68825
69067
|
this.triggerLogicMap.set(triggerLogicId, data);
|
|
68826
69068
|
tempContext.srfnavlogicid = triggerLogicId;
|
|
68827
69069
|
}
|
|
@@ -69027,7 +69269,7 @@ var RecordNavUtil = class {
|
|
|
69027
69269
|
|
|
69028
69270
|
// src/utils/jsonschema-util/jsonschema-util.ts
|
|
69029
69271
|
import qs5 from "qs";
|
|
69030
|
-
import { clone as
|
|
69272
|
+
import { clone as clone50 } from "ramda";
|
|
69031
69273
|
var JsonSchemaUtil = class {
|
|
69032
69274
|
constructor() {
|
|
69033
69275
|
/**
|
|
@@ -69280,7 +69522,7 @@ var JsonSchemaUtil = class {
|
|
|
69280
69522
|
getMockEditor(context, item, valueOP) {
|
|
69281
69523
|
if (valueOP && this.excludeOPs.includes(valueOP))
|
|
69282
69524
|
return;
|
|
69283
|
-
const baseMockEditor =
|
|
69525
|
+
const baseMockEditor = clone50(this.DataTypeToEditor[item.type]);
|
|
69284
69526
|
if (!baseMockEditor)
|
|
69285
69527
|
return;
|
|
69286
69528
|
baseMockEditor.appId = context.srfappid;
|
|
@@ -73456,7 +73698,7 @@ async function getDeDataMajorField(data, context, appDataEntityId) {
|
|
|
73456
73698
|
|
|
73457
73699
|
// src/command/app/open-app-view/open-app-view.ts
|
|
73458
73700
|
import { ModelError as ModelError30, RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
73459
|
-
import { clone as
|
|
73701
|
+
import { clone as clone51 } from "ramda";
|
|
73460
73702
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
73461
73703
|
constructor() {
|
|
73462
73704
|
ibiz.commands.register(_OpenAppViewCommand.TAG, this.exec.bind(this));
|
|
@@ -73473,7 +73715,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
73473
73715
|
* @return {*} {(Promise<IModalData | void>)}
|
|
73474
73716
|
*/
|
|
73475
73717
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
73476
|
-
const context =
|
|
73718
|
+
const context = clone51(_context);
|
|
73477
73719
|
if (context.srfsimple) {
|
|
73478
73720
|
delete context.srfsimple;
|
|
73479
73721
|
}
|
|
@@ -74225,9 +74467,9 @@ import { QXEvent as QXEvent14 } from "qx-util";
|
|
|
74225
74467
|
|
|
74226
74468
|
// src/controller/notification/async-action.controller.ts
|
|
74227
74469
|
import { QXEvent as QXEvent12 } from "qx-util";
|
|
74228
|
-
import { clone as
|
|
74229
|
-
import { isNil as
|
|
74230
|
-
import
|
|
74470
|
+
import { clone as clone52 } from "ramda";
|
|
74471
|
+
import { isNil as isNil38, isNumber as isNumber4 } from "lodash-es";
|
|
74472
|
+
import dayjs9 from "dayjs";
|
|
74231
74473
|
var AsyncActionController = class {
|
|
74232
74474
|
constructor() {
|
|
74233
74475
|
this.evt = new QXEvent12();
|
|
@@ -74301,17 +74543,17 @@ var AsyncActionController = class {
|
|
|
74301
74543
|
];
|
|
74302
74544
|
dateFields.forEach((key) => {
|
|
74303
74545
|
if (isNumber4(data[key])) {
|
|
74304
|
-
data[key] =
|
|
74546
|
+
data[key] = dayjs9(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
74305
74547
|
}
|
|
74306
74548
|
});
|
|
74307
|
-
if (!
|
|
74549
|
+
if (!isNil38(data.actionresult)) {
|
|
74308
74550
|
try {
|
|
74309
74551
|
const json = JSON.parse(data.actionresult);
|
|
74310
74552
|
data.actionresult = json;
|
|
74311
74553
|
} catch (error) {
|
|
74312
74554
|
}
|
|
74313
74555
|
}
|
|
74314
|
-
if (!
|
|
74556
|
+
if (!isNil38(data.completionrate)) {
|
|
74315
74557
|
const num = Number(data.completionrate);
|
|
74316
74558
|
if (Number.isNaN(num)) {
|
|
74317
74559
|
data.completionrate = void 0;
|
|
@@ -74336,7 +74578,7 @@ var AsyncActionController = class {
|
|
|
74336
74578
|
} else {
|
|
74337
74579
|
this.noticeResult(action);
|
|
74338
74580
|
}
|
|
74339
|
-
this.evt.emit("add",
|
|
74581
|
+
this.evt.emit("add", clone52(action));
|
|
74340
74582
|
this.evt.emit("dataChange");
|
|
74341
74583
|
}
|
|
74342
74584
|
/**
|
|
@@ -74358,7 +74600,7 @@ var AsyncActionController = class {
|
|
|
74358
74600
|
}
|
|
74359
74601
|
this.noticeResult(action);
|
|
74360
74602
|
}
|
|
74361
|
-
this.evt.emit("change",
|
|
74603
|
+
this.evt.emit("change", clone52(action));
|
|
74362
74604
|
this.evt.emit("dataChange");
|
|
74363
74605
|
}
|
|
74364
74606
|
noticeResult(action) {
|
|
@@ -76011,7 +76253,7 @@ var ViewEngineBase = class {
|
|
|
76011
76253
|
|
|
76012
76254
|
// src/engine/md-view.engine.ts
|
|
76013
76255
|
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
76014
|
-
import { clone as
|
|
76256
|
+
import { clone as clone53 } from "ramda";
|
|
76015
76257
|
var MDViewEngine = class extends ViewEngineBase {
|
|
76016
76258
|
/**
|
|
76017
76259
|
* 多数据部件名称
|
|
@@ -76284,7 +76526,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
76284
76526
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
76285
76527
|
);
|
|
76286
76528
|
}
|
|
76287
|
-
const params =
|
|
76529
|
+
const params = clone53(this.view.params);
|
|
76288
76530
|
if (copyMode) {
|
|
76289
76531
|
params.srfcopymode = copyMode;
|
|
76290
76532
|
}
|
|
@@ -78311,7 +78553,8 @@ var en = {
|
|
|
78311
78553
|
noMoveDataCconfig: "No move data behavior config",
|
|
78312
78554
|
exportRequestFailed: "Export request failed",
|
|
78313
78555
|
changeGroupError: "Failed to switch the group",
|
|
78314
|
-
computeMoveMetaError: "Error in calculating target position and movement type"
|
|
78556
|
+
computeMoveMetaError: "Error in calculating target position and movement type",
|
|
78557
|
+
unclassified: "Unclassified"
|
|
78315
78558
|
},
|
|
78316
78559
|
editor: {
|
|
78317
78560
|
editorNoConfigured: "Editor type [{editorType}], code table not configured",
|
|
@@ -78518,6 +78761,11 @@ var en = {
|
|
|
78518
78761
|
saveError: "Failed to save custom theme",
|
|
78519
78762
|
resetSuccess: "Reset custom theme successfully",
|
|
78520
78763
|
resetError: "Reset custom theme failed"
|
|
78764
|
+
},
|
|
78765
|
+
util: {
|
|
78766
|
+
quarter: "Quarter",
|
|
78767
|
+
month: "Month",
|
|
78768
|
+
week: "Week"
|
|
78521
78769
|
}
|
|
78522
78770
|
}
|
|
78523
78771
|
},
|
|
@@ -78952,7 +79200,8 @@ var zhCn = {
|
|
|
78952
79200
|
noMoveDataCconfig: "\u65E0\u79FB\u52A8\u6570\u636E\u884C\u4E3A\u914D\u7F6E",
|
|
78953
79201
|
exportRequestFailed: "\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25",
|
|
78954
79202
|
changeGroupError: "\u5207\u6362\u5206\u7EC4\u5931\u8D25",
|
|
78955
|
-
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF"
|
|
79203
|
+
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF",
|
|
79204
|
+
unclassified: "\u672A\u5206\u7C7B"
|
|
78956
79205
|
},
|
|
78957
79206
|
editor: {
|
|
78958
79207
|
editorNoConfigured: "\u7F16\u8F91\u5668\u7C7B\u578B[{editorType}]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868",
|
|
@@ -79159,6 +79408,11 @@ var zhCn = {
|
|
|
79159
79408
|
saveError: "\u4FDD\u5B58\u81EA\u5B9A\u4E49\u4E3B\u9898\u5931\u8D25",
|
|
79160
79409
|
resetSuccess: "\u91CD\u7F6E\u81EA\u5B9A\u4E49\u4E3B\u9898\u6210\u529F",
|
|
79161
79410
|
resetError: "\u91CD\u7F6E\u81EA\u5B9A\u4E49\u4E3B\u9898\u5931\u8D25"
|
|
79411
|
+
},
|
|
79412
|
+
util: {
|
|
79413
|
+
quarter: "\u5B63\u5EA6",
|
|
79414
|
+
month: "\u6708",
|
|
79415
|
+
week: "\u5468"
|
|
79162
79416
|
}
|
|
79163
79417
|
}
|
|
79164
79418
|
},
|
|
@@ -79863,6 +80117,7 @@ export {
|
|
|
79863
80117
|
findEditItem,
|
|
79864
80118
|
findFieldById,
|
|
79865
80119
|
findModelChild,
|
|
80120
|
+
formatDate,
|
|
79866
80121
|
formatMultiData,
|
|
79867
80122
|
formatSeparator,
|
|
79868
80123
|
generateCacheKy,
|