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
linweijiong
jinfa-platform
Commits
5b67679d
Commit
5b67679d
authored
Jun 10, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页以及考评搜索条件
parent
3b83b937
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
9 deletions
+32
-9
PurchaseCenter.tsx
src/pages/home/components/Centers/PurchaseCenter.tsx
+24
-4
useViewRequest.tsx
src/pages/home/hooks/useViewRequest.tsx
+1
-1
index.tsx
src/pages/member/memberEvaluate/schema/index.tsx
+2
-0
schema.tsx
src/pages/member/memberEvaluate/tobeEvaluate/schema.tsx
+2
-2
schema.tsx
...r/memberRectification/tobeConfirmRectification/schema.tsx
+1
-1
auth.ts
src/utils/auth.ts
+2
-1
No files found.
src/pages/home/components/Centers/PurchaseCenter.tsx
View file @
5b67679d
import
React
,
{
Fragment
,
useMemo
}
from
'react'
;
import
React
,
{
Fragment
,
use
Effect
,
use
Memo
}
from
'react'
;
import
styles
from
'./center.less'
;
import
styles
from
'./center.less'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
import
{
Link
}
from
'umi'
import
{
Link
}
from
'umi'
...
@@ -8,10 +8,11 @@ import useViewRequest from '../../hooks/useViewRequest';
...
@@ -8,10 +8,11 @@ import useViewRequest from '../../hooks/useViewRequest';
import
{
GetReportMemberHomeGetPurchaseTallyResponse
}
from
'@/services/ReportV2Api'
;
import
{
GetReportMemberHomeGetPurchaseTallyResponse
}
from
'@/services/ReportV2Api'
;
import
{
BellOutlined
}
from
'@ant-design/icons'
;
import
{
BellOutlined
}
from
'@ant-design/icons'
;
import
{
Button
}
from
'antd'
;
import
{
Button
}
from
'antd'
;
import
{
getAuth
}
from
'@/utils/auth'
;
interface
Iprops
{};
interface
Iprops
{};
const
{
StaticsDataList
}
=
Layout
const
{
StaticsDataList
}
=
Layout
const
url
=
'/memberCenter/
handling/assign/que
ry'
;
const
url
=
'/memberCenter/
procurementAbility/purchaseInquiry/inqui
ry'
;
const
KEY_TITLE
=
{
const
KEY_TITLE
=
{
purchaseInquiryList
:
'采购询价 '
,
purchaseInquiryList
:
'采购询价 '
,
...
@@ -24,9 +25,28 @@ const KEY_TITLE = {
...
@@ -24,9 +25,28 @@ const KEY_TITLE = {
needPlanList
:
'需求计划'
,
needPlanList
:
'需求计划'
,
purchasePlanList
:
'采购计划'
purchasePlanList
:
'采购计划'
}
}
/** memberType 是否是企业会员或是企业个人会员 */
const
isBusiness
=
[
1
,
2
];
/** memberRoleType 是否是服务消费者 */
const
isConsumer
=
2
;
const
PurchaseCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
PurchaseCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
}
=
useViewRequest
<
GetReportMemberHomeGetPurchaseTallyResponse
,
any
>
(
PublicApi
.
getReportMemberHomeGetPurchaseTally
,
{})
const
{
loading
,
responseData
,
filterEmptyList
,
isError
,
ref
,
inViewPort
}
=
useViewRequest
<
GetReportMemberHomeGetPurchaseTallyResponse
,
any
>
(
PublicApi
.
getReportMemberHomeGetPurchaseTally
,
{})
const
auth
=
getAuth
()
useEffect
(()
=>
{
if
(
!
inViewPort
||
(
!
isBusiness
.
includes
(
auth
.
memberType
))
||
isConsumer
!==
auth
.
memberRoleType
)
{
return
;
}
console
.
log
((
!
isBusiness
.
includes
(
auth
.
memberType
)),
isConsumer
!==
auth
.
memberRoleType
)
async
function
findCurrMemberPurchase
()
{
const
{
data
,
code
}
=
await
PublicApi
.
getTemplateWebMemberPurchaseWebFindCurrMemberPurchase
();
if
(
code
===
code
)
{
return
data
?.
id
}
return
null
}
findCurrMemberPurchase
()
},
[
inViewPort
,
auth
])
return
(
return
(
<
Layout
<
Layout
...
...
src/pages/home/hooks/useViewRequest.tsx
View file @
5b67679d
...
@@ -69,7 +69,7 @@ function useViewRequest<T, P>(fn: (postData: P) => Promise<ResponseDataType & {
...
@@ -69,7 +69,7 @@ function useViewRequest<T, P>(fn: (postData: P) => Promise<ResponseDataType & {
console
.
log
(
"result"
,
result
);
console
.
log
(
"result"
,
result
);
return
result
;
return
result
;
}
, [responseData])
}
, [responseData])
return
{
loading
,
isError
,
ref
,
hasRequest
,
refresh
,
responseData
,
filterEmptyList
}
return
{
loading
,
isError
,
ref
,
hasRequest
,
refresh
,
responseData
,
filterEmptyList
,
inViewPort
}
}
}
export default useViewRequest
export default useViewRequest
src/pages/member/memberEvaluate/schema/index.tsx
View file @
5b67679d
...
@@ -16,6 +16,8 @@ export const evaluationListSchema: ISchema = {
...
@@ -16,6 +16,8 @@ export const evaluationListSchema: ISchema = {
'x-component'
:
'Mega-Layout'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
'x-component-props'
:
{
grid
:
true
,
grid
:
true
,
columns
:
3
,
},
},
properties
:
{
properties
:
{
ctl
:
{
ctl
:
{
...
...
src/pages/member/memberEvaluate/tobeEvaluate/schema.tsx
View file @
5b67679d
...
@@ -27,7 +27,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
...
@@ -27,7 +27,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
grid
:
true
,
grid
:
true
,
full
:
true
,
full
:
true
,
autoRow
:
true
,
autoRow
:
true
,
columns
:
3
,
columns
:
6
,
},
},
properties
:
{
properties
:
{
subject
:
{
subject
:
{
...
@@ -36,7 +36,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
...
@@ -36,7 +36,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
placeholder
:
'考评主题'
,
placeholder
:
'考评主题'
,
allowClear
:
true
,
allowClear
:
true
,
style
:
{
style
:
{
width
:
1
60
,
width
:
1
45
,
},
},
},
},
},
},
...
...
src/pages/member/memberRectification/tobeConfirmRectification/schema.tsx
View file @
5b67679d
...
@@ -66,7 +66,7 @@ export const querySchema: ISchema = {
...
@@ -66,7 +66,7 @@ export const querySchema: ISchema = {
columns
:
6
,
columns
:
6
,
},
},
properties
:
{
properties
:
{
su
mmary
:
{
su
bject
:
{
type
:
'string'
,
type
:
'string'
,
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
'通知单摘要'
,
placeholder
:
'通知单摘要'
,
...
...
src/utils/auth.ts
View file @
5b67679d
import
{
isDev
}
from
'@/constants'
import
{
isDev
}
from
'@/constants'
import
{
GetMemberLoginRegetResponse
}
from
'@/services/memberApi'
export
interface
AuthInfo
{
export
interface
AuthInfo
{
userId
:
number
,
userId
:
number
,
...
@@ -11,7 +12,7 @@ export const setAuth = (info: AuthInfo) => {
...
@@ -11,7 +12,7 @@ export const setAuth = (info: AuthInfo) => {
window
.
localStorage
.
setItem
(
'auth'
,
JSON
.
stringify
(
info
))
window
.
localStorage
.
setItem
(
'auth'
,
JSON
.
stringify
(
info
))
}
}
export
const
getAuth
=
()
=>
{
export
const
getAuth
=
()
:
Partial
<
GetMemberLoginRegetResponse
>
|
null
=>
{
try
{
try
{
const
localAuth
=
window
.
localStorage
.
getItem
(
'auth'
)
const
localAuth
=
window
.
localStorage
.
getItem
(
'auth'
)
return
localAuth
?
JSON
.
parse
(
localAuth
)
:
null
return
localAuth
?
JSON
.
parse
(
localAuth
)
:
null
...
...
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