Browse Source

关联用户改名为关联填充

组织已选择了关联的用户组件时,原按钮显示区域显示关联的用户组件
lwx_v27
liwenxuan 2 weeks ago
parent
commit
b05e6fcc61
  1. 3
      src/components/DesignForm/assembly/index.ts
  2. 59
      src/components/DesignForm/formControlPropertiNew.vue
  3. 3
      src/components/DesignForm/public/expand/org.vue

3
src/components/DesignForm/assembly/index.ts

@ -1072,7 +1072,8 @@ export default [
control: {
range:[],
multiple: '',
connectUserComponent: {},
connectUserComponent: '',
showConnectUserComponent: '',
},
config: {},
styles: {

59
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 propsid
//console.log(':', value);
// TreeSelectgetNode
if (treeSelectRef.value) {
const node = treeSelectRef.value.getNode(value);
// nodeTreeSelectnode.data
if (node) {
//console.log(':', node.data);
controlData.value.control.showConnectUserComponent = node.data.label
//
}
}
};
function findExpandUserNames(data) {
//console.log(data)
const result = [];
@ -5013,8 +5042,22 @@ const formatTooltip = (val: number) => {
</el-row>
<el-row v-else-if="item.type === 'orgCentent_ConnectUser'">
<!-- <div v-if="controlData.control.connectUserComponent && controlData.control.connectUserComponent.length>0"> -->
<el-button @click="showSelectOrgConnectUser">选择关联的用户组件</el-button>
<div v-if="controlData.control.showConnectUserComponent!=''">
<el-link
:underline="false"
type="primary"
@click="showSelectOrgConnectUser"
>
{{ controlData.control.showConnectUserComponent }}
</el-link>
</div>
<el-button v-if="!controlData.control.connectUserComponent||!controlData.control.showConnectUserComponent" @click="showSelectOrgConnectUser">选择关联的用户组件</el-button>
</el-row>
@ -7266,10 +7309,14 @@ const formatTooltip = (val: number) => {
<!-- {{ expandUserComponentsTree }} -->
<el-tree-select
v-if="controlData.type == 'orgCentent'"
v-model="controlData.control.connectUserComponent"
style="width: 100%;"
:data="expandUserComponentsTree"
clearable
ref="treeSelectRef"
v-model="controlData.control.connectUserComponent"
style="width: 100%;"
:data="expandUserComponentsTree"
clearable
placeholder="请选择"
@change="handleTreeSelectChange"
/>

3
src/components/DesignForm/public/expand/org.vue

@ -307,6 +307,7 @@ function filterTreeNodes(nodes: any[], keepIds: Set<unknown>) {
}
const multiple = props.data.control.multiple=='1'
const disabled1 = props.data.control.connectUserComponent.length>0
</script>
<template>
@ -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"
/>
<div></div>
</template>

Loading…
Cancel
Save