Commit 9f858c49 by zhaochengxiang

bug fix

parents 06865e81 2cbc7d21
...@@ -808,47 +808,6 @@ const ModelTable = (props) => { ...@@ -808,47 +808,6 @@ const ModelTable = (props) => {
'model-table-sub': modelId 'model-table-sub': modelId
}); });
let expandable = undefined;
let needExpand = false;
if (!modelId) {
(filterData||[]).forEach(record => {
if (record?.alreadyCheckedOut) {
needExpand = true;
}
})
if (needExpand) {
expandable = {
expandedRowRender: record => <ModelTable
view={view}
modelId={record?.checkedOutId}
modelPid={record?.id}
onSubSelect={onSubSelectChange}
{...props}
/>,
expandIcon: ({ expanded, onExpand, record }) => {
if (!record?.alreadyCheckedOut) return null;
return expanded ? <UpOutlined style={{ fontSize: 10 }} onClick={e => onExpand(record, e)} /> : <DownOutlined style={{ fontSize: 10 }} onClick={e => onExpand(record, e)} />
},
rowExpandable: record => {
return record?.alreadyCheckedOut;
}
};
}
} else {
expandable = {
expandedRowRender: record => <></>,
expandIcon: ({ expanded, onExpand, record }) => {
return null;
},
rowExpandable: record => {
return false;
}
}
}
const displayMenu = (e) => { const displayMenu = (e) => {
show({ show({
event: e event: e
...@@ -900,7 +859,7 @@ const ModelTable = (props) => { ...@@ -900,7 +859,7 @@ const ModelTable = (props) => {
<Table <Table
rowSelection={view!=='grant'?rowSelection:undefined} rowSelection={view!=='grant'?rowSelection:undefined}
rowKey={'id'} rowKey={'id'}
extraColWidth={(modelId||needExpand)?85:32} extraColWidth={32}
columns={columns||[]} columns={columns||[]}
dataSource={modelId?(subData||[]):(filterData||[])} dataSource={modelId?(subData||[]):(filterData||[])}
pagination={false} pagination={false}
...@@ -918,7 +877,6 @@ const ModelTable = (props) => { ...@@ -918,7 +877,6 @@ const ModelTable = (props) => {
rowClassName={(record, index) => (record?.id===anchorId)?'yy-table-select-row':''} rowClassName={(record, index) => (record?.id===anchorId)?'yy-table-select-row':''}
scroll={{ y: modelId?null:((filterData||[]).length===0?null:'calc(100vh - 121px - 57px - 24px - 38px - 44px)') }} scroll={{ y: modelId?null:((filterData||[]).length===0?null:'calc(100vh - 121px - 57px - 24px - 38px - 44px)') }}
onChange={onTableChange} onChange={onTableChange}
expandable={!isOnlyEnding ? expandable : undefined}
/> />
{ {
!modelId && (data||[]).length>0 && <Pagination !modelId && (data||[]).length>0 && <Pagination
......
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