diff --git a/src/components/DataStandard/NewReportForm/Viewer/hotTable.tsx b/src/components/DataStandard/NewReportForm/Viewer/hotTable.tsx index 3fc33bbdbc40ad55c2da1993e8a2881d2cdf1cd5..dc45b8245c2f7c43a130dc460d75a57c60610c1c 100644 --- a/src/components/DataStandard/NewReportForm/Viewer/hotTable.tsx +++ b/src/components/DataStandard/NewReportForm/Viewer/hotTable.tsx @@ -653,9 +653,12 @@ const HotTableView: React.FC<{ let canChange = false; if (isDirectEditCell(cell) || source === 'edit') { if ( - cell.rule.value?.type == '输入型' && - cell.valueType == '数字框' && - typeof label === 'string' + (cell.rule.value?.type == '输入型' && + cell.valueType == '数字框' && + typeof label === 'string') || + (cell.rule.value?.type == '函数型' && + cell.rule.isVariableData && + typeof label === 'string') ) { label = parseFloat(label); if (!isNaN(label)) { diff --git a/src/components/DataStandard/NewReportForm/config/cell.tsx b/src/components/DataStandard/NewReportForm/config/cell.tsx index 8eed460251cbbe25ea1c1e1907a2998513ec6bd7..fafb1950e8047d66157d76eec26facd1de81e7a2 100644 --- a/src/components/DataStandard/NewReportForm/config/cell.tsx +++ b/src/components/DataStandard/NewReportForm/config/cell.tsx @@ -199,19 +199,18 @@ const CellConfig: React.FC = ({ current, cell, notifyEmitter }) = {formData.rule.value.valueString?.name} )} - {formData?.rule.value?.type === '属性型' && - formData?.rule.value?.valueString && ( - updateAttrWidget(e), - }} - /> - )} - {formData?.rule.value?.type !== '固定型' && + {formData?.rule.value?.type === '属性型' && ( + updateAttrWidget(e), + }} + /> + )} + {formData?.rule.value?.type !== '属性型' && formData?.code != 'variableSheet' && (