Ver código fonte

Merge branch 'newVersion6.0' of http://192.168.2.236:10080/zhouna/newICSS into newVersion6.0

zhangxc 4 anos atrás
pai
commit
1f02a805a4

+ 15 - 2
src/components/Banner/index.jsx

@@ -16,7 +16,9 @@ import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
 import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
 import {getPreMsg} from '@store/async-actions/preIcss';
 import ModeChange from './ModeChange'
-
+import { embedPush} from '../../store/async-actions/pushMessage'
+import {debounce} from '../../utils/tools'
+import store from '@store';
 class Banner extends Component {
   constructor(props){
     super(props);
@@ -35,6 +37,7 @@ class Banner extends Component {
     this.showHisModal = this.showHisModal.bind(this);
     this.handleHisClose = this.handleHisClose.bind(this);
     this.setInitConfig = this.setInitConfig.bind(this);
+    this.handleEmbedPush = this.handleEmbedPush.bind(this);
   }
 
   showConfigModal(){
@@ -106,6 +109,16 @@ class Banner extends Component {
     });
     dragBox('previewWrapper','previewStatic','del')    
   }
+
+
+  // 处理点击的默认推送
+  handleEmbedPush(){
+    store.dispatch(embedPush({
+      action: "patientia",
+      mode: 1
+    }))
+  }
+
   render() {
     const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
@@ -113,7 +126,7 @@ class Banner extends Component {
     const domNode = document.getElementById('root');
     const disabled = !(hasMain||hasCurrent||hasOther);
     return (
-      <div className={style["logo"]} >
+      <div className={style["logo"]} onClick={this.handleEmbedPush}>
         <img src={logo} />
         <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>

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

@@ -6,7 +6,6 @@ import PushContainer from '../PushContainer';
 import style from './index.less';
 
 const BodyContainer = (props) =>{
-  console.log(props,'===');
   const { saveDateAll,mode } = props;
   return <div className={style['container'] + ' clearfix'}>
       <BlockEMRCont />

+ 3 - 2
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -18,6 +18,7 @@ import {showHistory} from "@store/actions/historyTemplates";
 import { SET_READ_MODE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import { getHistempDetail, asyncUpdateByIdUsNames, asyncCancelTemplateInfos} from '@store/async-actions/historyTemplates';
+import { embedPush } from '../../../store/async-actions/pushMessage'
 import edit from '../../../common/images/icon_edit_default@2x.png';
 import editHover from '../../../common/images/icon_edit_hover@2x.png';
 import del from '../../../common/images/icon_del_default@2x.png';
@@ -228,7 +229,7 @@ class HistoryCaseContainer extends React.Component {
       this.setState({
         visible:true,
         activeId:idx,
-        // activeHis:val,
+        activeHis:val,
         // dataStr: JSON.parse(val.preview) || [],
       })
       document.body.scrollTop = document.documentElement.scrollTop = 0
@@ -457,7 +458,7 @@ class HistoryCaseContainer extends React.Component {
                 >                  
                     <div className={styles.outBox}>
                       <span>病历名称:</span>
-                      <input type="text" placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
+                      <input type="text" className={styles.innerInput} placeholder="请输入病历名称" value={this.state.templateName} onChange={this.handleChange} autocomplete="off"/>
                     </div>
                 </ConfirmModal>
             </div>

+ 14 - 1
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -195,5 +195,18 @@
     display: flex;
     align-items: center;
 }
-
+.innerInput{
+    outline-style: none ;
+    border: 1px solid #ccc; 
+    border-radius: 3px;
+    padding: 7px 4px;
+    font-size: 14px;
+    font-family: "Microsoft soft";
+}
+.innerInput:focus{
+    border-color: #66afe9;
+    outline: 0;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
+}
 

+ 13 - 3
src/components/Operation/index.jsx

@@ -13,7 +13,8 @@ import FolderName from '@components/FolderName';
 import FolderOrder from '@components/FolderOrder';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
-import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory,checkDeptContent} from '@utils/tools';
+import { getAllDataList, getAllDataStringList, isAllPartClear, isAllClear, filterDataArr, readyKeepHistory, checkDeptContent } from '@utils/tools';
+import { embedPush } from '../../store/async-actions/pushMessage'
 import pinyin from '@utils/Convert_Pinyin.js';
 import { saveMessage } from  '@store/async-actions/print'
 import {dragBox} from '@utils/drag';
@@ -86,12 +87,21 @@ class Operation extends Component {
     // clearmedicalName && clearmedicalName()
     // diagShowTmp(false)
     // this.setState({ title: '' })
-   
+    // store.dispatch(embedPush({
+    //   action: "patientia",
+    //   mode: 1
+    // }))
     store.dispatch(saveMessage()).then(res => {
       this.setState({
         medicalName: '',
         saveVisible: false,
       })
+      store.dispatch(embedPush({
+        action: "patientia",
+        mode: 1
+      }))
+      // console.log('保存成功之后推送');
+    
     }).catch(err => {
       if (err === '00020001'){
 
@@ -575,7 +585,7 @@ class Operation extends Component {
         <div className={style.outBox}>
           <div className={style.innerInp}>
             <span>病历名称:</span>
-            <input type="text" placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /> 
+            <input type="text" className={style.innerInput} placeholder="请输入病历名称" value={this.state.medicalName} onChange={this.handleMedicalChange} autocomplete="off" /> 
           </div>
           {this.state.showValit ? (<div className={style.valit}>请输入病历名称</div>) : null}
         </div>

+ 14 - 0
src/components/Operation/index.less

@@ -351,6 +351,20 @@
     // justify-content: center;
     margin-bottom: 40px;
     .innerInp{
+        .innerInput{
+            outline-style: none ;
+            border: 1px solid #ccc; 
+            border-radius: 3px;
+            padding: 7px 4px;
+            font-size: 14px;
+            font-family: "Microsoft soft";
+        }
+        .innerInput:focus{
+            border-color: #66afe9;
+            outline: 0;
+            -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
+            box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
+        }
     }
     .valit{
         float: left;

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

@@ -44,6 +44,7 @@ export const getSearchList = (val,flag) => {
                     for (var key in arr) {
                         let obj = {}
                         obj['name'] = arr[key];
+                        obj['uniqueName'] = arr[key];
                         obj['conceptId'] = '';
                         curDate.push(obj)
                     }

+ 8 - 7
src/store/async-actions/historyTemplates.js

@@ -7,6 +7,7 @@ import {
 } from '@utils/tools';
 import { initHistory } from '@store/actions/historyTemplates';
 import { HISTORY_GETHOSPITALINFO } from '@store/types/historyTemplates';
+import { embedPush } from '@store/async-actions/pushMessage';
 import Notify from '@commonComp/Notify';
 import store from '@store';
 import { billing, getMRAnalyse} from '@store/async-actions/pushMessage';
@@ -36,14 +37,14 @@ export const getHistempDetail = (item) => {
             const data =res.data;
             if(data.code == 0){
                 let tmpData = data.data
-                // console.log(tmpData, 'tmpData');
-                // pushAllDataList(item.sign,'push',tmpData,'history')       //引用
                 pushHistoryDataList(tmpData);       //引用
-                // if(didPushParamChange()) {
-                //   dispatch(billing());
-                // }
-                // dispatch(getMRAnalyse())
-                
+                // 引用成功后默认推送
+                store.dispatch(
+                  embedPush({
+                    action: 'patientia',
+                    mode: 1,
+                  })
+                );
                 
             }else{
                 Notify.error(data.msg);

+ 12 - 1
src/utils/tools.js

@@ -352,6 +352,17 @@ const delHistoryDataList = () =>{
 }
 
 
+// 防抖函数
+export function debounce(func, delay) {
+  let timer = null;
+  return function (...args) {
+    if (timer) clearTimeout(timer);
+    timer = setTimeout(() => {
+      func.apply(this, args);
+    }, delay);
+  };
+}
+
 
 
 
@@ -911,7 +922,7 @@ function getEMRParams(){
   } = state;
   const diag = [];
   for(let i = 0; i < diagnosticList.diagnosticList.length; i++) {
-    diag.push({"dateValue": "","name": "","uniqueName": diagnosticList.diagnosticList[i].name})
+    diag.push({"dateValue": "","name": diagnosticList.diagnosticList[i].name,"uniqueName": diagnosticList.diagnosticList[i].name})
   }
   let templis = (inspect.labelListSmall).concat(inspect.labelListBig)
   templis = templis.filter((item)=>!item.check)