Commit a4532ce1 authored by jiangzijing's avatar jiangzijing

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

parents 6e5f03eb b875bbe2
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
} }
.radioActiveBg { .radioActiveBg {
box-shadow: 2px 4px 12px 0px rgba(0, 27, 63, 0.06); box-shadow: 2px 4px 12px 0px rgba(0, 27, 63, 0.06);
height: 28px; height: 100%;
background-color: #fff; background-color: #fff;
transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transition: transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
border-radius: 2px; border-radius: 2px;
width: 50%; width: 50%;
transform: translateX(0px); transform: translateX(0px);
......
...@@ -22,11 +22,18 @@ type IRadioGroupOfButtonStyleProps = { ...@@ -22,11 +22,18 @@ type IRadioGroupOfButtonStyleProps = {
handleRadio: any; handleRadio: any;
RadiosBoxStyle?: object; RadiosBoxStyle?: object;
radioStyle?: object; radioStyle?: object;
radioActiveBgBoxStyle?: object;
}; };
const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => { const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => {
const { radioOptions, value, handleRadio, RadiosBoxStyle, radioStyle } = const {
props; radioOptions,
value,
handleRadio,
RadiosBoxStyle,
radioStyle,
radioActiveBgBoxStyle,
} = props;
const radioWidth = useMemo(() => { const radioWidth = useMemo(() => {
if (radioOptions.length) { if (radioOptions.length) {
...@@ -48,7 +55,7 @@ const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => { ...@@ -48,7 +55,7 @@ const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => {
return ( return (
<div className={style.RadiosBox} style={RadiosBoxStyle}> <div className={style.RadiosBox} style={RadiosBoxStyle}>
<div className={style.radioActiveBgBox}> <div className={style.radioActiveBgBox} style={radioActiveBgBoxStyle}>
<div <div
className={style.radioActiveBg} className={style.radioActiveBg}
style={{ style={{
......
...@@ -206,7 +206,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => { ...@@ -206,7 +206,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
}, },
]} ]}
RadiosBoxStyle={{ width: "132px" }} RadiosBoxStyle={{ width: "132px" }}
></RadioGroupOfButtonStyle> />
)} )}
<MyMultipleMenu <MyMultipleMenu
value={showData} value={showData}
......
...@@ -572,7 +572,7 @@ const ProjectData = observer(() => { ...@@ -572,7 +572,7 @@ const ProjectData = observer(() => {
{ value: "dataset", label: "数据集" }, { value: "dataset", label: "数据集" },
]} ]}
handleRadio={setActiveTab} handleRadio={setActiveTab}
></RadioGroupOfButtonStyle> />
<IconButton <IconButton
aria-label="refreshIcon" aria-label="refreshIcon"
size="small" size="small"
......
...@@ -151,8 +151,6 @@ ...@@ -151,8 +151,6 @@
} }
.taskInfoValueIcon { .taskInfoValueIcon {
margin-right: 9px; margin-right: 9px;
position: relative;
top: 3px;
} }
.tabs { .tabs {
display: flex; display: flex;
......
...@@ -29,15 +29,15 @@ const ProjectOverview = observer(() => { ...@@ -29,15 +29,15 @@ const ProjectOverview = observer(() => {
// 选择近7天or近15天or近30天 // 选择近7天or近15天or近30天
const [day, setDay] = useState("7"); const [day, setDay] = useState("7");
// 滚轮是否到顶,判断是否显示阴影 // 滚轮是否到顶,判断是否显示阴影
const [isTop, setIsTop] = useState(true) const [isTop, setIsTop] = useState(true);
// 滚动滚轮时监听是否到顶 // 滚动滚轮时监听是否到顶
const onscroll = (e: any) => { const onscroll = (e: any) => {
if (e.target.scrollTop <= 0) { if (e.target.scrollTop <= 0) {
setIsTop(true) setIsTop(true);
} else { } else {
setIsTop(false) setIsTop(false);
} }
} };
// 获取概览基本信息 // 获取概览基本信息
const { run: getOverview, loading } = useMyRequest(getOverviewInfo, { const { run: getOverview, loading } = useMyRequest(getOverviewInfo, {
onSuccess: (result: any) => { onSuccess: (result: any) => {
...@@ -207,7 +207,7 @@ const ProjectOverview = observer(() => { ...@@ -207,7 +207,7 @@ const ProjectOverview = observer(() => {
{ value: "30", label: "近30天" }, { value: "30", label: "近30天" },
]} ]}
handleRadio={setDay} handleRadio={setDay}
></RadioGroupOfButtonStyle> />
</div> </div>
<SearchInput <SearchInput
onKeyUp={handleKeyWordChangeKeyUp} onKeyUp={handleKeyWordChangeKeyUp}
......
...@@ -53,16 +53,16 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -53,16 +53,16 @@ const AddTemplate = (props: IAddTemplateProps) => {
const [templateType, setTemplateType] = useState("public"); const [templateType, setTemplateType] = useState("public");
// 滚轮是否到顶,判断是否显示阴影 // 滚轮是否到顶,判断是否显示阴影
const [isTop, setIsTop] = useState(true) const [isTop, setIsTop] = useState(true);
// 滚动滚轮时监听是否到顶 // 滚动滚轮时监听是否到顶
const onscroll = (e: any) => { const onscroll = (e: any) => {
if (e.target.scrollTop <= 0) { if (e.target.scrollTop <= 0) {
setIsTop(true) setIsTop(true);
} else { } else {
setIsTop(false) setIsTop(false);
} }
} };
const handleRadio = (value: string) => { const handleRadio = (value: string) => {
setTemplateType(value); setTemplateType(value);
...@@ -144,39 +144,44 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -144,39 +144,44 @@ const AddTemplate = (props: IAddTemplateProps) => {
}; };
// 获取模板列表 // 获取模板列表
const getAddTemplateListFun = useCallback((newTitle?: string) => { const getAddTemplateListFun = useCallback(
const userName = JSON.parse(localStorage.getItem("userInfo") || "{}")?.name; (newTitle?: string) => {
setSelectTemplateData([]); const userName = JSON.parse(
setAddTemplateList([]); localStorage.getItem("userInfo") || "{}"
if (templateType === "public") { )?.name;
getAddTemplateList({ setSelectTemplateData([]);
projectId: projectId as string, setAddTemplateList([]);
productId: productId as string, if (templateType === "public") {
creator: "root", getAddTemplateList({
keyword: newTitle, projectId: projectId as string,
}); productId: productId as string,
} else { creator: "root",
getAddTemplateList({ keyword: newTitle,
projectId: projectId as string, });
productId: productId as string, } else {
creator: userName, getAddTemplateList({
keyword: newTitle, projectId: projectId as string,
}); productId: productId as string,
} creator: userName,
}, [ keyword: newTitle,
setSelectTemplateData, });
getAddTemplateList, }
productId, },
projectId, [
templateType, setSelectTemplateData,
// title, getAddTemplateList,
]); productId,
projectId,
templateType,
// title,
]
);
//模板启用切换 //模板启用切换
const templateSwitch = (e: any, id: string) => { const templateSwitch = (e: any, id: string) => {
if (e.target.checked) { if (e.target.checked) {
let arr = [] let arr = [];
arr.push(id) arr.push(id);
addTemplate({ addTemplate({
projectId: projectId as string, projectId: projectId as string,
workflowSpecIds: arr, workflowSpecIds: arr,
...@@ -187,18 +192,18 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -187,18 +192,18 @@ const AddTemplate = (props: IAddTemplateProps) => {
workflowSpecId: id, workflowSpecId: id,
}); });
} }
} };
useEffect(() => { useEffect(() => {
getAddTemplateListFun(); getAddTemplateListFun();
}, [getAddTemplateListFun]); }, [getAddTemplateListFun]);
// 按回车搜索 // 按回车搜索
const handleKeyWordChangeKeyUp = (e: any) => { const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) { if (e.keyCode === 13) {
getAddTemplateListFun(e.target.value); getAddTemplateListFun(e.target.value);
} }
}; };
const hiddenBoxArr = useMemo(() => { const hiddenBoxArr = useMemo(() => {
const length = const length =
...@@ -255,7 +260,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -255,7 +260,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
value={templateType} value={templateType}
radioOptions={radioOptions} radioOptions={radioOptions}
handleRadio={handleRadio} handleRadio={handleRadio}
></RadioGroupOfButtonStyle> />
{/* <MyButton {/* <MyButton
onClick={handleAddTemplate} onClick={handleAddTemplate}
size={"small"} size={"small"}
...@@ -272,7 +277,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -272,7 +277,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
</Box> </Box>
</Box> </Box>
</div> </div>
<div className={style.templateBox} onScroll={onscroll} > <div className={style.templateBox} onScroll={onscroll}>
{templateType === "public" && addTemplateList.length === 0 && ( {templateType === "public" && addTemplateList.length === 0 && (
<Box <Box
sx={{ sx={{
...@@ -342,9 +347,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -342,9 +347,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
<div className={style.templateLiEditBox}> <div className={style.templateLiEditBox}>
<MySwitch <MySwitch
defaultChecked={item.favorited} defaultChecked={item.favorited}
onChange={(e: any) => onChange={(e: any) => templateSwitch(e, item.id)}
templateSwitch(e, item.id)
}
></MySwitch> ></MySwitch>
</div> </div>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-left: 1px solid #dde1e6; border-left: 1px solid #dde1e6;
animation: myfirst 0.4s; animation: myfirst 0.3s;
-webkit-animation: myfirst 0.4s; /* Safari and Chrome */ -webkit-animation: myfirst 0.3s; /* Safari and Chrome */
} }
.searchBox { .searchBox {
......
...@@ -226,7 +226,10 @@ const WorkFlowEdit = observer((props: IProps) => { ...@@ -226,7 +226,10 @@ const WorkFlowEdit = observer((props: IProps) => {
fontSize: "16px", fontSize: "16px",
height: "30px", height: "30px",
}} }}
></RadioGroupOfButtonStyle> radioActiveBgBoxStyle={{
height: "32px",
}}
/>
</div> </div>
{leftContentType === "list" && ( {leftContentType === "list" && (
<OperatorList <OperatorList
......
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