Browse Source

弹窗关闭时机

Luolei 6 years ago
parent
commit
4f90da8849

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

@@ -15,6 +15,7 @@ class Textarea extends Component {
     const {handleChangeAssistValue,idx,handlePush} = this.props;
     const text = e.target.innerText;
     const stimer = this.state.timer;
+    console.log(text)
     handleChangeAssistValue&&handleChangeAssistValue(text,idx);
     //右侧推送--延时推送
     clearTimeout(stimer);

+ 1 - 0
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -65,6 +65,7 @@
             }
             li:hover {
                 border: 1px solid #66afe9;
+                border: 1px solid #66afe9\0;
             }
             .time {
                 float: right;

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

@@ -39,7 +39,7 @@ class HistoryCaseContainer extends React.Component {
                     handleSortClick={handleSortClick}
                     preInfo={preInfo}
                 ></HistoryList>
-                <ConfirmModal 
+                <ConfirmModal
                     visible={visible}
                     confirm={()=>{this.makeSure()}}
                     close={()=>{store.dispatch(visibleHistory(false))}}

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

@@ -183,6 +183,8 @@ class Operation extends Component {
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
       let jsStr = tmpLis[i].dataJson;
+      // console.log(JSON.stringify(JSON.parse(dataStr)))
+      // console.log(JSON.stringify(jsonStr))
       if(JSON.stringify(JSON.parse(dataStr)) == JSON.stringify(jsonStr) && jsStr == JSON.stringify(jsonData)){
         Notify.info('该模板已保存');
         return false;

+ 3 - 1
src/components/PushContainer/index.jsx

@@ -194,8 +194,10 @@ class PushContainer extends Component {
     makeSure(){
         if(this.state.type == 1) {
             store.dispatch(delItem(this.state.id))
+            store.dispatch(changeVisible(false))
         }else if(this.state.type == 2){
             store.dispatch(delBatchItem(this.props.checkItems))
+            store.dispatch(changeVisible(false))
         }else if(this.state.type == 3){
             if(this.state.title == this.state.obj.text){
                 store.dispatch(changeVisible(false))
@@ -216,8 +218,8 @@ class PushContainer extends Component {
                     pushAllDataList(typeConfig,'push',part,'template')       //引用
                 }
             })
+            store.dispatch(changeVisible(false))
         }
-        store.dispatch(changeVisible(false))
     }
     render() {
         const {activeId,checkItems,visible,showMsg,items,allCheckShow} = this.props;

+ 1 - 1
src/containers/CurrentIll.js

@@ -12,7 +12,7 @@ import {getModule} from '@store/async-actions/fetchModules.js';
 import {didPushParamChange} from '@utils/tools.js';
 
 
-function mapStateToProps(state) {
+function mapStateToProps(state) { 
   const {homePage} = state;
     return {
         data:state.currentIll.data,//主诉模板

+ 2 - 0
src/store/async-actions/tabTemplate.js

@@ -5,6 +5,7 @@ import {
   batchDelItems,
   changeTitle,
   keepPushData,
+  changeVisible
 } from '@store/actions/tabTemplate';
 import {DIAG_SHOW} from "@store/types/print";
 import Notify from '@commonComp/Notify';
@@ -143,6 +144,7 @@ export const changeTitleAsync = (obj) => { //改标题
       if (data.code == 0) {
         dispatch(changeTitle(obj));
         Notify.success('标题修改成功');
+        store.dispatch(changeVisible(false))
       } else {
         console.log(data)
         Notify.error(data.msg)

+ 1 - 1
src/utils/tools.js

@@ -218,7 +218,7 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
       'diag' : baseList.diagnosticList.diagnosticStr,
       'advice' : baseList.pushMessage.AdviceStr
     }
-    // console.log(jsonDataString,'文本模式数据获取')
+    console.log(jsonDataString,'文本模式数据获取')
     return jsonDataString;
 }
 /**