@newview/file-ui 1.1.42 → 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 +19 -7
- 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([]);
|
|
@@ -18859,7 +18864,11 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18859
18864
|
*/
|
|
18860
18865
|
async loadNodeTypeAndUnitData() {
|
|
18861
18866
|
var _a, _b;
|
|
18862
|
-
let
|
|
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));
|
|
18863
18872
|
this.TypeGroupData.value = Enumerable.from(res).groupBy((e) => e["NodeTypeName"]).select((e) => {
|
|
18864
18873
|
return {
|
|
18865
18874
|
NodeTypeName: e.key(),
|
|
@@ -18910,7 +18919,7 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18910
18919
|
if (this.props.selType == 1) {
|
|
18911
18920
|
this.ctx.emit("on-change", this.UnitValue.value);
|
|
18912
18921
|
} else {
|
|
18913
|
-
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 });
|
|
18914
18923
|
}
|
|
18915
18924
|
}
|
|
18916
18925
|
}
|
|
@@ -19913,8 +19922,10 @@ class ComFormInstance extends BaseInstance {
|
|
|
19913
19922
|
* @param item
|
|
19914
19923
|
* @param data
|
|
19915
19924
|
*/
|
|
19916
|
-
__publicField(this, "StructureOnChange", (item, data) => {
|
|
19917
|
-
|
|
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);
|
|
19918
19929
|
});
|
|
19919
19930
|
/**
|
|
19920
19931
|
* 获取属性值
|
|
@@ -20017,8 +20028,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20017
20028
|
dataValue: _ctx.formModel[item.model],
|
|
20018
20029
|
multiple: _ctx.getPropValue(item.structureProp, "multiple"),
|
|
20019
20030
|
selType: _ctx.getPropValue(item.structureProp, "selType"),
|
|
20031
|
+
businessId: _ctx.getPropValue(item.structureProp, "businessId"),
|
|
20020
20032
|
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
20021
|
-
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "onOnChange"])) : createCommentVNode("", true),
|
|
20033
|
+
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "businessId", "onOnChange"])) : createCommentVNode("", true),
|
|
20022
20034
|
item.type === "UploadFileList" ? (openBlock(), createBlock(_component_UploadFileList, {
|
|
20023
20035
|
key: 5,
|
|
20024
20036
|
style: normalizeStyle(_ctx.uploadFileListStyle(item)),
|