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
sunyihao
bkunyun
Commits
dbdc5b17
Commit
dbdc5b17
authored
Jul 06, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220705-customTemplate' into 'release'
Feat 20220705 custom template See merge request
!83
parents
563b2e17
91794fa1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
41 deletions
+63
-41
index.tsx
src/views/Project/ProjectData/MoveFile/index.tsx
+3
-1
index.module.css
src/views/Project/ProjectJobDetail/index.module.css
+7
-4
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+53
-36
No files found.
src/views/Project/ProjectData/MoveFile/index.tsx
View file @
dbdc5b17
...
...
@@ -34,7 +34,9 @@ const MoveFile = (props: any) => {
const
[
moveFileSubmitloading
,
setMoveFileSubmitloading
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
<
any
>
([]);
const
[
renderTreeData
,
setRenderTreeData
]
=
useState
<
any
>
([]);
let
moveFileDialogRef
:
any
=
React
.
createRef
();
const
[
moveFileDialogRef
,
setMoveFileDialogRef
]
=
useState
<
any
>
(
React
.
createRef
()
);
// 要移动的文件夹 之后用来隐藏文件夹树中同路径的文件夹
const
[
moveFolderPathArr
,
setMoveFolderPathArr
]
=
useState
<
Array
<
string
>>
([]);
...
...
src/views/Project/ProjectJobDetail/index.module.css
View file @
dbdc5b17
...
...
@@ -99,18 +99,20 @@
color
:
rgba
(
138
,
144
,
153
,
1
);
font-size
:
14px
;
line-height
:
22px
;
width
:
72px
;
margin-right
:
44px
;
}
.taskInfoValue
{
color
:
rgba
(
30
,
38
,
51
,
1
);
font-size
:
14px
;
line-height
:
22px
;
max-width
:
210px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
display
:
flex
;
overflow
:
hidden
;
position
:
relative
;
align-items
:
center
;
text-align
:
left
;
word-break
:
break-all
;
flex
:
1
;
justify-content
:
flex-end
;
}
.taskInfoValueClick
{
cursor
:
pointer
;
...
...
@@ -159,6 +161,7 @@
background
:
#ffffff
;
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
border-radius
:
4px
;
z-index
:
1002
;
}
.option
{
padding
:
7px
16px
;
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
dbdc5b17
...
...
@@ -73,22 +73,22 @@ const ProjectSubmitWork = observer(() => {
const
{
name
,
state
}
=
workFlowJobInfo
||
{};
/** 获取模版数据 */
const
{
run
}
=
useMyRequest
(
fetchWorkFlowJob
,
{
pollingInterval
:
1000
*
60
,
pollingWhenHidden
:
false
,
onSuccess
:
(
res
:
IResponse
<
ITaskInfo
>
)
=>
{
getOutouts
(
res
.
data
.
outputs
);
setWorkFlowJobInfo
(
res
.
data
);
},
});
/** 获取模版数据 */
const
{
run
}
=
useMyRequest
(
fetchWorkFlowJob
,
{
pollingInterval
:
1000
*
60
,
pollingWhenHidden
:
false
,
onSuccess
:
(
res
:
IResponse
<
ITaskInfo
>
)
=>
{
getOutouts
(
res
.
data
.
outputs
);
setWorkFlowJobInfo
(
res
.
data
);
},
});
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
run
({
id
:
locationInfo
.
taskId
,
});
},
[
location
?.
state
,
run
]);
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
run
({
id
:
locationInfo
.
taskId
,
});
},
[
location
?.
state
,
run
]);
const
{
run
:
getworkFlowTaskInfoRun
}
=
useMyRequest
(
getworkFlowTaskInfo
,
{
onSuccess
:
(
res
)
=>
{
...
...
@@ -96,21 +96,34 @@ const ProjectSubmitWork = observer(() => {
},
});
const
goToProjectData
=
(
path
:
string
)
=>
{
path
=
path
.
slice
(
13
);
if
(
path
)
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
},
});
}
};
const
goToProjectData
=
(
path
:
string
)
=>
{
path
=
path
.
slice
(
13
);
if
(
path
)
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
},
});
}
else
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
"/"
},
});
}
};
/** 返回事件 */
const
onBack
=
useCallback
(()
=>
{
navigate
(
"/product/cadd/projectWorkbench"
,
{
state
:
{
type
:
"workbenchList"
},
});
},
[
navigate
]);
// 通过文件路径获取文件所在文件夹路径 如 输入 /home/cloudam/task_a.out 输出/home/cloudam/
const
getFolderPath
=
(
path
:
string
)
=>
{
const
lastIndex
=
path
.
lastIndexOf
(
"/"
);
if
(
lastIndex
!==
-
1
)
{
path
=
path
.
slice
(
0
,
lastIndex
+
1
);
}
return
path
;
};
/** 返回事件 */
const
onBack
=
useCallback
(()
=>
{
navigate
(
"/product/cadd/projectWorkbench"
,
{
state
:
{
type
:
"workbenchList"
},
});
},
[
navigate
]);
const
outputPathTransform
=
(
path
:
string
)
=>
{
path
=
path
.
slice
(
13
);
...
...
@@ -326,7 +339,7 @@ const ProjectSubmitWork = observer(() => {
<
div
key=
{
index
}
className=
{
styles
.
outputLi
}
>
<
MyPopconfirm
title=
"即将跳转至项目数据内该任务的结果目录,确认继续吗?"
onConfirm=
{
()
=>
goToProjectData
(
item
.
path
)
}
onConfirm=
{
()
=>
goToProjectData
(
getFolderPath
(
item
.
path
)
)
}
>
<
div
className=
{
styles
.
outputLiLeft
}
>
<
img
...
...
@@ -497,12 +510,16 @@ const ProjectSubmitWork = observer(() => {
{
patchInfo
?.
children
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
key=
{
index
}
className=
{
styles
.
option
}
onClick=
{
()
=>
setActiveFlowIndex
(
index
)
}
>
{
item
.
title
}
</
div
>
key=
{
index
}
className=
{
classNames
({
[
styles
.
option
]:
true
,
[
styles
.
optionActive
]:
activeFlowIndex
===
index
,
})
}
onClick=
{
()
=>
setActiveFlowIndex
(
index
)
}
>
{
item
.
title
}
</
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