Bläddra i källkod

Squashed commit of the following:

commit 7e07e345bb4ad26d89ffd0dcd30abba688bd5770
Author: liucf <liucf@zjlantone.com>
Date:   Mon Aug 12 18:25:12 2019 +0800

    现病史空模板子模板处理

commit a62701df76dc71f512a2c2ea06e2290c30bce3ac
Author: liucf <liucf@zjlantone.com>
Date:   Mon Aug 12 15:19:34 2019 +0800

    Squashed commit of the following:

    commit 59fb1802ec9957217dae1ba02cde6f2f3b273f88
    Merge: 0e26d29f ae46804d
    Author: liucf <liucf@zjlantone.com>
    Date:   Mon Aug 12 15:09:38 2019 +0800

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

    commit 0e26d29f316fbb379c0fca04d3615c1dc001d1a2
    Author: liucf <liucf@zjlantone.com>
    Date:   Mon Aug 12 15:09:27 2019 +0800

        时间单位组件1886,现病史子模板保存2010

commit f955379732783c1c4d7894ca8834c8a80823b8ab
Merge: daa92a59 b375dc1d
Author: zhouna <zhouna@zjlantone.com>
Date:   Fri Aug 9 15:47:25 2019 +0800

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

commit daa92a59f8fd4ac6fda1be6534fc617e4c8df07c
Merge: 7c133de2 ae46804d
Author: zhouna <zhouna@zjlantone.com>
Date:   Fri Aug 9 15:46:58 2019 +0800

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

commit b375dc1d13b82e4e01f97bd57d2bf3aa0548913c
Merge: 7c133de2 3d740fb6
Author: luolei <16657115156@163.com>
Date:   Thu Aug 8 14:24:24 2019 +0800

    Merge branch 'bugFix20190722' into dev/new1

commit 7c133de2aafe257e04d922245d499056e1862a26
Merge: 9d03d513 da608d55
Author: zhouna <zhouna@zjlantone.com>
Date:   Thu Aug 8 09:12:57 2019 +0800

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

    # Conflicts:
    #	src/common/components/EditableSpan/index.less

commit 9d03d513dcb8c23231184647da08706b2d3c108d
Author: zhouna <zhouna@zjlantone.com>
Date:   Thu Aug 1 17:40:08 2019 +0800

    查体展开按钮下移bug1961

commit 88a5d44001284529be229d3f821b5c31b7a17e10
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue Jul 30 17:27:14 2019 +0800

    搜索选中后添加推送,修改bug 1901

commit 495e1f4045ae1292f19351de4eeef2736e2c2bc7
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue Jul 30 11:30:33 2019 +0800

    字符重叠bug修改

commit eab48fd61373b97f39082d1d903025900437b5b2
Merge: 1e1807e7 70b3cad4
Author: zhouna <zhouna@zjlantone.com>
Date:   Thu Jul 25 15:17:40 2019 +0800

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

commit 1e1807e76ef58850f2624712dce18309e4aa2343
Merge: 066e1af7 ecd80834
Author: zhouna <zhouna@zjlantone.com>
Date:   Thu Jul 25 15:05:37 2019 +0800

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

commit 066e1af70af6af240e024b6b958c91597910e66f
Author: liucf <liucf@zjlantone.com>
Date:   Wed Jul 24 14:26:54 2019 +0800

    查体高亮4改成42

# Conflicts:
#	src/utils/tools.js
liucf 5 år sedan
förälder
incheckning
25c7383916

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

@@ -7,6 +7,7 @@
   /*float: right;*/
   position: absolute;
   right: 0;
+  bottom: 0;
   background: #fff;
   img{
     vertical-align: text-top;

+ 8 - 3
src/containers/CheckBody.js

@@ -3,7 +3,8 @@ import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
 import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
-import {filterDataArr} from '@utils/tools.js';
+import {billing} from '@store/async-actions/pushMessage';
+import {didPushParamChange,filterDataArr} from '@utils/tools.js';
 
 function mapStateToProps(state){ 
   const {homePage,mainSuit,checkBody} = state;
@@ -46,10 +47,14 @@ function mapDispatchToProps(dispatch){
             span,
             isReplace:false,
             searchInEnd
-          })
+          });
           dispatch({
             type:ISREAD
-          })
+          });
+          //调右侧推送
+          if(didPushParamChange()) {
+            dispatch(billing());
+          }
         }
       });
     },

+ 11 - 2
src/containers/CurrentIll.js

@@ -113,10 +113,19 @@ function mapDispatchToProps(dispatch) {
                       span,
                       isReplace:false,
                       conceptId
-                  })
+                  });
                   dispatch({
                     type:ISREAD
-                  })
+                  });
+                  /*
+                  * 选中后推送的入参可能变了,如输入心率搜索出心率不齐,
+                  * 500ms内心率不齐标签未选中,系统会推送入参心率,
+                  * 此时推送结果可能影响查体高亮结果且并不准确,
+                  * 所以选中后要重新推送
+                  * */
+                  if(didPushParamChange()){     //操作后内容有变化才推送
+                    dispatch(billing());
+                  }
                 }
             });
           //右侧推送

+ 4 - 0
src/containers/OtherHistory.js

@@ -60,6 +60,10 @@ function mapDispatchToProps(dispatch,store){
           dispatch({
             type:ISREAD
           });
+          //调右侧推送
+          if(didPushParamChange()) {
+            dispatch(billing());
+          }
         }
       });
     },

+ 34 - 7
src/store/actions/currentIll.js

@@ -15,16 +15,33 @@ function insertPro(data,processModule){
   }
   return data;
 }
-
+// 处理tagType==4
+function resetTagtype(data){
+  let newDataArr = [];
+  if(data&&data.length>0){
+    for(let i=0; i<data.length;i++){
+      if(data[i].tagType==4){
+        newDataArr.push(...data[i].questionMapping);
+      }else{
+        newDataArr.push(data[i]);
+      }
+    }
+  }
+  return newDataArr;
+}
 //设置模板
 export const setModule = (state,action)=>{
   const res = Object.assign({},state);
   // 处理tagType=4的类型
   const originalData = action.data||[];
   const originalSonData = action.processModule||[];
-  let spreadLabels=[];
-  let sonSpreadLabels=[];//子模板
-  if(originalData&&originalData.length>0){
+  const originalEmpty = action.emptyData||[];
+  const originalEmptySon = action.currentEmptySon||[];
+  let spreadLabels=resetTagtype(originalData);
+  let sonSpreadLabels=resetTagtype(originalSonData);//子模板
+  let emptySpreadLabels=resetTagtype(originalEmpty);//空模板
+  let emptySonSpreadLabels=resetTagtype(originalEmptySon);//空模板-子模板
+  /*if(originalData&&originalData.length>0){
     for(let i=0; i<originalData.length;i++){
       if(originalData[i].tagType==4){
         spreadLabels.push(...originalData[i].questionMapping);
@@ -41,13 +58,16 @@ export const setModule = (state,action)=>{
         sonSpreadLabels.push(originalSonData[j]);
       }
     }
-  }
+  }*/
   
   // res.moduleData = action.data;
   // res.processModule = action.processModule;//病程变化模板
+  // res.emptyData = action.emptyData;//空模板
+  // res.currentEmptySon = action.currentEmptySon;//空模板-子模板
   res.moduleData = spreadLabels;
   res.processModule = sonSpreadLabels;//病程变化模板
-  res.emptyData = action.emptyData;//空模板
+  res.emptyData = emptySpreadLabels;//空模板
+  res.currentEmptySon = emptySonSpreadLabels;//空模板-子模板
   let data = action.data;
   let sliceIdx;
   data&&data.map((v,i)=>{
@@ -63,11 +83,17 @@ export const setModule = (state,action)=>{
 //插入病程变化
 export const insertProcess = (state,action)=>{
   const res = Object.assign({},state);
+  const useEmpty = res.useEmpty;
   let addSmoduleData = [];
   if(res.currReadSonM.length>0){
     addSmoduleData = JSON.parse(JSON.stringify(res.currReadSonM))
   }else{
-    addSmoduleData = res.processModule.length>0?JSON.parse(JSON.stringify(res.processModule)):[];
+    if(!useEmpty){
+      addSmoduleData = res.processModule.length>0?JSON.parse(JSON.stringify(res.processModule)):[];
+    }else{//使用空模板则取空模板的子模板
+      addSmoduleData = res.currentEmptySon.length>0?JSON.parse(JSON.stringify(res.currentEmptySon)):[];
+    }
+    
   }
   if(addSmoduleData.length==0){//未匹配到子模板
     Notify.info("未找到相关内容");
@@ -147,6 +173,7 @@ export const setData = (state,action) =>{
   if (useEmpty) {
     const data = res.emptyData?JSON.parse(JSON.stringify(res.emptyData)):[];
     res.data = fullfillText(data).newArr;
+    res.useEmpty = true; //取子模板标识
   } else {
     if(mainData&&mainData.length>0){//主诉使用模板
       // 目前只需要将第一个主诉病程移植到现病史

+ 1 - 0
src/store/async-actions/homePage.js

@@ -76,6 +76,7 @@ export const getInitModules= (dispatch,getStore)=>{
             processModule:formatContinueDots(initData.process),//病程变化
             saveProcess:initSaveText.process,
             emptyData:formatContinueDots(initData.currentEmpty),//现病史空模板
+            currentEmptySon:formatContinueDots(initData.currentEmptySon),//现病史空模板-子模板
             saveEmpty:initSaveText.currentEmpty,
           });
         }else{//慢病--没有主诉模板

+ 2 - 2
src/utils/tools.js

@@ -151,7 +151,7 @@ const getUrlArgObject = (parm) => {
     return args[parm];//返回对象  
 } 
 const getAllDataList =(baseList) =>{           //获取所有模块结构化的数据
-    let jsonData = {};
+    let jsonData = {};console.log(111,baseList)
     //月经史公式
     const other = baseList.otherHistory;
     jsonData.lis = {};
@@ -182,7 +182,7 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.currentIds = baseList.currentIll.symptomIds;      //现病史去重
     jsonData.isFirstMainDiag = baseList.treat.isFirstMainDiag;      //治疗方案
     jsonData.mainReadSonM = baseList.mainSuit.addSmoduleData;      //主诉-子模板
-    jsonData.currReadSonM = baseList.currentIll.processModule;      //现病史-子模板
+    jsonData.currReadSonM = baseList.currentIll.useEmpty?baseList.currentIll.currentEmptySon:baseList.currentIll.processModule;      //现病史-子模板
     // console.log(jsonData,'结构化数据获取')
     return jsonData;
 }