From 199d3b91cf3b6ef1b5c889bbda6cc53d96f47e94 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Fri, 16 Jan 2026 10:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E7=9B=B4=E6=8E=A5=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E8=A2=AB=E7=9F=A9=E9=98=B5=E5=A1=AB=E5=85=85=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignForm/public/form/form.vue | 62 ++++++++++++++----- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/src/components/DesignForm/public/form/form.vue b/src/components/DesignForm/public/form/form.vue index d5772cf..8719f84 100644 --- a/src/components/DesignForm/public/form/form.vue +++ b/src/components/DesignForm/public/form/form.vue @@ -646,7 +646,7 @@ provide(constControlChange, ({ key, value, data, tProp, type, attribute }: any) } // }) - showOrHide(data); + showOrHide(data,value); if (typeof props.changeKeyVal === "function") { props.changeKeyVal(key, value, type, attribute); @@ -688,8 +688,25 @@ function isEmptyPlainObject(obj) { } -function showOrHide(data: any) { - //console.log(data) +function showOrHide(data: any,currentDataNameValue?:any) { + + let dataObjFlag = false//data是否是对象 + if(data=="onMounted"||data=="kong"){ + + }else{ + console.log(data) + dataObjFlag = true + console.log(data.name) + } + if(dataObjFlag){ + if(data.type=="select"||data.type=="radio"||data.type=="checkbox"||data.type=="switch"){ + + }else{ + return + } + + } + /* 企管部有当前用户, @@ -1292,21 +1309,32 @@ nextTick(()=>{ //console.log(rowValue) let columnValue = model.value[tby] //console.log(columnValue) - if(tbx!=""&&tby!=""){ + + /* if(dataObjFlag && element.name==data.name && currentDataNameValue!=""){//允许直接选择被矩阵填充的字段 + console.log(data.name) + console.log("直接选择被矩阵填充的字段,允许") + model.value[element.name] = currentDataNameValue + return + }else{ */ + if(tbx!=""&&tby!=""){ - let cellValue = getTableCellValue(element.tableData, rowValue, columnValue) - model.value[element.name] = cellValue*1 - }else if(tbx!=""&&tby==""){ - //console.log("仅设置了标题行") - let cellValue = getTableCellValue(element.tableData, rowValue, 'default') - //console.log(cellValue) - model.value[element.name] = cellValue*1 - }else if(tbx==""&&tby!=""){ - //console.log("仅设置了索引列") - let cellValue = getTableCellValue(element.tableData, 'any', columnValue) - //console.log(cellValue) - model.value[element.name] = cellValue*1 - } + let cellValue = getTableCellValue(element.tableData, rowValue, columnValue) + model.value[element.name] = cellValue*1 + }else if(tbx!=""&&tby==""){ + //console.log("仅设置了标题行") + let cellValue = getTableCellValue(element.tableData, rowValue, 'default') + //console.log(cellValue) + model.value[element.name] = cellValue*1 + }else if(tbx==""&&tby!=""){ + //console.log("仅设置了索引列") + let cellValue = getTableCellValue(element.tableData, 'any', columnValue) + //console.log(cellValue) + model.value[element.name] = cellValue*1 + } + + //} + +