Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
XieZhiXiong
jinfa-platform
Commits
78d3cadf
Commit
78d3cadf
authored
Jan 18, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
301a4d93
876341c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
index.tsx
src/utils/index.tsx
+9
-6
No files found.
src/utils/index.tsx
View file @
78d3cadf
...
...
@@ -6,6 +6,9 @@ import { GlobalConfig } from '@/global/config';
import
queryString
from
'query-string'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Tooltip
}
from
'antd'
import
{
getIntl
}
from
'umi'
;
const
intl
=
getIntl
();
function
isArray
(
arr
:
any
)
{
return
Array
.
isArray
(
arr
)
...
...
@@ -418,7 +421,7 @@ export const getFieldType = (field) => {
maxLength
:
field
.
fieldLength
,
"x-component-props"
:
{
help
:
field
.
fieldRemark
,
placeholder
:
`
请输入
${
field
.
fieldLocalName
||
field
.
fieldCNName
}
`
,
placeholder
:
`
${
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
})}
${
field
.
fieldLocalName
||
field
.
fieldCNName
}
`
,
size
:
'large'
,
...
field
.
attr
}
...
...
@@ -486,7 +489,7 @@ export const getQueryStringParams = (url?: string) => {
// 填充必填的schema message提示
export
const
padRequiredMessage
=
(
originSchema
:
ISchema
)
=>
{
const
messageSwich
=
(
type
)
=>
{
return
type
?
'请选择'
:
'请输入'
return
type
?
intl
.
formatMessage
({
id
:
'common.text.pleaseSelect'
})
:
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
})
}
const
todoFn
=
(
targetSchema
)
=>
{
...
...
@@ -576,9 +579,9 @@ export const isJSONStr = str => {
* @param {array} item 需要赋值的值
*/
export
const
coverColFiltersItem
=
(
data
:
Array
<
{
[
key
:
string
]:
any
}
>
,
data
:
Array
<
{
[
key
:
string
]:
any
}
>
,
dataIndex
:
string
,
item
:
{
[
key
:
string
]:
any
}
item
:
{
[
key
:
string
]:
any
}
)
=>
{
const
index
=
data
.
findIndex
(
i
=>
i
.
dataIndex
===
dataIndex
);
...
...
@@ -642,7 +645,7 @@ export const getIChannelInfo = () => {
* @param url 链接
* @returns
*/
export
const
getTopDomainByHost
=
(
url
:
string
,
isPort
=
false
):
string
=>
{
export
const
getTopDomainByHost
=
(
url
:
string
,
isPort
=
false
):
string
=>
{
if
(
!
url
)
return
''
// 如果后缀带有端口号, 可通过第二个参数把端口去掉
const
splitUrl
=
url
.
replace
(
/
(
http|https
)\:\/\/
/
,
''
).
split
(
':'
)
...
...
@@ -659,7 +662,7 @@ export const getIChannelInfo = () => {
export
const
clearModalParams
=
()
=>
{
const
currentState
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"currentState"
))
const
result
=
{
...
currentState
,
queryParams
:
{},
current
:
1
}
const
result
=
{
...
currentState
,
queryParams
:
{},
current
:
1
}
sessionStorage
.
setItem
(
"currentState"
,
JSON
.
stringify
(
result
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment