|
@@ -232,10 +232,9 @@ class ChronicInfo extends React.Component{
|
|
|
this.closeFormula(it);
|
|
|
chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
|
|
|
}
|
|
|
- handleInputformula(id,calcuContent,i,cres,e) {
|
|
|
- // const {calcuValues} = this.state;
|
|
|
- const {calcuResult,calcuValues,setCalcuInfo} = this.props;
|
|
|
- let obj = deepClone(calcuValues);
|
|
|
+ handleInputformula(id,calcuContent,i,e) {
|
|
|
+ const {calcuValues} = this.state;
|
|
|
+ let obj = deepClone(calcuValues);
|
|
|
let values = (obj&&obj[id])||deepClone(calcuContent);
|
|
|
const txt = e.target.value;
|
|
|
values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,''); //处理中文输入法的情况
|
|
@@ -247,11 +246,6 @@ class ChronicInfo extends React.Component{
|
|
|
isCalculated:false,
|
|
|
calcuValues:obj
|
|
|
});
|
|
|
- let calcuResultCopy = calcuResult&&calcuResult[id]||cres
|
|
|
- for(let i = 0; i < calcuResultCopy.length; i++) {
|
|
|
- calcuResultCopy[i].text = ""
|
|
|
- }
|
|
|
- setCalcuInfo&&setCalcuInfo(id, obj[id], calcuResultCopy)
|
|
|
}
|
|
|
handleForRadio(id,calcuContent,i,fidx){//计算公式
|
|
|
const { calcuValues } = this.state;
|
|
@@ -449,7 +443,7 @@ class ChronicInfo extends React.Component{
|
|
|
<span>{item.isShow == '0' ? item.name+':':'请输入'+item.name+':'}</span>
|
|
|
</td>
|
|
|
<td>
|
|
|
- {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入" value={item.value} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd,cres)}/>}
|
|
|
+ {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入" value={item.value} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
|
|
|
</td>
|
|
|
<td>
|
|
|
{item.isShow != '0'&&<span>{item.uint}</span>}
|