diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 16ca062..7710767 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -1046,6 +1046,7 @@ export default [ control: { // 组件所有属性 modelValue: '', + multiSelect: '', orgRange:[], roleRange:[], roleCheckDataList:[], diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index bf00691..09da89a 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -847,6 +847,14 @@ const attrList = computed(() => { vIf: state.isSearch, vShow: ["expand-user"], }, + { + label: "是否多选", + value: config.expandUser, + path: "config.expand-user", + type: "expand-user_MultiSelect", + vIf: state.isSearch, + vShow: ["expand-user"], + }, /* { label: "表单栅格", value: config.span, @@ -2053,6 +2061,7 @@ let currentUploadImgid = ""; watch( () => store.activeKey, (newVal) => { + //啊啊啊啊 if (controlData.value.type === "lowcodeCarsusel") { const carsuselConfigData: CarsuselConfig[] = @@ -2117,7 +2126,14 @@ watch( }else if(controlData.value.type === "orgCentent"){ haveOrgTreeInfo() }else if(controlData.value.type === "expand-user"){ - + if (controlData.value.hasOwnProperty('tree')) { + // 删除 tree 属性 + setTimeout(()=>{ + alert(1) + delete controlData.value.tree + },800) + + } } //实现关联表单设置可选字段中没有当前字段效果 start // console.log(controlData.value.name) @@ -4116,7 +4132,6 @@ const expandUserComponentsTree = computed(()=>{ }) - function findExpandUserNames(data) { //console.log(data) const result = []; @@ -4134,6 +4149,11 @@ function findExpandUserNames(data) { if (node && node.type) { // 如果当前节点是expand-user类型 if (node.type === 'expand-user') { + // 检查multiSelect属性,如果为"1"则跳过该节点 + if (node.control && node.control.multiSelect && node.control.multiSelect === "1") { + return; // 不符合条件,跳过该节点 + } + // 创建当前元素的路径数组(祖先在前,自己在后) const path = [...ancestors]; @@ -4235,10 +4255,9 @@ function findExpandUserNames(data) { } - function filterTreeByExpandUsers(a, b) { - /* console.log(a) - console.log(b) */ + //console.log(a) + //console.log(b) // 从参数b中提取所有expand-user字段名(处理%^%格式) const expandUserFields = new Set(); const pathMap = new Map(); // 用于存储字段名到完整路径的映射 @@ -5011,6 +5030,13 @@ const formatTooltip = (val: number) => { 可选用户设置 + + + + + + +
@@ -7250,6 +7276,7 @@ const formatTooltip = (val: number) => { v-model="controlData.control.connectUserComponent" style="width: 100%;" :data="expandUserComponentsTree" + clearable /> diff --git a/src/components/DesignForm/public/expand/rangedUserTree.vue b/src/components/DesignForm/public/expand/rangedUserTree.vue index 9da571f..da0ccc4 100644 --- a/src/components/DesignForm/public/expand/rangedUserTree.vue +++ b/src/components/DesignForm/public/expand/rangedUserTree.vue @@ -1,5 +1,5 @@