Commit 8fb6e69d by zhaochengxiang

任务管理跳转

parent 6774c726
...@@ -57,7 +57,7 @@ const FC = (props) => { ...@@ -57,7 +57,7 @@ const FC = (props) => {
minConstraints={[230, Infinity]} minConstraints={[230, Infinity]}
maxConstraints={[Infinity, Infinity]} maxConstraints={[Infinity, Infinity]}
> >
<Tree onClick={onTreeClick} /> <Tree onClick={onTreeClick} {...props} />
</ResizableBox> </ResizableBox>
{ {
!collapseTree && <Separate width={15} /> !collapseTree && <Separate width={15} />
...@@ -74,6 +74,7 @@ const FC = (props) => { ...@@ -74,6 +74,7 @@ const FC = (props) => {
node={node} node={node}
onClick={onResourceListClick} onClick={onResourceListClick}
onFullScreenChange={onResourceListFullScreenChange} onFullScreenChange={onResourceListFullScreenChange}
{...props}
/> />
<div className='tree-toggle' onClick={treeToggleClick}> <div className='tree-toggle' onClick={treeToggleClick}>
{ !collapseTree ? <CaretLeftOutlined /> : <CaretRightOutlined /> } { !collapseTree ? <CaretLeftOutlined /> : <CaretRightOutlined /> }
......
...@@ -121,6 +121,7 @@ const FC = (props) => { ...@@ -121,6 +121,7 @@ const FC = (props) => {
const locationIdRef = React.useRef(getQueryParam('id', props?.location?.search)) const locationIdRef = React.useRef(getQueryParam('id', props?.location?.search))
const locationDidRef = React.useRef(getQueryParam('did', props?.location?.search)) const locationDidRef = React.useRef(getQueryParam('did', props?.location?.search))
const taskIdRef = React.useRef(getQueryParam('taskId', props?.location?.search))
const setArgsAndPage = React.useCallback((params) => { const setArgsAndPage = React.useCallback((params) => {
// 设置查询参数时将分页置为1 // 设置查询参数时将分页置为1
...@@ -195,6 +196,12 @@ const FC = (props) => { ...@@ -195,6 +196,12 @@ const FC = (props) => {
setSelectedRows([]) setSelectedRows([])
if (locationIdRef.current && locationDidRef.current) { if (locationIdRef.current && locationDidRef.current) {
getDataAssetLocation() getDataAssetLocation()
} else if (taskIdRef.current) {
setKeyword(taskIdRef.current)
setArgsAndPage({
catalogType: 'fullSearch',
keyword: taskIdRef.current,
})
} else { } else {
setPageAndArgs({ pageNum: 1, pageSize: page.pageSize }) setPageAndArgs({ pageNum: 1, pageSize: page.pageSize })
} }
...@@ -517,12 +524,15 @@ const FC = (props) => { ...@@ -517,12 +524,15 @@ const FC = (props) => {
return prevRow return prevRow
}) })
taskIdRef.current = null
} }
}, },
error: () => { error: () => {
setLoading(false) setLoading(false)
locationIdRef.current = null locationIdRef.current = null
locationDidRef.current = null locationDidRef.current = null
taskIdRef.current = null
} }
}) })
} }
...@@ -1116,7 +1126,6 @@ const FC = (props) => { ...@@ -1116,7 +1126,6 @@ const FC = (props) => {
id={record.id} id={record.id}
columns={columns} columns={columns}
onRowClick={(event, value) => { onRowClick={(event, value) => {
event.stopPropagation()
setRow(value) setRow(value)
onClick?.(value) onClick?.(value)
}} }}
......
...@@ -82,6 +82,11 @@ const FC = (props) => { ...@@ -82,6 +82,11 @@ const FC = (props) => {
{ {
title: '任务编号', title: '任务编号',
dataIndex: 'taskNO', dataIndex: 'taskNO',
render: (_, record) => <a onClick={() => {
window.open(`/center-home/menu/asset-resource-manage?taskId=${record.taskNO}`)
}}>
{record.taskNO}
</a>
}, },
{ {
title: '数量', title: '数量',
......
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