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
42462fe1
Commit
42462fe1
authored
Jul 05, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页权限hook修改
parent
6d3e201c
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
209 additions
and
23 deletions
+209
-23
memberRoute.ts
config/routes/memberRoute.ts
+5
-0
AfterSoldCenter.tsx
src/pages/home/components/Centers/AfterSoldCenter.tsx
+1
-1
ChannelMallCenter.tsx
src/pages/home/components/Centers/ChannelMallCenter.tsx
+1
-1
Contract.tsx
src/pages/home/components/Centers/Contract.tsx
+1
-2
FundCenter.tsx
src/pages/home/components/Centers/FundCenter.tsx
+1
-1
LogisticsCenter.tsx
src/pages/home/components/Centers/LogisticsCenter.tsx
+1
-1
MemberCenter.tsx
src/pages/home/components/Centers/MemberCenter.tsx
+1
-1
OrderCenter.tsx
src/pages/home/components/Centers/OrderCenter.tsx
+1
-1
ProcessCenter.tsx
src/pages/home/components/Centers/ProcessCenter.tsx
+1
-1
ProductCenter.tsx
src/pages/home/components/Centers/ProductCenter.tsx
+1
-1
PurchaseCenter.tsx
src/pages/home/components/Centers/PurchaseCenter.tsx
+1
-2
SettlementCenter.tsx
src/pages/home/components/Centers/SettlementCenter.tsx
+1
-1
TradeCenter.tsx
src/pages/home/components/Centers/TradeCenter.tsx
+1
-1
useGetAuth.tsx
src/pages/home/hooks/useGetAuth.tsx
+1
-1
index.tsx
src/pages/home/index.tsx
+1
-1
ruleColumns.tsx
...pages/member/memberWarning/common/columns/ruleColumns.tsx
+25
-0
querySchema.tsx
src/pages/member/memberWarning/common/schema/querySchema.tsx
+31
-5
tobeHandleQuerySchema.tsx
...ber/memberWarning/common/schema/tobeHandleQuerySchema.tsx
+63
-0
index.tsx
src/pages/member/memberWarning/ruleSetting/index.tsx
+70
-0
index.tsx
src/pages/member/memberWarning/tobeHandleWarning/index.tsx
+1
-2
No files found.
config/routes/memberRoute.ts
View file @
42462fe1
...
...
@@ -767,6 +767,11 @@ const MemberRoute: RouterChild = {
path
:
'/memberCenter/memberAbility/memberWarning/tobeHandle'
,
name
:
'待处理预警'
,
component
:
'@/pages/member/memberWarning/tobeHandleWarning'
},
{
path
:
'/memberCenter/memberAbility/memberWarning/ruleSetting'
,
name
:
'预警规则设置'
,
component
:
'@/pages/member/memberWarning/ruleSetting'
}
]
},
...
...
src/pages/home/components/Centers/AfterSoldCenter.tsx
View file @
42462fe1
...
...
@@ -5,7 +5,7 @@ import Authorize from '../Authorize';
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
GetReportMemberHomeGetAfterSaleTallyResponse
}
from
'@/services/ReportApi'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
...
...
src/pages/home/components/Centers/ChannelMallCenter.tsx
View file @
42462fe1
...
...
@@ -10,7 +10,7 @@ import { getAuth } from '@/utils/auth';
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse
}
from
'@/services/TemplateV2Api'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{}
const
SHOP_CENTER
=
'/memberCenter/channelAbility/infoManage'
...
...
src/pages/home/components/Centers/Contract.tsx
View file @
42462fe1
...
...
@@ -3,9 +3,8 @@ import Layout, { IDataListProps } from './layout';
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetReportMemberHomeGetContractTallyResponse
}
from
'@/services/ReportApi'
;
import
styles
from
'./center.less'
import
{
Link
}
from
'umi'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
import
Authorize
from
'../Authorize'
;
const
{
StaticsDataList
,
AlertTip
}
=
Layout
...
...
src/pages/home/components/Centers/FundCenter.tsx
View file @
42462fe1
...
...
@@ -11,7 +11,7 @@ import { getAuth } from '@/utils/auth';
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
,
{
IDataListProps
}
from
'./layout'
;
import
{
GetReportMemberHomeGetAccountTallyResponse
}
from
'@/services/ReportApi'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
const
KEY_TO_TITLE
=
{
...
...
src/pages/home/components/Centers/LogisticsCenter.tsx
View file @
42462fe1
...
...
@@ -12,7 +12,7 @@ import { getAuth } from '@/utils/auth';
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
{
GetReportMemberHomeGetLogisticsTallyResponse
}
from
'@/services/ReportApi/id3280'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
...
...
src/pages/home/components/Centers/MemberCenter.tsx
View file @
42462fe1
...
...
@@ -5,7 +5,7 @@ import Layout, { IDataListProps } from './layout';
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
GetReportMemberHomeGetMemberTallyResponse
,
GetReportMemberHomeGetPurchaseTallyResponse
}
from
'@/services/ReportV2Api'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
const
{
StaticsDataList
}
=
Layout
...
...
src/pages/home/components/Centers/OrderCenter.tsx
View file @
42462fe1
...
...
@@ -5,7 +5,7 @@ import Layout from './layout';
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
GetReportMemberHomeGetOrderTallyResponse
,
GetReportMemberHomeGetPurchaseTallyResponse
}
from
'@/services/ReportV2Api'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
const
{
StaticsDataList
}
=
Layout
...
...
src/pages/home/components/Centers/ProcessCenter.tsx
View file @
42462fe1
...
...
@@ -5,7 +5,7 @@ import { Link } from 'umi'
import
Layout
from
'./layout'
;
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
import
{
GetReportMemberHomeGetEnhanceTallyResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{};
...
...
src/pages/home/components/Centers/ProductCenter.tsx
View file @
42462fe1
...
...
@@ -6,7 +6,7 @@ import { Link } from 'umi';
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
import
{
GetReportMemberHomeGetCommodityTallyResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{};
...
...
src/pages/home/components/Centers/PurchaseCenter.tsx
View file @
42462fe1
...
...
@@ -8,8 +8,7 @@ import useViewRequest from '../../hooks/useViewRequest';
import
{
GetReportMemberHomeGetPurchaseTallyResponse
}
from
'@/services/ReportV2Api'
;
import
{
BellOutlined
}
from
'@ant-design/icons'
;
import
{
Button
}
from
'antd'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
useGetAuth
from
'../../hooks/uesGetAuth'
;
import
useGetAuth
from
'../../hooks/useGetAuth'
;
interface
Iprops
{};
const
{
StaticsDataList
}
=
Layout
...
...
src/pages/home/components/Centers/SettlementCenter.tsx
View file @
42462fe1
...
...
@@ -8,7 +8,7 @@ import { PublicApi } from '@/services/api'
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
{
GetReportMemberHomeGetSettleAccountTallyResponse
}
from
'@/services/ReportApi'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
interface
Iprops
{};
const
KEY_TITLE
=
{
...
...
src/pages/home/components/Centers/TradeCenter.tsx
View file @
42462fe1
...
...
@@ -4,7 +4,7 @@ import { Link } from 'umi'
import
Authorize
from
'../Authorize'
;
import
useViewRequest
from
'../../hooks/useViewRequest'
;
import
Layout
from
'./layout'
;
import
useGetAuth
from
'../../hooks/u
es
GetAuth'
;
import
useGetAuth
from
'../../hooks/u
se
GetAuth'
;
import
{
GetReportMemberHomeGetTradeTallyResponse
}
from
'@/services/ReportV2Api'
;
interface
Iprops
{};
...
...
src/pages/home/hooks/u
es
GetAuth.tsx
→
src/pages/home/hooks/u
se
GetAuth.tsx
View file @
42462fe1
...
...
@@ -42,7 +42,7 @@ const collection2Obj = <T, >(list: T[], name: string, isCover?: boolean) => {
const useGetAuth = () =
>
{
const
userAuth
=
getAuth
();
const
cacheAuth
=
useMemo
(()
=>
userAuth
,
[
userAuth
]);
const
urls
=
useMemo
(()
=>
cacheAuth
.
urls
,
[])
const
urls
=
useMemo
(()
=>
cacheAuth
.
urls
,
[
cacheAuth
])
const
abilityUrls
=
useMemo
(()
=>
{
return
{
...
...
src/pages/home/index.tsx
View file @
42462fe1
...
...
@@ -12,7 +12,7 @@ import { TradeCenter, FundCenter, ShopCenter, ProductCenter, SettlementCenter,
import
styles
from
'./index.less'
import
{
CompassFilled
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
useGetAuth
from
'./hooks/u
es
GetAuth'
;
import
useGetAuth
from
'./hooks/u
se
GetAuth'
;
const
ComponentSelect
=
{
"会员中心"
:
MemberCenter
,
...
...
src/pages/member/memberWarning/common/columns/ruleColumns.tsx
0 → 100644
View file @
42462fe1
import
{
ColumnsType
}
from
'antd/es/table'
;
/**
* 列表页column
*/
const
listColumns
:
ColumnsType
<
any
>
=
[
{
title
:
'序号'
,
dataIndex
:
'no'
,
},
{
title
:
'预警条件'
,
dataIndex
:
'memberName'
,
},
{
title
:
'预警提示语'
,
dataIndex
:
'project'
,
},
{
title
:
'预警提示语'
,
dataIndex
:
'notice'
,
},
]
export
default
listColumns
;
src/pages/member/memberWarning/common/schema/querySchema.tsx
View file @
42462fe1
...
...
@@ -12,9 +12,9 @@ const querySchema: ISchema = {
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
'搜索
会员名称
'
,
align
:
'flex-left'
,
tip
:
'输入
用户名
进行搜索'
,
tip
:
'输入
会员名称
进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
...
...
@@ -27,13 +27,39 @@ const querySchema: ISchema = {
columns
:
6
,
},
properties
:
{
summary
:
{
handler
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'通知单摘要'
,
allowClear
:
true
,
placeholder
:
"处理热闹"
},
},
project
:
{
type
:
"string"
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
"预警项目"
},
},
level
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'预警级别'
},
},
rangeDate
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
"预警开始日期"
,
"预警截止日期"
]
}
},
handleDate
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
"处理开始日期"
,
"处理截止日期"
]
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
...
...
src/pages/member/memberWarning/common/schema/tobeHandleQuerySchema.tsx
0 → 100644
View file @
42462fe1
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ISchema
}
from
'@formily/antd'
;
const
querySchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索会员名称'
,
align
:
'flex-left'
,
tip
:
'输入会员名称进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
project
:
{
type
:
"string"
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
"预警项目"
},
},
level
:
{
type
:
'string'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'预警级别'
},
},
rangeDate
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
"预警开始日期"
,
"预警截止日期"
]
}
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
export
default
querySchema
src/pages/member/memberWarning/ruleSetting/index.tsx
0 → 100644
View file @
42462fe1
import
React
,
{
useCallback
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Input
,
Select
,
Table
}
from
'antd'
;
import
ruleColumns
from
'../common/columns/ruleColumns'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
useDebounceFn
}
from
'@umijs/hooks'
;
const
AllQuery
=
()
=>
{
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
[
page
,
setPage
]
=
useState
<
number
>
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
);
const
handleSetValue
=
(
params
:
{
dataIndex
:
string
,
value
:
string
,
index
:
number
})
=>
{
const
{
index
,
dataIndex
,
value
}
=
params
;
}
const
columns
=
useMemo
<
ColumnsType
<
any
>>
(()
=>
{
return
[
{
title
:
'序号'
,
dataIndex
:
'no'
,
},
{
title
:
'预警条件'
,
dataIndex
:
'memberName'
,
},
{
title
:
'预警提示语'
,
dataIndex
:
'project'
,
},
{
title
:
'预警提示语'
,
dataIndex
:
'notice'
,
},
{
title
:
'预警值'
,
dataIndex
:
'value'
,
render
:
(
text
,
record
,
index
)
=>
{
return
<
Input
value=
{
text
}
onChange=
{
(
e
)
=>
handleSetValue
({
dataIndex
:
'value'
,
value
:
e
.
target
.
value
,
index
:
index
})
}
/>
}
},
{
title
:
'预警值'
,
dataIndex
:
'value'
,
render
:
(
text
,
record
)
=>
{
return
<
Select
value=
{
text
}
/>
}
}
]
},
[])
return
(
<
PageHeaderWrapper
title=
{
'预警规则设置'
}
>
<
Card
>
<
Table
columns=
{
columns
}
dataSource=
{
dataSource
}
></
Table
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
AllQuery
src/pages/member/memberWarning/tobeHandleWarning/index.tsx
View file @
42462fe1
import
React
from
'react'
;
import
{
Card
,
Space
,
Button
}
from
'antd'
import
tobeHandleColumns
from
'../common/columns/tobeHandleColumns'
;
import
querySchema
from
'../common/schema/
q
uerySchema'
;
import
querySchema
from
'../common/schema/
tobeHandleQ
uerySchema'
;
import
useFetchList
from
'../../memberEvaluate/hooks/useFetchList'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
PublicApi
}
from
'@/services/api'
;
...
...
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