Commit 325eea2f by zhaochengxiang

规范配置调整

parent 1eb100b9
...@@ -57,7 +57,7 @@ const FC = (props) => { ...@@ -57,7 +57,7 @@ const FC = (props) => {
visible={visible} visible={visible}
footer={footer} footer={footer}
width='80%' width='80%'
bodyStyle={{ padding: '15px', overflowX: 'auto', maxHeight: '80vh' }} bodyStyle={{ padding: '15px', overflowX: 'auto', height: '80vh' }}
title='新增检查规则' title='新增检查规则'
centered destroyOnClose centered destroyOnClose
onCancel={() => { close() }} onCancel={() => { close() }}
......
...@@ -99,7 +99,7 @@ const FC = (props) => { ...@@ -99,7 +99,7 @@ const FC = (props) => {
if (key === 'delete') { if (key === 'delete') {
modal.confirm({ modal.confirm({
title: '提示!', title: '提示!',
content: '您确定删除该目录吗?', content: '您确定删除该规范吗?',
onOk: () => { onOk: () => {
setLoading(true); setLoading(true);
dispatch({ dispatch({
...@@ -108,7 +108,7 @@ const FC = (props) => { ...@@ -108,7 +108,7 @@ const FC = (props) => {
id: node?.id id: node?.id
}, },
callback: data => { callback: data => {
showMessage('success', '删除目录成功') showMessage('success', '删除规范成功')
if (selectedNode?.id === node?.id) { if (selectedNode?.id === node?.id) {
setSelectedNode() setSelectedNode()
} }
...@@ -127,39 +127,27 @@ const FC = (props) => { ...@@ -127,39 +127,27 @@ const FC = (props) => {
item: node item: node
}) })
} else if (key === 'up') { } else if (key === 'up') {
modal.confirm({ dispatch({
title: '提示!', type: 'datamodel.upRuleCatalog',
content: '您确定上移该目录吗?', payload: {
onOk: () => { params: {
dispatch({ id: node?.id
type: 'datamodel.upRuleCatalog', }
payload: { },
params: { callback: data => {
id: node?.id getTreeData()
}
},
callback: data => {
getTreeData()
}
})
} }
}) })
} else if (key === 'down') { } else if (key === 'down') {
modal.confirm({ dispatch({
title: '提示!', type: 'datamodel.downRuleCatalog',
content: '您确定下移该目录吗?', payload: {
onOk: () => { params: {
dispatch({ id: node?.id
type: 'datamodel.downRuleCatalog', }
payload: { },
params: { callback: data => {
id: node?.id getTreeData()
}
},
callback: data => {
getTreeData()
}
})
} }
}) })
} else if (key === 'version') { } else if (key === 'version') {
...@@ -183,12 +171,12 @@ const FC = (props) => { ...@@ -183,12 +171,12 @@ const FC = (props) => {
<Space> <Space>
<PermissionButton <PermissionButton
defaultPermission={true} defaultPermission={true}
tip="新增目录" tip="新增规范"
type="text" type="text"
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={onAddClick} onClick={onAddClick}
/> />
<Tooltip title="刷新目录"> <Tooltip title="刷新规范">
<Button type="text" icon={<ReloadOutlined />} onClick={onRefreshClick} /> <Button type="text" icon={<ReloadOutlined />} onClick={onRefreshClick} />
</Tooltip> </Tooltip>
</Space> </Space>
...@@ -205,10 +193,10 @@ const FC = (props) => { ...@@ -205,10 +193,10 @@ const FC = (props) => {
selectedKeys={(selectedNode?.id)?[selectedNode?.id]:undefined} selectedKeys={(selectedNode?.id)?[selectedNode?.id]:undefined}
shouldRowContextMenu={() => !readonly} shouldRowContextMenu={() => !readonly}
menuData={[ menuData={[
{ id: 'edit', title: '编辑目录' }, { id: 'edit', title: '编辑规范' },
{ id: 'up', title: '上移目录' }, { id: 'up', title: '上移规范' },
{ id: 'down', title: '下移目录' }, { id: 'down', title: '下移规范' },
{ id: 'delete', title: '删除目录' }, { id: 'delete', title: '删除规范' },
{ id: 'version', title: '历史版本' }, { id: 'version', title: '历史版本' },
]} ]}
onMenuItemClick={onMenuItemClick} onMenuItemClick={onMenuItemClick}
......
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