فهرست منبع

Merge branch 'dev5.3.1' of http://192.168.2.236:10080/zhouna/newICSS into dev5.3.1

luolei 5 سال پیش
والد
کامیت
041ae2f1dc

+ 3 - 2
src/common/components/EditableSpan/index.jsx

@@ -179,13 +179,14 @@ class EditableSpan extends Component{
     if(ev.keyCode==39){//向右
       let nextObj = $(this.$span.current).next();
       let obj = nextObj[0]&&nextObj[0].nodeName=="DIV"?nextObj.next():nextObj;
-      if(textIndex == textLength || textLength==undefined){
+      if(textIndex == textLength || textLength==undefined || (textIndex == 0 && textLength==1)){
         if(ev.preventDefault){//阻止默认事件
           ev.preventDefault();
         }else{
           ev.returnValue=false;
         }
-        obj.focus();
+        // obj.focus();
+        obj[0].focus();
       }
     }
   }  

+ 2 - 1
src/common/components/EditableSpan/index.less

@@ -5,10 +5,11 @@
   word-break: break-word;
   min-width: 10px;
   // line-height: 2;
-  /*height: 16px;*/
+  height: 16px;//火狐需要
   line-height: 16px;
   vertical-align: middle;
   text-align: left;
+  padding-right: 1px;//火狐左右移动需要
 }
 .full{
   width: 100%;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
src/components/AddAssistCheck/index.less


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

@@ -47,7 +47,7 @@ class SlideExcel extends Component {
               <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 className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                 </span>
               </td>
               <td style={{ width: '20%' }}>
@@ -66,7 +66,7 @@ class SlideExcel extends Component {
                 <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 className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                   </span>
                 </td>
                 <td style={{ width: '20%' }}>

+ 7 - 3
src/components/AddInspect/SlideExcel/index.less

@@ -148,7 +148,7 @@
 .imgInfo {
   position: relative;
 }
-.imgInfo {
+.imgInfo , .imgInfo1{
   width: 15px;
   height: 17px;
   border-bottom: 0 none !important;
@@ -161,7 +161,10 @@
   display: none;
   cursor: pointer;
 }
-.imgInfo:hover {
+.imgInfo1 {
+  top: -13px;
+}
+.imgInfo:hover, .imgInfo1:hover {
   background: url('../img/info3.png') no-repeat center center;
   background-size: 100% auto; 
 }
@@ -175,7 +178,8 @@
   position: relative;
 }
 .tagSpan:hover {
-  .imgInfo {
+  .imgInfo, .imgInfo1 {
     display: block;
   }
+ 
 }

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

@@ -123,7 +123,7 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo1} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
@@ -151,7 +151,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -169,7 +169,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

+ 11 - 8
src/components/AddInspect/SlideSelect/index.less

@@ -168,7 +168,7 @@
 .imgInfo {
   position: relative;
 }
-.imgInfo {
+.imgInfo, .imgInfo1 {
   width: 15px;
   height: 17px;
   border-bottom: 0 none !important;
@@ -181,15 +181,18 @@
   display: none;
   cursor: pointer;
 }
-.imgInfo:hover {
-  background: url('../img/info3.png') no-repeat center center;
-  background-size: 100% auto; 
-}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
 .tagSpan {
   position: relative;
 }
 .tagSpan:hover {
-  .imgInfo {
-    display: block;
-  }
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
 }

+ 3 - 3
src/components/ChronicInfo/index.jsx

@@ -242,10 +242,10 @@ class ChronicInfo extends React.Component{
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
     const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
+    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,'');       //处理中文输入法的情况
     obj[id] = values;
-    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
-      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
+    if(/[\u4e00-\u9fa5]|[^\d.]/g.test(txt)){
+      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,'');
     }
     this.setState({
       isCalculated:false,

+ 3 - 13
src/components/CommonSymptom/index.jsx

@@ -69,14 +69,6 @@ class CommonSymptom extends Component{
     }
     return '';
   }
-  // 历史症状
-  getHisStyle(id){
-    const {conceptId} = this.state;
-    if(conceptId.includes(id)){
-      return style['hisSelect'];
-    }
-    return style['hisTab'];
-  }
   handleClear(e){
     e.stopPropagation();
     this.setState({
@@ -99,7 +91,7 @@ class CommonSymptom extends Component{
       let listBox = $('#listBox')[0];
       let hisBox = $('#his')[0];
       let operBox = $('#oper')[0];
-      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != hisBox && e.target.parentNode != operBox && e.target != divBox && e.target.parentNode.parentNode && e.target.parentNode.parentNode != hisBox){
+      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != hisBox && e.target.parentNode != operBox && e.target != divBox ){
         this.setState({
           hide:true,
           select:[],
@@ -124,12 +116,10 @@ class CommonSymptom extends Component{
         {mainHis.length>0?<ul className={style["his"]} id="his">
           <p>最近输入症状:</p>
           {mainHis.map((it)=>{
-            return <li onClick={(e)=>this.handleSelect(e,it)} title={it.name.length>5?it.name:''}>
-                <span className={this.getHisStyle(it.conceptId)} style={{'padding':it.name.length>5?'0':'0 5px'}}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</span>
-              </li>
+            return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
           })}
         </ul>:''}
-        <p>常见症状:</p>
+        <p className={style['c-title']}>常见症状:</p>
         {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}

+ 10 - 26
src/components/CommonSymptom/index.less

@@ -6,32 +6,23 @@
   white-space: pre-wrap;
   .listBox{
     max-width: 460px;
-    >p{
-      margin: 10px 0 15px;
-      padding-left: 15px;
-    }
   }
   .his{
-    color: #777777;
-    border-bottom: 1px solid #EAEDF1;
-    padding-bottom: 10px;
-    >p{
-      line-height: 32px;
-      padding-left: 15px;
-      margin-bottom: 10px;
-    }
-    li{
-      span{
-        display: inline-block;
-        border-radius:13px;
-        line-height: 25px;
-        // padding: 0 5px;
+      color: #3B9ED0;
+      border-bottom: 1px solid #EAEDF1;
+      p{
+        line-height: 32px;
+        padding-left: 15px;
+        color: #000;
       }
     }
+  .c-title{
+    margin: 10px 0;
+    text-indent: 15px;
   }
   li{
     width: 85px;
-    line-height: 32px;
+    line-height: 30px;
     padding-left: 15px;
     margin-right: 5px;
     cursor: pointer;
@@ -62,13 +53,6 @@
     margin-top: 5px;
     padding-right: 5px;
   }
-  .hisTab{
-    border:1px solid rgba(170,170,170,1);
-  }
-  .hisSelect{
-    color:#3B9ED0;
-    border:1px solid rgba(59,158,208,1);
-  }
 }
 .hide{
   display: none;

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

@@ -66,7 +66,7 @@ class DetailsModal extends Component {
                                         <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>
+                                    <pre dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre>
                                 </div>)
                             })}
                             

+ 5 - 0
src/components/PushItems/DetailsModal/index.less

@@ -131,3 +131,8 @@
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
+pre {
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    font-family: inherit;
+  }

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

@@ -45,7 +45,7 @@ class TipsMsg extends Component {
                             __html: item.title
                           }}
                         />
-                        <div
+                        <pre
                           dangerouslySetInnerHTML={{
                             __html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)
                           }}

+ 8 - 2
src/components/PushItems/TipsMsg/index.less

@@ -2,6 +2,7 @@
 @import "~@less/base.less";
 
 .tips{
+  
    ul, ol {
      padding: 0 0 0 15px;
    }
@@ -11,8 +12,8 @@
    ol li{
     list-style: decimal;
   }
-  
-    border:1px solid #EAEDF1;
+
+  border:1px solid #EAEDF1;
     .tips-title,h1{
       font-size: 14px;
       color: #000;
@@ -131,4 +132,9 @@
     img {
       display: none;
     }
+    pre {
+      white-space: pre-wrap;
+      word-wrap: break-word;
+      font-family: inherit;
+    }
   }

+ 29 - 0
src/components/Treat/NewPortal/index.jsx

@@ -0,0 +1,29 @@
+import React, { Component } from 'react';
+import ReactDOM from 'react-dom';
+
+//传送门,将dom渲染到body节点
+class NewPortal extends Component {
+    constructor(props) {
+        super(props)
+        // 初始化创建渲染的父元素并添加到body下
+        this.node = document.createElement('div');
+    }
+
+    componentDidMount() {
+        document.body.appendChild(this.node);
+    }
+
+    componentWillUnmount() {
+        document.body.removeChild(this.node);
+    }
+    render() {
+        const { visible,children } = this.props;
+        
+        return visible && ReactDOM.createPortal(
+            children,
+            this.node
+        )
+    }
+}
+
+export default NewPortal;

+ 7 - 3
src/components/Treat/index.jsx

@@ -17,6 +17,7 @@ import adverseReactionIcon from './img/adverseReaction.png';
 import $ from "jquery";
 import {dragBox} from '@utils/drag';
 import ReactDom from "react-dom";
+import NewPortal from './NewPortal'
 
 class Treat extends Component {
     constructor(props){
@@ -67,7 +68,8 @@ class Treat extends Component {
                 title, drugInfoList, hideDrugInfoMore, adversReactionList, changeReact, followUp, setFollowUp, isRead, hasFollowUp} = this.props;
         const { zIndex,show } = this.state
         const domNode = document.getElementById('root');
-        return ReactDom.createPortal(
+        // return ReactDom.createPortal(
+            return <NewPortal visible = 'true'>
             <div   className={style['treat-wrapper']}>
                 <div className={style['treat-mask']} onClick={this.hideTreat}>
                 </div>
@@ -127,8 +129,10 @@ class Treat extends Component {
                 {showDrug && drugInfo && <DrugInfo setTreatBox={this.setTreatBox} treatIndexSet={treatIndexSet} drugInfo = {drugInfo} hideDrugInfo = {hideDrugInfo}></DrugInfo>}
                 {/* 查询多个药品说明书 (添加数据查看药品说明书用)*/}
                 {/* {showDrug && <DrugInfo drugInfoList = {drugInfoList} hideDrugInfoMore = {hideDrugInfoMore}></DrugInfo>} */}
-            </div>,domNode
-        )
+            </div>
+            </NewPortal>
+        //     ,domNode
+        // )
     }
 }
 

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

@@ -62,7 +62,7 @@ class DrugInfo extends Component {
                     {drugInfo.drugDesc.map((item, index) =>{
                         return <div className={style['drug-desc-item']} id={item.title.trim()}>
                             <div className={style['drug-desc-title']} >{item.title.trim()}</div> 
-                            <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div> 
+                            <pre className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre> 
                         </div>
                     })}
                     <div className={style['content-menu-box']}>

+ 6 - 1
src/components/TreatDesc/DrugInfo/index.less

@@ -134,4 +134,9 @@
     margin-top: 5px;
     background-color: #eee;
     margin-right: 10px;
-}
+}
+pre {
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    font-family: inherit;
+  }

+ 2 - 1
src/components/TreatDesc/index.less

@@ -44,10 +44,11 @@
     height: 100%;
     top: 0;
     background: #fff;
-    padding: 60px  20px 20px 20px;
+    padding: 40px  0px 20px 20px;
     box-shadow: 2px 0px 5px -2px #7d7c7c;
 }
 .similar-drug {
+    padding: 20px 20px 0 0;
     height: 100%;
     overflow-y: auto;
 }

+ 2 - 0
src/store/actions/checkBody.js

@@ -505,6 +505,8 @@ export function backspaceText(state,action){
       data.splice(delIndex,1);
       res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
+    }else if(!data[delIndex+1]){//最后一个文本标签不删除
+      
     }
     else{
       handleLocalDelTag(4,delIndex,data[delIndex]);

+ 2 - 0
src/store/actions/currentIll.js

@@ -913,6 +913,8 @@ export function backspaceText(state,action){
       data.splice(delIndex,1);
       res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
+    }else if(!data[delIndex+1]){//最后一个文本标签不删除
+      // console.log("删除最后一个啦");
     }
     else{
       handleLocalDelTag(2,delIndex,data[delIndex]);

+ 2 - 0
src/store/actions/mainSuit.js

@@ -857,6 +857,8 @@ export function backspaceText(state,action){
     }else if(data[delIndex+1] && data[delIndex+1].tagType==8){
       data.splice(delIndex,1);
       res.saveText.splice(delIndex,1);
+    }else if(data[delIndex-1] && data[delIndex-1].tagType !=8){//最后一个文本标签
+      console.log("删除最后一个啦")
     }
     else{
       handleLocalDelTag(1,delIndex,data[delIndex]);

+ 2 - 0
src/store/actions/otherHistory.js

@@ -476,6 +476,8 @@ export function backspaceText(state,action){
       data.splice(delIndex,1);
       res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
+    }else if(!data[delIndex+1]){//最后一个文本标签不删除
+      
     }
     else{
       //月经史删除处理