Explorar o código

时间单位、单列多选等组件代码简化

liucf %!s(int64=6) %!d(string=hai) anos
pai
achega
1671988aea

+ 11 - 11
src/common/components/NumberUnitPan/index.jsx

@@ -1,9 +1,12 @@
 import React,{Component} from 'react';
 import style from './index.less';
-import config from '@config/index.js';
 import Notify from '../Notify/index.js';
 import ReactDom from "react-dom";
-import backspace from '../../images/backspace.png'
+import backspace from '../../images/backspace.png';
+/**
+* 时间单位组件下拉(tagType=1,controlType=5)
+* 
+*/
 
 class NumberUnitPan extends Component{
   constructor(props){
@@ -15,18 +18,18 @@ class NumberUnitPan extends Component{
   }
   handleSelect(e){
     e.stopPropagation();
+    const {handleSelect,toClear} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     const preValue = this.state.value;
     if(+text==0 && !preValue){//第一位不能是0
       Notify.info("请输入正确时间");
       return false;
     }
-    const value = this.props.toClear?'':this.state.value;     //键盘输入替换已有的值
-    const onSelect = this.props.handleSelect;
+    const value = toClear?'':this.state.value;     //键盘输入替换已有的值
     this.setState({
       value: value+text
     });
-    onSelect&&onSelect({text:value+text,mark:true});//增加mark参数,清空删除不提示字数限制
+    handleSelect&&handleSelect({text:value+text,mark:true});//增加mark参数,清空删除不提示字数限制
   }
   handleClear(e){
     e.stopPropagation();
@@ -44,25 +47,23 @@ class NumberUnitPan extends Component{
   }
   handleBack(e){
     e.stopPropagation();
-    // const value = this.state.value;
-    const value = this.props.value;
+     const {handleSelect,value} = this.props;
     const len = value.length-1;
     if(len<0){
       return;
     }
-    const onSelect = this.props.handleSelect;
     const text = value.substring(0,len);
     this.setState({
       value:text
     });
-    onSelect&&onSelect({text,mark:false});
+    handleSelect&&handleSelect({text,mark:false});
   }
   getStyle(){
     const {left,top,show} = this.props;
     return {
       left:left?left+'px':'0',
       top:top?top+'px':'0',
-      display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
+      display:show?'table':'none'
     }
   }
   componentWillReceiveProps(nextProps){
@@ -74,7 +75,6 @@ class NumberUnitPan extends Component{
      }
   }
   render(){
-    // const select = this.handleSelect.bind(this);
     const domNode = document.getElementById('root');
     return ReactDom.createPortal( 
       <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={this.getStyle()}>

+ 12 - 18
src/common/components/TailInlineTag/index.jsx

@@ -1,22 +1,16 @@
 import React, { Component } from "react";
-import style from './index.less'
-import classNames from 'classnames';
+import style from './index.less';
 import more from '@common/images/addItem1.png';
 
 /**
-子模板组件,如添加病程变化
-
+* 子模板标签组件,如添加病程变化
+* 单纯展示组件,接收两个参数:
+* showText:展示文字;
+* handleTailClick:点击事件;
 **/
 
-class TailInlineTag extends Component {
-  constructor(props){
-    super(props);
-    this.handleClick = this.handleClick.bind(this);
-    this.state = {
-      boxEditable:false
-    }
-  }
-
+class TailInlineTag extends React.PureComponent {
+  
   handleClick(e){
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     const {handleTailClick,questionMapping,id,relationModule} = this.props;
@@ -24,11 +18,11 @@ class TailInlineTag extends Component {
   }
 
   render(){
-    const {showText,value,suffix} = this.props;
-    return <div className={style['tag-container']} onClick={(e)=>{this.handleClick(e)}}> 
-        <img src={more} style={{verticalAlign:'middle'}}/>  
-        <div className={`inline-box ${style['gray']}`} contentEditable="false" >
-          {value||showText?<span className={style['free-in']}>{value||showText}</span>:''}
+    const {showText} = this.props;
+    return <div className={style['tag-container']} onClick={this.handleClick.bind(this)}> 
+        <img src={more} />  
+        <div className={style['gray']} contentEditable="false" >
+          {showText?<span>{showText}</span>:''}
         </div>
       </div>
   }

+ 3 - 12
src/common/components/TailInlineTag/index.less

@@ -1,26 +1,17 @@
 @import "~@less/variables.less";
-.editable-tag,.clickable-tag{
-  border-bottom: 1px @border-color dashed;
-  display: inline-block;
-  padding: 0 3px 3px;
-}
 .tag-container{
   margin:5px 2px;
   display: inline-block;
   position: relative;
   cursor: pointer;
   line-height: 14px;
+  img{
+    vertical-align: middle;
+  }
   .gray{
     display: inline-block;
     color: @blue;
     border-bottom: none; 
     margin: 0 3px 0 2px;
   }
-}
-.pre-block{
-  display: inline-block;
-}
-.block{
-  display: inline-block;
-  min-width: 10px;
 }

+ 3 - 9
src/components/ChronicInfo/index.jsx

@@ -10,10 +10,9 @@ import allTableIcon from '@common/images/all-table.png';
 import add from '@common/images/add-result.png';
 import added from '@common/images/first.png';
 import checkIcon from '@common/images/check.png';
-import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn,Footer} from '@commonComp';
+import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn,Footer,Notify} from '@commonComp';
 import AssessResult from '@containers/AssessResult';
 import ScaleTable from '@containers/ScaleTable';
-import Notify from '@commonComp/Notify';
 import {deepClone} from '@utils/tools';
 import $ from 'jquery';
 
@@ -29,9 +28,6 @@ class ChronicInfo extends React.Component{
   constructor(props){
     super(props);
     this.state = {
-      show:true,
-      showInfo:false,
-      showOption:false,
       showAssess:false,      //评估弹窗
       infoId:null,  //静态知识
       formulaId:null, //计算公式
@@ -46,7 +42,6 @@ class ChronicInfo extends React.Component{
       formulaParam: {}, //量表计算公式计算入参
       showRecommend:false,      //显示推荐结果弹窗
       isRecommendConfirm:false,   //推荐结果确定
-      isFormulaConfirm:false,     //计算公式确定
     };
 
     this.showInfo = this.showInfo.bind(this);
@@ -91,7 +86,7 @@ class ChronicInfo extends React.Component{
   }
   handleListClick(item){//量表列表单项点击
     this.showTable(item,null);
-    this.close()
+    this.close();
   }
 
   showInfo(id){
@@ -234,7 +229,6 @@ class ChronicInfo extends React.Component{
   }
   confirmFormula(){//计算公式确定
     this.setState({
-      isFormulaConfirm:true,
       formulaId:null
     });
   }
@@ -523,7 +517,7 @@ class ChronicInfo extends React.Component{
                       top={20}
                       bottom={20}
                       width={820}>
-                <ScaleTable title={tableName} tableId={tableId} parentId={parentId} parentIndex={parentIndex}></ScaleTable>
+                <ScaleTable tableId={tableId} parentId={parentId} parentIndex={parentIndex}></ScaleTable>
               </ComplexModal>:''}
               {showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
                       title='管理和评估'

+ 9 - 23
src/components/CommonSymptom/index.jsx

@@ -2,17 +2,15 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import $ from 'jquery';
 import style from "./index.less";
-/****
+/**
+ * author: Liucf
  * 主诉常见症状下拉--修改为横铺多选(3.13)
  * 接收参数:
- * data: json数组
- * show:true/false
- * textKey: 选项文字字段名
- * idKey: 选项id字段名
- * type: text选项为纯文本,label选项为标签
- * onSelect: 选中事件
- *
- * ***/
+ * data: json数组,数据源;
+ * show: true/false,与私有属性hide共同控制组件的显示隐藏;
+ * onSelect: 确定事件;
+ * 
+ * **/
 
 class CommonSymptom extends Component{
   constructor(props){
@@ -27,19 +25,8 @@ class CommonSymptom extends Component{
     this.handleConfirm = this.handleConfirm.bind(this);
   }
   getClass(){
-    let name = style['text-list'];
     let isHide = this.props.show?'':style['hide'];
-    switch (this.props.type){
-      case 'text':
-        name = style['text-list'];
-        break;
-      case 'label':
-        name = style['label-list'];
-        break;
-      default:
-        name = style['text-list'];
-    }
-    return classNames(style['list'],name,isHide);
+    return classNames(style['list'],isHide);
   }
 
   handleSelect(e,item){
@@ -86,13 +73,12 @@ class CommonSymptom extends Component{
   }
 
   componentDidMount(){
-    const {hideSymptom} = this.props;
     $(document).click((e)=>{     
       let itemBox = $('#mainSuit')[0];
       let divBox = $('#symptBox')[0];
       let listBox = $('#listBox')[0];
       let operBox = $('#oper')[0];
-      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != operBox){
+      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != operBox && e.target != divBox){
         this.setState({
           hide:true,
           select:[],

+ 0 - 12
src/components/CommonSymptom/index.less

@@ -2,29 +2,18 @@
 .list{
   .pop;
   left: 85px;
-  // padding: 0 0 10px;
   padding: 5px;
   white-space: pre-wrap;
   .listBox{
-    // max-height: 370px;
-    // overflow-y: auto;
     max-width: 460px;
-    // overflow-x: auto;
-    // display: inline-block;
-    // margin-right: 5px;
   }
   li{
     width: 85px;
     line-height: 32px;
-    // border:1px #fff solid;
-    // padding: 0 20px 0 30px;
-    // padding:0 20px;
-    // white-space: nowrap;
     padding-left: 15px;
     margin-right: 5px;
     cursor: pointer;
     display: inline-block;
-    // text-align: center;
   }
   li:hover{
     border-color:#3B9ED0;
@@ -32,7 +21,6 @@
   .selected{
     .select-li;
     width: 85px;
-    // text-align: center;
   }
   .clear{
     .btnCom;

+ 22 - 86
src/components/Multiple/SlideItem/index.jsx

@@ -1,47 +1,35 @@
 import react from "react";
 import style from "./index.less";
-import $ from 'jquery';
 import classNames from 'classnames';
-import {handleEnter,isIE,filterArr,deepClone,filterDataArr} from '@utils/tools.js';
-import {Notify} from '@commonComp';
+import {deepClone} from '@utils/tools.js';
 import ReactDom from "react-dom";
-import config from '@config/index.js';
 /**
-  单列多选组件(tagtype=1,controlType=2)
-  2019-2-20 By_liucf
-  参数:
-  placeholder:标签名
-  value:标签选中的值
+  单列多选组件下拉 2019-2-20 By_liucf
+  接收参数:
   show:是否展示下拉
   data:下拉数据
-  type:标识哪一项数据(1-主诉,2-现病史,3-其他史,4-查体)
+  handleConfirm: 确定事件
+  left、top: 下拉框的位置,
+  seleData、seleId:选中的数据和id,回读标识选中状态用
 **/
 
-class Multiple extends react.Component{
+class SlideItem extends react.Component{
   constructor(props){
     super(props);
-    const {seleData,seleId} = deepClone(props.selecteds||[]);
+    const seleData = deepClone(props.seleData||[]);
+    const seleId = deepClone(props.seleId||[]);
     this.state={
-      editable:false,
-      timer:null,
-      labelVal:"",
       seleData:seleData||"",
-      seleId:seleId||[],
-      boxLeft:null,
-      boxTop:null
+      seleId:seleId||[]
     }
-    this.$div = React.createRef();
     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);
+    this.handleClick = this.handleClick.bind(this);
   }
 
   getListClass(){
-    let name = style['text-list'];
     let isHide = this.props.show?'':style['hide'];
-    return classNames(style['list'],name,isHide);
+    return classNames(style['list'],isHide);
   }
 
   getSeleStyle(id){
@@ -69,48 +57,6 @@ class Multiple extends react.Component{
     })
   }
 
-  onChange(e){
-    const {mainSaveText,ikey,type,handleLabelChange} = this.props;
-    const {labelVal,editable} = this.state;
-    let mainText = filterDataArr(mainSaveText);//主诉字数
-    if(editable){//避免IE中点击标签也会触发
-      let val = e.target.innerText || e.target.innerHTML;
-      if(+type==1){// 主诉字数达到上限时不允许输入
-        if(mainText.length >= config.limited){
-          if(val.length > labelVal.length){
-            e.target.innerText?(e.target.innerText = labelVal):(e.target.innerHTML = 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 || e.target.innerHTML;
-      if(!isIE()){
-        e.target.innerText?(e.target.innerText = ''):(e.target.innerHTML='');      //避免出现重复输入值
-      }
-      handleLabelChange && handleLabelChange({ikey,changeVal,type});
-    }
-    this.setState({
-      editable:false
-    });
-  }
-
   handleClear(e){
     e&&e.stopPropagation();
     this.setState({
@@ -119,32 +65,22 @@ class Multiple extends react.Component{
     })
   }
 
-  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);
-    }
-  }
   getStyle(){
     const {left,top,show} = this.props;
     return {
       left:left?left+'px':'0',
       top:top?top+'px':'0',
-      display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
+      display:show?'table':'none' 
     }
   }
+  handleClick(e){//确定
+    e&&e.stopPropagation();
+    const {handleConfirm} = this.props;
+    const params = this.state;
+    handleConfirm&&handleConfirm(params);
+  }
   render(){
-    const {placeholder,value,show,data} = this.props;
-    const {editable,boxTop,boxLeft} = this.state;
+    const {data} = this.props;
     const domNode = document.getElementById('root');
     return ReactDom.createPortal(
       <div className={this.getListClass()} style={this.getStyle()} contentEditable="false">
@@ -153,10 +89,10 @@ class Multiple extends react.Component{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getSeleStyle(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
         })}
           <li onClick={this.handleClear} className={style['mClear']}>清空选项</li>
-          <li onClick={this.handleComfirn} className={style['mConfirm']}>确定</li>
+          <li onClick={this.handleClick} className={style['mConfirm']}>确定</li>
         </ul>
       </div>,domNode)
   }
 }
 
-export default Multiple;
+export default SlideItem;

+ 0 - 19
src/components/Multiple/SlideItem/index.less

@@ -1,26 +1,7 @@
 @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;
-}
-.hide-tag{
-  padding: 0;
-  color: @text-color;
-  line-height: 22px;
-}
 .list{
   .pop;
   padding: 0 0 10px;

+ 13 - 42
src/components/Multiple/index.jsx

@@ -9,12 +9,12 @@ import config from '@config/index.js';
 /**
   单列多选组件(tagtype=1,controlType=2)
   2019-2-20 By_liucf
-  参数:
+  接收参数:
   placeholder:标签名
   value:标签选中的值
   show:是否展示下拉
   data:下拉数据
-  type:标识哪一项数据(1-主诉,2-现病史,3-其他史,4-查体
+  type:1-主诉,2-现病史,3-其他史,4-查体
 **/
 
 class Multiple extends react.Component{
@@ -35,10 +35,9 @@ class Multiple extends react.Component{
     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.handleConfirm = this.handleConfirm.bind(this);
   }
 
   getClass(){
@@ -60,14 +59,6 @@ class Multiple extends react.Component{
     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';
@@ -124,23 +115,6 @@ class Multiple extends react.Component{
     }
   }
 
-  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;
@@ -183,12 +157,11 @@ class Multiple extends react.Component{
     });
   }
 
-  handleClear(e){
-    e&&e.stopPropagation();
-    this.setState({
-      seleData:"",
-      seleId:[]
-    })
+  handleConfirm(obj){
+    const {handleConfirm,ikey,order,mainSaveText,value,handleHide,type} = this.props;
+    const params = Object.assign({},obj,{ikey,order,mainSaveText,value,type});
+    handleConfirm&&handleConfirm(params);
+    handleHide&&handleHide();
   }
 
   componentDidMount(){
@@ -200,7 +173,7 @@ class Multiple extends react.Component{
   }
   render(){
     const {placeholder,value,show,data,handleConfirm,ikey,order,mainSaveText,handleHide,type} = this.props;
-    const {editable,boxTop,boxLeft} = this.state;
+    const {editable,boxTop,boxLeft,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
       ref={this.$div}
@@ -216,12 +189,10 @@ class Multiple extends react.Component{
           left={boxLeft} 
           top={boxTop} 
           data={data} 
-          handleConfirm={handleConfirm} 
-          ikey={ikey}
-          order={order}
-          mainSaveText={mainSaveText}
-          handleHide={handleHide}
-          type={type}></SlideItem>
+          seleData={seleData} 
+          seleId={seleId} 
+          handleConfirm={(obj)=>this.handleConfirm(obj)}
+          ></SlideItem>
       </div>
     </div>
   }

+ 2 - 32
src/components/Multiple/index.less

@@ -2,9 +2,9 @@
 .container{
   display: inline-block;
 }
-.selected{
+/* .selected{
     .select-li;
-  }
+  } */
 .tag,.selected-tag{
   cursor: pointer;
   line-height: 20px;
@@ -20,34 +20,4 @@
   padding: 0;
   color: @text-color;
   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;
-
 }

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

@@ -25,7 +25,7 @@ class NumberUnitDrop extends Component{
       hasSelect:false,       //是否点过下拉键盘
       isClosed:false,
       value:props.value,
-      placeholderFlag:false,
+      // placeholderFlag:false,
       labelVal:'',
       boxLeft:0,
       boxTop:0,
@@ -184,7 +184,7 @@ class NumberUnitDrop extends Component{
 
   render(){
     const {placeholder,prefix,suffix,show,value,handleHide} = this.props;
-    const {numEditable,editable,hasSelect,placeholderFlag,boxLeft,boxTop} = this.state;
+    const {numEditable,editable,hasSelect,boxLeft,boxTop} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
                 onClick={this.handleNumClick}

+ 7 - 9
src/components/ScaleTable/index.jsx

@@ -1,16 +1,14 @@
 import React from 'react';
 import style from './index.less';
-// import mocks from '../../mock/chronicTable.js'
 import { Radio,CheckBtn ,Notify} from '@commonComp';
  import Information from '../Information';
- import {deepClone} from '@utils/tools.js';
  import {getFormulaResult} from '@store/async-actions/fetchModules.js';
 /**
-*量表 具体信息页面
-*title:量表标题/scaleName
-*data:量表内容:scaleName量表标题,calculate量表计算结果,group分组,
-*
-*
+*量表明细组件
+*scaleName: 量表标题;
+*data: store中存的所有量表;
+*tableId:表格id,根据id从data中拿到当前量表的内容;
+*formulaResult:store中存的量表计算结果;
 **/
 class ScaleTable extends React.Component{
   constructor(props){
@@ -237,7 +235,7 @@ class ScaleTable extends React.Component{
     let {selecteds,valueData,start,scaleResult1} = this.state;
     const {tableId,formulaResult} = this.props;
     const scaleResult = scaleResult1 || formulaResult&&formulaResult[tableId]; //量表计算结果
-    const datas = valueData&&valueData.group?valueData:'';//console.log(666,datas);
+    const datas = valueData&&valueData.group?valueData:'';
     let content =  datas&&datas.group&&datas.group.map((v,i)=>{
                 return <div className={style['group']}>
                   <p className={style['groupName']}>{v.groupName}</p>
@@ -297,7 +295,7 @@ class ScaleTable extends React.Component{
   }
 
   render(){
-    const {title,scaleInfo,tableId,formulaResult} = this.props;
+    const {scaleInfo,tableId,formulaResult} = this.props;
     const data = scaleInfo[tableId];
     let {selecteds,scaleResult1} = this.state;
     const scale = data && this.filterScale(data);

+ 1 - 10
src/config/index.js

@@ -18,7 +18,7 @@ export default {
     textLabel:'{"tagType":"8","id":"","name":""}',
     _textLabel:'{"tagType":"8","id":"","name":","}',//查体每个标签后面加逗号(1-29/改成中文逗号3-18)
     tagType:"8",
-    tongYId:7,      //主诉通用特征描述id
+    // tongYId:7,      //主诉通用特征描述id
     limited:30,    //主诉限制字数
     limitText:"已超过30字符(含标点),请修改主诉",    //主诉限制提示
     delayTime:500,      //延迟搜索的时间
@@ -27,15 +27,6 @@ export default {
     punctuationReg:/[^,,.。::"“??”;;、!!]/g,       //正则表达式,全局查找不是括号内标点的字符
     punReg:/[,,.。::"“??”;;、!!]+/g,
     currentText:"患者XX因XX诊断为(**),经XX治疗后,目前XX症状已缓解,仍有XX,各项指标情况:XX,辅助检查:XX。今来复诊,进一步治疗",
-    timeUnit:{
-      minute:"分",
-      hour:"小时",
-      day:"天",
-      week:"周",
-      month:"月",
-      year:"年",
-      age:"岁",
-    },
     chartDismen:'year',   //评估图表默认维度:近1年year,近6个月sixMonth,近1个月month,近1周week
     chartSymbols:['emptyCircle' , 'rect', 'arrow', 'triangle', 'diamond','circle', 'pin', 'roundRect'],
     chartColors:['#E84C47','#B947E8', '#47B0E8', '#4774E8', '#6C4EF9','#63DEC2', '#DDD81D','#EF592B'],

+ 2 - 2
src/containers/Multiple.js

@@ -1,12 +1,12 @@
 // 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 {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT} 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 {filterArr,filterDataArr,getLabelIndex,fullfillText,getIds} from '@utils/tools.js';
+import {filterDataArr,getLabelIndex} from '@utils/tools.js';
 import config from '@config/index.js';
 import {Notify} from '@commonComp';
 

+ 1 - 2
src/containers/NumberUnitDrop.js

@@ -7,7 +7,7 @@ import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD} from '@types/homePage
 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';
-import {filterArr,didPushParamChange,filterDataArr,getLabelIndex} from '@utils/tools.js';
+import {didPushParamChange,filterDataArr,getLabelIndex} from '@utils/tools.js';
 import {billing} from '@store/async-actions/pushMessage';
 import config from '@config/index.js';
 
@@ -54,7 +54,6 @@ function handleModuleDiff(dispatch,params){
     case 1:
       if(mark){//选中才限制,清空和回退无需验证
         let text = filterDataArr(mainSaveText);
-        // let text = filterArr(mainSaveText);
         const item = mainData[+ikey];
         const nextItem = mainData[+ikey+1];
         let lengths = text.length;