|
@@ -3,7 +3,8 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
|
|
|
import styles from './index.less';
|
|
|
import $ from 'jquery';
|
|
|
import Textarea from './Textarea';
|
|
|
-import { getPageCoordinate,getCurrentDate,setPosition,windowEventHandler } from '@utils/tools';
|
|
|
+import AssistName from './AssistName';
|
|
|
+import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
|
|
|
import ScrollArea from 'react-scrollbar';
|
|
|
|
|
|
class AddAssistCheck extends React.Component {
|
|
@@ -37,28 +38,29 @@ class AddAssistCheck extends React.Component {
|
|
|
let _close = document.getElementById("assiClose"); // 删除icon
|
|
|
let _closeTil = $('#delTit')[0]; // 弹窗标题
|
|
|
if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
|
|
|
- if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
|
|
|
- if (this.state.show) {
|
|
|
- this.props.setHighter(48)
|
|
|
+ if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
|
|
|
+ if (this.state.show) {
|
|
|
+ this.props.setHighter(48)
|
|
|
+ }
|
|
|
+ this.setState({show: false});
|
|
|
+ }
|
|
|
+ if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
|
|
|
+ this.setState({date: false});
|
|
|
+ }
|
|
|
+ if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
|
|
|
+ this.setState({date: false});
|
|
|
+ }
|
|
|
+ if(_del){
|
|
|
+ if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
|
|
|
+ this.setState({
|
|
|
+ visible: false,
|
|
|
+ id: null,
|
|
|
+ activeName:''
|
|
|
+ })
|
|
|
}
|
|
|
- this.setState({show: false});
|
|
|
- }
|
|
|
- if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
|
|
|
- this.setState({date: false});
|
|
|
- }
|
|
|
- if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
|
|
|
- this.setState({date: false});
|
|
|
- }
|
|
|
- if(_del){
|
|
|
- if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
|
|
|
- this.setState({
|
|
|
- visible: false,
|
|
|
- id: null,
|
|
|
- activeName:''
|
|
|
- })
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
});
|
|
|
const that = this;
|
|
|
document.addEventListener('mousedown',function(e){
|
|
@@ -201,12 +203,13 @@ class AddAssistCheck extends React.Component {
|
|
|
{
|
|
|
part.map((item, idx) => {
|
|
|
return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
|
|
|
- <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
|
|
|
+ {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
|
|
|
<span className={styles.tagSpan}>
|
|
|
{item.name}:
|
|
|
<span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
+ </span> */}
|
|
|
+ <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
|
|
|
<div className={styles.textareaWrap}>
|
|
|
<ScrollArea speed={0.8}
|
|
|
horizontal={false}
|
|
@@ -253,12 +256,14 @@ class AddAssistCheck extends React.Component {
|
|
|
}
|
|
|
}
|
|
|
return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
|
|
|
- <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
|
|
|
+ {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':(winWidth-987)+'px' }}> */}
|
|
|
+ {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
|
|
|
<span className={styles.tagSpan}>
|
|
|
{item.name}:
|
|
|
<span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
+ </span> */}
|
|
|
+ <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
|
|
|
<div className={styles.textareaWrap}>
|
|
|
<ScrollArea speed={0.8}
|
|
|
horizontal={false}
|
|
@@ -296,7 +301,7 @@ class AddAssistCheck extends React.Component {
|
|
|
})
|
|
|
}
|
|
|
</ul>
|
|
|
- </React.Fragment>
|
|
|
+ </React.Fragment>
|
|
|
}
|
|
|
render() {
|
|
|
const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;
|