Commit 6ec56fad authored by wuyongsheng's avatar wuyongsheng

feat: 批流算子样式修改

parent 9f717e01
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com * @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-02 11:43:28 * @Date: 2022-08-02 11:43:28
* @LastEditors: 吴永生 15770852798@163.com * @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 * @FilePath: /bkunyun/src/views/MenuLayout/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -31,19 +31,19 @@ const MenuLayout = observer(() => { ...@@ -31,19 +31,19 @@ const MenuLayout = observer(() => {
const routerIcon = (id: string, isSelect: boolean) => { const routerIcon = (id: string, isSelect: boolean) => {
try { try {
const result = require(`../../assets/project/${id}${isSelect ? '_BLUE' : ''}.svg`) const result = require(`../../assets/project/${id}${
return result || '' isSelect ? "_BLUE" : ""
}.svg`);
return result || "";
} catch (error) { } catch (error) {
console.log(error) console.log(error);
}
} }
};
return ( return (
<Box className={style.container}> <Box className={style.container}>
<Box className={style.aside}> <Box className={style.aside}>
{ {pathname.indexOf("userCenter") < 0 && <CurrentProject />}
pathname.indexOf('userCenter') < 0 && <CurrentProject />
}
<List <List
sx={{ sx={{
paddingTop: 0, paddingTop: 0,
...@@ -59,10 +59,26 @@ const MenuLayout = observer(() => { ...@@ -59,10 +59,26 @@ const MenuLayout = observer(() => {
[style.listItem]: true, [style.listItem]: true,
[style.active]: `/v3${item.path}` === pathname, [style.active]: `/v3${item.path}` === pathname,
})} })}
style={
`/v3${item.path}` === pathname
? { borderLeft: "3px solid #1370ff" }
: undefined
}
onClick={() => item.type === "page" && navigate(item.path)} onClick={() => item.type === "page" && navigate(item.path)}
> >
<img className={style.routerIcon} src={routerIcon(item.id || '', `/v3${item.path}` === pathname) || undefined} alt='' /> <img
<span style={{ verticalAlign: 'middle', fontWeight: '500' }}>{item.name}</span> className={style.routerIcon}
src={
routerIcon(
item.id || "",
`/v3${item.path}` === pathname
) || undefined
}
alt=""
/>
<span style={{ verticalAlign: "middle", fontWeight: "500" }}>
{item.name}
</span>
</li> </li>
); );
} }
......
.batchNode { .batchNode {
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.06);
/* padding: 12px 20px; */ /* padding: 12px 20px; */
border: 1px solid #e6e8eb; /* border: 1px solid #e6e8eb; */
border-left: 4px solid #e6e8eb; border-left: 4px solid #e6e8eb;
/* display: flex; */ /* display: flex; */
align-items: center; align-items: center;
} }
.batchNode:hover {
box-shadow: 0px 3px 10px 0px rgba(0, 24, 57, 0.14);
}
.doneBatchNode { .doneBatchNode {
border-left: 4px solid #0dd09b; border-left: 4px solid #0dd09b;
} }
...@@ -45,7 +50,7 @@ ...@@ -45,7 +50,7 @@
/* transform: translateX(-50%) rotate(-90deg); */ /* transform: translateX(-50%) rotate(-90deg); */
} }
.handleBox::before{ .handleBox::before {
content: ""; content: "";
position: absolute; position: absolute;
left: -4px; left: -4px;
......
...@@ -44,3 +44,9 @@ ...@@ -44,3 +44,9 @@
width: 14px; width: 14px;
height: 14px; height: 14px;
} }
.handleBox {
background: #fff;
width: 6px;
height: 6px;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46 * @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com * @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 * @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 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -86,8 +86,6 @@ const FlowNode = (props: any) => { ...@@ -86,8 +86,6 @@ const FlowNode = (props: any) => {
className={styles.handleBox} className={styles.handleBox}
id={item.name} id={item.name}
style={{ style={{
background: "#fff ",
border: "1px solid #D1D6DE",
...inStyle, ...inStyle,
left: index * 24 + 16, left: index * 24 + 16,
}} }}
...@@ -98,8 +96,10 @@ const FlowNode = (props: any) => { ...@@ -98,8 +96,10 @@ const FlowNode = (props: any) => {
); );
}) })
: null} : null}
<div style={{display: 'flex', alignItems: 'center'}}> <div style={{ display: "flex", alignItems: "center" }}>
<span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span> <span style={{ fontSize: "12px", lineHeight: "20px" }}>
{title || ""} {showVersion && version}
</span>
{flowType !== "edit" && isCheck ? ( {flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span> <span className={styles.successDot}></span>
) : null} ) : null}
...@@ -108,7 +108,7 @@ const FlowNode = (props: any) => { ...@@ -108,7 +108,7 @@ const FlowNode = (props: any) => {
) : null} ) : null}
{getImgUrl(executionStatus) && ( {getImgUrl(executionStatus) && (
<img <img
style={{ marginLeft: "6px" }} style={{ marginLeft: "6px", width: "12px", height: "12px" }}
src={getImgUrl(executionStatus)} src={getImgUrl(executionStatus)}
alt="" alt=""
/> />
...@@ -122,8 +122,6 @@ const FlowNode = (props: any) => { ...@@ -122,8 +122,6 @@ const FlowNode = (props: any) => {
className={styles.handleBox} className={styles.handleBox}
id={item.name} id={item.name}
style={{ style={{
background: "#fff ",
border: "1px solid #D1D6DE",
...outStyle, ...outStyle,
left: index * 24 + 16, left: index * 24 + 16,
}} }}
......
...@@ -323,12 +323,13 @@ const Flow = (props: IProps) => { ...@@ -323,12 +323,13 @@ const Flow = (props: IProps) => {
style: { style: {
...getBatchStyle(item), ...getBatchStyle(item),
marginTop: "-44px", marginTop: "-44px",
padding: "12px 20px", padding: "12px 20px 20px 20px",
}, },
}, },
/** 坐标 */ /** 坐标 */
position: { position: {
x: Number(item.position?.x) || 0, /** 流算子生成的时候多加了15 兼容历史模版数据 直接这边减去15 */
x: Number(item.position?.x - 15) || 0,
y: Number(item.position?.y) || 0, y: Number(item.position?.y) || 0,
}, },
/** /**
......
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