فهرست منبع

Merge branch 'ChronicMag' into dev/new1

zhangxc 6 سال پیش
والد
کامیت
1773166008
35فایلهای تغییر یافته به همراه238 افزوده شده و 194 حذف شده
  1. 1 0
      src/common/components/ConfirmModal/index.less
  2. 18 0
      src/common/less/variables.less
  3. 8 10
      src/components/AssessResult/AssessHis/index.jsx
  4. 13 11
      src/components/AssessResult/ChartItem/index.jsx
  5. 1 1
      src/components/AssessResult/ScaleItem/index.jsx
  6. 1 1
      src/components/AssessResult/index.less
  7. 14 30
      src/components/ChronicInfo/index.jsx
  8. 15 22
      src/components/ChronicInfo/index.less
  9. 1 0
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  10. 1 0
      src/components/HistoryCaseContainer/index.jsx
  11. 2 2
      src/components/PreviewBody/index.jsx
  12. 37 33
      src/components/PushItems/DetailsModal/index.jsx
  13. 10 2
      src/components/PushItems/DetailsModal/index.less
  14. 1 1
      src/components/ScaleTableHis/index.jsx
  15. 9 12
      src/components/Treat/AdverseReactions/index.jsx
  16. 6 2
      src/components/Treat/AdverseReactions/index.less
  17. 0 4
      src/components/Treat/DrugTreat/index.jsx
  18. 2 0
      src/components/Treat/DrugTreat/index.less
  19. 1 0
      src/components/Treat/index.less
  20. 0 1
      src/components/TreatDesc/DrugInfo/index.jsx
  21. 1 0
      src/components/TreatDesc/DrugInfo/index.less
  22. BIN
      src/components/TreatDesc/img/packUp.png
  23. 2 2
      src/components/TreatDesc/index.jsx
  24. 1 0
      src/components/TreatDesc/index.less
  25. 2 0
      src/config/index.js
  26. 1 0
      src/containers/ChronicInfo.js
  27. 24 25
      src/containers/CurrentIll.js
  28. 8 6
      src/containers/DiagnosticList.js
  29. 23 23
      src/containers/MainSuit.js
  30. 17 0
      src/store/actions/treat.js
  31. 1 1
      src/store/async-actions/patInfo.js
  32. 0 1
      src/store/async-actions/treat.js
  33. 11 2
      src/store/reducers/treat.js
  34. 2 1
      src/store/types/treat.js
  35. 4 1
      src/utils/tools.js

+ 1 - 0
src/common/components/ConfirmModal/index.less

@@ -27,6 +27,7 @@
     right: 0px;
     width: 40px;
     height: 40px;
+    cursor: pointer;
 }
 
 .modal-content {

+ 18 - 0
src/common/less/variables.less

@@ -194,3 +194,21 @@
   -ms-user-select: none;
   user-select: none;
 }
+// 加入病历
+.add-record{
+  float: right;
+  cursor: pointer;
+  display: inline-block;
+  width: 99px;
+  height: 26px;
+  line-height: 26px;
+  text-align: center;
+  border: 1px solid #EAEDF1;
+  border-radius: 4px;
+  font-size: 12px;
+  img{
+    vertical-align: middle;
+    width: 12px;
+    margin:-3px 3px 0 0;
+  }
+}

+ 8 - 10
src/components/AssessResult/AssessHis/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import { Radio,ComplexModal} from '@commonComp';
+import { Radio,ComplexModal,Notify} from '@commonComp';
 import arrow from '@common/images/show.png';
 import arrowDown from '@common/images/close.png';
 import loadingIcon from '@common/images/loading.gif';
@@ -43,7 +43,7 @@ class AssessResultHis extends Component {
     }
   }
   handoutTypes(obj,item,i){
-    const {wholeAssess,wholeIndexs,chooseSelecteds,scaleResult,wholeResults} =obj;
+    const {wholeAssess,wholeIndexs,chooseSelecteds,scaleResult,wholeResults,wholeAssessText} =obj;
     const {getIndexData,inquiryDate,indexData,timeTypes} = this.props;
     const {chartTimeTypes} = this.state;
     const name = item.regionName+":";
@@ -57,6 +57,7 @@ class AssessResultHis extends Component {
                           formulaResult={scaleResult}
                           result={wholeResults}
                           disabled={true}
+                          text={wholeAssessText}
                           isRecommend={item.isRecommend}></ScaleItem>;
       case 1:     //数据来源于大数据
         return <ChooseItem title={name} data={list} selecteds={chooseSelecteds&&chooseSelecteds[i]} disabled={true}></ChooseItem>;
@@ -84,16 +85,13 @@ class AssessResultHis extends Component {
       return data===null||(data&&data.length==0)?<p className={style['no-data']}>没有历史评估记录!</p>:'';
     }
   }
-  /*componentDidMount(){
-    const indexTimeTypes = JSON.parse(JSON.stringify(this.props.indexTimeTypes));
-    console.log(indexTimeTypes)
-    this.setState({
-      chartTimeTypes:indexTimeTypes
-    });
-  }*/
   showScaleFn(item,pid){
     const { list,inquiryId } = this.props;
     const obj = list&&list[inquiryId];
+    if(!(obj.scaleInfo&&obj.scaleInfo[item.id])){
+      Notify.info("未保存该量表数据");
+      return ;
+    }
     if(item){
       this.setState({
         tableName:item.name,
@@ -117,7 +115,7 @@ class AssessResultHis extends Component {
     });
   }
   componentWillReceiveProps(next){
-    if(next.inquiryId!=this.props.inquiryId){
+    if(next.inquiryId!=this.props.inquiryId||!next.showHistoryCases){
       this.setState({
         showAssess:false
       });

+ 13 - 11
src/components/AssessResult/ChartItem/index.jsx

@@ -90,7 +90,7 @@ class ChartItem extends Component {
     for(let i in obj){
       arr.push(<Chart data={obj[i]} endDate={endDate} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
     }
-    return arr;
+    return arr.length>0?arr:<p style={{color:'#acacac'}}>该模块暂无数据</p>;
   }
   componentDidMount(){
     const {initFn,pindex} = this.props;
@@ -133,14 +133,14 @@ class Chart extends Component{
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
     let xAxisArr = [...xAxis];
-
     const interval = {
       week:23,
       month:4,
       sixMonth:9,
       year:60
     };
-    data&&data.map((it)=>{
+
+    data&&data.map((it,j)=>{
       let values=new Array();
       let name='';
       it&&it.creatTime.map((x,i)=>{
@@ -160,7 +160,12 @@ class Chart extends Component{
         name: it.itemName,
         type: 'line',
         data: values,
-        showAllSymbol:true
+        showAllSymbol:true,
+        symbol:config.chartSymbols[j%7],
+        symbolSize:7,
+        itemStyle:{
+          color:config.chartColors[j%7]
+        }
       });
     });
     // 指定图表的配置项和数据
@@ -172,16 +177,13 @@ class Chart extends Component{
         }
       },
       legend: {
-        type:'scroll',
-        /*formatter: function (name) {
-          return name.split("-")[name.split("-").length-1];
-        },*/
-        data:names,
+        show:false
+        /*data:names,
         padding:0,
-        itemHeight:16,
+        itemHeight:16,*/
       },
       grid:{
-        top:80
+        top:40
       },
       xAxis: {
         type: 'category',

+ 1 - 1
src/components/AssessResult/ScaleItem/index.jsx

@@ -186,7 +186,7 @@ class ScaleItem extends Component {
                                footer="true">
                       <table>
                         {it.content.details.map((item1,idd)=>{
-                          if(item1.controlType==1){//单选
+                          if(item1.controlType==1||item1.controlType==3){//单选
                             return <tr>
                               <td>
                                 <span>{'请选择'+item1.name+':'}</span>

+ 1 - 1
src/components/AssessResult/index.less

@@ -85,7 +85,7 @@
   }
   .time-range{
     position: absolute;
-    bottom: 180px;
+    bottom: 224px;
     /*top: 26px;*/
     z-index: 2;
     width: 100%;

+ 14 - 30
src/components/ChronicInfo/index.jsx

@@ -294,7 +294,7 @@ class ChronicInfo extends React.Component{
     }
   }
   getDetail(){
-    const {data,indexs,formulaResult} = this.props;
+    const {data,indexs,formulaResult,calcuResult} = this.props;
     const {formulaId,optionId,possible,radioVal,isFormulaConfirm} = this.state;
     let list = data&&data.map((v,i)=>{
                     return <div className={style["list"]}>
@@ -326,7 +326,8 @@ class ChronicInfo extends React.Component{
                                 }
                               </p>
                         }else if(it.type==2){
-                          const result = it.content.result&&it.content.result[1]&&it.content.result[1].text;
+                          const cres = calcuResult&&calcuResult[v.id]||it.content.result;
+                          const result = cres&&cres[1]&&cres[1].text;
                           return <div className={style["marTop"]}>
                             <span className={style["limit"]}>
                               计算公式结果:
@@ -349,13 +350,13 @@ class ChronicInfo extends React.Component{
                                 footer="true">
                                 <table>
                                 {it.content.details.map((item,idd)=>{
-                                    if(item.controlType==1){//单选
+                                    if(item.controlType==3||item.controlType==1){//单选
                                       return <tr>
                                         <td>
                                           <span>{'请选择'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          {item.details.map((ii,ind)=>{
+                                          {Array.isArray(item.details)&&item.details.map((ii,ind)=>{
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
                                                              isSelect={ii.state == 1}
@@ -365,8 +366,6 @@ class ChronicInfo extends React.Component{
                                           })}
                                         </td>  
                                       </tr>
-                                    }else if(item.controlType==1){//多选
-
                                     }else if(item.controlType==2){//输入框
                                       return <tr>
                                         <td>
@@ -379,24 +378,6 @@ class ChronicInfo extends React.Component{
                                           <span>{item.uint}</span>
                                         </td>
                                         
-                                      </tr>
-                                    }else if(item.controlType==3){//下拉
-                                      return <tr>
-                                        <td>
-                                          <span>{'请选择'+item.name+':'}</span>
-                                        </td>
-                                        <td>
-                                          {item.details.map((ii,ind)=>{
-                                            return <div className={style["chooseItem"]}>
-                                                    <Radio label={ii.detailName}
-                                                            // isSelect={radioVal[i]==ii.detailName}
-                                                            isSelect={ii.state == 1}
-                                                            handleClick={this.handleForRadio.bind(this,ii,v,i)}>
-                                                    </Radio>
-                                                  </div>
-                                          })}
-                                        </td>
-                                        
                                       </tr>
                                     }
                                 })}
@@ -504,15 +485,18 @@ class ChronicInfo extends React.Component{
               <div className={style["content"]}> 
                   {this.getDetail()}
               </div>
-              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={400} width={400}>
+              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
                       <ul className={style['toast-cont']}>
                         {tableList&&tableList.map((v,i)=>{
                           return <li>
-                          <span>
-                            <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
-                            {/*{formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}*/}
-                            {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
-                          </span>
+                            <span className={style["scaleName"]}>
+                              <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
+                              {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
+                            </span>
+                            <span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
+                              <img src={add} />
+                              加入病历记录
+                            </span>
                           </li>
                         })}
                       </ul>

+ 15 - 22
src/components/ChronicInfo/index.less

@@ -1,3 +1,4 @@
+@import "~@less/variables.less";
 .tips{
   border:1px solid #EAEDF1;
   .tips-title,h1{
@@ -72,23 +73,9 @@
           display: inline-block;
           width: 73%;
         }
-        .listResult,.addResult{
-          float: right;
-          cursor: pointer;
-          display: inline-block;
-          width: 99px;
-          height: 26px;
-          line-height: 26px;
-          text-align: center;
-          border: 1px solid #EAEDF1;
-          border-radius: 4px;
-          font-size: 12px;
-          img{
-            vertical-align: middle;
-            width: 12px;
-            margin:-3px 3px 0 0;
-          }
-        }
+         .listResult,.addResult{
+          .add-record;
+        } 
         .addResult{
           color: #3B9ED0;
           text-align: left;
@@ -137,7 +124,7 @@
         color:#3B9ED0;
         cursor: pointer;
       }
-      .mainList{
+      /* .mainList{
         .listBtn{
           display: inline-block;
           width: 96px;
@@ -174,7 +161,7 @@
             }
           }
         }
-      }
+      } */
       .infoOption{
         padding: 20px 0;
       }
@@ -209,10 +196,9 @@
     .toast-cont{
       line-height: 24px;
       font-size: 14px;
-      // margin-top: 15px;
-      height: 325px;
+      height: 370px;
       overflow-y: auto;
-      padding: 10px 0 0 10px;
+      padding: 10px;
       li{
         margin-top: 10px;
         cursor: pointer;
@@ -221,6 +207,13 @@
         color:#3B9ED0;
         margin-left: 10px;
       }
+      .scaleName{
+        display: inline-block;
+        max-width: 290px;
+      }
+      .listResult{
+        .add-record;
+      }
     }
     .footer{
       .print{

+ 1 - 0
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -75,6 +75,7 @@ class HistoryCaseContainer extends React.Component {
                         baseObj == undefined || JSON.stringify(baseObj) == "{}" ? null :
                         <PreviewBody
                             preInfo={preInfo}
+                            showHistoryCases={this.props.showHistoryCases}
                             dataJson={dataJson}
                             baseObj={baseObj}
                             dataStr={dataStr.length > 0?getAllDataStringList(dataStr):[]}

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

@@ -38,6 +38,7 @@ class HistoryCaseContainer extends React.Component {
                 <div className={styles.maskHistory} onClick={showHistoryBox}></div>
                 <HistoryList 
                     items={items}
+                    showHistoryCases={showHistoryCases}
                     activeHistory={activeHistory}
                     showHistoryBox={showHistoryBox}
                     handleCaseClick={handleCaseClick}

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

@@ -73,7 +73,7 @@ class PreviewBody extends Component {
     }
   }
   render() {
-    const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn} = this.props;
+    const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
     const other_yjs = filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other);
     const noData = JSON.stringify(preInfo) == '{}';
     const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
@@ -226,7 +226,7 @@ class PreviewBody extends Component {
           </tr>
         </table>
         <p style={{textAlign:'right',marginTop:'15px'}}>医生签名:<span style={{minWidth: '60px',padding: '0 5px 2px 5px',borderBottom: '1px solid #333',}}>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
-        {showAssessBtn?<AssessResultHis isChronic={isChronic?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
+        {showAssessBtn?<AssessResultHis showHistoryCases={showHistoryCases} isChronic={isChronic?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
         
         <div onClick={() => { this.surePrint(dataStr) }} style={{
           display: show ? 'inline-block' : 'none',

+ 37 - 33
src/components/PushItems/DetailsModal/index.jsx

@@ -53,44 +53,48 @@ class DetailsModal extends Component {
     render() {
         const {showTipsDetails, tipsDetails} = this.props;
         const { currentIndex } = this.state
-        const domNode = document.getElementById('root');
-        return showTipsDetails && ReactDOM.createPortal(
-          <div className={styles['details-wrapper']}>
-           <div className={styles['details-content-wrapper']} id="detailsContentWrap">
-                <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && tipsDetails.tagName} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
-                <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
-                    {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
-                        return (<div id={item.title}>
-                            <div className={styles['details-content-title-box']} >
-                                <span className={styles['details-content-title-name']}>{item.title}</span>
-                                <div className={styles['details-content-title-line']}></div>
-                            </div>
-                            <div dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div>
-                        </div>)
-                    })}
-                    
-                </div>
-                <div className={styles['content-menu-box']}>
-                    <div className={styles['content-menu']}>
-                        {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
-                                return (<div>
-                                    <div className={styles['details-menu-title-box']}>
-                                        {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
-                                        <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                            <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
-                                        </span>
+      return <NewPortal visible = {showTipsDetails}>
+
+                <div className={styles['details-wrapper']}>
+                    <div className={styles['details-content-wrapper']} id="detailsContentWrap">
+                        <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && tipsDetails.tagName} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
+                        <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
+                            {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                                return (<div id={item.title}>
+                                    <div className={styles['details-content-title-box']} >
+                                        <span className={styles['details-content-title-name']}>{item.title}</span>
+                                        <div className={styles['details-content-title-line']}></div>
                                     </div>
+                                    <div dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div>
                                 </div>)
                             })}
+                            
+                        </div>
+                        <div className={styles['content-menu-box']}>
+                            <div className={styles['content-menu']}>
+                                {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                                        return (<div>
+                                            <div className={styles['details-menu-title-box']}>
+                                                {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
+                                                <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
+                                                    <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                                </span>
+                                            </div>
+                                        </div>)
+                                    })}
+                            </div>
+                        </div>
+                            
+                    </div>
+                    <div className={styles['details-mask']} onClick={this.hideTips}>
                     </div>
                 </div>
-               
-           </div>
-           <div className={styles['details-mask']} onClick={this.hideTips}>
-           </div>
-        </div>,
-          domNode
-      )
+
+
+      </NewPortal>
+      
+      
+      
     }
 }
 

+ 10 - 2
src/components/PushItems/DetailsModal/index.less

@@ -54,6 +54,7 @@
 .details-close {
     position: absolute;
     right: 0;
+    cursor: pointer;
 }
 .details-content {
     position: relative;
@@ -64,12 +65,19 @@
 .content-menu-box {
     position: absolute;
     top: 50px;
-    right: -20px;
-    width: 200px;
+    right: 20px;
+    width: 160px;
     height: 80%;
+    overflow: hidden;
+    
+}
+.content-menu-wrapper {
+    width: 200px;
+    height: 100%;
     overflow-y: auto;
 }
 .content-menu {
+    
     background: #eee;
     border: 1px solid #eee;
     width: 160px;

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

@@ -81,7 +81,7 @@ class ScaleTableHis extends React.Component{
   }
 
   render(){
-    const {title,data,result} = this.props;console.log(this.props)
+    const {title,data,result} = this.props;
     const scale = data && this.filterScale(data);
     const datas = scale && scale.content && JSON.parse(scale.content);
     const scaleResult = datas; //量表计算结果

+ 9 - 12
src/components/Treat/AdverseReactions/index.jsx

@@ -19,9 +19,6 @@ class AdverseReactions extends Component {
         this.props.changeReact(it, index);
     }
     handleMouseEnterDrug(index, item) {
-        const drugNameWidth = parseInt($('#'+item.id)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-8
-        $('#'+item.id).find('img').css('left', imgLeft)
         this.setState({
             currentIndex: index,
         })
@@ -61,19 +58,19 @@ class AdverseReactions extends Component {
                     <span className={style['last-treat-name-box']}
                         
                     >   
-                        <span   id={item.id} 
+                        <span   
                                 className={style['last-treat-big-name-box']} 
                                 onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item)}
                                 onMouseLeave = {this.handleMouseLeaveDrug}
                         >
-                            {item.tagName}:
-                            {<img className={style['info-img']}  
-                                style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
-                                src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
-                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
-                                onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
-                        
+                            <span className={style['last-treat-big-name']} >{item.tagName}:
+                                {<img className={style['info-img']}  
+                                    style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
+                                    src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
+                                    onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                    onMouseLeave = {this.handleMouseLeaveImg}
+                                    onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                            </span>
                         </span>
                         
                     </span>

+ 6 - 2
src/components/Treat/AdverseReactions/index.less

@@ -35,11 +35,15 @@
 .info-img {
     position: absolute;
     width: 15px;
-    position: absolute;
-    top: -8px;
+    top: -15px;
+    left: 50%;
+    margin-left: -8px;
 }
 .last-treat-big-name-box {
     display: inline-block;
     
 }
+.last-treat-big-name {
+    position: relative;
+}
 

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

@@ -28,9 +28,6 @@ class DrugTreat extends Component {
         selectDrug && selectDrug(index,ii);
     }
     handleMouseEnterDrug(ii, index, it) {
-        const drugNameWidth = parseInt($('#'+it.medicitionName)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-10
-        $('#'+it.medicitionName).find('img').css('left', imgLeft)
         this.setState({
             currentIndex: index,
             currentImg: ii
@@ -99,7 +96,6 @@ class DrugTreat extends Component {
                                         {ii === 0 ? '' : ', '}
                                         <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
-                                              id={it.medicitionName}
                                               className={style['drug-name-wrapper']} 
                                         >
                                             <span className={style['drug-name']}  

+ 2 - 0
src/components/Treat/DrugTreat/index.less

@@ -35,6 +35,8 @@
     width: 15px;
     position: absolute;
     top: -15px;
+    left: 50%;
+    margin-left: -7px;
 }
 .info-flag {
     display: inline-block;

+ 1 - 0
src/components/Treat/index.less

@@ -19,6 +19,7 @@
   z-index:9999;
   top: 0;
   right: 0;
+  cursor: pointer;
 }
 .treat-mask {
     position: fixed;

+ 0 - 1
src/components/TreatDesc/DrugInfo/index.jsx

@@ -53,7 +53,6 @@ class DrugInfo extends Component {
     render() {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
         const { currentIndex } = this.state
-        {console.log('drugInfodrugInfo', drugInfo)}
         return (<div className={style['drug-info-wrapper']} id="drugWrapper">
                 <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
                 <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h3>

+ 1 - 0
src/components/TreatDesc/DrugInfo/index.less

@@ -39,6 +39,7 @@
     top: 0;
     z-index: 9999;
     width: 40px;
+    cursor: pointer;
 }
 .drug-desc-item {
     zoom: 1;

BIN
src/components/TreatDesc/img/packUp.png


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

@@ -6,7 +6,7 @@ import info from './img/info.png';
 import info1 from './img/info1.png';
 import info2 from './img/info2.png';
 import info3 from './img/info3.png';
-
+import packUp from './img/packUp.png';
 
 class TreatDesc extends Component {
     constructor(props){
@@ -78,7 +78,7 @@ class TreatDesc extends Component {
                     
                 </div> } */}
                 { otherDrugIndex > -1 && <div  className={style['similar-drug']}>
-                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].drugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={close} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
+                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].bigdrugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={packUp} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
                     {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
                         return (<span >
                         {index === 0 ? '' : ', '}     

+ 1 - 0
src/components/TreatDesc/index.less

@@ -31,6 +31,7 @@
 .close-drug-desc {
     position: absolute;
     right: 0px;
+    cursor: pointer;
 }
 .similar-drug-box {
     display: none;

+ 2 - 0
src/config/index.js

@@ -55,6 +55,8 @@ export default {
       age:"岁",
     },
     chartDismen:'year',   //评估图表默认维度:近1年year,近6个月sixMonth,近1个月month,近1周week
+    chartSymbols:['emptyCircle' , 'rect', 'arrow', 'triangle', 'diamond','circle', 'pin', 'roundRect'],
+    chartColors:['#3B9ED0','#F50933', '#F99903', '#66CB33', '#91c7ae','#749f83',  '#ca8622'],
     showCheckNum:16,        //查体默认展开非自由文本标签的个数
     radioOptionPer:'()',     //单选项输入占位符
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字

+ 1 - 0
src/containers/ChronicInfo.js

@@ -23,6 +23,7 @@ function mapStateToProps(state){
     formulaResult:pushMessage.formulaResult, //量表信息
     indexs:assessResult.wholeIndexs,
     wholeResults:assessResult.wholeResults,     //整体评估可能结果
+    calcuResult:pushMessage.calcuResult
   }
 }
 

+ 24 - 25
src/containers/CurrentIll.js

@@ -13,36 +13,35 @@ import {didPushParamChange} from '@utils/tools.js';
 
 
 function mapStateToProps(state) { //console.log(111,state);
-  const {homePage} = state;
+  const {homePage,currentIll,mainSuit,diagnosticList} = state;
     return {
-        data:state.currentIll.data,//主诉模板
-        emptyData:state.currentIll.emptyData,//空模板
-        searchData:state.currentIll.searchDatas,//搜索结果
-        focusIndex:state.currentIll.focusIndex,
-        processModule:state.currentIll.processModule,//病程变化模板
+        data:currentIll.data,//主诉模板
+        emptyData:currentIll.emptyData,//空模板
+        searchData:currentIll.searchDatas,//搜索结果
+        focusIndex:currentIll.focusIndex,
+        processModule:currentIll.processModule,//病程变化模板
         showArr:homePage.showDrop,
-        span:state.currentIll.span,
-        update:state.currentIll.update,//用于更新
-        mainText:state.mainSuit.saveText,//主诉选中的数据
-        mainData:state.mainSuit.data,//主诉使用的模板
-        symptomFeature:state.mainSuit.symptomFeature,//主诉分词数据
-        moduleNum:state.mainSuit.moduleNum,//主诉使用的模板
+        span:currentIll.span,
+        update:currentIll.update,//用于更新
+        mainText:mainSuit.saveText,//主诉选中的数据
+        mainData:mainSuit.data,//主诉使用的模板
+        symptomFeature:mainSuit.symptomFeature,//主诉分词数据
+        moduleNum:mainSuit.moduleNum,//主诉使用的模板
         type: state.typeConfig.typeConfig,
-        mainIds:state.mainSuit.mainIds,//主诉症状选中的id(去重用)
-        fillInfo: state.fillInfo,
+        mainIds:mainSuit.mainIds,//主诉症状选中的id(去重用)
         showArr:homePage.showDrop,
         totalHide: homePage.totalHide,
-        saveText:state.currentIll.saveText,
-        selecteds:state.currentIll.selecteds,       //普通多选选中状态
-        editClear:state.currentIll.editClear,
-        symptomIds:state.currentIll.symptomIds,//症状id,去重用
-        isRead:state.homePage.isRead,
-        fuzhen:state.diagnosticList.mainSuitStr,//诊断第一个复诊值
-        boxTop:state.homePage.boxTop,
-        boxLeft:state.homePage.boxLeft,
-        allModules:state.homePage.allModules,
-        // isChronic:!!state.diagnosticList.chronicMagItem,
-        isChronic:state.mainSuit.chronicDesease,
+        saveText:currentIll.saveText,
+        selecteds:currentIll.selecteds,       //普通多选选中状态
+        editClear:currentIll.editClear,
+        symptomIds:currentIll.symptomIds,//症状id,去重用
+        isRead:homePage.isRead,
+        fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
+        boxTop:homePage.boxTop,
+        boxLeft:homePage.boxLeft,
+        allModules:homePage.allModules,
+        // isChronic:!!diagnosticList.chronicMagItem,
+        isChronic:mainSuit.chronicDesease&&mainSuit.chronicDesease.name?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
 
     }
 }

+ 8 - 6
src/containers/DiagnosticList.js

@@ -13,15 +13,17 @@ import { initItemList } from '@store/async-actions/historyTemplates';
 import {MODI_LOADING} from '@store/types/homePage.js';
 
 function mapStateToProps(state) {
+    const {diagnosticList} = state;
+    let diagnC = diagnosticList.chronicMagItem;
     return {
-        list: state.diagnosticList.diagnosticList,
+        list: diagnosticList.diagnosticList,
         treatment: state.treat.show,
-        isFirst: state.diagnosticList.isFirst,
-        diagnosticStr: state.diagnosticList.diagnosticStr,
-        showReferRecord: state.diagnosticList.showReferRecord,
-        showHistoryCase: state.diagnosticList.showHistoryCase,
+        isFirst: diagnosticList.isFirst,
+        diagnosticStr: diagnosticList.diagnosticStr,
+        showReferRecord: diagnosticList.showReferRecord,
+        showHistoryCase: diagnosticList.showHistoryCase,
         items:state.historyTemplates.items,
-        chronicMagItem: state.diagnosticList.chronicMagItem,
+        chronicMagItem: diagnC&&diagnC.name?diagnC:state.mainSuit.chronicDesease,
         typeConfig: state.typeConfig.typeConfig,
     }
 }

+ 23 - 23
src/containers/MainSuit.js

@@ -17,33 +17,33 @@ import {SET} from '@types/checkBody';
 import {SHOW_REFER_RECORD} from '@store/types/diagnosticList';
 
 function mapStateToProps(state) {//console.log(11,state);
+  const {mainSuit,homePage,diagnosticList} = state;
   return {
-    showDrop:state.mainSuit.showDrop,//用于更新
-    update:state.mainSuit.update,
-    CommonSymptoms:state.mainSuit.CommonSymptoms,//常见症状
-    datas:state.mainSuit.data,//数据源
-    selecteds:state.mainSuit.selecteds,//数据源
-    saveText:state.mainSuit.saveText,
-	  searchData:state.mainSuit.searchDatas,//搜索结果
+    showDrop:mainSuit.showDrop,//用于更新
+    update:mainSuit.update,
+    CommonSymptoms:mainSuit.CommonSymptoms,//常见症状
+    datas:mainSuit.data,//数据源
+    selecteds:mainSuit.selecteds,//数据源
+    saveText:mainSuit.saveText,
+	  searchData:mainSuit.searchDatas,//搜索结果
     type: state.typeConfig.typeConfig,
-    fillInfo: state.fillInfo,
-    showArr:state.homePage.showDrop,
-    totalHide:state.homePage.totalHide,
-    focusIndex:state.mainSuit.focusIndex,
-    fuzhen:state.diagnosticList.mainSuitStr,//诊断第一个复诊值
-    span:state.mainSuit.span,
-    editClear:state.mainSuit.editClear,
-    clearAction:state.mainSuit.clearAction,//清除
-    mainIds:state.mainSuit.mainIds,//选中症状的id,搜索去重用
-    isRead:state.homePage.isRead,
-    commSymHide:state.homePage.commSymHide,
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
+    showArr:homePage.showDrop,
+    totalHide:homePage.totalHide,
+    focusIndex:mainSuit.focusIndex,
+    fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
+    span:mainSuit.span,
+    editClear:mainSuit.editClear,
+    clearAction:mainSuit.clearAction,//清除
+    mainIds:mainSuit.mainIds,//选中症状的id,搜索去重用
+    isRead:homePage.isRead,
+    commSymHide:homePage.commSymHide,
+    boxTop:homePage.boxTop,
+    boxLeft:homePage.boxLeft,
     currentData:state.currentIll.data,
-    allModules:state.homePage.allModules,
-    chronicDesease:state.mainSuit.chronicDesease,
+    allModules:homePage.allModules,
+    chronicDesease:mainSuit.chronicDesease&&mainSuit.chronicDesease.name?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
     items:state.historyTemplates.items,
-    showHisBox:state.mainSuit.showHisBox,
+    showHisBox:mainSuit.showHisBox,
   }
 }
 

+ 17 - 0
src/store/actions/treat.js

@@ -11,7 +11,21 @@ export const hideTreat = (state, action) => {
     return res
 }
 
+//关闭弹窗时清除部分治疗方案
 export const clearTreat = (state, action) => {
+    const res = Object.assign({}, state);
+    res.generalTreat = '';
+    res.surgeryTreat = '';
+    res.drugHistory = {};
+    res.treatment = [];
+    res.adversReactionList=[];
+    res.hasFollowUp = false;
+    res.followUp = '';
+    return res
+}
+
+//清除全部治疗方案
+export const clearAllTreat = (state, action) => {
     const res = Object.assign({}, state);
     res.generalTreat = '';
     res.surgeryTreat = '';
@@ -21,9 +35,12 @@ export const clearTreat = (state, action) => {
     res.hasFollowUp = false;
     res.followUp = '';
     res.followUpList = [];
+    res.adversReactionList = [];
+    res.allAdversReactionList = [];
     return res
 }
 
+
 export const setTreatment = (state, action) => {
     const res = Object.assign({}, state);
     res.treatment = action.treatment;

+ 1 - 1
src/store/async-actions/patInfo.js

@@ -62,7 +62,7 @@ export const initHistoryDetails = (dispatch) => {
                 dispatch({type:MODI_LOADING,flag:false});
             } else {
                 dispatch({type:MODI_LOADING,flag:false});
-                console.log(res)
+                // console.log(res)
             }
         })
     }

+ 0 - 1
src/store/async-actions/treat.js

@@ -390,7 +390,6 @@ export const commonTreatAddToAdvice = () => {
                 type: SET_COMMONTREATMENT,
                 commontreatment: state.treat.treatItem.treat.commonTreatment.text
             })
-            console.log('state.treat.followUp', state.treat.followUp)
             dispatch({
                 type: SAVE_FOLLOW_UP,
                 followUp: state.treat.followUp

+ 11 - 2
src/store/reducers/treat.js

@@ -1,5 +1,12 @@
-import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, SET_SURGERY_TREAT, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST,IS_FIRST_MAIN_DIAG,CLEAR_FIRST_MAIN_DIAG ,SET_ADVERSE_REACTIONS, SET_ALL_ADVERSE_REACTIONS,CHANGE_REACT, DEL_REACT, SET_FOLLOW_UP, DEL_FOLLOW_UP, SET_ALL_FOLLOW_UP } from '../types/treat'
-import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, setRecommendBasic, setDrugInfoList, isFirstMainDiag, clearFirstMainDiag, setAdverseReactions, setALLAdverseReactions, changeReact ,delReact, setFollwUp, delFollowUp, setAllFollowUp } from '../actions/treat'
+import { SELECT_DRUG, SET_TREAT_INFO, SET_OTHER_DRUG, SET_DRUG_INFO, CLEAR_DRUG_INFO,SHOW_TREAT, 
+        HIDE_TREAT, CLEAR_TREAT, SHOW_DRUG_INFO, HIDE_DRUG_INFO, SET_GENERAL_TREAT, SET_TREATMENT, 
+        SET_SURGERY_TREAT, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST,IS_FIRST_MAIN_DIAG,CLEAR_FIRST_MAIN_DIAG ,
+        SET_ADVERSE_REACTIONS, SET_ALL_ADVERSE_REACTIONS,CHANGE_REACT, DEL_REACT, SET_FOLLOW_UP, 
+        DEL_FOLLOW_UP, SET_ALL_FOLLOW_UP, CLEAR_ALL_TREAT } from '../types/treat'
+import { selectDrug, setTreatInfo, setOtherDrug, setDrugInfo, clearDrugInfo, showTreat, hideTreat, 
+        clearTreat, showDrugInfo, hideDrugInfo, setTreatment, setGeneralTreat, setSurgeryTreat, 
+        setRecommendBasic, setDrugInfoList, isFirstMainDiag, clearFirstMainDiag, setAdverseReactions, 
+        setALLAdverseReactions, changeReact ,delReact, setFollwUp, delFollowUp, setAllFollowUp, clearAllTreat } from '../actions/treat'
 const initState = {
     show: false, //治疗方案显示隐藏
     showDrugInfo: false, //药品信息显示隐藏
@@ -319,6 +326,8 @@ export default function(state=initState, action){
             return delFollowUp(state, action);
         case SET_ALL_FOLLOW_UP: 
             return setAllFollowUp(state, action);
+        case CLEAR_ALL_TREAT: 
+            return clearAllTreat(state, action);
         default:
             return state
     }

+ 2 - 1
src/store/types/treat.js

@@ -4,7 +4,8 @@ export const SET_DRUG_INFO = 'SET_DRUG_INFO'; //设置药品说明
 export const CLEAR_DRUG_INFO = 'CLEAR_DRUG_INFO'; //清除药品说明
 export const SHOW_TREAT = 'SHOW_TREAT';
 export const HIDE_TREAT = 'HIDE_TREAT';
-export const CLEAR_TREAT = 'CLEAR_TREAT'; //清除治疗方案内容
+export const CLEAR_TREAT = 'CLEAR_TREAT'; //关闭时清除推送过来治疗方案内容
+export const CLEAR_ALL_TREAT = 'CLEAR_ALL_TREAT'; //关闭时清除推送过来治疗方案内容
 export const SHOW_DRUG_INFO = 'SHOW_DRUG_INFO';
 export const HIDE_DRUG_INFO = 'HIDE_DRUG_INFO';
 export const SET_GENERAL_TREAT = 'SET_GENERAL_TREAT'; //设置一般治疗

+ 4 - 1
src/utils/tools.js

@@ -8,7 +8,7 @@ import {clearAllLabel,addLabel} from '@store/actions/inspect';
 import {CLEAR_ALL_DIAG} from '@store/types/diagnosticList';
 import {CLEAR_ALL_PUSH_MESSAGE, SET_TIPS} from '@store/types/pushMessage';
 import {ISREAD, SETREADDITEMS} from "../store/types/homePage";
-import {CLEAR_FIRST_MAIN_DIAG} from "../store/types/treat";
+import {CLEAR_FIRST_MAIN_DIAG, CLEAR_ALL_TREAT} from "../store/types/treat";
 import {tabChange} from '@store/actions/tabTemplate';
 import config from '@config/index.js';
 
@@ -269,6 +269,9 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
           type:CLEAR_FIRST_MAIN_DIAG,
           flag:true
         });
+        store.dispatch({
+          type: CLEAR_ALL_TREAT,
+        })
         storageLocal.remove('emrParam');
        // Notify.success('页面已清空')
     }else{