import React,{ Component } from 'react'; import style from './index.less'; import GeneralTreat from './GeneralTreat/index.jsx'; import DrugTreat from './DrugTreat/index.jsx'; import TreatDesc from '@components/TreatDesc' import {dragBox,windowRemoveEventHandler} from '@utils/tools' import DrugInfo from '@components/TreatDesc/DrugInfo'; import Notify from '@commonComp/Notify' import close from './img/close.png'; import generalIcon from './img/general.png'; import surgicalIcon from './img/surgical.png'; import $ from "jquery"; class Treat extends Component { constructor(props){ super(props); this.state = { zIndex:301, } this.hideTreat = this.hideTreat.bind(this); this.handlePrescription = this.handlePrescription.bind(this); this.handleDetermine = this.handleDetermine.bind(this); this.setTreatBox = this.setTreatBox.bind(this); } componentDidMount(){ dragBox('treatWrapper','dragTreatTitle') } hideTreat() { const { hideTreat,clearTreat, hideDrugInfo } = this.props; clearTreat && clearTreat(); hideTreat && hideTreat(); hideDrugInfo && hideDrugInfo(); // windowRemoveEventHandler('mousemove',handleMove,document) } handlePrescription() { Notify.info('该功能即将上线,敬请期待。', 2000) } handleDetermine() { const { title, treatment, advice } = this.props const { addScheme } = this.props addScheme && addScheme(title, treatment); this.hideTreat() } showDrugInfo() { const { showDrugInfo } = this.props; showDrugInfo && showDrugInfo(); } setTreatBox(){ $('#treatWrapper').css({'z-index': 302}); $('#drugWrapper').css({'z-index': 301}); } render(){ const {setDrugInfoMore,treatIndex,treatIndexSet, generalTreat, treatment, treatItem, surgeryTreat, selectDrug, drugInfo, treatDesc, setOtherRecommend, setDrugInfo, showDrug, showDrugInfo,hideDrugInfo, title, drugInfoList, hideDrugInfoMore} = this.props; const { zIndex,show } = this.state return(