Commit a6dd469e authored by jiangzijing's avatar jiangzijing

Merge branch 'feat-20220801' of http://120.77.149.83/root/bkunyun into feat-20220801

parents 63351a21 daaee6e8
......@@ -15,7 +15,7 @@ main::-webkit-scrollbar-track {
div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
background-color: #c2c6cc;
background-color: rgba(138, 144, 153, 0.55);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
......@@ -23,6 +23,13 @@ main::-webkit-scrollbar-thumb {
width: 6px !important;
}
div::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
}
main::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
}
body,
h1,
h2,
......
......@@ -54,11 +54,17 @@ const theme = createTheme({
"&.MuiButton-outlinedError": {
color: "rgba(255, 78, 78, 1)",
border: "1px solid rgba(255, 78, 78, 1)",
"&:hover": { backgroundColor: "transparent" },
"&:hover": { backgroundColor: "#FFEDED" },
},
"& .MuiLoadingButton-loadingIndicator": {
color: "#fff",
},
"&.MuiButton-containedError": {
backgroundColor: "#FF4E4E",
"&:hover": {
backgroundColor: "rgba(217, 54, 54, 1)",
},
},
},
contained: {
backgroundColor: "#1370FF",
......@@ -101,6 +107,9 @@ const theme = createTheme({
border: "1px solid rgba(221, 225, 230, 1)",
},
},
// outlinedError: {
// "&:hover": { backgroundColor: "#FFEDED " },
// },
textSecondary: {
backgroundColor: "transparent",
color: "#FF4E4E",
......
import React from "react";
import React, { useMemo } from "react";
import {
Dialog,
......@@ -42,7 +42,14 @@ export interface IDialogProps {
/** 点击遮罩是否关闭 默认为false*/
clickMaskClose?: boolean;
/** 确认按钮样式*/
okSx?: any;
okColor?:
| "inherit"
| "primary"
| "secondary"
| "success"
| "error"
| "info"
| "warning"; //按钮颜色风格
loading?: boolean; // 确认按钮是否处于loading状态
}
......@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabledConfirm,
clickMaskClose = false,
loading = false,
okSx = {},
okColor = "primary",
} = props;
const handelClose = (
......@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
onClose && onClose();
};
const Footer = () => {
const Footer = useMemo(() => {
if (isHideFooter) return null;
return footerRender ? (
footerRender()
......@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={cancelText || "取消"}
onClick={onClose}
variant="outlined"
// size="small"
color="secondary"
/>
) : null}
......@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={okText || "确定"}
onClick={onConfirm}
variant="contained"
// size="small"
color={okColor}
disabled={disabledConfirm}
isLoadingButton={true}
loading={loading}
style={{ marginLeft: "12px", ...okSx }}
style={{ marginLeft: "12px" }}
/>
) : null}
</DialogActions>
);
};
}, [
disabledConfirm,
okColor,
okText,
onConfirm,
onClose,
cancelText,
showCancel,
footerRender,
isHideFooter,
loading,
showConfirm,
]);
return (
<Dialog
open={open}
......@@ -155,7 +173,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
</DialogTitle>
)}
<DialogContent style={{ minWidth: 388 }}>{children}</DialogContent>
{Footer()}
{Footer}
</Dialog>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-02 11:43:28
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-03 19:05:48
* @LastEditTime: 2022-09-02 12:01:12
* @FilePath: /bkunyun/src/views/MenuLayout/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,64 +17,80 @@ import classnames from "classnames";
import { toJS } from "mobx";
const MenuLayout = observer(() => {
const { permissionStore, currentProjectStore } = useStores();
let pathname = new URL(window.location.href).pathname;
const { permissionStore, currentProjectStore } = useStores();
let pathname = new URL(window.location.href).pathname;
const navigate = useNavigate();
const navigate = useNavigate();
const productInfo = toJS(currentProjectStore.currentProductInfo);
const productInfo = toJS(currentProjectStore.currentProductInfo);
// 未选择产品时 直接跳转home页面
if (!productInfo.name) {
navigate("/home");
}
// 未选择产品时 直接跳转home页面
if (!productInfo.name) {
navigate("/home");
}
const routerIcon = (id: string, isSelect: boolean) => {
try {
const result = require(`../../assets/project/${id}${isSelect ? '_BLUE' : ''}.svg`)
return result || ''
} catch (error) {
console.log(error)
}
}
const routerIcon = (id: string, isSelect: boolean) => {
try {
const result = require(`../../assets/project/${id}${
isSelect ? "_BLUE" : ""
}.svg`);
return result || "";
} catch (error) {
console.log(error);
}
};
return (
<Box className={style.container}>
<Box className={style.aside}>
{
pathname.indexOf('userCenter') < 0 && <CurrentProject />
}
<List
sx={{
paddingTop: 0,
paddingBottom: 0,
}}
>
{permissionStore.sidebarRouters.map((item, index) => {
if (item.show) {
return (
<li
key={"sidebar" + index}
className={classnames({
[style.listItem]: true,
[style.active]: `/v3${item.path}` === pathname,
})}
onClick={() => item.type === "page" && navigate(item.path)}
>
<img className={style.routerIcon} src={routerIcon(item.id || '', `/v3${item.path}` === pathname) || undefined} alt='' />
<span style={{ verticalAlign: 'middle', fontWeight: '500' }}>{item.name}</span>
</li>
);
}
return null;
})}
</List>
</Box>
<Box className={style.content}>
<Outlet></Outlet>
</Box>
</Box>
);
return (
<Box className={style.container}>
<Box className={style.aside}>
{pathname.indexOf("userCenter") < 0 && <CurrentProject />}
<List
sx={{
paddingTop: 0,
paddingBottom: 0,
}}
>
{permissionStore.sidebarRouters.map((item, index) => {
if (item.show) {
return (
<li
key={"sidebar" + index}
className={classnames({
[style.listItem]: true,
[style.active]: `/v3${item.path}` === pathname,
})}
style={
`/v3${item.path}` === pathname
? { borderLeft: "3px solid #1370ff" }
: undefined
}
onClick={() => item.type === "page" && navigate(item.path)}
>
<img
className={style.routerIcon}
src={
routerIcon(
item.id || "",
`/v3${item.path}` === pathname
) || undefined
}
alt=""
/>
<span style={{ verticalAlign: "middle", fontWeight: "500" }}>
{item.name}
</span>
</li>
);
}
return null;
})}
</List>
</Box>
<Box className={style.content}>
<Outlet></Outlet>
</Box>
</Box>
);
});
export default MenuLayout;
......@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => {
open={deleteDialogOpen}
onClose={() => setDeleteDialogOpen(false)}
onConfirm={handleSubmit}
okColor="error"
>
{currentOperateFile
? "确认删除该数据吗?"
......
......@@ -25,6 +25,9 @@
justify-content: flex-start;
align-items: center;
}
.goBackIcon {
cursor: pointer;
}
.swTemplateTitle {
margin: 0 19px 0 8px;
line-height: 22px;
......
......@@ -11,8 +11,6 @@ import { toJS } from "mobx";
import { observer } from "mobx-react-lite";
import classNames from "classnames";
import { useLocation, useNavigate } from "react-router-dom";
import ArrowBackIosNewIcon from "@mui/icons-material/ArrowBackIosNew";
import IconButton from "@mui/material/IconButton";
import MyButton from "@/components/mui/MyButton";
import useMyRequest from "@/hooks/useMyRequest";
......@@ -27,6 +25,7 @@ import jobStop from "@/assets/project/jobStop.svg";
import jobRun from "@/assets/project/jobRun.svg";
import fullScreen from "@/assets/project/fullScreen.svg";
import partialScreen from "@/assets/project/partialScreen.svg";
import goback from "@/assets/project/goback.svg";
import CloudEController from "@/api/fileserver/CloudEController";
import jobFail from "@/assets/project/jobFail.svg";
import fileIcon from "@/assets/project/fileIcon.svg";
......@@ -422,21 +421,12 @@ const ProjectSubmitWork = observer(() => {
{fullScreenShow ? null : (
<div className={styles.swHeader}>
<div className={styles.swHeaderLeft}>
<IconButton
color="primary"
<img
onClick={onBack}
aria-label="upload picture"
component="span"
size="small"
>
<ArrowBackIosNewIcon
sx={{
color: "#C2C6CC",
width: "12px",
height: "12px",
}}
/>
</IconButton>
className={styles.goBackIcon}
src={goback}
alt=""
/>
<div className={styles.swTemplateTitle}>{name}</div>
</div>
......
......@@ -446,7 +446,7 @@ const BaseInfo = observer(() => {
onConfirm={handleSubmitDelete}
onClose={() => setDialogOpen(false)}
title="删除项目"
okSx={{ background: "#FF4E4E", color: "#fff" }}
okColor="error"
>
<div className={style.deleteBox}>
<div className={style.deleteText1}>
......
......@@ -22,6 +22,7 @@
.tabBox {
padding: 16px 0px 16px 24px;
cursor: pointer;
display: flex;
align-items: center;
width: 100%;
......@@ -95,6 +96,12 @@
justify-content: center;
}
.jobOperateImgBox:hover {
padding: 8px;
border-radius: 4px;
background-color: #ebedf0;
}
.tabUpdate {
cursor: pointer;
width: 32px;
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-01 16:35:02
* @LastEditTime: 2022-09-02 14:45:04
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -480,6 +480,7 @@ const ProjectMembers = observer(() => {
<img
alt=""
src={jobDel}
className={styles.jobOperateImgBox}
style={{ cursor: "pointer" }}
onClick={(event) => {
event.stopPropagation();
......
......@@ -12,7 +12,7 @@ const SimpleDialog = (props: any) => {
onClose={closeDialog}
onConfirm={onConfirm}
title={title}
okSx={{ background: "#FF4E4E", color: "#fff" }}
okColor="error"
>
<Box>
<Typography sx={{ fontSize: "14px", fontWeight: "400" }}>
......
.batchNode {
background-color: #fff;
border-radius: 4px;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.06);
/* padding: 12px 20px; */
border: 1px solid #e6e8eb;
/* border: 1px solid #e6e8eb; */
border-left: 4px solid #e6e8eb;
/* display: flex; */
align-items: center;
}
.batchNode:hover {
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.14);
}
.doneBatchNode {
border-left: 4px solid #0dd09b;
}
......@@ -45,7 +50,7 @@
/* transform: translateX(-50%) rotate(-90deg); */
}
.handleBox::before{
.handleBox::before {
content: "";
position: absolute;
left: -4px;
......
......@@ -44,3 +44,9 @@
width: 14px;
height: 14px;
}
.handleBox {
background: #fff;
width: 6px;
height: 6px;
}
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-31 17:09:31
* @LastEditTime: 2022-09-02 14:23:07
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -86,8 +86,6 @@ const FlowNode = (props: any) => {
className={styles.handleBox}
id={item.name}
style={{
background: "#fff ",
border: "1px solid #D1D6DE",
...inStyle,
left: index * 24 + 16,
}}
......@@ -98,8 +96,10 @@ const FlowNode = (props: any) => {
);
})
: null}
<div style={{display: 'flex', alignItems: 'center'}}>
<span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span>
<div style={{ display: "flex", alignItems: "center" }}>
<span style={{ fontSize: "12px", lineHeight: "20px" }}>
{title || ""} {showVersion && version}
</span>
{flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span>
) : null}
......@@ -108,7 +108,7 @@ const FlowNode = (props: any) => {
) : null}
{getImgUrl(executionStatus) && (
<img
style={{ marginLeft: "6px" }}
style={{ marginLeft: "6px", width: "12px", height: "12px" }}
src={getImgUrl(executionStatus)}
alt=""
/>
......@@ -122,8 +122,6 @@ const FlowNode = (props: any) => {
className={styles.handleBox}
id={item.name}
style={{
background: "#fff ",
border: "1px solid #D1D6DE",
...outStyle,
left: index * 24 + 16,
}}
......
.reactFlowBox>div:last-child {
display: none;
}
\ No newline at end of file
.reactFlowBox > div:last-child {
display: none;
}
.reactFlowBox > div:first-child {
margin-top: 32px;
}
......@@ -323,12 +323,13 @@ const Flow = (props: IProps) => {
style: {
...getBatchStyle(item),
marginTop: "-44px",
padding: "12px 20px",
padding: "12px 20px 20px 20px",
},
},
/** 坐标 */
position: {
x: Number(item.position?.x) || 0,
/** 流算子生成的时候多加了15 兼容历史模版数据 直接这边减去15 */
x: Number(item.position?.x - 15) || 0,
y: Number(item.position?.y) || 0,
},
/**
......
......@@ -3,6 +3,17 @@
border-radius: 4px;
cursor: grab;
padding: 16px 16px 0 24px;
background-color: #fff;
}
.operatorItemBox:hover {
position: relative;
z-index: 1;
top: -1px;
left: 24px;
box-shadow: 6px 8px 22px 0px rgba(0, 24, 57, 0.08);
}
.operatorItemBox:hover .footerBox {
border-bottom: 1px solid #fff;
}
.dragBox {
......@@ -62,6 +73,7 @@
overflow-y: overlay;
height: calc(100% - 48px);
position: relative;
overflow: visible;
}
.noData {
display: flex;
......
......@@ -76,6 +76,9 @@
justify-content: flex-start;
align-items: center;
}
.paramsTabTitle {
margin-bottom: 0;
}
.paramsTitleDesc {
margin-left: 8px;
......@@ -84,7 +87,7 @@
.paramsList {
background-color: rgba(247, 248, 250, 1);
border-radius: 4px;
padding: 16px 20px;
padding: 16px 20px 24px;
}
.parameterBox {
......
......@@ -213,7 +213,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -238,7 +238,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -263,7 +263,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -275,7 +275,9 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange={(e: any) =>
handleParameterChange(e, parameter.name || "")
}
placeholder="可输入默认值"
placeholder={
parameter.parameterGroup === "out" ? "" : "可输入默认值"
}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -505,6 +507,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
setActiveParamsTab("senior");
} else if (hardwareParameters.length !== 0) {
setActiveParamsTab("hardware");
} else {
setActiveParamsTab(""); // 会报错 不过不会有蓝色长条
}
}, [basisParameters, seniorParameters, hardwareParameters]);
......@@ -631,7 +635,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
)}
{taskInfo && (
<div className={styles.paramsGroup}>
<div className={styles.paramsTitle}>
<div
className={classNames({
[styles.paramsTitle]: true,
[styles.paramsTabTitle]: true,
})}
>
参数组
<MyTooltip
title="当某个参数项为启用状态时,代表该参数将由模板使用者在使用的时候填写赋值;当为关闭状态时,代表该参数不需要使用者来填写赋值。"
......
......@@ -44,7 +44,7 @@
}
.swFormBox {
background-color: #fff;
border-right: 1xp solid rgba(235, 237, 240, 1);
border-right: 1px solid rgba(235, 237, 240, 1);
width: 360px;
height: 100%;
/* overflow-y: scroll; */
......
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