@ibiz-template/runtime 0.7.41-alpha.3 → 0.7.41-alpha.5
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 +455 -185
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/controller/common/control/control.controller.d.ts +12 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +19 -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/form/form-detail/form-item/form-item.controller.js +2 -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/controller/common/i-api-mask-option.d.ts +20 -0
- package/out/interface/api/controller/common/i-api-mask-option.d.ts.map +1 -0
- package/out/interface/api/controller/common/i-api-mask-option.js +1 -0
- package/out/interface/api/controller/common/index.d.ts +1 -0
- package/out/interface/api/controller/common/index.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-control.controller.d.ts +12 -0
- package/out/interface/api/controller/control/i-api-control.controller.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-control.state.d.ts +14 -0
- package/out/interface/api/state/control/i-api-control.state.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 +3 -0
- 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 = {
|
|
@@ -22428,7 +22429,7 @@ var TextUtil = class {
|
|
|
22428
22429
|
};
|
|
22429
22430
|
|
|
22430
22431
|
// src/utils/theme-util/theme-util.ts
|
|
22431
|
-
import { clone as
|
|
22432
|
+
import { clone as clone48 } from "ramda";
|
|
22432
22433
|
|
|
22433
22434
|
// src/utils/theme-util/custom-theme-util.ts
|
|
22434
22435
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
@@ -24313,7 +24314,8 @@ var BuildInKeys = [
|
|
|
24313
24314
|
"tempsrfkey",
|
|
24314
24315
|
"srfuf",
|
|
24315
24316
|
"srfdeid",
|
|
24316
|
-
"srfdecodename"
|
|
24317
|
+
"srfdecodename",
|
|
24318
|
+
"srfexdata"
|
|
24317
24319
|
];
|
|
24318
24320
|
var ControlVO = class _ControlVO {
|
|
24319
24321
|
/**
|
|
@@ -24417,6 +24419,12 @@ var ControlVO = class _ControlVO {
|
|
|
24417
24419
|
});
|
|
24418
24420
|
}
|
|
24419
24421
|
);
|
|
24422
|
+
Object.defineProperty(this, "srfexdata", {
|
|
24423
|
+
enumerable: false,
|
|
24424
|
+
configurable: true,
|
|
24425
|
+
writable: true,
|
|
24426
|
+
value: {}
|
|
24427
|
+
});
|
|
24420
24428
|
this.$dataUIMap.forEach((mapField, key) => {
|
|
24421
24429
|
const value = mapField.dataKey;
|
|
24422
24430
|
this.linkProperty(key, value, mapField);
|
|
@@ -28050,6 +28058,12 @@ var MethodDto = class {
|
|
|
28050
28058
|
_context,
|
|
28051
28059
|
_params
|
|
28052
28060
|
);
|
|
28061
|
+
} else if (deRs.nestedAppDEDataSetId) {
|
|
28062
|
+
res = await service.exec(
|
|
28063
|
+
deRs.nestedAppDEDataSetId,
|
|
28064
|
+
_context,
|
|
28065
|
+
_params
|
|
28066
|
+
);
|
|
28053
28067
|
} else {
|
|
28054
28068
|
res = await service.exec("FetchDefault", _context, _params);
|
|
28055
28069
|
}
|
|
@@ -34452,6 +34466,7 @@ function hasSubRoute(routeDepth) {
|
|
|
34452
34466
|
|
|
34453
34467
|
// src/controller/utils/util/util.ts
|
|
34454
34468
|
import { isNil as isNil18 } from "ramda";
|
|
34469
|
+
import dayjs from "dayjs";
|
|
34455
34470
|
function isValueChange(value, value2) {
|
|
34456
34471
|
if ((isNil18(value) || value === "") && (isNil18(value2) || value2 === "")) {
|
|
34457
34472
|
return false;
|
|
@@ -34567,6 +34582,35 @@ function formatSeparator(type, items, state, opts) {
|
|
|
34567
34582
|
calcChildrenFormat(items);
|
|
34568
34583
|
return hideSeparator;
|
|
34569
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
|
+
}
|
|
34570
34614
|
|
|
34571
34615
|
// src/controller/utils/value-rule/value-rule.ts
|
|
34572
34616
|
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
@@ -34758,7 +34802,7 @@ var ValueExUtil = class {
|
|
|
34758
34802
|
|
|
34759
34803
|
// src/controller/utils/value-default/value-default.ts
|
|
34760
34804
|
import { RuntimeError as RuntimeError27, ModelError as ModelError15 } from "@ibiz-template/core";
|
|
34761
|
-
import
|
|
34805
|
+
import dayjs2 from "dayjs";
|
|
34762
34806
|
import { createUUID as createUUID9 } from "qx-util";
|
|
34763
34807
|
import { isNil as isNil21, isNotNil } from "ramda";
|
|
34764
34808
|
function getDefaultValue(opts, origins) {
|
|
@@ -34792,7 +34836,7 @@ function getDefaultValue(opts, origins) {
|
|
|
34792
34836
|
case "OPERATOR":
|
|
34793
34837
|
return context.srfuserid;
|
|
34794
34838
|
case "CURTIME":
|
|
34795
|
-
return
|
|
34839
|
+
return dayjs2().format(valueFormat);
|
|
34796
34840
|
case "PARAM":
|
|
34797
34841
|
return data[defaultValue];
|
|
34798
34842
|
case "SESSION":
|
|
@@ -36487,7 +36531,7 @@ var WFStepTraceViewController = class extends ViewController {
|
|
|
36487
36531
|
|
|
36488
36532
|
// src/controller/common/editor/editor.controller.ts
|
|
36489
36533
|
import { DataTypes as DataTypes3 } from "@ibiz-template/core";
|
|
36490
|
-
import
|
|
36534
|
+
import dayjs3 from "dayjs";
|
|
36491
36535
|
var EditorController = class {
|
|
36492
36536
|
/**
|
|
36493
36537
|
* Creates an instance of EditorController.
|
|
@@ -36719,7 +36763,7 @@ var EditorController = class {
|
|
|
36719
36763
|
}
|
|
36720
36764
|
const isDate = DataTypes3.isDate(this.dataType);
|
|
36721
36765
|
if (isDate) {
|
|
36722
|
-
const formatVal =
|
|
36766
|
+
const formatVal = dayjs3(strVal).format(this.valueFormat);
|
|
36723
36767
|
if (formatVal !== "Invalid Date") {
|
|
36724
36768
|
return formatVal;
|
|
36725
36769
|
}
|
|
@@ -36981,6 +37025,8 @@ var ControlController = class extends BaseController {
|
|
|
36981
37025
|
super.initState();
|
|
36982
37026
|
this.state.activated = true;
|
|
36983
37027
|
this.state.isLoading = false;
|
|
37028
|
+
this.state.disabled = false;
|
|
37029
|
+
this.state.maskOption = { mode: "BLANK" };
|
|
36984
37030
|
}
|
|
36985
37031
|
async onCreated() {
|
|
36986
37032
|
var _a3;
|
|
@@ -37353,6 +37399,23 @@ var ControlController = class extends BaseController {
|
|
|
37353
37399
|
cb();
|
|
37354
37400
|
}
|
|
37355
37401
|
}
|
|
37402
|
+
/**
|
|
37403
|
+
* @description 取消部件禁用
|
|
37404
|
+
* @memberof ControlController
|
|
37405
|
+
*/
|
|
37406
|
+
enable() {
|
|
37407
|
+
this.state.disabled = false;
|
|
37408
|
+
this.state.maskOption = { mode: "BLANK" };
|
|
37409
|
+
}
|
|
37410
|
+
/**
|
|
37411
|
+
* @description 设置部件禁用
|
|
37412
|
+
* @param {IApiMaskOption} [options={ mode: 'BLANK' }]
|
|
37413
|
+
* @memberof ControlController
|
|
37414
|
+
*/
|
|
37415
|
+
disabled(options = { mode: "BLANK" }) {
|
|
37416
|
+
this.state.disabled = true;
|
|
37417
|
+
this.state.maskOption = options;
|
|
37418
|
+
}
|
|
37356
37419
|
};
|
|
37357
37420
|
|
|
37358
37421
|
// src/controller/common/control/md-control.controller.ts
|
|
@@ -37380,6 +37443,13 @@ var MDControlController = class extends ControlController {
|
|
|
37380
37443
|
* @type {boolean}
|
|
37381
37444
|
*/
|
|
37382
37445
|
this.enableLoad = true;
|
|
37446
|
+
/**
|
|
37447
|
+
* @description 分组日期格式化
|
|
37448
|
+
* @protected
|
|
37449
|
+
* @type {(('year' | 'quarter' | 'month' | 'week' | 'day')[])}
|
|
37450
|
+
* @memberof MDControlController
|
|
37451
|
+
*/
|
|
37452
|
+
this.groupDateFormat = [];
|
|
37383
37453
|
/**
|
|
37384
37454
|
* 实体属性映射,key是id,value是name
|
|
37385
37455
|
* @author lxm
|
|
@@ -37443,6 +37513,7 @@ var MDControlController = class extends ControlController {
|
|
|
37443
37513
|
this.state.mdctrlActiveMode = 0;
|
|
37444
37514
|
this.state.groups = [];
|
|
37445
37515
|
this.state.hideNoDataImage = false;
|
|
37516
|
+
this.state.enableGroup = !!this.model.enableGroup;
|
|
37446
37517
|
}
|
|
37447
37518
|
/**
|
|
37448
37519
|
* 批操作工具栏
|
|
@@ -37496,6 +37567,16 @@ var MDControlController = class extends ControlController {
|
|
|
37496
37567
|
this.load({ isInitialLoad: true });
|
|
37497
37568
|
}
|
|
37498
37569
|
}
|
|
37570
|
+
/**
|
|
37571
|
+
* @description 执行多数据分组
|
|
37572
|
+
* - 子类实现
|
|
37573
|
+
* @param {IApiMDGroupParams[]} [_arg] 分组参数集合(多层分组暂未支持)
|
|
37574
|
+
* @param {IParams} [_params] 额外参数
|
|
37575
|
+
* @returns {*} {Promise<void>}
|
|
37576
|
+
* @memberof MDControlController
|
|
37577
|
+
*/
|
|
37578
|
+
async execGroup(_arg, _params) {
|
|
37579
|
+
}
|
|
37499
37580
|
/**
|
|
37500
37581
|
* 获取部件默认排序模型
|
|
37501
37582
|
* @return {*}
|
|
@@ -38622,7 +38703,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
38622
38703
|
};
|
|
38623
38704
|
|
|
38624
38705
|
// src/controller/control/calendar/calendar.controller.ts
|
|
38625
|
-
import
|
|
38706
|
+
import dayjs4 from "dayjs";
|
|
38626
38707
|
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
38627
38708
|
|
|
38628
38709
|
// src/controller/control/calendar/calendar.service.ts
|
|
@@ -40857,12 +40938,9 @@ var UIActionProviderBase = class {
|
|
|
40857
40938
|
*/
|
|
40858
40939
|
async handleParams(action, context, data, params) {
|
|
40859
40940
|
let resultData = [];
|
|
40860
|
-
const deName = calcDeCodeNameById(action.appDataEntityId);
|
|
40861
|
-
const entity = await ibiz.hub.getAppDataEntity(
|
|
40862
|
-
|
|
40863
|
-
action.appId
|
|
40864
|
-
);
|
|
40865
|
-
const keyField = entity.keyAppDEFieldId;
|
|
40941
|
+
const deName = action.appDataEntityId ? calcDeCodeNameById(action.appDataEntityId) : void 0;
|
|
40942
|
+
const entity = action.appDataEntityId ? await ibiz.hub.getAppDataEntity(action.appDataEntityId, action.appId) : void 0;
|
|
40943
|
+
const keyField = entity == null ? void 0 : entity.keyAppDEFieldId;
|
|
40866
40944
|
switch (action.actionTarget) {
|
|
40867
40945
|
case "NONE":
|
|
40868
40946
|
resultData = [];
|
|
@@ -40874,12 +40952,12 @@ var UIActionProviderBase = class {
|
|
|
40874
40952
|
resultData = data;
|
|
40875
40953
|
break;
|
|
40876
40954
|
case "MULTIKEY":
|
|
40877
|
-
resultData = deName && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
40955
|
+
resultData = deName && keyField && data.length > 0 ? data.map((item) => ({ [keyField]: item.srfkey || item[keyField] })) : [{}];
|
|
40878
40956
|
break;
|
|
40879
40957
|
case "SINGLEKEY":
|
|
40880
40958
|
{
|
|
40881
40959
|
const originData = data[0] || {};
|
|
40882
|
-
resultData = deName ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
40960
|
+
resultData = deName && keyField ? [{ [keyField]: originData.srfkey || originData[keyField] }] : [{}];
|
|
40883
40961
|
}
|
|
40884
40962
|
break;
|
|
40885
40963
|
default:
|
|
@@ -42332,9 +42410,9 @@ var CalendarController = class extends MDControlController {
|
|
|
42332
42410
|
let result = 0;
|
|
42333
42411
|
const x = a[sortField];
|
|
42334
42412
|
const y = b[sortField];
|
|
42335
|
-
if (
|
|
42413
|
+
if (dayjs4(x).isAfter(y)) {
|
|
42336
42414
|
result = -1;
|
|
42337
|
-
} else if (
|
|
42415
|
+
} else if (dayjs4(x).isBefore(y)) {
|
|
42338
42416
|
result = 1;
|
|
42339
42417
|
}
|
|
42340
42418
|
return result;
|
|
@@ -42406,8 +42484,8 @@ var CalendarController = class extends MDControlController {
|
|
|
42406
42484
|
break;
|
|
42407
42485
|
}
|
|
42408
42486
|
return {
|
|
42409
|
-
srfstartdate:
|
|
42410
|
-
srfenddate:
|
|
42487
|
+
srfstartdate: dayjs4(srfstartdate).format("YYYY-MM-DD HH:mm:ss"),
|
|
42488
|
+
srfenddate: dayjs4(srfenddate).format("YYYY-MM-DD HH:mm:ss")
|
|
42411
42489
|
};
|
|
42412
42490
|
}
|
|
42413
42491
|
return { srfstartdate, srfenddate };
|
|
@@ -42514,18 +42592,18 @@ import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
|
42514
42592
|
|
|
42515
42593
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
42516
42594
|
import { plus, RuntimeModelError as RuntimeModelError49, toNumberOrNil } from "@ibiz-template/core";
|
|
42517
|
-
import
|
|
42595
|
+
import dayjs5 from "dayjs";
|
|
42518
42596
|
import minMax from "dayjs/plugin/minMax";
|
|
42519
42597
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
42520
42598
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
42521
42599
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
42522
42600
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
42523
42601
|
import { clone as clone26, isNil as isNil26, mergeDeepRight } from "ramda";
|
|
42524
|
-
|
|
42525
|
-
|
|
42526
|
-
|
|
42527
|
-
|
|
42528
|
-
|
|
42602
|
+
dayjs5.extend(minMax);
|
|
42603
|
+
dayjs5.extend(isSameOrBefore);
|
|
42604
|
+
dayjs5.extend(quarterOfYear);
|
|
42605
|
+
dayjs5.extend(weekOfYear);
|
|
42606
|
+
dayjs5.extend(isoWeek);
|
|
42529
42607
|
var DEFAULT_GROUP = "$default_group";
|
|
42530
42608
|
var BaseSeriesGenerator = class {
|
|
42531
42609
|
/**
|
|
@@ -43148,25 +43226,25 @@ var BaseSeriesGenerator = class {
|
|
|
43148
43226
|
format = "YYYY-MM";
|
|
43149
43227
|
}
|
|
43150
43228
|
if (singleData[this.catalogField]) {
|
|
43151
|
-
const formattedDate =
|
|
43229
|
+
const formattedDate = dayjs5(singleData[this.catalogField]).format(
|
|
43152
43230
|
format
|
|
43153
43231
|
);
|
|
43154
43232
|
singleData[this.catalogField] = formattedDate;
|
|
43155
43233
|
}
|
|
43156
43234
|
} else if (groupMode === "QUARTER") {
|
|
43157
43235
|
if (singleData[this.catalogField]) {
|
|
43158
|
-
const formattedDate = "".concat(
|
|
43236
|
+
const formattedDate = "".concat(dayjs5(
|
|
43159
43237
|
singleData[this.catalogField]
|
|
43160
|
-
).format("YYYY"), "-").concat(
|
|
43238
|
+
).format("YYYY"), "-").concat(dayjs5(
|
|
43161
43239
|
singleData[this.catalogField]
|
|
43162
43240
|
).quarter());
|
|
43163
43241
|
singleData[this.catalogField] = formattedDate;
|
|
43164
43242
|
}
|
|
43165
43243
|
} else if (groupMode === "YEARWEEK") {
|
|
43166
43244
|
if (singleData[this.catalogField]) {
|
|
43167
|
-
const formattedDate = "".concat(
|
|
43245
|
+
const formattedDate = "".concat(dayjs5(
|
|
43168
43246
|
singleData[this.catalogField]
|
|
43169
|
-
).format("YYYY"), "-").concat(
|
|
43247
|
+
).format("YYYY"), "-").concat(dayjs5(singleData[this.catalogField]).week());
|
|
43170
43248
|
singleData[this.catalogField] = formattedDate;
|
|
43171
43249
|
}
|
|
43172
43250
|
}
|
|
@@ -43188,7 +43266,7 @@ var BaseSeriesGenerator = class {
|
|
|
43188
43266
|
let sortedKeys = [];
|
|
43189
43267
|
if (groupMode === "DAY" || groupMode === "YEAR" || groupMode === "MONTH") {
|
|
43190
43268
|
sortedKeys = Array.from(dateMap.keys()).sort(
|
|
43191
|
-
(a, b) =>
|
|
43269
|
+
(a, b) => dayjs5(a).diff(dayjs5(b))
|
|
43192
43270
|
);
|
|
43193
43271
|
} else if (groupMode === "QUARTER" || groupMode === "YEARWEEK") {
|
|
43194
43272
|
sortedKeys = Array.from(dateMap.keys()).sort((a, b) => {
|
|
@@ -43222,11 +43300,11 @@ var BaseSeriesGenerator = class {
|
|
|
43222
43300
|
const dates = [];
|
|
43223
43301
|
Object.keys(data).forEach((key) => {
|
|
43224
43302
|
data[key].forEach((_val, date) => {
|
|
43225
|
-
dates.push(
|
|
43303
|
+
dates.push(dayjs5(date));
|
|
43226
43304
|
});
|
|
43227
43305
|
});
|
|
43228
|
-
const maxDate =
|
|
43229
|
-
const minDate =
|
|
43306
|
+
const maxDate = dayjs5.max(dates);
|
|
43307
|
+
const minDate = dayjs5.min(dates);
|
|
43230
43308
|
if (groupMode === "DAY") {
|
|
43231
43309
|
let currentDate = minDate;
|
|
43232
43310
|
const endDate = maxDate;
|
|
@@ -43308,7 +43386,7 @@ var BaseSeriesGenerator = class {
|
|
|
43308
43386
|
const [minYear] = minYearWeek.split("-");
|
|
43309
43387
|
const [maxYear] = maxYearWeek.split("-");
|
|
43310
43388
|
for (let year = parseInt(minYear, 10); year <= parseInt(maxYear, 10); year++) {
|
|
43311
|
-
const numWeeks =
|
|
43389
|
+
const numWeeks = dayjs5("".concat(year, "-12-31")).isoWeek();
|
|
43312
43390
|
for (let week = 1; week <= numWeeks; week++) {
|
|
43313
43391
|
const yearWeek = "".concat(year, "-").concat(week);
|
|
43314
43392
|
Object.keys(data).forEach((key) => {
|
|
@@ -48593,9 +48671,9 @@ var FilterPortletController = class extends PortletPartController {
|
|
|
48593
48671
|
};
|
|
48594
48672
|
|
|
48595
48673
|
// src/controller/control/data-view/data-view.controller.ts
|
|
48596
|
-
import { RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
48597
|
-
import { isNil as isNil29 } from "ramda";
|
|
48598
|
-
import { isBoolean } from "qx-util";
|
|
48674
|
+
import { RuntimeModelError as RuntimeModelError56, isElementSame as isElementSame2 } from "@ibiz-template/core";
|
|
48675
|
+
import { clone as clone34, isNil as isNil29 } from "ramda";
|
|
48676
|
+
import { createUUID as createUUID11, isBoolean } from "qx-util";
|
|
48599
48677
|
|
|
48600
48678
|
// src/controller/control/data-view/data-view.service.ts
|
|
48601
48679
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -48917,13 +48995,40 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48917
48995
|
detail.appId
|
|
48918
48996
|
);
|
|
48919
48997
|
}
|
|
48998
|
+
/**
|
|
48999
|
+
* @description 执行多数据分组
|
|
49000
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
49001
|
+
* @param {IParams} [_params] 额外参数
|
|
49002
|
+
* @returns {*} {Promise<void>}
|
|
49003
|
+
* @memberof DataViewControlController
|
|
49004
|
+
*/
|
|
49005
|
+
async execGroup(arg, _params) {
|
|
49006
|
+
const group = arg[0];
|
|
49007
|
+
this.model = clone34(this.model);
|
|
49008
|
+
this.model.groupMode = "AUTO";
|
|
49009
|
+
if (!group || !group.groupFieldId) {
|
|
49010
|
+
this.state.groups = [];
|
|
49011
|
+
this.model.groupMode = "NONE";
|
|
49012
|
+
this.state.enableGroup = false;
|
|
49013
|
+
this.model.groupCodeListId = void 0;
|
|
49014
|
+
this.model.groupAppDEFieldId = void 0;
|
|
49015
|
+
this.groupDateFormat = [];
|
|
49016
|
+
} else if (group.groupFieldId !== this.model.groupAppDEFieldId || group.dateFormat && !isElementSame2(group.dateFormat, this.groupDateFormat)) {
|
|
49017
|
+
this.state.enableGroup = true;
|
|
49018
|
+
this.model.groupAppDEFieldId = group.groupFieldId;
|
|
49019
|
+
this.model.groupCodeListId = group.groupCodeListId;
|
|
49020
|
+
this.groupDateFormat = group.dateFormat || [];
|
|
49021
|
+
await this.handleDataGroup();
|
|
49022
|
+
}
|
|
49023
|
+
}
|
|
48920
49024
|
/**
|
|
48921
49025
|
* 处理数据分组
|
|
48922
49026
|
*
|
|
48923
49027
|
* @memberof DataViewControlController
|
|
48924
49028
|
*/
|
|
48925
49029
|
async handleDataGroup() {
|
|
48926
|
-
const {
|
|
49030
|
+
const { groupMode, groupAppDEFieldId } = this.model;
|
|
49031
|
+
const { enableGroup } = this.state;
|
|
48927
49032
|
if (enableGroup && groupMode) {
|
|
48928
49033
|
if (!groupAppDEFieldId) {
|
|
48929
49034
|
throw new RuntimeModelError56(
|
|
@@ -48946,6 +49051,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48946
49051
|
* @memberof DataViewControlController
|
|
48947
49052
|
*/
|
|
48948
49053
|
async handleAutoGroup() {
|
|
49054
|
+
var _a3;
|
|
48949
49055
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
48950
49056
|
let codeList = [];
|
|
48951
49057
|
if (groupCodeListId) {
|
|
@@ -48958,16 +49064,28 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48958
49064
|
}
|
|
48959
49065
|
if (groupAppDEFieldId) {
|
|
48960
49066
|
const { items } = this.state;
|
|
49067
|
+
const deRss = (_a3 = this.dataEntity.minorAppDERSs) == null ? void 0 : _a3.find(
|
|
49068
|
+
(rss) => rss.parentAppDEFieldId === groupAppDEFieldId
|
|
49069
|
+
);
|
|
49070
|
+
const textDEFieldId = deRss == null ? void 0 : deRss.parentTextAppDEFieldId;
|
|
49071
|
+
const dateFormat = this.groupDateFormat[0];
|
|
48961
49072
|
const groupMap = /* @__PURE__ */ new Map();
|
|
49073
|
+
const unclassified = {
|
|
49074
|
+
key: createUUID11(),
|
|
49075
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
49076
|
+
children: []
|
|
49077
|
+
};
|
|
48962
49078
|
items.forEach((item) => {
|
|
48963
|
-
|
|
49079
|
+
let groupVal = item[textDEFieldId || groupAppDEFieldId];
|
|
49080
|
+
if (dateFormat)
|
|
49081
|
+
groupVal = formatDate(groupVal, dateFormat);
|
|
48964
49082
|
if (isNil29(groupVal)) {
|
|
49083
|
+
unclassified.children.push(item);
|
|
48965
49084
|
return;
|
|
48966
49085
|
}
|
|
48967
|
-
|
|
48968
|
-
|
|
48969
|
-
|
|
48970
|
-
groupMap.get(groupVal).push(item);
|
|
49086
|
+
const children = groupMap.get(groupVal) || [];
|
|
49087
|
+
children.push(item);
|
|
49088
|
+
groupMap.set(groupVal, children);
|
|
48971
49089
|
});
|
|
48972
49090
|
const groups = [];
|
|
48973
49091
|
groupMap.forEach((value, key) => {
|
|
@@ -48978,6 +49096,8 @@ var DataViewControlController = class extends MDControlController {
|
|
|
48978
49096
|
children: [...value]
|
|
48979
49097
|
});
|
|
48980
49098
|
});
|
|
49099
|
+
if (unclassified.children.length)
|
|
49100
|
+
groups.push(unclassified);
|
|
48981
49101
|
this.state.groups = groups;
|
|
48982
49102
|
}
|
|
48983
49103
|
}
|
|
@@ -50027,7 +50147,7 @@ import {
|
|
|
50027
50147
|
RuntimeError as RuntimeError51
|
|
50028
50148
|
} from "@ibiz-template/core";
|
|
50029
50149
|
import { isBoolean as isBoolean2 } from "qx-util";
|
|
50030
|
-
import { clone as
|
|
50150
|
+
import { clone as clone35 } from "ramda";
|
|
50031
50151
|
var FormController = class extends ControlController {
|
|
50032
50152
|
constructor() {
|
|
50033
50153
|
super(...arguments);
|
|
@@ -50301,7 +50421,7 @@ var FormController = class extends ControlController {
|
|
|
50301
50421
|
* @return {*} {Promise<void>}
|
|
50302
50422
|
*/
|
|
50303
50423
|
async checkIgnoreInput(data) {
|
|
50304
|
-
const formData =
|
|
50424
|
+
const formData = clone35(data);
|
|
50305
50425
|
const formDataUIMap = formData.$dataUIMap;
|
|
50306
50426
|
const isCreate = formData.srfuf === 0 /* CREATE */;
|
|
50307
50427
|
this.formItems.forEach((formItem) => {
|
|
@@ -50501,7 +50621,7 @@ import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
|
|
|
50501
50621
|
|
|
50502
50622
|
// src/controller/control/form/form/form.service.ts
|
|
50503
50623
|
import { recursiveIterate as recursiveIterate6 } from "@ibiz-template/core";
|
|
50504
|
-
import { clone as
|
|
50624
|
+
import { clone as clone36, isNil as isNil30, isNotNil as isNotNil3 } from "ramda";
|
|
50505
50625
|
var FormService = class extends ControlService {
|
|
50506
50626
|
constructor() {
|
|
50507
50627
|
super(...arguments);
|
|
@@ -50563,7 +50683,7 @@ var FormService = class extends ControlService {
|
|
|
50563
50683
|
* @return {*} {IParams}
|
|
50564
50684
|
*/
|
|
50565
50685
|
getLoadParams(params) {
|
|
50566
|
-
const copyArgs =
|
|
50686
|
+
const copyArgs = clone36(params);
|
|
50567
50687
|
const defaultData = {};
|
|
50568
50688
|
if (copyArgs.srfdefdata) {
|
|
50569
50689
|
Object.assign(defaultData, copyArgs.srfdefdata);
|
|
@@ -50613,6 +50733,9 @@ var FormService = class extends ControlService {
|
|
|
50613
50733
|
getFilteredData(data) {
|
|
50614
50734
|
const _data = data instanceof ControlVO ? data.getOrigin() : data;
|
|
50615
50735
|
const tempData = {};
|
|
50736
|
+
if (data.srfexdata && Object.keys(data.srfexdata).length > 0) {
|
|
50737
|
+
Object.assign(tempData, { ...data.srfexdata });
|
|
50738
|
+
}
|
|
50616
50739
|
let tempDataUIMap = this.dataUIMap;
|
|
50617
50740
|
if (data.$dataUIMap && data.$dataUIMap.size > 0) {
|
|
50618
50741
|
tempDataUIMap = data.$dataUIMap;
|
|
@@ -51628,7 +51751,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
51628
51751
|
|
|
51629
51752
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
51630
51753
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
51631
|
-
import { createUUID as
|
|
51754
|
+
import { createUUID as createUUID12, notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
51632
51755
|
|
|
51633
51756
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
51634
51757
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -51666,6 +51789,12 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51666
51789
|
* @memberof FormDRUIPartController
|
|
51667
51790
|
*/
|
|
51668
51791
|
this.isNewData = false;
|
|
51792
|
+
/**
|
|
51793
|
+
* @description 是否同步子界面数据服务(处理子应用同实体表单合并关系界面)
|
|
51794
|
+
* @type {boolean}
|
|
51795
|
+
* @memberof FormDRUIPartController
|
|
51796
|
+
*/
|
|
51797
|
+
this.isNeedSyncEmbed = false;
|
|
51669
51798
|
}
|
|
51670
51799
|
createState() {
|
|
51671
51800
|
var _a3;
|
|
@@ -51690,6 +51819,17 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51690
51819
|
if (this.model.paramItem) {
|
|
51691
51820
|
this.paramItem = this.model.paramItem;
|
|
51692
51821
|
}
|
|
51822
|
+
this.isNeedSyncEmbed = this.model.appId !== ibiz.env.appId && !!this.model.needSave;
|
|
51823
|
+
const embedView = await ibiz.hub.getAppView(this.model.appViewId);
|
|
51824
|
+
const app = ibiz.hub.getApp(embedView.appId);
|
|
51825
|
+
const tempContext = this.context.clone();
|
|
51826
|
+
tempContext.srfappid = embedView.appId;
|
|
51827
|
+
if (embedView.appDataEntityId) {
|
|
51828
|
+
this.embedDataService = await app.deService.getService(
|
|
51829
|
+
tempContext,
|
|
51830
|
+
embedView.appDataEntityId
|
|
51831
|
+
);
|
|
51832
|
+
}
|
|
51693
51833
|
}
|
|
51694
51834
|
/**
|
|
51695
51835
|
* @description 表单数据变更通知(由表单控制器调用)
|
|
@@ -51700,6 +51840,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51700
51840
|
async dataChangeNotify(names) {
|
|
51701
51841
|
await super.dataChangeNotify(names);
|
|
51702
51842
|
if (isOverlap2(this.refreshItems, names)) {
|
|
51843
|
+
await this.SyncDataToEmbedService();
|
|
51703
51844
|
this.calcViewParams();
|
|
51704
51845
|
}
|
|
51705
51846
|
}
|
|
@@ -51716,9 +51857,25 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51716
51857
|
this.state.showMask = this.isNewData;
|
|
51717
51858
|
}
|
|
51718
51859
|
if (state === "LOAD" /* LOAD */ || state === "DRAFT" /* DRAFT */ || state === "SAVE" /* SAVE */) {
|
|
51860
|
+
await this.SyncDataToEmbedService();
|
|
51719
51861
|
this.calcViewParams();
|
|
51720
51862
|
}
|
|
51721
51863
|
}
|
|
51864
|
+
/**
|
|
51865
|
+
* @description 同步当前表单数据至子界面数据服务
|
|
51866
|
+
* @returns {*} {Promise<void>}
|
|
51867
|
+
* @memberof FormDRUIPartController
|
|
51868
|
+
*/
|
|
51869
|
+
async SyncDataToEmbedService() {
|
|
51870
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
51871
|
+
const tempContext = this.context.clone();
|
|
51872
|
+
tempContext.srfappid = this.model.appId;
|
|
51873
|
+
const originData = this.form.state.data.$origin;
|
|
51874
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
51875
|
+
const syncAction = res.data ? "updateTemp" : "createTemp";
|
|
51876
|
+
await this.embedDataService[syncAction](tempContext, originData);
|
|
51877
|
+
}
|
|
51878
|
+
}
|
|
51722
51879
|
/**
|
|
51723
51880
|
* @description 计算视图上下文和视图参数, 调用该方法一定会刷新视图。
|
|
51724
51881
|
* @returns {*} {void}
|
|
@@ -51726,6 +51883,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51726
51883
|
*/
|
|
51727
51884
|
calcViewParams() {
|
|
51728
51885
|
let newContext = this.form.context.clone();
|
|
51886
|
+
newContext.srfignorechange = this.isNeedSyncEmbed;
|
|
51729
51887
|
const navContexts = this.model.navigateContexts;
|
|
51730
51888
|
if (notNilEmpty10(navContexts)) {
|
|
51731
51889
|
newContext = Object.assign(
|
|
@@ -51745,7 +51903,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51745
51903
|
this.form.context
|
|
51746
51904
|
);
|
|
51747
51905
|
if (!this.state.viewComponentKey) {
|
|
51748
|
-
this.state.viewComponentKey =
|
|
51906
|
+
this.state.viewComponentKey = createUUID12();
|
|
51749
51907
|
this.navContext = newContext;
|
|
51750
51908
|
this.navParams = newParams;
|
|
51751
51909
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -51771,7 +51929,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51771
51929
|
this.embedView.call("Load" /* LOAD */);
|
|
51772
51930
|
}
|
|
51773
51931
|
});
|
|
51774
|
-
this.embedView.evt.on("onDataChange", (event) => {
|
|
51932
|
+
this.embedView.evt.on("onDataChange", async (event) => {
|
|
51775
51933
|
if (["LOAD", "LOADDRAFT"].includes(event.actionType)) {
|
|
51776
51934
|
return;
|
|
51777
51935
|
}
|
|
@@ -51784,6 +51942,14 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51784
51942
|
this.model.deformItemUpdateId
|
|
51785
51943
|
);
|
|
51786
51944
|
}
|
|
51945
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
51946
|
+
const tempContext = this.context.clone();
|
|
51947
|
+
tempContext.srfappid = this.model.appId;
|
|
51948
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
51949
|
+
const childData = res.data || {};
|
|
51950
|
+
const exData = this.form.state.data.srfexdata || {};
|
|
51951
|
+
this.form.state.data.srfexdata = Object.assign(exData, childData);
|
|
51952
|
+
}
|
|
51787
51953
|
});
|
|
51788
51954
|
}
|
|
51789
51955
|
/**
|
|
@@ -51827,7 +51993,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51827
51993
|
};
|
|
51828
51994
|
|
|
51829
51995
|
// src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
|
|
51830
|
-
import { clone as
|
|
51996
|
+
import { clone as clone37 } from "ramda";
|
|
51831
51997
|
|
|
51832
51998
|
// src/controller/control/form/form-detail/form-group-panel/form-group-panel.state.ts
|
|
51833
51999
|
var FormGroupPanelState = class extends FormDetailState {
|
|
@@ -51935,7 +52101,7 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
51935
52101
|
*/
|
|
51936
52102
|
async onActionClick(detail, event, args) {
|
|
51937
52103
|
const actionId = detail.uiactionId;
|
|
51938
|
-
const tempParams =
|
|
52104
|
+
const tempParams = clone37(this.form.params);
|
|
51939
52105
|
if (args) {
|
|
51940
52106
|
Object.assign(tempParams, args);
|
|
51941
52107
|
}
|
|
@@ -52064,7 +52230,8 @@ var FormItemController = class extends FormDetailController {
|
|
|
52064
52230
|
* @type {unknown}
|
|
52065
52231
|
*/
|
|
52066
52232
|
get value() {
|
|
52067
|
-
|
|
52233
|
+
var _a3;
|
|
52234
|
+
return (_a3 = this.data) == null ? void 0 : _a3[this.name];
|
|
52068
52235
|
}
|
|
52069
52236
|
/**
|
|
52070
52237
|
* 值项
|
|
@@ -52787,7 +52954,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
52787
52954
|
|
|
52788
52955
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
52789
52956
|
import { RuntimeError as RuntimeError53, RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
52790
|
-
import { createUUID as
|
|
52957
|
+
import { createUUID as createUUID13 } from "qx-util";
|
|
52791
52958
|
|
|
52792
52959
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
52793
52960
|
var FormMDCtrlFormState = class extends FormMDCtrlState {
|
|
@@ -52991,7 +53158,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
52991
53158
|
this.state.items = [];
|
|
52992
53159
|
}
|
|
52993
53160
|
const item = {
|
|
52994
|
-
id:
|
|
53161
|
+
id: createUUID13(),
|
|
52995
53162
|
context,
|
|
52996
53163
|
params
|
|
52997
53164
|
};
|
|
@@ -53050,7 +53217,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
53050
53217
|
|
|
53051
53218
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
53052
53219
|
import { ModelError as ModelError26 } from "@ibiz-template/core";
|
|
53053
|
-
import { clone as
|
|
53220
|
+
import { clone as clone38 } from "ramda";
|
|
53054
53221
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
53055
53222
|
constructor() {
|
|
53056
53223
|
super(...arguments);
|
|
@@ -53155,7 +53322,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
53155
53322
|
copyFields.forEach((key) => {
|
|
53156
53323
|
tempForm[key] = this.form.model[key];
|
|
53157
53324
|
});
|
|
53158
|
-
this.repeatedForm =
|
|
53325
|
+
this.repeatedForm = clone38(tempForm);
|
|
53159
53326
|
}
|
|
53160
53327
|
/**
|
|
53161
53328
|
* @description 设置重复器控制器
|
|
@@ -53633,13 +53800,13 @@ var FormButtonListController = class extends FormDetailController {
|
|
|
53633
53800
|
import {
|
|
53634
53801
|
awaitTimeout,
|
|
53635
53802
|
IBizContext as IBizContext7,
|
|
53636
|
-
isElementSame as
|
|
53803
|
+
isElementSame as isElementSame3,
|
|
53637
53804
|
mergeInLeft as mergeInLeft3,
|
|
53638
53805
|
RuntimeError as RuntimeError54
|
|
53639
53806
|
} from "@ibiz-template/core";
|
|
53640
53807
|
import { debounce } from "lodash-es";
|
|
53641
|
-
import { createUUID as
|
|
53642
|
-
import { clone as
|
|
53808
|
+
import { createUUID as createUUID14 } from "qx-util";
|
|
53809
|
+
import { clone as clone39, isNil as isNil31 } from "ramda";
|
|
53643
53810
|
|
|
53644
53811
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
53645
53812
|
import {
|
|
@@ -54061,8 +54228,8 @@ var EditFormController = class extends FormController {
|
|
|
54061
54228
|
* @return {*} {Promise<IData>}
|
|
54062
54229
|
*/
|
|
54063
54230
|
async copy() {
|
|
54064
|
-
const context =
|
|
54065
|
-
const queryParams =
|
|
54231
|
+
const context = clone39(this.context);
|
|
54232
|
+
const queryParams = clone39(this.params);
|
|
54066
54233
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
54067
54234
|
this.model.appDataEntityId,
|
|
54068
54235
|
this.model.appId
|
|
@@ -54091,7 +54258,7 @@ var EditFormController = class extends FormController {
|
|
|
54091
54258
|
await this.endLoading();
|
|
54092
54259
|
}
|
|
54093
54260
|
res.data.srfkey = void 0;
|
|
54094
|
-
res.data.tempsrfkey =
|
|
54261
|
+
res.data.tempsrfkey = createUUID14();
|
|
54095
54262
|
this.state.modified = false;
|
|
54096
54263
|
this.state.data = res.data;
|
|
54097
54264
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -54119,7 +54286,7 @@ var EditFormController = class extends FormController {
|
|
|
54119
54286
|
return this.loadDraft();
|
|
54120
54287
|
}
|
|
54121
54288
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54122
|
-
const queryParams =
|
|
54289
|
+
const queryParams = clone39(params);
|
|
54123
54290
|
const silent = this.getSilent(args) === true;
|
|
54124
54291
|
let res;
|
|
54125
54292
|
try {
|
|
@@ -54224,7 +54391,9 @@ var EditFormController = class extends FormController {
|
|
|
54224
54391
|
)
|
|
54225
54392
|
});
|
|
54226
54393
|
}
|
|
54227
|
-
this.
|
|
54394
|
+
if (!this.context.srfignorechange) {
|
|
54395
|
+
this.emitDEDataChange(isCreate ? "create" : "update", res.data);
|
|
54396
|
+
}
|
|
54228
54397
|
return this.data;
|
|
54229
54398
|
}
|
|
54230
54399
|
/**
|
|
@@ -54275,7 +54444,9 @@ var EditFormController = class extends FormController {
|
|
|
54275
54444
|
}
|
|
54276
54445
|
ok = res.ok;
|
|
54277
54446
|
}
|
|
54278
|
-
|
|
54447
|
+
if (!this.context.srfignorechange) {
|
|
54448
|
+
this.emitDEDataChange("remove", this.data);
|
|
54449
|
+
}
|
|
54279
54450
|
this.state.data = new ControlVO();
|
|
54280
54451
|
this.state.modified = false;
|
|
54281
54452
|
await this.evt.emit("onRemoveSuccess", { args: this.data });
|
|
@@ -54388,8 +54559,10 @@ var EditFormController = class extends FormController {
|
|
|
54388
54559
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54389
54560
|
try {
|
|
54390
54561
|
await this.service.wfStart(context, params, this.data);
|
|
54391
|
-
|
|
54392
|
-
|
|
54562
|
+
if (!this.context.srfignorechange) {
|
|
54563
|
+
this.emitDEDataChange("update", this.data);
|
|
54564
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
54565
|
+
}
|
|
54393
54566
|
} catch (error) {
|
|
54394
54567
|
this.actionNotification("WFSTARTERROR", {
|
|
54395
54568
|
error
|
|
@@ -54426,8 +54599,10 @@ var EditFormController = class extends FormController {
|
|
|
54426
54599
|
const { context, params } = this.handlerAbilityParams(args);
|
|
54427
54600
|
try {
|
|
54428
54601
|
await this.service.wfSubmit(context, params, this.data);
|
|
54429
|
-
|
|
54430
|
-
|
|
54602
|
+
if (!this.context.srfignorechange) {
|
|
54603
|
+
this.emitDEDataChange("update", this.data);
|
|
54604
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
54605
|
+
}
|
|
54431
54606
|
} catch (error) {
|
|
54432
54607
|
this.actionNotification("WFSUBMITERROR", {
|
|
54433
54608
|
error
|
|
@@ -54519,7 +54694,7 @@ var EditFormController = class extends FormController {
|
|
|
54519
54694
|
const diffData = {};
|
|
54520
54695
|
Object.keys(data).forEach((key) => {
|
|
54521
54696
|
if (Array.isArray(data[key])) {
|
|
54522
|
-
if (!
|
|
54697
|
+
if (!isElementSame3(data[key], this.oldData[key])) {
|
|
54523
54698
|
diffData[key] = data[key];
|
|
54524
54699
|
}
|
|
54525
54700
|
} else if (data[key] !== this.oldData[key] || key === data.srfkeyfield) {
|
|
@@ -54970,8 +55145,8 @@ import {
|
|
|
54970
55145
|
mergeDefaultInLeft as mergeDefaultInLeft2,
|
|
54971
55146
|
debounceAndAsyncMerge as debounceAndAsyncMerge2
|
|
54972
55147
|
} from "@ibiz-template/core";
|
|
54973
|
-
import { clone as
|
|
54974
|
-
import
|
|
55148
|
+
import { clone as clone41, isNil as isNil32 } from "ramda";
|
|
55149
|
+
import dayjs6 from "dayjs";
|
|
54975
55150
|
|
|
54976
55151
|
// src/controller/control/grid/grid/grid.service.ts
|
|
54977
55152
|
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
@@ -55141,7 +55316,7 @@ async function calcColumnModelBySchema(json, c) {
|
|
|
55141
55316
|
}
|
|
55142
55317
|
|
|
55143
55318
|
// src/controller/control/grid/grid/auto-grid.util.ts
|
|
55144
|
-
import { clone as
|
|
55319
|
+
import { clone as clone40 } from "ramda";
|
|
55145
55320
|
import { mergeDefaultInLeft } from "@ibiz-template/core";
|
|
55146
55321
|
var TypeToDataType2 = {
|
|
55147
55322
|
string: 25,
|
|
@@ -55194,7 +55369,7 @@ function getEditorModel(item, appId2, enableCond, isSingleSelect = false) {
|
|
|
55194
55369
|
type = "dropdown";
|
|
55195
55370
|
if (enableCond === 0)
|
|
55196
55371
|
type = "span";
|
|
55197
|
-
const model = Object.assign(
|
|
55372
|
+
const model = Object.assign(clone40(TypeToEditor[type]), {
|
|
55198
55373
|
appId: appId2
|
|
55199
55374
|
});
|
|
55200
55375
|
if (type === "dropdown" && isSingleSelect)
|
|
@@ -55345,7 +55520,7 @@ async function initModelByEntitySchema(c) {
|
|
|
55345
55520
|
if (!json)
|
|
55346
55521
|
return;
|
|
55347
55522
|
const { degridColumns, degridDataItems, degridEditItems, degridEditItemVRs } = await calcColumnModelBySchema2(json, c);
|
|
55348
|
-
c.model =
|
|
55523
|
+
c.model = clone40(c.model);
|
|
55349
55524
|
const uaColumns = ((_a3 = c.model.degridColumns) == null ? void 0 : _a3.filter(
|
|
55350
55525
|
(column) => column.columnType === "UAGRIDCOLUMN"
|
|
55351
55526
|
)) || [];
|
|
@@ -55392,7 +55567,7 @@ async function switchRowEditDynamic(c, row, editable, _isSave = true) {
|
|
|
55392
55567
|
await switchRowEditDynamic(c, editingRow);
|
|
55393
55568
|
}
|
|
55394
55569
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
55395
|
-
row.cacheData =
|
|
55570
|
+
row.cacheData = clone40(row.data);
|
|
55396
55571
|
const defaultVal = c.calcDefaultValue(row.data, false);
|
|
55397
55572
|
Object.assign(row.data, defaultVal);
|
|
55398
55573
|
}
|
|
@@ -55553,8 +55728,8 @@ var GridController = class extends MDControlController {
|
|
|
55553
55728
|
if (!valueFormat) {
|
|
55554
55729
|
return strVal;
|
|
55555
55730
|
}
|
|
55556
|
-
if (isDate &&
|
|
55557
|
-
const formatVal =
|
|
55731
|
+
if (isDate && dayjs6(strVal, valueFormat, true).isValid()) {
|
|
55732
|
+
const formatVal = dayjs6(strVal).format(valueFormat);
|
|
55558
55733
|
return formatVal;
|
|
55559
55734
|
}
|
|
55560
55735
|
return ibiz.util.text.format(strVal, valueFormat);
|
|
@@ -55764,7 +55939,7 @@ var GridController = class extends MDControlController {
|
|
|
55764
55939
|
if (!this.addSchemaColumn) {
|
|
55765
55940
|
return;
|
|
55766
55941
|
}
|
|
55767
|
-
const tempParams =
|
|
55942
|
+
const tempParams = clone41(this.jsonSchemaParams);
|
|
55768
55943
|
Object.assign(tempParams, this.params);
|
|
55769
55944
|
const json = await getEntitySchema(
|
|
55770
55945
|
this.model.appDataEntityId,
|
|
@@ -55778,7 +55953,7 @@ var GridController = class extends MDControlController {
|
|
|
55778
55953
|
if (result && result.degridColumns.length > 0) {
|
|
55779
55954
|
const { degridColumns, degridDataItems } = result;
|
|
55780
55955
|
this.allCustomColumns = degridColumns;
|
|
55781
|
-
this.model =
|
|
55956
|
+
this.model = clone41(this.model);
|
|
55782
55957
|
this.model.degridColumns = [
|
|
55783
55958
|
...this.model.degridColumns || [],
|
|
55784
55959
|
...degridColumns
|
|
@@ -55865,9 +56040,8 @@ var GridController = class extends MDControlController {
|
|
|
55865
56040
|
* @return {*} {Promise<void>}
|
|
55866
56041
|
*/
|
|
55867
56042
|
async initGroup() {
|
|
55868
|
-
if (!this.
|
|
56043
|
+
if (!this.state.enableGroup)
|
|
55869
56044
|
return;
|
|
55870
|
-
}
|
|
55871
56045
|
const { groupAppDEFieldId, groupCodeListId, groupMode } = this.model;
|
|
55872
56046
|
this.groupFieldColumn = Object.values(this.fieldColumns).find(
|
|
55873
56047
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
@@ -55991,6 +56165,39 @@ var GridController = class extends MDControlController {
|
|
|
55991
56165
|
]);
|
|
55992
56166
|
}
|
|
55993
56167
|
}
|
|
56168
|
+
/**
|
|
56169
|
+
* @description 执行多数据分组
|
|
56170
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
56171
|
+
* @param {IParams} [_params] 额外参数
|
|
56172
|
+
* @returns {*} {Promise<void>}
|
|
56173
|
+
* @memberof MDControlController
|
|
56174
|
+
*/
|
|
56175
|
+
async execGroup(arg, _params) {
|
|
56176
|
+
var _a3;
|
|
56177
|
+
const group = arg[0];
|
|
56178
|
+
this.model = clone41(this.model);
|
|
56179
|
+
this.model.groupMode = "AUTO";
|
|
56180
|
+
const { columnStates } = this.state;
|
|
56181
|
+
const column = (_a3 = this.model.degridColumns) == null ? void 0 : _a3.find(
|
|
56182
|
+
(c) => {
|
|
56183
|
+
var _a4, _b2;
|
|
56184
|
+
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());
|
|
56185
|
+
}
|
|
56186
|
+
);
|
|
56187
|
+
const columnState = columnStates.find(
|
|
56188
|
+
(c) => !c.hidden && (column == null ? void 0 : column.codeName) === c.key
|
|
56189
|
+
);
|
|
56190
|
+
const groupAppDEFieldId = column == null ? void 0 : column.appDEFieldId;
|
|
56191
|
+
if (!groupAppDEFieldId || !columnState) {
|
|
56192
|
+
this.state.groups = [];
|
|
56193
|
+
this.state.enableGroup = false;
|
|
56194
|
+
} else if (groupAppDEFieldId !== this.model.groupAppDEFieldId) {
|
|
56195
|
+
this.state.enableGroup = true;
|
|
56196
|
+
this.model.groupAppDEFieldId = groupAppDEFieldId;
|
|
56197
|
+
await this.initGroup();
|
|
56198
|
+
this.calcGroupData(this.state.items);
|
|
56199
|
+
}
|
|
56200
|
+
}
|
|
55994
56201
|
/**
|
|
55995
56202
|
* 计算分组数据
|
|
55996
56203
|
* @author lxm
|
|
@@ -55999,7 +56206,8 @@ var GridController = class extends MDControlController {
|
|
|
55999
56206
|
* @param {IData[]} items
|
|
56000
56207
|
*/
|
|
56001
56208
|
calcGroupData(items) {
|
|
56002
|
-
const { enableGroup
|
|
56209
|
+
const { enableGroup } = this.state;
|
|
56210
|
+
const { groupMode } = this.model;
|
|
56003
56211
|
if (enableGroup) {
|
|
56004
56212
|
const groupMap = /* @__PURE__ */ new Map();
|
|
56005
56213
|
const codeListGroup = groupMode === "CODELIST";
|
|
@@ -56505,7 +56713,7 @@ var GridController = class extends MDControlController {
|
|
|
56505
56713
|
await this.switchRowEdit(editingRow, false, false);
|
|
56506
56714
|
}
|
|
56507
56715
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
56508
|
-
row.cacheData =
|
|
56716
|
+
row.cacheData = clone41(row.data);
|
|
56509
56717
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
56510
56718
|
Object.assign(row.data, defaultVal);
|
|
56511
56719
|
}
|
|
@@ -56679,7 +56887,7 @@ var GridController = class extends MDControlController {
|
|
|
56679
56887
|
* @Date: 2024-03-20 17:54:16
|
|
56680
56888
|
*/
|
|
56681
56889
|
formatExcelData(data, fields) {
|
|
56682
|
-
const cloneData =
|
|
56890
|
+
const cloneData = clone41(
|
|
56683
56891
|
data.map((item) => {
|
|
56684
56892
|
return fields.reduce((obj, key) => {
|
|
56685
56893
|
obj[key] = item[key];
|
|
@@ -57160,9 +57368,9 @@ import {
|
|
|
57160
57368
|
ModelError as ModelError27,
|
|
57161
57369
|
base64ToStr
|
|
57162
57370
|
} from "@ibiz-template/core";
|
|
57163
|
-
import
|
|
57371
|
+
import dayjs7 from "dayjs";
|
|
57164
57372
|
import { debounce as debounce2 } from "lodash-es";
|
|
57165
|
-
import { clone as
|
|
57373
|
+
import { clone as clone42, isNil as isNil33 } from "ramda";
|
|
57166
57374
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
57167
57375
|
var GridFieldColumnController = class extends GridColumnController {
|
|
57168
57376
|
constructor() {
|
|
@@ -57354,7 +57562,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
57354
57562
|
srfkey: value,
|
|
57355
57563
|
...wfContext
|
|
57356
57564
|
});
|
|
57357
|
-
const tempParams =
|
|
57565
|
+
const tempParams = clone42(this.params);
|
|
57358
57566
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
57359
57567
|
row.data,
|
|
57360
57568
|
tempContext,
|
|
@@ -57534,7 +57742,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
57534
57742
|
}
|
|
57535
57743
|
const isDate = DataTypes5.isDate(this.dataType);
|
|
57536
57744
|
if (isDate) {
|
|
57537
|
-
const formatVal =
|
|
57745
|
+
const formatVal = dayjs7(strVal).format(this.valueFormat);
|
|
57538
57746
|
if (formatVal !== "Invalid Date") {
|
|
57539
57747
|
return formatVal;
|
|
57540
57748
|
}
|
|
@@ -57912,7 +58120,9 @@ var GridGroupColumnController = class extends GridColumnController {
|
|
|
57912
58120
|
};
|
|
57913
58121
|
|
|
57914
58122
|
// src/controller/control/list/list.controller.ts
|
|
57915
|
-
import { isBoolean as isBoolean3 } from "qx-util";
|
|
58123
|
+
import { createUUID as createUUID15, isBoolean as isBoolean3 } from "qx-util";
|
|
58124
|
+
import { clone as clone43, isNil as isNil34 } from "ramda";
|
|
58125
|
+
import { isElementSame as isElementSame4 } from "@ibiz-template/core";
|
|
57916
58126
|
|
|
57917
58127
|
// src/controller/control/list/list.service.ts
|
|
57918
58128
|
var ListService = class extends MDControlService {
|
|
@@ -58106,13 +58316,40 @@ var ListController = class extends MDControlController {
|
|
|
58106
58316
|
getAllData() {
|
|
58107
58317
|
return this.state.items;
|
|
58108
58318
|
}
|
|
58319
|
+
/**
|
|
58320
|
+
* @description 执行多数据分组
|
|
58321
|
+
* @param {IApiMDGroupParams[]} [arg] 分组参数集合(多层分组暂未支持)
|
|
58322
|
+
* @param {IParams} [_params]
|
|
58323
|
+
* @returns {*} {Promise<void>}
|
|
58324
|
+
* @memberof ListController
|
|
58325
|
+
*/
|
|
58326
|
+
async execGroup(arg, _params) {
|
|
58327
|
+
const group = arg[0];
|
|
58328
|
+
this.model = clone43(this.model);
|
|
58329
|
+
this.model.groupMode = "AUTO";
|
|
58330
|
+
if (!group || !group.groupFieldId) {
|
|
58331
|
+
this.state.groups = [];
|
|
58332
|
+
this.model.groupMode = "NONE";
|
|
58333
|
+
this.state.enableGroup = false;
|
|
58334
|
+
this.model.groupCodeListId = void 0;
|
|
58335
|
+
this.model.groupAppDEFieldId = void 0;
|
|
58336
|
+
this.groupDateFormat = [];
|
|
58337
|
+
} else if (group.groupFieldId !== this.model.groupAppDEFieldId || group.dateFormat && !isElementSame4(group.dateFormat, this.groupDateFormat)) {
|
|
58338
|
+
this.state.enableGroup = true;
|
|
58339
|
+
this.model.groupAppDEFieldId = group.groupFieldId;
|
|
58340
|
+
this.model.groupCodeListId = group.groupCodeListId;
|
|
58341
|
+
this.groupDateFormat = group.dateFormat || [];
|
|
58342
|
+
await this.handleDataGroup();
|
|
58343
|
+
}
|
|
58344
|
+
}
|
|
58109
58345
|
/**
|
|
58110
58346
|
* 处理数据分组
|
|
58111
58347
|
*
|
|
58112
58348
|
* @memberof DataViewControlController
|
|
58113
58349
|
*/
|
|
58114
58350
|
async handleDataGroup() {
|
|
58115
|
-
const {
|
|
58351
|
+
const { groupMode } = this.model;
|
|
58352
|
+
const { enableGroup } = this.state;
|
|
58116
58353
|
if (enableGroup && groupMode) {
|
|
58117
58354
|
if (groupMode === "AUTO") {
|
|
58118
58355
|
await this.handleAutoGroup();
|
|
@@ -58130,6 +58367,7 @@ var ListController = class extends MDControlController {
|
|
|
58130
58367
|
* @memberof DataViewControlController
|
|
58131
58368
|
*/
|
|
58132
58369
|
async handleAutoGroup() {
|
|
58370
|
+
var _a3;
|
|
58133
58371
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
58134
58372
|
let codeList = [];
|
|
58135
58373
|
if (groupCodeListId) {
|
|
@@ -58142,14 +58380,31 @@ var ListController = class extends MDControlController {
|
|
|
58142
58380
|
}
|
|
58143
58381
|
if (groupAppDEFieldId) {
|
|
58144
58382
|
const { items } = this.state;
|
|
58145
|
-
const
|
|
58383
|
+
const deRss = (_a3 = this.dataEntity.minorAppDERSs) == null ? void 0 : _a3.find(
|
|
58384
|
+
(rss) => rss.parentAppDEFieldId === groupAppDEFieldId
|
|
58385
|
+
);
|
|
58386
|
+
const textDEFieldId = deRss == null ? void 0 : deRss.parentTextAppDEFieldId;
|
|
58387
|
+
const dateFormat = this.groupDateFormat[0];
|
|
58388
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
58389
|
+
const unclassified = {
|
|
58390
|
+
key: createUUID15(),
|
|
58391
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58392
|
+
children: []
|
|
58393
|
+
};
|
|
58146
58394
|
items.forEach((item) => {
|
|
58147
|
-
|
|
58395
|
+
let groupVal = item[textDEFieldId || groupAppDEFieldId];
|
|
58396
|
+
if (dateFormat)
|
|
58397
|
+
groupVal = formatDate(groupVal, dateFormat);
|
|
58398
|
+
if (isNil34(groupVal)) {
|
|
58399
|
+
unclassified.children.push(item);
|
|
58400
|
+
return;
|
|
58401
|
+
}
|
|
58402
|
+
const children = groupMap.get(groupVal) || [];
|
|
58148
58403
|
children.push(item);
|
|
58149
|
-
|
|
58404
|
+
groupMap.set(groupVal, children);
|
|
58150
58405
|
});
|
|
58151
58406
|
const groups = [];
|
|
58152
|
-
|
|
58407
|
+
groupMap.forEach((value, key) => {
|
|
58153
58408
|
const codeListItem = codeList.find((x) => x.value === key);
|
|
58154
58409
|
groups.push({
|
|
58155
58410
|
caption: (codeListItem == null ? void 0 : codeListItem.text) || key,
|
|
@@ -58157,6 +58412,8 @@ var ListController = class extends MDControlController {
|
|
|
58157
58412
|
children: [...value]
|
|
58158
58413
|
});
|
|
58159
58414
|
});
|
|
58415
|
+
if (unclassified.children.length)
|
|
58416
|
+
groups.push(unclassified);
|
|
58160
58417
|
this.state.groups = groups;
|
|
58161
58418
|
}
|
|
58162
58419
|
}
|
|
@@ -58193,8 +58450,8 @@ var ListController = class extends MDControlController {
|
|
|
58193
58450
|
);
|
|
58194
58451
|
if (otherGroup.length > 0) {
|
|
58195
58452
|
groups.push({
|
|
58196
|
-
caption: "
|
|
58197
|
-
key: "
|
|
58453
|
+
caption: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58454
|
+
key: ibiz.i18n.t("runtime.controller.common.md.unclassified"),
|
|
58198
58455
|
children: [...otherGroup]
|
|
58199
58456
|
});
|
|
58200
58457
|
}
|
|
@@ -59050,7 +59307,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
59050
59307
|
};
|
|
59051
59308
|
|
|
59052
59309
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
59053
|
-
import { createUUID as
|
|
59310
|
+
import { createUUID as createUUID16 } from "qx-util";
|
|
59054
59311
|
var TabExpPanelController = class extends ControlController {
|
|
59055
59312
|
constructor() {
|
|
59056
59313
|
super(...arguments);
|
|
@@ -59289,7 +59546,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
59289
59546
|
}
|
|
59290
59547
|
refresh() {
|
|
59291
59548
|
const navViewMsg = this.getNavViewMsg(this.activeTabViewPanelModel);
|
|
59292
|
-
navViewMsg.key +=
|
|
59549
|
+
navViewMsg.key += createUUID16();
|
|
59293
59550
|
this.evt.emit("onNavViewChange", { navViewMsg });
|
|
59294
59551
|
}
|
|
59295
59552
|
};
|
|
@@ -59300,7 +59557,7 @@ import {
|
|
|
59300
59557
|
RuntimeModelError as RuntimeModelError67,
|
|
59301
59558
|
recursiveIterate as recursiveIterate11
|
|
59302
59559
|
} from "@ibiz-template/core";
|
|
59303
|
-
import { isNil as
|
|
59560
|
+
import { isNil as isNil35 } from "ramda";
|
|
59304
59561
|
import { isBoolean as isBoolean4 } from "qx-util";
|
|
59305
59562
|
|
|
59306
59563
|
// src/controller/control/tree/tree.service.ts
|
|
@@ -60718,7 +60975,7 @@ var TreeController = class extends MDControlController {
|
|
|
60718
60975
|
* @return {*} {void}
|
|
60719
60976
|
*/
|
|
60720
60977
|
onDEDataChange(msg) {
|
|
60721
|
-
if (!
|
|
60978
|
+
if (!isNil35(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
60722
60979
|
return;
|
|
60723
60980
|
}
|
|
60724
60981
|
if (msg.subtype === "OBJECTCREATED") {
|
|
@@ -61300,7 +61557,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
61300
61557
|
|
|
61301
61558
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
61302
61559
|
import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
61303
|
-
import { isNil as
|
|
61560
|
+
import { isNil as isNil36 } from "ramda";
|
|
61304
61561
|
|
|
61305
61562
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
61306
61563
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -61563,7 +61820,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61563
61820
|
const groupMap = /* @__PURE__ */ new Map();
|
|
61564
61821
|
items.forEach((item) => {
|
|
61565
61822
|
const groupVal = item[groupAppDEFieldId];
|
|
61566
|
-
if (
|
|
61823
|
+
if (isNil36(groupVal)) {
|
|
61567
61824
|
return;
|
|
61568
61825
|
}
|
|
61569
61826
|
if (!groupMap.has(groupVal)) {
|
|
@@ -61668,10 +61925,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61668
61925
|
|
|
61669
61926
|
// src/controller/control/kanban/kanban.controller.ts
|
|
61670
61927
|
import { RuntimeError as RuntimeError60, RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
61671
|
-
import { clone as
|
|
61928
|
+
import { clone as clone45, isNil as isNil37 } from "ramda";
|
|
61672
61929
|
|
|
61673
61930
|
// src/controller/control/kanban/kanban.service.ts
|
|
61674
|
-
import { clone as
|
|
61931
|
+
import { clone as clone44 } from "ramda";
|
|
61675
61932
|
var KanbanService = class extends DataViewControlService {
|
|
61676
61933
|
/**
|
|
61677
61934
|
* 更新分组数据
|
|
@@ -61700,7 +61957,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
61700
61957
|
*/
|
|
61701
61958
|
async moveOrderItem(context, data, args) {
|
|
61702
61959
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
61703
|
-
const params =
|
|
61960
|
+
const params = clone44(data.getOrigin());
|
|
61704
61961
|
Object.assign(params, args);
|
|
61705
61962
|
let res = await this.exec(moveAction, context, params, {
|
|
61706
61963
|
srfupdateitem: true
|
|
@@ -61781,7 +62038,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61781
62038
|
const isAsc = minorSortDir === "ASC";
|
|
61782
62039
|
items.forEach((item) => {
|
|
61783
62040
|
const sortValue = item[sortField];
|
|
61784
|
-
if (
|
|
62041
|
+
if (isNil37(sortValue)) {
|
|
61785
62042
|
item[sortField] = 0;
|
|
61786
62043
|
} else {
|
|
61787
62044
|
const toNum = Number(sortValue);
|
|
@@ -62037,7 +62294,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
62037
62294
|
}
|
|
62038
62295
|
return moveData;
|
|
62039
62296
|
};
|
|
62040
|
-
const draggedItem =
|
|
62297
|
+
const draggedItem = clone45(fromGroup.children[fromIndex]);
|
|
62041
62298
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
62042
62299
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
62043
62300
|
if (info.from !== info.to) {
|
|
@@ -62312,7 +62569,7 @@ import {
|
|
|
62312
62569
|
awaitTimeout as awaitTimeout3,
|
|
62313
62570
|
recursiveIterate as recursiveIterate12
|
|
62314
62571
|
} from "@ibiz-template/core";
|
|
62315
|
-
import { clone as
|
|
62572
|
+
import { clone as clone46 } from "ramda";
|
|
62316
62573
|
|
|
62317
62574
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
62318
62575
|
var TreeGridExService = class extends TreeService {
|
|
@@ -62864,7 +63121,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
62864
63121
|
);
|
|
62865
63122
|
}
|
|
62866
63123
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
62867
|
-
row.cacheData =
|
|
63124
|
+
row.cacheData = clone46(row.data);
|
|
62868
63125
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
62869
63126
|
Object.assign(row.data, defaultVal);
|
|
62870
63127
|
}
|
|
@@ -63051,8 +63308,8 @@ import {
|
|
|
63051
63308
|
RuntimeError as RuntimeError62,
|
|
63052
63309
|
RuntimeModelError as RuntimeModelError71
|
|
63053
63310
|
} from "@ibiz-template/core";
|
|
63054
|
-
import { clone as
|
|
63055
|
-
import
|
|
63311
|
+
import { clone as clone47 } from "ramda";
|
|
63312
|
+
import dayjs8 from "dayjs";
|
|
63056
63313
|
var TreeGridExNodeColumnController = class {
|
|
63057
63314
|
/**
|
|
63058
63315
|
* @author lxm
|
|
@@ -63259,7 +63516,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
63259
63516
|
srfkey: value,
|
|
63260
63517
|
...wfContext
|
|
63261
63518
|
});
|
|
63262
|
-
const tempParams =
|
|
63519
|
+
const tempParams = clone47(this.params);
|
|
63263
63520
|
const { userParam } = this.nodeColumn;
|
|
63264
63521
|
if (userParam) {
|
|
63265
63522
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -63350,7 +63607,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
63350
63607
|
}
|
|
63351
63608
|
const isDate = DataTypes6.isDate(this.dataType);
|
|
63352
63609
|
if (isDate || this.fieldColumn.name === "createdate") {
|
|
63353
|
-
const formatVal =
|
|
63610
|
+
const formatVal = dayjs8(strVal).format(this.valueFormat);
|
|
63354
63611
|
if (formatVal !== "Invalid Date") {
|
|
63355
63612
|
return formatVal;
|
|
63356
63613
|
}
|
|
@@ -63741,7 +63998,7 @@ var TreeGridService = class extends GridService {
|
|
|
63741
63998
|
|
|
63742
63999
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
63743
64000
|
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
63744
|
-
import { createUUID as
|
|
64001
|
+
import { createUUID as createUUID17 } from "qx-util";
|
|
63745
64002
|
|
|
63746
64003
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
63747
64004
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -63828,7 +64085,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
63828
64085
|
*/
|
|
63829
64086
|
handlePanelItemParams(arg) {
|
|
63830
64087
|
const [{ parameterName }] = this.parameters;
|
|
63831
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
64088
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID17());
|
|
63832
64089
|
const item = {
|
|
63833
64090
|
id,
|
|
63834
64091
|
context: this.context.clone(),
|
|
@@ -65728,7 +65985,7 @@ var ThemeUtil = class {
|
|
|
65728
65985
|
* @memberof ThemeUtil
|
|
65729
65986
|
*/
|
|
65730
65987
|
async loadTheme(theme, type = "COLOR") {
|
|
65731
|
-
const data =
|
|
65988
|
+
const data = clone48(theme.themeParams || {});
|
|
65732
65989
|
const path2 = data["theme-package-path"] || theme.themeUrl;
|
|
65733
65990
|
delete data.appId;
|
|
65734
65991
|
delete data["theme-package-path"];
|
|
@@ -65914,7 +66171,7 @@ var ThemeUtil = class {
|
|
|
65914
66171
|
};
|
|
65915
66172
|
|
|
65916
66173
|
// src/utils/ui-domain/ui-domain.ts
|
|
65917
|
-
import { QXEvent as QXEvent9, createUUID as
|
|
66174
|
+
import { QXEvent as QXEvent9, createUUID as createUUID18 } from "qx-util";
|
|
65918
66175
|
|
|
65919
66176
|
// src/utils/ui-domain/transaction.ts
|
|
65920
66177
|
var Transaction = class {
|
|
@@ -66066,7 +66323,7 @@ var UIDomain = class {
|
|
|
66066
66323
|
if (id) {
|
|
66067
66324
|
this.id = id;
|
|
66068
66325
|
} else {
|
|
66069
|
-
this.id =
|
|
66326
|
+
this.id = createUUID18();
|
|
66070
66327
|
}
|
|
66071
66328
|
}
|
|
66072
66329
|
/**
|
|
@@ -66376,8 +66633,8 @@ var baseStyle = {
|
|
|
66376
66633
|
position: "fixed",
|
|
66377
66634
|
zIndex: "10000"
|
|
66378
66635
|
};
|
|
66379
|
-
function cloneElement(
|
|
66380
|
-
const element = getAnimationElement(
|
|
66636
|
+
function cloneElement(clone54, teleport = document.body, isRemoveChild = true) {
|
|
66637
|
+
const element = getAnimationElement(clone54);
|
|
66381
66638
|
if (element == null) {
|
|
66382
66639
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
66383
66640
|
}
|
|
@@ -66796,11 +67053,11 @@ function arrayContains(arr, val) {
|
|
|
66796
67053
|
});
|
|
66797
67054
|
}
|
|
66798
67055
|
function cloneObject(o) {
|
|
66799
|
-
var
|
|
67056
|
+
var clone54 = {};
|
|
66800
67057
|
for (var p in o) {
|
|
66801
|
-
|
|
67058
|
+
clone54[p] = o[p];
|
|
66802
67059
|
}
|
|
66803
|
-
return
|
|
67060
|
+
return clone54;
|
|
66804
67061
|
}
|
|
66805
67062
|
function replaceObjectProps(o1, o2) {
|
|
66806
67063
|
var o = cloneObject(o1);
|
|
@@ -68349,7 +68606,7 @@ var ShortCutUtil = class {
|
|
|
68349
68606
|
};
|
|
68350
68607
|
|
|
68351
68608
|
// src/utils/bi-report-util/bi-report-util.ts
|
|
68352
|
-
import { clone as
|
|
68609
|
+
import { clone as clone49 } from "ramda";
|
|
68353
68610
|
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
68354
68611
|
var BIReportUtil = class {
|
|
68355
68612
|
/**
|
|
@@ -68365,7 +68622,7 @@ var BIReportUtil = class {
|
|
|
68365
68622
|
async openDesignPage(context, params, data) {
|
|
68366
68623
|
if (!data.mode)
|
|
68367
68624
|
data.mode = "DATA";
|
|
68368
|
-
const tempContext =
|
|
68625
|
+
const tempContext = clone49(context);
|
|
68369
68626
|
let config = {};
|
|
68370
68627
|
if (data.mode === "DATA") {
|
|
68371
68628
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
@@ -68783,7 +69040,7 @@ var BIReportUtil = class {
|
|
|
68783
69040
|
|
|
68784
69041
|
// src/utils/record-nav-util/record-nav-util.ts
|
|
68785
69042
|
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
68786
|
-
import { createUUID as
|
|
69043
|
+
import { createUUID as createUUID19 } from "qx-util";
|
|
68787
69044
|
var RecordNavUtil = class {
|
|
68788
69045
|
constructor() {
|
|
68789
69046
|
/**
|
|
@@ -68826,7 +69083,7 @@ var RecordNavUtil = class {
|
|
|
68826
69083
|
* @param {IData} tempContext
|
|
68827
69084
|
*/
|
|
68828
69085
|
addTriggerLogic(viewId, data, tempContext) {
|
|
68829
|
-
const triggerLogicId = "".concat(viewId, ":").concat(
|
|
69086
|
+
const triggerLogicId = "".concat(viewId, ":").concat(createUUID19());
|
|
68830
69087
|
this.triggerLogicMap.set(triggerLogicId, data);
|
|
68831
69088
|
tempContext.srfnavlogicid = triggerLogicId;
|
|
68832
69089
|
}
|
|
@@ -69032,7 +69289,7 @@ var RecordNavUtil = class {
|
|
|
69032
69289
|
|
|
69033
69290
|
// src/utils/jsonschema-util/jsonschema-util.ts
|
|
69034
69291
|
import qs5 from "qs";
|
|
69035
|
-
import { clone as
|
|
69292
|
+
import { clone as clone50 } from "ramda";
|
|
69036
69293
|
var JsonSchemaUtil = class {
|
|
69037
69294
|
constructor() {
|
|
69038
69295
|
/**
|
|
@@ -69285,7 +69542,7 @@ var JsonSchemaUtil = class {
|
|
|
69285
69542
|
getMockEditor(context, item, valueOP) {
|
|
69286
69543
|
if (valueOP && this.excludeOPs.includes(valueOP))
|
|
69287
69544
|
return;
|
|
69288
|
-
const baseMockEditor =
|
|
69545
|
+
const baseMockEditor = clone50(this.DataTypeToEditor[item.type]);
|
|
69289
69546
|
if (!baseMockEditor)
|
|
69290
69547
|
return;
|
|
69291
69548
|
baseMockEditor.appId = context.srfappid;
|
|
@@ -73461,7 +73718,7 @@ async function getDeDataMajorField(data, context, appDataEntityId) {
|
|
|
73461
73718
|
|
|
73462
73719
|
// src/command/app/open-app-view/open-app-view.ts
|
|
73463
73720
|
import { ModelError as ModelError30, RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
73464
|
-
import { clone as
|
|
73721
|
+
import { clone as clone51 } from "ramda";
|
|
73465
73722
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
73466
73723
|
constructor() {
|
|
73467
73724
|
ibiz.commands.register(_OpenAppViewCommand.TAG, this.exec.bind(this));
|
|
@@ -73478,7 +73735,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
73478
73735
|
* @return {*} {(Promise<IModalData | void>)}
|
|
73479
73736
|
*/
|
|
73480
73737
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
73481
|
-
const context =
|
|
73738
|
+
const context = clone51(_context);
|
|
73482
73739
|
if (context.srfsimple) {
|
|
73483
73740
|
delete context.srfsimple;
|
|
73484
73741
|
}
|
|
@@ -74230,9 +74487,9 @@ import { QXEvent as QXEvent14 } from "qx-util";
|
|
|
74230
74487
|
|
|
74231
74488
|
// src/controller/notification/async-action.controller.ts
|
|
74232
74489
|
import { QXEvent as QXEvent12 } from "qx-util";
|
|
74233
|
-
import { clone as
|
|
74234
|
-
import { isNil as
|
|
74235
|
-
import
|
|
74490
|
+
import { clone as clone52 } from "ramda";
|
|
74491
|
+
import { isNil as isNil38, isNumber as isNumber4 } from "lodash-es";
|
|
74492
|
+
import dayjs9 from "dayjs";
|
|
74236
74493
|
var AsyncActionController = class {
|
|
74237
74494
|
constructor() {
|
|
74238
74495
|
this.evt = new QXEvent12();
|
|
@@ -74306,17 +74563,17 @@ var AsyncActionController = class {
|
|
|
74306
74563
|
];
|
|
74307
74564
|
dateFields.forEach((key) => {
|
|
74308
74565
|
if (isNumber4(data[key])) {
|
|
74309
|
-
data[key] =
|
|
74566
|
+
data[key] = dayjs9(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
74310
74567
|
}
|
|
74311
74568
|
});
|
|
74312
|
-
if (!
|
|
74569
|
+
if (!isNil38(data.actionresult)) {
|
|
74313
74570
|
try {
|
|
74314
74571
|
const json = JSON.parse(data.actionresult);
|
|
74315
74572
|
data.actionresult = json;
|
|
74316
74573
|
} catch (error) {
|
|
74317
74574
|
}
|
|
74318
74575
|
}
|
|
74319
|
-
if (!
|
|
74576
|
+
if (!isNil38(data.completionrate)) {
|
|
74320
74577
|
const num = Number(data.completionrate);
|
|
74321
74578
|
if (Number.isNaN(num)) {
|
|
74322
74579
|
data.completionrate = void 0;
|
|
@@ -74341,7 +74598,7 @@ var AsyncActionController = class {
|
|
|
74341
74598
|
} else {
|
|
74342
74599
|
this.noticeResult(action);
|
|
74343
74600
|
}
|
|
74344
|
-
this.evt.emit("add",
|
|
74601
|
+
this.evt.emit("add", clone52(action));
|
|
74345
74602
|
this.evt.emit("dataChange");
|
|
74346
74603
|
}
|
|
74347
74604
|
/**
|
|
@@ -74363,7 +74620,7 @@ var AsyncActionController = class {
|
|
|
74363
74620
|
}
|
|
74364
74621
|
this.noticeResult(action);
|
|
74365
74622
|
}
|
|
74366
|
-
this.evt.emit("change",
|
|
74623
|
+
this.evt.emit("change", clone52(action));
|
|
74367
74624
|
this.evt.emit("dataChange");
|
|
74368
74625
|
}
|
|
74369
74626
|
noticeResult(action) {
|
|
@@ -76016,7 +76273,7 @@ var ViewEngineBase = class {
|
|
|
76016
76273
|
|
|
76017
76274
|
// src/engine/md-view.engine.ts
|
|
76018
76275
|
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
76019
|
-
import { clone as
|
|
76276
|
+
import { clone as clone53 } from "ramda";
|
|
76020
76277
|
var MDViewEngine = class extends ViewEngineBase {
|
|
76021
76278
|
/**
|
|
76022
76279
|
* 多数据部件名称
|
|
@@ -76289,7 +76546,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
76289
76546
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
76290
76547
|
);
|
|
76291
76548
|
}
|
|
76292
|
-
const params =
|
|
76549
|
+
const params = clone53(this.view.params);
|
|
76293
76550
|
if (copyMode) {
|
|
76294
76551
|
params.srfcopymode = copyMode;
|
|
76295
76552
|
}
|
|
@@ -78316,7 +78573,8 @@ var en = {
|
|
|
78316
78573
|
noMoveDataCconfig: "No move data behavior config",
|
|
78317
78574
|
exportRequestFailed: "Export request failed",
|
|
78318
78575
|
changeGroupError: "Failed to switch the group",
|
|
78319
|
-
computeMoveMetaError: "Error in calculating target position and movement type"
|
|
78576
|
+
computeMoveMetaError: "Error in calculating target position and movement type",
|
|
78577
|
+
unclassified: "Unclassified"
|
|
78320
78578
|
},
|
|
78321
78579
|
editor: {
|
|
78322
78580
|
editorNoConfigured: "Editor type [{editorType}], code table not configured",
|
|
@@ -78523,6 +78781,11 @@ var en = {
|
|
|
78523
78781
|
saveError: "Failed to save custom theme",
|
|
78524
78782
|
resetSuccess: "Reset custom theme successfully",
|
|
78525
78783
|
resetError: "Reset custom theme failed"
|
|
78784
|
+
},
|
|
78785
|
+
util: {
|
|
78786
|
+
quarter: "Quarter",
|
|
78787
|
+
month: "Month",
|
|
78788
|
+
week: "Week"
|
|
78526
78789
|
}
|
|
78527
78790
|
}
|
|
78528
78791
|
},
|
|
@@ -78957,7 +79220,8 @@ var zhCn = {
|
|
|
78957
79220
|
noMoveDataCconfig: "\u65E0\u79FB\u52A8\u6570\u636E\u884C\u4E3A\u914D\u7F6E",
|
|
78958
79221
|
exportRequestFailed: "\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25",
|
|
78959
79222
|
changeGroupError: "\u5207\u6362\u5206\u7EC4\u5931\u8D25",
|
|
78960
|
-
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF"
|
|
79223
|
+
computeMoveMetaError: "\u8BA1\u7B97\u76EE\u6807\u4F4D\u7F6E\u548C\u79FB\u52A8\u7C7B\u578B\u53D1\u751F\u9519\u8BEF",
|
|
79224
|
+
unclassified: "\u672A\u5206\u7C7B"
|
|
78961
79225
|
},
|
|
78962
79226
|
editor: {
|
|
78963
79227
|
editorNoConfigured: "\u7F16\u8F91\u5668\u7C7B\u578B[{editorType}]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868",
|
|
@@ -79164,6 +79428,11 @@ var zhCn = {
|
|
|
79164
79428
|
saveError: "\u4FDD\u5B58\u81EA\u5B9A\u4E49\u4E3B\u9898\u5931\u8D25",
|
|
79165
79429
|
resetSuccess: "\u91CD\u7F6E\u81EA\u5B9A\u4E49\u4E3B\u9898\u6210\u529F",
|
|
79166
79430
|
resetError: "\u91CD\u7F6E\u81EA\u5B9A\u4E49\u4E3B\u9898\u5931\u8D25"
|
|
79431
|
+
},
|
|
79432
|
+
util: {
|
|
79433
|
+
quarter: "\u5B63\u5EA6",
|
|
79434
|
+
month: "\u6708",
|
|
79435
|
+
week: "\u5468"
|
|
79167
79436
|
}
|
|
79168
79437
|
}
|
|
79169
79438
|
},
|
|
@@ -79868,6 +80137,7 @@ export {
|
|
|
79868
80137
|
findEditItem,
|
|
79869
80138
|
findFieldById,
|
|
79870
80139
|
findModelChild,
|
|
80140
|
+
formatDate,
|
|
79871
80141
|
formatMultiData,
|
|
79872
80142
|
formatSeparator,
|
|
79873
80143
|
generateCacheKy,
|