Browse Source

Merge remote-tracking branch 'origin/testedMerge'

zhouna 5 years ago
parent
commit
9daf9a375a

+ 7 - 6
src/common/components/EditableSpan/index.jsx

@@ -303,7 +303,8 @@ class EditableSpan extends Component{
             }
           }else{
             let tmpVal = data.substr(0,data.length-1)
-            handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            // handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            removeId && removeId({boxMark,i:index-1,text:""});
             preObj.html(tmpVal)
             if(preObj[0].nodeName !=="DIV"){
               moveEnd(preObj[0]);
@@ -353,16 +354,16 @@ class EditableSpan extends Component{
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
     //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
     const ext = preIsExt?style['ext']:style['unselect'];
-    const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
+    const unselect = value.match(config.punctuationReg)||(preSelected&&preSelected.match(config.punctuationReg))?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
     const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
-    if(br&&$span&&!$span.innerText){
-      this.$span.current.innerHTML=' ';
+    const val = $span&&$span.innerHTML.trim();
+    if(br&&$span&&!val){
+      $span.innerHTML=' ';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6),selectedArea);
+    return classNames(style['editable-span'],isFull,hasBr,setFontColorSize(2,unselect?6:8),unselect,selectedArea);
   }
-
   render() {
     return <span className={this.getClass()}
                  contentEditable='true'

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

@@ -73,6 +73,7 @@ class NumberPan extends Component{
                 style={this.getStyle()}
                 onBlur={(e)=>e.stopPropagation()} 
                 onDoubleClick={(e)=>e.stopPropagation()}
+                onMouseDown={(e)=>e.stopPropagation()}
                 onClick={(e)=>e.stopPropagation()}>
       <table className={style['pan']} >
         <tr>

+ 1 - 1
src/common/less/base.less

@@ -50,7 +50,7 @@ button + button {
 html,body {
     font-size: @font-size-base; 
     // color: @B800;
-    background: @body-bg;
+    /*background: @body-bg;*/
 }
 :global(#root) {
     overflow: auto;

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

@@ -201,6 +201,7 @@
 .blue-border{
   border:2px @blue solid;
   border-radius: 2px;
+  cursor: text!important;
   /*box-shadow: 0px 0px 2px @blue;*/
 }
 

+ 5 - 4
src/components/Banner/index.jsx

@@ -107,7 +107,7 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
+    const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
@@ -121,10 +121,10 @@ class Banner extends Component {
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       <i>本科室近期全部病历</i>
                     </div>:''}
-          <div className={style.prec} onClick={()=>preShow(show)}>
+          {pre == 1?<div className={style.prec} onClick={()=>preShow(show)}>
             <img className={style["st"]} src={prec} alt="预问诊"/>
             <i> 预问诊信息</i>
-          </div>
+          </div>:null}
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
             <i> 设置</i>
@@ -157,7 +157,8 @@ const mapStateToProps = function(state){
   return {
     ifShow:sysConfig.general_show,
     deptName:message.selfDeptName,
-    show:state.preIcss.preShow
+    show:state.preIcss.preShow,
+    pre:sysConfig.connect_prec
   }
 }
 

+ 31 - 11
src/components/ChronicInfo/index.jsx

@@ -51,6 +51,8 @@ class ChronicInfo extends React.Component{
     };
     this.$result = React.createRef();
     this.$content = React.createRef();
+    this.$calcuFormula = React.createRef();
+    this.$resultLikely = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
     this.showOption = this.showOption.bind(this);
@@ -96,16 +98,24 @@ class ChronicInfo extends React.Component{
       infoId:null
     })
   }
-  showOption(id){
+  showOption(id,e){
     this.setState({
       optionId:id,
       formulaId:null //关闭计算公式
     });
     const {patDom} = this.props;
     const ht = $(patDom.current).height();
-    setTimeout(function(){
-      $(patDom.current).scrollTop(ht+200);
-    })
+    const bottom = ht+120-e.clientY
+    
+    // setTimeout(function(){
+
+    //   $(patDom.current).scrollTop(ht);
+    // })
+    if(bottom < 220) {
+      setTimeout(()=>{
+        this.$resultLikely.current.scrollIntoView(true)
+      })
+    }
   }
   closeOption(){
     // 关闭-有可能结果则保持与结果一致,没有就保持最新选择的内容
@@ -190,18 +200,28 @@ class ChronicInfo extends React.Component{
       ff:false
     })
   }
- 
-  showFormula(id){//计算公式
+  showFormula(id,e){//计算公式
     this.setState({
       formulaId:id,
       optionId:null  //关闭可能结果
     });
     const {patDom} = this.props;
     const ht = $(patDom.current).height();
-    setTimeout(function(){
-      $(patDom.current).scrollTop(ht+200);
-    })
+  
+    const bottom = ht+120-e.clientY
+    
+    // setTimeout(function(){
+
+    //   $(patDom.current).scrollTop(ht);
+    // })
+    if(bottom < 340) {
+      setTimeout(()=>{
+        this.$calcuFormula.current.scrollIntoView(true)
+      })
+    }
+   
   }
+
   closeFormula(it){
     const {formulaId,isCalculated} =this.state;
     if(!isCalculated){
@@ -415,7 +435,7 @@ class ChronicInfo extends React.Component{
                           // const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
                           //每次都取最新推送内容
                           const details = it.content.details || [];
-                          return <div className={style["marTop"]}>
+                          return <div className={style["marTop"]}  ref={this.$calcuFormula}>
                             <span className={style["limit"]}>
                               计算公式结果:
                               <i className={style["blue"]} onClick={this.showFormula.bind(this,v.conceptId)}>{result?result:'请选择'}</i>
@@ -484,7 +504,7 @@ class ChronicInfo extends React.Component{
                             </MiniToast>}
                           </div>
                         }else if(it.type==3){
-                          return <div className={style["marTop"]}>
+                          return <div className={style["marTop"]} ref={this.$resultLikely}>
                             <span className={style["limit"]}>
                               可能结果:
                               <i onClick={this.showOption.bind(this,v.conceptId)} className={style["blue"]}>{possible[v.conceptId]?possible[v.conceptId]:'请选择'}</i>

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

@@ -64,9 +64,8 @@ class DiagnosticItem extends Component{
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
-        const {item, isChronicMag,mode} = this.props;
+        const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
         item.type = diagType;
-         const {  addDiagnostic, clearInput, hideSearch } = this.props;
 
          if(item.type == 2&&mode=='0') {      //文本模式不走慢病
              isChronicMag(item);
@@ -76,6 +75,12 @@ class DiagnosticItem extends Component{
          hideSearch&&hideSearch();
         this.context.scrollArea&&this.context.scrollArea.refresh();
          //document.getElementById("diagnosisResult").scrollIntoView(true)
+         if(type == 'disSelect') {
+            const scrollTop = document.getElementById("diagnosisResult").offsetTop
+            setTimeout(() =>{
+               EMRScrollCont.scrollYTo(scrollTop);
+            })
+         }
     }
     handleMouseEnterDrug() {
         this.setState({

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

@@ -48,7 +48,7 @@ class EMRContainer extends Component {
         const contStyle={
                           opacity:'0.4',
                           top:'1px',
-                          right:'460px',
+                          right:'458px',
                           zIndex:'15',
                           width:'14px',
                           background:'#f1f1f1'};

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

@@ -9,7 +9,7 @@
   position: fixed;
   left: 10px;
   top: 50px;
-  right: 470px;
+  right: 468px;
   min-width: 548px;
   padding-right: 122px;
   .activeWrap {

+ 23 - 9
src/components/NumberDrop/index.jsx

@@ -95,16 +95,28 @@ class NumberDrop extends Component{
       hasSelect:false
     });
   }
-  handleNumFocus(e){
-    /*const {placeholder} = this.state;
-    const val = e.target.innerText.trim();
-    //console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
+  handleNumFocus(e){console.log('focus')
+    const {placeholder} = this.state;
+    const val = e.target.innerText.trim();//console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
     if(val!=''&&val == placeholder){
       this.setState({
         placeholder:''
       });
-    }*/
+    }
     e.stopPropagation();
+    const {show,handleShow,ikey,id,patId,handleHide} = this.props;
+    if(show) {
+      handleHide && handleHide();
+      return;
+    }else{
+      this.$span.current.focus();
+      this.setState({
+        hasSelect:false,
+        placeholder:''      //火狐26placeholder点击不隐藏bug修改
+      });
+      handleShow&&handleShow({ikey,id:patId||id});
+    }
+
   }
   handleKeyDowm(e){
     if(e.keyCode==13){
@@ -115,7 +127,7 @@ class NumberDrop extends Component{
   }
   handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     e.stopPropagation();
-    const {show,handleShow,ikey,id,patId,handleHide} = this.props;
+    /*const {show,handleShow,ikey,id,patId,handleHide} = this.props;
     if(show) {
       handleHide && handleHide();
       return;
@@ -126,7 +138,7 @@ class NumberDrop extends Component{
         placeholder:''      //火狐26placeholder点击不隐藏bug修改
       });
       handleShow&&handleShow({ikey,id:patId||id});
-    }
+    }*/
   }
   validSymbols(txt,min,max){
     //输入只有一个~或/时判断两边是否为合理数字,有多个为不合理
@@ -219,8 +231,8 @@ class NumberDrop extends Component{
     e.stopPropagation();
   }
   handleMouseDown(){
-    const {i,setSelectArea,boxMark,show}= this.props;
-    !show&&setSelectArea({i,boxMark,dir:'start'});
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
   }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
@@ -268,6 +280,8 @@ class NumberDrop extends Component{
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
             onkeyup={this.handleKeyDowm}
+            onmousedown={(e)=>e.stopPropagation()}
+            onmouseup={(e)=>e.stopPropagation()}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             className={`${this.getSpanClass(nospecial)}`}

+ 2 - 2
src/components/Operation/index.less

@@ -6,9 +6,9 @@
     position: fixed;
     bottom: 0;
     left: 10px;
-    right: 470px;
+    right: 468px;
     // min-width: 720px;
-    min-width: 548px;
+    min-width: 547px;
     background-color: #fff;
     // z-index: 240;
     padding-bottom: 10px;

+ 18 - 6
src/components/PreInIcss/RotateImg/index.jsx

@@ -36,7 +36,7 @@ class RotateImg extends Component {
     const { idx,imgLis,windowHeight } = this.props;
     let currentImg = imgLis[idx];
     let scaleHeight = windowHeight*0.8;
-    let width = currentImg.width,height = currentImg.height;
+    let width = currentImg.width,height = currentImg.height,overLen;
     if(width>height){
       if(width > scaleHeight){
         height=scaleHeight/width*height
@@ -48,6 +48,7 @@ class RotateImg extends Component {
         height = scaleHeight
       }
     }
+    localStorage.setItem("changeImg",true)
     this.setState({
       current:idx,
       length:imgLis.length,
@@ -55,6 +56,10 @@ class RotateImg extends Component {
       imgHeight:height,
       mgLeft:-width/2,
       mgTop:-height/2
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handleNext(){
@@ -62,7 +67,7 @@ class RotateImg extends Component {
     const { imgLis,isMove,windowHeight } = this.props;
     let scaleHeight = windowHeight*0.8;
     let tmpIdx = this.state.current;
-    let tmpLen = this.state.length,width,height;
+    let tmpLen = this.state.length,width,height,overLen;
     if(tmpIdx == tmpLen-1){
       width = imgLis[0].width
       height = imgLis[0].height
@@ -93,6 +98,10 @@ class RotateImg extends Component {
       mgLeft:-width/2,
       mgTop:-height/2,
       de:0
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handlePrev(){
@@ -130,11 +139,18 @@ class RotateImg extends Component {
       mgLeft:-width/2,
       mgTop:-height/2,
       de:0
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL)
     })
     this.props.setMove(false)
   }
   handlePlus(){
     const {imgWidth,imgHeight,isMove} = this.state;
+    const { idx,imgLis } = this.props;
+    let width = imgLis[idx].width
+    let height = imgLis[idx].height
     if(this.props.isMove){
       this.setState({
         imgWidth:1.2*imgWidth,
@@ -175,10 +191,6 @@ class RotateImg extends Component {
       deg = deg-0+90
     }
     this.setState({
-      // imgWidth:tmpHeight,
-      // imgHeight:tmpWidth,
-      // mgLeft:-tmpHeight/2,
-      // mgTop:-tmpWidth/2,
       de:deg
     })
   }

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

@@ -73,6 +73,8 @@ class PushContainer extends Component {
    */
   handleActiveClick(id) {
     if (id == '2') {
+      document.getElementById("searchTmp").value = ""
+      // let searchVal = document.getElementById("searchTmp").value
       store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))

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

@@ -2,6 +2,7 @@
 .container{
   display: inline-block;
   position: relative;
+  cursor: pointer;
   /*margin-right: 5px;*/
 }
 .tag,.selected-tag,.no-tag{

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

@@ -207,6 +207,7 @@ class InputComp extends Component{
                  className={`${style['inner-inp']}`}
                  onClick={(e)=>{e.stopPropagation()}}
                  onFocus={(e)=>{e.stopPropagation()}}
+                 onMouseDown={(e)=>{e.stopPropagation()}}
                  onInput={this.handleInp}
                  onBlur={this.handleBlur}>&nbsp;</span>
   }

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

@@ -143,8 +143,8 @@ class TemplateItems extends React.Component {
                         </div> :
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
-                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} id='clearTemplateSearch' alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>
                             {
@@ -156,7 +156,7 @@ class TemplateItems extends React.Component {
                     items&&!admin ? 
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" id='templateSearch' maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
                                 {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>

+ 1 - 1
src/containers/AssistCheck.js

@@ -9,7 +9,7 @@ import {ISREAD,HIDEDROP} from '@store/types/homePage.js';
 import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
 import { getCalendarDate} from '@utils/tools';
 
-function mapStateToProps(state) {//console.log(state)
+function mapStateToProps(state) {//console.log(state.typeConfig)
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,

+ 2 - 1
src/containers/DiagnosticItem.js

@@ -12,7 +12,8 @@ import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return {
         diagnosticList: state.diagnosticList.diagnosticList,
-        mode:state.typeConfig.mode
+        mode:state.typeConfig.mode,
+        EMRScrollCont:state.inspect.context.scrollArea,             //滚动条对象
     }
 }
 

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

@@ -357,7 +357,7 @@ export const confirm = (state,action) =>{
      for(let i=0;i<exists.length; i++){
       tempArr.push(getLabel(exists[i].id,exists[i].questionMapping && exists[i].questionMapping.length==0?exists[i].name+',':exists[i].name),...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
     }
-    arr.splice(ikey,0,...tempArr);
+    arr.splice(ikey,0,...formatContinueDots(tempArr));
   }
   
   let length = arr.length - length1;
@@ -368,7 +368,7 @@ export const confirm = (state,action) =>{
     for(let i=0;i<withs.length; i++){
       tempArr.push(banText,getLabel(withs[i].id,withs[i].questionMapping && withs[i].questionMapping.length==0?(withs[i].name+','):(withs[i].name)),...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
     }
-    withsArr.splice(parseInt(ikey)+length,0,...tempArr);
+    withsArr.splice(parseInt(ikey)+length,0,...formatContinueDots(tempArr));
   }
 
   // 无 不用展开
@@ -692,7 +692,7 @@ export function removeId(state,action){
       data[index].value = text;
     }
   }else{
-    if(!data[index].value && data[index-1].tagType==8){
+    if(!data[index].value &&data[index-1]&& data[index-1].tagType==8){
       data.splice(index,1);
       res.saveText.splice(index,1);
     }else{

+ 1 - 1
src/store/actions/typeConfig.js

@@ -28,7 +28,7 @@ export const setReadMode=(state,action)=>{
   res.readMode = action.readMode||(action.readConfig&&action.readConfig[0]);
   if(action.readConfig){
     res.readConfig = action.readConfig;
-    res.isPreIcss = action.isPreIcss
   }
+  res.isPreIcss = action.isPreIcss||false
   return res;
 };

+ 8 - 13
src/store/async-actions/fetchModules.js

@@ -266,22 +266,17 @@ export function getAssessData(disId,disName){
   //return ()=>{
     const emrData = getEMRParams();
     const param = {
-      diseaseId:disId,
+      ruleType:config.ruleTypeMap['11'],
       disType:1,
-      diag:disName,
-      diseaseName:disName,
       featureType:'11',
-      ruleType:config.ruleTypeMap['11'],
-      lis:emrData.lis,
-      other: emrData.other,
-      pasts: emrData.other,
-      sex:emrData.sex,
-      age:emrData.age,
-      pacs:emrData.pacs,
-      vital:emrData.vital,
-      symptom:emrData.current + emrData.main
+      diseaseId:disId,
+      diseaseName:{
+        "dateValue": "",
+        "name": disName,
+        "uniqueName": disName
+      }
     };
-    return json(api.getAssess,param);
+    return json(api.getAssess,Object.assign({},param,emrData));
   //}
 }
 

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

@@ -44,18 +44,8 @@ export async function getCommSymptomPush(){//获取大数据推送症状
       const type = 1;
       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,
-        "pasts": emrData.other,
-        "pacs": emrData.pacs,
-        "sex": emrData.sex,
-        "vital":emrData.vital,
-        "symptom": emrData.current + emrData.main
       };
-    const bigData = json(api.symptomPush,params);
+    const bigData = json(api.symptomPush,Object.assign({},params,emrData));
     return bigData;
 }

+ 1 - 1
src/store/async-actions/patInfo.js

@@ -113,7 +113,7 @@ export const initHistoryDetails = (dispatch) => {
             "inquiryCode": state.recordId,
         }).then((res) => {
             const data = res.data;
-            let pre = baseList.homePage.sysConfig.connect_prec;
+            // let pre = baseList.homePage.sysConfig.connect_prec;
             if (data.code == 0) {
                 const detail = data.data;
                 if(detail.dataJson){

+ 19 - 21
src/store/async-actions/preIcss.js

@@ -7,7 +7,7 @@ import {Notify} from '@commonComp';
 
 export const getPreMsg = () => {
     let baseList = store.getState().patInfo.message;
-    json('/api/prec/inquiryInfo/hisInquirys', {
+    json('/api/prec/inquiryInfo/hisInquirysForIcss', {
         "isHaveDetail":1,
         "hospitalCode": baseList.hospitalCode,
         "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline,
@@ -35,27 +35,25 @@ export const tellPred = () => {
     let idcon = baseData.patInfo.message;
     const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
     json('/api/prec/inquiryInfo/inquiryQuoteForIcss', {
-        "hospitalCode": baseList.hospitalCode,
-        "inquiryCode":inCode,
-        "patientCode": baseList.patientCode,
-        "patientIdentityNum":idcon.patientIdentityNum,
-        "doctorCode":baseList.doctorCode,
-        "doctorId": baseList.doctorId,
-        "doctorName":baseList.doctorName,
-        "hospitalDeptCode":baseList.hospitalDeptCode,
-        "hospitalDeptId": baseList.hospitalDeptId,
-        "hospitalDeptName":baseList.hospitalDeptName,
-        "hospitalId": baseList.hospitalId,
-        "hospitalName":baseList.hospitalName,
+        "hospitalCode": idcon.hospitalCode,
+        "hospitalId": idcon.hospitalId,
+        "hospitalName":idcon.hospitalName,
+        "inquiryCode":idcon.recordId,
+        "patientCode": idcon.patientCode,
+        "patientIdentityNum":idcon.patientIdentityNum||null,
+        "doctorCode":idcon.doctorCode,
+        "doctorId": idcon.doctorId,
+        "doctorName":idcon.doctorName,
+        "hospitalDeptCode":idcon.hospitalDeptCode,
+        "hospitalDeptId": idcon.hospitalDeptId,
+        "hospitalDeptName":idcon.hospitalDeptName,
         "inquiryId": baseList.id,
-        "patientId": baseList.patientId,
-        "patientIdNo":baseList.patientIdNo,
-        "patientName":baseList.patientName,
-        "patientPhone":baseList.patientPhone,
-        "patientSex": baseList.patientSex,
-        "sonHospitalCode":baseList.sonHospitalCode,
-        "sonHospitalId": baseList.sonHospitalId,
-        "sonHospitalName":baseList.sonHospitalName
+        "patientId": idcon.patientId,
+        "patientIdNo":idcon.patientIdNo,
+        "patientName":idcon.patientName,
+        "patientPhone":idcon.patientPhone||null,
+        "patientSex": idcon.patientSex=='男'?1:idcon.patientSex=='女'?2:3,
+        "patientBirthday": idcon.birthday
     },true).then((res) => {
       
     })

+ 5 - 2
src/store/async-actions/print.js

@@ -13,8 +13,11 @@ import {
     filterOtherDataArr
 } from '@utils/tools';
 export const getConceptDetails = (bool) => {
-    tellPred()
     let baseList = store.getState();
+    let isPreIcss = baseList.typeConfig.isPreIcss;
+    if(isPreIcss){
+        tellPred()
+    }
     let disLis = baseList.diagnosticList.diagnosticList||[];
     let tmpLis  = [];
     for(let i = 0;i < disLis.length;i++){
@@ -192,7 +195,7 @@ function transferIndexData(data) {
    data.map((it)=>{
        if(it.uniqueName&&it.value!=''){
            arr.push({
-             creatTime:it.time+':00',
+             creatTime:it.dateValue,
              indexUnique:it.uniqueName,
              indexUnit:it.units,
              indexValue:it.value,

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

@@ -260,20 +260,11 @@ export const getScaleInfo = (it)=>{
     return (dispatch,getState)=>{
         const emrData = getEMRParams();
           const params = {
-            age: emrData.age,
-            sex: emrData.sex,
             featureType: "21",
-            diag: emrData.dis,
-            lis: emrData.lis,
             scaleId:it.conceptId,
-            scaleName:it.name,
-            other: emrData.other,
-            pacs: emrData.pacs,
-            vital:emrData.vital,
-            symptom: emrData.current + emrData.main,
-            // indications:'' //指标结果
+            scaleName:it.name
           };
-        json(api.getTableInfo, params)
+        json(api.getTableInfo, Object.assign({},params,emrData))
         .then((res)=>{
             const result = res.data;
             // if(result.code==0 && result.data.scale && result.data.scale.length>0){

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

@@ -36,7 +36,7 @@ export const initItemList = (current,name) => {
 export const initCommonItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
   let state = baseList.patInfo.message;
-
+  // let searchVal = document.getElementById("searchTmp").value
   return (dispatch) => {
     axios.json('/templateInfo/getTemplatePageAlls', {
       "doctorId": state.doctorId,
@@ -60,6 +60,7 @@ export const initCommonItemList = (current,name) => { //初始化数据
 };
 export const initAdminItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
+  // let searchVal = document.getElementById("searchTmp").value
   let state = baseList.patInfo.message;
   return (dispatch) => {
     axios.json('/templateAdmin/getTemplatePageAlls', {

+ 12 - 86
src/store/async-actions/treat.js

@@ -13,7 +13,7 @@ import {getChronic} from '@store/async-actions/homePage.js';
 import config from "@config/index";
 
 const api={
-    pushTreatment:'/push/pushTreatment',
+    push:'/push/pushInner',
     getConceptDetail:'/conceptDetail/getConceptDetail'
 }
 
@@ -24,90 +24,17 @@ export const getTreatResult = (item) =>{
             treatItem: item
         })
         const state = getState();
-        let url = api.pushTreatment;
+        let url = api.push;
         
 
         const emrData = getEMRParams();
-        const diagnosticList = state.diagnosticList.diagnosticList;
-        let diag = '';
-        if(diagnosticList) {
-            for (let i = 0; i < diagnosticList.length; i++ ) {
-                if(i === 0 ) {
-                    diag = diag + diagnosticList[i].name;
-                } else {
-                    diag = diag + ',' + diagnosticList[i].name;
-                }
-                
-            }
+        const diseaseName = {
+            "dateValue": "",
+            "name": "",
+            "uniqueName": item.name
         }
-        const params = {
-            "age": emrData.age,
-            "featureType": "8",
-            "ruleType":config.ruleTypeMap["8"],
-            "diag": diag,
-            "diseaseName":  item.name,
-            "lis": emrData.lis,
-            "other": emrData.other,
-            "pasts": emrData.other,
-            "pacs": emrData.pacs,
-            "sex": emrData.sex,
-            "symptom": emrData.current + emrData.main,
-            "vital": emrData.vital,
-            "patientId": emrData.patientId,
-            "hosCode": emrData.hosCode
-        };
-        // const params = {
-        //     "disType":"1",
-        //     "age":28,
-        //     "diag":"2型糖尿病性肾病,1型糖尿病,糖尿病肾病",
-        //     "diseaseName":"2型糖尿病",
-        //     "featureType":"8",
-        //     "hosCode":"A001",
-        //     "lis":[
-        //         {
-        //             "name":"糖化血红蛋白测定",
-        //             "detailName":"糖化血红蛋白(HbA1c)",
-        //             "uniqueName":"糖化血红蛋白测定--糖化血红蛋白(HbA1c)",
-        //             "source":"0",
-        //             "minValue":4,
-        //             "otherValue":"",
-        //             "maxValue":6,
-        //             "units":"%",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"空腹葡萄糖测定",
-        //             "detailName":"葡萄糖(GLU)",
-        //             "uniqueName":"空腹葡萄糖测定--葡萄糖(GLU)",
-        //             "source":"0",
-        //             "minValue":3.9,
-        //             "otherValue":"",
-        //             "maxValue":6.1,
-        //             "units":"mmol/L",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"肝功能测定",
-        //             "detailName":"谷丙转氨酶(ALT)",
-        //             "uniqueName":"肝功能测定--谷丙转氨酶(ALT)",
-        //             "source":"0",
-        //             "minValue":5,
-        //             "otherValue":"",
-        //             "maxValue":40,
-        //             "units":"U/L",
-        //             "value":"180"
-        //         }
-        //     ],
-        //     "lisOrder":"",
-        //     "lisString":"",
-        //     "other":"",
-        //     "otherOrder":"",
-        //     "pacs":"",
-        //     "pacsOrder":"",
-        //     "sex":1,
-        //     "symptom":"患者患有2型糖尿病近来出现泡沫尿",
-        //     "vital":"体温40℃"
-        // }
+        const params = Object.assign(emrData,{"diseaseName":diseaseName,"featureType": "8",
+            "ruleType":config.ruleTypeMap["8"],})
         const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
         // const isChronic = true
         if (isChronic) {
@@ -120,7 +47,7 @@ export const getTreatResult = (item) =>{
                             params.disType = 1
                         }
                     }
-                    getTreatment(item, dispatch, state, url,params, isChronic)
+                    getTreatment(item, dispatch, state, url,Object.assign({},params,emrData), isChronic)
 
                 });
             } else {
@@ -129,10 +56,10 @@ export const getTreatResult = (item) =>{
                         params.disType = 1
                     }
                 }
-                getTreatment(item, dispatch, state,url,params, isChronic)
+                getTreatment(item, dispatch, state,url,Object.assign({},params,emrData), isChronic)
             }
         } else {
-            getTreatment(item, dispatch, state,url,params, isChronic)
+            getTreatment(item, dispatch, state,url,Object.assign({},params,emrData), isChronic)
         }
         
     }
@@ -145,10 +72,9 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
         if(data.data.code == '0') {
             // dispatch({type:MODI_LOADING,flag:false});
             // dispatch({type:SHOW_LOADING,flag:false});
-           
             let treat;
             if(data.data.data) {
-                treat = data.data.data || {}
+                treat = data.data.data.treat || {}
             }
             if(treat) {
                 let { treatmentPlan, commonTreatment, surgeryTreatment, drugHistory, adverseEvent, followUp} = treat

+ 22 - 6
src/store/reducers/assistCheck.js

@@ -12,6 +12,7 @@ const initSearchList = {
   list: [], //点击的结果
   assistLabel: [], //搜索的结果
   dataString: '', //结果拼接
+  dataArr: [], //结果拼接
   assistVal: '',
 
   hospitalPac: [], //医院检索到的
@@ -42,14 +43,18 @@ export default (state = initSearchList, action) => {
       }
     }
     newState.assistLabel = [...tempArr]
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataString = tmpObj.str
+    newState.dataArr = tmpObj.arr
     return newState;
   }
   if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
     const newState = Object.assign({}, state);
     newState.list = action.list
     newState.assistVal = action.val
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataString = tmpObj.str
+    newState.dataArr = tmpObj.arr
     return newState;
   }
   if (action.type == GET_ASSIST_LABEL) { //默认
@@ -70,7 +75,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArrs];
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == DEL_ASSIST_LABEL) { //删除
@@ -87,7 +94,9 @@ export default (state = initSearchList, action) => {
       }
       newState.assistLabel = [...tempArrs]
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CHANGE_ASSIST_VAL) { //改变输入值
@@ -99,7 +108,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CHANGE_DATE) { //新增
@@ -111,7 +122,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CLEAR_ASSIST_DATA) {
@@ -119,6 +132,9 @@ export default (state = initSearchList, action) => {
     newState.assistLabel = [...action.data];
     newState.dataString = action.saveText;
     newState.checkedListImport = action.checkedListImport;
+    if(action.checkedListImport.length == 0&&action.data.length==0){
+      newState.dataArr = [];
+    }
     return newState;
   }
   return state;

+ 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.121:5050';//后端接口访问地址
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236: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'; //周铁刚

+ 29 - 53
src/utils/drag.js

@@ -176,9 +176,8 @@ let imgXS = 0,//鼠标距离图片左侧的位置
     imgDYS = 0,//图片距离顶部的位置top
     drgLeft= 0,
     tmpValL=0,
-    tmpNum=0,
-    tmpName='',
     tmpValR=0,
+    tmpVal=0,
     imgDrag = false;
 function imgDragMove(type){
   let wrap = $("#previewWrapper");
@@ -199,22 +198,8 @@ function imgDragMove(type){
       imgDYS = drag.offset().top;
       imgWXS = wrap.offset().left;
       imgWYS = wrap.offset().top;
+      tmpVal = localStorage.getItem('changeImg')-0;
 
-      if(tmpName){
-        if(drag.attr("src") != tmpName||drag.attr("data-deg")==0){
-          tmpNum==0
-        }
-      }else{
-        tmpName = drag.attr("src")
-      }
-      
-      if(tmpNum == 0){
-        tmpValL = imgDXS-imgWXS;
-        tmpValR = imgDYS-imgWYS;
-        tmpName = 
-        ++tmpNum
-      }
-      console.log(imgDXS,imgWXS,tmpNum,'hahaha')
       $(document).on('mousemove',handleMoveImg)
       $(document).on('mouseup',handleUpImg)
     })
@@ -233,46 +218,37 @@ function handleMoveImg(event){
   let page = getPageCoordinate(event,'0');
   let wrapWidth = drag[0].offsetWidth;
   let wrapHeight = drag[0].offsetHeight;
+  
   if(imgDrag){
-      
-    console.log('鼠标左:'+page.boxLeft)
-    console.log('鼠标图左:'+imgXS)
-    console.log('容器左:'+imgWXS)
-    console.log('被拖图左:'+drag.offset().left)
-    console.log('bian1:'+tmpValL)
-    console.log('bian2:'+tmpValR)
-
+    // console.log('鼠标左:'+page.boxLeft)
+    // console.log('鼠标图左:'+imgXS)
+    // console.log('容器左:'+imgWXS)
+    // console.log('被拖图左:'+drag.offset().left)
+    // console.log('bian1:'+tmpValL)
+    // console.log('bian2:'+tmpValR)
     imgDXS = page.boxLeft - imgXS - imgWXS;//相对于父元素定位
     imgDYS = page.boxTop - imgYS - imgWYS;
 
-    // if(wrapHeight > wrapWidth){
-    //   drag.css({
-    //     width:wrapWidth+'px',
-    //     height:wrapHeight+'px',
-    //     marginLeft:'0px',
-    //     marginTop:'0px',
-    //     left:imgDXS+(de?163:0) + 'px',
-    //     top:imgDYS-(de?163:0) + 'px'
-    //   })
-    // }
-    // else{
-    //   drag.css({
-    //     width:wrapWidth+'px',
-    //     height:wrapHeight+'px',
-    //     marginLeft:'0px',
-    //     marginTop:'0px',
-    //     left:imgDXS-(de?163:0) + 'px',
-    //     top:imgDYS+(de?163:0) + 'px'
-    //   })
-    // }
-    drag.css({
-      width:wrapWidth+'px',
-      height:wrapHeight+'px',
-      marginLeft:'0px',
-      marginTop:'0px',
-      left:imgDXS-(de?tmpValL:0) + 'px',
-      top:imgDYS+(de?tmpValL:0) + 'px'
-    })
+    if(wrapHeight > wrapWidth){
+      drag.css({
+        width:wrapWidth+'px',
+        height:wrapHeight+'px',
+        marginLeft:'0px',
+        marginTop:'0px',
+        left:imgDXS+(de?tmpVal:0) + 'px',
+        top:imgDYS-(de?tmpVal:0) + 'px'
+      })
+    }
+    else{
+      drag.css({
+        width:wrapWidth+'px',
+        height:wrapHeight+'px',
+        marginLeft:'0px',
+        marginTop:'0px',
+        left:imgDXS-(de?tmpVal:0) + 'px',
+        top:imgDYS+(de?tmpVal:0) + 'px'
+      })
+    }
   }
 }
 module.exports = {

+ 97 - 37
src/utils/tools.js

@@ -656,41 +656,76 @@ function handleEnter(event){
     if(event.keyCode==13){return false;}
 }
 //获取病例输入的内容
+// function getEMRParams(){
+//   const state = store.getState();
+//   const {message} = state.patInfo;
+//   const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
+//   //console.log('message', message)
+//   const main = filterDataArr(mainSuit.saveText)||'',
+//     current=filterDataArr(currentIll.saveText)||'',
+//     other = filterDataArr(otherHistory.saveText)||'',
+//     vital = filterDataArr(checkBody.saveText)||'',
+//     lis = inspect.pushItem,    //化验推送所需数据
+//     pacs = assistCheck.dataString||'',
+//     dis=diagnosticList.diagnosticStrNoType||'',
+//     advice = '',
+//     diseaeId = [];
+//   const age = message.patientAge;
+//   const sex = message.sex;
+//   const patientId = message.patientId //病人id,取上次用药
+//   const hosCode = message.hospitalCode
+//   return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
+// };
 function getEMRParams(){
   const state = store.getState();
   const {message} = state.patInfo;
   const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
-  //console.log('message', message)
-  const main = filterDataArr(mainSuit.saveText)||'',
-    current=filterDataArr(currentIll.saveText)||'',
-    other = filterDataArr(otherHistory.saveText)||'',
-    vital = filterDataArr(checkBody.saveText)||'',
-    lis = inspect.pushItem,    //化验推送所需数据
-    pacs = assistCheck.dataString||'',
-    dis=diagnosticList.diagnosticStrNoType||'',
-    advice = '',
-    diseaeId = [];
-  const age = message.patientAge;
-  const sex = message.sex;
-  const patientId = message.patientId //病人id,取上次用药
-  const hosCode = message.hospitalCode
-  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
+  const diag = []
+  for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
+    diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
+  }
+  const obj = {
+    "hosCode": message.hospitalCode,
+    "age": message.patientAge,
+    "sex": message.sex,
+    "chief": filterDataArr(mainSuit.saveText)||'',
+    "symptom": filterDataArr(currentIll.saveText)||'',
+    "vital": filterDataArr(checkBody.saveText)||'',
+    "pasts": filterDataArr(otherHistory.saveText)||'',
+    "infectious": "",
+    "operation": "",
+    "allergy": "",
+    "vaccination": "",
+    "personal": "",
+    "marital": "",
+    "family": "",
+    "menstrual": "",
+    "other": filterDataArr(otherHistory.saveText)||'',
+    "lisString": "",
+    "pacsString": "",
+    "diagString": "",
+    "drugString": "",
+    "lis": inspect.pushItem,
+    "pacs": assistCheck.dataArr||[],
+    "diag": [],
+    "lisOrder": [],
+    "pacsOrder": [],
+    "diagOrder": diag,
+    "drugOrder": [],
+    "operationOrder": [],
+    "otherOrder": [],
+    "patientId": message.patientId,
+    "drug": [],
+    "marriage": ""
+  }
+  return obj;
 };
 
 function didPushParamChange(){
   const emrData = getEMRParams();
   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
-  });
+  
+  const newParams = JSON.stringify(emrData);
   if(newParams === oldParams){
       return false;
   }
@@ -1254,7 +1289,7 @@ function getPushList(data1,data2){     //推送数据
                 tmpObj.source = '1';//数据来源
                 tmpObj.maxValue = part.max || ''; 
                 tmpObj.minValue = part.min || '';
-                tmpObj.time = part.time ||now;
+                tmpObj.dateValue = part.time ||now;
                 tmpObj.units = part.unit || '';//单位
                 tmpObj.value = (part.value-0) === (part.value-0) ? part.value:'';//值
                 tmpObj.otherValue = (part.value-0) === (part.value-0) ?'':part.value; //阴性阳性
@@ -1272,7 +1307,7 @@ function getPushList(data1,data2){     //推送数据
                 tmpObj.source = '0';     //数据来源
                 tmpObj.maxValue = val.maxValue ? val.maxValue : '';
                 tmpObj.minValue = val.minValue ? val.minValue : '';
-                tmpObj.time = val.time || now;
+                tmpObj.dateValue = val.time || now;
                 tmpObj.units = val.labelSuffix || '';
                 tmpObj.value = (val.value-0) === (val.value-0) ? val.value:'';
                 tmpObj.otherValue = (val.value-0) === (val.value-0) ?'':val.value;
@@ -1333,8 +1368,8 @@ function getPushLists(data1,data2){     //推送数据
     return totalTmpArr;
 }
 
-function getAllString(checkedListImport,assistLabel){
-  let tmpImportLis = [],tmpString='';
+function getAllString(checkedListImport,assistLabel,flg){
+  let tmpImportLis = [],tmpString='',tmpArr=[],tmpObj={};
   for(let i = 0;i < checkedListImport.length;i++){
     for(let j = 0;j < checkedListImport[i].length;j++){
       tmpImportLis.push(checkedListImport[i][j])
@@ -1343,9 +1378,25 @@ function getAllString(checkedListImport,assistLabel){
   let tempArr = tmpImportLis.concat(assistLabel)
   for (let i = 0; i < tempArr.length; i++) {
     let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
+    let obj = {
+      "dateValue": tempArr[i].time||"",
+      "name": "",
+      "uniqueName": tempArr[i].name||"",
+      "desc": tempArr[i].value||"",
+      "result": tempArr[i].value||"",
+    }
+    tmpArr.push(obj)
     tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
   }
-  return tmpString;
+  return tmpObj = {
+    arr:tmpArr,
+    str:tmpString
+  }
+  // if(flg){
+  //   return tmpArr;
+  // }else{
+  //   return tmpString;
+  // }
 }
 
 // 模板中处理tagType==4的数据
@@ -1430,7 +1481,6 @@ function moveEnd(obj,flg) {
  *      2体征颜色单独处理不需要设置
  */
 const setFontColorSize = (flg,pacs) => {
-  // setTimeout(() => {
     const classNameSelect = ['largeFontSize','middleFontSize','simpleFontSize','simpleLightColor','simpleColor','selectColor']
     const state = store.getState();
     let readConfig = state.typeConfig.readConfig
@@ -1452,6 +1502,8 @@ const setFontColorSize = (flg,pacs) => {
           classStr = `largeFontSize selectColor`
         }else if(pacs == 7){
           classStr = `largeFontSize fontWeight selectColor`
+        }else if(pacs == 8){
+          classStr = `largeFontSize selectColor`
         }else{
           classStr = `largeFontSize`
         }
@@ -1466,6 +1518,8 @@ const setFontColorSize = (flg,pacs) => {
           classStr = `simpleFontSize selectColor`
         }else if(pacs == 7){
           classStr = `simpleFontSize fontWeight selectColor`
+        }else if(pacs == 8){
+          classStr = `simpleFontSize selectColor`
         }else{
           classStr = `simpleFontSize`
         }
@@ -1486,6 +1540,10 @@ const setFontColorSize = (flg,pacs) => {
           classStr = `largeFontSize titleWidth`
         }else if(pacs == 5){
           classStr = `largeFontSize specialSize`
+        }else if(pacs == 6){
+          classStr = `largeFontSize`
+        }else if(pacs == 8){
+          classStr = `simpleColor largeFontSize`
         }else if(pacs == 7){
           classStr = `largeFontSize fontWeight`
         }else{
@@ -1500,11 +1558,15 @@ const setFontColorSize = (flg,pacs) => {
       if(flg == 2){
         if(pacs == 7){
           classStr = `simpleFontSize fontWeight`
+        }else if(pacs == 6){
+          classStr = `simpleFontSize`
+        }else if(pacs == 8){
+          classStr = `simpleColor simpleFontSize`
+        }else if(pacs == 7){
+          classStr = `simpleFontSize fontWeight`
         }else{
           classStr = `simpleFontSize`
         }
-      }else if(pacs == 7){
-        classStr = `simpleFontSize fontWeight`
       }else if(flg == 1){
         classStr = `simpleLightColor simpleFontSize`
       }else{
@@ -1512,10 +1574,9 @@ const setFontColorSize = (flg,pacs) => {
       }
     }
     return classStr;
-  // }, 0);
 }
 
-//获取生命体征或非生命体征标签
+//获取生命体征或非生命体征标签  
 function getLifeLabels(arr,flag){     //flag=true获取非生命体征
   const newArr = arr.filter((it)=>{
     return flag?+it.specFlag!==4:+it.specFlag===4;
@@ -1642,7 +1703,6 @@ module.exports = {
     getDomUpDown,
     setFontColorSize,
     moveEnd,
-    setFontColorSize,
     getLifeLabels,
     getValuedLabels,
     removeRepeat,

+ 5 - 15
src/utils/utils.js

@@ -152,7 +152,7 @@ export function recoveTag(state,action) {
       arr.splice(sonMInx,1);
     }
     const lastReTag = [...action.data].reverse()[0];
-    if(lastReTag.tagType=='8'&&arr[action.index].tagType=='8'){
+    if(lastReTag.tagType=='8'&&(arr[action.index]&&arr[action.index].tagType=='8')){
       //要恢复的标签组最后为文本标签,插入位置也为文本标签,则将2个合并为一个文本标签
       arr[action.index]=Object.assign(arr[action.index],lastReTag,{value:lastReTag.value+arr[action.index].value});
       action.data.length=action.data.length-1;
@@ -233,25 +233,15 @@ export function setInputLabel(state,action){
 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:诊断
     "ruleType":config.ruleTypeMap[type],
-    "diag": emrData.dis,
-    "lis": emrData.lis,
-    "other": emrData.other,
-    "pasts": emrData.other,
-    "pacs": emrData.pacs,
-    "sex": emrData.sex,
-    "vital":emrData.vital,
-    "symptom": symData||emrData.current + emrData.main
+    "featureType": type,  //类型1:症状,4:查体,5:化验,6:辅检,7:诊断
   };
   if(save){
-    let savePm = Object.assign({},params);
-    delete savePm.featureType;
+    let savePm = Object.assign({},emrData);
+    // delete savePm.featureType;
     storageLocal.set('emrParam',savePm);      //推送数据存储,用作推送前对比是否有变,有变才推送
   }
-  return json(api.push,params);
+  return json(api.push,Object.assign({},params,emrData));
 }
 
 //删除选中标签