Forráskód Böngészése

搜索下拉位置修改

zhouna 5 éve
szülő
commit
7e1148d502

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

@@ -148,7 +148,7 @@ class EditableSpan extends Component{
 
   handleKeydown(e){
     const ev = e||window.event;
-    const {i,setSearchLocation} = this.props;
+    const {i} = this.props;
     const target = ev.target||ev.srcElement;
     let innerVal = target.innerText || target.innerHTML,ele,boxTop;
     //禁止回车事件
@@ -187,13 +187,9 @@ class EditableSpan extends Component{
         obj.focus();
       }
     }
-    // 注释掉,放开会影响删除
-    // ele = document.activeElement;
-    // boxTop = target.innerText?getPageCoordinate(e).boxTop:$(ele).offset().top+30;
-    // setSearchLocation(boxTop,ele.offsetLeft)     //搜索框的位置动态获取
   }  
   handleKeyup(e){
-    const {boxMark,handleKeydown,i,value,removeId,handleClear,delSingleLable,setSearchLocation} = this.props;
+    const {boxMark,handleKeydown,removeId,handleClear} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -269,9 +265,6 @@ class EditableSpan extends Component{
           })
         }
       }
-      ele = document.activeElement;
-      boxTop = target.innerText?getPageCoordinate(e).boxTop:$(ele).offset().top+30;
-      setSearchLocation(boxTop,ele.offsetLeft)     //搜索框的位置动态获取
     }
     
   }
@@ -321,8 +314,8 @@ class EditableSpan extends Component{
                       onInput={this.onChange}
                       onFocus={this.handleFocus}
                       onBlur={this.handleBlur}
-                      onkeydown={this.handleKeydown}
-                      onkeyup={this.handleKeyup}></span>;
+                      onKeyDown={this.handleKeydown}
+                      onKeyUp={this.handleKeyup}></span>;
 
   }
 }

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

@@ -16,8 +16,6 @@ class CheckBody extends Component{
       boxMark:'4',
       boxLeft:0,
       boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
       showAll:false
     };
     this.handleClick = this.handleClick.bind(this);
@@ -32,7 +30,6 @@ class CheckBody extends Component{
         showAll:next.defaultShowAll
       })
     }
-    this.setState({boxLeft:next.boxLeft})
   }
   isThereHigh(arr,ids){
     if(!arr||!ids){
@@ -77,26 +74,15 @@ class CheckBody extends Component{
       return ;
     }
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
-        leftL = ele.offsetLeft+90
-      }
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL);
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll;
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
   handleSearchSelect(obj){
    const {questionId,name} = obj;
@@ -122,8 +108,8 @@ class CheckBody extends Component{
     });
   }
   render(){
-    const {searchData,totalHide,data,boxLeft,boxTop,saveText} = this.props;
-
+    const {searchData,totalHide,data,saveText} = this.props;
+    const {boxLeft,boxTop} = this.state;
     return <ItemBox title='查体' handleClick={this.handleClick}>
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}

+ 10 - 29
src/components/CurrentIll/index.jsx

@@ -14,8 +14,6 @@ class CurrentIll extends Component{
       forbidInput:false,
       boxLeft:0,
       boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
       setDataTimer:null
     }
     this.toggleEditable = this.toggleEditable.bind(this);
@@ -25,10 +23,6 @@ class CurrentIll extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
-  }
 
   toggleEditable(){
     this.setState({
@@ -76,29 +70,16 @@ class CurrentIll extends Component{
     ev.target.innerText?(ev.target.innerText = ""):(ev.target.innerHTML="");
   }
 
-  handleClick(e){//让搜索框跟随鼠标点击移动
-    // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
-    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const {getSearchLocation} = this.props;
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
-        leftL = ele.offsetLeft+90
-      }
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+  handleClick(e){
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
 
   handleSearchSelect(obj){
@@ -135,8 +116,8 @@ class CurrentIll extends Component{
   }
 
   render(){
-    const {fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data,boxLeft,boxTop} = this.props;
-    const {forbidInput} = this.state;
+    const {fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
+    const {forbidInput,boxLeft,boxTop} = this.state;
     const searchFlag = searchData.length > 0 ? true : false;
     if(+type===1){      //文本模式
       return <Textarea  title='现病史' boxMark='2'

+ 10 - 26
src/components/MainSuit/index.jsx

@@ -22,8 +22,6 @@ class MainSuit extends Component{
       inpText:'',
       clearTimer:null,
       overFlag:false,
-      tmpScroll:0,
-      tmpTop:0,
     };
     this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
@@ -33,9 +31,6 @@ class MainSuit extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
-  }
   toggleEditable(){
     this.setState({
       boxEditable:!this.state.boxEditable
@@ -134,28 +129,17 @@ class MainSuit extends Component{
   }
 
 
-  handleClick(e){//让搜索框跟随鼠标点击移动
+  handleClick(e){
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
-    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const {getSearchLocation} = this.props;
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    let num = this.props.datas.length == 0?0:60
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      leftL = ele.offsetLeft+num
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
 
   handleChange(e){
@@ -265,8 +249,8 @@ class MainSuit extends Component{
 
 
   render(){
-    const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop} = this.props;
-    const {symptom} = this.state;
+    const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide} = this.props;
+    const {symptom,boxLeft,boxTop} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
     const boxTop1 = datas.length>0?boxTop:45;

+ 15 - 3
src/components/OtherHistory/index.jsx

@@ -11,6 +11,8 @@ class OtherHistory extends Component{
     this.state = {
       boxMark:'3',
       editable:true,
+      boxLeft:0,
+      boxTop:0
     };
     this.handleClick = this.handleClick.bind(this);
     this.handleSearchSelect = this.handleSearchSelect.bind(this);
@@ -39,13 +41,23 @@ class OtherHistory extends Component{
       setInitData();
     }
   }
-  handleClick(e){//让搜索框跟随鼠标点击移动
+  handleClick(e){
     //e.stopPropagation();
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
+    this.setState({
+      boxLeft:boxLeft,
+      boxTop:boxTop
+    });
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
     this.getData();
   }
   render(){
-    const {hasMain,searchData,totalHide,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
+    const {hasMain,totalHide,searchData,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
+    const {boxLeft,boxTop} = this.state;
     if(+type===1){      //文本模式
       return <Textarea title='其他史' boxMark='3'
                        isRead={isRead}
@@ -58,7 +70,7 @@ class OtherHistory extends Component{
     return  <div>
       <ItemBox title='其他史' isRead={isRead} handleClick={this.handleClick}>
         {this.getLabels()}
-        {searchData && searchData.length>0?<SearchDrop data={searchData} show={true} onSelect={this.handleSearchSelect}></SearchDrop>:''}
+        {searchData && searchData.length>0?<SearchDrop data={searchData} show={true} top={boxTop} left={boxLeft} onSelect={this.handleSearchSelect}></SearchDrop>:''}
       </ItemBox>
     </div>
   }

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

@@ -39,7 +39,13 @@ class SearchDrop extends Component{
     }
     return classNames(style['list'],name,isHide);
   }
-
+  getStyle(){
+    const {left,top} = this.props;
+    return {
+      left:left?left+'px':'',
+      top:top?top+'px':''
+    }
+  }
   handleSelect(e,item){
     // onClick事件换成onmouseup--点击清除后谷歌下搜索结果点击不上去的情况
     e.stopPropagation();
@@ -51,7 +57,7 @@ class SearchDrop extends Component{
     const {mainEmpty} = this.props;
     let litext = '';
     if(mainEmpty){
-      return <div className={this.getClass()} contenteditable="false" id="searchBox">
+      return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
           <ul>
             {this.props.data&&this.props.data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
@@ -61,7 +67,7 @@ class SearchDrop extends Component{
         </div>
     }else{
       
-      return <div className={this.getClass()} contenteditable="false" id="searchBox">
+      return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
           <ul>
             {this.props.data&&this.props.data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';

+ 1 - 11
src/containers/CheckBody.js

@@ -1,7 +1,7 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
+import {HIDE,RESET,SETDROPSHOW,ISREAD,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
 import {filterDataArr} from '@utils/tools.js';
 
@@ -22,8 +22,6 @@ function mapStateToProps(state){
     span:checkBody.span,
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
     selecteds:checkBody.selecteds,       //普通多选选中状态
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
     importLabel:checkBody.importLabel,    //需高亮的标签id
   }
 }
@@ -53,14 +51,6 @@ function mapDispatchToProps(dispatch){
         }
       });
     },
-    getSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:0
-      })
-    }
   }
 }
 

+ 3 - 15
src/containers/CurrentIll.js

@@ -4,11 +4,10 @@ import CurrentIll from '@components/CurrentIll';
 import {INSERT_PROCESS,SET_CURRENT_DATA,SETTEXTMODEVALUE,SET_LABEL_MODULE,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,SAVE_CURR_FREE} from '@store/types/currentIll';
 import {pushMessage} from '../store/async-actions/pushContainer';
 import {getModules} from '../store/async-actions/fetchModules.js';
-import {SETDROPSHOW} from '@types/homePage.js';
-import {HIDE,RESET,CLICKCOUNT,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
+import {HIDE,RESET,CLICKCOUNT,ISREAD,SETDROPSHOW} from '@store/types/homePage';
 import {billing} from '@store/async-actions/pushMessage';
-import {getModule} from '@store/async-actions/fetchModules.js';
-import {didPushParamChange} from '@utils/tools.js';
+import {getModule} from '@store/async-actions/fetchModules';
+import {didPushParamChange} from '@utils/tools';
 import {Notify} from '@commonComp';
 
 function mapStateToProps(state) {
@@ -36,8 +35,6 @@ function mapStateToProps(state) {
         symptomIds:currentIll.symptomIds,//症状id,去重用
         isRead:homePage.isRead,
         fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
-        boxTop:homePage.boxTop,
-        boxLeft:homePage.boxLeft,
         allModules:homePage.allModules,
         // isChronic:!!diagnosticList.chronicMagItem,
         isChronic:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
@@ -130,15 +127,6 @@ function mapDispatchToProps(dispatch) {
               editClear:bool
             })
         },
-        
-      getSearchLocation(top,left){
-        dispatch({
-          type:SEARCH_DROP_LOCATION,
-          top:top,
-          left:left,
-          dis:0
-        })
-      },
       freeText(item){//自由输入
         dispatch({
           type: SAVE_CURR_FREE,

+ 4 - 13
src/containers/EditableSpan.js

@@ -4,11 +4,11 @@ import {SETCHECKTEXT,SETSEARCHDATA,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,DEL_CHECKBO
 import {SET_SEARCH,MAIN_FOCUS_INDEX,CLEAR_SEARCH,SETMAINTEXT,DEL_MAIN,REMOVE_MAIN_ID,DEL_MAIN_LABLE} from '@types/mainSuit';
 import {SETOTHERTEXT,SETOTHERSEARCHDATA,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,DEL_OTHERHIS,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE} from '@types/otherHistory';
 import {SET_CURRENT_SEARCH,CURRENT_CLEAR,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,DEL_CURRENT,REMOVE_CURR_ID,DEL_CURRENT_LABLE} from '@types/currentIll';
-import {getSearch} from '@store/async-actions/fetchModules.js';
+import {getSearch} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
-import {didPushParamChange,storageLocal} from '@utils/tools.js';
-import {SETTEXTFOCUS,SEARCH_DROP_LOCATION,RESET,SETDROPSHOW,ISREAD} from '@types/homePage';
-import config from '@config/index.js';
+import {didPushParamChange,storageLocal} from '@utils/tools';
+import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD} from '@types/homePage';
+import config from '@config/index';
 
 function mapStateToProps(state){//console.log(state)
   return {
@@ -82,16 +82,7 @@ function otherHisSearch(obj) {
 }
 
 function mapDispatchToProps(dispatch,state) {
-  const dis = JSON.stringify(state.saveText) == '[]'?0:60;
   return {
-    setSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:dis
-      })
-    },
     setFocusIndex(obj){//将选中值插入相应位置
 
       const {i,boxMark} = obj;

+ 1 - 22
src/containers/MainSuit.js

@@ -2,7 +2,7 @@ import React from 'react';
 import { connect } from 'react-redux';
 import MainSuit from '@components/MainSuit';
 import {CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,CLEAR_SEARCH,SET_SEARCH,SAVE_FREE,SET_DATA,INSERT_SEARCH,SETTEXTMODEVALUE,SET_FEATURE,SAVE_CHRONIC,SHOW_HISTORY_BOX,HIDE_HISTORY_BOX} from '@store/types/mainSuit';
-import {RESET,CLICKCOUNT,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
+import {RESET,CLICKCOUNT,ISREAD,MODI_LOADING} from '@store/types/homePage.js';
 import {getCommSymptoms,getCommSymptomPush} from '@store/async-actions/mainSuit.js'
 import {CLEAR_DIAGNOSE} from '@store/types/diagnosticList';
 import {getSearch,getFeature,autoFillModules} from '@store/async-actions/fetchModules';
@@ -34,8 +34,6 @@ function mapStateToProps(state) {//console.log(state)
     mainIds:mainSuit.mainIds,//选中症状的id,搜索去重用
     isRead:homePage.isRead,
     commSymHide:homePage.commSymHide,
-    boxTop:homePage.boxTop,
-    boxLeft:homePage.boxLeft,
     currentData:state.currentIll.data,
     allModules:homePage.allModules,
     chronicDesease:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
@@ -164,25 +162,6 @@ function mapDispatchToProps(dispatch) {
             type:CLEAR_DIAGNOSE,
           })
       },
-      getSearchLocation(top,left){
-        dispatch({
-          type:SEARCH_DROP_LOCATION,
-          top:top,
-          left:left,
-          dis:0
-        })
-      },
-      /*async getSymptomFeature(item){
-        const it = item&&item.trim();
-        const symptomFeature = await getFeature(it);
-        if(symptomFeature.data.code==0){
-          const data = symptomFeature.data.data;
-          dispatch({
-            type:SET_FEATURE,
-            data:data
-          })
-        }
-      },*/
       getSymptomFeature(data){
         dispatch({
           type:SET_FEATURE,

+ 1 - 11
src/containers/OtherHistory.js

@@ -2,7 +2,7 @@ import React from 'react';
 import {connect} from 'react-redux';
 import OtherHistory from "../components/OtherHistory";
 import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
-import {HIDE,RESET,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
+import {HIDE,RESET,ISREAD} from '@store/types/homePage.js';
 import {getModule,setOtherHisModule} from '@store/async-actions/fetchModules.js';
 import {billing} from '@store/async-actions/pushMessage';
 import {didPushParamChange,filterDataArr,fullfillText} from '@utils/tools.js';
@@ -27,8 +27,6 @@ function mapStateToProps(state){
     selecteds:otherHistory.selecteds,       //普通多选选中状态
     editClear:otherHistory.editClear,       //编辑状态
     isRead:state.homePage.isRead,
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
   }
 }
 
@@ -82,14 +80,6 @@ function mapDispatchToProps(dispatch,store){
         bool:bool
       })
     },
-    /*getSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:0
-      })
-    }*/
   }
 }
 

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

@@ -100,14 +100,7 @@ export const setLabelToEdit = (state,action)=>{
   res.update=Math.random();
   return res;
 };
-//编辑状态
-export const searchDropLocation = (state,action)=>{
-  let res = Object.assign({},state);
-  // console.log(action,'dir')
-  res.boxTop = action.top?action.top:res.boxTop;
-  res.boxLeft = action.left?action.left+action.dis:res.left;
-  return res;
-};
+
 export const getInspectList = (state,action)=>{
   let res = Object.assign({},state);
   res.inspectList = action.data

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

@@ -1,6 +1,6 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,
-  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,SEARCH_DROP_LOCATION,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG} from '../types/homePage.js';
-import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,searchDropLocation,getInspectList,getAssistList} from '../actions/homePage.js';
+  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG} from '../types/homePage.js';
+import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList} from '../actions/homePage.js';
 
 const initState = {
   totalHide:false,
@@ -63,8 +63,6 @@ export default function (state=initState,action) {
       // res.loadingFlag = false;
       res.loadingFlag = action.flag;
       return res;
-    case SEARCH_DROP_LOCATION:
-      return searchDropLocation(state,action);
     case GET_INSPECT_LIST:
       return getInspectList(state,action);
     case GET_ASSIST_LIST:

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

@@ -12,7 +12,6 @@ export const ISREAD = 'is_history_or_template';     //是否回读或模板数
 export const SETOTHERHISTORY = 'set_otherHis_history';    //其他史历史数据暂存
 export const SETMINSCREEN = 'SETMINSCREEN';    //1024标识
 export const MODI_LOADING = 'MODI_LOADING';    //1024标识
-export const SEARCH_DROP_LOCATION = 'SEARCH_DROP_LOCATION';    //1024标识
 export const GET_ASSIST_LIST = 'GET_ASSIST_LIST';    //辅检
 export const GET_INSPECT_LIST = 'GET_INSPECT_LIST';    //化验
 export const SETALLMODULES = 'SETALLMODULES';    //储存所有模板数据