Sfoglia il codice sorgente

静态信息交互修改(136)

zhangxc 5 anni fa
parent
commit
db9a8692e6

+ 2 - 2
src/components/AddAssistCheck/index.jsx

@@ -190,7 +190,7 @@ class AddAssistCheck extends React.Component {
                   <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
                     <span className={styles.tagSpan}>
                       {item.name}:
-                      <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                     </span>
                   </span>
                   <div className={styles.textareaWrap}>
@@ -233,7 +233,7 @@ class AddAssistCheck extends React.Component {
               <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
                 <span className={styles.tagSpan}>
                   {item.name}:
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
               </span>
               <div className={styles.textareaWrap}>

+ 3 - 3
src/components/AddInspect/SlideExcel/index.jsx

@@ -38,7 +38,7 @@ class SlideExcel extends Component {
         <span className={styles.excelDataTitle}>
           <span className={styles.tagSpan}>
             {item.menus}
-            <span className={styles.imgInfo} onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
+            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
           </span>
         </span>
         <table className={styles.table}>
@@ -47,7 +47,7 @@ class SlideExcel extends Component {
               <td style={{ width: '30%' }}>
                 <span className={styles.tagSpan}>
                   {value.itemName}
-                  <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                 </span>
               </td>
               <td style={{ width: '20%' }}>
@@ -66,7 +66,7 @@ class SlideExcel extends Component {
                 <td style={{ width: '30%' }}>
                   <span className={styles.tagSpan}>
                     {value.itemName}
-                    <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                   </span>
                 </td>
                 <td style={{ width: '20%' }}>

+ 4 - 4
src/components/AddInspect/SlideSelect/index.jsx

@@ -128,13 +128,13 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo1} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
@@ -156,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -174,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

+ 1 - 0
src/components/ChronicInfo/index.jsx

@@ -384,6 +384,7 @@ class ChronicInfo extends React.Component{
                                 >
                                   {v.name}
                                   {this.getCritical(v)?'':<img className={style['info-img']}
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === i  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/DiagnosticItem/index.jsx

@@ -110,6 +110,7 @@ class DiagnosticItem extends Component{
                           >
                         {item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}
                         {type== 'disSelect' &&<img className={style['info-img']}  
+                                title='点击i图标可查看详细说明'
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 src={hasEnterImg ? infoMove : infoShow} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 44 - 5
src/components/DiagnosticList/index.jsx

@@ -5,6 +5,8 @@ import del_on from './img/delete-on.png'
 import diagUp from './img/diagUp.png'
 import diagDown from './img/diagDown.png'
 import manageIcon from '@common/images/manage.png';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
 import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
@@ -35,7 +37,9 @@ class DiagnosticList extends Component {
             isAssessConfirm:false,
             hasOndel: false,
             hasOnIndex: -1,
-            activeItem:{}
+            activeItem:{},
+            hasEnterItem: -1,
+            hasEnterImg: false
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -103,10 +107,10 @@ class DiagnosticList extends Component {
             treatTitle: item.name
         })
     } 
-    handleClickDiag(item) {
+    handleClickDiag(item,noTips,noDetails,noNotify) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1});
+        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1},noTips,noDetails,noNotify);
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
@@ -249,9 +253,29 @@ class DiagnosticList extends Component {
         hasOndel: false
       })
     }
+    handleMouseEnterDrug(index) {
+      this.setState({
+          hasEnterItem: index, 
+      })
+    }
+    handleMouseLeaveDrug() {
+      this.setState({
+          hasEnterItem: -1, 
+      })
+    }
+    handleMouseEnterImg() {
+      this.setState({
+        hasEnterImg: true
+      })
+    }
+    handleMouseLeaveImg() {
+      this.setState({
+        hasEnterImg: false
+      })
+    }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller} = this.props;
-        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
+        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
@@ -268,7 +292,22 @@ class DiagnosticList extends Component {
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
-                                    <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
+                                    <span className={style['diag-name']} 
+                                       onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
+                                       onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                                    >
+                                      <span  onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                        {item.name}
+                                      </span>
+                                      <img className={style['info-img']}  
+                                          title='点击i图标可查看详细说明'
+                                          style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
+                                          src={hasEnterImg ? infoMove : infoShow} 
+                                          onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                          onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                                          onClick={this.handleClickDiag.bind(this,item,false,false,false)}
+                                      />
+                                    </span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}

+ 9 - 0
src/components/DiagnosticList/index.less

@@ -167,4 +167,13 @@
             margin-right: 5px;
         }
     }
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    top: -14px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+    z-index: 2;
 }

+ 2 - 2
src/components/PushItems/TipsMsg/index.jsx

@@ -38,8 +38,8 @@ class TipsMsg extends Component {
               </div>
               {tips.details &&
                 tips.details.map((item, index) => {
-                  return (
-                      <div>
+                 return (
+                  item.position&&item.position.indexOf('1') > -1&&<div>
                         <div
                           dangerouslySetInnerHTML={{
                             __html: item.title

+ 1 - 1
src/components/PushItems/index.jsx

@@ -127,7 +127,7 @@ class PushItems extends Component {
   }
 
   showTips() {
-    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;console.log(this.props)
+    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;
     getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:0});
     //showTipsDetailsModal && showTipsDetailsModal()
   }

+ 1 - 0
src/components/Treat/AdverseReactions/index.jsx

@@ -64,6 +64,7 @@ class AdverseReactions extends Component {
                         >
                             <span className={style['last-treat-big-name']} >{item.name}:
                                 {<img className={style['info-img']}  
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/Treat/DrugHistory/LastDrug/index.jsx

@@ -59,6 +59,7 @@ class LastDrug extends Component {
                             > 
                             {item.medicitionName} 
                             {<img className={style['info-img']}  
+                                title='点击i图标可查看详细说明'
                                 style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                 src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 1 - 0
src/components/Treat/DrugTreat/index.jsx

@@ -105,6 +105,7 @@ class DrugTreat extends Component {
                                                 {it.medicitionName}
                                             </span>
                                             {<img className={style['info-img']}  
+                                              title='点击i图标可查看详细说明'
                                               style ={currentIndex === index ? (ii === currentImg ? {display: "inline-block"} : {display: "none"}) : {display: "none"}}
                                               src={currentIndex === index ? (ii === currentImg ? (hasEnterImg ? info3 : info2) : info2): info2} 
                                               onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}

+ 2 - 0
src/components/TreatDesc/index.jsx

@@ -93,6 +93,7 @@ class TreatDesc extends Component {
                                     {item.medicitionName}
                                 </span>
                                 {<img className={style['info-img']}  
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === index ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === index ?  (hasEnterImg ? info3 : info2) : info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
@@ -102,6 +103,7 @@ class TreatDesc extends Component {
                             </span>              
                             
                             {/* {<img className={style['info-img']}    
+                                title='点击i图标可查看详细说明'
                                 src={currentIndex === index ? info1 : info} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
                                 onMouseLeave = {this.handleMouseLeaveImg}

+ 2 - 0
src/containers/DiagnosticItem.js

@@ -28,7 +28,9 @@ function mapDispatchToProps(dispatch) {
                 type: GET_DIAGNOSTIC_STR
             });
             dispatch(isAddMainSuit())
+            console.log('item', item)
             // dispatch(addDiagnostic(item))
+            dispatch(getConceptDetail({type:7,name: item.name, position: 1},false,true,true))
         },
         showSearch:()=>{
             dispatch({

+ 2 - 2
src/containers/DiagnosticList.js

@@ -91,8 +91,8 @@ function mapDispatchToProps(dispatch) {
             // dispatch({type:SHOW_LOADING,flag:true});
             dispatch(getTreatResult(item));
         },
-        getTips: (item) => {
-            dispatch(getConceptDetail(item))
+        getTips: (item,noTips,noDetails,noNotify) => {
+            dispatch(getConceptDetail(item,noTips,noDetails,noNotify))
         },
         getBilling: () => {
             dispatch(billing())

+ 17 - 1
src/store/async-actions/pushMessage.js

@@ -127,7 +127,7 @@ export const billing = (mdata,boxMark) => {
 };
 
 //获取提示信息(静态信息)
-export const getConceptDetail = (item) => {
+export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
     return(dispatch, getState) => {
 
         const params ={
@@ -135,6 +135,9 @@ export const getConceptDetail = (item) => {
             position: item.position,
             type: item.type
         }
+        if(item.position == '1') { //点击i要展示详情和提示信息
+          params.position = 0
+        }
 
         json(api.getConceptDetail, params).then((res) => {
             if(res.data.code == '0'&& res.data.data.details && res.data.data.details.length > 0) {
@@ -161,6 +164,17 @@ export const getConceptDetail = (item) => {
                         });
                     }
                     document.getElementById("tipsMsg").scrollIntoView(true)
+                    //点击i同时打开详情弹窗 点击诊断名称不打开弹窗
+                    if(!noDetails) {
+                      dispatch({
+                        type: SET_TIPS_DETAILS,
+                        tipsDetails: res.data.data
+                      })
+                      dispatch({
+                        type: SHOW_TIPS_DETAILS
+                      })
+                    }
+                    
                 } else if(item.position == '5' || item.position == '6'){    //药品或不良反应说明
                     dispatch({
                         type: SET_DRUG_INFO,
@@ -173,7 +187,9 @@ export const getConceptDetail = (item) => {
                     })
                 }
             } else {
+              if(!noNotify) {
                 Notify.info('提示信息未维护')
+              }
             }
             
         })

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
-// const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚