瀏覽代碼

删除多余代码

zhouna 6 年之前
父節點
當前提交
65bf32b0ce
共有 1 個文件被更改,包括 2 次插入17 次删除
  1. 2 17
      src/components/OtherHistory/index.jsx

+ 2 - 17
src/components/OtherHistory/index.jsx

@@ -4,7 +4,6 @@ import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
 import {filterDataArr,getPageCoordinate,windowEventHandler} from '@utils/tools'
 import $ from 'jquery';
-import style from './index.less';
 
 class OtherHistory extends Component{
   constructor(props){
@@ -21,11 +20,6 @@ class OtherHistory extends Component{
     this.handleSearchSelect = this.handleSearchSelect.bind(this);
     this.getData = this.getData.bind(this);
   }
-  toggleEditable(){
-    this.setState({
-      boxEditable:!this.state.boxEditable
-    })
-  }
   handleSearchSelect(obj){
     const {questionId,name} = obj;
     const {fetchModules,focusTextIndex,span,searchInEnd} = this.props;
@@ -39,17 +33,10 @@ class OtherHistory extends Component{
     });
     return list;
   }
-  /*handleInput(e){   console.log(221)  //主诉未填无法输入
-    const {type,hasMain} = this.props;
-    if(+type===0&&!hasMain){
-      e.target.innerText='';
-    }
-  }*/
   getData(){
     //第一次聚焦其他史时,主诉有数据则获取最近一次其他史记录(没有的话显示初始模板),主诉无数据则显示提示;其他时间其他史模板数据不调接口
     const {hasMain,type,setInitData,isEmpty} = this.props;
 
-    console.log(this.props)
     //无主诉提示在EditableSpan里
     //智能模式有主诉或者文本模式获取最近历史
     if((+type===0&&hasMain&&isEmpty!=false)||+type===1){
@@ -83,10 +70,8 @@ class OtherHistory extends Component{
     },$("#addScrollEvent")[0])
   }
   render(){
-    const {data,hasMain,searchData,totalHide,showArr,focusTextIndex,isRead,type,fetchPushInfos,handleInput,saveText,editClear} = this.props;
-    const {boxTop,boxLeft,boxMark} = this.state;
-    const hasData = saveText.join("")||data.length>0;
-    const show = showArr&&showArr[boxMark+focusTextIndex+'0'];
+    const {hasMain,searchData,totalHide,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
+    const {boxTop,boxLeft} = this.state;
     if(+type===1){      //文本模式
       return <Textarea title='其他史' boxMark='3'
                        isRead={isRead}