From f1b398d04cd6632838d6cda80a940b5807d758fe Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Sat, 20 Apr 2024 10:49:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95v0.8=20=201?= =?UTF-8?q?3=E6=94=B9=E4=B8=BA=E6=B4=BB=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/assembly/index.ts | 1 + src/components/DesignForm/formControlAttr.vue | 144 +++++++++++++++--- 2 files changed, 120 insertions(+), 25 deletions(-) diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index aebeb953d..c32cd1b2f 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -604,6 +604,7 @@ const selectOption: any = [ formid: '', dataRangeConditionHtml:'', dataRangeConditionHtmlCopy:'', + saveFlag: false, }, config: {} } diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index b9c1646c1..333388a97 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -642,6 +642,14 @@ vIf: state.isSearch, vShow: ['associatedForms'] }, + { + label: '数据填充规则', + value: config.associatedForms, + path: 'config.associatedForms', + type: 'associatedForms_FillRoles', + vIf: state.isSearch, + vShow: ['associatedForms'] + }, { label: '轮播图设置', value: config.carousel, @@ -1770,13 +1778,16 @@ let aft = ref(); const aftRange = ref(); function getAssociatedFormsCurrentFieldTree() { + return request({ url: '/javasys/lowCode/AssociatedForms/getFieldTree', method: 'post', data: { - cfid:'13' + //cfid:'13' + cfid:props.customerformid }, }); + } function getAssociatedFormsOrgAndManTree() { @@ -1798,18 +1809,35 @@ function getAssociatedFormsRoleTree() { method: 'post', }); } + const associatedFormsCurrentFormFieldTree = ref() -getAssociatedFormsCurrentFieldTree().then(({ data }) => { - let resData = ref(data.children) - //let rootid_ = data.value.label - associatedFormsCurrentFormFieldTree.value = [{ - id: 'rootid_'+data.label, - label: '当前表单', - children: [...resData.value], - treeAttrs: data.treeAttrs, - }] -}); + getAssociatedFormsCurrentFieldTree().then(({ data }) => { + + if(data.id==="cfid为空"){ + //alert("cfid为空") + }else{ + + + + let resData = ref(data.children) + //let rootid_ = data.value.label + associatedFormsCurrentFormFieldTree.value = [{ + id: 'rootid_'+data.label, + label: '当前表单', + children: [...resData.value], + treeAttrs: data.treeAttrs, + }] + + + } + + + + + }); + + const customerFormTree = ref() getCustomerFormList().then(({ data }) => { @@ -1948,21 +1976,43 @@ const associatedFormsDataRangeDialogFlag = ref(false) //点击开启隐藏设置 function associatedFormsHideDialoghandle(){ - associatedFormsHideDialogFlag.value = true - controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml - nextTick(() => { - aft.value.focusEditor() - }) + /* if(controlData.value.control.saveFlag===true){ + + associatedFormsHideDialogFlag.value = true + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml + //alert("当前表单未保存过,若从左侧树中选择字段信息,请先保存当前表单") + nextTick(() => { + aft.value.focusEditor() + }) + }else{ */ + associatedFormsHideDialogFlag.value = true + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml + nextTick(() => { + aft.value.focusEditor() + }) + //} + } function associatedFormsDataRangeDialoghandle(){ - associatedFormsDataRangeDialogFlag.value = true - controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml + /* if(controlData.value.control.saveFlag===true){ + + associatedFormsDataRangeDialogFlag.value = true + controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml + //alert("当前表单未保存过,若从左侧树中选择字段信息,请先保存当前表单") + nextTick(() => { + aftRange.value.focusEditor() + }) + }else{ */ + associatedFormsDataRangeDialogFlag.value = true + controlData.value.control.dataRangeConditionHtmlCopy = controlData.value.control.dataRangeConditionHtml + + nextTick(() => { + aftRange.value.focusEditor() + }) + //} - nextTick(() => { - aftRange.value.focusEditor() - }) } @@ -2497,7 +2547,7 @@ const loadNextPage = () => {
{
+ + + + + { {
+ + + { {
+ + + + + + + + + + +