|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add} from '@commonComp';
|
|
import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add} from '@commonComp';
|
|
import SlideExcel from './SlideExcel';
|
|
import SlideExcel from './SlideExcel';
|
|
import SlideSelect from './SlideSelect';
|
|
import SlideSelect from './SlideSelect';
|
|
-import { deepClone } from '@utils/tools';
|
|
|
|
|
|
+import { deepClone,getPageCoordinate } from '@utils/tools';
|
|
import styles from './index.less';
|
|
import styles from './index.less';
|
|
import date1 from './img/date1.png';
|
|
import date1 from './img/date1.png';
|
|
import close from './img/close.png';
|
|
import close from './img/close.png';
|
|
@@ -27,6 +27,7 @@ class Inspect extends React.Component {
|
|
type: null,
|
|
type: null,
|
|
id: null,
|
|
id: null,
|
|
tmpIds: [], //内层外层
|
|
tmpIds: [], //内层外层
|
|
|
|
+ pageTop:'',
|
|
}
|
|
}
|
|
this.handleChangeDate = this.handleChangeDate.bind(this)
|
|
this.handleChangeDate = this.handleChangeDate.bind(this)
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
@@ -114,7 +115,7 @@ class Inspect extends React.Component {
|
|
}
|
|
}
|
|
handleSearchShow(e) {
|
|
handleSearchShow(e) {
|
|
let tmpShow = this.state.show;
|
|
let tmpShow = this.state.show;
|
|
- this.setState({ show: !tmpShow })
|
|
|
|
|
|
+ this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
|
|
// e.stopPropagation();
|
|
// e.stopPropagation();
|
|
}
|
|
}
|
|
handleFillShow(e, idx) {
|
|
handleFillShow(e, idx) {
|
|
@@ -284,8 +285,8 @@ class Inspect extends React.Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
- const { getInfomation,handleChangeValue,inspectVal, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
|
|
|
|
- const { toastText, visible, tmpId, tmpIdx } = this.state;
|
|
|
|
|
|
+ const { getInfomation,handleChangeValue,inspectVal, list, labelList,windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
|
|
|
|
+ const { toastText, visible, tmpId, tmpIdx,pageTop } = this.state;
|
|
|
|
|
|
return (
|
|
return (
|
|
<div className={styles.wrapper}>
|
|
<div className={styles.wrapper}>
|
|
@@ -343,7 +344,7 @@ class Inspect extends React.Component {
|
|
</div>
|
|
</div>
|
|
<div style={{ position: "relative", clear: "both" }}>
|
|
<div style={{ position: "relative", clear: "both" }}>
|
|
<Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
|
|
<Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
|
|
- {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
|
|
|
|
|
|
+ {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
|
|
{list && list.length>0?this.getSearchList(list):(inspectVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
|
|
{list && list.length>0?this.getSearchList(list):(inspectVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
|
|
{
|
|
{
|
|
list && list.length>0 || (inspectVal != '')?'':<div>
|
|
list && list.length>0 || (inspectVal != '')?'':<div>
|