|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
|
|
import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
|
|
import SlideExcel from './SlideExcel';
|
|
import SlideExcel from './SlideExcel';
|
|
import SlideSelect from './SlideSelect';
|
|
import SlideSelect from './SlideSelect';
|
|
-import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate} from '@utils/tools';
|
|
|
|
|
|
+import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate,setPosition} from '@utils/tools';
|
|
import styles from './index.less';
|
|
import styles from './index.less';
|
|
import ScrollArea from 'react-scrollbar';
|
|
import ScrollArea from 'react-scrollbar';
|
|
import store from '@store';
|
|
import store from '@store';
|
|
@@ -25,6 +25,7 @@ class Inspect extends React.Component {
|
|
// tmpIds: [], //内层外层
|
|
// tmpIds: [], //内层外层
|
|
impId: null
|
|
impId: null
|
|
}
|
|
}
|
|
|
|
+ this.$ul = React.createRef();
|
|
this.handleChangeDate = this.handleChangeDate.bind(this)
|
|
this.handleChangeDate = this.handleChangeDate.bind(this)
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
this.getItemList = this.getItemList.bind(this)
|
|
this.getItemList = this.getItemList.bind(this)
|
|
@@ -89,11 +90,17 @@ class Inspect extends React.Component {
|
|
let _closeTil = $('#delTit')[0]; // 弹窗标题
|
|
let _closeTil = $('#delTit')[0]; // 弹窗标题
|
|
if (searchOption) {
|
|
if (searchOption) {
|
|
if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
|
|
if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
|
|
|
|
+ if(this.state.show){
|
|
|
|
+ this.props.setHighter(0)
|
|
|
|
+ }
|
|
this.setState({ show: false });
|
|
this.setState({ show: false });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (inspectFill) {
|
|
if (inspectFill) {
|
|
if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
|
|
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(0)
|
|
|
|
+ }
|
|
this.setState({ showFill: false, date: false });
|
|
this.setState({ showFill: false, date: false });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -116,6 +123,7 @@ class Inspect extends React.Component {
|
|
}
|
|
}
|
|
changeShowFill() {
|
|
changeShowFill() {
|
|
this.setState({ showFill: false })
|
|
this.setState({ showFill: false })
|
|
|
|
+ this.props.setHighter(0)
|
|
}
|
|
}
|
|
handleChangeDate(info) {
|
|
handleChangeDate(info) {
|
|
// let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
|
|
// let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
|
|
@@ -126,6 +134,7 @@ class Inspect extends React.Component {
|
|
let tmpShow = this.state.show;
|
|
let tmpShow = this.state.show;
|
|
this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
|
|
this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
|
|
// e.stopPropagation();
|
|
// e.stopPropagation();
|
|
|
|
+ setPosition(e,"#searchOption",this.props.setHighter)
|
|
}
|
|
}
|
|
handleFillShow(e, idx) {
|
|
handleFillShow(e, idx) {
|
|
let tmpShow = this.state.showFill;
|
|
let tmpShow = this.state.showFill;
|
|
@@ -190,7 +199,7 @@ class Inspect extends React.Component {
|
|
} else {
|
|
} else {
|
|
fillActive = this.state.currentData;
|
|
fillActive = this.state.currentData;
|
|
}
|
|
}
|
|
- return <ul className={styles.searchLis}>
|
|
|
|
|
|
+ return <ul className={styles.searchLis} ref={this.$ul}>
|
|
{
|
|
{
|
|
fillActive && fillActive.details && fillActive.details.map((item, idx) => {
|
|
fillActive && fillActive.details && fillActive.details.map((item, idx) => {
|
|
if (item.controlType == 1) {
|
|
if (item.controlType == 1) {
|
|
@@ -314,7 +323,7 @@ class Inspect extends React.Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
- const {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, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
|
|
const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
|
|
const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
|
|
|
|
|
|
const contStyle={
|
|
const contStyle={
|
|
@@ -363,6 +372,8 @@ class Inspect extends React.Component {
|
|
return <SlideSelect
|
|
return <SlideSelect
|
|
item={item}
|
|
item={item}
|
|
idx={idx}
|
|
idx={idx}
|
|
|
|
+ listDom={this.$ul}
|
|
|
|
+ windowHeight={windowHeight}
|
|
showToast={idx == id ? true : false}
|
|
showToast={idx == id ? true : false}
|
|
showFill={this.state.showFill}
|
|
showFill={this.state.showFill}
|
|
handlePush={handlePush}
|
|
handlePush={handlePush}
|
|
@@ -383,6 +394,7 @@ class Inspect extends React.Component {
|
|
handleDelConfirm={this.delConfirm}
|
|
handleDelConfirm={this.delConfirm}
|
|
handleConfirm={handleConfirm}
|
|
handleConfirm={handleConfirm}
|
|
getInfomation={getInfomation}
|
|
getInfomation={getInfomation}
|
|
|
|
+ setHighter={setHighter}
|
|
></SlideSelect>
|
|
></SlideSelect>
|
|
})
|
|
})
|
|
}
|
|
}
|