Selaa lähdekoodia

Merge branch 'newVersion6.0' into lcq

morphone1995 4 vuotta sitten
vanhempi
commit
6c38033037
45 muutettua tiedostoa jossa 310 lisäystä ja 19963 poistoa
  1. BIN
      src/common/images/hideConfirm.png
  2. 4 5
      src/components/AddAssistCheck/AssistName/index.jsx
  3. 2 2
      src/components/AddAssistCheck/index.jsx
  4. 19 19
      src/components/AddInspect/SlidePic/index.jsx
  5. 12 15
      src/components/AddInspect/index.jsx
  6. 0 99
      src/components/AddNewInspect/SlideExcel/index.jsx
  7. 0 199
      src/components/AddNewInspect/SlideExcel/index.less
  8. 57 0
      src/components/AddNewInspect/SlideIpt/index.jsx
  9. 13 27
      src/components/AddNewInspect/SlidePic/index.jsx
  10. 18 239
      src/components/AddNewInspect/index.jsx
  11. 1 1
      src/components/DiagResultSearch/index.jsx
  12. BIN
      src/components/DiagnosticList/img/singleB.png
  13. BIN
      src/components/DiagnosticList/img/singleL.png
  14. 9 13
      src/components/DiagnosticList/index.jsx
  15. 7 1
      src/components/DiagnosticList/index.less
  16. 0 2
      src/components/InfoTitle/index.jsx
  17. BIN
      src/components/NewAdvice/dists/FileAPI.flash.camera.swf
  18. BIN
      src/components/NewAdvice/dists/FileAPI.flash.image.swf
  19. BIN
      src/components/NewAdvice/dists/FileAPI.flash.swf
  20. 0 3608
      src/components/NewAdvice/dists/FileAPI.html5.js
  21. 0 2
      src/components/NewAdvice/dists/FileAPI.html5.min.js
  22. 0 4418
      src/components/NewAdvice/dists/FileAPI.js
  23. 0 2
      src/components/NewAdvice/dists/FileAPI.min.js
  24. 0 11008
      src/components/NewAdvice/dists/jQuery.js
  25. 0 4
      src/components/NewAdvice/dists/jq.js
  26. 0 2
      src/components/NewAdvice/dists/jquery.fileapi.min.js
  27. 2 230
      src/components/NewAdvice/index.jsx
  28. 13 1
      src/components/PreviewBody/MedicalAdvice/index.jsx
  29. 2 1
      src/components/PushData/index.jsx
  30. 4 1
      src/components/PushData/index.less
  31. 2 2
      src/containers/AssistCheck.js
  32. 8 6
      src/containers/DiagnosticList.js
  33. 4 4
      src/containers/Inspect.js
  34. 6 6
      src/containers/NewAdvice.js
  35. 2 2
      src/store/actions/assistCheck.js
  36. 54 1
      src/store/actions/diagnosticList.js
  37. 4 4
      src/store/actions/inspect.js
  38. 6 6
      src/store/actions/newAdvice.js
  39. 0 7
      src/store/async-actions/print.js
  40. 3 1
      src/store/reducers/assistCheck.js
  41. 9 2
      src/store/reducers/diagnosticList.js
  42. 15 4
      src/store/reducers/inspect.js
  43. 31 17
      src/store/reducers/newAdvice.js
  44. 2 1
      src/store/types/diagnosticList.js
  45. 1 1
      src/utils/tools.js

BIN
src/common/images/hideConfirm.png


+ 4 - 5
src/components/AddAssistCheck/AssistName/index.jsx

@@ -24,19 +24,18 @@ class AssistName extends Component {
 			return name
 		}
 	}
-  checkOnOff(item){
+  checkOnOff(item,idx){
     const {checkOnOff,handlePush} = this.props
-    checkOnOff(item)
+    checkOnOff(item,idx)
     handlePush && handlePush({mode:8});       //右侧推送
   }
 	render() {
-		const { winWidth, name, getInfomation,normal,item } = this.props;
+		const { winWidth, name, getInfomation,normal,item,idx } = this.props;
 		return (
 				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold'}} ref={this.$assistName}>
-          <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
+          <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
 					<span className={styles.tagSpan} title={name}>
 						{name&&this.splitName(name)}:
-            {/* <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span> */}
 					</span>
 				</span>
 		);

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

@@ -181,7 +181,7 @@ class AddAssistCheck extends React.Component {
     this.setState({ date: false })
   }
   setEdit(e){
-    $('.canEdit').blur().attr('disabled','disabled')
+    // $('.canEdit').blur().attr('disabled','disabled')
     $(e.target).removeAttr('disabled').focus()
   }
   handleBlur(){
@@ -231,7 +231,7 @@ class AddAssistCheck extends React.Component {
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
               </span> */}
-              <AssistName item={item} checkOnOff={checkOnOff} name={item.name} winWidth={winWidth} handlePush={handlePush} getInfomation={getInfomation}></AssistName>
+              <AssistName item={item} idx={idx} checkOnOff={checkOnOff} name={item.name} winWidth={winWidth} handlePush={handlePush} getInfomation={getInfomation}></AssistName>
               <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                 <ScrollArea speed={0.8}
                             horizontal={false}

+ 19 - 19
src/components/AddInspect/SlidePic/index.jsx

@@ -82,13 +82,13 @@ class SlideSelect extends Component {
       show:!tmpShow
     })
   }
-  handleDel(time){
+  handleDel(part,idx){
     const {handleDelClick,item} = this.props;
     this.setState({
       activeInd:true,
       activeName:item.uniqueName,
     })
-    handleDelClick&&handleDelClick(1,time);
+    handleDelClick&&handleDelClick(1,part,idx);
   }
   handleCancel(){
     this.setState({
@@ -96,9 +96,9 @@ class SlideSelect extends Component {
       activeName:''
     })
   }
-  delConfirm(item){
+  delConfirm(item,idx){
     const {handleDelConfirm,handlePush} = this.props;
-    handleDelConfirm&&handleDelConfirm(item);
+    handleDelConfirm&&handleDelConfirm(item,idx);
     Notify.success("删除成功");
     handlePush && handlePush({mode:8});       //右侧推送
     this.setState({
@@ -149,27 +149,27 @@ class SlideSelect extends Component {
     $('.canEdit').attr('disabled','disabled')
     handlePush && handlePush({mode:8});       //右侧推送
   }
-  checkOnOff(item){
+  checkOnOff(item,idx){
     const {checkOnOff,handlePush} = this.props
-    checkOnOff(item)
+    checkOnOff(item,idx)
     handlePush && handlePush({mode:8});       //右侧推送
   }
   setEdit(e){
-    store.dispatch(embedPush({
-      action: "lis",
-      mode: 1
-    }))
-    $('.canEdit').blur().attr('disabled','disabled')
+    // store.dispatch(embedPush({
+    //   action: "lis",
+    //   mode: 1
+    // }))
+    // $('.canEdit').blur().attr('disabled','disabled')
     $(e.target).removeAttr('disabled').focus()
   }
   render() {
-    const {item,idx,time} = this.props;
+    const {item,idx,activeIdx,activeSign} = this.props;
     const {canEdit,activeInd,activeName,value,style} = this.state;
     return (
       item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
           <table>
             <tr>
-              <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
+              <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
               <span className={styles.bigname}>{item.uniqueName}</span>
               <span className={styles.smallname}></span>
               <span className={styles.edit}></span>
@@ -186,15 +186,15 @@ class SlideSelect extends Component {
                     onBlur={()=>{this.handleBlur()}}
                     />
               </span>
-              <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
+              <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item,idx)}}></span>
             </tr>
           </table>
-          <DelToast show={time==item.time&&activeInd?true:false}
+          <DelToast show={activeSign==item.flg&&activeIdx==idx&&activeInd?true:false}
                     name={activeName} 
                     right={'-34px'}
                     top={'30px'}
                     cancel={this.handleCancel}
-                    confirm={()=>{this.delConfirm(item)}}/>
+                    confirm={()=>{this.delConfirm(item,idx)}}/>
       </li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}> 
           <span style={{width:'22px'}}></span>
           <span className={styles.bigname}>{item.name}</span>
@@ -224,13 +224,13 @@ class SlideSelect extends Component {
                 onBlur={()=>{this.handleBlur()}}
                 />
           </span>
-          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
-          <DelToast show={time==item.time&&activeInd?true:false}
+          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item,idx)}}></span>
+          <DelToast show={activeSign==item.flg&&activeIdx==idx&&activeInd?true:false}
                     name={activeName}
                     right={'-34px'}
                     top={'30px'}
                     cancel={this.handleCancel}
-                    confirm={()=>{this.delConfirm(item)}}/>
+                    confirm={()=>{this.delConfirm(item,idx)}}/>
       </li>
     );
   }

+ 12 - 15
src/components/AddInspect/index.jsx

@@ -23,7 +23,9 @@ class Inspect extends React.Component {
       time: null,
       pageTop: '',
       // tmpIds: [],      //内层外层
-      impId: null
+      impId: null,
+      activeIdx: '',
+      activeSign:'',
     }
     this.$ul = React.createRef();
     this.handleChangeDate = this.handleChangeDate.bind(this)
@@ -51,7 +53,7 @@ class Inspect extends React.Component {
     Notify.success("删除成功");
     handlePush && handlePush({mode:8});       //右侧推送
   }
-  handleDelClick(type, time) {
+  handleDelClick(type, part,idx) {
     if (type == 2) {
       this.setState({
         impId: idx,
@@ -61,7 +63,8 @@ class Inspect extends React.Component {
     } else {
       this.setState({
         type: type,
-        time: time,
+        activeIdx: idx,
+        activeSign:part.flg,
         impId: null
       })
     }
@@ -260,18 +263,10 @@ class Inspect extends React.Component {
     handlePush && handlePush({mode:8});       //右侧推送
   }
   getSearchList(list) {//搜索列表
-    const contStyle={
-      opacity:'0.4',
-      right:'0',
-      top:'1px',
-      zIndex:'15',
-      width:'14px',
-      background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
     return <ul className={`${styles.searchLiUl} ${styles.searchIsp}`} style={{height:'205px',width:'356px',overflow:'auto'}}>
       {
         list && list.map((item, idx) => {
-          let renderText = item.uniqueName ? item.uniqueName + `(${item.name})` : item.name   // 有大项需要显示大项
+          let renderText = item.flg==0&&item.uniqueName ? item.uniqueName + `(${item.name})` : item.name   // 有大项需要显示大项
           return <li key={idx}
             className={styles.searchLi}
             title={renderText}
@@ -323,7 +318,7 @@ class Inspect extends React.Component {
   }
   render() {
     const {setHighter,refreshScroller,checkOnOff, 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 { tmpId, tmpIdx, time, pageTop, impId,activeIdx,activeSign } = this.state;
     const contStyle={
       opacity:'0.4',
       right:'0',
@@ -343,7 +338,8 @@ class Inspect extends React.Component {
                   item={item}
                   checkOnOff={checkOnOff}
                   idx={idx}
-                  time={time}
+                  activeIdx={activeIdx}
+                  activeSign={activeSign}
                   handlePush={handlePush}
                   handleDelClick={this.handleDelClick}
                   setTipValue={setTipValue}
@@ -357,7 +353,8 @@ class Inspect extends React.Component {
                   item={item}
                   checkOnOff={checkOnOff}
                   idx={idx}
-                  time={time}
+                  activeIdx={activeIdx}
+                  activeSign={activeSign}
                   handlePush={handlePush}
                   handleDelClick={this.handleDelClick}
                   setTipValue={setTipValue}

+ 0 - 99
src/components/AddNewInspect/SlideExcel/index.jsx

@@ -1,99 +0,0 @@
-import React, { Component } from "react";
-import styles from "./index.less";
-import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
-import slideUp from "@common/images/slide-up.png";
-import slideDown from "@common/images/slide-down.png";
-class SlideExcel extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      show: false
-    };
-    this.toTime = this.toTime.bind(this)
-    this.handleSlide = this.handleSlide.bind(this)
-  }
-  toTime(time) {
-    let tmpTim = time.split(',').join('') - 0
-    if (time && tmpTim.toString() != 'NaN') {
-      let date = new Date('1900-01-01');
-      let dateTim = date.getTime();
-      let times = (tmpTim - 2) * 24 * 60 * 60 * 1000;
-      let result = timestampToTime(dateTim + times).split(' ')[0]
-      return result;
-    } else {
-      return time;
-    }
-  }
-  handleSlide() {
-    let tmpShow = this.state.show
-    this.setState({
-      show: !tmpShow
-    })
-  }
-  render() {
-    const { items, item, idx, getInfomation, dateTime } = this.props;
-    const { show } = this.state;
-    return (
-      <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
-        <span className={styles.excelDataTitle}>
-          <span className={`${styles.tagSpan} ${styles.selectTagSpan}`}>
-            <span className={`${styles.menus} ${setFontColorSize(2)}`}>{item.menus}</span>
-            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
-          </span>
-        </span>
-        <table className={`${styles.table} ${setFontColorSize(2)}`}>
-          {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
-            return <tr>
-              <td style={{ width: '30%' }}>
-                <span className={styles.tagSpan}>
-                  {value.itemName}
-                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
-                </span>
-              </td>
-              <td style={{ width: '20%' }}>
-                {
-                  getStatusImg(value.type, value.value, 1)
-                }
-                {value.unit}</td>
-              <td style={{ width: '25%' }}>
-                {normalVal(value.min, value.max)}
-              </td>
-              <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '检验时间: ' + this.toTime(value.time)}</td>
-            </tr>
-          })) : (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
-            if (idx < 4) {
-              return <tr>
-                <td style={{ width: '30%' }}>
-                  <span className={styles.tagSpan}>
-                    {value.itemName}
-                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
-                  </span>
-                </td>
-                <td style={{ width: '20%' }}>
-                  {
-                    getStatusImg(value.type, value.value, 1)
-                  }
-                  {value.unit}</td>
-                <td style={{ width: '25%' }}>
-                  {normalVal(value.min, value.max)}
-                </td>
-                <td style={{ width: '25%' }}>{value.time == '' ? ('导入时间: ' + dateTime) : '检验时间: ' + this.toTime(value.time)}</td>
-              </tr>
-            }
-          }))
-          }
-        </table>
-        {
-          item.lisExcelItem && item.lisExcelItem.length > 5 ?
-            <div className={`${styles.slides} ${setFontColorSize(2)}`} onClick={this.handleSlide}>
-              {
-                show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
-              }
-              <img src={show ? slideUp : slideDown} alt="" />
-            </div> : null
-        }
-      </li>
-    );
-  }
-}
-export default SlideExcel;

+ 0 - 199
src/components/AddNewInspect/SlideExcel/index.less

@@ -1,199 +0,0 @@
-@import "~@less/variables.less";
-.excelDataLis {
-    // cursor: pointer;
-    color: #767676;
-    position: relative;
-    padding-top: 10px;
-    padding-bottom: 10px;
-    border-bottom:1px dashed #989DA3;
-    i {
-        font-style: normal;
-        display: inline-block;
-        vertical-align: top;
-        padding-top: 3px;
-        &:before {
-            content: '\300C';
-        }
-        &:after {
-            content: '\300D';
-        }
-    }  
-    &>p {
-        cursor: pointer;
-        color: #767676;
-        display: inline-block;
-        position: relative;
-        vertical-align: top;
-    } 
-    .partDel {
-        width: 13px;
-        height: 13px;
-        margin-bottom: 11px;
-        cursor: pointer;
-        display: inline-block;
-        position: absolute;
-        right: 0;
-        top: 12px;
-        background-color: #fff;
-    }
-}
-
-
-.table {
-  color: #000;
-  width: 100%;
-  // display: inline-block;
-  tr {
-    line-height: 18px;
-    height: 18px;
-    width: 100%;
-    font-size: unset;
-    td {
-      padding-top: 3px;
-      font-size: unset;
-      span {
-        font-size: unset;
-      }
-    }
-  }
-}
-
-
-.itemPart {
-    height: 28px;
-    // line-height: 28px;
-    overflow: hidden;
-    padding-top: 0 !important;
-    width: 290px;
-    float: left;
-    padding: 0 15px;
-    box-sizing: border-box;
-    span {
-        display: inline-block;
-    }
-    .itemPartL {
-        max-width: 180px;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        float: left;
-    }
-    .itemPartR {
-        width: 62px;
-        outline: none;
-        float: right;
-    }
-    .itemPartT {
-        float: right;
-        input {
-            width: 40px;
-            text-align: center;
-        }
-        .unit {
-            display: inline-block;
-        }
-    }
-}
-.itemPartOne {
-    width: 100% !important;
-}
-
-.excelDataLis {
-    padding: 2px 0px;
-    border-bottom: 1px dashed #989DA3;
-    .excelDataTitle {
-        width: 100%;
-        vertical-align: top;
-        padding-left: 10px;
-        float: left;
-        color: #000;
-    }
-    table {
-        width: 100%;
-        tr {
-            height: 16px;
-            line-height: 16px;
-            width: 100%;
-        }
-        td {
-            text-align: left;
-            padding-top: 6px;
-            padding-left: 10px;
-            cursor: default;
-        }
-        .excelUnit {
-            width: auto;
-            margin-left: 5px;
-        }
-    }
-}
-.center {
-    text-align: center;
-    font-size: 16px;
-    padding-top: 10px;
-    padding-bottom: 50px;
-}
-.slides {
-  background-color: #EDEDED;
-  text-align: center;
-  height: 28px;
-  line-height: 28px;
-  margin: 10px 0 8px 0;
-  cursor: pointer;
-  span {
-    color:#7d7d7d;
-    font-size: unset;
-  }
-  img{
-    vertical-align: middle;
-  }
-  .num {
-    color: @blue;
-  }
-}
-.imgInfo {
-  position: relative;
-}
-.imgInfo , .imgInfo1{
-  width: 15px;
-  height: 17px;
-  border-bottom: 0 none !important;
-  background: url('../img/info2.png') no-repeat center center;
-  background-size: 100% auto; 
-  position: absolute;
-  top: -10px;
-  left: 50%;
-  margin-left: -8px;
-  display: none;
-  cursor: pointer;
-}
-.imgInfo1 {
-  top: -13px;
-}
-.imgInfo:hover, .imgInfo1:hover {
-  background: url('../img/info3.png') no-repeat center center;
-  background-size: 100% auto; 
-}
-.excelDataTitle {
-  .tagSpan {
-    display: inline-block;
-    line-height: 28px;
-  }
-}
-.tagSpan {
-  display: inline-block;
-  position: relative;
-}
-.selectTagSpan {
-  // color: #000;
-  // font-weight: bold;
-  // .menus {
-  //   border-bottom: 1px solid #666666;
-  // }
-}
-.tagSpan:hover {
-  .imgInfo, .imgInfo1 {
-    display: block;
-  }
- 
-}

+ 57 - 0
src/components/AddNewInspect/SlideIpt/index.jsx

@@ -0,0 +1,57 @@
+import React, { Component } from "react";
+import $ from 'jquery';
+
+class SlideIpt extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false,
+      activeInd:false,
+      activeName:'',
+      canEdit:true,
+      style:'',
+      value:''
+    };
+    this.setEdit = this.setEdit.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
+  }
+  
+  componentDidMount(){
+    const {item} = this.props
+    this.setState({value:item.time})
+  }
+  handleInput(e,item,sign){
+    e.stopPropagation();
+    const {setTipValue} = this.props
+    setTipValue(item,e.target.value,sign)
+  }
+  handleInputTime(e){
+    this.setState({value:e.target.value})
+  }
+  handleBlur(e,item,sign){
+    const {handlePush,setTipValue} = this.props;
+    $('.canEdit').attr('disabled','disabled')
+    setTipValue(item,e.target.value,sign)
+    handlePush && handlePush({mode:8});       //右侧推送
+  }
+  setEdit(e){
+    // $('.canEdit').blur().attr('disabled','disabled')
+    $(e.target).removeAttr('disabled').focus()
+  }
+  render() {
+    const {item,idx} = this.props;
+    return (
+      <input disabled="disabled" type="text" 
+          class="canEdit" 
+          onDoubleClick={(e)=>this.setEdit(e)}
+          style={{color:'#333'}}
+          placeholder='时间'
+          autoComplete="off"
+          value={this.state.value}
+          onInput={(e)=>{this.handleInputTime(e)}}
+          onBlur={(e)=>{this.handleBlur(e,item,1,idx)}}
+          />
+    );
+  }
+}
+export default SlideIpt;

+ 13 - 27
src/components/AddNewInspect/SlidePic/index.jsx

@@ -4,6 +4,8 @@ import {  Notify,DelToast} from '@commonComp';
 import $ from 'jquery';
 import checkOff from '@common/images/check_off.png';
 import checkOn from '@common/images/check_on.png';
+import SlideIpt from '../SlideIpt';
+
 
 class SlidePic extends Component {
   constructor(props) {
@@ -32,13 +34,6 @@ class SlidePic extends Component {
       }
     });
   }
-  // shouldComponentUpdate(nextProps,nextState){
-  //   console.log(this.props.item.time , nextProps.item.time,nextState)
-  //   if(this.props.item.time == nextProps.item.time){
-  //     return false
-  //   }
-  //   return true
-  // }
   handleDel(time){
     const {handleDelClick,item} = this.props;
     this.setState({
@@ -53,9 +48,9 @@ class SlidePic extends Component {
       activeName:''
     })
   }
-  delConfirm(item){
+  delConfirm(item,idx){
     const {handleDelConfirm,handlePush} = this.props;
-    handleDelConfirm&&handleDelConfirm(item);
+    handleDelConfirm&&handleDelConfirm(item,idx);
     Notify.success("删除成功");
     handlePush && handlePush({mode:8});       //右侧推送
     this.setState({
@@ -64,8 +59,8 @@ class SlidePic extends Component {
     })
   }
   handleInput(e,item,sign){
+    e.stopPropagation();
     const {setTipValue} = this.props
-    console.log(item,e.target.value)
     setTipValue(item,e.target.value,sign)
   }
   handleBlur(){
@@ -73,21 +68,21 @@ class SlidePic extends Component {
     $('.canEdit').attr('disabled','disabled')
     handlePush && handlePush({mode:8});       //右侧推送
   }
-  checkOnOff(item){
+  checkOnOff(item,idx){
     const {checkOnOff,handlePush} = this.props
-    checkOnOff(item)
+    checkOnOff(item,idx)
     handlePush && handlePush({mode:8});       //右侧推送
   }
   setEdit(e){
-    $('.canEdit').blur().attr('disabled','disabled')
+    // $('.canEdit').blur().attr('disabled','disabled')
     $(e.target).removeAttr('disabled').focus()
   }
   render() {
-    const {item,time} = this.props;
+    const {item,time,setTipValue,idx,handlePush} = this.props;
     const {canEdit,activeInd,activeName,value,style} = this.state;
     return (
       <li key={item.time} className={`${styles.slideLi} clearfix`}> 
-          <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
+          <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
           <span className={styles.bigname}>{item.name}</span>
           <span className={styles.smallname}>{item.flg == 5?'药品':item.flg == 6?'手术/操作':'输血'}</span>
           <span className={styles.edit}>
@@ -100,22 +95,13 @@ class SlidePic extends Component {
                 placeholder={item.flg == 5?'(填写用法计量)':'(填写用量)'}
                 autoComplete="off"
                 value={item.value}
-                onInput={(e)=>{this.handleInput(e,item,2)}}
+                onInput={(e)=>{this.handleInput(e,item,2,idx)}}
                 onBlur={()=>{this.handleBlur()}}
                 />:null
             }
           </span>
           <span className={styles.pass}>
-            <input disabled="disabled" type="text" 
-                class="canEdit" 
-                onDoubleClick={(e)=>this.setEdit(e)}
-                style={{color:'#333'}}
-                placeholder='时间'
-                autoComplete="off"
-                value={item.time}
-                onChange={(e)=>{this.handleInput(e,item,1)}}
-                onBlur={(e)=>{this.handleBlur();}}
-                />
+            <SlideIpt item={item} setTipValue={setTipValue} handlePush={handlePush} idx={idx}/> 
           </span>
           <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item.time)}}></span>
           <DelToast show={time==item.time&&activeInd?true:false}
@@ -123,7 +109,7 @@ class SlidePic extends Component {
                     right={'-34px'}
                     top={'30px'}
                     cancel={this.handleCancel}
-                    confirm={()=>{this.delConfirm(item)}}/>
+                    confirm={()=>{this.delConfirm(item,idx)}}/>
       </li>
     );
   }

+ 18 - 239
src/components/AddNewInspect/index.jsx

@@ -1,11 +1,8 @@
 import React from 'react';
 import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
-import SlideExcel from './SlideExcel';
 import SlidePic from './SlidePic';
 import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
 import styles from './index.less';
-import ScrollArea from 'react-scrollbar';
-import store from '@store';
 import $ from 'jquery';
 class AddNewInspect extends React.Component {
   constructor(props) {
@@ -15,7 +12,6 @@ class AddNewInspect extends React.Component {
       showFill: false,
       date: false,
       currentIdx: '',
-      dateTime: "",
       currentData: {},
       numPlus: 0,     //判断是否所有的填写单都是空
       num: 0,            //暂存数据,获取一次,不能每次都是新的数据
@@ -25,54 +21,11 @@ class AddNewInspect extends React.Component {
       // tmpIds: [],      //内层外层
       impId: null
     }
-    this.$ul = React.createRef();
-    this.handleChangeDate = this.handleChangeDate.bind(this)
-    this.handleShowDate = this.handleShowDate.bind(this)
-    this.getItemList = this.getItemList.bind(this)
     this.getSearchList = this.getSearchList.bind(this)
-    this.getCommonList = this.getCommonList.bind(this)
-    this.changeActivePart = this.changeActivePart.bind(this)
-    this.showDetails = this.showDetails.bind(this)
     this.handleDelConfirm = this.handleDelConfirm.bind(this)
-    this.handleCancel = this.handleCancel.bind(this)
     this.handleSearchAdvice = this.handleSearchAdvice.bind(this)
-    this.changeShowFill = this.changeShowFill.bind(this)
-    this.handleFillShow = this.handleFillShow.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
   }
-  handleDelConfirm() {//弹窗确定
-    const { delPartItem, handleCloseExcel, handlePush } = this.props;
-    const { type, id, impId } = this.state;
-    if (type == 1) {
-      delPartItem(id)
-    } else if (type == 2) {
-      handleCloseExcel(impId)
-    }
-    Notify.success("删除成功");
-    handlePush && handlePush({mode:8});       //右侧推送
-  }
-  handleDelClick(type, time) {
-    if (type == 2) {
-      this.setState({
-        impId: idx,
-        type: type,
-        id: null
-      })
-    } else {
-      this.setState({
-        type: type,
-        time: time,
-        impId: null
-      })
-    }
-  }
-  handleCancel() {
-    this.setState({
-      type: null,
-      id: null,
-      impId: null
-    })
-  }
   componentDidMount() {
     $(document).click((event) => {
       let searchWrap = document.getElementById("searchWrapAdvice");   // 搜索按钮
@@ -112,29 +65,24 @@ class AddNewInspect extends React.Component {
         }
       }
     });
-    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) })
   }
-  componentWillReceiveProps(nextProps) {
-    if (nextProps.fillActive.name != this.props.fillActive.name) {
-      this.setState({ num: 0 })
+  handleDelConfirm() {//弹窗确定
+    const { delPartItem, handleCloseExcel, handlePush,idx } = this.props;
+    const { type, id, impId } = this.state;
+    if (type == 1) {
+      delPartItem(id,idx)
+    } else if (type == 2) {
+      handleCloseExcel(impId)
     }
+    Notify.success("删除成功");
+    handlePush && handlePush({mode:8});       //右侧推送
   }
-  changeShowFill() {
-    this.setState({ showFill: false })
-    this.props.setHighter(80)
-  }
-  handleChangeDate(info) {
-    let date = getCalendarDate(info);
-    this.setState({ dateTime: date, date: false })
+  handleDelClick(type, time) {
+    this.setState({
+      type: type,
+      time: time,
+      impId: null
+    })
   }
   handleSearchAdvice(e) {
     let tmpShow = this.state.show;
@@ -149,131 +97,12 @@ class AddNewInspect extends React.Component {
       setPosition(e,"#searchOption",this.props.setHighter)
     }
   }
-  handleFillShow(e, idx) {
-    let tmpShow = this.state.showFill;
-    let baseList = store.getState().inspect.fillActive;
-    this.setState({
-      showFill: !tmpShow,
-      currentIdx: idx,
-      currentData: baseList,
-      dateTime: baseList.time ? baseList.time : getCurrentDate(1)
-    })
-    // e.stopPropagation();
-  }
-  handleShowDate() {
-    this.setState({
-      date: !this.state.date
-    })
-  }
-  changeActivePart(idx, val, clear) {
-    let nums = this.state.num;
-    let fillActive;
-    if (nums == 0) {
-      fillActive = this.props.fillActive;
-    } else {
-      fillActive = this.state.currentData;
-    }
-    ++nums;
-    this.setState({ num: nums });
-    let tempArr = deepClone(fillActive);
-
-    if (clear) {    //点击清空按钮,至清初输入的数字
-      for (let i = 0; i < tempArr.details.length; i++) {
-        tempArr.details[i].value = ''
-        tempArr.show = false;
-      }
-      tempArr.time = getCurrentDate(1);
-      this.setState({ currentData: tempArr })
-      return;
-    } else {
-      let tempNumPlus = 0;
-      for (let i = 0; i < tempArr.details.length; i++) {
-        if (i == idx) {
-          tempArr.details[i].value = val
-        }
-        if (tempArr.details[i].value != undefined && tempArr.details[i].value != '') {
-          tempArr.show = true;
-        } else {
-          ++tempNumPlus;
-          if (tempNumPlus == tempArr.details.length) {
-            tempArr.show = false;
-          }
-        }
-      }
-      tempArr.time = this.state.dateTime;
-      this.setState({ currentData: tempArr })
-    }
-  }
-  getItemList() {        //填写单展示
-    let number = this.state.num;
-    let fillActive;
-    if (number == 0) {
-      fillActive = this.props.fillActive;
-    } else {
-      fillActive = this.state.currentData;
-    }
-    return <ul className={styles.searchLis} ref={this.$ul}>
-      {
-        fillActive && fillActive.details && fillActive.details.map((item, idx) => {
-          if (item.controlType == 1) {
-            return (
-              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
-                <span className={styles.itemPartL}>{item.name}</span>
-                <span className={styles.itemPartT}>
-                  <select className={styles.itemPartR} onChange={(e) => {
-                    if (e.target.value == '请选择') {
-                      this.changeActivePart(idx, '')
-                      return;
-                    }
-                    this.changeActivePart(idx, e.target.value);
-                  }}
-                  >
-                    <option value="请选择">请选择</option>
-                    {
-                      (item.questionDetailList).map((val) => {
-                        return <option value={val.name}
-                          selected={val.name == item.value ? true : false}
-                        >{val.name}</option>
-                      })
-                    }
-                  </select>
-                </span>
-              </li>
-            )
-          } else if (item.controlType == 6) {
-            return (
-              <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
-                <span className={styles.itemPartL} title={item.name}>{item.name}</span>
-                <span className={styles.itemPartT}>
-                  <input type="text"
-                    placeholder="(填写)"
-                    value={item.value}
-                    onKeyUp={(e) => { this.changeActivePart(idx, e.target.value.trim()) }}
-                  />
-                  <p className={styles.unit} title={item.labelSuffix}>{item.labelSuffix}</p>
-                </span>
-              </li>
-            )
-          }
-        })
-      }
-    </ul>
-  }
   handleSign(item,idx){
     const { handleSign,handlePush } = this.props;
     handleSign(item,idx)
     handlePush && handlePush({mode:8});       //右侧推送
   }
   getSearchList(list) {//搜索列表
-    const { handleSign } = this.props;
-    const contStyle={
-      opacity:'0.4',
-      right:'0',
-      top:'1px',
-      zIndex:'15',
-      width:'14px',
-      background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
     return <ul className={`${styles.searchLiUl} ${styles.searchIsp}`} style={{height:'205px',width:'302px',overflow:'auto'}}>
       {
         list && list.map((item, idx) => {
@@ -292,42 +121,7 @@ class AddNewInspect extends React.Component {
       }
       </ul>;
   }
-  getCommonList() {//常用列表
-    const { handleSign, inspectList } = this.props;
-    return <ul className={styles.searchLiUl}>
-      {
-        inspectList && inspectList.map((item, idx) => {
-          return <li key={idx}
-            className={styles.searchLi}
-            title={item.name}
-            onClick={() => {
-              this.props.setHighter(80)
-              handleSign(item.questionId, idx, 'common');
-              this.setState({ show: false })
-            }}
-          >
-            {item.name}
-          </li>
-        })
-      }
-    </ul>
-  }
-  showDetails(val) {
-    let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    dom = getDomUpDown(min,max,value)
-    if (val.questionDetailList.length > 0) {
-      return val.questionDetailList.map((item) => {
-        if (val.value == item.name) {
-          return <td style={{ width: '20%' }} className={item.abnormal != '0' ? "red" : ''}>{val.value}</td>
-        }
-      })
-    } else {
-      // return <td style={{ width: '20%' }}><span className={(val.value - 0).toString() == 'NaN' ? "red" : (val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue ? "red" : '') : ''}>{val.value}</span> {val.labelSuffix}</td>
-      return <td style={{ width: '20%' }}>{dom} {val.labelSuffix}</td>
-    }
-  }
   render() {
-    console.log(99)
     const {labelListBlood,setHighter,refreshScroller,checkOnOff, 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={
@@ -337,7 +131,6 @@ class AddNewInspect extends React.Component {
       zIndex:'15',
       width:'14px',
       background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
@@ -348,6 +141,7 @@ class AddNewInspect extends React.Component {
                 return <SlidePic
                   item={item}
                   checkOnOff={checkOnOff}
+                  idx={idx}
                   time={time}
                   handlePush={handlePush}
                   handleDelClick={this.handleDelClick}
@@ -362,6 +156,7 @@ class AddNewInspect extends React.Component {
                   item={item}
                   checkOnOff={checkOnOff}
                   time={time}
+                  idx={idx}
                   handlePush={handlePush}
                   handleDelClick={this.handleDelClick}
                   setTipValue={setTipValue}
@@ -375,6 +170,7 @@ class AddNewInspect extends React.Component {
                   item={item}
                   checkOnOff={checkOnOff}
                   time={time}
+                  idx={idx}
                   handlePush={handlePush}
                   handleDelClick={this.handleDelClick}
                   setTipValue={setTipValue}
@@ -388,23 +184,6 @@ class AddNewInspect extends React.Component {
           <Add showText="添加医嘱" handleClick={(e) => this.handleSearchAdvice(e)} id="searchWrapAdvice" />
           {this.state.show ? <SearchOption searchType="2" detailClick={detailClick} windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 136px', color: '#bfbfbf' }}>暂无筛选项</p>)}
-            {/* {
-              (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
-                <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用检验项</p>
-                <ScrollArea speed={0.8}
-                            horizontal={false}
-                            stopScrollPropagation={true}
-                            style={{height:'225px'}}
-                            className={styles["area"]}
-                            verticalContainerStyle={contStyle}
-                            verticalScrollbarStyle={barStyle}
-                            contentClassName="content">
-                {
-                  this.getCommonList()
-                }
-                </ScrollArea>
-              </div>
-            } */}
           </SearchOption> : ''}
         </div>
       </div>

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

@@ -47,7 +47,7 @@ class DiagResultSearch extends Component {
     if (isShowNoDataInfo === true && searchResult.length === 0 ){
       return <div className={style['search-result-noItem']}><span>暂无筛选项</span></div>
     }
-    return <div className={style['search-result']} style={{'min-height':'120px',width:'412px',overflow:'auto'}}>
+    return <div className={style['search-result']} style={{'min-height':'120px','max-height':'205px',width:'412px',overflow:'auto'}}>
       {
         searchResult.length !== 0  && searchResult.map((item,idx) => {
           return (<div key={idx} className={style['search-result-item']}>

BIN
src/components/DiagnosticList/img/singleB.png


BIN
src/components/DiagnosticList/img/singleL.png


+ 9 - 13
src/components/DiagnosticList/index.jsx

@@ -5,8 +5,8 @@ import del_on from './img/delete-on.png'
 import diagUp from './img/diagUp.png'
 import diagDown from './img/diagDown.png'
 import manageIcon from '@common/images/manage.png';
-import infoShow from '@common/images/info-show.png';
-import infoMove from '@common/images/info-move.png';
+import singleB from './img/singleB.png';
+import singleL from './img/singleL.png';
 import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
@@ -101,14 +101,10 @@ class DiagnosticList extends Component {
             delItem: item,
         })
     }
-    showTreat(item, index) {
-        // item.treatIndex = index
-        const  { showTreat, getTreatResult } = this.props;
-        getTreatResult && getTreatResult(item);
-        // showTreat && showTreat();//添加loading,移到async-actions中
-        this.setState({
-            treatTitle: item.name
-        })
+    showTreat(item, idx) {
+        const  { getTreatResult,getBilling } = this.props;
+        getTreatResult && getTreatResult(item,idx);
+        getBilling({mode:10});
     } 
     handleClickDiag(item) {
         const { getTips } = this.props;
@@ -161,7 +157,6 @@ class DiagnosticList extends Component {
             return
         }
         // let baseList = store.getState();
-        
         // let baseObj = items[this.state.activeHistory];
         // pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
         store.dispatch(getHistempDetail(activeItem));
@@ -319,12 +314,13 @@ class DiagnosticList extends Component {
                                           onClick={this.handleClickDiag.bind(this,item,false,false,false)}
                                       /> */}
                                     </span> 
-                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
+                                    {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>} */}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
                                           onClick={() =>{this.showTreat(item, index)}}>
+                                          <img src={item.hasTreat?singleB:singleL} alt=""/>
                                           治疗方案
-                                    </span> */}
+                                    </span>
                                     {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估

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

@@ -86,8 +86,14 @@
     color: #000;
     letter-spacing: 0;
     position: absolute;
-    right: 40px;
+    right: 100px;
     top: 11px;
+    img {
+        width: 15px;
+        position: relative;
+        top: 3px;
+        right: 5px;
+    }
 }
 .footer{
     .print{

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

@@ -21,8 +21,6 @@ class InfoTitle extends Component {
         this.showHistoryBox = this.showHistoryBox.bind(this)
     }
     showHistoryBox(){
-
-        // console.log('关闭');
         const {showLoading,hideLoading}=this.props;
         showLoading();
         // 底部页面禁止滚动

BIN
src/components/NewAdvice/dists/FileAPI.flash.camera.swf


BIN
src/components/NewAdvice/dists/FileAPI.flash.image.swf


BIN
src/components/NewAdvice/dists/FileAPI.flash.swf


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 3608
src/components/NewAdvice/dists/FileAPI.html5.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 2
src/components/NewAdvice/dists/FileAPI.html5.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4418
src/components/NewAdvice/dists/FileAPI.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 2
src/components/NewAdvice/dists/FileAPI.min.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 11008
src/components/NewAdvice/dists/jQuery.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 4
src/components/NewAdvice/dists/jq.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 2
src/components/NewAdvice/dists/jquery.fileapi.min.js


+ 2 - 230
src/components/NewAdvice/index.jsx

@@ -2,40 +2,9 @@ import React from 'react';
 import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
 import AddNewInspect from '../AddNewInspect';
 import styles from './index.less';
-import { getExcelList } from '@store/actions/inspect';
-import Notify from '@commonComp/Notify';
-import store from '@store';
 import $ from 'jquery';
-import { host, prefix } from '@utils/config.js';
-import { isIE, getUrlArgObject,getCurrentDate,setFontColorSize } from '@utils/tools.js';
+import { isIE } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
-import WrapModalBody from '@containers/WrapModalBody';
-import {getMRAnalyse} from '@store/async-actions/pushMessage';
-import {SET_CURRENT_MODULE} from '@types/homePage';
-
-
-(function ($) {
-  var FileAPI = {
-    // @default: "./dist/"
-    staticPath: './dists/',
-
-    // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-    flashUrl: './dists/FileAPI.flash.swf',
-
-    // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
-    flashImageUrl: './dists/FileAPI.flash.image.swf'
-  };
-  return FileAPI
-})($)
-
-import "./dists/FileAPI.js";
-
-const isLocal = window.location.hostname.indexOf('localhost') != -1;
-const qhost = isLocal ? host + prefix : prefix;
-const api = { 
-  upload: qhost + '/lisExcelRes/lisExcelAnalysis'
-};
-let numFlg = 0;
 
 class NewAdvice extends React.Component {
   constructor(props) {
@@ -50,14 +19,8 @@ class NewAdvice extends React.Component {
       hide: false,
       importLis:false
     }
-    this.handleImportExcel = this.handleImportExcel.bind(this);
     this.cancel = this.cancel.bind(this);
-    this.getWarings = this.getWarings.bind(this);
-    this.checkSystemIpt = this.checkSystemIpt.bind(this);
     this.onClose = this.onClose.bind(this);
-    this.handleBindFileApi = this.handleBindFileApi.bind(this);
-    this.closeInIcss = this.closeInIcss.bind(this);
-    this.showSlideImport = this.showSlideImport.bind(this);
     this.refreshScroller = this.refreshScroller.bind(this);
   }  
   componentDidMount() {
@@ -72,166 +35,15 @@ class NewAdvice extends React.Component {
     });
     this.props.setContext(this.context)
   }
-  handleBindFileApi(){
-    const {message} = this.props;
-    var ua = navigator.userAgent;
-    var _isIE = ua.indexOf("MSIE") > -1;
-    if (_isIE) {
-      let version = ua.match(/MSIE ([\d.]+)/)[1];
-      this.setState({
-        ieVersion: version
-      })
-    }
-    $('iframe').bind('load', function () { })
-    const { fetchPushInfos } = this.props;
-    // FileAPI.debug = true
-    $.support.cors = true;
-    const that = this;
-    var choose = document.getElementById('choose');
-    FileAPI.event.on(choose, 'change', function (evt) {
-      var files = FileAPI.getFiles(evt);
-      FileAPI.filterFiles(files, function (file, info) {
-        let name = file.name;
-        // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
-        //     Notify.error('请选择正确的excel表格')
-        //     return false;
-        // }else{
-        //     return true;
-        //   }
-          return true;
-      },
-        function (files, rejected) {
-          if (files.length) {
-            //console.log(files[0])
-            const securityCode = getUrlArgObject("code");
-            const appKeyId = getUrlArgObject("appI");
-            const appKeySecret = getUrlArgObject("appS");
-            const productId = getUrlArgObject("productId");
-            FileAPI.upload({
-              // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
-              url: api.upload,
-              data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
-              files: { uploadfile: files[0] },
-              headers: {
-                appKeyId: appKeyId,
-                appKeySecret: appKeySecret,
-                securityCode: securityCode,
-                productId: productId
-              },
-              complete: function (err, xhr) {
-                if (!err) {
-                  let res = JSON.parse(xhr.response);
-                  if(res.code == 0){
-                    let message = res.data.messages;
-                    if(res.data.lisExcelRes){
-                      for(let i = 0;i < res.data.lisExcelRes.length;i++){
-                        let tmpLisExcelItem = res.data.lisExcelRes[i]
-                        if(tmpLisExcelItem.lisExcelItem){
-                          for(let j = 0;j < tmpLisExcelItem.lisExcelItem.length;j++){
-                            tmpLisExcelItem.lisExcelItem[j].time = tmpLisExcelItem.lisExcelItem[j].time||getCurrentDate(1)
-                          }
-                        }
-                      }
-                    }
-                    store.dispatch(getExcelList(res.data));
-                    store.dispatch(getMRAnalyse());
-                    fetchPushInfos && fetchPushInfos({mode:8});
-                    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("");
-                }
-              }
-            });
-          }
-        });
-    });
-  }
-  handleImportExcel() {
-    this.inputRef.click();
-    const storeState = store.getState()
-    const {moduleName} = storeState.homePage
-    if(moduleName != '检验') {
-      store.dispatch({
-        type: SET_CURRENT_MODULE,
-        moduleName:'检验'
-      });
-      store.dispatch(getMRAnalyse());
-    }
-  }
   cancel() {
     this.setState({ visible: false })
   }
-  getStyle() {
-    const { ieVersion } = this.state;
-    if (ieVersion && ieVersion <= 9) {
-      return styles.disabledBtn;
-    } else {
-      return styles.button;
-    }
-  }
-  getWarings(lis) {
-    <ul>
-      {
-        lis.length > 0 && lis.map((val) => {
-          return <li>
-            {val}
-          </li>
-        })
-      }
-    </ul>
-  }
-  checkSystemIpt() {
-    this.setState({
-      hide: true
-    })
-    const storeState = store.getState()
-    const {moduleName} = storeState.homePage
-    if(moduleName != '检验') {
-      store.dispatch({
-        type: SET_CURRENT_MODULE,
-        moduleName:'检验'
-      });
-      store.dispatch(getMRAnalyse());
-    }
-  }
   onClose() {
     this.setState({
       hide: false
     })
     dragBox('previewWrapper', 'previewStatic', 'del')
   }
-  closeInIcss(){
-    this.setState({
-      hide: false
-    })
-  }
-  showSlideImport(){
-    let flg = this.state.importLis
-    this.setState({
-      importLis:!flg
-    })
-    const storeState = store.getState()
-    const {moduleName} = storeState.homePage
-    if(moduleName != '检验') {
-      store.dispatch({
-        type: SET_CURRENT_MODULE,
-        moduleName:'检验'
-      });
-      store.dispatch(getMRAnalyse());
-    }
-  }
   refreshScroller(){
     //滚动条对象
     return this.context.scrollArea;
@@ -241,51 +53,12 @@ class NewAdvice extends React.Component {
   }
   render() {
     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,checkOnOff ,labelListBlood} = this.props;
-    const { ieVersion, isIE, hide,importLis } = this.state;
-    const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
-    if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
-      ++numFlg
-      numFlg == 1?handleBindFileApi():null
-    }
+
     return (
       <div className={styles.wrapper}>
         {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
         <div className={styles.top}>
           <span id="inspectResultData" className={styles.newAdviceTitle}> </span>
-          {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          {/* <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? '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.import_way_lis == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
-                <p className={styles.importInspectBtn}>导入检验结果</p>
-                <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.import_way_lis == 2 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
-                <p className={styles.importInspectBtn}>导入检验结果</p>
-              </div> : hospitalMsg.import_way_lis == 3 ? <div className={`${styles.pushButton} ${styles.importInspect}`} onClick={showSlideImport}>
-                <p id="importInspectBtn" className={styles.importInspectBtn}>导入检验结果</p>
-                {
-                  <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 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>
-                }
-              </div> : null
-            } */}
-
-            {/* {
-              hide ? <WrapModalContainer title={'导入检验数据'} width={1000} height={570} onClose={onClose}>
-                <WrapModalBody
-                  height={570}
-                  closeInIcss={closeInIcss}
-                ></WrapModalBody>
-              </WrapModalContainer> : null
-            } */}
-          {/* </div> */}
         </div>
         <ItemBox
           hideAllDrop={hideAllDrop}
@@ -293,7 +66,6 @@ class NewAdvice extends React.Component {
           title={'医嘱'}
           editable={false}
           border={true}
-          // style={{marginRight:'0'}}
           marginTop={'0px'}
         >
           <div style={{ padding: '0px 10px 10px 10px', boxSizing: 'border-box',color:'#000' }} >

+ 13 - 1
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -8,7 +8,7 @@ class MedicalAdvice extends Component {
   render() { 
     const {advice} = this.props
     // console.log(advice,'===========');
-    const {labelListBig,labelListSmall} = advice
+    const {labelListBig,labelListSmall,labelListBlood} = advice
     return ( 
         <tr className={style['patInfoFst']}>
           <td className={style['patInfoSec']}>医嘱:</td>
@@ -40,6 +40,18 @@ class MedicalAdvice extends Component {
                   )
                 })
               }
+              {
+              labelListBlood && labelListBlood.map((item, index) => {
+                  return (
+                    <tr>
+                      <td className={style.adviceTableTdFst}>{item.name}</td>
+                      <td className={style.assistTableTdTrd}>输血</td>
+                      <td className={style.assistTableTdSec}>{item.value}</td>
+                      <td className={style.assistTableTdFor}>{item.time}</td>
+                    </tr>
+                  )
+                })
+              }
             </table>
           </td>
         </tr>

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

@@ -4,6 +4,7 @@ import arrowIcon from '@images/arrowIcon.png';
 import pushEmpty from '@images/pushEmpty.png';
 import {pushPage2} from '@utils/config';
 import {dragBox} from '@utils/drag';
+import hideConfirm from '@images/hideConfirm.png';
 
 class PushData extends Component{
     constructor(props){
@@ -46,7 +47,7 @@ class PushData extends Component{
             </div>}
             {showPushData&&<div id="dragModalWrap" className={style['pushWrapper']} style={{right:(windowWidth-1200)/2+20+'px'}}>
                 {/* <div id="dragModalTitle"  className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div> */}
-                <div className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div>
+                <div className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>    <img class={style['hideConfirm']} src={hideConfirm} alt=""/></span></div>
                 {hospitalId&&<iframe id='embedPage'  src={url} frameborder="0" width="348" height="507"></iframe>}
                 {!hospitalId&&<div className={style['pushEmpty']}>
                         <div className={style['pushEmptyBox']}>

+ 4 - 1
src/components/PushData/index.less

@@ -64,6 +64,9 @@
     height: 40px;
     padding: 0 10px;
     font-size:16px;
-    right: 10px;
+    right: 0px;
     cursor: pointer;
+}
+.hideConfirm{
+    width: 15px;
 }

+ 2 - 2
src/containers/AssistCheck.js

@@ -37,8 +37,8 @@ function mapDispatchToProps(dispatch, store) {
         setTipValue(item,val,idx){
           dispatch(setTipVal(item,val,idx))
         },
-        checkOnOff(item){
-          dispatch(checkOffOn(item))
+        checkOnOff(item,idx){
+          dispatch(checkOffOn(item,idx))
         },
         showInIcss(){
           dispatch(showInIcsss())

+ 8 - 6
src/containers/DiagnosticList.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import { connect } from 'react-redux';
 import DiagnosticList from '@components/DiagnosticList';
-import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
+import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING,ADDDIAGMSG} from '@store/types/diagnosticList'; 
 import {SHOW_TIPS_DETAILS,HIDE_TIPS_DETAILS} from '@store/types/pushMessage';
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
@@ -12,7 +12,7 @@ import {autoFillModules} from '@store/async-actions/fetchModules';
 import {SET_ASSESS_DATA} from '@types/assessResult';
 import {didPushParamChange} from '@utils/tools';
 
-function mapStateToProps(state) {
+function mapStateToProps(state) {//console.log(state.diagnosticList)
     const {diagnosticList,assessResult,pushMessage } = state;
     let diagnC = diagnosticList.chronicMagItem;
     return {
@@ -88,10 +88,12 @@ function mapDispatchToProps(dispatch) {
                 type: SHOW_TREAT,
             })
         },
-        getTreatResult: (item) => {
-            // dispatch({type:MODI_LOADING,flag:true});
-            // dispatch({type:SHOW_LOADING,flag:true});
-            dispatch(getTreatResult(item));
+        getTreatResult: (item,idx) => {
+            dispatch({
+                type:ADDDIAGMSG,
+                item:item,
+                idx:idx
+            });
         },
         getTips: (item) => {
           dispatch(getAllConceptDetail(item))

+ 4 - 4
src/containers/Inspect.js

@@ -52,8 +52,8 @@ function mapStateToProps(state) {//console.log(state)
 
 function mapDispatchToProps(dispatch) {
   return {
-    checkOnOff(item){
-      dispatch(checkOffOn(item))
+    checkOnOff(item,idx){
+      dispatch(checkOffOn(item,idx))
     },
     detailClick(val){
       dispatch(searchType(val))
@@ -61,8 +61,8 @@ function mapDispatchToProps(dispatch) {
     setContext(obj){
       dispatch(setContext(obj))
     },
-    handleDelConfirm(obj){
-      dispatch(delOnePic(obj))
+    handleDelConfirm(obj,idx){
+      dispatch(delOnePic(obj,idx))
     },
     handleChangeValue(val) {
       dispatch(getSearchList(val))

+ 6 - 6
src/containers/NewAdvice.js

@@ -53,8 +53,8 @@ function mapStateToProps(state) {//console.log(state.newAdvice)
 
 function mapDispatchToProps(dispatch) {
   return {
-    checkOnOff(item){
-      dispatch(checkOffOn(item))
+    checkOnOff(item,idx){
+      dispatch(checkOffOn(item,idx))
     },
     detailClick(val){
       dispatch(searchTypeNew(val))
@@ -62,8 +62,8 @@ function mapDispatchToProps(dispatch) {
     setContext(obj){
       dispatch(setContext(obj))
     },
-    handleDelConfirm(obj){
-      dispatch(delOnePic(obj))
+    handleDelConfirm(obj,idx){
+      dispatch(delOnePic(obj,idx))
     },
     handleChangeValue(val) {
       dispatch(getSearchList(val))
@@ -100,8 +100,8 @@ function mapDispatchToProps(dispatch) {
       dispatch(delPartItem(idx))
       dispatch(getMRAnalyse())
     },
-    setTipValue(item,value,sign) {
-      dispatch(setTipAdvice(item,value,sign))
+    setTipValue(item,value,sign,tip) {
+      dispatch(setTipAdvice(item,value,sign,tip))
     },
     //右侧推送
     fetchPushInfos(obj) {

+ 2 - 2
src/store/actions/assistCheck.js

@@ -30,9 +30,9 @@ export const changeDate = (date,idx) => ({         //更改时间
     date,
     idx
 })
-export const checkOffOn = (item) => ({
+export const checkOffOn = (item,tip) => ({
     type:CHECK_OFF_ON,
-    item
+    item,tip
 })
 export const setTipVal = (item,val,idx) => ({
     type:SET_TIP_VAL,

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

@@ -1,12 +1,65 @@
+export const addDiagMsg = (state, action) => {
+    const res = JSON.parse(JSON.stringify(state));
+    // console.log(98989889898898,action)
+    let tmpLis = res.diagnosticList
+    for(let i = 0;i < tmpLis.length;i++){
+        if(action.idx == i){
+            tmpLis[i].hasTreat = 1
+        }else{
+            tmpLis[i].hasTreat = 0
+        }
+    }
+    let obj = {
+        "dateValue": '',
+        "name": action.item.name,
+        "uniqueName": action.item.name
+    }
+    res.diagnosticList = [...tmpLis]
+    res.diseaseName = obj
+    return res;
+}
+
 export const addDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.diagnosticList.push(action.item)
+    let tmpLis = res.diagnosticList,num=0
+    for(let i = 0;i < tmpLis.length;i++){
+        if(!tmpLis[i].hasTreat){
+            ++num
+        }
+    }
+    if(num == tmpLis.length){
+        tmpLis[0]['hasTreat'] = 1
+        let obj = {
+            "dateValue": '',
+            "name": tmpLis[0].name,
+            "uniqueName": tmpLis[0].name
+        }
+        res.diseaseName = obj
+    }
+    res.diagnosticList = [...tmpLis]
     return res;
 }
 
 export const delDiagnostic = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
     res.diagnosticList = res.diagnosticList.filter(item => (item.conceptId !== action.item.conceptId || item.name !== action.item.name));
+    let tmpLis = res.diagnosticList,num=0
+    for(let i = 0;i < tmpLis.length;i++){
+        if(!tmpLis[i].hasTreat){
+            ++num
+        }
+    }
+    if(tmpLis.length>0&&num == tmpLis.length){
+        tmpLis[0]['hasTreat'] = 1
+        let obj = {
+            "dateValue": '',
+            "name": tmpLis[0].name,
+            "uniqueName": tmpLis[0].name
+        }
+        res.diseaseName = obj
+    }
+    res.diagnosticList = [...tmpLis]
     return res;
 }
 
@@ -61,7 +114,6 @@ export const getDiagnosticStr = (state, action) => {
     // res.diagnosticStr = diagnosticStr
     // 2020/09/07 lcq 本次版本没有初诊复诊字样
     res.diagnosticStr = diagnosticStrNoType
-
     return res;
 }
 
@@ -78,6 +130,7 @@ export const clearAllDiag = (state, action) => {
     res.mainSuitStr = action.mainSuitStr
     res.diagnosticStrNoType = action.saveText
     res.chronicMagItem = action.chronicMagItem
+    res.diseaseName = {}
     return res;
 }
 

+ 4 - 4
src/store/actions/inspect.js

@@ -74,13 +74,13 @@ export const searchType = (value) => ({
     value
 })
 
-export const delOnePic = (item) => ({
+export const delOnePic = (item,tip) => ({
     type:DEL_ONE_PIC,
-    item
+    item,tip
 })
-export const checkOffOn = (item) => ({
+export const checkOffOn = (item,tip) => ({
     type:CHECK_ON_OFF,
-    item
+    item,tip
 })
 
 

+ 6 - 6
src/store/actions/newAdvice.js

@@ -63,22 +63,22 @@ export const setContext = (obj) => ({
     type:SET_CONTEXT,
     obj
 })
-export const setTipAdvice = (item,value,sign) => ({
+export const setTipAdvice = (item,value,sign,tip) => ({
     type:SET_TIP_ADVICE,
     item,
     value,
-    sign
+    sign,tip
 })
 export const searchTypeNew = (value) => ({
     type:SEARCH_TYPE_NEW,
     value
 })
 
-export const delOnePic = (item) => ({
+export const delOnePic = (item,tip) => ({
     type:DEL_ONE_PIC,
-    item
+    item,tip
 })
-export const checkOffOn = (item) => ({
+export const checkOffOn = (item,tip) => ({
     type:CHECK_OFF_ON_NEW,
-    item
+    item,tip
 })

+ 0 - 7
src/store/async-actions/print.js

@@ -39,12 +39,10 @@ export const getConceptDetails = (bool) => {
         if (data.code == 0) {
             realSaveData(bool,data.data)
         } else {
-            console.log(res)
             realSaveData(bool)
         }
     }).catch((err)=>{
         realSaveData(bool)
-        console.log(err)
     })
 }
 export const saveMessage = (bool) =>{
@@ -59,11 +57,6 @@ export const saveMessage = (bool) =>{
            });
        });
     }
-    // store.dispatch({type:MODI_LOADING,flag:true});
-    // store.dispatch({ type: CLEARMEDICALNAME});
-    // getConceptDetails(bool)  //保存病历 老版本
-   
-    
 }
 
 // 获取参数value

+ 3 - 1
src/store/reducers/assistCheck.js

@@ -59,6 +59,7 @@ export default (state = initSearchList, action) => {
     for (let i = 0; i < tempArr.length; i++) {
       if (i == action.idx) {
         tempArr[i].time = action.date
+        tempArr[i].dateValue = action.date
         newState.assistLabel = [...tempArr]
       }
     }
@@ -95,7 +96,7 @@ export default (state = initSearchList, action) => {
     let tempArrs = newState.assistLabel;
     let tempList = action.item,tempOrder=[]
     for(let i = 0;i < tempArrs.length;i++){
-        if(tempArrs[i].time == tempList.time){
+        if(action.tip == i){
             let flg = tempArrs[i].check;
             tempArrs[i].check = !flg
         }
@@ -135,6 +136,7 @@ export default (state = initSearchList, action) => {
     for (let i = 0; i < tempArr.length; i++) {
       if (i == action.idx) {
         tempArr[i].value = action.val
+        tempArr[i].result = action.val
         newState.assistLabel = [...tempArr]
       }
     }

+ 9 - 2
src/store/reducers/diagnosticList.js

@@ -19,6 +19,7 @@ import {
   ADD_TREAT,
   REDIAGDATA,
   CLEARDIAGDATA,
+  ADDDIAGMSG,
 } from '../types/diagnosticList';
 import {
   addDiagnostic,
@@ -38,6 +39,7 @@ import {
   hideHistoryCase,
   addTreat,
   reDiagData,
+  addDiagMsg
 } from '../actions/diagnosticList';
 
 const initState = {
@@ -47,13 +49,17 @@ const initState = {
     ],
     mainSuitStr:'',
     diagnosticStrNoType:'',
-    diagnosticStr:''
-
+    diagnosticStr:'',
+    diseaseName: {
+      
+    }
 }
 
 export default function (state=initState, action) {
     const res = Object.assign({},state);
     switch (action.type) {
+      case ADDDIAGMSG:
+        return addDiagMsg(state, action);
       case ADD_DIAGNOSTIC:
         return addDiagnostic(state, action);
       case DEL_DIAGNOSTIC:
@@ -98,6 +104,7 @@ export default function (state=initState, action) {
         let newState = Object.assign({}, state);
         newState.diagnosticStr = '';
         newState.diagnosticList = [];
+        newState.diseaseName = {};
         newState.diagnosticStrNoType = '';
         return newState;
       default:

+ 15 - 4
src/store/reducers/inspect.js

@@ -49,7 +49,7 @@ export default (state = initSearchList, action) => {
         let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 1){
             for(let i = 0;i < tempArr.length;i++){
-                if(tempArr[i].time == tmpLis.time){
+                if(action.tip == i){
                     let flg = tempArr[i].check;
                     tempArr[i].check = !flg
                 }
@@ -57,7 +57,7 @@ export default (state = initSearchList, action) => {
             newState.labelListBig = [...tempArr]
         }else{
             for(let i = 0;i < tempArrs.length;i++){
-                if(tempArrs[i].time == tmpLis.time){
+                if(action.tip==i){
                     let flg = tempArrs[i].check;
                     tempArrs[i].check = !flg
                 }
@@ -76,10 +76,18 @@ export default (state = initSearchList, action) => {
         let tempArrs = newState.labelListSmall;
         let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 1){//大项
-            tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
+            tempArr = tempArr.filter((item,idx)=>{
+                if(action.tip != idx){
+                    return item
+                }
+            })
             newState.labelListBig = [...tempArr]
         }else{//小项
-            tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
+            tempArrs = tempArrs.filter((item,idx)=> {
+                if(action.tip != idx){
+                    return item
+                }
+            })
             newState.labelListSmall = [...tempArrs]
         }
         tempBigOrder = tempArr.filter((item)=>item.check)
@@ -98,6 +106,7 @@ export default (state = initSearchList, action) => {
             tempArr = tempArr.filter((item,idx)=>{
                 if(action.sign==idx){
                     item.time = action.value
+                    item.dateValue = action.value
                 }
                 return item
             })
@@ -106,6 +115,7 @@ export default (state = initSearchList, action) => {
                 if(action.sign == idx){
                     if(action.tip==1){//小项改时间
                         item.time = action.value
+                        item.dateValue = action.value
                     }else{//小项该数值
                         if(isNumber(action.value-0)){
                             item.value = action.value
@@ -241,6 +251,7 @@ export default (state = initSearchList, action) => {
         // const tempArrAct = newState.fillActive;
         const tempArr = action.arr;
         tempArr.time = action.time;
+        tempArr.dateValue = action.time
         let tmpArr = newState.getExcelDataList;
         const tempArrs = newState.labelList;
         tempArrs[action.idx] = tempArr;

+ 31 - 17
src/store/reducers/newAdvice.js

@@ -53,7 +53,7 @@ export default (state = initSearchList, action) => {
         let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 5){//药品
             for(let i = 0;i < tempArr.length;i++){
-                if(tempArr[i].time == tmpLis.time){
+                if(action.tip == i){
                     let flg = tempArr[i].check;
                     tempArr[i].check = !flg
                 }
@@ -61,7 +61,7 @@ export default (state = initSearchList, action) => {
             newState.labelListBig = [...tempArr]
         }else if(tmpLis&&tmpLis.flg == 6){//手术、操作
             for(let i = 0;i < tempArrs.length;i++){
-                if(tempArrs[i].time == tmpLis.time){
+                if(action.tip == i){
                     let flg = tempArrs[i].check;
                     tempArrs[i].check = !flg
                 }
@@ -69,7 +69,7 @@ export default (state = initSearchList, action) => {
             newState.labelListSmall = [...tempArrs]
         }else if(tmpLis&&tmpLis.flg == 8){//输血
             for(let i = 0;i < tmpArr.length;i++){
-                if(tmpArr[i].time == tmpLis.time){
+                if(action.tip == i){
                     let flg = tmpArr[i].check;
                     tmpArr[i].check = !flg
                 }
@@ -91,13 +91,26 @@ export default (state = initSearchList, action) => {
         let tmpArr = newState.labelListBlood;
         let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
         if(tmpLis&&tmpLis.flg == 5){
-            tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
+            console.log(action.tip)
+            tempArr = tempArr.filter((item,idx)=>{
+                if(action.tip != idx){
+                    return item
+                }
+            })
             newState.labelListBig = [...tempArr]
         }else if(tmpLis&&tmpLis.flg == 6){
-            tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
+            tempArrs = tempArrs.filter((item,idx)=> {
+                if(action.tip != idx){
+                    return item
+                }
+            } )
             newState.labelListSmall = [...tempArrs]
         }else if(tmpLis&&tmpLis.flg == 8){
-            tmpArr = tmpArr.filter((item)=> item.time != tmpLis.time )
+            tmpArr = tmpArr.filter((item,idx)=> {
+                if(action.tip != idx){
+                    return item
+                }
+            } )
             newState.labelListBlood = [...tmpArr]
         }
         tempBigOrder = tempArr.filter((item)=>item.check)
@@ -116,10 +129,11 @@ export default (state = initSearchList, action) => {
         let tempArrs = newState.labelListSmall;
         let tmpArr = newState.labelListBlood;
         let tmpLis = action.item
-        if(tmpLis.flg == 5){
+        // console.log(action,1111111)
+        if(tmpLis.flg == 5){//药品
             for(let i= 0;i < tempArr.length;i++){
-                if(tmpLis.time == tempArr[i].time){
-                    if(action.sign == 1){
+                if(action.tip == i){
+                    if(action.sign == 1){//时间
                         tempArr[i].time = action.value
                         tempArr[i].dateValue = action.value
                     }else{
@@ -127,16 +141,18 @@ export default (state = initSearchList, action) => {
                     }
                 }
             }
-        }else if(tmpLis.flg == 6){
+            newState.labelListBig = [...tempArr]
+        }else if(tmpLis.flg == 6){//手术
             for(let i= 0;i < tempArrs.length;i++){
-                if(tmpLis.time == tempArrs[i].time){
+                if(action.tip == i){
                     tempArrs[i].time = action.value
                     tempArrs[i].dateValue = action.value
                 }
             }
-        }if(tmpLis.flg == 8){
+            newState.labelListSmall = [...tempArrs]
+        }if(tmpLis.flg == 8){//输血
             for(let i= 0;i < tmpArr.length;i++){
-                if(tmpLis.time == tmpArr[i].time){
+                if(action.tip == i){
                     if(action.sign == 1){
                         tmpArr[i].time = action.value
                         tmpArr[i].dateValue = action.value
@@ -145,10 +161,8 @@ export default (state = initSearchList, action) => {
                     }
                 }
             }
+            newState.labelListBlood = [...tmpArr]
         }
-        newState.labelListBig = [...tempArr]
-        newState.labelListSmall = [...tempArrs]
-        newState.labelListBlood = [...tmpArr]
         return newState;
     }
     if (action.type == SEARCH_TYPE_NEW) {
@@ -162,7 +176,6 @@ export default (state = initSearchList, action) => {
         const tempArrs = newState.labelListSmall;
         const tmpArr = newState.labelListBlood;
         let tmpLis = action.list
-        console.log(action,555555)
         tmpLis['time'] = getCurrentDate(1)
         tmpLis['dateValue'] = getCurrentDate(1)
         if(tmpLis.flg == 5){
@@ -276,6 +289,7 @@ export default (state = initSearchList, action) => {
         // const tempArrAct = newState.fillActive;
         const tempArr = action.arr;
         tempArr.time = action.time;
+        tempArr.dateValue = action.time;
         let tmpArr = newState.getExcelDataList;
         const tempArrs = newState.labelList;
         tempArrs[action.idx] = tempArr;

+ 2 - 1
src/store/types/diagnosticList.js

@@ -20,4 +20,5 @@ export const ADD_TREAT = Symbol('ADD_TREAT') ;   //设置治疗
 
 
 export const REDIAGDATA = 'REDIAGDATA';
-export const CLEARDIAGDATA = 'CLEARDIAGDATA';
+export const CLEARDIAGDATA = 'CLEARDIAGDATA';
+export const ADDDIAGMSG = 'ADDDIAGMSG';

+ 1 - 1
src/utils/tools.js

@@ -951,7 +951,7 @@ function getEMRParams(){
     "family": filterDataArr(familyHistory.saveText)||'',  //家族史
     "marital": filterDataArr(marriageHistory.saveText)||'',  //婚育史
     "menstrual": filterDataArr(menstruationHistory.saveText)||'',  //月经史
-
+    "diseaseName":diagnosticList.diseaseName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",