Commit d179d130 authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !84
parents 7f637d6c daaee6e8
...@@ -15,7 +15,7 @@ main::-webkit-scrollbar-track { ...@@ -15,7 +15,7 @@ main::-webkit-scrollbar-track {
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb { main::-webkit-scrollbar-thumb {
background-color: #c2c6cc; background-color: rgba(138, 144, 153, 0.55);
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
...@@ -23,6 +23,13 @@ main::-webkit-scrollbar-thumb { ...@@ -23,6 +23,13 @@ main::-webkit-scrollbar-thumb {
width: 6px !important; 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, body,
h1, h1,
h2, h2,
......
...@@ -54,11 +54,17 @@ const theme = createTheme({ ...@@ -54,11 +54,17 @@ const theme = createTheme({
"&.MuiButton-outlinedError": { "&.MuiButton-outlinedError": {
color: "rgba(255, 78, 78, 1)", color: "rgba(255, 78, 78, 1)",
border: "1px solid rgba(255, 78, 78, 1)", border: "1px solid rgba(255, 78, 78, 1)",
"&:hover": { backgroundColor: "transparent" }, "&:hover": { backgroundColor: "#FFEDED" },
}, },
"& .MuiLoadingButton-loadingIndicator": { "& .MuiLoadingButton-loadingIndicator": {
color: "#fff", color: "#fff",
}, },
"&.MuiButton-containedError": {
backgroundColor: "#FF4E4E",
"&:hover": {
backgroundColor: "rgba(217, 54, 54, 1)",
},
},
}, },
contained: { contained: {
backgroundColor: "#1370FF", backgroundColor: "#1370FF",
...@@ -101,6 +107,9 @@ const theme = createTheme({ ...@@ -101,6 +107,9 @@ const theme = createTheme({
border: "1px solid rgba(221, 225, 230, 1)", border: "1px solid rgba(221, 225, 230, 1)",
}, },
}, },
// outlinedError: {
// "&:hover": { backgroundColor: "#FFEDED " },
// },
textSecondary: { textSecondary: {
backgroundColor: "transparent", backgroundColor: "transparent",
color: "#FF4E4E", color: "#FF4E4E",
......
import React from "react"; import React, { useMemo } from "react";
import { import {
Dialog, Dialog,
...@@ -42,7 +42,14 @@ export interface IDialogProps { ...@@ -42,7 +42,14 @@ export interface IDialogProps {
/** 点击遮罩是否关闭 默认为false*/ /** 点击遮罩是否关闭 默认为false*/
clickMaskClose?: boolean; clickMaskClose?: boolean;
/** 确认按钮样式*/ /** 确认按钮样式*/
okSx?: any; okColor?:
| "inherit"
| "primary"
| "secondary"
| "success"
| "error"
| "info"
| "warning"; //按钮颜色风格
loading?: boolean; // 确认按钮是否处于loading状态 loading?: boolean; // 确认按钮是否处于loading状态
} }
...@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabledConfirm, disabledConfirm,
clickMaskClose = false, clickMaskClose = false,
loading = false, loading = false,
okSx = {}, okColor = "primary",
} = props; } = props;
const handelClose = ( const handelClose = (
...@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
onClose && onClose(); onClose && onClose();
}; };
const Footer = () => { const Footer = useMemo(() => {
if (isHideFooter) return null; if (isHideFooter) return null;
return footerRender ? ( return footerRender ? (
footerRender() footerRender()
...@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={cancelText || "取消"} text={cancelText || "取消"}
onClick={onClose} onClick={onClose}
variant="outlined" variant="outlined"
// size="small"
color="secondary" color="secondary"
/> />
) : null} ) : null}
...@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={okText || "确定"} text={okText || "确定"}
onClick={onConfirm} onClick={onConfirm}
variant="contained" variant="contained"
// size="small" color={okColor}
disabled={disabledConfirm} disabled={disabledConfirm}
isLoadingButton={true} isLoadingButton={true}
loading={loading} loading={loading}
style={{ marginLeft: "12px", ...okSx }} style={{ marginLeft: "12px" }}
/> />
) : null} ) : null}
</DialogActions> </DialogActions>
); );
}; }, [
disabledConfirm,
okColor,
okText,
onConfirm,
onClose,
cancelText,
showCancel,
footerRender,
isHideFooter,
loading,
showConfirm,
]);
return ( return (
<Dialog <Dialog
open={open} open={open}
...@@ -155,7 +173,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => { ...@@ -155,7 +173,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
</DialogTitle> </DialogTitle>
)} )}
<DialogContent style={{ minWidth: 388 }}>{children}</DialogContent> <DialogContent style={{ minWidth: 388 }}>{children}</DialogContent>
{Footer()} {Footer}
</Dialog> </Dialog>
); );
}; };
......
...@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => { ...@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => {
open={deleteDialogOpen} open={deleteDialogOpen}
onClose={() => setDeleteDialogOpen(false)} onClose={() => setDeleteDialogOpen(false)}
onConfirm={handleSubmit} onConfirm={handleSubmit}
okColor="error"
> >
{currentOperateFile {currentOperateFile
? "确认删除该数据吗?" ? "确认删除该数据吗?"
......
...@@ -446,7 +446,7 @@ const BaseInfo = observer(() => { ...@@ -446,7 +446,7 @@ const BaseInfo = observer(() => {
onConfirm={handleSubmitDelete} onConfirm={handleSubmitDelete}
onClose={() => setDialogOpen(false)} onClose={() => setDialogOpen(false)}
title="删除项目" title="删除项目"
okSx={{ background: "#FF4E4E", color: "#fff" }} okColor="error"
> >
<div className={style.deleteBox}> <div className={style.deleteBox}>
<div className={style.deleteText1}> <div className={style.deleteText1}>
......
...@@ -12,7 +12,7 @@ const SimpleDialog = (props: any) => { ...@@ -12,7 +12,7 @@ const SimpleDialog = (props: any) => {
onClose={closeDialog} onClose={closeDialog}
onConfirm={onConfirm} onConfirm={onConfirm}
title={title} title={title}
okSx={{ background: "#FF4E4E", color: "#fff" }} okColor="error"
> >
<Box> <Box>
<Typography sx={{ fontSize: "14px", fontWeight: "400" }}> <Typography sx={{ fontSize: "14px", fontWeight: "400" }}>
......
.reactFlowBox>div:last-child { .reactFlowBox > div:last-child {
display: none; display: none;
} }
.reactFlowBox > div:first-child {
margin-top: 32px;
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
box-shadow: 6px 8px 22px 0px rgba(0, 24, 57, 0.08); box-shadow: 6px 8px 22px 0px rgba(0, 24, 57, 0.08);
} }
.operatorItemBox:hover .footerBox { .operatorItemBox:hover .footerBox {
border-bottom: none; border-bottom: 1px solid #fff;
} }
.dragBox { .dragBox {
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
overflow-y: overlay; overflow-y: overlay;
height: calc(100% - 48px); height: calc(100% - 48px);
position: relative; position: relative;
overflow-x: visible; overflow: visible;
} }
.noData { .noData {
display: flex; display: flex;
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.paramsTabTitle {
margin-bottom: 0;
}
.paramsTitleDesc { .paramsTitleDesc {
margin-left: 8px; margin-left: 8px;
...@@ -84,7 +87,7 @@ ...@@ -84,7 +87,7 @@
.paramsList { .paramsList {
background-color: rgba(247, 248, 250, 1); background-color: rgba(247, 248, 250, 1);
border-radius: 4px; border-radius: 4px;
padding: 16px 20px; padding: 16px 20px 24px;
} }
.parameterBox { .parameterBox {
......
...@@ -213,7 +213,7 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -213,7 +213,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/> />
), ),
}} }}
placeholder="请选择" placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false} error={parameter.error || false}
helperText={parameter.helperText} helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"} disabled={parameter.parameterGroup === "out"}
...@@ -238,7 +238,7 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -238,7 +238,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/> />
), ),
}} }}
placeholder="请选择" placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false} error={parameter.error || false}
helperText={parameter.helperText} helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"} disabled={parameter.parameterGroup === "out"}
...@@ -263,7 +263,7 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -263,7 +263,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/> />
), ),
}} }}
placeholder="请选择" placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false} error={parameter.error || false}
helperText={parameter.helperText} helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"} disabled={parameter.parameterGroup === "out"}
...@@ -275,7 +275,9 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -275,7 +275,9 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange={(e: any) => onChange={(e: any) =>
handleParameterChange(e, parameter.name || "") handleParameterChange(e, parameter.name || "")
} }
placeholder="可输入默认值" placeholder={
parameter.parameterGroup === "out" ? "" : "可输入默认值"
}
error={parameter.error || false} error={parameter.error || false}
helperText={parameter.helperText} helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"} disabled={parameter.parameterGroup === "out"}
...@@ -505,6 +507,8 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -505,6 +507,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
setActiveParamsTab("senior"); setActiveParamsTab("senior");
} else if (hardwareParameters.length !== 0) { } else if (hardwareParameters.length !== 0) {
setActiveParamsTab("hardware"); setActiveParamsTab("hardware");
} else {
setActiveParamsTab(""); // 会报错 不过不会有蓝色长条
} }
}, [basisParameters, seniorParameters, hardwareParameters]); }, [basisParameters, seniorParameters, hardwareParameters]);
...@@ -631,7 +635,12 @@ const ParameterSetting = (props: IParameterSettingProps) => { ...@@ -631,7 +635,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
)} )}
{taskInfo && ( {taskInfo && (
<div className={styles.paramsGroup}> <div className={styles.paramsGroup}>
<div className={styles.paramsTitle}> <div
className={classNames({
[styles.paramsTitle]: true,
[styles.paramsTabTitle]: true,
})}
>
参数组 参数组
<MyTooltip <MyTooltip
title="当某个参数项为启用状态时,代表该参数将由模板使用者在使用的时候填写赋值;当为关闭状态时,代表该参数不需要使用者来填写赋值。" title="当某个参数项为启用状态时,代表该参数将由模板使用者在使用的时候填写赋值;当为关闭状态时,代表该参数不需要使用者来填写赋值。"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
} }
.swFormBox { .swFormBox {
background-color: #fff; background-color: #fff;
border-right: 1xp solid rgba(235, 237, 240, 1); border-right: 1px solid rgba(235, 237, 240, 1);
width: 360px; width: 360px;
height: 100%; height: 100%;
/* overflow-y: scroll; */ /* 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