Browse Source

Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

liucf 6 years ago
parent
commit
f920688d6d

+ 2 - 2
src/common/components/Calendar/index.jsx

@@ -25,7 +25,7 @@ class Calendar extends React.Component {
             select:{
                 year:  this.year,
                 month:  this.month,
-                day: 0,
+                day: 0,//这里设置初始选中的值
                 hour:0,
                 minute:0,
                 second:0
@@ -59,6 +59,7 @@ class Calendar extends React.Component {
         this.inputing=true;
         info.year=this.state.year;
         info.month=this.state.month;
+        // info.day = this.day;//没选日就加上默认值
         if(info.hour==null){
             info.hour=this.state.select.hour;
             info.minute=this.state.select.minute;
@@ -88,7 +89,6 @@ class Calendar extends React.Component {
     genTimeComponent(){
         return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
     }
-
     render() {
         return (
             <div className={style.wrapper}>

+ 2 - 0
src/components/AddAssistCheck/index.less

@@ -133,9 +133,11 @@
 }
 .tagSpan {
   position: relative;
+  cursor: default;
 }
 .tagSpan:hover {
   .imgInfo {
     display: block;
+    cursor: pointer;
   }
 }

+ 2 - 2
src/components/AddInspect/SlideSelect/index.jsx

@@ -163,8 +163,8 @@ class SlideSelect extends Component {
                     >
                     
                         <div className={styles.searchResultT}>
-                            <img style={{"position":"absolute","top":"8px","right":"8px"}} src={date1} alt="" onClick={handleShowDate}/>
-                            <p style={{position:"absolute",right:"38px",top:"4px",lineHeight:"28px"}}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} src={date1} alt="" onClick={handleShowDate}/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate}>
                                 {
                                   dateTime
                                 }

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

@@ -41,7 +41,6 @@ class AssistCheck extends React.Component {
                             assistVal={assistVal}
                             windowHeight={windowHeight}
                         >
-
                         </AddAssistCheck>
                     </div>
                 </ItemBox>

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

@@ -45,7 +45,7 @@ class DiagResultSearch extends Component {
 
       {
         searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} /></div>)
+          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} type='search'/></div>)
         })
       }
     </div>

+ 48 - 6
src/components/DiagnosticItem/index.jsx

@@ -2,6 +2,8 @@ import React, { Component } from 'react';
 import style from './index.less';
 import {ConfirmModal} from '@commonComp';
 import Notify from '@commonComp/Notify';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
 import {getChronic} from '@store/async-actions/homePage.js';
 import {storageLocal} from '@utils/tools';
 
@@ -10,7 +12,9 @@ class DiagnosticItem extends Component{
         super(props);
 
         this.state = {
-            visible: false
+            visible: false,
+            hasEnterItem: false,
+            hasEnterImg: false
         }
 
         this.addDiagodal = this.addDiagodal.bind(this);
@@ -18,6 +22,7 @@ class DiagnosticItem extends Component{
         this.confirm = this.confirm.bind(this);
         this.cancel = this.cancel.bind(this)
         this.close = this.close.bind(this)
+        this.getTips = this.getTips.bind(this)
     }
     confirm() {
         this.close();
@@ -35,9 +40,11 @@ class DiagnosticItem extends Component{
         })
     }
     chooseDiagodal(item) {
-        const { diagnosticList,getTips } = this.props;
+        const { diagnosticList,getTips, type } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.id,type:7});
+        if (type == 'search') {
+            getTips && getTips({id:item.id,type:7});
+        }
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
@@ -49,6 +56,11 @@ class DiagnosticItem extends Component{
         })
        
     }
+    getTips(item, e) {
+        e.stopPropagation();
+        const {getTips } = this.props;
+        getTips && getTips({id:item.id,type:7});
+    }
     addDiagodal(diagType){
         const {item, isChronicMag,mode} = this.props;
         item.type = diagType;
@@ -87,15 +99,45 @@ class DiagnosticItem extends Component{
         // }, 0)
         document.getElementById("diagnosisResult").scrollIntoView(true)
     }
+    handleMouseEnterDrug() {
+        this.setState({
+            hasEnterItem: true, 
+        })
+      }
+      handleMouseLeaveDrug() {
+        this.setState({
+            hasEnterItem: false, 
+        })
+      }
+      handleMouseEnterImg() {
+        this.setState({
+          hasEnterImg: true
+        })
+      }
+      handleMouseLeaveImg() {
+        this.setState({
+          hasEnterImg: false
+        })
+      }
 
     render(){
-        const { visible } = this.state
-        const { item, title } = this.props
+        const { visible,hasEnterItem,hasEnterImg } = this.state
+        const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
                     <span className={style['diag-name']} 
                           title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
-                          onClick={() =>{this.chooseDiagodal(item)}}>
+                          onMouseEnter={this.handleMouseEnterDrug.bind(this)}
+                          onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                          onClick={() =>{this.chooseDiagodal(item)}}
+                          >
                         {item.name} {item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': ''}
+                        {type== 'disSelect' &&<img className={style['info-img']}  
+                                style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
+                                src={hasEnterImg ? infoMove : infoShow} 
+                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                                onClick={this.getTips.bind(this,item)}
+                        />}
                     </span>
                     <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 

+ 13 - 3
src/components/DiagnosticItem/index.less

@@ -10,10 +10,20 @@
     width: 100%;
 }
 .diag-name {
+    position: relative;
     display: inline-block;
     width: 100%;
     height: 100%;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
+    // overflow: hidden;
+    // text-overflow: ellipsis;
+    // white-space: nowrap;
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    top: -14px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+    z-index: 2;
 }

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

@@ -48,10 +48,10 @@ class PushDiag extends Component {
                 {maxShowNum ? diagList.map((item, index) => {
                     ItemNum = ItemNum + item.name.length + 1;
                     if (ItemNum <= moreNum) {
-                        return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>
+                        return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
                     }
                 }) : diagList.map((item, index) => {
-                return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>
+                return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
                 })}
                 {ItemNum > maxShowNum && <div onClick={() => this.handleShow(ItemNum)} className={style['push-diag-more']}>{showMore ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showMore ? showImg : hideImg}/></div>}
 

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

@@ -264,7 +264,7 @@ class PushItems extends Component {
     });
 
     const vigilants = vigilant.map((item, index) => {
-      return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>;
+      return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>;
     });
 
     return (