luolei 4 년 전
부모
커밋
d5449140de

+ 2 - 0
src/components/AddAssistCheck/index.jsx

@@ -105,6 +105,7 @@ class AddAssistCheck extends React.Component {
   }
   }
 
 
   handleSearchShow(e) {
   handleSearchShow(e) {
+    const { handlePush } = this.props;
     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(); 
@@ -112,6 +113,7 @@ class AddAssistCheck extends React.Component {
       this.props.setHighter(48)
       this.props.setHighter(48)
     }else{
     }else{
       setPosition(e,"#searchOption",this.props.setHighter)
       setPosition(e,"#searchOption",this.props.setHighter)
+      handlePush && handlePush({mode:9});           //右侧推送
     }
     }
   }
   }
   handleShowDate(idx) {
   handleShowDate(idx) {

+ 2 - 1
src/components/AddInspect/index.jsx

@@ -134,12 +134,13 @@ class Inspect extends React.Component {
   }
   }
   handleSearchShow(e) {
   handleSearchShow(e) {
     let tmpShow = this.state.show;
     let tmpShow = this.state.show;
+    const { handlePush } = this.props;
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
-    // e.stopPropagation();
     if(tmpShow){
     if(tmpShow){
       this.props.setHighter(48)
       this.props.setHighter(48)
     }else{
     }else{
       this.props.detailClick(2)
       this.props.detailClick(2)
+      handlePush && handlePush({mode:8});       //右侧推送
       setPosition(e,"#searchOption",this.props.setHighter)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
     }
   }
   }

+ 2 - 1
src/components/AddNewInspect/index.jsx

@@ -137,14 +137,15 @@ class AddNewInspect extends React.Component {
     this.setState({ dateTime: date, date: false })
     this.setState({ dateTime: date, date: false })
   }
   }
   handleSearchAdvice(e) {
   handleSearchAdvice(e) {
-    const {refreshScroller}=this.props
     let tmpShow = this.state.show;
     let tmpShow = this.state.show;
+    const { handlePush } = this.props;
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
     // e.stopPropagation();
     if(tmpShow){
     if(tmpShow){
       this.props.setHighter(80)
       this.props.setHighter(80)
     }else{
     }else{
       this.props.detailClick(5)
       this.props.detailClick(5)
+      handlePush && handlePush({mode:8});       //右侧推送
       setPosition(e,"#searchOption",this.props.setHighter)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
     }
   }
   }

+ 1 - 7
src/components/Diagnosis/index.jsx

@@ -3,7 +3,6 @@ import { Button, ItemBox, ConfirmModal, Loading, Message, Add } from '@commonCom
 import DiagnosticList from '@containers/DiagnosticList.js';
 import DiagnosticList from '@containers/DiagnosticList.js';
 import { getPageCoordinate,setPosition  } from '@utils/tools';
 import { getPageCoordinate,setPosition  } from '@utils/tools';
 import DiagResultSearch from '@containers/DiagResultSearch';
 import DiagResultSearch from '@containers/DiagResultSearch';
-import $ from 'jquery';
 
 
 class Diagnosis extends Component {
 class Diagnosis extends Component {
   constructor(props) {
   constructor(props) {
@@ -40,15 +39,13 @@ class Diagnosis extends Component {
     if(this.props.show){
     if(this.props.show){
       this.props.setHighter(48)
       this.props.setHighter(48)
     }else{
     }else{
+      this.props.getBilling({mode:10});
       setPosition(e,"#searchOption",this.props.setHighter)
       setPosition(e,"#searchOption",this.props.setHighter)
     }
     }
   }
   }
   refreshScroller(){
   refreshScroller(){
     //更新滚动条状态,解决容器变大滚动条不更新bug
     //更新滚动条状态,解决容器变大滚动条不更新bug
     return this.context.scrollArea;
     return this.context.scrollArea;
-    /*this.context.scrollArea.refresh();
-    this.context.scrollArea.scrollBottom();*/
-
   }
   }
   render() {
   render() {
     return (<div id="diagnosisResult">
     return (<div id="diagnosisResult">
@@ -64,10 +61,7 @@ class Diagnosis extends Component {
             height={150}>
             height={150}>
           </DiagResultSearch>
           </DiagResultSearch>
         </div>
         </div>
-
-
       </ItemBox>
       </ItemBox>
-      {/* <TreatDrug></TreatDrug> */}
       <Message></Message>
       <Message></Message>
     </div>)
     </div>)
   }
   }

+ 5 - 0
src/containers/Diagnosis.js

@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
 import Diagnosis from '@components/Diagnosis';
 import Diagnosis from '@components/Diagnosis';
 import { SHOW_SEARCH,  HIDE_SEARCH } from '@store/types/diagnosticSearch';
 import { SHOW_SEARCH,  HIDE_SEARCH } from '@store/types/diagnosticSearch';
 import {HIDEDROP} from '@types/homePage';
 import {HIDEDROP} from '@types/homePage';
+import {embedPush} from '@store/async-actions/pushMessage';
 
 
 function mapStateToProps(state) {//console.log(state)
 function mapStateToProps(state) {//console.log(state)
     return {
     return {
@@ -29,6 +30,10 @@ function mapDispatchToProps(dispatch) {
             type:HIDEDROP
             type:HIDEDROP
           });
           });
         },
         },
+        getBilling: (obj) => {
+            obj.action ='diag'
+            dispatch(embedPush(obj))
+        },
     }
     }
 }
 }
 
 

+ 1 - 3
src/utils/ajax.js

@@ -9,10 +9,8 @@ const orgin = window.location.origin;
 // const qhost = isLocal?host+prefix:prefix;
 // const qhost = isLocal?host+prefix:prefix;
 const qhost = isLocal ? host  :'';
 const qhost = isLocal ? host  :'';
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
-//axios.defaults.baseURL = host;       //默认地址
+//axios.defaults.baseURL = host;         //默认地址
 // axios.defaults.timeout = 60000;       //请求超时
 // axios.defaults.timeout = 60000;       //请求超时
-
-
     const securityCode = getUrlArgObject("code");
     const securityCode = getUrlArgObject("code");
     const appKeyId = getUrlArgObject("appI");
     const appKeyId = getUrlArgObject("appI");
     const appKeySecret = getUrlArgObject("appS");
     const appKeySecret = getUrlArgObject("appS");