Browse Source

Merge remote-tracking branch 'origin/selectedCopy' into dev/new1

# Conflicts:
#	src/components/MultSpread/index.jsx
#	src/components/NumberDrop/index.jsx
#	src/components/RadioDrop/index.jsx
#	src/store/reducers/checkBody.js
#	src/store/reducers/homePage.js
#	src/store/types/checkBody.js
zhouna 5 years ago
parent
commit
d3e38b00ce
43 changed files with 473 additions and 103 deletions
  1. 17 4
      src/common/components/EditableSpan/index.jsx
  2. 5 0
      src/common/components/EditableSpan/index.less
  3. 19 6
      src/common/components/InlineTag/index.jsx
  4. 1 0
      src/common/components/ItemBox/index.jsx
  5. 15 0
      src/common/less/variables.less
  6. 2 2
      src/components/DiagnosticItem/index.jsx
  7. 20 8
      src/components/MultSpread/index.jsx
  8. 17 5
      src/components/Multiple/index.jsx
  9. 3 0
      src/components/Multiple/index.less
  10. 19 6
      src/components/NumberDrop/index.jsx
  11. 7 0
      src/components/NumberDrop/index.less
  12. 17 4
      src/components/NumberUnitDrop/index.jsx
  13. 19 6
      src/components/RadioDrop/index.jsx
  14. 3 0
      src/components/RadioDrop/index.less
  15. 18 5
      src/components/RadioInpDrop/index.jsx
  16. 17 5
      src/components/SpreadDrop/index.jsx
  17. 3 0
      src/components/SpreadDrop/index.less
  18. 9 2
      src/containers/EditableSpan.js
  19. 8 0
      src/containers/InlineTag.js
  20. 10 2
      src/containers/MultSpread.js
  21. 8 1
      src/containers/Multiple.js
  22. 8 1
      src/containers/NumberDrop.js
  23. 8 1
      src/containers/NumberUnitDrop.js
  24. 2 3
      src/containers/OperationContainer.js
  25. 9 2
      src/containers/RadioDrop.js
  26. 8 1
      src/containers/RadioInpDrop.js
  27. 8 1
      src/containers/SpreadDrop.js
  28. 34 3
      src/containers/eleType.js
  29. 58 15
      src/modules/HomePage/index.jsx
  30. 12 5
      src/store/actions/checkBody.js
  31. 25 1
      src/store/actions/homePage.js
  32. 4 2
      src/store/reducers/checkBody.js
  33. 4 2
      src/store/reducers/currentIll.js
  34. 7 2
      src/store/reducers/homePage.js
  35. 4 2
      src/store/reducers/mainSuit.js
  36. 4 2
      src/store/reducers/otherHistory.js
  37. 2 1
      src/store/types/checkBody.js
  38. 1 0
      src/store/types/currentIll.js
  39. 2 0
      src/store/types/homePage.js
  40. 1 0
      src/store/types/mainSuit.js
  41. 2 1
      src/store/types/otherHistory.js
  42. 5 1
      src/utils/tools.js
  43. 28 1
      src/utils/utils.js

+ 17 - 4
src/common/components/EditableSpan/index.jsx

@@ -38,6 +38,8 @@ class EditableSpan extends Component{
     this.handleKeydown = this.handleKeydown.bind(this);
     this.handleKeyup = this.handleKeyup.bind(this);
     this.handleClick = this.handleClick.bind(this);
+    this.selectStart = this.selectStart.bind(this);
+    this.selectEnd=this.selectEnd.bind(this);
   }
   handleFocus(e){
     e.stopPropagation();
@@ -179,7 +181,7 @@ class EditableSpan extends Component{
     }
   }
   handleKeyup(e){
-    const {boxMark,handleKeydown,removeId,handleClear,removeSpan,handleChange} = this.props;
+    const {boxMark,handleKeydown,removeId,handleClear,removeSpan,handleChange,select_end} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -246,7 +248,7 @@ class EditableSpan extends Component{
       }
     }
 
-    if(ev.keyCode==8){
+    if(ev.keyCode==8&&!select_end){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
       let preObj = $(this.$span.current).prev();
@@ -333,8 +335,16 @@ class EditableSpan extends Component{
       this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
   }
+  selectStart(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
+  selectEnd(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'end'});
+  }
   getClass(){
-    const {full,value,saveText,i,preIsExt,afterIsExt} = this.props;
+    const {full,value,saveText,i,preIsExt,afterIsExt,mouseSelect} = this.props;
     const br = preIsExt&&!afterIsExt;       //最后一个体征标签
     const preSelected = saveText[i-1];
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
@@ -342,11 +352,12 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
     if(br&&$span&&!$span.innerText){
       this.$span.current.innerHTML=' ';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6));
+    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6),selectedArea);
   }
 
   render() {
@@ -356,6 +367,8 @@ class EditableSpan extends Component{
                  onInput={this.onChange}
                  onFocus={this.handleFocus}
                  onBlur={this.handleBlur}
+                 onmousedown={this.selectStart}
+                 onmouseup={this.selectEnd}
                  onkeydown={this.handleKeydown}
                  onclick={this.handleClick}
                  onkeyup={this.handleKeyup}></span>;

+ 5 - 0
src/common/components/EditableSpan/index.less

@@ -6,11 +6,16 @@
   min-width: 10px;
   // line-height: 2;
   min-height: 16px;//火狐需要
+  height: 25px;
   line-height: 22px;
   vertical-align: unset;
   text-align: left;
   padding-right: 1px;//火狐左右移动需要
   font-weight: bold;
+  &.selected-area{
+  background: #338fff;
+  color: #fff!important;
+}
 }
 .editable-br{
   .editable-span;

+ 19 - 6
src/common/components/InlineTag/index.jsx

@@ -77,19 +77,20 @@ class InlineTag extends Component {
     }
   }
   getStyle(){
-    const {hideTag,placeholder,isExtBlue} = this.props;
+    const {hideTag,placeholder,isExtBlue,mouseSelect} = this.props;
     const value = this.state.value;
     const ext = isExtBlue?style['ext']:'';//是否为体征
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(hideTag){//是否是多标签组合
       if(value){
-        return classNames(style['selected-no-tag'], setFontColorSize());
+        return classNames(style['selected-no-tag'], setFontColorSize(),selectedArea);
       }
-      return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor');
+      return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor',selectedArea);
     }
     if(!value||value.trim()==placeholder){//灰色标签
-      return classNames(style['gray'],ext, setFontColorSize(2));
+      return classNames(style['gray'],ext, setFontColorSize(2),selectedArea);
     }
-    return classNames(style['selected-tag'],ext, setFontColorSize());
+    return classNames(style['selected-tag'],ext, setFontColorSize(),selectedArea);
   }
   moveEnd(obj) {
     if(window.getSelection){//ie11 10 9 ff safari
@@ -108,6 +109,16 @@ class InlineTag extends Component {
   handleFixClick(){
     this.moveEnd(this.$span.current);
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
     this.$span.current.innerHTML=this.props.placeholder;
@@ -117,7 +128,9 @@ class InlineTag extends Component {
   render(){
     const {prefix,suffix,isExtBlue} = this.props;
     return <div className={this.getStyle()}
-                onClick={this.handleFixClick}>
+                onClick={this.handleFixClick}
+                onMouseUp={this.handleMouseUp.bind(this)}
+                onMouseDown={this.handleMouseDown.bind(this)}>
                 <span className="prefixUnset">{prefix}</span>
                 <span className={`${style['free-in']} prefixUnset`}
                       contentEditable={true}

+ 1 - 0
src/common/components/ItemBox/index.jsx

@@ -30,6 +30,7 @@ class ItemBox extends Component {
   }
 
   handleClick(e){
+    e.stopPropagation();
     const {handleClick} = this.props;
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
   }

+ 15 - 0
src/common/less/variables.less

@@ -143,6 +143,13 @@
     /*width: 8px;*/
     display: inline-block;
   }
+  &.selected-area{
+     background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+   }
  }
 .selected-tag{
   position: relative;//发热
@@ -151,7 +158,15 @@
   font-weight: bold;
   /*padding: 0 3px 0;*/
   border-bottom: 1px @border-color solid;
+  &.selected-area{
+    background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+  }
 }
+
 .no-tag{
   display: inline-block;
   position: relative;

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

@@ -64,11 +64,11 @@ class DiagnosticItem extends Component{
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
-        const {item, isChronicMag} = this.props;
+        const {item, isChronicMag,mode} = this.props;
         item.type = diagType;
          const {  addDiagnostic, clearInput, hideSearch } = this.props;
 
-         if(item.type == 2) {
+         if(item.type == 2&&mode=='0') {      //文本模式不走慢病
              isChronicMag(item);
          }
          addDiagnostic&&addDiagnostic(item);

+ 20 - 8
src/components/MultSpread/index.jsx

@@ -48,13 +48,14 @@ class MultSpread extends Component{
     this.setBMIstate = this.setBMIstate.bind(this);
   }
   getClass(){
-    const {saveText,ikey,showAdd,isExtBlue} = this.props;
+    const {saveText,ikey,showAdd,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     //const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd,setFontColorSize(!!text?'2,6':isExtBlue?2:1));
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(isSelected,hasAdd,setFontColorSize(!!text?'2,6':isExtBlue?2:1),selectedArea);
   }
   saveDoms(it){
     const doms = this.state.numDoms;
@@ -138,7 +139,7 @@ class MultSpread extends Component{
   }
   getLabels(){
     const {data,ikey,showArr,copyId,boxMark,isExtBlue,saveText} = this.props;
-    const {wrBmi,bmi} = this.state;
+    const {wrBmi,bmi,isSelectAll} = this.state;
     const labelInx = tools.getLabelIndex(ikey);
     const text = !!(saveText&&saveText[+labelInx]);
     let show = false;
@@ -157,7 +158,6 @@ class MultSpread extends Component{
                             placeholder={it.name}
                             show={show}
                             value = {it.value}
-                            isSelectAll={text}
                             ikey={inx}
                             id={it.id}
                             patId = {copyId}
@@ -240,6 +240,16 @@ class MultSpread extends Component{
     });
     return list;
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //挂载完成保存有加号的项目数据
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
@@ -251,18 +261,20 @@ class MultSpread extends Component{
     }
   }
   getContClass(){
-    const {isImports,ikey,saveText,isExtBlue} = this.props;
+    const {isImports,ikey,saveText,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
-
-    return classNames(orgBorder,ext);
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(orgBorder,ext,selectedArea);
   }
   render(){
     const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
     return (<div className={this.getContClass()}
-                 style={{display:'inline-block'}}>
+                 style={{display:'inline-block'}}
+                 onMouseUp={this.handleMouseUp.bind(this)}
+                 onMouseDown={this.handleMouseDown.bind(this)}>
         {textPrefix?<span className="prefixUnset">{textPrefix}</span>:''}
         <div className={this.getClass()}>
           {this.getLabels()}

+ 17 - 5
src/components/Multiple/index.jsx

@@ -37,10 +37,11 @@ class Multiple extends react.Component{
   }
 
   getClass(){
-    const {show,value,hideTag,isImports,isExtBlue} = this.props;
+    const {show,value,hideTag,isImports,isExtBlue,mouseSelect} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const editBorder = this.state.editable?style['blue-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
@@ -48,14 +49,14 @@ class Multiple extends react.Component{
     }
     if(value){
       if(hideTag){
-          return classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:''))
+          return classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:''),selectedArea)
         }
-      return classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize());
+      return classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize(),selectedArea);
     }else{
       if(hideTag){
         return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
       }
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
     }
     // if(value){
       //   return hideTag?classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:'')):classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize());
@@ -160,7 +161,16 @@ class Multiple extends react.Component{
     handleConfirm&&handleConfirm(params);
     handleHide&&handleHide();
   }
-
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -179,6 +189,8 @@ class Multiple extends react.Component{
       onBlur={this.handleBlur}
       onInput={this.onChange}
       onKeyDown={handleEnter}
+      onMouseUp={this.handleMouseUp.bind(this)}
+      onMouseDown={this.handleMouseDown.bind(this)}
       contentEditable={editable}>{value||placeholder}</div>
       <div className={this.getListClass()} contentEditable="false">
         <SlideItem

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

@@ -8,6 +8,9 @@
   line-height: 20px;
   &.ext{
     color: @extBlue!important;
+    &.selected-area{
+      color: #fff!important;
+    }
   }
 }
 

+ 19 - 6
src/components/NumberDrop/index.jsx

@@ -198,24 +198,35 @@ class NumberDrop extends Component{
     handleHide&&handleHide();
   }
   getClasses(nospecial){         //整个标签是否有值的状态
-    const {hideTag,placeholder,isImports,isExtBlue,isSelectAll} = this.props;
+    const {hideTag,placeholder,isImports,isExtBlue,isSelectAll,mouseSelect} = this.props;
     const val = this.state.value;
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(val||isSelectAll?'2,6':isExtBlue?2:1));
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(val||isSelectAll?'2,6':isExtBlue?2:1),selectedArea);
   }
   getSpanClass(nospecial){       //将被替换的文字选中状态显示
-    const {isSelectAll,isExtBlue,show} = this.props;
+    const {isSelectAll,isExtBlue,show,mouseSelect} = this.props;
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const val = this.state.value;
     const cls = this.props.show?style['blued']:style['nol'];
-    // return cls+' '+setFontColorSize(nospecial?'':2);
-    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)))
+    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)),selectedArea);
   }
   stopBubble(e){
     e.stopPropagation();
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
     const spanWidth = window.getComputedStyle(this.$span.current).width;
@@ -252,7 +263,9 @@ class NumberDrop extends Component{
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
-                onClick={allClick?this.handleNumClick:null}>
+                onClick={allClick?this.handleNumClick:null}
+                onMouseUp={this.handleMouseUp.bind(this)}
+                onMouseDown={this.handleMouseDown.bind(this)}>
       <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}

+ 7 - 0
src/components/NumberDrop/index.less

@@ -4,6 +4,13 @@
   &.ext{
     color: @extBlue;
   }
+  &.selected-area{
+    background: #338fff;
+    color: #fff!important;
+    span{
+      color: #fff!important;
+    }
+  }
   line-height: 22px;
   .blued{
     background: @blue;

+ 17 - 4
src/components/NumberUnitDrop/index.jsx

@@ -68,25 +68,36 @@ class NumberUnitDrop extends Component{
     handleHide&&handleHide();
   }
 
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   getClasses(){         //整个标签是否有值的状态
-    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,mouseSelect} = this.props;
     const inpValue = this.state.value;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = value||inpValue?style['selected']:style['container'];
     const orgBorder = isImports&&!(value||inpValue)?style['orange-border']:'';
     const noTag = hideTag?style['no-tag']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
     if(value){
-      return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(isExtBlue?2:''));
+      return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(isExtBlue?2:''),selectedArea);
     }else{
       if(isExtBlue){
-        return classNames(isSelected,noTag,blueBorder,orgBorder, setFontColorSize(2),'prefixUnsetColor');
+        return classNames(isSelected,noTag,blueBorder,orgBorder, setFontColorSize(2),'prefixUnsetColor',selectedArea);
       }else{
-        return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(1));
+        return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(1),selectedArea);
       }
     }
   }
@@ -96,6 +107,8 @@ class NumberUnitDrop extends Component{
     const {editable,hasSelect} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
+                onMouseUp={this.handleMouseUp.bind(this)}
+                onMouseDown={this.handleMouseDown.bind(this)}
                 onClick={this.handleNumClick}>
       <span ref = {this.$pre} className="prefixUnset">{prefix?prefix+' ':prefix}</span>
       <span ref = {this.$span}

+ 19 - 6
src/components/RadioDrop/index.jsx

@@ -34,12 +34,13 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,show,isImports,isExtBlue,isSelectAll} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,mouseSelect} = this.props;
     const ext = isExtBlue?style['ext']:'';
     const orgBorder = isImports?style['orange-border']:'';      //橙色框高亮
     const editBorder = this.state.editable?style['blue-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
-      $(this.$cont.current).addClass(style['borderd']);
+      $(this.$cont.current).addClass(style['borderd'],);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
@@ -48,14 +49,14 @@ class RadioDrop extends Component{
     // }
     if(value){
       if(hideTag){
-        return classNames(style['no-tag'],ext,setFontColorSize(isExtBlue?2:''));
+        return classNames(style['no-tag'],ext,setFontColorSize(isExtBlue?2:''),selectedArea);
       }
-      return classNames(style['selected-tag'],ext,editBorder,setFontColorSize());
+      return classNames(style['selected-tag'],ext,editBorder,setFontColorSize(),selectedArea);
     }else{
       if(hideTag){
-        return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
+        return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor',)
       }
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
     }
   }
   handleSelect(item){
@@ -148,6 +149,16 @@ class RadioDrop extends Component{
     })
     handleDbclick&&handleDbclick({id:patId||id});
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   render(){
     const {data,placeholder,show,value,hideTag,boxMark} = this.props;
     const {tmpDom} = this.state
@@ -161,6 +172,8 @@ class RadioDrop extends Component{
            onDoubleClick={hideTag?null:this.handledbClick}
            onFocus={(e)=>{e.stopPropagation()}}
            onClick={(e)=>this.handleShow(e,true)}
+           onMouseUp={this.handleMouseUp.bind(this)}
+           onMouseDown={this.handleMouseDown.bind(this)}
            onKeyDown={handleEnter}>
         {value||placeholder}
       </div>

+ 3 - 0
src/components/RadioDrop/index.less

@@ -17,6 +17,9 @@
   color:@placeholder-color;
   &.ext{
     color: @extBlue!important;
+    &.selected-area{
+    color: #fff!important;
+  }
   }
 }
 .tag:before{

+ 18 - 5
src/components/RadioInpDrop/index.jsx

@@ -30,9 +30,10 @@ class RadioInpDrop extends Component{
     this.handleInnerBlur = this.handleInnerBlur.bind(this);
   }
   getClass(){
-    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,mouseSelect} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';    //查体,是否橙色框高亮
     const ext = isExtBlue?style['ext']:'';      //查体,是否是体征
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -40,14 +41,14 @@ class RadioInpDrop extends Component{
     }
     if(value){
       if(hideTag){
-        return classNames(style['no-tag'],ext,setFontColorSize());
+        return classNames(style['no-tag'],ext,setFontColorSize(),selectedArea);
       }
-      return classNames(style['selected-tag'],setFontColorSize());
+      return classNames(style['selected-tag'],setFontColorSize(),selectedArea);
     }else{
       if(hideTag){
-        return classNames(style['no-tag'],ext,setFontColorSize(2));
+        return classNames(style['no-tag'],ext,setFontColorSize(2),selectedArea);
       }
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6),selectedArea);
     }
   }
   handleSelect(item){
@@ -95,6 +96,16 @@ class RadioInpDrop extends Component{
     });
     handleSaveInp({values:vals,ikey,boxMark,mainSaveText});
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   parseInputDom(){
     const {mainSaveText,ikey,boxMark} = this.props;
     const {texts} = this.state;
@@ -122,6 +133,8 @@ class RadioInpDrop extends Component{
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
            onClick={(e)=>this.handleShow(e)}
+           onMouseUp={this.handleMouseUp.bind(this)}
+           onMouseDown={this.handleMouseDown.bind(this)}
            onKeyDown={handleEnter}>
         {vals?this.parseInputDom():<span className='inheritStyle'>{placeholder}</span>}
       </div>

+ 17 - 5
src/components/SpreadDrop/index.jsx

@@ -341,9 +341,10 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
-    const {isImports,show,value,isExtBlue,defaulted} = this.props;
+    const {isImports,show,value,isExtBlue,defaulted,mouseSelect} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const ext = isExtBlue?style['ext']:'';
     let showDefaulted = this.ifDefault();
     if(show){
@@ -352,18 +353,28 @@ class SpreadDrop extends Component{
       $(this.$div.current).removeClass(style['borderd']);
     }
     if(value||(showDefaulted&&value===undefined&&defaulted)){
-      return classNames(style['selected-tag'],blueBorder,setFontColorSize());
+      return classNames(style['selected-tag'],blueBorder,setFontColorSize(),selectedArea);
     }
     if(!value){
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(2,6),selectedArea);
     }
-    return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
+    return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
   }
   ifDefault(){
     const {type,otherDefault,curDefault,showVal} = this.props;
     const showDefaulted = ((type=='2'&&curDefault)||(type=='3'&&otherDefault))&&showVal;
     return showDefaulted;
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -381,7 +392,6 @@ class SpreadDrop extends Component{
     }
     const {editable} = this.state;
     return  <div className={style['container']}
-              /*onFocus={(e)=>e.stopPropagation()}*/
               onBlur={(e)=>e.stopPropagation()}
               onInput={(e)=>e.stopPropagation()}>
         <div
@@ -393,6 +403,8 @@ class SpreadDrop extends Component{
         onBlur={this.handleBlur}
         onInput={this.onChange}
         onkeydown={handleEnter}
+        onMouseUp={this.handleMouseUp.bind(this)}
+        onMouseDown={this.handleMouseDown.bind(this)}
         >{showV||placeholder}</div>
           <ListItems parDiv={this.$list} defaulted={showDefaulted&&defaulted} pos={pos} data={data} order={order} left={left} boxMark={type} tagType={tagType}
              show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>

+ 3 - 0
src/components/SpreadDrop/index.less

@@ -8,5 +8,8 @@
   }
   .ext {
     color: @extBlue !important;
+    &.selected-area{
+      color: #fff!important;
+    }
   }
 }

+ 9 - 2
src/containers/EditableSpan.js

@@ -7,14 +7,15 @@ import {SET_CURRENT_SEARCH,CURRENT_CLEAR,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,DEL_
 import {getSearch} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
 import {didPushParamChange,storageLocal} from '@utils/tools';
-import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD} from '@types/homePage';
+import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD,SET_SELECTED_AREA} from '@types/homePage';
 import config from '@config/index';
 
 function mapStateToProps(state){//console.log(state)
   return {
     mainSaveText:state.mainSuit.saveText,
     isRead:state.homePage.isRead,
-    data:state.currentIll.data
+    data:state.currentIll.data,
+    select_end:state.homePage.select_end,
   }
 }
 
@@ -292,6 +293,12 @@ function mapDispatchToProps(dispatch,state) {
       dispatch({
         type:MAIN_REMOVE_SPAN
       })
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 8 - 0
src/containers/InlineTag.js

@@ -6,10 +6,12 @@ import {SETCURRENTINPUT,CURRENT_TEXT_LABEL} from '@types/currentIll';
 import {SETCHECKINPUT} from "@types/checkBody";
 import InlineTag from "../common/components/InlineTag";
 import {getLabelIndex} from '@utils/tools.js';
+import {SET_SELECTED_AREA} from '@types/homePage';
 
 function mapStateToProps(state){
   return {
     mainSaveText:state.mainSuit.saveText,
+    select_start:state.homePage.select_start,
   }
 }
 
@@ -36,6 +38,12 @@ function mapDispatchToProps(dispatch,store){
         subIndex:inner
       })
     },
+    setSelectArea(data){
+    dispatch({
+      type:SET_SELECTED_AREA,
+      data
+    })
+  }
   }
 }
 

+ 10 - 2
src/containers/MultSpread.js

@@ -5,10 +5,12 @@ import {OTHERADDLABELITEM} from '@types/otherHistory';
 import {ADDLABELITEM} from '@types/checkBody';
 import {MAINADDLABELITEM} from '@store/types/mainSuit';
 import {CURRENTADDLABELITEM} from '@store/types/currentIll';
-import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD} from '@store/types/homePage';
+import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD,SET_SELECTED_AREA} from '@store/types/homePage';
 
 function mapStateToProps(state){
-  return {}
+  return {
+    select_start:state.homePage.select_start,
+  }
 }
 
 const typeObj={
@@ -75,6 +77,12 @@ function mapDispatchToProps(dispatch){
         clickType:'单击',
         num:1
       });
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 8 - 1
src/containers/Multiple.js

@@ -1,7 +1,7 @@
 // import React from "react";
 import {connect} from "react-redux";
 import Multiple from "@components/Multiple";
-import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT} from '@store/types/homePage.js';
+import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,SET_SELECTED_AREA} 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';
@@ -136,6 +136,7 @@ function handleLabel(dispatch,obj){
 function mapStateToProps(state){
   return{
     mainSaveText:state.mainSuit.saveText,
+    select_start:state.homePage.select_start,
   }
 }
 
@@ -181,6 +182,12 @@ function mapDispatchToProps(dispatch){
           dispatch(billing('',params.ikey.substr(0,1)));
         }
       },500);
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 8 - 1
src/containers/NumberDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import NumberDrop from "@components/NumberDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETNUMBER4} from '@types/checkBody';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} from '@types/homePage';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA} from '@types/homePage';
 import {NUMBER_SELECT} from '@store/types/mainSuit';
 import {CURRENT_NUMBER} from '@store/types/currentIll';
 import {billing} from '@store/async-actions/pushMessage';
@@ -14,6 +14,7 @@ import config from '@config/index';
 function mapStateToProps(state){
   return {
     mainSaveText:state.mainSuit.saveText,
+    select_start:state.homePage.select_start,
   }
 }
 //查体数字键盘选中
@@ -102,6 +103,12 @@ function mapDispatchToProps(dispatch,store){
         type: RESET
       });*/
     },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
+    }
   }
 }
 

+ 8 - 1
src/containers/NumberUnitDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import NumberUnitDrop from "@components/NumberUnitDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETNUMBER4,CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} from '@types/homePage.js';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
 import {NUMBER_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {CURRENT_NUMBER,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
@@ -15,6 +15,7 @@ function mapStateToProps(state){
   return {
     mainSaveText:state.mainSuit.saveText,
     mainData:state.mainSuit.data,
+    select_start:state.homePage.select_start,
   }
 }
 //查体数字键盘选中
@@ -195,6 +196,12 @@ function mapDispatchToProps(dispatch,store){
       dispatch({
         type: ISREAD
       });
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 2 - 3
src/containers/OperationContainer.js

@@ -83,16 +83,15 @@ function mapDispatchToProps(dispatch) {
                '4':RECOVER_TAG_CHECK
             };
             const deledTags = localStorage.getItem('deletedTags')?JSON.parse(localStorage.getItem('deletedTags')):[];
-            const deledSelects = localStorage.getItem('deletedSelects')?JSON.parse(localStorage.getItem('deletedSelects')):[];
             if(deledTags.length===0){
               Notify.info('暂无标签可还原');
               return ;
             }
             const arr = deledTags[0].delIndex.split("-");
+            const item = deledTags[0];
             dispatch({
               type:maps[arr[0]],
-              data:deledTags[0],
-              select:deledSelects[0],
+              data:item.tagType?item:item.tags,
               index:arr[1]
             });
           dispatch({

+ 9 - 2
src/containers/RadioDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import RadioDrop from "@components/RadioDrop";
 import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETSELECTED4,CHANGECHECKTEXTLABEL} from '@types/checkBody';
-import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD} from '@types/homePage.js';
+import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
 import {RADIO_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {CURRENT_RADIO,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
@@ -16,7 +16,8 @@ function mapStateToProps(state){
   return {
     mainSaveText:state.mainSuit.saveText,
     readDefault:typeConfig.readConfig[1],
-    confDefault:typeConfig.typeConfig[1]
+    confDefault:typeConfig.typeConfig[1],
+    select_start:state.homePage.select_start,
   }
 }
 
@@ -151,6 +152,12 @@ function mapDispatchToProps(dispatch,store){
       dispatch({
         type: RESET
       });
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 8 - 1
src/containers/RadioInpDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import RadioInpDrop from "@components/RadioInpDrop";
 import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,SET_OT_RADIO_INPUT_VAL} from '@types/otherHistory';
 import {SETSELECTED4,SET_CK_RADIO_INPUT_VAL} from '@types/checkBody';
-import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD} from '@types/homePage.js';
+import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
 import {RADIO_SELECT,SET_MS_RADIO_INPUT_VAL} from '@store/types/mainSuit.js';
 import {CURRENT_RADIO,SET_RADIO_INPUT_VALUE} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
@@ -14,6 +14,7 @@ import config from '@config/index.js';
 function mapStateToProps(state){
   return {
     mainSaveText:state.mainSuit.saveText,
+    select_start:state.homePage.select_start,
   }
 }
 
@@ -161,6 +162,12 @@ function mapDispatchToProps(dispatch,store){
       dispatch({
         type: RESET
       });
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 8 - 1
src/containers/SpreadDrop.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 
 import SpreadDrop from '@components/SpreadDrop';
 import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SETOTHERCHECKBOX,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
-import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD} from '@store/types/homePage.js';
+import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@store/types/homePage.js';
 import {getModules as fetchModules} from '@store/async-actions/fetchModules.js';
 import {getCommSymptomPush} from '@store/async-actions/mainSuit.js'
 import {GET_BIGDATAPUSH,MIX_CONFIRM,COMM_CONFIRM,CHANGE_LABELVAL} from '@store/types/mainSuit';
@@ -26,6 +26,7 @@ function mapStateToProps(state) {//console.log(state);
     windowWidth:homePage.windowWidth,
     otherDefault:+curOtherMode===1,
     curDefault:+curMode===1,
+    select_start:homePage.select_start,
   }
 }
 
@@ -544,6 +545,12 @@ function mapDispatchToProps(dispatch,store){
     },
     handleLabelChange(obj){//标签内输入
       handleLabel(dispatch,obj);
+    },
+    setSelectArea(data){
+      dispatch({
+        type:SET_SELECTED_AREA,
+        data
+      })
     }
   }
 }

+ 34 - 3
src/containers/eleType.js

@@ -9,6 +9,8 @@ import InlineTag from '@containers/InlineTag';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
 import Multiple from '@containers/Multiple';
 
+import store from '@store';
+
 /******
  * 下拉类型分发
  * 先根据tagType分为几个大类填写单
@@ -31,6 +33,8 @@ export function singleRadio(params){
       const list = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
       return <RadioDrop data={custom&&custom.length?[...custom,...list]:list}
                         placeholder={data.name}
+                        mouseSelect={params.mouseSelected}
+                        i={i}
                         isGeneray={+data.selFlag===1}
                         isExtBlue={+data.specFlag===4?true:false}
                         show={showArr&&showArr[showInx]}
@@ -44,6 +48,9 @@ export function singleRadio(params){
       const dataList = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
       return <Multiple data={dataList}
                      ikey={showInx}
+                     mouseSelect={params.mouseSelected}
+                     i={i}
+                     boxMark={boxMark}
                      placeholder={data.name}
                      value={data.value}
                      copyType={data.copyType}
@@ -57,11 +64,13 @@ export function singleRadio(params){
                      textSuffix={data.labelSuffix}
                      id={data.id}></Multiple>
     case 3:
-      return <EditableSpan {...params} value={data.value||data.value==''?data.value:data.name} update={Math.random()}/>;
+      return <EditableSpan {...params} mouseSelect={params.mouseSelected} value={data.value||data.value==''?data.value:data.name} update={Math.random()}/>;
     case 5://带单位数字键盘
       return <NumberUnitDrop prefix={data.labelPrefix}
                          suffix={data.labelSuffix}
                          placeholder={data.name}
+                         mouseSelect={params.mouseSelected}
+                         i={i}
                          isExtBlue={data.specFlag===4?true:false}
                          formulaCode={data.formulaCode}
                          boxMark={boxMark}
@@ -75,6 +84,8 @@ export function singleRadio(params){
       return <InlineTag prefix={data.labelPrefix}
                         suffix={data.labelSuffix}
                         boxMark={boxMark}
+                        mouseSelect={params.mouseSelected}
+                        i={i}
                         placeholder={data.name}
                         isExtBlue={data.specFlag===4?true:false}
                         value={data.value}
@@ -89,6 +100,8 @@ export function singleRadio(params){
                          suffix={data.labelSuffix}
                          min={min}
                          max={max}
+                         mouseSelect={params.mouseSelected}
+                         i={i}
                          formulaCode={data.formulaCode}
                          isExtBlue={data.specFlag===4?true:false}
                          placeholder={data.name}
@@ -104,6 +117,8 @@ export function singleRadio(params){
       return <RadioInpDrop data={data.questionDetailList}
                            vals={data.vals}
                         placeholder={data.name}
+                        mouseSelect={params.mouseSelected}
+                        i={i}
                         isExtBlue={data.specFlag===4?true:false}
                         show={showArr&&showArr[showInx]}
                         value = {data.value}
@@ -125,6 +140,8 @@ function multLabels(params){
                      showAdd = {+data.showAdd===1}
                      copyId={data.id}
                      fullData = {data}
+                     mouseSelect={params.mouseSelected}
+                     i={i}
                      isExtBlue={data.specFlag===4?true:false}
                      showArr={showArr||{}}
                      update={Math.random()}
@@ -151,7 +168,10 @@ function multCheckLabels(params,tagType){
   }
   return <SpreadDrop data={data.questionMapping}
                      pos={data.pos}
+                     i={i}
+                     boxMark={boxMark}
                      ikey={showInx}
+                     mouseSelect={params.mouseSelected}
                      defaulted={defaulted}
                      showVal={showVal}
                      setHighter={setHighter}
@@ -170,7 +190,18 @@ function multCheckLabels(params,tagType){
 }
 
 export default function(params){
-  
+  const {homePage} = store.getState();
+  const {select_start,select_end,select_boxMark}=homePage;
+  const {i,boxMark}=params;
+  let start = select_start;
+  let end = select_end;
+  if(start>end){    //从后往前选
+    start = select_end;
+    end = select_start;
+  }
+  const isInArea = start!==undefined&&end!==undefined&&(start<i||start==i)&&(end>i||end==i);
+  params.mouseSelected = select_boxMark===boxMark&&isInArea;
+  //console.log(select_start,select_end,select_boxMark,isInArea,boxMark)
   const data = params.item;
   switch (+data.tagType) {
     case 1:
@@ -194,7 +225,7 @@ export default function(params){
         }
       }
       // 删除后value为空,应展示空而不是name
-      return <EditableSpan {...params} noSearch={data.noSearch} value={data.value||data.value==''?data.value:data.name} full={data.full||isLast}/>;
+      return <EditableSpan {...params} mouseSelect={params.mouseSelected} noSearch={data.noSearch} value={data.value||data.value==''?data.value:data.name} full={data.full||isLast}/>;
     case 11://推送类型
       return multCheckLabels(params,data.tagType);
     default:

+ 58 - 15
src/modules/HomePage/index.jsx

@@ -6,12 +6,12 @@ import BodyContainer from "@components/BodyContainer";
 import {ConfirmModal} from '@commonComp';
 import store from '@store';
 
-import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG,SETPRE,SETREADDITEMS} from '@store/types/homePage.js';
+import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG,SETPRE,SETREADDITEMS,RESET_SELECT_TAG} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
-import {CLEAR_SEARCH} from '@types/mainSuit';
-import {CURRENT_CLEAR} from '@types/currentIll';
-import {OTHERHIS_CLEAR} from '@types/otherHistory';
-import {CHECKBODY_CLEAR} from '@types/checkBody';
+import {CLEAR_SEARCH,DELETE_MAIN_SELECTED_TAGS} from '@types/mainSuit';
+import {CURRENT_CLEAR,DELETE_CURRENT_SELECTED_TAGS} from '@types/currentIll';
+import {OTHERHIS_CLEAR,DELETE_OTHER_SELECTED_TAGS} from '@types/otherHistory';
+import {CHECKBODY_CLEAR,DELETE_CHECK_SELECTED_TAGS} from '@types/checkBody';
 import style from './index.less';
 import {getInitModules,getChronic,getSystemConfig} from '@store/async-actions/homePage.js';
 import {getPreMsg} from '@store/async-actions/patInfo.js';
@@ -19,6 +19,7 @@ import {tellPred} from '@store/async-actions/preIcss.js';
 import { getUrlArgObject,parseNameVal,pushAllDataList } from "@utils/tools";
 import $ from 'jquery';
 import loading from '@common/images/loading.gif';
+
 class HomePage extends Component {
     constructor() {
         super();
@@ -56,13 +57,14 @@ class HomePage extends Component {
             } 
         })
     }
-    hidePops(e){
-        const {hideAllDrop,handleClear } = this.props;
-    if(!this.isBar){    //onMousrdown的目标为滚动条时,标签填写单不关闭
-      hideAllDrop();        //隐藏填写单
-      handleClear&&handleClear();       //清空搜索结果
-    }
-
+    hidePops(){
+        const {hideAllDrop,handleClear,resetSelect } = this.props;
+        //重置选中范围
+        resetSelect();
+        if(!this.isBar){    //onMousrdown的目标为滚动条时,标签填写单不关闭
+          hideAllDrop();        //隐藏填写单
+          handleClear&&handleClear();       //清空搜索结果
+        }
     }
   setElem(e){
       //onMousedown的目标为滚动条时,标签填写单不关闭
@@ -71,11 +73,18 @@ class HomePage extends Component {
     }else{
       this.isBar = false;
     }
+  }
+  handleKeyUp(e){
+      const {deleteLabels} = this.props;
+    //删除选中标签
+    if(e.keyCode==8||e.keyCode==46){      //backspace或del都可删除
+      deleteLabels();
+    }
   }
     render() {
         const {flag,showPre,noReferRecord,referRecord} = this.props;
         return <div className={style['home-page']}
-                    onClick={this.hidePops} onmousedown={this.setElem.bind(this)}>
+                    onClick={this.hidePops} onmousedown={this.setElem.bind(this)} onkeyup={this.handleKeyUp.bind(this)}>
             <BannerContainer />
             {/* <InfoTitle /> */}
             <BodyContainer></BodyContainer>
@@ -95,6 +104,12 @@ const mapStateToProps = function (state) {
     showPre:state.homePage.showPre
   }
 };
+const boxMap = {
+  '1':DELETE_MAIN_SELECTED_TAGS,
+  '2':DELETE_CURRENT_SELECTED_TAGS,
+  '3':DELETE_OTHER_SELECTED_TAGS,
+  '4':DELETE_CHECK_SELECTED_TAGS
+};
 const mapDispatchToProps = function (dispatch) {
   return {
     clearAddItems(){
@@ -103,7 +118,9 @@ const mapDispatchToProps = function (dispatch) {
       })
     },
     referRecord(){
-        pushAllDataList(1,'push',store.getState().homePage.preData,'preIcss');
+        const state = store.getState();
+        const {homePage} = state;
+        pushAllDataList(1,'push',homePage.preData,'preIcss');
         dispatch(billing())
         dispatch({type:SETPRE,show:false});
         tellPred()
@@ -145,7 +162,33 @@ const mapDispatchToProps = function (dispatch) {
 
             }
           });
-        }
+        },
+      deleteLabels(){   //选中删除标签
+        const state = store.getState();
+        const {homePage} = state;
+        const start = homePage.select_start;
+        const end = homePage.select_end;
+        const boxMark = homePage.select_boxMark;
+        if(!boxMark)return;
+        dispatch({
+          type:boxMap[boxMark],
+          start,
+          end,
+          boxMark
+        });
+        //删除后清楚选中标记
+        //setTimeout(()=>{
+          dispatch({
+            type:RESET_SELECT_TAG
+          });
+        //})
+
+      },
+      resetSelect(){
+          dispatch({
+            type:RESET_SELECT_TAG
+          })
+      }
     }
 };
 

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

@@ -317,12 +317,19 @@ export function setImportCheckbodyLabel(state,action) {
 export function recoveTag(state,action) {
   let res = Object.assign({},state);
   let arr = [...res.data];
-  arr.splice(action.index,0,action.data);
+  const isArr= !action.data.tagType;
+  if(!isArr){
+    arr.splice(action.index,0,action.data);
+  }else{
+    arr.splice(action.index,0,...action.data);
+  }
   const dataArr = checkFullfillText(arr);
-  let nextLabel = dataArr.newArr[(+action.index)+1];
-  //展开收起状态
-  if(nextLabel.tagType==8){
-    nextLabel.showInCheck=action.data.showInCheck;
+  if(!isArr){
+    let nextLabel = dataArr.newArr[(+action.index)+1];
+    //展开收起状态
+    if(nextLabel.tagType==8){
+      nextLabel.showInCheck=action.data.showInCheck;
+    }
   }
   res.data = dataArr.newArr;
   res.saveText = dataArr.saveText;

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

@@ -114,4 +114,28 @@ export const getAssistList = (state,action)=>{
   let res = Object.assign({},state);
   res.assistList = action.data
   return res;
-};
+};
+
+export const setSelectArea = (state,action)=>{
+  let res = Object.assign({},state);
+  const {i,dir,boxMark} = action.data;
+  if(dir==='start'){      //重新开始选取区域,结束位置清空
+    delete res['select_end'];
+  }
+  res['select_'+dir]=i;
+  res.select_boxMark=boxMark;
+  if(res.select_start===res.select_end){      //起点和终点一样,则不选中
+    delete res.select_boxMark;
+    delete res.select_start;
+    delete res.select_end;
+  }
+  return res;
+}
+
+export const resetSelectArea = (state,action)=>{
+  let res = Object.assign({},state);
+  delete res.select_boxMark;
+  delete res.select_start;
+  delete res.select_end;
+  return res;
+}

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

@@ -1,11 +1,11 @@
 import {RECOVER_TAG_CHECK,SET,SETNUMBER4,SETSELECTED4,SETCHECKBOX,ADDLABELITEM,SETCHECKTEXT,SETSEARCHDATA,
   SELECTSEARCHDATA,CHANGECHECKTEXTLABEL,CLEARCHECKBODY,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,
   SETCHECKINPUT,DEL_CHECKBODY,CHECKCONFIRMSELECTED,
-  CHECKBODY_MUL,DEL_CHECKBODY_LABLE,SET_CK_RADIO_INPUT_VAL,SET_IMPORT_CHECKBODY_LABEL,PRESET,REPUSH_CHECK_LABELS} from '../types/checkBody.js';
+  CHECKBODY_MUL,DEL_CHECKBODY_LABLE,SET_CK_RADIO_INPUT_VAL,SET_IMPORT_CHECKBODY_LABEL,PRESET,REPUSH_CHECK_LABELS,DELETE_CHECK_SELECTED_TAGS} from '../types/checkBody.js';
 import {recoveTag,set,setCheckBoxValue,
   setSearchData,insertLabelData,changeLabelVal,clearCheckBody,backspaceText
   ,confirm,multipleComfirn,delSingleLable,setImportCheckbodyLabel,preSetCheckbody,reflashLabels} from '../actions/checkBody.js';
-import {setRadioInputValue,setRadioValue,setNumberValue,setCheckText,addLabelItem,setInputLabel} from '@utils/utils';
+import {setRadioInputValue,setRadioValue,setNumberValue,setCheckText,addLabelItem,setInputLabel,deleteSelectedLabels} from '@utils/utils';
 import config from '@config/index.js';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
@@ -67,6 +67,8 @@ export default function(state=initState,action){
       return setImportCheckbodyLabel(state,action);
     case RECOVER_TAG_CHECK:
       return recoveTag(state,action);
+    case DELETE_CHECK_SELECTED_TAGS:
+      return deleteSelectedLabels(state,action);
     case REPUSH_CHECK_LABELS:
       return reflashLabels(state,action);
     default:

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

@@ -2,11 +2,11 @@
 import {RECOVER_TAG_CURRENT,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,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,SAVE_CURR_FREE} from '../types/currentIll';
+  SETCURRENTINPUT,DEL_CURRENT,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,SAVE_CURR_FREE,DELETE_CURRENT_SELECTED_TAGS} from '../types/currentIll';
 import {confirm,insertProcess,setData,setCheckBox,changeLabelVal,clearCurrentIll,
   setTextModeValue,setModule,bigDataSymptom,insertLabelData,clearCurrentEdit,
   backspaceText,removeId,multipleComfirn,delSingleLable,fillChronicModule} from '../actions/currentIll';
-import {recoveTag,setRadioInputValue,setRadioValue,setNumberValue,setCheckText,addLabelItem,setInputLabel} from '@utils/utils';
+import {recoveTag,setRadioInputValue,setRadioValue,setNumberValue,setCheckText,addLabelItem,setInputLabel,deleteSelectedLabels} from '@utils/utils';
 
 const initState = {
   moduleData:[],
@@ -86,6 +86,8 @@ export default function(state=initState,action){
       return res;
     case RECOVER_TAG_CURRENT:
       return recoveTag(state,action);
+    case DELETE_CURRENT_SELECTED_TAGS:
+      return deleteSelectedLabels(state,action);
     default:
       return state;
   }

+ 7 - 2
src/store/reducers/homePage.js

@@ -1,6 +1,7 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,SETPREDATA,
-  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG,SETPRE} from '../types/homePage.js';
-import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList} from '../actions/homePage.js';
+  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,
+  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA} from '../types/homePage.js';
+import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList,setSelectArea,resetSelectArea} from '../actions/homePage.js';
 
 const initState = {
   totalHide:false,
@@ -83,6 +84,10 @@ export default function (state=initState,action) {
       res.preData = action.preData;
       res.item = action.item;
       return res;
+    case SET_SELECTED_AREA:
+      return setSelectArea(state,action);
+    case RESET_SELECT_TAG:
+      return resetSelectArea(state,action);
     default:
       return res;
   }

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

@@ -2,12 +2,12 @@ import {RECOVER_TAG_MAIN,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,
-  REMOVE_MAIN_ID,MAINSUIT_MUL,DEL_MAIN_LABLE,SET_FEATURE,SET_MS_RADIO_INPUT_VAL,SAVE_CHRONIC,MAIN_REMOVE_SPAN,SET_ADD_SEARCH,CLEAR_ADD_SEARCH} from '../types/mainSuit'
+  REMOVE_MAIN_ID,MAINSUIT_MUL,DEL_MAIN_LABLE,SET_FEATURE,SET_MS_RADIO_INPUT_VAL,SAVE_CHRONIC,MAIN_REMOVE_SPAN,SET_ADD_SEARCH,CLEAR_ADD_SEARCH,DELETE_MAIN_SELECTED_TAGS} from '../types/mainSuit'
 import {getCommSymptoms,handleTailClick,insertMain,setSearch,getBigSymptom,setMainMoudle,confirm,
   commConfirm,changeLabelVal,saveFreeVal,clearMainSuit,insertSearch,setTextModeValue,
   backspaceText,removeId,multipleComfirn,delSingleLable,
   getSymptomFeature} from '../actions/mainSuit'
-import {recoveTag,setRadioInputValue,setNumberValue,setRadioValue,setCheckText,addLabelItem,setInputLabel} from '@utils/utils';
+import {recoveTag,setRadioInputValue,setNumberValue,setRadioValue,setCheckText,addLabelItem,setInputLabel,deleteSelectedLabels} from '@utils/utils';
 
 const initState = {
   showDrop:false,
@@ -125,6 +125,8 @@ export default function(state=initState,action){
         res.addSearchData = [];
       }
       return res;
+    case DELETE_MAIN_SELECTED_TAGS:
+      return deleteSelectedLabels(state,action);
     default:
       return state;
   }

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

@@ -1,10 +1,10 @@
 import {RECOVER_TAG_OTHER,SETDATA,CONFIRMSELECTED,SETRADIO,SETNUMBER,SETOTHERCHECKBOX,SETOTHERTEXT,SETOTHERSEARCHDATA,
   SELECTOTHERSEARCHDATA,CLEAROTHERHISTORY,CHANGEOTHERTEXTLABEL,SETOTHERINPUT,SETTEXTMODEVALUE,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,
-  OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,OTHERHIS_MUL,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE,SET_OT_RADIO_INPUT_VAL} from '../types/otherHistory';
+  OTHERADDLABELITEM,OTHEREDICLEAR,DEL_OTHERHIS,OTHERHIS_MUL,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE,SET_OT_RADIO_INPUT_VAL,DELETE_OTHER_SELECTED_TAGS} from '../types/otherHistory';
 import {confirm,setCheckBoxValue,setSearchData,insertLabelData,clearOtherHistory,
   changeTextLabel,setNumberValue,setTextModeValue,otherEditClear,backspaceText,multipleComfirn,
   removeId,delSingleLable} from '../actions/otherHistory';
-import {recoveTag,setRadioInputValue,setRadioValue,addLabelItem,setCheckText,setInputLabel} from '@utils/utils';
+import {recoveTag,setRadioInputValue,setRadioValue,addLabelItem,setCheckText,setInputLabel,deleteSelectedLabels} from '@utils/utils';
 import config from '@config/index';
 
 const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
@@ -75,6 +75,8 @@ export default function(state=initState,action){//console.log(state)
       return setRadioInputValue(state,action);
     case RECOVER_TAG_OTHER:
       return recoveTag(state,action);
+    case DELETE_OTHER_SELECTED_TAGS:
+      return deleteSelectedLabels(state,action);
     default:
       return res;
   }

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

@@ -20,4 +20,5 @@ export const SET_CK_RADIO_INPUT_VAL = 'SET_CK_RADIO_INPUT_VAL';
 export const SET_IMPORT_CHECKBODY_LABEL='SET_IMPORT_CHECKBODY_LABEL';
 export const PRESET = 'PRESET_CHECKBODY_DATA';
 export const RECOVER_TAG_CHECK = 'RECOVER_TAG_CHECK';     //恢复已删除标签
-export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体
+export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体
+export const DELETE_CHECK_SELECTED_TAGS='DELETE_CHECK_SELECTED_TAGS';

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

@@ -29,4 +29,5 @@ export const CURRENT_CHRONIC = 'CURRENT_CHRONIC';//慢病填充模板
 export const SAVE_CURR_FREE = 'SAVE_CURR_FREE';//自由输入
 export const CHANGE_CURRENT_LABELVAL = 'CHANGE_CURRENT_LABELVAL';//双击标签输入改变值
 export const RECOVER_TAG_CURRENT = 'RECOVER_TAG_CURRENT';     //恢复已删除标签
+export const DELETE_CURRENT_SELECTED_TAGS='DELETE_CURRENT_SELECTED_TAGS';
 

+ 2 - 0
src/store/types/homePage.js

@@ -18,3 +18,5 @@ export const SETALLMODULES = 'SETALLMODULES';    //储存所有模板数据
 export const SETSYSTEMCONFIG = 'SETSYSTEMCONFIG';   //设置配置数据
 export const SETPRE = 'SETPRE';   //设置预问诊引用弹窗
 export const SETPREDATA = 'SETPREDATA';   //设置预问诊数据暂存
+export const RESET_SELECT_TAG='RESET_SELECT_TAG';   //重置选中标签的各标记
+export const SET_SELECTED_AREA='SET_SELECTED_AREA';

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

@@ -32,3 +32,4 @@ export const RECOVER_TAG_MAIN = 'RECOVER_TAG_MAIN';   //恢复已删除标签
 export const MAIN_REMOVE_SPAN = 'MAIN_REMOVE_SPAN';   //删除最后一个空span
 export const SET_ADD_SEARCH = 'SET_ADD_SEARCH';   //添加症状-搜索
 export const CLEAR_ADD_SEARCH = 'CLEAR_ADD_SEARCH';   //添加症状-搜索
+export const DELETE_MAIN_SELECTED_TAGS='DELETE_MAIN_SELECTED_TAGS';

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

@@ -21,4 +21,5 @@ export const OTHERHIS_MUL = 'OTHERHIS_MUL';    //单列多选
 export const REMOVE_OTHER_ID = 'REMOVE_OTHER_ID';    
 export const DEL_OTHERHIS_LABLE = 'DEL_OTHERHIS_LABLE';
 export const SET_OT_RADIO_INPUT_VAL = 'SET_OT_RADIO_INPUT_VAL';
-export const RECOVER_TAG_OTHER = 'RECOVER_TAG_OTHER'; //恢复已删除标签
+export const RECOVER_TAG_OTHER = 'RECOVER_TAG_OTHER'; //恢复已删除标签
+export const DELETE_OTHER_SELECTED_TAGS='DELETE_OTHER_SELECTED_TAGS';

+ 5 - 1
src/utils/tools.js

@@ -1303,7 +1303,11 @@ function resetTagtype(data){
 //记录最近3次被删除的标签
 function handleLocalDelTag(mark,index,tag){
   const deledTag =  localStorage.getItem('deletedTags')?JSON.parse(localStorage.getItem('deletedTags')):[];
-  deledTag.unshift(Object.assign({},tag,{delIndex:mark+'-'+index}));
+  if(tag.tagType){
+    deledTag.unshift(Object.assign({},tag,{delIndex:mark+'-'+index}));
+  }else{
+    deledTag.unshift({tags:tag,delIndex:mark+'-'+index});
+  }
   deledTag.length = deledTag.length>config.recoverTagNum?config.recoverTagNum:deledTag.length;
   localStorage.setItem('deletedTags',JSON.stringify(deledTag));
 }

+ 28 - 1
src/utils/utils.js

@@ -1,5 +1,5 @@
 import config from '@config/index.js';
-import {getLabelIndex,checkFullfillText,fullfillText,shiftLocalDelTag,getEMRParams,storageLocal} from './tools';
+import {getLabelIndex,checkFullfillText,fullfillText,shiftLocalDelTag,getEMRParams,storageLocal,handleLocalDelTag} from './tools';
 import { json } from "./ajax";
 /**
  * 各类标签统一的处理函数
@@ -234,4 +234,31 @@ export async function getBigPush(type,symData,save){
     storageLocal.set('emrParam',savePm);      //推送数据存储,用作推送前对比是否有变,有变才推送
   }
   return json(api.push,params);
+}
+
+//删除选中标签
+export function deleteSelectedLabels(state,action){
+  let res = Object.assign({}, state);
+  const {start,end,boxMark} = action;
+  let n = Math.abs(end-start)+1;
+  const arr = res.data;
+  const startIsText = arr[start].tagType=='8';
+  const endIsText = arr[end].tagType=='8';
+  if(!startIsText&&!endIsText){
+    n=Math.abs(end-start)+2;
+  }
+  if(start>end){      //从后往前选中
+    const temp = arr.splice(end,n);
+    handleLocalDelTag(boxMark,end,temp);
+  }else if(start===end){
+    return res;
+  }else{
+    const temp = arr.splice(start,n);
+    handleLocalDelTag(boxMark,start,temp);
+  }
+  const newObj = boxMark=='4'?checkFullfillText(arr):fullfillText(arr);
+  res.data = newObj.newArr;
+  res.saveText = newObj.saveText;
+  res.update = Math.random();
+  return res;
 }