Commit 8d983700 by zhaochengxiang

评审提示

parent 174fc612
......@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, useMemo } from 'react';
import { Form, Button, Space, Tooltip, Modal, Select, Input } from 'antd';
import LocalStorage from 'local-storage';
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 ImportAction from './ImportAction';
......@@ -20,6 +20,7 @@ import ExportModel from './ExportOtherModal';
import ExportDDLModel from './ExportDDLModal';
import './EditModel.less';
import { getTimeProps } from 'antd/lib/date-picker/generatePicker';
const EditModel = (props) => {
......@@ -746,6 +747,7 @@ export default EditModel;
const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange, onOk, onHistory, onExport }) => {
const [item, setItem] = useState()
const [waiting, setWaiting] = useState(false)
const [tip, setTip] = useState()
useEffect(() => {
if (data && id) {
......@@ -756,6 +758,12 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
}
}, [data, id])
useEffect(() => {
if (type) {
getTip()
}
}, [type])
const [index, canPrev, canNext] = useMemo(() => {
if (data && id) {
const index = (data?.modelInfoList??[]).findIndex(item => item.id === id)
......@@ -767,6 +775,18 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
return [0, false, false]
}, [data, id])
const getTip = () => {
dispatch({
type: 'datamodel.getPhysicalModelApprovalTip',
payload: {
type
},
callback: data => {
setTip(data?.tip)
}
})
}
const onExportClick = () => {
onExport?.()
}
......@@ -828,6 +848,15 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
<Button type='primary' ghost onClick={onHistoryClick}>历史版本</Button>
</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) ? '设计评审不通过' : ''}>
<Select
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