Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
185c5b56
Commit
185c5b56
authored
Aug 24, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 项目概览跳转数据集合
parent
f1521f2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
index.tsx
src/views/Project/ProjectData/index.tsx
+1
-0
index.tsx
src/views/Project/ProjectOverview/TaskCard/index.tsx
+10
-13
No files found.
src/views/Project/ProjectData/index.tsx
View file @
185c5b56
...
...
@@ -68,6 +68,7 @@ const ProjectData = observer(() => {
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
setActiveTab
(
locationInfo
?.
dataType
||
'file'
)
setPath
(
locationInfo
?.
pathName
||
"/"
);
},
[
location
]);
...
...
src/views/Project/ProjectOverview/TaskCard/index.tsx
View file @
185c5b56
...
...
@@ -47,21 +47,18 @@ const TaskCard = (props: TaskCardProps) => {
}
},
[
outputs
])
// 结果文件跳转
const
goToProjectData
=
(
path
:
string
)
=>
{
const
goToProjectData
=
(
info
:
any
)
=>
{
let
{
path
=
''
,
type
=
''
}
=
info
const
lastIndex
=
path
.
lastIndexOf
(
"/"
);
// /projectData
// dataType
if
(
lastIndex
!==
-
1
)
{
path
=
path
.
slice
(
0
,
lastIndex
);
}
path
=
path
.
slice
(
12
);
if
(
path
)
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
},
});
}
else
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
"/"
},
});
}
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
||
'/'
,
dataType
:
type
},
});
}
// 跳转详情页
const
gotoDetail
=
(
id
:
string
)
=>
{
...
...
@@ -177,15 +174,15 @@ const TaskCard = (props: TaskCardProps) => {
{
randerOutputs
.
length
===
0
?
<
div
className=
{
style
.
noResult
}
>
暂无结果文件
</
div
>
:
<
div
className=
{
style
.
resultBox
}
>
{
randerOutputs
.
map
((
item
,
index
)
=>
{
return
<
div
key=
{
index
}
className=
{
style
.
result
}
onClick=
{
()
=>
goToProjectData
(
item
.
path
)
}
>
return
<
div
key=
{
index
}
className=
{
style
.
result
}
onClick=
{
()
=>
goToProjectData
(
item
)
}
>
<
img
className=
{
style
.
outputLeftImg
}
src=
{
item
.
type
===
"file"
?
fileIcon
:
dataSetIcon
item
?
.
type
===
"file"
?
fileIcon
:
dataSetIcon
}
alt=
""
/>
{
item
.
name
}
</
div
>
{
item
?
.
name
}
</
div
>
})
}
</
div
>
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment