Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
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
ReactWeb5
wisdom-components
Commits
07038a22
Commit
07038a22
authored
Dec 13, 2022
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复函数未引用导致的bug
parent
7bc835a7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
package.json
packages/base-components/BasicReport/package.json
+2
-1
handlers.js
...omponents/BasicReport/src/ReportsManage/utils/handlers.js
+10
-9
No files found.
packages/base-components/BasicReport/package.json
View file @
07038a22
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
"test"
:
"echo
\"
Error: run tests from root
\"
&& exit 1"
"test"
:
"echo
\"
Error: run tests from root
\"
&& exit 1"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@babel/runtime"
:
"^7.17.9"
"@babel/runtime"
:
"^7.17.9"
,
"@wisdom-components/basictable"
:
"^1.5.25"
}
}
}
}
packages/base-components/BasicReport/src/ReportsManage/utils/handlers.js
View file @
07038a22
import
style
from
'../ReportsManage.less'
;
import
style
from
'../ReportsManage.less'
;
import
extraComponents
from
'../extra/extraComponents'
;
import
extraComponents
from
'../extra/extraComponents'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
Tag
}
from
'antd'
;
import
{
Tag
}
from
'antd'
;
import
{
hasMoney
,
isNumber
}
from
'./utils'
;
import
{
hasMoney
,
isNumber
,
returnHandledNumber
}
from
'./utils'
;
import
{
tagColors
,
tagBackgroundColors
}
from
'./constant'
;
import
{
tagColors
,
tagBackgroundColors
}
from
'./constant'
;
/**
/**
* @params: config下的数值的configRule结构如下,[{最大值: 10,最小值: 0,颜色:'#AAAAAA'}];
* @params: config下的数值的configRule结构如下,[{最大值: 10,最小值: 0,颜色:'#AAAAAA'}];
...
@@ -17,7 +17,8 @@ import { tagColors, tagBackgroundColors } from './constant';
...
@@ -17,7 +17,8 @@ import { tagColors, tagBackgroundColors } from './constant';
const
clickLink
=
(
config
)
=>
{
const
clickLink
=
(
config
)
=>
{
return
window
.
open
(
config
.
configItems
,
'_blank'
);
return
window
.
open
(
config
.
configItems
,
'_blank'
);
};
};
const
handleUrl
=
(
allWidgets
,
config
)
=>
{};
const
handleUrl
=
(
allWidgets
,
config
)
=>
{
};
const
handleConfigUrl
=
(
config
,
record
)
=>
{
const
handleConfigUrl
=
(
config
,
record
)
=>
{
let
_configs
=
config
.
configItems
.
split
(
'|'
);
let
_configs
=
config
.
configItems
.
split
(
'|'
);
// type = 替换|跳转;
// type = 替换|跳转;
...
@@ -44,7 +45,7 @@ const handleConfigUrl = (config, record) => {
...
@@ -44,7 +45,7 @@ const handleConfigUrl = (config, record) => {
_url
=
_urlArray
[
0
];
_url
=
_urlArray
[
0
];
}
}
});
});
return
{
url
:
_url
,
type
:
_type
,
params
:
_params
};
return
{
url
:
_url
,
type
:
_type
,
params
:
_params
};
};
};
const
clickWidget
=
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)
=>
{
const
clickWidget
=
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)
=>
{
// 功能跳转接口
// 功能跳转接口
...
@@ -118,7 +119,7 @@ export const handleNumber = (config, number) => {
...
@@ -118,7 +119,7 @@ export const handleNumber = (config, number) => {
>
>
{
returnHandledNumber
(
config
.
configItems
,
number
)}
{
returnHandledNumber
(
config
.
configItems
,
number
)}
<
/span
>
<
/span
>
<
span
className
=
{
style
.
prefixOrSuffix
}
style
=
{{
color
:
_color
}}
>
<
span
className
=
{
style
.
prefixOrSuffix
}
style
=
{{
color
:
_color
}}
>
{
config
.
suffix
||
''
}
{
config
.
suffix
||
''
}
<
/span
>
<
/span
>
<
/span
>
<
/span
>
...
@@ -218,7 +219,7 @@ const mapTag = (map, key) => {
...
@@ -218,7 +219,7 @@ const mapTag = (map, key) => {
}
}
};
};
export
const
handleText
=
(
config
,
text
)
=>
{
export
const
handleText
=
(
config
,
text
)
=>
{
return
<
span
style
=
{{
color
:
config
.
color
||
'rgba(0,0,0,.85)'
}}
>
{
text
}
<
/span>
;
return
<
span
style
=
{{
color
:
config
.
color
||
'rgba(0,0,0,.85)'
}}
>
{
text
}
<
/span>
;
};
};
export
const
handleLink
=
(
config
,
text
)
=>
{
export
const
handleLink
=
(
config
,
text
)
=>
{
return
(
return
(
...
@@ -236,7 +237,7 @@ export const handleLink = (config, text) => {
...
@@ -236,7 +237,7 @@ export const handleLink = (config, text) => {
export
const
handleWidget
=
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)
=>
{
export
const
handleWidget
=
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)
=>
{
return
(
return
(
<
span
<
span
style
=
{{
color
:
config
.
color
}}
style
=
{{
color
:
config
.
color
}}
className
=
{
style
.
link
}
className
=
{
style
.
link
}
onClick
=
{()
=>
clickWidget
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)}
onClick
=
{()
=>
clickWidget
(
config
,
text
,
record
,
showComponents
,
setDetailsConfig
)}
>
>
...
@@ -248,7 +249,7 @@ export const handleModal = (config, text, showModal, setExtra) => {
...
@@ -248,7 +249,7 @@ export const handleModal = (config, text, showModal, setExtra) => {
return
(
return
(
<
span
<
span
className
=
{
style
.
link
}
className
=
{
style
.
link
}
style
=
{{
color
:
config
.
color
||
'rgba(0,0,0,.85)'
}}
style
=
{{
color
:
config
.
color
||
'rgba(0,0,0,.85)'
}}
onClick
=
{()
=>
clickModal
(
config
,
showModal
,
setExtra
)}
onClick
=
{()
=>
clickModal
(
config
,
showModal
,
setExtra
)}
>
>
{
text
}
{
text
}
...
...
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