From 3a9b602783619c4d1b8aa3c2b50f8ae7b8856115 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Tue, 6 May 2025 10:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=8B=9F=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/formControlPropertiNew.vue | 67 ++++++++++--------- .../appPage/appPageForm/pageFlow.vue | 4 ++ 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 0a8bca8..864d47f 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -1159,8 +1159,10 @@ const controlChange = (obj: any, val: any) => { }); } else { //修改了某个option - controlData.value.control.glxxsz[i].optionLabel = controlData.value.options[i].label; - controlData.value.control.glxxsz[i].optionValue = controlData.value.options[i].value; + controlData.value.control.glxxsz[i].optionLabel = + controlData.value.options[i].label; + controlData.value.control.glxxsz[i].optionValue = + controlData.value.options[i].value; } } } @@ -1313,18 +1315,14 @@ const controlChange = (obj: any, val: any) => { const newVal = obj.isNum ? formatNumber(val) : val; // 类型为数字时转整数 obj.path && getPropByPath(controlData.value, obj.path, newVal); } - - }; //liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 start //关联选项设置会在标签名称改变时清空 -function formNameChange (){ +function formNameChange() { emits("formNameChange", 1); } //liwenxuan 关联选项设置 修复bug:当字段标识改变时,关联选项设置的字段标识未同步更改 end - - /** * 获取非负整数随机数 * @param Min 最小整数 @@ -1346,9 +1344,14 @@ const getPropByPath = (obj: any, path: string, val: any) => { let tempObj = obj; const keyArr = path.split("."); //liwenxuan 关联选项设置会在标签名称改变时清空 start 250410 - if(keyArr&&keyArr[0]&&keyArr[0]=='name'){ - if(tempObj.type=="select"||tempObj.type=="radio"||tempObj.type=="checkbox"||tempObj.type=="switch"){ - formNameChange() + if (keyArr && keyArr[0] && keyArr[0] == "name") { + if ( + tempObj.type == "select" || + tempObj.type == "radio" || + tempObj.type == "checkbox" || + tempObj.type == "switch" + ) { + formNameChange(); } } // liwenxuan 关联选项设置会在标签名称改变时清空 end 250410 @@ -1818,8 +1821,8 @@ const isNotWrite = (val: any) => { return false; }; const isNotWriteWord = (val: any) => { - // console.log("isNotWriteWord---->", val); - // console.log("isNotWriteWord--formField-->", props.formField); + console.log("isNotWriteWord---->", val); + console.log("isNotWriteWord--formField-->", props.formField); if ( val.eventName === "filedNameKey" && props.customerformid != "" && @@ -2046,7 +2049,7 @@ watch( i--; // 如果不减,将漏掉一个元素 } } - console.log(resDataForGlxxszExceptself1) + console.log(resDataForGlxxszExceptself1); if ( getAssociatedFormsCurrentFieldTreeData && getAssociatedFormsCurrentFieldTreeData.treeAttrs && @@ -3337,7 +3340,10 @@ watch( (changedOptions: any) => { // console.log("radio,select添加选项时同步配置选项",changedOptions) // console.log("radio,select添加选项时同步配置选项------>",controlData.value) - if (controlData.value.type === "radio" || controlData.value.type === "select" && (!controlData.value.multiple)) { + if ( + controlData.value.type === "radio" || + (controlData.value.type === "select" && !controlData.value.multiple) + ) { if (controlData.value.config.optionsType == 0) { if (changedOptions.length === 0) { //删没了option @@ -3400,7 +3406,6 @@ function createRowForGlxxsz1() { } } - function deleteRowForGlxxsz(row: { id: any }) { if (controlData.value.config.optionsType == 0) { controlData.value.control.glxxszForCheckBox = controlData.value.control.glxxszForCheckBox.filter( @@ -6096,7 +6101,8 @@ const libraryList = ref([ - - -