|
@@ -4,6 +4,8 @@ import { normalVal,getArrow,timestampToTime,getDomUpDown,getPageCoordinate,setPo
|
|
import { InspectCommon, Notify,DelToast} from '@commonComp';
|
|
import { InspectCommon, Notify,DelToast} from '@commonComp';
|
|
import slideUp from "@common/images/slide-up.png";
|
|
import slideUp from "@common/images/slide-up.png";
|
|
import slideDown from "@common/images/slide-down.png";
|
|
import slideDown from "@common/images/slide-down.png";
|
|
|
|
+import checkOff from '@common/images/check_off.png';
|
|
|
|
+import checkOn from '@common/images/check_on.png';
|
|
import $ from 'jquery';
|
|
import $ from 'jquery';
|
|
import date1 from '../img/date1.png';
|
|
import date1 from '../img/date1.png';
|
|
import ScrollArea from 'react-scrollbar';
|
|
import ScrollArea from 'react-scrollbar';
|
|
@@ -31,6 +33,7 @@ class SlideSelect extends Component {
|
|
this.setEdit = this.setEdit.bind(this);
|
|
this.setEdit = this.setEdit.bind(this);
|
|
this.handleLabelSub = this.handleLabelSub.bind(this);
|
|
this.handleLabelSub = this.handleLabelSub.bind(this);
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
|
|
+ this.checkOnOff = this.checkOnOff.bind(this);
|
|
}
|
|
}
|
|
handleChangeDate(date) {
|
|
handleChangeDate(date) {
|
|
// console.log(date,'外')
|
|
// console.log(date,'外')
|
|
@@ -80,8 +83,8 @@ class SlideSelect extends Component {
|
|
this.setState({
|
|
this.setState({
|
|
canEdit:false
|
|
canEdit:false
|
|
},()=>{
|
|
},()=>{
|
|
- $("#canEdit").focus()
|
|
|
|
- $("#canEdit").blur(()=>{
|
|
|
|
|
|
+ $(".canEdit").focus()
|
|
|
|
+ $(".canEdit").blur(()=>{
|
|
this.setState({canEdit:true})
|
|
this.setState({canEdit:true})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -137,11 +140,16 @@ class SlideSelect extends Component {
|
|
const {handlePush} = this.props;
|
|
const {handlePush} = this.props;
|
|
handlePush && handlePush({mode:8}); //右侧推送
|
|
handlePush && handlePush({mode:8}); //右侧推送
|
|
}
|
|
}
|
|
|
|
+ checkOnOff(item){
|
|
|
|
+ const {checkOnOff} = this.props
|
|
|
|
+ checkOnOff(item)
|
|
|
|
+ }
|
|
render() {
|
|
render() {
|
|
const {item,idx,time} = this.props;
|
|
const {item,idx,time} = this.props;
|
|
const {canEdit,activeInd,activeName,value,style} = this.state;
|
|
const {canEdit,activeInd,activeName,value,style} = this.state;
|
|
return (
|
|
return (
|
|
item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}>
|
|
item.flg == 1?<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}>
|
|
|
|
+ <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item)} alt=""/>
|
|
<span className={styles.bigname}>{item.uniqueName}</span>
|
|
<span className={styles.bigname}>{item.uniqueName}</span>
|
|
<span className={styles.smallname}></span>
|
|
<span className={styles.smallname}></span>
|
|
<span className={styles.edit}></span>
|
|
<span className={styles.edit}></span>
|
|
@@ -155,11 +163,12 @@ class SlideSelect extends Component {
|
|
cancel={this.handleCancel}
|
|
cancel={this.handleCancel}
|
|
confirm={()=>{this.delConfirm(item)}}/>
|
|
confirm={()=>{this.delConfirm(item)}}/>
|
|
</li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}>
|
|
</li>:<li key={item.uniqueName+idx} className={`${styles.slideLi} clearfix`}>
|
|
|
|
+ <span style={{width:'22px'}}></span>
|
|
<span className={styles.bigname}>{item.name}</span>
|
|
<span className={styles.bigname}>{item.name}</span>
|
|
<span className={styles.smallname}>{item.uniqueName}</span>
|
|
<span className={styles.smallname}>{item.uniqueName}</span>
|
|
<span className={styles.edit}>
|
|
<span className={styles.edit}>
|
|
<input disabled={canEdit} type="text"
|
|
<input disabled={canEdit} type="text"
|
|
- id="canEdit"
|
|
|
|
|
|
+ class="canEdit"
|
|
onDoubleClick={this.setEdit}
|
|
onDoubleClick={this.setEdit}
|
|
style={{color:style==2||style==4?'red':style==1?'#D949FF':'#333'}}
|
|
style={{color:style==2||style==4?'red':style==1?'#D949FF':'#333'}}
|
|
placeholder='(填写)'
|
|
placeholder='(填写)'
|