Commit f5744b71 by zhaochengxiang

去掉不用的代码

parent d9d316a2
......@@ -55,25 +55,6 @@ const FC = (props) => {
}
}, [currentTemplateValue, keyword, currentElementValue, pagination], { wait: 300 })
const actionCol = {
title: '操作',
dataIndex: 'action',
width: 120,
fixed: 'right',
render: (_, record) => (
<Space size={5} split={<Divider type='vertical' style={{margin:0}} />}>
<a onClick={(e) => {
e.stopPropagation()
onEditClick(record)
}}>编辑</a>
<a onClick={(e) => {
e.stopPropagation()
onDeleteClick(record)
}}>删除</a>
</Space>
)
}
const [columns, tableData, total] = React.useMemo(() => {
const [newColumns, newTableData] = [[], []]
......@@ -121,8 +102,6 @@ const FC = (props) => {
}
}
newColumns.push(actionCol)
if (!loadingFilterElements) {
for (const item of (data?.data??[])) {
let index = 0
......@@ -150,7 +129,7 @@ const FC = (props) => {
}
return [newColumns, newTableData, data?.total??0]
}, [filterElements, data, loadingFilterElements, users, actionCol])
}, [filterElements, data, loadingFilterElements, users])
const getUsers = () => {
dispatch({
......@@ -288,34 +267,6 @@ const FC = (props) => {
})
}
const onEditClick = (record) => {
setUpdateAssetParams({
visible: true,
id: record?.id,
})
}
const onDeleteClick = (record) => {
modal.confirm({
title: '是否确认删除该条资产目录',
onOk: () => {
dispatch({
type: 'assetmanage.deleteDrafts',
payload: {
params: {
isAdmin,
},
data: record?.id
},
callback: () => {
showMessage("success","删除成功")
getDrafts()
}
})
}
})
}
return (
<div style={{ backgroundColor: '#fff', height: '100%' }}>
<div className='flex p-3' style={{
......
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