Ver código fonte

Squashed commit of the following:

commit d7520e8fad7a96a166a94e9f0f39a93d12c47ffd
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 16:31:33 2019 +0800

    获取量表接口动态入参

commit a5ecde168841823a10451a50e7cf2cd886f1384b
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 16:07:28 2019 +0800

    请求失败时关闭loading

commit 2272eed62c6cda488f623650ca59bd0d95a0709d
Merge: 8974e91 443a8c4
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 15:59:17 2019 +0800

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

commit 8974e91fcb666f314ce34f241f72acaa5dce434a
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 15:59:03 2019 +0800

    获取查体模板时加loading

commit 443a8c46b3b52252b17130429a25e80d2431e203
Merge: b41344d 040fc9f
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 15:17:56 2019 +0800

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

commit b41344d0e818e12af3e08c24b2446fbfe97d058f
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 15:17:46 2019 +0800

    模板医嘱中添加回访时间和开单项

commit 040fc9f2079b46d7e36edd7375222a31f04a96a7
Merge: 0f6eb6b 3ad2996
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 15:15:37 2019 +0800

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

commit 0f6eb6b2b43a3bf8464e54049499d95553d9b458
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 9 15:15:23 2019 +0800

    历史病历和治疗方案添加loading

commit de4d7014f0407706f206d7434fea02899422b970
Merge: 468d3d9 851f8fa
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 14:02:28 2019 +0800

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

commit 468d3d9a2d8ea5c6d41ac0bcec347943b0389f04
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 14:02:13 2019 +0800

    修改检验检查样式

commit 819465ac742b79ab88aa675a986d6af8ab5ea502
Merge: b8ae295 d2d7c4d
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 11:05:40 2019 +0800

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

commit b8ae295393d78c690bf63c8bf4f01aef76ee5cdd
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 11:05:26 2019 +0800

    清除清除回访时间

commit 8da8184d5c37e5f6197887819545fdd6eecf4fad
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 10:36:12 2019 +0800

    修改警惕样式

commit 23899fe90e4051d901a23027200b481c8106329e
Merge: 0d8cecb fff1ed8
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 09:46:45 2019 +0800

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

commit 0d8cecb09a7671d2b605efd2a249383a89fcdd78
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 9 09:46:32 2019 +0800

    说明书菜单栏高亮和内容匹配
liucf 6 anos atrás
pai
commit
9fa60ba3eb

+ 1 - 1
src/components/Advice/index.jsx

@@ -93,7 +93,7 @@ class Advice extends Component{
             {/* {advice.commontreatment && <div className={style['treat-input']}  onInput={this.handleComTreatInput}  contentEditable={true} style = {{outline: 'none'}}></div>} */}
             {<Textarea value={advice.commontreatment} isRead={isRead} handleChangeAssistValue={this.handleComTreatInput} ></Textarea>}
         </div>}
-        {!isFirstMainDiag &&<div><FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp></div>}
+        {!isFirstMainDiag && followUp &&<div><FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp></div>}
         {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={style['scheme']}>
           {advice.scheme && advice.scheme.length > 0  && <h1>治疗方案</h1>}
           {scheme}

+ 2 - 2
src/components/DiagnosticList/index.jsx

@@ -81,7 +81,7 @@ class DiagnosticList extends Component {
         // item.treatIndex = index
         const  { showTreat, getTreatResult } = this.props;
         getTreatResult && getTreatResult(item);
-        showTreat && showTreat();
+        // showTreat && showTreat();//添加loading,移到async-actions中
         this.setState({
             treatTitle: item.name
         })
@@ -103,7 +103,7 @@ class DiagnosticList extends Component {
               showHistoryCaseModal && showHistoryCaseModal();
             }else{
               if(typeConfig==0){
-                Notify.info("暂无历史病,已默认展示慢病相关内容");
+                Notify.info("暂无历史病,已默认展示慢病相关内容");
                 const timer = setTimeout(function(){
                   autoFillModules && autoFillModules();
                   clearTimeout(timer);

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

@@ -55,6 +55,7 @@
     position: relative;
     color:#000;
     font-weight: bold;
+    cursor: pointer;
 }
 
 .diag-up, .diag-down {

+ 19 - 3
src/components/InfoTitle/index.jsx

@@ -10,6 +10,7 @@ import { initItemList,setInitHistory } from '@store/async-actions/historyTemplat
 import HistoryCases from '@containers/HistoryCases';
 import $ from 'jquery';
 import Notify from '@commonComp/Notify';
+import {MODI_LOADING} from '@store/types/homePage.js';
 class InfoTitle extends Component {
     constructor(props){
         super(props);
@@ -19,15 +20,19 @@ class InfoTitle extends Component {
         this.showHistoryBox = this.showHistoryBox.bind(this)
     }
     showHistoryBox(){
+        const {showLoading,hideLoading}=this.props;
+        showLoading();
         // store.dispatch(initItemList());
         // store.dispatch(showHistory(true))
         initItemList().then((res)=>{
             const result = res.data;
             if(result.code==0 && result.data){
+                hideLoading();
                 store.dispatch(setInitHistory(result.data));
-                store.dispatch(showHistory(true))
+                store.dispatch(showHistory(true));
             }else{
-                Notify.info("暂无历史病例");
+                hideLoading();
+                Notify.info("暂无历史病历");
             }
         })
     }
@@ -66,9 +71,20 @@ function mapStateToProps(state) {
   }
 }
 
+function mapDispatchToProps(dispatch){
+    return{
+        showLoading(){
+            dispatch({type:MODI_LOADING,flag:true});
+        },
+        hideLoading(){
+            dispatch({type:MODI_LOADING,flag:false});
+        }
+    }
+}
+
 const InfoTitleCont = connect(
   mapStateToProps,
-  null
+  mapDispatchToProps
 )(InfoTitle);
 
 

+ 1 - 1
src/components/PushItems/DetailsModal/index.jsx

@@ -40,7 +40,7 @@ class DetailsModal extends Component {
         const scrollTop = $('#detailsContent').scrollTop()
         let divHeight = 0;
         for (let i = 0; i < tipsDetails.introduceDetailList.length; i++) {
-            divHeight = divHeight + parseInt($('#' + tipsDetails.introduceDetailList[i].title).css('height'))
+            divHeight = divHeight + parseInt($('#' + tipsDetails.introduceDetailList[i].title).css('height')) -5
             if(divHeight > scrollTop) {
                 this.setState({
                     currentIndex: i

+ 8 - 3
src/components/PushItems/index.less

@@ -16,8 +16,9 @@
     .title{
       color:#fff;
       font-size: 14px;
+      font-weight: bold;
       float: left;
-      margin: 10px 10px 0 0;
+      margin: 10px 0px 0 0;
       img {
         float: left;
         margin: 1px 2px 0 20px;
@@ -27,7 +28,7 @@
     }
     .vigilantContent {
       float:left;
-      width: 340px;
+      padding: 0 0 0 15px;
       span {
         font-size: 14px;
         color: #fff;
@@ -152,6 +153,7 @@
               line-height: 14px;
               display: inline-block;
               margin: 6px;
+              cursor: pointer;
               input[type='checkbox']{
                 float: left;
                 width: 14px;
@@ -167,7 +169,10 @@
               input[type=checkbox]:checked{
                 background: url("../../common/images/checked.png")no-repeat center;
                 background-size: 12px 12px;
-             }
+              }
+              label {
+                cursor: pointer;
+              }
             }
           }
         }

+ 1 - 1
src/components/TreatDesc/DrugInfo/index.jsx

@@ -37,7 +37,7 @@ class DrugInfo extends Component {
         const scrollTop = $('#drugDesc').scrollTop()
         let divHeight = 60; //标题高度为60px
         for (let i = 0; i < drugDesc.length; i++) {
-            divHeight = divHeight + parseInt($('#' + drugDesc[i].title.trim()).css('height'))
+            divHeight = divHeight + parseInt($('#' + drugDesc[i].title.trim()).css('height')) -5
             if(divHeight > scrollTop) {
                 this.setState({
                     currentIndex: i

+ 2 - 1
src/containers/CheckBody.js

@@ -1,7 +1,7 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
+import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
 import {billing} from '@store/async-actions/pushMessage';
 import {filterDataArr} from '@utils/tools.js';
@@ -32,6 +32,7 @@ function mapStateToProps(state){
 function mapDispatchToProps(dispatch,state){
   return {
     getInit(){
+      dispatch({type:MODI_LOADING,flag:true});
       dispatch(getInitData());
     },
     fetchModules(param){

+ 3 - 1
src/containers/DiagnosticList.js

@@ -10,6 +10,7 @@ import { showHistory,sortHistory,activeHistory,visibleHistory } from '@store/act
 import {CURRENT_CHRONIC} from '@store/types/currentIll';
 import {autoFillModules} from '@store/async-actions/fetchModules';
 import { initItemList } from '@store/async-actions/historyTemplates';
+import {MODI_LOADING} from '@store/types/homePage.js';
 
 function mapStateToProps(state) {
     return {
@@ -75,7 +76,8 @@ function mapDispatchToProps(dispatch) {
             })
         },
         getTreatResult: (item) => {
-            dispatch(getTreatResult(item))
+            dispatch({type:MODI_LOADING,flag:true});
+            dispatch(getTreatResult(item));
         },
         getTips: (diagItem) => {
             dispatch(getTips(diagItem))

+ 1 - 1
src/containers/MainSuit.js

@@ -203,7 +203,7 @@ function mapDispatchToProps(dispatch) {
         await dispatch(getInitModules);
         // 模板回来关闭;loading
         dispatch({type:MODI_LOADING,flag:false});
-        // 弹窗是否引用历史病
+        // 弹窗是否引用历史病
         // dispatch({type:SHOW_HISTORY_BOX});
         dispatch({type:SHOW_REFER_RECORD});
 

+ 21 - 6
src/store/actions/pushMessage.js

@@ -38,24 +38,39 @@ function getAdviceStr(advice) {
 	const commontreatment = advice.commontreatment
 	const scheme = advice.scheme || '';
 	const adviceInput = advice.adviceInput || '';
-	// const assay = advice.assay || '';
-	// const check = advice.check || '';
+	const assay = advice.assay || '';
+	const check = advice.check || '';
+	const followUp = advice.followUp || '';
 	let AdviceStr = advice.AdviceStr || '';
+
+	if(assay || check) {
+		AdviceStr = assay + check  +'; ' + AdviceStr;
+	}
+	if(commontreatment)  { 
+		AdviceStr = AdviceStr + commontreatment + ';';
+	}	
+	if(followUp) {
+		AdviceStr = AdviceStr + '回访时间:'+followUp + '后回访,不适随诊' + ';';
+	}
 	for (let i = 0; i < scheme.length; i++) {
 		for (let j = 0; j < scheme[i].treatment.length; j++) {
 			if(scheme[i].treatment[j].treatmentStr === '') {
 				AdviceStr = AdviceStr + scheme[i].treatment[j].treatmentStr
 			} else {
-				AdviceStr = AdviceStr.substring(1, AdviceStr.length) + ', ' + scheme[i].treatment[j].treatmentStr
+				AdviceStr = AdviceStr  + scheme[i].treatment[j].treatmentStr + ', '
 			}
 		}
 	}
-	if(commontreatment)  { 
-		AdviceStr = commontreatment +'; ' + AdviceStr;
-	}	
+	if(AdviceStr.slice(AdviceStr.length-2) == ', ') {
+		AdviceStr = AdviceStr.slice(0, AdviceStr.length-2)
+	}
+	// if(commontreatment)  { 
+	// 	AdviceStr = commontreatment +'; ' + AdviceStr;
+	// }	
 	if(adviceInput)  { 
 		AdviceStr = AdviceStr +'; ' + adviceInput;
 	}	
+	
 	return AdviceStr;
 }
 

+ 1 - 0
src/store/actions/treat.js

@@ -19,6 +19,7 @@ export const clearTreat = (state, action) => {
     res.treatment = [];
     res.adversReactionList=[];
     res.hasFollowUp = false;
+    res.followUp = '';
     return res
 }
 

+ 3 - 0
src/store/async-actions/fetchModules.js

@@ -10,6 +10,7 @@ import {SETOTHERHISTORY,ISREAD} from "../types/homePage";
 import {SAVE_TABLE_RESULT,SET_CHRONIC_PUSHS} from "../types/pushMessage";
 import config from "@config/index";
 import {CURRENT_CHRONIC} from '@store/types/currentIll';
+import {MODI_LOADING} from '@store/types/homePage.js';
 
 const api={
   getSpreadModule:'/questionInfo/getByIds',
@@ -154,6 +155,7 @@ export function getInitData(){
     };
     json(api.getBigPush,param).then((res)=>{
       if(+res.data.code === 0){
+        dispatch({type:MODI_LOADING,flag:false});
         const data = res.data.data&&res.data.data.vital;
         const str = JSON.stringify(data);
         const arr = fullfillText(JSON.parse(str),false,false,false).newArr;
@@ -163,6 +165,7 @@ export function getInitData(){
           isEmpty:false
         });
       }else{
+        dispatch({type:MODI_LOADING,flag:false});
         const block = Object.assign(JSON.parse(config.textLabel),{full:true});      //无数据时保留一个自由文本标签可输入
         dispatch({
           type:SET,

+ 8 - 4
src/store/async-actions/pushMessage.js

@@ -162,13 +162,17 @@ export const getScaleInfo = (it)=>{
         const emrData = getEMRParams();
           const params = {
             age: emrData.age,
+            sex: emrData.sex,
             featureType: "21",
             diag: emrData.dis,
-            // lis: emrData.lis,
-            lis: [],
-            sex: emrData.sex,
+            lis: emrData.lis,
             scaleId:it.id,
-            scaleName:it.name
+            scaleName:it.name,
+            other: emrData.other,
+            pacs: emrData.pacs,
+            vital:emrData.vital,
+            symptom: emrData.current + emrData.main,
+            // indications:'' //指标结果
           };
         json(api.push, params)
         .then((res)=>{

+ 6 - 2
src/store/async-actions/treat.js

@@ -1,11 +1,13 @@
 import { json } from "@utils/ajax";
-import { SET_TREAT } from '@store/types/diagnosticList';
-import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR} from '@store/types/diagnosticList';
+// import { SET_TREAT } from '@store/types/diagnosticList';
+import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR,SET_TREAT} from '@store/types/diagnosticList';
 import { SET_COMMONTREATMENT } from '@store/types/pushMessage'
 import { SET_DRUG_INFO, SET_TREATMENT, SET_TREAT_INFO, SET_RECOMMEND_BASIC, SET_DRUG_INFO_LIST, IS_FIRST_MAIN_DIAG, SET_ADVERSE_REACTIONS, SET_ALL_ADVERSE_REACTIONS, SET_FOLLOW_UP, DEL_FOLLOW_UP, SET_ALL_FOLLOW_UP } from '@store/types/treat';
 import {storageLocal,getEMRParams} from '@utils/tools';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import { SAVE_FOLLOW_UP } from "@store/types/pushMessage";
+import {MODI_LOADING} from '@store/types/homePage.js';
+import { SHOW_TREAT} from '@store/types/treat.js';
 
 const api={
     push:'/push/pushInner',
@@ -194,6 +196,8 @@ export const getTreatResult = (item) =>{
 //获取治疗方案
 function getTreatment(item, dispatch, state,url,params, isChronic) {
     json(url, params).then((data) =>{
+        dispatch({type:MODI_LOADING,flag:false});
+        dispatch({type: SHOW_TREAT})
         let treat;
         if(data.data.data) {
              treat = data.data.data.treat || {}