Browse Source

关联用户改名为关联填充

组织已选择了关联的用户组件时,原按钮显示区域显示关联的用户组件
lwx_v27
liwenxuan 2 weeks ago
parent
commit
b05e6fcc61
  1. 3
      src/components/DesignForm/assembly/index.ts
  2. 51
      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: { control: {
range:[], range:[],
multiple: '', multiple: '',
connectUserComponent: {}, connectUserComponent: '',
showConnectUserComponent: '',
}, },
config: {}, config: {},
styles: { styles: {

51
src/components/DesignForm/formControlPropertiNew.vue

@ -832,7 +832,7 @@ const attrList = computed(() => {
vShow: ["table"], vShow: ["table"],
}, },
{ {
label: "关联用户", label: "关联填充",
value: config.orgCentent, value: config.orgCentent,
path: "config.orgCentent", path: "config.orgCentent",
type: "orgCentent_ConnectUser", type: "orgCentent_ConnectUser",
@ -4111,6 +4111,12 @@ watch(
const selectOrgConnectUserDialogFlag = ref(false) const selectOrgConnectUserDialogFlag = ref(false)
function showSelectOrgConnectUser(){ function showSelectOrgConnectUser(){
selectOrgConnectUserDialogFlag.value = true selectOrgConnectUserDialogFlag.value = true
/* if(controlData.value.control.connectUserComponent){
}else{
} */
} }
const expandUserNames = computed(()=>{ 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) { function findExpandUserNames(data) {
//console.log(data) //console.log(data)
const result = []; const result = [];
@ -5013,8 +5042,22 @@ const formatTooltip = (val: number) => {
</el-row> </el-row>
<el-row v-else-if="item.type === 'orgCentent_ConnectUser'"> <el-row v-else-if="item.type === 'orgCentent_ConnectUser'">
<!-- <div v-if="controlData.control.connectUserComponent && controlData.control.connectUserComponent.length>0"> -->
<div v-if="controlData.control.showConnectUserComponent!=''">
<el-link
:underline="false"
type="primary"
@click="showSelectOrgConnectUser"
>
{{ controlData.control.showConnectUserComponent }}
</el-link>
</div>
<el-button @click="showSelectOrgConnectUser">选择关联的用户组件</el-button>
<el-button v-if="!controlData.control.connectUserComponent||!controlData.control.showConnectUserComponent" @click="showSelectOrgConnectUser">选择关联的用户组件</el-button>
</el-row> </el-row>
@ -7266,10 +7309,14 @@ const formatTooltip = (val: number) => {
<!-- {{ expandUserComponentsTree }} --> <!-- {{ expandUserComponentsTree }} -->
<el-tree-select <el-tree-select
v-if="controlData.type == 'orgCentent'" v-if="controlData.type == 'orgCentent'"
ref="treeSelectRef"
v-model="controlData.control.connectUserComponent" v-model="controlData.control.connectUserComponent"
style="width: 100%;" style="width: 100%;"
:data="expandUserComponentsTree" :data="expandUserComponentsTree"
clearable 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 multiple = props.data.control.multiple=='1'
const disabled1 = props.data.control.connectUserComponent.length>0
</script> </script>
<template> <template>
@ -325,7 +326,7 @@ const multiple = props.data.control.multiple=='1'
collapse-tags collapse-tags
collapse-tags-tooltip collapse-tags-tooltip
:max-collapse-tags="4" :max-collapse-tags="4"
:disabled="props.data.control.connectUserComponent.length>0" :disabled="disabled1"
/> />
<div></div> <div></div>
</template> </template>

Loading…
Cancel
Save