Commit 2eb91173 by zhaochengxiang

优化意见

parent af470abf
...@@ -146,67 +146,72 @@ const Basic = React.forwardRef(function ({}, ref) { ...@@ -146,67 +146,72 @@ const Basic = React.forwardRef(function ({}, ref) {
return ( return (
<Form <Form
form={form} form={form}
labelCol={{ span: 3 }} labelCol={{ span: 6 }}
wrapperCol={{ span: 9 }} wrapperCol={{ span: 18 }}
autoComplete="off" autoComplete="off"
onValuesChange={onValuesChange} onValuesChange={onValuesChange}
> >
<Form.Item <Row gutter={10}>
label='送审说明' <Col span={12}>
name="sendReviewExplain" <Form.Item
style={{ marginBottom }} label='设计评审人员'
rules={[{ required: true, message: '请填写送审说明!' }]} name="designApprovalUserList"
> style={{ marginBottom }}
<Input placeholder='请输入送审说明' /> rules={[{ required: true, message: '请选择设计评审人员!' }]}
</Form.Item> >
<DesignUsersItem />
<Form.Item </Form.Item>
label='设计评审人员'
name="designApprovalUserList" <Form.Item
style={{ marginBottom }} label='规范评审'
rules={[{ required: true, message: '请选择设计评审人员!' }]} name='standard'
> wrapperCol={{ span: 12 }}
<DesignUsersItem /> style={{ marginBottom }}
</Form.Item> rules={[{
required: true,
<Form.Item validator: (_, value) => {
label='规范评审' if (value?.requiresStandardApproval === null || value?.requiresStandardApproval === undefined) {
name='standard' return Promise.reject(new Error('请选择是否规范评审!'))
wrapperCol={{ span: 12 }} }
style={{ marginBottom }}
rules={[{ if (value?.requiresStandardApproval && (value?.standardApprovalUserList??[]).length === 0) {
required: true, return Promise.reject(new Error('请选择规范评审人员!'))
validator: (_, value) => { }
if (value?.requiresStandardApproval === null || value?.requiresStandardApproval === undefined) {
return Promise.reject(new Error('请选择是否规范评审!')) return Promise.resolve();
} }
}]}
if (value?.requiresStandardApproval && (value?.standardApprovalUserList??[]).length === 0) { >
return Promise.reject(new Error('请选择规范评审人员!')) <RuleReviewItem />
} </Form.Item>
return Promise.resolve(); <Form.Item
} label='附件'
}]} style={{ marginBottom }}
> >
<RuleReviewItem /> <Upload {...uploadProps }>
</Form.Item> <Button icon={<UploadOutlined />}>点击上传</Button>
</Upload>
<Form.Item </Form.Item>
label='附件'
style={{ marginBottom }} <Form.Item
> label='已上传附件'
<Upload {...uploadProps }> name='fileList'
<Button icon={<UploadOutlined />}>点击上传</Button> >
</Upload> <AttachesItem />
</Form.Item> </Form.Item>
</Col>
<Form.Item <Col span={12}>
label='已上传附件' <Form.Item
name='fileList' label='送审说明'
> name="sendReviewExplain"
<AttachesItem /> style={{ marginBottom }}
</Form.Item> rules={[{ required: true, message: '请填写送审说明!' }]}
>
<Input.TextArea rows={7} placeholder='请输入送审说明' />
</Form.Item>
</Col>
</Row>
</Form> </Form>
) )
}) })
...@@ -431,7 +436,7 @@ const DesignUsersItem = ({ value, onChange }) => { ...@@ -431,7 +436,7 @@ const DesignUsersItem = ({ value, onChange }) => {
return ( return (
<Select showSearch allowClear <Select showSearch allowClear
placeholder='请选择设计评审人员' placeholder='请选择设计评审人员(只能选择一人)'
value={value?.map(item => item.name)} value={value?.map(item => item.name)}
searchValue={searchValue} searchValue={searchValue}
onSearch={(val) => { onSearch={(val) => {
......
...@@ -25,7 +25,7 @@ const FC = (props) => { ...@@ -25,7 +25,7 @@ const FC = (props) => {
triggerType: undefined, triggerType: undefined,
}) })
const [columns, setColumns] = React.useState([]) const [columns, setColumns] = React.useState([])
const [isCompact, setCompact] = React.useState(true) const [isCompact, setCompact] = React.useState(false)
const cols = [ const cols = [
{ {
...@@ -247,7 +247,7 @@ const FC = (props) => { ...@@ -247,7 +247,7 @@ const FC = (props) => {
setLoadingPreference(false) setLoadingPreference(false)
setLoading(false) setLoading(false)
setAnimating(false) setAnimating(false)
setCompact(true) setCompact(false)
setPreference() setPreference()
setSuggests() setSuggests()
setOffset(1) setOffset(1)
...@@ -313,12 +313,12 @@ const FC = (props) => { ...@@ -313,12 +313,12 @@ const FC = (props) => {
style={{ width: inputWidth }} style={{ width: inputWidth }}
/> />
</Space> </Space>
<Button {/* <Button
icon={isCompact ? <ArrowsAltOutlined /> : <ShrinkOutlined />} icon={isCompact ? <ArrowsAltOutlined /> : <ShrinkOutlined />}
onClick={() => { onClick={() => {
setCompact(prev => !prev) setCompact(prev => !prev)
}} }}
/> /> */}
</div> </div>
<Spin spinning={loading||loadingPreference}> <Spin spinning={loading||loadingPreference}>
<div style={{ height: isCompact?'50vh':'80vh', overflow: 'auto' }}> <div style={{ height: isCompact?'50vh':'80vh', overflow: 'auto' }}>
......
...@@ -158,7 +158,7 @@ const FC = (props) => { ...@@ -158,7 +158,7 @@ const FC = (props) => {
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
<Input.TextArea <Input.TextArea
autoSize={{ minRows: 1, maxRows: 20 }} rows={4}
allowClear allowClear
placeholder='请输入流程意见' placeholder='请输入流程意见'
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment