Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
6ec56fad
Commit
6ec56fad
authored
Sep 02, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 批流算子样式修改
parent
9f717e01
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
66 deletions
+92
-66
index.tsx
src/views/MenuLayout/index.tsx
+70
-54
index.module.css
...ect/components/Flow/components/BatchNode/index.module.css
+7
-2
index.module.css
...ject/components/Flow/components/FlowNode/index.module.css
+6
-0
index.tsx
...ews/Project/components/Flow/components/FlowNode/index.tsx
+6
-8
index.tsx
src/views/Project/components/Flow/index.tsx
+3
-2
No files found.
src/views/MenuLayout/index.tsx
View file @
6ec56fad
...
@@ -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-0
8-03 19:05:48
* @LastEditTime: 2022-0
9-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
*/
*/
...
@@ -17,64 +17,80 @@ import classnames from "classnames";
...
@@ -17,64 +17,80 @@ import classnames from "classnames";
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
const
MenuLayout
=
observer
(()
=>
{
const
MenuLayout
=
observer
(()
=>
{
const
{
permissionStore
,
currentProjectStore
}
=
useStores
();
const
{
permissionStore
,
currentProjectStore
}
=
useStores
();
let
pathname
=
new
URL
(
window
.
location
.
href
).
pathname
;
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页面
// 未选择产品时 直接跳转home页面
if
(
!
productInfo
.
name
)
{
if
(
!
productInfo
.
name
)
{
navigate
(
"/home"
);
navigate
(
"/home"
);
}
}
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"
:
""
}
catch
(
error
)
{
}
.svg`
);
console
.
log
(
error
)
return
result
||
""
;
}
}
catch
(
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
}
sx=
{
{
<
List
paddingTop
:
0
,
sx=
{
{
paddingBottom
:
0
,
paddingTop
:
0
,
}
}
paddingBottom
:
0
,
>
}
}
{
permissionStore
.
sidebarRouters
.
map
((
item
,
index
)
=>
{
>
if
(
item
.
show
)
{
{
permissionStore
.
sidebarRouters
.
map
((
item
,
index
)
=>
{
return
(
if
(
item
.
show
)
{
<
li
return
(
key=
{
"sidebar"
+
index
}
<
li
className=
{
classnames
({
key=
{
"sidebar"
+
index
}
[
style
.
listItem
]:
true
,
className=
{
classnames
({
[
style
.
active
]:
`/v3${item.path}`
===
pathname
,
[
style
.
listItem
]:
true
,
})
}
[
style
.
active
]:
`/v3${item.path}`
===
pathname
,
style=
{
})
}
`/v3${item.path}`
===
pathname
onClick=
{
()
=>
item
.
type
===
"page"
&&
navigate
(
item
.
path
)
}
?
{
borderLeft
:
"3px solid #1370ff"
}
>
:
undefined
<
img
className=
{
style
.
routerIcon
}
src=
{
routerIcon
(
item
.
id
||
''
,
`/v3${item.path}`
===
pathname
)
||
undefined
}
alt=
''
/>
}
<
span
style=
{
{
verticalAlign
:
'middle'
,
fontWeight
:
'500'
}
}
>
{
item
.
name
}
</
span
>
onClick=
{
()
=>
item
.
type
===
"page"
&&
navigate
(
item
.
path
)
}
</
li
>
>
);
<
img
}
className=
{
style
.
routerIcon
}
return
null
;
src=
{
})
}
routerIcon
(
</
List
>
item
.
id
||
""
,
</
Box
>
`/v3${item.path}`
===
pathname
<
Box
className=
{
style
.
content
}
>
)
||
undefined
<
Outlet
></
Outlet
>
}
</
Box
>
alt=
""
</
Box
>
/>
);
<
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
;
export
default
MenuLayout
;
src/views/Project/components/Flow/components/BatchNode/index.module.css
View file @
6ec56fad
.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
;
...
...
src/views/Project/components/Flow/components/FlowNode/index.module.css
View file @
6ec56fad
...
@@ -44,3 +44,9 @@
...
@@ -44,3 +44,9 @@
width
:
14px
;
width
:
14px
;
height
:
14px
;
height
:
14px
;
}
}
.handleBox
{
background
:
#fff
;
width
:
6px
;
height
:
6px
;
}
src/views/Project/components/Flow/components/FlowNode/index.tsx
View file @
6ec56fad
...
@@ -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-0
8-31 17:09:31
* @LastEditTime: 2022-0
9-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
,
}
}
}
}
...
...
src/views/Project/components/Flow/index.tsx
View file @
6ec56fad
...
@@ -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
,
},
},
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment