Procházet zdrojové kódy

化验导入删除填值推送

zhouna před 6 roky
rodič
revize
e0376902fb

+ 1 - 1
src/components/AddAssistCheck/index.jsx

@@ -36,7 +36,7 @@ class AddAssistCheck extends React.Component {
         const {handleDelAssist,handlePush} = this.props;
         const {id} = this.state;
         handleDelAssist&&handleDelAssist(id);
-      handlePush&&handlePush();
+        handlePush&&handlePush();           //右侧推送
         this.setState({
             visible:false,
             id:null

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

@@ -37,7 +37,7 @@ class Inspect extends React.Component {
         this.handleSearchShow = this.handleSearchShow.bind(this)
     }
     delConfirm(){//弹窗确定
-        const{delPartItem,handleCloseExcel} = this.props;
+        const{delPartItem,handleCloseExcel,handlePush} = this.props;
         const{type,id} = this.state;
         if(type==1){
             delPartItem(id)
@@ -50,6 +50,7 @@ class Inspect extends React.Component {
             id:null,
         })
         Notify.success("删除成功");
+        handlePush&&handlePush();       //右侧推送
     }
     handleDelClick(type,idx){
         this.setState({
@@ -260,7 +261,7 @@ class Inspect extends React.Component {
         }
     }
     render() {
-        const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel } = this.props;
+        const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel,handlePush } = this.props;
         const {toastText,visible} = this.state;
         return (
             <div className={styles.wrapper}>
@@ -351,6 +352,7 @@ class Inspect extends React.Component {
                                                             handleConfirm(e,idx,this.state.dateTime,this.state.currentData);
                                                         }
                                                         this.setState({showFill:false})
+                                                        handlePush&&handlePush();     //右侧推送
                                                     }}
                                                 >
                                                     <div className={styles.searchResultT}>

+ 4 - 1
src/components/Inspect/index.jsx

@@ -45,6 +45,7 @@ class Inspect extends React.Component {
     }
     componentDidMount(){
         $('iframe').bind( 'load', function(){} )
+      const {fetchPushInfos} = this.props;
         // FileAPI.debug = true
         $.support.cors = true;
         const that = this;
@@ -83,6 +84,7 @@ class Inspect extends React.Component {
                                 let res = JSON.parse(xhr.response);
                                 let message = res.data.messages;
                                 store.dispatch(getExcelList(res.data));
+                                fetchPushInfos&&fetchPushInfos();
                                 if (message.length != 0) {
                                     that.setState({
                                         visible:true,
@@ -124,7 +126,7 @@ class Inspect extends React.Component {
         </ul>
     }
     render() {
-        const { handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
+        const {fetchPushInfos, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem } = this.props;
         return (
             <div className={styles.wrapper} >
                 {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
@@ -148,6 +150,7 @@ class Inspect extends React.Component {
                             handleSign={handleSign}
                             handleChangeValue={handleChangeValue}
                             list={list}
+                            handlePush={fetchPushInfos}
                             labelList={labelList}
                             handleLabelSub={handleLabelSub}
                             fillActive={fillActive}

+ 6 - 1
src/containers/Inspect.js

@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
 import Inspect from '@components/Inspect';
 import {getSearchList,getSublableList} from '@store/async-actions/inspect';
 import {setLabel,fillActived,fillActiveDetail,checkValueIsChange,delExcelLis,clearLabel,delPartItem} from '@store/actions/inspect';
-
+import {billing} from '@store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return {
         list:state.inspect.list,
@@ -44,6 +44,11 @@ function mapDispatchToProps(dispatch, store) {
         },
         delPartItem(idx){
             dispatch(delPartItem(idx))
+        },
+        //右侧推送
+        fetchPushInfos(){
+          //调右侧推送
+          dispatch(billing);
         }
     }
 }