Selaa lähdekoodia

Merge remote-tracking branch 'origin/optimize' into optimize

zhouna 6 vuotta sitten
vanhempi
commit
3d5188fb6c

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

@@ -148,7 +148,7 @@ class AddAssistCheck extends React.Component {
             <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
               <span className={styles.tagSpan}>
                 {item.name}:
-                <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+                <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
               </span>
             </span>
             <div className={styles.textareaWrap}>

+ 3 - 3
src/components/AddInspect/SlideExcel/index.jsx

@@ -38,7 +38,7 @@ class SlideExcel extends Component {
           <span className={styles.excelDataTitle}>
               <span className={styles.tagSpan}>
                 {item.menus}
-                <span className={styles.imgInfo} onClick={()=>getInfomation('',item.lisExcelItem[0].uniquemealName || '','excel')}></span>
+                <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.lisExcelItem[0].uniquemealName || '',type:12, position: 1})}></span>
               </span>
           </span>
           <table className={styles.table}>
@@ -47,7 +47,7 @@ class SlideExcel extends Component {
                       <td style={{width:'30%'}}>
                         <span className={styles.tagSpan}>
                           {value.itemName}
-                          <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '','excel')}></span>
+                          <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                         </span>
                       </td>
                       <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
@@ -62,7 +62,7 @@ class SlideExcel extends Component {
                         <td style={{width:'30%'}}>
                           <span className={styles.tagSpan}>
                             {value.itemName}
-                            <span className={styles.imgInfo} onClick={()=>getInfomation('',value.uniqueName || '','excel')}></span>
+                            <span className={styles.imgInfo} onClick={()=>getInfomation({name: value.uniqueName || '',type:12, position: 1})}></span>
                           </span>
                         </td>
                         <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>

+ 4 - 4
src/components/AddInspect/SlideSelect/index.jsx

@@ -73,13 +73,13 @@ class SlideSelect extends Component {
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation(item.questionId,item.name)}></span>
+                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
@@ -101,7 +101,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>                                        
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -119,7 +119,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation(val.id)}></span>
+                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

+ 6 - 4
src/components/ChronicInfo/index.jsx

@@ -85,13 +85,15 @@ class ChronicInfo extends React.Component{
     //this.close()
   }
 
-  showInfo(id){
+  showInfo(item){
     // 静态知识显示在提示信息里(4-18)
     const {getInfomation} = this.props;
     const param = {
-      id:id,
+      id:item.id,
+      name: item.name,
       // id:40738, //目前只有“肾功能不全”有数据
       type:22,
+      position: 1
     }
     getInfomation&&getInfomation(param);
   }
@@ -212,7 +214,7 @@ class ChronicInfo extends React.Component{
   handleRadio(item,parent){//可能结果
     let {radioVal} = this.props;
     this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.id]:item.detailName})
+      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
     })
   }
   confirmOption(parent,pIndex){//可能结果确定
@@ -344,7 +346,7 @@ class ChronicInfo extends React.Component{
                                     src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                     onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
-                                    onClick={this.showInfo.bind(this,v.conceptId)}/>}
+                                    onClick={this.showInfo.bind(this,v)}/>}
 
                                 </span>
                                 {/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}

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

@@ -103,9 +103,9 @@ class CurrentIll extends Component{
   }
 
   handleSearchSelect(obj){
-    const {questionId,name} = obj;
+    const {questionId,name,conceptId} = obj;
     const {fetchModules,focusIndex,span} = this.props;
-    fetchModules&&fetchModules({id:questionId,index:focusIndex,name,span});
+    fetchModules&&fetchModules({id:questionId,index:focusIndex,name,span,conceptId});
   }
 
   getInlineTag(){  

+ 4 - 4
src/components/DiagnosticItem/index.jsx

@@ -42,8 +42,8 @@ class DiagnosticItem extends Component{
     chooseDiagodal(item) {
         const { diagnosticList,getTips, type } = this.props;
         // getTips && getTips(item);
-        // if (type == 'search') {  //现在搜索点击也不展示提示信息
-        //     getTips && getTips({id:item.id,type:7});
+        // if (type == 'search') {
+        //     getTips && getTips({type:7,name: item.name, position: 1});
         // }
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
@@ -59,7 +59,7 @@ class DiagnosticItem extends Component{
     getTips(item, e) {
         e.stopPropagation();
         const {getTips } = this.props;
-        getTips && getTips({id:item.id,type:7});
+        getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
         const {item, isChronicMag,mode} = this.props;
@@ -130,7 +130,7 @@ class DiagnosticItem extends Component{
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           >
-                        {item.name} {item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': ''}
+                        {item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}
                         {type== 'disSelect' &&<img className={style['info-img']}  
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 src={hasEnterImg ? infoMove : infoShow} 

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

@@ -105,7 +105,7 @@ class DiagnosticList extends Component {
     handleClickDiag(item) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.id,type:7});
+        getTips && getTips({id:item.id, type:7, name: item.name, position: 1});
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props

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

@@ -29,7 +29,7 @@ class DetailsModal extends Component {
         },0)
         
         let scrollTop = 0
-        tipsDetails.introduceDetailList.map((it, ii) => {
+        tipsDetails.details.map((it, ii) => {
             if( ii < index) {
                 scrollTop = scrollTop + parseInt($('#' + it.title).css('height'))
             }
@@ -39,8 +39,8 @@ class DetailsModal extends Component {
     handleScrollModal(tipsDetails) {
         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')) -5
+        for (let i = 0; i < tipsDetails.details.length; i++) {
+            divHeight = divHeight + parseInt($('#' + tipsDetails.details[i].title).css('height')) -5
             if(divHeight > scrollTop) {
                 this.setState({
                     currentIndex: i
@@ -59,7 +59,7 @@ class DetailsModal extends Component {
                     <div className={styles['details-content-wrapper']} id="detailsContentWrap">
                         <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && tipsDetails.tagName} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
                         <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
-                            {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                            {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
                                 return (<div id={item.title}>
                                     <div className={styles['details-content-title-box']} >
                                         <span className={styles['details-content-title-name']}>{item.title}</span>
@@ -72,7 +72,7 @@ class DetailsModal extends Component {
                         </div>
                         <div className={styles['content-menu-box']}>
                             <div className={styles['content-menu']}>
-                                {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                                {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
                                         return (<div>
                                             <div className={styles['details-menu-title-box']}>
                                                 {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}

+ 4 - 6
src/components/PushItems/index.jsx

@@ -417,10 +417,10 @@ class PushItems extends Component {
                 提示信息
               </h1>
               <div className={style["content"]}>
-                {tips && tips.introduceDetailList ? (
+                {tips && tips.details ? (
                   <div>
                     <div className={style["title"]}>
-                      {tips.tagName}
+                      {tips.name}
                       <span
                         className={style["tips-details"]}
                         onClick={() => showTips(tips)}
@@ -429,10 +429,9 @@ class PushItems extends Component {
                         详情
                       </span>
                     </div>
-                    {tips.introduceDetailList &&
-                      tips.introduceDetailList.map((item, index) => {
+                    {tips.details &&
+                      tips.details.map((item, index) => {
                         return (
-                          item.position.indexOf("1") > -1 && (
                             <div>
                               <div
                                 dangerouslySetInnerHTML={{
@@ -450,7 +449,6 @@ class PushItems extends Component {
                                 </div>
                               )}
                             </div>
-                          )
                         );
                       })}
                   </div>

+ 1 - 1
src/components/Treat/DrugTreat/index.jsx

@@ -55,7 +55,7 @@ class DrugTreat extends Component {
     }
     setDrugInfo(item) {
         const { setDrugInfo } = this.props;
-        setDrugInfo && setDrugInfo(item, 8, 5);
+        setDrugInfo && setDrugInfo({name: item.medicitionName, type: 8, position: 5});
     }
     getImg() {
     }

+ 3 - 3
src/containers/AssistCheck.js

@@ -6,7 +6,7 @@ import AssistCheck from '@components/AssistCheck';
 import { assistLable,delAssistLabel,changeAssistVal,changeDate } from '@store/actions/assistCheck';
 import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
 
 function mapStateToProps(state) {
     return {
@@ -22,8 +22,8 @@ function mapStateToProps(state) {
 
 function mapDispatchToProps(dispatch, store) {
     return {
-        getInfomation(id,name){
-            dispatch(getInstroduce(id,name))
+        getInfomation(item){
+            dispatch(getConceptDetail(item))
         },
         handleChangeValue(val) {
             dispatch(getSearchList(val))

+ 2 - 2
src/containers/ChronicInfo.js

@@ -1,7 +1,7 @@
 import {connect} from 'react-redux';
 import ChronicInfo from '../components/ChronicInfo';
 import {SHOW_TABLE_LIST,HIDE_TABLE_LIST, SET_CHRONIC_PUSHS} from '@store/types/pushMessage';
-import {getTableList,getScaleInfo,getTips} from '../store/async-actions/pushMessage';
+import {getTableList,getScaleInfo,getConceptDetail} from '../store/async-actions/pushMessage';
 import {ADD_ASSESS_ITEMS,SET_SAVE_ASSESS_DATA,SET_CHRONIC_CALCU_RESULT,ADD_WHOLE_SCALE_ITEMS,SET_CALCU_VALUES} from "@types/assessResult";
 import {saveMessage} from "../store/async-actions/print";
 import {saveClickNum} from '@store/async-actions/homePage';
@@ -116,7 +116,7 @@ function mapDispatchToProps(dispatch){
     },
     // 获取量表静态知识
     getInfomation(item){
-      dispatch(getTips(item));
+      dispatch(getConceptDetail(item));
     }
   }
 }

+ 5 - 4
src/containers/CurrentIll.js

@@ -69,8 +69,8 @@ function mapDispatchToProps(dispatch) {
        async setData(info){//设置现病史使用模板
         // let idsArr = info.mainIds;
         let idsArr = info.mainTailIds.filter((it,i)=>{return it});
-        let ids = idsArr.join(",");
-        let labelModule = await getModules(ids);
+        // let ids = idsArr.join(",");
+        let labelModule = await getModules(idsArr);
         if(labelModule.data.code==0){//根据id获取标签模板
           dispatch({
             type:SET_LABEL_MODULE,
@@ -103,7 +103,7 @@ function mapDispatchToProps(dispatch) {
         })
       },
         fetchModules(param){
-            const {id,name,index,span} = param;
+            const {id,name,index,span,conceptId} = param;
             getModule(id).then((res)=>{
                 if(res.data.code=='0'){
                   dispatch({
@@ -112,7 +112,8 @@ function mapDispatchToProps(dispatch) {
                       name,
                       data: res.data.data,
                       span,
-                      isReplace:false
+                      isReplace:false,
+                      conceptId
                   })
                   dispatch({
                     type:ISREAD

+ 2 - 2
src/containers/DiagnosticItem.js

@@ -6,7 +6,7 @@ import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagn
 import { isChronicMag } from'@store/async-actions/diagnosticList.js';
 import { addDiagnostic } from '@store/async-actions/treat';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
-import {billing, getTips} from '../store/async-actions/pushMessage';
+import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 
 
 function mapStateToProps(state) {
@@ -39,7 +39,7 @@ function mapDispatchToProps(dispatch) {
             })
         },
         getTips: (diagItem) => {
-            dispatch(getTips(diagItem))
+            dispatch(getConceptDetail(diagItem))
         },
         isChronicMag: (item) =>{
             dispatch(isChronicMag(item))

+ 3 - 3
src/containers/DiagnosticList.js

@@ -4,7 +4,7 @@ import DiagnosticList from '@components/DiagnosticList';
 import { ADD_DIAGNOSTIC,  DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, GET_IS_FIRST, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
-import {billing, getTips} from '../store/async-actions/pushMessage';
+import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 import {keepPushData} from '@store/actions/tabTemplate';
 import { showHistory,sortHistory,activeHistory,visibleHistory } from '@store/actions/historyTemplates'
 import {CURRENT_CHRONIC} from '@store/types/currentIll';
@@ -86,8 +86,8 @@ function mapDispatchToProps(dispatch) {
             dispatch({type:SHOW_LOADING,flag:true});
             dispatch(getTreatResult(item));
         },
-        getTips: (diagItem) => {
-            dispatch(getTips(diagItem))
+        getTips: (item) => {
+            dispatch(getConceptDetail(item))
         },
         getBilling: () => {
             dispatch(billing())

+ 4 - 4
src/containers/Inspect.js

@@ -1,9 +1,9 @@
 import React from 'react';
 import {connect} from 'react-redux';
 import Inspect from '@components/Inspect';
-import {getSearchList,getSublableList,getInstroduce } from '@store/async-actions/inspect';
+import {getSearchList,getSublableList } from '@store/async-actions/inspect';
 import {setLabel,fillActived,fillActiveDetail,checkValueIsChange,delExcelLis,clearLabel,delPartItem} from '@store/actions/inspect';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
 function mapStateToProps(state) {//console.log(state)
     return {
         list:state.inspect.list,
@@ -22,8 +22,8 @@ function mapDispatchToProps(dispatch, store) {
         handleChangeValue(val){
             dispatch(getSearchList(val))
         },
-        getInfomation(id,name,type){
-            dispatch(getInstroduce(id,name,type))
+        getInfomation(item){
+            dispatch(getConceptDetail(item))
         },
         handleSign(id,idx,type){
             dispatch(setLabel(idx,type))

+ 2 - 5
src/containers/PushItemsContainer.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import PushItems from '../components/PushItems'
 import {CHANGE_ASSAY, CHANGE_CHECK, ADD_BILLING, SHOW_TIPS_DETAILS, HIDE_TIPS_DETAILS,SHOW_TABLE_LIST} from '@store/types/pushMessage';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList';
-import {billing, getTips, getTipsDetails} from '../store/async-actions/pushMessage';
+import {billing, getAllConceptDetail} from '../store/async-actions/pushMessage';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 
 function mapStateToProps(state) {
@@ -46,11 +46,8 @@ function mapDispatchToProps(dispatch) {
                 check: checkedCheck,
             })
         },
-        getTips: (diagItem) => {
-            dispatch(getTips(diagItem))
-        },
         getTipsDetails: () => {
-            dispatch(getTipsDetails())
+            dispatch(getAllConceptDetail())
         },
         showTipsDetailsModal: () => {
             dispatch({

+ 6 - 3
src/containers/SpreadDrop.js

@@ -144,7 +144,8 @@ function currentIll(dispatch,store,params){
   let ikey = getLabelIndex(index);
   let existsId = exists && exists.length>0?getIds(exists):[];
   let withsId = withs && withs.length>0?getIds(withs):[];
-  const ids = (existsId.concat(withsId)).join(",");
+  // const ids = (existsId.concat(withsId)).join(",");
+  const ids = existsId.concat(withsId);
   let has = [],wes=[];
   //获取选中项目模板
   fetchModules(ids).then((res)=>{
@@ -196,7 +197,8 @@ function otherHisConfirm(dispatch,store,params){
   }
   let existsId = getIds(exists);
   let withsId = getIds(withs);
-  const ids = existsId.length>0?existsId.join(",")+','+withsId.join(","):withsId.join(",");
+  // const ids = existsId.length>0?existsId.join(",")+','+withsId.join(","):withsId.join(",");
+  const ids = existsId.concat(withsId);console.log(555,ids)
   if(!ids&&nones){      //只有无的项目
     dispatch({
       type: CONFIRMSELECTED,
@@ -244,7 +246,8 @@ function checkBodyConfirm(dispatch,store,params){
   }
   let existsId = getIds(exists);
   let withsId = getIds(withs);
-  const ids = existsId.join(",")+','+withsId.join(",");
+  // const ids = existsId.join(",")+','+withsId.join(",");
+  const ids = existsId.concat(withsId);
   if(!ids&&nones){      //只有无的项目
     dispatch({
       type: CHECKCONFIRMSELECTED,

+ 2 - 2
src/containers/Treat.js

@@ -50,8 +50,8 @@ function mapDispatchToProps(dispatch) {
             //推荐依据不展示
             // dispatch(getRecommendBasic(item))
         },
-        setDrugInfo: (item, type, position) => {
-            dispatch(getInstroduce(item, type, position));
+        setDrugInfo: (item) => {
+            dispatch(getInstroduce(item));
         },
         hideTreat: () => {
             dispatch({

+ 4 - 3
src/store/actions/currentIll.js

@@ -357,7 +357,7 @@ export const confirm = (state,action) =>{
   withs.map((v,i)=>{
     withConpId.push(v.conceptId);
   })
-  res.symptomIds = res.symptomIds.concat(existsId,withsId,noneIds);//搜索去重
+  res.symptomIds = res.symptomIds.concat(existConpId,withConpId,noneIds);//搜索去重
   // 伴 标签
   const banText = JSON.stringify(ban)=='{}'?'':{id:ban.id,name:ban.name,value:ban.name,tagType:config.tagType};
 
@@ -724,7 +724,7 @@ export function setCheckText(state,action) {
 //搜索 插入标签数据
 export function insertLabelData(state,action){
   let res = Object.assign({},state); 
-  const {index,data,isReplace,span}=action;
+  const {index,data,isReplace,span,conceptId}=action;
   let id = data.id;
   let searchData = action.name;
   // res.symptomIds.push(id);
@@ -758,7 +758,8 @@ export function insertLabelData(state,action){
     const value = innerText.replace(searchStr,"");
     const pText = Object.assign({},textEmpty,{value:value});
     if(data.itemType==0){//症状
-      res.symptomIds.push(id);
+      // res.symptomIds.push(id);
+      res.symptomIds.push(conceptId);
       // 没有伴展开主诉symptomType=0/1的尾巴,有伴一>第一个点选上去的伴为依据,伴前展开主诉,伴后展开伴随;多余的伴以及手动输入的伴不做处理(2-25)
       if(banIdx==-1){
 

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

@@ -25,6 +25,7 @@ export const getSearchResult= (state, action) => {
         searchResultItem.name = item.name
         searchResultItem.showType = item.showType
         searchResultItem.retrievalName = item.retrievalName
+        searchResultItem.conceptId = item.conceptId
         searchResult.push(searchResultItem)
     }) 
     res.searchResult = searchResult;

+ 0 - 26
src/store/async-actions/assistCheck.js

@@ -24,29 +24,3 @@ export const getSearchList = (val) => {
         })
     }
 };
-
-export const getInstroduce = (id,name)=>{    //获取辅检的提示信息
-  return (dispatch, getState) =>{
-      axios.json('/introduceInfo/getByQuestionId', {
-        questionId: id?id:'',
-        type: 6,
-        tagName:name?name:'',
-        position: 1
-    })
-    .then((data)=>{
-        if(data.data.code == 0) {
-            dispatch({
-                type: SET_TIPS,
-                tips: data.data.data,
-                tmpFlg:'midPart'
-            }) 
-        } else {
-            Notify.info('提示信息未维护')
-        }
-
-                 
-    }).catch((e) => {
-        console.log(e)
-    })
-  }
-}

+ 2 - 2
src/store/async-actions/diagnosticList.js

@@ -44,7 +44,7 @@ export const isChronicMag = (item) => {
                  getChronic().then(() =>{
                     chronicList = JSON.parse(storageLocal.get('chronic'));
                     for(let i=0; i<chronicList.length; i++){
-                        if(chronicList[i].id==item.id&&chronicList[i].name==item.name){
+                        if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
                             //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
                             // 是--引用   否--走慢病流程
                             dispatch({
@@ -65,7 +65,7 @@ export const isChronicMag = (item) => {
                  });
              } else {
                 for(let i=0; i<chronicList.length; i++){
-                    if(chronicList[i].id==item.id&&chronicList[i].name==item.name){
+                    if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
                         //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
                         // 是--引用   否--走慢病流程
                         dispatch({

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

@@ -14,9 +14,12 @@ export const getSearchList = (val) => {
     return (dispatch, getState) => {
         const state = getState();
         const diagnosticList = state.diagnosticList.diagnosticList
+        console.log('diagnosticList', diagnosticList)
         let noIds = []
         for(let i = 0; i < diagnosticList.length; i++) {
-            noIds.push(diagnosticList[i].id)
+            if(diagnosticList[i].conceptId) {
+                noIds.push(diagnosticList[i].conceptId)
+            }
         }
         json('/retrieval/getTagInfos',{
             type:'7',

+ 2 - 1
src/store/async-actions/fetchModules.js

@@ -12,7 +12,8 @@ import {CURRENT_CHRONIC} from '@store/types/currentIll';
 import {MODI_LOADING} from '@store/types/homePage.js';
 
 const api={
-  getSpreadModule:'/questionInfo/getByIds',
+  // getSpreadModule:'/questionInfo/getByIds',
+  getSpreadModule:'/questionInfo/getByIds2',//优化
   getModule:'/questionInfo/getById',
   searchURL: '/retrieval/getTagInfos',
   getOtherHisRecord: '/inquiryInfo/getLastOther',

+ 1 - 1
src/store/async-actions/homePage.js

@@ -34,7 +34,7 @@ export const getInitModules= (dispatch,getStore)=>{
   const chronicMagItem = state.diagnosticList.chronicMagItem;//诊断入口
   // const chronicId = chronicMagItem?chronicMagItem.id:'';
   const chronicDesease = state.mainSuit.chronicDesease; //主诉入口
-  const chronicId = chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.id||'';
+  const chronicId = chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.conceptId||'';
   const param = {
     age:message.patientAge,
     sexType:message.sex,

+ 0 - 36
src/store/async-actions/inspect.js

@@ -50,39 +50,3 @@ export const getSublableList = (id,idx) => {
         })
     }
 };
-
-export const getInstroduce = (id,name,type)=>{    //获取化验的提示信息
-  let url = '',param={};
-  if(type == 'excel'){
-    url = '/introduceInfo/getByQuestionName'
-    param = {
-      type: 5,
-      tagName:name?name:'',
-      position: 1
-    }
-  }else{
-    url = '/introduceInfo/getByQuestionId'
-    param = {
-      questionId: id?id:'',
-      type: 5,
-      tagName:name?name:'',
-      position: 1
-    }
-  }
-  return (dispatch, getState) =>{
-    axios.json(url, param)
-    .then((data)=>{
-      if(data.data.code == 0) {
-          dispatch({
-              type: SET_TIPS,
-              tips: data.data.data,
-              tmpFlg:'midPart'
-          }) 
-      } else {
-          Notify.info('提示信息未维护')
-      }        
-    }).catch((e) => {
-        console.log(e)
-    })
-  }
-}

+ 44 - 32
src/store/async-actions/pushMessage.js

@@ -11,6 +11,7 @@ const api={
   textPush:'/push/pushText',
   getTableList:'/scale/getList', //获取量表列表
   getTableInfo:'/scale/getContent', //获取量表明细
+  getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
 }
 
 //获取右侧推送信息
@@ -105,55 +106,66 @@ export const billing = (mdata,boxMark) => {
  }
 };
 
-  export const getTips = (diagItem) =>{
-    return (dispatch, getState) =>{
+//获取提示信息(静态信息)
+export const getConceptDetail = (item) => {
+    return(dispatch, getState) => {
         dispatch({
             type: SET_CLICK_DIAG,
-            clickDiag: diagItem
+            clickDiag: item
         })
-        const url = '/introduceInfo/getByQuestionId';
-        const params = {
-            questionId: diagItem.id,
-            type: diagItem.type,
-            position: 1
+        const params ={
+            name: item.name,
+            position: item.position,
+            type: item.type
         }
-        json(url, params)
-        .then((data)=>{
-                if(data.data.code == 0) {
-                    dispatch({
-                        type: SET_TIPS,
-                        tips: data.data.data
-                    })
-                } else {
-                    Notify.info('提示信息未维护')
+
+        json(api.getConceptDetail, params).then((res) => {
+            if(res.data.code == '0') {
+                if(item.position == '1') {
+                    if(item.type == '5' || item.type == '6') {
+                        dispatch({
+                            type: SET_TIPS,
+                            tips: res.data.data,
+                            tmpFlg:'midPart'
+                        })
+                    } else {
+                        dispatch({
+                            type: SET_TIPS,
+                            tips: res.data.data,
+                        })
+                    }
+                    
+                } else if(item.position == '2'){
+
                 }
-                
-        }).catch((e) => {
-            console.log(e)
+            } else {
+                Notify.info('提示信息未维护')
+            }
+            
         })
-
     }
 }
 
-export const getTipsDetails = () => {
+export const getAllConceptDetail = () => {
     return(dispatch, getState) => {
         const state = getState();
-        // 诊断指南新窗口展示
-        // window.open(`/static/pages/information.html?type=7&&questionId=${state.diagnosticList.clickDiag.id}`);
-
-        //弹窗显示
-        const url ='/introduceInfo/getByQuestionId'
+        const clickItem = state.diagnosticList.clickDiag
         const params = {
-            type: state.diagnosticList.clickDiag.type,
-            questionId: state.diagnosticList.clickDiag.id,
+            type: clickItem.type,
+            name: clickItem.name,
             position:2
         }
-        json(url, params)
-        .then((data)=>{
+        json(api.getConceptDetail, params)
+        .then((res)=>{
+            if(res.data.code == '0') {
                 dispatch({
                     type: SET_TIPS_DETAILS,
-                    tipsDetails: data.data.data
+                    tipsDetails: res.data.data
                 })
+            } else {
+                Notify.info('提示信息未维护')
+            }
+                
         }).catch((e) => {
             console.log(e)
         })

+ 94 - 95
src/store/async-actions/treat.js

@@ -10,18 +10,16 @@ import {MODI_LOADING} from '@store/types/homePage.js';
 import { SHOW_TREAT} from '@store/types/treat.js';
 
 const api={
-    push:'/push/pushInner',
-    textPush:'/push/pushText'
+    pushTreatment:'/push/pushTreatment',
+    getConceptDetail:'/conceptDetail/getConceptDetail'
 }
 
 export const addDiagnostic = (item) => {
         return (dispatch, getState) => {
             const state = getState();
-            let url = api.push;
-            if(+state.typeConfig.confirmType===1){
-                url=api.textPush;
-            }
+            let url = api.pushTreatment;
             const emrData = getEMRParams();
+            console.log('emrData', emrData)
             const diagnosticList = state.diagnosticList.diagnosticList;
             let diag = '';
             if(diagnosticList) {
@@ -43,7 +41,7 @@ export const addDiagnostic = (item) => {
                 "age": emrData.age,
                 "featureType": "8",
                 "diag": diag,
-                "diseaseId":  item.id,
+                "diseaseName":  item.name,
                 "lis": emrData.lis,
                 "other": emrData.other,
                 "pacs": emrData.pacs,
@@ -51,6 +49,9 @@ export const addDiagnostic = (item) => {
                 "symptom": emrData.current + emrData.main,
                 "vital": emrData.vital,
                 "patientId": emrData.patientId,
+                "hosCode": emrData.hosCode,
+                "adverseReactions": "string",
+                "scaleName": "string",
             };
             //判断是否走慢病系统
             const isChronic = state.diagnosticList.chronicMagItem && state.diagnosticList.chronicMagItem.name||state.mainSuit.chronicDesease && state.mainSuit.chronicDesease.name;
@@ -89,7 +90,7 @@ export const addDiagnostic = (item) => {
 function hasTreatment(dispatch, state,item,url, params) {
     json(url, params).then((data) =>{
         if (data.data.data) {
-            item.treat = data.data.data.treat
+            item.treat = data.data.data
             dispatch({
                 type: ADD_DIAGNOSTIC,
                 item: item
@@ -118,10 +119,8 @@ export const getTreatResult = (item) =>{
             treatItem: item
         })
         const state = getState();
-        let url = api.push;
-        if(+state.typeConfig.confirmType===1){
-            url=api.textPush;
-        }
+        let url = api.pushTreatment;
+        
 
         const emrData = getEMRParams();
         const diagnosticList = state.diagnosticList.diagnosticList;
@@ -140,7 +139,7 @@ export const getTreatResult = (item) =>{
             "age": emrData.age,
             "featureType": "8",
             "diag": diag,
-            "diseaseId":  item.id,
+            "diseaseName":  item.name,
             "lis": emrData.lis,
             "other": emrData.other,
             "pacs": emrData.pacs,
@@ -148,6 +147,7 @@ export const getTreatResult = (item) =>{
             "symptom": emrData.current + emrData.main,
             "vital": emrData.vital,
             "patientId": emrData.patientId,
+            "hosCode": emrData.hosCode
         };
         // const params = {
         //         "age": 20,
@@ -196,87 +196,86 @@ 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_LOADING,flag:false});
-        dispatch({type: SHOW_TREAT})
-        let treat;
-        if(data.data.data) {
-             treat = data.data.data.treat || {}
-        }
-        if(treat) {
-           let { treatment, commonTreatment, surgeryTreatment, drugHistory, adverseReactions, followUp} = treat
-           dispatch({
-                type: SET_TREATMENT,
-                treatment: treatment,
-                generalTreat: commonTreatment,
-                surgeryTreat: surgeryTreatment,
-                drugHistory: drugHistory,
-            })
-            if (adverseReactions) { //如何之前存过不良反应,则替换成之前的不良反应
-                const allAdversReactionList = state.treat.allAdversReactionList
-                if(allAdversReactionList) {
-                    for(let i = 0; i < allAdversReactionList.length; i++) {
-                        if(item.id == allAdversReactionList[i].id) {    //判断是否存过不良反应
-                            for (let j = 0; j < adverseReactions.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
-                                for(let z = 0; z < allAdversReactionList[i].adversReactionList.length; z++) {
-                                    if(adverseReactions[j].id == allAdversReactionList[i].adversReactionList[z].id) {
-                                        for(let x = 0; x < allAdversReactionList[i].adversReactionList[z].details.length; x++) {
-                                            for(let y = 0; y < adverseReactions[j].details.length; y++) {//判断每一项是否选择过
-                                                if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseReactions[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
-                                                    adverseReactions[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
-                                                }
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-                
-            } else {
-                adverseReactions = []
-            }
-            if(isChronic) {
-                let chronicList = JSON.parse(storageLocal.get('chronic'));
-                for(let i=0; i<chronicList.length; i++){
-                    if(chronicList[i].id==item.id&&chronicList[i].name==item.name){ //判断某个病是否为慢病
-                        followUp = '2周';
-                    }
-                }
-                
+        if(data.data.code == '0') {
+            dispatch({type:MODI_LOADING,flag:false});
+            dispatch({type: SHOW_TREAT})
+            let treat;
+            if(data.data.data) {
+                treat = data.data.data || {}
             }
-            if(followUp) {  
-                const followUpList = state.treat.followUpList
-                if(followUpList) {  //判断之前有没有保存过的回访时间,如果有替换掉
-                    for(let i = 0; i < followUpList.length; i++) {
-                        if(item.id == followUpList[i].id) {
-                            followUp = followUpList[i].followUp
-                        }
-                    }
-                }
-                dispatch({
-                    type: SET_FOLLOW_UP,
-                    // followUp: treat.followUp,
-                    followUp: followUp,
-                    hasFollowUp: true
-                })
-            } else {
+            if(treat) {
+                let { treatment, commonTreatment, surgeryTreatment, drugHistory, adverseReactions, followUp} = treat
                 dispatch({
-                    type: DEL_FOLLOW_UP,
-                    delItem: item,
-                })
+                     type: SET_TREATMENT,
+                     treatment: treatment,
+                     generalTreat: commonTreatment,
+                     surgeryTreat: surgeryTreatment,
+                     drugHistory: drugHistory,
+                 })
+                 if (adverseReactions) { //如何之前存过不良反应,则替换成之前的不良反应
+                     const allAdversReactionList = state.treat.allAdversReactionList
+                     if(allAdversReactionList) {
+                         for(let i = 0; i < allAdversReactionList.length; i++) {
+                             if(item.id == allAdversReactionList[i].id) {    //判断是否存过不良反应
+                                 for (let j = 0; j < adverseReactions.length; j++) { //判断不良反应是否有相同的不良反应,如果有,替换
+                                     for(let z = 0; z < allAdversReactionList[i].adversReactionList.length; z++) {
+                                         if(adverseReactions[j].id == allAdversReactionList[i].adversReactionList[z].id) {
+                                             for(let x = 0; x < allAdversReactionList[i].adversReactionList[z].details.length; x++) {
+                                                 for(let y = 0; y < adverseReactions[j].details.length; y++) {//判断每一项是否选择过
+                                                     if(allAdversReactionList[i].adversReactionList[z].details[x].name == adverseReactions[j].details[y].name && allAdversReactionList[i].adversReactionList[z].details[x].select) {
+                                                         adverseReactions[j].details[y].select = allAdversReactionList[i].adversReactionList[z].details[x].select
+                                                     }
+                                                 }
+                                             }
+                                         }
+                                     }
+                                 }
+                             }
+                         }
+                     }
+                     
+                 } else {
+                     adverseReactions = []
+                 }
+                 if(isChronic) {
+                     let chronicList = JSON.parse(storageLocal.get('chronic'));
+                     for(let i=0; i<chronicList.length; i++){
+                         if(chronicList[i].id==item.id&&chronicList[i].name==item.name){ //判断某个病是否为慢病
+                             followUp = '2周';
+                         }
+                     }
+                     
+                 }
+                 if(followUp) {  
+                     const followUpList = state.treat.followUpList
+                     if(followUpList) {  //判断之前有没有保存过的回访时间,如果有替换掉
+                         for(let i = 0; i < followUpList.length; i++) {
+                             if(item.id == followUpList[i].id) {
+                                 followUp = followUpList[i].followUp
+                             }
+                         }
+                     }
+                     dispatch({
+                         type: SET_FOLLOW_UP,
+                         // followUp: treat.followUp,
+                         followUp: followUp,
+                         hasFollowUp: true
+                     })
+                 } else {
+                     dispatch({
+                         type: DEL_FOLLOW_UP,
+                         delItem: item,
+                     })
+                 }
+                 dispatch({
+                     type: SET_ADVERSE_REACTIONS,
+                     adversReactionList: adverseReactions
+                 })
             }
-            dispatch({
-                type: SET_ADVERSE_REACTIONS,
-                adversReactionList: adverseReactions
-            })
-           
         }
-        
-}).catch((e) =>{
-    console.log(e)
-})
+    }).catch((e) =>{
+        console.log(e)
+    })
 }
 
 //保存全部不良反应
@@ -313,11 +312,11 @@ export const setAllFollowUp = (item) => {
 export const getInstroduce = (item, type, position)=>{
 
     return (dispatch, getState) =>{
-        const url = '/introduceInfo/getByQuestionId';
+        const url = '/conceptDetail/getConceptDetail';
         const params = {
-            questionId: item.id,
-            type: type,
-            position: position
+            name: item.name,
+            type: item.type,
+            position: item.position
         }
         json(url, params)
         .then((data)=>{
@@ -349,7 +348,7 @@ export const  getInstroduceMore = (drugIdList) =>{
     return (dispatch, getState) =>{
         let drugInfoList = [];
         for (let i = 0; i < drugIdList.drugIdList.length; i++ ) {
-            const url = '/introduceInfo/getByQuestionId';
+            const url = '/conceptDetail/getConceptDetail';
             const params = {
                 questionId: drugIdList.drugIdList[i],
                 type: 8,

+ 3 - 1
src/utils/tools.js

@@ -645,6 +645,7 @@ function getEMRParams(){
   const state = store.getState();
   const {message} = state.patInfo;
   const {mainSuit,currentIll,otherHistory,checkBody,inspect,assistCheck,diagnosticList} = state;
+  console.log('message', message)
   const main = filterDataArr(mainSuit.saveText)||'',
     current=filterDataArr(currentIll.saveText)||'',
     other = filterDataArr(otherHistory.saveText)||'',
@@ -657,7 +658,8 @@ function getEMRParams(){
   const age = message.patientAge;
   const sex = message.sex;
   const patientId = message.patientId //病人id,取上次用药
-  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId};
+  const hosCode = message.hospitalCode
+  return {main,current,other,vital,lis,pacs,dis,advice,diseaeId,sex,age, patientId, hosCode};
 };
 
 function didPushParamChange(){