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
31facdf9
Commit
31facdf9
authored
Sep 06, 2022
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复组件引入错误
parent
0ffab69a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
+8
-12
fileUpload.js
...ort/src/ReportsManage/Components/fileUpload/fileUpload.js
+0
-1
handlers.js
...omponents/BasicReport/src/ReportsManage/utils/handlers.js
+3
-7
utils.js
...e-components/BasicReport/src/ReportsManage/utils/utils.js
+4
-3
Basic.tsx
packages/base-components/BasicReport/src/demos/Basic.tsx
+1
-1
No files found.
packages/base-components/BasicReport/src/ReportsManage/Components/fileUpload/fileUpload.js
View file @
31facdf9
...
...
@@ -120,7 +120,6 @@ const FileUpload = ({ value, onChange, schema }) => {
return
_obj
[
type
].
join
(
','
);
};
useEffect
(()
=>
{
debugger
;
let
fileList
=
[];
(
file
||
''
).
split
(
','
).
forEach
((
item
,
index
)
=>
{
if
(
item
&&
filenameVerification
({
name
:
item
},
true
).
type
!==
'error'
)
{
...
...
packages/base-components/BasicReport/src/ReportsManage/utils/handlers.js
View file @
31facdf9
...
...
@@ -3,11 +3,13 @@ import extraComponents from '../extra/extraComponents';
import
moment
from
'moment'
;
import
{
Tag
}
from
'antd'
;
import
{
hasMoney
,
isNumber
}
from
'./utils'
;
import
{
tagColors
,
tagBackgroundColors
}
from
'./constant'
;
/**
* @params: config下的数值的configRule结构如下,[{最大值: 10,最小值: 0,颜色:'#AAAAAA'}];
* @business: configRule有值,则按照configRule设置;没有,按照color设置; 有最大值,无最小值;['', 1]
* 有最大值,有最小值;[2,
*
* 有最大值,有最小值;[2,
*
* 10]
* 有最小值,无最大值;[11,'']
...
...
@@ -69,12 +71,6 @@ const clickModal = (config, showModal, setExtra) => {
showModal
(
true
);
return
setExtra
(
extraComponents
[
_fn
](
_data
));
};
const
returnOpacity
=
(
rgba
)
=>
{
if
(
!
rgba
)
rgba
=
'rgba(0,0,0,.65)'
;
let
_str
=
rgba
.
replace
(
'rgba('
,
''
).
replace
(
')'
,
''
);
let
_splitStr
=
_str
.
split
(
','
);
return
`rgba(
${
_splitStr
[
0
]}
,
${
_splitStr
[
1
]}
,
${
_splitStr
[
2
]}
,.25)`
;
};
export
const
handleNumber
=
(
config
,
number
)
=>
{
let
_color
=
''
;
let
_number
;
...
...
packages/base-components/BasicReport/src/ReportsManage/utils/utils.js
View file @
31facdf9
...
...
@@ -24,7 +24,7 @@ const hasMoney = (configItems) => {
const
returnHandledNumber
=
(
configItems
,
num
)
=>
{
// 精度、前缀、后缀、倍率
// $_d|_d%|_d*0.0001|金额|0.00
if
(
isNaN
(
num
))
return
'-'
;
if
(
isNaN
(
Number
(
num
)
))
return
'-'
;
if
(
!
configItems
)
return
num
;
num
=
Number
(
num
);
let
_items
=
configItems
.
split
(
'|'
);
...
...
@@ -51,7 +51,7 @@ const returnHandledNumber = (configItems, num) => {
let
final
=
_items
.
includes
(
'金额'
)
?
Number
((
num
*
rate
).
toFixed
(
precision
)).
toLocaleString
()
:
Number
((
num
*
rate
).
toFixed
(
precision
));
return
template
.
replace
(
/_d/
,
final
);
return
template
.
replace
(
/_d/
,
isString
(
final
)
?
final
:
'-'
);
};
/**
* @description: 返回configItems内配置的默认值、默认模式等等
...
...
@@ -61,9 +61,11 @@ const returnHandledNumber = (configItems, num) => {
* @params:
* configItems 报表字段的配置 例如 defaultValue=智慧水务
*
*
* defaultDateModel=customer|defaultDateValue=2022-01-01,2022-12-31;
* keysArray
*
*
* 所需要返回的值的key的集合,比如你需要获取configItems中的’defaultValue‘,那么keysArray=['defaultValue'];
* @returns:
* defaultValue 通用参数 默认值
...
...
@@ -96,7 +98,6 @@ function downloadFunc(url, name, target = '_self') {
* @returns {Object} {type: error | success ,content: 提示...}
*/
function
filenameVerification
(
file
,
special
)
{
debugger
;
// 文件名含有特殊字符 提示不能上传 {+,:/?#[]@!$&\\*+;=}
// 规则对象(flag)
var
flag
=
!
special
...
...
packages/base-components/BasicReport/src/demos/Basic.tsx
View file @
31facdf9
...
...
@@ -4,7 +4,7 @@ import BasicReport from '../index';
const
Demo
=
()
=>
{
return
(
<
div
>
<
h3
>
折线图
</
h3
>
<
h3
>
报表
</
h3
>
<
div
style=
{
{
height
:
'600px'
}
}
>
<
BasicReport
params=
{
{
...
...
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