Browse Source

Merge branch 'dev/new1' into dev/otherHis

zhouna 6 years atrás
parent
commit
27aced2853
43 changed files with 786 additions and 75 deletions
  1. 7 3
      src/common/components/EditableSpan/index.jsx
  2. 1 1
      src/common/components/EditableSpan/index.less
  3. 1 1
      src/common/js/func.js
  4. 1 1
      src/components/CopyRight/index.jsx
  5. 3 1
      src/components/CopyRight/index.less
  6. 3 3
      src/components/CurrentIll/index.jsx
  7. 1 1
      src/components/DiagResultSearch/index.jsx
  8. 6 2
      src/components/DiagnosticItem/index.jsx
  9. 4 0
      src/components/DiagnosticItem/index.less
  10. 226 0
      src/components/Multiple/index.jsx
  11. 48 0
      src/components/Multiple/index.less
  12. 52 3
      src/components/PushItems/DetailsModal/index.jsx
  13. 33 1
      src/components/PushItems/DetailsModal/index.less
  14. 9 5
      src/components/PushItems/index.jsx
  15. 4 2
      src/components/PushItems/index.less
  16. 2 2
      src/components/SpreadDrop/index.jsx
  17. 37 1
      src/components/Treat/DrugTreat/index.jsx
  18. 1 0
      src/components/Treat/DrugTreat/index.less
  19. BIN
      src/components/Treat/img/info1.png
  20. BIN
      src/components/TreatDesc/img/info1.png
  21. 22 2
      src/components/TreatDesc/index.jsx
  22. 1 0
      src/components/TreatDesc/index.less
  23. 1 2
      src/containers/CurrentIll.js
  24. 182 0
      src/containers/Multiple.js
  25. 15 6
      src/containers/SpreadDrop.js
  26. 17 2
      src/containers/eleType.js
  27. 12 0
      src/store/actions/checkBody.js
  28. 20 3
      src/store/actions/currentIll.js
  29. 2 0
      src/store/actions/diagnosticSearch.js
  30. 1 1
      src/store/actions/homePage.js
  31. 18 10
      src/store/actions/mainSuit.js
  32. 12 0
      src/store/actions/otherHistory.js
  33. 20 6
      src/store/async-actions/diagnosticSearch.js
  34. 1 1
      src/store/async-actions/homePage.js
  35. 4 2
      src/store/reducers/checkBody.js
  36. 4 2
      src/store/reducers/currentIll.js
  37. 4 3
      src/store/reducers/mainSuit.js
  38. 4 2
      src/store/reducers/otherHistory.js
  39. 2 1
      src/store/types/checkBody.js
  40. 1 0
      src/store/types/currentIll.js
  41. 1 0
      src/store/types/mainSuit.js
  42. 2 1
      src/store/types/otherHistory.js
  43. 1 4
      src/utils/tools.js

+ 7 - 3
src/common/components/EditableSpan/index.jsx

@@ -156,9 +156,13 @@ class EditableSpan extends Component{
     let innerVal = target.innerText;
     if(ev.keyCode==8){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
-      if(preVal.trim().length==1){
+      // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
+      let preObj = $(this.$span.current).prev();
+      if(index!==0&&preVal.trim().length==1){
           removeId && removeId({boxMark,i:index,text:""});
-          // this.moveEnd(obj[0]);
+          if(preObj[0].nodeName !=="DIV"){
+            this.moveEnd(preObj[0]);
+          }
         }
       
       if(innerVal !==preVal){return false}
@@ -166,7 +170,7 @@ class EditableSpan extends Component{
       //判断是否为空、中英文:, 。、;,且不是第一位
       let pattern = new RegExp(/^\,?$|^\,?$|^\.?$|^\。?$|^\、?$|^\;?$|^\;?$|^\:?$|^\:?$\s/);
       if(index!==0 && pattern.test(data)){
-        let preObj = $(this.$span.current).prev();
+        // let preObj = $(this.$span.current).prev();
         let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
         handleKeydown&&handleKeydown({boxMark,i:index,text:data});
         this.moveEnd(obj[0]);  

+ 1 - 1
src/common/components/EditableSpan/index.less

@@ -5,7 +5,7 @@
   word-break: break-word;
   min-width: 10px;
   // line-height: 2;
-  /*height: 20px;*/
+  height: 16px;
   line-height: 16px;
   /*vertical-align: middle;*/
   text-align: left;

+ 1 - 1
src/common/js/func.js

@@ -66,7 +66,7 @@ export const strTrim = (str) =>{
 };
 
 //获取组合组件已填文字填入saveText
-function getSaveText(data){
+function getSaveText(data){//console.log(data)
   const arr = data.questionMapping.map((it)=>{
     return it.value?(it.labelPrefix||'')+(it.value||'')+(it.labelSuffix||''):'';
   });

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

@@ -81,7 +81,7 @@ class CopyRight extends Component {
       <div className={style["container"]}>
         <div className={style["copy"]}>
           版本信息:{" "}
-          <a href="javascript:;" onClick={showCopyModal}>
+          <a lassName={style["copy-number"]} href="javascript:;" onClick={showCopyModal}>
             {number}
           </a>{" "}
           {hasNewVersion && <span>new</span>} &copy;<b>朗通医疗</b>

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

@@ -21,6 +21,8 @@
       }
       a{
         text-decoration: none;
+        font-size: 12px;
+        color: #3B9ED0;
       }
       b{
         font-size: 12px;
@@ -30,7 +32,7 @@
     
     .disclaimer{
       font-size: 12px;
-      color: #00e;
+      color: #3B9ED0;
       float: right;
       cursor: pointer;
     }

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

@@ -34,7 +34,7 @@ class CurrentIll extends Component{
 
   handleFocus(e){
     // 判断主诉是否为空
-    const {mainData,mainText,setData,moduleNum,mainIds,data,changeEditIll,editClear,mainSymptIds} = this.props;
+    const {mainData,mainText,setData,moduleNum,mainIds,data,changeEditIll,editClear} = this.props;
     const that = this;
     let mainFinallyText = filterDataArr(mainText);
     // if(mainData.length == 0 && !mainText[0]){
@@ -46,11 +46,11 @@ class CurrentIll extends Component{
       })
     }else {
       // let useEmpty = mainData.length>0?false:true;
-      let useEmpty = mainSymptIds.length>0?false:true;
       let num = moduleNum.num;//主诉使用了几个模板
       // if(editClear && data.length==0){//第一次聚焦去设置现病史的data
       if(data.length==0){//第一次聚焦去设置现病史的data
-        setData && setData({useEmpty,num,mainData,mainIds});//是否使用空模板 及数据处理
+        // setData && setData({useEmpty,num,mainData,mainIds});//是否使用空模板 及数据处理
+        setData && setData({num,mainData,mainIds});//是否使用空模板 及数据处理
       }
       this.setState({
           showMoudle:true,

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

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

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

@@ -55,9 +55,13 @@ class DiagnosticItem extends Component{
 
     render(){
         const { visible } = this.state
-        const { item } = this.props
+        const { item, title } = this.props
         return (<span className={style['diag-item']} >
-                    <span className={style['diag-name']} onClick={() =>{this.chooseDiagodal(item)}}>{item.name} </span>
+                    <span className={style['diag-name']} 
+                          title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
+                          onClick={() =>{this.chooseDiagodal(item)}}>
+                        {item.name} {item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': ''}
+                    </span>
                     <ConfirmModal visible={visible} okText='初诊' cancelText='复诊' confirm={this.confirm}  cancel={this.cancel} close={this.close}>
                         <div className={style['confirm-info']}>确定选择“{item.name}”为</div> 
                     </ConfirmModal>

+ 4 - 0
src/components/DiagnosticItem/index.less

@@ -12,4 +12,8 @@
 .diag-name {
     display: inline-block;
     width: 100%;
+    height: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
 }

+ 226 - 0
src/components/Multiple/index.jsx

@@ -0,0 +1,226 @@
+import react from "react";
+import style from "./index.less";
+import $ from 'jquery';
+import classNames from 'classnames';
+import {handleEnter,isIE,filterArr,deepClone} from '@utils/tools.js';
+import {Notify} from '@commonComp';
+import config from '@config/index.js';
+/**
+  单列多选组件(tagtype=1,controlType=2)
+  2019-2-20 By_liucf
+  参数:
+  placeholder:标签名
+  value:标签选中的值
+  show:是否展示下拉
+  data:下拉数据
+  type:标识哪一项数据(1-主诉,2-现病史,3-其他史,4-查体)
+**/
+
+class Multiple extends react.Component{
+  constructor(props){
+    super(props);
+    const {seleData,seleId} = deepClone(props.selecteds||[]);
+    this.state={
+      editable:false,
+      timer:null,
+      labelVal:"",
+      seleData:seleData||"",
+      seleId:seleId||[],
+      boxLeft:null,
+      boxTop:null
+    }
+    this.$div = React.createRef();
+    this.handleShow = this.handleShow.bind(this);
+    this.changeToEdit = this.changeToEdit.bind(this);
+    this.handleSelect = this.handleSelect.bind(this);
+    this.onChange = this.onChange.bind(this);
+    this.handleBlur = this.handleBlur.bind(this);
+    this.handleClear = this.handleClear.bind(this);
+    this.handleComfirn = this.handleComfirn.bind(this);
+  }
+
+  getClass(){
+    if(this.props.show){
+      $(this.$div.current).addClass(style['borderd']);
+    }else{
+      $(this.$div.current).removeClass(style['borderd']);
+    }
+    if(this.props.value){
+      return style['selected-tag'];
+    }
+    return style['tag'];
+  }
+
+  getListClass(){
+    let name = style['text-list'];
+    let isHide = this.props.show?'':style['hide'];
+    return classNames(style['list'],name,isHide);
+  }
+
+  getSeleStyle(id){
+    const {seleId} = this.state;
+    if(seleId.includes(id)){
+      return style['selected'];
+    }
+    return '';
+  }
+
+  handleShow(e){//单击
+    e&&e.stopPropagation();
+    let boxLeft = e.pageX -133 + 'px';
+    let offsetTop = e.target.offsetTop;
+    const ht = e.target.offsetHeight;   //如杂音选中文字有多行时,写死会遮挡
+    let boxTop = offsetTop + ht +2 + 'px';
+    this.setState({
+      boxLeft:boxLeft,
+      boxTop:boxTop
+    })
+     this.setStateInit();
+    const {ikey,handleShow,placeholder,flag,id,value,tagType,type} = this.props;
+    const that = this;
+    clearTimeout(this.state.timer);
+    this.state.timer = setTimeout(function(){
+      if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
+        return
+      }else{
+        handleShow&&handleShow({ikey,placeholder,flag,id,value,tagType,type});
+      }
+    },300)
+
+  }
+
+  setStateInit(){//恢复初始选中状态
+    const {seleData,seleId} = deepClone(this.props.selecteds||[]);
+    this.setState({
+      seleData:seleData||"",
+      seleId:seleId||[],
+    })
+  }
+
+  changeToEdit(e){//双击
+    const {value,id,placeholder,handleDbclick,handleHide} = this.props;
+    let text = e.target.innerText;
+    handleHide&&handleHide();       //展开情况下双击收起
+    // clearTimeout(this.state.timer);//取消延时的单击事件
+    e.stopPropagation();
+    if(value&&value.trim()){//有选中值的标签才能双击编辑
+      this.setState({
+        labelVal:text,
+        editable:true
+      });
+      e.target.focus();
+      handleDbclick && handleDbclick({value,id,placeholder});
+    }
+  }
+
+  handleSelect(e,item){
+    e&&e.stopPropagation();
+    let {seleData,seleId} = this.state;
+    const {name,id} = item;
+    if(seleId.includes(id)){
+      seleId.splice(seleId.indexOf(id),1);
+      seleData = seleData.replace(name,'');
+    }else{
+      seleId.push(id);
+      seleData += name;
+    }
+    this.setState({
+      seleData,
+      seleId
+    })
+  }
+
+  onChange(e){
+    const {mainSaveText,ikey,type,handleLabelChange} = this.props;
+    const {labelVal,editable} = this.state;
+    let mainText = filterArr(mainSaveText);//主诉字数
+    if(editable){//避免IE中点击标签也会触发
+      let val = e.target.innerText;
+      if(+type==1){// 主诉字数达到上限时不允许输入
+        if(mainText.length >= config.limited){
+          if(val.length > labelVal.length){
+            e.target.innerText = labelVal;
+            Notify.info(config.limitText);
+            return
+          }else if(val.length == labelVal.length){
+            this.setState({
+              labelVal:val
+            });
+          }else{
+            handleLabelChange && handleLabelChange({ikey,changeVal:val,type});
+          }
+        }
+      }
+    }
+  }
+
+  handleBlur(e){//修改存值
+    e.stopPropagation();
+    const {ikey,type,handleLabelChange} = this.props;
+    const {editable} = this.state;
+    const ev = e || window.event;
+    if(editable){
+      // 更改标签的value值
+      let changeVal = ev.target.innerText;
+      if(!isIE()){
+        e.target.innerText = '';      //避免出现重复输入值
+      }
+      handleLabelChange && handleLabelChange({ikey,changeVal,type});
+    }
+    this.setState({
+      editable:false
+    });
+  }
+
+  handleClear(e){
+    e&&e.stopPropagation();
+    this.setState({
+      seleData:"",
+      seleId:[]
+    })
+  }
+
+  handleComfirn(e){
+    e&&e.stopPropagation();
+    const {handleConfirm,ikey,order,mainSaveText,value,handleHide,type} = this.props;
+    const params = Object.assign({},this.state,{ikey,order,mainSaveText,value,type});
+    handleConfirm&&handleConfirm(params);
+    handleHide&&handleHide();
+  }
+
+  componentDidMount(){
+    if(isIE()){
+      $(this.$div.current).onIe8Input(function(e){
+        this.onChange(e)
+      },this);
+    }
+  }
+
+  render(){
+    const {placeholder,value,show,data} = this.props;
+    const {editable,boxTop,boxLeft} = this.state;
+    return <div className={style["container"]}>
+      <div className={this.getClass()}
+      ref={this.$div}
+      onClick={this.handleShow}
+      onDoubleClick={this.changeToEdit}
+      onBlur={this.handleBlur}
+      onInput={this.onChange}
+      onkeydown={handleEnter}
+      contentEditable={editable}>{value||placeholder}</div>
+      <div className={this.getListClass()} style={{top:boxTop,left:boxLeft}} contentEditable="false">
+        <ul>
+          {data&&data.map((it)=>{
+          return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getSeleStyle(it.id)}>{it.labelPrefix}{it.name}{it.labelSuffix}</li>
+        })}
+          <li onClick={this.handleClear} className={style['mClear']}>清空选项</li>
+          <li onClick={this.handleComfirn} className={style['mConfirm']}>确定</li>
+        </ul>
+        
+      </div>
+    </div>
+  }
+
+}
+
+export default Multiple;

+ 48 - 0
src/components/Multiple/index.less

@@ -0,0 +1,48 @@
+@import "~@less/mixin.less";
+.container{
+  display: inline-block;
+}
+.selected{
+    .select-li;
+  }
+.tag,.selected-tag{
+  cursor: pointer;
+  line-height: 20px;
+}
+
+.selected-tag{
+  padding: 0;
+  color: @text-color;
+  border-bottom: 1px @border-color solid;
+  line-height: 22px;
+}
+.list{
+  .pop;
+  padding: 0 0 10px;
+  color: @text-color;
+  li{
+    height: 32px;
+    line-height: 32px;
+    border:1px #fff solid;
+    padding: 0 20px;
+    white-space: nowrap;
+    cursor: pointer;
+  }
+  // li:hover,.selected{
+  li:hover{
+    border-color:#3B9ED0;
+  }
+}
+.hide{
+  display: none;
+}
+
+.mClear{
+  color:red;
+}
+.mConfirm{
+  color: #3B9ED0;
+  text-align: center;
+  border: 1px solid #3B9ED0;
+
+}

+ 52 - 3
src/components/PushItems/DetailsModal/index.jsx

@@ -2,33 +2,82 @@ import React, { Component } from "react";
 import styles from "./index.less";
 import NewPortal from './NewPortal'
 import close from "./../img/close.png";
+import $ from "jquery";
 class DetailsModal extends Component {
     constructor(props) {
         super(props);
+        this.state = {
+            currentIndex: 0
+        }
         this.hideTips = this.hideTips.bind(this)
     }
     hideTips() {
         const { hideTips } = this.props;
         hideTips && hideTips();
     }
+    handleClickMenu(index, item, tipsDetails) {
+        const that = this
+        setTimeout(function(){
+            that.setState({
+                currentIndex: index
+            })
+        },0)
+        
+        let scrollTop = 0
+        tipsDetails.introduceDetailList.map((it, ii) => {
+            if( ii < index) {
+                scrollTop = scrollTop + parseInt($('#' + it.title).css('height'))
+            }
+        })
+        $('#detailsContent').scrollTop(scrollTop)
+    }
+    handleScrollModal(tipsDetails) {
+        const scrollTop = $('#detailsContent').scrollTop()
+        let divHeight = 0;
+        for (let i = 0; i < tipsDetails.introduceDetailList.length; i++) {
+            divHeight = divHeight + parseInt($('#' + tipsDetails.introduceDetailList[i].title).css('height'))
+            if(divHeight > scrollTop) {
+                this.setState({
+                    currentIndex: i
+                })
+                return
+            }
+        }
+    }
+    
+    
 
     render() {
         const {showTipsDetails, tipsDetails} = this.props;
+        const { currentIndex } = this.state
         const imageUrlPrefix = 'http://192.168.2.241:82'; //图片服务器地址
         return (<NewPortal visible={showTipsDetails}>
         <div className={styles['details-wrapper']}>
            <div className={styles['details-content-wrapper']}>
                 <h1 className={styles['details-content-name']} >{tipsDetails && tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
-                <div className={styles['details-content']}>
+                <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
                     {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
-                        return (<div>
-                            <div className={styles['details-content-title-box']}>
+                        return (<div id={item.title}>
+                            <div className={styles['details-content-title-box']} >
                                 <span className={styles['details-content-title-name']}>{item.title}</span>
                                 <div className={styles['details-content-title-line']}></div>
                             </div>
                             <div dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div>
                         </div>)
                     })}
+                    
+                </div>
+                <div className={styles['content-menu']}>
+                    {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                            return (<div>
+                                <div className={styles['details-menu-title-box']}>
+                                    {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
+                                    <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
+                                        <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                    </span>
+                                </div>
+                            </div>)
+                        })}
                 </div>
            </div>
            <div className={styles['details-mask']}>

+ 33 - 1
src/components/PushItems/DetailsModal/index.less

@@ -15,6 +15,7 @@
     left: 10%;
     top: 10%;
     background: #fff;
+    overflow: hidden;
     z-index: 10;
 }
 
@@ -55,10 +56,41 @@
     right: 0;
 }
 .details-content {
+    position: relative;
     height: 100%;
-    padding: 0 40px;
+    padding: 0 180px 0 40px;
     overflow-y: auto;
 }
+.content-menu {
+    position: absolute;
+    top: 50px;
+    right: 20px;
+    background: #eee;
+    border: 1px solid #eee;
+    width: 160px;
+    padding: 15px 18px;
+}
+.details-content-menu-line {
+    height: 15px;
+    width: 0;
+    border: 1px solid #ccc;
+    background-color: #ccc;
+    margin-left: 4px
+}
+.details-content-menu-name {
+    color: #33475f;
+    font-size: 13px;
+}
+.details-content-menu-circle {
+    display: inline-block;
+    width: 8px;
+    height: 8px;
+    border-radius: 5px;
+    border: 1px solid #ccc;
+    margin-top: 5px;
+    background-color: #eee;
+    margin-right: 10px;
+}
 .details-mask {
     position: fixed;
     width: 100%;

+ 9 - 5
src/components/PushItems/index.jsx

@@ -46,11 +46,15 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
-    const Height = $(".src-components-BodyContainer-2SgEx").height();
-    const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
-    const winHeight = window.innerHeight;
-    const scrollTop = Height;
-    document.documentElement.scrollTop = 10000;
+    if(checkedAssay.length > 0 || checkedCheck.length > 0) {
+      console.log('checkedCheck',checkedAssay, checkedCheck)
+      const Height = $(".src-components-BodyContainer-2SgEx").height();
+      const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
+      const winHeight = window.innerHeight;
+      const scrollTop = Height;
+      document.documentElement.scrollTop = 10000;
+    }
+    
   }
 
   changeAssay(item) {

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

@@ -108,15 +108,16 @@
       div{
         float: right;
         width: 50px;
-        height: 26px;
         border: 1px solid #3B9ED0;
         text-align: center;
-        line-height: 26px;
         padding:0px;
         border-radius: 4px;
         margin-top: -3px;
         cursor: pointer;
         font-weight: normal;
+        height: 28px;
+        line-height: 28px;
+        font-size: 12px;
       }
     }
     div{
@@ -339,6 +340,7 @@
 }
 .billing {
   color: #3B9ED0;
+  
 }
 .disTips {
   padding: 10px 20px 0;

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

@@ -175,8 +175,8 @@ class SpreadDrop extends Component{
   }
   handleConfirm(e){
     e.stopPropagation();
-    const {handleConfirm,ikey,type,tagType,order,mainSaveText,copyType} = this.props;
-    const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType});
+    const {handleConfirm,ikey,type,tagType,order,mainSaveText,copyType,value} = this.props;
+    const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType,value});
     handleConfirm&&handleConfirm(params);
 	this.btnClickFlag = true;
     //点确定后隐藏弹窗

+ 37 - 1
src/components/Treat/DrugTreat/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import info from './../img/info.png';
+import info1 from './../img/info1.png';
 import drugIcon from './../img/drug.png';
 import more from '@common/images/addItem1.png';
 import $ from "jquery";
@@ -8,16 +9,31 @@ import $ from "jquery";
 class DrugTreat extends Component {
     constructor(props) {
         super(props);
+        this.state = {
+            currentImg: -1,
+        }
         this.handleSelect = this.handleSelect.bind(this);
         this.setOtherRecommend = this.setOtherRecommend.bind(this);
         this.setDrugInfo = this.setDrugInfo.bind(this);
         this.showTreatDesc = this.showTreatDesc.bind(this);
+        this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this)
     }
 
     handleSelect(index,ii) {
         const { selectDrug } = this.props;
         selectDrug && selectDrug(index,ii);
     }
+    handleMouseEnterImg(ii, index) {
+        this.setState({
+            currentIndex: index,
+            currentImg: ii
+        })
+    }
+    handleMouseLeaveImg() {
+        this.setState({
+            currentIndex: -1,
+        })
+    }
     setOtherRecommend(item, index) {
         this.showTreatDesc();
         const { setOtherRecommend } = this.props;
@@ -27,6 +43,19 @@ class DrugTreat extends Component {
         const { setDrugInfo } = this.props;
         setDrugInfo && setDrugInfo(item);
     }
+    //搜索药品说明书(查看数据用)
+    handleInputDrug(e) {
+        this.setState({
+            drugId: e.target.value
+         })
+    }
+    //搜索药品说明书(查看数据用)
+    searchDrug() {
+        const { showDrugInfo } = this.props
+        this.setDrugInfo({id: this.state.drugId})
+        showDrugInfo && showDrugInfo();
+
+    }
     showTreatDesc() {
         $('#treatDescBox').css({'display': 'block'});
         $('#treatWrapper').animate({'margin-left': '-470px'}, 300);
@@ -38,9 +67,12 @@ class DrugTreat extends Component {
 
     render(){
         const { treatment,showDrugInfo } = this.props
+        const { currentImg, currentIndex } = this.state
         return(
             treatment && treatment.length > 0 && <div className={style['drug-box']}>
                 <h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 常用药物治疗</h3>
+                {/* 查看药物说明书 */}
+                <div> <input onInput={this.handleInputDrug.bind(this)} style={{border:'1px solid #000'}} type="text"/><button onClick = {this.searchDrug.bind(this)}>搜索药品说明</button></div>
                 {treatment.map((item, index) => {
                     return(<div className={style['drug-content']}>
                         <div  className={style['drug-name-box']}>
@@ -53,7 +85,11 @@ class DrugTreat extends Component {
                                             onClick={()=>{it.forbidden === '2' ? '' : this.handleSelect(index,ii)}} style={it.selected ? {color: '#3B9ED0', borderBottom: '1px solid #3B9ED0'}:''}>
                                             {it.medicitionName}
                                         </span>
-                                        {<img className={style['info-img']} src={info} onClick={() =>{this.setDrugInfo(it);showDrugInfo();}}/>}
+                                        {<img className={style['info-img']}    
+                                              src={currentIndex === index ? (ii === currentImg ? info1 : info) : info} 
+                                              onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}
+                                              onMouseLeave = {this.handleMouseLeaveImg}
+                                              onClick={() =>{this.setDrugInfo(it);showDrugInfo();}}/>}
                                         {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 使用率{it.rate}
                                         
                                     </span>)

+ 1 - 0
src/components/Treat/DrugTreat/index.less

@@ -23,6 +23,7 @@
 .info-img {
     width: 12px;
     margin: 0 3px -1px;
+    cursor: pointer;
 }
 .info-flag {
     display: inline-block;

BIN
src/components/Treat/img/info1.png


BIN
src/components/TreatDesc/img/info1.png


+ 22 - 2
src/components/TreatDesc/index.jsx

@@ -3,15 +3,30 @@ import style from './index.less';
 import $ from "jquery";
 import close from './img/close.png';
 import info from './img/info.png';
+import info1 from './img/info1.png';
 
 
 class TreatDesc extends Component {
     constructor(props){
         super(props);
+        this.state = {
+            currentIndex: -1
+        }
         this.hideTreatDesc = this.hideTreatDesc.bind(this);
         this.handleSelect= this.handleSelect.bind(this);
+        this.handleMouseLeaveImg = this.handleMouseLeaveImg.bind(this)
     }
 
+    handleMouseEnterImg(index) {
+        this.setState({
+            currentIndex: index,
+        })
+    }
+    handleMouseLeaveImg() {
+        this.setState({
+            currentIndex: -1,
+        })
+    }
     handleSelect(index,ii) {
         const { selectDrug } = this.props;
         selectDrug && selectDrug(index,ii);
@@ -25,6 +40,7 @@ class TreatDesc extends Component {
     render(){
         const  { treatment, treatDesc, setDrugInfo, showDrugInfo} = this.props
         const { title, basic, otherDrugIndex, drugDesc} = treatDesc
+        const { currentIndex } = this.state
         return (treatment && treatment.length >0 && <div  className={style['treat-desc-box']}>
             
             {title && title === '药品推荐' ? <div className={style['similar-drug-box']} id='treatDescBox'>
@@ -43,14 +59,18 @@ class TreatDesc extends Component {
                         {index === 0 ? '' : ', '}     
                         <span className={style['drug-name-box']}>
                             <span className={style['drug-name']} 
-                                onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
+                                // onDoubleClick={() =>{setDrugInfo(item);showDrugInfo();}} 
                                 onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect(otherDrugIndex,index)}} 
                                 style={item.selected ? {color: '#3B9ED0'}:''}>
                                 {item.medicitionName}
                             </span>
                         </span>              
                         
-                        {<img  onClick={() =>{setDrugInfo(item);showDrugInfo();}}  className={style['info-img']} src={info} />}
+                        {<img className={style['info-img']}    
+                            src={currentIndex === index ? info1 : info} 
+                            onMouseEnter={this.handleMouseEnterImg.bind(this, index)}
+                            onMouseLeave = {this.handleMouseLeaveImg}
+                            onClick={() =>{setDrugInfo(item);showDrugInfo();}}/>}
                         {item.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: item.forbidden === '2' ? <span className={style['info-flag']} style={{border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 使用率{item.rate}
                         
                     </span>)

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

@@ -59,6 +59,7 @@
 .info-img {
     width: 12px;
     margin: 0 3px -1px;
+    cursor: pointer;
 }
 .info-flag {
     display: inline-block;

+ 1 - 2
src/containers/CurrentIll.js

@@ -12,7 +12,7 @@ import {getModule} from '@store/async-actions/fetchModules.js';
 import {didPushParamChange} from '@utils/tools.js';
 
 
-function mapStateToProps(state) {
+function mapStateToProps(state) { 
   const {homePage} = state;
     return {
         data:state.currentIll.data,//主诉模板
@@ -29,7 +29,6 @@ function mapStateToProps(state) {
         moduleNum:state.mainSuit.moduleNum,//主诉使用的模板
         type: state.typeConfig.typeConfig,
         mainIds:state.mainSuit.mainIds,//主诉症状选中的id(去重用)
-        mainSymptIds:state.mainSuit.mainSymptIds,//主诉症状选中的id(移植用)
         fillInfo: state.fillInfo,
         showArr:homePage.showDrop,
         totalHide: homePage.totalHide,

+ 182 - 0
src/containers/Multiple.js

@@ -0,0 +1,182 @@
+// import React from "react";
+import {connect} from "react-redux";
+import Multiple from "@components/Multiple";
+import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD} from '@store/types/homePage.js';
+import {CURRENT_MUL,CURRENT_TEXT_LABEL} from '@types/currentIll';
+import {MAINSUIT_MUL,CHANGE_LABELVAL} from '@types/mainSuit';
+import {OTHERHIS_MUL,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
+import {CHECKBODY_MUL,CHANGECHECKTEXTLABEL} from '@types/checkBody';
+import {getLabelIndex,fullfillText,getIds} from '@common/js/func.js';
+import {filterArr} from '@utils/tools.js';
+import config from '@config/index.js';
+import {Notify} from '@commonComp';
+
+function handleMainSuit(dispatch,params){
+  const {ikey,seleData,seleId,value,mainSaveText} = params;
+  //字数限制
+  let mainText = filterArr(mainSaveText);
+  let lengths = value?mainText.length - value.length + seleData.length:mainText.length + seleData.length;
+  if(lengths > config.limited){
+    Notify.info(config.limitText);
+    return
+  }
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:MAINSUIT_MUL,
+    data:{seleData,seleId,ikey:index}
+  })
+}
+
+function handleCurrent(dispatch,params){
+  const {ikey,seleData,seleId} = params;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CURRENT_MUL,
+    data:{seleData,seleId,ikey:index}
+  })
+}
+
+function handleOtherHis(dispatch,params){
+  const {ikey,seleData,seleId} = params;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:OTHERHIS_MUL,
+    data:{seleData,seleId,ikey:index}
+  })
+}
+
+function handleCheckBody(dispatch,params){
+  const {ikey,seleData,seleId} = params;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CHECKBODY_MUL,
+    data:{seleData,seleId,ikey:index}
+  })
+}
+
+function handleDiff(dispatch,params){
+  const {type} = params;
+  switch(+type){
+    case 1:
+      handleMainSuit(dispatch,params);
+      break;
+    case 2:
+      handleCurrent(dispatch,params);
+      break;
+    case 3:
+      handleOtherHis(dispatch,params);
+      break;
+    case 4:
+      handleCheckBody(dispatch,params);
+      break;
+    default:
+
+  }
+}
+
+/*****************双击标签改变值**********************/
+function changeMainSuit(dispatch,obj){
+  const {ikey,changeVal} = obj;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CHANGE_LABELVAL,
+    data:{changeVal,ikey:index}
+  })
+}
+
+function changeCurrent(dispatch,obj){
+  const {ikey,changeVal} = obj;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CURRENT_TEXT_LABEL,
+    data:{changeVal,ikey:index}
+  })
+}
+
+//其他史
+function changeOtherHis(dispatch,obj){
+  const {ikey,changeVal} = obj;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CHANGEOTHERTEXTLABEL,
+    data:{changeVal,ikey:index}
+  })
+}
+
+//查体
+function changeCheckBody(dispatch,obj){
+  const {ikey,changeVal} = obj;
+  const index = getLabelIndex(ikey);
+  dispatch({
+    type:CHANGECHECKTEXTLABEL,
+    data:{changeVal,ikey:index}
+  })
+}
+
+function handleLabel(dispatch,obj){
+  const {type} = obj;
+  switch (+type) {
+    case 1:
+      changeMainSuit(dispatch,obj);
+      break;
+    case 2:
+      changeCurrent(dispatch,obj);
+      break;
+    case 3:
+      changeOtherHis(dispatch,obj);
+      break;
+    case 4:
+      changeCheckBody(dispatch,obj);
+      break;
+    default:
+
+  }
+}
+
+function mapStateToProps(state){
+  return{
+    mainSaveText:state.mainSuit.saveText,
+  }
+}
+
+function mapDispatchToProps(dispatch){
+  return{
+    handleShow(obj){
+      dispatch({
+        type:CLICKCOUNT,
+        data:obj,
+        clickType:'单击',
+        num:1
+      });
+      dispatch({
+        type:SETDROPSHOW,
+        data:obj
+      });
+      dispatch({
+        type: RESET
+      });
+    },
+    handleHide(){
+      dispatch({
+        type:HIDEDROP
+      })
+    },
+    handleDbclick(obj){//双击统计
+      dispatch({
+        type:CLICKCOUNT,
+        data:obj,
+        clickType:'双击',
+        num:1
+      });
+    },
+    handleLabelChange(obj){//标签内输入
+      handleLabel(dispatch,obj);
+    },
+    handleConfirm(params){
+      handleDiff(dispatch,params);
+    }
+  }
+}
+
+const MultipleContainer = connect(mapStateToProps,mapDispatchToProps)(Multiple);
+export default MultipleContainer;

+ 15 - 6
src/containers/SpreadDrop.js

@@ -45,6 +45,10 @@ function mainSuitModule(dispatch,store,params){
   let withsName = getNames(withs);
   let banName = ban.name;
   let text = filterArr(mainSaveText);
+  if(text.length >= config.limited){
+    Notify.info(config.limitText);
+    return
+  }
   let names;
   if(banName){
     names = existsName + banName + withsName;
@@ -213,11 +217,11 @@ function handleModuleDiff(dispatch,store,params){
   const {type,mainSaveText} = params;
   switch (+type){
     case 1:
-      let text = filterArr(mainSaveText);
+      /*let text = filterArr(mainSaveText);
       if(text.length >= config.limited){
         Notify.info(config.limitText);
         return
-      }
+      }*/
       mainSuitModule(dispatch,store,params);
       break;
     case 2:
@@ -238,10 +242,15 @@ function handleModuleDiff(dispatch,store,params){
 
 //主诉普通多选确定
 function mainSuitCheck(dispatch,store,params){
-  const {nones,exists,withs,order,mainSaveText} = params;
+  const {nones,exists,withs,order,mainSaveText,value} = params;
   let existsName = getNames(exists,order);
   let text = filterArr(mainSaveText);
-  let lengths = text.length + existsName.length;
+  if(text.length >= config.limited){
+    Notify.info(config.limitText);
+    return
+  }
+  // let lengths = text.length + existsName.length;
+  let lengths = value?(text.length - value.length + existsName.length):(text.length + existsName.length);
   if(lengths > config.limited){
     Notify.info(config.limitText);
     return
@@ -297,11 +306,11 @@ function handleCheckBox(dispatch,store,params){
   const {type,mainSaveText} = params;
   switch (+type){
     case 1:
-      let text = filterArr(mainSaveText);
+      /*let text = filterArr(mainSaveText);
       if(text.length >= config.limited){
         Notify.info(config.limitText);
         return
-      }
+      }*/
       mainSuitCheck(dispatch,store,params);
       break;
     case 2:

+ 17 - 2
src/containers/eleType.js

@@ -6,6 +6,7 @@ import SpreadDrop from "@containers/SpreadDrop";
 import EditableSpan from '@containers/EditableSpan';
 import InlineTag from '@containers/InlineTag';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
+import Multiple from '@containers/Multiple';
 
 /******
  * 下拉类型分发
@@ -17,8 +18,8 @@ import NumberUnitDrop from '@containers/NumberUnitDrop';
  * *******/
 //单选类型
 export function singleRadio(params){
-  const data = params.item;
-  const {i,hideTag,boxMark,showArr} = params;
+  const data = params.item;//console.log(111,data);
+  const {i,hideTag,boxMark,showArr,selecteds} = params;
   const showInx = boxMark+i+'0';    //单括号多标签的情况下需要识别同一个标签内多个下拉组件的显示状态
   switch (+data.controlType){
     case 0:
@@ -34,6 +35,20 @@ export function singleRadio(params){
                         id={data.id}
                         ikey={showInx}
                         hideTag={hideTag}></RadioDrop>;
+    case 2:
+      const dataList = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
+      return <Multiple data={dataList}
+                     ikey={showInx}
+                     placeholder={data.name}
+                     value={data.value}
+                     copyType={data.copyType}
+                     selecteds={selecteds ?selecteds[i]:[]}
+                     show={showArr&&showArr[showInx]}
+                     order={data.textGenerate}
+                     type={boxMark}
+                     textPrefix={data.labelPrefix}
+                     textSuffix={data.labelSuffix}
+                     id={data.id}></Multiple>
     case 3:
       return <EditableSpan {...params} value={data.value||data.value==''?data.value:data.name} update={Math.random()}/>;
     case 5://带单位数字键盘

+ 12 - 0
src/store/actions/checkBody.js

@@ -320,4 +320,16 @@ export function backspaceText(state,action){
   res.saveText = fullfillText(data).saveText;
   res.update = Math.random();
   return res;
+}
+
+// 单列多选
+export function multipleComfirn(state,action){
+  let res = Object.assign({},state);
+  const {ikey,seleData} = action.data;
+  let data = res.data;
+  data[ikey].value = seleData;
+  res.saveText[ikey] = seleData;
+  res.selecteds[ikey] = action.data;
+  res.update = Math.random();
+  return res;
 }

+ 20 - 3
src/store/actions/currentIll.js

@@ -616,9 +616,26 @@ export function removeId(state,action){
   if(ids.includes(id)){
     ids.splice(ids.indexOf(id),1);
   }
-  data[index].id = "";
-  data[index].name = text;
-  data[index].value = text;
+  if(!data[index].value && data[index-1].tagType==8){
+    data.splice(index,1);
+  }else{
+    data[index].id = "";
+    data[index].name = text;
+    data[index].value = text;
+  }
+  
+  res.update = Math.random();
+  return res;
+}
+
+// 单列多选
+export function multipleComfirn(state,action){
+  let res = Object.assign({},state);
+  const {ikey,seleData} = action.data;
+  let data = res.data;
+  data[ikey].value = seleData;
+  res.saveText[ikey] = seleData;
+  res.selecteds[ikey] = action.data;
   res.update = Math.random();
   return res;
 }

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

@@ -23,6 +23,8 @@ export const getSearchResult= (state, action) => {
         let searchResultItem = {}
         searchResultItem.id = item.questionId
         searchResultItem.name = item.name
+        searchResultItem.showType = item.showType
+        searchResultItem.retrievalName = item.retrievalName
         searchResult.push(searchResultItem)
     }) 
     res.searchResult = searchResult;

+ 1 - 1
src/store/actions/homePage.js

@@ -32,7 +32,7 @@ export const confirmHide=(state,action)=>{
   let res = Object.assign({},state);
   let obj = res.showDrop||{};
   let temp = Object.assign({},obj);
-  let keyArr = Object.keys(obj); 
+  let keyArr = Object.keys(obj);
   for(let i=0; i<keyArr.length; i++){
     temp[JSON.parse(keyArr[i])] = false;
   }

+ 18 - 10
src/store/actions/mainSuit.js

@@ -110,7 +110,6 @@ export const insertMain = (state,action) => {
   // res.saveText[inserIndx] = text.name;
   res.saveText = fullfillText(res.data).saveText;
   res.mainIds.push(id);
-  res.mainSymptIds.push(id);
   res.editClear = false;//主诉框编辑状态
   res.update=Math.random();
   return res;
@@ -136,7 +135,6 @@ export const confirm = (state,action) =>{
     let existsId = getIds(exists);
     let withsId = getIds(withs);
     res.mainIds = res.mainIds?res.mainIds.concat(existsId,withsId):[];
-    res.mainSymptIds = res.mainSymptIds.concat(existsId,withsId);
   }
 
   // 第二病程-伴位置处理
@@ -298,7 +296,6 @@ export const insertSearch = (state,action)=>{
     // res.saveText[inserIndx] = searchData;
     res.saveText = fullfillText(res.data).saveText;
     res.mainIds.push(id);
-    res.mainSymptIds.push(id);
     res.editClear = false;//主诉框编辑状态
   }else{
     // 替换
@@ -518,7 +515,6 @@ export const clearMainSuit = (state,action)=>{//回读和清除
   // res.saveText = fullfillText(action.data).saveText;//解决删除data里的值保存,回读后页面上有内容saveText里没有的情况
   res.selecteds = action.selecteds?action.selecteds:[];
   res.mainIds = action.mainIds;
-  res.mainSymptIds = action.mainSymptIds;
   if(action.editClear){
     res.editClear = action.editClear;
   }
@@ -611,16 +607,28 @@ export function removeId(state,action){
   const data = res.data;
   const id = data[index].id;
   let ids = res.mainIds;
-  let mainIds = res.mainSymptIds;
   if(ids.includes(id)){
     ids.splice(ids.indexOf(id),1);
   }
-  if(mainIds.includes(id)){
-    mainIds.splice(mainIds.indexOf(id),1);
+  if(!data[index].value && data[index-1].tagType==8){
+    data.splice(index,1);
+  }else{
+    data[index].id = "";
+    data[index].name = text;
+    data[index].value = text;
   }
-  data[index].id = "";
-  data[index].name = text;
-  data[index].value = text;
   res.update = Math.random();
   return res;
 }
+
+// 单列多选
+export function multipleComfirn(state,action){
+  let res = Object.assign({},state);
+  const {ikey,seleData} = action.data;
+  let data = res.data;
+  data[ikey].value = seleData;
+  res.saveText[ikey] = seleData;
+  res.selecteds[ikey] = action.data;
+  res.update = Math.random();console.log(123,action,res);
+  return res;
+}

+ 12 - 0
src/store/actions/otherHistory.js

@@ -303,4 +303,16 @@ export function backspaceText(state,action){
   res.saveText = fullfillText(data).saveText;
   res.update = Math.random();
   return res;
+}
+
+// 单列多选
+export function multipleComfirn(state,action){
+  let res = Object.assign({},state);
+  const {ikey,seleData} = action.data;
+  let data = res.data;
+  data[ikey].value = seleData;
+  res.saveText[ikey] = seleData;
+  res.selecteds[ikey] = action.data;
+  res.update = Math.random();
+  return res;
 }

+ 20 - 6
src/store/async-actions/diagnosticSearch.js

@@ -8,9 +8,9 @@ export const getSearchResult = (value) =>{
         const url = '/api/icss/retrieval/getTagInfos'
         const param={
             type: 7,
-            age: 44,
+            age: state.patInfo.message.patientAge,
             inputStr: value,
-            sexType: 1
+            sexType: state.patInfo.message.sex
         }
         if(value === state.diagnosticSearch.searchValue) {
             return
@@ -19,6 +19,14 @@ export const getSearchResult = (value) =>{
                 type: SET_SEARCH_VALUE,
                 searchValue: value
             })
+            //如果搜索值为空,则直接将搜索结果设为空
+            if(value === '') {
+                dispatch({
+                    type: GET_SEARCH_RESULT,
+                    searchResult: []
+                })
+                return
+            }
             json(url, param).then((data)=>{
                 const searchRes = data.data.data;
                 const diagList = state.diagnosticList.diagnosticList;
@@ -35,11 +43,17 @@ export const getSearchResult = (value) =>{
                             searchResult.push(searchRes[i])
                         }
                     }
+                    dispatch({
+                        type: GET_SEARCH_RESULT,
+                        searchResult: searchResult
+                    })
+                } else {
+                    dispatch({
+                        type: GET_SEARCH_RESULT,
+                        searchResult: []
+                    })
                 }
-                dispatch({
-                    type: GET_SEARCH_RESULT,
-                    searchResult: searchResult
-                })
+               
             }).catch((e)=>{
                 console.log(e)
             })

+ 1 - 1
src/store/async-actions/homePage.js

@@ -56,7 +56,7 @@ export const getInitModules= (dispatch,getStore)=>{
           emptyData:initData.currentEmpty,//现病史空模板
           saveEmpty:initSaveText.currentEmpty,
         });
-        dispatch(getOtherHisRecord());  console.log(111)        //获取其他史最近记录
+        dispatch(getOtherHisRecord());          //获取其他史最近记录
         initHis(dispatch)
       }else{
         initHis(dispatch)

+ 4 - 2
src/store/reducers/checkBody.js

@@ -1,9 +1,9 @@
 import {SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
   SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,
-  SETCHECKINPUT,DEL_CHECKBODY,CHANGECHECKTEXTLABEL_NUMBER,CHECKCONFIRMSELECTED} from '../types/checkBody.js';
+  SETCHECKINPUT,DEL_CHECKBODY,CHANGECHECKTEXTLABEL_NUMBER,CHECKCONFIRMSELECTED,CHECKBODY_MUL} from '../types/checkBody.js';
 import {set,setNumberValue,setRadioValue,setCheckBoxValue,addLabelItem,setCheckText,
   setSearchData,insertLabelData,changeLabelVal,clearCheckBody,setInputLabel,backspaceText,
-  changeNumLabelVal,confirm} from '../actions/checkBody.js';
+  changeNumLabelVal,confirm,multipleComfirn} from '../actions/checkBody.js';
 import config from '@config/index.js';
 
 //const block = Object.assign(JSON.parse(config.textLabel),{full:false});//空白时保留一个自由文本标签
@@ -52,6 +52,8 @@ export default function(state=initState,action){
       return setInputLabel(state,action);
   case DEL_CHECKBODY:
       return backspaceText(state,action);
+    case CHECKBODY_MUL:
+      return multipleComfirn(state,action);
     default:
       return res;
   }

+ 4 - 2
src/store/reducers/currentIll.js

@@ -1,9 +1,9 @@
 // 现病史
 import {SET_CURRENT,CURRENT_CONFIRM,INSERT_PROCESS,SET_CURRENT_DATA,SET_LABEL_MODULE,SETMAINCHECKBOX,
   CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
-  SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,SETCURRENTINPUT,DEL_CURRENT,CURRENT_TEXT_LABEL_NUMBER,REMOVE_CURR_ID} from '../types/currentIll';
+  SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,SETCURRENTINPUT,DEL_CURRENT,CURRENT_TEXT_LABEL_NUMBER,REMOVE_CURR_ID,CURRENT_MUL} from '../types/currentIll';
 import {confirm,insertProcess,setData,setCheckBox,setRadioValue,setNumberValue,changeLabelVal,clearCurrentIll,
-  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal,removeId} from '../actions/currentIll';
+  setTextModeValue,setModule,bigDataSymptom,setCheckText,insertLabelData,clearCurrentEdit,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal,removeId,multipleComfirn} from '../actions/currentIll';
 
 const initState = {
   moduleData:[],
@@ -71,6 +71,8 @@ export default function(state=initState,action){
       return backspaceText(state,action);
     case REMOVE_CURR_ID:
       return removeId(state,action);
+    case CURRENT_MUL://单列多选
+      return multipleComfirn(state,action);
     default:
       return state;
   }

+ 4 - 3
src/store/reducers/mainSuit.js

@@ -1,9 +1,9 @@
 import {COMM_SYMPTOMS,CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,
   SET_SEARCH,CLEAR_SEARCH,GET_BIGDATAPUSH,SET_MAINSUIT,MIX_CONFIRM,NUMBER_SELECT,
   RADIO_SELECT,COMM_CONFIRM,CHANGE_LABELVAL,SAVE_FREE,CLEAR_MAIN_SUIT,SET_DATA,
-  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN,CHANGE_LABELVAL_NUMBER,REMOVE_MAIN_ID} from '../types/mainSuit'
+  INSERT_SEARCH,MAIN_FOCUS_INDEX,SETTEXTMODEVALUE,SETMAINTEXT,MAINADDLABELITEM,SETMAININPUT,DEL_MAIN,CHANGE_LABELVAL_NUMBER,REMOVE_MAIN_ID,MAINSUIT_MUL} from '../types/mainSuit'
 import {getCommSymptoms,handleTailClick,insertMain,setSearch,getBigSymptom,setMainMoudle,confirm,
-  setNumberValue,setRadioValue,commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,changeEditClear,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal,removeId} from '../actions/mainSuit'
+  setNumberValue,setRadioValue,commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,setCheckText,changeEditClear,addLabelItem,setInputLabel,backspaceText,changeNumLabelVal,removeId,multipleComfirn} from '../actions/mainSuit'
 
 
 const initState = {
@@ -20,7 +20,6 @@ const initState = {
   focusIndex:'',
   mainIds:[], //选中的主症状和伴随的id(搜索去重)
   editClear:true,
-  mainSymptIds:[]//选中的主症状和伴随的id(移植到现病史)
 }
 
 export default function(state=initState,action){
@@ -85,6 +84,8 @@ export default function(state=initState,action){
       return backspaceText(state,action);
     case REMOVE_MAIN_ID:
       return removeId(state,action);
+    case MAINSUIT_MUL://单列多选
+      return multipleComfirn(state,action);
     default:
       return state;
   }

+ 4 - 2
src/store/reducers/otherHistory.js

@@ -1,6 +1,6 @@
 import {SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT,SETOTHERSEARCHDATA,
-  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,CHANGEOTHERTEXTLABEL_NUMBER} from '../types/otherHistory';
-import {confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText,changeNumLabelVal} from '../actions/otherHistory';
+  SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,CHANGEOTHERTEXTLABEL_NUMBER,OTHERHIS_MUL} from '../types/otherHistory';
+import {confirm,setRadioValue,setNumberValue,setCheckBoxValue,setCheckText,setSearchData,insertLabelData,clearOtherHistory,changeTextLabel,setOtherInput,setTextModeValue,addLabelItem,otherEditClear,backspaceText,changeNumLabelVal,multipleComfirn} from '../actions/otherHistory';
 
 const initState = {data:[],saveText:[],selecteds:[],focusIndex:'',editClear:true};/*mockData.OtherHis.moduleDetailDTOList;[
     mockData.radioData,
@@ -53,6 +53,8 @@ export default function(state=initState,action){//console.log(state)
         return otherEditClear(state,action);
     case DEL_OTHERHIS:
         return backspaceText(state,action);
+      case OTHERHIS_MUL:
+        return multipleComfirn(state,action);
     default:
       return res;
   }

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

@@ -14,4 +14,5 @@ export const CHECKBODY_CLEAR = 'clear_search_check_body';
 export const SETCHECKINPUT = 'set_check_body_input_label';
 export const DEL_CHECKBODY = 'DEL_CHECKBODY';//backspace
 export const CHANGECHECKTEXTLABEL_NUMBER = 'CHANGECHECKTEXTLABEL_NUMBER';//数字键盘
-export const CHECKCONFIRMSELECTED = 'spread_check_body_labels';
+export const CHECKCONFIRMSELECTED = 'spread_check_body_labels';
+export const CHECKBODY_MUL = 'CHECKBODY_MUL';//单列多选

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

@@ -23,4 +23,5 @@ export const SETCURRENTINPUT = 'SET_CURRENT_ILL_INPUT_LABEL';     //文本输入
 export const DEL_CURRENT = 'DEL_CURRENT';     //backspace删除
 export const CURRENT_TEXT_LABEL_NUMBER = 'CURRENT_TEXT_LABEL_NUMBER';     //数字键盘输入
 export const REMOVE_CURR_ID = 'REMOVE_CURR_ID';     //删除后移除id
+export const CURRENT_MUL = 'CURRENT_MUL';     //单列多选
 

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

@@ -24,3 +24,4 @@ export const SETMAININPUT = 'SET_MAIN_INPUT_LABEL';     //文本输入标签存
 export const DEL_MAIN = 'DEL_MAIN';     //删除标签
 export const CHANGE_LABELVAL_NUMBER = 'CHANGE_LABELVAL_NUMBER';     //数字键盘输入存值
 export const REMOVE_MAIN_ID = 'REMOVE_MAIN_ID';     //移除id
+export const MAINSUIT_MUL = 'MAINSUIT_MUL';     //单列多选

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

@@ -17,4 +17,5 @@ export const OTHERHIS_CLEAR = 'OTHERHIS_CLEAR';  //清空搜索值
 export const OTHERADDLABELITEM = 'other_add_label_item';    //带加号的标签复制
 export const OTHEREDICLEAR = 'OTHEREDICLEAR';    //文本框是否可以编辑
 export const DEL_OTHERHIS = 'DEL_OTHERHIS';    //backspace
-export const CHANGEOTHERTEXTLABEL_NUMBER = 'CHANGEOTHERTEXTLABEL_NUMBER';    //数字键盘
+export const CHANGEOTHERTEXTLABEL_NUMBER = 'CHANGEOTHERTEXTLABEL_NUMBER';    //数字键盘
+export const OTHERHIS_MUL = 'OTHERHIS_MUL';    //单列多选

+ 1 - 4
src/utils/tools.js

@@ -177,7 +177,6 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.checkBodySelecteds = baseList.checkBody.selecteds;      //主诉选中状态保存
     jsonData.addItems = baseList.homePage.addItems||{};
     jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
-    jsonData.mainSymptIds = baseList.mainSuit.mainSymptIds;      //主诉去重
     jsonData.currentIds = baseList.currentIll.symptomIds;      //现病史去重
     // console.log(jsonData,'结构化数据获取')
     return jsonData;
@@ -230,7 +229,7 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
  */
 const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清空所有的数据
     if(action == 'clear'){     //清空
-        store.dispatch({type: CLEAR_MAIN_SUIT,data:[],saveText:[],selecteds:[],editClear:true,mainIds:[],mainSymptIds:[]});
+        store.dispatch({type: CLEAR_MAIN_SUIT,data:[],saveText:[],selecteds:[],editClear:true,mainIds:[]});
         store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],selecteds:[],editClear:true,symptomIds:[]});
         store.dispatch({type: CLEAROTHERHISTORY,data:[],saveText:[],selecteds:[],editClear:true});
         store.dispatch({type: CLEARCHECKBODY,data:[],isEmpty:true,saveText:[],selecteds:[]});
@@ -264,7 +263,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
                     saveText:JSON.parse(dataJsonStr.chief),
                     mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
-                    mainSymptIds:dataJson.mainSymptIds?dataJson.mainSymptIds:[],
                 });
                 store.dispatch({
                     type: CLEAR_CURRENT_ILL,
@@ -318,7 +316,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
                     saveText:dataJsonStr[0].content ? JSON.parse(dataJsonStr[0].content) :[],
                     mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
-                    mainSymptIds:dataJson.mainSymptIds?dataJson.mainSymptIds:[],
                 });
                 store.dispatch({
                     type: CLEAR_CURRENT_ILL,