Commit 2cc11b22 by zhaochengxiang

评审页面应该是可展开的文本框

parent b5f77a19
......@@ -116,10 +116,8 @@ const FC = (props) => {
<div className='edit-header'>
<span style={{ fontSize: 16, fontWeight: 'bold', color: '#fff' }}>{title}</span>
</div>
<div className='edit-container'>
<div className='edit-container-card' style={{ padding: '20px 20px 0' }}>
<EditAssets ref={editAssetsRef} action={action} type={type} ids={ids} elementIds={elementIds} />
</div>
<div className='edit-container' style={{ padding: '10px 10px 0' }}>
<EditAssets ref={editAssetsRef} action={action} type={type} ids={ids} elementIds={elementIds} />
</div>
<div className='edit-footer'>
{
......@@ -459,7 +457,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
<div ref={tableRef}>
<Form form={form} component={false}>
<Table
maxHeight='calc(100vh - 245px)'
maxHeight='calc(100vh - 213px)'
loading={loading}
columns={columns}
dataSource={tableData}
......
......@@ -4,6 +4,7 @@ import LocalStorage from 'local-storage';
import { useMount, useUnmount } from 'ahooks';
import { LeftCircleFilled, RightCircleFilled, QuestionCircleFilled } from '@ant-design/icons';
import copy from "copy-to-clipboard";
import ResizeObserver from 'rc-resize-observer';
import ImportAction from './ImportAction';
import CatalogModal from './CatalogModal';
......@@ -20,7 +21,6 @@ import ExportModel from './ExportOtherModal';
import ExportDDLModel from './ExportDDLModal';
import './EditModel.less';
import { getTimeProps } from 'antd/lib/date-picker/generatePicker';
const EditModel = (props) => {
......@@ -47,6 +47,7 @@ const EditModel = (props) => {
const [exportDDLParams, setExportDDLParams] = useState({
visible: false,
})
const [containerHeight, setContainerHeight] = useState(0)
const actionRef = useRef('');
const attrIsEditingRef = useRef(false);
......@@ -681,11 +682,27 @@ const EditModel = (props) => {
<div className='edit-header'>
<span style={{ fontSize: 16, fontWeight: 'bold', color: '#fff' }}>{title}</span>
</div>
<div className='edit-container'>
<div className='edit-container-card'>
<ImportAction ref={importActionRef} hints={hints} onChange={onActionChange} action={action} modelerId={modelerId} catalogId={catalogId} ddl={ddl} form={form} terms={terms} roughModelerData={roughModelerData} permitCheckOut={permitCheckOut} stateId={stateId} versionId={versionId} branchId={branchId} autoTabKey={autoTabKey} approvalModelId={currentApprovalModelId} approvalId={approvalId} {...props} />
<ResizeObserver
onResize={({ height }) => {
setContainerHeight(height)
}}
>
<div className='edit-container'>
<div className='edit-container-card'>
<ImportAction
ref={importActionRef} hints={hints} action={action}
modelerId={modelerId} catalogId={catalogId} ddl={ddl} form={form}
terms={terms} roughModelerData={roughModelerData}
permitCheckOut={permitCheckOut} stateId={stateId}
versionId={versionId} branchId={branchId} autoTabKey={autoTabKey}
approvalModelId={currentApprovalModelId} approvalId={approvalId}
height={containerHeight}
onChange={onActionChange}
{...props}
/>
</div>
</div>
</div>
</ResizeObserver>
<div className='edit-footer'>
{actionsBtn}
</div>
......@@ -888,11 +905,12 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
</Tooltip>
<Tooltip title={((type==='rule')&&!item?.designReviewPass) ? '设计评审不通过' : ''}>
<Form.Item style={{ marginBottom: 0 }}>
<Input
<Input.TextArea
rows={1}
value={(type==='design')?item?.designReviewComment:item?.standardReviewComment}
disabled={(type==='rule')&&!item?.designReviewPass}
placeholder='请输入评审意见'
style={{ width: 500 }}
style={{ width: 700 }}
allowClear
onChange={(e) => {
setItem(prev => {
......
.edit-model {
display: flex;
flex-direction: column;
overflow: hidden;
height: 100vh;
.edit-header {
display: flex;
flex: none;
width: 100%;
height: 44px;
padding: 0 15px;
background-color: #464d6e;
align-items: center;
// position: fixed;
justify-content: space-between;
border-bottom: 1px solid #EFEFEF;
// z-index: 100;
}
.edit-container {
flex: 1;
background: #F2F2F2;
height: calc(100vh - 44px - 64px);
overflow: hidden;
}
.edit-container-card {
margin: 10px;
height: calc(100vh - 44px - 64px - 20px);
// background: #fff;
overflow: hidden;
}
.edit-footer {
display: flex;
bottom: 0;
flex: none;
width: 100%;
height: 64px;
position: fixed;
min-height: 64px;
max-height: 500px;
justify-content: flex-end;
opacity: 0.9;
background: #fff;
box-shadow: 0 -1px 4px 0 #e5e9ea;
padding: 0 20px;
padding: 10px 20px;
}
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ import './ImportAction.less'
export const importActionSubject = new Subject()
const ImportAction = React.forwardRef((props, ref) => {
const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, versionId, permitCheckOut, catalogId, branchId, approvalModelId, approvalId, reference = '' } = props;
const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, versionId, permitCheckOut, catalogId, branchId, approvalModelId, approvalId, reference = '', height } = props;
const [ constraints, setConstraints ] = useState([]);
const [ constraint, setConstraint ] = useState({});
......@@ -647,7 +647,7 @@ const ImportAction = React.forwardRef((props, ref) => {
}
</Tabs>
}
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':(reference!=='full-search'?'calc(100vh - 44px - 64px - 66px)': '100%'), overflow: 'auto' }}>
<div ref={setContainer} style={{ height: action==='edit-inherite-modal'?'60vh':(reference==='full-search'?'100%':(height-66)), overflow: 'auto' }}>
<ImportActionHeader
form={form}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
......
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