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
d532670f
Commit
d532670f
authored
Jul 05, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 替换组件
parent
7b971734
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
36 deletions
+28
-36
index.tsx
src/components/AuditProcess/index.tsx
+15
-19
index.tsx
src/components/FlowRecords/index.tsx
+13
-17
No files found.
src/components/AuditProcess/index.tsx
View file @
d532670f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-09-15 17:48:36
* @Date: 2020-09-15 17:48:36
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
5-18 15:08:09
* @LastEditTime: 2021-0
7-05 18:18:12
* @Description: 内外部流转记录组件
* @Description: 内外部流转记录组件
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
@@ -10,8 +10,7 @@ import {
...
@@ -10,8 +10,7 @@ import {
Steps
,
Steps
,
Tooltip
,
Tooltip
,
}
from
'antd'
;
}
from
'antd'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
ButtonTabs
,
{
ButtonTabsProps
}
from
'../ButtonTabs'
;
import
ButtonSwitch
from
'@/components/ButtonSwitch'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
export
interface
StepsItem
{
export
interface
StepsItem
{
...
@@ -33,7 +32,7 @@ export interface StepsItem {
...
@@ -33,7 +32,7 @@ export interface StepsItem {
status
?:
'wait'
|
'process'
|
'finish'
|
'error'
,
status
?:
'wait'
|
'process'
|
'finish'
|
'error'
,
}
}
interface
AuditProcessProp
extends
MellowCardProps
{
interface
AuditProcessProp
extends
Omit
<
ButtonTabsProps
,
'options'
>
{
/**
/**
* 当前外部流程步骤
* 当前外部流程步骤
*/
*/
...
@@ -104,7 +103,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
...
@@ -104,7 +103,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
].
filter
(
Boolean
);
].
filter
(
Boolean
);
const
titleRender
=
(
stepTitle
:
string
,
stepLength
:
number
)
=>
{
const
titleRender
=
(
stepTitle
:
string
,
stepLength
:
number
)
=>
{
if
(
stepLength
<=
6
)
{
if
(
stepLength
<=
6
)
{
return
<
span
>
{
stepTitle
}
</
span
>
return
<
span
>
{
stepTitle
}
</
span
>
}
}
return
(
return
(
...
@@ -115,18 +114,15 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
...
@@ -115,18 +114,15 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
}
}
return
(
return
(
<
MellowCard
<
ButtonTabs
title=
"流转进度"
options=
{
options
}
extra=
{
(
extra=
"流转进度"
<
ButtonSwitch
defaultValue=
"inner"
options=
{
options
}
onChange=
{
handleRadioChange
}
onChange=
{
handleRadioChange
}
value=
{
radioValue
}
value=
{
radioValue
}
/>
)
}
{
...
rest
}
{
...
rest
}
>
>
{
radioValue
===
'outer'
?
(
<
ButtonTabs
.
Item
activeKey=
"outer"
>
<
div
className=
{
styles
.
steps
}
>
<
div
className=
{
styles
.
steps
}
>
<
Steps
progressDot
current=
{
outerVerifyCurrent
}
>
<
Steps
progressDot
current=
{
outerVerifyCurrent
}
>
{
outerVerifySteps
&&
outerVerifySteps
.
map
(
item
=>
(
{
outerVerifySteps
&&
outerVerifySteps
.
map
(
item
=>
(
...
@@ -139,8 +135,8 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
...
@@ -139,8 +135,8 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
))
}
))
}
</
Steps
>
</
Steps
>
</
div
>
</
div
>
)
:
null
}
</
ButtonTabs
.
Item
>
{
radioValue
===
'inner'
?
(
<
ButtonTabs
.
Item
activeKey=
"inner"
>
<
div
className=
{
styles
.
steps
}
>
<
div
className=
{
styles
.
steps
}
>
<
Steps
progressDot
current=
{
innerVerifyCurrent
}
>
<
Steps
progressDot
current=
{
innerVerifyCurrent
}
>
{
innerVerifySteps
&&
innerVerifySteps
.
map
(
item
=>
(
{
innerVerifySteps
&&
innerVerifySteps
.
map
(
item
=>
(
...
@@ -153,8 +149,8 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
...
@@ -153,8 +149,8 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
))
}
))
}
</
Steps
>
</
Steps
>
</
div
>
</
div
>
)
:
null
}
</
ButtonTabs
.
Item
>
</
MellowCard
>
</
ButtonTabs
>
)
)
};
};
...
...
src/components/FlowRecords/index.tsx
View file @
d532670f
...
@@ -8,8 +8,7 @@
...
@@ -8,8 +8,7 @@
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
ButtonTabs
,
{
ButtonTabsProps
}
from
'../ButtonTabs'
;
import
ButtonSwitch
from
'@/components/ButtonSwitch'
;
const
PAGE_SIZE
=
10
;
const
PAGE_SIZE
=
10
;
...
@@ -35,7 +34,7 @@ export interface FetchListParams {
...
@@ -35,7 +34,7 @@ export interface FetchListParams {
pageSize
:
number
,
pageSize
:
number
,
}
}
interface
IProps
extends
MellowCardProps
{
interface
IProps
extends
Omit
<
ButtonTabsProps
,
'options'
>
{
/**
/**
* 外部流转记录数据源,与 fetchOuterList 不能共存
* 外部流转记录数据源,与 fetchOuterList 不能共存
* 如果两个同时存在 outerDataSource 优先
* 如果两个同时存在 outerDataSource 优先
...
@@ -202,18 +201,15 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
...
@@ -202,18 +201,15 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
].
filter
(
Boolean
);
].
filter
(
Boolean
);
return
(
return
(
<
MellowCard
<
ButtonTabs
title=
"流转记录"
options=
{
options
}
extra=
{
(
extra=
"流转记录"
<
ButtonSwitch
defaultValue=
"inner"
options=
{
options
}
onChange=
{
handleRadioChange
}
onChange=
{
handleRadioChange
}
value=
{
radioValue
}
value=
{
radioValue
}
/>
)
}
{
...
rest
}
{
...
rest
}
>
>
{
radioValue
===
'outer'
?
(
<
ButtonTabs
.
Item
activeKey=
"outer"
>
<
PolymericTable
<
PolymericTable
rowKey=
{
outerRowkey
}
rowKey=
{
outerRowkey
}
dataSource=
{
outerList
?
outerList
.
data
:
[]
}
dataSource=
{
outerList
?
outerList
.
data
:
[]
}
...
@@ -230,8 +226,8 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
...
@@ -230,8 +226,8 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
)
}
)
}
onPaginationChange=
{
handleOuterPaginationChange
}
onPaginationChange=
{
handleOuterPaginationChange
}
/>
/>
)
:
null
}
</
ButtonTabs
.
Item
>
{
radioValue
===
'inner'
?
(
<
ButtonTabs
.
Item
activeKey=
"inner"
>
<
PolymericTable
<
PolymericTable
rowKey=
{
innerRowkey
}
rowKey=
{
innerRowkey
}
dataSource=
{
innerList
?
innerList
.
data
:
[]
}
dataSource=
{
innerList
?
innerList
.
data
:
[]
}
...
@@ -248,8 +244,8 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
...
@@ -248,8 +244,8 @@ const FlowRecords: React.FC<IProps> = (props: IProps) => {
)
}
)
}
onPaginationChange=
{
handleInnerPaginationChange
}
onPaginationChange=
{
handleInnerPaginationChange
}
/>
/>
)
:
null
}
</
ButtonTabs
.
Item
>
</
MellowCard
>
</
ButtonTabs
>
);
);
}
;
}
;
...
...
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