|
@@ -208,18 +208,18 @@ class ChronicInfo extends React.Component{
|
|
|
});
|
|
|
}
|
|
|
handleInputformula(v,i, j,idd, e) {
|
|
|
- const { data, setChronicPush } = this.props
|
|
|
- const text = e.target.value
|
|
|
+ const { data, setChronicPush } = this.props;
|
|
|
+ const text = e.target.value;
|
|
|
if (data[i].details) {
|
|
|
data[i].details[j].content.details[idd].value = text
|
|
|
}
|
|
|
|
|
|
- const data1 = JSON.parse(JSON.stringify(data))
|
|
|
+ const data1 = JSON.parse(JSON.stringify(data));
|
|
|
|
|
|
setChronicPush(data1)
|
|
|
}
|
|
|
handleForRadio(ii,v,i, j,idd, ind){//计算公式
|
|
|
- const { data, setChronicPush } = this.props
|
|
|
+ const { data, setChronicPush } = this.props;
|
|
|
if (data[i].details) {
|
|
|
for(let z = 0; z < data[i].details[j].content.details[idd].details.length; z++) {
|
|
|
data[i].details[j].content.details[idd].details[z].state = 0
|
|
@@ -227,7 +227,7 @@ class ChronicInfo extends React.Component{
|
|
|
data[i].details[j].content.details[idd].details[ind].state = 1
|
|
|
}
|
|
|
|
|
|
- const data1 = JSON.parse(JSON.stringify(data))
|
|
|
+ const data1 = JSON.parse(JSON.stringify(data));
|
|
|
setChronicPush(data1)
|
|
|
}
|
|
|
confirmFormula(){//计算公式确定
|
|
@@ -244,11 +244,13 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
confirmOption(parent,pIndex){//可能结果确定
|
|
|
const {radioVal,possible} = this.state;
|
|
|
+ const {savePossibleResult} = this.props;
|
|
|
this.setState({
|
|
|
possible:Object.assign({},possible,radioVal),
|
|
|
radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
|
|
|
- optionId:null
|
|
|
- })
|
|
|
+ optionId:null,
|
|
|
+ });
|
|
|
+ savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
|
|
|
}
|
|
|
handleSaveCalcu(obj){
|
|
|
this.setState({
|
|
@@ -257,8 +259,8 @@ class ChronicInfo extends React.Component{
|
|
|
})
|
|
|
}
|
|
|
calcuFormula(it,j, v, i) { //计算公式计算
|
|
|
- const { calcuFormula, data ,chronicPushItems} = this.props
|
|
|
- let allHasInfo = true
|
|
|
+ const { calcuFormula, data ,chronicPushItems} = this.props;
|
|
|
+ let allHasInfo = true;
|
|
|
for (let i = 0; i < it.content.details.length; i++) {
|
|
|
if(it.content.details[i].controlType == 2) { //输入框类型的有没有填值
|
|
|
if(!it.content.details[i].value) {
|