Browse Source

Merge branch 'optimize' of http://192.168.2.236:10080/zhouna/newICSS into optimize

Luolei 6 năm trước cách đây
mục cha
commit
5314a5a4d3

+ 10 - 2
src/components/Emergency/HisList/index.jsx

@@ -73,7 +73,7 @@ class HisList extends Component {
     return '';
   }
 
-  handleSelect(e,id){console.log(e,id)
+  handleSelect(e,id){
     e.stopPropagation();
     let {select} = this.state;
     if(select.indexOf(id)==-1){
@@ -132,6 +132,14 @@ class HisList extends Component {
     handleDownload&&handleDownload(select);
   }
 
+  getExportStyle(){
+    const {select} = this.state;
+    if(select.length>0){
+      return `${style['export']} ${style['exp-select']}`
+    }
+    return style['export'];
+  }
+
   getList(){
     const { data } = this.props;
     let list = data&&data.map((v,i)=>{
@@ -172,7 +180,7 @@ class HisList extends Component {
       <div className={style['all-box']}>
         <img src={this.getAllIcon()} className={style['check-all']} onClick={this.handleAll}/>
         <span onClick={this.handleAll}>全选</span>
-        <span className={style['export']} onClick={this.handleDownload}>导出已选数据</span>
+        <span className={this.getExportStyle()} onClick={this.handleDownload}>导出已选数据</span>
       </div>
     </div>
   }

+ 2 - 2
src/components/Emergency/HisList/index.less

@@ -94,13 +94,13 @@
       margin: 0 8px 0 0;
     }
     .export{
-      color: #2A9BD5;
+      color: #E2EFF6;
       display: inline-block;
       width: 92px;
       height: 30px;
       line-height: 30px;
       text-align: center;
-      border: 1px solid #2A9BD5;
+      border: 1px solid #E2EFF6;
       border-radius: 4px;
       margin-left: 177px;
     }

+ 4 - 5
src/components/Emergency/index.jsx

@@ -73,9 +73,8 @@ class EmergencyHis extends Component{
     });
   }
   //点击搜索结果
-  handleListClick(item){console.log(333,item)
+  handleListClick(item){
     const { handleChangeValue } = this.props;
-    // this.searInp.current.innerText = '';
     this.searInp.current.value = item.name;
     handleChangeValue('');
     this.setState({
@@ -85,8 +84,8 @@ class EmergencyHis extends Component{
   }
   getBtnStyle(){
     const {valChange} = this.state;
-    if(valChange){
-      return `${style['add-btn']} ${style['gray-btn']}`
+    if(!valChange){
+      return `${style['add-btn']} ${style['comfirn-btn']}`
     }
     return style['add-btn'];
   }
@@ -194,4 +193,4 @@ class EmergencyHis extends Component{
   }
 }
 
-export default EmergencyHis;
+export default EmergencyHis;

+ 3 - 3
src/components/Emergency/index.less

@@ -87,9 +87,9 @@
         margin-left: 10px;
         cursor: pointer;
       }
-      .gray-btn{
-        color: #7C828E;
-        border-color: #7C828E;
+      .comfirn-btn{
+        color: #fff;
+        background: #2A9BD5;
       }
       .add-tip{
         font-size: 12px;

+ 2 - 8
src/store/async-actions/fetchModules.js

@@ -399,7 +399,7 @@ export function getFilterHis(obj){
       if(obj.flag==-1){
         newParam = Object.assign(params,{current:1})
       }else{
-        newParam = Object.assign({},params,{isHasSecond:flag})
+        newParam = Object.assign({},params,{isHasSecond:obj.flag})
       }
     }
 
@@ -424,7 +424,7 @@ export function downloadData (ids){
   }
   return expJson(api.downloadURL,param);
 }
-
+// 添加二次诊断
 export function addSecondDiag(item){
   const state = store.getState();
   const {message} = state.patInfo;
@@ -434,11 +434,5 @@ export function addSecondDiag(item){
     "inquiryId": item.id
   }
   return json(api.addSecondDia,param)
-  /*.then((res)=>{
-    const result = res.data;
-    if(result.code==0){
-      Notify.info("添加成功");
-    }
-  })*/
 }