Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
e800cca1
Commit
e800cca1
authored
Mar 14, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设计不通过 规范不允许改
parent
6121e09d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
82 deletions
+98
-82
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+48
-40
index.jsx
src/view/Manage/ModelReview/index.jsx
+50
-42
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
e800cca1
import
React
,
{
useState
,
useEffect
,
useRef
,
useMemo
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
,
useMemo
}
from
'react'
;
import
{
Form
,
Button
,
Space
,
Tooltip
,
Modal
,
Select
,
Input
,
}
from
'antd'
;
import
{
Form
,
Button
,
Space
,
Tooltip
,
Modal
,
Select
,
Input
}
from
'antd'
;
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
{
useMount
,
useUnmount
}
from
'ahooks'
;
import
{
useMount
,
useUnmount
}
from
'ahooks'
;
import
{
LeftCircleFilled
,
RightCircleFilled
}
from
'@ant-design/icons'
;
import
{
LeftCircleFilled
,
RightCircleFilled
}
from
'@ant-design/icons'
;
...
@@ -636,45 +636,53 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
...
@@ -636,45 +636,53 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
<Button type='primary' onClick={onHistoryClick}>历史版本</Button>
<Button type='primary' onClick={onHistoryClick}>历史版本</Button>
</Space>
</Space>
<Space>
<Space>
<Select
<Tooltip title={((type==='rule')&&!item?.designReviewPass) ? '设计评审不通过' : ''}>
value={(type==='design')?item?.designReviewPass:item?.standardReviewPass}
<Select
placeholder='选择评审结论'
value={(type==='design')?item?.designReviewPass:item?.standardReviewPass}
allowClear
placeholder='选择评审结论'
style={{
allowClear
width: 150,
disabled={(type==='rule')&&!item?.designReviewPass}
}}
style={{
onChange={(val) => {
width: 150,
setItem(prev => {
}}
return Object.assign({}, prev,
onChange={(val) => {
(type==='design') ? {
setItem(prev => {
designReviewPass: val
return Object.assign({}, prev,
}: {
(type==='design') ? {
standardReviewPass: val
designReviewPass: val
}
}: {
)
standardReviewPass: val
})
}
}}
)
>
})
<Select.Option value={true}>通过</Select.Option>
}}
<Select.Option value={false}>不通过</Select.Option>
>
</Select>
<Select.Option value={true}>通过</Select.Option>
<Input
<Select.Option value={false}>不通过</Select.Option>
value={(type==='design')?item?.designReviewComment:item?.standardReviewComment}
</Select>
placeholder='请输入评审意见'
</Tooltip>
style={{ width: 500 }}
<Tooltip title={((type==='rule')&&!item?.designReviewPass) ? '设计评审不通过' : ''}>
allowClear
<Form.Item style={{ marginBottom: 0 }}>
onChange={(e) => {
<Input
setItem(prev => {
value={(type==='design')?item?.designReviewComment:item?.standardReviewComment}
return Object.assign({}, prev,
disabled={(type==='rule')&&!item?.designReviewPass}
(type==='design') ? {
placeholder='请输入评审意见'
designReviewComment: e.target.value
style={{ width: 500 }}
}: {
allowClear
standardReviewComment: e.target.value
onChange={(e) => {
}
setItem(prev => {
)
return Object.assign({}, prev,
})
(type==='design') ? {
}}
designReviewComment: e.target.value
/>
}: {
standardReviewComment: e.target.value
}
)
})
}}
/>
</Form.Item>
</Tooltip>
<Button loading={waiting} type='primary' onClick={onOkClick}>确定</Button>
<Button loading={waiting} type='primary' onClick={onOkClick}>确定</Button>
<Button type='text' icon={<LeftCircleFilled className='pointer' style={{ fontSize: 26, color: canPrev?'#196AD2':'#B5B5B5' }}/>} onClick={onPrevClick} disabled={!canPrev}></Button>
<Button type='text' icon={<LeftCircleFilled className='pointer' style={{ fontSize: 26, color: canPrev?'#196AD2':'#B5B5B5' }}/>} onClick={onPrevClick} disabled={!canPrev}></Button>
<Button type='text' icon={<RightCircleFilled className='pointer' style={{ fontSize: 26, color: canNext?'#196AD2':'#B5B5B5' }}/>} onClick={onNextClick} disabled={!canNext}></Button>
<Button type='text' icon={<RightCircleFilled className='pointer' style={{ fontSize: 26, color: canNext?'#196AD2':'#B5B5B5' }}/>} onClick={onNextClick} disabled={!canNext}></Button>
...
...
src/view/Manage/ModelReview/index.jsx
View file @
e800cca1
...
@@ -259,59 +259,67 @@ const List = React.forwardRef(function ({type, data}, ref) {
...
@@ -259,59 +259,67 @@ const List = React.forwardRef(function ({type, data}, ref) {
dataIndex
:
(
type
===
'design'
)
?
'designReviewPass'
:
'standardReviewPass'
,
dataIndex
:
(
type
===
'design'
)
?
'designReviewPass'
:
'standardReviewPass'
,
width
:
120
,
width
:
120
,
className
:
'highlight'
,
className
:
'highlight'
,
render
:
(
text
,
__
,
index
)
=>
{
render
:
(
text
,
record
,
index
)
=>
{
form
?.
setFieldsValue
({
[
`pass
${
index
}
`
]:
text
})
form
?.
setFieldsValue
({
[
`pass
${
index
}
`
]:
text
})
return
(
return
(
<
Form
.
Item
name=
{
`pass${index}`
}
<
Tooltip
title=
{
((
type
===
'rule'
)
&&!
record
.
designReviewPass
)
?
'设计评审不通过'
:
''
}
>
rules=
{
[{
required
:
true
,
message
:
'请选择评审结论!'
}]
}
<
Form
.
Item
name=
{
`pass${index}`
}
style=
{
{
marginBottom
:
0
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择评审结论!'
}]
}
>
style=
{
{
marginBottom
:
0
}
}
<
Select
>
placeholder=
'请选择'
<
Select
placeholder=
'请选择'
allowClear
style=
{
{
width
:
'100%'
}
}
disabled=
{
(
type
===
'rule'
)
&&!
record
.
designReviewPass
}
onChange=
{
(
val
)
=>
{
setTableData
(
prev
=>
{
return
produce
(
prev
,
(
draft
)
=>
{
if
(
type
===
'design'
)
{
draft
[
index
].
designReviewPass
=
val
}
else
{
draft
[
index
].
standardReviewPass
=
val
}
})
})
}
}
>
<
Select
.
Option
value=
{
true
}
>
通过
</
Select
.
Option
>
<
Select
.
Option
value=
{
false
}
>
不通过
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Tooltip
>
)
}
},
{
title
:
'评审意见'
,
dataIndex
:
(
type
===
'design'
)
?
'designReviewComment'
:
'standardReviewComment'
,
className
:
'highlight'
,
render
:
(
text
,
record
,
index
)
=>
(
<
Tooltip
title=
{
((
type
===
'rule'
)
&&!
record
.
designReviewPass
)
?
'设计评审不通过'
:
''
}
>
<
Form
.
Item
style=
{
{
marginBottom
:
0
}
}
>
<
Input
.
TextArea
rows=
{
1
}
value=
{
text
}
autoSize=
{
{
minRows
:
1
,
maxRows
:
3
}
}
allowClear
allowClear
style=
{
{
disabled=
{
(
type
===
'rule'
)
&&!
record
.
designReviewPass
}
width
:
'100%'
onChange=
{
(
e
)
=>
{
}
}
onChange=
{
(
val
)
=>
{
setTableData
(
prev
=>
{
setTableData
(
prev
=>
{
return
produce
(
prev
,
(
draft
)
=>
{
return
produce
(
prev
,
(
draft
)
=>
{
if
(
type
===
'design'
)
{
if
(
type
===
'design'
)
{
draft
[
index
].
designReview
Pass
=
val
draft
[
index
].
designReview
Comment
=
e
.
target
.
value
}
else
{
}
else
{
draft
[
index
].
standardReview
Pass
=
val
draft
[
index
].
standardReview
Comment
=
e
.
target
.
value
}
}
})
})
})
})
}
}
}
}
>
/>
<
Select
.
Option
value=
{
true
}
>
通过
</
Select
.
Option
>
<
Select
.
Option
value=
{
false
}
>
不通过
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
)
</
Tooltip
>
}
},
{
title
:
'评审意见'
,
dataIndex
:
(
type
===
'design'
)
?
'designReviewComment'
:
'standardReviewComment'
,
className
:
'highlight'
,
render
:
(
text
,
__
,
index
)
=>
(
<
Input
.
TextArea
rows=
{
1
}
value=
{
text
}
autoSize=
{
{
minRows
:
1
,
maxRows
:
3
}
}
allowClear
onChange=
{
(
e
)
=>
{
setTableData
(
prev
=>
{
return
produce
(
prev
,
(
draft
)
=>
{
if
(
type
===
'design'
)
{
draft
[
index
].
designReviewComment
=
e
.
target
.
value
}
else
{
draft
[
index
].
standardReviewComment
=
e
.
target
.
value
}
})
})
}
}
/>
)
)
},
},
]
]
...
...
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