Parcourir la source

地址问题修改,bug2427修改

luolei il y a 5 ans
Parent
commit
0e6a5abcae

+ 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;

+ 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})

+ 3 - 3
src/utils/ajax.js

@@ -5,7 +5,7 @@ $.support.cors = true;
 const axios=require('axios');
 const qs=require('querystring');
 const isLocal = window.location.hostname.indexOf('localhost')!=-1;
-// const qhost = isLocal?host+prefix:prefix;
+const orgin = window.location.origin
 const qhost = isLocal?host+prefix:prefix;
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
 //axios.defaults.baseURL = host;       //默认地址
@@ -68,7 +68,7 @@ const json=(url,data,spec)=>{
   //兼容ie8,axios在ie8下content-type设置不成功且会把headers置为null
   return axios({
     method:'post',
-    url:url.indexOf('http:')!=-1?url:(spec?host+url:qhost+url),
+    url:url.indexOf('http:')!=-1?url:((spec&&isLocal)?host+url:((spec&&!isLocal)?orgin+url:qhost+url)),
     data
   });/*new Promise((resolve,reject)=>{
     $.ajax({
@@ -92,7 +92,7 @@ const expJson = (url,data) =>{
     method:'post',
     url:url.indexOf('http:')!=-1?url:qhost+url,
     data,
-    contentType: "application/vnd.ms-excel" ,
+    contentType: "application/vnd.ms-excel;charset=UTF-8" ,
     responseType: 'blob' //必须添加,否则会乱码
   });
 }

+ 1 - 1
src/utils/tools.js

@@ -1211,7 +1211,7 @@ function getCalendarDate(info) {
 // 导出
 function downloadExportedData(data, fileName) {
     // var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); //type表示xlsx类型
-    var blob = new Blob([data], {type: 'application/vnd.ms-excel'}); //type表示xlsx类型
+    var blob = new Blob([data], {type: 'application/vnd.ms-excel;charset=UTF-8'}); //type表示xlsx类型
     var href = window.URL.createObjectURL(blob);//创建下载的链接
     // 为兼容FF26 (不支持a标签的模拟点击事件)
      if (navigator.userAgent.indexOf("Firefox") > -1){