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
黄庭坚
jinfa-platform
Commits
0519ce88
Commit
0519ce88
authored
Jun 25, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改进度条bug
parent
e26813a4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
475 additions
and
12 deletions
+475
-12
index.less
src/components/AuditProcess/index.less
+5
-8
index.tsx
src/components/AuditProcess/index.tsx
+1
-1
index.tsx
src/components/MellowCard/index.tsx
+2
-3
index.tsx
...handling/assign/create/components/ReadOnlyInput/index.tsx
+43
-0
index.tsx
src/pages/handling/assign/create/index.tsx
+81
-0
schema.tsx
src/pages/handling/assign/create/schema.tsx
+343
-0
No files found.
src/components/AuditProcess/index.less
View file @
0519ce88
...
...
@@ -2,13 +2,10 @@
padding-top: 2px;
overflow: auto;
:global {
.ant-steps-item-title {
margin-right: 16px;
// &:last-child {
// margin-right: 0px;
// }
}
.title {
display: block;
max-width: 100px;
// margin-right: 8px;
text-align: center;
}
}
src/components/AuditProcess/index.tsx
View file @
0519ce88
...
...
@@ -109,7 +109,7 @@ const AuditProcess: React.FC<AuditProcessProp> = ({
}
return
(
<
Tooltip
placement=
"top"
title=
{
stepTitle
}
>
<
span
style=
{
{
maxWidth
:
'100px'
,
marginRight
:
'8px'
,
textAlign
:
'center'
}
}
>
{
`${stepTitle}`
}
</
span
>
<
span
className=
{
styles
.
title
}
>
{
`${stepTitle}`
}
</
span
>
</
Tooltip
>
)
}
...
...
src/components/MellowCard/index.tsx
View file @
0519ce88
...
...
@@ -21,7 +21,7 @@ export interface MellowCardProps extends CardProps {
const
MellowCard
:
React
.
FC
<
MellowCardProps
>
=
props
=>
{
const
{
children
,
fullHeight
,
...
rest
}
=
props
;
const
cls
=
classNames
(
styles
[
'mellow-card'
],
{
[
styles
.
fullHeight
]:
fullHeight
,
[
styles
.
fullHeight
]:
fullHeight
,
});
return
(
...
...
@@ -33,4 +33,4 @@ const MellowCard: React.FC<MellowCardProps> = props => {
)
};
export
default
MellowCard
;
\ No newline at end of file
export
default
MellowCard
;
src/pages/handling/assign/create/components/ReadOnlyInput/index.tsx
0 → 100644
View file @
0519ce88
import
React
from
'react'
import
{
connect
,
IConnectProps
,
MergedFieldComponentProps
,
registerFormField
}
from
'@formily/antd'
import
{
Input
}
from
'antd'
const
PreviewText
=
({
value
}:
{
value
:
string
|
number
})
=>
{
return
(
<
span
>
{
value
}
</
span
>
)
}
export
const
mapTextComponent
=
(
Target
:
React
.
JSXElementConstructor
<
any
>
,
props
:
any
=
{},
fieldProps
:
any
=
{}
):
React
.
JSXElementConstructor
<
any
>
=>
{
const
{
editable
}
=
fieldProps
// console.log("props", props, "fieldProps", fieldProps);
console
.
log
(
fieldProps
.
form
.
getFieldValue
(
"detail.layout1.productList.0"
))
if
(
editable
!==
undefined
)
{
if
(
editable
===
false
)
{
return
PreviewText
}
}
return
Target
}
export
const
mapStyledProps
=
(
props
:
IConnectProps
,
fieldProps
:
MergedFieldComponentProps
)
=>
{
const
{
loading
,
errors
}
=
fieldProps
if
(
loading
)
{
props
.
state
=
props
.
state
||
'loading'
}
else
if
(
errors
&&
errors
.
length
)
{
props
.
state
=
'error'
}
}
export
default
connect
({
// getProps: mapStyledProps, //处理状态映射
getComponent
:
mapTextComponent
//处理详情态
})((
Input
))
src/pages/handling/assign/create/index.tsx
0 → 100644
View file @
0519ce88
import
React
,
{
useMemo
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Button
}
from
'antd'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
creataSchema
from
'./schema'
;
import
{
createFormActions
,
FormEffectHooks
,
registerVirtualBox
}
from
'@formily/antd'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
AnchorPage
from
'@/layouts/AnchorPage'
;
import
{
ArrayTable
}
from
'@formily/antd-components'
import
ReadOnlyInput
from
'./components/ReadOnlyInput'
;
const
formActions
=
createFormActions
();
registerVirtualBox
(
'MellowCardBox'
,
(
_props
)
=>
{
const
{
children
,
props
:
outerProps
}
=
_props
;
const
props
=
outerProps
[
'x-component-props'
]
||
{};
return
(
<
MellowCard
{
...
props
}
>
{
children
}
</
MellowCard
>
)
})
const
Create
=
()
=>
{
const
useFields
=
()
=>
useMemo
(()
=>
{
return
{
string
:
ReadOnlyInput
}
},
[])
const
anchorColumn
=
useMemo
(()
=>
{
return
[
{
name
:
'基本信息'
,
key
:
'basicInfo'
},
{
name
:
'通知单明细'
,
key
:
'detail'
},
{
name
:
'其他要求'
,
key
:
'other'
},
{
name
:
'附件'
,
key
:
'files'
}
]
},
[])
return
(
<
AnchorPage
title=
"新增生产通知单"
anchors=
{
anchorColumn
}
extra=
{
<
Button
icon=
{
<
SaveOutlined
/>
}
type=
"primary"
>
提交
</
Button
>
}
>
<
NiceForm
fields=
{
useFields
()
as
any
}
actions=
{
formActions
}
schema=
{
creataSchema
}
components=
{
{
ArrayTable
}
}
></
NiceForm
>
</
AnchorPage
>
)
}
export
default
Create
;
src/pages/handling/assign/create/schema.tsx
0 → 100644
View file @
0519ce88
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