|
@@ -78,11 +78,10 @@ class Inspect extends React.Component {
|
|
|
componentDidMount() {
|
|
|
$(document).click((event) => {
|
|
|
let searchWrap = $('#searchWrap')[0]; // 搜索按钮
|
|
|
- let searchImg = $('#addImg')[0]; // +号按钮
|
|
|
let searchOption = $('#searchOption')[0]; // 搜索列表
|
|
|
let inspectFill = $('#inspectFill')[0]; // 公共填写单
|
|
|
if(searchOption){
|
|
|
- if ( searchOption != event.target && searchWrap != event.target && searchImg != event.target && !$.contains(searchOption, event.target)) { // Mark 1
|
|
|
+ if ( searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
|
|
|
this.setState({ show: false });
|
|
|
}
|
|
|
}
|
|
@@ -103,7 +102,7 @@ class Inspect extends React.Component {
|
|
|
let date = info.year+'-'+(info.month<10?'0'+info.month:info.month)+'-'+(info.day<10?'0'+info.day:info.day);
|
|
|
this.setState({dateTime:date,date:false})
|
|
|
}
|
|
|
- handleSearchShow(e) {
|
|
|
+ handleSearchShow(e) {console.log(666);
|
|
|
let tmpShow = this.state.show;
|
|
|
this.setState({ show: !tmpShow })
|
|
|
// e.stopPropagation();
|
|
@@ -376,8 +375,9 @@ class Inspect extends React.Component {
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div style={{position:"relative"}}>
|
|
|
- <img src={more} id="addImg" style={{verticalAlign:'middle',marginRight:'2px'}} onClick={(e) => this.handleSearchShow(e)}/>
|
|
|
- <span id="searchWrap" className={`${styles.staticTag}`} onClick={(e) => this.handleSearchShow(e)}>添加化验项</span>
|
|
|
+ {/*<img src={more} id="addImg" style={{verticalAlign:'middle',marginRight:'2px'}} onClick={(e) => this.handleSearchShow(e)}/>
|
|
|
+ <span id="searchWrap" className={`${styles.staticTag}`} onClick={(e) => this.handleSearchShow(e)}>添加化验项</span>*/}
|
|
|
+ <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap"/>
|
|
|
<SearchOption handleChangeValue={handleChangeValue} visible={this.state.show}>
|
|
|
{this.getSearchList(list)}
|
|
|
</SearchOption>
|