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
17df40b6
Commit
17df40b6
authored
Oct 19, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
2c0675dd
462ee6f8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
19 deletions
+15
-19
index.tsx
src/pages/commodity/products/TableOperation/index.tsx
+10
-15
SearchForm.tsx
src/pages/handling/components/ModalForTable/SearchForm.tsx
+1
-1
index.tsx
src/pages/handling/components/ProcessProducts/index.tsx
+3
-2
processProductSchema.tsx
src/pages/handling/schema/processProductSchema.tsx
+1
-1
No files found.
src/pages/commodity/products/TableOperation/index.tsx
View file @
17df40b6
...
@@ -5,7 +5,7 @@ import { CaretDownOutlined } from '@ant-design/icons'
...
@@ -5,7 +5,7 @@ import { CaretDownOutlined } from '@ant-design/icons'
export
interface
TableOperationProps
{
export
interface
TableOperationProps
{
record
:
any
,
record
:
any
,
statusOperationMap
:
any
,
// 所有状态和操作名称的映射
statusOperationMap
:
any
,
// 所有状态和操作名称的映射
operationHandler
:
any
,
// 所有的操作句柄
operationHandler
:
any
,
// 所有的操作句柄
函数
priorityOperationName
?:
string
,
// 优先靠前的操作名称
priorityOperationName
?:
string
,
// 优先靠前的操作名称
}
}
...
@@ -16,13 +16,14 @@ const TableOperation:React.FC<TableOperationProps> = (props) => {
...
@@ -16,13 +16,14 @@ const TableOperation:React.FC<TableOperationProps> = (props) => {
const
[
operationName
,
setOperationName
]
=
useState
<
string
[]
>
([])
const
[
operationName
,
setOperationName
]
=
useState
<
string
[]
>
([])
useEffect
(()
=>
{
useEffect
(()
=>
{
// let maps = statusOperationMap[record.status]
let
maps
=
statusOperationMap
[
record
.
status
]
// if(maps.length > 2){
if
(
maps
.
length
>
2
&&
priorityOperationName
&&
maps
.
includes
(
priorityOperationName
)){
// setOperationName(() => statusOperationMap[record.status].filter(_ => _ != priorityOperationName))
let
temp
=
maps
.
filter
(
_
=>
_
!=
priorityOperationName
)
// }else{
temp
.
unshift
(
priorityOperationName
)
setOperationName
(
temp
)
// }
}
else
{
setOperationName
(()
=>
statusOperationMap
[
record
.
status
])
setOperationName
(()
=>
statusOperationMap
[
record
.
status
])
}
},
[])
},
[])
return
(
<>
return
(
<>
...
@@ -30,13 +31,7 @@ const TableOperation:React.FC<TableOperationProps> = (props) => {
...
@@ -30,13 +31,7 @@ const TableOperation:React.FC<TableOperationProps> = (props) => {
operationName
.
length
>
2
operationName
.
length
>
2
?
?
<>
<>
{
/* {
<
Button
type=
'link'
onClick=
{
operationHandler
[
operationName
[
0
]]
}
>
{
operationName
[
0
]
}
</
Button
>
priorityOperationName
?
<Button type='link' onClick={operationHandler[priorityOperationName]}>{priorityOperationName}</Button>
: */
}
<
Button
type=
'link'
onClick=
{
operationHandler
[
operationName
[
0
]]
}
>
{
operationName
[
0
]
}
</
Button
>
{
/* } */
}
<
Dropdown
overlay=
{
<
Dropdown
overlay=
{
<
Menu
>
<
Menu
>
{
{
...
...
src/pages/handling/components/ModalForTable/SearchForm.tsx
View file @
17df40b6
...
@@ -20,7 +20,7 @@ const SearchForm = (props) => {
...
@@ -20,7 +20,7 @@ const SearchForm = (props) => {
onFieldValueChange$
(
'pagination'
).
subscribe
((
state
)
=>
{
onFieldValueChange$
(
'pagination'
).
subscribe
((
state
)
=>
{
console
.
log
(
"pagination"
)
console
.
log
(
"pagination"
)
// handleSearch
({...state.value})
handleSubmit
({...
state
.
value
})
})
})
!!
effects
&&
effects
();
!!
effects
&&
effects
();
}
}
...
...
src/pages/handling/components/ProcessProducts/index.tsx
View file @
17df40b6
...
@@ -23,6 +23,7 @@ const tableSchema = {
...
@@ -23,6 +23,7 @@ const tableSchema = {
"columns"
:
columns
,
"columns"
:
columns
,
"rowKey"
:
"id"
,
"rowKey"
:
"id"
,
"pagination"
:
false
,
"pagination"
:
false
,
// loading: true,
"rowSelection"
:
"{{rowSelection}}"
"rowSelection"
:
"{{rowSelection}}"
}
}
},
},
...
@@ -62,8 +63,8 @@ const ProcessProducts = ({visible, cancel, actions, ...restProps}) => {
...
@@ -62,8 +63,8 @@ const ProcessProducts = ({visible, cancel, actions, ...restProps}) => {
// const status = actions.getFieldValue('status'); // 状态
// const status = actions.getFieldValue('status'); // 状态
const
postData
=
{
const
postData
=
{
name
:
name
||
''
,
name
:
name
||
''
,
current
:
1
,
...
paginationParams
,
pageSize
:
10
,
...
params
}
}
fetchData
(
postData
).
then
((
data
)
=>
{
fetchData
(
postData
).
then
((
data
)
=>
{
setTableStatus
({
dataSource
:
data
.
data
,
totalCount
:
data
.
totalCount
})
setTableStatus
({
dataSource
:
data
.
data
,
totalCount
:
data
.
totalCount
})
...
...
src/pages/handling/schema/processProductSchema.tsx
View file @
17df40b6
/*
/*
* @Author: Bill
* @Author: Bill
* @Date: 2020-10-14 18:45:31
* @Date: 2020-10-14 18:45:31
* @LastEditTime: 2020-10-1
6 17:39:55
* @LastEditTime: 2020-10-1
9 09:56:52
* @desc 选择加工商品schema
* @desc 选择加工商品schema
* 这里其实就是两个flex 布局加一个table, 通过expressScrope 注入代码
* 这里其实就是两个flex 布局加一个table, 通过expressScrope 注入代码
*/
*/
...
...
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