فهرست منبع

loading弹窗时机,历史病例回读位置修改

Luolei 6 سال پیش
والد
کامیت
d1e8e89be8

+ 2 - 2
src/config/index.js

@@ -30,8 +30,8 @@ export default {
     delayTime:500,      //延迟搜索的时间
     delayPushTime:1000,    //延迟推送时间
     pushDelay:1000,
-    punctuationReg:/[^,,.。::"“?”;;、!!]/g,       //正则表达式,全局查找不是括号内标点的字符
-    punReg:/[,,.。::"“?”;;、!!]+/g,
+    punctuationReg:/[^,,.。::"“??”;;、!!]/g,       //正则表达式,全局查找不是括号内标点的字符
+    punReg:/[,,.。::"“??”;;、!!]+/g,
     currentText:"患者XX因XX诊断为(**),经XX治疗后,目前XX症状已缓解,仍有XX,各项指标情况:XX,辅助检查:XX。今来复诊,进一步治疗",
     timeUnit:{
       minute:"分",

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

@@ -14,7 +14,7 @@ export const getSearchList = (val) => {
     return (dispatch, getState) => {
         const state = getState();
         json('/api/icss/retrieval/getTagInfos',{
-            type:'6',
+            type:'7',
             age:state.patInfo.message.patientAge,
             inputStr:val,
             sexType: state.patInfo.message.sex

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

@@ -27,9 +27,8 @@ function modulesParseJson(data){
 export const getInitModules= (dispatch,getStore)=>{
   const state = getStore();
   const {message} = state.patInfo;
-  dispatch(initHistoryDetails(message));      //历史病历回读
-  return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {console.log("模板请求成功",res);
-      dispatch({type:MODI_LOADING});
+  return json(api.getModules,{age:message.patientAge,sexType:message.sex}).then((res) => {
+      dispatch(initHistoryDetails(message));      //历史病历回读
       if (res.data.code == '0') {
         const newObj = modulesParseJson(res.data.data);
         const initData = newObj.json;
@@ -59,26 +58,10 @@ export const getInitModules= (dispatch,getStore)=>{
           saveEmpty:initSaveText.currentEmpty,
         });
         dispatch(getOtherHisRecord());          //获取其他史最近记录
-        // initHis(dispatch)
-      }else{
-        // initHis(dispatch)
       }
-    }).catch(()=>{
-        // initHis(dispatch)
-    });
+    })
 };
 
-// export const initHis = (dispatch)=> {
-//     let timer = setInterval(()=>{
-//         let baseDate = store.getState();
-//         console.log(baseDate.patInfo.message)
-//         if(JSON.stringify(baseDate.patInfo.message) != '{}') {
-//           dispatch(initHistoryDetails(baseDate.patInfo.message));
-//           clearInterval(timer)
-//         }
-//     },500)
-// }
-
 // 埋点事件,点击保存时调用
 export const saveClickNum = (dispatch,getState)=>{
   const state = getState();

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

@@ -5,7 +5,7 @@ import {getInfos} from '@store/actions/getInfoByUuid';
 import {getUrlArgObject,pushAllDataList} from '@utils/tools';
 import {getInitModules} from '@store/async-actions/homePage.js';
 import store from '@store'
-import {ISREAD} from "../types/homePage";
+import {ISREAD,MODI_LOADING} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
 
 const api = {
@@ -60,7 +60,9 @@ export const initHistoryDetails = (dispatch) => {
                 }else{
                   dispatch(initItemList(baseList.typeConfig.typeConfig))
                 }
+                dispatch({type:MODI_LOADING});
             } else {
+                dispatch({type:MODI_LOADING});
                 console.log(res)
             }
         })

+ 1 - 1
src/utils/tools.js

@@ -501,7 +501,7 @@ function filterDataArr(arrTmp){   //数据处理
 
     return tmpArr.join('').replace(config.punReg,function(word){
       return word.substr(0,1);
-    }).replace(/^[,,.。::"“?”;;、!!]+/,'');      //去掉开头的标点符号,最后的标点保留第一个,中间连续的保留第一个
+    }).replace(/^[,,.。::"“??”;;、!!]+/,'');      //去掉开头的标点符号,最后的标点保留第一个,中间连续的保留第一个
 }
 // 取消默认行为
 function preventDefault(event) {