Browse Source

说明书修改

zhangxc 6 years ago
parent
commit
50d2cce7bd

+ 2 - 2
src/components/Treat/AdverseReactions/index.jsx

@@ -46,7 +46,7 @@ class AdverseReactions extends Component {
 
 
     render() {
-        const { icon, titleStyle,titleBg, filter, title,  adversReactionList, showDrugInfo, setDrugInfo } = this.props
+        const { icon, titleStyle,titleBg, filter, title,  adversReactionList, setDrugInfo } = this.props
         const  { currentIndex, hasEnterImg } = this.state
         return(
             <div className={style['last-treat-wrapper']}>
@@ -68,7 +68,7 @@ class AdverseReactions extends Component {
                                     src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                     onMouseLeave = {this.handleMouseLeaveImg}
-                                    onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                                    onClick={this.setDrugInfo.bind(this, item)}/>}
                             </span>
                         </span>
                         

+ 2 - 2
src/components/Treat/DrugHistory/LastDrug/index.jsx

@@ -44,7 +44,7 @@ class LastDrug extends Component {
 
 
     render() {
-        const { icon, titleStyle,titleBg, filter, title, lastDrugList, showDrugInfo } = this.props
+        const { icon, titleStyle,titleBg, filter, title, lastDrugList } = this.props
         const  { currentIndex, hasEnterImg } = this.state
         return(
              <div className={style['last-common-box']}>
@@ -63,7 +63,7 @@ class LastDrug extends Component {
                                 src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                 onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                                onClick={this.setDrugInfo.bind(this, item)}/>}
                             {index == lastDrugList.length-1 ?  '' : <span>,</span>}
                         </span>
                     })}

+ 2 - 3
src/components/Treat/DrugTreat/index.jsx

@@ -67,10 +67,9 @@ class DrugTreat extends Component {
     }
     //搜索药品说明书(查看数据用)
     searchDrug() {
-        const { showDrugInfo, setDrugInfoMore } = this.props
+        const { setDrugInfoMore } = this.props
         const drugIdList = this.state.drugIdList.split(' ')
         setDrugInfoMore({drugIdList: drugIdList})
-        showDrugInfo && showDrugInfo();
     }
     
     showTreatDesc() {
@@ -110,7 +109,7 @@ class DrugTreat extends Component {
                                               src={currentIndex === index ? (ii === currentImg ? (hasEnterImg ? info3 : info2) : info2): info2} 
                                               onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}
                                               onMouseLeave = {this.handleMouseLeaveImg}
-                                              onClick={() =>{this.setDrugInfo(it);showDrugInfo();}}/>}
+                                              onClick={this.setDrugInfo.bind(this,it)}/>}
                                         </span>
                                         
                                         

+ 4 - 2
src/components/TreatDesc/DrugInfo/index.jsx

@@ -2,7 +2,9 @@ import React, { Component } from 'react';
 import style from './index.less';
 import close from './../img/close.png';
 import $ from "jquery";
-import {dragBox} from '@utils/tools'
+import {dragBox} from '@utils/tools';
+import { imageUrlPrefix } from '@utils/config.js';
+
 
 
 class DrugInfo extends Component {
@@ -61,7 +63,7 @@ class DrugInfo extends Component {
                     {drugInfo.drugDesc.map((item, index) =>{
                         return <div className={style['drug-desc-item']} id={item.title.trim()}>
                             <div className={style['drug-desc-title']} >{item.title.trim()}</div> 
-                            <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></div> 
+                            <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div> 
                         </div>
                     })}
                     <div className={style['content-menu-box']}>

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

@@ -62,7 +62,7 @@ class TreatDesc extends Component {
     }
 
     render(){
-        const  { treatment, treatDesc, setDrugInfo, showDrugInfo} = this.props
+        const  { treatment, treatDesc, setDrugInfo} = this.props
         const { title, basic, otherDrugIndex, drugDesc} = treatDesc
         const { currentIndex, hasEnterImg } = this.state
         return (treatment && treatment.length >0 && <div  className={style['treat-desc-box']}>
@@ -97,7 +97,7 @@ class TreatDesc extends Component {
                                 src={currentIndex === index ?  (hasEnterImg ? info3 : info2) : info2} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
                                 onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{setDrugInfo({name: item.medicitionName, type: 8, position: 5});showDrugInfo();}}
+                                onClick={() =>{setDrugInfo({name: item.medicitionName, type: 8, position: 5})}}
                                 />}
                         </span>              
                         

+ 1 - 3
src/containers/Treat.js

@@ -64,9 +64,7 @@ function mapDispatchToProps(dispatch) {
             })
         },
         showDrugInfo: () => {
-            dispatch({
-                type: SHOW_DRUG_INFO
-            })
+            
         },
         hideDrugInfo: () =>{
             dispatch({

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

@@ -1,6 +1,6 @@
 import { get, post, json } from "@utils/ajax";
 import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,SHOW_TABLE_LIST} from '@store/types/pushMessage';
-import { SET_DRUG_INFO } from '@store/types/treat';
+import { SET_DRUG_INFO, SHOW_DRUG_INFO } from '@store/types/treat';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
 import {storageLocal,getEMRParams} from '@utils/tools';
 import {SET_IMPORT_CHECKBODY_LABEL,PRESET} from "../types/checkBody";
@@ -143,6 +143,9 @@ export const getConceptDetail = (item) => {
                         name: item.name,
                         tagType: item.type
                     })
+                    dispatch({
+                        type: SHOW_DRUG_INFO
+                    })
                 }
             } else {
                 Notify.info('提示信息未维护')