Explorar el Código

Merge remote-tracking branch 'origin/ChronicMag' into ChronicMag

zhouna hace 6 años
padre
commit
756c60c7e9

+ 1 - 1
src/common/components/NumberUnitPan/index.jsx

@@ -108,7 +108,7 @@ class NumberUnitPan extends Component{
           <td><span onClick={this.handleSelect}>0</span></td>
           <td><span onClick={this.handleSelect}>~</span></td>
           <td><span onClick={this.handleSelect}>/</span></td>
-          <td><span onClick={this.handleSelect}>日</span></td>
+          <td onClick={(e)=>e.stopPropagation()}></td>
           <td className={style['imgN']}><img src={backspace} onClick={this.handleBack.bind(this)} /></td>
         </tr>
         <tr>

+ 14 - 6
src/components/DiagnosticList/index.jsx

@@ -13,6 +13,7 @@ import iconRadioDefault from '@common/images/icon-radio-default.png'
 import iconRadioActive from '@common/images/icon-radio-active.png'
 import tableIcon from '@common/images/table.png';
 import { delFollowUp } from '../../store/actions/treat';
+import { CONFIRM_TYPE } from "@store/types/typeConfig";
 
 class DiagnosticList extends Component {
     constructor(props) {
@@ -21,7 +22,8 @@ class DiagnosticList extends Component {
             visible: false,
             delItem: {},
             treatTitle: '',
-            activeHistory: -1
+            activeHistory: -1,
+            sign:-1
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -122,6 +124,7 @@ class DiagnosticList extends Component {
     }
     referCase() {
         const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props
+        const {sign} = this.state;
         hideHistoryCaseModal && hideHistoryCaseModal()
         if (this.state.activeHistory === -1 && typeConfig==0) {//没有选择历史病例直接点确定
             Notify.info("未选择历史病历,已默认展示慢病相关内容");
@@ -134,18 +137,22 @@ class DiagnosticList extends Component {
         let baseList = store.getState();
         
         let baseObj = items[this.state.activeHistory];
-  
-        // store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
+        // 切换模式
+        if(sign != typeConfig){
+          store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
+        }
         pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
         this.props.getBilling();
         this.setState({
-            activeHistory: -1
+            activeHistory: -1,
+            sign:-1
         })
     }
     closeHistoryCaseModal() {
         const { hideHistoryCaseModal ,autoFillModules,typeConfig} = this.props
         this.setState({
-            activeHistory: -1
+            activeHistory: -1,
+            sign:-1
         })
         hideHistoryCaseModal && hideHistoryCaseModal()
         if(typeConfig==0){//智能推送模式才自动填充
@@ -156,7 +163,8 @@ class DiagnosticList extends Component {
         const { handleQuoteClick } = this.props
         // handleQuoteClick && handleQuoteClick(item)
         this.setState({
-            activeHistory: index
+            activeHistory: index,
+            sign:item.sign
         })
     }
     getHistoryCase() {

+ 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;

+ 4 - 3
src/components/SpreadDrop/index.jsx

@@ -468,9 +468,10 @@ class ListItem extends Component{
     const pos = isSpecialPos?style['independent']:'';
     return <ul className={classNames(style['row'],pos)} onBlur={(e)=>e.stopPropagation()}>
       {datas&&datas.map((it,i)=>{
-        /*return <li onClick={(e)=>this.handleClick(e,it,i)}
-                   className={this.getClass(it.id)}>{it.labelPrefix}{it.name}{it.labelSuffix}</li>*/
-          return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
+        if(isSpecialPos){
+          return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)}>{it.name}</li>
+        }
+        return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
       })}
     </ul>;
   }

+ 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;

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

@@ -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={packUp} 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;