From b05e6fcc61a56391dbfcdb4d2d50510313820514 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Thu, 13 Nov 2025 14:36:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E7=94=A8=E6=88=B7=E6=94=B9?= =?UTF-8?q?=E5=90=8D=E4=B8=BA=E5=85=B3=E8=81=94=E5=A1=AB=E5=85=85=20?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=B7=B2=E9=80=89=E6=8B=A9=E4=BA=86=E5=85=B3?= =?UTF-8?q?=E8=81=94=E7=9A=84=E7=94=A8=E6=88=B7=E7=BB=84=E4=BB=B6=E6=97=B6?= =?UTF-8?q?,=E5=8E=9F=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E6=98=BE=E7=A4=BA=E5=85=B3=E8=81=94=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/assembly/index.ts | 3 +- .../DesignForm/formControlPropertiNew.vue | 61 ++++++++++++++++--- .../DesignForm/public/expand/org.vue | 3 +- 3 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 7710767..67f885e 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -1072,7 +1072,8 @@ export default [ control: { range:[], multiple: '', - connectUserComponent: {}, + connectUserComponent: '', + showConnectUserComponent: '', }, config: {}, styles: { diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index da66699..ecf5d52 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -832,7 +832,7 @@ const attrList = computed(() => { vShow: ["table"], }, { - label: "关联用户", + label: "关联填充", value: config.orgCentent, path: "config.orgCentent", type: "orgCentent_ConnectUser", @@ -4111,6 +4111,12 @@ watch( const selectOrgConnectUserDialogFlag = ref(false) function showSelectOrgConnectUser(){ selectOrgConnectUserDialogFlag.value = true + /* if(controlData.value.control.connectUserComponent){ + + }else{ + + } */ + } const expandUserNames = computed(()=>{ @@ -4125,6 +4131,29 @@ const expandUserComponentsTree = computed(()=>{ }) + + +// 定义treeSelectRef +const treeSelectRef = ref(); + +const handleTreeSelectChange = (value) => { + + // value 是选中的值,根据props配置,默认是节点的id + //console.log('选中的值:', value); + + // 通过TreeSelect实例的getNode方法获取节点 + if (treeSelectRef.value) { + const node = treeSelectRef.value.getNode(value); + // 注意:node是TreeSelect内部节点,节点数据在node.data中 + if (node) { + //console.log('节点数据:', node.data); + controlData.value.control.showConnectUserComponent = node.data.label + // 你可以在这里做你想要的操作 + } + } +}; + + function findExpandUserNames(data) { //console.log(data) const result = []; @@ -5011,10 +5040,24 @@ const formatTooltip = (val: number) => { - + + + + + + {{ controlData.control.showConnectUserComponent }} + + - 选择关联的用户组件 + + 选择关联的用户组件 @@ -7266,10 +7309,14 @@ const formatTooltip = (val: number) => { diff --git a/src/components/DesignForm/public/expand/org.vue b/src/components/DesignForm/public/expand/org.vue index fa9649c..4fa5a2d 100644 --- a/src/components/DesignForm/public/expand/org.vue +++ b/src/components/DesignForm/public/expand/org.vue @@ -307,6 +307,7 @@ function filterTreeNodes(nodes: any[], keepIds: Set) { } const multiple = props.data.control.multiple=='1' +const disabled1 = props.data.control.connectUserComponent.length>0 @@ -325,7 +326,7 @@ const multiple = props.data.control.multiple=='1' collapse-tags collapse-tags-tooltip :max-collapse-tags="4" - :disabled="props.data.control.connectUserComponent.length>0" + :disabled="disabled1" />