|
@@ -6,8 +6,8 @@ import { getExcelList } from '@store/actions/inspect';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
import store from '@store';
|
|
|
import $ from 'jquery';
|
|
|
-import { host } from '@utils/config.js';
|
|
|
-import {isIE} from '@utils/tools.js';
|
|
|
+import { host,prefix } from '@utils/config.js';
|
|
|
+import {isIE,getUrlArgObject} from '@utils/tools.js';
|
|
|
|
|
|
|
|
|
(function ($) {
|
|
@@ -27,9 +27,9 @@ import {isIE} from '@utils/tools.js';
|
|
|
import "./dists/FileAPI.js";
|
|
|
|
|
|
const isLocal = window.location.hostname.indexOf('localhost')!=-1;
|
|
|
-const qhost = isLocal?host:'';
|
|
|
+const qhost = isLocal?host+prefix:prefix;
|
|
|
const api = {
|
|
|
- upload: qhost+'/api/icss/lisExcelRes/lisExcelAnalysis'
|
|
|
+ upload: qhost+'/lisExcelRes/lisExcelAnalysis'
|
|
|
};
|
|
|
|
|
|
class Inspect extends React.Component {
|
|
@@ -78,13 +78,19 @@ class Inspect extends React.Component {
|
|
|
},
|
|
|
function (files, rejected){
|
|
|
if( files.length ){
|
|
|
- console.log(files[0])
|
|
|
+ //console.log(files[0])
|
|
|
+ const securityCode = getUrlArgObject("code");
|
|
|
+ const appKeyId = getUrlArgObject("appI");
|
|
|
+ const appKeySecret = getUrlArgObject("appS");
|
|
|
FileAPI.upload({
|
|
|
// url: '/api/icss/lisExcelRes/lisExcelAnalysis',
|
|
|
url: api.upload,
|
|
|
data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
|
|
|
files: { uploadfile: files[0] },
|
|
|
headers:{
|
|
|
+ appKeyId:appKeyId,
|
|
|
+ appKeySecret:appKeySecret,
|
|
|
+ securityCode:securityCode
|
|
|
// 'Content-Type':'Content-Type: multipart/form-data'
|
|
|
// 'Content-Type':'application/json;charset=UTF-8'
|
|
|
// 'Content-type': "text/plain"
|
|
@@ -97,7 +103,7 @@ class Inspect extends React.Component {
|
|
|
let message = res.data.messages;
|
|
|
store.dispatch(getExcelList(res.data));
|
|
|
fetchPushInfos&&fetchPushInfos();
|
|
|
- if (message.length != 0) {
|
|
|
+ if (message&&message.length != 0) {
|
|
|
that.setState({
|
|
|
visible:true,
|
|
|
dom:message,
|