@ibiz-template/runtime 0.4.17-dev.0 → 0.5.0-beta.0
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 +972 -529
- package/dist/index.system.min.js +2 -2
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +7 -2
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +2 -6
- package/out/controller/control/grid/grid/grid-column.controller.d.ts +2 -1
- package/out/controller/control/grid/grid/grid-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts +17 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +32 -0
- package/out/controller/control/kanban/kanban.controller.d.ts +2 -2
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
- package/out/controller/control/search-bar/index.d.ts +1 -0
- package/out/controller/control/search-bar/index.d.ts.map +1 -1
- package/out/controller/control/search-bar/index.js +1 -0
- package/out/controller/control/search-bar/search-bar.controller.d.ts +59 -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 +142 -9
- package/out/controller/control/search-bar/search-bar.service.d.ts +78 -0
- package/out/controller/control/search-bar/search-bar.service.d.ts.map +1 -0
- package/out/controller/control/search-bar/search-bar.service.js +130 -0
- package/out/controller/control/tree/tree.controller.d.ts +27 -1
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +45 -7
- package/out/controller/control/tree/tree.service.d.ts +1 -1
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/index.d.ts +2 -0
- package/out/controller/control/tree-grid-ex/index.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/index.js +2 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +4 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +3 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +93 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +89 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +13 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +11 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +31 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +61 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +26 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +48 -46
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +85 -115
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts +8 -58
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.js +5 -135
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +7 -7
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.d.ts +1 -0
- package/out/interface/controller/controller/control/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.js +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts +12 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.js +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts +2 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts.map +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.js +1 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +2 -2
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +64 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +31 -23
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +8 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts +31 -0
- package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts.map +1 -0
- package/out/interface/provider/i-tree-grid-ex-column.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +10 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/register/helper/index.d.ts +1 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +1 -0
- package/out/register/helper/tree-grid-ex-column-register.d.ts +23 -0
- package/out/register/helper/tree-grid-ex-column-register.d.ts.map +1 -0
- package/out/register/helper/tree-grid-ex-column-register.js +50 -0
- package/out/service/de-service-util.d.ts +3 -2
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +11 -10
- package/out/service/dto/method.dto.d.ts +2 -3
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -4
- package/out/service/service/entity/de.service.d.ts +10 -0
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +22 -1
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +1 -12
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +51 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +2 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +1 -0
- package/package.json +3 -3
- package/src/controller/common/control/md-control.controller.ts +7 -2
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +2 -6
- package/src/controller/control/grid/grid/grid-column.controller.ts +4 -1
- package/src/controller/control/grid/grid/grid.controller.ts +34 -0
- package/src/controller/control/kanban/kanban.controller.ts +2 -2
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +1 -1
- package/src/controller/control/search-bar/index.ts +1 -0
- package/src/controller/control/search-bar/search-bar.controller.ts +178 -10
- package/src/controller/control/search-bar/search-bar.service.ts +161 -0
- package/src/controller/control/tree/tree.controller.ts +58 -11
- package/src/controller/control/tree/tree.service.ts +3 -1
- package/src/controller/control/tree-grid-ex/index.ts +2 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +3 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +121 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +13 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +76 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +37 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +116 -140
- package/src/controller/control/tree-grid-ex/tree-grid-ex.service.ts +10 -165
- package/src/interface/controller/controller/control/i-grid.controller.ts +9 -0
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +11 -12
- package/src/interface/controller/controller/control/i-tree.controller.ts +5 -2
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.ts +12 -0
- package/src/interface/controller/controller/control/tree-grid-ex-column/index.ts +1 -0
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +2 -2
- package/src/interface/controller/state/control/i-search-bar.state.ts +73 -0
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +27 -24
- package/src/interface/controller/state/control/i-tree.state.ts +9 -1
- package/src/interface/provider/i-tree-grid-ex-column.provider.ts +39 -0
- package/src/interface/provider/index.ts +1 -0
- package/src/interface/service/service/i-app-de.service.ts +13 -0
- package/src/register/helper/index.ts +1 -0
- package/src/register/helper/tree-grid-ex-column-register.ts +67 -0
- package/src/service/de-service-util.ts +6 -4
- package/src/service/dto/method.dto.ts +4 -5
- package/src/service/service/entity/de.service.ts +26 -1
- package/src/service/service/entity/method/method.ts +1 -13
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +53 -0
- package/src/service/vo/tree-node-data/tree-node-data.ts +6 -0
package/dist/index.esm.js
CHANGED
|
@@ -3804,6 +3804,41 @@ async function getDEMethodProvider(model) {
|
|
|
3804
3804
|
}
|
|
3805
3805
|
}
|
|
3806
3806
|
|
|
3807
|
+
// src/register/helper/tree-grid-ex-column-register.ts
|
|
3808
|
+
var TREEGRIDEX_COLUMN_PROVIDER_PREFIX = "TREEGRIDEX_COLUMN";
|
|
3809
|
+
function registerTreeGridExColumnProvider(key, callback) {
|
|
3810
|
+
ibiz.register.register(
|
|
3811
|
+
"".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key),
|
|
3812
|
+
callback
|
|
3813
|
+
);
|
|
3814
|
+
}
|
|
3815
|
+
function getProvider13(key) {
|
|
3816
|
+
return ibiz.register.get(
|
|
3817
|
+
"".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key)
|
|
3818
|
+
);
|
|
3819
|
+
}
|
|
3820
|
+
async function getTreeGridExColumnProvider(model) {
|
|
3821
|
+
let provider;
|
|
3822
|
+
const { columnType, appId, renderSysPFPluginId } = model;
|
|
3823
|
+
if (renderSysPFPluginId) {
|
|
3824
|
+
const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
|
|
3825
|
+
if (pluginKey) {
|
|
3826
|
+
provider = getProvider13(pluginKey);
|
|
3827
|
+
}
|
|
3828
|
+
if (!provider) {
|
|
3829
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u6811\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3830
|
+
} else {
|
|
3831
|
+
return provider;
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
provider = getProvider13(columnType);
|
|
3835
|
+
if (!provider) {
|
|
3836
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u683C\u5217\u7C7B\u578B".concat(columnType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3837
|
+
} else {
|
|
3838
|
+
return provider;
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3807
3842
|
// src/service/utils/app-counter/app-counter.ts
|
|
3808
3843
|
import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
3809
3844
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
@@ -5567,6 +5602,205 @@ var FileService = class {
|
|
|
5567
5602
|
}
|
|
5568
5603
|
};
|
|
5569
5604
|
|
|
5605
|
+
// src/service/app-data-entity/app-data-entity.ts
|
|
5606
|
+
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5607
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
5608
|
+
import { createUUID as createUUID3 } from "qx-util";
|
|
5609
|
+
|
|
5610
|
+
// src/service/constant/srfuf.ts
|
|
5611
|
+
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
5612
|
+
Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
|
|
5613
|
+
Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
|
|
5614
|
+
return Srfuf2;
|
|
5615
|
+
})(Srfuf || {});
|
|
5616
|
+
|
|
5617
|
+
// src/service/app-data-entity/app-data-entity.ts
|
|
5618
|
+
var AppDataEntity = class _AppDataEntity {
|
|
5619
|
+
get srfuf() {
|
|
5620
|
+
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
5621
|
+
}
|
|
5622
|
+
/**
|
|
5623
|
+
* Creates an instance of AppDataEntity.
|
|
5624
|
+
*
|
|
5625
|
+
* @author chitanda
|
|
5626
|
+
* @date 2023-11-16 15:11:08
|
|
5627
|
+
* @param {IAppDataEntity} entity
|
|
5628
|
+
* @param {(IData | AppDataEntity)} [data={}]
|
|
5629
|
+
*/
|
|
5630
|
+
constructor(entity, data = {}) {
|
|
5631
|
+
Object.defineProperty(this, "_entity", {
|
|
5632
|
+
enumerable: false,
|
|
5633
|
+
configurable: true,
|
|
5634
|
+
value: entity
|
|
5635
|
+
});
|
|
5636
|
+
Object.defineProperty(this, "_data", {
|
|
5637
|
+
enumerable: false,
|
|
5638
|
+
configurable: true,
|
|
5639
|
+
value: data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
|
|
5640
|
+
});
|
|
5641
|
+
Object.defineProperty(this, "srfdeid", {
|
|
5642
|
+
get() {
|
|
5643
|
+
return entity.id;
|
|
5644
|
+
}
|
|
5645
|
+
});
|
|
5646
|
+
Object.defineProperty(this, "srfdecodename", {
|
|
5647
|
+
get() {
|
|
5648
|
+
return entity.codeName;
|
|
5649
|
+
}
|
|
5650
|
+
});
|
|
5651
|
+
const keyAppField = findModelChild(
|
|
5652
|
+
entity.appDEFields || [],
|
|
5653
|
+
entity.keyAppDEFieldId
|
|
5654
|
+
);
|
|
5655
|
+
if (keyAppField) {
|
|
5656
|
+
const key = keyAppField.codeName.toLowerCase();
|
|
5657
|
+
Object.defineProperty(this, "srfkeyfield", {
|
|
5658
|
+
get() {
|
|
5659
|
+
return key;
|
|
5660
|
+
}
|
|
5661
|
+
});
|
|
5662
|
+
Object.defineProperty(this, "srfkey", {
|
|
5663
|
+
set(val) {
|
|
5664
|
+
this._data[key] = val;
|
|
5665
|
+
},
|
|
5666
|
+
get() {
|
|
5667
|
+
return this._data[key];
|
|
5668
|
+
}
|
|
5669
|
+
});
|
|
5670
|
+
} else {
|
|
5671
|
+
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
|
|
5672
|
+
}
|
|
5673
|
+
const majorAppField = findModelChild(
|
|
5674
|
+
entity.appDEFields || [],
|
|
5675
|
+
entity.majorAppDEFieldId
|
|
5676
|
+
);
|
|
5677
|
+
if (majorAppField) {
|
|
5678
|
+
const major = majorAppField.codeName.toLowerCase();
|
|
5679
|
+
Object.defineProperty(this, "srfmajorfield", {
|
|
5680
|
+
get() {
|
|
5681
|
+
return major;
|
|
5682
|
+
}
|
|
5683
|
+
});
|
|
5684
|
+
Object.defineProperty(this, "srfmajortext", {
|
|
5685
|
+
set(val) {
|
|
5686
|
+
this._data[major] = val;
|
|
5687
|
+
},
|
|
5688
|
+
get() {
|
|
5689
|
+
return this._data[major];
|
|
5690
|
+
}
|
|
5691
|
+
});
|
|
5692
|
+
} else {
|
|
5693
|
+
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
|
|
5694
|
+
}
|
|
5695
|
+
Object.defineProperty(this, "tempsrfkey", {
|
|
5696
|
+
enumerable: false,
|
|
5697
|
+
configurable: true,
|
|
5698
|
+
writable: true,
|
|
5699
|
+
value: isNil7(this.srfkey) ? createUUID3() : this.srfkey
|
|
5700
|
+
});
|
|
5701
|
+
this.defineProperties();
|
|
5702
|
+
}
|
|
5703
|
+
/**
|
|
5704
|
+
* 代理实际数据
|
|
5705
|
+
*
|
|
5706
|
+
* @author chitanda
|
|
5707
|
+
* @date 2022-10-11 22:10:55
|
|
5708
|
+
* @protected
|
|
5709
|
+
*/
|
|
5710
|
+
defineProperties() {
|
|
5711
|
+
var _a;
|
|
5712
|
+
const { _data, convertVal } = this;
|
|
5713
|
+
const properties = {};
|
|
5714
|
+
const keys = Object.keys(_data);
|
|
5715
|
+
keys.forEach((key) => {
|
|
5716
|
+
properties[key] = {
|
|
5717
|
+
enumerable: true,
|
|
5718
|
+
set(val) {
|
|
5719
|
+
_data[key] = val;
|
|
5720
|
+
},
|
|
5721
|
+
get() {
|
|
5722
|
+
return _data[key];
|
|
5723
|
+
}
|
|
5724
|
+
};
|
|
5725
|
+
});
|
|
5726
|
+
(_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
5727
|
+
const key = field.codeName.toLowerCase();
|
|
5728
|
+
properties[key] = {
|
|
5729
|
+
enumerable: true,
|
|
5730
|
+
set(val) {
|
|
5731
|
+
_data[key] = convertVal(val, field.stdDataType);
|
|
5732
|
+
},
|
|
5733
|
+
get() {
|
|
5734
|
+
return _data[key];
|
|
5735
|
+
}
|
|
5736
|
+
};
|
|
5737
|
+
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
5738
|
+
});
|
|
5739
|
+
Object.defineProperties(this, properties);
|
|
5740
|
+
}
|
|
5741
|
+
/**
|
|
5742
|
+
* 克隆数据
|
|
5743
|
+
*
|
|
5744
|
+
* @author chitanda
|
|
5745
|
+
* @date 2022-10-11 00:10:15
|
|
5746
|
+
* @return {*} {AppDataEntity}
|
|
5747
|
+
*/
|
|
5748
|
+
clone() {
|
|
5749
|
+
const entity = new _AppDataEntity(this._entity, this._data);
|
|
5750
|
+
entity.srfkey = this.srfkey;
|
|
5751
|
+
return entity;
|
|
5752
|
+
}
|
|
5753
|
+
/**
|
|
5754
|
+
* 合并参数
|
|
5755
|
+
*
|
|
5756
|
+
* @author chitanda
|
|
5757
|
+
* @date 2022-10-19 11:10:25
|
|
5758
|
+
* @param {(IData | AppDataEntity)} data
|
|
5759
|
+
* @return {*} {AppDataEntity}
|
|
5760
|
+
*/
|
|
5761
|
+
assign(data) {
|
|
5762
|
+
let _data = {};
|
|
5763
|
+
if (data instanceof _AppDataEntity) {
|
|
5764
|
+
_data = data._data;
|
|
5765
|
+
} else {
|
|
5766
|
+
_data = data;
|
|
5767
|
+
}
|
|
5768
|
+
Object.keys(_data).forEach((key) => {
|
|
5769
|
+
if (_data[key] === void 0) {
|
|
5770
|
+
delete _data[key];
|
|
5771
|
+
}
|
|
5772
|
+
});
|
|
5773
|
+
Object.assign(this._data, _data);
|
|
5774
|
+
return this;
|
|
5775
|
+
}
|
|
5776
|
+
/**
|
|
5777
|
+
* 根据属性的数据类型转换值
|
|
5778
|
+
* @author lxm
|
|
5779
|
+
* @date 2023-09-25 03:37:28
|
|
5780
|
+
* @protected
|
|
5781
|
+
* @param {unknown} value
|
|
5782
|
+
* @param {(number | undefined)} dataType
|
|
5783
|
+
* @return {*} {unknown}
|
|
5784
|
+
*/
|
|
5785
|
+
convertVal(value, dataType) {
|
|
5786
|
+
if (value == null) {
|
|
5787
|
+
return value;
|
|
5788
|
+
}
|
|
5789
|
+
if (isNil7(dataType)) {
|
|
5790
|
+
return value;
|
|
5791
|
+
}
|
|
5792
|
+
if (DataTypes.isNumber(dataType)) {
|
|
5793
|
+
const numVal = !isNil7(value) && value !== "" ? Number(value) : value;
|
|
5794
|
+
if (Number.isNaN(numVal)) {
|
|
5795
|
+
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
5796
|
+
return value;
|
|
5797
|
+
}
|
|
5798
|
+
return numVal;
|
|
5799
|
+
}
|
|
5800
|
+
return value;
|
|
5801
|
+
}
|
|
5802
|
+
};
|
|
5803
|
+
|
|
5570
5804
|
// src/service/service/entity/de.service.ts
|
|
5571
5805
|
var DEService = class {
|
|
5572
5806
|
/**
|
|
@@ -5785,6 +6019,26 @@ var DEService = class {
|
|
|
5785
6019
|
const resPath = calcResPath(context, this.model);
|
|
5786
6020
|
return resPath + curPath;
|
|
5787
6021
|
}
|
|
6022
|
+
newEntity(data) {
|
|
6023
|
+
if (data instanceof AppDataEntity) {
|
|
6024
|
+
return data.clone();
|
|
6025
|
+
}
|
|
6026
|
+
return new AppDataEntity(this.model, data);
|
|
6027
|
+
}
|
|
6028
|
+
/**
|
|
6029
|
+
* 创建数据对象实例
|
|
6030
|
+
*
|
|
6031
|
+
* @author chitanda
|
|
6032
|
+
* @date 2023-12-23 19:12:57
|
|
6033
|
+
* @param {(IData[] | IDataEntity[] | IData | IDataEntity)} data
|
|
6034
|
+
* @return {*} {(IDataEntity | IDataEntity[])}
|
|
6035
|
+
*/
|
|
6036
|
+
createEntity(data) {
|
|
6037
|
+
if (Array.isArray(data)) {
|
|
6038
|
+
return data.map((item) => this.newEntity(item));
|
|
6039
|
+
}
|
|
6040
|
+
return this.newEntity(data);
|
|
6041
|
+
}
|
|
5788
6042
|
/**
|
|
5789
6043
|
* 服务实例销毁
|
|
5790
6044
|
*
|
|
@@ -5798,20 +6052,11 @@ var DEService = class {
|
|
|
5798
6052
|
};
|
|
5799
6053
|
|
|
5800
6054
|
// src/service/service/control/control.service.ts
|
|
5801
|
-
import { clone as
|
|
5802
|
-
|
|
5803
|
-
// src/service/vo/control.vo.ts
|
|
5804
|
-
import { createUUID as createUUID3 } from "qx-util";
|
|
5805
|
-
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5806
|
-
|
|
5807
|
-
// src/service/constant/srfuf.ts
|
|
5808
|
-
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
5809
|
-
Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
|
|
5810
|
-
Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
|
|
5811
|
-
return Srfuf2;
|
|
5812
|
-
})(Srfuf || {});
|
|
6055
|
+
import { clone as clone7 } from "@ibiz-template/core";
|
|
5813
6056
|
|
|
5814
6057
|
// src/service/vo/control.vo.ts
|
|
6058
|
+
import { createUUID as createUUID4 } from "qx-util";
|
|
6059
|
+
import { clone as clone6, isNil as isNil8 } from "ramda";
|
|
5815
6060
|
var BuildInKeys = [
|
|
5816
6061
|
"srfkey",
|
|
5817
6062
|
"srfmajortext",
|
|
@@ -5900,7 +6145,7 @@ var ControlVO = class _ControlVO {
|
|
|
5900
6145
|
enumerable: false,
|
|
5901
6146
|
configurable: true,
|
|
5902
6147
|
writable: true,
|
|
5903
|
-
value:
|
|
6148
|
+
value: isNil8(this.srfkey) ? createUUID4() : this.srfkey
|
|
5904
6149
|
});
|
|
5905
6150
|
}
|
|
5906
6151
|
Object.defineProperty(this, "srfuf", {
|
|
@@ -5999,7 +6244,7 @@ var ControlVO = class _ControlVO {
|
|
|
5999
6244
|
* @return {*} {ControlVO}
|
|
6000
6245
|
*/
|
|
6001
6246
|
clone() {
|
|
6002
|
-
const cloneOrigin =
|
|
6247
|
+
const cloneOrigin = clone6(this.$origin);
|
|
6003
6248
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
6004
6249
|
Object.keys(this).forEach((key) => {
|
|
6005
6250
|
newVal[key] = this[key];
|
|
@@ -6076,7 +6321,7 @@ var ControlService = class {
|
|
|
6076
6321
|
* @returns {*} {IHttpResponse}
|
|
6077
6322
|
*/
|
|
6078
6323
|
handleResponse(res) {
|
|
6079
|
-
return
|
|
6324
|
+
return clone7(res);
|
|
6080
6325
|
}
|
|
6081
6326
|
/**
|
|
6082
6327
|
* 实体数据转ui数据
|
|
@@ -6535,7 +6780,7 @@ var V7AuthService = class {
|
|
|
6535
6780
|
};
|
|
6536
6781
|
|
|
6537
6782
|
// src/service/service/async-action/async-action.service.ts
|
|
6538
|
-
import { isNil as
|
|
6783
|
+
import { isNil as isNil9 } from "ramda";
|
|
6539
6784
|
var AsyncActionService = class {
|
|
6540
6785
|
/**
|
|
6541
6786
|
* 获取异步操作的集合
|
|
@@ -6546,7 +6791,7 @@ var AsyncActionService = class {
|
|
|
6546
6791
|
*/
|
|
6547
6792
|
async fetch(params = {}) {
|
|
6548
6793
|
const res = await ibiz.net.post("/portal/asyncaction/all", params);
|
|
6549
|
-
if (
|
|
6794
|
+
if (isNil9(res.data)) {
|
|
6550
6795
|
res.data = [];
|
|
6551
6796
|
}
|
|
6552
6797
|
return res;
|
|
@@ -6571,201 +6816,10 @@ import {
|
|
|
6571
6816
|
RuntimeError as RuntimeError20,
|
|
6572
6817
|
RuntimeModelError as RuntimeModelError19
|
|
6573
6818
|
} from "@ibiz-template/core";
|
|
6574
|
-
import { isArray as
|
|
6819
|
+
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
6575
6820
|
|
|
6576
6821
|
// src/service/service/entity/method/method.ts
|
|
6577
6822
|
import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
6578
|
-
import { isArray as isArray4 } from "lodash-es";
|
|
6579
|
-
|
|
6580
|
-
// src/service/app-data-entity/app-data-entity.ts
|
|
6581
|
-
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
6582
|
-
import { DataTypes } from "@ibiz-template/core";
|
|
6583
|
-
import { createUUID as createUUID4 } from "qx-util";
|
|
6584
|
-
var AppDataEntity = class _AppDataEntity {
|
|
6585
|
-
get srfuf() {
|
|
6586
|
-
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
6587
|
-
}
|
|
6588
|
-
/**
|
|
6589
|
-
* Creates an instance of AppDataEntity.
|
|
6590
|
-
*
|
|
6591
|
-
* @author chitanda
|
|
6592
|
-
* @date 2023-11-16 15:11:08
|
|
6593
|
-
* @param {IAppDataEntity} entity
|
|
6594
|
-
* @param {(IData | AppDataEntity)} [data={}]
|
|
6595
|
-
*/
|
|
6596
|
-
constructor(entity, data = {}) {
|
|
6597
|
-
Object.defineProperty(this, "_entity", {
|
|
6598
|
-
enumerable: false,
|
|
6599
|
-
configurable: true,
|
|
6600
|
-
value: entity
|
|
6601
|
-
});
|
|
6602
|
-
Object.defineProperty(this, "_data", {
|
|
6603
|
-
enumerable: false,
|
|
6604
|
-
configurable: true,
|
|
6605
|
-
value: data instanceof _AppDataEntity ? clone7(data._data) : clone7(data)
|
|
6606
|
-
});
|
|
6607
|
-
Object.defineProperty(this, "srfdeid", {
|
|
6608
|
-
get() {
|
|
6609
|
-
return entity.id;
|
|
6610
|
-
}
|
|
6611
|
-
});
|
|
6612
|
-
Object.defineProperty(this, "srfdecodename", {
|
|
6613
|
-
get() {
|
|
6614
|
-
return entity.codeName;
|
|
6615
|
-
}
|
|
6616
|
-
});
|
|
6617
|
-
const keyAppField = findModelChild(
|
|
6618
|
-
entity.appDEFields || [],
|
|
6619
|
-
entity.keyAppDEFieldId
|
|
6620
|
-
);
|
|
6621
|
-
if (keyAppField) {
|
|
6622
|
-
const key = keyAppField.codeName.toLowerCase();
|
|
6623
|
-
Object.defineProperty(this, "srfkeyfield", {
|
|
6624
|
-
get() {
|
|
6625
|
-
return key;
|
|
6626
|
-
}
|
|
6627
|
-
});
|
|
6628
|
-
Object.defineProperty(this, "srfkey", {
|
|
6629
|
-
set(val) {
|
|
6630
|
-
this._data[key] = val;
|
|
6631
|
-
},
|
|
6632
|
-
get() {
|
|
6633
|
-
return this._data[key];
|
|
6634
|
-
}
|
|
6635
|
-
});
|
|
6636
|
-
} else {
|
|
6637
|
-
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
|
|
6638
|
-
}
|
|
6639
|
-
const majorAppField = findModelChild(
|
|
6640
|
-
entity.appDEFields || [],
|
|
6641
|
-
entity.majorAppDEFieldId
|
|
6642
|
-
);
|
|
6643
|
-
if (majorAppField) {
|
|
6644
|
-
const major = majorAppField.codeName.toLowerCase();
|
|
6645
|
-
Object.defineProperty(this, "srfmajorfield", {
|
|
6646
|
-
get() {
|
|
6647
|
-
return major;
|
|
6648
|
-
}
|
|
6649
|
-
});
|
|
6650
|
-
Object.defineProperty(this, "srfmajortext", {
|
|
6651
|
-
set(val) {
|
|
6652
|
-
this._data[major] = val;
|
|
6653
|
-
},
|
|
6654
|
-
get() {
|
|
6655
|
-
return this._data[major];
|
|
6656
|
-
}
|
|
6657
|
-
});
|
|
6658
|
-
} else {
|
|
6659
|
-
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
|
|
6660
|
-
}
|
|
6661
|
-
Object.defineProperty(this, "tempsrfkey", {
|
|
6662
|
-
enumerable: false,
|
|
6663
|
-
configurable: true,
|
|
6664
|
-
writable: true,
|
|
6665
|
-
value: isNil9(this.srfkey) ? createUUID4() : this.srfkey
|
|
6666
|
-
});
|
|
6667
|
-
this.defineProperties();
|
|
6668
|
-
}
|
|
6669
|
-
/**
|
|
6670
|
-
* 代理实际数据
|
|
6671
|
-
*
|
|
6672
|
-
* @author chitanda
|
|
6673
|
-
* @date 2022-10-11 22:10:55
|
|
6674
|
-
* @protected
|
|
6675
|
-
*/
|
|
6676
|
-
defineProperties() {
|
|
6677
|
-
var _a;
|
|
6678
|
-
const { _data, convertVal } = this;
|
|
6679
|
-
const properties = {};
|
|
6680
|
-
const keys = Object.keys(_data);
|
|
6681
|
-
keys.forEach((key) => {
|
|
6682
|
-
properties[key] = {
|
|
6683
|
-
enumerable: true,
|
|
6684
|
-
set(val) {
|
|
6685
|
-
_data[key] = val;
|
|
6686
|
-
},
|
|
6687
|
-
get() {
|
|
6688
|
-
return _data[key];
|
|
6689
|
-
}
|
|
6690
|
-
};
|
|
6691
|
-
});
|
|
6692
|
-
(_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
6693
|
-
const key = field.codeName.toLowerCase();
|
|
6694
|
-
properties[key] = {
|
|
6695
|
-
enumerable: true,
|
|
6696
|
-
set(val) {
|
|
6697
|
-
_data[key] = convertVal(val, field.stdDataType);
|
|
6698
|
-
},
|
|
6699
|
-
get() {
|
|
6700
|
-
return _data[key];
|
|
6701
|
-
}
|
|
6702
|
-
};
|
|
6703
|
-
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
6704
|
-
});
|
|
6705
|
-
Object.defineProperties(this, properties);
|
|
6706
|
-
}
|
|
6707
|
-
/**
|
|
6708
|
-
* 克隆数据
|
|
6709
|
-
*
|
|
6710
|
-
* @author chitanda
|
|
6711
|
-
* @date 2022-10-11 00:10:15
|
|
6712
|
-
* @return {*} {AppDataEntity}
|
|
6713
|
-
*/
|
|
6714
|
-
clone() {
|
|
6715
|
-
const entity = new _AppDataEntity(this._entity, this._data);
|
|
6716
|
-
entity.srfkey = this.srfkey;
|
|
6717
|
-
return entity;
|
|
6718
|
-
}
|
|
6719
|
-
/**
|
|
6720
|
-
* 合并参数
|
|
6721
|
-
*
|
|
6722
|
-
* @author chitanda
|
|
6723
|
-
* @date 2022-10-19 11:10:25
|
|
6724
|
-
* @param {(IData | AppDataEntity)} data
|
|
6725
|
-
* @return {*} {AppDataEntity}
|
|
6726
|
-
*/
|
|
6727
|
-
assign(data) {
|
|
6728
|
-
let _data = {};
|
|
6729
|
-
if (data instanceof _AppDataEntity) {
|
|
6730
|
-
_data = data._data;
|
|
6731
|
-
} else {
|
|
6732
|
-
_data = data;
|
|
6733
|
-
}
|
|
6734
|
-
Object.keys(_data).forEach((key) => {
|
|
6735
|
-
if (_data[key] === void 0) {
|
|
6736
|
-
delete _data[key];
|
|
6737
|
-
}
|
|
6738
|
-
});
|
|
6739
|
-
Object.assign(this._data, _data);
|
|
6740
|
-
return this;
|
|
6741
|
-
}
|
|
6742
|
-
/**
|
|
6743
|
-
* 根据属性的数据类型转换值
|
|
6744
|
-
* @author lxm
|
|
6745
|
-
* @date 2023-09-25 03:37:28
|
|
6746
|
-
* @protected
|
|
6747
|
-
* @param {unknown} value
|
|
6748
|
-
* @param {(number | undefined)} dataType
|
|
6749
|
-
* @return {*} {unknown}
|
|
6750
|
-
*/
|
|
6751
|
-
convertVal(value, dataType) {
|
|
6752
|
-
if (value == null) {
|
|
6753
|
-
return value;
|
|
6754
|
-
}
|
|
6755
|
-
if (isNil9(dataType)) {
|
|
6756
|
-
return value;
|
|
6757
|
-
}
|
|
6758
|
-
if (DataTypes.isNumber(dataType)) {
|
|
6759
|
-
const numVal = !isNil9(value) && value !== "" ? Number(value) : value;
|
|
6760
|
-
if (Number.isNaN(numVal)) {
|
|
6761
|
-
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
6762
|
-
return value;
|
|
6763
|
-
}
|
|
6764
|
-
return numVal;
|
|
6765
|
-
}
|
|
6766
|
-
return value;
|
|
6767
|
-
}
|
|
6768
|
-
};
|
|
6769
6823
|
|
|
6770
6824
|
// src/service/dto/method.dto.ts
|
|
6771
6825
|
import { ModelError as ModelError6 } from "@ibiz-template/core";
|
|
@@ -6886,7 +6940,7 @@ var MethodDto = class _MethodDto {
|
|
|
6886
6940
|
* @date 2022-10-10 23:10:50
|
|
6887
6941
|
* @param {IContext} context
|
|
6888
6942
|
* @param {IData[]} data
|
|
6889
|
-
* @return {*} {Promise<
|
|
6943
|
+
* @return {*} {Promise<IDataEntity[]>}
|
|
6890
6944
|
*/
|
|
6891
6945
|
async sets(context, data) {
|
|
6892
6946
|
if (this.isLocalMode) {
|
|
@@ -6907,10 +6961,10 @@ var MethodDto = class _MethodDto {
|
|
|
6907
6961
|
if (items) {
|
|
6908
6962
|
const pKey = datum[this.entity.keyAppDEFieldId];
|
|
6909
6963
|
items.forEach((item) => {
|
|
6910
|
-
item.srfpkey = pKey;
|
|
6911
6964
|
item[field.refPickupAppDEFieldId] = pKey;
|
|
6912
6965
|
});
|
|
6913
6966
|
await dto.sets(context, items);
|
|
6967
|
+
delete datum[key];
|
|
6914
6968
|
} else {
|
|
6915
6969
|
await dto.sets(context, []);
|
|
6916
6970
|
}
|
|
@@ -6919,7 +6973,7 @@ var MethodDto = class _MethodDto {
|
|
|
6919
6973
|
for (let i = 0; i < all.length; i++) {
|
|
6920
6974
|
await all[i];
|
|
6921
6975
|
}
|
|
6922
|
-
const entityData =
|
|
6976
|
+
const entityData = this.service.createEntity(datum);
|
|
6923
6977
|
if (this.isLocalMode) {
|
|
6924
6978
|
await this.service.local.add(context, entityData);
|
|
6925
6979
|
}
|
|
@@ -7155,29 +7209,20 @@ var Method = class {
|
|
|
7155
7209
|
* @return {*} {(IDataEntity | IDataEntity[])}
|
|
7156
7210
|
*/
|
|
7157
7211
|
createEntity(data) {
|
|
7158
|
-
|
|
7159
|
-
if (single instanceof AppDataEntity) {
|
|
7160
|
-
return single.clone();
|
|
7161
|
-
}
|
|
7162
|
-
return new AppDataEntity(this.entity, single);
|
|
7163
|
-
};
|
|
7164
|
-
if (isArray4(data)) {
|
|
7165
|
-
return data.map((item) => toEntity(item));
|
|
7166
|
-
}
|
|
7167
|
-
return toEntity(data);
|
|
7212
|
+
return this.service.createEntity(data);
|
|
7168
7213
|
}
|
|
7169
7214
|
};
|
|
7170
7215
|
|
|
7171
7216
|
// src/de-logic/index.ts
|
|
7172
7217
|
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
7173
|
-
import { isArray as
|
|
7218
|
+
import { isArray as isArray5 } from "lodash-es";
|
|
7174
7219
|
import { clone as clone12 } from "ramda";
|
|
7175
7220
|
|
|
7176
7221
|
// src/de-logic/de-logic.ts
|
|
7177
7222
|
import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
7178
7223
|
|
|
7179
7224
|
// src/de-logic/de-logic-context.ts
|
|
7180
|
-
import { isArray as
|
|
7225
|
+
import { isArray as isArray4 } from "lodash-es";
|
|
7181
7226
|
var DELogicContext = class {
|
|
7182
7227
|
/**
|
|
7183
7228
|
* Creates an instance of DELogicContext.
|
|
@@ -7224,7 +7269,7 @@ var DELogicContext = class {
|
|
|
7224
7269
|
* @type {string}
|
|
7225
7270
|
*/
|
|
7226
7271
|
this.defaultParamName = "Default";
|
|
7227
|
-
this.parameters = { context, data:
|
|
7272
|
+
this.parameters = { context, data: isArray4(data) ? data : [data], params };
|
|
7228
7273
|
}
|
|
7229
7274
|
/**
|
|
7230
7275
|
* 上下文
|
|
@@ -8257,7 +8302,7 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
|
|
|
8257
8302
|
if (!data) {
|
|
8258
8303
|
return;
|
|
8259
8304
|
}
|
|
8260
|
-
if (
|
|
8305
|
+
if (isArray5(data)) {
|
|
8261
8306
|
await Promise.all(
|
|
8262
8307
|
data.map(
|
|
8263
8308
|
(item) => execSingleFieldLogics(entity, type, context, item, params)
|
|
@@ -8279,7 +8324,7 @@ var DEActionMethod = class extends Method {
|
|
|
8279
8324
|
* @return {*} {(Promise<IData | IData[]>)}
|
|
8280
8325
|
*/
|
|
8281
8326
|
async inputHandle(context, data) {
|
|
8282
|
-
if (
|
|
8327
|
+
if (isArray6(data)) {
|
|
8283
8328
|
return data;
|
|
8284
8329
|
}
|
|
8285
8330
|
return this.input.handle(context, data);
|
|
@@ -8338,7 +8383,7 @@ var DEActionMethod = class extends Method {
|
|
|
8338
8383
|
if (this.method.needResourceKey) {
|
|
8339
8384
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
8340
8385
|
if (isNil10(srfkey)) {
|
|
8341
|
-
srfkey =
|
|
8386
|
+
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8342
8387
|
}
|
|
8343
8388
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
8344
8389
|
}
|
|
@@ -8477,7 +8522,7 @@ var DEActionMethod = class extends Method {
|
|
|
8477
8522
|
try {
|
|
8478
8523
|
const addData = this.createEntity(entity);
|
|
8479
8524
|
let resultData;
|
|
8480
|
-
if (
|
|
8525
|
+
if (isArray6(addData)) {
|
|
8481
8526
|
resultData = await Promise.all(
|
|
8482
8527
|
addData.map((item) => this.service.local.add(context, item))
|
|
8483
8528
|
);
|
|
@@ -8548,7 +8593,7 @@ var DEActionMethod = class extends Method {
|
|
|
8548
8593
|
try {
|
|
8549
8594
|
const updateData = this.createEntity(entity);
|
|
8550
8595
|
let resultData;
|
|
8551
|
-
if (
|
|
8596
|
+
if (isArray6(updateData)) {
|
|
8552
8597
|
resultData = await Promise.all(
|
|
8553
8598
|
updateData.map((item) => this.service.local.update(context, item))
|
|
8554
8599
|
);
|
|
@@ -8614,12 +8659,12 @@ import {
|
|
|
8614
8659
|
ModelError as ModelError13,
|
|
8615
8660
|
RuntimeModelError as RuntimeModelError20
|
|
8616
8661
|
} from "@ibiz-template/core";
|
|
8617
|
-
import { isArray as
|
|
8662
|
+
import { isArray as isArray7 } from "lodash-es";
|
|
8618
8663
|
import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
8619
8664
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
8620
8665
|
var FetchMethod = class extends Method {
|
|
8621
8666
|
async exec(context, params, params2) {
|
|
8622
|
-
const searchParams = params && !
|
|
8667
|
+
const searchParams = params && !isArray7(params) ? params : params2 || {};
|
|
8623
8668
|
if (this.isLocalMode) {
|
|
8624
8669
|
const items2 = await this.searchLocal(
|
|
8625
8670
|
null,
|
|
@@ -8770,6 +8815,7 @@ var TreeNodeData = class {
|
|
|
8770
8815
|
this.leaf = false;
|
|
8771
8816
|
this.leaf = opts.leaf === true;
|
|
8772
8817
|
this.parent = parentNodeData;
|
|
8818
|
+
this._nodeType = model.treeNodeType;
|
|
8773
8819
|
if (this.parent) {
|
|
8774
8820
|
this.context = { ...this.parent.context };
|
|
8775
8821
|
}
|
|
@@ -8832,8 +8878,10 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
8832
8878
|
};
|
|
8833
8879
|
|
|
8834
8880
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
8881
|
+
import { updateKeyDefine } from "@ibiz-template/core";
|
|
8835
8882
|
var TreeDataSetNodeData = class extends TreeNodeData {
|
|
8836
8883
|
constructor(model, parentNodeData, opts) {
|
|
8884
|
+
var _a;
|
|
8837
8885
|
super(model, parentNodeData, opts);
|
|
8838
8886
|
const { data } = opts;
|
|
8839
8887
|
this.deData = data;
|
|
@@ -8860,6 +8908,50 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
8860
8908
|
if (model.leafFlagAppDEFieldId) {
|
|
8861
8909
|
this.leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
|
|
8862
8910
|
}
|
|
8911
|
+
const dataItemkeyMap = /* @__PURE__ */ new Map();
|
|
8912
|
+
const dataItemDefaults = {};
|
|
8913
|
+
(_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
|
|
8914
|
+
const uiKey = dataItem.id.toLowerCase();
|
|
8915
|
+
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
8916
|
+
dataItemkeyMap.set(uiKey, deFieldKey);
|
|
8917
|
+
if (dataItem.defaultValue) {
|
|
8918
|
+
dataItemDefaults[uiKey] = dataItem.defaultValue;
|
|
8919
|
+
}
|
|
8920
|
+
});
|
|
8921
|
+
return new Proxy(this, {
|
|
8922
|
+
set(target, p, value) {
|
|
8923
|
+
if (Object.prototype.hasOwnProperty.call(target.deData, p)) {
|
|
8924
|
+
target.deData[p] = value;
|
|
8925
|
+
} else if (dataItemkeyMap.has(p)) {
|
|
8926
|
+
target.deData[dataItemkeyMap.get(p)] = value;
|
|
8927
|
+
} else {
|
|
8928
|
+
target[p] = value;
|
|
8929
|
+
}
|
|
8930
|
+
return true;
|
|
8931
|
+
},
|
|
8932
|
+
get(target, p, _receiver) {
|
|
8933
|
+
if (target[p] !== void 0) {
|
|
8934
|
+
return target[p];
|
|
8935
|
+
}
|
|
8936
|
+
if (dataItemkeyMap.has(p)) {
|
|
8937
|
+
return target.deData[dataItemkeyMap.get(p)] || dataItemDefaults[p];
|
|
8938
|
+
}
|
|
8939
|
+
if (target.deData[p] !== void 0) {
|
|
8940
|
+
return target.deData[p];
|
|
8941
|
+
}
|
|
8942
|
+
},
|
|
8943
|
+
ownKeys(target) {
|
|
8944
|
+
const allKeys = [
|
|
8945
|
+
.../* @__PURE__ */ new Set([
|
|
8946
|
+
...Object.keys(target),
|
|
8947
|
+
...dataItemkeyMap.keys(),
|
|
8948
|
+
...Object.keys(target.deData)
|
|
8949
|
+
])
|
|
8950
|
+
];
|
|
8951
|
+
updateKeyDefine(target, allKeys);
|
|
8952
|
+
return allKeys;
|
|
8953
|
+
}
|
|
8954
|
+
});
|
|
8863
8955
|
}
|
|
8864
8956
|
calcIcon(model) {
|
|
8865
8957
|
const icon = super.calcIcon(model) || {};
|
|
@@ -9064,7 +9156,7 @@ var CalendarItemData = class {
|
|
|
9064
9156
|
};
|
|
9065
9157
|
|
|
9066
9158
|
// src/service/vo/map-data/map-data.ts
|
|
9067
|
-
function
|
|
9159
|
+
function updateKeyDefine2(target, keys) {
|
|
9068
9160
|
keys.forEach((key) => {
|
|
9069
9161
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9070
9162
|
Object.defineProperty(target, key, {
|
|
@@ -9150,7 +9242,7 @@ var MapData = class {
|
|
|
9150
9242
|
const allKeys = [
|
|
9151
9243
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9152
9244
|
];
|
|
9153
|
-
|
|
9245
|
+
updateKeyDefine2(target, allKeys);
|
|
9154
9246
|
return allKeys;
|
|
9155
9247
|
}
|
|
9156
9248
|
});
|
|
@@ -9159,7 +9251,7 @@ var MapData = class {
|
|
|
9159
9251
|
|
|
9160
9252
|
// src/service/vo/panel-data/panel-data.ts
|
|
9161
9253
|
import { QXEvent as QXEvent2 } from "qx-util";
|
|
9162
|
-
function
|
|
9254
|
+
function updateKeyDefine3(target, keys) {
|
|
9163
9255
|
keys.forEach((key) => {
|
|
9164
9256
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9165
9257
|
Object.defineProperty(target, key, {
|
|
@@ -9217,7 +9309,7 @@ var PanelData = class {
|
|
|
9217
9309
|
},
|
|
9218
9310
|
ownKeys(target) {
|
|
9219
9311
|
const allKeys = Object.keys(origin);
|
|
9220
|
-
|
|
9312
|
+
updateKeyDefine3(target, allKeys);
|
|
9221
9313
|
return allKeys;
|
|
9222
9314
|
}
|
|
9223
9315
|
});
|
|
@@ -9229,7 +9321,7 @@ var PanelData = class {
|
|
|
9229
9321
|
|
|
9230
9322
|
// src/service/vo/chart-data/chart-data.ts
|
|
9231
9323
|
import { createUUID as createUUID6 } from "qx-util";
|
|
9232
|
-
function
|
|
9324
|
+
function updateKeyDefine4(target, keys) {
|
|
9233
9325
|
keys.forEach((key) => {
|
|
9234
9326
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9235
9327
|
Object.defineProperty(target, key, {
|
|
@@ -9268,7 +9360,7 @@ var ChartData = class {
|
|
|
9268
9360
|
const allKeys = [
|
|
9269
9361
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9270
9362
|
];
|
|
9271
|
-
|
|
9363
|
+
updateKeyDefine4(target, allKeys);
|
|
9272
9364
|
return allKeys;
|
|
9273
9365
|
}
|
|
9274
9366
|
});
|
|
@@ -9499,7 +9591,7 @@ var MqttService = class {
|
|
|
9499
9591
|
|
|
9500
9592
|
// src/service/de-service-util.ts
|
|
9501
9593
|
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9502
|
-
var
|
|
9594
|
+
var _DEServiceUtil = class _DEServiceUtil {
|
|
9503
9595
|
/**
|
|
9504
9596
|
* Creates an instance of DEServiceUtil.
|
|
9505
9597
|
*
|
|
@@ -9518,13 +9610,6 @@ var DEServiceUtil = class {
|
|
|
9518
9610
|
* @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
|
|
9519
9611
|
*/
|
|
9520
9612
|
this.cache = /* @__PURE__ */ new Map();
|
|
9521
|
-
/**
|
|
9522
|
-
* 实体服务构造方法缓存
|
|
9523
|
-
* @author lxm
|
|
9524
|
-
* @date 2023-05-15 08:37:13
|
|
9525
|
-
* @protected
|
|
9526
|
-
*/
|
|
9527
|
-
this.constructorCache = /* @__PURE__ */ new Map();
|
|
9528
9613
|
}
|
|
9529
9614
|
/**
|
|
9530
9615
|
* 注册服务工厂方法
|
|
@@ -9534,8 +9619,8 @@ var DEServiceUtil = class {
|
|
|
9534
9619
|
* @param {string} id 实体标识
|
|
9535
9620
|
* @param {DEServiceConstructor} constructor
|
|
9536
9621
|
*/
|
|
9537
|
-
register(id, constructor) {
|
|
9538
|
-
this.constructorCache.set(id, constructor);
|
|
9622
|
+
static register(id, constructor) {
|
|
9623
|
+
this.constructorCache.set(id.toUpperCase(), constructor);
|
|
9539
9624
|
}
|
|
9540
9625
|
/**
|
|
9541
9626
|
* 根据实体标识获取实体服务
|
|
@@ -9560,7 +9645,7 @@ var DEServiceUtil = class {
|
|
|
9560
9645
|
if (!entityModel) {
|
|
9561
9646
|
throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9562
9647
|
}
|
|
9563
|
-
const constructor =
|
|
9648
|
+
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
9564
9649
|
let service;
|
|
9565
9650
|
if (constructor) {
|
|
9566
9651
|
service = await constructor(sandboxId, entityModel);
|
|
@@ -9624,6 +9709,15 @@ var DEServiceUtil = class {
|
|
|
9624
9709
|
return service.exec(methodName, context, params, params2);
|
|
9625
9710
|
}
|
|
9626
9711
|
};
|
|
9712
|
+
/**
|
|
9713
|
+
* 实体服务构造方法缓存
|
|
9714
|
+
*
|
|
9715
|
+
* @author lxm
|
|
9716
|
+
* @date 2023-05-15 08:37:13
|
|
9717
|
+
* @protected
|
|
9718
|
+
*/
|
|
9719
|
+
_DEServiceUtil.constructorCache = /* @__PURE__ */ new Map();
|
|
9720
|
+
var DEServiceUtil = _DEServiceUtil;
|
|
9627
9721
|
|
|
9628
9722
|
// src/command/app/open-app-view/open-app-view.ts
|
|
9629
9723
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
@@ -12605,7 +12699,10 @@ var MDControlController = class extends ControlController {
|
|
|
12605
12699
|
if (this.state.isSimple) {
|
|
12606
12700
|
return [];
|
|
12607
12701
|
}
|
|
12608
|
-
|
|
12702
|
+
const silent = args.silent === true;
|
|
12703
|
+
if (!silent) {
|
|
12704
|
+
await this.startLoading();
|
|
12705
|
+
}
|
|
12609
12706
|
try {
|
|
12610
12707
|
const isInitialLoad = args.isInitialLoad === true;
|
|
12611
12708
|
const isLoadMore = args.isLoadMore === true;
|
|
@@ -12637,7 +12734,9 @@ var MDControlController = class extends ControlController {
|
|
|
12637
12734
|
});
|
|
12638
12735
|
throw error;
|
|
12639
12736
|
} finally {
|
|
12640
|
-
|
|
12737
|
+
if (!silent) {
|
|
12738
|
+
await this.endLoading();
|
|
12739
|
+
}
|
|
12641
12740
|
}
|
|
12642
12741
|
this.state.items.forEach((item, index) => {
|
|
12643
12742
|
item.srfserialnum = index + 1;
|
|
@@ -14481,7 +14580,7 @@ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError46 }
|
|
|
14481
14580
|
|
|
14482
14581
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
14483
14582
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
14484
|
-
import { isArray as
|
|
14583
|
+
import { isArray as isArray8 } from "qx-util";
|
|
14485
14584
|
|
|
14486
14585
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
14487
14586
|
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
@@ -16208,7 +16307,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16208
16307
|
}
|
|
16209
16308
|
}
|
|
16210
16309
|
Object.assign(actionResult, {
|
|
16211
|
-
data:
|
|
16310
|
+
data: isArray8(res.data) ? res.data : [res.data],
|
|
16212
16311
|
nextContext: resultContext,
|
|
16213
16312
|
nextParams: tempParams
|
|
16214
16313
|
});
|
|
@@ -19287,15 +19386,11 @@ var FormDetailController = class {
|
|
|
19287
19386
|
calcDynaClass(data) {
|
|
19288
19387
|
if (this.model.dynaClass) {
|
|
19289
19388
|
const dynaClass = calcDynaClass(this.model.dynaClass, data);
|
|
19290
|
-
|
|
19291
|
-
this.state.class.containerDyna = dynaClass;
|
|
19292
|
-
}
|
|
19389
|
+
this.state.class.containerDyna = dynaClass;
|
|
19293
19390
|
}
|
|
19294
19391
|
if (this.model.labelDynaClass) {
|
|
19295
19392
|
const dynaClass = calcDynaClass(this.model.labelDynaClass, data);
|
|
19296
|
-
|
|
19297
|
-
this.state.class.labelDyna = dynaClass;
|
|
19298
|
-
}
|
|
19393
|
+
this.state.class.labelDyna = dynaClass;
|
|
19299
19394
|
}
|
|
19300
19395
|
}
|
|
19301
19396
|
/**
|
|
@@ -22647,6 +22742,36 @@ var GridController = class extends MDControlController {
|
|
|
22647
22742
|
convertColumnCaption(this.model.degridColumns);
|
|
22648
22743
|
}
|
|
22649
22744
|
}
|
|
22745
|
+
/**
|
|
22746
|
+
* 控制列显示
|
|
22747
|
+
* @param {IColumnState} columnState
|
|
22748
|
+
* @return {*}
|
|
22749
|
+
* @author: zhujiamin
|
|
22750
|
+
* @Date: 2023-12-19 16:02:14
|
|
22751
|
+
*/
|
|
22752
|
+
setColumnVisible(columnState) {
|
|
22753
|
+
columnState.hidden = !columnState.hidden;
|
|
22754
|
+
}
|
|
22755
|
+
/**
|
|
22756
|
+
* 设置点击分组后回显相关参数
|
|
22757
|
+
* @param {IData} data
|
|
22758
|
+
* @return {*}
|
|
22759
|
+
* @author: zhujiamin
|
|
22760
|
+
* @Date: 2023-12-21 10:54:45
|
|
22761
|
+
*/
|
|
22762
|
+
setGroupParams(data) {
|
|
22763
|
+
if (data.sort) {
|
|
22764
|
+
this.state.sortQuery = data.sort;
|
|
22765
|
+
} else {
|
|
22766
|
+
this.state.sortQuery = "";
|
|
22767
|
+
}
|
|
22768
|
+
if (data.columnstates) {
|
|
22769
|
+
this.state.columnStates = data.columnstates;
|
|
22770
|
+
} else {
|
|
22771
|
+
this.state.columnStates = [];
|
|
22772
|
+
this.initColumnStates();
|
|
22773
|
+
}
|
|
22774
|
+
}
|
|
22650
22775
|
};
|
|
22651
22776
|
|
|
22652
22777
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
@@ -24237,7 +24362,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
24237
24362
|
};
|
|
24238
24363
|
|
|
24239
24364
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24240
|
-
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24365
|
+
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24241
24366
|
import { isNil as isNil23 } from "ramda";
|
|
24242
24367
|
|
|
24243
24368
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -24281,11 +24406,137 @@ var SearchBarFilterController = class {
|
|
|
24281
24406
|
}
|
|
24282
24407
|
};
|
|
24283
24408
|
|
|
24284
|
-
// src/controller/control/search-bar/search-bar.
|
|
24285
|
-
var
|
|
24286
|
-
|
|
24287
|
-
|
|
24288
|
-
|
|
24409
|
+
// src/controller/control/search-bar/search-bar.service.ts
|
|
24410
|
+
var SearchBarService = class {
|
|
24411
|
+
/**
|
|
24412
|
+
* Creates an instance of ControlService.
|
|
24413
|
+
*
|
|
24414
|
+
*/
|
|
24415
|
+
constructor(model, viewTag) {
|
|
24416
|
+
/**
|
|
24417
|
+
* 主题管理URL
|
|
24418
|
+
* @return {*}
|
|
24419
|
+
* @author: zhujiamin
|
|
24420
|
+
* @Date: 2023-12-22 10:51:49
|
|
24421
|
+
*/
|
|
24422
|
+
this.themeUrl = "/extension/app_view_themes";
|
|
24423
|
+
this.model = model;
|
|
24424
|
+
this.viewTag = viewTag;
|
|
24425
|
+
}
|
|
24426
|
+
async init(_context) {
|
|
24427
|
+
this.app = ibiz.hub.getApp(this.model.appId);
|
|
24428
|
+
}
|
|
24429
|
+
/**
|
|
24430
|
+
* 执行查询多条数据的方法
|
|
24431
|
+
*
|
|
24432
|
+
*/
|
|
24433
|
+
async fetch() {
|
|
24434
|
+
const res = await this.app.net.post("".concat(this.themeUrl, "/fetch_default"), {
|
|
24435
|
+
app_view_tag: this.viewTag,
|
|
24436
|
+
sort: "create_time,asc"
|
|
24437
|
+
});
|
|
24438
|
+
if (res.ok) {
|
|
24439
|
+
res.data = this.convertBackDataToFront(res.data);
|
|
24440
|
+
}
|
|
24441
|
+
return res;
|
|
24442
|
+
}
|
|
24443
|
+
/**
|
|
24444
|
+
* 执行获取单条数据方法
|
|
24445
|
+
*
|
|
24446
|
+
*/
|
|
24447
|
+
async get(id) {
|
|
24448
|
+
const res = await this.app.net.get("".concat(this.themeUrl, "/").concat(id), {
|
|
24449
|
+
app_view_tag: this.viewTag
|
|
24450
|
+
});
|
|
24451
|
+
if (res.ok) {
|
|
24452
|
+
[res.data] = this.convertBackDataToFront([res.data]);
|
|
24453
|
+
}
|
|
24454
|
+
return res;
|
|
24455
|
+
}
|
|
24456
|
+
/**
|
|
24457
|
+
* 删除单条数据
|
|
24458
|
+
*
|
|
24459
|
+
*/
|
|
24460
|
+
async remove(id) {
|
|
24461
|
+
const res = await this.app.net.delete("".concat(this.themeUrl, "/").concat(id), {
|
|
24462
|
+
app_view_tag: this.viewTag
|
|
24463
|
+
});
|
|
24464
|
+
return res;
|
|
24465
|
+
}
|
|
24466
|
+
/**
|
|
24467
|
+
* 新建数据
|
|
24468
|
+
*
|
|
24469
|
+
*/
|
|
24470
|
+
async create(caption) {
|
|
24471
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24472
|
+
name: caption,
|
|
24473
|
+
app_view_tag: this.viewTag
|
|
24474
|
+
});
|
|
24475
|
+
return res;
|
|
24476
|
+
}
|
|
24477
|
+
/**
|
|
24478
|
+
* 新建数据(带参数,给平台配置建立的分组用)
|
|
24479
|
+
*
|
|
24480
|
+
*/
|
|
24481
|
+
async createWithParams(id, data) {
|
|
24482
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24483
|
+
id,
|
|
24484
|
+
theme_model: JSON.stringify(data),
|
|
24485
|
+
app_view_tag: this.viewTag,
|
|
24486
|
+
show: data.show
|
|
24487
|
+
});
|
|
24488
|
+
return res;
|
|
24489
|
+
}
|
|
24490
|
+
/**
|
|
24491
|
+
* 更新数据
|
|
24492
|
+
*
|
|
24493
|
+
*/
|
|
24494
|
+
async update(id, data) {
|
|
24495
|
+
const updateParams = { app_view_tag: this.viewTag };
|
|
24496
|
+
if (data.theme_model) {
|
|
24497
|
+
Object.assign(updateParams, {
|
|
24498
|
+
theme_model: JSON.stringify(data.theme_model)
|
|
24499
|
+
});
|
|
24500
|
+
}
|
|
24501
|
+
if (data.caption) {
|
|
24502
|
+
Object.assign(updateParams, {
|
|
24503
|
+
name: data.caption
|
|
24504
|
+
});
|
|
24505
|
+
}
|
|
24506
|
+
if (typeof data.show === "boolean") {
|
|
24507
|
+
Object.assign(updateParams, {
|
|
24508
|
+
show: data.show
|
|
24509
|
+
});
|
|
24510
|
+
}
|
|
24511
|
+
const res = await this.app.net.put("".concat(this.themeUrl, "/").concat(id), updateParams);
|
|
24512
|
+
return res;
|
|
24513
|
+
}
|
|
24514
|
+
/**
|
|
24515
|
+
* 转换后台数据成前端需要的格式
|
|
24516
|
+
* @param {IData} data
|
|
24517
|
+
* @return {*}
|
|
24518
|
+
* @author: zhujiamin
|
|
24519
|
+
* @Date: 2023-12-22 11:19:50
|
|
24520
|
+
*/
|
|
24521
|
+
convertBackDataToFront(data) {
|
|
24522
|
+
return data.map((item) => {
|
|
24523
|
+
const tempItem = { ...item };
|
|
24524
|
+
if (item.name) {
|
|
24525
|
+
tempItem.caption = item.name;
|
|
24526
|
+
}
|
|
24527
|
+
if (item.theme_model) {
|
|
24528
|
+
tempItem.searchGroupData = JSON.parse(item.theme_model);
|
|
24529
|
+
}
|
|
24530
|
+
return tempItem;
|
|
24531
|
+
});
|
|
24532
|
+
}
|
|
24533
|
+
};
|
|
24534
|
+
|
|
24535
|
+
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24536
|
+
var SearchBarController = class extends ControlController {
|
|
24537
|
+
constructor() {
|
|
24538
|
+
super(...arguments);
|
|
24539
|
+
/**
|
|
24289
24540
|
* 快速搜索占位符
|
|
24290
24541
|
* @return {*}
|
|
24291
24542
|
* @author: zhujiamin
|
|
@@ -24299,6 +24550,29 @@ var SearchBarController = class extends ControlController {
|
|
|
24299
24550
|
* @type {SearchBarFilterController[]}
|
|
24300
24551
|
*/
|
|
24301
24552
|
this.filterControllers = [];
|
|
24553
|
+
/**
|
|
24554
|
+
* 当前编辑的分组
|
|
24555
|
+
* @return {*}
|
|
24556
|
+
* @author: zhujiamin
|
|
24557
|
+
* @Date: 2023-12-20 18:06:37
|
|
24558
|
+
*/
|
|
24559
|
+
this.currentEditGroup = null;
|
|
24560
|
+
/**
|
|
24561
|
+
* 是否为后台分组
|
|
24562
|
+
* @return {*}
|
|
24563
|
+
* @author: zhujiamin
|
|
24564
|
+
* @Date: 2023-12-21 10:17:43
|
|
24565
|
+
*/
|
|
24566
|
+
this.isBackendSearchGroup = true;
|
|
24567
|
+
}
|
|
24568
|
+
/**
|
|
24569
|
+
* 表格控制器
|
|
24570
|
+
* @return {*}
|
|
24571
|
+
* @author: zhujiamin
|
|
24572
|
+
* @Date: 2023-12-22 13:50:16
|
|
24573
|
+
*/
|
|
24574
|
+
get grid() {
|
|
24575
|
+
return this.ctx.getController("grid");
|
|
24302
24576
|
}
|
|
24303
24577
|
initState() {
|
|
24304
24578
|
super.initState();
|
|
@@ -24308,6 +24582,8 @@ var SearchBarController = class extends ControlController {
|
|
|
24308
24582
|
if (this.model.enableFilter) {
|
|
24309
24583
|
this.resetFilter();
|
|
24310
24584
|
}
|
|
24585
|
+
this.state.searchBarGroups = [];
|
|
24586
|
+
this.state.selectedSearchGroupItem = null;
|
|
24311
24587
|
}
|
|
24312
24588
|
async onCreated() {
|
|
24313
24589
|
await super.onCreated();
|
|
@@ -24319,7 +24595,12 @@ var SearchBarController = class extends ControlController {
|
|
|
24319
24595
|
this.appDataEntity = appDataEntity;
|
|
24320
24596
|
this.calcQuickSearchPlaceholder();
|
|
24321
24597
|
}
|
|
24598
|
+
if (this.isBackendSearchGroup && this.view.model.codeName) {
|
|
24599
|
+
this.service = new SearchBarService(this.model, this.view.model.codeName);
|
|
24600
|
+
await this.service.init(this.context);
|
|
24601
|
+
}
|
|
24322
24602
|
await this.initSearchBarFilters();
|
|
24603
|
+
await this.initSearBarGroups();
|
|
24323
24604
|
}
|
|
24324
24605
|
/**
|
|
24325
24606
|
* 计算快速搜索的占位
|
|
@@ -24385,7 +24666,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24385
24666
|
if (this.state.query) {
|
|
24386
24667
|
params.query = this.state.query;
|
|
24387
24668
|
}
|
|
24388
|
-
if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
24669
|
+
if (((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) && typeof this.state.selectedGroupItem.data === "string") {
|
|
24389
24670
|
const navParams = ScriptFactory.execSingleLine(
|
|
24390
24671
|
this.state.selectedGroupItem.data
|
|
24391
24672
|
);
|
|
@@ -24404,13 +24685,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24404
24685
|
* @date 2023-10-16 03:52:44
|
|
24405
24686
|
*/
|
|
24406
24687
|
resetFilter() {
|
|
24407
|
-
this.state.filterNodes =
|
|
24408
|
-
{
|
|
24409
|
-
leaf: false,
|
|
24410
|
-
logicType: "AND",
|
|
24411
|
-
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24412
|
-
}
|
|
24413
|
-
];
|
|
24688
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24414
24689
|
this.evt.emit("onSearch", void 0);
|
|
24415
24690
|
}
|
|
24416
24691
|
/**
|
|
@@ -24481,6 +24756,123 @@ var SearchBarController = class extends ControlController {
|
|
|
24481
24756
|
value: node.value
|
|
24482
24757
|
};
|
|
24483
24758
|
}
|
|
24759
|
+
/**
|
|
24760
|
+
* 获取初始过滤项树节点数据集合
|
|
24761
|
+
* @return {*}
|
|
24762
|
+
* @author: zhujiamin
|
|
24763
|
+
* @Date: 2023-12-21 17:29:47
|
|
24764
|
+
*/
|
|
24765
|
+
getOriginFilterNodes() {
|
|
24766
|
+
return [
|
|
24767
|
+
{
|
|
24768
|
+
leaf: false,
|
|
24769
|
+
logicType: "AND",
|
|
24770
|
+
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24771
|
+
}
|
|
24772
|
+
];
|
|
24773
|
+
}
|
|
24774
|
+
/**
|
|
24775
|
+
* 初始化搜索栏分组项(获取后台分组清单并合并模型)
|
|
24776
|
+
* @return {*}
|
|
24777
|
+
* @author: zhujiamin
|
|
24778
|
+
* @Date: 2023-12-19 14:43:46
|
|
24779
|
+
*/
|
|
24780
|
+
async initSearBarGroups() {
|
|
24781
|
+
this.state.searchBarGroups = [];
|
|
24782
|
+
if (this.isBackendSearchGroup) {
|
|
24783
|
+
if (this.model.searchBarGroups && this.model.searchBarGroups.length > 0) {
|
|
24784
|
+
this.state.searchBarGroups = this.model.searchBarGroups.map((item) => ({
|
|
24785
|
+
...item,
|
|
24786
|
+
show: true,
|
|
24787
|
+
saved: false,
|
|
24788
|
+
searchGroupData: {}
|
|
24789
|
+
}));
|
|
24790
|
+
}
|
|
24791
|
+
const res = await this.service.fetch();
|
|
24792
|
+
if (res.ok) {
|
|
24793
|
+
res.data.forEach((group) => {
|
|
24794
|
+
const existGroup = this.state.searchBarGroups.find(
|
|
24795
|
+
(item) => item.id === group.id
|
|
24796
|
+
);
|
|
24797
|
+
if (existGroup) {
|
|
24798
|
+
mergeInLeft3(existGroup, group);
|
|
24799
|
+
existGroup.saved = true;
|
|
24800
|
+
} else {
|
|
24801
|
+
this.state.searchBarGroups.push({
|
|
24802
|
+
...group,
|
|
24803
|
+
appId: this.context.srfappid,
|
|
24804
|
+
show: true,
|
|
24805
|
+
saved: true,
|
|
24806
|
+
searchGroupData: {}
|
|
24807
|
+
});
|
|
24808
|
+
}
|
|
24809
|
+
});
|
|
24810
|
+
}
|
|
24811
|
+
}
|
|
24812
|
+
}
|
|
24813
|
+
/**
|
|
24814
|
+
* 处理保存
|
|
24815
|
+
* @return {*}
|
|
24816
|
+
* @author: zhujiamin
|
|
24817
|
+
* @Date: 2023-12-19 16:17:15
|
|
24818
|
+
*/
|
|
24819
|
+
async handleSave() {
|
|
24820
|
+
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
24821
|
+
const filters = this.calcFilters();
|
|
24822
|
+
const saveParams = {
|
|
24823
|
+
filternodes: this.state.filterNodes,
|
|
24824
|
+
searchconds: filters,
|
|
24825
|
+
sort: this.grid.state.sortQuery,
|
|
24826
|
+
columnstates: this.grid.state.columnStates,
|
|
24827
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24828
|
+
};
|
|
24829
|
+
if (this.state.selectedSearchGroupItem.saved) {
|
|
24830
|
+
await this.service.update(this.state.selectedSearchGroupItem.id, {
|
|
24831
|
+
theme_model: saveParams,
|
|
24832
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24833
|
+
});
|
|
24834
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24835
|
+
} else {
|
|
24836
|
+
const res = await this.service.createWithParams(
|
|
24837
|
+
this.state.selectedSearchGroupItem.id,
|
|
24838
|
+
saveParams
|
|
24839
|
+
);
|
|
24840
|
+
if (res.ok) {
|
|
24841
|
+
const savedGroup = this.state.searchBarGroups.find(
|
|
24842
|
+
(group) => group.id === res.data.id
|
|
24843
|
+
);
|
|
24844
|
+
if (savedGroup) {
|
|
24845
|
+
savedGroup.saved = true;
|
|
24846
|
+
}
|
|
24847
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24848
|
+
}
|
|
24849
|
+
}
|
|
24850
|
+
}
|
|
24851
|
+
}
|
|
24852
|
+
/**
|
|
24853
|
+
* 处理点击后台分组
|
|
24854
|
+
* @return {*}
|
|
24855
|
+
* @author: zhujiamin
|
|
24856
|
+
* @Date: 2023-12-21 10:29:24
|
|
24857
|
+
*/
|
|
24858
|
+
async handleGroupClick(groupItem) {
|
|
24859
|
+
this.state.selectedSearchGroupItem = groupItem;
|
|
24860
|
+
if (groupItem.saved) {
|
|
24861
|
+
const res = await this.service.get(groupItem.id);
|
|
24862
|
+
if (res.ok) {
|
|
24863
|
+
mergeInLeft3(groupItem, res.data);
|
|
24864
|
+
}
|
|
24865
|
+
}
|
|
24866
|
+
if (groupItem.searchGroupData && groupItem.searchGroupData.filternodes) {
|
|
24867
|
+
this.state.filterNodes = groupItem.searchGroupData.filternodes;
|
|
24868
|
+
} else {
|
|
24869
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24870
|
+
}
|
|
24871
|
+
if (this.grid && groupItem && groupItem.searchGroupData) {
|
|
24872
|
+
this.grid.setGroupParams(groupItem.searchGroupData);
|
|
24873
|
+
await this.grid.load({ isInitialLoad: true });
|
|
24874
|
+
}
|
|
24875
|
+
}
|
|
24484
24876
|
};
|
|
24485
24877
|
|
|
24486
24878
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
@@ -25033,6 +25425,9 @@ var TreeController = class extends MDControlController {
|
|
|
25033
25425
|
*/
|
|
25034
25426
|
this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
|
|
25035
25427
|
}
|
|
25428
|
+
get _evt() {
|
|
25429
|
+
return this.evt;
|
|
25430
|
+
}
|
|
25036
25431
|
initState() {
|
|
25037
25432
|
super.initState();
|
|
25038
25433
|
this.state.defaultExpandedKeys = [];
|
|
@@ -25071,8 +25466,7 @@ var TreeController = class extends MDControlController {
|
|
|
25071
25466
|
}
|
|
25072
25467
|
this.initDropNodeRss();
|
|
25073
25468
|
this.initNodeClickTBUIActionItem();
|
|
25074
|
-
this.
|
|
25075
|
-
await this.service.init(this.context);
|
|
25469
|
+
await this.initService();
|
|
25076
25470
|
this.model.detreeNodes.forEach((node) => {
|
|
25077
25471
|
var _a2, _b2;
|
|
25078
25472
|
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
@@ -25088,6 +25482,17 @@ var TreeController = class extends MDControlController {
|
|
|
25088
25482
|
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
25089
25483
|
);
|
|
25090
25484
|
}
|
|
25485
|
+
/**
|
|
25486
|
+
* 初始化对应类型的部件服务
|
|
25487
|
+
* @author lxm
|
|
25488
|
+
* @date 2023-12-21 11:25:33
|
|
25489
|
+
* @protected
|
|
25490
|
+
* @return {*} {Promise<void>}
|
|
25491
|
+
*/
|
|
25492
|
+
async initService() {
|
|
25493
|
+
this.service = new TreeService(this.model);
|
|
25494
|
+
await this.service.init(this.context);
|
|
25495
|
+
}
|
|
25091
25496
|
/**
|
|
25092
25497
|
* 初始化节点拖入关系处理
|
|
25093
25498
|
* @author lxm
|
|
@@ -25162,7 +25567,7 @@ var TreeController = class extends MDControlController {
|
|
|
25162
25567
|
}
|
|
25163
25568
|
await this.afterLoad(args, nodes);
|
|
25164
25569
|
this.state.isLoaded = true;
|
|
25165
|
-
await this.
|
|
25570
|
+
await this._evt.emit("onLoadSuccess", {
|
|
25166
25571
|
isInitialLoad
|
|
25167
25572
|
});
|
|
25168
25573
|
return nodes;
|
|
@@ -25201,6 +25606,17 @@ var TreeController = class extends MDControlController {
|
|
|
25201
25606
|
} else {
|
|
25202
25607
|
this.state.rootNodes = nodes;
|
|
25203
25608
|
}
|
|
25609
|
+
await this.afterLoadNodes(nodes);
|
|
25610
|
+
return nodes;
|
|
25611
|
+
}
|
|
25612
|
+
/**
|
|
25613
|
+
* loadNodes加载完子数据之后的处理
|
|
25614
|
+
* @author lxm
|
|
25615
|
+
* @date 2023-12-22 02:37:50
|
|
25616
|
+
* @param {ITreeNodeData[]} nodes 加载回来的子数据
|
|
25617
|
+
* @return {*} {Promise<void>}
|
|
25618
|
+
*/
|
|
25619
|
+
async afterLoadNodes(nodes) {
|
|
25204
25620
|
this.state.items = [];
|
|
25205
25621
|
recursiveIterate10(
|
|
25206
25622
|
{ children: this.state.rootNodes },
|
|
@@ -25209,7 +25625,6 @@ var TreeController = class extends MDControlController {
|
|
|
25209
25625
|
}
|
|
25210
25626
|
);
|
|
25211
25627
|
this.state.expandedKeys = this.calcExpandedKeys(nodes);
|
|
25212
|
-
return nodes;
|
|
25213
25628
|
}
|
|
25214
25629
|
/**
|
|
25215
25630
|
* 树节点点击事件
|
|
@@ -25276,7 +25691,7 @@ var TreeController = class extends MDControlController {
|
|
|
25276
25691
|
}
|
|
25277
25692
|
setActive(item) {
|
|
25278
25693
|
const nodeParams = this.parseTreeNodeData(item);
|
|
25279
|
-
return this.
|
|
25694
|
+
return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
|
|
25280
25695
|
}
|
|
25281
25696
|
setSelection(selection) {
|
|
25282
25697
|
const selectionIds = selection.map((item) => item.id);
|
|
@@ -25296,6 +25711,20 @@ var TreeController = class extends MDControlController {
|
|
|
25296
25711
|
var _a;
|
|
25297
25712
|
return (_a = this.model.detreeNodes) == null ? void 0 : _a.find((item) => item.id === id);
|
|
25298
25713
|
}
|
|
25714
|
+
/**
|
|
25715
|
+
* 通过标识获取节点数据
|
|
25716
|
+
* @author lxm
|
|
25717
|
+
* @date 2023-12-22 02:21:38
|
|
25718
|
+
* @param {string} id 可以是节点id也可以是_uuid
|
|
25719
|
+
* @return {*} {(ITreeNodeData | undefined)}
|
|
25720
|
+
*/
|
|
25721
|
+
getNodeData(key) {
|
|
25722
|
+
const find = this.state.items.find((item) => item.id === key);
|
|
25723
|
+
if (find) {
|
|
25724
|
+
return find;
|
|
25725
|
+
}
|
|
25726
|
+
return this.state.items.find((item) => item._uuid === key);
|
|
25727
|
+
}
|
|
25299
25728
|
/**
|
|
25300
25729
|
* 执行界面行为
|
|
25301
25730
|
*
|
|
@@ -25395,7 +25824,7 @@ var TreeController = class extends MDControlController {
|
|
|
25395
25824
|
}
|
|
25396
25825
|
const targetNode = refreshParent ? currentNode.parent : currentNode;
|
|
25397
25826
|
const nodes = await this.loadNodes(targetNode);
|
|
25398
|
-
this.
|
|
25827
|
+
this._evt.emit("onAfterRefreshParent", {
|
|
25399
25828
|
parentNode: targetNode,
|
|
25400
25829
|
children: nodes
|
|
25401
25830
|
});
|
|
@@ -25565,7 +25994,7 @@ var TreeController = class extends MDControlController {
|
|
|
25565
25994
|
});
|
|
25566
25995
|
}
|
|
25567
25996
|
await this.updateDeNodeData(modifiedNodeDatas);
|
|
25568
|
-
this.
|
|
25997
|
+
this._evt.emit("onAfterNodeDrop", { isChangedParent });
|
|
25569
25998
|
}
|
|
25570
25999
|
/**
|
|
25571
26000
|
* 更新实体节点数据
|
|
@@ -26070,7 +26499,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
26070
26499
|
*/
|
|
26071
26500
|
async loadMore() {
|
|
26072
26501
|
if (this.state.total > this.state.items.length && !this.state.isLoading) {
|
|
26073
|
-
await this.load({ isLoadMore: true });
|
|
26502
|
+
await this.load({ isLoadMore: true, silent: true });
|
|
26074
26503
|
}
|
|
26075
26504
|
}
|
|
26076
26505
|
/**
|
|
@@ -26787,7 +27216,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26787
27216
|
/**
|
|
26788
27217
|
* 打开批操作工具栏
|
|
26789
27218
|
*
|
|
26790
|
-
* @param {string} groupKey
|
|
27219
|
+
* @param {string | number} groupKey
|
|
26791
27220
|
* @memberof KanbanController
|
|
26792
27221
|
*/
|
|
26793
27222
|
openBatch(groupKey) {
|
|
@@ -26817,194 +27246,103 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26817
27246
|
import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
|
|
26818
27247
|
|
|
26819
27248
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
26820
|
-
import { isArray as isArray10 } from "qx-util";
|
|
26821
27249
|
var TreeGridExService = class extends TreeService {
|
|
26822
|
-
|
|
26823
|
-
|
|
27250
|
+
};
|
|
27251
|
+
|
|
27252
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts
|
|
27253
|
+
var TreeGridExRowState = class {
|
|
27254
|
+
constructor(data, treeGrid) {
|
|
26824
27255
|
/**
|
|
26825
|
-
*
|
|
26826
|
-
*
|
|
26827
|
-
* @author
|
|
26828
|
-
* @date
|
|
26829
|
-
* @type {
|
|
26830
|
-
|
|
26831
|
-
|
|
26832
|
-
this.
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
26836
|
-
*
|
|
26837
|
-
* @author lxm
|
|
26838
|
-
* @date 2022-08-31 18:08:37
|
|
26839
|
-
*/
|
|
26840
|
-
initUIDataMap() {
|
|
26841
|
-
var _a;
|
|
26842
|
-
super.initUIDataMap();
|
|
26843
|
-
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
|
|
26844
|
-
var _a2;
|
|
26845
|
-
const dataMap = /* @__PURE__ */ new Map();
|
|
26846
|
-
(_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
|
|
26847
|
-
const uiKey = dataItem.id.toLowerCase();
|
|
26848
|
-
const deField = dataItem.appDEFieldId;
|
|
26849
|
-
const deFieldKey = deField.toLowerCase();
|
|
26850
|
-
const mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26851
|
-
isOriginField: true,
|
|
26852
|
-
dataType: dataItem.dataType
|
|
26853
|
-
});
|
|
26854
|
-
dataMap.set(uiKey, mapField);
|
|
26855
|
-
});
|
|
26856
|
-
this.multipleUiMap.set(item.id, dataMap);
|
|
26857
|
-
});
|
|
26858
|
-
}
|
|
26859
|
-
/**
|
|
26860
|
-
* 获取实体数据集数据
|
|
26861
|
-
*
|
|
26862
|
-
* @protected
|
|
26863
|
-
* @param {TreeNodeRSModel} nodeRS
|
|
26864
|
-
* @param {TreeFetchOpts} opts
|
|
26865
|
-
* @returns {*}
|
|
26866
|
-
* @memberof TreeService
|
|
26867
|
-
*/
|
|
26868
|
-
async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26869
|
-
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
26870
|
-
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
26871
|
-
context: opts.context,
|
|
26872
|
-
params: opts.params,
|
|
26873
|
-
navContext: {},
|
|
26874
|
-
navParams: {}
|
|
26875
|
-
};
|
|
26876
|
-
params.size = nodeModel.maxSize || 1e3;
|
|
26877
|
-
if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
|
|
26878
|
-
Object.assign(params, {
|
|
26879
|
-
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
|
|
26880
|
-
});
|
|
26881
|
-
}
|
|
26882
|
-
const response = await this.app.deService.exec(
|
|
26883
|
-
appDataEntityId,
|
|
26884
|
-
appDEDataSetId,
|
|
26885
|
-
context,
|
|
26886
|
-
params
|
|
26887
|
-
);
|
|
26888
|
-
if (response.data.length) {
|
|
26889
|
-
const { data } = this.handleResponseForMultiple(response, nodeModel.id);
|
|
26890
|
-
const nodeDatas = data.map((item) => {
|
|
26891
|
-
return new TreeDataSetNodeData(nodeModel, parentNodeData, {
|
|
26892
|
-
data: item,
|
|
26893
|
-
leaf: !!opts.leaf,
|
|
26894
|
-
navContext,
|
|
26895
|
-
navParams
|
|
26896
|
-
});
|
|
26897
|
-
});
|
|
26898
|
-
return nodeDatas;
|
|
26899
|
-
}
|
|
26900
|
-
return [];
|
|
26901
|
-
}
|
|
26902
|
-
/**
|
|
26903
|
-
* 处理多数据源响应
|
|
26904
|
-
*
|
|
26905
|
-
* @author zk
|
|
26906
|
-
* @date 2023-09-21 04:09:06
|
|
26907
|
-
* @param {IHttpResponse} response
|
|
26908
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26909
|
-
* @return {*} {IHttpResponse}
|
|
26910
|
-
* @memberof TreeGridService
|
|
26911
|
-
*/
|
|
26912
|
-
handleResponseForMultiple(response, tag) {
|
|
26913
|
-
const res = super.handleResponse(response);
|
|
26914
|
-
if (res.headers) {
|
|
26915
|
-
if (res.headers["x-page"]) {
|
|
26916
|
-
res.page = Number(res.headers["x-page"]);
|
|
26917
|
-
}
|
|
26918
|
-
if (res.headers["x-per-page"]) {
|
|
26919
|
-
res.size = Number(res.headers["x-per-page"]);
|
|
26920
|
-
}
|
|
26921
|
-
if (res.headers["x-total"]) {
|
|
26922
|
-
res.total = Number(res.headers["x-total"]);
|
|
26923
|
-
}
|
|
26924
|
-
}
|
|
26925
|
-
if (res.ok) {
|
|
26926
|
-
if (isArray10(res.data)) {
|
|
26927
|
-
res.data = res.data.map(
|
|
26928
|
-
(item) => this.toUIDataForMultiple(item, tag)
|
|
26929
|
-
);
|
|
26930
|
-
} else {
|
|
26931
|
-
res.data = this.toUIDataForMultiple(res.data, tag);
|
|
26932
|
-
}
|
|
26933
|
-
}
|
|
26934
|
-
return res;
|
|
26935
|
-
}
|
|
26936
|
-
/**
|
|
26937
|
-
* 实体数据转ui数据
|
|
26938
|
-
*
|
|
26939
|
-
* @author zk
|
|
26940
|
-
* @date 2023-09-21 06:09:06
|
|
26941
|
-
* @param {IData} entityData 实体数据
|
|
26942
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26943
|
-
* @return {*} {ControlVO}
|
|
26944
|
-
* @memberof TreeGridService
|
|
26945
|
-
*/
|
|
26946
|
-
toUIDataForMultiple(entityData, tag) {
|
|
26947
|
-
const dataUIMap = this.multipleUiMap.get(tag);
|
|
26948
|
-
return new ControlVO(entityData, dataUIMap);
|
|
27256
|
+
* 操作列状态(p是操作列的标识)
|
|
27257
|
+
*
|
|
27258
|
+
* @author lxm
|
|
27259
|
+
* @date 2022-09-07 22:09:38
|
|
27260
|
+
* @type {({ [p: string]: IButtonContainerState })}
|
|
27261
|
+
*/
|
|
27262
|
+
this.uaColStates = {};
|
|
27263
|
+
this.data = data;
|
|
27264
|
+
Object.values(treeGrid.uaColumns).forEach((column) => {
|
|
27265
|
+
column.initActionStates(this);
|
|
27266
|
+
});
|
|
26949
27267
|
}
|
|
26950
27268
|
};
|
|
26951
27269
|
|
|
26952
27270
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
26953
|
-
var TreeGridExController = class extends
|
|
27271
|
+
var TreeGridExController = class extends TreeController {
|
|
26954
27272
|
constructor() {
|
|
26955
27273
|
super(...arguments);
|
|
26956
27274
|
/**
|
|
26957
|
-
*
|
|
27275
|
+
* 树表格(增强)列的适配器
|
|
26958
27276
|
*
|
|
26959
27277
|
* @author zk
|
|
26960
27278
|
* @date 2023-09-21 06:09:04
|
|
26961
|
-
* @type {{ [key: string]:
|
|
27279
|
+
* @type {{ [key: string]: ITreeGridExColumnProvider }}
|
|
26962
27280
|
* @memberof TreeGridExController
|
|
26963
27281
|
*/
|
|
26964
27282
|
this.providers = {};
|
|
26965
27283
|
/**
|
|
26966
|
-
*
|
|
27284
|
+
* 所有树表格(增强)列控制器集合
|
|
26967
27285
|
*
|
|
26968
27286
|
* @author zk
|
|
26969
27287
|
* @date 2023-09-21 06:09:10
|
|
26970
|
-
* @type {{ [key: string]:
|
|
27288
|
+
* @type {{ [key: string]: TreeGridExColumnController }}
|
|
26971
27289
|
* @memberof TreeGridExController
|
|
26972
27290
|
*/
|
|
26973
27291
|
this.columns = {};
|
|
26974
27292
|
/**
|
|
26975
|
-
*
|
|
27293
|
+
* 所有树表格(增强)属性列的控制器
|
|
26976
27294
|
*
|
|
26977
27295
|
* @author zk
|
|
26978
27296
|
* @date 2023-09-21 06:09:16
|
|
26979
|
-
* @type {{ [key: string]:
|
|
27297
|
+
* @type {{ [key: string]: TreeGridExFieldColumnController }}
|
|
26980
27298
|
* @memberof TreeGridExController
|
|
26981
27299
|
*/
|
|
26982
27300
|
this.fieldColumns = {};
|
|
26983
27301
|
/**
|
|
26984
|
-
*
|
|
27302
|
+
* 所有树表格(增强)操作列的控制器
|
|
26985
27303
|
*
|
|
26986
27304
|
* @author zk
|
|
26987
27305
|
* @date 2023-09-21 06:09:21
|
|
26988
|
-
* @type {{ [key: string]:
|
|
27306
|
+
* @type {{ [key: string]: TreeGridExUAColumnController }}
|
|
26989
27307
|
* @memberof TreeGridExController
|
|
26990
27308
|
*/
|
|
26991
27309
|
this.uaColumns = {};
|
|
26992
27310
|
}
|
|
27311
|
+
/**
|
|
27312
|
+
* 是否有配置宽度自适应列
|
|
27313
|
+
*
|
|
27314
|
+
* @type {boolean}
|
|
27315
|
+
* @memberof GridController
|
|
27316
|
+
*/
|
|
27317
|
+
get hasAdaptiveColumn() {
|
|
27318
|
+
return !!Object.values(this.columns).find((item) => item.isAdaptiveColumn);
|
|
27319
|
+
}
|
|
27320
|
+
/**
|
|
27321
|
+
* 单元格超出呈现模式
|
|
27322
|
+
* @author lxm
|
|
27323
|
+
* @date 2023-11-17 01:56:26
|
|
27324
|
+
* @readonly
|
|
27325
|
+
* @type {('wrap' | 'ellipsis')}
|
|
27326
|
+
*/
|
|
27327
|
+
get overflowMode() {
|
|
27328
|
+
return ibiz.config.grid.overflowMode;
|
|
27329
|
+
}
|
|
26993
27330
|
initState() {
|
|
26994
27331
|
super.initState();
|
|
26995
|
-
this.state.size = 0;
|
|
26996
27332
|
this.state.columnStates = [];
|
|
26997
|
-
this.state.
|
|
27333
|
+
this.state.rows = {};
|
|
26998
27334
|
}
|
|
26999
27335
|
async onCreated() {
|
|
27000
27336
|
await super.onCreated();
|
|
27001
|
-
this.service = new TreeGridExService(this.model);
|
|
27002
|
-
await this.service.init(this.context);
|
|
27003
27337
|
this.initColumnStates();
|
|
27004
27338
|
await this.initGridColumns();
|
|
27005
27339
|
}
|
|
27340
|
+
async initService() {
|
|
27341
|
+
this.service = new TreeGridExService(this.model);
|
|
27342
|
+
await this.service.init(this.context);
|
|
27343
|
+
}
|
|
27006
27344
|
/**
|
|
27007
|
-
*
|
|
27345
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
27008
27346
|
*
|
|
27009
27347
|
* @author zk
|
|
27010
27348
|
* @date 2023-09-21 06:09:28
|
|
@@ -27022,7 +27360,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
27022
27360
|
}
|
|
27023
27361
|
}
|
|
27024
27362
|
/**
|
|
27025
|
-
*
|
|
27363
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
27026
27364
|
*
|
|
27027
27365
|
* @author zk
|
|
27028
27366
|
* @date 2023-09-21 06:09:37
|
|
@@ -27032,7 +27370,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
27032
27370
|
* @memberof TreeGridExController
|
|
27033
27371
|
*/
|
|
27034
27372
|
async initColumnsController(column) {
|
|
27035
|
-
const provider = await
|
|
27373
|
+
const provider = await getTreeGridExColumnProvider(column);
|
|
27036
27374
|
if (!provider) {
|
|
27037
27375
|
return;
|
|
27038
27376
|
}
|
|
@@ -27046,7 +27384,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
27046
27384
|
}
|
|
27047
27385
|
}
|
|
27048
27386
|
/**
|
|
27049
|
-
*
|
|
27387
|
+
* 初始化树表格(增强)列状态
|
|
27050
27388
|
*
|
|
27051
27389
|
* @author zk
|
|
27052
27390
|
* @date 2023-09-21 06:09:43
|
|
@@ -27054,20 +27392,15 @@ var TreeGridExController = class extends MDControlController {
|
|
|
27054
27392
|
* @memberof TreeGridExController
|
|
27055
27393
|
*/
|
|
27056
27394
|
initColumnStates() {
|
|
27057
|
-
|
|
27058
|
-
|
|
27059
|
-
(
|
|
27060
|
-
|
|
27061
|
-
|
|
27062
|
-
|
|
27063
|
-
|
|
27064
|
-
|
|
27065
|
-
|
|
27066
|
-
});
|
|
27067
|
-
}
|
|
27068
|
-
},
|
|
27069
|
-
{ childrenFields: ["detreeColumns"] }
|
|
27070
|
-
);
|
|
27395
|
+
var _a;
|
|
27396
|
+
(_a = this.model.detreeColumns) == null ? void 0 : _a.forEach((column) => {
|
|
27397
|
+
this.state.columnStates.push({
|
|
27398
|
+
key: column.codeName,
|
|
27399
|
+
caption: column.caption,
|
|
27400
|
+
hidden: !!column.hideDefault,
|
|
27401
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
27402
|
+
});
|
|
27403
|
+
});
|
|
27071
27404
|
this.calcColumnFixed();
|
|
27072
27405
|
}
|
|
27073
27406
|
/**
|
|
@@ -27086,92 +27419,194 @@ var TreeGridExController = class extends MDControlController {
|
|
|
27086
27419
|
showColumns.forEach((column, index) => {
|
|
27087
27420
|
if (column.uaColumn) {
|
|
27088
27421
|
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
27089
|
-
} else {
|
|
27090
|
-
column.fixed = "right";
|
|
27091
27422
|
}
|
|
27092
27423
|
});
|
|
27093
27424
|
}
|
|
27094
27425
|
/**
|
|
27095
|
-
*
|
|
27096
|
-
*
|
|
27097
|
-
* @
|
|
27098
|
-
* @
|
|
27099
|
-
* @
|
|
27100
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
27101
|
-
* @memberof TreeGridExController
|
|
27426
|
+
* 获取树表格行数据
|
|
27427
|
+
* @author lxm
|
|
27428
|
+
* @date 2023-12-22 02:23:44
|
|
27429
|
+
* @param {string} key 可以是节点id也可以是_uuid
|
|
27430
|
+
* @return {*} {(ITreeGridExRowState | undefined)}
|
|
27102
27431
|
*/
|
|
27103
|
-
|
|
27104
|
-
const
|
|
27105
|
-
|
|
27106
|
-
|
|
27107
|
-
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27432
|
+
getRowState(key) {
|
|
27433
|
+
const nodeData = this.getNodeData(key);
|
|
27434
|
+
if (nodeData) {
|
|
27435
|
+
return this.state.rows[nodeData._uuid];
|
|
27436
|
+
}
|
|
27437
|
+
}
|
|
27438
|
+
async afterLoadNodes(nodes) {
|
|
27439
|
+
await super.afterLoadNodes(nodes);
|
|
27440
|
+
recursiveIterate11({ children: nodes }, (node) => {
|
|
27441
|
+
this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
|
|
27111
27442
|
});
|
|
27112
|
-
return nodes;
|
|
27113
27443
|
}
|
|
27114
27444
|
/**
|
|
27115
|
-
*
|
|
27445
|
+
* 转换各类多语言
|
|
27116
27446
|
*
|
|
27117
|
-
* @
|
|
27118
|
-
* @
|
|
27119
|
-
* @param {ITreeNodeData} [parentNode]
|
|
27120
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
27121
|
-
* @memberof TreeGridExController
|
|
27447
|
+
* @date 2023-05-18 02:57:00
|
|
27448
|
+
* @protected
|
|
27122
27449
|
*/
|
|
27123
|
-
|
|
27124
|
-
const
|
|
27125
|
-
|
|
27126
|
-
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27130
|
-
|
|
27131
|
-
|
|
27132
|
-
|
|
27133
|
-
|
|
27134
|
-
|
|
27135
|
-
|
|
27136
|
-
} finally {
|
|
27137
|
-
await this.endLoading();
|
|
27138
|
-
}
|
|
27139
|
-
if (parentNode) {
|
|
27140
|
-
parentNode.children = nodes;
|
|
27141
|
-
} else {
|
|
27142
|
-
this.state.rootNodes = nodes;
|
|
27450
|
+
convertMultipleLanguages() {
|
|
27451
|
+
const convertColumnCaption = (columns) => {
|
|
27452
|
+
columns.forEach((column) => {
|
|
27453
|
+
if (column.capLanguageRes && column.capLanguageRes.lanResTag) {
|
|
27454
|
+
column.caption = ibiz.i18n.t(
|
|
27455
|
+
column.capLanguageRes.lanResTag,
|
|
27456
|
+
column.caption
|
|
27457
|
+
);
|
|
27458
|
+
}
|
|
27459
|
+
});
|
|
27460
|
+
};
|
|
27461
|
+
if (this.model.detreeColumns && this.model.detreeColumns.length > 0) {
|
|
27462
|
+
convertColumnCaption(this.model.detreeColumns);
|
|
27143
27463
|
}
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
|
|
27147
|
-
|
|
27148
|
-
|
|
27149
|
-
|
|
27464
|
+
}
|
|
27465
|
+
};
|
|
27466
|
+
|
|
27467
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts
|
|
27468
|
+
var TreeGridExColumnController = class {
|
|
27469
|
+
/**
|
|
27470
|
+
* Creates an instance of GridFieldColumnController.
|
|
27471
|
+
* @author lxm
|
|
27472
|
+
* @date 2022-08-24 20:08:22
|
|
27473
|
+
* @param {T} model
|
|
27474
|
+
*/
|
|
27475
|
+
constructor(model, treeGrid) {
|
|
27476
|
+
/**
|
|
27477
|
+
* 是否是自适应列
|
|
27478
|
+
* @author lxm
|
|
27479
|
+
* @date 2023-07-07 11:20:16
|
|
27480
|
+
* @type {boolean}
|
|
27481
|
+
*/
|
|
27482
|
+
this.isAdaptiveColumn = false;
|
|
27483
|
+
/**
|
|
27484
|
+
* 是否是脚本代码
|
|
27485
|
+
* @return {*}
|
|
27486
|
+
* @author: zhujiamin
|
|
27487
|
+
* @Date: 2023-08-15 10:51:25
|
|
27488
|
+
*/
|
|
27489
|
+
this.isCustomCode = false;
|
|
27490
|
+
this.model = model;
|
|
27491
|
+
this.treeGrid = treeGrid;
|
|
27492
|
+
this.isAdaptiveColumn = model.widthUnit === "STAR";
|
|
27493
|
+
}
|
|
27494
|
+
/**
|
|
27495
|
+
* 上下文
|
|
27496
|
+
*
|
|
27497
|
+
* @author lxm
|
|
27498
|
+
* @date 2022-09-05 19:09:24
|
|
27499
|
+
* @readonly
|
|
27500
|
+
* @type {IContext}
|
|
27501
|
+
*/
|
|
27502
|
+
get context() {
|
|
27503
|
+
return this.treeGrid.context;
|
|
27504
|
+
}
|
|
27505
|
+
/**
|
|
27506
|
+
* 视图参数
|
|
27507
|
+
*
|
|
27508
|
+
* @author lxm
|
|
27509
|
+
* @date 2022-09-05 19:09:00
|
|
27510
|
+
* @readonly
|
|
27511
|
+
* @type {IParams}
|
|
27512
|
+
*/
|
|
27513
|
+
get params() {
|
|
27514
|
+
return this.treeGrid.params;
|
|
27515
|
+
}
|
|
27516
|
+
/**
|
|
27517
|
+
* 是否是第一个显示的树表格列
|
|
27518
|
+
* @author lxm
|
|
27519
|
+
* @date 2023-12-22 03:28:10
|
|
27520
|
+
* @readonly
|
|
27521
|
+
* @type {boolean}
|
|
27522
|
+
*/
|
|
27523
|
+
get isFirstShowColumn() {
|
|
27524
|
+
const firstColumn = this.treeGrid.state.columnStates.find(
|
|
27525
|
+
(item) => !item.hidden
|
|
27150
27526
|
);
|
|
27151
|
-
return
|
|
27527
|
+
return (firstColumn == null ? void 0 : firstColumn.key) === this.model.codeName;
|
|
27152
27528
|
}
|
|
27153
27529
|
/**
|
|
27154
|
-
*
|
|
27530
|
+
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
27155
27531
|
*
|
|
27156
|
-
* @author
|
|
27157
|
-
* @date
|
|
27158
|
-
* @
|
|
27159
|
-
* @return {*} {string[]}
|
|
27160
|
-
* @memberof TreeGridExController
|
|
27532
|
+
* @author lxm
|
|
27533
|
+
* @date 2022-08-18 22:08:30
|
|
27534
|
+
* @returns {*} {Promise<void>}
|
|
27161
27535
|
*/
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
|
|
27536
|
+
async init() {
|
|
27537
|
+
await this.onInit();
|
|
27538
|
+
}
|
|
27539
|
+
/**
|
|
27540
|
+
* 初始化方法
|
|
27541
|
+
*
|
|
27542
|
+
* @author lxm
|
|
27543
|
+
* @date 2022-09-28 15:09:15
|
|
27544
|
+
* @protected
|
|
27545
|
+
* @returns {*} {Promise<void>}
|
|
27546
|
+
*/
|
|
27547
|
+
async onInit() {
|
|
27548
|
+
}
|
|
27549
|
+
};
|
|
27550
|
+
|
|
27551
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
|
|
27552
|
+
var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
27553
|
+
};
|
|
27554
|
+
|
|
27555
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
27556
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
27557
|
+
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
27558
|
+
/**
|
|
27559
|
+
* 给rowController初始化操作列的状态
|
|
27560
|
+
*
|
|
27561
|
+
* @author lxm
|
|
27562
|
+
* @date 2022-09-07 21:09:43
|
|
27563
|
+
* @param {ITreeGridExRowState} row
|
|
27564
|
+
*/
|
|
27565
|
+
initActionStates(row) {
|
|
27566
|
+
var _a;
|
|
27567
|
+
const { deuiactionGroup } = this.model;
|
|
27568
|
+
if (!deuiactionGroup) {
|
|
27569
|
+
throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
27570
|
+
}
|
|
27571
|
+
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27572
|
+
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
27573
|
+
return;
|
|
27574
|
+
}
|
|
27575
|
+
const containerState = new ButtonContainerState();
|
|
27576
|
+
deuiactionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
27577
|
+
const actionid = detail.uiactionId;
|
|
27578
|
+
if (actionid) {
|
|
27579
|
+
const buttonState = new UIActionButtonState(
|
|
27580
|
+
detail.id,
|
|
27581
|
+
this.treeGrid.context.srfappid,
|
|
27582
|
+
actionid
|
|
27583
|
+
);
|
|
27584
|
+
containerState.addState(detail.id, buttonState);
|
|
27168
27585
|
}
|
|
27169
27586
|
});
|
|
27170
|
-
|
|
27171
|
-
|
|
27172
|
-
|
|
27173
|
-
|
|
27174
|
-
|
|
27587
|
+
row.uaColStates[this.model.codeName] = containerState;
|
|
27588
|
+
}
|
|
27589
|
+
/**
|
|
27590
|
+
* 触发操作列点击事件
|
|
27591
|
+
*
|
|
27592
|
+
* @author lxm
|
|
27593
|
+
* @date 2022-09-07 22:09:46
|
|
27594
|
+
* @param {IPSUIActionGroupDetail} detail
|
|
27595
|
+
* @param {MouseEvent} event
|
|
27596
|
+
*/
|
|
27597
|
+
async onActionClick(detail, row, event) {
|
|
27598
|
+
const actionId = detail.uiactionId;
|
|
27599
|
+
await UIActionUtil.execAndResolved(
|
|
27600
|
+
actionId,
|
|
27601
|
+
{
|
|
27602
|
+
context: this.context,
|
|
27603
|
+
params: this.params,
|
|
27604
|
+
data: [row.data],
|
|
27605
|
+
view: this.treeGrid.view,
|
|
27606
|
+
event
|
|
27607
|
+
},
|
|
27608
|
+
detail.appId
|
|
27609
|
+
);
|
|
27175
27610
|
}
|
|
27176
27611
|
};
|
|
27177
27612
|
|
|
@@ -29231,7 +29666,7 @@ var ViewEngineBase = class {
|
|
|
29231
29666
|
};
|
|
29232
29667
|
|
|
29233
29668
|
// src/engine/md-view.engine.ts
|
|
29234
|
-
import { RuntimeModelError as
|
|
29669
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
29235
29670
|
import { clone as clone24 } from "ramda";
|
|
29236
29671
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29237
29672
|
/**
|
|
@@ -29415,7 +29850,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29415
29850
|
view: this.view
|
|
29416
29851
|
}));
|
|
29417
29852
|
if (result === -1) {
|
|
29418
|
-
throw new
|
|
29853
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29419
29854
|
} else {
|
|
29420
29855
|
return {
|
|
29421
29856
|
cancel: !result.ok
|
|
@@ -29438,7 +29873,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29438
29873
|
(item) => item.id === "newdata"
|
|
29439
29874
|
);
|
|
29440
29875
|
if (!openAppViewLogic) {
|
|
29441
|
-
throw new
|
|
29876
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29442
29877
|
}
|
|
29443
29878
|
const params = clone24(this.view.params);
|
|
29444
29879
|
if (copyMode) {
|
|
@@ -29452,7 +29887,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29452
29887
|
view: this.view
|
|
29453
29888
|
}));
|
|
29454
29889
|
if (result === -1) {
|
|
29455
|
-
throw new
|
|
29890
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29456
29891
|
} else {
|
|
29457
29892
|
return {
|
|
29458
29893
|
cancel: !result.ok
|
|
@@ -29571,7 +30006,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29571
30006
|
|
|
29572
30007
|
// src/utils/error-handler/default-error-handler.ts
|
|
29573
30008
|
import {
|
|
29574
|
-
RuntimeModelError as
|
|
30009
|
+
RuntimeModelError as RuntimeModelError65,
|
|
29575
30010
|
ModelError as ModelError31,
|
|
29576
30011
|
HttpError as HttpError5,
|
|
29577
30012
|
NoticeError as NoticeError2,
|
|
@@ -29579,7 +30014,7 @@ import {
|
|
|
29579
30014
|
} from "@ibiz-template/core";
|
|
29580
30015
|
var DefaultErrorHandler = class {
|
|
29581
30016
|
handle(error) {
|
|
29582
|
-
if (error instanceof
|
|
30017
|
+
if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
|
|
29583
30018
|
ibiz.message.error(error.message, 10, true);
|
|
29584
30019
|
} else if (error instanceof HttpError5) {
|
|
29585
30020
|
if (error.status === 401) {
|
|
@@ -29847,13 +30282,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
29847
30282
|
};
|
|
29848
30283
|
|
|
29849
30284
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
29850
|
-
import { RuntimeModelError as
|
|
30285
|
+
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
29851
30286
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
29852
30287
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29853
30288
|
execute(executeParams) {
|
|
29854
30289
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
29855
30290
|
if (!appDEUILogicId) {
|
|
29856
|
-
throw new
|
|
30291
|
+
throw new RuntimeModelError66(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
29857
30292
|
}
|
|
29858
30293
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
29859
30294
|
}
|
|
@@ -30311,7 +30746,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30311
30746
|
};
|
|
30312
30747
|
|
|
30313
30748
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30314
|
-
import { RuntimeError as RuntimeError65, RuntimeModelError as
|
|
30749
|
+
import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
30315
30750
|
var TimerTrigger = class extends LogicTrigger {
|
|
30316
30751
|
constructor() {
|
|
30317
30752
|
super(...arguments);
|
|
@@ -30319,7 +30754,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30319
30754
|
}
|
|
30320
30755
|
start() {
|
|
30321
30756
|
if (!this.logic.timer) {
|
|
30322
|
-
throw new
|
|
30757
|
+
throw new RuntimeModelError67(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
30323
30758
|
}
|
|
30324
30759
|
this.timer = setInterval(() => {
|
|
30325
30760
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -30341,7 +30776,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30341
30776
|
import {
|
|
30342
30777
|
ModelError as ModelError34,
|
|
30343
30778
|
RuntimeError as RuntimeError66,
|
|
30344
|
-
RuntimeModelError as
|
|
30779
|
+
RuntimeModelError as RuntimeModelError68
|
|
30345
30780
|
} from "@ibiz-template/core";
|
|
30346
30781
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
30347
30782
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -30387,7 +30822,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30387
30822
|
} else {
|
|
30388
30823
|
openViewRef = appUILogic.openDataAppView;
|
|
30389
30824
|
if (!openViewRef) {
|
|
30390
|
-
throw new
|
|
30825
|
+
throw new RuntimeModelError68(
|
|
30391
30826
|
appUILogic,
|
|
30392
30827
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
30393
30828
|
);
|
|
@@ -30395,7 +30830,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30395
30830
|
}
|
|
30396
30831
|
const openView = openViewRef.refAppViewId;
|
|
30397
30832
|
if (!openView) {
|
|
30398
|
-
throw new
|
|
30833
|
+
throw new RuntimeModelError68(
|
|
30399
30834
|
appUILogic,
|
|
30400
30835
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
30401
30836
|
);
|
|
@@ -30425,7 +30860,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30425
30860
|
);
|
|
30426
30861
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
30427
30862
|
if (!typeFileName) {
|
|
30428
|
-
throw new
|
|
30863
|
+
throw new RuntimeModelError68(
|
|
30429
30864
|
appUILogic,
|
|
30430
30865
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
30431
30866
|
);
|
|
@@ -30433,7 +30868,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30433
30868
|
const { data } = parameters;
|
|
30434
30869
|
const formTypeValue = data[0][typeFileName];
|
|
30435
30870
|
if (!formTypeValue) {
|
|
30436
|
-
throw new
|
|
30871
|
+
throw new RuntimeModelError68(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
30437
30872
|
}
|
|
30438
30873
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30439
30874
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -30475,7 +30910,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30475
30910
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
30476
30911
|
});
|
|
30477
30912
|
if (!newViewRef) {
|
|
30478
|
-
throw new
|
|
30913
|
+
throw new RuntimeModelError68(
|
|
30479
30914
|
appUILogic,
|
|
30480
30915
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
30481
30916
|
);
|
|
@@ -30485,7 +30920,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30485
30920
|
} else {
|
|
30486
30921
|
newViewRef = newDataAppView;
|
|
30487
30922
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
30488
|
-
throw new
|
|
30923
|
+
throw new RuntimeModelError68(
|
|
30489
30924
|
appUILogic,
|
|
30490
30925
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
30491
30926
|
);
|
|
@@ -30543,7 +30978,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30543
30978
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
30544
30979
|
const { context, params, ...rest } = parameters;
|
|
30545
30980
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
30546
|
-
throw new
|
|
30981
|
+
throw new RuntimeModelError68(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
30547
30982
|
}
|
|
30548
30983
|
const result = await ibiz.commands.execute(
|
|
30549
30984
|
OpenAppViewCommand.TAG,
|
|
@@ -30594,7 +31029,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30594
31029
|
const minorDERs = selfDe.minorAppDERSs;
|
|
30595
31030
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
30596
31031
|
if (!minorDERs) {
|
|
30597
|
-
throw new
|
|
31032
|
+
throw new RuntimeModelError68(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
30598
31033
|
}
|
|
30599
31034
|
let pickParentFieldName;
|
|
30600
31035
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -30693,12 +31128,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
30693
31128
|
};
|
|
30694
31129
|
|
|
30695
31130
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
30696
|
-
import { RuntimeModelError as
|
|
31131
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
30697
31132
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
30698
31133
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30699
31134
|
execute(executeParams) {
|
|
30700
31135
|
if (!this.logic.appDEUIActionId) {
|
|
30701
|
-
throw new
|
|
31136
|
+
throw new RuntimeModelError69(
|
|
30702
31137
|
this.logic,
|
|
30703
31138
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
30704
31139
|
);
|
|
@@ -31030,6 +31465,7 @@ export {
|
|
|
31030
31465
|
ScriptFactory,
|
|
31031
31466
|
ScriptFunction,
|
|
31032
31467
|
SearchBarController,
|
|
31468
|
+
SearchBarFilterController,
|
|
31033
31469
|
SearchFilter,
|
|
31034
31470
|
SearchFormController,
|
|
31035
31471
|
SearchFormService,
|
|
@@ -31039,6 +31475,7 @@ export {
|
|
|
31039
31475
|
StudioViewEvents,
|
|
31040
31476
|
SysUIActionProvider,
|
|
31041
31477
|
SysUIActionTag,
|
|
31478
|
+
TREEGRIDEX_COLUMN_PROVIDER_PREFIX,
|
|
31042
31479
|
TabExpPanelController,
|
|
31043
31480
|
TextUtil,
|
|
31044
31481
|
ThemeUtil,
|
|
@@ -31048,8 +31485,12 @@ export {
|
|
|
31048
31485
|
TreeDataSetNodeData,
|
|
31049
31486
|
TreeExpBarController,
|
|
31050
31487
|
TreeGridController,
|
|
31488
|
+
TreeGridExColumnController,
|
|
31051
31489
|
TreeGridExController,
|
|
31490
|
+
TreeGridExFieldColumnController,
|
|
31491
|
+
TreeGridExRowState,
|
|
31052
31492
|
TreeGridExService,
|
|
31493
|
+
TreeGridExUAColumnController,
|
|
31053
31494
|
TreeGridService,
|
|
31054
31495
|
TreeNodeData,
|
|
31055
31496
|
TreeService,
|
|
@@ -31133,6 +31574,7 @@ export {
|
|
|
31133
31574
|
getPlatformType,
|
|
31134
31575
|
getPortletProvider,
|
|
31135
31576
|
getRootNode,
|
|
31577
|
+
getTreeGridExColumnProvider,
|
|
31136
31578
|
getTreeNode,
|
|
31137
31579
|
getUIActionById,
|
|
31138
31580
|
getUIActionItemsByActionLevel,
|
|
@@ -31168,6 +31610,7 @@ export {
|
|
|
31168
31610
|
registerPanelItemProvider,
|
|
31169
31611
|
registerPlatformProvider,
|
|
31170
31612
|
registerPortletProvider,
|
|
31613
|
+
registerTreeGridExColumnProvider,
|
|
31171
31614
|
registerUIActionProvider,
|
|
31172
31615
|
registerUILogicNodeProvider,
|
|
31173
31616
|
registerViewProvider,
|