zhouna преди 5 години
родител
ревизия
c6b3be0c3a

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

@@ -62,7 +62,7 @@ class DiagnosticItem extends Component{
         })
        
     }
-    getTips(item, e) {
+    getTips(item, e) {console.log(item)
         e.stopPropagation();
         const {getTips } = this.props;
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});

+ 26 - 13
src/components/DiagnosticList/index.jsx

@@ -18,6 +18,7 @@ import iconRadioDefault from '@common/images/icon-radio-default.png'
 import iconRadioActive from '@common/images/icon-radio-active.png'
 import AssessResult from '@containers/AssessResult';
 import {getAssessData} from '@store/async-actions/fetchModules';
+import DetailsModal from '@components/PushItems/DetailsModal';
 import tableIcon from '@common/images/table.png';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import $ from "jquery";
@@ -54,6 +55,7 @@ class DiagnosticList extends Component {
         this.referCase = this.referCase.bind(this);
         this.handleSaveAssess = this.handleSaveAssess.bind(this);       //评估弹窗确定
         this.onPrint = this.onPrint.bind(this);
+        this.hideTips=this.hideTips.bind(this);
     }
     onPrint() {
       let dom = $("#AssistResult");
@@ -108,10 +110,14 @@ class DiagnosticList extends Component {
             treatTitle: item.name
         })
     } 
-    handleClickDiag(item,noTips,noDetails,noNotify) {
+    handleClickDiag(item) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1},noTips,noDetails,noNotify);
+        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 0});
+    }
+    hideTips() {
+      const { hideTipsDetailsModal } = this.props;
+      hideTipsDetailsModal && hideTipsDetailsModal()
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
@@ -278,10 +284,11 @@ class DiagnosticList extends Component {
       })
     }
     render(){
-        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
+        const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
+      const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
         const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
-        let isChronic = false;      //是否要显示管理评估
+        //let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
                                footText="确定"
                                handlePrint={this.onPrint}
@@ -289,9 +296,9 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
-                        const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
+                        /*const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
-                        isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
+                        isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;*/
                         return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
                                     {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>}
@@ -300,7 +307,7 @@ class DiagnosticList extends Component {
                                        onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
                                        onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                     >
-                                      <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}} onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                      <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}}>
                                         {item.name}
                                       </span>
                                       <img className={`${style['info-img']}`}
@@ -318,27 +325,33 @@ class DiagnosticList extends Component {
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
                                     </span>
-                                    {isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
+                                    {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
-                                    </span>:''}
+                                    </span>:''}*/}
                                     <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
                         </div>)
                     })}
                      {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
-                     {showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
+                     {/*{showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
                                                title='管理和评估'
                                                icon={manageIcon}
                                                top={'3%'}
                                                bottom={'3%'}
                                                width={820}>
+
                        <AssessResult closeAssess={this.showAssessFn.bind(this)}
                                      disId={assessId}
                                      disName={disName}
                                      chronicMagItemName={list[0].name}
                                      isAssessConfirm={isAssessConfirm}
                                      ></AssessResult>
-                      </ComplexModal>:''}
+                      </ComplexModal>:''}*/}
+                    {showTipsDetails &&<DetailsModal
+                        showTipsDetails = {showTipsDetails}
+                        hideTips = {this.hideTips}
+                        showAllName = {showAllName}
+                        tipsDetails = {tipsDetails}/>}
                     <ConfirmModal visible={visible} 
                                   okText='删除' 
                                   cancelText='取消' 
@@ -348,13 +361,13 @@ class DiagnosticList extends Component {
                                   >
                                   <div className={style['del-msg']}>是否删除该诊断?</div> 
                     </ConfirmModal>
-                    <ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
+                    {/*<ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
                         <div className={style['confirm-info']}>是否引用往期病历</div> 
                     </ConfirmModal>
                     <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
                         {this.getHistoryCase()}
                         <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
-                    </ConfirmModal>
+                    </ConfirmModal>*/}
                     <Loading show={loading}/>
                 </div>
                

+ 1 - 1
src/containers/DiagnosticItem.js

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

+ 15 - 3
src/containers/DiagnosticList.js

@@ -2,9 +2,10 @@ import React from 'react';
 import { connect } from 'react-redux';
 import DiagnosticList from '@components/DiagnosticList';
 import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
+import {SHOW_TIPS_DETAILS,HIDE_TIPS_DETAILS} from '@store/types/pushMessage';
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
-import {embedPush, getConceptDetail,getMRAnalyse} from '../store/async-actions/pushMessage';
+import {embedPush, getAllConceptDetail, getConceptDetail, getMRAnalyse} from '../store/async-actions/pushMessage';
 import {keepPushData} from '@store/actions/tabTemplate';
 import { visibleHistory } from '@store/actions/historyTemplates'
 import {autoFillModules} from '@store/async-actions/fetchModules';
@@ -15,6 +16,7 @@ function mapStateToProps(state) {
     const {diagnosticList,assessResult,pushMessage } = state;
     let diagnC = diagnosticList.chronicMagItem;
     return {
+        pushMessage: pushMessage,
         list: diagnosticList.diagnosticList,
         treatment: state.treat.show,
         isFirst: diagnosticList.isFirst,
@@ -91,8 +93,18 @@ function mapDispatchToProps(dispatch) {
             // dispatch({type:SHOW_LOADING,flag:true});
             dispatch(getTreatResult(item));
         },
-        getTips: (item,noTips,noDetails,noNotify) => {
-            dispatch(getConceptDetail(item,noTips,noDetails,noNotify))
+        getTips: (item) => {
+          dispatch(getAllConceptDetail(item))
+        },
+        showTipsDetailsModal: () => {
+          dispatch({
+            type: SHOW_TIPS_DETAILS
+          })
+        },
+        hideTipsDetailsModal: () => {
+          dispatch({
+            type: HIDE_TIPS_DETAILS
+          })
         },
         getBilling: (obj) => {
           if (didPushParamChange()) {

+ 2 - 2
src/store/async-actions/pushMessage.js

@@ -175,7 +175,7 @@ export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
                     }
                     //document.getElementById("tipsMsg").scrollIntoView(true)
                     //点击i同时打开详情弹窗 点击诊断名称不打开弹窗
-                    if(!noDetails) {
+                    //if(!noDetails) {
                       dispatch({
                         type: SET_TIPS_DETAILS,
                         tipsDetails: res.data.data,
@@ -184,7 +184,7 @@ export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
                       dispatch({
                         type: SHOW_TIPS_DETAILS
                       })
-                    }
+                    //}
                     
                 } else if(item.position == '5' || item.position == '6'){    //药品或不良反应说明
                     dispatch({