Browse Source

Merge remote-tracking branch 'origin/dev/new1' into dev/new1

zhouna 5 years ago
parent
commit
609d9318b3

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

+ 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({

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

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

+ 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,             //滚动条对象
     }
 }
 

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

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

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

+ 7 - 0
src/store/reducers/assistCheck.js

@@ -12,6 +12,7 @@ const initSearchList = {
   list: [], //点击的结果
   assistLabel: [], //搜索的结果
   dataString: '', //结果拼接
+  dataArr: '', //结果拼接
   assistVal: '',
 
   hospitalPac: [], //医院检索到的
@@ -43,6 +44,7 @@ export default (state = initSearchList, action) => {
     }
     newState.assistLabel = [...tempArr]
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     return newState;
   }
   if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
@@ -50,6 +52,7 @@ export default (state = initSearchList, action) => {
     newState.list = action.list
     newState.assistVal = action.val
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     return newState;
   }
   if (action.type == GET_ASSIST_LABEL) { //默认
@@ -70,6 +73,7 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArrs];
       }
     }
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
@@ -87,6 +91,7 @@ export default (state = initSearchList, action) => {
       }
       newState.assistLabel = [...tempArrs]
     }
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
@@ -99,6 +104,7 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
@@ -111,6 +117,7 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
+    newState.dataArr = getAllString(newState.checkedListImport,newState.assistLabel,1)
     newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }

+ 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 = {

+ 78 - 31
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": diag,
+    "lisOrder": [],
+    "pacsOrder": [],
+    "diagOrder": [],
+    "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=[];
   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,21 @@ 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].imagingDiagnose,
+      "result": tempArr[i].imagingDiagnose,
+    }
+    tmpArr.push(obj)
     tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
   }
-  return tmpString;
+  if(flg){
+    return tmpArr;
+  }else{
+    return tmpString;
+  }
 }
 
 // 模板中处理tagType==4的数据

+ 4 - 14
src/utils/utils.js

@@ -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));
 }
 
 //删除选中标签