Commit ab87e5cb authored by Sixiang_Zzb's avatar Sixiang_Zzb

更改用户模块批量上传的请求路径

parent 3009a0fc
......@@ -2,11 +2,12 @@ import React, { useState, useEffect } from 'react';
import { Result, Button, message } from 'antd';
import { connect, history } from 'umi';
// const { REACT_APP_ENV } = process.env;
const module = 'User';
const ResultPageFailed = () => {
const [resultId, setResultId] = useState('');
const [flag, setFlag] = useState(true);
const backPage = () => {
history.go(-1);
};
......@@ -33,13 +34,14 @@ const ResultPageFailed = () => {
extra={[
<Button type="primary" key="ok" onClick={handleDownload}>
{flag ? (
<a href={'http://192.168.1.28:8651/tos/excel/down?operator_id=' + resultId}>
Download
</a>
) : (
// <a href={'http://47.74.233.180:8651/tos/excel/down?operator_id=' + resultId}>
// Download
// </a>
// <a href={'http://192.168.1.28:8651/tos/excel/down?operator_id=' + resultId}>
// Download
// </a>
<a href={'/tos/excel/down?operator_id=' + resultId}>Download</a>
) : (
'Download'
)}
</Button>,
......
......@@ -30,6 +30,7 @@ let readyData: any = {
// 节流阀
let flag: boolean = false;
const Users = (props: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
const { formatMessage } = useIntl();
......@@ -96,7 +97,8 @@ const Users = (props: any) => {
name: 'file',
action: () => {
// return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
// return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
return '/tos/excel/upload?userId=' + id;
},
beforeUpload: (file: any) => {
if (permissionArr.indexOf('4') < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment