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
shenshaokai
jinfa-platform
Commits
2aa29621
Commit
2aa29621
authored
Jun 18, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改消息接口以及考评bug
parent
3ed9ad5c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
81 additions
and
65 deletions
+81
-65
useGetDetailCommon.tsx
src/pages/member/memberEvaluate/hooks/useGetDetailCommon.tsx
+13
-8
index.tsx
src/pages/member/memberEvaluate/tobeInformed/index.tsx
+1
-0
index.tsx
src/pages/member/memberEvaluate/tobeReviewI/index.tsx
+10
-9
index.tsx
src/pages/member/memberEvaluate/tobeReviewII/index.tsx
+11
-9
detail.tsx
src/pages/member/memberEvaluate/tobeSubmitSummary/detail.tsx
+3
-2
columns.tsx
src/pages/member/memberQuery/evaluate/common/columns.tsx
+8
-5
detail.tsx
src/pages/member/memberQuery/evaluate/detail.tsx
+1
-1
index.tsx
src/pages/systemSetting/message/index.tsx
+30
-30
api.ts
src/services/api.ts
+3
-1
ytt.config.ts
ytt.config.ts
+1
-0
No files found.
src/pages/member/memberEvaluate/hooks/useGetDetailCommon.tsx
View file @
2aa29621
import
React
,
{
useMemo
,
useState
}
from
'react'
;
import
{
Progress
}
from
'antd'
;
import
{
initial
}
from
'lodash
'
;
import
{
GetMemberAppraisalResultGetResponse
,
GetMemberAppraisalSummaryGetResponse
}
from
'@/services/MemberV2Api
'
;
/**
* 获取考评详情页的公共部分
*/
type
Options
=
{
blackList
:
string
[]
initialValue
?:
any
,
initialValue
?:
(
GetMemberAppraisalSummaryGetResponse
|
GetMemberAppraisalResultGetResponse
)
&
{
name
:
string
,
upperName
:
string
,
notifyMember
:
1
|
0
,
},
}
function
useGetDetailCommon
(
options
:
Options
)
{
const
{
blackList
,
initialValue
=
{}
}
=
options
;
const
{
blackList
,
initialValue
=
{}
as
Options
[
'initialValue'
]
}
=
options
;
const
[
anchorHeader
]
=
useState
(()
=>
{
const
temp
=
[
{
...
...
@@ -39,14 +43,15 @@ function useGetDetailCommon(options: Options) {
});
const
basicInfoList
=
useMemo
(()
=>
{
const
isUpperMember
=
typeof
initialValue
?.
upperName
!==
'undefined'
return
[
{
title
:
'考评单号'
,
value
:
initialValue
?.
appraisalNo
,
},
{
title
:
'
会员名称'
,
value
:
initialValue
?.
n
ame
,
title
:
!
isUpperMember
?
'会员名称'
:
'上级
会员名称'
,
value
:
!
isUpperMember
?
initialValue
?.
name
:
initialValue
?.
upperN
ame
,
},
{
title
:
'附件'
,
...
...
@@ -104,11 +109,11 @@ function useGetDetailCommon(options: Options) {
{
title
:
'附件'
,
value
:
(
<
div
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,}
}
>
{
initialValue
?.
resultAttachments
?.
map
((
_row
)
=>
{
return
(
<
a
key=
{
_row
.
url
}
href=
{
_row
.
url
}
>
{
_row
.
name
}
</
a
>
<
a
style=
{
{
marginBottom
:
'4px'
}
}
key=
{
_row
.
url
}
href=
{
_row
.
url
}
>
{
_row
.
name
}
</
a
>
)
})
}
...
...
@@ -121,7 +126,7 @@ function useGetDetailCommon(options: Options) {
},
{
title
:
'通知考评结果'
,
value
:
initialValue
?.
notifyMember
?
'是'
:
'否
'
value
:
initialValue
?.
totalScore
!==
null
?
(
initialValue
?.
notifyMember
?
'是'
:
'否'
)
:
'
'
}
]
},
[
initialValue
])
...
...
src/pages/member/memberEvaluate/tobeInformed/index.tsx
View file @
2aa29621
...
...
@@ -60,6 +60,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
return
(
<
Card
>
<
CustomizeQueryList
ref=
{
ref
}
columns=
{
columns
}
rowSelection=
{
rowSelection
as
any
}
schema=
{
evaluationListSchema
}
...
...
src/pages/member/memberEvaluate/tobeReviewI/index.tsx
View file @
2aa29621
...
...
@@ -13,7 +13,7 @@ import { Link } from 'umi';
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
const
defaultColumns
=
setColumnsByLinks
({
detail
:
'/memberCenter/memberAbility/memberEvaluate/tobeReviewI'
,
detail
:
'/memberCenter/memberAbility/memberEvaluate/tobeReviewI
/detail
'
,
});
interface
Iprops
{};
...
...
@@ -36,17 +36,17 @@ const List: React.FC<Iprops> = (props: Iprops) => {
const
controllerBtns
=
(
<
Space
>
<
Button
loading=
{
submitLoading
}
onClick=
{
()
=>
handleBatch
Remov
e
(
rowController
.
selectedRowKeys
)
}
type=
"ghost"
>
批量审核通过
</
Button
>
<
Button
loading=
{
submitLoading
}
onClick=
{
()
=>
handleBatch
Updat
e
(
rowController
.
selectedRowKeys
)
}
type=
"ghost"
>
批量审核通过
</
Button
>
</
Space
>
)
const
handleBatch
Remov
e
=
async
(
ids
:
number
[])
=>
{
//
setSubmitLoading(true)
// const { code, data } = await PublicApi.postMemberAppraisalDelete
({ids: ids});
//
setSubmitLoading(false)
//
if (code === 1000) {
//
ref.current?.submit();
//
}
const
handleBatch
Updat
e
=
async
(
ids
:
number
[])
=>
{
setSubmitLoading
(
true
)
const
{
code
,
data
}
=
await
PublicApi
.
postMemberAppraisalWaitAuditOneAuditBatch
({
ids
:
ids
});
setSubmitLoading
(
false
)
if
(
code
===
1000
)
{
ref
.
current
?.
submit
();
}
}
const
handleFetch
=
async
(
params
:
GetMemberAppraisalWaitAuditOnePageRequest
)
=>
{
...
...
@@ -57,6 +57,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
return
(
<
Card
>
<
CustomizeQueryList
ref=
{
ref
}
columns=
{
columns
}
rowSelection=
{
rowSelection
as
any
}
schema=
{
evaluationListSchema
}
...
...
src/pages/member/memberEvaluate/tobeReviewII/index.tsx
View file @
2aa29621
...
...
@@ -13,7 +13,7 @@ import { Link } from 'umi';
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
const
defaultColumns
=
setColumnsByLinks
({
detail
:
'/memberCenter/memberAbility/memberEvaluate/tobeReviewII'
,
detail
:
'/memberCenter/memberAbility/memberEvaluate/tobeReviewII
/detail
'
,
});
interface
Iprops
{};
...
...
@@ -36,17 +36,18 @@ const List: React.FC<Iprops> = (props: Iprops) => {
const
controllerBtns
=
(
<
Space
>
<
Button
loading=
{
submitLoading
}
onClick=
{
()
=>
handleBatch
Remov
e
(
rowController
.
selectedRowKeys
)
}
>
批量审核通过
</
Button
>
<
Button
loading=
{
submitLoading
}
onClick=
{
()
=>
handleBatch
Updat
e
(
rowController
.
selectedRowKeys
)
}
>
批量审核通过
</
Button
>
</
Space
>
)
const
handleBatchRemove
=
async
(
ids
:
number
[])
=>
{
// setSubmitLoading(true)
// const { code, data } = await PublicApi.postMemberAppraisalDelete({ids: ids});
// setSubmitLoading(false)
// if (code === 1000) {
// ref.current?.submit();
// }
const
handleBatchUpdate
=
async
(
ids
:
number
[])
=>
{
console
.
log
(
123
);
setSubmitLoading
(
true
)
const
{
code
,
data
}
=
await
PublicApi
.
postMemberAppraisalWaitAuditTwoAuditBatch
({
ids
:
ids
});
setSubmitLoading
(
false
)
if
(
code
===
1000
)
{
ref
.
current
?.
submit
();
}
}
const
handleFetch
=
async
(
params
:
GetMemberAppraisalWaitAuditTwoPageRequest
)
=>
{
...
...
@@ -57,6 +58,7 @@ const List: React.FC<Iprops> = (props: Iprops) => {
return
(
<
Card
>
<
CustomizeQueryList
ref=
{
ref
}
columns=
{
columns
}
rowSelection=
{
rowSelection
as
any
}
schema=
{
evaluationListSchema
}
...
...
src/pages/member/memberEvaluate/tobeSubmitSummary/detail.tsx
View file @
2aa29621
...
...
@@ -22,6 +22,7 @@ import useInitialValue from '../../common/hooks/useInitialValue';
import
{
findLastIndexFlowState
}
from
'@/utils'
;
import
FlowRecords
from
'@/components/FlowRecords'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
history
}
from
'umi'
;
type
EditDataType
=
{
appraisalId
:
number
...
...
@@ -124,7 +125,6 @@ const TobeEvaluateDetail = () => {
}
const
resultOnSubmit
=
async
(
value
:
SubmitData
)
=>
{
console
.
log
(
value
);
setSubmitLoading
(
true
)
const
postData
=
{
id
:
id
,
...
...
@@ -145,8 +145,9 @@ const TobeEvaluateDetail = () => {
const
{
code
,
data
}
=
await
PublicApi
.
postMemberAppraisalWaitSubmitSubmit
(
postData
as
any
);
setSubmitLoading
(
false
)
if
(
code
===
1000
)
{
refresh
(
params
);
//
refresh(params);
resultToggle
(
false
);
history
.
goBack
();
}
}
...
...
src/pages/member/memberQuery/evaluate/common/columns.tsx
View file @
2aa29621
import
moment
from
"moment"
;
import
React
from
"react"
import
{
Link
}
from
'umi'
import
{
Link
}
from
'umi'
;
const
format
=
'YYYY-MM-DD'
;
export
const
commonColumns
=
[
{
title
:
'考评单号/主题'
,
dataIndex
:
'des'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
}
}
>
<
Link
to=
{
`/memberCenter/memberAbility/profile/memberEvaluate/detail?id=${record.id}`
}
>
{
record
.
id
}
</
Link
>
<
Link
to=
{
`/memberCenter/memberAbility/profile/memberEvaluate/detail?id=${record.id}`
}
>
{
record
.
appraisalNo
}
</
Link
>
<
p
>
{
record
.
subject
}
</
p
>
</
div
>
)
...
...
@@ -17,7 +19,7 @@ export const commonColumns = [
},
{
title
:
'会员名称'
,
dataIndex
:
'
n
ame'
,
dataIndex
:
'
upperN
ame'
,
},
{
title
:
'考评范围'
,
...
...
@@ -33,10 +35,11 @@ export const commonColumns = [
{
title
:
'考评完成时间'
,
dataIndex
:
'completeDay'
,
sorter
:
(
_a
,
_b
)
=>
_a
.
date
-
_b
.
date
,
sorter
:
(
_a
,
_b
)
=>
moment
(
_a
.
completeDay
,
format
).
valueOf
()
-
moment
(
_b
.
completeDay
,
format
).
valueOf
()
,
},
{
title
:
'考评最终分'
,
dataIndex
:
'totalScore'
,
sorter
:
(
_a
,
_b
)
=>
_a
.
totalScore
-
_b
.
totalScore
}
]
src/pages/member/memberQuery/evaluate/detail.tsx
View file @
2aa29621
...
...
@@ -15,7 +15,7 @@ const EvaluateDetail = () => {
const
{
id
}
=
usePageStatus
();
const
params
=
useMemo
(()
=>
{
return
id
?
{
id
:
id
.
toString
()
}
:
null
},
[
id
]);
const
{
loading
,
initialValue
}
=
useInitialValue
<
GetMemberAppraisalSummaryGetResponse
,
{
id
:
string
}
>
(
PublicApi
.
getMemberAppraisalResultGet
,
params
)
const
{
anchorHeader
,
basicInfoList
,
evaluateResultColumn
}
=
useGetDetailCommon
({
blackList
:
[
'pro
c
ess'
,
'record'
],
initialValue
:
initialValue
})
const
{
anchorHeader
,
basicInfoList
,
evaluateResultColumn
}
=
useGetDetailCommon
({
blackList
:
[
'pro
gr
ess'
,
'record'
],
initialValue
:
initialValue
})
return
(
<
Spin
spinning=
{
loading
}
>
...
...
src/pages/systemSetting/message/index.tsx
View file @
2aa29621
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Card
,
List
,
Avatar
,
Button
}
from
'antd'
;
import
styles
from
'./index.less'
...
...
@@ -9,6 +9,7 @@ import moment from 'moment';
import
msg_system
from
'@/assets/imgs/msg_system.png'
import
msg_platform
from
'@/assets/imgs/msg_platform.png'
;
import
{
BookOutlined
,
ReadOutlined
}
from
'@ant-design/icons'
;
import
{
GetMessageMessageMemberPageRequest
}
from
'@/services/MessageV2Api'
;
const
Message
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({
totalCount
:
0
,
data
:
[]})
...
...
@@ -17,47 +18,46 @@ const Message: React.FC<{}> = () => {
pageSize
:
10
,
})
useEffect
(()
=>
{
// @ts-ignore
getList
(
pagination
)
},
[])
const
getList
=
(
params
)
=>
{
PublicApi
.
getReportMessageMemberPage
(
params
).
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
setDataSource
(
data
)
}
})
}
const
getList
=
useCallback
(
async
(
params
:
GetMessageMessageMemberPageRequest
)
=>
{
const
{
data
,
code
}
=
await
PublicApi
.
getMessageMessageMemberPage
(
params
);
if
(
code
===
1000
)
{
setDataSource
(
data
)
}
},
[])
const
handlePaginationChange
=
(
page
,
pageSize
)
=>
{
const
handlePaginationChange
=
(
page
:
number
,
pageSize
:
number
)
=>
{
setPagination
({
current
:
page
,
pageSize
});
getList
({
current
:
page
,
pageSize
})
getList
({
current
:
page
.
toString
(),
pageSize
:
pageSize
.
toString
()
})
}
const
handleRead
=
(
id
,
url
:
string
)
=>
{
PublicApi
.
postReportMessageMemberRead
({
id
:
id
},
{
ctlType
:
'none'
})
.
then
((
data
)
=>
{
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
}
else
{
history
.
push
(
url
);
}
const
handleRead
=
async
(
id
:
number
,
url
:
string
)
=>
{
const
{
data
,
code
}
=
await
PublicApi
.
postReportMessageMemberRead
({
id
:
id
},
{
ctlType
:
'none'
})
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
}
else
{
getList
(
pagination
);
history
.
push
(
url
);
}
})
}
else
{
getList
({
current
:
pagination
.
current
.
toString
(),
pageSize
:
pagination
.
pageSize
.
toString
()
})
}
}
const
handleAllMessageRead
=
()
=>
{
PublicApi
.
postReportMessageMemberReadAll
()
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
getList
(
pagination
)
}
})
const
handleAllMessageRead
=
async
()
=>
{
const
{
data
,
code
}
=
await
PublicApi
.
postMessageMessageMemberReadAll
()
if
(
code
===
1000
)
{
getList
({
current
:
pagination
.
current
.
toString
(),
pageSize
:
pagination
.
pageSize
.
toString
()
})
}
}
const
renderMessage
=
(
data
)
=>
{
...
...
src/services/api.ts
View file @
2aa29621
...
...
@@ -24,6 +24,7 @@ import * as TemplateV2Api from './TemplateV2Api';
import
*
as
MemberV2Api
from
'./MemberV2Api'
;
import
*
as
ReportV2Api
from
'./ReportV2Api'
;
import
*
as
EnhanceV2Api
from
'./EnhanceV2Api'
;
import
*
as
MessageV2
from
'./MessageV2Api'
/**
...
...
@@ -60,5 +61,6 @@ export const PublicApi = {
...
TemplateV2Api
,
...
MemberV2Api
,
...
ReportV2Api
,
...
EnhanceV2Api
...
EnhanceV2Api
,
...
MessageV2
}
ytt.config.ts
View file @
2aa29621
...
...
@@ -26,6 +26,7 @@ const tokenList = [
{
name
:
'MemberV2'
,
token
:
'87f86a297246fbf1c0dff7d34f13729cb194935a95db077a5009ac4ea48cea6f'
,
categoryIds
:
[
0
]},
//会员服务 V2
{
name
:
'ReportV2'
,
token
:
'dab50c384c27f1c981a03f2c44ad76d1e7e1f60b4520bd279cea67f5cf146cee'
,
categoryIds
:
[
0
]},
// 报表服务v2 首页
{
name
:
'EnhanceV2'
,
token
:
'71b97616a81866ade2731437ca121e288b1dd8331dce4b5c1ccaacb176c16580'
,
categoryIds
:
[
0
],
},
// 加工服务v2
{
name
:
'MessageV2'
,
token
:
'69a667ec9861e8bdc25b89238d0b908a2123d9fce26e72fec3cdf6cd0b1f2681'
,
categoryIds
:
[
0
],
},
// 消息中心v2
]
...
...
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