浏览代码

化验辅检诊断医嘱基本完成

luolei 4 年之前
父节点
当前提交
bf19f7b76b

+ 27 - 6
src/common/components/SearchOption/index.jsx

@@ -35,6 +35,8 @@ class SearchOption extends React.Component {
       const {windowHeight,pageTop,height,refreshScroller,searchType} = this.props;
       const {windowHeight,pageTop,height,refreshScroller,searchType} = this.props;
       if(searchType==1){
       if(searchType==1){
           this.setState({txt:'细项'})
           this.setState({txt:'细项'})
+      }else if(searchType==2){
+        this.setState({txt:'药物'})
       }
       }
       refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       refreshScroller()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       if(windowHeight - pageTop < height){
       if(windowHeight - pageTop < height){
@@ -58,9 +60,21 @@ class SearchOption extends React.Component {
         handleChangeValue('');
         handleChangeValue('');
     }
     }
     detailClick(val,txt){
     detailClick(val,txt){
-        const { detailClick } = this.props;
+        const { detailClick,handleChangeValue } = this.props;
         detailClick(val)
         detailClick(val)
         this.setState({txt:txt})
         this.setState({txt:txt})
+        let value = this.textInput.current.value||''
+
+        if(value.trim() == ''){
+            this.setState({
+                show:false
+            })
+            return  handleChangeValue('');
+        }
+        this.setState({
+            show:true
+        })
+        handleChangeValue(value)
     }
     }
     handleInput(e){
     handleInput(e){
       const { handleChangeValue } = this.props;
       const { handleChangeValue } = this.props;
@@ -98,17 +112,24 @@ class SearchOption extends React.Component {
         const { children,visible,searchType } = this.props;
         const { children,visible,searchType } = this.props;
         const { show,showInsp,txt } = this.state;
         const { show,showInsp,txt } = this.state;
         return (
         return (
-            searchType == 1?
+            searchType == 1||searchType == 2?
             <div id="searchOption" className={visible?`${styles.search} ${styles.searchSpecial} ${styles.show} searchOption`:`${styles.search} ${styles.searchSpecial} ${styles.hide} searchOption`}>
             <div id="searchOption" className={visible?`${styles.search} ${styles.searchSpecial} ${styles.show} searchOption`:`${styles.search} ${styles.searchSpecial} ${styles.hide} searchOption`}>
                 <img className={`${styles.searchVal} ${styles.seleImg}`} src={slide} alt="选择" onClick={this.setShowInsp} />
                 <img className={`${styles.searchVal} ${styles.seleImg}`} src={slide} alt="选择" onClick={this.setShowInsp} />
                 <img className={`${styles.searchVal} ${styles.searchInsp}`} src={search} alt="搜索" />
                 <img className={`${styles.searchVal} ${styles.searchInsp}`} src={search} alt="搜索" />
                 <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
                 <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
                 <div className={styles.selectLis} onClick={this.setShowInsp}>
                 <div className={styles.selectLis} onClick={this.setShowInsp}>
                     <span id="shTxt">{txt}</span>
                     <span id="shTxt">{txt}</span>
-                    <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
-                        <li onClick={()=>{this.detailClick(2,'细项')}}>细项</li>
-                        <li onClick={()=>{this.detailClick(1,'套餐')}}>套餐</li>
-                    </ul>
+                    {
+                        searchType == 1?
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(2,'细项')}}>细项</li>
+                            <li onClick={()=>{this.detailClick(1,'套餐')}}>套餐</li>
+                        </ul>:
+                        <ul className={styles.lisul} style={{'display':showInsp?'block':'none'}}>
+                            <li onClick={()=>{this.detailClick(5,'药物')}}>药物</li>
+                            <li onClick={()=>{this.detailClick(6,'手术及操作')}}>手术及操作</li>
+                        </ul>
+                    }
                 </div>
                 </div>
                 <input
                 <input
                     className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
                     className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}

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

@@ -3,6 +3,7 @@
 .search {
 .search {
     .contentZIndex1;
     .contentZIndex1;
     width: 375px;
     width: 375px;
+    min-height: 160px;
     padding: 8px;
     padding: 8px;
     box-sizing: border-box;
     box-sizing: border-box;
     position: absolute;
     position: absolute;
@@ -77,6 +78,7 @@
         left: 8px;
         left: 8px;
         top: 42px;
         top: 42px;
         display: none;
         display: none;
+        z-index: 100;
         li {
         li {
             padding: 0 10px;
             padding: 0 10px;
             color: #1E1E1E;
             color: #1E1E1E;

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

@@ -133,24 +133,24 @@ class AddAssistCheck extends React.Component {
     return <ScrollArea speed={0.8}
     return <ScrollArea speed={0.8}
                        horizontal={false}
                        horizontal={false}
                        stopScrollPropagation={list.length>6?true:false}
                        stopScrollPropagation={list.length>6?true:false}
-                       style={{height:'225px'}}
+                       style={{height:'225px',width:'356px'}}
                        className={styles["area"]}
                        className={styles["area"]}
                        verticalContainerStyle={contStyle}
                        verticalContainerStyle={contStyle}
                        verticalScrollbarStyle={barStyle}
                        verticalScrollbarStyle={barStyle}
                        contentClassName="content">
                        contentClassName="content">
-      <ul className={styles.searchLiUl}>
+      <ul className={`${styles.searchLiUl} ${styles.assistListUl}`}>
       {
       {
         list && list.map((item, idx) => {
         list && list.map((item, idx) => {
           return <li key={item.id}
           return <li key={item.id}
             className={styles.searchLi}
             className={styles.searchLi}
-            title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            title={item.name}
             onClick={() => {
             onClick={() => {
               this.props.setHighter(48)
               this.props.setHighter(48)
-              handleSign(item.conceptId,idx,'search');
+              handleSign(item,'search');
               this.setState({ show: false })
               this.setState({ show: false })
             }}
             }}
           >
           >
-            {item.name}{(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
+            {item.name}
           </li>
           </li>
         })
         })
       }
       }
@@ -270,13 +270,13 @@ class AddAssistCheck extends React.Component {
                 </ScrollArea>
                 </ScrollArea>
               </div>
               </div>
               <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
               <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
-                <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-                <i onClick={() => this.handleShowDate(idx)}></i>
+                <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                {/* <i onClick={() => this.handleShowDate(idx)}></i> */}
                 {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
                 {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
                 <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
                 <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
-                {
+                {/* {
                   this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
                   this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
-                }
+                } */}
               </div>
               </div>
               <DelToast show={idx==id&&item.name==activeName?visible:false}
               <DelToast show={idx==id&&item.name==activeName?visible:false}
                   name={activeName}
                   name={activeName}
@@ -313,8 +313,8 @@ class AddAssistCheck extends React.Component {
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
           {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
-            {
+            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'42px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
+            {/* {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {assistList.length>6?<ScrollArea speed={0.8}
                 {assistList.length>6?<ScrollArea speed={0.8}
@@ -330,7 +330,7 @@ class AddAssistCheck extends React.Component {
                 }
                 }
                 </ScrollArea>:this.getCommonList()}
                 </ScrollArea>:this.getCommonList()}
               </div>
               </div>
-            }
+            } */}
           </SearchOption> : ''}
           </SearchOption> : ''}
         </div>
         </div>
       </div>
       </div>

+ 4 - 2
src/components/AddAssistCheck/index.less

@@ -9,7 +9,7 @@
 }
 }
 
 
 .pointerFinger {
 .pointerFinger {
-  cursor: pointer;
+  cursor: default;
 }
 }
 
 
 .searchLi {
 .searchLi {
@@ -31,7 +31,9 @@
   max-height: 225px;*/
   max-height: 225px;*/
   // min-height: 80px;
   // min-height: 80px;
 }
 }
-
+.assistListUl {
+  width: 356px;
+}
 .searchLi:hover {
 .searchLi:hover {
   border: 1px solid @blue;
   border: 1px solid @blue;
   box-sizing: border-box;
   box-sizing: border-box;

+ 77 - 27
src/components/AddInspect/SlidePic/index.jsx

@@ -1,7 +1,7 @@
 import React, { Component } from "react";
 import React, { Component } from "react";
 import styles from "./index.less";
 import styles from "./index.less";
-import { normalVal,timestampToTime,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
-import { InspectCommon, Calendar,DelToast} from '@commonComp';
+import { normalVal,getArrow,timestampToTime,getDomUpDown,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
+import { InspectCommon, Notify,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import $ from 'jquery';
@@ -9,6 +9,9 @@ import date1 from '../img/date1.png';
 import ScrollArea from 'react-scrollbar';
 import ScrollArea from 'react-scrollbar';
 import InspectName from '../InspectName';
 import InspectName from '../InspectName';
 
 
+import up from '@images/up.png';
+import down from '@images/down.png';
+
 class SlideSelect extends Component {
 class SlideSelect extends Component {
   constructor(props) {
   constructor(props) {
     super(props);
     super(props);
@@ -16,7 +19,8 @@ class SlideSelect extends Component {
       show:false,
       show:false,
       activeInd:false,
       activeInd:false,
       activeName:'',
       activeName:'',
-      canEdit:true
+      canEdit:true,
+      style:'',
     };
     };
     this.toTime = this.toTime.bind(this);
     this.toTime = this.toTime.bind(this);
     this.handleSlide = this.handleSlide.bind(this);
     this.handleSlide = this.handleSlide.bind(this);
@@ -26,23 +30,34 @@ class SlideSelect extends Component {
     this.timeSure = this.timeSure.bind(this);
     this.timeSure = this.timeSure.bind(this);
     this.setEdit = this.setEdit.bind(this);
     this.setEdit = this.setEdit.bind(this);
     this.handleLabelSub = this.handleLabelSub.bind(this);
     this.handleLabelSub = this.handleLabelSub.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
   }
   }
   handleChangeDate(date) {
   handleChangeDate(date) {
     // console.log(date,'外')
     // console.log(date,'外')
   }
   }
+  
   componentDidMount() {
   componentDidMount() {
+    const {item} = this.props;
     $(document).click((event) => {
     $(document).click((event) => {
-      let inspectToggleDate = document.getElementById("inspectToggleDate")
-      let timeIcon = document.getElementById("timeIcon")
-      let calendarDate = document.getElementById("calendarDate")
-      if (calendarDate) {
-        if (inspectToggleDate != event.target && timeIcon != event.target && !calendarDate.contains(event.target)) {
-          this.props.handleShowDate();
-        }
+      if($(event.target).attr("id")!='addClose'&&$(event.target).attr("id")!='delTit'){
+        this.setState({
+          activeInd:false
+        })
+      }
+    });
+    let type = getArrow(item.minValue,item.maxValue,item.value||null)
+    this.setState({style:type,value:item.value,time:item.time})
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
       }
       }
     });
     });
+    // this.setState({ dateTime: getCurrentDate(1) })
   }
   }
-  
   toTime(time){
   toTime(time){
     let tmpTim = time.split(',').join('')-0
     let tmpTim = time.split(',').join('')-0
     if(time && tmpTim.toString() != 'NaN'){
     if(time && tmpTim.toString() != 'NaN'){
@@ -71,13 +86,13 @@ class SlideSelect extends Component {
       })
       })
     })
     })
   }
   }
-  handleDel(){
-    const {handleDelClick,idx,item} = this.props;
+  handleDel(time){
+    const {handleDelClick,item} = this.props;
     this.setState({
     this.setState({
       activeInd:true,
       activeInd:true,
-      activeName:item.uniqueName
+      activeName:item.uniqueName,
     })
     })
-    handleDelClick&&handleDelClick(1,idx);
+    handleDelClick&&handleDelClick(1,time);
   }
   }
   handleCancel(){
   handleCancel(){
     this.setState({
     this.setState({
@@ -85,9 +100,11 @@ class SlideSelect extends Component {
       activeName:''
       activeName:''
     })
     })
   }
   }
-  delConfirm(){
-    const {handleDelConfirm} = this.props;
-    handleDelConfirm&&handleDelConfirm();
+  delConfirm(item){
+    const {handleDelConfirm,handlePush} = this.props;
+    handleDelConfirm&&handleDelConfirm(item);
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
     this.setState({
     this.setState({
       activeInd:false,
       activeInd:false,
       activeName:''
       activeName:''
@@ -107,27 +124,60 @@ class SlideSelect extends Component {
       refreshScroller()&&refreshScroller().scrollYTo(290);
       refreshScroller()&&refreshScroller().scrollYTo(290);
     })*/
     })*/
   }
   }
+  handleInput(e,item){
+    const {setTipValue} = this.props
+    setTipValue(item,e.target.value)
+    let type = getArrow(item.minValue,item.maxValue,e.target.value||null)
+    this.setState({
+      value:e.target.value,
+      style:type
+    })
+  }
+  handleBlur(){
+    const {handlePush} = this.props;
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
   render() {
   render() {
-    const {item,idx} = this.props;
-    const {canEdit,activeInd,activeName} = this.state;
+    const {item,idx,time} = this.props;
+    const {canEdit,activeInd,activeName,value,style} = this.state;
     return (
     return (
       item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
       item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
-          {item.uniqueName}
+          <span className={styles.bigname}>{item.uniqueName}</span>
+          <span className={styles.smallname}></span>
+          <span className={styles.edit}></span>
+          <span className={styles.maxmin}></span>
+          <span className={styles.pass}>化验时间:{item.time}</span>
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
+                    cancel={this.handleCancel}
+                    confirm={()=>{this.delConfirm(item)}}/>
       </li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
       </li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
           <span className={styles.bigname}>{item.name}</span>
           <span className={styles.bigname}>{item.name}</span>
           <span className={styles.smallname}>{item.uniqueName}</span>
           <span className={styles.smallname}>{item.uniqueName}</span>
           <span className={styles.edit}>
           <span className={styles.edit}>
-            <input disabled={canEdit} type="text" id="canEdit" onDoubleClick={this.setEdit} placeholder='(填写)'/><i></i>{item.units}
+            <input disabled={canEdit} type="text" 
+              id="canEdit" 
+              onDoubleClick={this.setEdit}
+              style={{color:style==2||style==4?'red':style==1?'#D949FF':'#333'}}
+              placeholder='(填写)'
+              autoComplete="off"
+              value={value}
+              onInput={(e)=>{this.handleInput(e,item)}}
+              onBlur={()=>{this.handleBlur()}}
+              /><img style={{display:style==1||style==2?'inline-block':'none'}} src={style==1?down:style==2?up:''} />{item.units}
           </span>
           </span>
-          <span className={styles.maxmin}>正常值:({item.minValue}~{item.maxValue})</span>
+          <span className={styles.maxmin}>{normalVal(item.minValue,item.maxValue)}</span>
           <span className={styles.pass}>化验时间:{item.time}</span>
           <span className={styles.pass}>化验时间:{item.time}</span>
-          <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
-          <DelToast show={activeInd?true:false}
-                    name={activeName} 
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+          <DelToast show={time==item.time&&activeInd?true:false}
+                    name={activeName}
                     right={'-34px'}
                     right={'-34px'}
                     top={'30px'}
                     top={'30px'}
                     cancel={this.handleCancel}
                     cancel={this.handleCancel}
-                    confirm={this.delConfirm}/>
+                    confirm={()=>{this.delConfirm(item)}}/>
       </li>
       </li>
     );
     );
   }
   }

+ 24 - 0
src/components/AddInspect/SlidePic/index.less

@@ -6,6 +6,11 @@
     padding: 10px 0px 10px 0;
     padding: 10px 0px 10px 0;
     border-bottom:1px dashed #989DA3;
     border-bottom:1px dashed #989DA3;
     margin-top: 5px;
     margin-top: 5px;
+    span {
+        display: inline-block;
+        padding: 0 5px;
+        box-sizing: border-box;
+    }
     i {
     i {
         font-style: normal;
         font-style: normal;
         display: inline-block;
         display: inline-block;
@@ -38,6 +43,25 @@
         background-color: #fff;
         background-color: #fff;
         background-size: 100% 100%;
         background-size: 100% 100%;
     }
     }
+    .bigname {
+        width: 20%;
+        font-weight: bold;
+    }
+    .smallname {
+        width: 25%;
+    }
+    .edit {
+        width: 15%;
+        input {
+            width: 40px;
+        }
+        i {
+            
+        }
+    }
+    .maxmin {
+        width: 15%;
+    }
 }
 }
 .slideLi:hover{
 .slideLi:hover{
     background:#F2F2F2;
     background:#F2F2F2;

+ 27 - 41
src/components/AddInspect/index.jsx

@@ -20,7 +20,7 @@ class Inspect extends React.Component {
       numPlus: 0,     //判断是否所有的填写单都是空
       numPlus: 0,     //判断是否所有的填写单都是空
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
       type: null,
       type: null,
-      id: null,
+      time: null,
       pageTop: '',
       pageTop: '',
       // tmpIds: [],      //内层外层
       // tmpIds: [],      //内层外层
       impId: null
       impId: null
@@ -33,14 +33,14 @@ class Inspect extends React.Component {
     this.getCommonList = this.getCommonList.bind(this)
     this.getCommonList = this.getCommonList.bind(this)
     this.changeActivePart = this.changeActivePart.bind(this)
     this.changeActivePart = this.changeActivePart.bind(this)
     this.showDetails = this.showDetails.bind(this)
     this.showDetails = this.showDetails.bind(this)
-    this.delConfirm = this.delConfirm.bind(this)
+    this.handleDelConfirm = this.handleDelConfirm.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.handleCancel = this.handleCancel.bind(this)
     this.handleSearchShow = this.handleSearchShow.bind(this)
     this.handleSearchShow = this.handleSearchShow.bind(this)
     this.changeShowFill = this.changeShowFill.bind(this)
     this.changeShowFill = this.changeShowFill.bind(this)
     this.handleFillShow = this.handleFillShow.bind(this)
     this.handleFillShow = this.handleFillShow.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
   }
   }
-  delConfirm() {//弹窗确定
+  handleDelConfirm() {//弹窗确定
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
     const { delPartItem, handleCloseExcel, handlePush } = this.props;
     const { type, id, impId } = this.state;
     const { type, id, impId } = this.state;
     if (type == 1) {
     if (type == 1) {
@@ -48,15 +48,10 @@ class Inspect extends React.Component {
     } else if (type == 2) {
     } else if (type == 2) {
       handleCloseExcel(impId)
       handleCloseExcel(impId)
     }
     }
-    this.setState({
-      type: null,
-      id: null,
-      impId: null
-    })
     Notify.success("删除成功");
     Notify.success("删除成功");
     handlePush && handlePush({mode:8});       //右侧推送
     handlePush && handlePush({mode:8});       //右侧推送
   }
   }
-  handleDelClick(type, idx) {
+  handleDelClick(type, time) {
     if (type == 2) {
     if (type == 2) {
       this.setState({
       this.setState({
         impId: idx,
         impId: idx,
@@ -66,7 +61,7 @@ class Inspect extends React.Component {
     } else {
     } else {
       this.setState({
       this.setState({
         type: type,
         type: type,
-        id: idx,
+        time: time,
         impId: null
         impId: null
       })
       })
     }
     }
@@ -145,6 +140,7 @@ class Inspect extends React.Component {
     if(tmpShow){
     if(tmpShow){
       this.props.setHighter(48)
       this.props.setHighter(48)
     }else{
     }else{
+      this.props.detailClick(2)
       setPosition(e,"#searchOption",this.props.setHighter)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
     }
   }
   }
@@ -329,8 +325,8 @@ class Inspect extends React.Component {
     }
     }
   }
   }
   render() {
   render() {
-    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
-    const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
     const contStyle={
       opacity:'0.4',
       opacity:'0.4',
       right:'0',
       right:'0',
@@ -342,41 +338,31 @@ class Inspect extends React.Component {
     return (
     return (
       <div className={styles.wrapper}>
       <div className={styles.wrapper}>
         <div className={styles.check}>
         <div className={styles.check}>
-          {
-            getExcelDataList.length > 0 && getExcelDataList.map((items, ind) => {
-              return <div style={{ marginTop: '10px' }}>
-                {
-                  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} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
-                    <DelToast show={impId == ind ? true : false}
-                      top={'22px'}
-                      right={'-34px'}
-                      name="该导入项"
-                      cancel={this.handleCancel}
-                      confirm={this.delConfirm} />
-                    {
-                      items.lisExcelRes.map((item, idx) => {
-                        return <SlideExcel
-                          items={items}
-                          item={item}
-                          idx={idx}
-                          dateTime={this.state.dateTime}
-                          getInfomation={getInfomation}
-                        ></SlideExcel>
-                      })
-                    }
-                  </ul> : null
-                }
-              </div>
-            })
-          }
+          
           <ul className={styles.labelWrap} >
           <ul className={styles.labelWrap} >
+            {
+              labelListSmall && labelListSmall.map((item, idx) => {
+                return <SlidePic
+                  item={item}
+                  idx={idx}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
+                ></SlidePic>
+              })
+            }
             {
             {
               labelListBig && labelListBig.map((item, idx) => {
               labelListBig && labelListBig.map((item, idx) => {
                 return <SlidePic
                 return <SlidePic
                   item={item}
                   item={item}
                   idx={idx}
                   idx={idx}
+                  time={time}
+                  handlePush={handlePush}
+                  handleDelClick={this.handleDelClick}
+                  setTipValue={setTipValue}
+                  handleDelConfirm={handleDelConfirm}
                 ></SlidePic>
                 ></SlidePic>
               })
               })
             }
             }

+ 3 - 1
src/components/BlockEmrCont/index.jsx

@@ -13,6 +13,7 @@ import PastHistory from './PastHistory'
 import PersonalHistory from './PersonalHistory'
 import PersonalHistory from './PersonalHistory'
 import FamilyHistory from './FamilyHistory'
 import FamilyHistory from './FamilyHistory'
 import MarriageHistory from './MarriageHistory'
 import MarriageHistory from './MarriageHistory'
+import NewAdvice from '@containers/NewAdvice';
 import MenstruationHistory from './MenstruationHistory'
 import MenstruationHistory from './MenstruationHistory'
 // import OtherHistory from './OtherHistory';
 // import OtherHistory from './OtherHistory';
 import CheckBody from './CheckBody';
 import CheckBody from './CheckBody';
@@ -82,7 +83,8 @@ class BlockEMRCont extends Component {
           <Inspect setHighter={this.setHighter}></Inspect>
           <Inspect setHighter={this.setHighter}></Inspect>
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
           <AssistCheck setHighter={this.setHighter}></AssistCheck>
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
           <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
-          <AdviceContainer></AdviceContainer>
+          <NewAdvice setHighter={this.setHighter}></NewAdvice>
+          {/* <AdviceContainer></AdviceContainer> */}
         </div>
         </div>
       </ScrollArea>
       </ScrollArea>
       <OperationContainer hideLabel={true}></OperationContainer>
       <OperationContainer hideLabel={true}></OperationContainer>

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

@@ -1,7 +1,7 @@
 @import "~@less/variables.less";
 @import "~@less/variables.less";
 .area{
 .area{
   height: 100%;
   height: 100%;
-  min-width: 1006px;
+  min-width: 500px;
 }
 }
 .EMR-container{
 .EMR-container{
   background: #fff;
   background: #fff;

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

@@ -44,8 +44,8 @@ class DiagResultSearch extends Component {
   getSearchList(searchResult) {
   getSearchList(searchResult) {
     return <div className={style['search-result']}>
     return <div className={style['search-result']}>
       {
       {
-        searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}>
+        searchResult && searchResult.map((item,idx) => {
+          return (<div key={idx} className={style['search-result-item']}>
             <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
             <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
           </div>)
           </div>)
         })
         })
@@ -70,7 +70,7 @@ class DiagResultSearch extends Component {
           <ScrollArea speed={0.8}
           <ScrollArea speed={0.8}
                       horizontal={false}
                       horizontal={false}
                       stopScrollPropagation={searchResult.length>6?true:false}
                       stopScrollPropagation={searchResult.length>6?true:false}
-                      style={{height:'257px'}}
+                      style={{'max-height':'200px',width:'356px'}}
                       className={style["area"]}
                       className={style["area"]}
                       verticalContainerStyle={contStyle}
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}
                       verticalScrollbarStyle={barStyle}

+ 12 - 10
src/components/DiagnosticItem/index.jsx

@@ -46,23 +46,26 @@ class DiagnosticItem extends Component{
         })
         })
     }
     }
     chooseDiagodal(item) {
     chooseDiagodal(item) {
-        const { diagnosticList,getTips, type } = this.props;
+        const { diagnosticList,getTips, type ,addDiagnostic} = this.props;
         // getTips && getTips(item);
         // getTips && getTips(item);
         // if (type == 'search') {
         // if (type == 'search') {
         //     getTips && getTips({type:7,name: item.name, position: 1});
         //     getTips && getTips({type:7,name: item.name, position: 1});
         // }
         // }
         for (let i = 0; i < diagnosticList.length; i++) {
         for (let i = 0; i < diagnosticList.length; i++) {
-            if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
+            if(diagnosticList[i].name === item.name) {
                 Notify.info('该诊断已存在');
                 Notify.info('该诊断已存在');
                 return
                 return
             }
             }
         }
         }
+        this.props.setHighter&&this.props.setHighter(48)
+        const diagType = 1;
+        this.addDiagodal(diagType)
         this.setState({
         this.setState({
             visible: true
             visible: true
         })
         })
        
        
     }
     }
-    getTips(item, e) {console.log(item)
+    getTips(item, e) {
         e.stopPropagation();
         e.stopPropagation();
         const {getTips } = this.props;
         const {getTips } = this.props;
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
@@ -70,7 +73,6 @@ class DiagnosticItem extends Component{
     addDiagodal(diagType){
     addDiagodal(diagType){
         const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
         const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
         item.type = diagType;
         item.type = diagType;
-
          /*if(item.type == 2&&mode=='0') {      //文本模式不走慢病。6.0慢病取消
          /*if(item.type == 2&&mode=='0') {      //文本模式不走慢病。6.0慢病取消
              isChronicMag(item);
              isChronicMag(item);
          }*/
          }*/
@@ -114,24 +116,24 @@ class DiagnosticItem extends Component{
         const { item, title, type } = this.props
         const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
         return (<span className={style['diag-item']} >
                     <span className={`${style['diag-name']}`} 
                     <span className={`${style['diag-name']}`} 
-                          title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
+                          title = {item.name}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           >
                           >
-                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}</p>
-                        {type== 'disSelect' &&<img className={style['info-img']}  
+                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} </p>
+                        {/* {type== 'disSelect' &&<img className={style['info-img']}  
                                 title='点击i图标可查看详细说明'
                                 title='点击i图标可查看详细说明'
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 src={hasEnterImg ? infoMove : infoShow} 
                                 src={hasEnterImg ? infoMove : infoShow} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                 onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                 onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                 onClick={this.getTips.bind(this,item)}
                                 onClick={this.getTips.bind(this,item)}
-                        />}
+                        />} */}
                     </span>
                     </span>
-                    <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
+                    {/* <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
-                    </ConfirmModal>
+                    </ConfirmModal> */}
                    
                    
                 </span>)
                 </span>)
     }
     }

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

@@ -310,21 +310,21 @@ class DiagnosticList extends Component {
                                       <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}}>
                                       <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}}>
                                         {item.name}
                                         {item.name}
                                       </span>
                                       </span>
-                                      <img className={`${style['info-img']}`}
+                                      {/* <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'
                                           title='点击i图标可查看详细说明'
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           src={hasEnterImg ? infoMove : infoShow} 
                                           src={hasEnterImg ? infoMove : infoShow} 
                                           onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                           onMouseEnter={this.handleMouseEnterImg.bind(this)}
                                           onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                           onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
                                           onClick={this.handleClickDiag.bind(this,item,false,false,false)}
                                           onClick={this.handleClickDiag.bind(this,item,false,false,false)}
-                                      />
+                                      /> */}
                                     </span> 
                                     </span> 
-                                    {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
+                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
                                           治疗方案
-                                    </span>
+                                    </span> */}
                                     {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                     {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
                                         管理评估

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

@@ -59,7 +59,7 @@
     position: relative;
     position: relative;
     color:#000;
     color:#000;
     font-weight: bold;
     font-weight: bold;
-    cursor: pointer;
+    cursor: default;
     line-height: 18px;
     line-height: 18px;
 }
 }
 .diag-name-box {
 .diag-name-box {

+ 3 - 1
src/components/Inspect/index.jsx

@@ -240,7 +240,7 @@ class Inspect extends React.Component {
 
 
   }
   }
   render() {
   render() {
-    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick } = this.props;
+    const {hideAllDrop,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -298,7 +298,9 @@ class Inspect extends React.Component {
         >
         >
           <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
           <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
             <AddInspect
             <AddInspect
+              handleDelConfirm={handleDelConfirm}
               labelListBig={labelListBig}
               labelListBig={labelListBig}
+              labelListSmall={labelListSmall}
               handleSign={handleSign}
               handleSign={handleSign}
               setHighter={setHighter}
               setHighter={setHighter}
               refreshScroller={this.refreshScroller}
               refreshScroller={this.refreshScroller}

+ 2 - 2
src/containers/AssistCheck.js

@@ -56,8 +56,8 @@ function mapDispatchToProps(dispatch, store) {
         handleChangeValue(val) {
         handleChangeValue(val) {
             dispatch(getSearchList(val))
             dispatch(getSearchList(val))
         },
         },
-        handleSign(id,idx,type){
-            dispatch(assistLable(id,idx,type))
+        handleSign(item,type){
+            dispatch(assistLable(item,type))
             dispatch(getMRAnalyse())
             dispatch(getMRAnalyse())
         },
         },
         handleDelAssist(idx,name,type){
         handleDelAssist(idx,name,type){

+ 7 - 2
src/containers/Inspect.js

@@ -19,6 +19,7 @@ import {
   setTip,
   setTip,
   searchType,
   searchType,
   resetLabel,
   resetLabel,
+  delOnePic,
 } from '@store/actions/inspect';
 } from '@store/actions/inspect';
 import {
 import {
   billing,
   billing,
@@ -42,6 +43,7 @@ function mapStateToProps(state) {//console.log(state)
     inspectVal: state.inspect.inspectVal,
     inspectVal: state.inspect.inspectVal,
     message: state.patInfo.message,
     message: state.patInfo.message,
     labelListBig: state.inspect.labelListBig,
     labelListBig: state.inspect.labelListBig,
+    labelListSmall: state.inspect.labelListSmall,
     hospitalMsg: state.homePage.sysConfig || {},
     hospitalMsg: state.homePage.sysConfig || {},
     typeConfig: state.typeConfig
     typeConfig: state.typeConfig
   }
   }
@@ -55,6 +57,9 @@ function mapDispatchToProps(dispatch) {
     setContext(obj){
     setContext(obj){
       dispatch(setContext(obj))
       dispatch(setContext(obj))
     },
     },
+    handleDelConfirm(obj){
+      dispatch(delOnePic(obj))
+    },
     handleChangeValue(val) {
     handleChangeValue(val) {
       dispatch(getSearchList(val))
       dispatch(getSearchList(val))
     },
     },
@@ -90,8 +95,8 @@ function mapDispatchToProps(dispatch) {
       dispatch(delPartItem(idx))
       dispatch(delPartItem(idx))
       dispatch(getMRAnalyse())
       dispatch(getMRAnalyse())
     },
     },
-    setTipValue(idx,value) {
-      dispatch(setTip(idx,value))
+    setTipValue(item,value) {
+      dispatch(setTip(item,value))
     },
     },
     //右侧推送
     //右侧推送
     fetchPushInfos(obj) {
     fetchPushInfos(obj) {

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

@@ -1,14 +1,13 @@
 import {GET_ASSIST_SEARCH_LIST,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
 import {GET_ASSIST_SEARCH_LIST,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
 
 
-export const searchList = (list,val) => ({         //右侧到左侧
+export const searchList = (list,val) => ({         //搜索列表渲染
     type:GET_ASSIST_SEARCH_LIST,
     type:GET_ASSIST_SEARCH_LIST,
     list,
     list,
     val
     val
 })
 })
-export const assistLable = (id,idx,sign) => ({         //添加数据
+export const assistLable = (item,sign) => ({         //添加数据
     type:GET_ASSIST_LABEL,
     type:GET_ASSIST_LABEL,
-    id,
-    idx,
+    item,
     sign
     sign
 })
 })
 export const addAssistLabel = (lis) => ({         //右侧推送交到左侧
 export const addAssistLabel = (lis) => ({         //右侧推送交到左侧

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

@@ -21,10 +21,7 @@ export const getSearchResult= (state, action) => {
     let searchResult = []
     let searchResult = []
     action.searchResult && action.searchResult.map((item, index) =>{
     action.searchResult && action.searchResult.map((item, index) =>{
         let searchResultItem = {}
         let searchResultItem = {}
-        searchResultItem.id = item.questionId
         searchResultItem.name = item.name
         searchResultItem.name = item.name
-        searchResultItem.showType = item.showType
-        searchResultItem.retrievalName = item.retrievalName
         searchResultItem.conceptId = item.conceptId
         searchResultItem.conceptId = item.conceptId
         searchResult.push(searchResultItem)
         searchResult.push(searchResultItem)
     }) 
     }) 

+ 8 - 3
src/store/actions/inspect.js

@@ -1,4 +1,4 @@
-import {SET_CONTEXT,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST,SEARCH_TYPE} from '../types/inspect';
+import {SET_CONTEXT,DEL_ONE_PIC,ADD_LABEL,SEARCH_LIST,SET_LABEL,SET_TIP,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST,SEARCH_TYPE} from '../types/inspect';
 
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
     type:SET_LABEL,
     type:SET_LABEL,
@@ -63,12 +63,17 @@ export const setContext = (obj) => ({
     type:SET_CONTEXT,
     type:SET_CONTEXT,
     obj
     obj
 })
 })
-export const setTip = (idx,value) => ({
+export const setTip = (item,value) => ({
     type:SET_TIP,
     type:SET_TIP,
-    idx,
+    item,
     value
     value
 })
 })
 export const searchType = (value) => ({
 export const searchType = (value) => ({
     type:SEARCH_TYPE,
     type:SEARCH_TYPE,
     value
     value
 })
 })
+
+export const delOnePic = (item) => ({
+    type:DEL_ONE_PIC,
+    item
+})

+ 14 - 6
src/store/async-actions/assistCheck.js

@@ -11,14 +11,22 @@ export const getSearchList = (val) => {
     let sex = baseList.patInfo.message.patientSex;
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
         axios.json('/demo/retrieval/index',{
-            type:'1',
-            age:baseList.patInfo.message.patientAge,
-            inputStr:val,
-            sexType: sex == '男'?'1' : sex == '女'?'2':'3'
+            "age": 10,
+            "inputStr": val,
+            "sex": 1,
+            "type": '3'
         })
         })
         .then((res)=>{
         .then((res)=>{
-            const data = res.data.data;
-            dispatch(searchList(data,val.trim()));
+            const data = res.data.data;let curDate=[];
+            let arr = data.pacsNames;
+                for (var key in arr) {
+                    let obj = {}
+                    obj['uniqueName'] = arr[key];
+                    obj['detailName'] = arr[key];
+                    obj['name'] = arr[key];
+                    curDate.push(obj)
+                }
+            dispatch(searchList(curDate,val.trim()));
         })
         })
     }
     }
 };
 };

+ 19 - 13
src/store/async-actions/diagnosticSearch.js

@@ -6,13 +6,13 @@ import { GET_SEARCH } from '@store/types/emergencyHis';
 export const getSearchList = (val,flag) => {
 export const getSearchList = (val,flag) => {
     if(val.trim() == ''){
     if(val.trim() == ''){
         // const data = [];
         // const data = [];
-        if(flag){//��ʷ����
+        if(flag){
             return (dispatch) =>  dispatch({
             return (dispatch) =>  dispatch({
                 type: GET_SEARCH,
                 type: GET_SEARCH,
                 searchResult: []
                 searchResult: []
             })
             })
         }
         }
-        return (dispatch) =>  dispatch({//���
+        return (dispatch) =>  dispatch({
             type: GET_SEARCH_RESULT,
             type: GET_SEARCH_RESULT,
             searchResult: []
             searchResult: []
         })
         })
@@ -27,24 +27,30 @@ export const getSearchList = (val,flag) => {
                 noIds.push(diagnosticList[i].conceptId)
                 noIds.push(diagnosticList[i].conceptId)
             }
             }
         }
         }
-        json('/retrieval/index',{
-            type:'7',
-            age:state.patInfo.message.patientAge,
-            inputStr:val,
-            sexType: state.patInfo.message.sex,
-            inputIds: noIds
+        json('/demo/retrieval/index',{
+            "type":'4',
+            "age": 10,
+            "inputStr": val,
+            "sex": 1
         })
         })
         .then((res)=>{
         .then((res)=>{
-            const data = res.data.data;
-            if(flag){ //��ʷ����
+            const data = res.data.data;let curDate=[];
+            let arr = data.diseaseNames;
+                for (var key in arr) {
+                    let obj = {}
+                    obj['name'] = arr[key];
+                    obj['conceptId'] = '';
+                    curDate.push(obj)
+                }
+            if(flag){ 
                 dispatch({
                 dispatch({
                     type: GET_SEARCH,
                     type: GET_SEARCH,
-                    searchResult: data
+                    searchResult: curDate
                 })
                 })
-            }else{//���
+            }else{
                 dispatch({
                 dispatch({
                     type: GET_SEARCH_RESULT,
                     type: GET_SEARCH_RESULT,
-                    searchResult: data
+                    searchResult: curDate
                 })
                 })
             }
             }
         })
         })

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

@@ -14,7 +14,7 @@ export const getSearchList = (val) => {
     return (dispatch) => {
     return (dispatch) => {
         axios.json('/demo/retrieval/index',{
         axios.json('/demo/retrieval/index',{
             "age": 10,
             "age": 10,
-            "inputStr": "string",
+            "inputStr": val,
             "sex": 1,
             "sex": 1,
             "type": type
             "type": type
         })
         })
@@ -23,7 +23,6 @@ export const getSearchList = (val) => {
             if(type==2){
             if(type==2){
                 curDate = data.lisDetailNames
                 curDate = data.lisDetailNames
             }else{
             }else{
-                console.log(data,data.lisNames)
                 let arr = data.lisNames,tmp=[];
                 let arr = data.lisNames,tmp=[];
                 for (var key in arr) {
                 for (var key in arr) {
                     let obj = {}
                     let obj = {}

+ 2 - 0
src/store/index.js

@@ -13,6 +13,7 @@ import preview from './reducers/preview';
 import otherHistory from './reducers/otherHistory';
 import otherHistory from './reducers/otherHistory';
 import diagnosticList from './reducers/diagnosticList';
 import diagnosticList from './reducers/diagnosticList';
 import inspect from './reducers/inspect';
 import inspect from './reducers/inspect';
+import newAdvice from './reducers/newAdvice';
 import assistCheck from './reducers/assistCheck';
 import assistCheck from './reducers/assistCheck';
 import copyRight from './reducers/copyRight';
 import copyRight from './reducers/copyRight';
 import homePage from './reducers/homePage';
 import homePage from './reducers/homePage';
@@ -82,6 +83,7 @@ const rootReducer = combineReducers({
     familyHistory,
     familyHistory,
     marriageHistory,
     marriageHistory,
     menstruationHistory,
     menstruationHistory,
+    newAdvice,
 });
 });
 
 
 export default createStore(rootReducer, enhancer);
 export default createStore(rootReducer, enhancer);

+ 10 - 21
src/store/reducers/assistCheck.js

@@ -9,8 +9,8 @@ import {
 } from '../types/assistCheck';
 } from '../types/assistCheck';
 import store from '@store';
 import store from '@store';
 const initSearchList = {
 const initSearchList = {
-  list: [], //点击的结果
-  assistLabel: [], //搜索的结果
+  list: [], //搜索的结果
+  assistLabel: [], //点击的结果
   dataString: '', //结果拼接
   dataString: '', //结果拼接
   dataArr: [], //结果拼接
   dataArr: [], //结果拼接
   assistVal: '',
   assistVal: '',
@@ -48,7 +48,7 @@ export default (state = initSearchList, action) => {
     newState.dataArr = tmpObj.arr
     newState.dataArr = tmpObj.arr
     return newState;
     return newState;
   }
   }
-  if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
+  if (action.type == GET_ASSIST_SEARCH_LIST) { //搜索结果
     const newState = Object.assign({}, state);
     const newState = Object.assign({}, state);
     newState.list = action.list
     newState.list = action.list
     newState.assistVal = action.val
     newState.assistVal = action.val
@@ -57,25 +57,14 @@ export default (state = initSearchList, action) => {
     newState.dataArr = tmpObj.arr
     newState.dataArr = tmpObj.arr
     return newState;
     return newState;
   }
   }
-  if (action.type == GET_ASSIST_LABEL) { //默认
+  if (action.type == GET_ASSIST_LABEL) { //选中搜索结果
     const newState = Object.assign({}, state);
     const newState = Object.assign({}, state);
-    const tempArrs = newState.assistLabel;
-    let tempArr = [];
-    let tmpCommonLis = store.getState().homePage.assistList;
-    if (action.sign == 'common') {
-      let tmpAssistList = JSON.parse(JSON.stringify(tmpCommonLis))
-      tempArr = tmpAssistList;
-    } else {
-      tempArr = newState.list
-    }
-    for (let i = 0; i < tempArr.length; i++) {
-      if (tempArr[i].conceptId == action.id && i == action.idx) {
-        tempArr[i].time = getCurrentDate(1);
-        tempArrs.push(tempArr[i]);
-        newState.assistLabel = [...tempArrs];
-      }
-    }
-    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tempArrs = newState.assistLabel;
+    let tempList = action.item
+    tempList['time'] = getCurrentDate(1)
+    tempArrs.push(tempList)
+    let tmpObj = getAllString([],newState.assistLabel)
+    newState.assistLabel = [...tempArrs]
     newState.dataArr = tmpObj.arr
     newState.dataArr = tmpObj.arr
     newState.dataString = tmpObj.str
     newState.dataString = tmpObj.str
     return newState;
     return newState;

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

@@ -7,31 +7,7 @@ import { addDiagnostic,  delDiagnostic, upDiagnostic, downDiagnostic, setTreat,
 const initState = {
 const initState = {
     isFirst: true,
     isFirst: true,
     diagnosticList: [
     diagnosticList: [
-        // {
-        //     id: 1,
-        //     name: '脑梗塞',
-        //     type: 1
-        // },
-        // {
-        //     id: 2,
-        //     name: '高血压',
-        //     type: 2
-        // },
-        // {
-        //     id: 3,
-        //     name: '慢性支气管炎',
-        //     type: 1
-        // },
-        // {
-        //     id: 4,
-        //     name: '急性支气管炎',
-        //     type: 2
-        // },
-        // {
-        //     id: 5,
-        //     name: '原发性高血压',
-        //     type: 1
-        // }
+    
     ],
     ],
     mainSuitStr:'',
     mainSuitStr:'',
     diagnosticStrNoType:'',
     diagnosticStrNoType:'',

+ 47 - 23
src/store/reducers/inspect.js

@@ -13,9 +13,10 @@ import {
     SET_CONTEXT,
     SET_CONTEXT,
     SET_TIP,
     SET_TIP,
     SEARCH_TYPE,
     SEARCH_TYPE,
+    DEL_ONE_PIC,
 } from '../types/inspect';
 } from '../types/inspect';
 import store from '@store';
 import store from '@store';
-import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
+import { getStringPlus,  getPushLists,  getPushList,getCurrentDate} from '@utils/tools.js';
 
 
 const initSearchList = {
 const initSearchList = {
     list: [], //搜索的结果
     list: [], //搜索的结果
@@ -33,15 +34,59 @@ const initSearchList = {
     context:{},
     context:{},
     shType:2,
     shType:2,
     labelListBig:[],//大项
     labelListBig:[],//大项
-    labelListSmall:[],//
+    labelListSmall:[],//
 }
 }
 
 
 export default (state = initSearchList, action) => {
 export default (state = initSearchList, action) => {
+    if (action.type == DEL_ONE_PIC) {
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        if(tmpLis&&tmpLis.flg == 1){//大项
+            tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
+            newState.labelListSmall = [...tempArrs]
+        }
+        return newState;
+    }
+
+    if (action.type == SET_TIP) {    
+        const newState = Object.assign({}, state);
+        let tempArr = newState.labelListBig;
+        let tempArrs = newState.labelListSmall;
+        let tmpLis = action.item
+        tempArrs = tempArrs.filter((item)=>{
+            if(item.time == tmpLis.time){
+                item.value = action.value
+            }
+            return item
+        })
+        newState.labelListSmall = [...tempArrs]
+        return newState;
+    }
     if (action.type == SEARCH_TYPE) {
     if (action.type == SEARCH_TYPE) {
         const newState = Object.assign({}, state);
         const newState = Object.assign({}, state);
         newState.shType = action.value
         newState.shType = action.value
         return newState;
         return newState;
     }
     }
+    if (action.type == RESET_LABEL) {             //选中的结果重组
+        const newState = Object.assign({}, state);
+        const tempArr = newState.labelListBig;
+        const tempArrs = newState.labelListSmall;
+        let tmpLis = action.list
+        tmpLis['time'] = getCurrentDate(1)
+        if(tmpLis.flg == 1){//大项
+            tempArr.push(tmpLis)
+            newState.labelListBig = [...tempArr]
+        }else{//小项
+            tempArrs.push(tmpLis)
+            newState.labelListSmall = [...tempArrs]
+        }
+        return newState;
+    }
     if (action.type == SEARCH_LIST) {
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         const newState = Object.assign({}, state);
         newState.list = action.list
         newState.list = action.list
@@ -71,13 +116,6 @@ export default (state = initSearchList, action) => {
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
         return newState;
     }
     }
-    if (action.type == RESET_LABEL) {             //选中的结果重组
-        const newState = Object.assign({}, state);
-        const tempArr = newState.labelListBig;
-        tempArr.push(action.list)
-        newState.labelListBig = [...tempArr]
-        return newState;
-    } 
     if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上
     if (action.type == ADD_LABEL) {             //右侧推送的化验辅检项,点击开单放到左侧化验辅检的位置上
         const newState = Object.assign({}, state);
         const newState = Object.assign({}, state);
         const tempArr = newState.labelList;
         const tempArr = newState.labelList;
@@ -185,20 +223,6 @@ export default (state = initSearchList, action) => {
         newState.context = action.obj
         newState.context = action.obj
         return newState;
         return newState;
     }
     }
-    if (action.type == SET_TIP) {    
-        const newState = Object.assign({}, state);
-        const tempArr = newState.labelList;
-        for(let i = 0;i < tempArr.length;i++){
-            if(action.idx == i){
-                tempArr[i].inpValue=action.value
-            }
-        }
-        let tmpArr = newState.getExcelDataList;
-        newState.pushItem = getPushList(tmpArr,tempArr);
-        newState.pushItems = getPushLists(tmpArr,tempArr);
-        newState.inspectStrPlus = getStringPlus(newState.pushItems)
-        return newState;
-    }
     return state;
     return state;
 }
 }
 
 

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

@@ -141,7 +141,6 @@ export default (state = initDataList, action) => {
   if (action.type === DEL_ITEMS_ADMIN) {//删除管理员模板
   if (action.type === DEL_ITEMS_ADMIN) {//删除管理员模板
     const newState = Object.assign({}, state);
     const newState = Object.assign({}, state);
     let tempArr = newState.adminItems,tmpTmpLis = [];
     let tempArr = newState.adminItems,tmpTmpLis = [];
-    console.log(action)
     for(let i = 0;i < tempArr.length;i++){
     for(let i = 0;i < tempArr.length;i++){
       let tmpAction = tempArr[i]
       let tmpAction = tempArr[i]
       if(tmpAction.id == action.folderId){
       if(tmpAction.id == action.folderId){

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

@@ -14,3 +14,4 @@ export const ADD_LABEL = 'ADD_LABEL';
 export const SET_CONTEXT = 'SET_CONTEXT';
 export const SET_CONTEXT = 'SET_CONTEXT';
 export const SET_TIP = 'SET_TIP';
 export const SET_TIP = 'SET_TIP';
 export const SEARCH_TYPE = 'SEARCH_TYPE';
 export const SEARCH_TYPE = 'SEARCH_TYPE';
+export const DEL_ONE_PIC = 'DEL_ONE_PIC';

+ 38 - 2
src/utils/tools.js

@@ -1328,6 +1328,41 @@ function getDomUpDown(min,max,value){
   }
   }
   return dom;
   return dom;
 }
 }
+function getArrow(min,max,value){//1下降2上升3正常4标红
+  let dom = 3;
+  if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''||value == null||value == undefined){
+    dom = 3
+  }else if (!isNaN(min) && !isNaN(max) &&min!=null&&max!=null) {//有最大值最小值
+    if (isNaN(value)) {//输入的不是数据
+      dom = 4
+    } else if (value <= min) {//下降
+      dom = 1
+    } else if (value >= max) {//上升
+      dom = 2
+    } else {//正常
+      dom = 3
+    }
+  } else if (min==null && !isNaN(max)&&max!=null) {//有最大值无最小值
+    if (value >= max) {//上升
+      dom = 2
+    } else if(isNaN(value)){
+      dom = 4
+    }else {//正常
+      dom = 3
+    }
+  } else if (!isNaN(min) && max==null&&min!=null) {//有最小值无最大值
+    if (value <= min) {//下降
+      dom = 1
+    } else if(isNaN(value)){
+      dom = 4
+    }else {//正常
+      dom = 3
+    }
+  } else {//无最大最小值(中文))
+    dom = 3
+  }
+  return dom;
+}
 //键值对转换
 //键值对转换
 function parseNameVal(arr){
 function parseNameVal(arr){
   let obj = {};
   let obj = {};
@@ -1527,7 +1562,7 @@ function setPosition (e,dom,setHighter){
     let btmHt = wrapHt-(clickHt-111)-scrollHt;//点击位置距离底部的距离
     let btmHt = wrapHt-(clickHt-111)-scrollHt;//点击位置距离底部的距离
     // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
     // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
     if(btmHt<contHt){
     if(btmHt<contHt){
-      setHighter&&setHighter(contHt-btmHt+20);
+      setHighter&&setHighter(contHt-btmHt+100);
     }else{
     }else{
       setHighter&&setHighter(48);       //标签填写单连续点击弹出,未超出需要恢复
       setHighter&&setHighter(48);       //标签填写单连续点击弹出,未超出需要恢复
     }
     }
@@ -1803,5 +1838,6 @@ module.exports = {
     getValuedLabels,
     getValuedLabels,
     removeRepeat,
     removeRepeat,
     handleMouseUp,
     handleMouseUp,
-    checkDeptContent
+    checkDeptContent,
+    getArrow
 };
 };