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
黄庭坚
jinfa-platform
Commits
9c3e9605
Commit
9c3e9605
authored
Jan 11, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 调整售后评价组件布局
parent
00fc0485
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
36 deletions
+43
-36
index.less
src/pages/afterService/components/Score/index.less
+5
-3
index.tsx
src/pages/afterService/components/Score/index.tsx
+38
-33
No files found.
src/pages/afterService/components/Score/index.less
View file @
9c3e9605
...
...
@@ -2,15 +2,17 @@
.evaluate {
.score {
position: absolute;
position: relative;
padding-right: 90px;
display: inline-block;
&-left {
padding-right: 90px
;
display: inline-block
;
}
&-right {
position: absolute;
top: -
50
%;
top: -
76
%;
right: 0;
width: 80px;
flex-shrink: 0;
...
...
src/pages/afterService/components/Score/index.tsx
View file @
9c3e9605
...
...
@@ -7,7 +7,7 @@
*/
import
React
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Row
,
Col
,
Descriptions
}
from
'antd'
;
import
{
Row
,
Col
,
Form
}
from
'antd'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
{
Gauge
}
from
'@/components/Charts'
;
import
styles
from
'./index.less'
;
...
...
@@ -48,6 +48,11 @@ const Score: React.FC<ScoreProps> = ({
...
rest
})
=>
{
const
intl
=
useIntl
();
const
formItemLayout
=
{
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
18
},
};
return
(
<
MellowCard
...
...
@@ -56,40 +61,40 @@ const Score: React.FC<ScoreProps> = ({
{
...
rest
}
>
<
Row
gutter=
{
40
}
>
<
Col
span=
{
8
}
>
<
div
className=
{
styles
.
score
}
>
<
div
className=
{
styles
[
'score-left'
]
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.Score.score'
},
{
default
:
'售后满意度'
})
}
>
<
span
className=
{
styles
[
'score-star
'
]
}
>
{
`${score}${intl.formatMessage({ id: 'afterService.components.Score.score.unit' }, { default: '分' })}`
}
</
span
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
<
div
className=
{
styles
[
'score-right'
]
}
>
<
Gauge
title=
""
height=
{
90
}
percent=
{
+
(
score
/
FULL_SCORE
*
100
).
toFixed
(
2
)
}
formatter
=
{
()
=>
''
}
formatContent=
{
()
=>
''
}
color=
{
COLOR_MAP
[
score
]
}
strokeWidth=
{
5
}
/
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.Score.score'
},
{
default
:
'售后满意度'
})
}
labelAlign=
"left"
{
...
formItemLayout
}
>
<
div
className=
{
styles
.
score
}
>
<
div
className=
{
styles
[
'score-left
'
]
}
>
<
span
className=
{
styles
[
'score-star'
]
}
>
{
`${score}${intl.formatMessage({ id: 'afterService.components.Score.score.unit' }, { default: '分' })}`
}
</
span
>
</
div
>
<
div
className=
{
styles
[
'score-right'
]
}
>
<
Gauge
title=
""
height=
{
90
}
percent=
{
+
(
score
/
FULL_SCORE
*
100
).
toFixed
(
2
)
}
formatter=
{
()
=>
''
}
formatContent
=
{
()
=>
''
}
color=
{
COLOR_MAP
[
score
]
}
strokeWidth=
{
5
}
/>
</
div
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
1
6
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.Score.content'
},
{
default
:
'售后评价'
})
}
>
{
content
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Col
span=
{
1
2
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.Score.content'
},
{
default
:
'售后评价'
})
}
labelAlign=
"left"
{
...
formItemLayout
}
>
{
content
}
</
Form
.
Item
>
</
Col
>
</
Row
>
</
MellowCard
>
...
...
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