Browse Source

bug2464,2463,2449

luolei 5 năm trước cách đây
mục cha
commit
f7dfafc684

+ 30 - 25
src/components/AddAssistCheck/index.jsx

@@ -3,7 +3,8 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
-import { getPageCoordinate,getCurrentDate,setPosition,windowEventHandler } from '@utils/tools';
+import AssistName from './AssistName';
+import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
@@ -37,28 +38,29 @@ class AddAssistCheck extends React.Component {
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
-        if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
-          if (this.state.show) {
-            this.props.setHighter(48)
+          if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+            if (this.state.show) {
+              this.props.setHighter(48)
+            }
+            this.setState({show: false});
+          }
+          if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
+            this.setState({date: false});
+          }
+          if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
+            this.setState({date: false});
+          }
+        if(_del){
+          if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+            this.setState({
+              visible: false,
+              id: null,
+              activeName:''
+            })
           }
-          this.setState({show: false});
-        }
-        if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
-          this.setState({date: false});
-        }
-        if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
-          this.setState({date: false});
-        }
-      if(_del){
-        if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
-          this.setState({
-            visible: false,
-            id: null,
-            activeName:''
-          })
         }
+        
       }
-    }
     });
     const that = this;
     document.addEventListener('mousedown',function(e){
@@ -201,12 +203,13 @@ class AddAssistCheck extends React.Component {
             {
               part.map((item, idx) => {
                 return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
-                  <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+                  {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
                     <span className={styles.tagSpan}>
                       {item.name}:
                       <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                     </span>
-                  </span>
+                  </span> */}
+                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
                   <div className={styles.textareaWrap}>
                     <ScrollArea speed={0.8}
                                 horizontal={false}
@@ -253,12 +256,14 @@ class AddAssistCheck extends React.Component {
               }
             }
             return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
-              <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+              {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':(winWidth-987)+'px' }}> */}
+              {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
                 <span className={styles.tagSpan}>
                   {item.name}:
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
-              </span>
+              </span> */}
+              <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
               <div className={styles.textareaWrap}>
                 <ScrollArea speed={0.8}
                             horizontal={false}
@@ -296,7 +301,7 @@ class AddAssistCheck extends React.Component {
           })
         }
       </ul>
-    </React.Fragment> 
+    </React.Fragment>
   }
   render() {
     const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;

+ 2 - 5
src/components/PushItems/index.jsx

@@ -29,7 +29,6 @@ class PushItems extends Component {
       moreCheck: false,
       show:true,
       showAssess:false,      //评估弹窗
-      idx:''
     };
 
     this.showMore = this.showMore.bind(this);
@@ -148,9 +147,7 @@ class PushItems extends Component {
     });
   }
   setDataIdx(index){
-    this.setState({
-      idx:index+''
-    })
+    this.props.setDataIdx&&this.props.setDataIdx(index)
   }
   render() {
     const {
@@ -284,7 +281,7 @@ class PushItems extends Component {
             tipsDetails = {tipsDetails}/>}
             
             {
-              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[this.state.idx]||dataLis[setPushEmergencyIdx]} idx={this.state.idx||setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
+              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[setPushEmergencyIdx]} idx={setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
             }
       </div>
     );

+ 7 - 1
src/containers/PushItemsContainer.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import PushItems from '../components/PushItems'
-import {CHANGE_ASSAY, CHANGE_CHECK, ADD_BILLING, SHOW_TIPS_DETAILS, HIDE_TIPS_DETAILS,SHOW_TABLE_LIST} from '@store/types/pushMessage';
+import {CHANGE_ASSAY, CHANGE_CHECK, ADD_BILLING, SHOW_TIPS_DETAILS, HIDE_TIPS_DETAILS,SHOW_TABLE_LIST,SET_PUSH_EMERGENCY_IDX} from '@store/types/pushMessage';
 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';
@@ -68,6 +68,12 @@ function mapDispatchToProps(dispatch) {
             dispatch({
                 type: HIDE_TIPS_DETAILS
             })
+        },
+        setDataIdx:(idx)=>{
+            dispatch({
+                type: SET_PUSH_EMERGENCY_IDX,
+                idx:idx
+            })
         }
     }
 }

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

@@ -136,10 +136,9 @@ export const billing = (mdata,boxMark) => {
  }
 };
 
-//获取提示信息(静态信息)
+//获取提示信息(静态信息) 
 export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
     return(dispatch, getState) => {
-
         const params ={
             name: item.name,
             position: item.position,
@@ -237,7 +236,7 @@ export const getAllConceptDetail = (item) => {
             } else {
                 Notify.info('提示信息未维护');
             }
-                
+               
         }).catch((e) => {
             console.log(e)
         })

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

@@ -322,7 +322,7 @@ export const setAllFollowUp = (item) => {
 }
 
 export const getInstroduce = (item, type, position)=>{
-
+    console.log(item,type)
     return (dispatch, getState) =>{
         const params = {
             name: item.name,

+ 3 - 1
src/store/reducers/pushMessage.js

@@ -2,7 +2,7 @@ import {CHANGE_ASSAY, CHANGE_CHECK, BILLING_ADVICE, ADD_SCHEME, SET_TIPS,  SET_T
         SET_CHANGE_ADVICE_TREATMENT, SET_CHANGE_ADVICE_ASSAY, SET_CHANGE_ADVICE_CHECK, ADD_BILLING,
         CLEAR_ALL_PUSH_MESSAGE,SHOW_TIPS_DETAILS, HIDE_TIPS_DETAILS, SET_COMMONTREATMENT,
         SET_ADVICE_INPUT ,SET_CHRONIC_TABLELIST,SHOW_TABLE_LIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,
-        SAVE_TABLE_RESULT, SAVE_FOLLOW_UP, DEL_FOLLOW_UP,TOGGLE_CHRONIC_INFO} from '../types/pushMessage';
+        SAVE_TABLE_RESULT, SAVE_FOLLOW_UP, DEL_FOLLOW_UP,TOGGLE_CHRONIC_INFO,SET_PUSH_EMERGENCY_IDX} from '../types/pushMessage';
 import {changeAssay, changeCheck, setAdvice, addScheme, setTips, setTipsDetails, setChangeAdviceTreatment, 
         setChangeAdviceAssay, setChangeAdviceCheck, addBilling, clearAllPushMessage, showTipsDetails, hideTipsDetails, 
         setCommontreatment, setAdviceInput, saveFollowUp, delFollowUp } from '../actions/pushMessage';
@@ -80,6 +80,8 @@ export default function(state = initState, action) {
       return res;
     case TOGGLE_CHRONIC_INFO:
       res.slideUp = action.flag;
+    case SET_PUSH_EMERGENCY_IDX:
+      res.setPushEmergencyIdx = action.idx;
       return res;
     default:
       return state;

+ 1 - 0
src/store/types/pushMessage.js

@@ -23,5 +23,6 @@ export const SAVE_TABLE_RESULT = 'SAVE_TABLE_RESULT' ; //量表计算结果
 export const SAVE_FOLLOW_UP = 'SAVE_FOLLOW_UP';  //保存回访时间
 export const DEL_FOLLOW_UP = 'DEL_FOLLOW_UP';  //删除回访时间
 export const TOGGLE_CHRONIC_INFO = 'TOGGLE_CHRONIC_INFO';   //收起展开指标推送模块
+export const SET_PUSH_EMERGENCY_IDX = 'SET_PUSH_EMERGENCY_IDX';   //急诊设置idx
 
 

+ 8 - 2
src/utils/tools.js

@@ -791,14 +791,20 @@ function ifOtherClear(jsonData,jsonStr,baseList){
     return true;
   }
 }
-function normalVal(min,max){
+function normalVal(min,max){//添加正常值0处理
   if(!min&&!max){
     return null;
   }else if(min&&max){
       return `正常值: (${min}~${max})`
   }else if(!min && max){
-      return `正常值: (<${max})`
+    if(min == 0){
+      return `正常值: (${min}~${max})`
+    }
+    return `正常值: (<${max})`
   }else if(min && !max){
+    if(max == 0){
+      return `正常值: (${min}~${max})`
+    }
       return `正常值: (>${min})`
   }
 }