ソースを参照

Merge branch 'optimize' into optimize-ll

Luolei 6 年 前
コミット
504b117ffd

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

@@ -1,4 +1,4 @@
-import SaveDataAll from "@containers/BodyContainer";
+import EMRContainer from "@components/EMRContainer";
 import PushContainer from '@components/PushContainer';
 
 import style from './index.less';
@@ -6,7 +6,7 @@ import style from './index.less';
 const BodyContainer = (props) =>{
   const { saveDateAll } = props;
   return <div className={style['container'] + ' clearfix'}>
-      <SaveDataAll saveDateAll={saveDateAll}></SaveDataAll>
+      <EMRContainer saveDateAll={saveDateAll}></EMRContainer>
       <PushContainer></PushContainer>
   </div>;
 }

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

@@ -7,12 +7,15 @@ import allTableIcon from '@common/images/all-table.png';
 import add from '@common/images/add-result.png';
 import added from '@common/images/first.png';
 import checkIcon from '@common/images/check.png';
+import up from '@common/images/slide-up.png';
+import down from '@common/images/slide-down.png';
 import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn,Footer,Notify} from '@commonComp';
 import infoShow from '@common/images/info-show.png';
 import infoMove from '@common/images/info-move.png';
 import ScaleTable from '@containers/ScaleTable';
 import {deepClone} from '@utils/tools';
 import $ from 'jquery';
+import config from '@config/index';
 
 /***
 慢病右侧推送模块规则:
@@ -43,6 +46,7 @@ class ChronicInfo extends React.Component{
       currentIndex: -1 //当前index
     };
 
+    this.$content = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
     this.showOption = this.showOption.bind(this);
@@ -57,6 +61,7 @@ class ChronicInfo extends React.Component{
     this.handleForRadio = this.handleForRadio.bind(this);
     this.handleSaveCalcu = this.handleSaveCalcu.bind(this);     //保存评估修改的计算和可能结果
     this.getAddBtnState = this.getAddBtnState.bind(this);
+    this.slideToggle = this.slideToggle.bind(this);
   }
 
   onPrint() {
@@ -482,13 +487,24 @@ class ChronicInfo extends React.Component{
         calcuValues:next.calcuValues
       })
     }
+    if(next.slideUp!=this.props.slideUp){
+      if(next.slideUp){
+        $(this.$content.current).slideUp(config.slideTime);
+      }else{
+        $(this.$content.current).slideDown(config.slideTime);
+      }
+    }
+  }
+  slideToggle(){
+    const {toggleSlide,slideUp} = this.props;
+    toggleSlide&&toggleSlide(!slideUp);
   }
   render(){
     const scaleFooter = <Footer print={true}
                                 footText="确定"
                                 handlePrint={this.onPrint}
                                 handleConfirm={this.closeTable}/>;
-    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide} = this.props;
+    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide,slideUp} = this.props;
     return <div className={style["tips"]} style={{marginBottom:'15px'}}>
               <div className={`${style["tips-title"]} ${style["chronic"]}`}>
                 <div className={style["tips-name"]}>
@@ -496,15 +512,18 @@ class ChronicInfo extends React.Component{
                   <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}</h2>
                   <span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span>
                 </div>
-                <div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'block':'none'}}>
+                <div className={style['toggle-btn']}>
+                  <img src={slideUp?down:up} alt="展开/收起" onClick={this.slideToggle}/>
+                </div>
+                {/*<div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'block':'none'}}>
                   <span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.name||chronicMagItem&&chronicMagItem.name)}>量表
                   </span>
-                </div>
+                </div>*/}
               </div>
-              <div className={style["content"]}> 
+              <div className={style["content"]} ref={this.$content}>
                   {this.getDetail()}
               </div>
-              <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
+              {/*<ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
                       <ul className={style['toast-cont']}>
                         {tableList&&tableList.map((v,i)=>{
                           return <li>
@@ -518,7 +537,7 @@ class ChronicInfo extends React.Component{
                           </li>
                         })}
                       </ul>
-              </ConfirmModal>
+              </ConfirmModal>*/}
               {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
                       title={showHide.name}
                       icon={tableIcon}

+ 18 - 5
src/components/ChronicInfo/index.less

@@ -9,14 +9,14 @@
     background: #EAF7FA;
     font-weight: bold;
     background: rgba(242,150,91,0.1);
-    img {
-      float:left;
-      margin-top: 0px;
-      margin-right: 5px;
-    }
     .tips-name{
       width: 238px;
       display: inline-block;
+      img {
+        float:left;
+        margin-top: 0px;
+        margin-right: 5px;
+      }
     }
     h2{
       display: inline-block;
@@ -46,9 +46,18 @@
       margin: 0 0 -2px 10px;
       }
     }
+    .toggle-btn{
+      display: inline-block;
+      float: right;
+      cursor: pointer;
+    }
     .content{
       font-size: 14px;
       padding:6px 15px;
+      transition:display 2s;
+      -moz-transition:display 2s; /* Firefox 4 */
+      -webkit-transition:display 2s; /* Safari and Chrome */
+      -o-transition:display 2s; /* Opera */
       .list{
         border-bottom: 1px solid #EAEDF1;
         padding-bottom: 10px;
@@ -99,6 +108,10 @@
         border-bottom:none;
       }
     }
+
+  .slide{
+    display: none;
+  }
   }
   .toast-title{
     position: absolute;

+ 2 - 1
src/components/CopyRight/index.jsx

@@ -48,9 +48,10 @@ class CopyRight extends Component {
     const { disContent } = this.props.copyRight;
     // const disclatmer = disContent.data.data[2].description
     if(disContent.data) {
+      const disclatmerContent = disContent.data.data.find(item => item.title == '免责申明')
       return (
         <div className={style['message']}>
-          <div dangerouslySetInnerHTML={{__html: disContent.data.data[2].description}}></div>
+          <div dangerouslySetInnerHTML={{__html: disclatmerContent.description}}></div>
         </div>
       );
     }

+ 7 - 4
src/components/DiagnosticList/index.jsx

@@ -34,7 +34,8 @@ class DiagnosticList extends Component {
             isAssessConfirm:false,
             radioVal:{},  //可能结果选择内容
             possible:{},  //可能结果
-            hasOndel: false
+            hasOndel: false,
+            hasOnIndex: -1
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -237,19 +238,21 @@ class DiagnosticList extends Component {
           })
       }
     }
-    handleEnterDel() {
+    handleEnterDel(index) {
       this.setState({
+        hasOnIndex: index,
         hasOndel: true
       })
     }
     handleLeaveDel() {
       this.setState({
+        hasOnIndex: -1,
         hasOndel: false
       })
     }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading} = this.props;
-        const { visible, treatTitle ,showAssess, isAssessConfirm, radioVal, possible,assessId,disName, hasOndel} = this.state;
+        const { visible, treatTitle ,showAssess, isAssessConfirm, radioVal, possible,assessId,disName, hasOndel, hasOnIndex} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         const chronicLine = chronicMagItem&&chronicMagItem.name;     //当前是否走的慢病流程
         let isChronic = false;      //是否要显示管理评估
@@ -278,7 +281,7 @@ class DiagnosticList extends Component {
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
                                     </span>:''}
-                                    <img className={style['diag-del']} src={hasOndel ? del_on : del_icon} onMouseEnter={this.handleEnterDel.bind(this)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
+                                    <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)}}/>
                         </div>)
                     })}
                      {treatment&&<Treat title={treatTitle}></Treat>}

+ 82 - 0
src/components/MedicalInfo/index.jsx

@@ -0,0 +1,82 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import delIcon from '@common/images/del_nor.png';
+import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+
+class MedicalInfo extends Component {
+    constructor(props) {
+        super(props);
+        this.$inp = React.createRef();
+        this.$cont = React.createRef();
+        this.state={
+          val:''
+        };
+        this.search = this.search.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+        this.clear = this.clear.bind(this);
+    }
+    getSearchList() {
+        const { getAllConceptDetail,searchResult } = this.props;
+        return searchResult && searchResult.map((item) => {
+                return <li key={item.conceptId} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>
+                            <span>{item.name}</span>
+                            <i>( {item.libTypeName} )</i>
+                            <button>查看</button>
+                        </li>;
+            });
+    }
+    search(){
+      const {handleChangeValue} = this.props;
+      const val = this.$inp.current.value;
+      handleChangeValue&&handleChangeValue(val);
+    }
+  handleChange(){
+      this.setState({
+        val:this.$inp.current.value
+      });
+  }
+  clear(){
+    this.$inp.current.value = '';
+    this.setState({
+      val:''
+    });
+  }
+  componentDidMount(){
+    const height = getWindowInnerHeight()-170;
+    this.$cont.current.style.height = height+"px";
+    if(this.$cont.current){
+      windowEventHandler('resize', ()=>{
+        const height = getWindowInnerHeight()-170;
+        this.$cont.current.style.height = height+"px";
+      });
+    }
+  }
+    render() {
+        const {searchResult} = this.props;
+        const {val} = this.state;
+        return (
+        <div className={style['mefical-info-wrapper']} ref={this.$cont}>
+            <div className={style['search-cont']}>
+                <p className={style['title']}>医学知识搜索</p>
+                <p className={style['cont']}>
+                  <input type="text" className={style['input']} ref={this.$inp} onChange={this.handleChange}/>
+                  {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                  <button onClick={this.search}>搜索</button>
+                </p>
+              {searchResult&&searchResult.length>0?<div className={style['result']}>
+                    <p className={style['title']}>查询内容</p>
+                    <ul>
+                      {this.getSearchList()}
+                    </ul>
+              </div>:<p className={style['no-data']}>暂无搜索结果!</p>}
+             </div>
+        </div>
+        
+        )
+
+        
+        
+    }
+}
+
+export default MedicalInfo;

+ 78 - 0
src/components/MedicalInfo/index.less

@@ -0,0 +1,78 @@
+@import "~@less/variables.less";
+.mefical-info-wrapper {
+    padding: 0px 15px;
+    line-height: 20px; 
+    width: @push-width;
+    overflow: hidden;
+    position: relative;
+}
+.search-cont{
+    .cont{
+        position: relative;
+        img{
+            position: absolute;
+            width: 15px;
+            left: 266px;
+            top: 9px;
+            cursor: pointer;
+        }
+    }
+    .title{
+        font-size: 12px;
+        color:#979797;
+        margin-bottom: 10px;
+    }
+    .input{
+        display: inline-block;
+        width: 300px;
+        height: 34px;
+        padding: 5px;
+        border:1px #CECECE solid;
+        vertical-align: top
+    }
+    button{
+        display: inline-block;
+        width: 80px;
+        height: 34px;
+        line-height: 34px;
+        color: #fff;
+        background: #2A9BD5;
+        border:1px #2A9BD5 solid;
+        text-align: center;
+        border: none;
+    }
+    .result{
+        margin-top: 15px;
+        li{
+            border-bottom:1px #CECECE solid;
+            line-height: 42px;
+            span{
+                font-size: 14px;
+                color: #000;
+            }
+            i{
+                font-size: 12px;
+                color: #2A9BD5;
+            }
+            button{
+                float: right;
+                border:1px #2A9BD5 solid;
+                text-align: center;
+                width: 56px;
+                height: 26px;
+                line-height: 26px;
+                color: #2A9BD5;
+                border-radius: 3px;
+                background: none;
+                margin-top: 8px;
+                outline: none;
+            }
+        }
+    }
+    .no-data{
+        width: 380px;
+        color:#979797;
+        text-align: center;
+        line-height: 40px;
+    }
+}

+ 11 - 2
src/components/PushContainer/index.jsx

@@ -12,6 +12,7 @@ import TemplateItems from '@components/TemplateItems';
 import PushItemsContainer from '@containers/PushItemsContainer';
 import { pushAllDataList,getWindowInnerHeight } from '@utils/tools';
 import CopyRightContainer from "@containers/CopyRightContainer";
+import MedicalInfoContainer from '@containers/MedicalInfoContainer'
 class PushContainer extends Component {
     constructor(props) {
         super(props);
@@ -22,7 +23,14 @@ class PushContainer extends Component {
                 disabled: true
             }, {
                 title: '模板',
-            }],
+            },
+            {
+                title: '医学知识',
+            },
+              /*{
+                title: '全部量表',
+              }*/
+            ],
             visible:false,
             message:'',                 //提示的内容
             type:'',                    //1:删除模板 2:批量删除   3.修改标题   4.引用  
@@ -238,7 +246,7 @@ class PushContainer extends Component {
                 handleActiveClick={this.handleActiveClick}
             >
                 <TemplateContainer activeId={activeId}>
-                  <PushItemsContainer></PushItemsContainer>
+                    <PushItemsContainer></PushItemsContainer>
                     <TemplateItems
                         items={items}
                         checkItems={checkItems}
@@ -250,6 +258,7 @@ class PushContainer extends Component {
                         handleMangerTemplate={this.handleMangerTemplate}
                         handleAllCheckbox={this.handleAllCheckbox}
                     ></TemplateItems>
+                    <MedicalInfoContainer></MedicalInfoContainer>
                 </TemplateContainer>
             </Tab>
             <ConfirmModal 

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

@@ -58,7 +58,7 @@ class DetailsModal extends Component {
 
                 <div className={styles['details-wrapper']}>
                     <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>
+                        <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && tipsDetails.name} <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.details && tipsDetails.details.map((item, index) => {
                                 return (<div id={item.title}>

+ 84 - 0
src/components/PushItems/RecommendInspect/index.jsx

@@ -0,0 +1,84 @@
+import React, {Component} from 'react';
+import style from './index.less'
+import showImg from "@common/images/show.png";
+import hideImg from "@common/images/close.png";
+
+
+class RecommendInspect extends Component {
+    constructor(props) {
+        super(props)
+        this.state = {
+            showAll: false,
+        }
+        this.renderItem = this.renderItem.bind(this)
+    }
+    changeShowFlag() {
+      this.setState({
+        showAll: !this.state.showAll
+      })
+    }
+    
+    renderItem(item) {
+      const { changeFlag } = this.props
+      return <span>
+          <input
+            id={item.id + item.name}
+            onChange={() =>changeFlag(item)}
+            type="checkbox"
+            checked={item.checked}
+          />
+          <label for={item.id + item.name}>{item.name}</label>
+      </span>
+    }
+
+    render() {
+      const { title,list, changeFlag, border } = this.props
+      const { showAll } = this.state
+      const listAll = list.map(item => {
+          return this.renderItem(item)
+      });
+      let firstLineNum = 0;   //第一行字数
+      let secondLineNum = 0;      //第二行字数
+      const listHide = list.map((item, index) => {
+        firstLineNum = firstLineNum + item.name.length + 2;
+        if (firstLineNum > 26) {
+          secondLineNum = secondLineNum + item.name.length + 2; 
+          if(secondLineNum > 20) {
+            return;
+          } else {
+            return this.renderItem(item)
+          }
+        } else {
+
+          return this.renderItem(item)
+        }
+      });
+
+      return   (
+            <li className={style["inspectItem"]} style={border ? {"borderBottom": "1px solid #DFDFDF"} : ''}>
+              <div className={style["title"]}>{title}:</div>
+              <div className={style["content"]}>
+                {list.length === 0
+                  ?<span >无</span>
+                  : showAll
+                  ? listAll
+                  : listHide}
+                {secondLineNum > 21 ? (
+                  <span
+                    style={{ display: "inline-block" }}
+                    className={style["show"]}
+                    onClick={this.changeShowFlag.bind(this)}
+                  >
+                    {showAll ? '收起' : '更多'}
+                    <img src={showAll ? hideImg : showImg} />
+                  </span>
+                ) : (
+                  ""
+                )}
+              </div>
+            </li>
+        )
+    }
+}
+
+export default RecommendInspect;

+ 56 - 0
src/components/PushItems/RecommendInspect/index.less

@@ -0,0 +1,56 @@
+@import "~@less/variables.less";
+
+    
+        
+        .inspectItem{
+          padding: 10px 0px 4px 0px;
+          overflow: hidden;
+          .title{
+            float: left;
+            height: 26px;
+            line-height: 26px;
+            padding: 0px 0px 0px 0px ;
+          }
+          .content{
+            float: left;
+            width: 349px;
+            line-height: 26px;
+            padding: 0px 0px 0px 0px;
+            span{
+              font-size: 14px;
+              line-height: 14px;
+              display: inline-block;
+              margin: 6px;
+              cursor: pointer;
+              input[type='checkbox']{
+                float: left;
+                width: 14px;
+                height: 14px;
+                margin-right: 2px;
+                background-color: #fff;
+                -webkit-appearance:none;
+                border: 1px solid #c9c9c9;
+                border-radius: 2px;
+                outline: none;
+                cursor: pointer;
+              }
+              input[type=checkbox]:checked{
+                background: url("../../../common/images/checked.png")no-repeat center;
+                background-size: 12px 12px;
+              }
+              label {
+                cursor: pointer;
+              }
+            }
+          }
+        }
+        .show {
+            float: right;
+            color:  #58ACD7;;
+            font-size: 14px;
+            cursor: pointer;
+            img {
+              width: 12px;
+              height: 12px;
+            }
+          }

+ 61 - 0
src/components/PushItems/TipsMsg/index.jsx

@@ -0,0 +1,61 @@
+import React, { Component } from 'react';
+import style from './index.less';
+
+class TipsMsg extends Component {
+    constructor(props) {
+        super(props)
+    }
+
+    render() {
+        const { tips, showTips, tipsDiscalimer, tipsImg, tmpFlg} = this.props
+        return <div className={style["tips"]}>
+        <h1>
+          <img src={tipsImg} />
+          提示信息
+        </h1>
+        <div className={style["content"]}>
+          {tips && tips.details ? (
+            <div>
+              <div className={style["title"]}>
+                {tips.name}
+                <span
+                  className={style["tips-details"]}
+                  onClick={() => showTips()}
+                  style={{display:tmpFlg?'none':'inline-block'}}
+                >
+                  详情
+                </span>
+              </div>
+              {tips.details &&
+                tips.details.map((item, index) => {
+                  return (
+                      <div>
+                        <div
+                          dangerouslySetInnerHTML={{
+                            __html: item.title
+                          }}
+                        />
+                        <div
+                          dangerouslySetInnerHTML={{
+                            __html: item.content
+                          }}
+                        />
+                        {item.isReason === 1 && (
+                          <div className={style["warn"]}>
+                            {tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.title == '诊断免责信息')&&tipsDiscalimer.data.data.find(item => item.title == '诊断免责信息').description}
+                          </div>
+                        )}
+                      </div>
+                  );
+                })}
+            </div>
+          ) : (
+            "无"
+          )}
+        </div>
+    </div>
+    }
+}
+
+export default TipsMsg;
+

+ 118 - 0
src/components/PushItems/TipsMsg/index.less

@@ -0,0 +1,118 @@
+@import "~@less/variables.less";
+.tips{
+    border:1px solid #EAEDF1;
+    .tips-title,h1{
+      font-size: 14px;
+      color: #000;
+      padding: 8px 15px;
+      background: #EAF7FA;
+      font-weight: bold;
+      img {
+        float:left;
+        margin-top: 0px;
+        margin-right: 5px;
+      }
+    }
+    .tips-title{
+      .tips-name{
+        width: 255px;
+        display: inline-block;
+      }
+      h2{
+        display: inline-block;
+      }
+      .tips-btn{
+        display: inline-block;
+        float: right;
+      }
+      .redTips{
+        display: inline-block;
+        font-size: 12px;
+        -webkit-transform:scale(0.9);
+        color: red;
+        font-weight: normal;
+        white-space: nowrap;
+      }
+      .tipsDetails {
+        .btnCom;
+        display: inline-block;
+        font-weight: normal;
+        width: 42px;
+        height: 20px;
+        border: 1px solid #262626;
+        font-size: 12px;
+        // color: #3B9ED0;
+        color: #262626;
+        line-height: 18px;
+        margin: 0 0 -2px 10px;
+      }
+    }
+    .chronic{
+      background: rgba(242,150,91,0.1);
+    }
+    .content{
+      font-size: 14px;
+      padding:6px 15px;
+      .title {
+        font-size: 14px;
+        line-height: 18px;
+        margin-bottom:10px;
+        a{
+          .btnCom;
+          display: inline-block;
+          font-size: 14px;
+          color: #3B9ED0;
+          width: 42px;
+          border: 1px solid #3B9ED0;
+          margin-left: 10px;
+          text-decoration: none;
+        }
+        .tips-details {
+          .btnCom;
+          display: inline-block;
+          width: 42px;
+          height: 20px;
+          border: 1px solid #3B9ED0;
+          font-size: 14px;
+          color: #3B9ED0;
+          line-height: 18px;
+          margin: 0 10px -2px;
+        }
+      }
+      .warn{
+        padding: 10px 0px 0px 0px;
+        font-size: 10px;
+        color: #979797;
+        text-align: center;
+      }
+      .list{
+        border-bottom: 1px solid #EAEDF1;
+        padding-bottom: 10px;
+        position: relative;
+        .infoPic{
+          vertical-align: middle;
+          margin: 0 5px;
+        }
+        >p{
+          margin-top: 10px;
+        }
+        .listName{
+          color:#3B9ED0;
+        }
+        .listResult{
+          float: right;
+          color: #000012;
+          i{
+            color: #F98F24;
+          }
+          img{
+            vertical-align: middle;
+          }
+        }
+      }
+      
+      .list:last-child{
+        border-bottom:none;
+      }
+    }
+  }

+ 29 - 238
src/components/PushItems/index.jsx

@@ -16,6 +16,8 @@ import {addAssistLabel} from '@store/actions/assistCheck';
 import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
 import {ConfirmModal} from '@commonComp';
 import ChronicInfo from '@containers/ChronicInfo';//慢病推送模块
+import RecommendInspect from './RecommendInspect';
+import TipsMsg from './TipsMsg'
 
 class PushItems extends Component {
   constructor(props) {
@@ -116,9 +118,9 @@ class PushItems extends Component {
     this.props.changeCheck(item);
   }
 
-  showTips(tips) {
-    const { getTipsDetails, showTipsDetailsModal } = this.props;
-    getTipsDetails && getTipsDetails();
+  showTips() {
+    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;
+    getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:2}); 
     showTipsDetailsModal && showTipsDetailsModal()
   }
   hideTips() {
@@ -150,119 +152,12 @@ class PushItems extends Component {
       tmpFlg,
     } = this.props.pushMessage;
     const { tipsDiscalimer,chronicPushItems,wholeIndexs} = this.props;
-    const { moreAssay, moreCheck ,show} = this.state;
     const {
-      showMore,
-      closeMore,
       billing,
       changeCheck,
       changeAssay,
       showTips
     } = this;
-    let assayNum = 0;
-    let assayNum2 = 0; 
-    let assayHide = assay.map((item, index) => {
-      assayNum = assayNum + item.name.length + 2;
-      if (assayNum > 26) {
-        assayNum2 = assayNum2 + item.name.length + 2; 
-        if(assayNum2 > 20) {
-          return;
-        } else {
-          return (
-            <span>
-              
-              <input
-                id={item.id + item.name}
-                onChange={() => changeAssay(item)}
-                type="checkbox"
-                checked={item.checked}
-              />
-              <label for={item.id + item.name}>{item.name}</label>
-            </span>
-          );
-        }
-      } else {
-        return (
-          <span>
-            
-            <input
-              id={item.id + item.name}
-              onChange={() => changeAssay(item)}
-              type="checkbox"
-              checked={item.checked}
-            />
-            <label for={item.id + item.name}>{item.name}</label>
-          </span>
-        );
-      }
-    });
-
-    const assays = assay.map(item => {
-      return (
-        <span>
-          <input
-            id={item.id + item.name}
-            onChange={() => changeAssay(item)}
-            type="checkbox"
-            checked={item.checked}
-          />
-          <label for={item.id + item.name}>{item.name}</label>
-        </span>
-      );
-    });
-
-    let checkNum = 0;
-    let checkNum2 = 0;
-    let checkHide = check.map((item, index) => {
-      checkNum = checkNum + item.name.length + 2;
-      if (checkNum > 26) {
-        checkNum2 = checkNum2 + item.name.length + 2; 
-        if(checkNum2 > 20) {
-          return;
-        }else {
-          return (
-            <span>
-              <input
-                id={item.id + item.name}
-                onChange={() => changeCheck(item)}
-                type="checkbox"
-                checked={item.checked}
-              />
-              <label for={item.id + item.name}>{item.name}</label>
-            </span>
-          );
-        }
-
-
-        
-      } else {
-        return (
-          <span>
-            <input
-              id={item.id + item.name}
-              onChange={() => changeCheck(item)}
-              type="checkbox"
-              checked={item.checked}
-            />
-            <label for={item.id + item.name}>{item.name}</label>
-          </span>
-        );
-      }
-    });
-
-    const checks = check.map(item => {
-      return (
-        <span>
-          <input
-            id={item.id + item.name}
-            onChange={() => changeCheck(item)}
-            type="checkbox"
-            checked={item.checked}
-          />
-          <label for={item.id + item.name}>{item.name}</label>
-        </span>
-      );
-    });
 
     const vigilants = vigilant.map((item, index) => {
       return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>;
@@ -326,142 +221,38 @@ class PushItems extends Component {
                     开单
                 </div>
               </h1>
-              <div>
+              <div  className={style["contentBox"]}>
                 {assay.length === 0 && check.length === 0 ? (
                   <span>无</span>
-                ) : (
-                  <ul>
-                    <li className={style["firstLi"]}>
-                      <div className={style["title"]}>化验:</div>
-                      <div className={style["content"]}>
-                        {assay.length === 0
-                          ?<span >无</span>
-                          : moreAssay
-                          ? assays
-                          : assayHide}
-                        {assayNum2 > 21 ? (
-                          <span
-                            style={
-                              moreAssay
-                                ? { display: "none" }
-                                : { display: "inline-block" }
-                            }
-                            className={style["show"]}
-                            onClick={() => showMore("moreAssay")}
-                          >
-                            更多
-                            <img src={showImg} />
-                          </span>
-                        ) : (
-                          ""
-                        )}
-                        <span
-                          style={
-                            moreAssay
-                              ? { display: "inline-block" }
-                              : { display: "none" }
-                          }
-                          className={style["close"]}
-                          onClick={() => closeMore("moreAssay")}
-                        >
-                          收起
-                          <img src={hideImg} />
-                        </span>
-                      </div>
-                    </li>
-                    <li className={style["lastLi"]}>
-                      <div className={style["title"]}>检查:</div>
-                      <div className={style["content"]}>
-                        {check.length === 0
-                          ? "无"
-                          : moreCheck
-                          ? checks
-                          : checkHide}
-                        {checkNum2 > 21 ? (
-                          <span
-                            style={
-                              moreCheck
-                                ? { display: "none" }
-                                : { display: "inline-block" }
-                            }
-                            className={style["show"]}
-                            onClick={() => showMore("moreCheck")}
-                          >
-                            更多
-                            <img src={showImg} />
-                          </span>
-                        ) : (
-                          ""
-                        )}
-                        <span
-                          style={
-                            moreCheck
-                              ? { display: "inline-block" }
-                              : { display: "none" }
-                          }
-                          className={style["close"]}
-                          onClick={() => closeMore("moreCheck")}
-                        >
-                          收起
-                          <img src={hideImg} />
-                        </span>
-                      </div>
-                    </li>
-                  </ul>
-                )}
+                ) : (<ul>
+                     <RecommendInspect
+                      title = '化验'
+                      list = {assay}
+                      changeFlag = {changeAssay}
+                      border = "true"
+                    >
+                    </RecommendInspect>
+                    <RecommendInspect
+                      title = '检查'
+                      list = {check}
+                      changeFlag = {changeCheck}
+                    >
+                    </RecommendInspect>
+                  </ul>)}
               </div>
             </div>
             {/*{chronicPushItems&&chronicPushItems.length>0?<ChronicInfo data={chronicPushItems}></ChronicInfo>:''}*/}
             {<ChronicInfo></ChronicInfo>}
-            <div className={style["tips"]}>
-              <h1>
-                <img src={tipsImg} />
-                提示信息
-              </h1>
-              <div className={style["content"]}>
-                {tips && tips.details ? (
-                  <div>
-                    <div className={style["title"]}>
-                      {tips.name}
-                      <span
-                        className={style["tips-details"]}
-                        onClick={() => showTips(tips)}
-                        style={{display:tmpFlg?'none':'inline-block'}}
-                      >
-                        详情
-                      </span>
-                    </div>
-                    {tips.details &&
-                      tips.details.map((item, index) => {
-                        return (
-                            <div>
-                              <div
-                                dangerouslySetInnerHTML={{
-                                  __html: item.title
-                                }}
-                              />
-                              <div
-                                dangerouslySetInnerHTML={{
-                                  __html: item.content
-                                }}
-                              />
-                              {item.isReason === 1 && (
-                                <div className={style["warn"]}>
-                                  {tipsDiscalimer.data.data[0]&&tipsDiscalimer.data.data[0].description}
-                                </div>
-                              )}
-                            </div>
-                        );
-                      })}
-                  </div>
-                ) : (
-                  "无"
-                )}
-              </div>
-            </div>
+            <TipsMsg
+             tmpFlg = {tmpFlg}
+             tipsImg = {tipsImg}
+              tips = {tips}
+              showTips = {showTips}
+              tipsDiscalimer = {tipsDiscalimer}
+            ></TipsMsg>
           </div>
         </div>
-        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1]&&tipsDiscalimer.data.data[1].description}}></div>}
+        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.title == '推送免责信息')&&tipsDiscalimer.data.data.find(item => item.title == '推送免责信息').description}}></div>}
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}

+ 1 - 51
src/components/PushItems/index.less

@@ -122,59 +122,9 @@
         font-size: 12px;
       }
     }
-    div{
+    .contentBox {
       font-size: 14px;
       padding:6px 0px 6px 15px;
-      ul{
-        .firstLi{
-          border-bottom: 1px solid #DFDFDF;
-        }
-        .lastLi{
-          padding-bottom: 0px;
-        }
-        li{
-          padding: 10px 0px 4px 0px;
-          overflow: hidden;
-          .title{
-            float: left;
-            height: 26px;
-            line-height: 26px;
-            padding: 0px 0px 0px 0px;
-          }
-          .content{
-            float: left;
-            width: 349px;
-            line-height: 26px;
-            padding: 0px 0px 0px 0px;
-            span{
-              font-size: 14px;
-              line-height: 14px;
-              display: inline-block;
-              margin: 6px;
-              cursor: pointer;
-              input[type='checkbox']{
-                float: left;
-                width: 14px;
-                height: 14px;
-                margin-right: 2px;
-                background-color: #fff;
-                -webkit-appearance:none;
-                border: 1px solid #c9c9c9;
-                border-radius: 2px;
-                outline: none;
-                cursor: pointer;
-              }
-              input[type=checkbox]:checked{
-                background: url("../../common/images/checked.png")no-repeat center;
-                background-size: 12px 12px;
-              }
-              label {
-                cursor: pointer;
-              }
-            }
-          }
-        }
-      }
     }
   }
   .tips{

+ 1 - 0
src/config/index.js

@@ -33,4 +33,5 @@ export default {
     showCheckNum:16,        //查体默认展开非自由文本标签的个数
     radioOptionPer:'()',     //单选项输入占位符
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字
+    slideTime:400,      //右侧指标推送展开/收起动画时间
 };

+ 0 - 36
src/containers/BodyContainer.js

@@ -1,36 +0,0 @@
-import React from 'react';
-import {connect} from 'react-redux';
-import EMRContainer from '@components/EMRContainer';
-import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
-import {initPersonInfo} from '@store/async-actions/getInfoByUuid';
-import {initHistoryDetails} from '@store/async-actions/patInfo';
-import {getAllDataList} from '@utils/tools';
-import store from '@store';
-
-function mapStateToProps(state) {
-    return {
-        
-    }
-}
-
-function mapDispatchToProps(dispatch,getStore) { 
-    return {
-        /*initHospital(){
-            dispatch(initPersonInfo())
-        },*/
-        saveDataAll(val){
-            dispatch(saveTemplateDetail(val))
-        },
-        isVisible(bool){
-            dispatch(changeVisible(bool))
-        },
-        initHistoryLastest(){
-            dispatch(initHistoryDetails())
-        }
-    }
-}
-
-
-const SaveDataAll = connect(mapStateToProps, mapDispatchToProps)(EMRContainer);
-
-export default SaveDataAll;

+ 8 - 1
src/containers/ChronicInfo.js

@@ -1,6 +1,6 @@
 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 {SHOW_TABLE_LIST,HIDE_TABLE_LIST, SET_CHRONIC_PUSHS,TOGGLE_CHRONIC_INFO} from '@store/types/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";
@@ -28,11 +28,18 @@ function mapStateToProps(state){
     calcuValues:assessResult.calcuValues,      //计算公式填的值
     wholeScaleItems:assessResult.wholeScaleItems,     //全部量表中已加入病例的量表
     addedScaleIds:assessResult.addedScaleIds,      //已加入的量表id
+    slideUp:pushMessage.slideUp,    //是否收起指标推送模块
   }
 }
 
 function mapDispatchToProps(dispatch){
   return {
+    toggleSlide(flag){
+      dispatch({
+        type:TOGGLE_CHRONIC_INFO,
+        flag
+      });
+    },
     getTableList(name){
       dispatch(getTableList(name))
       // dispatch({type:SHOW_TABLE_LIST})

+ 28 - 0
src/containers/MedicalInfoContainer.js

@@ -0,0 +1,28 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { getSearchList } from '@store/async-actions/medicalInfo';
+import MedicalInfo from '@components/MedicalInfo';
+import {getAllConceptDetail} from '../store/async-actions/pushMessage';
+
+function mapStateToProps(state) {
+    return{
+        searchResult: state.medicalInfo.searchResult,
+    }
+}
+
+function mapDispatchToProps(dispatch) {
+    return {
+        handleChangeValue(val){
+            dispatch(getSearchList(val))
+        },
+        getAllConceptDetail(item) {
+            dispatch(getAllConceptDetail(item))
+        }
+    }
+}
+const MedicalInfoContainer = connect(
+    mapStateToProps,
+    mapDispatchToProps
+)(MedicalInfo);
+
+export default MedicalInfoContainer

+ 3 - 3
src/containers/PushItemsContainer.js

@@ -12,7 +12,7 @@ function mapStateToProps(state) {
         pushMessage: pushMessage,
         tipsDiscalimer:  state.copyRight.disContent,
         chronicMagItem: diagnosticList.chronicMagItem,
-        questionId: diagnosticList.clickDiag,
+        clickDiag: diagnosticList.clickDiag,
         tableList: pushMessage.tableList,
         showList: pushMessage.showList,
         //chronicPushItems: pushMessage.chronicPushItems,
@@ -46,8 +46,8 @@ function mapDispatchToProps(dispatch) {
                 check: checkedCheck,
             })
         },
-        getTipsDetails: () => {
-            dispatch(getAllConceptDetail())
+        getTipsDetails: (item) => {
+            dispatch(getAllConceptDetail(item))
         },
         showTipsDetailsModal: () => {
             dispatch({

+ 17 - 0
src/store/actions/medicalInfo.js

@@ -0,0 +1,17 @@
+export const showSearch = (state,action) => {
+    const res = Object.assign({}, state);
+    res.show = true;
+    return res;
+}
+
+export const setSearchValue = (state,action) => {
+    const res = Object.assign({},state);
+    res.searchValue = action.searchValue;
+    return res;
+}
+
+export const getSearchResult= (state, action) => {
+    const res = Object.assign({},state);
+    res.searchResult = action.searchResult;
+    return res;
+}

+ 0 - 20
src/store/async-actions/getInfoByUuid.js

@@ -1,20 +0,0 @@
-
-import axios from '@utils/ajax'
-import Notify from '@commonComp/Notify';
-import { getInfos } from '@store/actions/getInfoByUuid';
-import { getUrlArgObject } from '@utils/tools';
-
-export const initPersonInfo = () => {        //初始化数据
-    return (dispatch) => {
-        axios.json('/tranFieldInfo/getInfoByUuid',{
-            "uuid":getUrlArgObject('hospitalId'),
-        }).then((res)=>{
-            const data =res.data;
-            if(data.code == 0){
-                dispatch(getInfos(data.data));
-            }else{
-                console.log(res)
-            }
-        })
-    }
-};

+ 28 - 0
src/store/async-actions/medicalInfo.js

@@ -0,0 +1,28 @@
+import { json } from "@utils/ajax";
+import { GET_SEARCH_RESULT } from '@store/types/medicalInfo';
+
+
+export const getSearchList = (val) => {
+    if(val.trim() == ''){
+        const data = [];
+        return (dispatch) =>  dispatch({
+            type: GET_SEARCH_RESULT,
+            searchResult: []
+        })
+    }
+   
+    return (dispatch, getState) => {
+        json('/retrieval/getStaticKnowledge',{
+            inputStr:val,
+            inputIds:[]
+        })
+        .then((res)=>{
+            const data = res.data.data;
+            dispatch({
+                type: GET_SEARCH_RESULT,
+                searchResult: data
+            })
+        })
+    }
+};
+

+ 25 - 17
src/store/async-actions/pushMessage.js

@@ -1,15 +1,13 @@
 import { get, post, json } from "@utils/ajax";
-import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,SHOW_TABLE_LIST} from '@store/types/pushMessage';
+import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,SHOW_TABLE_LIST, SHOW_TIPS_DETAILS,TOGGLE_CHRONIC_INFO} from '@store/types/pushMessage';
 import { SET_DRUG_INFO, SHOW_DRUG_INFO } from '@store/types/treat';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
 import {storageLocal,getEMRParams} from '@utils/tools';
 import {SET_IMPORT_CHECKBODY_LABEL,PRESET} from "../types/checkBody";
 import { Notify} from '@commonComp';
 import {pregetCheckbodyData} from '@store/async-actions/fetchModules';
-
 const api={
   push:'/push/pushInner',
-  textPush:'/push/pushText',
   getTableList:'/scale/getList', //获取量表列表
   getTableInfo:'/scale/getContent', //获取量表明细
   getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
@@ -20,9 +18,6 @@ export const billing = (mdata,boxMark) => {
  return (dispatch, getState) =>{
   const state = getState();
   let url = api.push;
-  if(+state.typeConfig.typeConfig===1){
-    url=api.textPush;
-  }
    const checkBody = state.checkBody.data;
    let getCheck = boxMark==2&&!(checkBody&&checkBody.length>0&&!checkBody[0].full);
   const emrData = getEMRParams();
@@ -36,7 +31,8 @@ export const billing = (mdata,boxMark) => {
     pacs: emrData.pacs,
     sex: emrData.sex,
     vital:emrData.vital,
-    symptom: mdata?(emrData.current + mdata):(emrData.current + emrData.main)
+    symptom: mdata?(emrData.current + mdata):(emrData.current + emrData.main),
+    hosCode: emrData.hosCode
   };
   let savePm = Object.assign({},params);
    delete savePm.featureType;
@@ -64,6 +60,11 @@ export const billing = (mdata,boxMark) => {
                 pacs[i].checked = false
             }
         }
+
+        dispatch({
+          type:TOGGLE_CHRONIC_INFO,
+          flag:false
+        });
         dispatch({
             type: BILLING_ADVICE,
             determine: determine || [],
@@ -110,10 +111,7 @@ export const billing = (mdata,boxMark) => {
 //获取提示信息(静态信息)
 export const getConceptDetail = (item) => {
     return(dispatch, getState) => {
-        dispatch({
-            type: SET_CLICK_DIAG,
-            clickDiag: item
-        })
+
         const params ={
             name: item.name,
             position: item.position,
@@ -123,6 +121,10 @@ export const getConceptDetail = (item) => {
         json(api.getConceptDetail, params).then((res) => {
             if(res.data.code == '0') {
                 if(item.position == '1') {  //右侧提示信息
+                    dispatch({
+                        type: SET_CLICK_DIAG,
+                        clickDiag: item
+                    })
                     if(item.type == '5' || item.type == '6') {
                         dispatch({
                             type: SET_TIPS,
@@ -133,7 +135,11 @@ export const getConceptDetail = (item) => {
                         dispatch({
                             type: SET_TIPS,
                             tips: res.data.data,
-                        })
+                        });
+                        dispatch({
+                          type:TOGGLE_CHRONIC_INFO,
+                          flag:true
+                        });
                     }
                     
                 } else if(item.position == '5' || item.position == '6'){    //药品或不良反应说明
@@ -155,18 +161,20 @@ export const getConceptDetail = (item) => {
     }
 }
 
-export const getAllConceptDetail = () => {
+export const getAllConceptDetail = (item) => {
     return(dispatch, getState) => {
         const state = getState();
-        const clickItem = state.diagnosticList.clickDiag
         const params = {
-            type: clickItem.type,
-            name: clickItem.name,
-            position:2
+            type: item.type,
+            name: item.name,
+            position:item.position
         }
         json(api.getConceptDetail, params)
         .then((res)=>{
             if(res.data.code == '0') {
+                dispatch({
+                    type: SHOW_TIPS_DETAILS
+                })
                 dispatch({
                     type: SET_TIPS_DETAILS,
                     tipsDetails: res.data.data

+ 4 - 2
src/store/index.js

@@ -27,6 +27,7 @@ import treat from './reducers/treat';
 import currentIll from './reducers/currentIll';
 import assessResult from './reducers/assessResult';
 import assessResultHis from './reducers/assessResultHis';
+import medicalInfo from './reducers/medicalInfo';
 
 
 const composeEnhancers =
@@ -59,8 +60,9 @@ const rootReducer = combineReducers({
     getInfoByUuid,
 	checkBody,
     currentIll,
-  assessResult,
-  assessResultHis
+    assessResult,
+    assessResultHis,
+    medicalInfo
 });
 
 export default createStore(rootReducer, enhancer);

+ 18 - 0
src/store/reducers/medicalInfo.js

@@ -0,0 +1,18 @@
+import { SET_SEARCH_VALUE, GET_SEARCH_RESULT } from '../types/medicalInfo'; 
+import { setSearchValue, getSearchResult } from '../actions/medicalInfo'; 
+
+const initState = {
+    searchValue: '',
+    searchResult: []
+}
+
+export default function (state=initState, action) {
+    switch(action.type) {
+        case SET_SEARCH_VALUE: 
+            return setSearchValue(state, action);
+        case GET_SEARCH_RESULT: 
+            return getSearchResult(state, action);
+        default: 
+            return state;
+    }
+}

+ 5 - 2
src/store/reducers/pushMessage.js

@@ -2,10 +2,10 @@ import {CHANGE_ASSAY, CHANGE_CHECK, BILLING_ADVICE, ADD_SCHEME, SET_TIPS,  SET_T
         SET_CHANGE_ADVICE_TREATMENT, SET_CHANGE_ADVICE_ASSAY, SET_CHANGE_ADVICE_CHECK, ADD_BILLING,
         CLEAR_ALL_PUSH_MESSAGE,SHOW_TIPS_DETAILS, HIDE_TIPS_DETAILS, SET_COMMONTREATMENT,
         SET_ADVICE_INPUT ,SET_CHRONIC_TABLELIST,SHOW_TABLE_LIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,
-        SAVE_TABLE_RESULT, SAVE_FOLLOW_UP, DEL_FOLLOW_UP,PRESET} from '../types/pushMessage';
+        SAVE_TABLE_RESULT, SAVE_FOLLOW_UP, DEL_FOLLOW_UP,TOGGLE_CHRONIC_INFO} from '../types/pushMessage';
 import {changeAssay, changeCheck, setAdvice, addScheme, setTips, setTipsDetails, setChangeAdviceTreatment, 
         setChangeAdviceAssay, setChangeAdviceCheck, addBilling, clearAllPushMessage, showTipsDetails, hideTipsDetails, 
-        setCommontreatment, isFirstMainDiag, setAdviceInput, saveFollowUp, delFollowUp } from '../actions/pushMessage';
+        setCommontreatment, setAdviceInput, saveFollowUp, delFollowUp } from '../actions/pushMessage';
 
 const initState = {
   vigilant: [],
@@ -76,6 +76,9 @@ export default function(state = initState, action) {
     case SAVE_TABLE_RESULT://量表计算结果-量表id
       res.formulaResult = Object.assign({},res.formulaResult,{[action.id]:action.data});
       return res;
+    case TOGGLE_CHRONIC_INFO:
+      res.slideUp = action.flag;
+      return res;
     default:
       return state;
   }

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

@@ -0,0 +1,2 @@
+export const SET_SEARCH_VALUE = 'SET_SEARCH_VALUE';
+export const GET_SEARCH_RESULT = 'GET_SEARCH_RESULT';

+ 3 - 2
src/store/types/pushMessage.js

@@ -20,7 +20,8 @@ export const SHOW_TABLE_LIST = 'SHOW_TABLE_LIST' ; //显示量表列表
 export const SET_CHRONIC_PUSHS ='SET_CHRONIC_PUSHS'; //右侧慢病量表评估推送模块数据
 export const SET_SCALE_INFO = 'SET_SCALE_INFO' ; //量表明细
 export const SAVE_TABLE_RESULT = 'SAVE_TABLE_RESULT' ; //量表计算结果
-export const SAVE_FOLLOW_UP = 'SAVE_FOLLOW_UP'  //保存回访时间
-export const DEL_FOLLOW_UP = 'DEL_FOLLOW_UP'  //保存回访时间
+export const SAVE_FOLLOW_UP = 'SAVE_FOLLOW_UP';  //保存回访时间
+export const DEL_FOLLOW_UP = 'DEL_FOLLOW_UP';  //保存回访时间
+export const TOGGLE_CHRONIC_INFO = 'TOGGLE_CHRONIC_INFO';   //收起展开指标推送模块
 
 

+ 1 - 17
src/utils/tools.js

@@ -142,23 +142,7 @@ const deepClone = (data)=>{
     return JSON.parse(JSON.stringify(data)||null)||{};
 };
 
-const getUrlArgObject = (parm) => {  
-    // let args=new Object();  
-    // let query=window.location.href;//获取查询串  
-    // console.log(query.split("?")[1].split("&"))
-    // let pairs,arr;
-    // if(query.indexOf("?") != -1){
-    //   pairs=query.split("?")[1].split("&");
-    //   for(let i=0;i<pairs.length;i++){  
-    //      let pos=pairs[i].indexOf('=');//查找name=value  
-    //      if(pos==-1){//如果没有找到就跳过  
-    //          continue;  
-    //      }  
-    //      let argname=pairs[i].substring(0,pos);//提取name  
-    //      let value=decodeURIComponent(pairs[i].substring(pos+1));//提取value  
-    //      args[argname]=unescape(value);//存为属性  
-    //  }  
-    // }
+const getUrlArgObject = (parm) => {
     let query = window.location.search;
     let args = qs.parse(query.substr(1));
     return args[parm];//返回对象