Commit 2cc11b22 by zhaochengxiang

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

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