@ibiz-template/runtime 0.6.18 → 0.7.1
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 +1033 -356
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +7 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +11 -0
- package/out/application.d.ts +7 -0
- package/out/application.d.ts.map +1 -1
- package/out/application.js +9 -0
- package/out/command/app/app-func/app-func.d.ts.map +1 -1
- package/out/command/app/app-func/app-func.js +1 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +3 -0
- package/out/controller/control/chart/chart.controller.d.ts +38 -0
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +183 -0
- package/out/controller/control/chart/generator/base-series-generator.js +1 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +4 -3
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.d.ts +2 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.js +2 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts +32 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +63 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts +12 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts.map +1 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.js +13 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +5 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +13 -10
- package/out/controller/control/search-bar/index.d.ts +3 -1
- package/out/controller/control/search-bar/index.d.ts.map +1 -1
- package/out/controller/control/search-bar/index.js +3 -1
- package/out/controller/control/search-bar/interface-util.d.ts +75 -0
- package/out/controller/control/search-bar/interface-util.d.ts.map +1 -0
- package/out/controller/control/search-bar/interface-util.js +274 -0
- package/out/controller/control/search-bar/search-bar-filter-items.controller.d.ts +1 -2
- package/out/controller/control/search-bar/search-bar-filter-items.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar-filter-items.controller.js +13 -10
- package/out/controller/control/search-bar/search-bar-filter-simple-items.controller.d.ts +37 -0
- package/out/controller/control/search-bar/search-bar-filter-simple-items.controller.d.ts.map +1 -0
- package/out/controller/control/search-bar/search-bar-filter-simple-items.controller.js +47 -0
- package/out/controller/control/search-bar/search-bar-filter.controller.d.ts +20 -5
- package/out/controller/control/search-bar/search-bar-filter.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar-filter.controller.js +13 -2
- package/out/controller/control/search-bar/search-bar.controller.d.ts +15 -2
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +80 -30
- package/out/controller/control/search-bar/util.d.ts +35 -0
- package/out/controller/control/search-bar/util.d.ts.map +1 -0
- package/out/controller/control/search-bar/util.js +45 -0
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.d.ts.map +1 -1
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.js +1 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +7 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-app-service/i-app-service.d.ts +7 -0
- package/out/interface/common/i-app-service/i-app-service.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-app-menu.controller.d.ts +8 -1
- package/out/interface/controller/controller/control/i-app-menu.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/tab-change.event.d.ts +13 -0
- package/out/interface/controller/event/argument/tab-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts +15 -1
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-chart.state.d.ts +28 -0
- package/out/interface/controller/state/control/i-chart.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-md-control.state.d.ts +4 -0
- package/out/interface/controller/state/control/i-md-control.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.d.ts +1 -1
- package/out/interface/controller/state/control/index.d.ts.map +1 -1
- package/out/interface/controller/state/control/index.js +1 -1
- package/out/interface/controller/state/control/search-bar/i-filter-node.d.ts +157 -0
- package/out/interface/controller/state/control/search-bar/i-filter-node.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-filter-node.js +1 -0
- package/out/interface/controller/state/control/search-bar/i-quick-search.d.ts +24 -0
- package/out/interface/controller/state/control/search-bar/i-quick-search.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-quick-search.js +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar-group.d.ts +89 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar-group.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar-group.js +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar.state.d.ts +78 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar.state.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar.state.js +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond-ex.d.ts +65 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond-ex.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond-ex.js +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond.d.ts +43 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/i-search-cond.js +1 -0
- package/out/interface/controller/state/control/search-bar/index.d.ts +7 -0
- package/out/interface/controller/state/control/search-bar/index.d.ts.map +1 -0
- package/out/interface/controller/state/control/search-bar/index.js +1 -0
- package/out/service/service/code-list/code-list.service.d.ts +14 -0
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +39 -0
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +3 -0
- package/out/service/service/counter/counter.service.d.ts.map +1 -1
- package/out/service/service/counter/counter.service.js +5 -1
- package/out/service/utils/app-counter/app-counter.js +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +81 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +127 -2
- package/package.json +2 -2
- package/out/controller/control/search-bar/use-searchcond.d.ts +0 -33
- package/out/controller/control/search-bar/use-searchcond.d.ts.map +0 -1
- package/out/controller/control/search-bar/use-searchcond.js +0 -117
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +0 -224
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +0 -1
- /package/out/interface/controller/{state/control/i-search-bar.state.js → event/argument/tab-change.event.js} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -3350,8 +3350,8 @@ var baseStyle = {
|
|
|
3350
3350
|
position: "fixed",
|
|
3351
3351
|
zIndex: "10000"
|
|
3352
3352
|
};
|
|
3353
|
-
function cloneElement(
|
|
3354
|
-
const element = getAnimationElement(
|
|
3353
|
+
function cloneElement(clone35, teleport = document.body, isRemoveChild = true) {
|
|
3354
|
+
const element = getAnimationElement(clone35);
|
|
3355
3355
|
if (element == null) {
|
|
3356
3356
|
throw new Error("Cannot clone a null or undefined element.");
|
|
3357
3357
|
}
|
|
@@ -3770,11 +3770,11 @@ function arrayContains(arr, val) {
|
|
|
3770
3770
|
});
|
|
3771
3771
|
}
|
|
3772
3772
|
function cloneObject(o) {
|
|
3773
|
-
var
|
|
3773
|
+
var clone35 = {};
|
|
3774
3774
|
for (var p in o) {
|
|
3775
|
-
|
|
3775
|
+
clone35[p] = o[p];
|
|
3776
3776
|
}
|
|
3777
|
-
return
|
|
3777
|
+
return clone35;
|
|
3778
3778
|
}
|
|
3779
3779
|
function replaceObjectProps(o1, o2) {
|
|
3780
3780
|
var o = cloneObject(o1);
|
|
@@ -5065,7 +5065,7 @@ var FileUtil = class {
|
|
|
5065
5065
|
|
|
5066
5066
|
// src/command/app/open-app-view/open-app-view.ts
|
|
5067
5067
|
import { ModelError as ModelError15, RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
5068
|
-
import { clone as
|
|
5068
|
+
import { clone as clone18 } from "ramda";
|
|
5069
5069
|
|
|
5070
5070
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
5071
5071
|
import { isEmpty as isEmpty4 } from "ramda";
|
|
@@ -6330,7 +6330,7 @@ var AppCounter = class {
|
|
|
6330
6330
|
this.context.destroy();
|
|
6331
6331
|
this.destroyInterval();
|
|
6332
6332
|
this.evt.reset();
|
|
6333
|
-
ibiz.mc.command.change.
|
|
6333
|
+
ibiz.mc.command.change.off(this.countChange);
|
|
6334
6334
|
}
|
|
6335
6335
|
};
|
|
6336
6336
|
|
|
@@ -6480,8 +6480,13 @@ var DEDQCondUtil = class {
|
|
|
6480
6480
|
DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
6481
6481
|
|
|
6482
6482
|
// src/service/utils/dynamic-code-list/dynamic-code-list.ts
|
|
6483
|
-
import {
|
|
6484
|
-
|
|
6483
|
+
import {
|
|
6484
|
+
IBizContext as IBizContext2,
|
|
6485
|
+
ModelError as ModelError5,
|
|
6486
|
+
RuntimeModelError as RuntimeModelError7
|
|
6487
|
+
} from "@ibiz-template/core";
|
|
6488
|
+
import { clone as clone4, isNil as isNil5 } from "ramda";
|
|
6489
|
+
import { QXEvent as QXEvent3, notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
6485
6490
|
var DynamicCodeListCache = class {
|
|
6486
6491
|
constructor(codeList) {
|
|
6487
6492
|
/**
|
|
@@ -6501,7 +6506,55 @@ var DynamicCodeListCache = class {
|
|
|
6501
6506
|
* @type {boolean}
|
|
6502
6507
|
*/
|
|
6503
6508
|
this.isPredefined = false;
|
|
6509
|
+
/**
|
|
6510
|
+
* 应用上下文
|
|
6511
|
+
*
|
|
6512
|
+
* @author tony001
|
|
6513
|
+
* @date 2024-04-10 15:04:25
|
|
6514
|
+
* @protected
|
|
6515
|
+
* @type {IContext}
|
|
6516
|
+
*/
|
|
6517
|
+
this.context = IBizContext2.create();
|
|
6518
|
+
/**
|
|
6519
|
+
* 视图参数
|
|
6520
|
+
*
|
|
6521
|
+
* @author tony001
|
|
6522
|
+
* @date 2024-04-10 15:04:39
|
|
6523
|
+
* @protected
|
|
6524
|
+
* @type {IParams}
|
|
6525
|
+
*/
|
|
6526
|
+
this.params = {};
|
|
6527
|
+
/**
|
|
6528
|
+
* 事件对象
|
|
6529
|
+
*
|
|
6530
|
+
* @author tony001
|
|
6531
|
+
* @date 2024-04-10 17:04:00
|
|
6532
|
+
* @protected
|
|
6533
|
+
*/
|
|
6534
|
+
this.evt = new QXEvent3();
|
|
6504
6535
|
this.codeList = codeList;
|
|
6536
|
+
this.codelistChange = this.codelistChange.bind(this);
|
|
6537
|
+
const { appDataEntityId, appDEDataSetId } = this.codeList;
|
|
6538
|
+
if (appDataEntityId && appDEDataSetId) {
|
|
6539
|
+
ibiz.mc.command.change.on(this.codelistChange);
|
|
6540
|
+
}
|
|
6541
|
+
}
|
|
6542
|
+
/**
|
|
6543
|
+
* 设置上下文以及查询参数
|
|
6544
|
+
*
|
|
6545
|
+
* @author tony001
|
|
6546
|
+
* @date 2024-04-10 15:04:04
|
|
6547
|
+
* @protected
|
|
6548
|
+
* @param {IContext} [context]
|
|
6549
|
+
* @param {IParams} [params]
|
|
6550
|
+
*/
|
|
6551
|
+
setParams(context, params) {
|
|
6552
|
+
if (context) {
|
|
6553
|
+
this.context = clone4(context);
|
|
6554
|
+
}
|
|
6555
|
+
if (params) {
|
|
6556
|
+
this.params = clone4(params);
|
|
6557
|
+
}
|
|
6505
6558
|
}
|
|
6506
6559
|
/**
|
|
6507
6560
|
* 初始化
|
|
@@ -6623,6 +6676,7 @@ var DynamicCodeListCache = class {
|
|
|
6623
6676
|
* @returns {*} {Promise<CodeListItem[]>}
|
|
6624
6677
|
*/
|
|
6625
6678
|
async load(context, params = {}) {
|
|
6679
|
+
this.setParams(context, params);
|
|
6626
6680
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
6627
6681
|
const {
|
|
6628
6682
|
appDataEntityId,
|
|
@@ -6754,10 +6808,79 @@ var DynamicCodeListCache = class {
|
|
|
6754
6808
|
delete cacheData.promise;
|
|
6755
6809
|
return result;
|
|
6756
6810
|
}
|
|
6811
|
+
/**
|
|
6812
|
+
* 接受代码表实体数据变更,刷新代码表
|
|
6813
|
+
*
|
|
6814
|
+
* @author tony001
|
|
6815
|
+
* @date 2024-04-10 15:04:42
|
|
6816
|
+
* @protected
|
|
6817
|
+
* @param {IPortalMessage} msg
|
|
6818
|
+
*/
|
|
6819
|
+
codelistChange(msg) {
|
|
6820
|
+
const data = msg.data;
|
|
6821
|
+
const { appDataEntityId } = this.codeList;
|
|
6822
|
+
if (appDataEntityId) {
|
|
6823
|
+
const codeName = calcDeCodeNameById(appDataEntityId);
|
|
6824
|
+
if (data && data.srfdecodename && data.srfdecodename.toLowerCase() === codeName) {
|
|
6825
|
+
this.refresh();
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6828
|
+
}
|
|
6829
|
+
/**
|
|
6830
|
+
* 刷新代码表数据
|
|
6831
|
+
*
|
|
6832
|
+
* @author tony001
|
|
6833
|
+
* @date 2024-04-10 17:04:20
|
|
6834
|
+
* @return {*} {Promise<void>}
|
|
6835
|
+
*/
|
|
6836
|
+
async refresh() {
|
|
6837
|
+
const key = JSON.stringify(this.context) + JSON.stringify(this.params);
|
|
6838
|
+
this.cache.delete(key);
|
|
6839
|
+
const result = await this.get(this.context, this.params);
|
|
6840
|
+
this.evt.emit("change", result);
|
|
6841
|
+
}
|
|
6842
|
+
/**
|
|
6843
|
+
* 代码表数据变更事件监听
|
|
6844
|
+
*
|
|
6845
|
+
* @author tony001
|
|
6846
|
+
* @date 2024-04-10 17:04:52
|
|
6847
|
+
* @param {(data: CodeListItem[]) => void} fn
|
|
6848
|
+
* @param {boolean} [immediate=true] 当有数据时,立即触发一次回调
|
|
6849
|
+
*/
|
|
6850
|
+
onChange(fn, immediate = true) {
|
|
6851
|
+
this.evt.on("change", fn);
|
|
6852
|
+
const key = JSON.stringify(this.context) + JSON.stringify(this.params);
|
|
6853
|
+
const cacheData = this.cache.get(key);
|
|
6854
|
+
if (immediate && notNilEmpty6(cacheData)) {
|
|
6855
|
+
fn(cacheData.items);
|
|
6856
|
+
}
|
|
6857
|
+
}
|
|
6858
|
+
/**
|
|
6859
|
+
* 取消代码表数据变更监听
|
|
6860
|
+
*
|
|
6861
|
+
* @author tony001
|
|
6862
|
+
* @date 2024-04-10 17:04:57
|
|
6863
|
+
* @param {(data: CodeListItem[]) => void} fn
|
|
6864
|
+
*/
|
|
6865
|
+
offChange(fn) {
|
|
6866
|
+
this.evt.off("change", fn);
|
|
6867
|
+
}
|
|
6868
|
+
/**
|
|
6869
|
+
* 销毁(取消数据变更监听)
|
|
6870
|
+
*
|
|
6871
|
+
* @author tony001
|
|
6872
|
+
* @date 2024-04-10 15:04:11
|
|
6873
|
+
*/
|
|
6874
|
+
destroy() {
|
|
6875
|
+
const { appDataEntityId, appDEDataSetId } = this.codeList;
|
|
6876
|
+
if (appDataEntityId && appDEDataSetId) {
|
|
6877
|
+
ibiz.mc.command.change.off(this.codelistChange);
|
|
6878
|
+
}
|
|
6879
|
+
}
|
|
6757
6880
|
};
|
|
6758
6881
|
|
|
6759
6882
|
// src/service/utils/de-cache/de-cache.ts
|
|
6760
|
-
import { where, equals, clone as
|
|
6883
|
+
import { where, equals, clone as clone5, isNil as isNil7, isEmpty as isEmpty6 } from "ramda";
|
|
6761
6884
|
import { createUUID as createUUID2 } from "qx-util";
|
|
6762
6885
|
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
6763
6886
|
|
|
@@ -6837,7 +6960,7 @@ var DECache = class {
|
|
|
6837
6960
|
* @param {IDataEntity} entity
|
|
6838
6961
|
*/
|
|
6839
6962
|
forceUpdate(_context, entity) {
|
|
6840
|
-
this.cacheMap.set(entity.srfkey,
|
|
6963
|
+
this.cacheMap.set(entity.srfkey, clone5(entity));
|
|
6841
6964
|
ibiz.log.warn("forceUpdate", entity.srfkey, entity);
|
|
6842
6965
|
}
|
|
6843
6966
|
/**
|
|
@@ -6876,7 +6999,7 @@ var DECache = class {
|
|
|
6876
6999
|
}
|
|
6877
7000
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
6878
7001
|
const commit = () => {
|
|
6879
|
-
this.cacheMap.set(entity.srfkey,
|
|
7002
|
+
this.cacheMap.set(entity.srfkey, clone5(entity));
|
|
6880
7003
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
6881
7004
|
};
|
|
6882
7005
|
const t = this.getTransaction(context);
|
|
@@ -6906,7 +7029,7 @@ var DECache = class {
|
|
|
6906
7029
|
isExistSessionId("get", context);
|
|
6907
7030
|
const data = this.cacheMap.get(srfKey);
|
|
6908
7031
|
ibiz.log.warn("get", srfKey, data);
|
|
6909
|
-
return
|
|
7032
|
+
return clone5(data);
|
|
6910
7033
|
} catch (err) {
|
|
6911
7034
|
ibiz.log.error(err);
|
|
6912
7035
|
return null;
|
|
@@ -6936,7 +7059,7 @@ var DECache = class {
|
|
|
6936
7059
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
6937
7060
|
const data = this.cacheMap.get(oldKey);
|
|
6938
7061
|
if (data) {
|
|
6939
|
-
const _data =
|
|
7062
|
+
const _data = clone5(data);
|
|
6940
7063
|
_data.assign(entity);
|
|
6941
7064
|
const commit = () => {
|
|
6942
7065
|
data.assign(entity);
|
|
@@ -7019,7 +7142,7 @@ var DECache = class {
|
|
|
7019
7142
|
entity.srfkey = createUUID2();
|
|
7020
7143
|
}
|
|
7021
7144
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
7022
|
-
const data =
|
|
7145
|
+
const data = clone5(entity);
|
|
7023
7146
|
if (t) {
|
|
7024
7147
|
t.change(data.srfkey, () => {
|
|
7025
7148
|
commit(data);
|
|
@@ -7069,7 +7192,7 @@ var DECache = class {
|
|
|
7069
7192
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
7070
7193
|
const data = this.cacheMap.get(entity.srfkey);
|
|
7071
7194
|
if (data) {
|
|
7072
|
-
const _data =
|
|
7195
|
+
const _data = clone5(data);
|
|
7073
7196
|
_data.assign(entity);
|
|
7074
7197
|
entities[i] = _data;
|
|
7075
7198
|
if (t) {
|
|
@@ -7594,6 +7717,44 @@ var CodeListService = class {
|
|
|
7594
7717
|
}
|
|
7595
7718
|
return [];
|
|
7596
7719
|
}
|
|
7720
|
+
/**
|
|
7721
|
+
* 获取代码表实例对象(动态代码表返回具体实例,静态代码表返回undefined)
|
|
7722
|
+
*
|
|
7723
|
+
* @param tag 代码表标识
|
|
7724
|
+
* @returns 动态代码表实例|undefined
|
|
7725
|
+
*/
|
|
7726
|
+
async getCodeListInstance(tag) {
|
|
7727
|
+
let codeListInstance;
|
|
7728
|
+
const codeList = this.allCodeLists.get(tag);
|
|
7729
|
+
if (!codeList) {
|
|
7730
|
+
throw new RuntimeError17("\u627E\u4E0D\u5230".concat(tag, "\u4EE3\u7801\u8868"));
|
|
7731
|
+
}
|
|
7732
|
+
if (codeList.codeListType === "DYNAMIC") {
|
|
7733
|
+
const codeName = codeList.codeName;
|
|
7734
|
+
if (this.cache.has(codeName)) {
|
|
7735
|
+
codeListInstance = this.cache.get(codeName);
|
|
7736
|
+
} else {
|
|
7737
|
+
codeListInstance = new DynamicCodeListCache(codeList);
|
|
7738
|
+
this.cache.set(codeName, codeListInstance);
|
|
7739
|
+
await codeListInstance.init();
|
|
7740
|
+
}
|
|
7741
|
+
}
|
|
7742
|
+
return codeListInstance;
|
|
7743
|
+
}
|
|
7744
|
+
/**
|
|
7745
|
+
* 销毁(清除动态代码表监听)
|
|
7746
|
+
*
|
|
7747
|
+
* @author tony001
|
|
7748
|
+
* @return {void}
|
|
7749
|
+
*/
|
|
7750
|
+
destroy() {
|
|
7751
|
+
const cacheList = Array.from(this.cache.values());
|
|
7752
|
+
cacheList.forEach((item) => {
|
|
7753
|
+
if (item instanceof DynamicCodeListCache) {
|
|
7754
|
+
item.destroy();
|
|
7755
|
+
}
|
|
7756
|
+
});
|
|
7757
|
+
}
|
|
7597
7758
|
};
|
|
7598
7759
|
|
|
7599
7760
|
// src/service/service/config/config.service.ts
|
|
@@ -7659,7 +7820,10 @@ var CounterService = class {
|
|
|
7659
7820
|
* @return {*} {Promise<AppCounter>}
|
|
7660
7821
|
*/
|
|
7661
7822
|
static async getCounter(model, context, params) {
|
|
7662
|
-
|
|
7823
|
+
let id = model.id;
|
|
7824
|
+
if (params && params.customId) {
|
|
7825
|
+
id = params.customId;
|
|
7826
|
+
}
|
|
7663
7827
|
if (this.counterMap.has(id)) {
|
|
7664
7828
|
const counter2 = this.counterMap.get(id);
|
|
7665
7829
|
if (counter2.isDestroyed === false) {
|
|
@@ -8073,7 +8237,7 @@ var FileService = class {
|
|
|
8073
8237
|
};
|
|
8074
8238
|
|
|
8075
8239
|
// src/service/app-data-entity/app-data-entity.ts
|
|
8076
|
-
import { clone as
|
|
8240
|
+
import { clone as clone6, isNil as isNil9 } from "ramda";
|
|
8077
8241
|
import { DataTypes } from "@ibiz-template/core";
|
|
8078
8242
|
import { createUUID as createUUID3 } from "qx-util";
|
|
8079
8243
|
|
|
@@ -8106,7 +8270,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
8106
8270
|
Object.defineProperty(this, "_data", {
|
|
8107
8271
|
enumerable: false,
|
|
8108
8272
|
configurable: true,
|
|
8109
|
-
value: data instanceof _AppDataEntity ?
|
|
8273
|
+
value: data instanceof _AppDataEntity ? clone6(data._data) : clone6(data)
|
|
8110
8274
|
});
|
|
8111
8275
|
Object.defineProperty(this, "srfdeid", {
|
|
8112
8276
|
get() {
|
|
@@ -8273,7 +8437,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
8273
8437
|
|
|
8274
8438
|
// src/service/dto/method.dto.ts
|
|
8275
8439
|
import { ModelError as ModelError6, RuntimeModelError as RuntimeModelError9 } from "@ibiz-template/core";
|
|
8276
|
-
import { clone as
|
|
8440
|
+
import { clone as clone7 } from "ramda";
|
|
8277
8441
|
var MethodDto = class {
|
|
8278
8442
|
/**
|
|
8279
8443
|
* Creates an instance of MethodDto.
|
|
@@ -8372,7 +8536,7 @@ var MethodDto = class {
|
|
|
8372
8536
|
});
|
|
8373
8537
|
let res;
|
|
8374
8538
|
if (deRs && deRs.nestedAppDEDataSetId) {
|
|
8375
|
-
const _context =
|
|
8539
|
+
const _context = clone7(context);
|
|
8376
8540
|
_context[this.entity.codeName.toLowerCase()] = data.srfkey;
|
|
8377
8541
|
const _params = {};
|
|
8378
8542
|
if (deRs.parentAppDEFieldId) {
|
|
@@ -8786,11 +8950,11 @@ var DEService = class {
|
|
|
8786
8950
|
};
|
|
8787
8951
|
|
|
8788
8952
|
// src/service/service/control/control.service.ts
|
|
8789
|
-
import { clone as
|
|
8953
|
+
import { clone as clone9 } from "@ibiz-template/core";
|
|
8790
8954
|
|
|
8791
8955
|
// src/service/vo/control.vo.ts
|
|
8792
8956
|
import { createUUID as createUUID4 } from "qx-util";
|
|
8793
|
-
import { clone as
|
|
8957
|
+
import { clone as clone8, isNil as isNil10 } from "ramda";
|
|
8794
8958
|
var BuildInKeys = [
|
|
8795
8959
|
"srfkey",
|
|
8796
8960
|
"srfmajortext",
|
|
@@ -8978,7 +9142,7 @@ var ControlVO = class _ControlVO {
|
|
|
8978
9142
|
* @return {*} {ControlVO}
|
|
8979
9143
|
*/
|
|
8980
9144
|
clone() {
|
|
8981
|
-
const cloneOrigin =
|
|
9145
|
+
const cloneOrigin = clone8(this.$origin);
|
|
8982
9146
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
8983
9147
|
Object.keys(this).forEach((key) => {
|
|
8984
9148
|
newVal[key] = this[key];
|
|
@@ -9094,7 +9258,7 @@ var ControlService = class {
|
|
|
9094
9258
|
* @returns {*} {IHttpResponse}
|
|
9095
9259
|
*/
|
|
9096
9260
|
handleResponse(res) {
|
|
9097
|
-
return
|
|
9261
|
+
return clone9(res);
|
|
9098
9262
|
}
|
|
9099
9263
|
/**
|
|
9100
9264
|
* 实体数据转ui数据
|
|
@@ -9261,6 +9425,9 @@ var MDControlService = class extends ControlService {
|
|
|
9261
9425
|
if (res.headers["x-total"]) {
|
|
9262
9426
|
res.total = Number(res.headers["x-total"]);
|
|
9263
9427
|
}
|
|
9428
|
+
if (res.headers["x-total-pages"]) {
|
|
9429
|
+
res.totalPages = Number(res.headers["x-total-pages"]);
|
|
9430
|
+
}
|
|
9264
9431
|
}
|
|
9265
9432
|
if (res.ok) {
|
|
9266
9433
|
if (isArray3(res.data)) {
|
|
@@ -9811,7 +9978,7 @@ import {
|
|
|
9811
9978
|
} from "@ibiz-template/core";
|
|
9812
9979
|
import { isArray as isArray6, isNil as isNil12 } from "lodash-es";
|
|
9813
9980
|
import { ascSort } from "qx-util";
|
|
9814
|
-
import { clone as
|
|
9981
|
+
import { clone as clone15 } from "ramda";
|
|
9815
9982
|
|
|
9816
9983
|
// src/service/service/entity/method/method.ts
|
|
9817
9984
|
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
@@ -10051,7 +10218,7 @@ var Method = class {
|
|
|
10051
10218
|
// src/de-logic/index.ts
|
|
10052
10219
|
import { HttpError as HttpError4, HttpResponse as HttpResponse2, RuntimeError as RuntimeError22 } from "@ibiz-template/core";
|
|
10053
10220
|
import { isArray as isArray5 } from "lodash-es";
|
|
10054
|
-
import { clone as
|
|
10221
|
+
import { clone as clone14 } from "ramda";
|
|
10055
10222
|
|
|
10056
10223
|
// src/de-logic/de-logic.ts
|
|
10057
10224
|
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
@@ -10511,11 +10678,11 @@ var EndNode = class extends DELogicNode {
|
|
|
10511
10678
|
|
|
10512
10679
|
// src/de-logic/de-logic-node/prepare-param-node/prepare-param-node.ts
|
|
10513
10680
|
import { ModelError as ModelError11 } from "@ibiz-template/core";
|
|
10514
|
-
import { clone as
|
|
10681
|
+
import { clone as clone11 } from "ramda";
|
|
10515
10682
|
|
|
10516
10683
|
// src/de-logic/utils/handle-src-val.ts
|
|
10517
10684
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
10518
|
-
import { clone as
|
|
10685
|
+
import { clone as clone10 } from "ramda";
|
|
10519
10686
|
function handleSrcVal(ctx, srcValParams) {
|
|
10520
10687
|
const { srcDELogicParamId, srcFieldName, srcValue, expression } = srcValParams;
|
|
10521
10688
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -10545,7 +10712,7 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
10545
10712
|
value = ctx.parameters.context;
|
|
10546
10713
|
break;
|
|
10547
10714
|
case "ENVPARAM":
|
|
10548
|
-
value =
|
|
10715
|
+
value = clone10(ibiz.env);
|
|
10549
10716
|
break;
|
|
10550
10717
|
case "EXPRESSION":
|
|
10551
10718
|
if (!expression) {
|
|
@@ -10591,7 +10758,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
10591
10758
|
let result;
|
|
10592
10759
|
let originValue;
|
|
10593
10760
|
if (nodeParam.dstDELogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
10594
|
-
originValue =
|
|
10761
|
+
originValue = clone11(ctx.params[nodeParam.dstDELogicParamId]);
|
|
10595
10762
|
}
|
|
10596
10763
|
switch (nodeParam.paramAction) {
|
|
10597
10764
|
case "SETPARAMVALUE":
|
|
@@ -10644,7 +10811,7 @@ var PrepareParamNode = class extends DELogicNode {
|
|
|
10644
10811
|
copyParam(nodeParam, ctx) {
|
|
10645
10812
|
const { dstDELogicParamId } = nodeParam;
|
|
10646
10813
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
10647
|
-
ctx.params[dstDELogicParamId] =
|
|
10814
|
+
ctx.params[dstDELogicParamId] = clone11(srcVal);
|
|
10648
10815
|
}
|
|
10649
10816
|
/**
|
|
10650
10817
|
* 绑定参数
|
|
@@ -10820,7 +10987,7 @@ var RenewParamNode = class extends DELogicNode {
|
|
|
10820
10987
|
|
|
10821
10988
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
10822
10989
|
import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
10823
|
-
import { clone as
|
|
10990
|
+
import { clone as clone12 } from "ramda";
|
|
10824
10991
|
var CopyParamNode = class extends DELogicNode {
|
|
10825
10992
|
async exec(ctx) {
|
|
10826
10993
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
@@ -10831,7 +10998,7 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
10831
10998
|
);
|
|
10832
10999
|
}
|
|
10833
11000
|
const srcVal = handleSrcVal(ctx, this.model);
|
|
10834
|
-
ctx.params[dstDELogicParamId] =
|
|
11001
|
+
ctx.params[dstDELogicParamId] = clone12(srcVal);
|
|
10835
11002
|
ibiz.log.debug(
|
|
10836
11003
|
"\u5B9E\u4F53\u903B\u8F91\u8282\u70B9\uFF08\u62F7\u8D1D\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDELogicParamId, "-\u503C\uFF1A"),
|
|
10837
11004
|
srcVal
|
|
@@ -10914,7 +11081,7 @@ var ThrowExceptionNode = class extends DELogicNode {
|
|
|
10914
11081
|
|
|
10915
11082
|
// src/de-logic/de-logic-param/de-logic-param.ts
|
|
10916
11083
|
import { ModelError as ModelError12 } from "@ibiz-template/core";
|
|
10917
|
-
import { clone as
|
|
11084
|
+
import { clone as clone13 } from "ramda";
|
|
10918
11085
|
var DELogicParam = class {
|
|
10919
11086
|
/**
|
|
10920
11087
|
* Creates an instance of DELogicParam.
|
|
@@ -10946,7 +11113,7 @@ var DELogicParam = class {
|
|
|
10946
11113
|
ctx.params[tag] = ctx.data[0] || {};
|
|
10947
11114
|
}
|
|
10948
11115
|
} else if (m.appGlobalParam) {
|
|
10949
|
-
ctx.params[tag] =
|
|
11116
|
+
ctx.params[tag] = clone13(ibiz.env);
|
|
10950
11117
|
} else if (m.entityListParam) {
|
|
10951
11118
|
ctx.params[tag] = [];
|
|
10952
11119
|
} else if (m.entityPageParam) {
|
|
@@ -10962,7 +11129,7 @@ var DELogicParam = class {
|
|
|
10962
11129
|
} else if (m.simpleParam) {
|
|
10963
11130
|
ctx.params[tag] = {};
|
|
10964
11131
|
} else if (m.cloneParam) {
|
|
10965
|
-
ctx.params[tag] =
|
|
11132
|
+
ctx.params[tag] = clone13(ctx.data || {});
|
|
10966
11133
|
} else if (m.envParam) {
|
|
10967
11134
|
throw new ModelError12(m, "\u672A\u652F\u6301\u7684\u903B\u8F91\u53C2\u6570\u7C7B\u578B: \u7CFB\u7EDF\u73AF\u5883\u53D8\u91CF");
|
|
10968
11135
|
} else if (m.fileListParam) {
|
|
@@ -11210,9 +11377,9 @@ async function execDELogicById(deDELogicId, dataEntityId, context, data, params)
|
|
|
11210
11377
|
return execDELogic(deLogic, context, data, params);
|
|
11211
11378
|
}
|
|
11212
11379
|
async function execDELogicAction(deDELogic, context, data, params) {
|
|
11213
|
-
const _context =
|
|
11214
|
-
const _data = data ?
|
|
11215
|
-
const _params = params ?
|
|
11380
|
+
const _context = clone14(context);
|
|
11381
|
+
const _data = data ? clone14(data) : data;
|
|
11382
|
+
const _params = params ? clone14(params) : params;
|
|
11216
11383
|
try {
|
|
11217
11384
|
const result = await execDELogic(deDELogic, _context, _data, _params);
|
|
11218
11385
|
return new HttpResponse2(result);
|
|
@@ -11587,7 +11754,7 @@ var DEActionMethod = class extends Method {
|
|
|
11587
11754
|
context,
|
|
11588
11755
|
minorAppDataEntityId
|
|
11589
11756
|
);
|
|
11590
|
-
const _context =
|
|
11757
|
+
const _context = clone15(context);
|
|
11591
11758
|
_context[this.entity.codeName.toLowerCase()] = key;
|
|
11592
11759
|
const res = await minorService.exec(nestedAppDEDataSetId, _context);
|
|
11593
11760
|
const items = res.data || [];
|
|
@@ -11759,7 +11926,7 @@ import {
|
|
|
11759
11926
|
RuntimeModelError as RuntimeModelError23
|
|
11760
11927
|
} from "@ibiz-template/core";
|
|
11761
11928
|
import { isArray as isArray7 } from "lodash-es";
|
|
11762
|
-
import { clone as
|
|
11929
|
+
import { clone as clone16, isEmpty as isEmpty8, isNil as isNil13 } from "ramda";
|
|
11763
11930
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
11764
11931
|
var FetchMethod = class extends Method {
|
|
11765
11932
|
async exec(context, params, params2, header) {
|
|
@@ -11846,7 +12013,7 @@ var FetchMethod = class extends Method {
|
|
|
11846
12013
|
const { page, size } = filter;
|
|
11847
12014
|
const start = page * size;
|
|
11848
12015
|
const end = (page + 1) * size - 1;
|
|
11849
|
-
const items = list.slice(start, end).map((item) =>
|
|
12016
|
+
const items = list.slice(start, end).map((item) => clone16(item));
|
|
11850
12017
|
return items;
|
|
11851
12018
|
}
|
|
11852
12019
|
/**
|
|
@@ -12201,7 +12368,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
12201
12368
|
|
|
12202
12369
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
12203
12370
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
12204
|
-
import { clone as
|
|
12371
|
+
import { clone as clone17, isNil as isNil15 } from "ramda";
|
|
12205
12372
|
var CloneExcludeKeys = [
|
|
12206
12373
|
"_id",
|
|
12207
12374
|
"srfnodeid",
|
|
@@ -12317,7 +12484,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
12317
12484
|
}
|
|
12318
12485
|
};
|
|
12319
12486
|
this.clone = () => {
|
|
12320
|
-
const cloneData =
|
|
12487
|
+
const cloneData = clone17(this._deData);
|
|
12321
12488
|
const cloneNodeData = new _TreeDataSetNodeData(model, this._parent, {
|
|
12322
12489
|
data: cloneData,
|
|
12323
12490
|
leaf: this._leaf,
|
|
@@ -12659,7 +12826,7 @@ var MapData = class {
|
|
|
12659
12826
|
};
|
|
12660
12827
|
|
|
12661
12828
|
// src/service/vo/panel-data/panel-data.ts
|
|
12662
|
-
import { QXEvent as
|
|
12829
|
+
import { QXEvent as QXEvent4 } from "qx-util";
|
|
12663
12830
|
function updateKeyDefine3(target, keys) {
|
|
12664
12831
|
keys.forEach((key) => {
|
|
12665
12832
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
@@ -12674,7 +12841,7 @@ function updateKeyDefine3(target, keys) {
|
|
|
12674
12841
|
}
|
|
12675
12842
|
var PanelData = class {
|
|
12676
12843
|
constructor(fields, origin) {
|
|
12677
|
-
const _evt = new
|
|
12844
|
+
const _evt = new QXEvent4();
|
|
12678
12845
|
const keyMap = {};
|
|
12679
12846
|
const reverseKeyMap = {};
|
|
12680
12847
|
fields.forEach((field) => {
|
|
@@ -12896,7 +13063,7 @@ var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
|
12896
13063
|
};
|
|
12897
13064
|
|
|
12898
13065
|
// src/service/mqtt/mqtt.service.ts
|
|
12899
|
-
import { QXEvent as
|
|
13066
|
+
import { QXEvent as QXEvent5, createUUID as createUUID7 } from "qx-util";
|
|
12900
13067
|
var MqttService = class {
|
|
12901
13068
|
/**
|
|
12902
13069
|
* Creates an instance of MqttService.
|
|
@@ -12917,7 +13084,7 @@ var MqttService = class {
|
|
|
12917
13084
|
* @author chitanda
|
|
12918
13085
|
* @date 2023-10-23 15:10:06
|
|
12919
13086
|
*/
|
|
12920
|
-
this.evt = new
|
|
13087
|
+
this.evt = new QXEvent5();
|
|
12921
13088
|
/**
|
|
12922
13089
|
* 连接选项
|
|
12923
13090
|
*
|
|
@@ -13169,7 +13336,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
13169
13336
|
* @return {*} {(Promise<IModalData | void>)}
|
|
13170
13337
|
*/
|
|
13171
13338
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
13172
|
-
const context =
|
|
13339
|
+
const context = clone18(_context);
|
|
13173
13340
|
if (context.srfsimple) {
|
|
13174
13341
|
delete context.srfsimple;
|
|
13175
13342
|
}
|
|
@@ -13352,6 +13519,7 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
13352
13519
|
const _context = context.clone();
|
|
13353
13520
|
Object.assign(_context, convertNavData(navigateContexts, params, context));
|
|
13354
13521
|
const _params = convertNavData(navigateParams, params, context);
|
|
13522
|
+
Object.assign(_params, params);
|
|
13355
13523
|
switch (appFuncType) {
|
|
13356
13524
|
case "APPVIEW":
|
|
13357
13525
|
return this.openAppView(appFunc, _context, _params, opts);
|
|
@@ -13463,7 +13631,7 @@ function installCommand() {
|
|
|
13463
13631
|
}
|
|
13464
13632
|
|
|
13465
13633
|
// src/app-hub.ts
|
|
13466
|
-
import { RuntimeError as
|
|
13634
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
13467
13635
|
|
|
13468
13636
|
// src/application.ts
|
|
13469
13637
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -13636,6 +13804,15 @@ var Application = class {
|
|
|
13636
13804
|
await this.mqtt.connect();
|
|
13637
13805
|
}
|
|
13638
13806
|
}
|
|
13807
|
+
/**
|
|
13808
|
+
* 销毁应用
|
|
13809
|
+
*
|
|
13810
|
+
* @author tony001
|
|
13811
|
+
* @date 2024-04-10 15:04:51
|
|
13812
|
+
*/
|
|
13813
|
+
destroy() {
|
|
13814
|
+
this.codeList.destroy();
|
|
13815
|
+
}
|
|
13639
13816
|
};
|
|
13640
13817
|
|
|
13641
13818
|
// src/hub/convert/app-menu-convert/app-menu-convert.ts
|
|
@@ -13800,8 +13977,8 @@ var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
|
13800
13977
|
})(TreeGridExNotifyState || {});
|
|
13801
13978
|
|
|
13802
13979
|
// src/controller/common/view/view.controller.ts
|
|
13803
|
-
import { notNilEmpty as
|
|
13804
|
-
import { IBizContext as
|
|
13980
|
+
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
13981
|
+
import { IBizContext as IBizContext3, RuntimeError as RuntimeError34 } from "@ibiz-template/core";
|
|
13805
13982
|
import { isEmpty as isEmpty9, isNil as isNil22, isNotNil as isNotNil2 } from "ramda";
|
|
13806
13983
|
|
|
13807
13984
|
// src/controller/utils/loading/loading.state.ts
|
|
@@ -13940,7 +14117,7 @@ var LoadingState = class {
|
|
|
13940
14117
|
};
|
|
13941
14118
|
|
|
13942
14119
|
// src/controller/ctx/ctx.ts
|
|
13943
|
-
import { QXEvent as
|
|
14120
|
+
import { QXEvent as QXEvent6 } from "qx-util";
|
|
13944
14121
|
|
|
13945
14122
|
// src/controller/ctx/ctx.state.ts
|
|
13946
14123
|
var CTXState = class {
|
|
@@ -13970,7 +14147,7 @@ var CTX = class {
|
|
|
13970
14147
|
* @date 2023-04-26 07:54:46
|
|
13971
14148
|
* @protected
|
|
13972
14149
|
*/
|
|
13973
|
-
this.evt = new
|
|
14150
|
+
this.evt = new QXEvent6(3e3);
|
|
13974
14151
|
/**
|
|
13975
14152
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
13976
14153
|
* @author lxm
|
|
@@ -14306,8 +14483,8 @@ var ButtonContainerState = class {
|
|
|
14306
14483
|
};
|
|
14307
14484
|
|
|
14308
14485
|
// src/controller/utils/event/qx-event-ex.ts
|
|
14309
|
-
import { clearAll, QXEvent as
|
|
14310
|
-
var QXEventEx = class extends
|
|
14486
|
+
import { clearAll, QXEvent as QXEvent7 } from "qx-util";
|
|
14487
|
+
var QXEventEx = class extends QXEvent7 {
|
|
14311
14488
|
constructor() {
|
|
14312
14489
|
super(...arguments);
|
|
14313
14490
|
this.anyEventFns = [];
|
|
@@ -15230,7 +15407,7 @@ var ViewController = class extends BaseController {
|
|
|
15230
15407
|
*/
|
|
15231
15408
|
constructor(model, context, params, ctx) {
|
|
15232
15409
|
const _model = ibiz.util.layoutPanel.fill(model);
|
|
15233
|
-
super(_model,
|
|
15410
|
+
super(_model, IBizContext3.create({}, context), params || {}, new CTX(ctx));
|
|
15234
15411
|
this.session = {};
|
|
15235
15412
|
this.modal = new Modal({});
|
|
15236
15413
|
this.providers = {};
|
|
@@ -15454,13 +15631,13 @@ var ViewController = class extends BaseController {
|
|
|
15454
15631
|
}
|
|
15455
15632
|
const navContexts = this.model.appViewNavContexts;
|
|
15456
15633
|
let context = {};
|
|
15457
|
-
if (
|
|
15634
|
+
if (notNilEmpty7(navContexts)) {
|
|
15458
15635
|
context = convertNavData(navContexts, this.params, this.context);
|
|
15459
15636
|
}
|
|
15460
15637
|
Object.assign(this.context, context);
|
|
15461
15638
|
const navParams = this.model.appViewNavParams;
|
|
15462
15639
|
let params = {};
|
|
15463
|
-
if (
|
|
15640
|
+
if (notNilEmpty7(navParams)) {
|
|
15464
15641
|
params = convertNavData(navParams, this.params, this.context);
|
|
15465
15642
|
}
|
|
15466
15643
|
Object.assign(this.params, params);
|
|
@@ -15852,13 +16029,13 @@ var CodeListEditorController = class extends EditorController {
|
|
|
15852
16029
|
// src/controller/common/control/control.controller.ts
|
|
15853
16030
|
import {
|
|
15854
16031
|
HttpError as HttpError6,
|
|
15855
|
-
IBizContext as
|
|
16032
|
+
IBizContext as IBizContext4,
|
|
15856
16033
|
IBizParams,
|
|
15857
16034
|
NoticeError as NoticeError2,
|
|
15858
16035
|
RuntimeError as RuntimeError35
|
|
15859
16036
|
} from "@ibiz-template/core";
|
|
15860
|
-
import { clone as
|
|
15861
|
-
import { notNilEmpty as
|
|
16037
|
+
import { clone as clone19, isNil as isNil23 } from "ramda";
|
|
16038
|
+
import { notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
15862
16039
|
var ControlController = class extends BaseController {
|
|
15863
16040
|
/**
|
|
15864
16041
|
* Creates an instance of ControlController.
|
|
@@ -15872,7 +16049,7 @@ var ControlController = class extends BaseController {
|
|
|
15872
16049
|
constructor(model, context, params, ctx) {
|
|
15873
16050
|
super(
|
|
15874
16051
|
model,
|
|
15875
|
-
|
|
16052
|
+
IBizContext4.create({}, context),
|
|
15876
16053
|
new IBizParams({}, params),
|
|
15877
16054
|
ctx
|
|
15878
16055
|
);
|
|
@@ -15921,7 +16098,7 @@ var ControlController = class extends BaseController {
|
|
|
15921
16098
|
"".concat(model.controlType, "_DEFAULT")
|
|
15922
16099
|
);
|
|
15923
16100
|
if (panelModel) {
|
|
15924
|
-
this.controlPanel =
|
|
16101
|
+
this.controlPanel = clone19(panelModel);
|
|
15925
16102
|
}
|
|
15926
16103
|
}
|
|
15927
16104
|
this.updateContextParams({});
|
|
@@ -16015,12 +16192,12 @@ var ControlController = class extends BaseController {
|
|
|
16015
16192
|
}
|
|
16016
16193
|
const { controlNavContexts, controlNavParams } = this.model;
|
|
16017
16194
|
let context = {};
|
|
16018
|
-
if (
|
|
16195
|
+
if (notNilEmpty8(controlNavContexts)) {
|
|
16019
16196
|
context = convertNavData(controlNavContexts, this.params, this.context);
|
|
16020
16197
|
}
|
|
16021
16198
|
Object.assign(this.context, context);
|
|
16022
16199
|
let params = {};
|
|
16023
|
-
if (
|
|
16200
|
+
if (notNilEmpty8(controlNavParams)) {
|
|
16024
16201
|
params = convertNavData(controlNavParams, this.params, this.context);
|
|
16025
16202
|
}
|
|
16026
16203
|
Object.assign(this.params, params);
|
|
@@ -16144,7 +16321,7 @@ var ControlController = class extends BaseController {
|
|
|
16144
16321
|
}
|
|
16145
16322
|
const { ctrlParams } = this.model.controlParam;
|
|
16146
16323
|
let params = {};
|
|
16147
|
-
if (
|
|
16324
|
+
if (notNilEmpty8(ctrlParams)) {
|
|
16148
16325
|
params = convertNavData(ctrlParams, this.params, this.context);
|
|
16149
16326
|
}
|
|
16150
16327
|
Object.assign(this.controlParams, params);
|
|
@@ -16492,6 +16669,9 @@ var MDControlController = class extends ControlController {
|
|
|
16492
16669
|
if (typeof res.total === "number") {
|
|
16493
16670
|
this.state.total = res.total;
|
|
16494
16671
|
}
|
|
16672
|
+
if (typeof res.totalPages === "number") {
|
|
16673
|
+
this.state.totalPages = res.totalPages;
|
|
16674
|
+
}
|
|
16495
16675
|
if (isLoadMore) {
|
|
16496
16676
|
this.state.items.push(...res.data);
|
|
16497
16677
|
} else {
|
|
@@ -17033,7 +17213,7 @@ import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
|
17033
17213
|
|
|
17034
17214
|
// src/controller/control/calendar/calendar.service.ts
|
|
17035
17215
|
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
17036
|
-
import { clone as
|
|
17216
|
+
import { clone as clone20 } from "ramda";
|
|
17037
17217
|
var CalendarService = class extends MDControlService {
|
|
17038
17218
|
/**
|
|
17039
17219
|
* 执行查询多条数据的方法
|
|
@@ -17054,7 +17234,7 @@ var CalendarService = class extends MDControlService {
|
|
|
17054
17234
|
async (item) => {
|
|
17055
17235
|
const fetchAction = item.appDEDataSetId || "fetchdefault";
|
|
17056
17236
|
const tempContext = context.clone();
|
|
17057
|
-
const tempParams =
|
|
17237
|
+
const tempParams = clone20(params);
|
|
17058
17238
|
if (item.maxSize) {
|
|
17059
17239
|
tempParams.size = item.maxSize;
|
|
17060
17240
|
}
|
|
@@ -17390,7 +17570,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17390
17570
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17391
17571
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17392
17572
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17393
|
-
import { clone as
|
|
17573
|
+
import { clone as clone21, isNil as isNil25, mergeDeepRight } from "ramda";
|
|
17394
17574
|
dayjs4.extend(minMax2);
|
|
17395
17575
|
dayjs4.extend(isSameOrBefore);
|
|
17396
17576
|
dayjs4.extend(quarterOfYear);
|
|
@@ -17577,7 +17757,7 @@ var BaseSeriesGenerator = class {
|
|
|
17577
17757
|
}
|
|
17578
17758
|
groupData[group].get(catalog).value = plus(
|
|
17579
17759
|
groupData[group].get(catalog).value,
|
|
17580
|
-
item[this.valueField]
|
|
17760
|
+
item[this.valueField] || 0
|
|
17581
17761
|
);
|
|
17582
17762
|
if (!groupData[group].get(catalog).chartData) {
|
|
17583
17763
|
this.prepareChartData(groupData, item, catalog, group);
|
|
@@ -17666,7 +17846,7 @@ var BaseSeriesGenerator = class {
|
|
|
17666
17846
|
dataPreprocess(data) {
|
|
17667
17847
|
const tempData = [];
|
|
17668
17848
|
data.forEach((singleData) => {
|
|
17669
|
-
tempData.push(
|
|
17849
|
+
tempData.push(clone21(singleData));
|
|
17670
17850
|
});
|
|
17671
17851
|
const { groupMode } = this.model;
|
|
17672
17852
|
if (groupMode) {
|
|
@@ -18450,6 +18630,10 @@ var ChartController = class extends MDControlController {
|
|
|
18450
18630
|
initState() {
|
|
18451
18631
|
super.initState();
|
|
18452
18632
|
this.state.size = 1e3;
|
|
18633
|
+
this.state.showGrid = false;
|
|
18634
|
+
this.state.gridHeaders = [];
|
|
18635
|
+
this.state.gridData = [];
|
|
18636
|
+
this.state.gridPosition = "bottom";
|
|
18453
18637
|
}
|
|
18454
18638
|
async onCreated() {
|
|
18455
18639
|
await super.onCreated();
|
|
@@ -18457,6 +18641,7 @@ var ChartController = class extends MDControlController {
|
|
|
18457
18641
|
await this.service.init(this.context);
|
|
18458
18642
|
this.generator = new ChartOptionsGenerator2(this.model);
|
|
18459
18643
|
await this.generator.init(this.context, this.params);
|
|
18644
|
+
this.parseGridParam();
|
|
18460
18645
|
this.resizeChart = this.resizeChart.bind(this);
|
|
18461
18646
|
window.addEventListener("resize", this.resizeChart);
|
|
18462
18647
|
}
|
|
@@ -18468,6 +18653,164 @@ var ChartController = class extends MDControlController {
|
|
|
18468
18653
|
this.calcOptions();
|
|
18469
18654
|
return result;
|
|
18470
18655
|
}
|
|
18656
|
+
/**
|
|
18657
|
+
* 解析表格相关参数
|
|
18658
|
+
*
|
|
18659
|
+
* @memberof ChartController
|
|
18660
|
+
*/
|
|
18661
|
+
parseGridParam() {
|
|
18662
|
+
if (this.model.dechartDataGrid) {
|
|
18663
|
+
if (this.model.dechartDataGrid.dataGridPos) {
|
|
18664
|
+
this.state.gridPosition = this.model.dechartDataGrid.dataGridPos.toLocaleLowerCase();
|
|
18665
|
+
} else {
|
|
18666
|
+
this.state.gridPosition = "bottom";
|
|
18667
|
+
}
|
|
18668
|
+
if (this.model.dechartDataGrid.showDataGrid === true) {
|
|
18669
|
+
this.state.showGrid = true;
|
|
18670
|
+
}
|
|
18671
|
+
}
|
|
18672
|
+
}
|
|
18673
|
+
/**
|
|
18674
|
+
* 计算总数
|
|
18675
|
+
*
|
|
18676
|
+
* @param {string} valueField
|
|
18677
|
+
* @return {*}
|
|
18678
|
+
* @memberof ChartController
|
|
18679
|
+
*/
|
|
18680
|
+
computeTotal(valueField) {
|
|
18681
|
+
let total = 0;
|
|
18682
|
+
this.state.items.forEach((item) => {
|
|
18683
|
+
const value = Number(item[valueField]);
|
|
18684
|
+
if (!Number.isNaN(value)) {
|
|
18685
|
+
total += Number(value);
|
|
18686
|
+
}
|
|
18687
|
+
});
|
|
18688
|
+
return total;
|
|
18689
|
+
}
|
|
18690
|
+
/**
|
|
18691
|
+
* 处理单序列时的表格数据
|
|
18692
|
+
* 图表单序列时,首先获取配置的分类属性和值属性的title,构建表头,内置支持百分比列
|
|
18693
|
+
* 然后遍历图表默认分出来的分组数据去生成表格的数据
|
|
18694
|
+
*
|
|
18695
|
+
* @memberof ChartController
|
|
18696
|
+
*/
|
|
18697
|
+
handleSingleSerieGridData() {
|
|
18698
|
+
const serie = this.generator.seriesGenerators[0];
|
|
18699
|
+
const { catalogField, valueField, groupData } = serie;
|
|
18700
|
+
const fields = serie.chartGenerator.entity.appDEFields;
|
|
18701
|
+
const cataTitle = fields.find((field) => {
|
|
18702
|
+
return field.id === catalogField;
|
|
18703
|
+
});
|
|
18704
|
+
const valueTitle = fields.find((field) => {
|
|
18705
|
+
return field.id === valueField;
|
|
18706
|
+
});
|
|
18707
|
+
const tempGridHeader = [
|
|
18708
|
+
{
|
|
18709
|
+
id: catalogField,
|
|
18710
|
+
name: cataTitle == null ? void 0 : cataTitle.logicName
|
|
18711
|
+
},
|
|
18712
|
+
{
|
|
18713
|
+
id: valueField,
|
|
18714
|
+
name: valueTitle == null ? void 0 : valueTitle.logicName
|
|
18715
|
+
},
|
|
18716
|
+
{
|
|
18717
|
+
id: "srfpercent",
|
|
18718
|
+
name: "\u767E\u5206\u6BD4"
|
|
18719
|
+
}
|
|
18720
|
+
];
|
|
18721
|
+
this.state.gridHeaders = tempGridHeader;
|
|
18722
|
+
const tempData = [];
|
|
18723
|
+
const total = this.computeTotal(valueField);
|
|
18724
|
+
if (groupData && groupData.$default_group) {
|
|
18725
|
+
const group = groupData.$default_group;
|
|
18726
|
+
for (const [key, value] of group) {
|
|
18727
|
+
const tempValue = Number.isNaN(Number(value.value)) ? 0 : Number(value.value);
|
|
18728
|
+
let percent = "";
|
|
18729
|
+
if (total === 0 || Number.isNaN(Number(value.value))) {
|
|
18730
|
+
percent = "0%";
|
|
18731
|
+
} else {
|
|
18732
|
+
percent = "".concat(Math.round(tempValue / total * 100), "%");
|
|
18733
|
+
}
|
|
18734
|
+
const tempItem = {
|
|
18735
|
+
[catalogField]: key,
|
|
18736
|
+
[valueField]: tempValue,
|
|
18737
|
+
srfpercent: percent
|
|
18738
|
+
};
|
|
18739
|
+
tempData.push(tempItem);
|
|
18740
|
+
}
|
|
18741
|
+
}
|
|
18742
|
+
this.state.gridData = tempData;
|
|
18743
|
+
}
|
|
18744
|
+
/**
|
|
18745
|
+
* 处理多序列时的表格数据
|
|
18746
|
+
* 图表多序列时,首先去遍历序列,然后获取每个序列的分类属性和值属性以及已经分好的分组数据,
|
|
18747
|
+
* 查找当前的表格头数组中是否存在当前的分类或者值属性组成的项,如果没有就将当前分类或者值属性添加到表格头数组中,以序列作为表格列
|
|
18748
|
+
* 同理,循环当前序列的分组数据,并根据当前分组属性的值生成表格数据,如果在表格数据中已经存在具有相同分组属性值,则把当前序列的当前分组属性对应的值属性
|
|
18749
|
+
* 添加到表格数据中对应的项里
|
|
18750
|
+
*
|
|
18751
|
+
* @memberof ChartController
|
|
18752
|
+
*/
|
|
18753
|
+
handleMultipleSerieGridData() {
|
|
18754
|
+
const tempHeaders = [];
|
|
18755
|
+
const tempData = [];
|
|
18756
|
+
this.generator.seriesGenerators.forEach((serie) => {
|
|
18757
|
+
const { catalogField, valueField, groupData } = serie;
|
|
18758
|
+
const fields = serie.chartGenerator.entity.appDEFields;
|
|
18759
|
+
const _index = tempHeaders.findIndex((item) => {
|
|
18760
|
+
return item.id === catalogField;
|
|
18761
|
+
});
|
|
18762
|
+
if (_index < 0) {
|
|
18763
|
+
const cataTitle = fields.find((field) => {
|
|
18764
|
+
return field.id === catalogField.toLowerCase();
|
|
18765
|
+
});
|
|
18766
|
+
tempHeaders.push({
|
|
18767
|
+
id: catalogField,
|
|
18768
|
+
name: cataTitle == null ? void 0 : cataTitle.logicName
|
|
18769
|
+
});
|
|
18770
|
+
}
|
|
18771
|
+
const valueTitle = fields.find((field) => {
|
|
18772
|
+
return field.id === valueField.toLowerCase();
|
|
18773
|
+
});
|
|
18774
|
+
tempHeaders.push({
|
|
18775
|
+
id: valueField,
|
|
18776
|
+
name: valueTitle == null ? void 0 : valueTitle.logicName
|
|
18777
|
+
});
|
|
18778
|
+
if (groupData && groupData.$default_group) {
|
|
18779
|
+
const group = groupData.$default_group;
|
|
18780
|
+
for (const [key, value] of group) {
|
|
18781
|
+
const tempValue = Number.isNaN(Number(value.value)) ? 0 : Number(value.value);
|
|
18782
|
+
const index = tempData.findIndex((item) => {
|
|
18783
|
+
return item[catalogField] === key;
|
|
18784
|
+
});
|
|
18785
|
+
if (index < 0) {
|
|
18786
|
+
const tempItem = {
|
|
18787
|
+
[catalogField]: key,
|
|
18788
|
+
[valueField]: tempValue
|
|
18789
|
+
};
|
|
18790
|
+
tempData.push(tempItem);
|
|
18791
|
+
} else {
|
|
18792
|
+
Object.assign(tempData[index], { [valueField]: tempValue });
|
|
18793
|
+
}
|
|
18794
|
+
}
|
|
18795
|
+
}
|
|
18796
|
+
});
|
|
18797
|
+
this.state.gridHeaders = tempHeaders;
|
|
18798
|
+
this.state.gridData = tempData;
|
|
18799
|
+
}
|
|
18800
|
+
/**
|
|
18801
|
+
* 计算表格数据
|
|
18802
|
+
*
|
|
18803
|
+
* @memberof ChartController
|
|
18804
|
+
*/
|
|
18805
|
+
computeGridData() {
|
|
18806
|
+
if (this.generator && this.generator.seriesGenerators) {
|
|
18807
|
+
if (this.generator.seriesGenerators.length === 1) {
|
|
18808
|
+
this.handleSingleSerieGridData();
|
|
18809
|
+
} else {
|
|
18810
|
+
this.handleMultipleSerieGridData();
|
|
18811
|
+
}
|
|
18812
|
+
}
|
|
18813
|
+
}
|
|
18471
18814
|
/**
|
|
18472
18815
|
* 初始化echarts对象
|
|
18473
18816
|
* @author lxm
|
|
@@ -18492,6 +18835,9 @@ var ChartController = class extends MDControlController {
|
|
|
18492
18835
|
*/
|
|
18493
18836
|
calcOptions(data = this.state.items) {
|
|
18494
18837
|
this.options = this.generator.calcOptionsByData(data);
|
|
18838
|
+
if (this.state.showGrid) {
|
|
18839
|
+
this.computeGridData();
|
|
18840
|
+
}
|
|
18495
18841
|
this.updateChart();
|
|
18496
18842
|
}
|
|
18497
18843
|
/**
|
|
@@ -18737,7 +19083,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError33 }
|
|
|
18737
19083
|
|
|
18738
19084
|
// src/ui-logic/utils/handle-src-val.ts
|
|
18739
19085
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
18740
|
-
import { clone as
|
|
19086
|
+
import { clone as clone22 } from "ramda";
|
|
18741
19087
|
function handleSrcVal2(ctx, srcValParams) {
|
|
18742
19088
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
18743
19089
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -18764,7 +19110,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
18764
19110
|
value = ctx.parameters.context;
|
|
18765
19111
|
break;
|
|
18766
19112
|
case "ENVPARAM":
|
|
18767
|
-
value =
|
|
19113
|
+
value = clone22(ibiz.env);
|
|
18768
19114
|
break;
|
|
18769
19115
|
default:
|
|
18770
19116
|
throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -19158,7 +19504,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
19158
19504
|
|
|
19159
19505
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
19160
19506
|
import { ModelError as ModelError22, RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
19161
|
-
import { clone as
|
|
19507
|
+
import { clone as clone23 } from "ramda";
|
|
19162
19508
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
19163
19509
|
async exec(ctx) {
|
|
19164
19510
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -19168,7 +19514,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19168
19514
|
for (const nodeParam of nodeParams) {
|
|
19169
19515
|
let originValue;
|
|
19170
19516
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
19171
|
-
originValue =
|
|
19517
|
+
originValue = clone23(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
19172
19518
|
}
|
|
19173
19519
|
switch (nodeParam.paramAction) {
|
|
19174
19520
|
case "SETPARAMVALUE":
|
|
@@ -19257,7 +19603,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19257
19603
|
copyParam(nodeParam, ctx) {
|
|
19258
19604
|
const { dstDEUILogicParamId } = nodeParam;
|
|
19259
19605
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
19260
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19606
|
+
ctx.params[dstDEUILogicParamId] = clone23(srcVal);
|
|
19261
19607
|
}
|
|
19262
19608
|
/**
|
|
19263
19609
|
* 绑定参数
|
|
@@ -19502,7 +19848,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
19502
19848
|
|
|
19503
19849
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
19504
19850
|
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
19505
|
-
import { clone as
|
|
19851
|
+
import { clone as clone24 } from "ramda";
|
|
19506
19852
|
var CopyParamNode2 = class extends UILogicNode {
|
|
19507
19853
|
async exec(ctx) {
|
|
19508
19854
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -19513,7 +19859,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
19513
19859
|
);
|
|
19514
19860
|
}
|
|
19515
19861
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
19516
|
-
ctx.params[dstDEUILogicParamId] =
|
|
19862
|
+
ctx.params[dstDEUILogicParamId] = clone24(srcVal);
|
|
19517
19863
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
19518
19864
|
ibiz.log.debug(
|
|
19519
19865
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u62F7\u8D1D\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u503C\uFF1A"),
|
|
@@ -23068,12 +23414,14 @@ var FormController = class extends ControlController {
|
|
|
23068
23414
|
this.counters = {};
|
|
23069
23415
|
const { appCounterRefs } = this.model;
|
|
23070
23416
|
if (appCounterRefs && appCounterRefs.length > 0) {
|
|
23417
|
+
const dataKey = this.context[calcDeCodeNameById(this.model.appDataEntityId)];
|
|
23071
23418
|
try {
|
|
23072
23419
|
await Promise.all(
|
|
23073
23420
|
appCounterRefs.map(async (counterRef) => {
|
|
23074
23421
|
const counter = await CounterService.getCounterByRef(
|
|
23075
23422
|
counterRef,
|
|
23076
|
-
this.context
|
|
23423
|
+
this.context,
|
|
23424
|
+
dataKey ? { customId: dataKey } : void 0
|
|
23077
23425
|
);
|
|
23078
23426
|
this.counters[counterRef.id] = counter;
|
|
23079
23427
|
})
|
|
@@ -23093,7 +23441,7 @@ var FormController = class extends ControlController {
|
|
|
23093
23441
|
setDetailError(name, message) {
|
|
23094
23442
|
const detail = this.details[name];
|
|
23095
23443
|
const state = detail == null ? void 0 : detail.state;
|
|
23096
|
-
if (state
|
|
23444
|
+
if (state) {
|
|
23097
23445
|
state.error = message;
|
|
23098
23446
|
}
|
|
23099
23447
|
}
|
|
@@ -24008,7 +24356,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
24008
24356
|
|
|
24009
24357
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
24010
24358
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
24011
|
-
import { createUUID as createUUID10, notNilEmpty as
|
|
24359
|
+
import { createUUID as createUUID10, notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
24012
24360
|
|
|
24013
24361
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
24014
24362
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -24103,7 +24451,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
24103
24451
|
calcViewParams() {
|
|
24104
24452
|
let newContext = this.form.context.clone();
|
|
24105
24453
|
const navContexts = this.model.navigateContexts;
|
|
24106
|
-
if (
|
|
24454
|
+
if (notNilEmpty9(navContexts)) {
|
|
24107
24455
|
newContext = Object.assign(
|
|
24108
24456
|
newContext,
|
|
24109
24457
|
convertNavData(
|
|
@@ -24608,7 +24956,27 @@ var FormItemController = class extends FormDetailController {
|
|
|
24608
24956
|
|
|
24609
24957
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
24610
24958
|
import { BitMask } from "@ibiz-template/core";
|
|
24959
|
+
|
|
24960
|
+
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.ts
|
|
24961
|
+
var FormMDCtrlState = class extends FormDetailState {
|
|
24962
|
+
constructor() {
|
|
24963
|
+
super(...arguments);
|
|
24964
|
+
/**
|
|
24965
|
+
* 界面行为组状态
|
|
24966
|
+
*
|
|
24967
|
+
* @type {(IButtonContainerState | null)}
|
|
24968
|
+
* @memberof PortletPartState
|
|
24969
|
+
*/
|
|
24970
|
+
this.actionGroupState = null;
|
|
24971
|
+
}
|
|
24972
|
+
};
|
|
24973
|
+
|
|
24974
|
+
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
24611
24975
|
var FormMDCtrlController = class extends FormDetailController {
|
|
24976
|
+
createState() {
|
|
24977
|
+
var _a;
|
|
24978
|
+
return new FormMDCtrlState((_a = this.parent) == null ? void 0 : _a.state);
|
|
24979
|
+
}
|
|
24612
24980
|
/**
|
|
24613
24981
|
* 名称
|
|
24614
24982
|
* @author lxm
|
|
@@ -24682,6 +25050,68 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24682
25050
|
await this.form.updateFormItem(this.model.deformItemUpdateId);
|
|
24683
25051
|
}
|
|
24684
25052
|
}
|
|
25053
|
+
async formStateNotify(state) {
|
|
25054
|
+
super.formStateNotify(state);
|
|
25055
|
+
if (this.state.actionGroupState) {
|
|
25056
|
+
const deData = this.data.getOrigin ? this.data.getOrigin() : this.data;
|
|
25057
|
+
this.state.actionGroupState.update(this.form.context, deData);
|
|
25058
|
+
}
|
|
25059
|
+
}
|
|
25060
|
+
/**
|
|
25061
|
+
* 初始化
|
|
25062
|
+
*
|
|
25063
|
+
* @author zk
|
|
25064
|
+
* @date 2023-07-25 10:07:11
|
|
25065
|
+
* @return {*} {Promise<void>}
|
|
25066
|
+
* @memberof FormMDCtrlController
|
|
25067
|
+
*/
|
|
25068
|
+
async onInit() {
|
|
25069
|
+
super.onInit();
|
|
25070
|
+
await this.initActionStates();
|
|
25071
|
+
}
|
|
25072
|
+
async initActionStates() {
|
|
25073
|
+
var _a;
|
|
25074
|
+
const { uiactionGroup } = this.model;
|
|
25075
|
+
if (!((_a = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
25076
|
+
return;
|
|
25077
|
+
}
|
|
25078
|
+
const containerState = new ButtonContainerState();
|
|
25079
|
+
uiactionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
25080
|
+
const actionid = detail.uiactionId;
|
|
25081
|
+
if (actionid) {
|
|
25082
|
+
const buttonState = new UIActionButtonState(
|
|
25083
|
+
detail.id,
|
|
25084
|
+
this.form.context.srfappid,
|
|
25085
|
+
actionid
|
|
25086
|
+
);
|
|
25087
|
+
containerState.addState(detail.id, buttonState);
|
|
25088
|
+
}
|
|
25089
|
+
});
|
|
25090
|
+
await containerState.update(this.form.context);
|
|
25091
|
+
this.state.actionGroupState = containerState;
|
|
25092
|
+
}
|
|
25093
|
+
/**
|
|
25094
|
+
* 触发操作列点击事件
|
|
25095
|
+
*
|
|
25096
|
+
* @author lxm
|
|
25097
|
+
* @date 2022-09-07 22:09:46
|
|
25098
|
+
* @param {IPSUIActionGroupDetail} detail
|
|
25099
|
+
* @param {MouseEvent} event
|
|
25100
|
+
*/
|
|
25101
|
+
async onActionClick(detail, event) {
|
|
25102
|
+
const actionId = detail.uiactionId;
|
|
25103
|
+
await UIActionUtil.execAndResolved(
|
|
25104
|
+
actionId,
|
|
25105
|
+
{
|
|
25106
|
+
context: this.context,
|
|
25107
|
+
params: this.params,
|
|
25108
|
+
data: [this.data],
|
|
25109
|
+
view: this.form.view,
|
|
25110
|
+
event
|
|
25111
|
+
},
|
|
25112
|
+
detail.appId
|
|
25113
|
+
);
|
|
25114
|
+
}
|
|
24685
25115
|
/**
|
|
24686
25116
|
* 刷新
|
|
24687
25117
|
* @author lxm
|
|
@@ -24831,7 +25261,7 @@ import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError5
|
|
|
24831
25261
|
import { createUUID as createUUID11 } from "qx-util";
|
|
24832
25262
|
|
|
24833
25263
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
24834
|
-
var FormMDCtrlFormState = class extends
|
|
25264
|
+
var FormMDCtrlFormState = class extends FormMDCtrlState {
|
|
24835
25265
|
};
|
|
24836
25266
|
|
|
24837
25267
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
@@ -25002,7 +25432,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
25002
25432
|
|
|
25003
25433
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
25004
25434
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
25005
|
-
import { clone as
|
|
25435
|
+
import { clone as clone25 } from "ramda";
|
|
25006
25436
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
25007
25437
|
constructor() {
|
|
25008
25438
|
super(...arguments);
|
|
@@ -25086,7 +25516,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
25086
25516
|
copyFields.forEach((key) => {
|
|
25087
25517
|
tempForm[key] = this.form.model[key];
|
|
25088
25518
|
});
|
|
25089
|
-
this.repeatedForm =
|
|
25519
|
+
this.repeatedForm = clone25(tempForm);
|
|
25090
25520
|
}
|
|
25091
25521
|
/**
|
|
25092
25522
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -25258,14 +25688,14 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
25258
25688
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
25259
25689
|
import {
|
|
25260
25690
|
awaitTimeout,
|
|
25261
|
-
IBizContext as
|
|
25691
|
+
IBizContext as IBizContext5,
|
|
25262
25692
|
isElementSame as isElementSame2,
|
|
25263
25693
|
mergeInLeft as mergeInLeft2,
|
|
25264
25694
|
RuntimeError as RuntimeError55
|
|
25265
25695
|
} from "@ibiz-template/core";
|
|
25266
25696
|
import { debounce } from "lodash-es";
|
|
25267
25697
|
import { createUUID as createUUID12 } from "qx-util";
|
|
25268
|
-
import { clone as
|
|
25698
|
+
import { clone as clone26, isNil as isNil27 } from "ramda";
|
|
25269
25699
|
|
|
25270
25700
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
25271
25701
|
import {
|
|
@@ -25630,8 +26060,8 @@ var EditFormController = class extends FormController {
|
|
|
25630
26060
|
* @return {*} {Promise<IData>}
|
|
25631
26061
|
*/
|
|
25632
26062
|
async copy() {
|
|
25633
|
-
const context =
|
|
25634
|
-
const queryParams =
|
|
26063
|
+
const context = clone26(this.context);
|
|
26064
|
+
const queryParams = clone26(this.params);
|
|
25635
26065
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
25636
26066
|
this.model.appDataEntityId,
|
|
25637
26067
|
this.model.appId
|
|
@@ -25688,7 +26118,7 @@ var EditFormController = class extends FormController {
|
|
|
25688
26118
|
return this.loadDraft();
|
|
25689
26119
|
}
|
|
25690
26120
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25691
|
-
const queryParams =
|
|
26121
|
+
const queryParams = clone26(params);
|
|
25692
26122
|
let res;
|
|
25693
26123
|
try {
|
|
25694
26124
|
await this.startLoading();
|
|
@@ -25973,7 +26403,7 @@ var EditFormController = class extends FormController {
|
|
|
25973
26403
|
switch (autoSaveMode) {
|
|
25974
26404
|
case 3:
|
|
25975
26405
|
saveParam.data = this.getDiffData();
|
|
25976
|
-
saveParam.context =
|
|
26406
|
+
saveParam.context = IBizContext5.create({ srfsimple: true });
|
|
25977
26407
|
break;
|
|
25978
26408
|
default:
|
|
25979
26409
|
}
|
|
@@ -26301,7 +26731,7 @@ import {
|
|
|
26301
26731
|
RuntimeError as RuntimeError56,
|
|
26302
26732
|
RuntimeModelError as RuntimeModelError62
|
|
26303
26733
|
} from "@ibiz-template/core";
|
|
26304
|
-
import { clone as
|
|
26734
|
+
import { clone as clone27 } from "ramda";
|
|
26305
26735
|
import dayjs5 from "dayjs";
|
|
26306
26736
|
|
|
26307
26737
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -26651,7 +27081,7 @@ var GridController = class extends MDControlController {
|
|
|
26651
27081
|
const result = await calcColumnModelBySchema(json, this);
|
|
26652
27082
|
if (result && result.degridColumns.length > 0) {
|
|
26653
27083
|
const { degridColumns, degridDataItems } = result;
|
|
26654
|
-
this.model =
|
|
27084
|
+
this.model = clone27(this.model);
|
|
26655
27085
|
this.model.degridColumns = [
|
|
26656
27086
|
...(this.model.degridColumns || []).filter((item) => {
|
|
26657
27087
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -26776,28 +27206,35 @@ var GridController = class extends MDControlController {
|
|
|
26776
27206
|
this.gridStateNotify(row, "LOAD" /* LOAD */);
|
|
26777
27207
|
return row;
|
|
26778
27208
|
});
|
|
26779
|
-
this.state.rows
|
|
26780
|
-
Object.values(row.uaColStates).forEach((uaState) => {
|
|
26781
|
-
uaState.update(
|
|
26782
|
-
this.context,
|
|
26783
|
-
row.data.getOrigin(),
|
|
26784
|
-
this.model.appDataEntityId
|
|
26785
|
-
);
|
|
26786
|
-
});
|
|
26787
|
-
});
|
|
26788
|
-
this.state.rows.forEach((row) => {
|
|
26789
|
-
Object.values(row.uiActionGroupStates).forEach((uaState) => {
|
|
26790
|
-
uaState.update(
|
|
26791
|
-
this.context,
|
|
26792
|
-
row.data.getOrigin(),
|
|
26793
|
-
this.model.appDataEntityId
|
|
26794
|
-
);
|
|
26795
|
-
});
|
|
26796
|
-
});
|
|
27209
|
+
await this.updateRows(this.state.rows);
|
|
26797
27210
|
this.calcGroupData(items);
|
|
26798
27211
|
this.calcAggResult(items);
|
|
26799
27212
|
return items;
|
|
26800
27213
|
}
|
|
27214
|
+
/**
|
|
27215
|
+
* 更新行状态
|
|
27216
|
+
* @param rows
|
|
27217
|
+
*/
|
|
27218
|
+
async updateRows(rows) {
|
|
27219
|
+
for (const row of rows) {
|
|
27220
|
+
await Promise.all([
|
|
27221
|
+
...Object.values(row.uaColStates).map(
|
|
27222
|
+
(uaState) => uaState.update(
|
|
27223
|
+
this.context,
|
|
27224
|
+
row.data.getOrigin(),
|
|
27225
|
+
this.model.appDataEntityId
|
|
27226
|
+
)
|
|
27227
|
+
),
|
|
27228
|
+
...Object.values(row.uiActionGroupStates).map(
|
|
27229
|
+
(uaState) => uaState.update(
|
|
27230
|
+
this.context,
|
|
27231
|
+
row.data.getOrigin(),
|
|
27232
|
+
this.model.appDataEntityId
|
|
27233
|
+
)
|
|
27234
|
+
)
|
|
27235
|
+
]);
|
|
27236
|
+
}
|
|
27237
|
+
}
|
|
26801
27238
|
/**
|
|
26802
27239
|
* 计算分组数据
|
|
26803
27240
|
* @author lxm
|
|
@@ -27238,7 +27675,7 @@ var GridController = class extends MDControlController {
|
|
|
27238
27675
|
throw new RuntimeError56("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
27239
27676
|
}
|
|
27240
27677
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
27241
|
-
row.cacheData =
|
|
27678
|
+
row.cacheData = clone27(row.data);
|
|
27242
27679
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
27243
27680
|
Object.assign(row.data, defaultVal);
|
|
27244
27681
|
}
|
|
@@ -27377,7 +27814,7 @@ var GridController = class extends MDControlController {
|
|
|
27377
27814
|
*/
|
|
27378
27815
|
formatExcelData(data) {
|
|
27379
27816
|
const { fields = [] } = this.dataExportParam;
|
|
27380
|
-
const cloneData =
|
|
27817
|
+
const cloneData = clone27(
|
|
27381
27818
|
data.map((item) => {
|
|
27382
27819
|
return fields.reduce((obj, key) => {
|
|
27383
27820
|
obj[key] = item[key];
|
|
@@ -27641,7 +28078,7 @@ var GridController = class extends MDControlController {
|
|
|
27641
28078
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
27642
28079
|
import dayjs6 from "dayjs";
|
|
27643
28080
|
import { debounce as debounce2 } from "lodash-es";
|
|
27644
|
-
import { clone as
|
|
28081
|
+
import { clone as clone28, isNil as isNil28 } from "ramda";
|
|
27645
28082
|
var GridFieldColumnController = class extends GridColumnController {
|
|
27646
28083
|
constructor() {
|
|
27647
28084
|
super(...arguments);
|
|
@@ -27779,7 +28216,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27779
28216
|
srfkey: value,
|
|
27780
28217
|
...wfContext
|
|
27781
28218
|
});
|
|
27782
|
-
const tempParams =
|
|
28219
|
+
const tempParams = clone28(this.params);
|
|
27783
28220
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
27784
28221
|
row.data,
|
|
27785
28222
|
tempContext,
|
|
@@ -29196,11 +29633,33 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
29196
29633
|
|
|
29197
29634
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
29198
29635
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
29199
|
-
import { clone as
|
|
29636
|
+
import { clone as clone30 } from "ramda";
|
|
29200
29637
|
import { isString as isString2 } from "lodash-es";
|
|
29201
29638
|
|
|
29202
29639
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
29203
29640
|
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
29641
|
+
|
|
29642
|
+
// src/controller/control/search-bar/util.ts
|
|
29643
|
+
var ItemsValueOPs = [
|
|
29644
|
+
"EXISTS" /* EXISTS */,
|
|
29645
|
+
"NOTEXISTS" /* NOT_EXISTS */
|
|
29646
|
+
];
|
|
29647
|
+
var SubFieldRegex = /^N_(.\w+)_(.\w+)$/;
|
|
29648
|
+
function isSimpleItems(model) {
|
|
29649
|
+
var _a;
|
|
29650
|
+
return ((_a = model.userParam) == null ? void 0 : _a.ITEMTYPE) === "SIMPLE";
|
|
29651
|
+
}
|
|
29652
|
+
function isHiddenFilter(model) {
|
|
29653
|
+
var _a;
|
|
29654
|
+
return ((_a = model.userParam) == null ? void 0 : _a.ITEMTYPE) === "HIDDEN";
|
|
29655
|
+
}
|
|
29656
|
+
function parseSubFieldInfo(str) {
|
|
29657
|
+
const subStr = str.split("__")[1];
|
|
29658
|
+
const matches = subStr.match(SubFieldRegex);
|
|
29659
|
+
return { field: matches[1], op: matches[2] };
|
|
29660
|
+
}
|
|
29661
|
+
|
|
29662
|
+
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
29204
29663
|
var ExcludeOPs = [
|
|
29205
29664
|
"ISNULL" /* IS_NULL */,
|
|
29206
29665
|
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
@@ -29221,12 +29680,21 @@ var SearchBarFilterController = class {
|
|
|
29221
29680
|
* @type {boolean}
|
|
29222
29681
|
*/
|
|
29223
29682
|
this.noEditor = false;
|
|
29683
|
+
/**
|
|
29684
|
+
* 控制器类型
|
|
29685
|
+
* @author lxm
|
|
29686
|
+
* @date 2024-04-10 01:41:40
|
|
29687
|
+
* @type {('ITEMS' | 'SIMPLE_ITEMS' | 'FIELD')}
|
|
29688
|
+
*/
|
|
29689
|
+
this.type = "FIELD";
|
|
29224
29690
|
var _a;
|
|
29691
|
+
this.hidden = isHiddenFilter(model);
|
|
29225
29692
|
let field;
|
|
29226
29693
|
if (model.appDEFieldId) {
|
|
29227
29694
|
field = findFieldById(this.appDataEntity, model.appDEFieldId);
|
|
29228
29695
|
}
|
|
29229
29696
|
this.fieldName = field ? field.codeName.toLowerCase() : model.id;
|
|
29697
|
+
this.key = this.fieldName;
|
|
29230
29698
|
this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
|
|
29231
29699
|
this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
|
|
29232
29700
|
this.noEditor = this.valueOP ? ExcludeOPs.includes(this.valueOP) : !this.model.editor;
|
|
@@ -29265,7 +29733,7 @@ var SearchBarFilterController = class {
|
|
|
29265
29733
|
* 计算要递给编辑器的参数
|
|
29266
29734
|
* @author lxm
|
|
29267
29735
|
* @date 2024-02-04 06:35:28
|
|
29268
|
-
* @param {
|
|
29736
|
+
* @param {IFilterNodeField} node
|
|
29269
29737
|
* @return {*} {{ value: unknown; data: IData }}
|
|
29270
29738
|
*/
|
|
29271
29739
|
calcEditorProps(node) {
|
|
@@ -29284,7 +29752,7 @@ var SearchBarFilterController = class {
|
|
|
29284
29752
|
* 编辑器值变更处理
|
|
29285
29753
|
* @author lxm
|
|
29286
29754
|
* @date 2024-02-04 06:42:04
|
|
29287
|
-
* @param {
|
|
29755
|
+
* @param {IFilterNodeField} node
|
|
29288
29756
|
* @param {unknown} value
|
|
29289
29757
|
* @param {string} [name]
|
|
29290
29758
|
*/
|
|
@@ -29638,106 +30106,10 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
29638
30106
|
return addSearchBarFilters;
|
|
29639
30107
|
}
|
|
29640
30108
|
|
|
29641
|
-
// src/controller/control/search-bar/use-searchcond.ts
|
|
29642
|
-
import { RuntimeError as RuntimeError59, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
29643
|
-
import { isNil as isNil29 } from "ramda";
|
|
29644
|
-
var ExcludeOPs2 = ["ISNULL" /* IS_NULL */, "ISNOTNULL" /* IS_NOT_NULL */];
|
|
29645
|
-
function getOriginFilterNodes() {
|
|
29646
|
-
return [
|
|
29647
|
-
{
|
|
29648
|
-
leaf: false,
|
|
29649
|
-
logicType: "AND",
|
|
29650
|
-
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
29651
|
-
}
|
|
29652
|
-
];
|
|
29653
|
-
}
|
|
29654
|
-
function formatFilters(node) {
|
|
29655
|
-
if (!node.leaf) {
|
|
29656
|
-
if (node.logicType === "ITEMS") {
|
|
29657
|
-
return {
|
|
29658
|
-
condtype: "ITEMS",
|
|
29659
|
-
fieldname: node.field,
|
|
29660
|
-
condop: node.valueOP,
|
|
29661
|
-
searchconds: node.children.map((item) => formatFilters(item))
|
|
29662
|
-
};
|
|
29663
|
-
}
|
|
29664
|
-
return {
|
|
29665
|
-
condtype: "GROUP",
|
|
29666
|
-
condop: node.logicType,
|
|
29667
|
-
bnotmode: false,
|
|
29668
|
-
searchconds: node.children.map((item) => formatFilters(item))
|
|
29669
|
-
};
|
|
29670
|
-
}
|
|
29671
|
-
const leafNode = node;
|
|
29672
|
-
const temp = {
|
|
29673
|
-
condtype: "DEFIELD",
|
|
29674
|
-
fieldname: node.field,
|
|
29675
|
-
condop: node.valueOP,
|
|
29676
|
-
value: node.value
|
|
29677
|
-
};
|
|
29678
|
-
if (leafNode.valueItem) {
|
|
29679
|
-
temp.valueItem = leafNode.valueItem;
|
|
29680
|
-
}
|
|
29681
|
-
return temp;
|
|
29682
|
-
}
|
|
29683
|
-
function parseFilters(data) {
|
|
29684
|
-
if (data.condtype === "GROUP") {
|
|
29685
|
-
return {
|
|
29686
|
-
leaf: false,
|
|
29687
|
-
logicType: data.condop === "AND" ? "AND" : "OR",
|
|
29688
|
-
children: (data.searchconds || []).map(
|
|
29689
|
-
(item) => parseFilters(item)
|
|
29690
|
-
)
|
|
29691
|
-
};
|
|
29692
|
-
}
|
|
29693
|
-
if (data.condtype === "ITEMS") {
|
|
29694
|
-
return {
|
|
29695
|
-
leaf: false,
|
|
29696
|
-
logicType: "ITEMS",
|
|
29697
|
-
field: data.fieldname || null,
|
|
29698
|
-
valueOP: data.condop || null,
|
|
29699
|
-
children: (data.searchconds || []).map(
|
|
29700
|
-
(item) => parseFilters(item)
|
|
29701
|
-
)
|
|
29702
|
-
};
|
|
29703
|
-
}
|
|
29704
|
-
if (data.condtype === "DEFIELD") {
|
|
29705
|
-
return {
|
|
29706
|
-
leaf: true,
|
|
29707
|
-
field: data.fieldname || null,
|
|
29708
|
-
valueOP: data.condop || null,
|
|
29709
|
-
value: data.value || null,
|
|
29710
|
-
valueItem: data.valueItem || void 0
|
|
29711
|
-
};
|
|
29712
|
-
}
|
|
29713
|
-
throw new RuntimeError59("\u65E0\u6548\u7684condtype:".concat(data.condtype));
|
|
29714
|
-
}
|
|
29715
|
-
function calcSearchConds(filterNodes) {
|
|
29716
|
-
let hasFilter = false;
|
|
29717
|
-
let hasError = false;
|
|
29718
|
-
recursiveIterate9(filterNodes[0], (node) => {
|
|
29719
|
-
if (node.leaf) {
|
|
29720
|
-
if (node.field && node.valueOP && !isNil29(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
|
|
29721
|
-
hasFilter = true;
|
|
29722
|
-
} else {
|
|
29723
|
-
hasError = true;
|
|
29724
|
-
}
|
|
29725
|
-
}
|
|
29726
|
-
});
|
|
29727
|
-
if (hasFilter && !hasError) {
|
|
29728
|
-
const filter = [formatFilters(filterNodes[0])];
|
|
29729
|
-
return filter;
|
|
29730
|
-
}
|
|
29731
|
-
}
|
|
29732
|
-
|
|
29733
30109
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
29734
|
-
import { RuntimeError as
|
|
29735
|
-
import { clone as
|
|
29736
|
-
var
|
|
29737
|
-
"ISNULL" /* IS_NULL */,
|
|
29738
|
-
"ISNOTNULL" /* IS_NOT_NULL */
|
|
29739
|
-
];
|
|
29740
|
-
var SubFieldRegex = /^N_(.\w+)_(.\w+)$/;
|
|
30110
|
+
import { RuntimeError as RuntimeError59 } from "@ibiz-template/core";
|
|
30111
|
+
import { clone as clone29 } from "ramda";
|
|
30112
|
+
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
29741
30113
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
29742
30114
|
constructor(filterModels, appDataEntity, context, params) {
|
|
29743
30115
|
super(filterModels[0], appDataEntity, context, params);
|
|
@@ -29757,6 +30129,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29757
30129
|
* @type {Map<string, SearchBarFilterController>}
|
|
29758
30130
|
*/
|
|
29759
30131
|
this.subFilterCMap = /* @__PURE__ */ new Map();
|
|
30132
|
+
this.type = "ITEMS";
|
|
29760
30133
|
}
|
|
29761
30134
|
/**
|
|
29762
30135
|
* 计算标识
|
|
@@ -29793,7 +30166,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29793
30166
|
return false;
|
|
29794
30167
|
});
|
|
29795
30168
|
if (!minorDEId) {
|
|
29796
|
-
throw new
|
|
30169
|
+
throw new RuntimeError59("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
|
|
29797
30170
|
}
|
|
29798
30171
|
this.minorAppDE = await ibiz.hub.getAppDataEntity(
|
|
29799
30172
|
minorDEId,
|
|
@@ -29813,28 +30186,31 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29813
30186
|
this.filterModels.forEach((item) => {
|
|
29814
30187
|
var _a2;
|
|
29815
30188
|
const subStr = (_a2 = item.defsearchMode.codeName) == null ? void 0 : _a2.split("__")[1];
|
|
29816
|
-
const matches = subStr.match(
|
|
30189
|
+
const matches = subStr.match(SubFieldRegex2);
|
|
29817
30190
|
const subField = matches[1];
|
|
29818
30191
|
const subOP = matches[2];
|
|
30192
|
+
const cloneItem = clone29(item);
|
|
30193
|
+
cloneItem.defsearchMode.valueOP = subOP;
|
|
30194
|
+
cloneItem.id = subField;
|
|
30195
|
+
const filterC = new SearchBarFilterController(
|
|
30196
|
+
cloneItem,
|
|
30197
|
+
this.appDataEntity,
|
|
30198
|
+
this.context,
|
|
30199
|
+
this.params
|
|
30200
|
+
);
|
|
30201
|
+
this.subFilterCMap.set(this.calcKey(subField, subOP), filterC);
|
|
30202
|
+
if (filterC.hidden) {
|
|
30203
|
+
return;
|
|
30204
|
+
}
|
|
29819
30205
|
if (!fieldMap.has(subField)) {
|
|
29820
30206
|
fieldMap.set(subField, {
|
|
29821
30207
|
name: subField,
|
|
29822
30208
|
label: "",
|
|
29823
|
-
valueOPs: []
|
|
30209
|
+
valueOPs: [],
|
|
30210
|
+
fieldName: subField
|
|
29824
30211
|
});
|
|
29825
30212
|
}
|
|
29826
30213
|
fieldMap.get(subField).valueOPs.push(subOP);
|
|
29827
|
-
const cloneItem = clone28(item);
|
|
29828
|
-
cloneItem.defsearchMode.valueOP = subOP;
|
|
29829
|
-
this.subFilterCMap.set(
|
|
29830
|
-
this.calcKey(subField, subOP),
|
|
29831
|
-
new SearchBarFilterController(
|
|
29832
|
-
cloneItem,
|
|
29833
|
-
this.appDataEntity,
|
|
29834
|
-
this.context,
|
|
29835
|
-
this.params
|
|
29836
|
-
)
|
|
29837
|
-
);
|
|
29838
30214
|
});
|
|
29839
30215
|
(_a = this.minorAppDE.appDEFields) == null ? void 0 : _a.forEach((item) => {
|
|
29840
30216
|
const codeName = item.codeName.toUpperCase();
|
|
@@ -29850,6 +30226,9 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29850
30226
|
async init() {
|
|
29851
30227
|
await this.initMinorAppDE();
|
|
29852
30228
|
await this.initAllFields();
|
|
30229
|
+
this.hidden = Array.from(this.subFilterCMap.values()).every(
|
|
30230
|
+
(item) => item.hidden
|
|
30231
|
+
);
|
|
29853
30232
|
}
|
|
29854
30233
|
/**
|
|
29855
30234
|
* 获取子搜索栏控制器
|
|
@@ -29864,13 +30243,246 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29864
30243
|
}
|
|
29865
30244
|
};
|
|
29866
30245
|
|
|
30246
|
+
// src/controller/control/search-bar/interface-util.ts
|
|
30247
|
+
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
30248
|
+
import { isNil as isNil29 } from "ramda";
|
|
30249
|
+
function getOriginFilterNodes() {
|
|
30250
|
+
return [
|
|
30251
|
+
{
|
|
30252
|
+
nodeType: "GROUP",
|
|
30253
|
+
logicType: "AND",
|
|
30254
|
+
children: [
|
|
30255
|
+
{ nodeType: "FIELD", field: null, valueOP: null, value: null }
|
|
30256
|
+
]
|
|
30257
|
+
}
|
|
30258
|
+
];
|
|
30259
|
+
}
|
|
30260
|
+
function validateFilterNodes(filterNodes) {
|
|
30261
|
+
const result = { pass: false };
|
|
30262
|
+
let hasFilter = false;
|
|
30263
|
+
let hasError = false;
|
|
30264
|
+
recursiveIterate9(filterNodes[0], (node) => {
|
|
30265
|
+
if (hasError) {
|
|
30266
|
+
return;
|
|
30267
|
+
}
|
|
30268
|
+
if (node.nodeType === "FIELD") {
|
|
30269
|
+
hasFilter = true;
|
|
30270
|
+
hasError = !node.field || !node.valueOP || isNil29(node.value);
|
|
30271
|
+
} else if (node.nodeType === "ITEMS") {
|
|
30272
|
+
hasError = !node.field || !node.valueOP;
|
|
30273
|
+
} else {
|
|
30274
|
+
hasError = !node.logicType;
|
|
30275
|
+
}
|
|
30276
|
+
});
|
|
30277
|
+
if (hasFilter && !hasError) {
|
|
30278
|
+
result.pass = true;
|
|
30279
|
+
}
|
|
30280
|
+
return result;
|
|
30281
|
+
}
|
|
30282
|
+
function filterNode2SearchCond(filterNode, opts) {
|
|
30283
|
+
let result;
|
|
30284
|
+
if (filterNode.nodeType === "GROUP") {
|
|
30285
|
+
const temp = {
|
|
30286
|
+
condop: filterNode.logicType,
|
|
30287
|
+
condtype: "GROUP"
|
|
30288
|
+
};
|
|
30289
|
+
if (filterNode.children.length > 0) {
|
|
30290
|
+
temp.searchconds = filterNode.children.map(
|
|
30291
|
+
(item) => filterNode2SearchCond(item, opts)
|
|
30292
|
+
);
|
|
30293
|
+
}
|
|
30294
|
+
result = temp;
|
|
30295
|
+
if (filterNode.notMode) {
|
|
30296
|
+
temp.notmode = filterNode.notMode;
|
|
30297
|
+
}
|
|
30298
|
+
} else if (filterNode.nodeType === "FIELD") {
|
|
30299
|
+
const temp = {
|
|
30300
|
+
condtype: "DEFIELD",
|
|
30301
|
+
fieldname: filterNode.field,
|
|
30302
|
+
value: filterNode.value,
|
|
30303
|
+
condop: filterNode.valueOP
|
|
30304
|
+
};
|
|
30305
|
+
if (filterNode.valueItem) {
|
|
30306
|
+
temp.value = filterNode.valueItem;
|
|
30307
|
+
}
|
|
30308
|
+
result = temp;
|
|
30309
|
+
} else {
|
|
30310
|
+
const temp = {
|
|
30311
|
+
condop: filterNode.valueOP,
|
|
30312
|
+
fieldname: filterNode.field,
|
|
30313
|
+
condtype: "ITEMS"
|
|
30314
|
+
};
|
|
30315
|
+
if (filterNode.children.length > 0) {
|
|
30316
|
+
temp.searchconds = filterNode.children.map(
|
|
30317
|
+
(item) => filterNode2SearchCond(item, opts)
|
|
30318
|
+
);
|
|
30319
|
+
}
|
|
30320
|
+
result = temp;
|
|
30321
|
+
}
|
|
30322
|
+
if (opts == null ? void 0 : opts.after) {
|
|
30323
|
+
opts.after(filterNode, result);
|
|
30324
|
+
}
|
|
30325
|
+
return result;
|
|
30326
|
+
}
|
|
30327
|
+
function calcSearchConds(filterNodes, opts) {
|
|
30328
|
+
const { pass } = validateFilterNodes(filterNodes);
|
|
30329
|
+
if (!pass) {
|
|
30330
|
+
return;
|
|
30331
|
+
}
|
|
30332
|
+
const result = filterNodes.map((node) => filterNode2SearchCond(node, opts));
|
|
30333
|
+
return result;
|
|
30334
|
+
}
|
|
30335
|
+
function SearchCondEx2filterNode(cond) {
|
|
30336
|
+
var _a, _b;
|
|
30337
|
+
let result;
|
|
30338
|
+
if (cond.condtype === "GROUP") {
|
|
30339
|
+
const temp = {
|
|
30340
|
+
logicType: cond.condop,
|
|
30341
|
+
nodeType: "GROUP",
|
|
30342
|
+
children: []
|
|
30343
|
+
};
|
|
30344
|
+
if ((_a = cond.searchconds) == null ? void 0 : _a.length) {
|
|
30345
|
+
temp.children = cond.searchconds.map(
|
|
30346
|
+
(item) => SearchCondEx2filterNode(item)
|
|
30347
|
+
);
|
|
30348
|
+
}
|
|
30349
|
+
result = temp;
|
|
30350
|
+
if (cond.notmode) {
|
|
30351
|
+
temp.notMode = cond.notmode;
|
|
30352
|
+
}
|
|
30353
|
+
} else if (cond.condtype === "DEFIELD") {
|
|
30354
|
+
const temp = {
|
|
30355
|
+
nodeType: "FIELD",
|
|
30356
|
+
field: cond.fieldname,
|
|
30357
|
+
value: cond.value,
|
|
30358
|
+
valueOP: cond.condop
|
|
30359
|
+
};
|
|
30360
|
+
if (cond.valueItem) {
|
|
30361
|
+
temp.valueItem = cond.valueItem;
|
|
30362
|
+
}
|
|
30363
|
+
result = temp;
|
|
30364
|
+
} else {
|
|
30365
|
+
const temp = {
|
|
30366
|
+
nodeType: "ITEMS",
|
|
30367
|
+
field: cond.fieldname,
|
|
30368
|
+
valueOP: cond.condop,
|
|
30369
|
+
children: []
|
|
30370
|
+
};
|
|
30371
|
+
if ((_b = cond.searchconds) == null ? void 0 : _b.length) {
|
|
30372
|
+
temp.children = cond.searchconds.map(
|
|
30373
|
+
(item) => SearchCondEx2filterNode(item)
|
|
30374
|
+
);
|
|
30375
|
+
}
|
|
30376
|
+
if (cond.simple) {
|
|
30377
|
+
temp.simple = cond.simple;
|
|
30378
|
+
}
|
|
30379
|
+
result = temp;
|
|
30380
|
+
}
|
|
30381
|
+
if (cond.hidden === true) {
|
|
30382
|
+
result.hidden = true;
|
|
30383
|
+
}
|
|
30384
|
+
return result;
|
|
30385
|
+
}
|
|
30386
|
+
function filterNode2SearchCondEx(filterNode) {
|
|
30387
|
+
let result;
|
|
30388
|
+
if (filterNode.nodeType === "GROUP") {
|
|
30389
|
+
const temp = {
|
|
30390
|
+
condop: filterNode.logicType,
|
|
30391
|
+
condtype: "GROUP"
|
|
30392
|
+
};
|
|
30393
|
+
if (filterNode.children.length > 0) {
|
|
30394
|
+
temp.searchconds = filterNode.children.map(
|
|
30395
|
+
(item) => filterNode2SearchCondEx(item)
|
|
30396
|
+
);
|
|
30397
|
+
}
|
|
30398
|
+
result = temp;
|
|
30399
|
+
if (filterNode.notMode) {
|
|
30400
|
+
temp.notmode = filterNode.notMode;
|
|
30401
|
+
}
|
|
30402
|
+
} else if (filterNode.nodeType === "FIELD") {
|
|
30403
|
+
const temp = {
|
|
30404
|
+
condtype: "DEFIELD",
|
|
30405
|
+
fieldname: filterNode.field,
|
|
30406
|
+
value: filterNode.value,
|
|
30407
|
+
condop: filterNode.valueOP
|
|
30408
|
+
};
|
|
30409
|
+
if (filterNode.valueItem) {
|
|
30410
|
+
temp.valueItem = filterNode.valueItem;
|
|
30411
|
+
}
|
|
30412
|
+
result = temp;
|
|
30413
|
+
} else {
|
|
30414
|
+
const temp = {
|
|
30415
|
+
condop: filterNode.valueOP,
|
|
30416
|
+
fieldname: filterNode.field,
|
|
30417
|
+
condtype: "ITEMS"
|
|
30418
|
+
};
|
|
30419
|
+
if (filterNode.children.length > 0) {
|
|
30420
|
+
temp.searchconds = filterNode.children.map(
|
|
30421
|
+
(item) => filterNode2SearchCondEx(item)
|
|
30422
|
+
);
|
|
30423
|
+
}
|
|
30424
|
+
if (filterNode.simple) {
|
|
30425
|
+
temp.simple = filterNode.simple;
|
|
30426
|
+
}
|
|
30427
|
+
result = temp;
|
|
30428
|
+
}
|
|
30429
|
+
if (filterNode.hidden === true) {
|
|
30430
|
+
result.hidden = true;
|
|
30431
|
+
}
|
|
30432
|
+
return result;
|
|
30433
|
+
}
|
|
30434
|
+
function calcSearchCondExs(filterNodes) {
|
|
30435
|
+
const { pass } = validateFilterNodes(filterNodes);
|
|
30436
|
+
if (!pass) {
|
|
30437
|
+
return;
|
|
30438
|
+
}
|
|
30439
|
+
const result = filterNodes.map(filterNode2SearchCondEx);
|
|
30440
|
+
return result;
|
|
30441
|
+
}
|
|
30442
|
+
|
|
30443
|
+
// src/controller/control/search-bar/search-bar-filter-simple-items.controller.ts
|
|
30444
|
+
var SearchBarFilterSimpleItemsController = class extends SearchBarFilterController {
|
|
30445
|
+
constructor(filterModel, appDataEntity, context, params) {
|
|
30446
|
+
super(filterModel, appDataEntity, context, params);
|
|
30447
|
+
this.noEditor = false;
|
|
30448
|
+
this.key = this.model.id;
|
|
30449
|
+
this.type = "SIMPLE_ITEMS";
|
|
30450
|
+
const info = parseSubFieldInfo(filterModel.defsearchMode.codeName);
|
|
30451
|
+
this.subFieldName = info.field;
|
|
30452
|
+
this.subValueOP = info.op;
|
|
30453
|
+
}
|
|
30454
|
+
/**
|
|
30455
|
+
* 简单模式下添加节点逻辑
|
|
30456
|
+
* @author lxm
|
|
30457
|
+
* @date 2024-04-07 05:44:47
|
|
30458
|
+
* @param {IFilterNodeField} node
|
|
30459
|
+
* @return {*} {void}
|
|
30460
|
+
*/
|
|
30461
|
+
addSimpleFilterNode(node) {
|
|
30462
|
+
Object.assign(node, {
|
|
30463
|
+
simple: true,
|
|
30464
|
+
field: this.fieldName,
|
|
30465
|
+
nodeType: "ITEMS",
|
|
30466
|
+
valueOP: this.valueOP,
|
|
30467
|
+
children: [
|
|
30468
|
+
{
|
|
30469
|
+
nodeType: "FIELD",
|
|
30470
|
+
field: this.subFieldName,
|
|
30471
|
+
valueOP: this.subValueOP,
|
|
30472
|
+
value: null
|
|
30473
|
+
}
|
|
30474
|
+
]
|
|
30475
|
+
});
|
|
30476
|
+
}
|
|
30477
|
+
};
|
|
30478
|
+
|
|
29867
30479
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
29868
30480
|
var ScriptValueRegex2 = /\$\{[^}]*\}/;
|
|
29869
30481
|
var SearchBarController = class extends ControlController {
|
|
29870
30482
|
constructor() {
|
|
29871
30483
|
super(...arguments);
|
|
29872
30484
|
/**
|
|
29873
|
-
*
|
|
30485
|
+
* 快速搜索占位符(根据属性计算出来的快速搜索占位符)
|
|
29874
30486
|
* @return {*}
|
|
29875
30487
|
* @author: zhujiamin
|
|
29876
30488
|
* @Date: 2023-08-11 14:13:10
|
|
@@ -29944,6 +30556,10 @@ var SearchBarController = class extends ControlController {
|
|
|
29944
30556
|
this.state.selectedGroupItem = null;
|
|
29945
30557
|
this.state.searchBarGroups = [];
|
|
29946
30558
|
this.state.selectedSearchGroupItem = null;
|
|
30559
|
+
this.state.advancedQuickSearch = false;
|
|
30560
|
+
this.state.quickSearchItems = [];
|
|
30561
|
+
this.state.quickSearchFieldNames = [];
|
|
30562
|
+
this.state.quickSearchPlaceHolder = "";
|
|
29947
30563
|
this.resetFilter();
|
|
29948
30564
|
this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.enableFilter);
|
|
29949
30565
|
}
|
|
@@ -29957,6 +30573,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29957
30573
|
if (appDataEntity) {
|
|
29958
30574
|
this.appDataEntity = appDataEntity;
|
|
29959
30575
|
this.calcQuickSearchPlaceholder();
|
|
30576
|
+
this.initAdvancedQuickSearch();
|
|
29960
30577
|
}
|
|
29961
30578
|
if (this.isBackendSearchGroup && this.view.model.codeName) {
|
|
29962
30579
|
this.service = new SearchBarService(
|
|
@@ -30004,7 +30621,7 @@ var SearchBarController = class extends ControlController {
|
|
|
30004
30621
|
}
|
|
30005
30622
|
});
|
|
30006
30623
|
if (addSearchBarFilters.length > 0) {
|
|
30007
|
-
this.model =
|
|
30624
|
+
this.model = clone30(this.model);
|
|
30008
30625
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
30009
30626
|
this.model.enableFilter = true;
|
|
30010
30627
|
}
|
|
@@ -30039,6 +30656,7 @@ var SearchBarController = class extends ControlController {
|
|
|
30039
30656
|
});
|
|
30040
30657
|
if (placeHolders.length > 0) {
|
|
30041
30658
|
this.placeHolder = placeHolders.join("\u3001");
|
|
30659
|
+
this.state.quickSearchPlaceHolder = this.placeHolder;
|
|
30042
30660
|
}
|
|
30043
30661
|
}
|
|
30044
30662
|
}
|
|
@@ -30088,6 +30706,11 @@ var SearchBarController = class extends ControlController {
|
|
|
30088
30706
|
const params = {};
|
|
30089
30707
|
if (this.state.query) {
|
|
30090
30708
|
params.query = this.state.query;
|
|
30709
|
+
if (this.state.advancedQuickSearch && this.state.quickSearchFieldNames.length) {
|
|
30710
|
+
params.queryconds = this.state.quickSearchFieldNames.map(
|
|
30711
|
+
(name) => "n_".concat(name, "_like")
|
|
30712
|
+
);
|
|
30713
|
+
}
|
|
30091
30714
|
}
|
|
30092
30715
|
if (((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) && typeof this.state.selectedGroupItem.data === "string" && !this.isBackendSearchGroup) {
|
|
30093
30716
|
const navParams = ScriptFactory.execSingleLine(
|
|
@@ -30124,7 +30747,18 @@ var SearchBarController = class extends ControlController {
|
|
|
30124
30747
|
const itemsMap = /* @__PURE__ */ new Map();
|
|
30125
30748
|
this.searchBarFilters.forEach((item) => {
|
|
30126
30749
|
var _a2;
|
|
30127
|
-
if (((_a2 = item.defsearchMode) == null ? void 0 : _a2.valueOP) &&
|
|
30750
|
+
if (((_a2 = item.defsearchMode) == null ? void 0 : _a2.valueOP) && ItemsValueOPs.includes(item.defsearchMode.valueOP)) {
|
|
30751
|
+
if (isSimpleItems(item)) {
|
|
30752
|
+
this.filterControllers.push(
|
|
30753
|
+
new SearchBarFilterSimpleItemsController(
|
|
30754
|
+
item,
|
|
30755
|
+
this.appDataEntity,
|
|
30756
|
+
this.context,
|
|
30757
|
+
this.params
|
|
30758
|
+
)
|
|
30759
|
+
);
|
|
30760
|
+
return;
|
|
30761
|
+
}
|
|
30128
30762
|
const key = "".concat(item.appDEFieldId, "_").concat(item.defsearchMode.valueOP);
|
|
30129
30763
|
if (!itemsMap.has(key)) {
|
|
30130
30764
|
itemsMap.set(key, []);
|
|
@@ -30162,45 +30796,24 @@ var SearchBarController = class extends ControlController {
|
|
|
30162
30796
|
* @date 2023-10-13 05:53:35
|
|
30163
30797
|
* @return {*} {IData}
|
|
30164
30798
|
*/
|
|
30165
|
-
calcFilters(
|
|
30799
|
+
calcFilters() {
|
|
30166
30800
|
if (!this.enableFilter) {
|
|
30167
30801
|
return;
|
|
30168
30802
|
}
|
|
30169
|
-
const searchconds = calcSearchConds(this.state.filterNodes
|
|
30170
|
-
|
|
30171
|
-
|
|
30172
|
-
|
|
30173
|
-
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30177
|
-
node.condop
|
|
30178
|
-
);
|
|
30179
|
-
if (!controller && parent.condtype === "ITEMS") {
|
|
30180
|
-
const itemC = this.findFilterController(
|
|
30181
|
-
parent.fieldname,
|
|
30182
|
-
parent.condop
|
|
30183
|
-
);
|
|
30184
|
-
controller = itemC.getSubFilterController(
|
|
30185
|
-
node.fieldname,
|
|
30186
|
-
node.condop
|
|
30187
|
-
);
|
|
30188
|
-
}
|
|
30189
|
-
if (controller) {
|
|
30190
|
-
if (controller.valueItem && node.valueItem) {
|
|
30191
|
-
node.value = node.valueItem;
|
|
30192
|
-
delete node.valueItem;
|
|
30193
|
-
} else if (ScriptValueRegex2.test(node.value)) {
|
|
30194
|
-
node.value = ScriptFactory.execSingleLine("`".concat(node.value, "`"), {
|
|
30195
|
-
...this.getEventArgs()
|
|
30196
|
-
});
|
|
30803
|
+
const searchconds = calcSearchConds(this.state.filterNodes, {
|
|
30804
|
+
after: (node, cond) => {
|
|
30805
|
+
if (node.nodeType === "FIELD" && isString2(node.value)) {
|
|
30806
|
+
if (ScriptValueRegex2.test(node.value)) {
|
|
30807
|
+
cond.value = ScriptFactory.execSingleLine(
|
|
30808
|
+
"`".concat(node.value, "`"),
|
|
30809
|
+
{
|
|
30810
|
+
...this.getEventArgs()
|
|
30197
30811
|
}
|
|
30198
|
-
|
|
30812
|
+
);
|
|
30199
30813
|
}
|
|
30200
|
-
}
|
|
30201
|
-
|
|
30202
|
-
|
|
30203
|
-
}
|
|
30814
|
+
}
|
|
30815
|
+
}
|
|
30816
|
+
});
|
|
30204
30817
|
return searchconds;
|
|
30205
30818
|
}
|
|
30206
30819
|
/**
|
|
@@ -30316,7 +30929,7 @@ var SearchBarController = class extends ControlController {
|
|
|
30316
30929
|
*/
|
|
30317
30930
|
async handleSave() {
|
|
30318
30931
|
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
30319
|
-
const filters = this.
|
|
30932
|
+
const filters = calcSearchCondExs(this.state.filterNodes);
|
|
30320
30933
|
const saveParams = {
|
|
30321
30934
|
searchconds: filters,
|
|
30322
30935
|
sort: this.grid.state.sortQuery,
|
|
@@ -30364,14 +30977,14 @@ var SearchBarController = class extends ControlController {
|
|
|
30364
30977
|
}
|
|
30365
30978
|
if (groupItem.searchGroupData && groupItem.searchGroupData.searchconds && groupItem.searchGroupData.searchconds.length > 0) {
|
|
30366
30979
|
const filterNodes = groupItem.searchGroupData.searchconds.map(
|
|
30367
|
-
(item) =>
|
|
30980
|
+
(item) => SearchCondEx2filterNode(item)
|
|
30368
30981
|
);
|
|
30369
30982
|
this.state.filterNodes = filterNodes;
|
|
30370
30983
|
} else {
|
|
30371
30984
|
this.state.filterNodes = getOriginFilterNodes();
|
|
30372
30985
|
}
|
|
30373
30986
|
recursiveIterate10(this.state.filterNodes[0], (node) => {
|
|
30374
|
-
if (node.
|
|
30987
|
+
if (node.nodeType === "FIELD") {
|
|
30375
30988
|
if (node.field && node.valueOP && isString2(node.value) && ScriptValueRegex2.test(node.value)) {
|
|
30376
30989
|
node.disabled = true;
|
|
30377
30990
|
}
|
|
@@ -30382,6 +30995,50 @@ var SearchBarController = class extends ControlController {
|
|
|
30382
30995
|
await this.grid.load({ isInitialLoad: true });
|
|
30383
30996
|
}
|
|
30384
30997
|
}
|
|
30998
|
+
/**
|
|
30999
|
+
* 初始化高级搜索
|
|
31000
|
+
* @author lxm
|
|
31001
|
+
* @date 2024-04-11 11:44:10
|
|
31002
|
+
* @protected
|
|
31003
|
+
*/
|
|
31004
|
+
initAdvancedQuickSearch() {
|
|
31005
|
+
var _a;
|
|
31006
|
+
if (this.model.quickSearchMode === 2 && ((_a = this.model.searchBarQuickSearchs) == null ? void 0 : _a.length)) {
|
|
31007
|
+
this.state.advancedQuickSearch = true;
|
|
31008
|
+
this.state.quickSearchItems = [];
|
|
31009
|
+
this.state.quickSearchFieldNames = [];
|
|
31010
|
+
this.model.searchBarQuickSearchs.forEach((item) => {
|
|
31011
|
+
const filed = findFieldById(this.appDataEntity, item.appDEFieldId);
|
|
31012
|
+
const fieldName = filed.codeName.toLowerCase();
|
|
31013
|
+
this.state.quickSearchItems.push({
|
|
31014
|
+
fieldName,
|
|
31015
|
+
label: filed.logicName
|
|
31016
|
+
});
|
|
31017
|
+
this.state.quickSearchFieldNames.push(fieldName);
|
|
31018
|
+
});
|
|
31019
|
+
this.calcQuickSearchPlaceHolder();
|
|
31020
|
+
}
|
|
31021
|
+
}
|
|
31022
|
+
/**
|
|
31023
|
+
* 计算快速搜索占位符
|
|
31024
|
+
* @author lxm
|
|
31025
|
+
* @date 2024-04-11 05:36:52
|
|
31026
|
+
*/
|
|
31027
|
+
calcQuickSearchPlaceHolder() {
|
|
31028
|
+
if (this.state.advancedQuickSearch) {
|
|
31029
|
+
if (this.state.quickSearchFieldNames.length) {
|
|
31030
|
+
const labels = [];
|
|
31031
|
+
this.state.quickSearchItems.forEach((item) => {
|
|
31032
|
+
if (this.state.quickSearchFieldNames.includes(item.fieldName)) {
|
|
31033
|
+
labels.push(item.label);
|
|
31034
|
+
}
|
|
31035
|
+
});
|
|
31036
|
+
this.state.quickSearchPlaceHolder = labels.join("\u3001");
|
|
31037
|
+
} else {
|
|
31038
|
+
this.state.quickSearchPlaceHolder = this.placeHolder;
|
|
31039
|
+
}
|
|
31040
|
+
}
|
|
31041
|
+
}
|
|
30385
31042
|
};
|
|
30386
31043
|
|
|
30387
31044
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
@@ -30543,6 +31200,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
30543
31200
|
navViewMsg.isRoutePushed = true;
|
|
30544
31201
|
}
|
|
30545
31202
|
this.evt.emit("onNavViewChange", { navViewMsg });
|
|
31203
|
+
this.evt.emit("onTabChange", { tab });
|
|
30546
31204
|
}
|
|
30547
31205
|
/**
|
|
30548
31206
|
* 当前激活tab模型
|
|
@@ -30630,11 +31288,11 @@ var TabExpPanelController = class extends ControlController {
|
|
|
30630
31288
|
|
|
30631
31289
|
// src/controller/control/tree/tree.controller.ts
|
|
30632
31290
|
import {
|
|
30633
|
-
RuntimeError as
|
|
31291
|
+
RuntimeError as RuntimeError60,
|
|
30634
31292
|
RuntimeModelError as RuntimeModelError65,
|
|
30635
31293
|
recursiveIterate as recursiveIterate11
|
|
30636
31294
|
} from "@ibiz-template/core";
|
|
30637
|
-
import { isNil as
|
|
31295
|
+
import { isNil as isNil30 } from "ramda";
|
|
30638
31296
|
|
|
30639
31297
|
// src/controller/control/tree/tree.service.ts
|
|
30640
31298
|
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
@@ -31672,7 +32330,7 @@ var TreeController = class extends MDControlController {
|
|
|
31672
32330
|
throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
31673
32331
|
}
|
|
31674
32332
|
if (nodeData._nodeType !== "DE") {
|
|
31675
|
-
throw new
|
|
32333
|
+
throw new RuntimeError60("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
31676
32334
|
}
|
|
31677
32335
|
nodeData._text = text;
|
|
31678
32336
|
await this.updateDeNodeData([nodeData]);
|
|
@@ -31688,7 +32346,7 @@ var TreeController = class extends MDControlController {
|
|
|
31688
32346
|
let needRefresh = false;
|
|
31689
32347
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
31690
32348
|
if (!treeNode) {
|
|
31691
|
-
throw new
|
|
32349
|
+
throw new RuntimeError60("\u672A\u627E\u5230\u6811\u8282\u70B9");
|
|
31692
32350
|
}
|
|
31693
32351
|
const nodeAppDataEntityId = treeNode.appDataEntityId;
|
|
31694
32352
|
if (nodeAppDataEntityId) {
|
|
@@ -31712,7 +32370,7 @@ var TreeController = class extends MDControlController {
|
|
|
31712
32370
|
* @return {*} {void}
|
|
31713
32371
|
*/
|
|
31714
32372
|
onDEDataChange(msg) {
|
|
31715
|
-
if (!
|
|
32373
|
+
if (!isNil30(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
31716
32374
|
return;
|
|
31717
32375
|
}
|
|
31718
32376
|
if (msg.subtype === "OBJECTCREATED") {
|
|
@@ -31732,7 +32390,7 @@ var TreeController = class extends MDControlController {
|
|
|
31732
32390
|
};
|
|
31733
32391
|
|
|
31734
32392
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
31735
|
-
import { RuntimeError as
|
|
32393
|
+
import { RuntimeError as RuntimeError61 } from "@ibiz-template/core";
|
|
31736
32394
|
|
|
31737
32395
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
31738
32396
|
var WizardPanelService = class extends ControlService {
|
|
@@ -31898,7 +32556,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31898
32556
|
const { activeFormTag } = this.state;
|
|
31899
32557
|
const controller = this.formControllers.get(activeFormTag);
|
|
31900
32558
|
if (!controller) {
|
|
31901
|
-
throw new
|
|
32559
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
31902
32560
|
}
|
|
31903
32561
|
return controller;
|
|
31904
32562
|
}
|
|
@@ -31940,7 +32598,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31940
32598
|
getWizardFormByTag(tag) {
|
|
31941
32599
|
var _a;
|
|
31942
32600
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
31943
|
-
throw new
|
|
32601
|
+
throw new RuntimeError61("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
31944
32602
|
return;
|
|
31945
32603
|
}
|
|
31946
32604
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -31949,7 +32607,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31949
32607
|
}
|
|
31950
32608
|
);
|
|
31951
32609
|
if (!wizardForm) {
|
|
31952
|
-
throw new
|
|
32610
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
31953
32611
|
}
|
|
31954
32612
|
return wizardForm;
|
|
31955
32613
|
}
|
|
@@ -32020,7 +32678,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
32020
32678
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
32021
32679
|
}
|
|
32022
32680
|
if (!prevTag) {
|
|
32023
|
-
throw new
|
|
32681
|
+
throw new RuntimeError61("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
32024
32682
|
}
|
|
32025
32683
|
this.state.activeFormTag = prevTag;
|
|
32026
32684
|
}
|
|
@@ -32056,7 +32714,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
32056
32714
|
});
|
|
32057
32715
|
const nextWizardStep = wizardSteps[index + 1];
|
|
32058
32716
|
if (!nextWizardStep) {
|
|
32059
|
-
throw new
|
|
32717
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
32060
32718
|
}
|
|
32061
32719
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
32062
32720
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -32065,7 +32723,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
32065
32723
|
}
|
|
32066
32724
|
}
|
|
32067
32725
|
if (!nextTag) {
|
|
32068
|
-
throw new
|
|
32726
|
+
throw new RuntimeError61("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
32069
32727
|
}
|
|
32070
32728
|
this.state.activeFormTag = nextTag;
|
|
32071
32729
|
this.tagHistory.push(nextTag);
|
|
@@ -32085,7 +32743,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
32085
32743
|
|
|
32086
32744
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
32087
32745
|
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
32088
|
-
import { isNil as
|
|
32746
|
+
import { isNil as isNil31 } from "ramda";
|
|
32089
32747
|
|
|
32090
32748
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
32091
32749
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -32314,7 +32972,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
32314
32972
|
const groupMap = /* @__PURE__ */ new Map();
|
|
32315
32973
|
items.forEach((item) => {
|
|
32316
32974
|
const groupVal = item[groupAppDEFieldId];
|
|
32317
|
-
if (
|
|
32975
|
+
if (isNil31(groupVal)) {
|
|
32318
32976
|
return;
|
|
32319
32977
|
}
|
|
32320
32978
|
if (!groupMap.has(groupVal)) {
|
|
@@ -32390,8 +33048,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
32390
33048
|
};
|
|
32391
33049
|
|
|
32392
33050
|
// src/controller/control/kanban/kanban.controller.ts
|
|
32393
|
-
import { RuntimeError as
|
|
32394
|
-
import { isNil as
|
|
33051
|
+
import { RuntimeError as RuntimeError62, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
33052
|
+
import { isNil as isNil32 } from "ramda";
|
|
32395
33053
|
|
|
32396
33054
|
// src/controller/control/kanban/kanban.service.ts
|
|
32397
33055
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -32477,12 +33135,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32477
33135
|
const isAsc = minorSortDir === "ASC";
|
|
32478
33136
|
items.forEach((item) => {
|
|
32479
33137
|
const sortValue = item[sortField];
|
|
32480
|
-
if (
|
|
33138
|
+
if (isNil32(sortValue)) {
|
|
32481
33139
|
item[sortField] = 0;
|
|
32482
33140
|
} else {
|
|
32483
33141
|
const toNum = Number(sortValue);
|
|
32484
33142
|
if (Number.isNaN(toNum)) {
|
|
32485
|
-
throw new
|
|
33143
|
+
throw new RuntimeError62(
|
|
32486
33144
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
32487
33145
|
);
|
|
32488
33146
|
}
|
|
@@ -32604,7 +33262,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32604
33262
|
}
|
|
32605
33263
|
handleDataGroup() {
|
|
32606
33264
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
32607
|
-
throw new
|
|
33265
|
+
throw new RuntimeError62("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
32608
33266
|
}
|
|
32609
33267
|
return super.handleDataGroup();
|
|
32610
33268
|
}
|
|
@@ -32620,7 +33278,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32620
33278
|
const groupMap = /* @__PURE__ */ new Map();
|
|
32621
33279
|
items.forEach((item) => {
|
|
32622
33280
|
const groupVal = item[groupAppDEFieldId];
|
|
32623
|
-
if (
|
|
33281
|
+
if (isNil32(groupVal)) {
|
|
32624
33282
|
return;
|
|
32625
33283
|
}
|
|
32626
33284
|
if (!groupMap.has(groupVal)) {
|
|
@@ -32947,12 +33605,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32947
33605
|
|
|
32948
33606
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
32949
33607
|
import {
|
|
32950
|
-
RuntimeError as
|
|
33608
|
+
RuntimeError as RuntimeError63,
|
|
32951
33609
|
RuntimeModelError as RuntimeModelError68,
|
|
32952
33610
|
awaitTimeout as awaitTimeout3,
|
|
32953
33611
|
recursiveIterate as recursiveIterate12
|
|
32954
33612
|
} from "@ibiz-template/core";
|
|
32955
|
-
import { clone as
|
|
33613
|
+
import { clone as clone31 } from "ramda";
|
|
32956
33614
|
|
|
32957
33615
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
32958
33616
|
var TreeGridExService = class extends TreeService {
|
|
@@ -33207,11 +33865,11 @@ var TreeGridExController = class extends TreeController {
|
|
|
33207
33865
|
return;
|
|
33208
33866
|
}
|
|
33209
33867
|
if (nodeData._nodeType !== "DE") {
|
|
33210
|
-
throw new
|
|
33868
|
+
throw new RuntimeError63("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
33211
33869
|
}
|
|
33212
33870
|
const rowState = this.state.rows[nodeData._uuid];
|
|
33213
33871
|
if (!rowState) {
|
|
33214
|
-
throw new
|
|
33872
|
+
throw new RuntimeError63("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
33215
33873
|
}
|
|
33216
33874
|
if (!rowState.modified) {
|
|
33217
33875
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -33225,7 +33883,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
33225
33883
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
33226
33884
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
33227
33885
|
if (isCreate) {
|
|
33228
|
-
throw new
|
|
33886
|
+
throw new RuntimeError63("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
33229
33887
|
}
|
|
33230
33888
|
if (!updateAppDEActionId) {
|
|
33231
33889
|
throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
@@ -33385,10 +34043,10 @@ var TreeGridExController = class extends TreeController {
|
|
|
33385
34043
|
(item) => item.showRowEdit
|
|
33386
34044
|
);
|
|
33387
34045
|
if (editingRow) {
|
|
33388
|
-
throw new
|
|
34046
|
+
throw new RuntimeError63("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
33389
34047
|
}
|
|
33390
34048
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
33391
|
-
row.cacheData =
|
|
34049
|
+
row.cacheData = clone31(row.data);
|
|
33392
34050
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
33393
34051
|
Object.assign(row.data, defaultVal);
|
|
33394
34052
|
}
|
|
@@ -33498,10 +34156,10 @@ var TreeGridExColumnController = class {
|
|
|
33498
34156
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
33499
34157
|
import {
|
|
33500
34158
|
DataTypes as DataTypes5,
|
|
33501
|
-
RuntimeError as
|
|
34159
|
+
RuntimeError as RuntimeError64,
|
|
33502
34160
|
RuntimeModelError as RuntimeModelError69
|
|
33503
34161
|
} from "@ibiz-template/core";
|
|
33504
|
-
import { clone as
|
|
34162
|
+
import { clone as clone32 } from "ramda";
|
|
33505
34163
|
import dayjs7 from "dayjs";
|
|
33506
34164
|
var TreeGridExNodeColumnController = class {
|
|
33507
34165
|
/**
|
|
@@ -33699,7 +34357,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
33699
34357
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
33700
34358
|
const value = row.data[valueItem];
|
|
33701
34359
|
if (value == null) {
|
|
33702
|
-
throw new
|
|
34360
|
+
throw new RuntimeError64("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
33703
34361
|
}
|
|
33704
34362
|
const { linkAppViewId } = this.nodeColumn;
|
|
33705
34363
|
if (!linkAppViewId) {
|
|
@@ -33710,7 +34368,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
33710
34368
|
srfkey: value,
|
|
33711
34369
|
...wfContext
|
|
33712
34370
|
});
|
|
33713
|
-
const tempParams =
|
|
34371
|
+
const tempParams = clone32(this.params);
|
|
33714
34372
|
const { userParam } = this.nodeColumn;
|
|
33715
34373
|
if (userParam) {
|
|
33716
34374
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -34112,7 +34770,7 @@ var TreeGridService = class extends GridService {
|
|
|
34112
34770
|
};
|
|
34113
34771
|
|
|
34114
34772
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
34115
|
-
import { RuntimeError as
|
|
34773
|
+
import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
34116
34774
|
import { createUUID as createUUID14 } from "qx-util";
|
|
34117
34775
|
|
|
34118
34776
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -34328,7 +34986,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
34328
34986
|
(item) => item.id === id
|
|
34329
34987
|
);
|
|
34330
34988
|
if (panelUiItemIndex < 0) {
|
|
34331
|
-
throw new
|
|
34989
|
+
throw new RuntimeError65("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
34332
34990
|
}
|
|
34333
34991
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
34334
34992
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -34838,7 +35496,7 @@ var ReportPanelController = class extends ControlController {
|
|
|
34838
35496
|
// src/controller/control/gantt/gantt.controller.ts
|
|
34839
35497
|
import {
|
|
34840
35498
|
awaitTimeout as awaitTimeout4,
|
|
34841
|
-
RuntimeError as
|
|
35499
|
+
RuntimeError as RuntimeError66,
|
|
34842
35500
|
RuntimeModelError as RuntimeModelError71
|
|
34843
35501
|
} from "@ibiz-template/core";
|
|
34844
35502
|
|
|
@@ -35282,11 +35940,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
35282
35940
|
*/
|
|
35283
35941
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
35284
35942
|
if (nodeData._nodeType !== "DE") {
|
|
35285
|
-
throw new
|
|
35943
|
+
throw new RuntimeError66("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
|
|
35286
35944
|
}
|
|
35287
35945
|
const rowState = this.getRowState(nodeData._id);
|
|
35288
35946
|
if (!rowState) {
|
|
35289
|
-
throw new
|
|
35947
|
+
throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
35290
35948
|
}
|
|
35291
35949
|
const { beginDataItemName, endDataItemName } = this.model;
|
|
35292
35950
|
this.setRowValue(rowState, beginDataItemName, begin);
|
|
@@ -35306,11 +35964,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
35306
35964
|
return;
|
|
35307
35965
|
}
|
|
35308
35966
|
if (nodeData._nodeType !== "DE") {
|
|
35309
|
-
throw new
|
|
35967
|
+
throw new RuntimeError66("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
35310
35968
|
}
|
|
35311
35969
|
const rowState = this.state.rows[nodeData._uuid];
|
|
35312
35970
|
if (!rowState) {
|
|
35313
|
-
throw new
|
|
35971
|
+
throw new RuntimeError66("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
35314
35972
|
}
|
|
35315
35973
|
if (!rowState.modified) {
|
|
35316
35974
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -35358,7 +36016,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
35358
36016
|
async remove(args) {
|
|
35359
36017
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
35360
36018
|
if (!(data == null ? void 0 : data.length)) {
|
|
35361
|
-
throw new
|
|
36019
|
+
throw new RuntimeError66("\u672A\u9009\u4E2D\u6570\u636E");
|
|
35362
36020
|
}
|
|
35363
36021
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
35364
36022
|
const del = await ibiz.confirm.error({
|
|
@@ -35467,7 +36125,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
35467
36125
|
(item) => item.showRowEdit
|
|
35468
36126
|
);
|
|
35469
36127
|
if (editingRow) {
|
|
35470
|
-
throw new
|
|
36128
|
+
throw new RuntimeError66("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
35471
36129
|
}
|
|
35472
36130
|
}
|
|
35473
36131
|
let parentModel;
|
|
@@ -35557,16 +36215,16 @@ var HubController = class {
|
|
|
35557
36215
|
};
|
|
35558
36216
|
|
|
35559
36217
|
// src/controller/notification/notice.controller.ts
|
|
35560
|
-
import { QXEvent as
|
|
36218
|
+
import { QXEvent as QXEvent10 } from "qx-util";
|
|
35561
36219
|
|
|
35562
36220
|
// src/controller/notification/async-action.controller.ts
|
|
35563
|
-
import { QXEvent as
|
|
35564
|
-
import { clone as
|
|
35565
|
-
import { isNil as
|
|
36221
|
+
import { QXEvent as QXEvent8 } from "qx-util";
|
|
36222
|
+
import { clone as clone33 } from "ramda";
|
|
36223
|
+
import { isNil as isNil33, isNumber as isNumber2 } from "lodash-es";
|
|
35566
36224
|
import dayjs8 from "dayjs";
|
|
35567
36225
|
var AsyncActionController = class {
|
|
35568
36226
|
constructor() {
|
|
35569
|
-
this.evt = new
|
|
36227
|
+
this.evt = new QXEvent8();
|
|
35570
36228
|
this.total = 0;
|
|
35571
36229
|
this.actions = [];
|
|
35572
36230
|
/**
|
|
@@ -35637,14 +36295,14 @@ var AsyncActionController = class {
|
|
|
35637
36295
|
data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
35638
36296
|
}
|
|
35639
36297
|
});
|
|
35640
|
-
if (!
|
|
36298
|
+
if (!isNil33(data.actionresult)) {
|
|
35641
36299
|
try {
|
|
35642
36300
|
const json = JSON.parse(data.actionresult);
|
|
35643
36301
|
data.actionresult = json;
|
|
35644
36302
|
} catch (error) {
|
|
35645
36303
|
}
|
|
35646
36304
|
}
|
|
35647
|
-
if (!
|
|
36305
|
+
if (!isNil33(data.completionrate)) {
|
|
35648
36306
|
const num = Number(data.completionrate);
|
|
35649
36307
|
if (Number.isNaN(num)) {
|
|
35650
36308
|
data.completionrate = void 0;
|
|
@@ -35669,7 +36327,7 @@ var AsyncActionController = class {
|
|
|
35669
36327
|
} else {
|
|
35670
36328
|
this.noticeResult(action);
|
|
35671
36329
|
}
|
|
35672
|
-
this.evt.emit("add",
|
|
36330
|
+
this.evt.emit("add", clone33(action));
|
|
35673
36331
|
this.evt.emit("dataChange");
|
|
35674
36332
|
}
|
|
35675
36333
|
/**
|
|
@@ -35691,7 +36349,7 @@ var AsyncActionController = class {
|
|
|
35691
36349
|
}
|
|
35692
36350
|
this.noticeResult(action);
|
|
35693
36351
|
}
|
|
35694
|
-
this.evt.emit("change",
|
|
36352
|
+
this.evt.emit("change", clone33(action));
|
|
35695
36353
|
this.evt.emit("dataChange");
|
|
35696
36354
|
}
|
|
35697
36355
|
noticeResult(action) {
|
|
@@ -35700,7 +36358,7 @@ var AsyncActionController = class {
|
|
|
35700
36358
|
};
|
|
35701
36359
|
|
|
35702
36360
|
// src/controller/notification/internal-message.controller.ts
|
|
35703
|
-
import { QXEvent as
|
|
36361
|
+
import { QXEvent as QXEvent9 } from "qx-util";
|
|
35704
36362
|
function isHTML(str) {
|
|
35705
36363
|
if (str === "")
|
|
35706
36364
|
return false;
|
|
@@ -35709,7 +36367,7 @@ function isHTML(str) {
|
|
|
35709
36367
|
}
|
|
35710
36368
|
var InternalMessageController = class {
|
|
35711
36369
|
constructor() {
|
|
35712
|
-
this.evt = new
|
|
36370
|
+
this.evt = new QXEvent9();
|
|
35713
36371
|
this.total = 0;
|
|
35714
36372
|
this.unreadCount = 0;
|
|
35715
36373
|
/**
|
|
@@ -35869,7 +36527,7 @@ var InternalMessageController = class {
|
|
|
35869
36527
|
// src/controller/notification/notice.controller.ts
|
|
35870
36528
|
var NoticeController = class {
|
|
35871
36529
|
constructor() {
|
|
35872
|
-
this.evt = new
|
|
36530
|
+
this.evt = new QXEvent10();
|
|
35873
36531
|
this.total = 0;
|
|
35874
36532
|
this.asyncAction = new AsyncActionController();
|
|
35875
36533
|
this.internalMessage = new InternalMessageController();
|
|
@@ -36087,7 +36745,7 @@ var AppHub = class {
|
|
|
36087
36745
|
this.registerAppView(appView);
|
|
36088
36746
|
return appView;
|
|
36089
36747
|
}
|
|
36090
|
-
throw new
|
|
36748
|
+
throw new RuntimeError67("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
36091
36749
|
}
|
|
36092
36750
|
/**
|
|
36093
36751
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -36108,7 +36766,7 @@ var AppHub = class {
|
|
|
36108
36766
|
);
|
|
36109
36767
|
return model;
|
|
36110
36768
|
}
|
|
36111
|
-
throw new
|
|
36769
|
+
throw new RuntimeError67("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
36112
36770
|
}
|
|
36113
36771
|
/**
|
|
36114
36772
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -36139,7 +36797,7 @@ var AppHub = class {
|
|
|
36139
36797
|
this.registerAppDataEntity(entity, appId2);
|
|
36140
36798
|
return entity;
|
|
36141
36799
|
}
|
|
36142
|
-
throw new
|
|
36800
|
+
throw new RuntimeError67("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
36143
36801
|
}
|
|
36144
36802
|
/**
|
|
36145
36803
|
* 新建 hub 应用
|
|
@@ -36154,7 +36812,7 @@ var AppHub = class {
|
|
|
36154
36812
|
return this.appMap.get(id);
|
|
36155
36813
|
}
|
|
36156
36814
|
if (!this.modelLoaderProvider) {
|
|
36157
|
-
throw new
|
|
36815
|
+
throw new RuntimeError67("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
36158
36816
|
}
|
|
36159
36817
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
36160
36818
|
const app = new Application(appModel);
|
|
@@ -36233,6 +36891,17 @@ var AppHub = class {
|
|
|
36233
36891
|
this.appMap.clear();
|
|
36234
36892
|
this.configCache = void 0;
|
|
36235
36893
|
}
|
|
36894
|
+
/**
|
|
36895
|
+
* 销毁基座
|
|
36896
|
+
*
|
|
36897
|
+
* @author tony001
|
|
36898
|
+
* @date 2024-04-10 17:04:38
|
|
36899
|
+
*/
|
|
36900
|
+
destroy() {
|
|
36901
|
+
ibiz.hub.getAllApps().forEach((app) => {
|
|
36902
|
+
app.destroy();
|
|
36903
|
+
});
|
|
36904
|
+
}
|
|
36236
36905
|
};
|
|
36237
36906
|
|
|
36238
36907
|
// src/engine/engine-factory.ts
|
|
@@ -36285,7 +36954,7 @@ var EngineFactory = class {
|
|
|
36285
36954
|
};
|
|
36286
36955
|
|
|
36287
36956
|
// src/engine/view-base.engine.ts
|
|
36288
|
-
import { RuntimeError as
|
|
36957
|
+
import { RuntimeError as RuntimeError68, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
|
|
36289
36958
|
var ViewEngineBase = class {
|
|
36290
36959
|
/**
|
|
36291
36960
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -36558,7 +37227,7 @@ var ViewEngineBase = class {
|
|
|
36558
37227
|
const { appDataEntityId } = this.view.model;
|
|
36559
37228
|
const { evt, context, params } = this.view;
|
|
36560
37229
|
if (!appDataEntityId) {
|
|
36561
|
-
throw new
|
|
37230
|
+
throw new RuntimeError68("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
36562
37231
|
}
|
|
36563
37232
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
36564
37233
|
const res = await app.deService.exec(
|
|
@@ -36580,7 +37249,7 @@ var ViewEngineBase = class {
|
|
|
36580
37249
|
|
|
36581
37250
|
// src/engine/md-view.engine.ts
|
|
36582
37251
|
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
36583
|
-
import { clone as
|
|
37252
|
+
import { clone as clone34 } from "ramda";
|
|
36584
37253
|
var MDViewEngine = class extends ViewEngineBase {
|
|
36585
37254
|
/**
|
|
36586
37255
|
* 多数据部件名称
|
|
@@ -36861,7 +37530,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36861
37530
|
if (!openAppViewLogic) {
|
|
36862
37531
|
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
36863
37532
|
}
|
|
36864
|
-
const params =
|
|
37533
|
+
const params = clone34(this.view.params);
|
|
36865
37534
|
if (copyMode) {
|
|
36866
37535
|
params.srfcopymode = copyMode;
|
|
36867
37536
|
}
|
|
@@ -37037,7 +37706,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
37037
37706
|
};
|
|
37038
37707
|
|
|
37039
37708
|
// src/global/global-util/global-util.ts
|
|
37040
|
-
import { RuntimeError as
|
|
37709
|
+
import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
37041
37710
|
var sourceTitle = document.title;
|
|
37042
37711
|
var GlobalUtil = class {
|
|
37043
37712
|
constructor() {
|
|
@@ -37170,7 +37839,7 @@ var GlobalUtil = class {
|
|
|
37170
37839
|
* @return {*} {IParams}
|
|
37171
37840
|
*/
|
|
37172
37841
|
getGlobalParam() {
|
|
37173
|
-
throw new
|
|
37842
|
+
throw new RuntimeError69("\u83B7\u53D6\u5E94\u7528\u5168\u5C40\u53D8\u91CF\u6CA1\u6709\u5B9E\u73B0");
|
|
37174
37843
|
}
|
|
37175
37844
|
/**
|
|
37176
37845
|
* 获取视图路由参数变量,数组类型,基于路由解析出来的,每一个对象里面都有context和params
|
|
@@ -37179,12 +37848,12 @@ var GlobalUtil = class {
|
|
|
37179
37848
|
* @return {*} {IParams}
|
|
37180
37849
|
*/
|
|
37181
37850
|
getRouterParams() {
|
|
37182
|
-
throw new
|
|
37851
|
+
throw new RuntimeError69("\u83B7\u53D6\u89C6\u56FE\u8DEF\u7531\u53C2\u6570\u53D8\u91CF\u6CA1\u6709\u5B9E\u73B0");
|
|
37183
37852
|
}
|
|
37184
37853
|
};
|
|
37185
37854
|
|
|
37186
37855
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
37187
|
-
import { RuntimeError as
|
|
37856
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
37188
37857
|
var LogicExecutor = class {
|
|
37189
37858
|
/**
|
|
37190
37859
|
* @author lxm
|
|
@@ -37205,7 +37874,7 @@ var LogicExecutor = class {
|
|
|
37205
37874
|
*/
|
|
37206
37875
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37207
37876
|
execute(_executeParams) {
|
|
37208
|
-
throw new
|
|
37877
|
+
throw new RuntimeError70("Method not implemented.");
|
|
37209
37878
|
}
|
|
37210
37879
|
/**
|
|
37211
37880
|
* 销毁方法
|
|
@@ -37642,7 +38311,7 @@ var LogicSchedulerCenter = class {
|
|
|
37642
38311
|
};
|
|
37643
38312
|
|
|
37644
38313
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
37645
|
-
import { RuntimeError as
|
|
38314
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
37646
38315
|
var LogicTrigger = class {
|
|
37647
38316
|
/**
|
|
37648
38317
|
* @author lxm
|
|
@@ -37702,7 +38371,7 @@ var LogicTrigger = class {
|
|
|
37702
38371
|
if (this.executor) {
|
|
37703
38372
|
return this.executor.execute(executeParams);
|
|
37704
38373
|
}
|
|
37705
|
-
throw new
|
|
38374
|
+
throw new RuntimeError71("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
37706
38375
|
}
|
|
37707
38376
|
/**
|
|
37708
38377
|
* 销毁方法
|
|
@@ -37719,12 +38388,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
37719
38388
|
};
|
|
37720
38389
|
|
|
37721
38390
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
37722
|
-
import { RuntimeError as
|
|
38391
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
37723
38392
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
37724
38393
|
bindExecutor(executor) {
|
|
37725
38394
|
super.bindExecutor(executor);
|
|
37726
38395
|
if (this.executor.type !== "SCRIPT") {
|
|
37727
|
-
throw new
|
|
38396
|
+
throw new RuntimeError72(
|
|
37728
38397
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
37729
38398
|
);
|
|
37730
38399
|
}
|
|
@@ -37761,7 +38430,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
37761
38430
|
};
|
|
37762
38431
|
|
|
37763
38432
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
37764
|
-
import { RuntimeError as
|
|
38433
|
+
import { RuntimeError as RuntimeError73, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
37765
38434
|
var TimerTrigger = class extends LogicTrigger {
|
|
37766
38435
|
constructor() {
|
|
37767
38436
|
super(...arguments);
|
|
@@ -37773,7 +38442,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
37773
38442
|
}
|
|
37774
38443
|
this.timer = setInterval(() => {
|
|
37775
38444
|
if (!this.scheduler.defaultParamsCb) {
|
|
37776
|
-
throw new
|
|
38445
|
+
throw new RuntimeError73("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
37777
38446
|
}
|
|
37778
38447
|
const params = this.scheduler.defaultParamsCb();
|
|
37779
38448
|
this.executor.execute(params);
|
|
@@ -37790,10 +38459,10 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
37790
38459
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
37791
38460
|
import {
|
|
37792
38461
|
ModelError as ModelError34,
|
|
37793
|
-
RuntimeError as
|
|
38462
|
+
RuntimeError as RuntimeError74,
|
|
37794
38463
|
RuntimeModelError as RuntimeModelError75
|
|
37795
38464
|
} from "@ibiz-template/core";
|
|
37796
|
-
import { notNilEmpty as
|
|
38465
|
+
import { notNilEmpty as notNilEmpty10 } from "qx-util";
|
|
37797
38466
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
37798
38467
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37799
38468
|
async execute(executeParams) {
|
|
@@ -37828,7 +38497,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37828
38497
|
const { context, params, ...rest } = parameters;
|
|
37829
38498
|
const { data } = parameters;
|
|
37830
38499
|
if (!(data == null ? void 0 : data[0])) {
|
|
37831
|
-
throw new
|
|
38500
|
+
throw new RuntimeError74("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
37832
38501
|
}
|
|
37833
38502
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
37834
38503
|
let openViewRef;
|
|
@@ -37857,7 +38526,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37857
38526
|
);
|
|
37858
38527
|
let tempParams = {};
|
|
37859
38528
|
const navParams = openViewRef.navigateParams;
|
|
37860
|
-
if (
|
|
38529
|
+
if (notNilEmpty10(navParams)) {
|
|
37861
38530
|
tempParams = convertNavData(navParams, data[0], params, context);
|
|
37862
38531
|
}
|
|
37863
38532
|
return ibiz.commands.execute(
|
|
@@ -37888,7 +38557,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37888
38557
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
37889
38558
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
37890
38559
|
if (!findView) {
|
|
37891
|
-
throw new
|
|
38560
|
+
throw new RuntimeError74(
|
|
37892
38561
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
37893
38562
|
);
|
|
37894
38563
|
}
|
|
@@ -37945,12 +38614,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37945
38614
|
let tempParams = {};
|
|
37946
38615
|
const _data = (data == null ? void 0 : data[0]) || {};
|
|
37947
38616
|
const navContexts = newViewRef.navigateContexts;
|
|
37948
|
-
if (
|
|
38617
|
+
if (notNilEmpty10(navContexts)) {
|
|
37949
38618
|
tempContext = convertNavData(navContexts, _data, params, context);
|
|
37950
38619
|
}
|
|
37951
38620
|
tempContext = Object.assign(context, tempContext);
|
|
37952
38621
|
const navParams = newViewRef.navigateParams;
|
|
37953
|
-
if (
|
|
38622
|
+
if (notNilEmpty10(navParams)) {
|
|
37954
38623
|
tempParams = convertNavData(navParams, _data, params, context);
|
|
37955
38624
|
}
|
|
37956
38625
|
if (params.srfcopymode) {
|
|
@@ -38013,7 +38682,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
38013
38682
|
}
|
|
38014
38683
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
38015
38684
|
if (!selectData) {
|
|
38016
|
-
throw new
|
|
38685
|
+
throw new RuntimeError74("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
38017
38686
|
}
|
|
38018
38687
|
const indexType = selectData.srfkey;
|
|
38019
38688
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -38023,7 +38692,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
38023
38692
|
}
|
|
38024
38693
|
);
|
|
38025
38694
|
if (!findView) {
|
|
38026
|
-
throw new
|
|
38695
|
+
throw new RuntimeError74(
|
|
38027
38696
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
38028
38697
|
);
|
|
38029
38698
|
}
|
|
@@ -38060,7 +38729,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
38060
38729
|
}
|
|
38061
38730
|
});
|
|
38062
38731
|
if (pickParentFieldName === void 0) {
|
|
38063
|
-
throw new
|
|
38732
|
+
throw new RuntimeError74(
|
|
38064
38733
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
38065
38734
|
);
|
|
38066
38735
|
}
|
|
@@ -38450,6 +39119,7 @@ export {
|
|
|
38450
39119
|
HubController,
|
|
38451
39120
|
INTERNAL_MESSAGE_PROVIDER_PREFIX,
|
|
38452
39121
|
InternalMessageService,
|
|
39122
|
+
ItemsValueOPs,
|
|
38453
39123
|
KanbanController,
|
|
38454
39124
|
KanbanService,
|
|
38455
39125
|
LayoutPanelUtil,
|
|
@@ -38508,6 +39178,8 @@ export {
|
|
|
38508
39178
|
SearchBarController,
|
|
38509
39179
|
SearchBarFilterController,
|
|
38510
39180
|
SearchBarFilterItemsController,
|
|
39181
|
+
SearchBarFilterSimpleItemsController,
|
|
39182
|
+
SearchCondEx2filterNode,
|
|
38511
39183
|
SearchFilter,
|
|
38512
39184
|
SearchFormController,
|
|
38513
39185
|
SearchFormService,
|
|
@@ -38575,6 +39247,7 @@ export {
|
|
|
38575
39247
|
calcMainStateOPPrivsStrs,
|
|
38576
39248
|
calcNavParams,
|
|
38577
39249
|
calcResPath,
|
|
39250
|
+
calcSearchCondExs,
|
|
38578
39251
|
calcSearchConds,
|
|
38579
39252
|
compare,
|
|
38580
39253
|
compareNumber,
|
|
@@ -38590,6 +39263,8 @@ export {
|
|
|
38590
39263
|
exportData,
|
|
38591
39264
|
fieldValueToBoolean,
|
|
38592
39265
|
filterFieldLogics,
|
|
39266
|
+
filterNode2SearchCond,
|
|
39267
|
+
filterNode2SearchCondEx,
|
|
38593
39268
|
filterValueRules,
|
|
38594
39269
|
findAppDEMethod,
|
|
38595
39270
|
findChildFormDetails,
|
|
@@ -38597,7 +39272,6 @@ export {
|
|
|
38597
39272
|
findEditItem,
|
|
38598
39273
|
findFieldById,
|
|
38599
39274
|
findModelChild,
|
|
38600
|
-
formatFilters,
|
|
38601
39275
|
formatMultiData,
|
|
38602
39276
|
generateEditorRules,
|
|
38603
39277
|
generateRules,
|
|
@@ -38650,10 +39324,12 @@ export {
|
|
|
38650
39324
|
installCommand,
|
|
38651
39325
|
isDataContainer,
|
|
38652
39326
|
isFormDataContainer,
|
|
39327
|
+
isHiddenFilter,
|
|
39328
|
+
isSimpleItems,
|
|
38653
39329
|
isValueChange,
|
|
38654
39330
|
matchMainState,
|
|
38655
39331
|
openRedirectView,
|
|
38656
|
-
|
|
39332
|
+
parseSubFieldInfo,
|
|
38657
39333
|
parseUserParams,
|
|
38658
39334
|
parseViewProtocol,
|
|
38659
39335
|
presetAppCounterProvider,
|
|
@@ -38679,6 +39355,7 @@ export {
|
|
|
38679
39355
|
strContain,
|
|
38680
39356
|
testCond,
|
|
38681
39357
|
toLocalOpenWFRedirectView,
|
|
39358
|
+
validateFilterNodes,
|
|
38682
39359
|
verifyDeRules,
|
|
38683
39360
|
verifyFormGroupLogic,
|
|
38684
39361
|
verifyPanelGroupLogic
|