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" />