luolei преди 4 години
родител
ревизия
c59ef3b5e5

BIN
src/components/DiagnosticList/img/singleB.png


BIN
src/components/DiagnosticList/img/singleL.png


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

@@ -5,8 +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 singleB from './img/singleB.png';
+import singleL from './img/singleL.png';
 import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
@@ -101,14 +101,10 @@ class DiagnosticList extends Component {
             delItem: item,
         })
     }
-    showTreat(item, index) {
-        // item.treatIndex = index
-        const  { showTreat, getTreatResult } = this.props;
-        getTreatResult && getTreatResult(item);
-        // showTreat && showTreat();//添加loading,移到async-actions中
-        this.setState({
-            treatTitle: item.name
-        })
+    showTreat(item, idx) {
+        const  { getTreatResult,getBilling } = this.props;
+        getTreatResult && getTreatResult(item,idx);
+        getBilling({mode:10});
     } 
     handleClickDiag(item) {
         const { getTips } = this.props;
@@ -161,7 +157,6 @@ class DiagnosticList extends Component {
             return
         }
         // let baseList = store.getState();
-        
         // let baseObj = items[this.state.activeHistory];
         // pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
         store.dispatch(getHistempDetail(activeItem));
@@ -319,12 +314,13 @@ class DiagnosticList extends Component {
                                           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>}
+                                    {/* {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'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
+                                          <img src={item.hasTreat?singleB:singleL} alt=""/>
                                           治疗方案
-                                    </span> */}
+                                    </span>
                                     {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估

+ 7 - 1
src/components/DiagnosticList/index.less

@@ -86,8 +86,14 @@
     color: #000;
     letter-spacing: 0;
     position: absolute;
-    right: 40px;
+    right: 100px;
     top: 11px;
+    img {
+        width: 15px;
+        position: relative;
+        top: 3px;
+        right: 5px;
+    }
 }
 .footer{
     .print{

+ 13 - 1
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -8,7 +8,7 @@ class MedicalAdvice extends Component {
   render() { 
     const {advice} = this.props
     // console.log(advice,'===========');
-    const {labelListBig,labelListSmall} = advice
+    const {labelListBig,labelListSmall,labelListBlood} = advice
     return ( 
         <tr className={style['patInfoFst']}>
           <td className={style['patInfoSec']}>医嘱:</td>
@@ -40,6 +40,18 @@ class MedicalAdvice extends Component {
                   )
                 })
               }
+              {
+              labelListBlood && labelListBlood.map((item, index) => {
+                  return (
+                    <tr>
+                      <td className={style.adviceTableTdFst}>{item.name}</td>
+                      <td className={style.assistTableTdTrd}>输血</td>
+                      <td className={style.assistTableTdSec}>{item.value}</td>
+                      <td className={style.assistTableTdFor}>{item.time}</td>
+                    </tr>
+                  )
+                })
+              }
             </table>
           </td>
         </tr>

+ 8 - 6
src/containers/DiagnosticList.js

@@ -1,7 +1,7 @@
 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 { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING,ADDDIAGMSG} 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';
@@ -12,7 +12,7 @@ import {autoFillModules} from '@store/async-actions/fetchModules';
 import {SET_ASSESS_DATA} from '@types/assessResult';
 import {didPushParamChange} from '@utils/tools';
 
-function mapStateToProps(state) {
+function mapStateToProps(state) {//console.log(state.diagnosticList)
     const {diagnosticList,assessResult,pushMessage } = state;
     let diagnC = diagnosticList.chronicMagItem;
     return {
@@ -88,10 +88,12 @@ function mapDispatchToProps(dispatch) {
                 type: SHOW_TREAT,
             })
         },
-        getTreatResult: (item) => {
-            // dispatch({type:MODI_LOADING,flag:true});
-            // dispatch({type:SHOW_LOADING,flag:true});
-            dispatch(getTreatResult(item));
+        getTreatResult: (item,idx) => {
+            dispatch({
+                type:ADDDIAGMSG,
+                item:item,
+                idx:idx
+            });
         },
         getTips: (item) => {
           dispatch(getAllConceptDetail(item))

+ 54 - 1
src/store/actions/diagnosticList.js

@@ -1,12 +1,65 @@
+export const addDiagMsg = (state, action) => {
+    const res = JSON.parse(JSON.stringify(state));
+    // console.log(98989889898898,action)
+    let tmpLis = res.diagnosticList
+    for(let i = 0;i < tmpLis.length;i++){
+        if(action.idx == i){
+            tmpLis[i].hasTreat = 1
+        }else{
+            tmpLis[i].hasTreat = 0
+        }
+    }
+    let obj = {
+        "dateValue": '',
+        "name": action.item.name,
+        "uniqueName": action.item.name
+    }
+    res.diagnosticList = [...tmpLis]
+    res.diseaseName = obj
+    return res;
+}
+
 export const addDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.diagnosticList.push(action.item)
+    let tmpLis = res.diagnosticList,num=0
+    for(let i = 0;i < tmpLis.length;i++){
+        if(!tmpLis[i].hasTreat){
+            ++num
+        }
+    }
+    if(num == tmpLis.length){
+        tmpLis[0].hasTreat = 1
+        let obj = {
+            "dateValue": '',
+            "name": tmpLis[0].name,
+            "uniqueName": tmpLis[0].name
+        }
+        res.diseaseName = obj
+    }
+    res.diagnosticList = [...tmpLis]
     return res;
 }
 
 export const delDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.diagnosticList = res.diagnosticList.filter(item => (item.conceptId !== action.item.conceptId || item.name !== action.item.name));
+    let tmpLis = res.diagnosticList,num=0
+    for(let i = 0;i < tmpLis.length;i++){
+        if(!tmpLis[i].hasTreat){
+            ++num
+        }
+    }
+    if(num == tmpLis.length){
+        tmpLis[0].hasTreat = 1
+        let obj = {
+            "dateValue": '',
+            "name": tmpLis[0].name,
+            "uniqueName": tmpLis[0].name
+        }
+        res.diseaseName = obj
+    }
+    res.diagnosticList = [...tmpLis]
     return res;
 }
 
@@ -61,7 +114,6 @@ export const getDiagnosticStr = (state, action) => {
     // res.diagnosticStr = diagnosticStr
     // 2020/09/07 lcq 本次版本没有初诊复诊字样
     res.diagnosticStr = diagnosticStrNoType
-
     return res;
 }
 
@@ -78,6 +130,7 @@ export const clearAllDiag = (state, action) => {
     res.mainSuitStr = action.mainSuitStr
     res.diagnosticStrNoType = action.saveText
     res.chronicMagItem = action.chronicMagItem
+    res.diseaseName = {}
     return res;
 }
 

+ 8 - 2
src/store/reducers/diagnosticList.js

@@ -19,6 +19,7 @@ import {
   ADD_TREAT,
   REDIAGDATA,
   CLEARDIAGDATA,
+  ADDDIAGMSG,
 } from '../types/diagnosticList';
 import {
   addDiagnostic,
@@ -38,6 +39,7 @@ import {
   hideHistoryCase,
   addTreat,
   reDiagData,
+  addDiagMsg
 } from '../actions/diagnosticList';
 
 const initState = {
@@ -47,13 +49,17 @@ const initState = {
     ],
     mainSuitStr:'',
     diagnosticStrNoType:'',
-    diagnosticStr:''
-
+    diagnosticStr:'',
+    diseaseName: {
+      
+    }
 }
 
 export default function (state=initState, action) {
     const res = Object.assign({},state);
     switch (action.type) {
+      case ADDDIAGMSG:
+        return addDiagMsg(state, action);
       case ADD_DIAGNOSTIC:
         return addDiagnostic(state, action);
       case DEL_DIAGNOSTIC:

+ 2 - 2
src/store/reducers/inspect.js

@@ -77,14 +77,14 @@ export default (state = initSearchList, action) => {
         let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 1){//大项
             tempArr = tempArr.filter((item,idx)=>{
-                if(action.tip == idx){
+                if(action.tip != idx){
                     return item
                 }
             })
             newState.labelListBig = [...tempArr]
         }else{//小项
             tempArrs = tempArrs.filter((item,idx)=> {
-                if(action.tip == idx){
+                if(action.tip != idx){
                     return item
                 }
             } )

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

@@ -20,4 +20,5 @@ export const ADD_TREAT = Symbol('ADD_TREAT') ;   //设置治疗
 
 
 export const REDIAGDATA = 'REDIAGDATA';
-export const CLEARDIAGDATA = 'CLEARDIAGDATA';
+export const CLEARDIAGDATA = 'CLEARDIAGDATA';
+export const ADDDIAGMSG = 'ADDDIAGMSG';

+ 1 - 1
src/utils/tools.js

@@ -951,7 +951,7 @@ function getEMRParams(){
     "family": filterDataArr(familyHistory.saveText)||'',  //家族史
     "marital": filterDataArr(marriageHistory.saveText)||'',  //婚育史
     "menstrual": filterDataArr(menstruationHistory.saveText)||'',  //月经史
-
+    "diseaseName":diagnosticList.diseaseName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",