Browse Source

Merge branch 'master' of http://192.168.1.41:3000/caipin/cld2_react

caipin 5 năm trước cách đây
mục cha
commit
50ae56b867

+ 31 - 8
src/common/lockDetail/index.js

@@ -1,13 +1,12 @@
 import React, { PureComponent } from 'react';
-// import { connect } from 'react-redux';
+import { connect } from 'react-redux';
 // import { BrowserRouter, Route,Link } from 'react-router-dom';
+import { actionCreators } from './store';
 
-// import { actionCreators } from './store';
-
-class clientPopups extends PureComponent {
-
+class lockDetailPopups extends PureComponent {
 
   render() {
+    const {} = this.props;
     return (
       <div className="modal fade" id="lock-detail" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static">
     <div className="modal-dialog modal-xl">
@@ -95,7 +94,7 @@ class clientPopups extends PureComponent {
                 <div className="tab-content">
                   <div className="tab-pane fade sheet-panel-righttop show  active" id="tab-lserver" role="tabpanel" aria-labelledby="tab-server">
                     <div className="slimScrol3">
-                      <table className="table">
+                      {/* <table className="table">
                         <thead>
                           <tr>
                             <th className="border-0"></th>
@@ -151,7 +150,7 @@ class clientPopups extends PureComponent {
                             <br/><span className="text-muted"><a href="#">@陈特</a> 5月5日 14:55</span></td>
                           <td>备注内容</td>
                         </tr>
-                      </table>
+                      </table> */}
                     </div>
                   </div>
                 </div>
@@ -187,9 +186,33 @@ class clientPopups extends PureComponent {
     );
   }
 
+  componentDidMount() {
+    this.props.onRef(this);
+  }
+
+  handlelockDetailPopups(key) {
+    const { handlelockDetailPopups } = this.lockDetailPopups;
+    handlelockDetailPopups(key);
+  }
+
 }
 
+const mapStateToProps = (state) => {
+  return {
+    // popupsClientId: state.getIn(['popups', 'popupsClientId']),
+    // companyDetail: state.getIn(['popups', 'companyDetail']),
+    // loading: state.getIn(['popups', 'loading']),
+  }
+}
 
+const mapDispathToProps = (dispatch) => {
+  return {
+    handlelockDetailPopups(key) {
+      // dispatch(actionCreators.changeLoading());
+      // dispatch(actionCreators.getCompanyDetail(key,error));
+    },
+  }
+}
 
+export default connect(mapStateToProps, mapDispathToProps)(lockDetailPopups);
 
-export default clientPopups;

+ 4 - 5
src/product/lock_store/index.js

@@ -5,7 +5,7 @@ import StaffHeader from '../../common/staffHeader'
 import { Table, Input,Radio } from 'antd';
 import 'antd/dist/antd.css';
 import { actionCreators } from './store';
-import Popups from '../../common/popups';
+import Popups from '../../common/lockDetail';
 //import { AudioOutlined } from '@ant-design/icons';
 
 const radioStyle = {
@@ -106,8 +106,7 @@ class lock_store extends PureComponent {
             </div>
           </div>
         </main>
-        <Popups mainView={'lockDetail'}   onRef={(ref) => popupsObj = ref} />
-        {/* <LockDetail /> */}
+        <Popups  onRef={(ref) => popupsObj = ref} />
             </div>
         );
     }
@@ -183,8 +182,8 @@ const mapDispathToProps = (dispatch) => {
         // dispatch(actionCreators.changeInputValue(columnsNum));
         // dt.handleColumnVisible(index, e.target.value);
       },
-      handleLockstorePopups(key) {
-        popupsObj.handleLockstorePopups(key);
+      handlelockDetailPopups(key) {
+        popupsObj.handlelockDetailPopups(key);
         // console.log('kjjj');
         // console.log(255);
       },

+ 1 - 1
src/product/lock_store/store/reducer.js

@@ -140,7 +140,7 @@ export default (state = defaultState, action) => {
 		case constants.CHANGE_LOCKSTORE_DATA:
 			let columnsDetail={
 				...columns[0],
-				render: (text, record) => <a onClick={() => action.props.handleLockstorePopups(record.key)} href="#lockDetail" data-toggle="modal" data-target="#lockDetail"  >{text}</a>,
+				render: (text, record) => <a onClick={() => action.props.handlelockDetailPopups(record.key)} href="#lockDetail" data-toggle="modal" data-target="#lockDetail"  >{text}</a>,
 			}
 			columns[0] = columnsDetail;
 			// console.log(columnsDetail);