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
7e486a8a
Commit
7e486a8a
authored
Aug 17, 2022
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复文件引用错误
parent
ab5be8e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
55 deletions
+109
-55
constants.js
packages/base-components/BasicReport/src/api/constants.js
+44
-0
report.js
...ges/base-components/BasicReport/src/api/service/report.js
+14
-12
DatePickerGroup.js
...-components/BasicReport/src/components/DatePickerGroup.js
+0
-0
extraComponents.js
.../base-components/BasicReport/src/extra/extraComponents.js
+1
-1
index.js
packages/base-components/BasicReport/src/index.js
+0
-0
index.less
packages/base-components/BasicReport/src/index.less
+19
-21
utils.js
packages/base-components/BasicReport/src/utils/utils.js
+31
-21
No files found.
packages/base-components/BasicReport/src/api/constants.js
0 → 100644
View file @
7e486a8a
export
const
RESTART_ON_REMOUNT
=
'@@saga-injector/restart-on-remount'
;
export
const
DAEMON
=
'@@saga-injector/daemon'
;
export
const
ONCE_TILL_UNMOUNT
=
'@@saga-injector/once-till-unmount'
;
export
const
FILTER_FOLER_REG
=
/
(
configs|configuration|framework|iframe|Product|product|productex|project|qrcode|threedimensional|video|widgetconfigs
)
/
;
export
const
FILTER_FOLER_WEB5
=
/
(
pages
)
/
;
export
const
SERVICE_APP_GET_UI_META
=
'app.getUIMeta'
;
export
const
SERVICE_APP_LOGIN_MODE
=
{
password
:
'password'
,
dingding
:
'dingding'
,
weixin
:
'weixin'
,
phone
:
'phone'
,
};
export
const
LOGIN_DISPLAY
=
{
Account
:
'Account'
,
WeChart
:
'WeChart'
,
Mobile
:
'Mobile'
,
};
export
const
LOGIN_WAY
=
{
Account
:
'pdw'
,
WeChart
:
'iotWechat'
,
Mobile
:
'iotPhone'
,
};
export
const
WX_REDIRECT_URI
=
'https://panda-water.com/civbase/user/login'
;
export
const
SERVICE_INTERFACE_SUCCESS_CODE
=
0
;
export
const
SERVICE_INTERFACE_PARAMS_EXCEPTION_CODE
=
-
1
;
// 服务参数异常
export
const
SERVICE_INTERFACE_HANDLE_EXCEPTION_CODE
=
-
2
;
// 服务处理异常
export
const
SERVICE_APP_CLOSE_ALL_TABS
=
'app.close.tabs'
;
export
const
REQUEST_HTTP
=
'http'
;
export
const
REQUEST_POP
=
'pop'
;
export
const
REQUEST_METHOD_GET
=
'get'
;
export
const
REQUEST_METHOD_POST
=
'post'
;
export
const
REQUEST_METHOD_PUT
=
'put'
;
export
const
REQUEST_METHOD_DELETE
=
'delete'
;
export
const
RESPONSE_TYPE
=
'blob'
;
packages/base-components/BasicReport/src/api/service/report.js
View file @
7e486a8a
...
...
@@ -5,7 +5,7 @@
** 菜单参数列表:*变量名*(变量说明,数据类型,是否必填,取值范围)
**/
import
{
request
}
from
'@wisdom-utils/utils'
;
import
*
as
constants
from
'../
../
constants'
;
import
*
as
constants
from
'../constants'
;
const
BASEURL
=
'/PandaAssets/Assets/ReportManager'
;
export
const
API
=
{
...
...
@@ -97,12 +97,13 @@ const reportService = {
type
:
constants
.
REQUEST_METHOD_POST
,
},
};
export
const
submitReportData
=
(
params
,
data
)
=>
request
({
url
:
API
.
UPDATE_REPORT_DATA
,
method
:
'post'
,
params
,
data
,
});
export
const
submitReportData
=
(
params
,
data
)
=>
request
({
url
:
API
.
UPDATE_REPORT_DATA
,
method
:
'post'
,
params
,
data
,
});
export
const
exportAccountData
=
(
options
,
params
,
data
)
=>
request
({
url
:
API
.
EXPORT_ACCOUNT_DATA
,
...
...
@@ -111,9 +112,10 @@ export const exportAccountData = (options, params, data) =>
params
,
data
,
});
export
const
addReportDetailInfoIndex
=
(
data
)
=>
request
({
url
:
API
.
ADD_REPORT_DETAIL_INFO_INDEX
,
method
:
'post'
,
data
,
});
export
const
addReportDetailInfoIndex
=
(
data
)
=>
request
({
url
:
API
.
ADD_REPORT_DETAIL_INFO_INDEX
,
method
:
'post'
,
data
,
});
export
default
reportService
;
packages/base-components/BasicReport/src/components/DatePickerGroup.js
View file @
7e486a8a
This diff is collapsed.
Click to expand it.
packages/base-components/BasicReport/src/extra/extraComponents.js
View file @
7e486a8a
...
...
@@ -7,6 +7,6 @@ const extraComponents = {
returnImage
:
(
data
)
=>
{
return
<
img
width
=
{
200
}
height
=
{
200
}
src
=
{
pic
}
alt
=
{
data
.
alt
}
/>
;
},
default
:
()
=>
<
span
>
若需要使用弹窗功能,请开发或配置功能函数
<
/span
>
default
:
()
=>
<
span
>
若需要使用弹窗功能,请开发或配置功能函数
<
/span>
,
};
export
default
extraComponents
;
packages/base-components/BasicReport/src/index.js
View file @
7e486a8a
This diff is collapsed.
Click to expand it.
packages/base-components/BasicReport/src/index.less
View file @
7e486a8a
@import
"~antd/es/style/themes/default.less"
;
@import
'~antd/es/style/themes/default.less'
;
.lackParams {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.reportManage {
padding: 8px;
height: 100%;
display: flex;
flex-direction: column;
height: 100%;
padding: 8px;
.contentWrapper {
display: flex;
...
...
@@ -20,12 +20,12 @@
height: 100%;
.controlRow {
background: #ffffff;
padding: 6px;
border-radius: 4px;
margin-bottom: 4px;
display: flex;
flex-direction: row;
margin-bottom: 4px;
padding: 6px;
background: #ffffff;
border-radius: 4px;
}
.tableContent {
...
...
@@ -46,8 +46,8 @@
}
.deleteButton {
cursor: pointer;
color: rgb(255, 0, 0);
cursor: pointer;
&:hover {
//color: rgb(24, 144, 255);
...
...
@@ -56,25 +56,24 @@
}
.spinWrapper {
width: 100vw;
height: 60vh;
display: flex;
align-items: center;
justify-content: center;
align-items: center
width: 100vw;
height: 60vh;
}
:global {
.@{ant-prefix}-table-container {
height: 100%;
& > .@{ant-prefix}-table-body {
border-bottom: 1px solid #dbe7fb;
border-right: 1px solid #dbe7fb;
border-bottom: 1px solid #dbe7fb;
}
.@{ant-prefix}-table-body {
flex: 1
flex: 1
;
}
.@{ant-prefix}-table-summary > table > tfoot > tr > td {
...
...
@@ -97,7 +96,6 @@
}
}
.link {
cursor: pointer;
...
...
@@ -115,7 +113,7 @@
}
.prefixOrSuffix {
color: rgba(0, 0, 0, .65);
color: rgba(0, 0, 0,
0
.65);
font-size: 10px;
}
...
...
@@ -128,14 +126,14 @@
::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
background: #
F2F2F
2;
background: #
f2f2f
2;
border-radius: 10px;
}
::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
background: #dcdcdc;
border-radius: 5px;
background: #DCDCDC;
}
}
}
packages/base-components/BasicReport/src/utils/utils.js
View file @
7e486a8a
...
...
@@ -13,14 +13,14 @@ const isArray = (arr) => {
const
hasMoney
=
(
configItems
)
=>
{
if
(
!
configItems
)
return
false
;
let
_items
=
configItems
.
split
(
'|'
);
return
!!
_items
.
find
(
item
=>
item
===
'金额'
);
return
!!
_items
.
find
(
(
item
)
=>
item
===
'金额'
);
};
/**
*
@D
escription: 用来在summary中处理数值的配置
*
@P
arams: 参数描述
*
@D
ate: 2022/8/10
*
@A
uthor: ChenLong
*
*
/
*
@d
escription: 用来在summary中处理数值的配置
*
@p
arams: 参数描述
*
@d
ate: 2022/8/10
*
@a
uthor: ChenLong
*/
const
returnHandledNumber
=
(
configItems
,
num
)
=>
{
// 精度、前缀、后缀、倍率
// $_d|_d%|_d*0.0001|金额|0.00
...
...
@@ -31,7 +31,7 @@ const returnHandledNumber = (configItems, num) => {
let
template
=
'_d'
;
let
precision
=
0
;
let
rate
=
1
;
_items
.
forEach
(
item
=>
{
_items
.
forEach
(
(
item
)
=>
{
let
_arr
=
[];
if
(
item
.
match
(
/_d
[^\*]
/
))
{
// 后缀
...
...
@@ -46,30 +46,40 @@ const returnHandledNumber = (configItems, num) => {
}
});
// 可能存在NaN的问题
let
final
=
_items
.
includes
(
'金额'
)
?
Number
((
num
*
rate
).
toFixed
(
precision
)).
toLocaleString
()
:
Number
((
num
*
rate
).
toFixed
(
precision
));
let
final
=
_items
.
includes
(
'金额'
)
?
Number
((
num
*
rate
).
toFixed
(
precision
)).
toLocaleString
()
:
Number
((
num
*
rate
).
toFixed
(
precision
));
return
template
.
replace
(
/_d/
,
final
);
};
/**
* @Description: 返回configItems内配置的默认值、默认模式等等
* @Params: 参数描述
* @Date: 2022/8/12
* @Author: ChenLong
* @params:
* configItems 报表字段的配置 例如 defaultValue=智慧水务 defaultDateModel=customer|defaultDateValue=2022-01-01,2022-12-31;
* keysArray 所需要返回的值的key的集合,比如你需要获取configItems中的’defaultValue‘,那么keysArray=['defaultValue'];
* @Returns:
* defaultValue 通用参数 默认值
* @description: 返回configItems内配置的默认值、默认模式等等
* @params: 参数描述
* @date: 2022/8/12
* @author: ChenLong
* @params:
* configItems 报表字段的配置 例如 defaultValue=智慧水务
* defaultDateModel=customer|defaultDateValue=2022-01-01,2022-12-31;
* keysArray
* 所需要返回的值的key的集合,比如你需要获取configItems中的’defaultValue‘,那么keysArray=['defaultValue'];
* @returns:
* defaultValue 通用参数 默认值
* defaultDateModel 时间参数 默认模式
* defaultDateValue 时间参数 默认时间
*
*
/
*/
const
returnDefaultValueOrConfigs
=
(
configItems
=
''
,
keysArray
=
[])
=>
{
let
_map
=
{};
let
_configItemsArray
=
configItems
.
split
(
'|'
);
keysArray
.
forEach
(
key
=>
{
_map
[
key
]
=
_configItemsArray
.
find
(
item
=>
item
.
includes
(
`
${
key
}
=`
))?.
replace
(
`
${
key
}
=`
,
''
);
keysArray
.
forEach
(
(
key
)
=>
{
_map
[
key
]
=
_configItemsArray
.
find
(
(
item
)
=>
item
.
includes
(
`
${
key
}
=`
))?.
replace
(
`
${
key
}
=`
,
''
);
});
return
_map
;
};
export
{
isObject
,
isString
,
isNumber
,
hasMoney
,
isArray
,
returnHandledNumber
,
returnDefaultValueOrConfigs
,
isObject
,
isString
,
isNumber
,
hasMoney
,
isArray
,
returnHandledNumber
,
returnDefaultValueOrConfigs
,
};
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