|
@@ -1,43 +1,47 @@
|
|
|
import React, { Component } from "react";
|
|
|
+import axios from '@utils/ajax';
|
|
|
import PatInfoContainer from '@containers/PatInfoContainer.js';
|
|
|
import style from "./index.less";
|
|
|
import { connect } from 'react-redux';
|
|
|
+import AnalysisResult from '@components/AnalysisResult';
|
|
|
import historyCase from '@common/images/history.png';
|
|
|
-import health from '@common/images/health.png'
|
|
|
+import sysResult from '@common/images/result.png';
|
|
|
import store from '@store';
|
|
|
+import { getEMRParams } from '@utils/tools';
|
|
|
import { showHistory } from '@store/actions/historyTemplates';
|
|
|
import { initItemList, setInitHistory, getHospitalInfo } from '@store/async-actions/historyTemplates';
|
|
|
import HistoryCases from '@containers/HistoryCases';
|
|
|
-import $ from 'jquery';
|
|
|
import {Notify,Loading} from '@commonComp';
|
|
|
-// import {MODI_LOADING} from '@store/types/homePage.js';
|
|
|
import {SHOW_LOADING} from '@store/types/copyRight.js';
|
|
|
class InfoTitle extends Component {
|
|
|
constructor(props){
|
|
|
super(props);
|
|
|
- this.state={
|
|
|
- le:''
|
|
|
- }
|
|
|
+ this.state = {
|
|
|
+ resShow:false,
|
|
|
+ analysisRes:{}, //解析结果数据
|
|
|
+ };
|
|
|
this.showHistoryBox = this.showHistoryBox.bind(this)
|
|
|
+ this.showSysBox = this.showSysBox.bind(this);
|
|
|
+ }
|
|
|
+ showSysBox(flg){
|
|
|
+ this.setState({resShow:flg});
|
|
|
+ const param = getEMRParams(); // 获取推送参数
|
|
|
+ param.dept = [{name:param.deptName,uniqueName:param.hospitalId==-1?param.deptName:''}]
|
|
|
+ param.deptName = undefined;
|
|
|
+ param.ruleType="1,2,3,4";
|
|
|
+ axios.json('/sys/push/indicationPush',param).then((res)=>{
|
|
|
+ const data =res.data;
|
|
|
+ if(data.code == 0){
|
|
|
+ this.setState({analysisRes:data.data.debug["数据"]})
|
|
|
+ //this.structAnalysisData(data.data.debug["数据"])
|
|
|
+ }else{
|
|
|
+ Notify.error(data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
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));
|
|
|
- // }else{
|
|
|
- // hideLoading();
|
|
|
- // Notify.info("暂无历史病历");
|
|
|
- // }
|
|
|
- // })
|
|
|
initItemList().then(res=>{
|
|
|
const result = res.data
|
|
|
if (result.code === '0' && result.data.records.length !== 0) {
|
|
@@ -50,10 +54,9 @@ class InfoTitle extends Component {
|
|
|
Notify.info("暂无历史病历");
|
|
|
}
|
|
|
})
|
|
|
- // store.dispatch(getHospitalInfo())
|
|
|
}
|
|
|
componentWillReceiveProps(next){
|
|
|
- const that = this;
|
|
|
+ /*const that = this;
|
|
|
if(next.winWidth <= 1024){
|
|
|
$(window).scroll(function(){
|
|
|
let scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
|
|
@@ -62,21 +65,23 @@ class InfoTitle extends Component {
|
|
|
le:left
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
render() {
|
|
|
const {loading,loadingText,loadingType} = this.props;
|
|
|
- const {le} = this.state;
|
|
|
+ const {resShow,analysisRes}=this.state;
|
|
|
return <div className={style['title-wrapper']} style={{paddingRight:'198px'}}>
|
|
|
<PatInfoContainer />
|
|
|
{
|
|
|
<div className={style['activeWrap']}>
|
|
|
- <div className={style["operations"]} onClick={this.showHistoryBox}>
|
|
|
- <span><img src={historyCase} /> 历史病历</span>
|
|
|
+ <div className={style["operations"]}>
|
|
|
+ <span onClick={this.showHistoryBox}><img src={historyCase} /> 历史病历</span>
|
|
|
+ <span onClick={()=>this.showSysBox(true)}><img src={sysResult} /> 解析结果</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
<HistoryCases></HistoryCases>
|
|
|
+ <AnalysisResult show={resShow} data={analysisRes} onClose={this.showSysBox}></AnalysisResult>
|
|
|
<Loading show={loading} text={loadingText} type={loadingType}/>
|
|
|
</div>;
|
|
|
}
|