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
6014c40b
Commit
6014c40b
authored
Aug 18, 2022
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复数据格式导致的报错;修复路径引入导致的报错
parent
0abc23bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
Control.js
...nents/BasicReport/src/ReportsManage/Components/Control.js
+1
-1
ReportsManage.js
...components/BasicReport/src/ReportsManage/ReportsManage.js
+17
-6
No files found.
packages/base-components/BasicReport/src/ReportsManage/Components/Control.js
View file @
6014c40b
...
...
@@ -6,7 +6,7 @@
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Input
,
Select
}
from
'antd'
;
import
{
reportService
}
from
'
@
/api'
;
import
{
reportService
}
from
'
../..
/api'
;
import
{
returnDefaultValueOrConfigs
}
from
'../utils/utils'
;
const
{
Option
}
=
Select
;
...
...
packages/base-components/BasicReport/src/ReportsManage/ReportsManage.js
View file @
6014c40b
...
...
@@ -12,20 +12,26 @@
* @params: <ReportManage
* params={{reportName,pageSize,filterFields,filterValues,state,customerState}}>
*
*
* reportName: 报表名称;
* pageSize: 按需配置,默认加载100;
* filterFields:
*
* 需要默认加载的过滤条件的field,英文逗号分割,与filterValues一一对应;
* filterValues:
*
* 需要默认加载的过滤条件的value,英文逗号分割,与filterFields一一对应;
* state: delete|edit|scan 各种权限;
*
* customerState: ['filters','sortBtn','exportBtn','editBtn','deleteBtn','pagination'];
*
* sortFields: '排序字段1,排序字段2,排序字段3'
* customerState: ['filters','sortBtn','exportBtn','editBtn','deleteBtn','pagination'];
*
*
* sortFields: '排序字段1,排序字段2,排序字段3'
* @config:
* 【数值】 [prefix]_d%|0.00|_d%[suffix]|金额 = 前缀|精度|后缀|金额类的数据(千分位),可分别设置。
* 【标签】 split=, 分隔符。
* 【标签】 split=,
* 分隔符。
*
* 【功能】 功能配置框内,配置需要跳转功能所需参数,type、url是必须功能,需要type判断类型,需要通过url去解析加载组件。
* @type:
...
...
@@ -33,13 +39,16 @@
* 【数值】数值类型的文本
* 【标签】文本渲染成标签,具有不同颜色;
* 【功能】“功能”会在当前页内去展示,会卸载掉列表页,加载功能组件。配置 type +
* url + 自定义字段 的配置项,自行解析加载即可;
*
* url + 自定义字段 的配置项,自行解析加载即可;
* -------------------- 待需求提出后开发 -----------------
*
*
* 【链接】内链外链,点击可跳转;配置规则:配置链接即可;
* 【弹窗】modal弹窗弹出,弹窗内的具体业务自行配置;配置规则:[function_name];[...params];
*
* ------------------------------------------------------
*
* ------------------------------------------------------
* @table:
* 表头:表头需要支持多级表头、合并;
* 列:列支持设置筛选;
...
...
@@ -47,9 +56,11 @@
* @control:
* 固定筛选:拥有固定筛选框,根据配置显示可搜索字段;
*
*
* 可配置筛选框:根据字段配置,将字段设置成筛选条件,枚举出该字段所有值,提供用户进行选择,然后进行筛选;筛选框具体形态可根据配置字段来渲染;
* 导出功能:各类导出功能按钮;
*
*
* 时间筛选框:单表唯一;需要变更,支持多时间参数的筛选
* @state: 参考台账权限 delete 全部权限
* edit 除删除外的权限
...
...
@@ -743,7 +754,7 @@ const ReportsManage = (props) => {
const
handleDate
=
(
obj
)
=>
{
let
_typeObj
=
obj
.
find
((
item
)
=>
item
.
filterRule
===
'日期'
);
setHasDatePicker
(
_typeObj
?
_typeObj
.
fieldAlias
:
''
);
const
_configItems
=
_typeObj
?.
configItems
.
split
(
'|'
)
||
''
;
const
_configItems
=
_typeObj
?.
configItems
.
split
(
'|'
)
||
[]
;
let
_defaultDate
=
_configItems
.
find
((
item
)
=>
item
.
includes
(
'defaultDate='
))
?.
replace
(
'defaultDate='
,
''
)
...
...
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