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
linweijiong
jinfa-admin
Commits
b37a6aee
Commit
b37a6aee
authored
Sep 22, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(TableLayout 组件): 修复批量操作
parent
bc13b2b7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
11 deletions
+27
-11
index.tsx
src/components/TableLayout/index.tsx
+6
-8
index.tsx
...es/marketingManage/marketing/waitAddedMarketing/index.tsx
+3
-3
index.tsx
...anage/merchantMarketing/merchantMarketingSearch/index.tsx
+9
-0
index.tsx
...ge/merchantMarketing/waitAuditMerchantMarketing/index.tsx
+9
-0
No files found.
src/components/TableLayout/index.tsx
View file @
b37a6aee
import
React
,
{
useRef
,
useState
,
useImperativeHandle
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useImperativeHandle
,
useEffect
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -52,13 +52,7 @@ const Table: React.FC<Iprops> = (props: any) => {
useStateEffects
}
=
props
;
const
tableRef
=
useRef
<
any
>
({});
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
({
extendsSelection
:
{
onChange
:
()
=>
{
fetchRowkeys
(
selectRowFns
.
selectedRowKeys
)
},
}
});
const
[
selectRow
,
selectRowFns
]
=
useRowSelectionTable
();
/** 列表数据 */
const
fetchData
=
(
params
?:
any
)
=>
{
...
...
@@ -102,6 +96,10 @@ const Table: React.FC<Iprops> = (props: any) => {
}
useEffect
(()
=>
{
fetchRowkeys
&&
fetchRowkeys
(
selectRowFns
.
selectedRowKeys
)
},
[
selectRowFns
])
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
src/pages/marketingManage/marketing/waitAddedMarketing/index.tsx
View file @
b37a6aee
...
...
@@ -24,7 +24,7 @@ const WaitAddedMarketing = () => {
if
(
id
)
{
res
=
await
PublicApi
.
postMarketingPlatformActivitySubmit
({
id
:
Number
(
id
)
})
}
else
{
// res = await PublicApi.postPurchasePurchaseInquir
ySubmitBatch({ ids: rowkeys });
res
=
await
PublicApi
.
postMarketingPlatformActivit
ySubmitBatch
({
ids
:
rowkeys
});
}
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
();
...
...
@@ -263,14 +263,14 @@ const WaitAddedMarketing = () => {
icon=
{
<
DeleteOutlined
/>
}
loading=
{
loading
}
onClick=
{
()
=>
fetchDeleteBatch
()
}
disabled=
{
rowkeys
.
length
!
==
0
}
disabled=
{
rowkeys
.
length
=
==
0
}
>
批量删除
</
Button
>
<
Button
loading=
{
loading
}
onClick=
{
()
=>
fetchSubmitBatch
()
}
disabled=
{
rowkeys
.
length
!
==
0
}
disabled=
{
rowkeys
.
length
=
==
0
}
>
批量提交审核
</
Button
>
...
...
src/pages/marketingManage/merchantMarketing/merchantMarketingSearch/index.tsx
View file @
b37a6aee
...
...
@@ -162,6 +162,15 @@ const MerchantMarketingSearch = () => {
},
enum
:
[],
},
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'会员名称'
,
style
:
{
width
:
160
,
},
},
},
}
},
sumbit
:
{
...
...
src/pages/marketingManage/merchantMarketing/waitAuditMerchantMarketing/index.tsx
View file @
b37a6aee
...
...
@@ -175,6 +175,15 @@ const WaitAuditMerchantMarketing = () => {
},
enum
:
[],
},
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'会员名称'
,
style
:
{
width
:
160
,
},
},
},
}
},
sumbit
:
{
...
...
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