|
@@ -48,10 +48,9 @@ class AssessResult extends Component {
|
|
|
wholeAssessText:obj
|
|
|
})
|
|
|
}
|
|
|
- handleScaleDel(isList,i,j,id){
|
|
|
- let ids = [],idIndex='';
|
|
|
+ handleScaleDel(isList,i,id,j){
|
|
|
+ let ids = [...this.state.addedScaleIds||[]],idIndex='';
|
|
|
if(id){
|
|
|
- ids = [...this.state.addedScaleIds||[]];
|
|
|
idIndex = ids.findIndex((ii)=>id==ii);
|
|
|
ids.splice(idIndex,1);
|
|
|
}
|
|
@@ -111,6 +110,13 @@ class AssessResult extends Component {
|
|
|
saveAssessInfos(this.state,readyKeepHistory());
|
|
|
}
|
|
|
}
|
|
|
+ componentWillReceiveProps(next){
|
|
|
+ if(JSON.stringify(next.addedScaleIds)!=JSON.stringify(this.props.addedScaleIds)){
|
|
|
+ this.setState({
|
|
|
+ addedScaleIds:[...next.addedScaleIds||[]]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
handoutTypes(item,i){
|
|
|
const {getIndexData,indexData,timeTypes,wholeIndexs,closeAssess,showScaleFn,chronicPushItems,
|
|
|
formulaResult,indexNames,disName} =this.props;
|
|
@@ -164,7 +170,8 @@ class AssessResult extends Component {
|
|
|
<div className={style['printShow']}>
|
|
|
<Information></Information>
|
|
|
</div>
|
|
|
- {!(data&&data.length>0)?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
|
|
|
+ {!data?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
|
|
|
+ {data&&data.length==0?<p className={style['no-data']}>暂无数据!</p>:''}
|
|
|
{data && data.map((it, i) => {
|
|
|
return this.handoutTypes(it, i);
|
|
|
})}
|