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
e52d9962
Commit
e52d9962
authored
Jul 13, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义、公共模板列表接口替换
parent
059b4969
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
13 deletions
+17
-13
api_manager.ts
src/api/api_manager.ts
+1
-1
workbench_api.ts
src/api/workbench_api.ts
+1
-1
index.module.css
...components/BusinessComponents/FileSelect/index.module.css
+0
-0
index.tsx
src/components/BusinessComponents/FileSelect/index.tsx
+5
-0
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+9
-11
index.tsx
src/views/WorkFlowEdit/index.tsx
+1
-0
No files found.
src/api/api_manager.ts
View file @
e52d9962
...
...
@@ -27,7 +27,7 @@ const RESTAPI = {
API_USER_PERMISSION_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/uaa/routes/privilege/list`
,
//获取用户包含的权限列表
API_WORKBENCH_TEMPLATE_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/project/workflowspec`
,
//查询项目下工作流模板列表
API_WORKBENCH_DELETE_TEMPLATE
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/project/workflowspec`
,
//项目管理员-删除工作流模板
API_WORKBENCH_ADD_TEMPLATE_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/pro
duct/
workflowspec`
,
//项目管理员-添加工作流模板-模板列表
API_WORKBENCH_ADD_TEMPLATE_LIST
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/pro
ject/notfavorited
workflowspec`
,
//项目管理员-添加工作流模板-模板列表
API_WORKBENCH_ADD_TEMPLATE
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/project/workflowspec`
,
//项目管理员-添加工作流模板-提交
API_FETCH_TEMPLATE_INFO
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/workflowspec`
,
//点击使用模版查看模版详情
API_WORK_FLOW_JOB
:
`
${
BACKEND_API_URI_PREFIX
}
/cpp/workbench/workflowjob`
,
//点击任务列表查看任务详情
...
...
src/api/workbench_api.ts
View file @
e52d9962
...
...
@@ -55,7 +55,7 @@ const deleteWorkbenchTemplate = (params: workflowspecDeleteTemplateParams) => {
type
workflowspecGetAddTemplateParams
=
{
projectId
?:
string
;
productId
:
string
;
title
?:
string
;
keyword
?:
string
;
creator
?:
string
;
};
...
...
src/components/BusinessComponents/FileSelect/index.module.css
0 → 100644
View file @
e52d9962
src/components/BusinessComponents/FileSelect/index.tsx
0 → 100644
View file @
e52d9962
const
FileSelect
=
()
=>
{
return
<
div
>
FileSelect
</
div
>;
};
export
default
FileSelect
;
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
e52d9962
...
...
@@ -16,6 +16,7 @@ import _ from "lodash";
import
{
observer
}
from
"mobx-react-lite"
;
import
noData
from
"../../../../../../assets/project/noTemplate.svg"
;
import
{
ICustomTemplate
}
from
"../../interface"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
getAddWorkbenchTemplate
,
addWorkbenchTemplate
,
...
...
@@ -40,13 +41,12 @@ const radioOptions = [
const
AddTemplate
=
observer
((
props
:
IAddTemplateProps
)
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
Message
=
useMessage
();
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
productId
=
toJS
(
currentProjectStore
.
currentProductInfo
.
id
);
const
{
setShowAddTemplate
,
getTemplateInfo
}
=
props
;
const
[
title
,
setTitle
]
=
useState
(
""
);
const
handleSearch
=
(
value
:
string
)
=>
{};
/** 可增加模板列表 */
const
[
addTemplateList
,
setAddTemplateList
]
=
useState
([]);
...
...
@@ -73,6 +73,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
// 项目管理员-添加工作流模板-提交
const
{
run
:
addTemplate
}
=
useMyRequest
(
addWorkbenchTemplate
,
{
onSuccess
:
(
result
:
any
)
=>
{
Message
.
success
(
"添加成功"
);
setSelectTemplateData
([]);
setShowAddTemplate
(
false
);
getTemplateInfo
({
...
...
@@ -125,26 +126,27 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
setAddTemplateList
([]);
if
(
templateType
===
"public"
)
{
getAddTemplateList
({
//
projectId: projectId as string,
projectId
:
projectId
as
string
,
productId
:
productId
as
string
,
title
,
creator
:
"root"
,
keyword
:
title
,
});
}
else
{
getAddTemplateList
({
//
projectId: projectId as string,
projectId
:
projectId
as
string
,
productId
:
productId
as
string
,
creator
:
userName
,
title
,
keyword
:
title
,
});
}
},
[
setSelectTemplateData
,
getAddTemplateList
,
productId
,
projectId
,
templateType
,
title
,
]);
// projectId,
// title,
useEffect
(()
=>
{
...
...
@@ -189,10 +191,6 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
value=
{
title
}
onChange=
{
(
e
:
any
)
=>
{
setTitle
(
e
.
target
.
value
);
// _.debounce(() =>
{
// // searchTemplateNameCallback(e.target.value);
// handleSearch(e.target.value);
//
},
200
)();
}
}
placeholder=
"输入关键词搜索"
size=
"small"
...
...
src/views/WorkFlowEdit/index.tsx
View file @
e52d9962
...
...
@@ -412,6 +412,7 @@ const WorkFlowEdit = observer((props: IProps) => {
error=
{
titleHelper
.
error
}
helperText=
{
titleHelper
.
helperText
}
style=
{
{
margin
:
"20px 0"
}
}
disabled=
{
id
?
true
:
false
}
></
MyInput
>
<
MyInput
value=
{
version
}
...
...
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