From 90bee0131c13feba860165c744bc02a1c41dc297 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Mon, 22 Apr 2024 09:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=950.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/assembly/index.ts | 6 ++ src/components/DesignForm/formControlAttr.vue | 66 ++++++++++++++++--- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index c32cd1b2f..5e88e103c 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -605,6 +605,12 @@ const selectOption: any = [ dataRangeConditionHtml:'', dataRangeConditionHtmlCopy:'', saveFlag: false, + fillRoles: [ + { + leftValue:'', + rightValue:'', + } + ], }, config: {} } diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index 04380966f..e837b9a82 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -1768,6 +1768,7 @@ const transferDataSourceOptions = [ //liwenxuan20240403 associatedForms start import AssociatedFormsTinyace from '@/widget/associatedforms/associatedFormsTinyace.vue' import AssociatedFormsTinyaceRange from '@/widget/associatedforms/associatedFormsTinyaceRange.vue' +import AssociatedFormsFillRole from '@/widget/associatedforms/associatedFormsFillRole.vue' const treeDefaultProps = { children: 'children', @@ -1823,6 +1824,29 @@ function getAsfasfFieldTree() { const asfasfFieldTree = ref() +function formidChanged(){ + + if(controlData.value.control.formid===''){ + + }else{ + getAsfasfFieldTree().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ + let resData = ref(data.children) + //let rootid_ = data.value.label + asfasfFieldTree.value = [{ + id: 'rootid_'+data.label, + label: '关联的表单-'+data.label, + children: [...resData.value], + treeAttrs: data.treeAttrs, + }] + } + }); + } +} + const associatedFormsCurrentFormFieldTree = ref() getAssociatedFormsCurrentFieldTree().then(({ data }) => { @@ -1985,6 +2009,7 @@ function associatedFormsHideDialoghandle(){ } + function associatedFormsDataRangeDialoghandle(){ getAsfasfFieldTree().then(({ data }) => { @@ -2073,20 +2098,35 @@ function handleDetermineRange(){ //数据填充规则 const associatedFormsFillRolesDialogFlag = ref(false) - +//数据填充规则设置按钮 function associatedFormsDataFillRolesDialoghandle(){ - associatedFormsFillRolesDialogFlag.value = true + if(controlData.value.control.formid===''){ + alert("请先选择要关联的表单") + + }else{ + associatedFormsFillRolesDialogFlag.value = true + } } function asfhTextCancelFillRoles(){ associatedFormsFillRolesDialogFlag.value = false } - +//数据填充规则确定按钮 function handleDetermineFillRoles(){ + associatedFormsFillRolesDialogFlag.value = false } +watch(()=>store.activeKey, () => { + if(controlData.value.type==='associatedForms'){ + setTimeout(() => { + formidChanged() + }, 800); + } +}) + + //liwenxuan20240403 associatedForms end @@ -2177,6 +2217,9 @@ const gainFormGroupList = () =>{ }) } onMounted(() => { + + + gainFormGroupList() }) @@ -2548,7 +2591,7 @@ const loadNextPage = () => { 设置隐藏条件 -
+
@@ -2561,6 +2604,7 @@ const loadNextPage = () => { check-strictly :render-after-expand="false" filterable + @change="formidChanged" /> @@ -2568,7 +2612,7 @@ const loadNextPage = () => { 设置数据范围 -
+
@@ -3497,15 +3541,17 @@ const loadNextPage = () => { - +