luolei 5 vuotta sitten
vanhempi
commit
ced023dcaa

+ 15 - 3
src/modules/HomePage/index.jsx

@@ -3,14 +3,16 @@ import { connect } from "react-redux";
 import BannerContainer from '@containers/TypeConfigContainer';
 //  引入组件
 import BodyContainer from "@components/BodyContainer";
+import {ConfirmModal} from '@commonComp';
 
-import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG} from '@store/types/homePage.js';
+import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG,SETPRE} from '@store/types/homePage.js';
 import {CLEAR_SEARCH} from '@types/mainSuit';
 import {CURRENT_CLEAR} from '@types/currentIll';
 import {OTHERHIS_CLEAR} from '@types/otherHistory';
 import {CHECKBODY_CLEAR} from '@types/checkBody';
 import style from './index.less';
 import {getInitModules,getChronic,getSystemConfig} from '@store/async-actions/homePage.js';
+import {getPreMsg} from '@store/async-actions/patInfo.js';
 import { getUrlArgObject,parseNameVal } from "@utils/tools";
 import $ from 'jquery';
 import loading from '@common/images/loading.gif';
@@ -65,12 +67,15 @@ class HomePage extends Component {
     }
   }
     render() {
-        const {flag} = this.props;
+        const {flag,showPre,noReferRecord,referRecord} = this.props;
         return <div className={style['home-page']}
                     onClick={this.hidePops} onmousedown={this.setElem.bind(this)}>
             <BannerContainer />
             {/* <InfoTitle /> */}
             <BodyContainer></BodyContainer>
+          <ConfirmModal visible={showPre} okText='是' cancelText='否' confirm={referRecord}  cancel={noReferRecord} close={noReferRecord}>
+              <div className={style['confirm-info']}>是否引用预问诊信息?</div>
+          </ConfirmModal>
           {flag?<div className={style['mask']}>
                 <img src={loading} className={style['load']}/>
             </div>:""}
@@ -80,11 +85,18 @@ class HomePage extends Component {
 
 const mapStateToProps = function (state) {
   return {
-    flag:state.homePage.loadingFlag
+    flag:state.homePage.loadingFlag,
+    showPre:state.homePage.showPre
   }
 };
 const mapDispatchToProps = function (dispatch) {
     return {
+      referRecord(){
+        getPreMsg()
+      },
+      noReferRecord(){
+        dispatch({type:SETPRE,show:false});
+      },
       handleClear(){//清空搜索结果
            dispatch({type:CLEAR_SEARCH});
            dispatch({type:CURRENT_CLEAR});

+ 6 - 0
src/modules/HomePage/index.less

@@ -18,4 +18,10 @@
     left:50%;
     margin-top: -20px;
     margin-left: -20px;
+}
+.confirm-info {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
 }

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

@@ -5,7 +5,7 @@ import {getInfos} from '@store/actions/getInfoByUuid';
 import {getUrlArgObject,pushAllDataList} from '@utils/tools';
 import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
-import {ISREAD,MODI_LOADING} from "../types/homePage";
+import {ISREAD,MODI_LOADING,SETPRE} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
 import config from '@config/index';
 
@@ -35,6 +35,7 @@ export const getPreMsg = (dispatch, getState) => {
               checkBody:result.supplement?new Array(result.supplement):[]
             }
             pushAllDataList(1,'push',preIcss,'preIcss');
+            dispatch({type:SETPRE,show:false});
         } else {
             console.log(res)
         }
@@ -91,7 +92,8 @@ export const initHistoryDetails = (dispatch) => {
                 if(detail.dataJson){
                   pushAllDataList(detail.sign,'push',detail,'history');
                 }else{
-                  getPreMsg()
+                  let pre = baseList.homePage.sysConfig.connect_prec
+                  pre&&dispatch({type:SETPRE,show:true});
                 }
                 dispatch({
                   type:ISREAD

+ 5 - 1
src/store/reducers/homePage.js

@@ -1,5 +1,5 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,
-  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG} from '../types/homePage.js';
+  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG,SETPRE} from '../types/homePage.js';
 import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList} from '../actions/homePage.js';
 
 const initState = {
@@ -17,6 +17,7 @@ const initState = {
   assistList:[],
   inspectList:[],
   sysConfig:{},
+  showPre:true
 };
 
 export default function (state=initState,action) {
@@ -72,6 +73,9 @@ export default function (state=initState,action) {
       return res;
     case SETSYSTEMCONFIG:
       res.sysConfig = action.data;
+      return res;
+    case SETPRE:
+      res.showPre = action.show;
     default:
       return res;
   }

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

@@ -16,3 +16,4 @@ export const GET_ASSIST_LIST = 'GET_ASSIST_LIST';    //辅检
 export const GET_INSPECT_LIST = 'GET_INSPECT_LIST';    //化验
 export const SETALLMODULES = 'SETALLMODULES';    //储存所有模板数据
 export const SETSYSTEMCONFIG = 'SETSYSTEMCONFIG';   //设置配置数据
+export const SETPRE = 'SETPRE';   //设置预问诊引用弹窗

+ 0 - 1
src/utils/tools.js

@@ -290,7 +290,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
         storageLocal.remove('emrParam');
        // Notify.success('页面已清空')
     }else if(type == 'preIcss'){
-      console.log(reData)
       store.dispatch({type: SET_READ_MODE, readMode: whichSign});
       store.dispatch({     //主诉文本框
           type: CLEAR_MAIN_SUIT,