From ae7ddccc2a35f91c83346ddafc6aa6f4b2c57342 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 11 Nov 2025 09:54:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E7=9A=84tree=E5=B1=9E=E6=80=A7=202.?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=87=E6=8D=A2=E5=A4=9A=E9=80=89=E5=8D=95?= =?UTF-8?q?=E9=80=89=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/assembly/index.ts | 1 + .../DesignForm/formControlPropertiNew.vue | 37 ++++++++++++++--- .../public/expand/rangedUserTree.vue | 41 ++++++++++++++----- .../DesignForm/public/form/form.vue | 11 ++++- 4 files changed, 74 insertions(+), 16 deletions(-) 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 @@