|
@@ -91,7 +91,7 @@ class Inspect extends React.Component {
|
|
|
if (searchOption) {
|
|
|
if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
|
|
|
if(this.state.show){
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
}
|
|
|
this.setState({ show: false });
|
|
|
}
|
|
@@ -99,7 +99,7 @@ class Inspect extends React.Component {
|
|
|
if (inspectFill) {
|
|
|
if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
|
|
|
if(this.state.showFill){
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
}
|
|
|
this.setState({ showFill: false, date: false });
|
|
|
}
|
|
@@ -123,7 +123,7 @@ class Inspect extends React.Component {
|
|
|
}
|
|
|
changeShowFill() {
|
|
|
this.setState({ showFill: false })
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
}
|
|
|
handleChangeDate(info) {
|
|
|
// let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
|
|
@@ -135,7 +135,7 @@ class Inspect extends React.Component {
|
|
|
this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
|
|
|
// e.stopPropagation();
|
|
|
if(tmpShow){
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
}else{
|
|
|
setPosition(e,"#searchOption",this.props.setHighter)
|
|
|
}
|
|
@@ -252,14 +252,30 @@ class Inspect extends React.Component {
|
|
|
}
|
|
|
getSearchList(list) {//搜索列表
|
|
|
const { handleSign } = this.props;
|
|
|
- return <ul className={styles.searchLiUl}>
|
|
|
+ const contStyle={
|
|
|
+ opacity:'0.4',
|
|
|
+ right:'0',
|
|
|
+ top:'1px',
|
|
|
+ zIndex:'15',
|
|
|
+ width:'14px',
|
|
|
+ background:'#f1f1f1'};
|
|
|
+ const barStyle={background:'#777',width:'100%'};
|
|
|
+ return <ScrollArea speed={0.8}
|
|
|
+ horizontal={false}
|
|
|
+ stopScrollPropagation={list.length>6?true:false}
|
|
|
+ style={{height:'225px'}}
|
|
|
+ className={styles["area"]}
|
|
|
+ verticalContainerStyle={contStyle}
|
|
|
+ verticalScrollbarStyle={barStyle}
|
|
|
+ contentClassName="content">
|
|
|
+ <ul className={styles.searchLiUl}>
|
|
|
{
|
|
|
list && list.map((item, idx) => {
|
|
|
return <li key={idx}
|
|
|
className={styles.searchLi}
|
|
|
title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
|
|
|
onClick={() => {
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
handleSign(item.questionId, idx, 'search');
|
|
|
this.setState({ show: false })
|
|
|
}}
|
|
@@ -268,7 +284,7 @@ class Inspect extends React.Component {
|
|
|
</li>
|
|
|
})
|
|
|
}
|
|
|
- </ul>
|
|
|
+ </ul></ScrollArea>;
|
|
|
}
|
|
|
getCommonList() {//常用列表
|
|
|
const { handleSign, inspectList } = this.props;
|
|
@@ -279,7 +295,7 @@ class Inspect extends React.Component {
|
|
|
className={styles.searchLi}
|
|
|
title={item.name}
|
|
|
onClick={() => {
|
|
|
- this.props.setHighter(10)
|
|
|
+ this.props.setHighter(48)
|
|
|
handleSign(item.questionId, idx, 'common');
|
|
|
this.setState({ show: false })
|
|
|
}}
|
|
@@ -329,7 +345,7 @@ class Inspect extends React.Component {
|
|
|
}
|
|
|
}
|
|
|
render() {
|
|
|
- const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
|
|
|
+ const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
|
|
|
const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
|
|
|
|
|
|
const contStyle={
|
|
@@ -379,7 +395,8 @@ class Inspect extends React.Component {
|
|
|
item={item}
|
|
|
idx={idx}
|
|
|
listDom={this.$ul}
|
|
|
- windowHeight={windowHeight}
|
|
|
+ windowWidth={windowWidth}
|
|
|
+ refreshScroller={refreshScroller}
|
|
|
showToast={idx == id ? true : false}
|
|
|
showFill={this.state.showFill}
|
|
|
handlePush={handlePush}
|
|
@@ -409,19 +426,7 @@ class Inspect extends React.Component {
|
|
|
<div style={{ position: "relative", clear: "both", top: "5px" }}>
|
|
|
<Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
|
|
|
{this.state.show ? <SearchOption windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
|
|
|
- {list && list.length > 0 ?
|
|
|
- <ScrollArea speed={0.8}
|
|
|
- horizontal={false}
|
|
|
- stopScrollPropagation={true}
|
|
|
- style={{height:'257px'}}
|
|
|
- className={styles["area"]}
|
|
|
- verticalContainerStyle={contStyle}
|
|
|
- verticalScrollbarStyle={barStyle}
|
|
|
- contentClassName="content">
|
|
|
- {
|
|
|
- this.getSearchList(list)
|
|
|
- }
|
|
|
- </ScrollArea> : (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 != '') || (inspectList&&inspectList.length==0) ? '' : <div>
|
|
|
<p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
|