Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
bc265b75
Commit
bc265b75
authored
Oct 23, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接会员评价查询新接口完毕
parent
b879f033
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
40 deletions
+60
-40
index.tsx
...es/comment/query/detailed/components/RecordList/index.tsx
+3
-3
index.tsx
src/pages/comment/query/detailed/index.tsx
+10
-3
index.tsx
src/pages/comment/query/index.tsx
+20
-28
index.tsx
src/pages/comment/query/schema/index.tsx
+27
-6
No files found.
src/pages/comment/query/detailed/components/RecordList/index.tsx
View file @
bc265b75
...
...
@@ -19,15 +19,15 @@ export interface Search {
/**
* 交易时间开始
*/
dealTimeStart
:
string
|
null
//
dealTimeStart: string | null
/**
* 交易时间结束
*/
dealTimeEnd
:
string
|
null
//
dealTimeEnd: string | null
/**
* 评价方名称
*/
memberName
:
string
|
null
//
memberName: string | null
};
export
interface
ListParams
extends
Search
{
...
...
src/pages/comment/query/detailed/index.tsx
View file @
bc265b75
...
...
@@ -3,6 +3,7 @@ import { Tabs, Row, Col, Button } from 'antd';
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
isJSONStr
}
from
'@/utils'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
...
...
@@ -26,6 +27,7 @@ interface EstimateSumItems {
};
const
CommentDetailed
:
React
.
FC
=
()
=>
{
const
{
memberId
,
roleId
}
=
usePageStatus
();
const
[
evaluateSum
,
setEvaluateSum
]
=
useState
<
EstimateSumItems
[]
>
([]);
const
[
evaluatePie
,
setEvaluatePie
]
=
useState
<
{
x
:
string
,
y
:
number
}[]
>
([]);
...
...
@@ -126,7 +128,10 @@ const CommentDetailed: React.FC = () => {
// 获取评价汇总
const
getTradeSummary
=
()
=>
{
PublicApi
.
getMemberPlatformCommentCountSupplyTradeSummary
().
then
(
res
=>
{
PublicApi
.
getMemberPlatformCommentTradeSummary
({
memberId
,
roleId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
evaluate
=
summaryEvaluate
(
res
.
data
.
rows
);
const
evaluatePieData
=
getSummaryEvaluatePie
(
evaluate
);
...
...
@@ -140,9 +145,11 @@ const CommentDetailed: React.FC = () => {
const
getTradeHistory
=
(
params
:
ListParams
):
Promise
<
RecordRes
>
=>
{
const
{
star
,
...
rest
}
=
params
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberPlatformCommentCountSupplyTradeHistoryPage
({
PublicApi
.
getMemberPlatformCommentTradeHistoryPage
({
memberId
,
roleId
,
...
rest
,
starLevel
:
params
.
star
,
starLevel
:
params
.
star
as
string
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
,
totalCount
}
=
res
.
data
;
...
...
src/pages/comment/query/index.tsx
View file @
bc265b75
...
...
@@ -47,7 +47,7 @@ const CommentQuery = () => {
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'
i
d'
,
dataIndex
:
'
memberI
d'
,
align
:
'center'
,
},
{
...
...
@@ -64,62 +64,54 @@ const CommentQuery = () => {
},
{
title
:
'会员类型'
,
dataIndex
:
'memberType'
,
dataIndex
:
'memberType
Name
'
,
align
:
'center'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'
memberRol
e'
,
dataIndex
:
'
roleNam
e'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'会员等级'
,
dataIndex
:
'
memberLevel
'
,
dataIndex
:
'
levelTag
'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<>
{
text
}
</>,
},
{
title
:
'交易满意度'
,
dataIndex
:
'
satisfaction
'
,
dataIndex
:
'
avgStar
'
,
align
:
'center'
,
render
:
text
=>
<
Rate
value=
{
text
}
disabled
/>,
},
{
title
:
'收到评价总数'
,
dataIndex
:
'
count
'
,
dataIndex
:
'
receiveCountTotal
'
,
align
:
'center'
,
},
{
title
:
'最近7天评价数'
,
dataIndex
:
'
day
7'
,
dataIndex
:
'
receiveCount
7'
,
align
:
'center'
,
},
{
title
:
'最近180天评价数'
,
dataIndex
:
'
day
180'
,
dataIndex
:
'
receiveCount
180'
,
align
:
'center'
,
},
];
const
fetchListData
=
(
params
:
any
)
=>
{
// return new Promise((resolve, reject) => {
// PublicApi.getMemberPlatformCommentOrderTradeHistoryPage(params)
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
({
data
:
mock
,
totalCount
:
2
,
});
PublicApi
.
getMemberPlatformCommentTradePage
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
})
.
catch
(()
=>
{
reject
();
});
});
};
...
...
@@ -132,7 +124,7 @@ const CommentQuery = () => {
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
rowKey
:
record
=>
`${record.memberId}+${record.roleId}`
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
...
...
@@ -145,7 +137,7 @@ const CommentQuery = () => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
n
ame'
,
'
memberN
ame'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
...
...
src/pages/comment/query/schema/index.tsx
View file @
bc265b75
...
...
@@ -8,7 +8,7 @@ export const listSearchSchema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
n
ame
:
{
memberN
ame
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
...
...
@@ -26,7 +26,7 @@ export const listSearchSchema: ISchema = {
columns
:
6
,
},
properties
:
{
memberType
Id
:
{
memberType
:
{
type
:
'string'
,
default
:
undefined
,
'x-component-props'
:
{
...
...
@@ -34,7 +34,7 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
orderType
:
{
roleId
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
@@ -43,7 +43,7 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
outerStatus
:
{
memberLevel
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
...
...
@@ -52,10 +52,31 @@ export const listSearchSchema: ISchema = {
allowClear
:
true
,
},
},
innerStatus
:
{
avgStar
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
enum
:
[
{
label
:
'一星'
,
value
:
1
,
},
{
label
:
'二星'
,
value
:
2
,
},
{
label
:
'三星'
,
value
:
3
,
},
{
label
:
'四星'
,
value
:
4
,
},
{
label
:
'五星'
,
value
:
5
,
},
],
'x-component-props'
:
{
placeholder
:
'交易满意度(全部)'
,
allowClear
:
true
,
...
...
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