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