Bladeren bron

Merge branch 'optimize' into optimize-zxc

zhangxc 6 jaren geleden
bovenliggende
commit
fa4ed29ddf
67 gewijzigde bestanden met toevoegingen van 2528 en 302 verwijderingen
  1. 1 1
      src/common/components/Footer/index.jsx
  2. 2 1
      src/common/components/Footer/index.less
  3. 3 1
      src/common/components/MiniToast/index.less
  4. 1 1
      src/common/components/Textarea/index.jsx
  5. BIN
      src/common/images/likely.png
  6. 23 9
      src/components/AssessResult/ScaleItem/index.jsx
  7. 1 1
      src/components/AssessResult/index.jsx
  8. 1 1
      src/components/AssessResult/index.less
  9. 7 7
      src/components/AssistCheck/index.jsx
  10. 94 108
      src/components/ChronicInfo/index.jsx
  11. 1 1
      src/components/CurrentIll/index.jsx
  12. 1 1
      src/components/DiagnosticList/index.jsx
  13. 6 2
      src/components/Emergency/index.jsx
  14. 1 0
      src/components/Emergency/index.less
  15. 88 0
      src/components/EmergencyProcedure/EmergencyModal/index.jsx
  16. 105 0
      src/components/EmergencyProcedure/EmergencyModal/index.less
  17. 261 0
      src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx
  18. 575 0
      src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx
  19. 91 0
      src/components/EmergencyProcedure/EmergencyPart/index.jsx
  20. 260 0
      src/components/EmergencyProcedure/EmergencyPart/index.less
  21. 451 0
      src/components/EmergencyProcedure/emergency.js
  22. BIN
      src/components/EmergencyProcedure/img/back.png
  23. BIN
      src/components/EmergencyProcedure/img/down.png
  24. BIN
      src/components/EmergencyProcedure/img/jianb.png
  25. BIN
      src/components/EmergencyProcedure/img/left.png
  26. BIN
      src/components/EmergencyProcedure/img/pic.png
  27. BIN
      src/components/EmergencyProcedure/img/pic1.jpg
  28. BIN
      src/components/EmergencyProcedure/img/pic2.jpg
  29. BIN
      src/components/EmergencyProcedure/img/pic3.jpg
  30. BIN
      src/components/EmergencyProcedure/img/pic4.png
  31. BIN
      src/components/EmergencyProcedure/img/pic5.jpg
  32. BIN
      src/components/EmergencyProcedure/img/right.png
  33. BIN
      src/components/EmergencyProcedure/img/small.png
  34. 51 0
      src/components/EmergencyProcedure/index.jsx
  35. 54 0
      src/components/EmergencyProcedure/index.less
  36. 25 20
      src/components/Inspect/index.jsx
  37. 1 1
      src/components/Inspect/index.less
  38. 1 1
      src/components/NumberDrop/index.jsx
  39. 11 2
      src/components/PushItems/index.jsx
  40. 1 0
      src/components/RadioInpDrop/index.jsx
  41. 11 4
      src/components/ScaleSearch/index.jsx
  42. 159 24
      src/components/ScaleTable/index.jsx
  43. 11 2
      src/components/ScaleTable/index.less
  44. 13 13
      src/components/WrapModalBody/WrapModalTableSon/index.jsx
  45. 2 2
      src/components/WrapModalBodyPac/Item/index.jsx
  46. 9 9
      src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx
  47. 2 1
      src/containers/AssessResult.js
  48. 1 2
      src/containers/AssistCheck.js
  49. 2 2
      src/containers/ChronicInfo.js
  50. 1 1
      src/containers/Inspect.js
  51. 15 3
      src/containers/ScaleSearchContainer.js
  52. 2 1
      src/containers/ScaleTable.js
  53. 2 2
      src/containers/SpreadDrop.js
  54. 13 3
      src/modules/HomePage/index.jsx
  55. 15 10
      src/store/actions/checkBody.js
  56. 13 18
      src/store/actions/currentIll.js
  57. 15 1
      src/store/actions/patInfo.js
  58. 1 0
      src/store/actions/pushMessage.js
  59. 12 12
      src/store/async-actions/fetchModules.js
  60. 2 3
      src/store/async-actions/homePage.js
  61. 4 4
      src/store/async-actions/patInfo.js
  62. 4 1
      src/store/async-actions/pushMessage.js
  63. 4 4
      src/store/reducers/assessResult.js
  64. 0 1
      src/store/reducers/inspect.js
  65. 1 1
      src/store/reducers/pushMessage.js
  66. 2 1
      src/utils/drag.js
  67. 95 19
      src/utils/tools.js

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

@@ -14,7 +14,7 @@ const Footer = (props) => {
   const {footText,print,handlePrint,handleConfirm} = props;
   return <div className={style['footer']}>
     {print?<span className={style['print']} onClick={handlePrint}><img src={printIcon} alt=""/>打印</span>:''}
-        <span className={style['okBtn']} onClick={handleConfirm}>{footText}</span>
+    {handleConfirm?<span className={style['okBtn']} onClick={handleConfirm}>{footText}</span>:''}
   </div>;
 }
 

+ 2 - 1
src/common/components/Footer/index.less

@@ -18,7 +18,8 @@
       }
       .okBtn{
         .btnCom;
-        width: 80px;
+        /*width: 80px;*/
+        padding: 0 10px;
         height: 34px;
         line-height: 32px;
         border: 1px solid #3B9ED0;

+ 3 - 1
src/common/components/MiniToast/index.less

@@ -7,6 +7,7 @@
   border: 1px solid #EAEDF1;
   /*box-shadow: 0 5px 10px 0 rgba(0,0,0,0.10);*/
   box-shadow: 0 10px 20px 0 #989DA3;
+  margin-bottom: 20px;
   .infoTitle{
     height: 40px;
     line-height: 40px;
@@ -32,7 +33,8 @@
     span{
       color:#3B9ED0;
       display: inline-block;
-      width: 66px;
+      /*width: 66px;*/
+      padding:0 10px;
       height: 32px;
       line-height: 32px;
       text-align: center;

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

@@ -22,7 +22,7 @@ class Textarea extends Component {
   handleFocus(){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
     const {handleFocus,fuzhen,handleInput,isChronic} = this.props;
     handleFocus&&handleFocus();         //其他史、查体获取数据的方法
-    if(fuzhen&& !isChronic.name&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
+    if(fuzhen&& !isChronic&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
       const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});

BIN
src/common/images/likely.png


+ 23 - 9
src/components/AssessResult/ScaleItem/index.jsx

@@ -65,13 +65,13 @@ class ScaleItem extends Component {
   handleShowScale(item){
     const {showScaleFn,closeAssess} = this.props;
     //closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item);
+    showScaleFn&&showScaleFn(item,true);
   }
   handleRadio(item,parent){
     let {result} = this.props;
     let radioVal = result&&result.radioVal;
     this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.id]:item.detailName})
+      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
     })
   }
   handleInputformula(id,calcuContent,i,e) {
@@ -171,7 +171,7 @@ class ScaleItem extends Component {
       let it=its;
       if(indexs[i]&&indexs[i].includes(j)){
         if(its.type==1){     //量表
-          let scaleRes=formulaResult&&formulaResult[it.content.id]&&formulaResult[it.content.id].calcalculate;
+          let scaleRes=formulaResult&&formulaResult[it.content.conceptId]&&formulaResult[it.content.conceptId].calcalculate;
           temp =<span className={style['scale']}
                       onClick={()=>this.handleShowScale(it.content)}>
                         {scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】'}
@@ -252,7 +252,7 @@ class ScaleItem extends Component {
                          show={optionId&&optionId==item.conceptId?true:false}
                          close={this.closeOption}
                          confirm={this.confirmOption.bind(this,item.conceptId)}
-                         footer="true">
+                         footer={true}>
                         <div className={style["infoOption"]}>
                           <span>{it.content.name?it.content.name+':':''}</span>
                           {it.content.details&&it.content.details.map((lis,ind)=>{
@@ -269,7 +269,7 @@ class ScaleItem extends Component {
                     </MiniToast>
                   </div>;
         }
-        const passId = item.details[j].type==1?item.details[j].content.id:undefined;
+        const passId = item.details[j].type==1?item.details[j].content.conceptId:undefined;
         const li = disabled?<li>
             <span>{item.name}:</span>
             <div className={style['row']}>{temp}</div>
@@ -291,10 +291,24 @@ class ScaleItem extends Component {
       return this.getDetailItems(it,i);
     });
   }
+  getScaleContent(data){
+    const item = data&&data.find((it)=>{
+      return it.type==1;
+    });
+    if(!item){
+      return null;
+    }
+    const content = JSON.parse(item.content||null);
+    return {id:item.conceptId,content,name:content.scaleName};
+  }
   getScales(){
     const {scaleItems,disabled,formulaResult} = this.props;
-    let li='',temp='';
-    const arr = scaleItems&&scaleItems.map((it,i)=>{
+    let li='',temp='',arr=[],it={};
+    if(!scaleItems){
+      return '';
+    }
+    for( let i in scaleItems){
+      it = this.getScaleContent(scaleItems[i]);
       if(!it) return '';
       let scaleRes=formulaResult&&formulaResult[it.id]&&formulaResult[it.id].calcalculate;
       temp =<span className={style['scale']} onClick={()=>this.handleShowScale(it)}>
@@ -306,12 +320,12 @@ class ScaleItem extends Component {
       </li>:<li>
         <span>相关量表:</span>
         <div className={style['row']}>{temp}</div>
-        <div className={style["recommend"]} onClick={()=>this.props.handleRemove(true,i,it.id)}>
+        <div className={style["recommend"]} onClick={()=>this.props.handleRemove(true,it.id)}>
           <img className={style["deleteIcon"]} src={deleteIcon} />
         </div>
       </li>;
       return li;
-    });
+    };
     return arr;
   }
   handleInput(e){

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

@@ -55,7 +55,7 @@ class AssessResult extends Component {
       ids.splice(idIndex,1);
     }
     if(isList){         //删除全部量表中的项目
-      const items = [...this.state.wholeScaleItems];
+      const items = Object.assign({},this.state.wholeScaleItems);
       items[i]=null;
       this.setState({
         wholeScaleItems: items,

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

@@ -148,8 +148,8 @@
   line-height: 32px;
   color: #fff;
   background: #3B9ED0;
-  cursor: auto;
   margin-top: 15px;
+  cursor: pointer;
 }
 .textareaStatic {
   display: none;

+ 7 - 7
src/components/AssistCheck/index.jsx

@@ -175,16 +175,16 @@ class AssistCheck extends React.Component {
             <div className={styles.wrapper}>
                 <div className={styles.top}>
                     <span id="assistResultData">辅检结果数据</span>
-                    <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                    {/* <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
                         <p id="importPacBtn" className={styles.importInspectBtn}>导入辅检结果</p>
-                    </div>
-                    {/* {
-                      hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+                    </div> */}
+                    {
+                      hospitalMsg.value == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
                         导入化验结果
                         <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-                      </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                      </div> : hospitalMsg.value == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
                         检查系统导入
-                      </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+                      </div> : hospitalMsg.value == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
                         <p id="importExcelBtns" className={styles.importInspectBtn}>导入化验结果</p>
                         {
                           importLis?<ul className={styles.importSelect} id="importExcelLists">
@@ -196,7 +196,7 @@ class AssistCheck extends React.Component {
                           </ul>:null
                         }
                           </div> : null
-                      } */}
+                      }
                     {
                       hide ? <WrapModalContainer title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
                         <WrapModalBodyPac

+ 94 - 108
src/components/ChronicInfo/index.jsx

@@ -43,9 +43,15 @@ class ChronicInfo extends React.Component{
       isCalculated:false,     //是否刚计算过,关闭时值与结果对应
       calcuValues:deepClone(props.calcuValues),       //计算公式填的值
       hasEnterImg: false, //是否移入info
-      currentIndex: -1 //当前index
+      currentIndex: -1, //当前index
+      comfirnFlag:false,
+      flag:true,
+      ff:false,
+      timer:null,
+	  scaleParam:{},    //加入病例需要的参数
     };
-
+    this.$result = React.createRef();
+    this.$content = React.createRef();
     this.$content = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
@@ -53,15 +59,16 @@ class ChronicInfo extends React.Component{
     this.closeOption = this.closeOption.bind(this);
     this.showTable = this.showTable.bind(this);//显示量表弹窗
     this.closeTable = this.closeTable.bind(this);//关闭量表弹窗
-    this.close = this.close.bind(this); //关闭量表列表
     this.showFormula = this.showFormula.bind(this); //打开计算公式
-    //this.closeFormula = this.closeFormula.bind(this); //关闭计算公式
     this.handleAddAssessItem = this.handleAddAssessItem.bind(this);   //加入病例记录
     this.onPrint = this.onPrint.bind(this);
     this.handleForRadio = this.handleForRadio.bind(this);
     this.handleSaveCalcu = this.handleSaveCalcu.bind(this);     //保存评估修改的计算和可能结果
-    this.getAddBtnState = this.getAddBtnState.bind(this);
     this.slideToggle = this.slideToggle.bind(this);
+    this.resetComfirnFlag = this.resetComfirnFlag.bind(this);
+    this.slideToggle = this.slideToggle.bind(this);
+    this.comfirnTable = this.comfirnTable.bind(this);
+	  this.unscroeClose = this.unscroeClose.bind(this);
   }
 
   onPrint() {
@@ -74,22 +81,6 @@ class ChronicInfo extends React.Component{
       operaSupport: false,
     });
   }
-  
-  showTableList(name){//量表按钮
-    const {getTableList} = this.props;
-    if(name){
-      getTableList(name);
-    }
-  }
-  close(){//关闭量表列表
-    const {hideList} = this.props;
-    hideList&&hideList({name:'showList',value:false});
-  }
-  handleListClick(item){//量表列表单项点击
-    this.showTable(item,null);
-    //this.close()
-  }
-
   showInfo(item){
     // 静态知识显示在提示信息里(4-18)
     const {getInfomation} = this.props;
@@ -127,7 +118,7 @@ class ChronicInfo extends React.Component{
       });
     }
   }
-  showTable(it){
+  showTable(it,v,i,j){
     const {scaleInfo} = this.props;
     // 密西根糖尿病周围神经病评分(MDNS), id:40744
     const item = {
@@ -143,12 +134,56 @@ class ChronicInfo extends React.Component{
 
     this.setState({
       formulaId:null, //关闭计算公式和可能结果弹窗
-      optionId:null
+      optionId:null,
+      scaleParam:{
+        v,i,j
+      }
     })
   }
-  closeTable(){
+  // 量表明细-关闭,isClose是否是点击关闭按钮
+  closeTable(isClose){
+    const {scaleParam} = this.state;
+    const {showHide} = this.props;
+    if(!showHide.isPop){
+      //量表结果,判断需要计算并且dom中有值才能加入病例记录
+      const res = this.$result.current&&this.$result.current.innerText;
+      if(!isClose&&(this.$result.current&&!res)){
+        Notify.info("请先计算量表结果!");
+        return ;
+      }
+      this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
+    }
     this.props.hideList({name:'showTable',value:false});
   }
+  // 非计分量表确定-延时关闭->量表存值
+  unscroeClose(){
+    let {timer} = this.state;
+    this.setState({
+      ff:true
+    })
+    clearTimeout(timer)
+    let _timer = setTimeout(()=>{
+      this.closeTable();
+    },200) 
+    this.setState({
+      timer:_timer
+    })
+  }
+  // 量表明细-确定
+  comfirnTable(){
+    const {flag} = this.state;
+    this.setState({
+      comfirnFlag:true,
+      flag:!flag //触发更新
+    })
+  }
+  resetComfirnFlag(){
+    this.setState({
+      comfirnFlag:false,
+      ff:false
+    })
+  }
+ 
   showFormula(id){//计算公式
     this.setState({
       formulaId:id,
@@ -173,9 +208,17 @@ class ChronicInfo extends React.Component{
     });
   }
   handleAddAssessItem(v,pIndex,i){
-    const {addAssessItem} = this.props;
+    const {addAssessItem,showHide,addScaleItems,scaleInfo} = this.props;
+    if(!v){
+      addScaleItems(scaleInfo[showHide.id],showHide.id);
+      return ;
+    }
     addAssessItem(v,pIndex,i);
   }
+  addFormula(it,v,pIndex,i){
+    this.closeFormula(it);
+    this.handleAddAssessItem(v,pIndex,i);
+  }
   handleReg(e){   //只能输入数字
     const hasDot = e.target.value.indexOf('.')!=-1;
     const key = e.key;
@@ -222,7 +265,7 @@ class ChronicInfo extends React.Component{
       radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
     })
   }
-  confirmOption(parent,pIndex){//可能结果确定
+  confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
     const {savePossibleResult} = this.props;
     this.setState({
@@ -231,6 +274,8 @@ class ChronicInfo extends React.Component{
       optionId:null,
     });
     savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
+    this.handleAddAssessItem(parent,pIndex,i);
+
   }
   handleSaveCalcu(obj){
     this.setState({
@@ -276,43 +321,6 @@ class ChronicInfo extends React.Component{
       Notify.info('请填写计算公式内容')
     }
   }
-  getAddBtnState(flag,v,i,j){
-    const {indexs,wholeScaleItems,addScaleItems,chronicMagItem,chronicDesease,addedScaleIds} = this.props;
-    let btn = '',reCheck=false;
-    let show = chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name;
-    if(!show){
-      return '';
-    }
-    if(flag){     //有结果
-      if(j!==undefined){
-        reCheck = addedScaleIds.includes(v.details[j].content.id);      //列表中是否加入同一量表
-        btn = (indexs[i]&&indexs[i].includes(j))||reCheck?<span className={style["add-record"]}>
-                   <img src={added} />
-                   已加入
-                 </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-      }else{
-        reCheck = addedScaleIds.includes(v.id);         //推送中是否加入同一量表
-        btn = (wholeScaleItems&&wholeScaleItems[i])||reCheck?<span className={style["add-record"]}>
-                   <img src={added} />
-                   已加入
-                 </span>:<span className={style["listResult"]} onClick={()=>addScaleItems(v,i)}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-      }
-
-    }else{
-      btn = <span className={style["disable-add"]}>
-                   <img src={add} />
-                   加入病历记录
-                 </span>;
-    }
-
-    return btn;
-  }
   handleMouseEnterDrug(index) {
     this.setState({
         currentIndex: index,
@@ -333,6 +341,7 @@ class ChronicInfo extends React.Component{
       hasEnterImg: false
     })
   }
+  
   getDetail(){
     const {data,formulaResult,calcuResult,indexs} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
@@ -358,22 +367,13 @@ class ChronicInfo extends React.Component{
 
                               </p>:''}
-                      {/*<MiniToast title='静态知识'
-                                icon={allTableIcon}
-                                show={infoId&&infoId==v.id?true:false}
-                                close={this.closeInfo}>
-                          {pureText}
-                      </MiniToast>*/}
                       {v.details&&v.details.map((it,j)=>{
                         if(it.type==1){
                           return <p>
                                 <span className={style["listName"]}>
-                                  <i onClick={this.showTable.bind(this,it.content,v.conceptId,i)}>{'【'+it.content.name+'】'}</i>
+                                  <i onClick={this.showTable.bind(this,it.content,v,i,j)}>{'【'+it.content.name+'】'}</i>
                                   {formulaResult&&formulaResult[it.content.conceptId]?<i>{'结果:'}{formulaResult[it.content.conceptId].calcalculate&&formulaResult[it.content.conceptId].calcalculate.result.value +' '+ formulaResult[it.content.conceptId].calcalculate.result.text}</i>:''}
                                 </span>
-                                {
-                                  this.getAddBtnState(formulaResult&&formulaResult[it.content.conceptId],v,i,j)
-                                }
                               </p>
                         }else if(it.type==2){
                           const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
@@ -385,16 +385,13 @@ class ChronicInfo extends React.Component{
                               <i className={style["blue"]} onClick={this.showFormula.bind(this,v.conceptId)}>{result?result:'请选择'}</i>
                               <img src={level1} />
                             </span>
-                            {
-                              this.getAddBtnState(result,v,i,j)
-                            }
                             {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
                                 icon={allTableIcon}
-                                confirmText='关闭'
+                                confirmText='加入病例记录'
                                 show={formulaId&&formulaId==v.conceptId?true:false}
                                 close={this.closeFormula.bind(this,it)}
-                                confirm={this.closeFormula.bind(this,it)}
-                                footer="true">
+                                confirm={this.addFormula.bind(this,it,v,i,j)}
+                                footer={result?true:false}>
                                 <table>
                                 {details.map((item,idd)=>{
                                     if(item.controlType==0){//单选
@@ -452,15 +449,13 @@ class ChronicInfo extends React.Component{
                               <i onClick={this.showOption.bind(this,v.conceptId)} className={style["blue"]}>{possible[v.conceptId]?possible[v.conceptId]:'请选择'}</i>
                               <img src={level1} />
                             </span>
-                            {
-                              this.getAddBtnState(possible[v.conceptId],v,i,j)
-                            }
                             <MiniToast title='结果选择'
                                 icon={checkIcon}
+                                confirmText='加入病例记录'
                                 show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
-                                confirm={this.confirmOption.bind(this,v,i)}
-                                footer="true">
+                                confirm={this.confirmOption.bind(this,v,i,j)}
+                                footer={radioVal[v.conceptId]?true:false}>
                                 <div className={style["infoOption"]}>
                                   <span>{it.content.name?it.content.name+':':''}</span>
                                   {it.content.details&&it.content.details.map((lis,ind)=>{
@@ -500,11 +495,12 @@ class ChronicInfo extends React.Component{
     toggleSlide&&toggleSlide(!slideUp);
   }
   render(){
+    const {comfirnFlag,flag,ff} = this.state;
+    const {chronicMagItem,chronicDesease,formulaResult,showHide,slideUp} = this.props;
     const scaleFooter = <Footer print={true}
-                                footText="确定"
+                                footText={showHide.isPop?"确定":"加入病例记录"}
                                 handlePrint={this.onPrint}
-                                handleConfirm={this.closeTable}/>;
-    const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide,slideUp} = this.props;
+                                handleConfirm={()=>{this.comfirnTable()}}/>;
     return <div className={style["tips"]} style={{marginBottom:'15px'}}>
               <div className={`${style["tips-title"]} ${style["chronic"]}`}>
                 <div className={style["tips-name"]}>
@@ -515,36 +511,26 @@ class ChronicInfo extends React.Component{
                 <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 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}>
-                      <ul className={style['toast-cont']}>
-                        {tableList&&tableList.map((v,i)=>{
-                          return <li>
-                            <span className={style["scaleName"]}>
-                              <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
-                              {formulaResult&&formulaResult[v.conceptId]?<i className={style['res']}>{'结果:'}{formulaResult[v.conceptId].calcalculate&&formulaResult[v.conceptId].calcalculate.result.value+' '+ (formulaResult[v.conceptId].calcalculate.result.text?formulaResult[v.conceptId].calcalculate.result.text:'')}</i>:''}
-                            </span>
-                            {
-                              this.getAddBtnState(formulaResult&&formulaResult[v.conceptId],v,i)
-                            }
-                          </li>
-                        })}
-                      </ul>
-              </ConfirmModal>*/}
-              {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
+              {showHide&&showHide.showTable?<ComplexModal onclose={()=>this.closeTable(true)} footer={scaleFooter}
                       title={showHide.name}
                       icon={tableIcon}
                       top={20}
                       bottom={20}
                       width={820}>
-                <ScaleTable title={showHide.name} tableId={showHide.id}></ScaleTable>
+                <ScaleTable title={showHide.name} 
+                            tableId={showHide.id} 
+                            comfirnFlag={comfirnFlag} 
+                            flag={flag}
+                            flagT={ff}
+                            resetFlag={this.resetComfirnFlag}
+                            unscroeClose={this.unscroeClose}
+                            closeTable={this.closeTable}
+							resRef={this.$result}
+                            ></ScaleTable>
               </ComplexModal>:''}
       </div>
   }

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

@@ -52,7 +52,7 @@ class CurrentIll extends Component{
       })
     }else if(!text) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
-      if(data.length==0 && !isChronic || !isChronic.name ){
+      if(data.length==0 && (!isChronic || JSON.stringify(isChronic)=='{}') ){
         clearTimeout(setDataTimer);
         setDataTimer = setTimeout(function(){//延时,等待主诉失焦数据返回
             setData && setData({num,mainData,mainIds,symptomFeature:symptomFeature.featureData,isChronic,mainTailIds});   

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

@@ -263,7 +263,7 @@ class DiagnosticList extends Component {
         return(
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
-                        const hasTreat = item.treat && (item.treat.commonTreatment.content || item.treat.surgeryTreatment.content || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
+                        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 = chronicLine&&item.type==2&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.conceptId} >

+ 6 - 2
src/components/Emergency/index.jsx

@@ -93,14 +93,18 @@ class EmergencyHis extends Component{
   handleAdd(){
     const {chooseItem,index} = this.state;
     const {addSecond,data} = this.props;
-    console.log("添加成功")
     if(chooseItem.trim()){
       // 添加接口
       const item = {
         name:chooseItem,
         id:data[index].inquiryId
       }
-      addSecond&&addSecond(item)
+      addSecond&&addSecond(item);
+      this.searInp.current.value = "";
+      this.setState({
+        valChange:true,
+        chooseItem:''
+      });
     }
   }
 

+ 1 - 0
src/components/Emergency/index.less

@@ -35,6 +35,7 @@
     display: inline-block;
     vertical-align: top;
     position: relative;
+    padding-top: 57px;
     .no-data{
       font-size: 18px;
       position: absolute;

+ 88 - 0
src/components/EmergencyProcedure/EmergencyModal/index.jsx

@@ -0,0 +1,88 @@
+import styles from './index.less'
+import small from '../img/small.png'
+import EmergencyPart from '../EmergencyPart'
+import pic from '../img/pic.png'
+import pic1 from '../img/pic1.jpg'
+import pic2 from '../img/pic2.jpg'
+import pic3 from '../img/pic3.jpg'
+import pic4 from '../img/pic4.png'
+import pic5 from '../img/pic5.jpg'
+import $ from 'jquery'
+
+class EmergencyModal extends React.Component{
+  constructor(props){
+    super(props)
+    this.state={
+      show:false,
+      imgShow:false,
+      diseaseName:[
+        '胸痛','心包积液','气胸','肺栓塞','急性冠脉综合征','主动脉夹层'
+      ]
+    }
+    this.handleImgShow=this.handleImgShow.bind(this)
+  }
+  componentDidMount() {
+    $(document).click((event) => {
+      let modalTopR = document.getElementById("modalTopR")
+      let nameLis = document.getElementById("nameLis")
+      if (nameLis) {
+        if (modalTopR != event.target && !nameLis.contains(event.target)) {
+          this.setState({ show: false });
+        }
+      }
+    });
+  }
+  handleSlideShow(){
+    let flg = this.state.show
+    this.setState({show:!flg})
+  }
+  setDataIdx(num,flg){
+    this.setState({show:flg})
+    this.props.setDataIdx(num)
+  }
+  handleImgShow(flg){
+    this.setState({imgShow:flg})
+  }
+  render(){
+    const {data,handleShow,setDataIdx,idx} = this.props;
+    return <div className={styles.emergencyProdure}>
+      <div className={`${styles.modalTop} clearfix`}>
+          <div className={styles.modalTopL}>
+            <img onClick={()=>handleShow(false)} src={small} alt=""/>
+            <p className="ellipsOver">{data.emergencyname}</p>
+            {
+              idx == 0?null:<img src={pic} onClick={()=>{this.handleImgShow(true)}} alt=""/>
+            }
+            {
+              this.state.imgShow?<React.Fragment>
+                <div className={styles.imageModalWrap} onClick={()=>{this.handleImgShow(false)}}></div>
+                <div className={styles.imageModal}>
+                  <img src={idx==1?pic1:idx==2?pic2:idx==3?pic3:idx==4?pic4:idx==5?pic5:null} alt=""/>
+                </div>
+              </React.Fragment>:null
+            }
+          </div>
+          <div className={styles.modalTopR} onClick={()=>{this.handleSlideShow()}} id="modalTopR">其他危重症状</div>
+          {
+            this.state.show?<ul className={styles.nameLis} id="nameLis">
+              <i></i>
+              {
+                this.state.diseaseName.map((item,index)=>{
+                  return <li className={idx == index?styles.selectColor:null} onClick={()=>{this.setDataIdx(index,false)}}>
+                    {item}
+                  </li>
+                })
+              }
+            </ul>:null
+          }
+      </div>
+      <div className={styles.modalMain}>
+        <div className={styles.part}>
+          <EmergencyPart idx={idx} setDataIdx={setDataIdx} data={data}></EmergencyPart>
+        </div>
+      </div>
+    </div>
+  }
+}
+
+export default EmergencyModal;

+ 105 - 0
src/components/EmergencyProcedure/EmergencyModal/index.less

@@ -0,0 +1,105 @@
+@import "~@less/mixin.less";
+
+.emergencyProdure {
+  position: fixed;
+  top: 50px;
+  bottom: 10px;
+  width: 450px;
+  right: 10px;
+  z-index: 205;
+  padding: 15px;
+  background-color: #fff;
+  .modalTop {
+    height: 60px;
+    line-height: 60px;
+    position: relative;
+  }
+  .modalTopL {
+    float: left;
+    height: 60px;
+    p {
+      display: inline-block;
+      font-size: 16px;
+      padding: 0 5px;
+      max-width: 265px;
+      
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+    }
+    img {
+      position: relative;
+      top: -17px;
+    }
+  }
+  .modalTopR {
+    float: right;
+    color: #2A9BD5;
+    font-weight: bold;
+    cursor: pointer;
+  }
+  .nameLis {
+    position: absolute;
+    width: 400px;
+    top: 46px;
+    left: 10px;
+    padding: 10px;
+    box-sizing: border-box;
+    background-color: #fff;
+    box-shadow: 0 10px 20px 0 #989DA3;
+    border: 1px solid #dedede;
+    i {
+      width: 0;
+      height: 0;
+      border-width: 10px;
+      border-style: solid;
+      border-color: transparent transparent #fff transparent;
+      position: absolute;
+      top: -20px;
+      right: 10px;
+    }
+    li {
+      line-height: 18px;
+      float: left;
+      padding: 10px;
+      cursor: pointer;
+    }
+  }
+  .selectColor{
+    color: #2A9BD5;
+  }
+  .imageModalWrap {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 300;
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+    opacity: 0.6;
+    filter: alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .imageModal {
+    position: fixed;
+    // top: 7%;
+    // bottom: 7%;
+    // height: 86%;
+    background-color: #fff;
+    overflow: hidden;
+    z-index: 500;
+    width: 1000px;
+    margin-left: -500px;
+    transform: translateY(-50%);
+
+    // margin-top: -420px;
+    // height: 840px;
+    // transform: translateX(-50%);
+    left: 50%;
+    top: 50%;
+    img{
+      width: 100%;
+      height: 100%;
+    }
+  }
+}

+ 261 - 0
src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx

@@ -0,0 +1,261 @@
+import styles from '../index.less'
+import back from '../../img/back.png'
+import down from '../../img/down.png'
+
+class PartSec extends React.Component{
+  constructor(props){
+    super(props);
+    this.state={
+      partCom:true,//通用第二步
+      num:'-1',
+      partClick:false,
+    }
+  }
+  componentWillReceiveProps(nextState){
+    if(nextState.idx != this.props.idx){
+      this.setState({partCom:true})
+    }
+  }
+  makeSureCom(link,num){
+    const {idx,makeSureCom,makeSureWar} = this.props
+    if(idx == 0){
+      if(link){
+        makeSureCom(link,false,0)
+      }
+    }else if(idx == 3){
+      makeSureWar(num)
+    }else if(idx == 5){
+      if(num == 0){
+        makeSureCom(link,true,0)
+      }
+    }else if(idx == 4){
+      makeSureCom(link,true,0)
+      makeSureWar(num)
+    }
+    this.setState({
+      partCom:false,
+      num:num
+    })
+  }
+  backSec(){
+    const {makeSureCom} = this.props
+    this.setState({
+      partCom:true
+    })
+    makeSureCom('',false,0)    
+  }
+  handleStepSecCom(){
+    const {data} = this.props
+    return data.items.map((item,idx)=>{
+      return <div className={`${idx == 0?styles.nextWar:styles.nextCom} ${styles.next}`}><span>{item.actionname}</span> <i onClick={()=>{this.makeSureCom(item.link,idx)}}>{item.text?item.text:'确定'}</i></div>
+    })
+  }
+  handleStepSecClick(){
+    const {idx,makeSureCom} = this.props
+    if(idx == 0){
+      return <React.Fragment>
+        <div className={`${styles.nextCom} ${styles.next}`}>
+          <span>无异常</span> 
+          <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+        </div>
+        <h4>{'判断危机生命的胸痛(心率>110次/分,血压<90/60mmHg晕厥或呼吸次数>25次,全身湿冷)'}</h4>
+        <div className={`${styles.nextWar} ${styles.next}`}>
+          <span>是</span> 
+          <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+        </div>
+        <div className={`${styles.nextCom} ${styles.next}`}>
+          <span>否</span> 
+          <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+        </div>
+      </React.Fragment>
+    }else if(idx == 1){
+      if(this.state.num == 0){
+        return <React.Fragment>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>心包积液</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+          <h4>{'判断是否心包填塞'}</h4>
+          <div className={`${styles.goDownPub} ${styles.goDownY}`}>
+            <span>是</span> 
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>心包穿刺</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>穿刺夜分析对症治疗</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>抢救室待床!</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownN}`}>
+            <span>否</span> 
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>积液量少查找病因对症治疗</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>病情未控制病情恶化</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>心包穿刺</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>穿刺夜分析对症治疗</span>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+            <img src={down} alt=""/>
+          </div>
+          <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+            <span>抢救室待床!</span>
+          </div>
+        </React.Fragment>
+      }else{
+        return <React.Fragment>
+        <div className={`${styles.nextWar} ${styles.next}`}>
+          <span>非心包积液</span> 
+          <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+        </div>
+        <h4>{'查找其他原因'}</h4>
+      </React.Fragment>
+      }
+    }else if(idx == 2){
+      if(this.state.num == 0){
+        return <React.Fragment>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>气胸患者</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+          <h4>{'结合症状体征是否危机生命是否濒死休克'}</h4>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>是</span> 
+            <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+          </div>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>否</span> 
+            <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+          </div>
+        </React.Fragment>
+      }else{
+        return <React.Fragment>
+        <div className={`${styles.nextWar} ${styles.next}`}>
+          <span>非气胸患者</span> 
+          <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+        </div>
+        <h4>{'查找其他原因'}</h4>
+      </React.Fragment>
+      }
+    }else if(idx == 3){
+      if(this.state.num == 0){
+        return <React.Fragment>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>伴低血压休克</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+          <h4>判断右心负荷是否增加</h4>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>右心负荷增加(DDI阳性)</span> 
+            <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+          </div>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>右心负荷不增加(DDI阴性)</span> 
+            <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+          </div>
+        </React.Fragment>
+      }else{
+        return <React.Fragment>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>不伴低血压休克</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+          <h4>根据临床经验或者PE评分规则评估PE可能性</h4>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>评分高或DDI阳性</span> 
+            <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
+          </div>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>评分低且DDI阴性</span> 
+            <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
+          </div>
+        </React.Fragment>
+      }
+    }else if(idx == 5){
+      if(this.state.num == 0){
+        return <React.Fragment>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>DDI阳性或TTE阳性</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+        </React.Fragment>
+      }else{
+        return <React.Fragment>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>DDI阴性或TTE阴性</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+          <span className={styles.emergencyBtnS}>排除AD</span>
+          <h4>请相关科室会诊寻找病因</h4>
+        </React.Fragment>
+      }
+    }else if(idx == 4){
+      if(this.state.num == 0){
+        return <React.Fragment>
+          <div className={`${styles.nextWar} ${styles.next}`}>
+            <span>ST段抬高或新发LBBB</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+        </React.Fragment>
+      }else{
+        return <React.Fragment>
+          <div className={`${styles.nextCom} ${styles.next}`}>
+            <span>ST段压低或无特征性改变</span> 
+            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          </div>
+        </React.Fragment>
+      }
+    }
+  }
+  render(){
+    const {data,idx} = this.props
+    return <div className={`${styles.partSec} ${styles.partPub} clearfix`} style={{borderBottom:idx==1?'0':null}}>
+      {
+        data.select.map((item,idx)=>{
+          return <div className={`${idx == 0?styles.commonBtn:styles.emergencyBtn} ${styles.btn}`}>{item}</div>
+        })
+      }
+      <p>步骤2</p>
+      {
+        data.waring?<h4>{data.waring}</h4>:null
+      }
+      {
+        data.tips?<p style={{marginTop:0}}>{data.tips}</p>:null
+      }
+      {
+        this.state.partCom?this.handleStepSecCom():this.handleStepSecClick()
+      }
+    </div>
+  }
+}
+
+export default PartSec;

+ 575 - 0
src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx

@@ -0,0 +1,575 @@
+import styles from '../index.less'
+import $ from 'jquery'
+import back from '../../img/back.png'
+import down from '../../img/down.png'
+
+class PartTrd extends React.Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      link0: [
+        {
+          message: '高血压伴休克体征、撕裂样胸痛,两上肢体血压相差20mmHg以上或者下肢血压较上肢血压低10mmHg',
+          text: '主动脉夹层救治流程',
+          link: 5
+        },
+        {
+          message: '呼吸困难、顽固性低氧血症,低血压、颈静脉怒张,四肢水肿、晕厥',
+          text: '肺栓塞救治流程',
+          link: 3
+        },
+        {
+          message: '呼吸困难、一侧肺呼吸音减弱或消失',
+          text: '气胸救治流程',
+          link: 2
+        },
+        {
+          message: '症状体征提示心包积液',
+          text: '心包积液救治流程',
+          link: 1
+        },
+      ],
+      prevAction: [
+        { name: '告病重,立即送抢救室,停止活动,绝对卧床' },
+        { name: '监测生命体征,持续心电监护,建立静脉通道(左侧肢体,1-2路)' },
+        { name: '必要时给氧,保持血氧饱和度95%以上' },
+        { name: '取血化验', list: ['血常规', '急诊生化', '心肌酶谱', 'Troponinl', '凝血功能', '术前免疫'] },
+        { name: '床边心超检查' },
+        { name: '询问相关病史和体格检查' }
+      ],
+      selects: [
+        {
+          basis: [
+            '血流动力学不稳定或心源性休克',
+            '再发性或药物治疗难以缓解的持续性胸痛',
+            '危及生命的心律失常或心跳骤停',
+            '心肌梗死的机械性并发症',
+            '急性心衰',
+            'ST-T动态改变,特别是间歇性ST段抬高',
+            '以上依据都不符合'
+          ],
+        },
+        {
+          basis: [
+            '肌钙蛋白水平升高或降低与心梗一致',
+            '动态ST或T波改变(有或无症状)',
+            'GRACE评分>140',
+            '以上依据都不符合'
+          ]
+        },
+        {
+          basis: [
+            '糖尿病',
+            '肾功能不全(eGFR<60ml/min/1.73m2)',
+            'LVEF<40%或充血性心力衰竭',
+            '梗死后早起心绞痛',
+            '近期PCI史',
+            '之前CABG史',
+            'GRACE评分>109且<140',
+            '以上依据都不符合'
+          ]
+        },
+        {
+          basis: []
+        },
+      ],
+      select3: ['呼吸科会诊'],
+      select5: ['心外会诊','血管外科内会诊'],
+      trdShow: true,
+      trdFlg: '',
+      currentIdx: 0,
+      show0: false,
+      show1: false,
+      show2: false,
+      show3: false,
+      show0Lis: [],
+      show1lis: [],
+      show2lis: [],
+      show3lis: [],
+    }
+    this.handleTrdPart = this.handleTrdPart.bind(this)
+  }
+  backSec() {
+    const { makeSureCom } = this.props
+    makeSureCom('', false, 0)
+  }
+  changeTrdShow(flg, num) {
+    this.setState({
+      trdShow: flg,
+      trdFlg: num,
+      currentIdx:0,
+      show0: false,
+      show1: false,
+      show2: false,
+      show3: false,
+      show0Lis: [],
+      show1Lis: [],
+      show2Lis: [],
+      show3Lis: [],
+    })
+  }
+  changeCurrentIdx() {
+    let num = this.state.currentIdx
+    this.setState({
+      currentIdx: ++num
+    })
+  }
+  handleShowDetail(idx,name) {
+    switch (idx) {
+      case 0:
+        let show0Lis = JSON.parse(JSON.stringify(this.state.show0Lis))
+        if(show0Lis.indexOf(name) == -1){
+          show0Lis.push(name)
+        }else{
+          show0Lis.splice(show0Lis.findIndex(item => item == name), 1)
+        }
+        this.setState({
+          show0Lis:show0Lis
+        })
+        this.setState({
+          show0: show0Lis.length>0,
+          show1: false,
+          show2: false,
+          show3: false
+        })
+        break;
+      case 1:
+        let show1Lis = JSON.parse(JSON.stringify(this.state.show1Lis))
+        if(show1Lis.indexOf(name) == -1){
+          show1Lis.push(name)
+        }else{
+          show1Lis.splice(show1Lis.findIndex(item => item == name), 1)
+        }
+        this.setState({
+          show1Lis:show1Lis
+        })
+        this.setState({
+          show0: false,
+          show1: show1Lis.length>0,
+          show2: false,
+          show3: false
+        })
+        break;
+      case 2:
+          let show2Lis = JSON.parse(JSON.stringify(this.state.show2Lis))
+          if(show2Lis.indexOf(name) == -1){
+            show2Lis.push(name)
+          }else{
+            show2Lis.splice(show2Lis.findIndex(item => item == name), 1)
+          }
+          this.setState({
+            show2Lis:show2Lis
+          })
+        this.setState({
+          show0: false,
+          show1: false,
+          show2: show2Lis.length>0,
+          show3: false
+        })
+        break;
+      case 3:
+        this.setState({
+          show0: false,
+          show1: false,
+          show2: false,
+          show3: true
+        })
+        break;
+    }
+  }
+  handleTrdPart() {
+    const { idx, num, trdNum, makeSureCom } = this.props;
+    const { link0, trdShow, trdFlg, prevAction, selects, currentIdx, show0,show1,show2,show3 } = this.state;
+    if (idx == 0) {
+      return <React.Fragment>
+        <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+          <span>{num ? '是' : '否'}</span>
+          <img onClick={() => { this.backSec() }} src={back} alt="" />
+        </div>
+        {
+          num ? link0.map((item, idx) => {
+            return <div className={`${styles.partLis} clearfix`} style={{ borderBottom: idx == 3 ? '0' : null }}>
+              <p>{item.message}</p>
+              <span onClick={() => makeSureCom(item.link, false, '')}>{item.text}</span>
+            </div>
+          }) : <h4>建议胸痛中心观察6-8h</h4>
+        }
+      </React.Fragment>
+    } else if (idx == 2) {
+      return <React.Fragment>
+        <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+          <span>{num ? '是' : '否'}</span>
+          <img onClick={() => { this.backSec() }} src={back} alt="" />
+        </div>
+        {
+          num ? <React.Fragment>
+            <span className={styles.emergencyBtnS}>急诊胸穿</span>
+            <p className={styles.warMessage}>抢救室待救</p>
+          </React.Fragment> : <React.Fragment>
+              <h4>判断肺压缩大于25%或小于25%</h4>
+              <p className={styles.warTips}>肺压缩大于25%</p>
+              <h4>建议保守对症治疗止咳、祛痰、急诊留观</h4>
+              <span className={styles.emergencyBtnS}>择期胸穿</span>
+              <div className={styles.line}></div>
+              <p className={styles.warTips}>肺压缩小于25%</p>
+              <h4>建议保守对症治疗止咳、祛痰</h4><br />
+              <div className={styles.hold}>
+                <span className={styles.holdLeft}>病情未控制继续恶化</span>
+                <span className={styles.holdRight}>择期胸穿</span>
+              </div>
+              <div className={`${styles.hold}`}>
+                <span className={styles.holdLeft}>病情好转</span>
+                <span className={styles.holdRight}>门诊随访</span>
+              </div>
+            </React.Fragment>
+        }
+      </React.Fragment>
+    } else if (idx == 3) {
+      if (trdNum == 0) {
+        return <React.Fragment>
+          <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+            <span>{num ? '右心负荷增加(DDI阳性)' : '右心负荷不增加(DDI阴性)'}</span>
+            <img onClick={() => { this.backSec() }} src={back} alt="" />
+          </div>
+          {
+            num ? <React.Fragment>
+              <h4>生命体征不稳定</h4>
+              <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                <span>根据病史、体征、PE评分判断病情</span>
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                <img src={down} alt="" />
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                <span>考虑溶栓或者血栓切除</span>
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                <img src={down} alt="" />
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                <span>ACLS(高级心脏生命支持)</span>
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                <img src={down} alt="" />
+              </div>
+              <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                <span>收入ICU</span>
+              </div>
+              <h4>生命体征稳定建议检查CTAP(肺动脉造影)</h4>
+              <h4>建议检查肺动脉增强CT</h4>
+              <div className={`${styles.hold}`}>
+                <span className={styles.holdLeft}>阳性</span>
+                <span className={styles.holdRight}>按肺栓塞治疗</span>
+              </div>
+              <div className={`${styles.hold}`}>
+                <span className={styles.holdLeft}>阴性</span>
+                <span className={styles.holdRight}>请相关科室会寻找病因</span>
+              </div>
+            </React.Fragment> : <React.Fragment>
+                <h4>建议ACLS(高级心脏生命支持)</h4>
+                <h4>请相关科室会寻找病因</h4>
+              </React.Fragment>
+          }
+        </React.Fragment>
+      } else {
+        return <React.Fragment>
+          <div className={`${num ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+            <span>{num ? '评分高或DDI阳性' : '评分低且DDI阴性'}</span>
+            <img onClick={() => { this.backSec() }} src={back} alt="" />
+          </div>
+          {
+            num ? <React.Fragment>
+              <h4>建议检查CTPA(肺动脉造影)</h4>
+              <div className={`${styles.hold}`}>
+                <span className={styles.holdLeft}>阳性</span>
+                <span className={styles.holdRight}>按肺栓塞治疗</span>
+              </div>
+              <div className={`${styles.hold}`}>
+                <span className={styles.holdLeft}>阴性</span>
+                <span className={styles.holdRight}>请相关科室会寻找病因</span>
+              </div>
+            </React.Fragment> : <React.Fragment>
+                <span className={styles.emergencyBtnS}>排除肺栓塞</span>
+                <h4>请相关科室会寻找病因</h4>
+              </React.Fragment>
+          }
+        </React.Fragment>
+      }
+    } else if (idx == 5) {
+      return <React.Fragment>
+        <div className={`${styles.nextWar} ${styles.next}`}>
+          <span>立即检查CTA(血管造影)</span>
+        </div>
+        <h4>判断检查结果数据</h4>
+        {
+          trdShow ? <React.Fragment>
+            <div className={`${styles.nextWar} ${styles.next}`}>
+              <span>确诊AD(A型或B型)</span>
+              <i onClick={() => { this.changeTrdShow(false, 1) }}>确定</i>
+            </div>
+            <div className={`${styles.nextCom} ${styles.next}`}>
+              <span>排除AD</span>
+              <i onClick={() => { this.changeTrdShow(false, 0) }}>确定</i>
+            </div>
+          </React.Fragment> : <React.Fragment>
+              <div className={`${trdFlg ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+                <span>{trdFlg ? '确诊AD(A型或B型)' : '排除AD'}</span>
+                <img onClick={() => { this.changeTrdShow(true, '') }} src={back} alt="" />
+              </div>
+              <h4>{trdFlg ? '抢救室待床' : '请相关科室会诊寻找病因'}</h4>
+            </React.Fragment>
+        }
+      </React.Fragment>
+    } else if (idx == 4) {
+      if (trdNum == 0) {
+        return <React.Fragment>
+          <h4>进一步诊疗</h4>
+          <p>{'(STEMI处置时间<10min)'}</p>
+          <ul className={styles.doList}>
+            {
+              prevAction.map((item, idx) => {
+                return <li>
+                  {idx + 1}、{item.name}{item.list ? ' : ' : ' ;'}
+                  {
+                    item.list ? item.list.map((part) => {
+                      return <span>{part}</span>
+                    }) : null
+                  }
+                </li>
+              })
+            }
+          </ul>
+          <h4>询问并立即服用负荷剂量的双抗药物(若未服用)</h4>
+          <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或 阿司匹林0.3g+替格瑞洛180mg( "心拯救"一包药)</p>
+          <h4>患者发病时间!</h4>
+          {
+            trdShow ? <React.Fragment>
+              <div className={`${styles.nextWar} ${styles.next}`}>
+                <span>发病大于12小时</span>
+                <i onClick={() => { this.changeTrdShow(false, 1) }}>确定</i>
+              </div>
+              <div className={`${styles.nextCom} ${styles.next}`}>
+                <span>发病小于12小时</span>
+                <i onClick={() => { this.changeTrdShow(false, 0) }}>确定</i>
+              </div>
+            </React.Fragment> : <React.Fragment>
+                <div className={`${trdFlg ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+                  <span>{trdFlg ? '发病大于12小时' : '发病小于12小时'}</span>
+                  <img onClick={() => { this.changeTrdShow(true, 1) }} src={back} alt="" />
+                </div>
+                <h4>{trdFlg ? '判断患者是否有急诊PCI指证' : '启动导管室、获取知情同意联系床位'}</h4>
+                {
+                  trdFlg ? <React.Fragment>
+                    <div className={`${styles.goDownPub} ${styles.goDownY}`}>
+                      <span>是</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>启动导管室、获取知情同意联系床位</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>{'家属不同意或者导管室到达>60min'}</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                    </div>
+                    <br />
+                    <div className={styles.line}></div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
+                      <span>{'家属同意-导管室直接运转'}</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
+                      <span>{'控制D-B时间<90min'}</span>
+                    </div>
+                    <div className={styles.line} style={{ marginBottom: "-8px" }}></div>
+                    <div className={`${styles.goDownPub} ${styles.goDownN}`}>
+                      <span>否</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>收住ICU/CCU</span>
+                    </div>
+                  </React.Fragment> : <React.Fragment>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                        <span>{'家属不同意或者导管室到达>60min'}</span>
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                        <img src={down} alt="" />
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                        <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                      </div>
+                      <br />
+                      <div className={styles.line}></div>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
+                        <span>{'家属同意-导管室直接运转'}</span>
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
+                        <span>{'控制D-B时间<90min'}</span>
+                      </div>
+                    </React.Fragment>
+                }
+              </React.Fragment>
+          }
+        </React.Fragment>
+      } else {
+        return <React.Fragment>
+          <h4>进一步诊疗</h4>
+          <p>{'(STEMI处置时间<10min)'}</p>
+          <h4>查血:检查心肌酶谱+Troponinl</h4>
+          <p style={{ color: "#000", lineHeight: "18px" }}>必要时可 Q1-4h 复查</p>
+          <p style={{ color: "#000", lineHeight: "18px" }}>判读结果同时结果回馈心内科会诊</p>
+          <h4>判断检查结果是否异常</h4>
+          {
+            trdShow ? <React.Fragment>
+              <div className={`${styles.nextWar} ${styles.next}`}>
+                <span>诊断NSTEMI-ACS</span>
+                <i onClick={() => { this.changeTrdShow(false, 1) }}>确定</i>
+              </div>
+              <div className={`${styles.nextCom} ${styles.next}`}>
+                <span>排除NSTEMI-ACS</span>
+                <i onClick={() => { this.changeTrdShow(false, 0) }}>确定</i>
+              </div>
+            </React.Fragment> : <React.Fragment>
+                <div className={`${trdFlg ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+                  <span>{trdFlg ? '诊断NSTEMI-ACS' : '排除NSTEMI-ACS'}</span>
+                  <img onClick={() => { this.changeTrdShow(true, 1) }} src={back} alt="" />
+                </div>
+                <h4>{trdFlg ? '立即服用负荷剂量的双抗药物(若未服用)' : '已排除NSTEMI-ACS ,请其他诊室会诊!'}</h4>
+                {
+                  trdFlg ? <React.Fragment>
+                    <h4>询问并立即服用负荷剂量的双抗药物(若未服用)</h4>
+                    <p style={{ color: '#000', textIndent: '2em', lineHeight: '20px' }}>阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或 阿司匹林0.3g+替格瑞洛180mg("心拯救"一包药)</p>
+                    <h4>判断患者危重程度</h4>
+                    <ul className={`${styles.illDeep} clearfix`}>
+                      <li className={currentIdx==0? styles.selectOn:''}>极高危患者</li>
+                      <li className={currentIdx==1? styles.selectOn:''}>高危患者</li>
+                      <li className={currentIdx==2? styles.selectOn:''}>中危患者</li>
+                      <li className={currentIdx==3? styles.selectOn:''}>低危患者</li>
+                    </ul>
+                    <h4>判断依据</h4>
+                    {selects[currentIdx].basis.length>0?<ul className={styles.doList} id="doList">
+                      {
+                        selects[currentIdx].basis.map((item, idx) => {
+                          return <li key={item+idx}>
+                            {
+                              idx == (selects[currentIdx].basis.length - 1) ? <input type="checkbox" onClick={() => { this.changeCurrentIdx() }} /> : <input type="checkbox" onClick={() => { this.handleShowDetail(currentIdx,item) }} />
+                            }
+                            <i> {idx + 1}、{item}</i>
+                          </li>
+                        })
+                      }
+                    </ul>:null}
+                    {
+                      (show0 && currentIdx==0) ? <React.Fragment>
+                        <div className={`${styles.goDownPub} ${styles.goDownD}`}>
+                          <span>患者危机程度:极高危患者</span>
+                        </div>
+                        <h4>治疗方案</h4>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>启动导管室、获取知情同意联系床位</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'家属不同意或者导管室到达>60min'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                        </div>
+                        <br />
+                        <div className={styles.line}></div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
+                          <span>{'家属同意-导管室直接运转'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
+                          <span>{'控制D-B时间<90min'}</span>
+                        </div>
+                      </React.Fragment> : (show1 && currentIdx==1) ? <React.Fragment>
+                        <div className={`${styles.goDownPub} ${styles.goDownD}`}>
+                          <span>患者危机程度:高危患者</span>
+                        </div>
+                        <h4>治疗方案</h4>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'推荐早期浸入治疗(<24h)'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'收住ICU/CCU'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{height:"80px"}}>
+                          <span>{'限期冠脉造影、继续监测生命体征、心电图(q6h)、心肌酶谱变化(q6h)、若有变化随时心内科会诊'}</span>
+                        </div>
+                      </React.Fragment>: (show2&& currentIdx==2) ? <React.Fragment>
+                        <div className={`${styles.goDownPub} ${styles.goDownD}`}>
+                          <span>患者危机程度:中危患者</span>
+                        </div>
+                        <h4>治疗方案</h4>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'推荐浸入治疗(<72h)'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'收住ICU/CCU'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{height:"80px"}}>
+                          <span>{'限期冠脉造影、继续监测生命体征、心电图(q6h)、心肌酶谱变化(q6h)、若有变化随时心内科会诊'}</span>
+                        </div>
+                      </React.Fragment> :(currentIdx==3) ? <React.Fragment>
+                        <div className={`${styles.goDownPub} ${styles.goDownD}`}>
+                          <span>患者危机程度:低危患者</span>
+                        </div>
+                        <h4>留观或收住心内科</h4>
+                      </React.Fragment>:null
+                    }
+                  </React.Fragment> : null
+                }
+              </React.Fragment>
+          }
+        </React.Fragment>
+      }
+    }
+  }
+  render() {
+    const { idx, num } = this.props
+    return <div className={`${styles.partTrd} ${styles.partPub}`}>
+      {
+        idx == 3 && num == 1 ? <React.Fragment><div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select3[0]}</div><br /></React.Fragment>
+          : idx == 5 ? <React.Fragment>
+            <div className={`${styles.commonBtn} ${styles.btn}`}>{this.state.select5[1]}</div>
+            <div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select5[0]}</div>
+            <br />
+          </React.Fragment> : null
+      }
+      <p>步骤3</p>
+      {
+        this.handleTrdPart()
+      }
+    </div>
+  }
+}
+export default PartTrd;

+ 91 - 0
src/components/EmergencyProcedure/EmergencyPart/index.jsx

@@ -0,0 +1,91 @@
+import styles from './index.less';
+import PartSec from './PartSec';
+import PartTrd from './PartTrd';
+import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
+
+class EmergencyProcedure extends React.Component {
+  constructor(props){
+    super(props);
+    this.$cont = React.createRef();
+    this.state = {
+      secShow:true,
+      trdShow:false,
+      trdNum:'',
+      num:'',
+    }
+    this.makeSureWar = this.makeSureWar.bind(this)
+    this.makeSureCom = this.makeSureCom.bind(this)
+  }
+  componentDidMount(){
+    const height = getWindowInnerHeight()-144;
+    this.$cont.current.style.height = height+"px";
+    if(this.$cont.current){
+      windowEventHandler('resize', ()=>{
+        const height = getWindowInnerHeight()-144;
+        this.$cont.current.style.height = height+"px";
+      });
+    }
+  }
+  componentWillReceiveProps(nextState){
+    if(nextState.idx != this.props.idx){
+      this.setState({trdShow:false})
+    }
+  }
+  makeSureWar(num){
+    this.setState({
+      trdNum:num
+    })
+  }
+  makeSureCom(link,flg,num){
+    const {setDataIdx,idx} = this.props
+    if(idx == 0){
+      if(link){
+        setDataIdx(link)
+        this.setState({
+          trdShow:false
+        })
+      }else{
+        this.setState({
+          trdShow:flg,
+          num:num
+        })
+      }
+    }else if(idx == 2){
+      this.setState({
+        trdShow:flg,
+        num:num
+      })
+    }else if(idx == 3){
+      this.setState({
+        trdShow:flg,
+        num:num
+      })
+    }else if(idx == 5){
+      this.setState({
+        trdShow:flg,
+        num:num
+      })
+    }else if(idx == 4){
+      this.setState({
+        trdShow:flg,
+        num:num
+      })
+    }
+    
+  }
+  render(){
+    const {data,idx} = this.props
+    const {makeSureCom,makeSureWar} = this
+    const {secShow,trdShow,num,trdNum} = this.state
+    return <div className={styles.emergencyParts} ref={this.$cont}>
+      <div className={`${styles.partFst} ${styles.partPub}`}>
+        <p>步骤1</p>
+        <h4>{data.step1.checks}</h4>
+      </div>
+      {secShow?<PartSec idx={idx} data={data.step2} makeSureCom={makeSureCom} makeSureWar={makeSureWar}></PartSec>:null}
+      {trdShow?<PartTrd idx={idx} num={num} trdNum={trdNum} makeSureCom={this.makeSureCom}></PartTrd>:null}
+    </div>
+  }
+}
+
+export default EmergencyProcedure;

+ 260 - 0
src/components/EmergencyProcedure/EmergencyPart/index.less

@@ -0,0 +1,260 @@
+.emergencyParts {
+  border: 1px solid #CFD4DC;
+  border-radius: 5px;
+  overflow: auto;
+  .partPub {
+    padding: 10px 14px;
+    border-bottom: 1px solid #CFD4DC;
+    p{
+      color: #606060;
+    }
+    h4 {
+      color: #FF1D1D;
+      font-size: 16px;
+      padding: 10px 0  5px 0;
+      font-weight: bold;
+      line-height: 20px;
+    }
+  }
+  
+  .partSec {
+    .btn {
+      padding: 7px 10px;
+      float: right;
+      border-radius: 4px;
+    }
+    .emergencyBtn {
+      border: 1px solid #F76601;
+      color: #F76601;
+      margin-right: 10px;
+    }
+    .commonBtn {
+      border: 1px solid #2599FF;
+      color: #2599FF;
+    }
+    p {
+      margin-top: 20px;
+    }
+    .next {
+      height: 48px;
+      line-height: 48px;
+      background: #F76601;
+      border-radius: 4px;
+      padding: 0 20px;
+      color: #fff;
+      font-size: 14px;
+      margin: 10px 0;
+      position: relative;
+      i{
+        float: right;
+        height: 32px;
+        line-height: 32px;
+        padding: 0 10px;
+        text-align: center;
+        border: 1px solid #fff;
+        margin-top: 8px;
+        border-radius: 4px;
+        cursor: pointer;
+      }
+      img {
+        float: right;
+        cursor: pointer;
+        margin-top: 6px;
+        position: absolute;
+        right: 5px;
+      }
+    }
+    .nextCom {
+      background-color: #2599FF;
+    }
+  }
+  
+  .goDownPub {
+    width: 100%;
+    height: 40px;
+    line-height: 40px;
+    text-align: center;
+  }
+  .goDownY{
+    background-color: #feefe5;
+    color: #F76601;
+  }
+  .goDownD{
+    margin-top: 20px;
+    background-color: #fff0f0;
+    color: #FF1D1D;
+    border-radius: 20px;
+    font-size: 16px;
+    font-weight: bold;
+  }
+  .goDownN{
+    background-color: #e9f5ff;
+    color: #2599FF;
+    margin-top: 20px;
+  }
+  .goDownImg{
+    background-color: #fff;
+    height: 20px;
+    line-height: 20px;
+  }
+  .goDownB{
+    border: 1px solid #e9e9e9;
+    border-radius: 4px;
+  }
+  .emergencyBtnS {
+    border: 1px solid #F76601;
+    border-radius: 4px;
+    color: #F76601;
+    height: 36px;
+    line-height: 36px;
+    padding: 0 18px;
+    display: inline-block;
+    margin: 10px 0;
+  }
+  .selectOn {
+    background-color: #F76601;    
+    border: 1px solid #F76601;
+    color: #fff;
+  }
+  .partTrd {
+    border-bottom: 0;
+    .btn {
+      padding: 7px 10px;
+      float: right;
+      border-radius: 4px;
+    }
+    .emergencyBtn {
+      border: 1px solid #F76601;
+      color: #F76601;
+      margin-right: 10px;
+    }
+    .commonBtn {
+      border: 1px solid #2599FF;
+      color: #2599FF;
+    }
+    .next {
+      height: 48px;
+      line-height: 48px;
+      background: #F76601;
+      border-radius: 4px;
+      padding: 0 20px;
+      color: #fff;
+      font-size: 14px;
+      margin: 10px 0;
+      position: relative;
+      i{
+        float: right;
+        height: 32px;
+        line-height: 32px;
+        padding: 0 10px;
+        text-align: center;
+        border: 1px solid #fff;
+        margin-top: 8px;
+        border-radius: 4px;
+        cursor: pointer;
+      }
+      img {
+        float: right;
+        cursor: pointer;
+        margin-top: 6px;
+        position: absolute;
+        right: 5px;
+      }
+    }
+    .nextCom {
+      background-color: #2599FF;
+    }
+    .partLis {
+      padding: 15px 0;
+      border-bottom: 1px solid #CFD4DC;
+      position: relative;
+      p {
+        width: 204px;
+        float: left;
+        line-height: 18px;
+        color: #000;
+      }
+      span {
+        position: absolute;
+        top: 50%;
+        right: 0;
+        margin-top: -18px;
+        width: 162px;
+        height: 36px;
+        line-height: 36px;
+        border: 1px solid #818181;
+        border-radius: 4px;
+        text-align: center;
+        cursor: pointer;
+      }
+    }
+    .warMessage {
+      color: #000;
+      font-size: 16px;
+    }
+    .warTips {
+      height: 46px;
+      line-height: 46px;
+      border: 1px solid #adadad;
+      padding: 0 10px;
+      border-radius: 4px;
+      margin-bottom: 10px;
+    }
+    .line {
+      height: 1px;
+      background-color: #CFD4DC;
+      margin-bottom: 10px ;
+    }
+  }
+  .hold {
+    height: 60px;
+    line-height: 60px;
+    border-top: 1px solid #CFD4DC;
+    .holdRight {
+      height: 36px;
+      line-height: 36px;
+      padding: 0 18px;
+      float: right;
+      border: 1px solid #818181;
+      border-radius: 4px;
+      margin-top: 12px;
+    }
+  }
+  .doList {
+    padding: 7px 15px;
+    background: #ECEFF3;
+    border-radius: 4px;
+    margin-top: 15px;
+    li {
+      margin: 8px 0;
+      line-height: 20px;
+      span {
+        height: 26px;
+        line-height: 26px;
+        padding: 0 10px;
+        background-color: #fff;
+        margin-right: 5px;
+        margin-bottom: 5px;
+        display: inline-block;
+      }
+      input {
+        height: 16px;
+        width: 16px;
+        position: relative;
+        top: 3px;
+      }
+    }
+  }
+  .illDeep {
+    li {
+      float: left;
+      height: 26px;
+      line-height: 26px;
+      padding: 0 10px;
+      margin-right: 10px;
+      border: 1px solid #D7D7D7;
+      border-radius: 4px;
+      cursor: default;
+    }
+  }
+}

+ 451 - 0
src/components/EmergencyProcedure/emergency.js

@@ -0,0 +1,451 @@
+/**
+ * 步骤一
+ * emergencyname   急诊病情
+ * waring  警告  
+ * tips   警告说明
+ * 步骤二
+ * actionname    病情情况(程度)
+ * text   病情情况(程度)右侧按钮文字
+ * link   按钮点击是否跳转,跳转到那个病情下
+ * description    病情情况(程度)描述
+ * choose  步骤三相关内容
+ * next   是否显示第三步
+ */
+let data = [
+    {
+      emergencyname:'胸痛危机重症排除与救治流程',
+      step1:{//步骤1
+        checks:'吸氧、建立12导联心电图、血压监护、抽血测心肌损伤标志物、血气分析、血常规、肾功能、凝血功能'
+      },
+      step2:{//步骤2
+        waring:'判断心电图ST段是否有异常!',
+        tips:'(如果不能明确5-10min重复一次)',
+        select:[],//按钮
+        items:[
+          {actionname:'异常',text:'ACS救治流程(急性冠脉综合征)',link:'4',description:''},
+          {
+            actionname:'无异常',
+            text:'排除ACS胸痛',
+            link:'',
+            description:'判断危机生命的胸痛(心率>110次/分,血压<90/60mmHg晕厥或呼吸次数>25次,全身湿冷)',
+            next:false,
+            choose:[//步骤3
+              {
+                actionname:'是',
+                links:[
+                  {
+                    message:'高血压伴休克体征、撕裂样胸痛,两上肢体血压相差20mmHg以上或者下肢血压较上肢血压低10mmHg',
+                    text:'主动脉夹层救治流程',
+                    link:6
+                  },
+                  {
+                    message:'呼吸困难、顽固性低氧血症,低血压、颈静脉怒张,四肢水肿、晕厥',
+                    text:'肺栓塞救治流程',
+                    link:4
+                  },
+                  {
+                    message:'呼吸困难、一侧肺呼吸音减弱或消失',
+                    text:'气胸救治流程',
+                    link:3
+                  },
+                  {
+                    message:'症状体征提示心包积液',
+                    text:'心包积液救治流程',
+                    link:2
+                  },
+                ]
+              },
+              {
+                actionname:'否',
+                links:[],
+                message:'建议胸痛中心观察6-8h'
+              },
+            ]
+          },
+        ]
+      }
+    },
+    {
+      emergencyname:'心包积液救治流程',
+      step1:{//步骤1
+        checks:'检查超声心动图',
+      },
+      step2:{//步骤2
+        waring:'',
+        tips:'',
+        select:['心外会诊','心内会诊'],//按钮
+        items:[
+          {
+            actionname:'心包积液',
+            text:'确定',
+            link:'',
+            description:'判断是否心包填塞',
+            next:false,
+            choose:[//步骤2
+              {
+                actionname:'是',
+                links:[
+                  {
+                    message:'心包穿刺',
+                    text:'主动脉夹层救治流程',
+                    link:''
+                  },
+                  {
+                    message:'穿刺夜分析对症治疗',
+                    text:'肺栓塞救治流程',
+                    link:''
+                  },
+                  {
+                    message:'抢救室待床!',
+                    text:'',
+                    link:''
+                  }
+                ]
+              },
+              {
+                actionname:'否',
+                links:[
+                  {
+                    message:'积液量少查找病因对症治疗',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'病情未控制病情恶化',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'心包穿刺',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'穿刺夜分析对症治疗',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'抢救室待床!',
+                    text:'',
+                    link:''
+                  }
+                ]
+              },
+            ]
+          },
+          {
+            actionname:'非心包积液',
+            text:'确定',
+            link:'',
+            description:'查找其他原因',
+            next:false,
+            choose:[]
+          },
+        ]
+      }
+    },
+    {
+      emergencyname:'气胸救治流程',
+      step1:{//步骤1
+        checks:'听诊呼吸音是否减弱或消失',
+      },
+      step2:{//步骤2
+        waring:'检查X线或者CT检查',
+        tips:'',
+        select:['普通心内会诊','紧急心内会诊'],//按钮
+        items:[
+          {
+            actionname:'气胸患者',
+            text:'确定',
+            link:'',
+            description:'结合症状体征是否危机生命是否濒死休克',
+            next:true,
+            choose:[
+              {
+                actionname:'是',
+                links:[//步骤3
+                  {
+                    message:'急诊胸穿',
+                    text:'抢救室待救',
+                    link:''
+                  }
+                ]
+              },
+              {
+                actionname:'否',
+                description:'判断肺压缩大于25%或小于25%',
+                links:[
+                  {
+                    message:'建议保守对症治疗止咳、祛痰、急诊留观',
+                    text:'',
+                    diagnose:'择期胸穿',
+                    result:'肺压缩大于25%',
+                    link:''
+                  },
+                  {
+                    message:'建议保守对症治疗止咳、祛痰',
+                    text:'',
+                    diagnose:'',
+                    result:'肺压缩小于25%',
+                    link:''
+                  },
+                  {
+                    message:'病情未控制继续恶化',
+                    result:'择期胸穿',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'病情好转',
+                    result:'门诊随访',
+                    text:'',
+                    link:''
+                  }
+                ]
+              },
+            ]
+          },
+          {
+            actionname:'非气胸患者',
+            text:'',
+            link:'',
+            description:'查找其他原因',
+            next:false,
+            choose:[]
+          },
+        ]
+      }
+    },
+    {
+      emergencyname:'肺栓塞救治流程',
+      step1:{//步骤1
+        checks:'立即检查D-二聚体+床旁超声心动图',
+      },
+      step2:{//步骤2
+        waring:'判断血压是否正常或休克',
+        tips:'',
+        select:[],//按钮
+        items:[
+          {
+            actionname:'伴低血压休克',
+            text:'确定',
+            link:'',
+            description:'判断右心负荷是否增加',
+            next:true,
+            choose:[
+              {
+                actionname:'右心负荷增加(DDI阳性)',
+                select:['呼吸科会诊'],
+                links:[//步骤3
+                  {
+                    message:'生命体征不稳定',
+                    text:['根据病史、体征、PE评分判断病情','考虑溶栓或者血栓切除','ACLS(高级心脏生命支持)','收入ICU'],
+                    link:''
+                  },
+                  {
+                    message:'生命体征稳定建议检查CTAP(肺动脉造影)',
+                    text:'建议检查肺动脉增强CT',
+                    link:''
+                  },
+                  {
+                    message:'阳性',
+                    result:'按肺栓塞治疗',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'阴性',
+                    result:'请相关科室会寻找病因',
+                    text:'',
+                    link:''
+                  }
+                ]
+              },
+              {
+                actionname:'右心负荷不增加(DDI阴性)',
+                links:[
+                  {
+                    message:'建议ACLS(高级心脏生命支持)',
+                    text:'请相关科室会寻找病因',
+                    diagnose:'',
+                    result:'',
+                    link:''
+                  }
+                ]
+              },
+            ]
+          },
+          {
+            actionname:'不伴低血压休克',
+            text:'',
+            link:'',
+            description:'根据临床经验或者PE评分规则评估PE可能性',
+            next:true,
+            choose:[
+              {
+                actionname:'评分高或DDI阳性',
+                description:'建议检查CTPA(肺动脉造影)',
+                links:[
+                  {
+                    message:'阳性',
+                    result:'按肺栓塞治疗',
+                    text:'',
+                    link:''
+                  },
+                  {
+                    message:'阴性',
+                    result:'请相关科室会寻找病因',
+                    text:'',
+                    link:''
+                  }
+                ]
+              },
+              {
+                actionname:'评分低且DDI阴性',
+                links:[
+                  {
+                    message:'排除肺栓塞',
+                    text:'请相关科室会寻找病因'
+                  }
+                ]
+              },
+            ]
+          },
+        ]
+      }
+    },
+    {
+      emergencyname:'急性冠脉综合征救治流程',
+      step1:{//步骤1
+        checks:'立即检查18导联心电图',
+      },
+      step2:{//步骤2
+        waring:'判断心电图ST段是否有异常!',
+        tips:'(如果不能明确5-10min重复一次)',
+        select:['普通心内会诊','紧急心内会诊'],//按钮
+        items:[
+              {
+                actionname:'ST段抬高或新发LBBB',
+                waring:'进一步治疗',
+                tips:'(STEMI处置时间<10min)',
+                prevAction:[
+                  {name:'告病重,立即送抢救室,停止活动,绝对卧床'},
+                  {name:'监测生命体征,持续心电监护,建立静脉通道(左侧肢体,1-2路)'},
+                  {name:'必要时给氧,保持血氧饱和度95%以上'},
+                  {name:'取血化验',list:['血常规','急诊生化','心肌酶谱','Troponinl','凝血功能','术前免疫']},
+                  {name:'床边心超检查'},
+                  {name:'询问相关病史和体格检查'}
+                ],
+                parts:{
+                    text:'询问并立即服用负荷剂量的双抗药物(若未服用)',
+                    description:'阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或2、阿司匹林0.3g+替格瑞洛180mg("心拯救"一包药)',
+                },
+                links:{
+                  title:'患者发病时间!',
+                  timeList:[
+                    {
+                      message:'发病大于12小时',
+                      description:'判断患者是否有急诊PCI指证',
+                      textYes:['启动导管室、获取知情同意联系床位','家属不同意或者导管室到达>60min','排除禁忌后考虑立即溶栓(D-D <30min)','家属同意-导管室直接运转','控制D-B时间<90min'],
+                      textNo:['收住ICU/CCU']
+                    },
+                    {
+                      message:'发病小于12小时',
+                      description:'启动导管室、获取知情同意联系床位',
+                      textYes:['导管室直接运转','控制D-B时间<90min'],
+                      textNo:['家属不同意或者导管室到达>60min','排除禁忌后考虑立即溶栓(D-D <30min)']
+                    },
+                  ]
+                }
+              },
+              {
+                actionname:'ST段压低或无特征性改变',
+                waring:'进一步治疗',
+                tips:'(STEMI处置时间<10min)',
+                parts:{
+                    text:'查血:检查心肌酶谱+Troponinl',
+                    description:['必要时可 Q1-4h  复查','判读结果同时结果回馈心内科会诊'],
+                },
+                links:{
+                  title:'判断检查结果是否异常',
+                  timeList:[
+                    {
+                      message:'诊断NSTEMI-ACS',
+                      description:'询问并立即服用负荷剂量的双抗药物(若未服用)',
+                      text:'阿司匹林0.3g+氯吡格雷300mg/600mg(需急诊手术时)或2、阿司匹林0.3g+替格瑞洛180mg("心拯救"一包药)',
+                      selects:[{
+                          name:'极高危患者',
+                          basis:[
+                            '血流动力学不稳定或心源性休克',
+                            '再发性或药物治疗难以缓解的持续性胸痛',
+                            '危及生命的心律失常或心跳骤停',
+                            '心肌梗死的机械性并发症',
+                            '急性心衰',
+                            'ST-T动态改变,特别是间歇性ST段抬高',
+                            '以上依据都不符合'
+                          ],
+                        },
+                        {
+                          name:'高危患者',
+                          basis:[
+                            '肌钙蛋白水平升高或降低与心梗一致',
+                            '动态ST或T波改变(有或无症状)',
+                            'GRACE评分>140',
+                            '以上依据都不符合'
+                          ]
+                        },
+                        {
+                          name:'中危患者',
+                          basis:[
+                            '糖尿病',
+                            '肾功能不全(eGFR<60ml/min/1.73m2)',
+                            'LVEF<40%或充血性心力衰竭',
+                            '梗死后早起心绞痛',
+                            '近期PCI史',
+                            '之前CABG史',
+                            'GRACE评分>109且<140',
+                            '以上依据都不符合'                            
+                          ]
+                        },
+                        {
+                          name:'低危患者',
+                          basis:[]
+                        },
+                      ]
+                    },
+                    {
+                      message:'排除NSTEMI-ACS',
+                      description:'已排除NSTEMI-ACS ,请其他诊室会诊!'
+                    },
+                  ]
+                }
+              },
+            ]
+      }
+
+    },
+    {
+      emergencyname:'主动脉夹层救治流程',
+      step1:{//步骤1
+        checks:'立即检查D-二聚体+床旁超声心动图',
+      },
+      step2:{//步骤2
+        waring:'判断DDI和TTE阴性或阳性!',
+        tips:'',
+        select:[],//按钮
+        items:[
+          {
+            actionname:'DDI阳性或TTE阳性(疑似AD)'
+          },
+          {
+            actionname:'DDI阴性或TTE阴性',
+          },
+        ]
+      }
+
+    },
+  ]
+
+
+  export default data;

BIN
src/components/EmergencyProcedure/img/back.png


BIN
src/components/EmergencyProcedure/img/down.png


BIN
src/components/EmergencyProcedure/img/jianb.png


BIN
src/components/EmergencyProcedure/img/left.png


BIN
src/components/EmergencyProcedure/img/pic.png


BIN
src/components/EmergencyProcedure/img/pic1.jpg


BIN
src/components/EmergencyProcedure/img/pic2.jpg


BIN
src/components/EmergencyProcedure/img/pic3.jpg


BIN
src/components/EmergencyProcedure/img/pic4.png


BIN
src/components/EmergencyProcedure/img/pic5.jpg


BIN
src/components/EmergencyProcedure/img/right.png


BIN
src/components/EmergencyProcedure/img/small.png


+ 51 - 0
src/components/EmergencyProcedure/index.jsx

@@ -0,0 +1,51 @@
+import styles from './index.less';
+import right from './img/right.png';
+import EmergencyModal from './EmergencyModal';
+import $ from 'jquery';
+
+class EmergencyProcedure extends React.Component {
+  constructor(props){
+    super(props);
+    this.state = {
+      show:false,
+      data:{}
+    }
+  }
+  
+  slideToggle(type){
+    if(type){
+      $("#emergencyName").css({"display":"block","paddingLeft":"50px","paddingRight":"30px"})
+      $("#emergencyPic").css("display","block")
+      $("#emergencys").css("display","none")
+      $("#emergency").css("display","block")
+      $("#emergencyWrap").css({"width":"auto","height":"44px"})
+    }else{
+      $("#emergencyName").css({"display":"none","padding":"0"})
+      $("#emergencyPic").css("display","none")
+      $("#emergencyWrap").css({"width":"44px","height":"44px"})
+      $("#emergencys").css("display","block")
+      $("#emergency").css("display","none")
+    }
+  }
+  handleShow(type){
+    this.setState({
+      show:type
+    })
+  }
+  render(){
+    const {data,setDataIdx,idx} = this.props;
+    return <div className={styles.emergencyProdureWrap}>
+      <div id="emergencyWrap" className={styles.emergencyWrap}>
+        <span id="emergency" className={`${styles.emergency}`} onClick={()=>this.slideToggle(0)}>急</span>
+        <span id="emergencys" onClick={()=>this.slideToggle(1)} className={styles.emergency}>急</span>
+        <div id="emergencyName" className={styles.emergencyName} onClick={()=>this.handleShow(true)}>{data.emergencyname}</div>
+        <i  onClick={()=>this.slideToggle(0)} id="emergencyPic"><img src={right} alt=""/></i>
+      </div>
+      {
+        this.state.show?<EmergencyModal idx={idx} handleShow={()=>this.handleShow()} setDataIdx={setDataIdx} data={data}></EmergencyModal>:null
+      }
+    </div>
+  }
+}
+
+export default EmergencyProcedure;

+ 54 - 0
src/components/EmergencyProcedure/index.less

@@ -0,0 +1,54 @@
+.emergencyProdureWrap {
+  .emergencyWrap {
+    moz-user-select: -moz-none;
+    -moz-user-select: none;
+    -o-user-select: none;
+    -khtml-user-select: none;
+    -webkit-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    position: fixed;
+    z-index: 205;
+    top: 55px;
+    right: 20px;
+    width: 44px;
+    height: 44px;
+    line-height: 44px;
+    border-radius: 22px;
+    border: 2px solid #F93333;
+    background-color: #fff;
+    cursor: pointer;
+
+    .emergencyName {
+      overflow: hidden;
+      display: none;
+    }
+
+    i {
+      position: absolute;
+      top: 0px;
+      right: 10px;
+      width: 22px;
+      height: 40px;
+
+      img {
+        position: relative;
+        top: 6px;
+      }
+    }
+  }
+
+  .emergency {
+    width: 40px;
+    height: 40px;
+    line-height: 40px;
+    position: absolute;
+    left: 0;
+    z-index: 101;
+    text-align: center;
+    border-radius: 50%;
+    color: #fff;
+    z-index: 100;
+    background-color: #F93333;
+  }
+}

+ 25 - 20
src/components/Inspect/index.jsx

@@ -115,20 +115,25 @@ class Inspect extends React.Component {
               complete: function (err, xhr) {
                 if (!err) {
                   let res = JSON.parse(xhr.response);
-                  let message = res.data.messages;
-                  store.dispatch(getExcelList(res.data));
-                  fetchPushInfos && fetchPushInfos();
-                  if (message && message.length != 0) {
-                    that.setState({
-                      visible: true,
-                      dom: message,
-                      height: message.length
-                    })
+                  if(res.code == 0){
+                    let message = res.data.messages;
+                    store.dispatch(getExcelList(res.data));
+                    fetchPushInfos && fetchPushInfos();
+                    if (message && message.length != 0) {
+                      that.setState({
+                        visible: true,
+                        dom: message,
+                        height: message.length
+                      })
+                    }
+                  }else{
+                    Notify.error(res.msg)
                   }
                   $("#choose").val("");
                 } else {
                   let res = JSON.parse(xhr.response);
                   Notify.error(res.msg)
+                  $("#choose").val("");
                 }
               }
             });
@@ -200,29 +205,29 @@ class Inspect extends React.Component {
         <div className={styles.top}>
           <span id="inspectResultData">化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()} style={{ display: hospitalMsg.importWayLis == 0 ? 'none' : 'block' }}>
-            {/* <button disabled={ieVersion&&ieVersion>9?true:false}>导入化验结果</button> */}
-            {/* <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
+          <div className={this.getStyle()} style={{ display: hospitalMsg.value == 0 ? 'none' : 'block' }}>
+            {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
+            <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
 
             {/* {0没有,1本地,2医院,3本地和医院} */}
             {
-              hospitalMsg.importWayLis == 3 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
+              hospitalMsg.value == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
                 <p className={styles.importInspectBtn}>导入化验结果</p>
-                <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
-              </div> : hospitalMsg.importWayLis == 22 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+                <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+              </div> : hospitalMsg.value == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
                 <p className={styles.importInspectBtn}>导入化验结果</p>
-              </div> : hospitalMsg.importWayLis == 2 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
+              </div> : hospitalMsg.value == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
                 <p id="importInspectBtn" className={styles.importInspectBtn}>导入化验结果</p>
                 {
-                  importLis?<ul className={styles.importSelect} id="importList">
+                  <ul className={styles.importSelect} style={{display:importLis?'block':'none'}} id="importList">
                     <li className={styles.excelIpt}>
                       <div onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>本地导入</div>
-                      <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
+                      <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
                     </li>
                     <li className={`${styles.excelIpt} ${styles.systemIpt}`} onClick={checkSystemIpt}>检查系统导入</li>
-                  </ul>:null
+                  </ul>
                 }
-                  </div> : null
+              </div> : null
             }
 
             {

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

@@ -92,7 +92,7 @@
   box-shadow: 0 10px 20px 0 #989DA3;
   border: 1px solid #dedede;
   background-color: #fff;
-  // display: none;
+  display: none;
   li {
     height: 34px;
     line-height: 34px;

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

@@ -266,7 +266,7 @@ class NumberDrop extends Component{
                 onClick={allClick?this.handleNumClick:null}
                 contentEditable={editable}
                 onBlur={this.handleBlur}
-                onkeydown={handleEnter}
+                onKeyDown={handleEnter}
                 onFocus={(e)=>{e.stopPropagation()}}>
       <span ref = {this.$pre}>&nbsp;{prefix}</span>
       <span onFocus={this.handleNumFocus}

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

@@ -5,8 +5,7 @@ import doubtImg from "../../common/images/doubt.png";
 import recommendImg from "../../common/images/recommend.png";
 import tipsImg from "../../common/images/tips.png";
 import vigilantImg from "../../common/images/vigilant.png";
-import showImg from "../../common/images/show.png";
-import hideImg from "../../common/images/close.png";
+import likelyImg from "../../common/images/likely.png";
 import DetailsModal from './DetailsModal';
 import PushDiag from "./PushDiag";
 import DiagnosticItem from "@containers/DiagnosticItem";
@@ -144,6 +143,7 @@ class PushItems extends Component {
       determine,
       doubt,
       possible,
+      likely,
       assay,
       check,
       tips,
@@ -196,6 +196,15 @@ class PushItems extends Component {
                 maxShowNum={24}
               />
             )}
+            {likely && likely.length > 0 && (
+              <PushDiag
+                titleBg="#FAEBEC"
+                icon={likelyImg}
+                title="鉴别诊断"
+                diagList={likely}
+                maxShowNum={24}
+              />
+            )}
             <div className={style["diagnose"]}>
               {vigilant.length === 0 &&
                 determine.length === 0 &&

+ 1 - 0
src/components/RadioInpDrop/index.jsx

@@ -216,6 +216,7 @@ class InputComp extends Component{
     return editable?<span contentEditable={true}
                  className={style['inner-inp']}
                  onClick={(e)=>{e.stopPropagation()}}
+                 onFocus={(e)=>{e.stopPropagation()}}
                  onBlur={this.handleBlur}>{value}</span>:<span>{value}</span>
   }
 }

+ 11 - 4
src/components/ScaleSearch/index.jsx

@@ -24,12 +24,19 @@ class ScaleSearch extends Component {
     }
     return '';
   }
+  showScale(item){
+    const {scaleInfo,getScale,showScaleFn} = this.props;
+    if(scaleInfo&&scaleInfo[item.id]){
+      showScaleFn&&showScaleFn(item);
+    }else{
+      getScale(item);
+    }
+  }
   getSearchList() {
-    const { searchResult,getScale } = this.props;
+    const { searchResult } = this.props;
     return searchResult && searchResult.map((item) => {
-      return <li key={item.conceptId} onClick={()=>getScale({id:item.conceptId,name:item.name})}>
-        <span className={style['scale-name']}>{item.name}</span>
-        {this.getResult(item.conceptId)}
+      return <li key={item.conceptId} onClick={this.showScale.bind(this,{id:item.conceptId,name:item.name})}>
+        <span className={style['scale-name']}>{item.name}{this.getResult(item.conceptId)}</span>
         <button>查看</button>
       </li>;
     });

+ 159 - 24
src/components/ScaleTable/index.jsx

@@ -4,11 +4,14 @@ import { Radio,CheckBtn ,Notify} from '@commonComp';
  import Information from '../Information';
  import {getFormulaResult} from '@store/async-actions/fetchModules.js';
 /**
-*量表明细组件
-*scaleName: 量表标题;
-*data: store中存的所有量表;
-*tableId:表格id,根据id从data中拿到当前量表的内容;
-*formulaResult:store中存的量表计算结果;
+*量表明细 @By_Liucf
+*title: 量表标题/scaleName;
+*tableId:量表id;
+*scaleType:量表类型, 1-计分量表,接口算分;2-不计分量表,前端拼接结果;
+*required:是否为必填项,1-必填,0-非必填;
+*isSelect:必填项选中标识,true-表示该项下已有选中数据;
+*select: 明细选中标识,1-选中,0-未选中;
+*comfirnFlag:不计分量表父级确定事件标识,用于触发是否有必填项未填;
 **/
 class ScaleTable extends React.Component{
   constructor(props){
@@ -17,10 +20,42 @@ class ScaleTable extends React.Component{
       selecteds:{},  //当前页面的选中标识,保存后使用select标识
       valueData:{},
       start:false,   //点击计算
-      scaleResult1:null
+      scaleResult1:null,
+      result:{},
+      saveFlag:false
     }
     this.handleFormula = this.handleFormula.bind(this);
   }
+  // 不计分选中事件
+  handleRadio2(name,item,index){
+    const {selecteds,valueData,result} = this.state;
+    const selectName = item.detailName;
+    const selectResult = item.result;
+    // let newResult = Object.assign({},result,{[name]:selectName+'('+selectResult+')'});
+    // 使用index,便于按顺序拼接结果
+    let newResult = Object.assign({},result,{[index]:selectName+'('+selectResult+')'});
+    this.setState({
+      selecteds:Object.assign({},selecteds,{[name]:selectName}),
+      result:newResult
+    })
+    const datas = JSON.parse(JSON.stringify(valueData));
+    let rows = datas.rows;
+    for(let i=0; i<rows.length; i++){
+      if(rows[i].name==name){
+        rows[i].isSelect = true;
+        let details = rows[i].details;
+        for(let k=0; k<details.length; k++){
+          details[k].select = 0;
+          if(details[k].detailName == selectName){
+            details[k].select = 1;
+          }
+        }
+      }
+    }
+    this.setState({
+      valueData:datas
+    })
+  }
   
   handleRadio(groupName,name,item,indexId){
     const {selecteds,valueData} = this.state;
@@ -177,34 +212,87 @@ class ScaleTable extends React.Component{
     }
     return scale;
   }
-  componentWillReceiveProps(nextProps){ 
-    const {tableId} = this.props;
+  // 不计分结果
+  getType2Reult(){
+    const {result} = this.state;
+    if(JSON.stringify(result) != '{}'){
+      let data = '';
+      for(let i in result){
+        if(result[i]){
+          data += result[i]+',';
+        }
+      }
+      return data.slice(0,data.length-1);
+    }
+    return ''
+  }
+  componentWillReceiveProps(nextProps){
+    const {tableId,saveScaleData,getResult,closeTable,scaleInfo,unscroeClose} = this.props;
+    const {valueData,saveFlag} = this.state;
     const data = nextProps.scaleInfo;
-    if(JSON.stringify(data) !== '{}' && data[tableId]){
+    // if(JSON.stringify(data) !== '{}' && data[tableId]){
+    if(JSON.stringify(data) !== '{}' && data[tableId] && JSON.stringify(valueData) == '{}'){
       let scale = this.filterScale(data[tableId]);
       this.setState({
-        // valueData:JSON.parse(nextProps.scaleInfo[tableId][1].content),
         valueData:scale.content?JSON.parse(scale.content):{}
       })
     }
+    if(nextProps.comfirnFlag){
+      //非计分量表校验必填项
+      if(valueData.scaleType==2){
+        let unfinish;
+        const rows = valueData.rows;
+        for(let i=0; i<rows.length; i++){
+          if(rows[i].required==1 && !rows[i].isSelect){//必填项未填
+            unfinish = true;
+          }
+        }
+        if(unfinish){
+          Notify.info("请先将量表内容选择完整");
+          return
+        }
+        unscroeClose();
+      }else{
+        closeTable();//计分量表关闭弹窗
+      } 
+    }
   }
   componentDidMount(){
-    const {tableId,scaleInfo} = this.props;
+    const {tableId,scaleInfo,resetFlag} = this.props;
+    resetFlag&&resetFlag();//重置确定标识
     if(scaleInfo&&scaleInfo[tableId]){
       let scale = this.filterScale(scaleInfo[tableId]);
+      // 回读非计算量表结果result
+      let data = scale.content?JSON.parse(scale.content):{};
+      let result = {};
+      if(data.scaleType==2){
+        let rows = data.rows;
+        for(let i=0; i<rows.length; i++){
+          if(rows[i].isSelect){
+            let details = rows[i].details;
+            for(let j=0; j<details.length; j++){
+              if(details[j].select==1){
+                result[i] = details[j].detailName+'('+details[j].result+')'
+              }
+            }
+          }else{
+            result[i] = '';
+          }
+        }
+      }
       this.setState({
-        // valueData:JSON.parse(scaleInfo[tableId][1].content)
-        valueData:scale.content?JSON.parse(scale.content):{}
-      })
+        valueData:data,
+        result:result
+      }) 
     }  
   }
   componentWillUnmount(){
     // 储存计算结果和选择后的data
-    const {tableId,getResult,scaleInfo,saveScaleData,formulaResult} = this.props;
-    const {valueData,scaleResult1,start} = this.state;
+    const {tableId,getResult,scaleInfo,saveScaleData,formulaResult,comfirnFlag,flagT} = this.props;
+    const {valueData,scaleResult1,start,saveFlag} = this.state;
     // 替换表格内容--1)没有点计算且没有计算结果;2)点了计算
     const scaleResult = scaleResult1 || formulaResult&&formulaResult[tableId]; //量表计算结果
-    if(start || !scaleResult){
+    if(start || !scaleResult && valueData.scaleType==1){//仅计分量表储存
       let allDatas = scaleInfo[tableId]?JSON.parse(JSON.stringify(scaleInfo[tableId])):'' ;
       if(allDatas){
         for(let i=0; i<allDatas.length; i++){
@@ -216,7 +304,6 @@ class ScaleTable extends React.Component{
         saveScaleData&&saveScaleData({id:tableId,data:allDatas});
       }
     }
-    
      if(scaleResult1){
       const params = {
         type:1,
@@ -225,13 +312,43 @@ class ScaleTable extends React.Component{
       }
       getResult&&getResult(params);
     }
+    // 非计分
+    if(comfirnFlag && flagT){
+      // 存值-拼成与计算接口返回的格式一致
+      const data1 = {
+        calcalculate:{
+          result:{
+            value:this.getType2Reult()
+          }
+        }
+      }
+      const params = {
+        type:1,
+        data:data1,
+        id:tableId,
+      }
+      getResult&&getResult(params);
+      // 存数据源
+      let allDatas = scaleInfo[tableId]?JSON.parse(JSON.stringify(scaleInfo[tableId])):'' ;
+      if(allDatas){
+        for(let i=0; i<allDatas.length; i++){
+          if(allDatas[i].type==1){
+            allDatas[i].content = JSON.stringify(valueData);
+          }
+        }
+        saveScaleData&&saveScaleData({id:tableId,data:allDatas});
+      }
+    }
   }
   getContent(){ 
     let {selecteds,valueData,start,scaleResult1} = this.state;
-    const {tableId,formulaResult} = this.props;
+    const {tableId,formulaResult,comfirnFlag} = this.props;
     const scaleResult = scaleResult1 || formulaResult&&formulaResult[tableId]; //量表计算结果
-    const datas = valueData&&valueData.group?valueData:'';//console.log(666,datas);
-    let content =  datas&&datas.group&&datas.group.map((v,i)=>{
+    // const datas = valueData&&valueData.group?valueData:'';
+    const datas = valueData;
+    let content;
+    if(valueData&&valueData.scaleType==1){//计分
+      content =  datas&&datas.group&&datas.group.map((v,i)=>{
                 return <div className={style['group']}>
                   <p className={style['groupName']}>{v.groupName}</p>
                   {v.rows&&v.rows.map((it,ind)=>{
@@ -286,11 +403,29 @@ class ScaleTable extends React.Component{
                   </p>:''}  
                 </div>
               })
+    }else if(valueData&&valueData.scaleType==2){//不计分
+      content =  datas&&datas.rows.map((item,i)=>{
+        return <div className={style['block']} style={{border:item.required==1&&!item.isSelect&&comfirnFlag?'1px solid #f00':'none'}}>
+            <p className={style['miniName']}>{item.name}</p>
+            {item.details&&item.details.map((vv,ii)=>{
+              return <div className={style['item']}>
+                      <Radio label={vv.detailName+'('+vv.result+')'}
+                         isSelect={vv.select==1||selecteds[item.name]==vv.detailName}
+                         handleClick={this.handleRadio2.bind(this,item.name,vv,i)}>
+                      </Radio>
+                      {vv.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
+                  </div>
+            })}
+            
+          </div>
+      })
+    }
+
     return content;
   }
 
   render(){
-    const {scaleInfo,tableId,formulaResult} = this.props;
+    const {scaleInfo,tableId,formulaResult,resRef} = this.props;
     const data = scaleInfo[tableId];
     let {selecteds,scaleResult1} = this.state;
     const scale = data && this.filterScale(data);
@@ -309,9 +444,9 @@ class ScaleTable extends React.Component{
                   {this.getContent()}
                   {datas&&datas.Calc==1?<div className={style['total']}>
                     <span>总分:</span>
-                    <span>{scaleResult&&scaleResult.calcalculate&&scaleResult.calcalculate.result&&scaleResult.calcalculate.result.value +' '+ (scaleResult.calcalculate.result.text?scaleResult.calcalculate.result.text:'')}</span>
+                    <span ref={resRef}>{scaleResult&&scaleResult.calcalculate&&scaleResult.calcalculate.result&&scaleResult.calcalculate.result.value +' '+ (scaleResult.calcalculate.result.text?scaleResult.calcalculate.result.text:'')}</span>
                     <span className={style['totalBtn']} onClick={this.handleFormula}>得分</span>
-                  </div>:''}
+                  </div>:<p className={style['totalR']}>{"结果:"}{this.getType2Reult()||scaleResult&&scaleResult.calcalculate&&scaleResult.calcalculate.result&&scaleResult.calcalculate.result.value}</p>}
                 </div>
               }
             })}

+ 11 - 2
src/components/ScaleTable/index.less

@@ -31,10 +31,10 @@ strong{
     .recomand{
       color:#3B9ED0;
     }
-    .block{
+    /* .block{
       margin-top: 20px;
       padding: 5px 0 0 30px;
-    }
+    } */
     .redBorder{
       border: 1px solid #f00;
     }
@@ -87,6 +87,15 @@ strong{
       margin-left: 40px;
     }
   }
+  .block{
+    margin-top: 20px;
+    padding: 5px 0 0 30px;
+  }
+  .totalR{
+    text-align: right;
+    height: 72px;
+    line-height: 72px;
+  }
 }
 .printShow {
   display: none;

+ 13 - 13
src/components/WrapModalBody/WrapModalTableSon/index.jsx

@@ -33,13 +33,13 @@ class WrapModalTableSon extends React.Component {
       <div className={`${style.SonTable}`}>
         <table>
           <tr className={style.head}>
-            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
-            <td className={`${style.sec} ellipsOver`}>编号</td>
-            <td className={`${style.trd} ellipsOver`}>项目名称</td>
-            <td className={`${style.four} ellipsOver`}>结果</td>
-            <td className={`${style.fif} ellipsOver`}>单位</td>
-            <td className={`${style.six} ellipsOver`}>参考值</td>
-            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.length)>5?'':'none'}}></td>
+            <td className={`${style.fst}`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec}`}>编号</td>
+            <td className={`${style.trd}`}>项目名称</td>
+            <td className={`${style.four}`}>结果</td>
+            <td className={`${style.fif}`}>单位</td>
+            <td className={`${style.six}`}>参考值</td>
+            <td className={`${style.sev}`} style={{display:(hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.length)>5?'':'none'}}></td>
           </tr>
         </table>
       </div>
@@ -49,20 +49,20 @@ class WrapModalTableSon extends React.Component {
           {
             hospitalSonInspect && hospitalSonInspect.lisExcelWrapper && hospitalSonInspect.lisExcelWrapper.map((item, idx) => {
               return <tr>
-                <td className={`${style.fst} ellipsOver`}>
+                <td className={`${style.fst}`}>
                   {
                     this.getImgPath(item.itemName,hospitalSonInspect.groupName,item)
                   }
                 </td>
-                <td className={`${style.sec} ellipsOver`}>{idx+1}</td>
-                <td title={item.itemName} className={`${style.trd} ellipsOver`}>{item.itemName}</td>
-                <td title={item.value} className={`${style.four} ellipsOver`}>
+                <td className={`${style.sec}`}>{idx+1}</td>
+                <td title={item.itemName} className={`${style.trd}`}>{item.itemName}</td>
+                <td title={item.value} className={`${style.four}`}>
                   {
                     getStatusImg(item.type,item.value,0)
                   }
                 </td>
-                <td title={item.unit} className={`${style.fif} ellipsOver`}>{item.unit}</td>
-                <td title={`${item.min}-${item.max}`} className={`${style.six} ellipsOver`}>{item.min}-{item.max}</td>
+                <td title={item.unit} className={`${style.fif}`}>{item.unit}</td>
+                <td title={`${item.min}-${item.max}`} className={`${style.six}`}>{item.min}-{item.max}</td>
               </tr>
             })
           }

+ 2 - 2
src/components/WrapModalBodyPac/Item/index.jsx

@@ -7,8 +7,8 @@ class Item extends React.Component {
   constructor(props) {
     super(props);
     this.state={
-      startTime:getCurrentDate(false,'/')+' 00:00:00',
-      endTime:getCurrentDate(false,'/')+' 23:59:59',
+      startTime:getCurrentDate(false)+' 00:00:00',
+      endTime:getCurrentDate(false)+' 23:59:59',
       code:'',
       name:'',
       sex:'',

+ 9 - 9
src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx

@@ -32,11 +32,11 @@ class WrapModalTableSon extends React.Component {
       <div className={`${style.SonTable}`}>
         <table>
           <tr className={style.head}>
-            <td className={`${style.fst} ellipsOver`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
-            <td className={`${style.sec} ellipsOver`}>检查项目</td>
-            <td className={`${style.trd} ellipsOver`}>影像所见</td>
-            <td className={`${style.four} ellipsOver`}>影像诊断</td>
-            <td className={`${style.sev} ellipsOver`} style={{display:(hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.length)>5?'':'none'}}></td>
+            <td className={`${style.fst}`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
+            <td className={`${style.sec}`}>检查项目</td>
+            <td className={`${style.trd}`}>影像所见</td>
+            <td className={`${style.four}`}>影像诊断</td>
+            <td className={`${style.sev}`} style={{display:(hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.length)>5?'':'none'}}></td>
           </tr>
         </table>
       </div>
@@ -46,14 +46,14 @@ class WrapModalTableSon extends React.Component {
           {
             hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.map((item, idx) => {
               return <tr>
-                <td className={`${style.fst} ellipsOver`}>
+                <td className={`${style.fst}`}>
                   {
                     this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item)
                   }
                 </td>
-                <td title={item.checkItem} className={`${style.sec} ellipsOver`}>{item.checkItem}</td>
-                <td title={item.imagingDiagnose} className={`${style.trd} ellipsOver`}>{item.imagingDiagnose}</td>
-                <td title={item.imagingResults} className={`${style.four} ellipsOver`}>{item.imagingResults}</td>
+                <td title={item.checkItem} className={`${style.sec}`}>{item.checkItem}</td>
+                <td title={item.imagingDiagnose} className={`${style.trd}`}>{item.imagingDiagnose}</td>
+                <td title={item.imagingResults} className={`${style.four}`}>{item.imagingResults}</td>
               </tr>
             })
           }

+ 2 - 1
src/containers/AssessResult.js

@@ -100,11 +100,12 @@ function mapDispatchToProps(dispatch) {
         data:deepClone(data)
       })
     },
-    showScaleFn(item){
+    showScaleFn(item,isPop){
       dispatch({
         type:SHOW_TABLE_LIST,
         name:'showTable',
         value:true,
+        isPop,
         item:Object.assign({},item)
       });
     },

+ 1 - 2
src/containers/AssistCheck.js

@@ -17,10 +17,9 @@ function mapStateToProps(state) {//console.log(state.assistCheck)
         assistList:state.homePage.assistList,
         assistVal:state.assistCheck.assistVal,
         windowHeight:state.homePage.windowHeight,
-        hospitalMsg: state.patInfo.hospitalMsg,
+        hospitalMsg: state.patInfo.hospitalMsg.pacs || {},
 
         message: state.patInfo.message,
-        hospitalMsg: state.patInfo.hospitalMsg,
         hospitalPac: state.assistCheck.hospitalPac,
         hospitalSonInspect: state.assistCheck.hospitalPacObj,
         checkedList: state.assistCheck.checkedList,

+ 2 - 2
src/containers/ChronicInfo.js

@@ -69,11 +69,11 @@ function mapDispatchToProps(dispatch){
         id:it.type==1?it.content.id:undefined,      //只有量表需要记录id,去重用
       })
     },
-    addScaleItems(obj,i){
+    addScaleItems(obj,id){
       dispatch({
         type:ADD_WHOLE_SCALE_ITEMS,
         data:obj,
-        index:i
+        id
       })
     },
     //保存管理评估

+ 1 - 1
src/containers/Inspect.js

@@ -38,7 +38,7 @@ function mapStateToProps(state) {//console.log(state.inspect)
     windowHeight: state.homePage.windowHeight,
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
-    hospitalMsg: state.patInfo.hospitalMsg,
+    hospitalMsg: state.patInfo.hospitalMsg.lis || {},
     hospitalInspect: state.inspect.hospitalInspect,
     hospitalSonInspect: state.inspect.hospitalInspectObj,
     allCheck: state.inspect.allCheck,

+ 15 - 3
src/containers/ScaleSearchContainer.js

@@ -1,13 +1,16 @@
 import React from 'react';
 import { connect } from 'react-redux';
-import { getSearchList } from '@store/async-actions/ScaleSearch';
+import { getSearchList } from '@store/async-actions/scaleSearch';
 import ScaleSearch from '@components/ScaleSearch';
 import {getScaleInfo} from '../store/async-actions/pushMessage';
+import {SHOW_TABLE_LIST} from '@store/types/pushMessage';
 
 function mapStateToProps(state) {
+    const {pushMessage} = state;
     return{
         searchResult: state.scaleSearch.searchResult,
-        formulaResult: state.pushMessage.formulaResult,//Á¿±íÄÚÈÝ
+        formulaResult: pushMessage.formulaResult,//????????
+        scaleInfo: pushMessage.scaleInfo,//��������
     }
 }
 
@@ -18,7 +21,16 @@ function mapDispatchToProps(dispatch) {
         },
         getScale(name) {
             dispatch(getScaleInfo(name))
-        }
+        },
+        showScaleFn(item,isPop){
+          dispatch({
+            type:SHOW_TABLE_LIST,
+            name:'showTable',
+            value:true,
+            isPop,
+            item:Object.assign({},item)
+          });
+        },
     }
 }
 const ScaleSearchContainer = connect(

+ 2 - 1
src/containers/ScaleTable.js

@@ -16,7 +16,8 @@ function mapDispatchToProps (dispatch){
       dispatch({
         type:SAVE_TABLE_RESULT,
         id:obj.id,  //量表id
-        data:Object.assign({},obj.data,{pIndex:obj.pIndex})
+        // data:Object.assign({},obj.data,{pIndex:obj.pIndex})
+        data:Object.assign({},obj.data)
       })
     },
     saveScaleData(obj){//储存表格数据

+ 2 - 2
src/containers/SpreadDrop.js

@@ -11,7 +11,7 @@ import {SETCHECKBOX,CHANGECHECKTEXTLABEL,CHECKCONFIRMSELECTED} from '@types/chec
 import {CURRENT_CONFIRM,SETMAINCHECKBOX,CURRENT_TEXT_LABEL,CURRENT_GET_BIGDATAPUSH} from '@types/currentIll';
 import {billing} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
-import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText,getIds} from '@utils/tools.js';
+import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText,checkFullfillText,getIds} from '@utils/tools.js';
 import config from '@config/index.js';
 
 function mapStateToProps(state) {//console.log(state);
@@ -272,7 +272,7 @@ function checkBodyConfirm(dispatch,store,params){
       });
       dispatch({
         type: CHECKCONFIRMSELECTED,
-        data: {exists:fullfillText(has,false,false).newArr,withs:fullfillText(wes,false,false).newArr,nones:nones,ikey,copyType}
+        data: {exists:checkFullfillText(has).newArr,withs:checkFullfillText(wes).newArr,nones:nones,ikey,copyType}
       });
       dispatch({
         type:ISREAD

+ 13 - 3
src/modules/HomePage/index.jsx

@@ -3,21 +3,24 @@ import { connect } from "react-redux";
 import BannerContainer from '@containers/TypeConfigContainer';
 //  引入组件
 import BodyContainer from "@components/BodyContainer";
+import EmergencyProcedure from '@components/EmergencyProcedure';
 
 import {HIDEDROP,SETMINSCREEN} from '@store/types/homePage.js';
 import style from './index.less';
 import {getInitModules,getChronic} from '@store/async-actions/homePage.js';
 import { getUrlArgObject } from "@utils/tools";
 import $ from 'jquery';
+import data from '@components/EmergencyProcedure/emergency';
 import loading from '@common/images/loading.gif';
 class HomePage extends Component {
     constructor() {
         super();
         this.state={
-            timer:null
+            timer:null,
+            idx:getUrlArgObject('emergency')+''
         }
+        this.setDataIdx = this.setDataIdx.bind(this)
     }
-    
     componentDidMount(){
         const {setWindow,getChronicList} = this.props;
         getChronicList&&getChronicList();//获取慢病列表
@@ -51,13 +54,20 @@ class HomePage extends Component {
             } 
         })
     }
-
+    setDataIdx(index){
+      this.setState({
+        idx:index+''
+      })
+    }
     render() {
         const {flag} = this.props;
         return <div className={style['home-page']} onClick={this.props.hideAllDrop}>
             <BannerContainer />
             {/* <InfoTitle /> */}
             <BodyContainer></BodyContainer>
+            {
+              this.state.idx&&data[this.state.idx]?<EmergencyProcedure data={data[this.state.idx]} idx={this.state.idx} setDataIdx={this.setDataIdx}></EmergencyProcedure>:null
+            }
             <div className={style['mask']} style={{display:flag?"block":"none"}}>
                 <img src={loading} className={style['load']}/>
             </div>

+ 15 - 10
src/store/actions/checkBody.js

@@ -1,5 +1,5 @@
 import config from '@config/index.js';
-import {formatContinueDots,getLabelIndex,fullfillText} from '@utils/tools.js';
+import {formatContinueDots,getLabelIndex,fullfillText,checkFullfillText} from '@utils/tools.js';
 
 export function preSetCheckbody(state,action) {
   let res = Object.assign({},state);
@@ -11,7 +11,7 @@ export function preSetCheckbody(state,action) {
 export function set(state,action){
   let res = Object.assign({},state);
   const {data} = action;
-  const obj = fullfillText(data,false,false,false);
+  const obj = checkFullfillText(data);
   res.data = obj.newArr;
   res.saveText = obj.saveText;//存逗号
   res.showAll = obj.checkHiddenDefault;
@@ -67,7 +67,7 @@ export const confirm = (state,action) =>{
   arr.splice(ikey,0,...exists,...withs);
   //arr[ikey-1].value = text;
   //res.saveText[ikey+items.length] = text;
-  res.saveText = fullfillText(arr).saveText;
+  res.saveText = checkFullfillText(arr).saveText;
   res.update=Math.random();         //用于触发组件更新(data变化了因在对象中无法被组件检测到)
   return res;
 };
@@ -251,7 +251,7 @@ export function setCheckBoxValue(state,action) {
   }
   res.data[labelInx].value = showText;
   res.selecteds[labelInx] = action.data;
-  res.saveText = fullfillText(res.data).saveText;
+  res.saveText = checkFullfillText(res.data).saveText;
   res.update = Math.random();
   return res;
 }
@@ -271,7 +271,7 @@ export function insertLabelData(state,action){
   const searchStr = res.searchStr;
   const {index,data,isReplace,span,searchInEnd}=action;
   const showText = res.saveText[index];
-  let tempLabels = data.tagType==4?fullfillText(data.questionMapping).newArr:[data];
+  let tempLabels = data.tagType==4?checkFullfillText(data.questionMapping).newArr:[data];
   tempLabels = formatContinueDots(tempLabels);
   //查体中,默认显示区域搜索出来的标签要默认显示,隐藏区域搜索出的默认隐藏
   let hideAreaIndex = [...res.data].reverse().findIndex((it)=>it.showInCheck);
@@ -287,12 +287,12 @@ export function insertLabelData(state,action){
     const pText = Object.assign({},text,{value:newText});
     if(searchInEnd){
       res.data.splice(index,1,pText,...spreadLabels,text);
-      res.saveText = fullfillText(res.data).saveText;
+      res.saveText = checkFullfillText(res.data).saveText;
       //res.saveText.splice(index,1,newText,'','');
       res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
     }else{
       res.data.splice(index,1,text,...spreadLabels,pText);
-      res.saveText = fullfillText(res.data).saveText;
+      res.saveText = checkFullfillText(res.data).saveText;
       //res.saveText.splice(index,1,'','',newText);
       res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
     }
@@ -365,7 +365,7 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
     const num = nextIsDot?2:1;
     res.data.splice(index,num);
     res.selecteds.splice(index,num);//杂音类样式选中状态对应
-    res.saveText = fullfillText(res.data).saveText;
+    res.saveText = checkFullfillText(res.data).saveText;
   }
   res.update = Math.random();
   return res;
@@ -392,12 +392,17 @@ export const changeNumLabelVal = (state,action)=>{
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';
     }
-    res.saveText[index] = totalVal;
+    if(newVal){
+      res.saveText[index] = totalVal;
+    }else{
+      res.saveText[index] = "";
+    }
+    
   }else{//删除完标签内容则删除该标签
     const num = nextIsDot?2:1;
     res.data.splice(index,num);
     res.selecteds.splice(index,num);      //杂音类样式选中状态对应
-    res.saveText = fullfillText(res.data).saveText;
+    res.saveText = checkFullfillText(res.data).saveText;
   }
 
   res.update = Math.random();

+ 13 - 18
src/store/actions/currentIll.js

@@ -346,9 +346,6 @@ export const confirm = (state,action) =>{
   let length1 = res.data.length;
   let arr = JSON.parse(JSON.stringify(res.data));
   const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;
-  /*let existsId = exists && exists.length>0?getIds(exists):[];
-  let withsId = withs && withs.length>0?getIds(withs):[];
-  res.symptomIds = res.symptomIds.concat(existsId,withsId,noneIds);//搜索去重*/
   let existConpId = [];
   let withConpId = [];
   exists.map((v,i)=>{
@@ -363,20 +360,22 @@ export const confirm = (state,action) =>{
 
   // 处理主症状标签及尾巴展开symptomType=1
   if(exists && exists.length>0){
-    // for(let i in exists){//ie8不支持for in循环
+    let tempArr = [];
      for(let i=0;i<exists.length; i++){
-      arr.splice(ikey,0,getLabel(exists[i].id,exists[i].questionMapping && exists[i].questionMapping.length==0?exists[i].name+',':exists[i].name),...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
+      tempArr.push(getLabel(exists[i].id,exists[i].questionMapping && exists[i].questionMapping.length==0?exists[i].name+',':exists[i].name),...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
     }
+    arr.splice(ikey,0,...tempArr);
   }
-
+  
   let length = arr.length - length1;
   let withsArr = JSON.parse(JSON.stringify(arr));
   // 伴 伴随症状标签及尾巴展开symptomType=2
   if(withs && withs.length>0){
-    // for(let i in withs){
+    let tempArr = [];
     for(let i=0;i<withs.length; i++){
-      withsArr.splice(parseInt(ikey)+length,0,banText,getLabel(withs[i].id,withs[i].questionMapping && withs[i].questionMapping.length==0?(withs[i].name+','):(withs[i].name)),...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
+      tempArr.push(banText,getLabel(withs[i].id,withs[i].questionMapping && withs[i].questionMapping.length==0?(withs[i].name+','):(withs[i].name)),...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
     }
+    withsArr.splice(parseInt(ikey)+length,0,...tempArr);
   }
 
   // 无 不用展开
@@ -857,7 +856,7 @@ export function addLabelItem(state,action){
 //文本输入标签
 export function setInputLabel(state,action){
   let res = Object.assign({},state);
-  const {i,text,prefix,suffix,subIndex} = action;
+  const {i,text,prefix,suffix,subIndex,total} = action;
   const item = res.data[i];
   if(+item.tagType===3){      //multSpred标签
     item.questionMapping[subIndex].value = text;
@@ -870,17 +869,13 @@ export function setInputLabel(state,action){
   }else{
     if(item){
       item.value=text;
+      res.saveText[i] = (prefix ||'')+ text + (suffix||'');
+    }else if(!total){//整个标签内容完全删除
+      res.data.splice(i,1);
+      res.saveText.splice(i,1);
     }
   }
-  if(text){
-    res.saveText[i] = prefix ||''+ text + suffix||'';
-  }else if(!text && !prefix && !suffix){//整个标签内容完全删除
-    res.data.splice(i,1);
-    res.saveText.splice(i,1);
-  }else{//删除完要清空
-    res.saveText[i] = "";
-  }
-  res.update = Math.random();
+  res.update = Math.random();//console.log(888,res,action)
   return res;
 }
 

+ 15 - 1
src/store/actions/patInfo.js

@@ -33,6 +33,20 @@ export const updatePatientMessage=(state,action)=>{
 };
 export const updateHospitalMessage=(state,action)=>{
     const res=Object.assign({},state);
-    res.hospitalMsg = action.data || {};
+    let tmpObj = {
+      lis:{},
+      pacs:{},
+      connect:{}
+    };
+    for(let i = 0;i < action.data.length;i++){
+      if(action.data[i].code == 'import_way_lis'){//化验数据
+        tmpObj.lis=action.data[i]
+      }else if(action.data[i].code == 'import_way_pacs'){//辅检数据
+        tmpObj.pacs=action.data[i]
+      }else if(action.data[i].code == 'connect'){//是否对接
+        tmpObj.connect=action.data[i]
+      }
+    }
+    res.hospitalMsg = tmpObj || {};
     return res;
 };

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

@@ -28,6 +28,7 @@ export const setAdvice=(state,action)=>{
   res.doubt = action.determine.concat(action.doubt);
   res.possible = action.possible;
   res.vigilant = action.vigilant;
+  res.likely = action.likely;
   res.assay = action.lab;
 	res.check = action.pacs;
   return res;

+ 12 - 12
src/store/async-actions/fetchModules.js

@@ -2,7 +2,7 @@ import {json,expJson} from '@utils/ajax.js';
 import {SET,PRESET} from '@types/checkBody.js';
 import {SETDATA} from '@store/types/otherHistory';
 import store from '@store';
-import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText} from '@utils/tools.js';
+import {getEMRParams,didPushParamChange,inspectAndAssist,fullfillText,checkFullfillText,deepClone} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import {billing} from '@store/async-actions/pushMessage';
 import {SETOTHERHISTORY,ISREAD} from "../types/homePage";
@@ -110,9 +110,6 @@ export const getOtherHisRecord = ()=>{
               save:[]
             });
           }
-
-          //console.log('其他史最近数据无')
-          //arr = state.homePage.initData.otherHis;
         }else{
           arr = obj.other;
           if(mode =='1'){     //文本模式
@@ -168,10 +165,11 @@ export function pregetCheckbodyData(flag){     //flag=true获取到数据后立
           data:data
         });
         if(flag){
-          const arr = fullfillText(data,false,false,false).newArr;
+          const arr = checkFullfillText(data).newArr;
+          const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
           dispatch({
             type:SET,
-            data:arr,
+            data:arr.length?arr:[block],
             isEmpty:false
           });
           dispatch({type:MODI_LOADING,flag:false});
@@ -192,7 +190,7 @@ export function getInitData(){
     if(!preData||preData.length==0){
       dispatch(pregetCheckbodyData(true));
     }
-      const arr = fullfillText(preData,false,false,false).newArr;
+      const arr = checkFullfillText(preData).newArr;
       dispatch({
         type:SET,
         data:arr,
@@ -206,14 +204,16 @@ export function setOtherHisModule(){
   return (dispatch, getStore) => {
     const state = getStore();
     const initData = state.homePage.initData;
+    const otherModel = initData.otherHisModel;
     const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const mode = state.typeConfig.typeConfig;
-    const model = JSON.parse(JSON.stringify(initData.otherHisModel || null))||[block];     //查体模板
-    const arr = JSON.parse(JSON.stringify(initData.otherHis || null));        //最近其他史数据
-    const arrSave = JSON.parse(JSON.stringify(initData.otherHisSave || null));    //最近其他史saveText
-    const selects = JSON.parse(JSON.stringify(initData.otherSelecteds || null));  //其他史杂音类选中项
+    const model = otherModel&&otherModel.length>0?[...otherModel]:[block];     //查体模板
+    const arr = deepClone(initData.otherHis);        //最近其他史数据
+    const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
+    const selects = deepClone(initData.otherSelecteds);  //其他史杂音类选中项
     const isHis = initData.otherIsHis;     //是否是历史数据
-    const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !arr[0].value;    //是否只有一个自由文本标签
+    const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !arr[0].value;    //是否只有一个空的自由文本标签
+    //是历史数据且不为空则显示历史数据,否则显示模板
     const listObj = isHis && (mode == 1 || (!onlyOneText && mode == 0)) ? {
       newArr: arr,
       saveText: arrSave || []

+ 2 - 3
src/store/async-actions/homePage.js

@@ -3,11 +3,10 @@ import {SETINITDATA,MODI_LOADING,GET_ASSIST_LIST,GET_INSPECT_LIST,SETALLMODULES}
 import {SET_CURRENT} from '@store/types/currentIll';
 import {SET_MAINSUIT} from '@store/types/mainSuit';
 import config from '@config/index.js';
-import store from '@store';
 import {formatContinueDots} from '@utils/tools';
 import {getOtherHisRecord,getInitData} from '@store/async-actions/fetchModules.js';
 import {initHistoryDetails} from '@store/async-actions/patInfo';
-import {storageLocal,fullfillText} from '@utils/tools';
+import {storageLocal,fullfillText,checkFullfillText} from '@utils/tools';
 
 const api = {
   getModules:'/moduleInfo/getAll',
@@ -20,7 +19,7 @@ function modulesParseJson(data){
   let json = {},obj={},saveTextJson={},moduleName={};
   data.map((it)=>{
     moduleName[config.moduleCP[it.type]] = it.name;//添加病情变化/病程变化子模板需要使用模板名称
-    obj = it.type==4?fullfillText(it.moduleDetailDTOList,false,false,false):fullfillText(it.moduleDetailDTOList);
+    obj = it.type==4?checkFullfillText(it.moduleDetailDTOList):fullfillText(it.moduleDetailDTOList);
     json[config.moduleCP[it.type]] = formatContinueDots(obj.newArr);
     saveTextJson[config.moduleCP[it.type]] = obj.saveText;
   });

+ 4 - 4
src/store/async-actions/patInfo.js

@@ -7,6 +7,7 @@ import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
 import {ISREAD,MODI_LOADING} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
+import config from '@config/index';
 
 const api = {
     getPatInfo: '/patientInfo/getTopPatientInfo',
@@ -19,14 +20,13 @@ export const initHospitalInfo = (dispatch, getState) => {
     let baseList = getState();
     let state = baseList.patInfo.message;
     json(api.getHospitalInfo, {
-        "code": getUrlArgObject('hospitalId'),
-        "id":state.hospitalId
+        "hospitalCode": getUrlArgObject('hospitalId'),
     }).then((res) => {
         const data = res.data;
         if (data.code == 0) {
             dispatch({
               type: GET_HOSPITAL_MESSAGE,
-              data:data.data[0]
+              data:data.data.sysSetInfoData||[]
             });
         } else {
             console.log(res)
@@ -118,7 +118,7 @@ export async function getPatientMessage(dispatch, getState){
   //设置初始模式
   dispatch({
     type: CONFIRM_TYPE,
-    confirmType:data1.modeValue
+    confirmType:data1.modeValue||config.defaultValue.mode
   });
   dispatch(getInitModules);     //确保病人信息获取以后再获取模板等数据,否则参数为空
   dispatch(getCommonList(5));     //获取常用化验标签列表

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

@@ -45,11 +45,13 @@ export const billing = (mdata,boxMark) => {
         let vigilant=[], //警惕
              doubt=[],    //疑似诊断
             possible = [],  //可能诊断
-            determine=[]; //确诊
+            determine=[], //确诊
+            likely=[];//  鉴别诊断
             doubt = dis&&dis['疑似诊断'],
             possible = dis&&dis['可能诊断'];
             vigilant = dis&&dis['警惕'];
             determine = dis&&dis['确诊']; //确诊
+            likely = dis&&dis['鉴别诊断'];
         if(lab) {
             for(let i = 0; i < lab.length; i++) {
                 lab[i].checked = false
@@ -71,6 +73,7 @@ export const billing = (mdata,boxMark) => {
             doubt: doubt||[],
             possible: possible||[],
             vigilant: vigilant||[],
+            likely:likely||[],
             lab: lab||[],
             pacs: pacs||[],
         });

+ 4 - 4
src/store/reducers/assessResult.js

@@ -17,7 +17,7 @@ const init = {
   },    //可能结果
   calcuResult:{},       //计算公式结果
   calcuValues:{},       //计算公式填的值
-  wholeScaleItems:[],   //全部量表中添加的整体评估项
+  wholeScaleItems:{},   //全部量表中添加的整体评估项
   addedScaleIds:[]
 };
 export default (state=init,action)=>{
@@ -60,7 +60,7 @@ export default (state=init,action)=>{
       res.wholeIndexs = action.wholeAssessItems||{};
       res.addedScaleIds = action.addedScaleIds||[];
       res.wholeResults = action.wholeResults||{};
-      res.wholeScaleItems = action.wholeScaleItems||[];
+      res.wholeScaleItems = action.wholeScaleItems||{};
       res.wholeAssessText = action.wholeAssessText||{};
       res.chooseSelecteds = action.chooseSelecteds||{};
       res.calcuResult = action.calcuResult||{};
@@ -74,8 +74,8 @@ export default (state=init,action)=>{
       res.update1 = Math.random();   //对象更新,与其他字段名不同因为绑定在pushItems,避免不必要的渲染
       return res;
     case ADD_WHOLE_SCALE_ITEMS:
-      res.wholeScaleItems[action.index] = action.data;
-      res.addedScaleIds.push(action.data.id);
+      res.wholeScaleItems[action.id] = action.data;
+      res.addedScaleIds.push(action.id);
       res.update1 = Math.random();
       return res;
     case REMOVE_ASSESS_ITEMS:

+ 0 - 1
src/store/reducers/inspect.js

@@ -314,7 +314,6 @@ export default (state = initSearchList, action) => {
         let tmpArr2 = newState.labelList;
         newState.getExcelData = action.data
 
-        console.log(action.data)
         tmpArr.push(action.data)
         newState.getExcelDataList = [...tmpArr]
         newState.pushItem = getPushList(tmpArr,tmpArr2);

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

@@ -65,7 +65,7 @@ export default function(state = initState, action) {
       res.tableList = action.data;
       return res;
     case SHOW_TABLE_LIST://显示、隐藏量表列表
-      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value},action.item);
+      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value,isPop:action.isPop},action.item);
       return res;
     case SET_CHRONIC_PUSHS:
       res.chronicPushItems = action.data;

+ 2 - 1
src/utils/drag.js

@@ -64,7 +64,8 @@ function handleMove(event) {
       left: dragX + 'px',
       marginLeft: 0 + 'px',
       marginTop: 0 + 'px',
-      top: dragY + 'px'
+      top: dragY + 'px',
+      right:'inherit',
     })
   }
 }

+ 95 - 19
src/utils/tools.js

@@ -935,35 +935,111 @@ function notTextLabel(label){
 * 入参:arr源数组,
 *       noPre是否不添加前置文本标签,默认false即添加
 *       noEnd是否不添加后置文本标签,默认false即添加
-*       ifEmpty是否添加空标签,默认true即添加,传false添加逗号,如查体,
-*       showInCheck是否默认在查体中展开
+*  出参:newArr添加自由文本标签后的数据Array,
+*        saveText添加自由文本后对应的预览数据Array,
 * */
-function fullfillText(arr,noPre=false,noEnd=false,ifEmpty=true){
+function fullfillText(arr,noPre=false,noEnd=false){
+  let newArr =[],
+    pre={},
+    textLabel={},
+    notText = true,
+    saveText=[],
+    tempText = '',
+    value = '',
+    cNum = 0;
+  Array.isArray(arr)&&arr.map((it,i)=>{
+    notText = notTextLabel(it);
+    cNum = i;
+    value = it.value||'';
+    textLabel = JSON.parse(config.textLabel);
+    //n个显示的标签最后一个标签后面要落关标,所以+1
+    if(i===0){
+      //第一个标签不是文本标签时在前面添加文本标签
+      if(!noPre&&notText){
+        newArr.push(textLabel);
+        saveText.push('');
+      }
+      newArr.push(it);
+      if(it.tagType != 3){      //非血压类组合标签
+        tempText = value?it.labelPrefix+value+it.labelSuffix:'';
+        tempText = notText?tempText:it.value||it.name;
+      }else{
+        tempText = getSaveText(it);
+      }
+      saveText.push(tempText);
+      // 模板只有一个标签时第一项后面也要加空标签
+      if(arr.length==1&&notText){
+        newArr.push(JSON.parse(config.textLabel));
+        saveText.push('');
+      }
+    }else{
+      pre = arr[i-1];
+      //如果本身不是文本标签且前面一个也不是文本标签,该标签前面添加文本标签
+      if(notTextLabel(pre)&&notText){
+        newArr.push(textLabel,it);
+        if(it.tagType != 3) {
+          tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
+        }else{
+          tempText = getSaveText(it);
+        }
+        saveText.push("",tempText);
+      }else{    //本身是或者前面是文本标签时,前面不添加文本标签
+        newArr.push(it);
+        if(it.tagType != 3) {
+          tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
+          tempText = notText ? tempText : (it.value || it.value == "" ? it.value : it.name);
+        }else{
+          tempText = getSaveText(it);
+        }
+        saveText.push(tempText);
+      }
+      if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
+        //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
+        newArr.push(JSON.parse(config.textLabel));
+        saveText.push("");
+      }
+    }
+  });
+  return {newArr,saveText};
+};
+
+/*
+ * 查体添加自由文本标签函数
+ * 默认标签直接添加,
+ * 前config.showCheckNum个源数据标签默认显示,剩余隐藏收起
+ *  入参:arr源数组,
+ *       noPre是否不添加前置文本标签,默认false即添加
+ *       noEnd是否不添加后置文本标签,默认false即添加
+ *  showInCheck是否默认在查体中展开
+ *  出参:newArr添加自由文本标签后的数据Array,
+ *        saveText添加自由文本后对应的预览数据Array,
+ *        checkHiddenDefault查体是否全部标签展开
+ *
+ * */
+function checkFullfillText(arr,noPre=false,noEnd=false){
   let newArr =[],
     pre={},
     textLabel={},
-    _textLabel={},
     notText = true,
     saveText=[],
     tempText = '',
     value = '',
     item={},
-    cNum = 0,
-    checkHiddenDefault=false;//console.log(arr)
+    checkHiddenDefault=false;
   arr&&arr.map((it,i)=>{
     notText = notTextLabel(it);
-    cNum = i;
     value = it.value||'';
-    textLabel = !ifEmpty&&i==0?Object.assign({},JSON.parse(config.textLabel),{showInCheck:true}):JSON.parse(config.textLabel);
+    //textLabel = i==0?JSON.parse(config.textLabel):Object.assign({},JSON.parse(config.textLabel),{showInCheck:true});
     //n个显示的标签最后一个标签后面要落关标,所以+1
-    _textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
+    //_textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
     if(i===0){
+      textLabel = Object.assign({},JSON.parse(config.textLabel),{showInCheck:true});
       //第一个标签不是文本标签时在前面添加文本标签
       if(!noPre&&notText){
         newArr.push(textLabel);
         saveText.push('');
       }
-      item = ifEmpty?it:Object.assign({},it,{showInCheck:true});
+      item = Object.assign({},it,{showInCheck:true});
       newArr.push(item);
       if(it.tagType != 3){
         tempText = value?it.labelPrefix+value+it.labelSuffix:'';
@@ -979,17 +1055,18 @@ function fullfillText(arr,noPre=false,noEnd=false,ifEmpty=true){
       }
     }else{
       pre = arr[i-1];
-      item = !ifEmpty&&cNum<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;
+      item = i<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;
       //判断单选项是否有默认选中,位置在隐藏区域时,查体所有标签展示
-      if(!ifEmpty&&!checkHiddenDefault&&cNum>config.showCheckNum&&+it.tagType===1&&(+it.controlType===0||+it.controlType===1)){
+      if(!checkHiddenDefault&&i>config.showCheckNum&&+it.tagType===1&&(+it.controlType===0||+it.controlType===1)){
         if(it.questionDetailList.find((it)=>it.defaultSelect=='1')){
           checkHiddenDefault=true;
         }
       }
       //如果本身不是文本标签且前面一个也不是文本标签,该标签前面添加文本标签
       if(notTextLabel(pre)&&notText){
-        // newArr.push(textLabel,it);
-        ifEmpty?newArr.push(textLabel,it):newArr.push(_textLabel,item);
+        textLabel = Object.assign(JSON.parse(config._textLabel),{showInCheck:i-1<config.showCheckNum?true:false});
+        newArr.push(textLabel,item);
+
         if(it.tagType != 3) {
           tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
         }else{
@@ -1000,7 +1077,6 @@ function fullfillText(arr,noPre=false,noEnd=false,ifEmpty=true){
         newArr.push(item);
         if(it.tagType != 3) {
           tempText = value ? it.labelPrefix + value + it.labelSuffix : '';
-          // tempText = notText?tempText:it.value||it.name;
           tempText = notText ? tempText : (it.value || it.value == "" ? it.value : it.name);
         }else{
           tempText = getSaveText(it);
@@ -1008,15 +1084,14 @@ function fullfillText(arr,noPre=false,noEnd=false,ifEmpty=true){
         saveText.push(tempText);
       }
       if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
-        //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
-        const _text = arr.length>config.showCheckNum?JSON.parse(config._textLabel):_textLabel;
-        newArr.push(ifEmpty?textLabel:_text);
+        const _text = Object.assign(JSON.parse(config.textLabel),{showInCheck:arr.length>config.showCheckNum?false:true});
+        newArr.push(_text);
         saveText.push("");
       }
     }
   });
   return {newArr,saveText,checkHiddenDefault};
-};
+}
 
 
 //获取标签index,入参:病例项index+标签index+标签内index
@@ -1111,6 +1186,7 @@ module.exports = {
     getWindowInnerHeight,
     getLabelIndex,
     fullfillText,
+    checkFullfillText,
     parseUrl,
     getAge,
     dateParser,