Pārlūkot izejas kodu

Squashed commit of the following:

commit e4ca9e3bc1c0d6f708663d725f48591d701752ef
Merge: 86bd4b8 da90698
Author: liucf <liucf@zjlantone.com>
Date:   Fri May 24 09:22:20 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 86bd4b8e3233faa8649164435135b29314c69a1c
Author: liucf <liucf@zjlantone.com>
Date:   Fri May 24 09:22:07 2019 +0800

    化验辅检删除按钮位置调整

commit da906981559866adf705b290d26e63e1c6c05234
Merge: 1b23456 f759743
Author: Luolei <16657115156@163.com>
Date:   Thu May 23 17:39:00 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 1b23456c8c6e0514046d51a126a0f30b93a256fd
Author: Luolei <16657115156@163.com>
Date:   Thu May 23 17:38:51 2019 +0800

    填写单样式修改

commit f920688d6d06addcc52bea3bfeb2dc05a0565395
Merge: 58358ba f759743
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 23 17:38:50 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 58358ba0104e1f24628a66bfd7f3b146701d8110
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 23 17:36:08 2019 +0800

    输入框类型

commit f759743e561e3cf776b93ef14258b3e693b9a035
Merge: 91ed545 cc5b362
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 23 16:58:24 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 91ed54558836599411a4d08d6292584f9dc445a5
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 23 16:58:08 2019 +0800

    右侧推送诊断添加静态信息

commit cc5b3627e6d0cdf39045abf2cc6dcf4090d20a4d
Author: Luolei <16657115156@163.com>
Date:   Thu May 23 16:56:47 2019 +0800

    鼠标的显示类型

commit 7fc50f5228919afb9244893c538c514e00f9b51f
Merge: 1b8ea52 d6f02ce
Author: Luolei <16657115156@163.com>
Date:   Thu May 23 16:45:29 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 1b8ea52cf32e00fecc832351931580186eef366b
Author: Luolei <16657115156@163.com>
Date:   Thu May 23 16:45:19 2019 +0800

    日期组件详细看看

commit d6f02cebbf2649288b59b61cdf906d18a4fef384
Author: liucf <liucf@zjlantone.com>
Date:   Thu May 23 15:49:23 2019 +0800

    化验辅检删除修改完成

commit d751e8c8bd8ef407c2b6a865cb9aa27cfe1ea1c6
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Thu May 23 15:00:55 2019 +0800

    辅检删除弹窗关闭
liucf 6 gadi atpakaļ
vecāks
revīzija
d847155e9a

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

@@ -25,7 +25,7 @@ class Calendar extends React.Component {
             select:{
                 year:  this.year,
                 month:  this.month,
-                day: 0,
+                day: 0,//这里设置初始选中的值
                 hour:0,
                 minute:0,
                 second:0
@@ -59,6 +59,7 @@ class Calendar extends React.Component {
         this.inputing=true;
         info.year=this.state.year;
         info.month=this.state.month;
+        // info.day = this.day;//没选日就加上默认值
         if(info.hour==null){
             info.hour=this.state.select.hour;
             info.minute=this.state.select.minute;
@@ -88,7 +89,6 @@ class Calendar extends React.Component {
     genTimeComponent(){
         return this.props.needTime?<Time hour={this.state.select.hour} minute={this.state.select.minute} second={this.state.select.second} handleChange={(info)=>{this.handleChange(info)}}/>:null;
     }
-
     render() {
         return (
             <div className={style.wrapper}>

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

@@ -29,7 +29,7 @@ class DelToast extends React.PureComponent{
       return <div className={style['del-box']} id="delBox">
         <div className={style['del-con']}>
           <div className={style['del-tri']}></div>
-          <div className={style['del-title']}>删除 {name} ?</div>
+          <div className={style['del-title']} id="delTit">删除 {name} ?</div>
           <div className={style['del-foot']}>
             <span className={`${style['del-btn']} ${style['del-del']}`} onClick={this.handleDel}>删除</span>
             <span className={`${style['del-btn']} ${style['del-cancel']}`} onClick={this.handleCancel}>取消</span>

+ 14 - 1
src/common/components/InlineTag/index.jsx

@@ -29,6 +29,7 @@ class InlineTag extends Component {
     this.handleInput = this.handleInput.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleFixClick = this.handleFixClick.bind(this);
+    this.handleBoxInput = this.handleBoxInput.bind(this);
   }
   changeToEdit(e){
     const {handledbClick,id} = this.props;
@@ -43,6 +44,14 @@ class InlineTag extends Component {
     //埋点记录
     handledbClick&&handledbClick({id});
   }
+  handleBoxInput(e){
+    const {handleInput,ikey,prefix,suffix} = this.props;
+    const total = e.target.innerText;
+    const text = this.$span.current.innerText;
+    if(!total){
+      handleInput&&handleInput({text:total,ikey});
+    }
+  }
   changeToClick(event){
     event.returnValue = true;
     const {canEditable} = this.props;
@@ -52,6 +61,7 @@ class InlineTag extends Component {
     });
   }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
+    e.stopPropagation();
     const {handleInput,ikey,prefix,suffix} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     // 内容全部删除时,要把空值存到store,否则会遗留最后一个字且为灰色无法删除
@@ -130,7 +140,10 @@ class InlineTag extends Component {
                  onDoubleClick={this.changeToEdit}
                   onClick={!editable?this.handleFixClick:''}
                  onkeydown={handleEnter}
-                 onBlur={this.changeToClick} ref={this.$box} contentEditable={editable}>
+                 onBlur={this.changeToClick} 
+                 ref={this.$box} 
+                 contentEditable={editable}
+                 onInput={this.handleBoxInput}>
                 {prefix}
                 <span className={style['free-in']}
                       contentEditable={true}

+ 2 - 2
src/common/less/variables.less

@@ -45,8 +45,8 @@
 @dropdwon-height:200px;
 @selected-bg:#fff;
 @import-color:#ffad5f;
-@closeIcon:url(../images/del_nor.png);
-@closeHor:url(../images/del_hor.png);
+@closeIcon:url(../images/del_nor.png) no-repeat;
+@closeHor:url(../images/del_hor.png) no-repeat;
 
 /*********推送内容容器宽度*************/
 @push-width: 450px;

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

@@ -63,14 +63,14 @@ class AddAssistCheck extends React.Component {
       let _cons = $('#datePick');   // 设置目标区域
       let _del = $('#delBox')[0];   // 删除弹窗
       let _close = $('#assiClose')[0];   // 删除icon
-      // console.log(111,event.target,_del,_close)
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
         this.setState({ show: false });
       }
       if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
         this.setState({ date: false });
       }
-      if(event.target != _close && event.target != _del && event.target.parentNode != _del){
+      if(!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
           this.setState({
             visible: false,
             id: null,

+ 3 - 1
src/components/AddAssistCheck/index.less

@@ -69,7 +69,7 @@
               height: 15px;
               cursor: pointer;
               position: absolute;
-              right: 3px;
+              right: 2px;
               top: 2px;
               background: @closeIcon;
               background-size: 100% 100%;
@@ -133,9 +133,11 @@
 }
 .tagSpan {
   position: relative;
+  cursor: default;
 }
 .tagSpan:hover {
   .imgInfo {
     display: block;
+    cursor: pointer;
   }
 }

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

@@ -62,7 +62,7 @@ class SlideSelect extends Component {
     })
   }
   render() {
-    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate} = this.props;
+    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
     return (
@@ -163,8 +163,8 @@ class SlideSelect extends Component {
                     >
                     
                         <div className={styles.searchResultT}>
-                            <img style={{"position":"absolute","top":"8px","right":"8px"}} src={date1} alt="" onClick={handleShowDate}/>
-                            <p style={{position:"absolute",right:"38px",top:"4px",lineHeight:"28px"}}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px",cursor:"pointer"}} src={date1} alt="" onClick={handleShowDate}/>
+                            <p style={{position:"absolute",right:"25px",top:"4px",lineHeight:"28px",cursor:"pointer",paddingRight:"10px"}} onClick={handleShowDate}>
                                 {
                                   dateTime
                                 }
@@ -181,8 +181,8 @@ class SlideSelect extends Component {
             }
         </div>
         {/*<img className={styles.partDel} src={close} alt="删除项" onClick={()=>{handleDelClick(1,idx)}}/>*/}
-        <span className={styles.partDel} onClick={this.handleDel}></span>
-        <DelToast show={activeInd?true:false}
+        <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
+        <DelToast show={showToast&&activeInd?true:false}
                     name={activeName} 
                     cancel={this.handleCancel}
                     confirm={this.delConfirm}/>

+ 3 - 3
src/components/AddInspect/SlideSelect/index.less

@@ -1,9 +1,9 @@
 @import "~@less/variables.less";
 .slideLi {
     // cursor: pointer;
-    color: #767676;
+    // color: #767676;
     position: relative;
-    padding: 10px 10px 10px 0;
+    padding: 10px 20px 10px 0;
     border-bottom:1px dashed #989DA3;
     i {
         font-style: normal;
@@ -31,7 +31,7 @@
         cursor: pointer;
         display: inline-block;
         position: absolute;
-        right: 3px;
+        right: 2px;
         top: 13px;
         // background-color: #fff;
         background: @closeIcon;

+ 30 - 14
src/components/AddInspect/index.jsx

@@ -26,7 +26,7 @@ class Inspect extends React.Component {
       id: null,
       pageTop:'',
       // tmpIds: [],      //内层外层
-      importFlag:false   //导入数据删除标识
+      impId:null
     }
     this.handleChangeDate = this.handleChangeDate.bind(this)
     this.handleShowDate = this.handleShowDate.bind(this)
@@ -45,28 +45,32 @@ class Inspect extends React.Component {
   }
   delConfirm() {//弹窗确定
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
-    const { type, id } = this.state;
+    const { type, id ,impId} = this.state;
     if (type == 1) {
       delPartItem(id)
     } else if (type == 2) {
-      handleCloseExcel(id)
+      handleCloseExcel(impId)
     }
     this.setState({
       type: null,
       id: null,
-      importFlag:false
+      impId: null
     })
     Notify.success("删除成功");
     handlePush && handlePush();       //右侧推送
   }
-  handleDelClick(type, idx) {
-    this.setState({
-      type: type,
-      id: idx
-    })
+  handleDelClick(type, idx) { 
     if (type == 2){
       this.setState({
-        importFlag: true
+        impId:idx,
+        type: type,
+        id:null
+      })
+    }else{
+      this.setState({
+        type: type,
+        id: idx,
+        impId:null
       })
     }
   }
@@ -74,7 +78,7 @@ class Inspect extends React.Component {
     this.setState({
       type: null,
       id: null,
-      importFlag:false
+      impId: null
     })
   }
   componentDidMount() {
@@ -82,6 +86,11 @@ class Inspect extends React.Component {
       let searchWrap = $('#searchWrap')[0];   // 搜索按钮
       let searchOption = $('#searchOption')[0];   // 搜索列表
       let inspectFill = $('#inspectFill')[0];         // 公共填写单
+
+      let _del = $('#delBox')[0];       // 删除弹窗  
+      let _impClose = $('#impClose')[0];         // 导入删除按钮
+      let _addClose = $('#addClose')[0];         // 添加删除按钮
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (searchOption) {
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
           this.setState({ show: false });
@@ -92,6 +101,12 @@ class Inspect extends React.Component {
           this.setState({ showFill: false, date: false });
         }
       }
+      if(!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+          this.setState({
+            id: null,
+            impId: null
+          })
+      }
     });
     this.getCurrentDate();
   }
@@ -280,7 +295,7 @@ class Inspect extends React.Component {
   }
   render() {
     const { getInfomation,handleChangeValue,inspectVal, list, labelList,windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
-    const { tmpId, tmpIdx,id ,importFlag,pageTop} = this.state;
+    const { tmpId, tmpIdx,id,pageTop,impId} = this.state;
 
     return (
       <div className={styles.wrapper}>
@@ -291,8 +306,8 @@ class Inspect extends React.Component {
                 {
                   items && items.lisExcelRes.length > 0 ? <ul className={styles.excelDataLists}>
                     {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
-                    <span className={styles.close} onClick={() => { this.handleDelClick(2, ind) }}></span>
-                    <DelToast show={id==ind && importFlag?true:false}
+                    <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
+                    <DelToast show={impId==ind?true:false}
                     name="该导入项" 
                     cancel={this.handleCancel}
                     confirm={this.delConfirm}/>
@@ -318,6 +333,7 @@ class Inspect extends React.Component {
                 return <SlideSelect
                   item={item}
                   idx={idx}
+                  showToast={idx==id?true:false}
                   showFill={this.state.showFill}
                   handlePush={handlePush}
                   fillActive={fillActive}

+ 6 - 5
src/components/AddInspect/index.less

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 .labelWrap>li {
     // cursor: pointer;
-    color: #767676;
+    // color: #767676;
     position: relative;
     padding-top: 10px;
     padding-bottom: 10px;
@@ -151,15 +151,16 @@
     }
     .itemPartT {
         float: right;
-        max-width: 110px;
+        width: 120px;
         input {
             width: 40px;
             text-align: center;
             float: left;
+            margin-right: 10px;
         }
         .unit {
             display: inline-block;
-            max-width: 70px;
+            width: 70px;
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;
@@ -178,8 +179,8 @@
         width: 15px;
         height: 15px;
         position: absolute;
-        top: -10px;
-        right: -6px;
+        top: -5px;
+        right: -5px;
         z-index: 30;
         border-radius: 50%;
         background: @closeIcon;

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

@@ -41,7 +41,6 @@ class AssistCheck extends React.Component {
                             assistVal={assistVal}
                             windowHeight={windowHeight}
                         >
-
                         </AddAssistCheck>
                     </div>
                 </ItemBox>

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

@@ -45,7 +45,7 @@ class DiagResultSearch extends Component {
 
       {
         searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} /></div>)
+          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} type='search'/></div>)
         })
       }
     </div>

+ 48 - 6
src/components/DiagnosticItem/index.jsx

@@ -2,6 +2,8 @@ import React, { Component } from 'react';
 import style from './index.less';
 import {ConfirmModal} from '@commonComp';
 import Notify from '@commonComp/Notify';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
 import {getChronic} from '@store/async-actions/homePage.js';
 import {storageLocal} from '@utils/tools';
 
@@ -10,7 +12,9 @@ class DiagnosticItem extends Component{
         super(props);
 
         this.state = {
-            visible: false
+            visible: false,
+            hasEnterItem: false,
+            hasEnterImg: false
         }
 
         this.addDiagodal = this.addDiagodal.bind(this);
@@ -18,6 +22,7 @@ class DiagnosticItem extends Component{
         this.confirm = this.confirm.bind(this);
         this.cancel = this.cancel.bind(this)
         this.close = this.close.bind(this)
+        this.getTips = this.getTips.bind(this)
     }
     confirm() {
         this.close();
@@ -35,9 +40,11 @@ class DiagnosticItem extends Component{
         })
     }
     chooseDiagodal(item) {
-        const { diagnosticList,getTips } = this.props;
+        const { diagnosticList,getTips, type } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.id,type:7});
+        if (type == 'search') {
+            getTips && getTips({id:item.id,type:7});
+        }
         for (let i = 0; i < diagnosticList.length; i++) {
             if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
@@ -49,6 +56,11 @@ class DiagnosticItem extends Component{
         })
        
     }
+    getTips(item, e) {
+        e.stopPropagation();
+        const {getTips } = this.props;
+        getTips && getTips({id:item.id,type:7});
+    }
     addDiagodal(diagType){
         const {item, isChronicMag,mode} = this.props;
         item.type = diagType;
@@ -87,15 +99,45 @@ class DiagnosticItem extends Component{
         // }, 0)
         document.getElementById("diagnosisResult").scrollIntoView(true)
     }
+    handleMouseEnterDrug() {
+        this.setState({
+            hasEnterItem: true, 
+        })
+      }
+      handleMouseLeaveDrug() {
+        this.setState({
+            hasEnterItem: false, 
+        })
+      }
+      handleMouseEnterImg() {
+        this.setState({
+          hasEnterImg: true
+        })
+      }
+      handleMouseLeaveImg() {
+        this.setState({
+          hasEnterImg: false
+        })
+      }
 
     render(){
-        const { visible } = this.state
-        const { item, title } = this.props
+        const { visible,hasEnterItem,hasEnterImg } = this.state
+        const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
                     <span className={style['diag-name']} 
                           title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
-                          onClick={() =>{this.chooseDiagodal(item)}}>
+                          onMouseEnter={this.handleMouseEnterDrug.bind(this)}
+                          onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                          onClick={() =>{this.chooseDiagodal(item)}}
+                          >
                         {item.name} {item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': ''}
+                        {type== 'disSelect' &&<img className={style['info-img']}  
+                                style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
+                                src={hasEnterImg ? infoMove : infoShow} 
+                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                                onClick={this.getTips.bind(this,item)}
+                        />}
                     </span>
                     <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 

+ 13 - 3
src/components/DiagnosticItem/index.less

@@ -10,10 +10,20 @@
     width: 100%;
 }
 .diag-name {
+    position: relative;
     display: inline-block;
     width: 100%;
     height: 100%;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
+    // overflow: hidden;
+    // text-overflow: ellipsis;
+    // white-space: nowrap;
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    top: -14px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+    z-index: 2;
 }

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

@@ -48,10 +48,10 @@ class PushDiag extends Component {
                 {maxShowNum ? diagList.map((item, index) => {
                     ItemNum = ItemNum + item.name.length + 1;
                     if (ItemNum <= moreNum) {
-                        return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>
+                        return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
                     }
                 }) : diagList.map((item, index) => {
-                return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>
+                return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
                 })}
                 {ItemNum > maxShowNum && <div onClick={() => this.handleShow(ItemNum)} className={style['push-diag-more']}>{showMore ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showMore ? showImg : hideImg}/></div>}
 

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

@@ -264,7 +264,7 @@ class PushItems extends Component {
     });
 
     const vigilants = vigilant.map((item, index) => {
-      return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>;
+      return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>;
     });
 
     return (

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

@@ -874,7 +874,10 @@ export function setInputLabel(state,action){
     }
   }
   if(text){
-    res.saveText[i] = prefix+text+suffix;
+    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] = "";
   }