From 81c7a676e35f804b5629901ef5f4f5b92e258238 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 23 Jul 2024 14:49:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=E5=BD=93=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A4=9A=E4=B8=AA=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=97=B6,timymce=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8D=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/formControlPropertiNew.vue | 6 +++++- src/components/DesignForm/public/form/form.vue | 3 ++- src/widget/associatedforms/associatedFormsTinyace.vue | 3 ++- src/widget/associatedforms/associatedFormsTinyaceRange.vue | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 8299cf1..0a437b6 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -1925,7 +1925,7 @@ const treeDefaultProps = { label: 'label', } //拿到子组件AssociatedFormsTinyace的实例 -let aft = ref(); +const aft = ref(); const aftRange = ref(); function getAssociatedFormsCurrentFieldTree() { @@ -2354,6 +2354,7 @@ let determineRange = ref(true) watch(associatedFormsHideDialogFlag, (val) => { if(val===true&&determine.value===false){ setTimeout(() => { + //alert(1) aft.value.tinymceReInit() }, 200); } @@ -2362,6 +2363,7 @@ watch(associatedFormsHideDialogFlag, (val) => { watch(associatedFormsDataRangeDialogFlag, (val) => { if(val===true&&determineRange.value===false){ setTimeout(() => { + //alert(2) aftRange.value.tinymceReInit() }, 200); } @@ -2406,6 +2408,8 @@ watch(()=>store.activeKey, () => { setTimeout(() => { formidChanged() }, 800); + /* aft.value.tinymceReInit() + aftRange.value.tinymceReInit() */ }else if(controlData.value.type==='radio'||controlData.value.type==='select'||controlData.value.type==='checkbox'){ setTimeout(() => { diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue index f3fc4b8..59b9e9f 100644 --- a/src/components/DesignForm/public/form/form.vue +++ b/src/components/DesignForm/public/form/form.vue @@ -401,7 +401,8 @@ const recursionToGetFinallyHideFields = (hideFieldArr: any[],radioSelectArr3: st //编辑表单页不隐藏任何字段。 if(formProps.value.type!=5){ - props.formData.config.hideField?.push(...hideFieldArr) + console.log(hideFieldArr) + props.formData.config.hideField?.push(...hideFieldArr)//实际造成隐藏效果 } }); diff --git a/src/widget/associatedforms/associatedFormsTinyace.vue b/src/widget/associatedforms/associatedFormsTinyace.vue index 8976cc6..da9e093 100644 --- a/src/widget/associatedforms/associatedFormsTinyace.vue +++ b/src/widget/associatedforms/associatedFormsTinyace.vue @@ -189,9 +189,10 @@ const handelCancel = (associatedFormsHideDialogTextCopy:any) =>{ tinymceHtml.value = associatedFormsHideDialogTextCopy } const tinymceReInit = ()=>{ - + //console.log(props.aftTextCopy) let str:string = props.aftTextCopy + tinymceHtml.value = props.aftTextCopy } const focusEditor = ()=>{ tinymce.EditorManager.get(onlyNumber)?.focus(true) diff --git a/src/widget/associatedforms/associatedFormsTinyaceRange.vue b/src/widget/associatedforms/associatedFormsTinyaceRange.vue index b7ae7e0..1edad2b 100644 --- a/src/widget/associatedforms/associatedFormsTinyaceRange.vue +++ b/src/widget/associatedforms/associatedFormsTinyaceRange.vue @@ -187,9 +187,10 @@ const handelCancel = (associatedFormsHideDialogTextCopy:any) =>{ tinymceHtml.value = associatedFormsHideDialogTextCopy } const tinymceReInit = ()=>{ - + //console.log(props.aftTextCopy) let str:string = props.aftTextCopy + tinymceHtml.value = props.aftTextCopy } const focusEditor = ()=>{ From a3551a07ee87cc2745245750bc49332b88059c8d Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 23 Jul 2024 16:52:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E5=85=B3=E8=81=94=E9=80=89=E9=A1=B9=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=B8=8D=E6=98=BE=E7=A4=BAbug=202.=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95=E7=9A=84tinymce?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=A0=B7=E5=BC=8F=E5=92=8C=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DesignForm/formControlAttr.vue | 16 ++++++++++------ .../DesignForm/formControlPropertiNew.vue | 15 ++++++++++----- .../associatedforms/associatedFormsTinyace.vue | 10 ++++++---- .../associatedFormsTinyaceRange.vue | 6 ++++-- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index a6f7f5b..9f463a9 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -1883,7 +1883,7 @@ const treeDefaultProps = { label: 'label', } //拿到子组件AssociatedFormsTinyace的实例 -let aft = ref(); +const aft = ref(); const aftRange = ref(); function getAssociatedFormsCurrentFieldTree() { @@ -3159,7 +3159,7 @@ const disabledIstrue = (val:string) => { -
+
关联选项设置
@@ -3858,17 +3858,19 @@ const disabledIstrue = (val:string) => {
当满足以下条件时此控件隐藏
-
+
-
+
  • 请从左侧面板右击选择字段或选项
  • 支持英文模式下运算符
  • +
  • 支持"包含"关键字,用于组织机构条件
  • +
  • 支持"当前用户"关键字,用于角色条件
  • 参考场景:
  • 年龄控件输入的值大于10时,需要隐藏当前控件,则可将隐藏条件设置为:年龄>10
@@ -3968,17 +3970,19 @@ const disabledIstrue = (val:string) => {
仅可选择符合以下条件的数据
-
+
-
+
  • 请从左侧面板右击选择字段或选项
  • 支持英文模式下运算符
  • +
  • 支持"包含"关键字,用于组织机构条件
  • +
  • 支持"当前用户"关键字,用于角色条件
  • 参考场景:
  • 仅可选择关联表单中年龄大于10的数据,则可将数据范围设置为:年龄>10
diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 0a437b6..dc6ebea 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -3211,7 +3211,8 @@ const disabledIstrue = (val:string) => {
-
+ +
关联选项设置
@@ -3911,17 +3912,19 @@ const disabledIstrue = (val:string) => {
当满足以下条件时此控件隐藏
-
+
-
+
  • 请从左侧面板右击选择字段或选项
  • 支持英文模式下运算符
  • +
  • 支持"包含"关键字,用于组织机构条件
  • +
  • 支持"当前用户"关键字,用于角色条件
  • 参考场景:
  • 年龄控件输入的值大于10时,需要隐藏当前控件,则可将隐藏条件设置为:年龄>10
@@ -4021,17 +4024,19 @@ const disabledIstrue = (val:string) => {
仅可选择符合以下条件的数据
-
+
-
+
  • 请从左侧面板右击选择字段或选项
  • 支持英文模式下运算符
  • +
  • 支持"包含"关键字,用于组织机构条件
  • +
  • 支持"当前用户"关键字,用于角色条件
  • 参考场景:
  • 仅可选择关联表单中年龄大于10的数据,则可将数据范围设置为:年龄>10
diff --git a/src/widget/associatedforms/associatedFormsTinyace.vue b/src/widget/associatedforms/associatedFormsTinyace.vue index da9e093..4606fea 100644 --- a/src/widget/associatedforms/associatedFormsTinyace.vue +++ b/src/widget/associatedforms/associatedFormsTinyace.vue @@ -18,7 +18,7 @@ const tinymceInit = { language_url: "/tinymce/langs/zh-Hans.js", // 引入语言包(该语言包在public下,注意文件名称) language: "zh-Hans", // 这里名称根据 zh-Hans.js 里面写的名称而定 skin_url: "/tinymce/skins/ui/oxide", // 这里引入的样式 - height: 260, // 限制高度 + height: 174, // 限制高度 statusbar:false, toolbar:false, branding: false, //是否禁用“Powered by TinyMCE” @@ -85,9 +85,11 @@ watch(()=>tinymceHtml.value, (val:any) => { errorCondition("条件不能以蓝色块结尾") }else if(countSpanTags(gongShi.formulaHtml)>1){ errorCondition("不允许出现多个蓝色块") - }else if(!containsSingleComparator(gongShi.mathsFormula)){ - errorCondition("不存在有效符号") - }else if(checkEnding(gongShi.mathsFormula)){ + }else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")){ + + errorCondition("不存在有效符号") + + }else if(checkEnding(gongShi.mathsFormula)){ errorCondition("不能以符号为结尾") }else{ succCondition() diff --git a/src/widget/associatedforms/associatedFormsTinyaceRange.vue b/src/widget/associatedforms/associatedFormsTinyaceRange.vue index 1edad2b..4ce83e9 100644 --- a/src/widget/associatedforms/associatedFormsTinyaceRange.vue +++ b/src/widget/associatedforms/associatedFormsTinyaceRange.vue @@ -17,7 +17,7 @@ const tinymceInit = { language_url: "/tinymce/langs/zh-Hans.js", // 引入语言包(该语言包在public下,注意文件名称) language: "zh-Hans", // 这里名称根据 zh-Hans.js 里面写的名称而定 skin_url: "/tinymce/skins/ui/oxide", // 这里引入的样式 - height: 260, // 限制高度 + height: 174, // 限制高度 statusbar:false, toolbar:false, branding: false, //是否禁用“Powered by TinyMCE” @@ -84,8 +84,10 @@ watch(()=>tinymceHtml.value, (val:any) => { errorCondition("条件不能以蓝色块结尾") }else if(countSpanTags(gongShi.formulaHtml)>1){ errorCondition("不允许出现多个蓝色块") - }else if(!containsSingleComparator(gongShi.mathsFormula)){ + }else if(!containsSingleComparator(gongShi.mathsFormula)&&!gongShi.mathsFormula.includes("包含")){ + errorCondition("不存在有效符号") + }else if(checkEnding(gongShi.mathsFormula)){ errorCondition("不能以符号为结尾") }else{