Commit 2bd51ded authored by 吴永生#A02208's avatar 吴永生#A02208

chore: 拉release代码

parents 08c3fbef a76e2c1e
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-13 09:56:57
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-24 14:37:17
* @LastEditTime: 2022-06-24 16:32:31
* @FilePath: /bkunyun/src/api/api_manager.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -31,6 +31,9 @@ const RESTAPI = {
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`, //点击任务列表查看任务详情
API_WORKBENCH_WORKFLOWJOB_LIST: `${BACKEND_API_URI_PREFIX}/cpp/workbench/project/workflowjob`, //查询工作流任务
API_WORKBENCH_DEL_WORKFLOWJOB: `${BACKEND_API_URI_PREFIX}/cpp/workflow/job/`, //删除工作流任务
API_WORKBENCH_CANCEL_WORKFLOWJOB: `${BACKEND_API_URI_PREFIX}/cpp/workflow/cancel`, //取消工作流
};
export default RESTAPI;
......@@ -74,11 +74,59 @@ const addWorkbenchTemplate = (params: workflowspecAddTemplateParams) => {
};
type workflowJobListParams = {
projectId: string;
name?: string;
state?: string;
page?: number;
size?: number;
};
// 查询项目下工作流模板列表
const getWorkflowJobList = (params: workflowJobListParams) => {
return request({
url: Api.API_WORKBENCH_WORKFLOWJOB_LIST,
method: "get",
params,
});
};
type workflowJobDelParams = {
id: string
};
// 项目管理员-删除工作流模板
const deleteWorkflowJob = (params: workflowJobDelParams) => {
return request({
url: Api.API_WORKBENCH_DEL_WORKFLOWJOB + params.id,
method: "delete",
});
};
type workflowJobCancelParams = {
jobid: string
};
// 取消工作流
const cancelWorkflowJob = (params: workflowJobCancelParams) => {
return request({
url: Api.API_WORKBENCH_CANCEL_WORKFLOWJOB,
method: "delete",
params,
});
};
export {
current,
menu,
getWorkbenchTemplate,
deleteWorkbenchTemplate,
getAddWorkbenchTemplate,
addWorkbenchTemplate
addWorkbenchTemplate,
getWorkflowJobList,
deleteWorkflowJob,
cancelWorkflowJob
};
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 8备份 5</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-8备份-5">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-61备份-8" transform="translate(1.000000, 1.000000)" stroke="#C2C6CC" stroke-width="1.68">
<circle id="椭圆形" cx="7" cy="7" r="6.16"></circle>
<line x1="10.7487096" y1="2.20752017" x2="3.31564484" y2="11.6997394" id="路径-48"></line>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 26备份</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.540000 0 0 0 0 0.564000 0 0 0 0 0.600000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-26备份" transform="translate(2.000000, 2.000000)">
<circle id="椭圆形备份" stroke="#8A9099" stroke-width="1.2" fill-rule="nonzero" cx="6" cy="6" r="6.6"></circle>
<g filter="url(#filter-1)" id="编组-28">
<g transform="translate(3.558554, 2.400000)">
<polyline id="路径-23" stroke="#979797" stroke-width="1.2" points="0.122694244 1.35254766e-12 2.44144585 2.31875161 2.4 7.59435239"></polyline>
<line x1="2.44144585" y1="2.31875161" x2="4.76019746" y2="-1.05607525e-13" id="路径-24" stroke="#979797" stroke-width="1.2"></line>
<line x1="0" y1="3.58021955" x2="4.8" y2="3.58021955" id="路径-60" stroke="#979797" stroke-width="1.2"></line>
<line x1="-5.77512014e-14" y1="6" x2="4.8" y2="6" id="路径-60备份" stroke="#979797" stroke-width="1.2"></line>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1.Base基础/Icon图标/工作流模版备份 7</title>
<defs>
<filter color-interpolation-filters="auto" id="filter-1">
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.540000 0 0 0 0 0.564000 0 0 0 0 0.600000 0 0 0 1.000000 0"></feColorMatrix>
</filter>
</defs>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组" transform="translate(-1.000000, 0.000000)">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g filter="url(#filter-1)" id="编组-50">
<g transform="translate(1.000000, 1.605109)">
<line x1="0" y1="2.39431484" x2="14" y2="2.39431484" id="路径-16" stroke="#979797" stroke-width="1.5"></line>
<path d="M3.37934347,2.39431484 L3.37934347,1 C3.37934347,0.44771525 3.82705872,1.01453063e-16 4.37934347,0 L9.63329305,0 C10.1855778,-1.01453063e-16 10.6332931,0.44771525 10.6332931,1 L10.6332931,2.39431484 L10.6332931,2.39431484" id="路径-17" stroke="#979797" stroke-width="1.5"></path>
<path d="M2.45321216,3.89402686 L2.45321216,11.9292428 C2.45321216,12.4815275 2.90092741,12.9292428 3.45321216,12.9292428 L10.4872657,12.9292428 C11.0395505,12.9292428 11.4872657,12.4815275 11.4872657,11.9292428 L11.4872657,3.89402686 L11.4872657,3.89402686" id="路径-20" stroke="#979797" stroke-width="1.5"></path>
<line x1="5.49894415" y1="3.89402686" x2="5.49894415" y2="10.3954667" id="路径-21" stroke="#979797" stroke-width="1.5"></line>
<line x1="8.49836822" y1="3.89402686" x2="8.49836822" y2="10.3954667" id="路径-22" stroke="#979797" stroke-width="1.5"></line>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 51</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-51">
<rect id="矩形备份-22" x="0" y="0" width="16" height="16"></rect>
<g id="编组-24" transform="translate(1.000000, 1.000000)">
<circle id="椭圆形" fill="#FF4E4E" fill-rule="nonzero" cx="7" cy="7" r="7"></circle>
<line x1="4.2" y1="4.2" x2="9.8" y2="9.8" id="路径-50" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round"></line>
<line x1="4.2" y1="4.2" x2="9.8" y2="9.8" id="路径-50备份" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" transform="translate(7.000000, 7.000000) scale(-1, 1) translate(-7.000000, -7.000000) "></line>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 8备份</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-8备份">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-61" transform="translate(1.000000, 1.000000)">
<circle id="椭圆形" fill="#1370FF" fill-rule="nonzero" cx="7" cy="7" r="7"></circle>
<line x1="7" y1="7" x2="7" y2="3.5" id="路径" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round"></line>
<line x1="7" y1="7" x2="9.625" y2="7" id="路径" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round"></line>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 18备份 3</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-18备份-3" transform="translate(0.000000, 0.000000)">
<g id="编组-9" transform="translate(0.500000, 0.500000)">
<circle id="椭圆形" fill="#FF4E4E" cx="7.5" cy="7.5" r="7.5"></circle>
<rect id="矩形" fill="#FFFFFF" x="4.5" y="4.5" width="6" height="6" rx="1"></rect>
</g>
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 50</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-50">
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
<g id="编组-61备份-4" transform="translate(1.000000, 1.000000)">
<circle id="椭圆形" fill="#0DD09B" fill-rule="nonzero" cx="7" cy="7" r="7"></circle>
<polyline id="路径-47" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" points="4.40461184 7.46931053 7 9.48405007 9.9825782 4.58929929"></polyline>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 26备份</title>
<g id="上线UI" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-26备份" transform="translate(2.000000, 2.000000)" stroke="#8A9099" stroke-width="1.2">
<circle id="椭圆形备份" fill-rule="nonzero" cx="6" cy="6" r="6.6"></circle>
<line x1="6" y1="6" x2="6" y2="3" id="路径备份" stroke-linecap="round"></line>
<line x1="6" y1="6" x2="8.25" y2="6" id="路径备份-2" stroke-linecap="round"></line>
</g>
</g>
</svg>
\ No newline at end of file
......@@ -18,32 +18,52 @@ import LastPageIcon from '@mui/icons-material/LastPage';
import { makeStyles } from "@mui/styles";
const useStyles = makeStyles({
firstPageIconStyle: { width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', margin: "0 6px" },
KeyboardArrowLeftStyle:{ width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', marginRight: "3px" },
keyboardArrowRightStyle:{ width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', marginLeft: "3px" },
lastPageIconStyle:{ width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', margin: "0 6px" }
KeyboardArrowLeftStyle: { width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', marginRight: "3px" },
keyboardArrowRightStyle: { width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', marginLeft: "3px" },
lastPageIconStyle: { width: '28px', height: '28px', padding: 0, backgroundColor: '#FFFFFF', borderRadius: '2px', border: '1px solid #D8D8D8', margin: "0 6px" }
})
const TablePaginationActionsConsole = props => {
const classes = useStyles();
const { count, page, rowsPerPage, onChangePage } = props;
const { count, page, rowsPerPage, onChangePage, onPageChange } = props;
const handleFirstPageButtonClick = (event) => {
onChangePage(event, 0);
if (!onChangePage) {
onPageChange(event, 0)
return
}
onChangePage(event, 0)
}
const handleBackButtonClick = (event) => {
onChangePage(event, page - 1);
if (!onChangePage) {
onPageChange(event, page - 1)
return
}
onChangePage(event, page - 1)
}
const handleNextButtonClick = (event) => {
onChangePage(event, page + 1);
if (!onChangePage) {
onPageChange(event, page + 1);
return
}
onChangePage(event, page + 1)
}
const btnClick = (event, item) => {
onChangePage(event, item);
if (!onChangePage) {
onPageChange(event, item);
return
}
onChangePage(event, item)
}
const handleLastPageButtonClick = (event) => {
onChangePage(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
if (!onChangePage) {
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
return
}
onChangePage(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1))
}
const buttons = (count, page, rowsPerPage) => {
let max = 1;
if( rowsPerPage !== -1 ){
if (rowsPerPage !== -1) {
max = count % rowsPerPage === 0 ? count / rowsPerPage : parseInt(count / rowsPerPage) + 1;
}
let arr = [...Array(max).keys()];
......@@ -69,7 +89,7 @@ const TablePaginationActionsConsole = props => {
<FirstPageIcon />
</IconButton>
<IconButton
className = { classes.KeyboardArrowLeftStyle }
className={classes.KeyboardArrowLeftStyle}
onClick={handleBackButtonClick} disabled={page === 0} aria-label="previous page">
<KeyboardArrowLeft />
</IconButton>
......
......@@ -13,7 +13,8 @@
.content {
flex: 1;
height: calc(100vh - 57px);
overflow: scroll;
overflow: hidden;
/* ??????????? */
}
.list {
/* background-color: red; */
......
......@@ -26,7 +26,7 @@ import List_select from "@/assets/project/workbenchList_select.svg"
//ui
import ButtonDemo from "@/views/mui_demo/button"
import ButtonDemo from "@/views/mui_demo/button"
import InputDemo from "@/views/mui_demo/input"
const ProjectWorkbench = observer(() => {
......@@ -35,7 +35,7 @@ const ProjectWorkbench = observer(() => {
useEffect(() => {
console.log(isPass("PROJECT_WORKBENCH_FLOES_USE", 'USER'), "11111111111");
console.log(isPass("PROJECT_WORKBENCH_FLOES"),'wwwwwwwwwww')
console.log(isPass("PROJECT_WORKBENCH_FLOES"), 'wwwwwwwwwww')
}, [])
const tabList = useMemo(() => {
......@@ -52,6 +52,7 @@ const ProjectWorkbench = observer(() => {
label: "任务列表",
value: "workbenchList",
component: <WorkbenchList />,
hide: !isPass("PROJECT_WORKBENCH_JOBS"),
icon: List,
iconed: List_select
},
......
import { memo, useCallback, useEffect, useMemo, useState } from "react";
import styles from "../index.module.css";
import { Box, Typography } from "@mui/material";
import Button from "@mui/material/Button";
import Dialog from "@/components/mui/Dialog";
const SimpleDialog = (props: any) => {
const { openDialog, closeDialog, onConfirm, text, title } = props;
return (
< >
<Dialog
open={openDialog}
onClose={closeDialog}
onConfirm={onConfirm}
title={title}
>
<Box>
<Typography sx={{ fontSize: '14px', fontWeight: '400' }}>{text}</Typography>
</Box>
</Dialog>
</>
);
};
export default memo(SimpleDialog);
.headerBox {
margin-bottom: 20px;
}
.tabHeader {
display: flex;
align-items: center;
}
.tabHeaderSelect {
margin-left: 16px;
}
.body {
margin-top: 24px;
border-top: 1px solid #F0F2F5;
overflow: hidden;
overflow-y: auto;
height: calc(100vh - 290px);
}
.tabBox {
padding: 15px 0px 16px 24px;
display: flex;
align-items: center;
width: 100%;
border-bottom: 1px solid #F0F2F5;
}
.tabBox:hover {
background-color: #F5F6F7;
}
.tabBoxInfo {
width: 24%;
}
.tabBoxDescInfo {
display: flex;
}
.tabBoxTitle {
font-size: 14px;
font-weight: 600;
color: #1E2633;
margin-bottom: 10px;
}
.tabBoxDesc {
font-size: 12px;
font-weight: 400;
color: #8A9099;
}
.tabBoxTime {
font-size: 12px;
font-weight: 400;
color: #565C66;
margin-left: 4px;
}
.tabBoxMiddle {
display: flex;
align-items: center;
width: 10%;
}
.tabBoxJobStatus {
display: flex;
align-items: center;
width: 46%;
}
.tabBoxStatusText {
font-size: 12px;
font-weight: 400;
color: #1E2633;
margin: 0px 16px 0px 6px;
white-space: nowrap;
}
.tabBoxJobOperate {
width: 10%;
display: flex;
justify-content: center;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
import { memo, useCallback, useEffect, useMemo, useState } from "react";
import styles from "../index.module.css";
import { Box, Typography } from "@mui/material";
import Button from "@mui/material/Button";
import Button from "@/components/mui/Button";
import Dialog from "@/components/mui/Dialog";
import OutlinedInput from "@mui/material/OutlinedInput";
import SearchIcon from "@mui/icons-material/Search";
......@@ -37,13 +37,10 @@ const AddTemplate = (props: any) => {
endAdornment={<SearchIcon style={{ color: "#8A9099" }} />}
/>
<Button
style={{ backgroundColor: "#1370FF", marginLeft: "12px" }}
variant="contained"
onClick={addTemplateCallback}
size="small"
>
添加模版{selectTemplateData.length === 0 ? "" : `(${selectTemplateData.length})`}
</Button>
click={addTemplateCallback}
size={"small"}
text={'添加模版' + (selectTemplateData.length === 0 ? "" : `(${selectTemplateData.length})`)}
/>
</Box>
{
......
......@@ -2,14 +2,14 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-17 14:48:57
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-23 14:53:30
* @LastEditTime: 2022-06-24 16:32:16
* @FilePath: /bkunyun/src/views/Project/ProjectWorkbench/workbenchTemplate/components/templateBox.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { memo, useCallback, useEffect, useMemo, useState } from "react";
import styles from "../index.module.css";
import { Box, Typography } from "@mui/material";
import Button from "@mui/material/Button";
import Button from "@/components/mui/Button";
import usePass from "@/hooks/usePass";
import { useNavigate } from "react-router-dom";
......@@ -71,25 +71,21 @@ const TemplateBox = (props: any) => {
>
{isPass("PROJECT_WORKBENCH_FLOES_USE", "MANAGER") && (
<Button
style={{ backgroundColor: "#F0F2F5", color: "#565C66" }}
variant="contained"
onClick={() => {
size={"small"}
text={"删除模版"}
click={() => {
props.startDialog(info.id);
}}
size="small"
>
删除模版
</Button>
style={{ backgroundColor: "#F0F2F5", color: "#565C66" }}
/>
)}
{isPass("PROJECT_WORKBENCH_FLOES_USE", "USER") && (
<Button
style={{ backgroundColor: "#1370FF", marginLeft: "12px" }}
variant="contained"
onClick={() => addTemplateBlock(info.id)}
size="small"
>
使用模版
</Button>
size={"small"}
text={"使用模版"}
click={() => {}}
style={{ marginLeft: "12px" }}
/>
)}
</Box>
</Box>
......
.headerBox {
/* display: flex;
justify-content: space-between;
align-items: center; */
margin-bottom: 20px;
}
......
......@@ -11,8 +11,8 @@ import { Box, Typography } from "@mui/material";
import styles from "./index.module.css";
import OutlinedInput from "@mui/material/OutlinedInput";
import SearchIcon from "@mui/icons-material/Search";
// import Button from "@/components/mui/Button";
import Button from "@mui/material/Button";
import Button from "@/components/mui/Button";
// import Button from "@mui/material/Button";
import Add from "@mui/icons-material/Add";
import useMyRequest from "@/hooks/useMyRequest";
import TemplateBox from "./components/templateBox"
......@@ -198,15 +198,8 @@ const ProjectMembers = observer(() => {
/>
{
templateList.length > 0 && isPass("PROJECT_WORKBENCH_FLOES_ADD", 'MANAGER') && <Button
style={{ backgroundColor: "#1370FF " }}
variant="contained"
onClick={addTemplateBlock}
startIcon={<Add />}
size="small"
>
添加工作流模版
</Button>
templateList.length > 0 && isPass("PROJECT_WORKBENCH_FLOES_ADD", 'MANAGER') &&
<Button text={'添加工作流模版'} img={<Add />} click={addTemplateBlock} size={'small'} />
}
</Box>
......
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