Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
ca51fa61
提交
ca51fa61
authored
5月 24, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
26873 就业毕业辅助管理-毕业生档案邮寄管理,导出网络超时
上级
dc4254ed
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
62 行增加
和
7 行删除
+62
-7
ExportCurrentInfo.js
one_stop_public/App/ExportCurrentInfo.js
+6
-3
ImportUtil.js
one_stop_public/App/ImportUtil.js
+5
-2
index.jsx
one_stop_public/Base16/index.jsx
+45
-2
giveSmartFormGlobalProps.js
one_stop_public/Table/giveSmartFormGlobalProps.js
+6
-0
没有找到文件。
one_stop_public/App/ExportCurrentInfo.js
浏览文件 @
ca51fa61
...
@@ -9,6 +9,8 @@ import { getToken } from '../utils/token';
...
@@ -9,6 +9,8 @@ import { getToken } from '../utils/token';
import
config
from
'@/webPublic/one_stop_public/config'
;
import
config
from
'@/webPublic/one_stop_public/config'
;
import
FormdataWrapper
from
'../utils/object-to-formdata-custom'
;
import
FormdataWrapper
from
'../utils/object-to-formdata-custom'
;
import
ButtonDiy
from
'./ButtonDiy/ButtonDiy'
;
import
ButtonDiy
from
'./ButtonDiy/ButtonDiy'
;
import
{
queryIsSafe
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
giveFilePostData
,
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
/**
/**
*
*
* 2019/02/21 修改导出方式为fetch
* 2019/02/21 修改导出方式为fetch
...
@@ -52,10 +54,11 @@ export default class ExportCurrentInfo extends React.Component {
...
@@ -52,10 +54,11 @@ export default class ExportCurrentInfo extends React.Component {
downloadFile
(
url
,
params
)
{
downloadFile
(
url
,
params
)
{
this
.
setState
({
confirmLoading
:
true
});
this
.
setState
({
confirmLoading
:
true
});
let
newApi
=
giveFilePostDataInfoForTrue
(
params
,
url
);
fetch
(
url
,
{
fetch
(
newApi
.
url
,
{
method
:
'POST'
,
method
:
'POST'
,
body
:
FormdataWrapper
(
params
),
body
:
FormdataWrapper
(
newApi
.
datas
,
),
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
status
!=
'200'
)
{
if
(
res
.
status
!=
'200'
)
{
...
...
one_stop_public/App/ImportUtil.js
浏览文件 @
ca51fa61
...
@@ -7,6 +7,7 @@ import FormdataWrapper from '../utils/object-to-formdata-custom';
...
@@ -7,6 +7,7 @@ import FormdataWrapper from '../utils/object-to-formdata-custom';
import
config
from
'@/webPublic/one_stop_public/config'
;
import
config
from
'@/webPublic/one_stop_public/config'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
{
getMessage
,
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
{
getMessage
,
getModal
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
{
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
const
Modal
=
getModal
();
const
Modal
=
getModal
();
const
message
=
getMessage
();
const
message
=
getMessage
();
...
@@ -218,9 +219,11 @@ export default class ImportUtil extends React.PureComponent {
...
@@ -218,9 +219,11 @@ export default class ImportUtil extends React.PureComponent {
fileName
,
fileName
,
token
:
getToken
(),
token
:
getToken
(),
};
};
fetch
(
`
${
config
.
httpServer
}
/DataObjApi/importTemplateDownload`
,
{
let
url
=
`
${
config
.
httpServer
}
/DataObjApi/importTemplateDownload`
;
let
newParams
=
giveFilePostDataInfoForTrue
(
params
,
url
);
fetch
(
newParams
.
url
,
{
method
:
'POST'
,
method
:
'POST'
,
body
:
FormdataWrapper
(
param
s
),
body
:
FormdataWrapper
(
newParams
.
data
s
),
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
status
!=
'200'
)
{
if
(
res
.
status
!=
'200'
)
{
...
...
one_stop_public/Base16/index.jsx
浏览文件 @
ca51fa61
...
@@ -4,6 +4,7 @@ import { isJSON } from '@/webPublic/zyd_public/utils/utils';
...
@@ -4,6 +4,7 @@ import { isJSON } from '@/webPublic/zyd_public/utils/utils';
import
{
queryApiActionPath
,
queryIsSafe
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryApiActionPath
,
queryIsSafe
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getToken
,
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
,
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
encryptApiList
from
'./encryptApiList'
;
import
encryptApiList
from
'./encryptApiList'
;
import
{
uploadFile
}
from
'@/webPublic/one_stop_public/libs/PictureSignature/ShowItem'
;
var
BASE16
=
'0123456789abcdef'
;
var
BASE16
=
'0123456789abcdef'
;
var
bs16
=
baseX
(
BASE16
);
var
bs16
=
baseX
(
BASE16
);
...
@@ -92,20 +93,62 @@ export function requestFileInfo(url, datas) {
...
@@ -92,20 +93,62 @@ export function requestFileInfo(url, datas) {
});
});
}
}
function
giveFilePostData
(
datas
,
url
)
{
export
function
giveFilePostDataInfoForTrue
(
datas
,
url
){
if
(
!
queryIsSafe
()){
return
{
datas
,
url
,
}
}
for
(
let
i
in
datas
)
{
for
(
let
i
in
datas
)
{
if
(
datas
[
i
]
===
null
||
(
Array
.
isArray
(
datas
[
i
])
&&
datas
[
i
].
length
===
0
)
||
datas
[
i
]
===
undefined
)
{
if
(
datas
[
i
]
===
null
||
(
Array
.
isArray
(
datas
[
i
])
&&
datas
[
i
].
length
===
0
)
||
datas
[
i
]
===
undefined
)
{
delete
datas
[
i
];
delete
datas
[
i
];
}
}
}
}
if
(
url
)
{
const
roleGroup
=
getUserInfo
().
groupsId
;
if
(
url
.
indexOf
(
'http'
)
>
-
1
)
{
url
=
url
.
replace
(
'/onestop/'
,
`/onestop/safe/
${
roleGroup
}
/`
);
}
else
{
url
=
url
.
replace
(
url
,
`/safe/
${
roleGroup
}
/`
+
url
);
url
=
url
.
replaceAll
(
'//'
,
'/'
);
url
=
url
.
replaceAll
(
'//'
,
'/'
);
}
console
.
table
({
datas
,
url
,
});
let
file
=
new
File
([
JSON
.
stringify
(
datas
)],
'fileParams.jpeg'
,
{
type
:
'image/jpeg'
,
});
datas
=
{
fileParams
:
file
,
};
return
{
datas
,
url
,
}
}
}
function
giveFilePostData
(
datas
,
url
)
{
for
(
let
i
in
datas
)
{
if
(
datas
[
i
]
===
null
||
(
Array
.
isArray
(
datas
[
i
])
&&
datas
[
i
].
length
===
0
)
||
datas
[
i
]
===
undefined
)
{
delete
datas
[
i
];
}
}
if
(
url
&&
typeof
url
===
'string'
)
{
if
(
url
&&
typeof
url
===
'string'
)
{
for
(
let
item
of
encryptApiList
)
{
for
(
let
item
of
encryptApiList
)
{
if
(
url
.
indexOf
(
item
.
api
)
>
-
1
)
{
if
(
url
.
indexOf
(
item
.
api
)
>
-
1
)
{
const
roleGroup
=
getUserInfo
().
groupsId
;
const
roleGroup
=
getUserInfo
().
groupsId
;
if
(
url
.
indexOf
(
'http'
)
>
-
1
)
{
url
=
url
.
replace
(
'/onestop/'
,
`/onestop/safe/
${
roleGroup
}
/`
+
url
);
}
else
{
url
=
url
.
replace
(
url
,
`/safe/
${
roleGroup
}
/`
+
url
);
url
=
url
.
replace
(
url
,
`/safe/
${
roleGroup
}
/`
+
url
);
url
=
url
.
replaceAll
(
'//'
,
'/'
);
url
=
url
.
replaceAll
(
'//'
,
'/'
);
}
console
.
table
({
console
.
table
({
datas
,
datas
,
url
,
url
,
...
...
one_stop_public/Table/giveSmartFormGlobalProps.js
浏览文件 @
ca51fa61
import
{
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
export
function
giveSmartFormGlobalProps
({
export
function
giveSmartFormGlobalProps
({
fromStart
=
false
,
fromStart
=
false
,
hasSingle
=
false
,
hasSingle
=
false
,
...
@@ -18,6 +20,10 @@ export function giveSmartFormGlobalProps({
...
@@ -18,6 +20,10 @@ export function giveSmartFormGlobalProps({
nextUsers
,
nextUsers
,
calculateFlowData
,
calculateFlowData
,
onlyRead
,
onlyRead
,
apiList
:
{
giveFilePostDataInfoForTrue
,
remark
:
'giveFilePostDataInfoForTrue(params, url); 将接口参数 二进制文件化 并返回新的接口地址与参数'
,
}
};
};
return
true
;
return
true
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论