Commit 8d983700 by zhaochengxiang

评审提示

parent 174fc612
...@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, useMemo } from 'react'; ...@@ -2,7 +2,7 @@ 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, QuestionCircleFilled } from '@ant-design/icons';
import copy from "copy-to-clipboard"; import copy from "copy-to-clipboard";
import ImportAction from './ImportAction'; import ImportAction from './ImportAction';
...@@ -20,6 +20,7 @@ import ExportModel from './ExportOtherModal'; ...@@ -20,6 +20,7 @@ import ExportModel from './ExportOtherModal';
import ExportDDLModel from './ExportDDLModal'; import ExportDDLModel from './ExportDDLModal';
import './EditModel.less'; import './EditModel.less';
import { getTimeProps } from 'antd/lib/date-picker/generatePicker';
const EditModel = (props) => { const EditModel = (props) => {
...@@ -746,6 +747,7 @@ export default EditModel; ...@@ -746,6 +747,7 @@ export default EditModel;
const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange, onOk, onHistory, onExport }) => { const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange, onOk, onHistory, onExport }) => {
const [item, setItem] = useState() const [item, setItem] = useState()
const [waiting, setWaiting] = useState(false) const [waiting, setWaiting] = useState(false)
const [tip, setTip] = useState()
useEffect(() => { useEffect(() => {
if (data && id) { if (data && id) {
...@@ -756,6 +758,12 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange ...@@ -756,6 +758,12 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
} }
}, [data, id]) }, [data, id])
useEffect(() => {
if (type) {
getTip()
}
}, [type])
const [index, canPrev, canNext] = useMemo(() => { const [index, canPrev, canNext] = useMemo(() => {
if (data && id) { if (data && id) {
const index = (data?.modelInfoList??[]).findIndex(item => item.id === id) const index = (data?.modelInfoList??[]).findIndex(item => item.id === id)
...@@ -767,6 +775,18 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange ...@@ -767,6 +775,18 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
return [0, false, false] return [0, false, false]
}, [data, id]) }, [data, id])
const getTip = () => {
dispatch({
type: 'datamodel.getPhysicalModelApprovalTip',
payload: {
type
},
callback: data => {
setTip(data?.tip)
}
})
}
const onExportClick = () => { const onExportClick = () => {
onExport?.() onExport?.()
} }
...@@ -828,6 +848,15 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange ...@@ -828,6 +848,15 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
<Button type='primary' ghost onClick={onHistoryClick}>历史版本</Button> <Button type='primary' ghost onClick={onHistoryClick}>历史版本</Button>
</Space> </Space>
<Space> <Space>
{
tip && <Tooltip title={
<div>
{(tip??'').split('\n').map((item, index) => (<div key={index}>{item}</div>))}
</div>}
>
<QuestionCircleFilled style={{ fontSize: 18, color: '#3B80D6' }} />
</Tooltip>
}
<Tooltip title={((type==='rule')&&!item?.designReviewPass) ? '设计评审不通过' : ''}> <Tooltip title={((type==='rule')&&!item?.designReviewPass) ? '设计评审不通过' : ''}>
<Select <Select
value={(type==='design')?item?.designReviewPass:item?.standardReviewPass} value={(type==='design')?item?.designReviewPass:item?.standardReviewPass}
......
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