Browse Source

修改添加诊断推送

zhangxc 6 năm trước cách đây
mục cha
commit
fbbb8fbbb0

+ 5 - 2
src/components/DiagnosticList/index.jsx

@@ -22,8 +22,11 @@ class DiagnosticList extends Component {
         this.handleClickDiag = this.handleClickDiag.bind(this);
     }
 
-    componentWillReceiveProps() {
-        this.props.getBilling();
+    componentWillReceiveProps(nextprops) {
+        if (this.props.diagnosticStr != nextprops.diagnosticStr) {
+            this.props.getBilling();
+        }
+        
     }
 
     upDiagnostic(index) {

+ 2 - 1
src/containers/DiagnosticList.js

@@ -13,7 +13,8 @@ function mapStateToProps(state) {
     return {
         list: state.diagnosticList.diagnosticList,
         treatment: state.treat.show,
-        isFirst: state.diagnosticList.isFirst
+        isFirst: state.diagnosticList.isFirst,
+        diagnosticStr: state.diagnosticList.diagnosticStr
     }
 }