@newview/file-ui 1.1.41 → 1.1.43
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/README.md +3 -0
- package/dist/file-ui.js +21 -8
- package/dist/file-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/file-ui.js
CHANGED
|
@@ -18722,6 +18722,11 @@ const propDefine$2 = {
|
|
|
18722
18722
|
type: Boolean,
|
|
18723
18723
|
default: true
|
|
18724
18724
|
},
|
|
18725
|
+
businessId: {
|
|
18726
|
+
// 创建机构id
|
|
18727
|
+
type: Boolean,
|
|
18728
|
+
default: true
|
|
18729
|
+
},
|
|
18725
18730
|
dataValue: {
|
|
18726
18731
|
// 值
|
|
18727
18732
|
type: Array || Number,
|
|
@@ -18785,7 +18790,7 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18785
18790
|
this.activeUnitName = this.unitData.value.find((e) => e["Id"] == value).NodeName;
|
|
18786
18791
|
this.StructureInstanceLoading.value = true;
|
|
18787
18792
|
this.StructureInstanceData.value = [];
|
|
18788
|
-
let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName"]).eq("PId", value)));
|
|
18793
|
+
let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "PlatformId", "CreateUnitId"]).eq("PId", value)));
|
|
18789
18794
|
this.StructureInstanceData.value = res.map((e) => {
|
|
18790
18795
|
e.title = e.NodeName;
|
|
18791
18796
|
e.UnitName = this.activeUnitName;
|
|
@@ -18803,7 +18808,7 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18803
18808
|
* @returns
|
|
18804
18809
|
*/
|
|
18805
18810
|
__publicField(this, "loadStructureInstance", async (item, callback) => {
|
|
18806
|
-
let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName"]).eq("PId", item.Id)));
|
|
18811
|
+
let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "PlatformId", "CreateUnitId"]).eq("PId", item.Id)));
|
|
18807
18812
|
if (res.length == 0) {
|
|
18808
18813
|
item.children = void 0;
|
|
18809
18814
|
callback([]);
|
|
@@ -18858,7 +18863,12 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18858
18863
|
* 获取构件类别大类及单位工程数据
|
|
18859
18864
|
*/
|
|
18860
18865
|
async loadNodeTypeAndUnitData() {
|
|
18861
|
-
|
|
18866
|
+
var _a, _b;
|
|
18867
|
+
let filter = new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "RootId", "PlatformId", "CreateUnitId"]).eq("PId", 0).eq("PlatformId", (_a = this.storageInfo.getCurrentPlatform()) == null ? void 0 : _a.Id);
|
|
18868
|
+
if (this.props.businessId) {
|
|
18869
|
+
filter.eq("CreateUnitId", this.props.businessId);
|
|
18870
|
+
}
|
|
18871
|
+
let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(filter));
|
|
18862
18872
|
this.TypeGroupData.value = Enumerable.from(res).groupBy((e) => e["NodeTypeName"]).select((e) => {
|
|
18863
18873
|
return {
|
|
18864
18874
|
NodeTypeName: e.key(),
|
|
@@ -18874,7 +18884,7 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18874
18884
|
this.NodeTypeSelect();
|
|
18875
18885
|
if (this.props.dataValue) {
|
|
18876
18886
|
let ids = typeof this.props.dataValue == "object" ? this.props.dataValue : [this.props.dataValue];
|
|
18877
|
-
this.StructureInstanceCheckData.value = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "RootId"]).in("Id", ids)));
|
|
18887
|
+
this.StructureInstanceCheckData.value = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "RootId", "PlatformId"]).in("Id", ids).eq("PlatformId", (_b = this.storageInfo.getCurrentPlatform()) == null ? void 0 : _b.Id)));
|
|
18878
18888
|
this.StructureInstanceCheckData.value = this.StructureInstanceCheckData.value.map((e) => {
|
|
18879
18889
|
let unitInfo = this.unitData.value.find((x) => x["Id"] == e.RootId);
|
|
18880
18890
|
e.UnitName = unitInfo ? unitInfo.NodeName : "";
|
|
@@ -18909,7 +18919,7 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18909
18919
|
if (this.props.selType == 1) {
|
|
18910
18920
|
this.ctx.emit("on-change", this.UnitValue.value);
|
|
18911
18921
|
} else {
|
|
18912
|
-
this.ctx.emit("on-change", this.StructureInstanceCheckData.value.map((e) => e["Id"]));
|
|
18922
|
+
this.ctx.emit("on-change", { Ids: this.StructureInstanceCheckData.value.map((e) => e["Id"]), data: this.StructureInstanceCheckData.value });
|
|
18913
18923
|
}
|
|
18914
18924
|
}
|
|
18915
18925
|
}
|
|
@@ -19912,8 +19922,10 @@ class ComFormInstance extends BaseInstance {
|
|
|
19912
19922
|
* @param item
|
|
19913
19923
|
* @param data
|
|
19914
19924
|
*/
|
|
19915
|
-
__publicField(this, "StructureOnChange", (item, data) => {
|
|
19916
|
-
|
|
19925
|
+
__publicField(this, "StructureOnChange", (item, { Ids, data }) => {
|
|
19926
|
+
var _a;
|
|
19927
|
+
this.props.formModel[item.model] = Ids;
|
|
19928
|
+
(_a = item.structureProp) == null ? void 0 : _a.onChange(Ids, data);
|
|
19917
19929
|
});
|
|
19918
19930
|
/**
|
|
19919
19931
|
* 获取属性值
|
|
@@ -20016,8 +20028,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20016
20028
|
dataValue: _ctx.formModel[item.model],
|
|
20017
20029
|
multiple: _ctx.getPropValue(item.structureProp, "multiple"),
|
|
20018
20030
|
selType: _ctx.getPropValue(item.structureProp, "selType"),
|
|
20031
|
+
businessId: _ctx.getPropValue(item.structureProp, "businessId"),
|
|
20019
20032
|
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
20020
|
-
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "onOnChange"])) : createCommentVNode("", true),
|
|
20033
|
+
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "businessId", "onOnChange"])) : createCommentVNode("", true),
|
|
20021
20034
|
item.type === "UploadFileList" ? (openBlock(), createBlock(_component_UploadFileList, {
|
|
20022
20035
|
key: 5,
|
|
20023
20036
|
style: normalizeStyle(_ctx.uploadFileListStyle(item)),
|