Browse Source

Merge remote-tracking branch 'origin/master' into testedMerge

zhouna 5 years ago
parent
commit
fa868342b5
75 changed files with 553 additions and 1399 deletions
  1. 1 1
      src/common/components/ConfirmModal/index.jsx
  2. 19 24
      src/common/components/EditableSpan/index.jsx
  3. 2 1
      src/common/components/NumberPan/index.less
  4. 1 1
      src/common/components/NumberUnitPan/index.jsx
  5. 1 1
      src/common/components/NumberUnitPan/index.less
  6. 0 1
      src/common/components/SearchBox/index.jsx
  7. 3 1
      src/common/components/SearchBox/index.less
  8. 5 1
      src/common/less/variables.less
  9. 37 0
      src/components/AddAssistCheck/AssistName/index.jsx
  10. 0 4
      src/components/AddAssistCheck/Textarea/index.jsx
  11. 30 24
      src/components/AddAssistCheck/index.jsx
  12. 1 0
      src/components/AddInspect/SlideExcel/index.less
  13. 1 1
      src/components/AddInspect/SlideSelect/index.jsx
  14. 1 0
      src/components/AddInspect/SlideSelect/index.less
  15. 3 1
      src/components/AddInspect/index.jsx
  16. 2 2
      src/components/AssessResult/ScaleItem/index.jsx
  17. 2 9
      src/components/ChronicInfo/index.jsx
  18. 2 2
      src/components/DiagnosticItem/index.jsx
  19. 15 3
      src/components/DiagnosticItem/index.less
  20. 4 3
      src/components/DiagnosticList/index.jsx
  21. 7 0
      src/components/DiagnosticList/index.less
  22. 4 4
      src/components/MedicalInfo/index.jsx
  23. 1 1
      src/components/MultSpread/index.jsx
  24. 8 8
      src/components/NumberDrop/index.jsx
  25. 1 1
      src/components/NumberDrop/index.less
  26. 3 1
      src/components/PreviewBody/index.jsx
  27. 1 0
      src/components/PreviewBody/index.less
  28. 2 2
      src/components/PushItems/PushDiag/index.jsx
  29. 11 4
      src/components/PushItems/RecommendInspect/index.jsx
  30. 2 0
      src/components/PushItems/RecommendInspect/index.less
  31. 2 5
      src/components/PushItems/index.jsx
  32. 10 80
      src/components/RadioInpDrop/index.jsx
  33. 5 5
      src/components/ScaleSearch/index.jsx
  34. 0 1
      src/components/ScaleSearch/index.less
  35. 2 2
      src/components/TemplateItems/index.jsx
  36. 1 1
      src/components/Treat/AdverseReactions/index.jsx
  37. 4 9
      src/components/Treat/DrugTreat/index.jsx
  38. 5 0
      src/components/Treat/DrugTreat/index.less
  39. 6 9
      src/components/TreatDesc/index.jsx
  40. 5 0
      src/components/TreatDesc/index.less
  41. 4 0
      src/config/index.js
  42. 1 5
      src/containers/CurrentIll.js
  43. 4 3
      src/containers/DiagnosticList.js
  44. 0 3
      src/containers/InlineTag.js
  45. 7 1
      src/containers/PushItemsContainer.js
  46. 8 62
      src/containers/RadioInpDrop.js
  47. 1 1
      src/containers/SpreadDrop.js
  48. 1 0
      src/containers/eleType.js
  49. 2 236
      src/store/actions/checkBody.js
  50. 7 3
      src/store/actions/copyRight.js
  51. 0 216
      src/store/actions/currentIll.js
  52. 0 203
      src/store/actions/mainSuit.js
  53. 36 207
      src/store/actions/otherHistory.js
  54. 1 0
      src/store/actions/treat.js
  55. 1 1
      src/store/async-actions/copyRight.js
  56. 3 14
      src/store/async-actions/fetchModules.js
  57. 4 17
      src/store/async-actions/historyTemplates.js
  58. 3 1
      src/store/async-actions/mainSuit.js
  59. 4 2
      src/store/async-actions/patInfo.js
  60. 9 27
      src/store/async-actions/pushMessage.js
  61. 3 1
      src/store/async-actions/tabTemplate.js
  62. 1 1
      src/store/async-actions/treat.js
  63. 5 6
      src/store/reducers/checkBody.js
  64. 5 6
      src/store/reducers/currentIll.js
  65. 9 8
      src/store/reducers/mainSuit.js
  66. 6 7
      src/store/reducers/otherHistory.js
  67. 3 1
      src/store/reducers/pushMessage.js
  68. 0 1
      src/store/types/checkBody.js
  69. 0 1
      src/store/types/currentIll.js
  70. 0 1
      src/store/types/mainSuit.js
  71. 0 1
      src/store/types/otherHistory.js
  72. 1 0
      src/store/types/pushMessage.js
  73. 2 2
      src/utils/config.js
  74. 20 148
      src/utils/tools.js
  75. 192 0
      src/utils/utils.js

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

@@ -130,7 +130,7 @@ class ConfirmModal extends Component {
         return (
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
-                    <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, height:height, marginTop:marginTop}}>
+                    <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, minHeight:height, marginTop:marginTop}}>
                         <div className={styles['modal-title']} style={{background: titleBg}}>
                             {icon?<img src={icon} className={styles['icon']}/>:''}
                             {title ? title : ''} 

+ 19 - 24
src/common/components/EditableSpan/index.jsx

@@ -1,7 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import config from "@config/index";
-import {filterArr,isIE,getPageCoordinate,filterDataArr} from '@utils/tools.js';
+import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 import classNames from 'classnames';
 
@@ -41,6 +41,15 @@ class EditableSpan extends Component{
   }
   handleFocus(e){
     e.stopPropagation();
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$span.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$span.current.innerText||that.$span.current.innerHTML;
+        that.$span.current.innerHTML = txt;
+      });
+    })
     const {mainSaveText,full,setFocusIndex,i,boxMark,value}= this.props;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==3||+boxMark==4){         //主诉为空,且第一次聚焦其他史查体时提示且不可输入
@@ -69,7 +78,7 @@ class EditableSpan extends Component{
     if(+boxMark==1){
       if(mainText.length >= config.limited){
         if(text1.length > labelVal.length){
-          e.target.innerText = labelVal;
+          e.target.innerHTML = labelVal;    //innerHTML兼容FF26
           Notify.info(config.limitText);
           return
         }else if(text1.length == labelVal.length){
@@ -100,13 +109,10 @@ class EditableSpan extends Component{
       clearTimeout(that.state.timer);
       temp = newText.replace(searchPre,'');
       isEnd = !(newText.indexOf(searchPre)>0);
-      // search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
       search = temp.replace(config.regPreAndAft,'');
-      // if(!search&&searchPre){
       if(!temp&&searchPre&&newText){
         search = searchPre;
       }
-      //console.log(labelVal,'旧:',searchPre,'新:',newText,'搜索:',search);
       if(config.punctuationReg.test(search)){    //只有标点符号时不搜索
         handleSearch&&handleSearch({text:search,isEnd,boxMark,mainIds});
       }else{//只有标点符号时要清空搜索结果
@@ -123,16 +129,9 @@ class EditableSpan extends Component{
   }
 
   handleBlur(e){//为了阻止冒泡事件
-    const {boxMark,handleClear,handleChange,i} = this.props;
     e.stopPropagation();
-    // 延时清空搜索结果,不延时会影响选中
-    /*clearTimeout(this.state.clearTimer);
-    const clearTimer = setTimeout(function(){
-      handleClear && handleClear({boxMark})
-    },config.delayTime);
-    this.setState({
-      clearTimer
-    });*/
+    //解除绑定事件
+    $(this.$span.current).off("paste");
   }
 
   moveEnd(obj) {
@@ -171,11 +170,7 @@ class EditableSpan extends Component{
       let preObj = $(this.$span.current).prev();
       let obj = preObj[0]&&preObj[0].nodeName=="DIV"?preObj.prev():preObj;
       if(textIndex == 0){
-        if(ev.preventDefault){//阻止默认事件
-          ev.preventDefault();
-        }else{
-          ev.returnValue=false;
-        }
+        preventDefault(ev);
         if(obj){
           this.moveEnd(obj[0]);
         }
@@ -185,11 +180,7 @@ class EditableSpan extends Component{
       let nextObj = $(this.$span.current).next();
       let obj = nextObj[0]&&nextObj[0].nodeName=="DIV"?nextObj.next():nextObj;
       if(textIndex == textLength || textLength==undefined || (textIndex == 0 && textLength==1)){
-        if(ev.preventDefault){//阻止默认事件
-          ev.preventDefault();
-        }else{
-          ev.returnValue=false;
-        }
+        preventDefault(ev);
         if(obj){
           obj.focus();
         }
@@ -306,6 +297,10 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const $span = this.$span.current;
+    if(br&&$span&&!$span.innerText){
+      this.$span.current.innerHTML='&nbsp;';
+    }
     return classNames(style['editable-span'],isFull,unselect,hasBr);
   }
 

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

@@ -5,7 +5,7 @@
 }
 .pan{
   width: 280px;
-  
+  line-height: unset;
   td{
     width: 68px;
     height:44px;
@@ -35,6 +35,7 @@
     padding-left: 14px;
     font-size: 14px;
     line-height: normal;
+    bottom: 0;    /*覆盖其他样式*/
   }
   .imgN{
     text-align: right;

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

@@ -107,7 +107,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 onClick={(e)=>e.stopPropagation()}></td>
+          <td><span onClick={this.handleSelect}>秒</span></td>
           <td className={style['imgN']}><img src={backspace} onClick={this.handleBack.bind(this)} /></td>
         </tr>
         <tr>

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

@@ -26,7 +26,7 @@
   }
    .imgN{
     text-align: right;
-    vertical-align: middle;
+    vertical-align: bottom;
     padding-right: 8px;
     cursor: pointer;
   } 

+ 0 - 1
src/common/components/SearchBox/index.jsx

@@ -101,7 +101,6 @@ class SearchBox extends React.Component {
     }
     componentWillReceiveProps(next){
       // 隐藏时,清空搜索框内文字,清空搜索结果,隐藏搜索框
-      const { clearSearch } = this.props;
       if(!next.show && next.show != this.props.show){
         this.reset();
       }

+ 3 - 1
src/common/components/SearchBox/index.less

@@ -14,6 +14,7 @@
       width: 300px;
       background: #fff;
       border: 1px solid #ccc;
+        margin-top: 10px;
        ul{
         li:hover{
           border: 1px solid #3B9ED0;
@@ -24,7 +25,8 @@
         width: 100%;
         height: 34px;
         line-height: 34px;
-        padding: 0 32px;
+        padding: 0px 32px;
+        margin-bottom: -10px;
         box-sizing: border-box;
     }
     input::ms-clear{

+ 5 - 1
src/common/less/variables.less

@@ -177,7 +177,11 @@
 .hide{
   display: none!important;
 }
-
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 .llStyle{
   box-shadow: 0 10px 20px 0 #989DA3;
   // filter:progid:DXImageTransform.Microsoft.Shadow(color='#989DA3',Direction=125,Strength=6);

+ 37 - 0
src/components/AddAssistCheck/AssistName/index.jsx

@@ -0,0 +1,37 @@
+import React, { Component } from "react";
+import styles from "../index.less";
+import $ from 'jquery';
+import { windowEventHandler } from '@utils/tools';
+
+class AssistName extends Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+
+		};
+		this.$assistName = React.createRef();
+		this.splitName = this.splitName.bind(this);
+	}
+	splitName(name){
+		let wid = this.props.winWidth;
+		if(name.length>15 && wid>1150){
+			let tmpStr = name.substr(0,15)
+			return tmpStr+'...'
+		}else{
+			return name
+		}
+	}
+	render() {
+		const { winWidth, name, getInfomation } = this.props;
+		return (
+				<span className={styles.assistName} style={{ width: winWidth < 1150 ? '120px' : 'auto' }} ref={this.$assistName}>
+					<span className={styles.tagSpan} title={name}>
+						{name&&this.splitName(name)}:
+            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span>
+					</span>
+				</span>
+		);
+	}
+}
+
+export default AssistName;

+ 0 - 4
src/components/AddAssistCheck/Textarea/index.jsx

@@ -2,7 +2,6 @@ import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
-import {windowEventHandler} from '@utils/tools';
 
 class Textarea extends Component {
   constructor(props) {
@@ -65,9 +64,6 @@ class Textarea extends Component {
     }else{
       this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '报告描述或意见'):(this.$dom.current.nextSibling.innerHTML = '报告描述或意见')
     }
-    windowEventHandler('resize', ()=>{
-      $(".TextareaRsize").css({marginTop:0})
-    });
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();

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

@@ -3,6 +3,7 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
+import AssistName from './AssistName';
 import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
 
@@ -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){
@@ -193,6 +195,7 @@ class AddAssistCheck extends React.Component {
       width:'8px',
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
+    $(".TextareaRsize").css({marginTop:0})
     return <React.Fragment>
       {
         checkedListImport.map((part,index)=>{
@@ -200,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}
@@ -252,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}
@@ -295,7 +301,7 @@ class AddAssistCheck extends React.Component {
           })
         }
       </ul>
-    </React.Fragment> 
+    </React.Fragment>
   }
   render() {
     const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;

+ 1 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -175,6 +175,7 @@
   }
 }
 .tagSpan {
+  display: inline-block;
   position: relative;
 }
 .tagSpan:hover {

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

@@ -121,7 +121,7 @@ class SlideSelect extends Component {
     const listLen = currentData.details&&currentData.details.length;
     const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
-      <li key={item.questionId} className={styles.slideLi}> 
+      <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
         {
             // 标签,血常规。。
             item.show ?

+ 1 - 0
src/components/AddInspect/SlideSelect/index.less

@@ -189,6 +189,7 @@
     background-size: 100% auto; 
   }
 .tagSpan {
+  display: inline-block;
   position: relative;
 }
 .tagSpan:hover {

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

@@ -316,7 +316,9 @@ class Inspect extends React.Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+    if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''){
+      dom = getStatusImg(0, value, 1)
+    }else if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
       if (isNaN(value)) {//输入的不是数据
         dom = getStatusImg(1, value, 1)
       } else if (value <= min) {//下降

+ 2 - 2
src/components/AssessResult/ScaleItem/index.jsx

@@ -7,7 +7,7 @@ import level1 from "@common/images/级别1.png";
 import checkIcon from '@common/images/check.png';
 import {ComplexModal,MiniToast,Radio} from '@commonComp';
 import Notify from '@commonComp/Notify';
-import {deepClone} from '@utils/tools';
+import {deepClone,preventDefault} from '@utils/tools';
 import { getFormulaResult } from '@store/async-actions/fetchModules'
 /**
  * 来源于页面选择
@@ -79,7 +79,7 @@ class ScaleItem extends Component {
   handleReg(e){   //只能输入数字和特殊符号
     const key = e.key;
     if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      e.preventDefault();
+      preventDefault(e);
     }
   }
   handleInputformula(id,calcuContent,i,e) {

+ 2 - 9
src/components/ChronicInfo/index.jsx

@@ -232,13 +232,6 @@ class ChronicInfo extends React.Component{
     this.closeFormula(it);
     chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
   }
-  handleReg(e){   //只能输入数字和特殊符号
-    //const hasDot = e.target.value.indexOf('.')!=-1;
-    // const key = e.key;
-    // if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-    //   e.preventDefault();
-    // }
-  }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;
     let obj = deepClone(calcuValues);
@@ -450,7 +443,7 @@ class ChronicInfo extends React.Component{
                                           <span>{item.isShow == '0' ? item.name+':':'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
+                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
                                         </td>
                                         <td>
                                           {item.isShow != '0'&&<span>{item.uint}</span>}
@@ -553,7 +546,7 @@ class ChronicInfo extends React.Component{
         <div className={className(style["tips-title"],style["chronic"],"clearfix")} onClick={this.slideToggle}>
           <div className={style["tips-name"]}>
             <img src={chronicPic} />
-            <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span></h2>
+            <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(根据病人病历情况进行的动态提示和评估)</span></h2>
           </div>
           <div className={style['toggle-btn']}>
             <img src={slideUp?down:up} alt="展开/收起"/>

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

@@ -102,13 +102,13 @@ class DiagnosticItem extends Component{
         const { visible,hasEnterItem,hasEnterImg } = this.state
         const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
-                    <span className={`${style['diag-name']} ${type == 'search' ? style['diag-name-search'] : ''}`} 
+                    <span className={`${style['diag-name']}`} 
                           title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           >
-                        {item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}
+                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}</p>
                         {type== 'disSelect' &&<img className={style['info-img']}  
                                 title='点击i图标可查看详细说明'
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}

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

@@ -1,9 +1,9 @@
 .confirm-info {
-    height: 70px;
+    min-height: 70px;
     font-size: 16px;
-    line-height: 16px;
+    line-height: 20px;
     text-align: center;
-    padding: 10px 30px;
+    padding: 10px 20px 20px;
 }
 .diag-item {
     display: inline-block;
@@ -14,6 +14,18 @@
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+.diag-name-box {
+    display: inline-block;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.diag-name-search {
+    max-width: 250px;
+}
+.diag-name-disSelect {
+    max-width: 340px;
+}
 .diag-name {
     position: relative;
     display: inline-block;

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

@@ -241,6 +241,7 @@ class DiagnosticList extends Component {
         this.props.getBilling();
       }
     }
+   
     handleEnterDel(index) {
       this.setState({
         hasOnIndex: index,
@@ -274,7 +275,7 @@ class DiagnosticList extends Component {
       })
     }
     render(){
-        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller} = this.props;
+        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth} = this.props;
         const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
@@ -288,7 +289,7 @@ class DiagnosticList extends Component {
                         const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
                         isChronic = chronicMagItem&&item.type==2&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
-                        return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.conceptId} >
+                        return (<div draggable={true} className={style['diag-box'] + ' clearfix'} id="diagListBox" key={item.conceptId} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
@@ -296,7 +297,7 @@ class DiagnosticList extends Component {
                                        onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
                                        onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                     >
-                                      <span  onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                      <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}} onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
                                         {item.name}
                                       </span>
                                       <img className={style['info-img']}  

+ 7 - 0
src/components/DiagnosticList/index.less

@@ -50,6 +50,7 @@
 
 
 .diag-name {
+   
     margin-left: 10px;
     border-bottom: 1px solid #666;
     box-sizing: border-box;
@@ -58,6 +59,12 @@
     font-weight: bold;
     cursor: pointer;
 }
+.diag-name-box {
+    .ellipsis;
+    display: inline-block;
+    line-height: 16px;
+    // max-width: 220px;
+}
 
 .diag-up, .diag-down {
     position: relative;

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

@@ -25,7 +25,7 @@ class MedicalInfo extends Component {
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
@@ -83,15 +83,15 @@ class MedicalInfo extends Component {
       clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

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

@@ -203,10 +203,10 @@ class MultSpread extends Component{
                              saveDoms={this.saveDoms.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
                              setBMI={this.setBMI}
+                             formulaCode={it.formulaCode}
                              wrBmi={wrBmi}
                              bmi={bmi}
                              setBMIParam={this.setBMIParam}
-                             formulaCode={it.formulaCode}
                              num = {count++}
                              min={min}
                              max={max}

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

@@ -38,7 +38,7 @@ class NumberDrop extends Component{
     let timer = null;
     clearTimeout(this.state.sltTimer);
     clearTimeout(this.state.blurTimer);
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,formulaCode} = this.props;
     const needCompare=min!=undefined&&max!=undefined;
     if(!text){
       this.setState({
@@ -64,7 +64,7 @@ class NumberDrop extends Component{
       });
     }
 
-    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText,formulaCode});
     //BMI相关数据上传
     this.emitBMIData(text);
   }
@@ -85,9 +85,9 @@ class NumberDrop extends Component{
     }
   }
   beyondArea(){
-    const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,formulaCode} = this.props;
     Notify.info("输入数值不符合规范,请重新输入!");
-    handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
     this.emitBMIData('');
     this.setState({
       placeholder:this.props.placeholder,
@@ -153,7 +153,7 @@ class NumberDrop extends Component{
   }
   numInpBlur(e){        //数字框失焦,保存值到store中
     e.stopPropagation();
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show,formulaCode} = this.props;
     /*if(show){      //修改清空后第一次点击键盘不触发click事件bug--失焦placehoder消失,弃用
       return;
     }*/
@@ -184,7 +184,7 @@ class NumberDrop extends Component{
     const {placeholder} = this.state;
     let text = val===placeholder?'':val;
     //e.target.innerText = '';      //避免出现重复输入值
-    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText,formulaCode});
     this.emitBMIData(text);
   }
   handleSpanInp(e){   //数字框输入事件
@@ -227,11 +227,11 @@ class NumberDrop extends Component{
     //BMI存值
     const {formulaCode,bmi,suffix,prefix,ikey,handleSelect,mainSaveText,wrBmi} = this.props;
     if(formulaCode==="BMI_RES"&&nextProps.bmi!==bmi){
-      handleSelect&&handleSelect({ikey,text:nextProps.bmi,suffix,prefix,mainSaveText});
+      handleSelect&&handleSelect({ikey,text:nextProps.bmi,suffix,prefix,mainSaveText,formulaCode});
     }
     //手动修改BMI时身高体重清空
     if(wrBmi!==nextProps.wrBmi&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
-      handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
+      handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
     }
 
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){

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

@@ -12,7 +12,7 @@
   .nol,.blued{
     min-width:10px;
     height: 22px;
-    /*vertical-align: bottom;*/
+    vertical-align: bottom;
     display:inline-block;
     text-align:center;
     word-break:break-all;

+ 3 - 1
src/components/PreviewBody/index.jsx

@@ -52,7 +52,9 @@ class PreviewBody extends Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+    if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''){
+      dom = getStatusImg(0, value, 1)
+    }else if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
       if (isNaN(value)) {//输入的不是数据
         dom = getStatusImg(1, value, 1)
       } else if (value <= min) {//下降

+ 1 - 0
src/components/PreviewBody/index.less

@@ -23,6 +23,7 @@ table{
   .patInfoFst .patInfoSec{
     padding: 9px 5px 8px 0px;
     line-height: 20px;
+    word-break: break-all;
   }
   .patInfoFst .patInfoSec:first-child{
     text-align: right;    

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

@@ -47,14 +47,14 @@ class PushDiag extends Component {
         let ItemNum = 0;
         return (<div className={style['push-diag-wrapper']}>
             <h1 className={style['push-diag-title']} style={{background:titleBg}}><img className={style['push-diag-icon']} src={icon} />{title}</h1>
-            <div className={`${style['push-diag-box']} ${domH>50&&showSlide?style['push-diag-more-slide-d']:style['push-diag-more-slide-u']}`} ref={this.$ide}>
+            <div className={`${style['push-diag-box']} ${domH>55&&showSlide?style['push-diag-more-slide-d']:style['push-diag-more-slide-u']}`} ref={this.$ide}>
                 {
                     diagList.map((item, index) => {
                         ItemNum = ItemNum + item.name.length + 1;
                         return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
                     })
                 }
-                {domH>50&&<div onClick={() => this.handleShow()} className={`${style['push-diag-more']} ${showSlide?style['push-diag-more-d']:style['push-diag-more-u']}`}>{showSlide ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showSlide ? showImg : hideImg}/></div>}
+                {domH>55&&<div onClick={() => this.handleShow()} className={`${style['push-diag-more']} ${showSlide?style['push-diag-more-d']:style['push-diag-more-u']}`}>{showSlide ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showSlide ? showImg : hideImg}/></div>}
 
             </div>
         </div>)

+ 11 - 4
src/components/PushItems/RecommendInspect/index.jsx

@@ -20,14 +20,14 @@ class RecommendInspect extends Component {
     
     renderItem(item) {
       const { changeFlag } = this.props
-      return <span>
+      return <span className={style['itemLabelBox']} title={item.name}>
           <input
             id={item.id + item.name}
             onChange={() =>changeFlag(item)}
             type="checkbox"
             checked={item.checked}
           />
-          <label for={item.id + item.name}>{item.name}</label>
+          <label  for={item.id + item.name}>{item.name}</label>
       </span>
     }
 
@@ -40,9 +40,16 @@ class RecommendInspect extends Component {
       let firstLineNum = 0;   //第一行字数
       let secondLineNum = 0;      //第二行字数
       const listHide = list.map((item, index) => {
-        firstLineNum = firstLineNum + item.name.length + 2;
+        let itemNameLen =  item.name.length
+        if(itemNameLen > 24) {
+          itemNameLen = 24
+        }
+        firstLineNum = firstLineNum + itemNameLen + 2;
         if (firstLineNum > 26) {
-          secondLineNum = secondLineNum + item.name.length + 2; 
+          if(itemNameLen > 18) {
+            itemNameLen = 18
+          }
+          secondLineNum = secondLineNum + itemNameLen + 2; 
           if(secondLineNum > 20) {
             return;
           } else {

+ 2 - 0
src/components/PushItems/RecommendInspect/index.less

@@ -17,10 +17,12 @@
             line-height: 26px;
             padding: 0px 0px 0px 0px;
             span{
+              .ellipsis;
               font-size: 14px;
               line-height: 14px;
               display: inline-block;
               margin: 6px;
+              max-width: 280px;
               cursor: pointer;
               input[type='checkbox']{
                 float: left;

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

+ 10 - 80
src/components/RadioInpDrop/index.jsx

@@ -20,18 +20,13 @@ class RadioInpDrop extends Component{
   constructor(props){
     super(props);
     this.state={
-      editable:false,
-      timer:null,
       texts:props.vals||{0:props.value||props.placeholder},
       over:false,
-      tmpDom:null
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
     this.handleSelect = this.handleSelect.bind(this);
     this.handleShow = this.handleShow.bind(this);
-    this.handledbClick = this.handledbClick.bind(this);
-    this.handleEditLabel = this.handleEditLabel.bind(this);
     this.parseInputDom = this.parseInputDom.bind(this);
     this.handleInnerInp = this.handleInnerInp.bind(this);
   }
@@ -76,25 +71,11 @@ class RadioInpDrop extends Component{
     handleSelect&&handleSelect({ikey,id:item.id,values:vals,mainSaveText,value});
   }
   handleShow(e){
-    //e.stopPropagation();
+    e.stopPropagation();
     const {handleShow,ikey,id,patId} = this.props;
-    const that = this;
-    const timer = setTimeout(()=>{
-      if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
-        return
-      }else {
-        document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
-        $(e.target).parent().parent().prev().attr({"contentEditable":false})
-        this.setState({
-          tmpDom:e.target
-        })
-        handleShow && handleShow({ikey,id:patId||id});
-      }
-    },300);
-    
-    this.setState({
-      timer,
-    });
+    document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
+    handleShow && handleShow({ikey,id:patId||id});
+
     windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
       let scrollYs = $("#addScrollEvent")[0].scrollTop;
       this.setState({
@@ -102,49 +83,6 @@ class RadioInpDrop extends Component{
       })
     },$("#addScrollEvent")[0])
   }
-  /*componentDidMount(){    //默认值选中
-    const {data,ikey,handleSelect} = this.props;
-    const selected = data.find((it)=>{
-      return it.selected === undefined&&+it.defaultSelect===1;
-    });
-    if(selected){
-      // const text = selected.labelPrefix+selected.name+selected.labelSuffix;
-      const text = selected.name;
-      handleSelect&&handleSelect({ikey,id:selected.id,text});
-    }
-  }*/
-  handleEditLabel(e){
-    e.stopPropagation();
-    if(!this.state.editable){     //ie8点开下拉未选值存值bug修改
-      return;
-    }
-    const {ikey,boxMark,handleLabelEdit} = this.props;
-    this.setState({
-      editable:false
-    });  
-   // 更改标签的value值
-    const ev = e || window.event;
-    let changeVal = ev.target.innerText || ev.target.innerHTML;
-    if(!this.isIE){
-      ev.target.innerText?(ev.target.innerText = ''):(ev.target.innerHTML = '');
-    }
-    handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
-  }
-  handledbClick(e){
-    const {value,id,handleDbclick,patId} = this.props;
-    clearTimeout(this.state.timer);//取消延时的单击事件
-    //e.preventDefault();
-    if(value&&value.trim()) {//有选中值的标签才能双击编辑
-      this.setState({
-        editable: true
-      });
-    };
-    //失焦关闭编辑状态
-    setTimeout(()=>{
-      e.target.focus();
-    })
-    handleDbclick&&handleDbclick({id:patId||id});
-  }
   handleInnerInp(i,val){
     const {ikey,boxMark,handleSaveInp,mainSaveText} = this.props;
     let vals = this.state.texts; 
@@ -183,7 +121,7 @@ class RadioInpDrop extends Component{
     for(let i in texts){
       temp = texts[i];
       if(typeof temp=='object'){
-        list.push(<InputComp handleInp={this.handleInnerInp} editable={true} index={i} value={temp.value} over={over}></InputComp>);
+        list.push(<InputComp handleInp={this.handleInnerInp} index={i} value={temp.value} over={over}></InputComp>);
       }else{
         list.push(<span>&nbsp;{temp}</span>);
       }
@@ -191,18 +129,10 @@ class RadioInpDrop extends Component{
     return list;
   }
   render(){
-    const {data,show,vals,placeholder,hideTag} = this.props;
-    const {tmpDom} = this.state
-    if(!show&&tmpDom){
-      $(tmpDom).parent().parent().prev().attr({"contentEditable":true})
-    }
-    // 移除双击编辑 onDoubleClick={hideTag?null:this.handledbClick}
+    const {data,show,vals,placeholder} = this.props;
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
-           onBlur={this.handleEditLabel}
-           contentEditable={this.state.editable}
-           
-           onClick={(e)=>this.handleShow(e,true)}
+           onClick={(e)=>this.handleShow(e)}
            onKeyDown={handleEnter}>
         {vals?this.parseInputDom():<span>{placeholder}</span>}
       </div>
@@ -238,13 +168,13 @@ class InputComp extends Component{
     }
   }
   render(){
-    const {editable,value} = this.props;
-    return editable?<span contentEditable={true}
+    const {value} = this.props;
+    return <span contentEditable={true}
                           ref={this.$inp}
                  className={style['inner-inp']}
                  onClick={(e)=>{e.stopPropagation()}}
                  onFocus={(e)=>{e.stopPropagation()}}
-                 onBlur={this.handleBlur}>&nbsp;{value}</span>:<span>&nbsp;{value}</span>
+                 onBlur={this.handleBlur}>&nbsp;{value}</span>
   }
 }
 

+ 5 - 5
src/components/ScaleSearch/index.jsx

@@ -38,10 +38,10 @@ class ScaleSearch extends Component {
   }
   getSearchList() {
     const { searchResult } = this.props;
-    const that = this;console.log(getWindowInnerHeight()-270);
+    const that = this;
     if(searchResult&&searchResult.length>0){
       setTimeout(function(){
-        that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+        that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
       },100);
     }
     return searchResult && searchResult.map((item) => {
@@ -97,15 +97,15 @@ class ScaleSearch extends Component {
     clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });

+ 0 - 1
src/components/ScaleSearch/index.less

@@ -80,7 +80,6 @@
       }
       .scale-name{
         display: inline-block;
-        max-width: 320px;
         line-height: 22px;
       }
       button{

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

@@ -25,11 +25,11 @@ class TemplateItems extends React.Component {
         this.clear = this.clear.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-216;
+        const height = getWindowInnerHeight()-195;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
             if(this.$cont.current){
-                const height = getWindowInnerHeight()-216;
+                const height = getWindowInnerHeight()-195;
                 this.$cont.current.style.height = height+"px";
             }
         });

+ 1 - 1
src/components/Treat/AdverseReactions/index.jsx

@@ -76,7 +76,7 @@ class AdverseReactions extends Component {
                     </span>
                         {item.details.map((it, idx) => {
                             return <span className={style['adverse-reactions-name']} key={item.conceptId + item.name + it.name}>
-                                <input type="checkbox" checked={it.select} id={item.conceptId +item.name + it.name} onChange={this.changeReact.bind(this, it, index)}/>
+                                <input type="radio" checked={it.select} id={item.conceptId +item.name + it.name} onChange={this.changeReact.bind(this, it, index)}/>
                                 <label for={item.conceptId +item.name + it.name}> {it.name} </label>
                                 {it.value==1 && <span className={style['adverse-reactions-recommend']}>(智能推荐)</span>}
                             </span>

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

@@ -91,9 +91,7 @@ class DrugTreat extends Component {
                         <div  className={style['drug-name-box']}>
                             <span style={item.drugsForbidden === '2'? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}>{index + 1 + '. ' }{item.bigdrugsName}<span>{item.subdrugsName && '('+item.subdrugsName+')'}</span>:&nbsp;</span>
                             {item.medicitionsList.map((it, ii) => {
-                                return ((it.isShow == 1 || it.selected) && <span >
-                                        {ii === 0 ? '' : ', '}
-                                        <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
+                                return ((it.isShow == 1 || it.selected) &&<span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
                                               className={style['drug-name-wrapper']} 
                                         >
@@ -111,12 +109,9 @@ class DrugTreat extends Component {
                                               onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}
                                               onMouseLeave = {this.handleMouseLeaveImg}
                                               onClick={this.setDrugInfo.bind(this,it)}/>}
-                                        </span>
-                                        
-                                        
-                                        {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3',filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 
-                                        <span  style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{it.rate}</span>
-                                        
+                                        {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3',filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}
+                                        {/*<span  style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{it.rate}</span>*/}
+
                                     </span>)
                             })}
 

+ 5 - 0
src/components/Treat/DrugTreat/index.less

@@ -19,6 +19,11 @@
 }
 .drug-name-wrapper {
     position: relative;
+    margin-right: 6px;
+    &:not(:last-child):after{
+        display: inline;
+        content: ' ,';
+    }
 }
 .drug-name {
     border-bottom: 1px solid #666;

+ 6 - 9
src/components/TreatDesc/index.jsx

@@ -78,9 +78,7 @@ class TreatDesc extends Component {
                         <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>
                         <div  className={style['similar-drug'] +" "+"clearfix" }>
                         {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
-                            return (<span >
-                            {index === 0 ? '' : ', '}     
-                            <span className={style['drug-name-box']}
+                            return (<span className={style['drug-name-box']}
                                 onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item )}
                                 onMouseLeave = {this.handleMouseLeaveDrug}
                                 id={item.medicitionName}
@@ -100,16 +98,15 @@ class TreatDesc extends Component {
                                     onMouseLeave = {this.handleMouseLeaveImg}
                                     onClick={() =>{setDrugInfo({name: item.medicitionName, type: 8, position: 5})}}
                                     />}
-                            </span>              
-                            
-                            {/* {<img className={style['info-img']}    
+
+                            {/* {<img className={style['info-img']}
                                 title='点击i图标可查看详细说明'
-                                src={currentIndex === index ? info1 : info} 
+                                src={currentIndex === index ? info1 : info}
                                 onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
                                 onMouseLeave = {this.handleMouseLeaveImg}
                                 onClick={() =>{setDrugInfo(item,8,5);showDrugInfo();}}/>} */}
-                            {item.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: item.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''},
-                            <span  style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{item.rate}</span>
+                            {item.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: item.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}
+                            {/*<span  style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{item.rate}</span>*/}
                             
                         </span>)
                         })}

+ 5 - 0
src/components/TreatDesc/index.less

@@ -56,6 +56,11 @@
     display: inline-block;
     height: 30px;
     position: relative;
+    margin-right: 4px;
+    &:not(:last-child):after{
+        display: inline;
+        content: ' ,';
+    }
 }
 .drug-name {
     border-bottom: 1px solid #666;

+ 4 - 0
src/config/index.js

@@ -14,6 +14,10 @@ export default {
       '32':'process',           //现病史子模板--病程变化
       '322':'currentEmptySon',  //现病史-空模板-子模板
     },
+    preIcss:{       //预问诊
+      deadline:-1,            //int,获取预问诊内容的时效,默认-1,后台筛选15天内的,其它数值则按该数值天数筛选
+      recordIdVal:-1,     //int,获取预问诊的inquiryCode入参,默认为-1即从url上获取recordId的值,非-1则使用该配置的值
+    },
     // textId:'text',        //自由文本标签的id,
     textLabel:'{"tagType":"8","id":"","name":""}',
     _textLabel:'{"tagType":"8","id":"","name":","}',//查体每个标签后面加逗号(1-29/改成中文逗号3-18)

+ 1 - 5
src/containers/CurrentIll.js

@@ -127,10 +127,6 @@ function mapDispatchToProps(dispatch) {
                   }
                 }
             });
-          //右侧推送
-          setTimeout(function(){ 
-            dispatch(billing());
-          },200);
         },
         changeEditIll(bool){
             dispatch({
@@ -142,7 +138,7 @@ function mapDispatchToProps(dispatch) {
         dispatch({
           type: SAVE_CURR_FREE,
           data:item
-        })
+        });
         //右侧推送
           setTimeout(function(){ 
             if(didPushParamChange()){

+ 4 - 3
src/containers/DiagnosticList.js

@@ -9,6 +9,7 @@ import {keepPushData} from '@store/actions/tabTemplate';
 import { visibleHistory } from '@store/actions/historyTemplates'
 import {autoFillModules} from '@store/async-actions/fetchModules';
 import {SET_ASSESS_DATA} from '@types/assessResult';
+import {didPushParamChange} from '@utils/tools';
 
 function mapStateToProps(state) {
     const {diagnosticList,assessResult,pushMessage } = state;
@@ -27,6 +28,7 @@ function mapStateToProps(state) {
         scaleInfo: pushMessage.scaleInfo,//量表内容
         showHide: pushMessage.showHide,
         loading: diagnosticList.loading,
+        windowWidth: state.homePage.windowWidth
     }
 }
 
@@ -78,9 +80,6 @@ function mapDispatchToProps(dispatch) {
                 type: GET_DIAGNOSTIC_STR
             });
         },
-        getSearchResult:() => {
-            dispatch(getSearchResult)
-        },
         showTreat: () => {
             dispatch({
                 type: SHOW_TREAT,
@@ -95,7 +94,9 @@ function mapDispatchToProps(dispatch) {
             dispatch(getConceptDetail(item,noTips,noDetails,noNotify))
         },
         getBilling: () => {
+          if (didPushParamChange()) {
             dispatch(billing())
+          }
         },
         hideReferRecord: ()=>{
             dispatch({

+ 0 - 3
src/containers/InlineTag.js

@@ -6,9 +6,6 @@ import {SETCURRENTINPUT,CURRENT_TEXT_LABEL} from '@types/currentIll';
 import {SETCHECKINPUT} from "@types/checkBody";
 import InlineTag from "../common/components/InlineTag";
 import {getLabelIndex} from '@utils/tools.js';
-import {CHANGEOTHERTEXTLABEL} from "../store/types/otherHistory";
-import {CHANGECHECKTEXTLABEL} from "../store/types/checkBody";
-import {CHANGE_LABELVAL} from "../store/types/mainSuit";
 
 function mapStateToProps(state){
   return {}

+ 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
+            })
         }
     }
 }

+ 8 - 62
src/containers/RadioInpDrop.js

@@ -1,11 +1,11 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import RadioInpDrop from "@components/RadioInpDrop";
-import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL,SET_OT_RADIO_INPUT_VAL} from '@types/otherHistory';
-import {SETSELECTED4,CHANGECHECKTEXTLABEL,SET_CK_RADIO_INPUT_VAL} from '@types/checkBody';
+import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,SET_OT_RADIO_INPUT_VAL} from '@types/otherHistory';
+import {SETSELECTED4,SET_CK_RADIO_INPUT_VAL} from '@types/checkBody';
 import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD} from '@types/homePage.js';
-import {RADIO_SELECT,CHANGE_LABELVAL,SET_MS_RADIO_INPUT_VAL} from '@store/types/mainSuit.js';
-import {CURRENT_RADIO,CURRENT_TEXT_LABEL,SET_RADIO_INPUT_VALUE} from '@store/types/currentIll.js';
+import {RADIO_SELECT,SET_MS_RADIO_INPUT_VAL} from '@store/types/mainSuit.js';
+import {CURRENT_RADIO,SET_RADIO_INPUT_VALUE} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText} from '@utils/tools.js';
 import {billing} from '@store/async-actions/pushMessage';
@@ -110,13 +110,6 @@ function handleModuleDiff(dispatch,store,params){
   }
 }
 /**************标签双击输入action types**************/
-//对应模块单选双击编辑事件
-const dbEditActions = {
-  1:CHANGE_LABELVAL,
-  2:CURRENT_TEXT_LABEL,
-  3:CHANGEOTHERTEXTLABEL,
-  4:CHANGECHECKTEXTLABEL
-};
 //对应模块单选带输入存值事件
 const InputActions = {
   1:SET_MS_RADIO_INPUT_VAL,
@@ -141,62 +134,15 @@ function mapDispatchToProps(dispatch,store){
         }
       },500);
     },
-    handleDbclick(obj){//双击统计
-      dispatch({
-        type:CLICKCOUNT,
-        data:obj,
-        clickType:'双击',
-        num:1
-      });
-    },
     handleSaveInp(params){
-      const {boxMark,mainSaveText,values} = params;
-      const index = params.ikey;
-      let ikey = getLabelIndex(index);
-      // 输入框字数限制
-      /*if(boxMark==1){
-        if(values){
-          let str='',temp='';
-          for(let i in values){
-            temp = values[i];
-            if(typeof temp=='object'){
-              str+=temp.value;
-            }else{
-              str+=temp;
-            }
-          }
-          let oldVal = mainSaveText[ikey];
-          let mainText = filterDataArr(mainSaveText);
-          let lengths = 0;console.log("单选框输入:",params,oldVal,mainText.length)
-          if(oldVal && oldVal.length > str.length){
-            lengths = mainText.length + (str.length - oldVal.length);
-          }else{
-            lengths = mainText.length + str.length;
-          }  
-          if(lengths >= config.limited){
-            Notify.info(config.limitText);
-            return
-          }
-        }
-      }*/
+      const {boxMark} = params;
       dispatch({
         type:InputActions[+boxMark],
         data:{values:params.values,ikey:params.ikey}
       });
-      dispatch(billing());
-      dispatch({
-        type:ISREAD
-      })
-    },
-    handleLabelEdit(params){
-      const {type} = params;
-      const index = params.ikey;
-      let ikey = getLabelIndex(index);
-      dispatch({
-        type:dbEditActions[+type],
-        data:{changeVal:params.changeVal,ikey:ikey}
-      });
-      dispatch(billing());
+      if(didPushParamChange()) {     //操作后内容有变化才推送
+        dispatch(billing());
+      }
       dispatch({
         type:ISREAD
       })

+ 1 - 1
src/containers/SpreadDrop.js

@@ -198,7 +198,7 @@ function otherHisConfirm(dispatch,store,params){
   let existsId = getIds(exists);
   let withsId = getIds(withs);
   // const ids = existsId.length>0?existsId.join(",")+','+withsId.join(","):withsId.join(",");
-  const ids = existsId.concat(withsId);console.log(555,ids)
+  const ids = existsId.concat(withsId);
   if(!ids&&nones){      //只有无的项目
     dispatch({
       type: CONFIRMSELECTED,

+ 1 - 0
src/containers/eleType.js

@@ -87,6 +87,7 @@ export function singleRadio(params){
                          suffix={data.labelSuffix}
                          min={min}
                          max={max}
+                         formulaCode={data.formulaCode}
                          isExtBlue={data.specFlag===4?true:false}
                          placeholder={data.name}
                          boxMark={boxMark}

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

@@ -80,168 +80,7 @@ export const confirm = (state,action) =>{
   res.update=Math.random();         //用于触发组件更新(data变化了因在对象中无法被组件检测到)
   return res;
 };
-//查体中数字键盘选中事件
-export function setNumberValue(state,action){
-  let res = Object.assign({},state);
-  const param = action.params;
-  const ikey = param.ikey;
-  let labelInx = getLabelIndex(ikey);
-  // const subInx = ikey.substr(ikey.length-1);
-  const subInx = ikey.split("-")[2];
-  let item = res.data[labelInx];
-  if(+item.tagType===1){
-    item.value = param.text;
-    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-  }else{
-    item.questionMapping[subInx].value = param.text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      if(it.tagType===8){
-        return it.name;
-      }else{
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      }
-      
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
-  // res.saveText = fullfillText(res.data).saveText;
-  res.update = Math.random();
-  return res;
-}
 
-//查体单选下拉选中
-export function setRadioValue(state,action){
-  let res = Object.assign({},state);
-  const {ikey,id,text} = action;
-  let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
-  let item = res.data[labelInx];
-  if(typeof text != 'string'){    //需要展开项--有无治疗类型
-    const len = +item.copyType === 0?1:0;
-    res.data.splice(labelInx,len,text);
-    return res;
-  }
-  if(+item.tagType===1){      //独立单选组件
-    item.value = text;
-    const exist = JSON.parse(localStorage.getItem('radio'+item.id)||null);
-    if(exist){    //选中状态处理
-      exist[0].selected=exist[0].id==id;
-      localStorage.setItem('radio'+item.id,JSON.stringify(exist));
-    }
-    item.questionDetailList.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-    res.saveText[labelInx] = item.labelPrefix+text+item.labelSuffix;
-  }else{      //组合组件中的单选组件
-    item.questionMapping[subInx].value = text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      //添加选中状态
-      it.questionDetailList.map((its)=>{
-        if(its.id === id){
-          its.selected = true;
-        }else{
-          its.selected = false;
-        }
-      });
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      if(it.tagType===8){
-        return it.name;
-      }else {
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      }
-      
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
-  // res.saveText = fullfillText(res.data).saveText;
-  res.update = Math.random();
-  return res;
-}
-//单选带输入值保存
-export const setRadioInputValue = (state,action)=>{
-  const res = Object.assign({},state);
-  const {ikey,values,id} = action.data;
-  let index = getLabelIndex(ikey);
-  let innerInx = ikey.substr(ikey.length-1);
-  let item = res.data[index];
-  if(item.tagType!=1){      //在组合项中
-    item = res.data[index].questionMapping[innerInx];
-  }
-  let str='',temp='',obj=item.questionDetailList;
-  if(!values){    //清空
-    let sld=obj.find((item)=>{
-      return item.selected==true;
-    });
-    sld?sld.selected=false:'';
-    item.vals = null;
-    item.value = '';
-    if(res.data[index].tagType==3){
-      let hasValue = false;
-      const sub = res.data[index].questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        if(it.tagType===8){
-          return it.name;
-        }else {
-          return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-        }
-      });
-      res.saveText[index] = hasValue?sub.join(''):'';
-    }else{
-      res.saveText[index] = '';
-    }
-    res.update = Math.random();
-    return res;
-  }
-  for(let i in values){
-    temp = values[i];
-    if(typeof temp=='object'){
-      str+=temp.value;
-    }else{
-      str+=temp;
-    }
-  }
-  //选中状态
-  if(id){
-    obj.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }
-  item.vals = values;
-  item.value = str;
-  if(res.data[index].tagType!=1){
-    let hasValue = false;
-    const sub = res.data[index].questionMapping.map((it)=>{
-      if(it.tagType===8){
-        return it.name;
-      }else {
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      }
-      
-    });
-    res.saveText[index] = sub.join('');
-  }else {
-    res.saveText[ikey] = str;
-  }
-  res.update = Math.random();
-  return res;
-}
 //复制标签(如血压)事件
 export function addLabelItem(state,action){
   let res = Object.assign({},state);
@@ -405,47 +244,6 @@ function hasNoSame(arr,text){
   return arr.findIndex((it)=>text==it.name)==-1;
 }
 
-// 数字键盘较特殊,有直接输入
-export const changeNumLabelVal = (state,action)=>{
-  const res = Object.assign({},state);
-  const {changeVal,totalVal,ikey,prefix,suffix} = action.data;
-  const index = ikey;
-  const newVal = changeVal;
-  let item = res.data[index];
-  const next = res.data[+index+1];
-  const next2 = res.data[+index + 2];
-  const nextVal = next.value||next.name;
-  //下一个非文本标签是数字组件
-  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
-  //标签后是不是标点符号标签,是的话删除本标签时一起删除
-  let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
-  if(totalVal.trim()){
-    if(item){
-      item.value = newVal;
-      item.labelPrefix = prefix||'';
-      item.labelSuffix = suffix||'';
-    }
-    if(newVal){
-      res.saveText[index] = totalVal;
-    }else{
-      res.saveText[index] = "";
-    }
-    
-  }else{//删除完标签内容则删除该标签
-    let num = nextIsDot ? 2 : 1;
-    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
-      next.value = '';
-      num = 1;
-    }
-    res.data.splice(index,num);
-    res.selecteds.splice(index,num);      //杂音类样式选中状态对应
-    res.saveText = checkFullfillText(res.data).saveText;
-  }
-
-  res.update = Math.random();
-  return res;
-}
-
 export function clearCheckBody(state,action){  //清空
   let res = Object.assign({},state);
   res.data = action.data;
@@ -457,38 +255,6 @@ export function clearCheckBody(state,action){  //清空
   return res;
 }
 
-//文本输入标签
-export function setInputLabel(state,action){
-  let res = Object.assign({}, state);
-  const {i,text,prefix,suffix,subIndex} = action;
-  const item = res.data[i];
-  if(+item.tagType===3){      //multSpred标签
-    item.questionMapping[subIndex].value = text;
-    let texts = item.questionMapping.map((it)=>{
-      if(it.tagType===8){
-        return it.name;
-      }else{
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      }
-      
-    });
-    res.saveText[i] = texts.join('');
-    res.update = Math.random();
-    return res;
-  }else{
-    if(item){
-      item.value=text;
-    }
-  }
-  if(text){
-    res.saveText[i] = prefix+text+suffix;
-  }else{//删除完要清空
-    res.saveText[i] = "";
-  }
-  res.update = Math.random();
-  return res;
-}
-
 // backspace删除
 export function backspaceText(state,action){
   let res = Object.assign({},state);
@@ -584,8 +350,8 @@ export function setImportCheckbodyLabel(state,action) {
 export function recoveTag(state,action) {
   let res = Object.assign({},state);
   let arr = [...res.data];
-  //const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config._textLabel));
-  arr.splice(action.index,0,action.data);
+  const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config.textLabel));
+  arr.splice(action.index,0,action.data,text);
   res.data = checkFullfillText(arr).newArr;
   res.saveText = checkFullfillText(arr).saveText;
   shiftLocalDelTag();

+ 7 - 3
src/store/actions/copyRight.js

@@ -24,9 +24,13 @@ export const closeDisclatmerModal=(state,action)=>{
   
 export const getMessage=(state,action)=>{
   const res=Object.assign({},state);
-  res.number = action.data.data.data.name;
-  res.date = action.data.data.data.refreshTime;
-  res.content = action.data.data.data.detail;
+  const data = action.data.data;
+  if(!data) {
+    return res;
+  }
+  res.number = data.data.name;
+  res.date = data.data.refreshTime;
+  res.content = data.data.detail;
   return res;
 };
 

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

@@ -407,161 +407,6 @@ export const setCheckBox = (state,action)=>{
   return res;
 }
 
-
-//数字键盘选中事件
-export function setNumberValue(state,action){
-  let res = Object.assign({},state);
-  const param = action.params;
-  const index = param.ikey;
-  let labelInx = getLabelIndex(index);
-  const subInx = index.split("-")[2];
-  let item = res.data[labelInx];
-  // if(param.text.trim()){
-    if(+item.tagType===1){
-      item.value = param.text;
-      res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-    }else{
-      item.questionMapping[subInx].value = param.text;
-      let hasValue = false;
-      const sub = item.questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      });
-      // res.saveText[labelInx] = sub.join(',');
-      res.saveText[labelInx] = hasValue?sub.join(''):'';
-      item.value = sub.join('');
-    }
-  /*}else{//删除完标签内容则删除该标签
-    res.data.splice(labelInx,1);
-    res.saveText = fullfillText(res.data).saveText;
-  }*/
-  res.update = Math.random();
-  return res;
-}
-
-//单选下拉选中
-export function setRadioValue(state,action){
-  let res = Object.assign({},state);
-  const {ikey,id,text} = action;
-  let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.split("-")[2];
-  let item = res.data[labelInx];
-  if(typeof text != 'string'){    //需要展开项--有无治疗类型
-    const len = +item.copyType === 0?1:0;
-    res.data.splice(labelInx,len,text);
-    return res;
-  }
-  if(+item.tagType===1){
-    item.value = text;
-    res.saveText[labelInx] = item.labelPrefix+text+item.labelSuffix;
-    const exist = JSON.parse(localStorage.getItem('radio'+item.id)||null);
-    if(exist){    //选中状态处理
-      exist[0].selected=exist[0].id==id;
-      localStorage.setItem('radio'+item.id,JSON.stringify(exist));
-    }
-    item.questionDetailList.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }else{
-    item.questionMapping[subInx].value = text;
-    /*if(item.questionMapping[subInx].controlType==1){//例如:有无治疗-未经治疗
-      item.value = text;
-    }else{
-      item.questionMapping[subInx].value = text;
-    }*/
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      //添加选中状态
-      it.questionDetailList.map((its)=>{
-        if(its.id === id){
-          its.selected = true;
-        }else{
-          its.selected = false;
-        }
-      });
-
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
-  res.update = Math.random();
-  return res;
-}
-//单选带输入值保存
-export const setRadioInputValue = (state,action)=>{
-  const res = Object.assign({},state);
-  const {ikey,values,id} = action.data;
-  let index = getLabelIndex(ikey);
-  let innerInx = ikey.split("-")[2];
-  let item = res.data[index];
-  if(item.tagType!=1){      //在组合项中
-    item = res.data[index].questionMapping[innerInx];
-  }
-  let str='',temp='',obj=item.questionDetailList;
-  if(!values){    //清空
-    let sld=obj.find((item)=>{
-      return item.selected==true;
-    });
-    sld?sld.selected=false:'';
-    item.vals = null;
-    item.value = '';
-    if(res.data[index].tagType!=1){
-      let hasValue = false;
-      const sub = res.data[index].questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      });
-      res.saveText[index] = hasValue?sub.join(''):'';
-    }else{
-      res.saveText[index] = '';
-    }
-    res.update = Math.random();
-    return res;
-  }
-  for(let i in values){
-    temp = values[i];
-    if(typeof temp=='object'){
-      str+=temp.value;
-    }else{
-      str+=temp;
-    }
-  }
-  //选中状态
-  if(id){
-    obj.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }
-  item.vals = values;
-  item.value = str;
-  if(res.data[index].tagType!=1){
-    let hasValue = false;
-    const sub = res.data[index].questionMapping.map((it)=>{
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[index] = sub.join('');
-  }else {
-    res.saveText[index] = str;
-  }
-  res.update = Math.random();
-  return res;
-}
-
 //双击标签输入改变值
 export const changeLabelVal = (state,action)=>{
   const res = Object.assign({},state);
@@ -629,41 +474,6 @@ export const changeLabelVal = (state,action)=>{
 function hasNoSame(arr,text){
   return arr.findIndex((it)=>text==it.name)==-1;
 }
-// 数字键盘较特殊,有直接输入
-export const changeNumLabelVal = (state,action)=>{
-  const res = Object.assign({},state);
-  const {changeVal,totalVal,ikey,prefix,suffix} = action.data;
-  const index = ikey;
-  const newVal = changeVal;
-  let item = res.data[index];
-  const next = res.data[+index+1];
-  const next2 = res.data[+index + 2];
-  const nextVal = next.value||next.name;
-  //下一个非文本标签是数字组件
-  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
-  //标签后是不是标点符号标签,是的话删除本标签时一起删除
-  let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
-  // let labText = totalVal?totalVal:newVal;   //如单选没有前后缀
-  if(totalVal.trim()){
-    if(item){
-      item.value = newVal;
-      item.labelPrefix = prefix||'';
-      item.labelSuffix = suffix||'';
-    }
-    res.saveText[index] = totalVal;
-  }else{//删除完标签内容则删除该标签
-    let num = nextIsDot ? 2 : 1;
-    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
-      next.value = '';
-      num = 1;
-    }
-    res.data.splice(index,num);
-    res.saveText.splice(index,num);
-    // res.saveText = fullfillText(res.data).saveText;
-  }
-  res.update = Math.random();
-  return res;
-}
 
 export const clearCurrentIll = (state,action)=>{
   const res = Object.assign({},state);
@@ -860,32 +670,6 @@ export function addLabelItem(state,action){
   return res;
 }
 
-//文本输入标签
-export function setInputLabel(state,action){
-  let res = Object.assign({},state);
-  const {i,text,prefix,suffix,subIndex,total} = action;
-  const item = res.data[i];
-  if(+item.tagType===3){      //multSpred标签
-    item.questionMapping[subIndex].value = text;
-    let texts = item.questionMapping.map((it)=>{
-      return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
-    });
-    res.saveText[i] = texts.join('');
-    res.update = Math.random();
-    return res;
-  }else{
-    if(item){
-      item.value=text;
-      res.saveText[i] = (prefix ||'')+ text + (suffix||'');
-    }else if(!total){//整个标签内容完全删除
-      res.data.splice(i,1);
-      res.saveText.splice(i,1);
-    }
-  }
-  res.update = Math.random();//console.log(888,res,action)
-  return res;
-}
-
 // backspace删除
 export function backspaceText(state,action){
   let res = Object.assign({},state);

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

@@ -571,154 +571,6 @@ if(moduleData && moduleData.length>0){
   return res;
 }
 
-
-
-//数字键盘选中事件
-export function setNumberValue(state,action){
-  let res = Object.assign({},state);
-  const param = action.params;
-  const index = param.ikey;
-  let labelInx = getLabelIndex(index);
-  const subInx = index.split("-")[2];//index.substr(index.length-1);
-  let item = res.data[labelInx];
-  // if(param.text.trim()){
-    if(+item.tagType===1){
-      item.value = param.text;
-      res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-    }else{
-      item.questionMapping[subInx].value = param.text;
-      let hasValue = false;
-      const sub = item.questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      });
-      // res.saveText[labelInx] = sub.join(',');
-      res.saveText[labelInx] = hasValue?sub.join(''):'';
-      item.value = sub.join('');
-    }
-  /*}else{//删除完标签内容则删除该标签
-    res.data.splice(labelInx,1);
-    res.saveText = fullfillText(res.data).saveText;
-  }*/
-  res.update = Math.random();
-  return res;
-}
-
-//单选下拉选中
-export function setRadioValue(state,action){
-  let res = Object.assign({},state);
-  const {ikey,id,text} = action;
-  let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.split("-")[2]//ikey.substr(ikey.length-1);
-  let item = res.data[labelInx];
-  if(typeof text != 'string'){    //需要展开项--有无治疗类型
-    const len = +item.copyType === 0?1:0;
-    res.data.splice(labelInx,len,text);
-    return res;
-  }
-  if(+item.tagType===1){
-    item.value = text;
-    res.saveText[labelInx] = item.labelPrefix+text+item.labelSuffix;
-    item.questionDetailList.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }else{
-    item.questionMapping[subInx].value = text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      //添加选中状态
-      it.questionDetailList.map((its)=>{
-        if(its.id === id){
-          its.selected = true;
-        }else{
-          its.selected = false;
-        }
-      });
-
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    // res.saveText[labelInx] = sub.join(',');
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-    item.value = sub.join('');
-  }
-  res.update = Math.random();
-  return res;
-}
-
-//单选带输入值保存
-export const setRadioInputValue = (state,action)=>{
-  const res = Object.assign({},state);
-  const {ikey,values,id} = action.data;
-  let index = getLabelIndex(ikey);
-  let innerInx = ikey.split("-")[2];//ikey.substr(ikey.length-1);
-  let item = res.data[index];
-  if(item.tagType!=1){      //在组合项中
-    item = res.data[index].questionMapping[innerInx];
-  }
-  let str='',temp='',obj=item.questionDetailList;
-  if(!values){    //清空
-    let sld=obj.find((item)=>{
-      return item.selected==true;
-    });
-    sld?sld.selected=false:'';
-    item.vals = null;
-    item.value = '';
-    if(res.data[index].tagType!=1){
-      let hasValue = false;
-      const sub = res.data[index].questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      });
-      res.saveText[index] = hasValue?sub.join(''):'';
-    }else{
-      res.saveText[index] = '';
-    }
-    res.update = Math.random();
-    return res;
-  }
-  for(let i in values){
-    temp = values[i];
-    if(typeof temp=='object'){
-      str+=temp.value;
-    }else{
-      str+=temp;
-    }
-  }
-  //选中状态
-  if(id){
-    obj.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }
-  item.vals = values;
-  item.value = str;
-  if(res.data[index].tagType!=1){
-    let hasValue = false;
-    const sub = res.data[index].questionMapping.map((it)=>{
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[index] = sub.join('');
-  }else {
-    res.saveText[index] = str;
-  }
-  res.update = Math.random();
-  return res;
-}
 //双击标签输入改变值
 export const changeLabelVal = (state,action)=>{
   const res = Object.assign({},state);
@@ -749,34 +601,6 @@ export const changeLabelVal = (state,action)=>{
   return res;
 }
 
-// 数字键盘较特殊,有直接输入
-export const changeNumLabelVal = (state,action)=>{
-  const res = Object.assign({},state);
-  const {changeVal,totalVal,ikey,prefix,suffix} = action.data;
-  const index = ikey;
-  const newVal = changeVal;
-  // let labText = totalVal?totalVal:newVal;   //如单选没有前后缀
-  let item = res.data[index];
-  const next = res.data[+index+1];
-  const nextVal = next.value||next.name;
-  //标签后是不是标点符号标签,是的话删除本标签时一起删除
-  let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
-  if(totalVal.trim()){
-    if(item){
-      item.value = newVal;
-      item.labelPrefix = prefix||'';
-      item.labelSuffix = suffix||'';
-      res.saveText[index] = totalVal;
-    }
-  }else{//删除完标签内容则删除该标签
-    const num = nextIsDot?2:1;
-    res.data.splice(index,num);
-    res.saveText = fullfillText(res.data).saveText;
-  }
-  res.update = Math.random();//console.log(44,action,res);
-  return res;
-}
-
 // 保存自由输入文本--无模板
 export const saveFreeVal = (state,action)=>{
   const res = Object.assign({},state);
@@ -856,33 +680,6 @@ export function addLabelItem(state,action){
   return res;
 }
 
-//文本输入标签
-export function setInputLabel(state,action){
-  let res = Object.assign({},state);//console.log(state,action)
-  const {i,text,prefix,suffix,subIndex} = action;
-  const item = res.data[i];
-  if(+item.tagType===3){      //multSpred标签
-    item.questionMapping[subIndex].value = text;
-    let texts = item.questionMapping.map((it)=>{
-      return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
-    });
-    res.saveText[i] = texts.join('');
-    res.update = Math.random();
-    return res;
-  }else{
-    if(item){
-      item.value=text;
-    }
-  }
-  if(text){
-    res.saveText[i] = prefix+text+suffix;
-  }else{//删除完要清空
-    res.saveText[i] = "";
-  }
-  res.update = Math.random();
-  return res;
-}
-
 // backspace删除
 export function backspaceText(state,action){
   let res = Object.assign({},state);

+ 36 - 207
src/store/actions/otherHistory.js

@@ -51,150 +51,6 @@ export const confirm = (state,action) =>{
   return res;
 };
 
-//单选下拉选中
-export function setRadioValue(state,action){
-  let res = Object.assign({},state);
-  const {ikey,id,text} = action;
-  let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
-  let item = res.data[labelInx];
-  if(typeof text != 'string'){    //需要展开项--有无治疗类型
-    const len = +item.copyType === 0?1:0;
-    res.data.splice(labelInx,len,text);
-    return res;
-  }
-  if(+item.tagType===1){
-    item.value = text;
-    res.saveText[labelInx] = item.labelPrefix+text+item.labelSuffix;
-    const exist = JSON.parse(localStorage.getItem('radio'+item.id)||null);
-    if(exist){    //选中状态处理
-      exist[0].selected=exist[0].id==id;
-      localStorage.setItem('radio'+item.id,JSON.stringify(exist));
-    }
-    item.questionDetailList.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }else{
-    item.questionMapping[subInx].value = text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      //添加选中状态
-      it.questionDetailList.map((its)=>{
-        if(its.id === id){
-          its.selected = true;
-        }else{
-          its.selected = false;
-        }
-      });
-
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
-  res.update = Math.random();
-  return res;
-}
-
-//单选带输入值保存
-export const setRadioInputValue = (state,action)=>{
-  const res = Object.assign({},state);
-  const {ikey,values,id} = action.data;
-  let index = getLabelIndex(ikey);
-  let innerInx = ikey.substr(ikey.length-1);
-  let item = res.data[index];
-  if(item.tagType!=1){      //在组合项中
-    item = res.data[index].questionMapping[innerInx];
-  }
-  let str='',temp='',obj=item.questionDetailList;
-  if(!values){    //清空
-    let sld=obj.find((item)=>{
-      return item.selected==true;
-    });
-    sld?sld.selected=false:'';
-    item.vals = null;
-    item.value = '';
-    if(res.data[index].tagType!=1){
-      let hasValue = false;
-      const sub = res.data[index].questionMapping.map((it)=>{
-        if(it.value){     //至少有一个子值才黑显
-          hasValue = true;
-        }
-        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-      });
-      res.saveText[index] = hasValue?sub.join(''):'';
-    }else{
-      res.saveText[index] = '';
-    }
-    res.update = Math.random();
-    return res;
-  }
-  for(let i in values){
-    temp = values[i];
-    if(typeof temp=='object'){
-      str+=temp.value;
-    }else{
-      str+=temp;
-    }
-  }
-  //选中状态
-  if(id){
-    obj.map((its)=>{
-      if(its.id === id){
-        its.selected = true;
-      }else{
-        its.selected = false;
-      }
-    });
-  }
-  item.vals = values;
-  item.value = str;
-  if(res.data[index].tagType!=1){
-    let hasValue = false;
-    const sub = res.data[index].questionMapping.map((it)=>{
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[index] = sub.join('');
-  }else {
-    res.saveText[ikey] = str;
-  }
-  res.update = Math.random();
-  return res;
-}
-//数字键盘选中事件
-export function setNumberValue(state,action){
-  let res = Object.assign({},state);
-  const param = action.params;
-  const ikey = param.ikey;
-  const code = param.formulaCode;
-  let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
-  let item = res.data[labelInx];
-  if(+item.tagType===1){
-    item.value = param.text;
-    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
-  }else{
-    item.questionMapping[subInx].value = param.text;
-    let hasValue = false;
-    const sub = item.questionMapping.map((it)=>{
-      if(it.value){     //至少有一个子值才黑显
-        hasValue = true;
-      }
-      return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
-    });
-    res.saveText[labelInx] = hasValue?sub.join(''):'';
-  }
-  res[code] = param.text;
-  res.update = Math.random();
-  return res;
-}
-
 //自由文本
 export function setCheckText(state,action) {
   let res = Object.assign({},state);
@@ -208,33 +64,6 @@ export function setCheckText(state,action) {
   return res;
 }
 
-//文本输入标签
-export function setOtherInput(state,action){
-  let res = Object.assign({}, state);//console.log(state,action)
-  const {i, text, prefix, suffix, subIndex} = action;
-  const item = res.data[i];
-  if (+item.tagType === 3 || +item.tagType === 4) {      //multSpred标签
-    item.questionMapping[subIndex].value = text;
-    let texts = item.questionMapping.map((it) => {
-      return (it.labelPrefix || '') + (it.value || '') + (it.labelSuffix || '');
-    });
-    res.saveText[i] = texts.join('');
-    res.update = Math.random();
-    return res;
-  } else {
-    if (item) {
-      item.value = text;
-    }
-  }
-  if(text){
-    res.saveText[i] = prefix+text+suffix;
-  }else{//删除完要清空
-    res.saveText[i] = "";
-  }
-  res.update = Math.random();
-  return res;
-}
-
 //多选文字,如杂音
 export function setCheckBoxValue(state,action) {
   const res = Object.assign({},state);
@@ -370,42 +199,6 @@ function hasNoSame(arr,text){
   return arr.findIndex((it)=>text==it.name)==-1;
 }
 
-// 数字键盘较特殊,有直接输入
-export const changeNumLabelVal = (state,action)=>{
-  const res = Object.assign({},state);
-  const {changeVal,totalVal,ikey,prefix,suffix} = action.data;
-  const index = ikey;
-  const newVal = changeVal;
-  let item = res.data[index];
-  const next = res.data[+index+1];
-  const next2 = res.data[+index + 2];
-  const nextVal = next.value||next.name;
-  //下一个非文本标签是数字组件
-  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
-  //标签后是不是标点符号标签,是的话删除本标签时一起删除
-  let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
-  let labText = totalVal?totalVal:newVal;   //如单选没有前后缀
-  if(labText.trim()){
-    if(item){
-      item.value = newVal;
-      item.labelPrefix = prefix||'';
-      item.labelSuffix = suffix||'';
-    }
-    res.saveText[index] = labText;
-  }else{//删除完标签内容则删除该标签
-    let num = nextIsDot ? 2 : 1;
-    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
-      next.value = '';
-      num = 1;
-    }
-    res.data.splice(index,num);
-    res.selecteds.splice(index,num);//杂音类样式选中状态对应
-    res.saveText = fullfillText(res.data).saveText;
-  };
-  res.update = Math.random();
-  return res;
-}
-
 export function clearOtherHistory(state,action){       //清空数据
   let res = Object.assign({},state);
   for(let it in action){
@@ -427,6 +220,42 @@ export const setTextModeValue = (state,action)=>{
   return res;
 };
 
+//数字键盘选中事件
+export function setNumberValue(state,action){
+  let res = Object.assign({},state);
+  const param = action.params;
+  const ikey = param.ikey;
+  const code = param.formulaCode;
+  let labelInx = getLabelIndex(ikey);
+  const subInx = ikey.substr(ikey.length-1);
+  let item = res.data[labelInx];
+  if(+item.tagType===1){
+    item.value = param.text;
+    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
+  }else{
+    item.questionMapping[subInx].value = param.text;
+    let hasValue = false;
+    const sub = item.questionMapping.map((it)=>{
+      if(it.value){     //至少有一个子值才黑显
+        hasValue = true;
+      }
+      if(it.tagType===8){       //维护时的连接词无value
+        return it.name;
+      }else{
+        //组合中未填值的子标签预览中不显示
+        if(!it.value){
+          return '';
+        }
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+    });
+    res.saveText[labelInx] = hasValue?sub.join(''):'';
+  }
+  res[code] = param.text;
+  res.update = Math.random();
+  return res;
+}
+
 //复制标签(如血压)事件
 export function addLabelItem(state,action){
   let res = Object.assign({},state);

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

@@ -166,6 +166,7 @@ export const changeReact=(state,action)=>{
     const res = JSON.parse(JSON.stringify(state));
     const index = action.index
     res.adversReactionList[index].details = res.adversReactionList[index].details.map(item => {
+      item.select = false;
       if(item.name == action.it.name){
         item.select = !item.select
       }

File diff suppressed because it is too large
+ 1 - 1
src/store/async-actions/copyRight.js


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

@@ -11,6 +11,7 @@ import {CURRENT_CHRONIC} from '@store/types/currentIll';
 import {MODI_LOADING} from '@store/types/homePage';
 import {GET_ALL_HIS,FILTER_ALL_HIS} from '@store/types/emergencyHis';
 import {SET_IMPORT_CHECKBODY_LABEL} from "../types/checkBody";
+import {getBigPush} from '@utils/utils';
 
 const api={
   // getSpreadModule:'/questionInfo/getByIds',
@@ -18,7 +19,6 @@ const api={
   getModule:'/questionInfo/getById',
   searchURL: '/retrieval/getTagInfos',
   getOtherHisRecord: '/inquiryInfo/getLastOther',
-  getBigPush:'/push/pushInner',
   saveMode:'/doctorPageMode/saveDoctorPageModes',
   getSymptomFeature:'/feature/getSymptomFeature',
   getAssess:'/evaluationModuleMapping/getEvaluationModules',    //获取管理评估-慢病
@@ -134,19 +134,8 @@ export function pregetCheckbodyData(flag){     //flag=true获取到数据后立
     if(flag){
       dispatch({type:MODI_LOADING,flag:true});
     }
-    const emrData = getEMRParams();
-    const param = {
-      age: emrData.age,
-      featureType: "1,42,41,7",
-      diag: emrData.dis,
-      lis: emrData.lis,
-      other: emrData.other,
-      pacs: emrData.pacs,
-      sex: emrData.sex,
-      vital:emrData.vital,
-      symptom: emrData.current+emrData.main
-    };
-    json(api.getBigPush,param).then((res)=>{
+
+    getBigPush("1,42,41,7").then((res)=>{
       if(+res.data.code === 0){
         const obj = res.data.data;
         const data = obj&&obj.moduleVital;

+ 4 - 17
src/store/async-actions/historyTemplates.js

@@ -7,7 +7,6 @@ import { billing } from '@store/async-actions/pushMessage';
 
 export const initItemList = (item) => {
   let baseList = store.getState();
-  // let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
   const param = {
       "hospitalId": state.hospitalId,
@@ -17,16 +16,6 @@ export const initItemList = (item) => {
       "current": 1,
       "size": 9999
     }
-    /*return (dispatch) => {
-        axios.json('/inquiryInfo/hisInquirys',param).then((res)=>{
-            const data =res.data;
-            if(data.code == 0){
-                dispatch(initHistory(data.data));
-            }else{
-                console.log(data)
-            }
-        })
-    }*/
     return axios.json('/inquiryInfo/hisInquirys',param);
 };
 export const getHistempDetail = (item) => {
@@ -38,13 +27,11 @@ export const getHistempDetail = (item) => {
             const data =res.data;
             if(data.code == 0){
                 let tmpData = data.data
-                // let tmpList = tmpData.inquiryDetailList
-                // tmpData.detailList = tmpList
-                // console.log(tmpData)
-                pushAllDataList(item.sign,'push',tmpData,'history')       //引用     
-                store.dispatch(billing());
+                pushAllDataList(item.sign,'push',tmpData,'history')       //引用
+                if(didPushParamChange()) {
+                  dispatch(billing());
+                }
             }else{
-                // console.log(data)
                 Notify.error(data.msg);
             }
         })

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

@@ -45,14 +45,16 @@ export async function getCommSymptomPush(){//获取大数据推送症状
       const emrData = getEMRParams();
       const params = {
         "age": emrData.age,
+        "hosCode": emrData.hosCode,
         "featureType": type,//类型1:症状,4:查体,5:化验,6:辅检,7:诊断
         "diag": emrData.dis,
         "lis": emrData.lis,
         "other": emrData.other,
         "pacs": emrData.pacs,
         "sex": emrData.sex,
+        "vital":emrData.vital,
         "symptom": emrData.current + emrData.main
       };
-    const bigData = await json(api.symptomPush,params);
+    const bigData = json(api.symptomPush,params);
     return bigData;
 }

+ 4 - 2
src/store/async-actions/patInfo.js

@@ -21,10 +21,12 @@ const api = {
 export const getPreMsg = (dispatch, getState) => {
     // let baseList = getState();
     // let state = baseList.patInfo.message;
+    const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
     json(api.getPreMsg, {
         "hospitalCode": getUrlArgObject('hospitalId'),
-        "inquiryCode":getUrlArgObject("recordId"),
-        "patientCode": getUrlArgObject("patientNo")
+        "inquiryCode":inCode,
+        "patientCode": getUrlArgObject("patientNo"),
+        "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline
     },true).then((res) => {
         const data = res.data;
         if (data.code == 0) {

+ 9 - 27
src/store/async-actions/pushMessage.js

@@ -3,13 +3,13 @@ import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_S
 import { SET_DRUG_INFO, SHOW_DRUG_INFO } from '@store/types/treat';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
 import {storageLocal,getEMRParams} from '@utils/tools';
+import {getBigPush} from '@utils/utils';
 import {SET_IMPORT_CHECKBODY_LABEL,PRESET} from "../types/checkBody";
 import dataLis from '@components/EmergencyProcedure/emergency';
 import  Notify from '@commonComp/Notify';
 import {pregetCheckbodyData} from '@store/async-actions/fetchModules';
 import {tabChange} from '@store/actions/tabTemplate';
 const api={
-  push:'/push/pushInner',
   getTableList:'/scale/getList', //获取量表列表
   getTableInfo:'/scale/getContent', //获取量表明细
   getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
@@ -19,28 +19,14 @@ const api={
 export const billing = (mdata,boxMark) => {
  return (dispatch, getState) =>{
   const state = getState();
-  let url = api.push;
    const checkBody = state.checkBody.data;
    let diagMain = state.diagnosticList.diagnosticList.length>0&&state.diagnosticList.diagnosticList[0]
    let getCheck = boxMark==2&&!(checkBody&&checkBody.length>0&&!checkBody[0].full);
   const emrData = getEMRParams();
-  const params = {
-    age: emrData.age,
-    featureType: getCheck?"42,41,5,6,7":"42,5,6,7",    //41只返回查体模板,4只返回查体高亮
-    // featureType: "22",
-    diag: emrData.dis,
-    lis: emrData.lis,
-    other: emrData.other,
-    pacs: emrData.pacs,
-    sex: emrData.sex,
-    vital:emrData.vital,
-    symptom: mdata?(emrData.current + mdata):(emrData.current + emrData.main),
-    hosCode: emrData.hosCode
-  };
-  let savePm = Object.assign({},params);
-  delete savePm.featureType;
-  storageLocal.set('emrParam',savePm);      //推送数据存储,用作推送前对比是否有变,有变才推送
-    json(url, params).then((data) => {
+  //mdata为主诉无标签直接输入时的内容,symptom参数传主诉+现病史文本
+  const mainData =  mdata?(emrData.current + mdata):(emrData.current + emrData.main);
+  const feaType = getCheck?"42,41,5,6,7":"42,5,6,7";    //41只返回查体模板,4只返回查体高亮
+   getBigPush(feaType,mainData,true).then((data) => {
         let {dis, lab, pacs,vitalIds,moduleVital} = data.data.data||{};
         lab = lab||[];
         pacs = pacs||[];
@@ -52,7 +38,7 @@ export const billing = (mdata,boxMark) => {
             setPushEmergency={}, //急诊
             setPushEmergencyIdx='',//急诊对应本地数据
             likely=[];//鉴别诊断
-            doubt = dis&&dis['疑似诊断'],
+            doubt = dis&&dis['拟诊'],
             possible = dis&&dis['可能诊断'];
             vigilant = dis&&dis['警惕'];
             determine = dis&&dis['确诊']; //确诊
@@ -115,10 +101,8 @@ export const billing = (mdata,boxMark) => {
       console.log(e)
   });
    //单独调指标
-   const ps = Object.assign({},params,{featureType:'22'});
-   json(url, ps).then((data) => {
+   getBigPush('22',mainData).then((data) => {
      let {medicalIndications} = data.data.data||{};
-
      //慢病推送模块数据
      dispatch({
        type:SET_CHRONIC_PUSHS,
@@ -136,10 +120,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 +220,7 @@ export const getAllConceptDetail = (item) => {
             } else {
                 Notify.info('提示信息未维护');
             }
-                
+               
         }).catch((e) => {
             console.log(e)
         })
@@ -286,7 +269,6 @@ export const getScaleInfo = (it)=>{
             symptom: emrData.current + emrData.main,
             // indications:'' //指标结果
           };
-        // json(api.push, params)
         json(api.getTableInfo, params)
         .then((res)=>{
             const result = res.data;

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

@@ -171,7 +171,9 @@ export const setPageView = (id) => { //获取模板结构化数据
       if (data.code == 0) {
         //模板列表不筛选模式后,单个模式引用时看本身的模式
         pushAllDataList(data.data.type, 'push', data.data, 'template')//引用
-        store.dispatch(billing())
+        if(didPushParamChange()){     //诊断变化时会调推送,避免重复调
+          dispatch(billing())
+        }
       } else {
         Notify.error(data.msg);
       }

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

+ 5 - 6
src/store/reducers/checkBody.js

@@ -1,10 +1,11 @@
 import {RECOVER_TAG_CHECK,SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
   SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,
-  SETCHECKINPUT,DEL_CHECKBODY,CHANGECHECKTEXTLABEL_NUMBER,CHECKCONFIRMSELECTED,
+  SETCHECKINPUT,DEL_CHECKBODY,CHECKCONFIRMSELECTED,
   CHECKBODY_MUL,DEL_CHECKBODY_LABLE,SET_CK_RADIO_INPUT_VAL,SET_IMPORT_CHECKBODY_LABEL,PRESET} from '../types/checkBody.js';
-import {recoveTag,set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,
-  setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel,backspaceText,
-  changeNumLabelVal,confirm,multipleComfirn,delSingleLable,setRadioInputValue,setImportCheckbodyLabel,preSetCheckbody} from '../actions/checkBody.js';
+import {recoveTag,set,setCheckBoxValue,addLabelItem,setCheckText,
+  setSearchData,insertLabelData,changeLabelVal,clearCheckBody,backspaceText
+  ,confirm,multipleComfirn,delSingleLable,setImportCheckbodyLabel,preSetCheckbody} from '../actions/checkBody.js';
+import {setRadioInputValue,setRadioValue,setNumberValue,setInputLabel} from '@utils/utils';
 import config from '@config/index.js';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
@@ -46,8 +47,6 @@ export default function(state=initState,action){
       return changeLabelVal(state,action);
     case CHECKCONFIRMSELECTED:
       return confirm(state,action);
-    case CHANGECHECKTEXTLABEL_NUMBER://数字键盘
-      return changeNumLabelVal(state,action);
     case CHECK_FOCUS_INDEX:
       res.focusIndex = action.index;
       res.span = action.$span;

+ 5 - 6
src/store/reducers/currentIll.js

@@ -2,10 +2,11 @@
 import {RECOVER_TAG_CURRENT,SET_CURRENT,CURRENT_CONFIRM,INSERT_PROCESS,SET_CURRENT_DATA,SET_LABEL_MODULE,SETMAINCHECKBOX,
   CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
   SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,
-  SETCURRENTINPUT,DEL_CURRENT,CURRENT_TEXT_LABEL_NUMBER,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,SAVE_CURR_FREE} from '../types/currentIll';
-import {recoveTag,confirm,insertProcess,setData,setCheckBox,setRadioValue,setNumberValue,changeLabelVal,clearCurrentIll,
-  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,setInputLabel,
-  backspaceText,changeNumLabelVal,removeId,multipleComfirn,delSingleLable,setRadioInputValue,fillChronicModule} from '../actions/currentIll';
+  SETCURRENTINPUT,DEL_CURRENT,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,SAVE_CURR_FREE} from '../types/currentIll';
+import {recoveTag,confirm,insertProcess,setData,setCheckBox,changeLabelVal,clearCurrentIll,
+  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,
+  backspaceText,removeId,multipleComfirn,delSingleLable,fillChronicModule} from '../actions/currentIll';
+import {setRadioInputValue,setRadioValue,setNumberValue,setInputLabel} from '@utils/utils';
 
 const initState = {
   moduleData:[],
@@ -45,8 +46,6 @@ export default function(state=initState,action){
       return setNumberValue(state,action);
     case CURRENT_TEXT_LABEL://标签双击编辑
       return changeLabelVal(state,action);
-    case CURRENT_TEXT_LABEL_NUMBER://数字键盘
-      return changeNumLabelVal(state,action);
     case CURRENT_GET_BIGDATAPUSH://标签双击编辑
       return bigDataSymptom(state,action);
     case SET_CURRENT_SEARCH://搜索结果

+ 9 - 8
src/store/reducers/mainSuit.js

@@ -1,13 +1,13 @@
 import {RECOVER_TAG_MAIN,COMM_SYMPTOMS,CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,
   SET_SEARCH,CLEAR_SEARCH,GET_BIGDATAPUSH,SET_MAINSUIT,MIX_CONFIRM,NUMBER_SELECT,
   RADIO_SELECT,COMM_CONFIRM,CHANGE_LABELVAL,SAVE_FREE,CLEAR_MAIN_SUIT,SET_DATA,
-  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN,CHANGE_LABELVAL_NUMBER,
+  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN,
   REMOVE_MAIN_ID,MAINSUIT_MUL,DEL_MAIN_LABLE,SET_FEATURE,SET_MS_RADIO_INPUT_VAL,SAVE_CHRONIC,MAIN_REMOVE_SPAN,SET_ADD_SEARCH,CLEAR_ADD_SEARCH} from '../types/mainSuit'
 import {recoveTag,getCommSymptoms,handleTailClick,insertMain,setSearch,getBigSymptom,setMainMoudle,confirm,
-  setNumberValue,setRadioValue,commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,
-  addLabelItem,setInputLabel,backspaceText,changeNumLabelVal,removeId,multipleComfirn,delSingleLable,
-  getSymptomFeature,setRadioInputValue,chooseSearch} from '../actions/mainSuit'
-
+  commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,
+  addLabelItem,backspaceText,removeId,multipleComfirn,delSingleLable,
+  getSymptomFeature} from '../actions/mainSuit'
+import {setRadioInputValue,setNumberValue,setRadioValue,setInputLabel} from '@utils/utils';
 
 const initState = {
   showDrop:false,
@@ -73,8 +73,6 @@ export default function(state=initState,action){
       return setRadioValue(state,action);
     case CHANGE_LABELVAL://改变标签值
       return changeLabelVal(state,action);
-    case CHANGE_LABELVAL_NUMBER://数字标签输入值
-      return changeNumLabelVal(state,action);
     case SAVE_FREE://自由输入
       return saveFreeVal(state,action);
     case MAIN_FOCUS_INDEX:
@@ -123,7 +121,10 @@ export default function(state=initState,action){
       res.addSearchData = action.data;
       return res;
     case CLEAR_ADD_SEARCH://清空症状搜索结果
-      res.addSearchData = [];
+      //非必要是不要重复赋值[],造成searchBox componentWillReceiveProps循环调用导致内存泄漏
+      if(res.addSearchData&&res.addSearchData.length>0){
+        res.addSearchData = [];
+      }
       return res;
     default:
       return state;

+ 6 - 7
src/store/reducers/otherHistory.js

@@ -1,9 +1,10 @@
 import {RECOVER_TAG_OTHER,SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT,SETOTHERSEARCHDATA,
   SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,
-  OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,CHANGEOTHERTEXTLABEL_NUMBER,OTHERHIS_MUL,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE,SET_OT_RADIO_INPUT_VAL} from '../types/otherHistory';
-import {recoveTag,confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,
-  changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText,changeNumLabelVal,multipleComfirn,
-  removeId,delSingleLable,setRadioInputValue} from '../actions/otherHistory';
+  OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,OTHERHIS_MUL,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE,SET_OT_RADIO_INPUT_VAL} from '../types/otherHistory';
+import {recoveTag,confirm,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,
+  changeTextLabel,setTextModeValue,addLabelItem,setNumberValue,otherEditClear,backspaceText,multipleComfirn,
+  removeId,delSingleLable} from '../actions/otherHistory';
+import {setRadioInputValue,setRadioValue,setInputLabel} from '@utils/utils';
 import config from '@config/index';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
@@ -50,10 +51,8 @@ export default function(state=initState,action){//console.log(state)
       return clearOtherHistory(state,action);
     case CHANGEOTHERTEXTLABEL:
       return changeTextLabel(state,action);
-    case CHANGEOTHERTEXTLABEL_NUMBER:
-      return changeNumLabelVal(state,action);
     case SETOTHERINPUT:
-      return setOtherInput(state,action);
+      return setInputLabel(state,action);
     case SETTEXTMODEVALUE:
       return setTextModeValue(state,action);
     case OTHERADDLABELITEM:

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

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

@@ -13,7 +13,6 @@ export const CHECK_FOCUS_INDEX = 'check_focus_text_index';
 export const CHECKBODY_CLEAR = 'clear_search_check_body';
 export const SETCHECKINPUT = 'set_check_body_input_label';
 export const DEL_CHECKBODY = 'DEL_CHECKBODY';//backspace
-export const CHANGECHECKTEXTLABEL_NUMBER = 'CHANGECHECKTEXTLABEL_NUMBER';//数字键盘
 export const CHECKCONFIRMSELECTED = 'spread_check_body_labels';
 export const CHECKBODY_MUL = 'CHECKBODY_MUL';//单列多选
 export const DEL_CHECKBODY_LABLE = 'DEL_CHECKBODY_LABLE';

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

@@ -21,7 +21,6 @@ export const CLEAR_CURRENT_EDIT = 'CLEAR_CURRENT_EDIT' ;
 export const CURRENTADDLABELITEM = 'current_add_label_item';    //带加号的标签复制
 export const SETCURRENTINPUT = 'SET_CURRENT_ILL_INPUT_LABEL';     //文本输入标签存值
 export const DEL_CURRENT = 'DEL_CURRENT';     //backspace删除
-export const CURRENT_TEXT_LABEL_NUMBER = 'CURRENT_TEXT_LABEL_NUMBER';     //数字键盘输入
 export const REMOVE_CURR_ID = 'REMOVE_CURR_ID';     //删除后移除id
 export const CURRENT_MUL = 'CURRENT_MUL';     //单列多选
 export const DEL_CURRENT_LABLE = 'DEL_CURRENT_LABLE';     //

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

@@ -22,7 +22,6 @@ export const SETMAINTEXT = 'SETMAINTEXT';  //模板下输入值
 export const MAINADDLABELITEM = 'MAIN_ADD_LABEL_ITEM';      //带加号的标签复制
 export const SETMAININPUT = 'SET_MAIN_INPUT_LABEL';     //文本输入标签存值
 export const DEL_MAIN = 'DEL_MAIN';     //删除标签
-export const CHANGE_LABELVAL_NUMBER = 'CHANGE_LABELVAL_NUMBER';     //数字键盘输入存值
 export const REMOVE_MAIN_ID = 'REMOVE_MAIN_ID';     //移除id
 export const MAINSUIT_MUL = 'MAINSUIT_MUL';     //单列多选
 export const DEL_MAIN_LABLE = 'DEL_MAIN_LABLE';     

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

@@ -17,7 +17,6 @@ export const OTHERHIS_CLEAR = 'OTHERHIS_CLEAR';  //清空搜索值
 export const OTHERADDLABELITEM = 'other_add_label_item';    //带加号的标签复制
 export const OTHEREDICLEAR = 'OTHEREDICLEAR';    //文本框是否可以编辑
 export const DEL_OTHERHIS = 'DEL_OTHERHIS';    //backspace
-export const CHANGEOTHERTEXTLABEL_NUMBER = 'CHANGEOTHERTEXTLABEL_NUMBER';    //数字键盘
 export const OTHERHIS_MUL = 'OTHERHIS_MUL';    //单列多选
 export const REMOVE_OTHER_ID = 'REMOVE_OTHER_ID';    
 export const DEL_OTHERHIS_LABLE = 'DEL_OTHERHIS_LABLE';

+ 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
 
 

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
-const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-// const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.121:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚

+ 20 - 148
src/utils/tools.js

@@ -22,84 +22,7 @@ import $ from 'jquery';
  * 工具函数
  *
  * ***/
-const ARR = "Array";
-const NUMBER = "Number";
-const STRING = "String";
-const OBJECT = "Object";
-const UNDEFINED = "Undefined";
-const NULL = "Null";
-const BOOLEAN = "Boolean";
 const qs = require('qs');
-
-//  数据类型判断
-const Type = {
-    typeConstant: {
-        'array': ARR,
-        'number': NUMBER,
-        'string': STRING,
-        'object': OBJECT,
-        'undefined': UNDEFINED,
-        'null': NULL,
-        'boolean': BOOLEAN
-    },
-    tolower: (str)=> {
-        if(typeof str !== "string") {
-            return "";
-        }
-        return str.toLowerCase();
-    },
-    checkType: (el, type)=> {
-        type = Type.tolower(type);
-        type = Type.typeConstant[type];
-        return Object.prototype.toString.call(el) === "[object "+ type +"]";
-    }
-}
-
-// 计算字符串长度,该长度将一个中文字算作2个字符长度
-const regexp = {
-    ch: (str)=> {//匹配中文
-        if(typeof str !== "string") {
-            return "";
-        }
-        return str.match(/[\u4e00-\u9fa5]/g) || "";
-    },
-    chLen: function (str) {//中文长度
-        return regexp.ch(str).length;
-    },
-    strLen: function (str) {//字符串长度(一个中文当作两个英文字母)
-        if(typeof str !== "string") {
-            return 0;
-        }
-        return str.length + regexp.chLen(str);
-    }
-}
-
-//判断是否空对象或未定义
-const isUndefined = function (str) {
-    if(str === 0 || str === "") {
-        return false;
-    }
-    return (Type.checkType(str, 'null') || Type.checkType(str, 'undefined'));
-   
-}
-//sessionStorage方法封装
-const Storage = {
-    session: {
-        get: function (name) {
-            return JSON.parse(sessionStorage.getItem(name));
-        },
-        set: function (name, data) {
-            sessionStorage.setItem(name, JSON.stringify(data));
-        },
-        remove: function (name) {
-            sessionStorage.removeItem(name);
-        },
-        clear: function () {
-            sessionStorage.clear();
-        }
-    }
-};
-
 //localStorage方法封装
 const storageLocal = {
   set: function (name, data) {
@@ -122,8 +45,6 @@ const storageLocal = {
   }
 };
 
-const nullFn = ()=>{};
-
 //是否为空
 const isNull = (item)=>{
     return String(item)=== "" || String(item)==="null" || String(item)==="undefined";
@@ -177,7 +98,7 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.currentIllSelecteds = baseList.currentIll.selecteds;      //主诉选中状态保存
     jsonData.otherHistorySelecteds = baseList.otherHistory.selecteds;      //主诉选中状态保存
     jsonData.checkBodySelecteds = baseList.checkBody.selecteds;      //主诉选中状态保存
-    jsonData.addItems = baseList.homePage.addItems||{};
+    //jsonData.addItems = baseList.homePage.addItems||{};
     jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
     jsonData.mainChronicDesease = baseList.mainSuit.chronicDesease;      //主诉慢病{}
     jsonData.diagChronicMagItem = baseList.diagnosticList.chronicMagItem;      //诊断慢病{}
@@ -378,10 +299,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     data:dataJson.advice,
                     saveText:dataJsonStr.advice
                 });
-                store.dispatch({
+                /*store.dispatch({
                   type:SETREADDITEMS,
                   data:dataJson.addItems
-                });
+                });*/
                 store.dispatch({
                   type:CLEAR_FIRST_MAIN_DIAG,
                   flag:dataJson.isFirstMainDiag
@@ -451,10 +372,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     data:dataJson.advice,
                     saveText:dataJsonStr[7].content ? dataJsonStr[7].content:''
                 });
-              store.dispatch({
+              /*store.dispatch({
                 type:SETREADDITEMS,
                 data:dataJson.addItems
-              });
+              });*/
               store.dispatch({
                 type:CLEAR_FIRST_MAIN_DIAG,
                 flag:dataJson.isFirstMainDiag
@@ -505,10 +426,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     data:dataJson.advice,
                     saveText:dataJsonStr.advice,
                 });
-              store.dispatch({
+              /*store.dispatch({
                 type:SETREADDITEMS,
                 data:dataJson.addItems
-              });
+              });*/
               store.dispatch({
                 type:CLEAR_FIRST_MAIN_DIAG,
                 flag:dataJson.isFirstMainDiag
@@ -566,10 +487,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     data:dataJson.advice,
                     saveText:dataJsonStr[7].content ? dataJsonStr[7].content:''
                 });
-              store.dispatch({
+              /*store.dispatch({
                 type:SETREADDITEMS,
                 data:dataJson.addItems
-              });
+              });*/
               store.dispatch({
                 type:CLEAR_FIRST_MAIN_DIAG,
                 flag:dataJson.isFirstMainDiag
@@ -715,16 +636,16 @@ function didPushParamChange(){
   const oldParams = storageLocal.get('emrParam');
   const newParams = JSON.stringify({
     age: emrData.age,
+    hosCode:emrData.hosCode,
     diag: emrData.dis,
     lis: emrData.lis,
     other: emrData.other,
     pacs: emrData.pacs,
     sex: emrData.sex,
     vital:emrData.vital,
-    symptom: emrData.current + emrData.main,
-    hosCode:emrData.hosCode
+    symptom: emrData.current + emrData.main
   });
-  if(newParams == oldParams){
+  if(newParams === oldParams){
       return false;
   }
   return true;
@@ -791,14 +712,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})`
   }
 }
@@ -932,19 +859,6 @@ function parseChartData(indexData){
   //nameObj,obj;
   return {nameObj,obj};
 }
-//函数类工具,对函数进行操作 返回函数
-//延时操作
-function debounce(func, delay) {
-  let timer = null;
-  return function (...args) {
-    if (timer) {
-      clearTimeout(timer);
-    }
-    timer = setTimeout(() => {
-      func.apply(this, args);
-    }, delay);
-  }
-}
 
 // 时间戳转换日期
 function dateParser(timestamp,link = '-'){
@@ -960,40 +874,6 @@ function dateParser(timestamp,link = '-'){
   return result;
 }
 
-//时间搓转换年龄
-function getAge(time){
-  const birthday = new Date(time),
-    year = birthday.getFullYear(),
-    month = birthday.getMonth() + 1,
-    day = birthday.getDate(),
-    now = new Date(),
-    now_year = now.getFullYear(),
-    now_month = now.getMonth() + 1,
-    now_day = now.getDate();
-  let age= now_year - year;
-  if (now_month > month) {
-    age += 1;
-  } else if (now_month === month) {
-    if (now_day >= day) {
-      age += 1;
-    }
-  }
-  return age;
-};
-
-//获取URL参数-返回json对象
-function parseUrl(url){
-  const r = url.substr(1).split("&"),
-    obj = {};
-  r.forEach((v) => {
-    const index = v.indexOf('=');
-    if (index > -1) {
-      obj[v.substring(0, index)] = v.substring(index + 1);
-    }
-  });
-  return obj;
-}
-
 //获取组合组件已填文字填入saveText
 function getSaveText(data){//console.log(data)
   const arr = data.questionMapping.map((it)=>{
@@ -1431,21 +1311,13 @@ function setPosition (e,dom,setHighter){
   },10);
 }
 module.exports = {
-    checkType: Type.checkType,
     getIds,
     getWindowInnerWidth,
     getWindowInnerHeight,
     getLabelIndex,
     fullfillText,
     checkFullfillText,
-    parseUrl,
-    getAge,
     dateParser,
-    debounce,
-    regexp,
-    isUndefined,
-    Storage,
-    nullFn,
     isNotNull,
     isNull,
     deepClone,

+ 192 - 0
src/utils/utils.js

@@ -0,0 +1,192 @@
+import {getLabelIndex,getEMRParams,storageLocal} from './tools';
+import { json } from "./ajax";
+/**
+ * 各类标签统一的处理函数
+ *
+ * */
+const api = {
+  push:'/push/pushInner'
+};
+//数字键盘选中事件
+export function setNumberValue(state,action){
+  let res = Object.assign({},state);
+  const param = action.params;
+  const ikey = param.ikey;
+  let labelInx = getLabelIndex(ikey);
+  const subInx = ikey.split("-")[2];
+  let item = res.data[labelInx];
+  if(+item.tagType===1){      //独立数字键盘组件
+    item.value = param.text;
+    res.saveText[labelInx] = param.text?item.labelPrefix+param.text+item.labelSuffix:'';
+  }else{            //内嵌血压类型组件的数字键盘组件
+    item.questionMapping[subInx].value = param.text;
+    let hasValue = false;
+    const sub = item.questionMapping.map((it)=>{
+      if(it.value){     //至少有一个子值才黑显
+        hasValue = true;
+      }
+      if(it.tagType===8){       //维护时的连接词无value
+        return it.name;
+      }else{
+        //组合中未填值的子标签预览中不显示
+        if(!it.value){
+          return '';
+        }
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+
+    });
+    res.saveText[labelInx] = hasValue?sub.join(''):'';
+  }
+  res.update = Math.random();
+  return res;
+}
+//单选下拉选中
+export function setRadioValue(state,action){
+  let res = Object.assign({},state);
+  const {ikey,id,text} = action;
+  let labelInx = getLabelIndex(ikey);
+  const subInx = ikey.split("-")[2];
+  let item = res.data[labelInx];
+  if(+item.tagType===1){
+    item.value = text;
+    res.saveText[labelInx] = item.labelPrefix+text+item.labelSuffix;
+    item.questionDetailList.map((its)=>{
+      if(its.id === id){
+        its.selected = true;
+      }else{
+        its.selected = false;
+      }
+    });
+  }else{
+    item.questionMapping[subInx].value = text;
+    let hasValue = false;
+    const sub = item.questionMapping.map((it)=>{
+      //添加选中状态
+      it.questionDetailList.map((its)=>{
+        if(its.id === id){
+          its.selected = true;
+        }else{
+          its.selected = false;
+        }
+      });
+
+      if(it.value){     //至少有一个子值才黑显
+        hasValue = true;
+      }
+      if(it.tagType===8){      //维护时的连接词无value
+        return it.name;
+      }else{
+        //组合中未填值的子标签预览中不显示
+        if(!it.value){
+          return '';
+        }
+        return (it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||'');
+      }
+    });
+    res.saveText[labelInx] = hasValue?sub.join(''):'';
+    item.value = sub.join('');
+  }
+  res.update = Math.random();
+  return res;
+}
+
+//单选带输入值保存,该类型不可加入血压类型中
+export const setRadioInputValue = (state,action)=>{
+  const res = Object.assign({},state);
+  const {ikey,values,id} = action.data;
+  let index = getLabelIndex(ikey);
+  let item = res.data[index];
+  let str='',temp='',obj=item.questionDetailList;
+  if(!values){    //清空
+    let sld=obj.find((item)=>{
+      return item.selected==true;
+    });
+    sld?sld.selected=false:'';
+    item.vals = null;
+    item.value = '';
+    res.saveText[index] = '';
+    res.update = Math.random();
+    return res;
+  }
+  //存值
+  for(let i in values){
+    temp = values[i];
+    if(typeof temp=='object'){
+      str+=temp.value;
+    }else{
+      str+=temp;
+    }
+  }
+  //选中状态
+  if(id){
+    obj.map((its)=>{
+      if(its.id === id){
+        its.selected = true;
+      }else{
+        its.selected = false;
+      }
+    });
+  }
+  item.vals = values;
+  item.value = str;
+  res.saveText[index] = str;
+  res.update = Math.random();
+  return res;
+}
+
+//文本输入标签inlineTag值保存
+export function setInputLabel(state,action){
+  let res = Object.assign({}, state);
+  const {i,text,prefix,suffix,subIndex} = action;
+  const item = res.data[i];
+  if(+item.tagType===3){      //multSpred标签
+    item.questionMapping[subIndex].value = text;
+    let texts = item.questionMapping.map((it)=>{
+      if(it.tagType===8){
+        return it.name;
+      }else{
+        return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
+      }
+
+    });
+    res.saveText[i] = texts.join('');
+    res.update = Math.random();
+    return res;
+  }else{
+    if(item){
+      item.value=text;
+    }
+  }
+  if(text){
+    res.saveText[i] = prefix+text+suffix;
+  }else{//删除完要清空
+    res.saveText[i] = "";
+  }
+  res.update = Math.random();
+  return res;
+}
+
+//获取大数据推送结果:
+// type需推送的类型,symData症状相关的内容(symptom入参),save参数是否要保存到本地做变化对比
+export async function getBigPush(type,symData,save){
+  const emrData = getEMRParams();
+  const params = {
+    "age": emrData.age,
+    "hosCode": emrData.hosCode,
+    "featureType": type,  //类型1:症状,4:查体,5:化验,6:辅检,7:诊断
+    "diag": emrData.dis,
+    "lis": emrData.lis,
+    "other": emrData.other,
+    "pacs": emrData.pacs,
+    "sex": emrData.sex,
+    "vital":emrData.vital,
+    "symptom": symData||emrData.current + emrData.main
+  };
+  if(save){
+    let savePm = Object.assign({},params);
+    delete savePm.featureType;
+    storageLocal.set('emrParam',savePm);      //推送数据存储,用作推送前对比是否有变,有变才推送
+  }
+  return json(api.push,params);
+}