diff --git a/src/components/DesignForm/assembly/index.ts b/src/components/DesignForm/assembly/index.ts index 588f78504..400d30c24 100644 --- a/src/components/DesignForm/assembly/index.ts +++ b/src/components/DesignForm/assembly/index.ts @@ -599,6 +599,8 @@ const selectOption: any = [ iconFont: 'fa-wpforms', control: { modelValue: '', + hideConditionHtml:'', + hideConditionHtmlCopy:'', }, config: {} } diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index b2d7ba4e6..ffec113d8 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -1780,7 +1780,8 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { associatedFormsCurrentFormFieldTree.value = [{ id: 'rootid_'+data.label, label: '当前表单', - children: [...resData.value] + children: [...resData.value], + treeAttrs: data.treeAttrs, }] }); @@ -1823,7 +1824,7 @@ function handleFieldTreeNodeclick(){ } function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ - aft.value.addIcon(object) + aft.value.addIcon_field(object) } //org const orgTreeSearchFlag = ref(false) @@ -1889,27 +1890,33 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => } //关联表单隐藏条件弹窗flag const associatedFormsHideDialogFlag = ref(false) + + + //父组件 -let associatedFormsHideDialogText = ref('')//textarea默认值 +//let associatedFormsHideDialogText = ref('')//textarea默认值 //父组件编辑备份 -let associatedFormsHideDialogTextCopy = ref('') +//let associatedFormsHideDialogTextCopy = ref('') + + + //点击开启隐藏设置 function associatedFormsHideDialoghandle(){ associatedFormsHideDialogFlag.value = true - associatedFormsHideDialogTextCopy.value = associatedFormsHideDialogText.value + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml } //自定义事件同步父子组件的text function aftTextChanged(str:string){ - associatedFormsHideDialogText.value = str + controlData.value.control.hideConditionHtml = str } //asf隐藏条件取消编辑 function asfhTextCancel(){ determine.value = false associatedFormsHideDialogFlag.value = false - associatedFormsHideDialogText.value = associatedFormsHideDialogTextCopy.value + controlData.value.control.hideConditionHtml = controlData.value.control.hideConditionHtmlCopy //父组件取消将copy同步至子组件 - aft.value.handelCancel(associatedFormsHideDialogTextCopy.value) + aft.value.handelCancel(controlData.value.control.hideConditionHtmlCopy) } //上次点击了确定为true let determine = ref(true) @@ -1925,7 +1932,7 @@ watch(associatedFormsHideDialogFlag, (val) => { function handleDetermine(){ associatedFormsHideDialogFlag.value = false determine.value = true - associatedFormsHideDialogTextCopy.value = associatedFormsHideDialogText.value + controlData.value.control.hideConditionHtmlCopy = controlData.value.control.hideConditionHtml } @@ -2392,8 +2399,8 @@ const loadNextPage = () => { - 设置隐藏条件 - + 设置隐藏条件 + { 当满足以下条件时此控件隐藏 - + diff --git a/src/widget/associatedforms/associatedFormsTinyace.vue b/src/widget/associatedforms/associatedFormsTinyace.vue index 835b8024f..4ec15b8f3 100644 --- a/src/widget/associatedforms/associatedFormsTinyace.vue +++ b/src/widget/associatedforms/associatedFormsTinyace.vue @@ -62,7 +62,9 @@ watch(()=>tinymceHtml.value, (val:any) => { const addIcon = (currentObject:any) =>{ tinymce.activeEditor?.execCommand('mceInsertContent', false, `${currentObject.label}`); } - +const addIcon_field = (currentObject:any) =>{ + tinymce.activeEditor?.execCommand('mceInsertContent', false, `${currentObject.treeAttrs.show}`); +} const addIcon_org = (currentObject:any) =>{ let id = "orgOrPerson:"+currentObject.id tinymce.activeEditor?.execCommand('mceInsertContent', false, `${currentObject.label}`); @@ -80,6 +82,7 @@ defineExpose({ tinymceHtml, addIcon, addIcon_org, + addIcon_field, handelCancel, tinymceReInit, })