From 3b4003f5c86852ee1f2370dc5b5e8c80f93fa48d Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Mon, 15 Apr 2024 16:55:24 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95v0.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/formControlAttr.vue | 77 ++++++++++++++-- .../associatedFormsTinyace.vue | 91 +++++++++++++++++++ 2 files changed, 158 insertions(+), 10 deletions(-) create mode 100644 src/widget/associatedforms/associatedFormsTinyace.vue diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index 680c9d65a..c6cab36df 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -1741,10 +1741,9 @@ const transferDataSourceOptions = [ //liwenxuan20240403 associatedForms start +import AssociatedFormsTinyace from '@/widget/associatedforms/associatedFormsTinyace.vue' -const associatedFormsHideDialogFlag = ref(false) - -const defaultProps = { +const treeDefaultProps = { children: 'children', label: 'label', } @@ -1754,7 +1753,7 @@ function getAssociatedFormsCurrentFieldTree() { url: '/javasys/lowCode/AssociatedForms/getFieldTree', method: 'post', data: { - cfid:'1' + cfid:'13' }, }); } @@ -1802,14 +1801,24 @@ function handleFieldTreeCollapse(){ function handleFieldTreeNodeclick(){ } +//拿到子组件AssociatedFormsTinyace的实例 +let aft = ref(); function handleFieldTreeContextmenu(MouseEvent:any, object:any, Node:any, element:any){ //console.log(MouseEvent) - console.log(object) + //console.log(Node) //console.log(element) + + aft.value.addIcon(object) + } + + + import { ElTree } from 'element-plus' + + const fieldTreeFilterText = ref('') const fieldTreeRef = ref>() @@ -1821,6 +1830,50 @@ const filterNode = (value: string, associatedFormsCurrentFormFieldTree: Tree) => if (!value) return true return associatedFormsCurrentFormFieldTree.label.includes(value) } +//关联表单隐藏条件弹窗flag +const associatedFormsHideDialogFlag = ref(false) +//父组件 +let associatedFormsHideDialogText = ref('雾峦青雨') +//父组件编辑备份 +let associatedFormsHideDialogTextCopy = ref('') +//点击开启隐藏设置 +function associatedFormsHideDialoghandle(){ + associatedFormsHideDialogFlag.value = true + associatedFormsHideDialogTextCopy.value = associatedFormsHideDialogText.value +} +//asf隐藏条件取消编辑 +function asfhTextCancel(){ + associatedFormsHideDialogFlag.value = false + associatedFormsHideDialogText.value = associatedFormsHideDialogTextCopy.value + //父组件取消将copy同步至子组件 + aft.value.handelCancel(associatedFormsHideDialogTextCopy) +} +//自定义事件同步父子组件的text +function aftTextChanged(str:any){ + console.log(str) + associatedFormsHideDialogText.value = str.value +} + +//监听associatedFormsHideDialogFlag true 重新init tinymce + watch(associatedFormsHideDialogFlag, (val) => { + if(associatedFormsHideDialogFlag.value===true){ + + setTimeout(() => { + + aft.value.tinymceReInit() + + }, 200); + + } +}) + + + + +//liwenxuan20240403 associatedForms end + + + @@ -2277,7 +2330,7 @@ const loadNextPage = () => { - 设置隐藏条件 + 设置隐藏条件 @@ -2983,6 +3036,8 @@ const loadNextPage = () => { + +