Browse Source

Merge remote-tracking branch 'origin/masterCdss' into referMasterCdss

zhouna 4 years ago
parent
commit
de7785b9b5
42 changed files with 672 additions and 264 deletions
  1. 1 1
      src/common/components/Add/index.jsx
  2. 1 1
      src/common/components/Add/index.less
  3. 2 2
      src/common/components/BlockInp/index.less
  4. 2 2
      src/common/components/ItemBox/index.less
  5. 2 2
      src/common/components/SearchOption/index.jsx
  6. 3 0
      src/common/components/SearchOption/index.less
  7. 2 2
      src/components/AddAssistCheck/Textarea/index.jsx
  8. 1 1
      src/components/AssistCheck/index.less
  9. 2 2
      src/components/Banner/index.jsx
  10. 2 0
      src/components/BlockEmrCont/index.jsx
  11. 21 6
      src/components/DiagResultSearch/index.jsx
  12. 132 56
      src/components/Diagnosis/index.jsx
  13. 21 13
      src/components/DiagnosticItem/index.jsx
  14. 123 72
      src/components/DiagnosticList/index.jsx
  15. 3 1
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  16. 1 1
      src/components/Inspect/index.less
  17. 39 16
      src/components/Operation/index.jsx
  18. 11 4
      src/components/PatInfo/Select/index.jsx
  19. 2 2
      src/components/PatInfo/index.jsx
  20. 3 2
      src/components/PreviewBody/index.jsx
  21. 1 1
      src/components/PreviewBody/index.less
  22. 2 2
      src/components/PushData/index.jsx
  23. 20 0
      src/containers/DiagResultSearch.js
  24. 20 1
      src/containers/Diagnosis.js
  25. 16 6
      src/containers/DiagnosticItem.js
  26. 37 12
      src/containers/DiagnosticList.js
  27. 12 9
      src/containers/OperationContainer.js
  28. 1 0
      src/containers/PatInfoContainer.js
  29. 1 0
      src/containers/PushDataContainer.js
  30. 87 29
      src/store/actions/diagnosticList.js
  31. 30 1
      src/store/actions/diagnosticSearch.js
  32. 2 0
      src/store/actions/print.js
  33. 1 1
      src/store/async-actions/diagnosticList.js
  34. 8 3
      src/store/async-actions/diagnosticSearch.js
  35. 8 1
      src/store/async-actions/print.js
  36. 3 1
      src/store/async-actions/pushMessage.js
  37. 12 1
      src/store/reducers/diagnosticList.js
  38. 12 2
      src/store/reducers/diagnosticSearch.js
  39. 1 1
      src/store/reducers/homePage.js
  40. 2 0
      src/store/types/diagnosticSearch.js
  41. 3 3
      src/utils/config.js
  42. 19 4
      src/utils/tools.js

+ 1 - 1
src/common/components/Add/index.jsx

@@ -23,7 +23,7 @@ class Add extends Component {
   render(){
     const {showText,handleClick,id,height} = this.props;
     return <div className={style['tag-container']} onClick={(e)=>{this.handleClick(e)}} id={id}>
-        <img src={more} style={{verticalAlign:'middle'}}/>
+        <img src={more} style={{verticalAlign:'text-bottom'}}/>
         <span className={`inline-box ${style['gray']}`} style={{height:height?height:'',lineHeight:height?height:''}}>{showText}</span>
       </div>
   }

+ 1 - 1
src/common/components/Add/index.less

@@ -5,7 +5,7 @@
   padding: 0 3px 3px;
 }
 .tag-container{
-  margin:5px 2px;
+  margin:5px 70px 5px 2px;
   display: inline-block;
   position: relative;
   cursor: pointer;

+ 2 - 2
src/common/components/BlockInp/index.less

@@ -3,7 +3,7 @@
 .box{
   margin: 2px 20px;
   .title{
-    width: 65px;
+    width: 76px;
     float: left;
     text-align: right;
     padding-right: 5px;
@@ -18,7 +18,7 @@
     // height:120px;
     min-height: 38px;
     line-height: 24px;
-    margin-left: 60px;
+    margin-left: 68px;
     position: relative;
     padding:5px;
     outline: none;

+ 2 - 2
src/common/components/ItemBox/index.less

@@ -4,7 +4,7 @@
   margin: 2px 20px;
   word-break: break-word;
   .title{
-    width: 65px;
+    width: 76px;
     float: left;
     text-align: right;
     padding-right: 5px;
@@ -18,7 +18,7 @@
   .content{
     // height:120px;
     min-height: 38px;
-    margin:0 0 0 60px;
+    margin:0 0 0 68px;
     position: relative;
     padding:5px 12px 5px 5px;
     outline: none;

+ 2 - 2
src/common/components/SearchOption/index.jsx

@@ -111,7 +111,7 @@ class SearchOption extends React.Component {
       this.setState({border:false,val:''})
     }
     render() {
-        const { children,visible,searchType } = this.props;
+        const { children,visible,searchType,showSym } = this.props;
         const { show,showInsp,txt } = this.state;
         return (
             searchType == 1||searchType == 2?
@@ -153,7 +153,7 @@ class SearchOption extends React.Component {
                 <div className={styles.autoList}>
                     {children}
                 </div>
-            </div>:<div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
+            </div>:<div id="searchOption" className={visible?`${styles.search} ${styles.show} ${showSym?styles.isSym:''} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
                 <img className={styles.searchVal} src={search} alt="搜索" />
                 <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
                 <input

+ 3 - 0
src/common/components/SearchOption/index.less

@@ -10,6 +10,9 @@
     top: 30px;
     background-color: #fff;
     // margin-bottom: 80px;
+    &.isSym{
+        left: 230px;
+    }
     .llStyle;
     .autoList {
         // max-height: 225px;

+ 2 - 2
src/components/AddAssistCheck/Textarea/index.jsx

@@ -44,7 +44,7 @@ class Textarea extends Component {
     });
   }
   handleInputFocus(){
-    const {handlePush} = this.props;
+    /*const {handlePush} = this.props;
     const stimer = this.state.timer;
     clearTimeout(stimer);
     let timer = setTimeout(function(){
@@ -53,7 +53,7 @@ class Textarea extends Component {
     },config.delayPushTime);
     this.setState({
       timer
-    });
+    });*/
   }
   shouldComponentUpdate(next){
     if(JSON.stringify(next) == JSON.stringify(this.props)){

+ 1 - 1
src/components/AssistCheck/index.less

@@ -6,7 +6,7 @@
     position: relative;
     margin: 20px 490px -21px 20px;
     span {
-        margin-left: 60px;
+        margin-left: 68px;
         border: 1px dashed @part-border-color;
         border-bottom: 1px solid #fff;
         display: inline-block;

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

@@ -37,7 +37,7 @@ class Banner extends Component {
       emergencyBox:false,
       showHos:false,
       showM:false,
-      hosName:"杭州朗通信息技术有限公司",
+      hosName:"",
       hosId:"-1",
       hosNameTmp:"",
       hosIdTmp:"-1",
@@ -215,7 +215,7 @@ class Banner extends Component {
           </div>:null} */}
           <div className={style["showHospitalLis"]} onClick={showHospitalLis} id="showHospitalLis">
             <p className={`${style["selectedHos"]}`}>
-              <span className={style["ellipsis"]} title={curHos.hosName}>{curHos.hosName}</span>
+              <span className={style["ellipsis"]} title={curHos.hosName||hospitalMsg[0].name}>{curHos.hosName||hospitalMsg[0].name}</span>
               <i style={{color:curHos.connect==1?'#3B9ED0':'#FF545B'}} onClick={(e)=>{showConnect(e)}}><img src={left3}/>{curHos.connect==1?'术语已关联':'术语未关联'}</i>
               <img className={style['bannerDown']} src={bannerDown} />
             </p>

+ 2 - 0
src/components/BlockEmrCont/index.jsx

@@ -117,6 +117,8 @@ class BlockEMRCont extends Component {
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
           {/* 诊断 */}
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
+          {/* 诊断 */}
+          <Diagnosis setHighter={this.setHighter} isTcm={true} hideChronic={true}></Diagnosis>
           {/* 医嘱 */}
           <NewAdvice setHighter={this.setHighter}></NewAdvice>
           {/* <AdviceContainer></AdviceContainer> */}

+ 21 - 6
src/components/DiagResultSearch/index.jsx

@@ -20,14 +20,26 @@ class DiagResultSearch extends Component {
     const that = this
     $(document).click(function (e) {
       var diagSearch = $('#diagSearch')[0];
+      var diagTcmSearch = $('#diagTcmSearch')[0];
+      var diagSymSearch = $('#diagSymSearch')[0];
       var addDiag = $('#addDiag')[0];
+      var addTcmDiag = $('#addTcmDiag')[0];
+      var addSymDiag = $('#addSymDiag')[0];
       var confirm = $('#confirm')[0];
-      if (diagSearch) {
+      if (diagSearch||diagTcmSearch||diagSymSearch) {
         if (!confirm&&!that.isBar) {//onMousedown的目标为滚动条时,删除弹窗不关闭
-          if (e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
+          if (diagSearch&&e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
             that.props.hideSearch();
             that.props.setHighter(48)
           }
+          if (diagTcmSearch&&e.target != diagTcmSearch && e.target != addTcmDiag && e.target.parentNode != addTcmDiag && !$.contains(diagTcmSearch, e.target)) {
+              that.props.hideTcmSearch();
+              that.props.setHighter(48)
+          }
+          if (diagSymSearch&&e.target != diagSymSearch && e.target != addSymDiag && e.target.parentNode != addSymDiag && !$.contains(diagSymSearch, e.target)) {
+              that.props.showSymSearch(false);
+              that.props.setHighter(48)
+          }
         }
       }
     });
@@ -44,6 +56,7 @@ class DiagResultSearch extends Component {
   getSearchList(searchResult, isShowNoDataInfo) {
     // console.log(searchResult,'searchResult');
     // console.log(isShowNoDataInfo,'isShowNoDataInfo');
+    const {isTcm,showSym,setHighter} = this.props;
     if (isShowNoDataInfo === true && searchResult.length === 0 ){
       return <div className={style['search-result-noItem']}><span>暂无筛选项</span></div>
     }
@@ -51,7 +64,7 @@ class DiagResultSearch extends Component {
       {
         searchResult.length !== 0  && searchResult.map((item,idx) => {
           return (<div key={idx} className={style['search-result-item']}>
-            <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
+            <DiagnosticItem setHighter={setHighter} isTcm={isTcm} showSym={showSym} title={true} item={item} clearInput={this.clearInput} type='search'/>
           </div>)
         })
       }
@@ -59,7 +72,8 @@ class DiagResultSearch extends Component {
   }
 
   render() {
-    const { show, searchResult, refreshScroller, handleChangeValue, pageTop, windowHeight, isShowNoDataInfo } = this.props;
+    const { show,showTcm,showSym, searchResult, refreshScroller, handleChangeValue, pageTop, windowHeight, isShowNoDataInfo,isTcm } = this.props;
+
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -68,9 +82,10 @@ class DiagResultSearch extends Component {
       width:'14px',
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
+    const idName = showSym?"diagSymSearch":(showTcm?'diagTcmSearch':'diagSearch');
     return (
-      show && <div id='diagSearch' className={style['search-box']}>
-        <SearchOption handleChangeValue={handleChangeValue} refreshScroller={refreshScroller} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
+        ((isTcm&&showSym)||(isTcm&&showTcm)||(show&&!isTcm)) && <div id={idName} className={style['search-box']}>
+        <SearchOption showSym={showSym} handleChangeValue={handleChangeValue} refreshScroller={refreshScroller} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
             {this.getSearchList(searchResult, isShowNoDataInfo)}
         </SearchOption>
       </div>

+ 132 - 56
src/components/Diagnosis/index.jsx

@@ -5,68 +5,144 @@ import { getPageCoordinate,setPosition  } from '@utils/tools';
 import DiagResultSearch from '@containers/DiagResultSearch';
 
 class Diagnosis extends Component {
-  constructor(props) {
-    super(props);
+    constructor(props) {
+        super(props);
 
-    this.state = {
-      diagType: 0,
-      showSearch: props.show,
-      pageTop: ''
+        this.state = {
+            diagType: 0,
+            //showSearch: props.show,
+            pageTop: ''
+        }
+        this.showSearch = this.showSearch.bind(this);
+        this.hideSearch = this.hideSearch.bind(this);
+        this.handleshowSearch = this.handleshowSearch.bind(this);
+        this.handleTcmShowSearch = this.handleTcmShowSearch.bind(this);
+        this.handleSymShowSearch = this.handleSymShowSearch.bind(this);
+        this.refreshScroller = this.refreshScroller.bind(this);
+        this.showTcmSearch=this.showTcmSearch.bind(this);
+        this.showSymSearch=this.showSymSearch.bind(this);
+        this.hideTcmSearch=this.hideTcmSearch.bind(this);
     }
-    this.showSearch = this.showSearch.bind(this);
-    this.hideSearch = this.hideSearch.bind(this);
-    this.handleshowSearch = this.handleshowSearch.bind(this);
-    this.refreshScroller = this.refreshScroller.bind(this);
-  }
-  componentWillReceiveProps() {
-    this.setState({
-      showSearch: this.props.show
-    })
-  }
 
+    /*componentWillReceiveProps() {
+      this.setState({
+        showSearch: this.props.show,
+        showTcmSearch: this.props.showTcm
+      })
+    }*/
 
-  showSearch() {
-    const { showSearch } = this.props;
-    showSearch && showSearch()
-  }
-  hideSearch() {
-    const { hideSearch } = this.props;
-    hideSearch && hideSearch()
-  }
-  handleshowSearch(e) {
-    this.props.show ? this.hideSearch() : this.showSearch()
-    this.setState({ pageTop:getPageCoordinate(e).boxTop })
-    if(this.props.show){
-      this.props.setHighter(48)
-    }else{
-      this.props.getBilling({mode:10});
-      setPosition(e,"#searchOption",this.props.setHighter)
+
+    showSearch() {
+        const {showSearch} = this.props;
+        showSearch && showSearch()
+    }
+
+    hideSearch() {
+        const {hideSearch} = this.props;
+        hideSearch && hideSearch()
+    }
+
+    showTcmSearch() {
+        const {showTcmSearch} = this.props;
+        showTcmSearch && showTcmSearch()
+    }
+
+    hideTcmSearch() {
+        const {hideTcmSearch} = this.props;
+        hideTcmSearch && hideTcmSearch()
+    }
+
+    showSymSearch(flag) {
+        const {showSymSearch} = this.props;
+        showSymSearch && showSymSearch(flag)
     }
-  }
-  refreshScroller(){
-    //更新滚动条状态,解决容器变大滚动条不更新bug
-    return this.context.scrollArea;
-  }
-  render() {
-    return (<div id="diagnosisResult">
-      <ItemBox id="diagnosis" title='诊断' boxHeight='auto' hideAllDrop={this.props.hideAllDrop} titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
-        <DiagnosticList refreshScroller={this.refreshScroller} hideChronic={this.props.hideChronic}></DiagnosticList>
-        <div style={{ marginLeft: '10px', position: 'relative',color:'#000' }}>
-          <Add showText="添加诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px" />
-          <DiagResultSearch
-            refreshScroller={this.refreshScroller} 
-            setHighter={this.props.setHighter} 
-            windowHeight={this.props.windowHeight}
-            pageTop={this.state.pageTop} 
-            height={150}>
-          </DiagResultSearch>
-        </div>
-      </ItemBox>
-      <Message></Message>
-    </div>)
-  }
-}
 
+    handleSymShowSearch(e) {
+        this.showSymSearch(this.props.showSym ? false : true)
+        this.setState({pageTop: getPageCoordinate(e).boxTop})
+        if (this.props.showSym) {
+            this.props.setHighter(48)
+        } else {
+            this.props.getBilling({isTcm:true});
+            setPosition(e, "#searchOption", this.props.setHighter)
+        }
+    }
+
+    handleshowSearch(e) {
+        this.props.show ? this.hideSearch() : this.showSearch()
+        this.setState({pageTop: getPageCoordinate(e).boxTop})
+        if (this.props.show) {
+            this.props.setHighter(48)
+        } else {
+            this.props.getBilling({});
+            setPosition(e, "#searchOption", this.props.setHighter)
+        }
+    }
+
+    handleTcmShowSearch(e) {
+        this.props.showTcm ? this.hideTcmSearch() : this.showTcmSearch()
+        this.setState({pageTop: getPageCoordinate(e).boxTop})
+        if (this.props.showTcm) {
+            this.props.setHighter(48)
+        } else {
+            this.props.getBilling({isTcm: true});
+            setPosition(e, "#searchOption", this.props.setHighter)
+        }
+    }
+
+    refreshScroller() {
+        //更新滚动条状态,解决容器变大滚动条不更新bug
+        return this.context.scrollArea;
+    }
+
+    render() {
+        const {isTcm,tcmList} = this.props;
+        if (isTcm) {    //添加中医诊断后才显示中医症候添加按钮
+            const len = tcmList.length>0?tcmList.length-1:0;
+            const notAll = tcmList.find((it)=>!it.tcmSyndrome);     //是否有未填写的症候
+            const showNext = tcmList.length===0||!notAll;
+            return (<div id="diagnosisTcmResult">
+                <ItemBox id="tcmDiagnosis" title="中医诊断" boxHeight='auto' hideAllDrop={this.props.hideAllDrop}
+                         titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
+                    <DiagnosticList isTcm={isTcm}
+                                    refreshScroller={this.refreshScroller}
+                                    setHighter={this.props.setHighter}
+                                    hideChronic={this.props.hideChronic}></DiagnosticList>
+                    {showNext?<div style={{marginLeft: '10px', position: 'relative', color: '#000'}}>
+                        <Add showText="添加中医诊断结果" handleClick={this.handleTcmShowSearch} id="addTcmDiag"
+                             height="50px"/>
+                        <DiagResultSearch
+                            refreshScroller={this.refreshScroller}
+                            setHighter={this.props.setHighter}
+                            windowHeight={this.props.windowHeight}
+                            pageTop={this.state.pageTop}
+                            isTcm={isTcm}
+                            height={150}>
+                        </DiagResultSearch>
+                    </div>:''}
+                </ItemBox>
+                <Message></Message>
+            </div>)
+        }
+        return (<div id="diagnosisResult">
+            <ItemBox id="diagnosis" title='西医诊断' boxHeight='auto' hideAllDrop={this.props.hideAllDrop} titleTop='22px'
+                     marginTop='9px' backgroundColor='#EAF7FD'>
+                <DiagnosticList refreshScroller={this.refreshScroller} hideChronic={this.props.hideChronic}></DiagnosticList>
+                <div style={{marginLeft: '10px', position: 'relative', color: '#000'}}>
+                    <Add showText="添加西医诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px"/>
+                    <DiagResultSearch
+                        refreshScroller={this.refreshScroller}
+                        setHighter={this.props.setHighter}
+                        windowHeight={this.props.windowHeight}
+                        pageTop={this.state.pageTop}
+                        height={150}>
+                    </DiagResultSearch>
+                </div>
+            </ItemBox>
+            <Message></Message>
+        </div>)
+    }
+}
 Diagnosis.contextTypes = {
   scrollArea: React.PropTypes.object
 };

+ 21 - 13
src/components/DiagnosticItem/index.jsx

@@ -8,7 +8,7 @@ import infoMove from '@common/images/info-move.png';
 import {getChronic} from '@store/async-actions/homePage.js';
 import {storageLocal} from '@utils/tools';
 import {
-    getMRAnalyse
+    embedPush
   } from '@store/async-actions/pushMessage';
 
 class DiagnosticItem extends Component{
@@ -46,15 +46,23 @@ class DiagnosticItem extends Component{
         })
     }
     chooseDiagodal(item) {
-        const { diagnosticList,getTips, type ,addDiagnostic} = this.props;
-        // getTips && getTips(item);
-        // if (type == 'search') {
-        //     getTips && getTips({type:7,name: item.name, position: 1});
-        // }
-        for (let i = 0; i < diagnosticList.length; i++) {
-            if(diagnosticList[i].name === item.name) {
-                Notify.info('该诊断已存在');
-                return
+        const { diagnosticList,isTcm,tcmList,showSym} = this.props;
+        if(isTcm){ //添加的是中医症候,判断是否重复,添加中医诊断不需要判断
+            if(showSym){
+                const lastTcmDiag = tcmList[tcmList.length-1].tcmDiag;
+                for (let i = 0; i < tcmList.length-1; i++) {
+                    if(tcmList[i].tcmDiag+tcmList[i].tcmSyndrome=== lastTcmDiag+item.name) {
+                        Notify.info('该中医诊断+中医证候已存在');
+                        return
+                    }
+                }
+            }
+        }else{
+            for (let i = 0; i < diagnosticList.length; i++) {
+                if(diagnosticList[i].name === item.name) {
+                    Notify.info('该诊断已存在');
+                    return
+                }
             }
         }
         this.props.setHighter&&this.props.setHighter(80)
@@ -71,12 +79,12 @@ class DiagnosticItem extends Component{
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
-        const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
+        const {item,EMRScrollCont,isTcm,showSym,type,addDiagnostic, clearInput, hideSearch} = this.props;
         item.type = diagType;
          /*if(item.type == 2&&mode=='0') {      //文本模式不走慢病。6.0慢病取消
              isChronicMag(item);
          }*/
-         addDiagnostic&&addDiagnostic(item);
+         addDiagnostic&&addDiagnostic(item,isTcm,showSym);
          clearInput&&clearInput();
          hideSearch&&hideSearch();
         this.context.scrollArea&&this.context.scrollArea.refresh();
@@ -87,7 +95,7 @@ class DiagnosticItem extends Component{
                EMRScrollCont.scrollYTo(scrollTop);
             })
          }
-         store.dispatch(getMRAnalyse())
+        showSym&&store.dispatch(embedPush({action: "diag",isTcm:true}))
 
     }
     handleMouseEnterDrug() {

+ 123 - 72
src/components/DiagnosticList/index.jsx

@@ -7,18 +7,19 @@ import diagDown from './img/diagDown.png'
 import manageIcon from '@common/images/manage.png';
 import singleB from './img/singleB.png';
 import singleL from './img/singleL.png';
-import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
+import {ConfirmModal, Message,ComplexModal,Footer,Loading, Add} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
 import store from '@store';
 import { initItemList ,setInitHistory,getHistempDetail} from '@store/async-actions/historyTemplates';
-import { pushAllDataList,inspectAndAssist ,deepClone,setFontColorSize} from '@utils/tools';
+import { getPageCoordinate,setPosition,pushAllDataList,inspectAndAssist ,deepClone,setFontColorSize} from '@utils/tools';
 import { dragBox } from '@utils/drag';
 import iconRadioDefault from '@common/images/icon-radio-default.png'
 import iconRadioActive from '@common/images/icon-radio-active.png'
 import AssessResult from '@containers/AssessResult';
 import {getAssessData} from '@store/async-actions/fetchModules';
 import DetailsModal from '@components/PushItems/DetailsModal';
+import DiagResultSearch from '@containers/DiagResultSearch';
 import tableIcon from '@common/images/table.png';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import config from '@config/index';
@@ -43,7 +44,8 @@ class DiagnosticList extends Component {
             activeItem:{},
             hasEnterItem: -1,
             hasEnterImg: false,
-            timer:null
+            timer:null,
+            pageTop:''
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -58,6 +60,10 @@ class DiagnosticList extends Component {
         this.handleSaveAssess = this.handleSaveAssess.bind(this);       //评估弹窗确定
         this.onPrint = this.onPrint.bind(this);
         this.hideTips=this.hideTips.bind(this);
+        this.handleTcmShowSearch = this.handleTcmShowSearch.bind(this);
+        this.handleSymShowSearch = this.handleSymShowSearch.bind(this);
+        this.showTcmSearch=this.showTcmSearch.bind(this);
+        this.showSymSearch=this.showSymSearch.bind(this);
     }
     onPrint() {
       let dom = $("#AssistResult");
@@ -69,31 +75,59 @@ class DiagnosticList extends Component {
       });
     }
     upDiagnostic(index) {
-        const { upDiagnostic } = this.props;
-        upDiagnostic && upDiagnostic(index)
+        const { upDiagnostic,isTcm } = this.props;
+        upDiagnostic && upDiagnostic(index,isTcm)
     }
     downDiagnostic(index) {
-        const { downDiagnostic } = this.props;
-        downDiagnostic && downDiagnostic(index)
+        const { downDiagnostic,isTcm } = this.props;
+        downDiagnostic && downDiagnostic(index,isTcm)
     }
     deleteItem() {
         const { delItem,idxNum } = this.state;
-        const { delDiagnostic, delReact,delFollowUp } = this.props;
-        delDiagnostic && delDiagnostic(delItem,idxNum);
-        delReact && delReact(delItem);
-        delFollowUp && delFollowUp(delItem);
+        const { delDiagnostic, delReact,delFollowUp,isTcm } = this.props;
+        delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
+        delReact && delReact(delItem);      //删除对应不良反应
+        delFollowUp && delFollowUp(delItem);    //删除对应回访记录
         this.setState({
             visible: false,
         })
         Notify.success('删除成功')
     }
     handleBlur(e,delItem,idxNum){
-      const { delDiagnostic } = this.props;
+      const { delDiagnostic,isTcm } = this.props;
       let name = e.target.value
       if(name.trim() == ''){
-        delDiagnostic && delDiagnostic(delItem,idxNum);
+        delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
       }
     }
+    handleTcmShowSearch(e) {
+        this.props.showTcm ? this.hideTcmSearch() : this.showTcmSearch()
+        this.setState({pageTop: getPageCoordinate(e).boxTop})
+        if (this.props.showTcm) {
+            this.props.setHighter(48)
+        } else {
+            //this.props.getBilling({mode: 10});
+            setPosition(e, "#searchOption", this.props.setHighter)
+        }
+    }
+    handleSymShowSearch(e) {
+        this.showSymSearch(this.props.showSym ? false : true)
+        this.setState({pageTop: getPageCoordinate(e).boxTop})
+        if (this.props.showSym) {
+            this.props.setHighter(48)
+        } else {
+            this.props.getBilling({isTcm:true});
+            setPosition(e, "#searchOption", this.props.setHighter)
+        }
+    }
+    showTcmSearch(flag) {
+        const {showTcmSearch} = this.props;
+        showTcmSearch && showTcmSearch(flag)
+    }
+    showSymSearch(flag) {
+        const {showSymSearch} = this.props;
+        showSymSearch && showSymSearch(flag)
+    }
     cancel() {
         this.setState({
             visible: false
@@ -112,9 +146,9 @@ class DiagnosticList extends Component {
         })
     }
     showTreat(item, idx) {
-        const  { getTreatResult,getBilling } = this.props;
-        getTreatResult && getTreatResult(item,idx);
-        getBilling({mode:10});
+        const  { getTreatResult,getBilling,isTcm } = this.props;
+        getTreatResult && getTreatResult(item,idx,isTcm);
+        getBilling({isTcm});
     } 
     handleClickDiag(item) {
         const { getTips } = this.props;
@@ -289,42 +323,93 @@ class DiagnosticList extends Component {
         hasEnterImg: false
       })
     }
-    handleFocus(){
+    handleFocus(flag){
       const {getBilling} = this.props;
-      getBilling&&getBilling({mode:10});
+      getBilling&&getBilling({isTcm:flag});
     }
-    handleInput(e,index){
+    handleInput(e,index,isTcm){
       const {editDiagName,getBilling} = this.props;
       let name = (e.target.value).trim()
-      editDiagName(index,name)
+      editDiagName(index,name,isTcm)
       //右侧推送--延时推送
       const stimer = this.state.timer;
       clearTimeout(stimer);
       let timer = setTimeout(function(){
-        getBilling&&getBilling({mode:10});
+        getBilling&&getBilling({isTcm:!!isTcm});
         clearTimeout(stimer);
       },config.delayPushTime);
       this.setState({timer})
     }
     render(){
-        const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
-      const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
-        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg,delItem} = this.state;
-        const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
-        //let isChronic = false;      //是否要显示管理评估
-        const footer = <Footer print={true}
-                               footText="确定"
-                               handlePrint={this.onPrint}
-                               handleConfirm={this.handleSaveAssess}/>;
+        const { list,tcmList, treatment,pushMessage, loading,refreshScroller,windowHeight,setHighter,isTcm} = this.props;
+        const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
+        const {visible, treatTitle,  hasOndel, hasOnIndex,delItem} = this.state;
+        const diagList = isTcm?tcmList:list;
+        if(isTcm){      //中医,添加中医诊断后才显示中医症候添加按钮
+            return(
+                <div className={style['diaglist-wrap']}>
+                    {diagList && (diagList.length > 0) && diagList.map((item, index) => {
+                        const {tcmDiag,tcmSyndrome} = item;
+                        return (<div draggable={false} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={index} >
+                            {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
+                            {diagList.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
+                            <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
+
+                                {tcmDiag?<span className={style['diag-name']}>
+                                      <span title={tcmDiag} className={style['diag-name-box']} style={{'max-width': '300px'}}>
+                                        <input type="text" value={tcmDiag} disabled={true}/>
+                                      </span>
+
+                                    </span>:<Add showText="添加中医诊断结果" isTcm={isTcm} handleClick={this.handleTcmShowSearch} id="addTcmDiag" height="50px" />}
+                            {tcmSyndrome?<span className={style['diag-name']}>
+                                      <span title={tcmSyndrome} className={style['diag-name-box']} style={{'max-width': '300px'}}>
+                                        <input type="text" value={tcmSyndrome} disabled={true}/>
+                                      </span>
+
+                                    </span>:(tcmDiag?<Add showText="添加中医证候" isTcm={isTcm} handleClick={this.handleSymShowSearch} id="addSymDiag" height="50px" />:'')}
+                                {tcmDiag&&tcmSyndrome?'':<DiagResultSearch
+                                        refreshScroller={refreshScroller}
+                                        setHighter={setHighter}
+                                        windowHeight={windowHeight}
+                                        pageTop={this.state.pageTop}
+                                        isTcm={isTcm}
+                                        height={150}>
+                                    </DiagResultSearch>}
+                                {tcmDiag&&tcmSyndrome?<span className={style['treat']}
+                                  onClick={() =>{this.showTreat(item, index)}}>
+                                          <img src={item.hasTreat?singleB:singleL} alt=""/>
+                                          治疗方案
+                                    </span>:''}
+                            <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item,index)}}/>
+                        </div>)
+                    })}
+                    {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
+                    {showTipsDetails &&<DetailsModal
+                        showTipsDetails = {showTipsDetails}
+                        hideTips = {this.hideTips}
+                        showAllName = {showAllName}
+                        tipsDetails = {tipsDetails}/>}
+                    <ConfirmModal visible={visible}
+                                  okText='删除'
+                                  cancelText='取消'
+                                  confirm={this.deleteItem}
+                                  cancel={this.cancel}
+                                  close={this.close}
+                    >
+                        <div className={style['del-msg']}>是否删除中医诊断{delItem.tcmDiag}?</div>
+                    </ConfirmModal>
+                    <Loading show={loading}/>
+                </div>
+
+            )
+        }
         return(
                 <div className={style['diaglist-wrap']}>
-                    {list && (list.length > 0) && list.map((item, index) => {
-                        /*const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
-                           || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
-                        isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;*/
+                    {diagList && (diagList.length > 0) && diagList.map((item, index) => {console.log(diagList,item)
+
                         return (<div draggable={false} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
-                                    {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
+                                    {diagList.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
                                     <span className={style['diag-name']} 
                                        onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
@@ -333,44 +418,17 @@ class DiagnosticList extends Component {
                                       <span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
                                         <input type="text" value={item.name} onFocus={(e)=>{this.handleFocus()}} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
                                       </span>
-                                      {/* <img className={`${style['info-img']}`}
-                                          title='点击i图标可查看详细说明'
-                                          style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
-                                          src={hasEnterImg ? infoMove : infoShow} 
-                                          onMouseEnter={this.handleMouseEnterImg.bind(this)}
-                                          onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
-                                          onClick={this.handleClickDiag.bind(this,item,false,false,false)}
-                                      /> */}
-                                    </span> 
-                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>} */}
+
+                                    </span>
                                     <span className={style['treat']}
-                                          // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           <img src={item.hasTreat?singleB:singleL} alt=""/>
                                           治疗方案
                                     </span>
-                                    {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
-                                          onClick={this.showAssessFn.bind(this,item)}>
-                                        管理评估
-                                    </span>:''}*/}
                                     <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item,index)}}/>
                         </div>)
                     })}
                      {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
-                     {/*{showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
-                                               title='管理和评估'
-                                               icon={manageIcon}
-                                               top={'3%'}
-                                               bottom={'3%'}
-                                               width={820}>
-
-                       <AssessResult closeAssess={this.showAssessFn.bind(this)}
-                                     disId={assessId}
-                                     disName={disName}
-                                     chronicMagItemName={list[0].name}
-                                     isAssessConfirm={isAssessConfirm}
-                                     ></AssessResult>
-                      </ComplexModal>:''}*/}
                     {showTipsDetails &&<DetailsModal
                         showTipsDetails = {showTipsDetails}
                         hideTips = {this.hideTips}
@@ -383,15 +441,8 @@ class DiagnosticList extends Component {
                                   cancel={this.cancel}
                                   close={this.close}
                                   >
-                                  <div className={style['del-msg']}>是否删除诊断{delItem.name}?</div> 
-                    </ConfirmModal>
-                    {/*<ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord}  cancel={this.noReferRecord} close={this.noReferRecord}>
-                        <div className={style['confirm-info']}>是否引用往期病历</div> 
+                                  <div className={style['del-msg']}>是否删除西医诊断{delItem.name}?</div>
                     </ConfirmModal>
-                    <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
-                        {this.getHistoryCase()}
-                        <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
-                    </ConfirmModal>*/}
                     <Loading show={loading}/>
                 </div>
                

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

@@ -311,7 +311,8 @@ class HistoryCaseContainer extends React.Component {
 
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
-        const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex, activeIndex } = this.state;     
+        const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex, activeIndex } = this.state;
+        //console.log(1,dataStr)
         const getAllDataStringList = (dataStr) =>{           //获取所有模块文本的数据
             let jsonDataString = {};
             jsonDataString.lis = {};
@@ -326,6 +327,7 @@ class HistoryCaseContainer extends React.Component {
             jsonDataString.lis = dataStr[8] && dataStr[8].content || '';      //检验导入填写
             jsonDataString.pacs = dataStr[9] && dataStr[9].content || '';     //检查
             jsonDataString.diag = dataStr[10] &&dataStr[10].content || '';      //诊断
+            jsonDataString.tcmDiag = dataStr[12] &&dataStr[12].content || '';      //诊断
             jsonDataString.advice = dataStr[11] && dataStr[11].content || '';       //医嘱
             return jsonDataString;
         }

+ 1 - 1
src/components/Inspect/index.less

@@ -7,7 +7,7 @@
     position: relative;
     margin: 20px 20px -21px 20px;
     span {
-        margin-left: 60px;
+        margin-left: 68px;
         border: 1px dashed @part-border-color;
         border-bottom: 1px solid #fff;
         display: inline-block;

+ 39 - 16
src/components/Operation/index.jsx

@@ -16,7 +16,7 @@ import check_right from './img/check-right.png';
 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 { saveMessage, clearMessages } from  '@store/async-actions/print'
 import {dragBox} from '@utils/drag';
 import store from '@store';
 import $ from 'jquery';
@@ -45,7 +45,8 @@ class Operation extends Component {
       folderListShow:false, //文件夹列表展示
       medicalName: '', //保存病历名称
       showValit: false, // 显示校验的文字
-      saveVisible: false //保存病历模态框
+      saveVisible: false, //保存病历模态框
+      clearVisible:false
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -67,9 +68,12 @@ class Operation extends Component {
     this.hideFolderList = this.hideFolderList.bind(this)
     this.handleMedicalChange = this.handleMedicalChange.bind(this)
 
-
+    this.makeSureClear = this.makeSureClear.bind(this);
     this.makeSureSave = this.makeSureSave.bind(this);
+    
     this.closeSave = this.closeSave.bind(this);
+    this.closeClear = this.closeClear.bind(this);
+    
     this.$inp = React.createRef()
   }
 
@@ -118,7 +122,11 @@ class Operation extends Component {
       // templateName: ''
     })
   }
-
+  closeClear(){
+    this.setState({
+      clearVisible: false,
+    })
+  }
   showPrint() {
     this.setState({
       zIndex:240
@@ -198,6 +206,7 @@ class Operation extends Component {
     this.setState({
       saveVisible: true
     })
+    this.props.hideAllSearch();
   }
 
   handleMedicalChange(e){
@@ -223,18 +232,21 @@ class Operation extends Component {
     const mdVal = $("#medicalInfoSearch").val();    //知识是否有搜索条件未清空
     if(flg||tpVal||mdVal){
       this.setState({
-        type: type,
-        okText: '清除',
-        borderColor: 'red',
-        okColor: 'red',
-        oKBg: '#fff',
-        msg: <p className={style['msg']}>是否清空所有内容?</p>
+        clearVisible: true,
       })
       
-      this.props.diagShowTmp(true)
+      // this.props.diagShowTmp(true)
+      
     }else{
       Notify.info('当前页面数据已清空');
     }
+    
+  }
+  makeSureClear(){
+    this.setState({
+      clearVisible: false,
+    })
+    clearMessages()
   }
   handleInput(e){
     let val = (e.target.value).substring(0,20)
@@ -427,10 +439,6 @@ class Operation extends Component {
       // type === 2 清除数据
       diagShowTmp(false);
       this.setState({ title: '' })
-      // 慢病标识
-      const chronicFlag = chronicMagItem || chronicDesease?true:false;
-      // console.log(chronicFlag,'chronicFlag');
-      clear(chronicFlag);
       //更新滚动条
       const that = this;
       setTimeout(function(){
@@ -574,7 +582,22 @@ class Operation extends Component {
       <span className={winWidth<=1082?`${style['saveButton']} ${style['minstyle']}`: style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
       {visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
       {preVisible?<PreviewContainer visible={preVisible} onClose={closePreview} />:null}
-      
+      {<ConfirmModal
+        visible={this.state.clearVisible}
+        confirm={this.makeSureClear}
+        close={this.closeClear}
+        cancel={this.closeClear}
+        okText={"清除"}
+        okBorderColor={'red'}
+        okColor={'red'}
+        oKBg={'#fff'}
+      >
+        <div className={style.outBox}>
+          <span>是否清空所有内容</span>
+        </div>
+      </ConfirmModal>}
+
+
       {<ConfirmModal
         visible={this.state.saveVisible}
         confirm={this.makeSureSave}

+ 11 - 4
src/components/PatInfo/Select/index.jsx

@@ -72,19 +72,26 @@ export default class Select extends Component {
   };
 
   onChange(e, val) {
-    const state = store.getState();
+    const sex = e.target.innerHTML
+    let obj = {
+      label: 'patientSex',
+      id: 'patientSex',
+      value: sex=='男'?1:2,
+      title: '性别',
+      maxlength: 11
+    }
     e.stopPropagation()
     this.setState({
-      value: val,
+      value: obj,
       isOpen: false
     });
-    this.props.onChange(val);
+    this.props.onChange(obj);
     store.dispatch({
       type: CLEARMENSTRUATIONTEXTDATA,
     });
 
     store.dispatch(embedPush({
-      action: "patientia",
+      action: "info",
       mode: 1
     }))
   };

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

@@ -128,7 +128,7 @@ class PatInfo extends Component {
       clearTimeout(tempTimer)
       let timer =setTimeout(() => {
         store.dispatch(embedPush({
-          action: "patientia",
+          action: "info",
           mode: 1
         }))
         clearTimeout(tempTimer)
@@ -145,7 +145,7 @@ class PatInfo extends Component {
     let newInfo = Object.assign([], patientInfo);
     newInfo[3] = item
     this.setState({
-      patientInfo: newInfo
+      patientInfo: 'newInfo'
     })
     initPatInfoData && initPatInfoData(newInfo)
   }

+ 3 - 2
src/components/PreviewBody/index.jsx

@@ -82,7 +82,7 @@ class PreviewBody extends Component {
     }
   }
   render() {
-    const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
+    const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;console.log(3,dataStr)
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
     let isShowSex = baseObj.sex !== 2 ? false : true
     const contStyle = {
@@ -131,7 +131,8 @@ class PreviewBody extends Component {
           <ItemPart dataStr={dataStr.vital} title={'查体:'} type={1}></ItemPart>          
           <PreviewInspect dataJson={dataStr.lis} toTime={this.toTime} dateTime={this.state.dateTime} showDetails={this.showDetailsCopy}></PreviewInspect>
           <ItemPart dataStr={dataStr.pacs} title={'检查:'} type={2}></ItemPart>
-          <ItemPart dataStr={dataStr.diag} title={'诊断:'} type={2} lastDot={true}></ItemPart>
+          <ItemPart dataStr={dataStr.diag} title={'西医诊断:'} type={2} lastDot={true}></ItemPart>
+          <ItemPart dataStr={dataStr.tcmDiag} title={'中医诊断:'} type={2} lastDot={true}></ItemPart>
           <MedicalAdvice advice={dataStr.advice}></MedicalAdvice>
          
         </table>

+ 1 - 1
src/components/PreviewBody/index.less

@@ -29,7 +29,7 @@ table{
   }
   .patInfoFst .patInfoSec:first-child{
     text-align: right;    
-    width: 70px;
+    width: 76px;
     font-size: 14px;
   }
   &>tr>td:first-child {//打印样式需要改

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

@@ -37,9 +37,9 @@ class PushData extends Component{
 
     render(){
         const {hashNum } = this.state
-        const {mrId,planCode,showPushData,togglePushData ,windowWidth,windowHeight,hospitalId} = this.props
+        const {mrId,isTcm,planCode,showPushData,togglePushData ,windowWidth,windowHeight,hospitalId} = this.props
         const pushBoxPos = windowWidth>1200?(windowWidth-1200)/2:0;
-        const url =`${pushPage2}?mrId=${mrId.indexOf("reStart") > - 1?"":mrId}&planCode=${planCode}&hospitalId=${hospitalId}${mrId.indexOf("reStart") > - 1 ? '&reStart='+Math.random():""}`;
+        const url =`${pushPage2}?mrId=${mrId.indexOf("reStart") > - 1?"":mrId}&isTcm=${isTcm}&planCode=${planCode}&hospitalId=${hospitalId}${mrId.indexOf("reStart") > - 1 ? '&reStart='+Math.random():""}`;
         return <div >
             {!showPushData&&<div className={style['slideButton']} style={{right:pushBoxPos+'px'}} onClick={this.showPushData}>
                 朗通智能提醒 

+ 20 - 0
src/containers/DiagResultSearch.js

@@ -3,6 +3,8 @@ import { connect } from 'react-redux';
 import {
   SHOW_SEARCH,
   HIDE_SEARCH,
+  SHOW_TCM_SEARCH,
+  HIDE_TCM_SEARCH,
   GET_SEARCH_RESULT,
   SHOWNODATATEXT,
 } from '@store/types/diagnosticSearch';
@@ -12,6 +14,8 @@ import DiagResultSearch from '@components/DiagResultSearch';
 function mapStateToProps(state) {
     return {
       show: state.diagnosticSearch.show,
+      showTcm: state.diagnosticSearch.showTcm,
+      showSym:state.diagnosticSearch.showSym,
       searchValue: state.diagnosticSearch.searchValue,
       searchResult: state.diagnosticSearch.searchResult,
       isShowNoDataInfo: state.diagnosticSearch.isShowNoDataInfo,
@@ -30,6 +34,22 @@ function mapDispatchToProps(dispatch) {
                 type: HIDE_SEARCH
             })
         },
+        showTcmSearch:()=>{
+            dispatch({
+                type: SHOW_TCM_SEARCH
+            })
+        },
+        hideTcmSearch:()=>{
+            dispatch({
+                type: HIDE_TCM_SEARCH
+            })
+        },
+        showSymSearch:(flag)=>{
+            dispatch({
+                type: 'SHOW_SYM_SEARCH',
+                show:flag
+            })
+        },
         clearSearchResult: ()=>{
             dispatch({
                 type: GET_SEARCH_RESULT,

+ 20 - 1
src/containers/Diagnosis.js

@@ -1,13 +1,16 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import Diagnosis from '@components/Diagnosis';
-import { SHOW_SEARCH,  HIDE_SEARCH } from '@store/types/diagnosticSearch';
+import { SHOW_SEARCH,  HIDE_SEARCH ,SHOW_TCM_SEARCH,HIDE_TCM_SEARCH} from '@store/types/diagnosticSearch';
 import {HIDEDROP} from '@types/homePage';
 import {embedPush} from '@store/async-actions/pushMessage';
 
 function mapStateToProps(state) {//console.log(state)
     return {
         show: state.diagnosticSearch.show,
+        showTcm: state.diagnosticSearch.showTcm,
+        showSym: state.diagnosticSearch.showSym,
+        tcmList:state.diagnosticList.tcmList,
         windowHeight:state.homePage.windowHeight,
         typeConfig: state.typeConfig
     }
@@ -25,6 +28,22 @@ function mapDispatchToProps(dispatch) {
                 type: HIDE_SEARCH
             })
         },
+        showSymSearch:(flag)=>{
+            dispatch({
+                type: 'SHOW_SYM_SEARCH',
+                show:flag
+            })
+        },
+        showTcmSearch:()=>{
+            dispatch({
+                type: SHOW_TCM_SEARCH
+            })
+        },
+        hideTcmSearch:()=>{
+            dispatch({
+                type: HIDE_TCM_SEARCH
+            })
+        },
         hideAllDrop(){
           dispatch({
             type:HIDEDROP

+ 16 - 6
src/containers/DiagnosticItem.js

@@ -2,7 +2,7 @@ import React from 'react';
 import { connect } from 'react-redux';
 import DiagnosticItem from '@components/DiagnosticItem';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList'; 
-import {  SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
+import {  SHOW_SEARCH,  HIDE_SEARCH,HIDE_TCM_SEARCH, SET_SEARCH_VALUE } from '@store/types/diagnosticSearch';
 import { isChronicMag, isAddMainSuit } from'@store/async-actions/diagnosticList.js';
 import { addDiagnostic } from '@store/async-actions/treat';
 import { getSearchResult } from '@store/async-actions/diagnosticSearch';
@@ -12,6 +12,8 @@ import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return {
         diagnosticList: state.diagnosticList.diagnosticList,
+        tcmList: state.diagnosticList.tcmList,
+        symList: state.diagnosticList.symList,
         mode:state.typeConfig.mode,
         EMRScrollCont:state.inspect.context.scrollArea,             //滚动条对象
     }
@@ -19,18 +21,19 @@ function mapStateToProps(state) {
 
 function mapDispatchToProps(dispatch) {
     return{
-        addDiagnostic: (item) => {
+        addDiagnostic: (item,isTcm,showSym) => {
             
             dispatch({
                 type: ADD_DIAGNOSTIC,
-                item: item
+                item: item,
+                isTcm,
+                isSym:showSym,      //是否是中医症候
             });
             dispatch({
-                type: GET_DIAGNOSTIC_STR
+                type: GET_DIAGNOSTIC_STR,
+                isTcm
             });
             dispatch(isAddMainSuit())
-            // dispatch(addDiagnostic(item))
-            //dispatch(getConceptDetail({type:7,name: item.name, position: 1},false,true,true))
         },
         showSearch:()=>{
             dispatch({
@@ -41,6 +44,13 @@ function mapDispatchToProps(dispatch) {
             dispatch({
                 type: HIDE_SEARCH
             })
+            dispatch({
+                type: HIDE_TCM_SEARCH
+            })
+            dispatch({
+                type: 'SHOW_SYM_SEARCH',
+                show:false
+            })
         },
         getTips: (diagItem) => {
             dispatch(getConceptDetail(diagItem))

+ 37 - 12
src/containers/DiagnosticList.js

@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
 import DiagnosticList from '@components/DiagnosticList';
 import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING,ADDDIAGMSG,EDITDIAGMSG} from '@store/types/diagnosticList'; 
 import {SHOW_TIPS_DETAILS,HIDE_TIPS_DETAILS} from '@store/types/pushMessage';
+import { SHOW_TCM_SEARCH,HIDE_TCM_SEARCH} from '@store/types/diagnosticSearch';
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
 import {embedPush, getAllConceptDetail, getConceptDetail, getMRAnalyse} from '../store/async-actions/pushMessage';
@@ -18,6 +19,7 @@ function mapStateToProps(state) {//console.log(state)
     return {
         pushMessage: pushMessage,
         list: diagnosticList.diagnosticList,
+        tcmList:diagnosticList.tcmList,
         treatment: state.treat.show,
         isFirst: diagnosticList.isFirst,
         diagnosticStr: diagnosticList.diagnosticStr,
@@ -36,11 +38,12 @@ function mapStateToProps(state) {//console.log(state)
 
 function mapDispatchToProps(dispatch) {
     return {
-      editDiagName(idx,name){        //获取评估内容数据
+      editDiagName(idx,name,isTcm){        //获取评估内容数据
         dispatch({
           type:EDITDIAGMSG,
           idx:idx,
-          name:name
+          name:name,
+          isTcm
         });
         dispatch({
             type: GET_DIAGNOSTIC_STR
@@ -56,16 +59,35 @@ function mapDispatchToProps(dispatch) {
             type: GET_DIAGNOSTIC_STR
         });
       },
-        delDiagnostic: (item,idx) => {
+        showTcmSearch:(flag)=>{
+          if(flag){
+              dispatch({
+                  type: SHOW_TCM_SEARCH
+              })
+          }else{
+              dispatch({
+                  type: HIDE_TCM_SEARCH
+              })
+          }
+        },
+        showSymSearch:(flag)=>{
+            dispatch({
+                type: 'SHOW_SYM_SEARCH',
+                show:flag
+            })
+        },
+        delDiagnostic: (item,idx,isTcm) => {
             dispatch({
                 type: DEL_DIAGNOSTIC,
                 item: item,
-                idx:idx
+                idx:idx,
+                isTcm
             });
             dispatch({
-                type: GET_DIAGNOSTIC_STR
+                type: GET_DIAGNOSTIC_STR,
+                isTcm
             });
-            dispatch(getMRAnalyse())
+            dispatch(embedPush({action: "diag",isTcm}))
         },
         delReact: (item) => {
             dispatch({
@@ -79,19 +101,21 @@ function mapDispatchToProps(dispatch) {
                 delItem: delItem
             })
         },
-        upDiagnostic: (index, id) => {
+        upDiagnostic: (index,isTcm) => {
             dispatch({
                 type: UP_DIAGNOSTIC,
-                index: index
+                index: index,
+                isTcm
             });
             dispatch({
                 type: GET_DIAGNOSTIC_STR
             });
         },
-        downDiagnostic: (index, id) => {
+        downDiagnostic: (index,isTcm) => {
             dispatch({
                 type: DOWN_DIAGNOSTIC,
-                index: index
+                index: index,
+                isTcm
             });
             dispatch({
                 type: GET_DIAGNOSTIC_STR
@@ -102,11 +126,12 @@ function mapDispatchToProps(dispatch) {
                 type: SHOW_TREAT,
             })
         },
-        getTreatResult: (item,idx) => {
+        getTreatResult: (item,idx,isTcm) => {
             dispatch({
                 type:ADDDIAGMSG,
                 item:item,
-                idx:idx
+                idx:idx,
+                isTcm
             });
         },
         getTips: (item) => {

+ 12 - 9
src/containers/OperationContainer.js

@@ -11,8 +11,8 @@ import {
 import { saveMessage, clearMessages } from "../store/async-actions/print";
 import { saveTemplateDetail, getDepartments, saveAdminTemplateDetail, getFloderList,newFloder,orderFloder } from '@store/async-actions/tabTemplate';
 import { getDptLis,folderModal,folderOrder } from '@store/actions/tabTemplate';
-import { saveClickNum, getInitModules } from '@store/async-actions/homePage';
-import { getOtherHisRecord } from '@store/async-actions/fetchModules';
+import { saveClickNum } from '@store/async-actions/homePage';
+/*import { getOtherHisRecord } from '@store/async-actions/fetchModules';*/
 import { RECOVER_TAG_MAIN } from '@store/types/mainSuit';
 import { RECOVER_TAG_CURRENT } from '@store/types/currentIll';
 import { RECOVER_TAG_OTHER } from '@store/types/otherHistory';
@@ -101,14 +101,9 @@ function mapDispatchToProps(dispatch) {
 
       dispatch(() => saveMessage())
     },
-    clear: (flag) => {
+    clear: () => {
       clearMessages();
-      // console.log('清除数据');
-      // dispatch(getOtherHisRecord());      //清除后重新获取其他史记录
-      // 清除时如果是慢病模板则重新获取模板
-      if (flag) {
-        dispatch(getInitModules);
-      }
+
     },
     saveDataAlls(val, sex, id,fstName,folderId,folderName) {
       dispatch(saveAdminTemplateDetail(val, sex, id,fstName,folderId,folderName))
@@ -116,7 +111,15 @@ function mapDispatchToProps(dispatch) {
     saveDataAll(val, sex, spell) {
       dispatch(saveTemplateDetail(val, sex, spell))
     },
+    hideAllSearch(){
+        dispatch({
+            type:'HIDE_ALL_SEARCH'
+        });
+    },
     diagShowTmp(bool) {
+      dispatch({
+          type:'HIDE_ALL_SEARCH'
+      });
       dispatch({
         type: DIAG_SHOW,
         data: bool

+ 1 - 0
src/containers/PatInfoContainer.js

@@ -14,6 +14,7 @@ function mapDispatchToProps(dispatch) {
             dispatch(initPersonInfo)
         },
         initPatInfoData: (params) =>{
+            // console.log(params,11111)
             dispatch({
                 type: SETINITPATINFO,
                 params

+ 1 - 0
src/containers/PushDataContainer.js

@@ -10,6 +10,7 @@ function mapStateToProps(state){
     return {
         showPushData:showPushData,
         mrId:mrInfo.mrId,
+        isTcm:mrInfo.isTcm,
         planCode:mrInfo.mode,
         windowHeight:state.homePage.windowHeight,
         windowWidth:state.homePage.windowWidth,

+ 87 - 29
src/store/actions/diagnosticList.js

@@ -19,9 +19,11 @@ export const editDiagMsg = (state, action) => {
     return res;
 }
 
-export const addDiagMsg = (state, action) => {
+export const addDiagMsg = (state, action) => {  //选中诊断依据
     const res = JSON.parse(JSON.stringify(state));
-    let tmpLis = res.diagnosticList
+    const {isTcm} = action;
+    console.log('addDiagMsg',action)
+    let tmpLis = isTcm?res.tcmList:res.diagnosticList;
     for(let i = 0;i < tmpLis.length;i++){
         if(action.idx == i){
             tmpLis[i].hasTreat = 1
@@ -29,20 +31,56 @@ export const addDiagMsg = (state, action) => {
             tmpLis[i].hasTreat = 0
         }
     }
-    let obj = {
-        "dateValue": '',
-        "name": action.item.name,
-        "uniqueName": action.item.uniqueName
+    tmpLis = [...tmpLis]
+    if(isTcm){
+        res.otherIndex=tmpLis[action.idx];
+    }else{
+        res.diseaseName = tmpLis[action.idx]
+    }
+    return res;
+}
+
+export const addTcmDiagnostic = (state, action) => {
+    const res = JSON.parse(JSON.stringify(state));
+    //console.log('addTcmDiagnostic',action)
+    const { isSym } = action;
+    let obj=null;
+    //如果前面有一个诊断和症候不全,则不添加新行(不一定是上一个,但肯定只有一个不全)
+    const len = res.tcmList.length;
+    if(len===0){    //len==0,只可能是添加中医诊断
+        obj = {
+            "tcmDiag":action.item.name, //中医诊断
+            "tcmSyndrome":"",      //中医症候
+            "hasTreat":1,       //默认第一个为治疗方案,作为推送入参
+        };
+        res.tcmList.push(obj);
+    }else{
+        if(isSym){      //上一个症候没填,不用新增
+            const noAllInx = res.tcmList.findIndex((it)=>!it.tcmSyndrome);
+            res.tcmList[noAllInx].tcmSyndrome=action.item.name;
+            if(len===1){
+                res.otherIndex = {
+                    "tcmDiag":res.tcmList[0].tcmDiag, //中医诊断
+                    "tcmSyndrome":action.item.name,      //中医症候
+                }
+            }
+        }else{
+            obj = {
+                "tcmDiag":action.item.name, //中医诊断
+                "tcmSyndrome":"",      //中医症候
+                "hasTreat":0,
+            };
+            res.tcmList.push(obj);
+        }
     }
-    res.diagnosticList = [...tmpLis]
-    res.diseaseName = obj
     return res;
 }
 
 export const addDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    res.diagnosticList.push(action.item)
-    let tmpLis = res.diagnosticList,num=0
+    let list = res.diagnosticList;
+    list.push(action.item)
+    let tmpLis = list,num=0
     for(let i = 0;i < tmpLis.length;i++){
         tmpLis[i].uniqueName = tmpLis[i].name
         if(!tmpLis[i].hasTreat){
@@ -51,25 +89,27 @@ export const addDiagnostic = (state, action) => {
     }
     if(num == tmpLis.length){
         tmpLis[0]['hasTreat'] = 1
-        let obj = {
-            "dateValue": '',
-            "name": tmpLis[0].name,
-            "uniqueName": tmpLis[0].uniqueName
-        }
+        let obj  = {
+                "dateValue": '',
+                "name": tmpLis[0].name,
+                "uniqueName": tmpLis[0].uniqueName
+            }
         res.diseaseName = obj
     }
-    res.diagnosticList = [...tmpLis]
+    list = [...tmpLis];
     return res;
 }
 
 export const delDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    res.diagnosticList = res.diagnosticList.filter((item,idx) =>{
+    const {isTcm} = action;
+    let k = isTcm?'tcmList':'diagnosticList';
+    let list = res[k].filter((item,idx) =>{
         if(idx != action.idx){
             return item
         }
     });
-    let tmpLis = res.diagnosticList,num=0
+    let tmpLis = list,num=0
     for(let i = 0;i < tmpLis.length;i++){
         if(!tmpLis[i].hasTreat){
             ++num
@@ -82,34 +122,44 @@ export const delDiagnostic = (state, action) => {
             "name": tmpLis[0].name,
             "uniqueName": tmpLis[0].uniqueName
         }
-        res.diseaseName = obj
+        if(isTcm){
+            res.otherIndex=tmpLis[0];
+        }else{
+            res.diseaseName = obj
+        }
     }else{
-        res.diseaseName = {}
+        if(isTcm){
+            res.otherIndex=tmpLis[0];
+        }else{
+            res.diseaseName = {}
+        }
     }
-    res.diagnosticList = [...tmpLis]
+    res[k] = [...tmpLis]
     return res;
 }
 
 export const upDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    const index = action.index;
+    const {index,isTcm} = action;
+    const list = isTcm?res.tcmList:res.diagnosticList;
     if ( index === 0) {
         return res
     }
-    const temp = res.diagnosticList[index-1];
-    res.diagnosticList[index-1] =res.diagnosticList[index];
-    res.diagnosticList[index] = temp;
+    const temp = list[index-1];
+    list[index-1] =list[index];
+    list[index] = temp;
     return res;
 }
 export const downDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    const index = action.index;
+    const {index,isTcm} = action;
+    const list = isTcm?res.tcmList:res.diagnosticList;
     if ( index === state.length-1) {
         return res
     }
-    const temp = res.diagnosticList[index+1];
-    res.diagnosticList[index+1] = res.diagnosticList[index];
-    res.diagnosticList[index] = temp;
+    const temp = list[index+1];
+    list[index+1] = list[index];
+    list[index] = temp;
     return res;
 }
 
@@ -214,5 +264,13 @@ export function reDiagData(state, action) {
     res.diagnosticList = action.params[10].contentValue;
     res.diagnosticStrNoType = action.params[10].contentJson;
     res.diseaseName = action.params[10].diseaseName;
+    //中医数据
+    if(action.params[12]){
+        res.tcmList =action.params[12].contentValue;
+        res.otherIndex = action.params[12].diseaseName;
+    }else{
+        res.tcmList =[];
+        res.otherIndex ={};
+    }
     return res;
 }

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

@@ -1,14 +1,43 @@
 export const showSearch = (state,action) => {
     const res = Object.assign({}, state);
     res.show = true;
+    res.showTcm = false;
+    res.showSym = false;
+    return res;
+}
+export const hideAllSearch = (state) => {
+    const res = Object.assign({}, state);
+    res.show = false;
+    res.showTcm = false;
+    res.showSym = false;
     return res;
 }
-
 export const hideSearch = (state,action) => {
     const res = Object.assign({}, state);
     res.show = false;
     return res;
 }
+export const showTcmSearch = (state,action) => {
+    const res = Object.assign({}, state);
+    res.show = false;
+    res.showSym = false;
+    res.showTcm = true;
+    return res;
+}
+
+export const showSymSearch = (state,action) => {
+    const res = Object.assign({}, state);
+    res.show = false;
+    res.showTcm = false;
+    res.showSym=action.show;
+    return res;
+}
+
+export const hideTcmSearch = (state,action) => {
+    const res = Object.assign({}, state);
+    res.showTcm = false;
+    return res;
+}
 
 export const setSearchValue = (state,action) => {
     const res = Object.assign({},state);

+ 2 - 0
src/store/actions/print.js

@@ -48,6 +48,8 @@ export const setMrId=(state,action)=>{
   res.mrInfo.update = +update+1;
   res.mrInfo.mrId = action.data.data;
   res.mrInfo.mode = action.data.action;
+  res.mrInfo.isTcm = action.isTcm;
+
   return res;
 };
 

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

@@ -10,7 +10,7 @@ export const isAddMainSuit = () =>{
         const state = getState();
         if(state.diagnosticList.diagnosticList.length === 1 && state.diagnosticList.diagnosticList[0].type === 2) {
             const isAddMainSuitFlag = state.mainSuit.data && state.mainSuit.data.length === 0 && state.mainSuit.saveText    //判断主诉和检验查体是否为空
-                                      && (state.mainSuit.saveText.length === 0 || state.mainSuit.saveText.length === 1 
+                                      && (state.mainSuit.saveText.length === 0 || state.mainSuit.saveText.length === 1
                                       &&  state.mainSuit.saveText[0] === '') && state.assistCheck && state.assistCheck.dataString.length === 0
                                       && state.inspect.labelList && state.inspect.labelList.length === 0 && state.inspect.inspectStrPlus.length === 0
             if(isAddMainSuitFlag) {

+ 8 - 3
src/store/async-actions/diagnosticSearch.js

@@ -6,6 +6,10 @@ import { formatFormParmas } from '@utils/tools';
 import store from '@store';
 
 export const getSearchList = (val,flag) => {
+    const state = store.getState();
+    //console.log(state)
+    const showTcm = state.diagnosticSearch.showTcm;
+    const showSym = state.diagnosticSearch.showSym;
     if(val.trim() == ''){
         // const data = [];
         if(flag){
@@ -31,7 +35,7 @@ export const getSearchList = (val,flag) => {
             }
         }
         json('/demo/retrieval/index',{
-            "type":'4',
+            "type":showTcm?'12':(showSym?'13':'4'),
             "age": formatFormParmas('patientAge',state.patInfo.patInfoData),
             "inputStr": val.trim(),
             "sex": formatFormParmas('patientSex',state.patInfo.patInfoData),
@@ -41,14 +45,15 @@ export const getSearchList = (val,flag) => {
             if(res.data.code==0){
                 const data = res.data.data;let curDate=[];
 
-                let arr = data.diseaseNames||[];
+                let arr = data[showTcm?'tcmdiseaseNames':(showSym?'tcmsyndromeNames':'diseaseNames')]||[];
                 for(let i = 0;i < arr.length;i++){
                     let tmp = arr[i]
                     let obj = {}
                     obj['name'] = tmp.name;
                     obj['uniqueName'] = tmp.name;
                     obj['conceptId'] = '';
-                    obj['icd10Code'] = tmp.icd10Code;
+                    obj['icd10Code'] = tmp.icd10Code||tmp.code;
+                    //obj['code'] = tmp.code;
                     curDate.push(obj)
                 }
                 if(flag){ 

+ 8 - 1
src/store/async-actions/print.js

@@ -71,7 +71,7 @@ function formatFormParmas(val,arr){
 // 保存病历_lcq_new_重写
 export const saveMedicalData = () =>{
     let baseList = store.getState();
-    const { patInfo: { patInfoData },homePage:{curHos}} = baseList
+    const { patInfo: { patInfoData },homePage:{curHos}} = baseList;
     let inquiryDate = timestampToTime(new Date().getTime())  // 获取当前时间  
     let modeName = baseList.patInfo.medicalName   //病历名称
     let jsonData = getAllDataList(baseList);
@@ -153,6 +153,13 @@ export const saveMedicalData = () =>{
         contentJson: JSON.stringify(tempPreview.advice),
         type: 12,
       },
+      {
+          content: tempPreview.tcmDiag.diagnosticStr,
+          contentValue: tempPreview.tcmDiag.diagnosticList,
+          diseaseName: tempPreview.tcmDiag.diseaseName,
+          contentJson: tempPreview.tcmDiag.diagnosticStrNoType,
+          type: 13,
+      },
     ];
     // let sex = formatFormParmas('patientSex', patInfoData) === '男' ? 1 : 0
     let params = {

+ 3 - 1
src/store/async-actions/pushMessage.js

@@ -46,7 +46,8 @@ export const embedPush = (obj) => {      //内嵌页面推送时推送
     // console.log(obj,'推送的obj');
     const param = getEMRParams();   // 获取推送参数
     // console.log(param,'=param');
-    param.mode = obj ? obj.mode : -1;    // 模式  >100 输入中    < 100  获取
+      param.dept = [{name:param.deptName,uniqueName:param.hospitalId==-1?param.deptName:''}]
+      param.deptName = undefined;
     json(api.setMrInfo, param, true).then((res) => {
       // console.log(res,'======推送的结果');
       const data = res.data;
@@ -57,6 +58,7 @@ export const embedPush = (obj) => {      //内嵌页面推送时推送
         dispatch({
           type: SET_MR_INFO,
           data: params,
+          isTcm:obj.isTcm   //是否为中医触发
         });
       }
     });

+ 12 - 1
src/store/reducers/diagnosticList.js

@@ -24,6 +24,7 @@ import {
 } from '../types/diagnosticList';
 import {
   addDiagnostic,
+  addTcmDiagnostic,
   delDiagnostic,
   upDiagnostic,
   downDiagnostic,
@@ -49,12 +50,14 @@ const initState = {
     diagnosticList: [
     
     ],
+    tcmList:[],
     mainSuitStr:'',
     diagnosticStrNoType:'',
     diagnosticStr:'',
     diseaseName: {
       
-    }
+    },
+    otherIndex:{}
 }
 
 export default function (state=initState, action) {
@@ -65,6 +68,9 @@ export default function (state=initState, action) {
       case ADDDIAGMSG:
         return addDiagMsg(state, action);
       case ADD_DIAGNOSTIC:
+        if(action.isTcm){
+            return addTcmDiagnostic(state, action);
+        }
         return addDiagnostic(state, action);
       case DEL_DIAGNOSTIC:
         return delDiagnostic(state, action);
@@ -111,6 +117,11 @@ export default function (state=initState, action) {
         newState.diseaseName = {};
         newState.diagnosticStrNoType = '';
         return newState;
+      case 'CLEARTCMDIAGDATA':
+          let newSt = Object.assign({}, state);
+          newSt.otherIndex={};
+          newSt.tcmList=[];
+          return newSt;
       default:
         return state;
     }

+ 12 - 2
src/store/reducers/diagnosticSearch.js

@@ -1,8 +1,10 @@
-import { SHOW_SEARCH,  HIDE_SEARCH, SET_SEARCH_VALUE, GET_SEARCH_RESULT,SHOWNODATATEXT } from '../types/diagnosticSearch'; 
-import { showSearch,  hideSearch, setSearchValue, getSearchResult,showText } from '../actions/diagnosticSearch'; 
+import { SHOW_SEARCH,  HIDE_SEARCH, SHOW_TCM_SEARCH,  HIDE_TCM_SEARCH, SET_SEARCH_VALUE, GET_SEARCH_RESULT,SHOWNODATATEXT } from '../types/diagnosticSearch';
+import { showSearch,hideAllSearch,  hideSearch,showTcmSearch,hideTcmSearch, setSearchValue, getSearchResult,showText,showSymSearch } from '../actions/diagnosticSearch';
 
 const initState = {
   show: false,
+  showTcm: false,
+  showSym:false,
   searchValue: '',
   searchResult: [],
   isShowNoDataInfo: false
@@ -14,6 +16,14 @@ export default function (state=initState, action) {
             return showSearch(state, action);
         case HIDE_SEARCH: 
             return hideSearch(state, action);
+        case 'SHOW_SYM_SEARCH':
+            return showSymSearch(state, action);
+        case 'HIDE_ALL_SEARCH':
+            return hideAllSearch(state);
+        case SHOW_TCM_SEARCH:
+            return showTcmSearch(state, action);
+        case HIDE_TCM_SEARCH:
+            return hideTcmSearch(state, action);
         case SET_SEARCH_VALUE: 
             return setSearchValue(state, action);
         case GET_SEARCH_RESULT: 

+ 1 - 1
src/store/reducers/homePage.js

@@ -39,7 +39,7 @@ const initState = {
   }],
   curHos:{
     hosId:-1,
-    hosName:'杭州朗通信息技术有限公司',
+    hosName:'',
     connect:1
   }
 

+ 2 - 0
src/store/types/diagnosticSearch.js

@@ -1,5 +1,7 @@
 export const SHOW_SEARCH = 'SHOW_SEARCH';
 export const HIDE_SEARCH = 'HIDE_SEARCH';
+export const SHOW_TCM_SEARCH = 'SHOW_TCM_SEARCH';
+export const HIDE_TCM_SEARCH = 'HIDE_TCM_SEARCH';
 export const SET_SEARCH_VALUE = 'SET_SEARCH_VALUE';
 export const GET_SEARCH_RESULT = 'GET_SEARCH_RESULT';
 export const SHOWNODATATEXT = 'SHOWNODATATEXT';

+ 3 - 3
src/utils/config.js

@@ -17,7 +17,7 @@ const imageUrlPrefix = 'http://192.168.2.241:82';
 function geturl(){
     if(window.location.href.indexOf('localhost')>-1){
         return {
-            gourl:'http://localhost:8083/cdss.html',
+            gourl:'http://localhost:8081/cdss.html',
             // gourl:'http://192.168.2.241:5654/cdss.html',
             imgurl:host.replace('6060','22')
         }
@@ -39,8 +39,8 @@ function geturl(){
     }else{
         return {
             // gourl:'http://192.168.2.122:5654/cdss.html',
-            gourl:'http://223.93.170.82:12254/cdss.html',
-            imgurl:'http://192.168.2.122:82'
+            gourl:'http://223.93.170.82:12154/cdss.html',
+            imgurl:'http://223.93.170.82:12282'
         }
     }
 }

+ 19 - 4
src/utils/tools.js

@@ -184,7 +184,7 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
 }
 
  // 返回文本信息 转换preview 数据  转为json
-const formatTextInfo = (baseList) =>{
+const formatTextInfo = (baseList) =>{console.log(1,baseList)
   // console.log(baseList,'=========baseList==========');
   let labelList = {
     labelListSmall: [],
@@ -214,7 +214,18 @@ const formatTextInfo = (baseList) =>{
     diagnosticStr: baseList.diagnosticList.diagnosticStr,
     diseaseName: baseList.diagnosticList.diseaseName,
   };
-
+    const {otherIndex} = baseList.diagnosticList;
+    const {tcmList} = baseList.diagnosticList;
+    let str = '';
+    tcmList.map((it)=>{
+        str+=it.tcmDiag+"-"+it.tcmSyndrome+','
+    });
+  let diagnosticTcmList = {
+      diagnosticList: baseList.diagnosticList.tcmList,
+      diagnosticStrNoType: otherIndex?(otherIndex.tcmDiag+otherIndex.tcmSyndrome):'',
+      diagnosticStr: str,
+      diseaseName: otherIndex,
+  };
   return {
     chief: JSON.stringify(baseList.mainSuit.saveText),
     present: JSON.stringify(baseList.currentIll.saveText),
@@ -227,6 +238,7 @@ const formatTextInfo = (baseList) =>{
     lis: labelList, //化验
     pacs: assistLabelList,
     diag: diagnosticList,
+    tcmDiag:diagnosticTcmList,
     advice: newAdviceLabelList,
   };
 }
@@ -340,6 +352,9 @@ const delHistoryDataList = () =>{
   store.dispatch({
     type: CLEARDIAGDATA,
   });
+  store.dispatch({
+      type: 'CLEARTCMDIAGDATA',
+  });
   store.dispatch({
     type: CLEARNEWADVICEDATA,
   });
@@ -801,7 +816,6 @@ function filterDataArr(arrTmp){   //数据处理
           return '';
       }
       return it.replace(config.punReg,function(word){
-        console.log(9898)
         return word.substr(0,1);
       });
     });
@@ -1040,6 +1054,7 @@ function getEMRParams(){
     "marital": marriageHistory.saveText[0]||'',  //婚育史
     "menstrual": menstruationHistory.saveText[0]||'',  //月经史
     "diseaseName":diagnosticList.diseaseName,
+    "otherIndex":diagnosticList.otherIndex,
     "operationName":tempOperationName,
     "infectious": "",
     "operation": tempoperation,
@@ -1226,7 +1241,7 @@ function timestampToTime(timestamp) {     //excel导入2019年5月1日会转换
   var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
   var Y = date.getFullYear() + '-';
   var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
-  var D = date.getDate() + ' ';
+  var D = (date.getDate() < 10 ? '0'+(date.getDate()) : date.getDate()) + ' ';
   var h = date.getHours() + ':';
   var m = date.getMinutes() + ':';
   var s = date.getSeconds();