瀏覽代碼

Merge branch 'dev/new1' into optimize

Luolei 6 年之前
父節點
當前提交
6b3bc09c33

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

@@ -1,96 +1,96 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime,getStatusImg } from '@utils/tools';
+import { normalVal, timestampToTime, getStatusImg } from '@utils/tools';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 class SlideExcel extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      show:false
+      show: false
     };
     this.toTime = this.toTime.bind(this)
     this.handleSlide = this.handleSlide.bind(this)
   }
-  toTime(time){
-    let tmpTim = time.split(',').join('')-0
-    if(time && tmpTim.toString() != 'NaN'){
+  toTime(time) {
+    let tmpTim = time.split(',').join('') - 0
+    if (time && tmpTim.toString() != 'NaN') {
       let date = new Date('1900-01-01');
       let dateTim = date.getTime();
-      let times = (tmpTim-2)*24*60*60*1000;
-      let result = timestampToTime(dateTim+times).split(' ')[0]
+      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
+      let result = timestampToTime(dateTim + times).split(' ')[0]
       return result;
-    }else{
+    } else {
       return time;
     }
   }
-  handleSlide(){
+  handleSlide() {
     let tmpShow = this.state.show
     this.setState({
-      show:!tmpShow
+      show: !tmpShow
     })
   }
   render() {
-    const {items,item,idx,getInfomation,dateTime} = this.props;
-    const {show} = this.state;
+    const { items, item, idx, getInfomation, dateTime } = this.props;
+    const { show } = this.state;
     return (
-      <li className={`${styles.excelDataLis} clearfix`} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
-          <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>
+      <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
+        <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>
-          <table className={styles.table}>
-             {  show ? (item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
-                  return <tr>
-                      <td style={{width:'30%'}}>
-                        <span className={styles.tagSpan}>
-                          {value.itemName}
-                          <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
-                        </span>
-                      </td>
-                      <td style={{width:'20%'}}>
-                        {
-                          getStatusImg(value.type,value.value,1)
-                        }
-                        {value.unit}</td>
-                      <td style={{width:'25%'}}>
-                          {normalVal(value.min,value.max)}
-                      </td>
-                      <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)}</td>
-                  </tr>
-                })):(item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
-                  if(idx < 4){
-                    return <tr>
-                        <td style={{width:'30%'}}>
-                          <span className={styles.tagSpan}>
-                            {value.itemName}
-                            <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
-                          </span>
-                        </td>
-                        <td style={{width:'20%'}}>
-                          {
-                            getStatusImg(value.type,value.value,1)
-                          } 
-                          {value.unit}</td>
-                        <td style={{width:'25%'}}>
-                            {normalVal(value.min,value.max)}
-                        </td>
-                        <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)}</td>
-                    </tr>
+        </span>
+        <table className={styles.table}>
+          {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            return <tr>
+              <td style={{ width: '30%' }}>
+                <span className={styles.tagSpan}>
+                  {value.itemName}
+                  <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                </span>
+              </td>
+              <td style={{ width: '20%' }}>
+                {
+                  getStatusImg(value.type, value.value, 1)
+                }
+                {value.unit}</td>
+              <td style={{ width: '25%' }}>
+                {normalVal(value.min, value.max)}
+              </td>
+              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+            </tr>
+          })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
+            if (idx < 4) {
+              return <tr>
+                <td style={{ width: '30%' }}>
+                  <span className={styles.tagSpan}>
+                    {value.itemName}
+                    <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  </span>
+                </td>
+                <td style={{ width: '20%' }}>
+                  {
+                    getStatusImg(value.type, value.value, 1)
                   }
-                }))
+                  {value.unit}</td>
+                <td style={{ width: '25%' }}>
+                  {normalVal(value.min, value.max)}
+                </td>
+                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + this.toTime(value.time)}</td>
+              </tr>
             }
+          }))
+          }
         </table>
         {
           item.lisExcelItem && item.lisExcelItem.length > 5 ?
-          <div className={styles.slides} onClick={this.handleSlide}>
+            <div className={styles.slides} onClick={this.handleSlide}>
               {
-                show ? <span>收起</span> :<span>剩余<span className={styles.num}>{item.lisExcelItem.length-4}</span>项</span>
+                show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
               }
-              <img src={show ?slideUp:slideDown} alt=""/>
-          </div>:null
+              <img src={show ? slideUp : slideDown} alt="" />
+            </div> : null
         }
       </li>
     );

+ 4 - 4
src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx

@@ -275,7 +275,7 @@ class PartTrd extends React.Component {
         return <React.Fragment>
           <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
             <span>{num ? '评分高或DDI阳性' : '评分低且DDI阴性'}</span>
-            <img onClick={() => { this.backSec() }} src={back} alt="" />
+            <img onClick={() => { this.backSec(true) }} src={back} alt="" />
           </div>
           {
             num ? <React.Fragment>
@@ -340,7 +340,7 @@ class PartTrd extends React.Component {
             }
           </ul>
           <h4>询问并立即服用负荷剂量的双抗药物(若未服用)</h4>
-          <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或 阿司匹林0.3g+替格瑞洛180mg( "心拯救"一包药)</p>
+          <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(急需手术)或 阿司匹林0.3g+替格瑞洛180mg( "心拯救")</p>
           <h4>患者发病时间!</h4>
           {
             trdShow ? <React.Fragment>
@@ -448,8 +448,8 @@ class PartTrd extends React.Component {
                 <h4>{trdFlg ? '立即服用负荷剂量的双抗药物(若未服用)' : '已排除NSTEMI-ACS ,请其他诊室会诊!'}</h4>
                 {
                   trdFlg ? <React.Fragment>
-                    <h4>询问并立即服用负荷剂量的双抗药物(若未服用)</h4>
-                    <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或 阿司匹林0.3g+替格瑞洛180mg("心拯救"一包药)</p>
+                    {/* <h4>询问并立即服用负荷剂量的双抗药物(若未服用)</h4> */}
+                    <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(急需手术)或 阿司匹林0.3g+替格瑞洛180mg("心拯救")</p>
                     <h4>判断患者危重程度</h4>
                     <ul className={`${styles.illDeep} clearfix`}>
                       <li className={currentIdx==0? styles.selectOn:''}>极高危患者</li>

+ 1 - 1
src/containers/PushItemsContainer.js

@@ -6,7 +6,7 @@ import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'
 import {billing, getAllConceptDetail} from '../store/async-actions/pushMessage';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 
-function mapStateToProps(state) {
+function mapStateToProps(state) {console.log(state)
   const {pushMessage,diagnosticList} = state;
         return {
         pushMessage: pushMessage,

+ 14 - 0
src/containers/TypeConfigContainer.js

@@ -2,6 +2,8 @@ import React from "react";
 import { connect } from "react-redux";
 import Banner from "../components/Banner";
 import { SHOW_CONFIG_MODAL, CLOSE_CONFIG_MODAL, CHANGE_TYPE, CONFIRM_TYPE } from "../store/types/typeConfig";
+import { BILLING_ADVICE} from '@store/types/pushMessage';
+
 import {pushAllDataList} from '@utils/tools';
 import {saveMode,getOtherHisRecord} from '@store/async-actions/fetchModules';
 import config from "@config/index";
@@ -49,6 +51,18 @@ function mapDispatchToProps(dispatch) {
           Notify.success("模式切换成功");
           dispatch(initItemList(confirmType));
           dispatch(allCheckedShow(false))    //全选反选显示重置
+          dispatch({//推送重置
+            type: BILLING_ADVICE,
+            determine:[],
+            doubt:[],
+            possible:[],
+            vigilant: [],
+            likely:[],
+            lab: [],
+            pacs:[],
+            setPushEmergency:[],
+            setPushEmergencyIdx:''
+          });
         }else{
           Notify.error(res.data.msg+",请稍后再试");
           //dispatch({type:MODE_CHANGE_FAIL,data:true});      //保存失败弹窗提示