Commit bf9e671d by zhaochengxiang

模型增加路径

parent 0c5beccc
...@@ -389,12 +389,14 @@ const ImportActionIndex = (props) => { ...@@ -389,12 +389,14 @@ const ImportActionIndex = (props) => {
} }
if (index === -1) { if (index === -1) {
newData.splice(0, 0, {
newData.push({
name: row.name, name: row.name,
unique: row.unique, unique: row.unique,
indexedEasyDataModelAttributes: _indexedEasyDataModelAttributes, indexedEasyDataModelAttributes: _indexedEasyDataModelAttributes,
indexedAttributeOrders: _indexedAttributeOrders, indexedAttributeOrders: _indexedAttributeOrders,
}); });
} else { } else {
newData.splice(index, 1, {...{ newData.splice(index, 1, {...{
name: row.name, name: row.name,
......
...@@ -365,9 +365,9 @@ const ImportActionTable = (props) => { ...@@ -365,9 +365,9 @@ const ImportActionTable = (props) => {
} }
if (index === -1) { if (index === -1) {
newData.splice(0, 0, {...row, iid: editingKey, modelingTemplateTag: null});
newData.push({...row, iid: editingKey, modelingTemplateTag: null});
} else { } else {
const item = newData[index]; const item = newData[index];
newData.splice(index, 1, { ...item, ...row, modelingTemplateTag: null }); newData.splice(index, 1, { ...item, ...row, modelingTemplateTag: null });
......
...@@ -124,24 +124,24 @@ const ModelTable = (props) => { ...@@ -124,24 +124,24 @@ const ModelTable = (props) => {
width: 100, width: 100,
ellipsis: true, ellipsis: true,
}, },
{ // {
title: '标签', // title: '标签',
dataIndex: 'tag', // dataIndex: 'tag',
width: 200, // width: 200,
onCell: (record) => ({ // onCell: (record) => ({
onMouseEnter: event => { // onMouseEnter: event => {
setMouseEnterKey(record.id); // setMouseEnterKey(record.id);
}, // },
onMouseLeave: event => { // onMouseLeave: event => {
setMouseEnterKey(null); // setMouseEnterKey(null);
}, // },
}), // }),
render: (_,record) => { // render: (_,record) => {
return ( // return (
record.id===mouseEnterKey?<Tag styleType='complex' id={record.id} />:<Tag id={record.id} /> // record.id===mouseEnterKey?<Tag styleType='complex' id={record.id} />:<Tag id={record.id} />
); // );
} // }
}, // },
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
...@@ -214,6 +214,20 @@ const ModelTable = (props) => { ...@@ -214,6 +214,20 @@ const ModelTable = (props) => {
}, },
]; ];
const pathColumn = {
title: '路径',
dataIndex: 'path',
width: 120,
ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
<span>{text||''}</span>
</Tooltip>
)
}
};
const [ pagination, setPagination ] = useState( { pageNum: 1, pageSize: 20 } ); const [ pagination, setPagination ] = useState( { pageNum: 1, pageSize: 20 } );
const { pageNum, pageSize } = pagination; const { pageNum, pageSize } = pagination;
...@@ -478,8 +492,13 @@ const ModelTable = (props) => { ...@@ -478,8 +492,13 @@ const ModelTable = (props) => {
} }
let _columns = [...columns]; let _columns = [...columns];
if ((modelId||'')==='' && (view==='state'||(keyword||'')!=='')) {
_columns.splice(3, 0, pathColumn);
}
if ((modelId||'')!=='') { if ((modelId||'')!=='') {
_columns = columns.filter(item => item.dataIndex!=='key') _columns = _columns.filter(item => item.dataIndex!=='key')
} }
return ( return (
......
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