|
@@ -9,6 +9,8 @@ import allTableIcon from '@common/images/all-table.png';
|
|
|
import add from '@common/images/add-result.png';
|
|
|
import added from '@common/images/first.png';
|
|
|
import checkIcon from '@common/images/check.png';
|
|
|
+import infoShow from '@common/images/info-show.png';
|
|
|
+import infoMove from '@common/images/info-move.png';
|
|
|
import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn} from '@commonComp';
|
|
|
import ScaleTable from '@containers/ScaleTable';
|
|
|
import Notify from '@commonComp/Notify';
|
|
@@ -40,6 +42,8 @@ class ChronicInfo extends React.Component{
|
|
|
formulaParam: {}, //量表计算公式计算入参
|
|
|
isCalculated:false, //是否刚计算过,关闭时值与结果对应
|
|
|
calcuValues:deepClone(props.calcuValues), //计算公式填的值
|
|
|
+ hasEnterImg: false, //是否移入info
|
|
|
+ currentIndex: -1 //当前index
|
|
|
};
|
|
|
|
|
|
this.showInfo = this.showInfo.bind(this);
|
|
@@ -305,14 +309,49 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
return btn;
|
|
|
}
|
|
|
+ handleMouseEnterDrug(index) {
|
|
|
+ this.setState({
|
|
|
+ currentIndex: index,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleMouseLeaveDrug() {
|
|
|
+ this.setState({
|
|
|
+ currentIndex: -1,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleMouseEnterImg() {
|
|
|
+ this.setState({
|
|
|
+ hasEnterImg: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleMouseLeaveImg() {
|
|
|
+ this.setState({
|
|
|
+ hasEnterImg: false
|
|
|
+ })
|
|
|
+ }
|
|
|
getDetail(){
|
|
|
const {data,formulaResult,calcuResult} = this.props;
|
|
|
- const {formulaId,optionId,possible,radioVal,calcuValues} = this.state;
|
|
|
+ const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
|
|
|
let list = data&&data.map((v,i)=>{
|
|
|
return <div className={style["list"]}>
|
|
|
{v.name?<p>
|
|
|
- <span>{'患者可能有'+v.name}</span>
|
|
|
- <img src={infoPic} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/>
|
|
|
+ <span>患者可能有</span>
|
|
|
+ <span
|
|
|
+ className={style['dis-name']}
|
|
|
+ onMouseEnter={this.handleMouseEnterDrug.bind(this, i)}
|
|
|
+ onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
|
+ >
|
|
|
+ {v.name}
|
|
|
+ {<img className={style['info-img']}
|
|
|
+ style ={currentIndex === i ? {display: "inline-block"} : {display: "none"}}
|
|
|
+ src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
|
|
|
+ onMouseEnter={this.handleMouseEnterImg.bind(this)}
|
|
|
+ onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
|
|
|
+ onClick={this.showInfo.bind(this,v.id)}/>}
|
|
|
+
|
|
|
+ </span>
|
|
|
+ {/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
|
|
|
+
|
|
|
:
|
|
|
</p>:''}
|
|
|
{v.details&&v.details.map((it,j)=>{
|