|
@@ -6,7 +6,7 @@ import SearchDrop from '@components/SearchDrop';
|
|
|
import CommonSymptom from '@components/CommonSymptom';
|
|
|
import chooseType from '@containers/eleType.js';
|
|
|
import config from "@config/index";
|
|
|
-import {isIE,getPageCoordinate,windowEventHandler,filterDataArr} from "@utils/tools.js"
|
|
|
+import {isIE,getPageCoordinate,windowEventHandler,filterDataArr,getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js"
|
|
|
import { initItemList } from '@store/async-actions/historyTemplates';
|
|
|
import tableIcon from '@common/images/table.png';
|
|
|
import iconRadioDefault from '@common/images/icon-radio-default.png'
|
|
@@ -35,7 +35,6 @@ class MainSuit extends Component{
|
|
|
overFlag:false,
|
|
|
tmpScroll:0,
|
|
|
tmpTop:0,
|
|
|
- showRecord:false,
|
|
|
activeHistory: -1,
|
|
|
showHistoryCase:false
|
|
|
};
|
|
@@ -256,11 +255,13 @@ class MainSuit extends Component{
|
|
|
e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="")
|
|
|
freeText && freeText(data.trim());
|
|
|
// 慢病模板获取:精确匹配"糖尿病复诊",储存慢病字段
|
|
|
- if(data.trim()=='糖尿病复诊'){
|
|
|
+ // 页面有模板数据 就不在请求
|
|
|
+ let baseList = store.getState();
|
|
|
+ let jsonData = getAllDataList(baseList);
|
|
|
+ let jsonStr = getAllDataStringList(baseList);
|
|
|
+ let flg = ifOtherClear(jsonData,jsonStr,baseList);//除主诉外 其他是否为空
|
|
|
+ if(data.trim()=='糖尿病复诊' && !flg){
|
|
|
saveChronic && saveChronic({name:'糖尿病',id:21773});
|
|
|
- this.setState({
|
|
|
- showRecord:true
|
|
|
- })
|
|
|
}
|
|
|
}else{
|
|
|
if(datas.length==0){
|
|
@@ -281,20 +282,19 @@ class MainSuit extends Component{
|
|
|
}
|
|
|
|
|
|
// 慢病
|
|
|
- referRecord() {//是否引用历史病例弹窗
|
|
|
- const { chronicDesease } = this.props
|
|
|
- // hideReferRecord && hideReferRecord()
|
|
|
- // showHistoryCaseModal && showHistoryCaseModal()
|
|
|
+ referRecord() {//是否引用历史病例弹窗--是
|
|
|
+ const { chronicDesease,closeHisBox } = this.props
|
|
|
+ closeHisBox&&closeHisBox();//关闭
|
|
|
this.setState({
|
|
|
- showRecord:false,
|
|
|
showHistoryCase:true
|
|
|
})
|
|
|
store.dispatch(initItemList(chronicDesease));
|
|
|
}
|
|
|
- noReferRecord() {
|
|
|
- this.setState({
|
|
|
- showRecord:false
|
|
|
- })
|
|
|
+ noReferRecord() {//否
|
|
|
+ const {closeHisBox,autoFillMoudles} = this.props;
|
|
|
+ closeHisBox&&closeHisBox();
|
|
|
+ // 不引用病例 -直接分发模板进行填充
|
|
|
+ autoFillMoudles && autoFillMoudles()
|
|
|
}
|
|
|
referCase() {
|
|
|
const { items } = this.props
|
|
@@ -312,11 +312,14 @@ class MainSuit extends Component{
|
|
|
activeHistory: -1
|
|
|
})
|
|
|
}
|
|
|
- closeHistoryCaseModal() {
|
|
|
+ closeHistoryCaseModal() {//关闭病例列表
|
|
|
+ const {autoFillMoudles} = this.props;
|
|
|
this.setState({
|
|
|
activeHistory: -1,
|
|
|
showHistoryCase:false
|
|
|
})
|
|
|
+ // 不引用病例直接分发模板进行填充
|
|
|
+ autoFillMoudles&&autoFillMoudles();
|
|
|
}
|
|
|
handleQuoteClick(item, index) {
|
|
|
console.log('asadsd', item)
|
|
@@ -337,8 +340,8 @@ class MainSuit extends Component{
|
|
|
|
|
|
|
|
|
render(){
|
|
|
- const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop} = this.props;
|
|
|
- const {showModule,show,symptom,search,showRecord,showHistoryCase} = this.state;
|
|
|
+ const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop,showHisBox} = this.props;
|
|
|
+ const {showModule,show,symptom,search,showHistoryCase} = this.state;
|
|
|
const symptomFlag = CommonSymptoms.length>0 ? true : false;
|
|
|
const searchFlag = searchData.length>0 ? true : false;
|
|
|
const boxTop1 = datas.length>0?boxTop:45;
|
|
@@ -362,7 +365,7 @@ class MainSuit extends Component{
|
|
|
</ItemBox>
|
|
|
{/*没有推送结果就不显示*/}
|
|
|
{symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
|
|
|
- <ConfirmModal visible={showRecord} okText='是' cancelText='否' confirm={this.referRecord} cancel={this.noReferRecord} close={this.noReferRecord}>
|
|
|
+ <ConfirmModal visible={showHisBox} okText='是' cancelText='否' confirm={this.referRecord} cancel={this.noReferRecord} close={this.noReferRecord}>
|
|
|
<div className={style['confirm-info']}>是否引用往期病历</div>
|
|
|
</ConfirmModal>
|
|
|
<ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
|