浏览代码

Merge remote-tracking branch 'origin/dev5.3.2' into dev5.3.3

zhouna 5 年之前
父节点
当前提交
f51b8cb0de

+ 0 - 1
src/common/components/SearchBox/index.jsx

@@ -101,7 +101,6 @@ class SearchBox extends React.Component {
     }
     componentWillReceiveProps(next){
       // 隐藏时,清空搜索框内文字,清空搜索结果,隐藏搜索框
-      const { clearSearch } = this.props;
       if(!next.show && next.show != this.props.show){
         this.reset();
       }

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

@@ -2,6 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
+import {windowEventHandler} from '@utils/tools';
 
 class Textarea extends Component {
   constructor(props) {
@@ -64,6 +65,9 @@ class Textarea extends Component {
     }else{
       this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '报告描述或意见'):(this.$dom.current.nextSibling.innerHTML = '报告描述或意见')
     }
+    windowEventHandler('resize', ()=>{
+      $(".TextareaRsize").css({marginTop:0})
+    });
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();

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

@@ -266,7 +266,7 @@ class AddAssistCheck extends React.Component {
                             className={styles["area"]}
                             verticalContainerStyle={contStyle}
                             verticalScrollbarStyle={barStyle}
-                            contentClassName="content">
+                            contentClassName="content TextareaRsize">
                 <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                 </ScrollArea>
               </div>

+ 2 - 3
src/components/AssistCheck/index.jsx

@@ -10,7 +10,6 @@ import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
 import { host, prefix } from '@utils/config.js';
 
-
 class AssistCheck extends React.Component {
   constructor(props){
         super(props);
@@ -30,7 +29,7 @@ class AssistCheck extends React.Component {
         this.closeInIcss=this.closeInIcss.bind(this)
         this.onClose=this.onClose.bind(this)
         this.handleImportExcel=this.handleImportExcel.bind(this)
-    this.refreshScroller = this.refreshScroller.bind(this);
+        this.refreshScroller = this.refreshScroller.bind(this);
     }
     handleImportExcel() {
       this.inputRef.click();
@@ -115,7 +114,7 @@ class AssistCheck extends React.Component {
                     marginTop={'20px'}
                 >
                     <div style={{padding:'10px',boxSizing:'border-box'}} >
-                        <AddAssistCheck 
+                        <AddAssistCheck
                             handleChangeValue={handleChangeValue}
                             refreshScroller={this.refreshScroller}
                             list={list}

+ 0 - 1
src/components/EMRContainer/index.jsx

@@ -79,5 +79,4 @@ class EMRContainer extends Component {
         </div>
     }
 }
-
 export default EMRContainer;

+ 0 - 1
src/components/ScaleSearch/index.less

@@ -80,7 +80,6 @@
       }
       .scale-name{
         display: inline-block;
-        max-width: 320px;
         line-height: 22px;
       }
       button{

+ 1 - 1
src/containers/Emergency.js

@@ -28,7 +28,7 @@ const mapDispatchToProps = function(dispatch){
     },
     async getDownload(obj){
       let resData = await downloadData(obj.ids);
-      downloadExportedData(resData.data,obj.info.hospitalDeptName+"病历");
+      downloadExportedData(resData.data,obj.info.hospitalDeptName+"病历.xls");
     },
     clearHisRecord(){
       dispatch({type:CLEAR_RECORD})

+ 4 - 1
src/store/reducers/mainSuit.js

@@ -121,7 +121,10 @@ export default function(state=initState,action){
       res.addSearchData = action.data;
       return res;
     case CLEAR_ADD_SEARCH://清空症状搜索结果
-      res.addSearchData = [];
+      //非必要是不要重复赋值[],造成searchBox componentWillReceiveProps循环调用导致内存泄漏
+      if(res.addSearchData&&res.addSearchData.length>0){
+        res.addSearchData = [];
+      }
       return res;
     default:
       return state;

+ 2 - 15
src/utils/ajax.js

@@ -64,26 +64,13 @@ const post=(url,data)=>{
 };
 
 //json传参
-const json=(url,data,spec)=>{
+const json=(url,data,spec)=>{     //spec:请求地址前缀不是api/icss,预问诊结果引用时添加
   //兼容ie8,axios在ie8下content-type设置不成功且会把headers置为null
   return axios({
     method:'post',
     url:url.indexOf('http:')!=-1?url:((spec&&isLocal)?host+url:((spec&&!isLocal)?orgin+url:qhost+url)),
     data
-  });/*new Promise((resolve,reject)=>{
-    $.ajax({
-      method:'post',
-      url:qhost+url,
-      data:JSON.stringify(data),
-      contentType:"application/json; charset=UTF-8",
-      success:function(res){
-        resolve({data:res});
-      },
-      error:function(error){
-        reject(error);
-      },
-    });
-  });*/
+  });
 };
 
 // 导出

+ 1 - 1
src/utils/tools.js

@@ -1204,7 +1204,7 @@ function getIds(data){
  */
 function getCalendarDate(info) {
   let conect = '-';
-  let date = info.year + conect + (info.month < 10 ? '0' + info.month : info.month) + conect + (info.day < 10 ? '0' + info.day : info.day) + ' '+ (info.hour < 10&&info.hour != 0 ? '0' + info.hour : info.hour)+':'+ (info.minute < 10&&info.minute != 0 ? '0' + info.minute : info.minute)+':'+ (info.second < 10&&info.second != 0 ? '0' + info.second : info.second);
+  let date = info.year + conect + (info.month < 10 ? '0' + info.month : info.month) + conect + (info.day < 10 ? '0' + info.day : info.day) + ' '+ (info.hour != 0&&(info.hour).toString().length<2 ? '0' + info.hour : info.hour)+':'+ (info.minute != 0&&(info.minute).toString().length<2 ? '0' + info.minute : info.minute)+':'+ (info.second&&(info.second).toString().length<2 ? '0' + info.second : info.second);
   return date;
 }