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
50148a7f
Commit
50148a7f
authored
Apr 27, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:采购竞价静态页面分离组件
parent
ed8fad19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
15 deletions
+100
-15
index.tsx
...ents/detail/components/bidCommonLayout/areaItem/index.tsx
+30
-0
index.tsx
...nts/detail/components/bidCommonLayout/filesItem/index.tsx
+27
-0
index.tsx
...ty/components/detail/components/bidCommonLayout/index.tsx
+17
-4
context.ts
...n/purchaseAbility/components/detail/components/context.ts
+3
-0
index.tsx
...ity/components/detail/components/progressLayout/index.tsx
+23
-11
detail.tsx
...transaction/purchaseAbility/purchaseBid/search/detail.tsx
+0
-0
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout/areaItem/index.tsx
0 → 100644
View file @
50148a7f
import
React
,
{
useState
,
useMemo
}
from
'react'
;
import
{
CaretDownOutlined
,
CaretUpOutlined
}
from
'@ant-design/icons'
;
const
areaItem
=
(
props
:
any
)
=>
{
const
{
data
}
=
props
;
const
[
showMore
,
setShowMore
]
=
useState
<
any
>
(
false
);
// const showDataSource = showMore ? data['inviteTenderAreaList'] : [...data['inviteTenderAreaList']].splice(0, 3)
const
showDataSource
=
useMemo
(()
=>
{
return
showMore
?
data
[
'inviteTenderAreaList'
]
:
[...
data
[
'inviteTenderAreaList'
]].
splice
(
0
,
3
)
},
[
showMore
,
data
])
const
toogleMore
=
()
=>
{
setShowMore
(
!
showMore
);
}
return
(
<>
{
showDataSource
.
map
((
_item
,
_i
)
=>
<
p
key=
{
`address${_i}`
}
>
{
_item
.
provinceName
+
'/'
+
(
_item
.
cityName
||
''
)
}
</
p
>)
}
{
data
.
length
>
3
&&
<
p
onClick=
{
toogleMore
}
style=
{
{
cursor
:
'pointer'
}
}
className=
"commonPickColor"
>
展开
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
p
>
}
</>
)
}
export
default
areaItem
\ No newline at end of file
src/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout/filesItem/index.tsx
0 → 100644
View file @
50148a7f
import
React
from
'react'
;
import
{
Typography
}
from
'antd'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
const
FilesItem
=
(
props
:
any
)
=>
{
const
{
files
}
=
props
;
if
(
files
&&
files
.
length
>
0
)
{
return
(
files
.
map
((
item
,
index
)
=>
{
return
(
<
div
key=
{
index
}
>
<
Typography
.
Link
href=
{
item
.
url
}
target=
"_blank"
>
<
LinkOutlined
/>
{
item
.
name
}
</
Typography
.
Link
>
</
div
>
)
})
)
}
else
{
return
'无'
}
}
export
default
FilesItem
\ No newline at end of file
src/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout/index.tsx
View file @
50148a7f
...
...
@@ -9,6 +9,9 @@ import Card from '../../../card';
import
{
Context
}
from
'../context'
;
import
selfStyles
from
'./index.less'
;
import
AreaItem
from
'./areaItem'
;
import
FilesItem
from
'./filesItem'
;
import
MsgItem
from
'./msgItem'
;
import
ResultItem
from
'./resultItem'
;
import
PieItem
from
'./pieItem'
;
...
...
@@ -30,8 +33,18 @@ export interface BidCommonLayoutProps {
const
BidCommonLayout
:
React
.
FC
<
BidCommonLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
layoutId
,
title
,
effect
,
layoutType
,
extra
,
checkDetailFunc
}
=
props
;
const
_returnItem
=
(
data
)
=>
{
switch
(
data
.
type
)
{
case
'text'
:
return
data
.
extra
case
'area'
:
return
<
AreaItem
/>
case
'files'
:
return
<
FilesItem
/>
}
}
const
_returnChild
=
(
child
,
key
)
=>
{
if
(
child
.
type
===
'text'
)
{
if
(
child
.
type
===
'text'
||
child
.
type
===
'area'
||
child
.
type
===
'files'
)
{
return
(
<
div
className=
{
selfStyles
.
baseItem
}
key=
{
key
}
>
<
h5
className=
{
selfStyles
.
label
}
>
...
...
@@ -39,10 +52,10 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
{
child
.
label
}
<
QuestionCircleOutlined
style=
{
ICON_STYLE
}
/>
</
Tooltip
>
:
`${child.label}: `
}
</
h5
>
<
h5
className=
{
selfStyles
.
content
}
>
{
child
.
extra
}
</
h5
>
<
h5
className=
{
selfStyles
.
content
}
>
{
_returnItem
(
child
)
}
</
h5
>
</
div
>
)
}
else
if
(
child
.
type
===
'pie'
)
{
}
else
if
(
child
.
type
===
'pie'
)
{
return
(
<
div
className=
{
selfStyles
.
pieItem
}
key=
{
key
}
>
<
PieItem
/>
...
...
@@ -87,7 +100,7 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
</
div
>
<
div
className=
{
selfStyles
.
baseItem
}
>
<
h5
className=
{
selfStyles
.
label
}
>
附件:
</
h5
>
<
h5
className=
{
selfStyles
.
content
}
></
h5
>
<
h5
className=
{
selfStyles
.
content
}
><
FilesItem
/><
/
h5
>
</
div
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/purchaseAbility/components/detail/components/context.ts
View file @
50148a7f
...
...
@@ -5,3 +5,6 @@ export const Context = createContext<any>({})
/**招标详情 Context */
export
const
BidDetailContext
=
createContext
<
any
>
({})
/**采购竞价单详情 Context */
export
const
PurchaseBidContext
=
createContext
<
any
>
({})
src/pages/transaction/purchaseAbility/components/detail/components/progressLayout/index.tsx
View file @
50148a7f
...
...
@@ -9,10 +9,12 @@ const LOGSTATESTYPE = {
/** 外部流转 */
EXTERNALSTATES
:
1
,
/** 内部流转 */
INTERIORSTATES
:
2
INTERIORSTATES
:
2
,
/** 竞价结果内部流转 */
EXMAINEINERIORSTATES
:
3
}
export
interface
ProgressProps
{}
export
interface
ProgressProps
{
}
const
ProgressLayout
:
React
.
FC
<
ProgressProps
>
=
()
=>
{
const
context
=
useContext
(
Context
);
...
...
@@ -28,6 +30,7 @@ const ProgressLayout: React.FC<ProgressProps> = () => {
>
{
context
.
externalLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
{
context
.
examineInteriorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXMAINEINERIORSTATES
}
>
竞价结果内部流转
</
Radio
.
Button
>
}
</
Radio
.
Group
>
}
>
...
...
@@ -42,15 +45,24 @@ const ProgressLayout: React.FC<ProgressProps> = () => {
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
:
context
.
interiorLogStates
&&
context
.
interiorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
roleName
}
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
))
:
(
logStatesStatus
===
LOGSTATESTYPE
.
INTERIORSTATES
?
context
.
interiorLogStates
&&
context
.
interiorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
roleName
}
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
:
context
.
examineInteriorLogStates
&&
context
.
examineInteriorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
roleName
}
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
)
}
</
Steps
>
</
Card
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/search/detail.tsx
View file @
50148a7f
This diff is collapsed.
Click to expand it.
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