From 1c44ea0c011f8f2eb85b33e303bcbac8300719db Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Mon, 25 Nov 2024 14:16:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=8D=95=E5=A4=9A?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6---=E5=AD=90=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/public/form/form.vue | 29 ++++++++----------- .../associatedforms/associatedForms.vue | 11 ++++--- .../associatedFormsTinyaceRange.vue | 7 ++--- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue index f1b47a0..8d60c45 100644 --- a/src/components/DesignForm/public/form/form.vue +++ b/src/components/DesignForm/public/form/form.vue @@ -462,14 +462,14 @@ watch(() => model.value,(newVal) => { let rangeFormulaArr = [] if(asfs.length>0){ asfs.forEach((element:any) => { - //console.log(element) + let asfName = element.name - //console.log("asfName----->"+asfName) + if(element.control.dataRangeGongShi&&element.control.dataRangeGongShi.mathsFormula&&element.control.dataRangeGongShi.mathsFormula.length>0){ let asfRangeDoubleCondi = element.control.dataRangeGongShi.mathsFormula - //console.log("数据范围条件----->"+asfRangeDoubleCondi) + if(currentChangeKey!=""){ - //console.log("currentChangeKey----->"+currentChangeKey) + let a = asfRangeDoubleCondi.split(":") let field = a[a.length-1] if(currentChangeKey==field){ @@ -480,10 +480,10 @@ watch(() => model.value,(newVal) => { toShowDoubleCondiValVal:toShowDoubleCondiValVal } asfRangeDoubleCondiChangeObj.value = obj - //console.log(field) + } } - //rangeFormulaArr.push() + } }); } @@ -1609,7 +1609,7 @@ function getAsfs(){ setTimeout(()=>{ let dataList = ref({}) dataList.value = props.formData.list - //props.formData.list[i].type=="associatedForms" + if(dataList&&Array.isArray(dataList.value)&&dataList.value.length>0){ for(let i = 0;i0){ for(let z = 0;z0){ for(let m = 0;m0){ - console.log(asfs) - } - if(tables.length>0){ - console.log(tables) - } */ + } },500) } diff --git a/src/widget/associatedforms/associatedForms.vue b/src/widget/associatedforms/associatedForms.vue index 6f95b42..2c96ccd 100644 --- a/src/widget/associatedforms/associatedForms.vue +++ b/src/widget/associatedforms/associatedForms.vue @@ -35,16 +35,15 @@ const asfRangeDoubleCondiChangeObj = inject('asfRangeDoubleCondiChangeObj') watch(() => asfRangeDoubleCondiChangeObj,(newVal:any) => { value1.value = "" value2.value = "" - //console.log(newVal.value) + let newValObj = JSON.parse(JSON.stringify(newVal.value)); - //console.log(newValObj) - //console.log(asfDataTitlesData) + let toShowDoubleCondiValValStr = newValObj.toShowDoubleCondiValVal+""; - //console.log(toShowDoubleCondiValValStr) + const filteredData = asfDataTitlesData.filter((item: any) => item.doubleCondiVal == toShowDoubleCondiValValStr); - //console.log(filteredData) + options.value = filteredData - //console.log(options.value) + },{deep: true}) const props = withDefaults( defineProps<{ diff --git a/src/widget/associatedforms/associatedFormsTinyaceRange.vue b/src/widget/associatedforms/associatedFormsTinyaceRange.vue index eb95549..cb9cb10 100644 --- a/src/widget/associatedforms/associatedFormsTinyaceRange.vue +++ b/src/widget/associatedforms/associatedFormsTinyaceRange.vue @@ -95,17 +95,16 @@ watch(()=>tinymceHtml.value, (val:any) => { if(!gongShi.formulaHtml.endsWith("

")){ errorCondition("请检查您的条件") }else{ - /* console.log(gongShi) - console.log(props.currentForm) */ + const parts = gongShi.formulaHtml.split(':'); if (parts.length >= 2) { const result = parts[parts.length - 2]; - //console.log(result); + if(result.startsWith("table")){ errorCondition("第二个蓝色块不支持选择子表中的字段") }else{ if(props.currentForm+""==result){ - //console.log(result) + succCondition() }else{ //errorCondition("若要设置两个蓝色块,请按照: 关联的表单.字段A==当前表单.字段B的形式设置条件")