Bladeren bron

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

zhangxc 6 jaren geleden
bovenliggende
commit
27eb15092f
37 gewijzigde bestanden met toevoegingen van 287 en 140 verwijderingen
  1. 7 2
      src/common/components/ComplexModal/index.jsx
  2. 19 9
      src/common/components/ComplexModal/index.less
  3. 10 0
      src/common/less/variables.less
  4. 2 2
      src/components/AddAssistCheck/index.less
  5. 1 1
      src/components/AddInspect/index.jsx
  6. 1 1
      src/components/AssessResult/ChooseItem/index.jsx
  7. 1 1
      src/components/AssessResult/index.jsx
  8. 2 2
      src/components/CheckBody/index.jsx
  9. 7 7
      src/components/ChronicInfo/index.jsx
  10. 1 1
      src/components/ChronicInfo/index.less
  11. 34 0
      src/components/CopyRight/CopyModalSon/index.jsx
  12. 31 0
      src/components/CopyRight/DiscontentSon/index.jsx
  13. 8 24
      src/components/CopyRight/index.jsx
  14. 6 4
      src/components/CopyRight/index.less
  15. 9 4
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  16. 24 8
      src/components/HistoryCaseContainer/HistoryList/index.less
  17. 2 2
      src/components/MultSpread/index.jsx
  18. 4 4
      src/components/NumberDrop/index.jsx
  19. 6 4
      src/components/Preview/index.jsx
  20. 4 2
      src/components/Preview/index.less
  21. 13 12
      src/components/PreviewBody/index.jsx
  22. 5 4
      src/components/PreviewBody/index.less
  23. 6 3
      src/components/PrintPreview/index.jsx
  24. 4 2
      src/components/PrintPreview/index.less
  25. 12 8
      src/components/PushItems/DetailsModal/index.jsx
  26. 2 0
      src/components/ScaleTable/index.jsx
  27. 1 1
      src/components/TemplateItems/TemplateItem/index.jsx
  28. 1 4
      src/components/Treat/DrugTreat/index.jsx
  29. 2 2
      src/containers/eleType.js
  30. 1 1
      src/main.js
  31. 4 4
      src/store/actions/currentIll.js
  32. 2 2
      src/store/actions/mainSuit.js
  33. 3 1
      src/store/async-actions/fetchModules.js
  34. 3 4
      src/store/async-actions/homePage.js
  35. 41 8
      src/store/async-actions/patInfo.js
  36. 2 2
      src/store/async-actions/pushMessage.js
  37. 6 4
      src/utils/tools.js

+ 7 - 2
src/common/components/ComplexModal/index.jsx

@@ -3,6 +3,8 @@ import ReactDom from "react-dom";
 import style from "./index.less";
 import Notify from '@commonComp/Notify';
 import close from '@common/images/icon_close.png';
+import { dragBox } from '@utils/tools';
+
 /**
  * title:标题
  * children:弹窗内容
@@ -19,6 +21,9 @@ class ComplexModal extends Component {
   constructor(props) {
     super(props);
   }
+  componentDidMount(){
+    dragBox('complexModalWrap','complexModalTitle')
+  }
 
   render() {
     const { onclose,title,children,footer,shadeClose,icon,width,top,bottom} = this.props;
@@ -27,8 +32,8 @@ class ComplexModal extends Component {
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(<div className={style['container']}>
       <div className={style['shade']} onClick={shadeClose===false?'':onclose}></div>
-      <div className={style['modal']} style={{width: width?width:'auto', marginLeft:marginLeft, top:top?top+'px':'',bottom:bottom?bottom+'px':''}}>
-        <div className={style['close']}>
+      <div id="complexModalWrap" className={style['modal']} style={{width: width?width:'auto', marginLeft:marginLeft, top:top?top+'px':'',bottom:bottom?bottom+'px':''}}>
+        <div className={`${style['close']} drag-title`} id="complexModalTitle">
           {icon?<img src={icon} />:''}
           {title}
           <img src={close} onClick={onclose} className={style['closeIcon']} />

+ 19 - 9
src/common/components/ComplexModal/index.less

@@ -1,18 +1,23 @@
 .container {
   position: relative;
   z-index: 2000;
+  padding-top: 40px;
   .content{
     overflow: auto;
-    position: fixed;
-    bottom: 70px;
-    top: 70px;
+    position: relative;
+    height: 100%;
+    padding-bottom: 30px;
+    // bottom: 70px;
+    // top: 70px;
     // width: 820px;
   }
   .footer{
     // width: 820px;
-    position: fixed;
-    bottom:30px;
+    position: relative;
+    padding:15px 0px;
+    bottom: 0;
     text-align: right;
+    background-color: #fff;
   }
   // @media print {
   //   .close{
@@ -41,15 +46,20 @@
     background: #fff;
     position: fixed;
     left: 50%;
-    //top: 50%;
-    // margin-left: -410px;
-    top: 65px;
-    bottom: 65px;
+    top: 3%;
+    bottom: 3%;
+    height: 94%;
+    overflow: hidden;
+    padding-top: 50px;
+    padding-bottom: 64px;
   }
   .close {
     padding:  15px 15px 15px 20px;
     border-bottom: 1px solid #EAEDF1;
     background: #e5eefe;
+    position: absolute;
+    top:0;
+    width: 100%;
     img{
       vertical-align: text-top;
     }

+ 10 - 0
src/common/less/variables.less

@@ -184,3 +184,13 @@
   border:1px solid @import-color;
   //color: @import-color!important;
 }
+:global(.drag-title) {
+  cursor: move;
+  moz-user-select: -moz-none;
+  -moz-user-select: none;
+  -o-user-select: none;
+  -khtml-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}

File diff suppressed because it is too large
+ 2 - 2
src/components/AddAssistCheck/index.less


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

@@ -1,5 +1,5 @@
 import React from 'react';
-import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add } from '@commonComp';
+import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add} from '@commonComp';
 import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
 import { deepClone } from '@utils/tools';

+ 1 - 1
src/components/AssessResult/ChooseItem/index.jsx

@@ -55,7 +55,7 @@ class ChooseItem extends Component {
                                           value={i.detailName}
                                           label={i.detailName}
                                           disabled={disabled}
-                                          isSelect={selecteds[it.name]&&selecteds[it.name].includes(i.detailName)}
+                                          isSelect={selecteds&&selecteds[it.name]&&selecteds[it.name].includes(i.detailName)}
                                           handleClick={this.handleCheckbox.bind(this,it.name,i.detailName)}/>
                                 {i.state?<i>(智能推荐)</i>:''}
                               </div>;

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

@@ -106,7 +106,7 @@ class AssessResult extends Component {
         return <ChooseItem title={name}
                            data={list}
                            handleChange={this.handleChooseChange.bind(this,i)}
-                           selecteds={chooseSelecteds[i]} ></ChooseItem>;
+                           selecteds={chooseSelecteds[i]||{}} ></ChooseItem>;
       case 10:   //数据来源于后台
         return <ChartItem title={name}
                           data={chartData||{}}

+ 2 - 2
src/components/CheckBody/index.jsx

@@ -34,9 +34,9 @@ class CheckBody extends Component{
     let arr = [],list=[];//console.log(data,saveText)
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
-    const moreText = filterDataArr([...saveText].splice(moreNum+1));      //被收起的标签中是否有有值得,有则不能再收起showMoreBtn?more:''
+    const moreText = filterDataArr([...saveText].splice(moreNum+1));     //被收起的标签中是否有有值得,有则不能再收起showMoreBtn?more:''
     const more = showAll?<span className={style['more']} onClick={this.showHide}>收起<img src={hideImg} /></span>:<span className={style['more']} onClick={this.showHide}>展开<img src={showImg} /></span>;
-    const showMoreBtn = data.length>moreNum&&!moreText;
+    const showMoreBtn = (data.length>moreNum&&!data[0].full)&&!moreText;
     let showArray = data.filter((it)=>{
       if(it.showInCheck)
         return it;

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

@@ -310,8 +310,8 @@ class ChronicInfo extends React.Component{
                       {v.details&&v.details.map((it,j)=>{
                         if(it.type==1){
                           return <p>
-                                <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id,i)}>
-                                  {'【'+it.content.name+'】'}
+                                <span className={style["listName"]}>
+                                  <i onClick={this.showTable.bind(this,it.content,v.id,i)}>{'【'+it.content.name+'】'}</i>
                                   {formulaResult&&formulaResult[it.content.id]&&formulaResult[it.content.id].pIndex==i?<i>{'结果:'}{formulaResult[it.content.id].calcalculate&&formulaResult[it.content.id].calcalculate.result.value +' '+ formulaResult[it.content.id].calcalculate.result.text}</i>:''}
                                   
                                 </span>
@@ -505,11 +505,11 @@ class ChronicInfo extends React.Component{
               <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={400} width={400}>
                       <ul className={style['toast-cont']}>
                         {tableList&&tableList.map((v,i)=>{
-                          return <li onClick={this.handleListClick.bind(this,v)}>
+                          return <li>
                           <span>
-                            {'【'+v.name+'】'}
+                            <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
                             {/*{formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}*/}
-                            {formulaResult&&formulaResult[v.id]?<i>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ formulaResult[v.id].calcalculate.result.text}</i>:''}
+                            {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ formulaResult[v.id].calcalculate.result.text}</i>:''}
                           </span>
                           </li>
                         })}
@@ -526,8 +526,8 @@ class ChronicInfo extends React.Component{
               {showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
                       title='管理和评估'
                       icon={manageIcon}
-                      top={20}
-                      bottom={20}
+                      top={'3%'}
+                      bottom={'3%'}
                       width={820}>
                 <AssessResult handleSave={saveAssessInfos}
                               handleSaveCalcu={this.handleSaveCalcu}

+ 1 - 1
src/components/ChronicInfo/index.less

@@ -217,7 +217,7 @@
         margin-top: 10px;
         cursor: pointer;
       }
-      i{
+      .res{
         color:#3B9ED0;
         margin-left: 10px;
       }

+ 34 - 0
src/components/CopyRight/CopyModalSon/index.jsx

@@ -0,0 +1,34 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import close from '../../../common/images/icon_close.png'
+import { dragBox } from '@utils/tools';
+
+class DiscontentSon extends Component {
+  constructor(props) {
+    super(props);
+  }
+  componentDidMount(){
+    dragBox('CopyModalWrap','CopyModalTitle')
+  }
+
+  render() {
+    const { closeCopyModal,copyVisible,date,copyContent,number } = this.props;
+
+    return <div
+        className={style["copyModal"]}
+        style={copyVisible ? { display: "block" } : { display: "none" }}
+      >
+        <div className={style["shade"]} onClick={closeCopyModal}/>
+        <div className={style["copyContent"]} id="CopyModalWrap">
+          <div className={`${style["header"]} drag-title`} id="CopyModalTitle">版本信息<img src={close} onClick={closeCopyModal} /></div>
+          <div className={style["now"]}>
+            当前版本:{number}
+            <span>{date && date.substring(0, 10)}</span>
+          </div>
+          <div className={style["content"]}>{copyContent}</div>
+        </div>
+      </div>
+  }
+}
+
+export default DiscontentSon;

+ 31 - 0
src/components/CopyRight/DiscontentSon/index.jsx

@@ -0,0 +1,31 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import close from '../../../common/images/icon_close.png'
+import { dragBox } from '@utils/tools';
+
+class DiscontentSon extends Component {
+  constructor(props) {
+    super(props);
+  }
+  componentDidMount(){
+    dragBox('disContentWrap','DisclatmerTitle')
+  }
+
+  render() {
+    const { closeDisclatmerModal,disVisible,disclatmerContent } = this.props;
+
+    return <div
+          className={style["disModal"]}
+          style={disVisible ? { display: "block" } : { display: "none" }}
+        >
+          <div className={style["shade"]} onClick={closeDisclatmerModal}/>
+          <div className={style["disContent"]} id="disContentWrap">
+            <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明<img src={close} onClick={closeDisclatmerModal} /></div>
+            <div className={style["content"]}>{disclatmerContent}</div>
+            <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
+          </div>
+      </div>
+  }
+}
+
+export default DiscontentSon;

+ 8 - 24
src/components/CopyRight/index.jsx

@@ -2,6 +2,8 @@ import React, { Component } from "react";
 import style from "./index.less";
 import close from '../../common/images/icon_close.png'
 import { storageLocal } from "../../utils/tools"
+import DiscontentSon from "./DiscontentSon"
+import CopyModalSon from "./CopyModalSon"
 
 class CopyRight extends Component {
   constructor(props) {
@@ -16,7 +18,6 @@ class CopyRight extends Component {
   }
   componentWillMount() {
     this.props.getDisMessage()
-
   }
   componentDidMount() {
     this.props.getMessage()
@@ -59,6 +60,7 @@ class CopyRight extends Component {
   render() {
     const { number, date, content, copyVisible, disVisible, disContent, hasNewVersion } = this.props.copyRight;
     const { showCopyModal, closeCopyModal, showDisclatmerModal, closeDisclatmerModal } = this;
+    console.log(disVisible,77777)
     const copyContent = content&&content.map(item => {
       return (
         <div className={style['message']}>
@@ -68,15 +70,6 @@ class CopyRight extends Component {
       );
     });
 
-    // const disclatmerContent = disContent.map(item => {
-    //   return (
-    //     <div className={style['message']}>
-    //       {item.title}
-    //       <div dangerouslySetInnerHTML={{__html: item.description}}></div>
-    //     </div>
-    //   );
-    // })
-
     return (
       <div className={style["container"]}>
         <div className={style["copy"]}>
@@ -87,11 +80,11 @@ class CopyRight extends Component {
           {hasNewVersion && <span>new</span>} &copy;<b>朗通医疗</b>
           <div className={style['disclaimer']} onClick={showDisclatmerModal}>免责声明</div>
         </div>
-        {copyVisible && <div
+        {/* {copyVisible && <div
           className={style["copyModal"]}
           style={copyVisible ? { display: "block" } : { display: "none" }}
         >
-          <div className={style["shade"]}  onClick={closeCopyModal}/>
+          <div className={style["shade"]} onClick={closeCopyModal}/>
           <div className={style["copyContent"]}>
             <div className={style["header"]}>版本信息<img src={close} onClick={closeCopyModal} /></div>
             <div className={style["now"]}>
@@ -100,18 +93,9 @@ class CopyRight extends Component {
             </div>
             <div className={style["content"]}>{copyContent}</div>
           </div>
-        </div>}
-       {disVisible && <div
-          className={style["disModal"]}
-          style={disVisible ? { display: "block" } : { display: "none" }}
-        >
-          <div className={style["shade"]} onClick={closeDisclatmerModal}/>
-          <div className={style["disContent"]}>
-            <div className={style["header"]}>免责声明<img src={close} onClick={closeDisclatmerModal} /></div>
-            <div className={style["content"]}>{this.disclatmerContent()}</div>
-            <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
-          </div>
-        </div>}
+        </div>} */}
+        {copyVisible && <CopyModalSon copyVisible={copyVisible} date={date} closeCopyModal={closeCopyModal} copyContent={copyContent} number={number}></CopyModalSon>}
+        {disVisible && <DiscontentSon closeDisclatmerModal={closeDisclatmerModal} disVisible={disVisible} disclatmerContent={this.disclatmerContent()}></DiscontentSon>}
       </div>
     );
   }

+ 6 - 4
src/components/CopyRight/index.less

@@ -95,9 +95,10 @@
         position: fixed;  
         width: 50%;
         height: 60%;
-        left: 20%;
+        left: 25%;
         background: #fff;
         top: 20%;
+        padding: 40px 0 60px 0;
         img{
           float: right;
           margin: -5px 5px 0px 0px;
@@ -105,7 +106,8 @@
         }
         .header {
           position: absolute;
-          top: -40px;
+          top: 0px;
+          width: 100%;
           height: 40px;
           font-size: 14px;
           padding: 10px 0px 10px 20px;
@@ -129,8 +131,8 @@
           overflow: auto;
         }
         .btnBox {
-          position: absolute;
-          bottom: -60px;
+          position: relative;
+          // bottom: -60px;
           width: 100%;
           height: 60px;
           background: #fff;

+ 9 - 4
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -6,13 +6,16 @@ import sort from "./img/sort.png"
 import close from "./img/close.png";
 import PreviewBody from '@components/PreviewBody';
 import Empty from '@components/Empty'
-
+import { dragBox } from '@utils/tools';
 
 
 class HistoryCaseContainer extends React.Component {
     constructor(props){
         super(props);
     }
+    componentDidMount(){
+      dragBox('hisWrapMove','closeHis')
+    }
     render(){
         const { items,handleCaseClick,handleQuoteClick,handleSortClick,showHistoryBox,activeHistory,preInfo } = this.props;
         let baseList = store.getState();
@@ -36,8 +39,10 @@ class HistoryCaseContainer extends React.Component {
             return jsonDataString;
         }
         return (
-            <div className={styles.mainHistory}>
-                <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
+            <div className={styles.mainHistory} id="hisWrapMove">
+                <div className={`${styles.closeHis} drag-title`} id="closeHis">
+                    <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
+                </div>
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
@@ -46,7 +51,7 @@ class HistoryCaseContainer extends React.Component {
                     <div className={styles.lists}>
                         <ul>
                             {
-                                items && items.length > 0? items.map((val,idx)=>{
+                                (items && items.length > 0)? items.map((val,idx)=>{
                                     return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{handleCaseClick(e,idx)}}>
                                         <span title={val.diagnose}>{val.diagnose}</span>
                                         {/* <span className={val.id == activeHistory.id?`${styles.time} ${styles.quoteHide}`:styles.time}>{val.inquiryDate}</span>

+ 24 - 8
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -1,26 +1,27 @@
 @import "~@less/mixin.less";
 .mainHistory {
     position: fixed;
-    left: 0;
-    top: 0;
-    right: 0;
-    bottom:0;
-    margin: auto;
+    margin-left: -500px;
+    left: 50%;
     width: 1000px;
-    top: 70px;
-    bottom: 70px;
+    top: 7%;  
+    bottom: 7%;
+    height: 86%;
     background-color: #fff;
     z-index: 242;
+    overflow: hidden;
     .close {
         position: absolute;
         top: 0;
         right: 0;
+        cursor: pointer;
     }
     .mainHistoryLeft {
         width: 300px;
         height: 100%;
         background: #d2d1d1;
         position: relative;
+        float: left;
         .title {
             height: 80px;
             line-height: 80px;
@@ -97,6 +98,21 @@
         }
     }
     .mainHistoryRight {
-        margin-left: 300px;
+        // margin-left: 300px;
+        // position: absolute;
+        overflow: auto;
+        height: 100%;
+        padding-top: 40px;
+        // top: 42px;
+
+        float: left;
+    }
+    .closeHis {
+      width: 700px;
+      height: 40px;
+      margin-left: 300px;
+      position: absolute;
+      z-index: 9999;
+      // border-bottom: 1px solid #EAEDF1;
     }
 }

+ 2 - 2
src/components/MultSpread/index.jsx

@@ -99,8 +99,8 @@ class MultSpread extends Component{
                             id={it.id}
                             ikey={inx} hideTag={true}></InlineTag>;
         case +it.controlType===7:
-          const min = it.minValue!=null&&it.minValue!=undefined?it.minValue-1:undefined;
-          const max = it.maxValue!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
+          const min = it.minValue;//!=null&&it.minValue!=undefined?it.minValue-1:undefined;
+          const max = it.maxValue;//!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
                              placeholder={it.name}

+ 4 - 4
src/components/NumberDrop/index.jsx

@@ -56,7 +56,7 @@ class NumberDrop extends Component{
         const that = this;
         const isFine = this.validSymbols(text,min,max);      //有~或/时是否合理
         const hasSymbol = /[\/|\~]/g.test(text);           //是否有~或/
-        const singleFine = !isNaN(+text)&&min<text&&text<max;   //无~或/时是否合理
+        const singleFine = !isNaN(+text)&&parseFloat(min)<=parseFloat(text)&&parseFloat(text)<=parseFloat(max);   //无~或/时是否合理
         timer = setTimeout(function(){
           clearTimeout(that.state.sltTimer);
           if(text!=''&&(!hasSymbol&&!singleFine)||(hasSymbol&&!isFine)){
@@ -139,7 +139,7 @@ class NumberDrop extends Component{
     if(index1!=-1&&index1==txt.lastIndexOf('~')&&index1!=txt.length-1){   //有且只有一个~,且不在最后
       arr1 = txt.split('~');
       //~的范围在合理范围内为合理值
-      if(!isNaN(+arr1[0])&&!isNaN(+arr1[1])&&((!needCompare)||(needCompare&&min<arr1[0]&&arr1[0]<max&&min<arr1[1]&&arr1[1]<max))){
+      if(!isNaN(+arr1[0])&&!isNaN(+arr1[1])&&((!needCompare)||(needCompare&&parseFloat(min)<=parseFloat(arr1[0])&&parseFloat(arr1[0])<=parseFloat(max)&&parseFloat(min)<=parseFloat(arr1[1])&&parseFloat(arr1[1])<=parseFloat(max)))){
         return true
       }
       return false;
@@ -147,7 +147,7 @@ class NumberDrop extends Component{
     if(index2!=-1&&index2==txt.lastIndexOf('/')&&index2!=txt.length-1){   //有且只有一个~,且不在最后
       arr2 = txt.split('/');
       // /两边的数字分别在合理范围内为合理值
-      if(!isNaN(+arr2[0])&&!isNaN(+arr2[1])&&((!needCompare)||(needCompare&&min<arr2[0]&&arr2[0]<max&&min<arr2[1]&&arr2[1]<max))){
+      if(!isNaN(+arr2[0])&&!isNaN(+arr2[1])&&((!needCompare)||(needCompare&&parseFloat(min)<=parseFloat(arr2[0])&&parseFloat(arr2[0])<=parseFloat(max)&&parseFloat(min)<=parseFloat(arr2[1])&&parseFloat(arr2[1])<=parseFloat(max)))){
         return true
       }
       return false;
@@ -166,7 +166,7 @@ class NumberDrop extends Component{
       const txt = e.target.innerText.trim();
       const isFine = this.validSymbols(txt,min,max);      //有~或/时是否合理
       const hasSymbol = /[\/|\~]/g.test(txt);           //是否有~或/
-      const singleFine = (!isNaN(+txt)&&!needCompare)||(!isNaN(+txt)&&needCompare&&min<txt&&txt<max);   //无~或/时是否合理
+      const singleFine = (!isNaN(+txt)&&!needCompare)||(!isNaN(+txt)&&needCompare&&parseFloat(min)<=parseFloat(txt)&&parseFloat(txt)<=parseFloat(max));   //无~或/时是否合理
       if(txt!=''&&(!hasSymbol&&!singleFine)||(hasSymbol&&!isFine)){
         this.beyondArea();
         return;

+ 6 - 4
src/components/Preview/index.jsx

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import {getAllDataList,getAllDataStringList} from '@utils/tools';
+import {getAllDataList,getAllDataStringList,dragBox} from '@utils/tools';
 import PreviewBody from '../PreviewBody';
 import store from '@store';
 import style from "./index.less";
@@ -9,7 +9,9 @@ class Preview extends Component {
   constructor(props) {
     super(props)
   }
-
+  componentDidMount(){
+    dragBox('previewWrapper','previewStatic')
+  }
   render() {
     const { onClose, visible,preInfo } = this.props;
     let baseList = store.getState();
@@ -18,8 +20,8 @@ class Preview extends Component {
 
     return <div className={style['container']} style={visible? {display: 'block'}: {display: 'none'}}>
       <div className={style['shade']} onClick={onClose}></div>
-      <div className={style['modal']}>
-        <div className={style['close']}>预览<img src={close} onClick={onClose} /></div>
+      <div className={style['modal']} id="previewWrapper">
+        <div id="previewStatic" className={`${style['close']} drag-title`}>预览<img src={close} onClick={onClose} /></div>
         <PreviewBody
             preInfo={preInfo}
             dataJson={dataJson}

+ 4 - 2
src/components/Preview/index.less

@@ -18,8 +18,10 @@
     position: fixed;
     left: 50%;
     margin-left: -410px;
-    top: 65px;  
-    bottom: 65px;
+    top: 7%;  
+    bottom: 7%;
+    height: 86%;
+    overflow: hidden;
   }
   .close { 
     padding:  15px 15px 15px 20px;

+ 13 - 12
src/components/PreviewBody/index.jsx

@@ -223,20 +223,21 @@ class PreviewBody extends Component {
         </table>
         <p style={{textAlign:'right',marginTop:'15px'}}>医生签名:<span style={{minWidth: '60px',padding: '0 5px 2px 5px',borderBottom: '1px solid #333',}}>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
         {showAssessBtn?<AssessResultHis inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
+        
+        <div onClick={() => { this.surePrint(dataStr) }} style={{
+          display: show ? 'inline-block' : 'none',
+          padding: '10px 20px',
+          float: 'right',
+          marginTop: '22px',
+          background: '#3B9ED0',
+          color: '#fff',
+          borderRadius: '4px',
+          cursor: 'pointer',
+          position: 'absolute',
+          right: '-40px'
+        }}>打印</div>
       </div>
 
-      <div onClick={() => { this.surePrint(dataStr) }} style={{
-        display: show ? 'inline-block' : 'none',
-        padding: '10px 20px',
-        float: 'right',
-        marginTop: '15px',
-        background: '#3B9ED0',
-        color: '#fff',
-        borderRadius: '4px',
-        cursor: 'pointer',
-        position: 'absolute',
-        right: '40px'
-      }}>打印</div>
     </div>
   }
 }

+ 5 - 4
src/components/PreviewBody/index.less

@@ -1,11 +1,12 @@
 @import "~@less/variables.less";
 .content {
-  position: fixed;
-  bottom: 70px;
+  position: relative;
   overflow: auto;
-  top:120px;
+  height: 100%;
+  top:0px;
   width: 820px;
-  padding: 0 0px 60px 0px;
+  padding: 15px 0px 100px 0px;
+  box-sizing: border-box;
   .contents {
     position: relative;
     padding-bottom: 26px;

+ 6 - 3
src/components/PrintPreview/index.jsx

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { getAllDataList, getAllDataStringList,filterDataArr } from '@utils/tools';
+import { getAllDataList, getAllDataStringList,dragBox } from '@utils/tools';
 import style from "./index.less";
 import PreviewBody from "../PreviewBody";
 import store from '@store';
@@ -11,6 +11,9 @@ class PrintPreview extends Component {
     constructor(props) {
         super(props)
     }
+    componentDidMount(){
+      dragBox('previewPrintWrapper','previewPrintStatic')
+    }
     render() {
         const { onClose, visible, preInfo,save } = this.props;
         let baseList = store.getState();
@@ -19,8 +22,8 @@ class PrintPreview extends Component {
 
         return <div className={style['container']} style={visible ? { display: 'block' } : { display: 'none' }}>
             <div className={style['shade']} onClick={onClose}></div>
-            <div className={style['modal']}>
-                <div className={style['close']}>打印<img src={close} onClick={onClose} /></div>
+            <div className={style['modal']} id="previewPrintWrapper">
+                <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印<img src={close} onClick={onClose} /></div>
                   <PreviewBody
                       preInfo={preInfo}
                       dataJson={dataJson}

+ 4 - 2
src/components/PrintPreview/index.less

@@ -18,8 +18,10 @@
       position: fixed;
       left: 50%;
       margin-left: -410px;
-      top: 65px;  
-      bottom: 65px;
+      top: 7%;  
+      bottom: 7%;
+      height: 86%;
+      overflow: hidden;
     }
     .close { 
       padding:  15px 15px 15px 20px;

+ 12 - 8
src/components/PushItems/DetailsModal/index.jsx

@@ -4,6 +4,7 @@ import NewPortal from './NewPortal'
 import close from "./../img/close.png";
 import $ from "jquery";
 import { imageUrlPrefix } from '@utils/config.js';
+import { dragBox } from '@utils/tools';
 class DetailsModal extends Component {
     constructor(props) {
         super(props);
@@ -12,6 +13,9 @@ class DetailsModal extends Component {
         }
         this.hideTips = this.hideTips.bind(this)
     }
+    componentDidMount(){
+      dragBox('detailsContentWrap','detailsContentTitle')
+    }
     hideTips() {
         const { hideTips } = this.props;
         hideTips && hideTips();
@@ -46,15 +50,14 @@ class DetailsModal extends Component {
         }
     }
     
-    
-
     render() {
         const {showTipsDetails, tipsDetails} = this.props;
         const { currentIndex } = this.state
-        return (<NewPortal visible={showTipsDetails}>
-        <div className={styles['details-wrapper']}>
-           <div className={styles['details-content-wrapper']}>
-                <h1 className={styles['details-content-name']} >{tipsDetails && tipsDetails.tagName} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
+        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}>
@@ -85,8 +88,9 @@ class DetailsModal extends Component {
            </div>
            <div className={styles['details-mask']} onClick={this.hideTips}>
            </div>
-        </div>
-    </NewPortal>)
+        </div>,
+          domNode
+      )
     }
 }
 

+ 2 - 0
src/components/ScaleTable/index.jsx

@@ -153,6 +153,8 @@ class ScaleTable extends React.Component{
         that.setState({
           scaleResult1:res.data.data
         })
+      }else{
+        Notify.error(res.data.msg||'计算没有结果返回');
       }
     })
   }

+ 1 - 1
src/components/TemplateItems/TemplateItem/index.jsx

@@ -158,7 +158,7 @@ class TemplateItem extends React.Component {
                 <div className={ 
                     allCheckShow?
                     `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`:
-                    `${style["title-wrapper"]} ${style["clearfix"]}`} 
+                    `${style["title-wrapper"]} ${style["clearfix"]}`}
                     onClick={this.handleTitleClick}
                 >
                     {

+ 1 - 4
src/components/Treat/DrugTreat/index.jsx

@@ -74,16 +74,13 @@ class DrugTreat extends Component {
         const drugIdList = this.state.drugIdList.split(' ')
         setDrugInfoMore({drugIdList: drugIdList})
         showDrugInfo && showDrugInfo();
-
     }
+    
     showTreatDesc() {
         $('#treatDescBox').css({'display': 'block'});
         $('#treatWrapper').animate({'margin-left': '-471px','left':'50%'}, 300);
         $('#treatDescBox').animate({'width': '260px'}, 500);
-        
     }
-    
-
 
     render(){
         const { treatment,showDrugInfo } = this.props

+ 2 - 2
src/containers/eleType.js

@@ -77,8 +77,8 @@ export function singleRadio(params){
                         id={data.id}
                         ikey={showInx}></InlineTag>;
     case 7:
-      const min = data.minValue!=null&&data.minValue!=undefined?data.minValue-1:undefined;
-      const max = data.maxValue!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
+      const min = data.minValue;//!=null&&data.minValue!=undefined?data.minValue-1:undefined;
+      const max = data.maxValue;//!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
       return <NumberDrop prefix={data.labelPrefix}
                          suffix={data.labelSuffix}
                          min={min}

+ 1 - 1
src/main.js

@@ -7,7 +7,7 @@ import store from './store';
 import {AppContainer} from 'react-hot-loader';
 import HomePage from './modules/HomePage';
 import $ from 'jquery';
-import "@utils/jqPrint";
+import "@utils/jqprint";
 
 const render = (Component) => {
   //ie8 console兼容

+ 4 - 4
src/store/actions/currentIll.js

@@ -21,8 +21,8 @@ function insertPro(data,processModule){
 export const setModule = (state,action)=>{
   const res = Object.assign({},state);
   // 处理tagType=4的类型
-  const originalData = action.data;
-  const originalSonData = action.processModule;
+  const originalData = action.data||[];
+  const originalSonData = action.processModule||[];
   let spreadLabels=[];
   let sonSpreadLabels=[];//子模板
   if(originalData&&originalData.length>0){
@@ -51,12 +51,12 @@ export const setModule = (state,action)=>{
   res.emptyData = action.emptyData;//空模板
   let data = action.data;
   let sliceIdx;
-  data.map((v,i)=>{
+  data&&data.map((v,i)=>{
     if(v.flag && v.flag==2){
       sliceIdx = i;
     }
   })
-  res.addModule = data.slice(0,sliceIdx+1);//截取到flag=2 有无治疗
+  res.addModule = data&&data.slice(0,sliceIdx+1);//截取到flag=2 有无治疗
   res.update=Math.random();
   return res;
 }

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

@@ -24,8 +24,8 @@ export const setMainMoudle = (state,action) => {
   // let data = action.data.push(emptySpan);
   // 处理tagType=4的类型
   // const originalData = JSON.parse(JSON.stringify(action.data));
-  const originalData = action.data;
-  const originalSonData = action.addSymptom;
+  const originalData = action.data||[];
+  const originalSonData = action.addSymptom||[];
   let spreadLabels=[];
   let sonSpreadLabels=[];//子模板
   if(originalData){

+ 3 - 1
src/store/async-actions/fetchModules.js

@@ -315,6 +315,8 @@ export function autoFillModules (){
   return (dispatch,getStore)=>{
     const state = getStore();
     const initData = state.homePage.initData;
+    const block = Object.assign(JSON.parse(config.textLabel),{full:true});
+    const cbody = initData.checkbody?[...initData.checkbody]:[block];
     dispatch({type: CURRENT_CHRONIC})//现病史
     //其他史模板填充-先去历史,无历史用模板
     inspectAndAssist()//化验辅检
@@ -322,7 +324,7 @@ export function autoFillModules (){
     //查体模板填充
     dispatch({
       type: SET,
-      data: [...initData.checkbody],
+      data: cbody,
       isEmpty:false
     });
   }

+ 3 - 4
src/store/async-actions/homePage.js

@@ -39,10 +39,9 @@ export const getInitModules= (dispatch,getStore)=>{
   const param = {
     age:message.patientAge,
     sexType:message.sex,
-    mouduleType:chronicId?2:(message.hospitalDeptId?1:0),//慢病2  科室1 其他0
-    relationId:chronicId?chronicId:(message.hospitalDeptId?message.hospitalDeptId:0), //慢病id  科室id  其他0
-    // mouduleType:2,
-    // relationId:21773, //慢病id  科室id  其他0
+    mouduleType:chronicId?2:(message.selfDeptId?1:0),//慢病2  科室1 其他0
+    // relationId:chronicId?chronicId:(message.hospitalDeptId?message.hospitalDeptId:0), //慢病id  科室id  其他0
+    relationId:chronicId?chronicId:(message.selfDeptId?message.selfDeptId:0), //慢病id  科室id  其他0
   }
   // return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {
   return json(api.getModules,param).then((res) => {

+ 41 - 8
src/store/async-actions/patInfo.js

@@ -67,7 +67,46 @@ export const initHistoryDetails = (dispatch) => {
         })
     }
 }
+//技术部需求,先获取第一个接口再去第二个
+export async function getPatientMessage(dispatch, getState){
+  const state = getState();
+  const urlDatas = state.getInfoByUuid;
+  const params = {
+    hospitalCode:urlDatas.hospitalId,
+    hospitalDeptCode: urlDatas.deptNo,
+    doctorCode: urlDatas.doctorNo,
+    patientCode:urlDatas.patientNo,
+    recordId:urlDatas.recordId
+  };
+  let res1 = await json(api.getPatInfo, params);
+  /*console.log(res1);
+  console.log(1);*/
+  let res2 = await json(api.getPatBaseInfo, params);
+  /*console.log(res2);
+  console.log(2);*/
+  let data1 = {},data2={};
+  if(res1.data.code=='0'){
+    data1 = res1.data.data;
+  }
+  if(res2.data.code=='0'){
+    data2 = res2.data.data;
+  }
+  dispatch({
+    type: GET_PATIENT_MESSAGE,
+    data:Object.assign(data1,data2)
+  });
+  //设置初始模式
+  dispatch({
+    type: CONFIRM_TYPE,
+    confirmType:data1.modeValue
+  });
+  dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
+  dispatch(getCommonList(5));     //获取常用化验标签列表
+  dispatch(getCommonList(6));     //获取常用辅检标签列表if(allModules.length == 0){//模板为空才回读
+  dispatch(initHistoryDetails());      //历史病历回读
+}
 
+/*
 export const getPatientMessage = (dispatch, getState) => {
   const state = getState();
   const urlDatas = state.getInfoByUuid;
@@ -97,12 +136,6 @@ export const getPatientMessage = (dispatch, getState) => {
         type: CONFIRM_TYPE,
         confirmType:data1.modeValue
       });
-      dispatch(getInitModules);       //确保病人信息获取以后再获取模板等数据,否则参数为空
-      dispatch(getCommonList(5));     //获取常用化验标签列表
-      dispatch(getCommonList(6));     //获取常用辅检标签列表if(allModules.length == 0){//模板为空才回读
-      dispatch(initHistoryDetails());      //历史病历回读
-      // if(state.tabTemplate.items.length == 0){
-      //   dispatch(initItemList(data1.modeValue));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
-      // }
+      dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
     })
-};
+};*/

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

@@ -137,7 +137,7 @@ export const getTableList = (id)=>{
     return (dispatch,getState)=>{
         json(api.getTableList, {disId:id})
         .then((res)=>{
-            if(res.data.code==0){
+            if(res.data.code==0 && res.data.data && res.data.data.length>0){
                 dispatch({
                     type: SET_CHRONIC_TABLELIST,
                     data: res.data.data
@@ -148,7 +148,7 @@ export const getTableList = (id)=>{
                     value:true
                 })
             }else{
-                Notify.info(res.data.msg)
+                Notify.info(res.data.msg||'无关联量表')
             }
         }).catch((e) => {
             console.log(e)

+ 6 - 4
src/utils/tools.js

@@ -772,11 +772,11 @@ function getPageLength(event) {     //兼容ie8获取页面距离左和上的距
   return page;
 }
 function dragBox(domWrap,domDrag){
-  console.log(domWrap,domDrag,'拖拽')
+  // console.log(domWrap,domDrag,'拖拽')
   let drag = document.getElementById(domDrag);//拖拽区域
   let wrap = document.getElementById(domWrap);//被拖拽的元素
   let wrapHeight = wrap.offsetHeight;//被拖拽的元素高度
-  let wrapWidth = wrap.offsetWidth;//被拖拽的元素
+  let wrapWidth = wrap.offsetWidth;//被拖拽的元素
   let width = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;//屏幕宽度
   let height = window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;//屏幕高度
   let mouseX = 0,mouseY = 0,dragX = 0,dragY = 0,isDrag = false,isMove = false;
@@ -797,14 +797,15 @@ function dragBox(domWrap,domDrag){
     // }
     isDrag = false
     return false
-  },drag)
+  },document)
 
   function handleMove(event){      //移动的
     let dragDes = document.getElementById('treatDescBox');//展開区域
     let page = getPageLength(event);
     let maxDragX = 0,dragDesWidth = 0;
     let maxDragY = height - wrapHeight;//最大可拖拽y方向距离
-  
+    wrapHeight = wrap.offsetHeight;
+    wrapWidth = wrap.offsetWidth;
     if(domDrag == 'dragTreatTitle'){//最大可推拽x方向距离
       if(dragDes != null){
         dragDesWidth = dragDes.offsetWidth
@@ -829,6 +830,7 @@ function dragBox(domWrap,domDrag){
           dragX = maxDragX
         }
       }else{
+        // console.log(width,dragX,maxDragX,wrapWidth)
         if(width-dragX < wrapWidth){    //不能超出右边界
           dragX = maxDragX
         }