Commit bf9e671d by zhaochengxiang

模型增加路径

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