@newview/file-ui 1.1.42 → 1.1.44
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 +44 -13
- package/dist/file-ui.umd.cjs +1 -1
- package/dist/style.css +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: Number,
|
|
18728
|
+
default: 0
|
|
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(),
|
|
@@ -18908,14 +18917,32 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18908
18917
|
*/
|
|
18909
18918
|
doSelectedAfterFun() {
|
|
18910
18919
|
if (this.props.selType == 1) {
|
|
18911
|
-
|
|
18920
|
+
try {
|
|
18921
|
+
let unitData = [];
|
|
18922
|
+
this.TypeGroupData.value.map((e) => {
|
|
18923
|
+
e.UnitData.map((x) => {
|
|
18924
|
+
if (Array.isArray(this.UnitValue.value)) {
|
|
18925
|
+
if (this.UnitValue.value.includes(x.Id)) {
|
|
18926
|
+
unitData.push(x);
|
|
18927
|
+
}
|
|
18928
|
+
} else {
|
|
18929
|
+
if (this.UnitValue.value == x.Id) {
|
|
18930
|
+
unitData = [x];
|
|
18931
|
+
}
|
|
18932
|
+
}
|
|
18933
|
+
});
|
|
18934
|
+
});
|
|
18935
|
+
this.ctx.emit("on-change", { Ids: this.UnitValue.value, data: unitData });
|
|
18936
|
+
} catch (error) {
|
|
18937
|
+
this.ctx.emit("on-change", { Ids: this.UnitValue.value, data: [] });
|
|
18938
|
+
}
|
|
18912
18939
|
} else {
|
|
18913
|
-
this.ctx.emit("on-change", this.StructureInstanceCheckData.value.map((e) => e["Id"]));
|
|
18940
|
+
this.ctx.emit("on-change", { Ids: this.StructureInstanceCheckData.value.map((e) => e["Id"]), data: this.StructureInstanceCheckData.value });
|
|
18914
18941
|
}
|
|
18915
18942
|
}
|
|
18916
18943
|
}
|
|
18917
|
-
const
|
|
18918
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
18944
|
+
const NvStructureSelect_vue_vue_type_style_index_0_scoped_99c5b0ad_lang = "";
|
|
18945
|
+
const _withScopeId = (n) => (pushScopeId("data-v-99c5b0ad"), n = n(), popScopeId(), n);
|
|
18919
18946
|
const _hoisted_1$1 = { key: 1 };
|
|
18920
18947
|
const _hoisted_2$1 = { class: "nv-pos-r" };
|
|
18921
18948
|
const _hoisted_3$1 = { class: "nv-c-p structure-sel-box" };
|
|
@@ -18997,7 +19024,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18997
19024
|
createVNode(_component_Poptip, {
|
|
18998
19025
|
placement: "bottom-start",
|
|
18999
19026
|
width: 700,
|
|
19000
|
-
transfer: ""
|
|
19027
|
+
transfer: "",
|
|
19028
|
+
disabled: _ctx.readonly
|
|
19001
19029
|
}, {
|
|
19002
19030
|
content: withCtx(() => [
|
|
19003
19031
|
_ctx.TypeGroupData.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
@@ -19074,7 +19102,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19074
19102
|
])
|
|
19075
19103
|
]),
|
|
19076
19104
|
_: 1
|
|
19077
|
-
}),
|
|
19105
|
+
}, 8, ["disabled"]),
|
|
19078
19106
|
_ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
19079
19107
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.StructureInstanceCheckData, (item, index) => {
|
|
19080
19108
|
return openBlock(), createElementBlock("div", {
|
|
@@ -19099,7 +19127,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19099
19127
|
])) : createCommentVNode("", true)
|
|
19100
19128
|
]));
|
|
19101
19129
|
}
|
|
19102
|
-
const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
19130
|
+
const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-99c5b0ad"]]);
|
|
19103
19131
|
const propDefine$1 = {
|
|
19104
19132
|
linkParam: {
|
|
19105
19133
|
// 带入的参数
|
|
@@ -19913,8 +19941,10 @@ class ComFormInstance extends BaseInstance {
|
|
|
19913
19941
|
* @param item
|
|
19914
19942
|
* @param data
|
|
19915
19943
|
*/
|
|
19916
|
-
__publicField(this, "StructureOnChange", (item, data) => {
|
|
19917
|
-
|
|
19944
|
+
__publicField(this, "StructureOnChange", (item, { Ids, data }) => {
|
|
19945
|
+
var _a;
|
|
19946
|
+
this.props.formModel[item.model] = Ids;
|
|
19947
|
+
(_a = item.structureProp) == null ? void 0 : _a.onChange(Ids, data);
|
|
19918
19948
|
});
|
|
19919
19949
|
/**
|
|
19920
19950
|
* 获取属性值
|
|
@@ -20017,8 +20047,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20017
20047
|
dataValue: _ctx.formModel[item.model],
|
|
20018
20048
|
multiple: _ctx.getPropValue(item.structureProp, "multiple"),
|
|
20019
20049
|
selType: _ctx.getPropValue(item.structureProp, "selType"),
|
|
20050
|
+
businessId: _ctx.getPropValue(item.structureProp, "businessId"),
|
|
20020
20051
|
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
20021
|
-
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "onOnChange"])) : createCommentVNode("", true),
|
|
20052
|
+
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "businessId", "onOnChange"])) : createCommentVNode("", true),
|
|
20022
20053
|
item.type === "UploadFileList" ? (openBlock(), createBlock(_component_UploadFileList, {
|
|
20023
20054
|
key: 5,
|
|
20024
20055
|
style: normalizeStyle(_ctx.uploadFileListStyle(item)),
|