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
sunyihao
bkunyun
Commits
deb97f9f
Commit
deb97f9f
authored
Jul 05, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220620-taskSubmission' into 'release'
Feat 20220620 task submission See merge request
!72
parents
bc925de6
84f25f7c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
72 deletions
+50
-72
Tabs.tsx
src/components/mui/Tabs.tsx
+6
-17
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+11
-8
index.tsx
src/views/Project/ProjectWorkbench/index.tsx
+24
-45
index.tsx
src/views/Project/components/Flow/index.tsx
+0
-1
project.ts
src/views/Project/project.ts
+9
-1
No files found.
src/components/mui/Tabs.tsx
View file @
deb97f9f
...
...
@@ -2,18 +2,17 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-0
6-07 20:31:40
* @LastEditTime: 2022-0
7-04 20:18:17
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
memo
}
from
"react"
;
import
{
isEqual
}
from
"lodash"
;
import
{
useState
,
useMemo
,
useEffect
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
Box
}
from
"@mui/system"
;
import
Tab
from
"@mui/material/Tab"
;
import
{
TabContext
,
TabList
,
TabPanel
}
from
"@mui/lab"
;
import
{
Typography
}
from
"@mui/material"
;
import
{
useImperativeHandle
}
from
"react"
;
interface
ITabList
{
label
:
string
;
...
...
@@ -26,27 +25,18 @@ interface ITabList {
interface
IProps
{
tabList
:
ITabList
[];
onRef
?:
any
;
defaultValue
?:
string
;
}
const
Tabs
=
(
props
:
IProps
)
=>
{
const
{
tabList
}
=
props
;
const
[
value
,
setValue
]
=
useState
(
tabList
.
filter
((
e
)
=>
!
e
.
hide
)[
0
].
value
);
const
{
tabList
,
defaultValue
}
=
props
;
const
[
value
,
setValue
]
=
useState
(
defaultValue
||
tabList
.
filter
(
e
=>
!
e
.
hide
)[
0
].
value
);
const
onChange
=
(
val
:
string
)
=>
{
setValue
(
val
);
};
const
setActiveTab
=
(
val
:
string
)
=>
{
onChange
(
val
);
};
useImperativeHandle
(
props
.
onRef
,
()
=>
{
return
{
setActiveTab
:
setActiveTab
,
};
});
const
labelRender
=
(
item
:
ITabList
,
key
:
number
)
=>
{
return
(
<
Box
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
...
...
@@ -73,7 +63,6 @@ const Tabs = (props: IProps) => {
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
onChange
(
val
);
}
}
aria
-
label=
"lab API tabs example"
>
{
tabList
?.
map
((
item
,
key
)
=>
{
if
(
item
.
hide
)
return
""
;
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
deb97f9f
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-0
6-29 17:07:49
* @LastEditTime: 2022-0
7-04 20:19:21
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -103,6 +103,13 @@ const ProjectSubmitWork = observer(() => {
}
};
/** 返回事件 */
const
onBack
=
useCallback
(()
=>
{
navigate
(
'/product/cadd/projectWorkbench'
,
{
state
:
{
type
:
'workbenchList'
}
})
},[
navigate
])
const
outputPathTransform
=
(
path
:
string
)
=>
{
path
=
path
.
slice
(
13
);
return
`ProjectData
${
path
}
`
;
...
...
@@ -192,7 +199,7 @@ const ProjectSubmitWork = observer(() => {
if
(
errorCode
===
0
)
{
message
.
success
(
"操作成功!"
);
}
navigate
(
-
1
);
onBack
()
},
});
...
...
@@ -203,7 +210,7 @@ const ProjectSubmitWork = observer(() => {
if
(
errorCode
===
0
)
{
message
.
success
(
"操作成功!"
);
}
navigate
(
-
1
);
onBack
()
},
});
...
...
@@ -267,11 +274,7 @@ const ProjectSubmitWork = observer(() => {
<
div
className=
{
styles
.
swHeaderLeft
}
>
<
IconButton
color=
"primary"
onClick=
{
()
=>
navigate
(
"/product/cadd/projectWorkbench"
,
{
state
:
{
from
:
"detail"
},
})
}
onClick=
{
onBack
}
aria
-
label=
"upload picture"
component=
"span"
size=
"small"
...
...
src/views/Project/ProjectWorkbench/index.tsx
View file @
deb97f9f
/*
* @Author: rocosen
* @Date: 2022-06-12 10:05:13
* @LastEditors:
rocosen
* @LastEditTime: 2022-0
6-07 20:23:02
* @LastEditors:
吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-0
7-04 20:23:26
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
,
{
memo
,
useState
,
useMemo
,
useEffect
}
from
"react"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
{
Box
}
from
"@mui/system"
;
import
{
useStores
}
from
"@/store/index"
;
import
NoProject
from
"@/components/NoProject"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
projectImg
from
"@/assets/project/projectIconSmall.svg"
;
import
WorkbenchTemplate
from
"./workbenchTemplate"
;
import
WorkbenchList
from
"./workbenchList"
;
import
Tabs
from
"@/components/mui/Tabs"
;
import
usePass
from
"@/hooks/usePass"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
Template
from
"@/assets/project/workbenchTemplate.svg"
import
Template_select
from
"@/assets/project/workbenchTemplate_select.svg"
import
List
from
"@/assets/project/workbenchList.svg"
import
List_select
from
"@/assets/project/workbenchList_select.svg"
import
Template
from
"@/assets/project/workbenchTemplate.svg"
;
import
Template_select
from
"@/assets/project/workbenchTemplate_select.svg"
;
import
List
from
"@/assets/project/workbenchList.svg"
;
import
List_select
from
"@/assets/project/workbenchList_select.svg"
;
//ui
// import ButtonDemo from "@/views/mui_demo/button";
// import InputDemo from "@/views/mui_demo/input";
const
ProjectWorkbench
=
observer
(()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
isPass
=
usePass
();
const
location
=
useLocation
();
let
tabsRef
:
any
=
React
.
createRef
();
useEffect
(()
=>
{
console
.
log
(
isPass
(
"PROJECT_WORKBENCH_FLOES_USE"
,
"USER"
),
"11111111111"
);
console
.
log
(
isPass
(
"PROJECT_WORKBENCH_FLOES"
),
"wwwwwwwwwww"
);
},
[]);
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
const
from
=
locationInfo
?.
from
;
// 如果是从详情页来的,tab展示为任务列表
if
(
from
===
"detail"
||
from
===
"submitWork"
)
{
tabsRef
?.
current
?.
setActiveTab
(
"workbenchList"
);
}
},
[
location
,
tabsRef
]);
const
location
:
any
=
useLocation
()
const
tabList
=
useMemo
(()
=>
{
return
[
{
...
...
@@ -82,19 +59,21 @@ const ProjectWorkbench = observer(() => {
// iconed: List_select,
// },
];
},
[]);
},
[
isPass
]);
return
(
<
div
style=
{
{
padding
:
24
}
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
img
src=
{
projectImg
}
alt=
"项目logo"
/>
<
span
style=
{
{
marginLeft
:
12
}
}
>
工作台
</
span
>
</
div
>
<
Box
sx=
{
{
width
:
"100%"
,
typography
:
"body1"
}
}
>
<
Tabs
onRef=
{
tabsRef
}
tabList=
{
tabList
}
/>
</
Box
>
</
div
>
);
return
(
<
div
style=
{
{
padding
:
24
}
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
img
src=
{
projectImg
}
alt=
"项目logo"
/>
<
span
style=
{
{
marginLeft
:
12
}
}
>
工作台
</
span
>
</
div
>
<
Box
sx=
{
{
width
:
"100%"
,
typography
:
"body1"
}
}
>
<
Tabs
tabList=
{
tabList
}
defaultValue=
{
location
?.
state
?.
type
||
'workbenchTemplate'
}
/>
</
Box
>
</
div
>
);
});
export
default
memo
(
ProjectWorkbench
);
src/views/Project/components/Flow/index.tsx
View file @
deb97f9f
...
...
@@ -120,7 +120,6 @@ const FlowNode = (props: any) => {
const
Flow
=
(
props
:
IProps
)
=>
{
const
{
tasks
,
onBatchClick
}
=
props
;
console
.
log
(
tasks
,
'tasks'
)
const
[
selectedNodeId
,
setSelectedNodeId
]
=
useState
<
string
>
(
""
);
/** 自定义的节点类型 */
const
nodeTypes
=
useMemo
(()
=>
{
...
...
src/views/Project/project.ts
View file @
deb97f9f
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-17 14:48:57
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-07-04 19:38:48
* @FilePath: /bkunyun/src/views/Project/project.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
product
,
hpczone
,
getDataFileToken
}
from
"@/api/project_api"
;
export
const
getProjectList
=
async
()
=>
{
...
...
@@ -12,7 +20,7 @@ export const setFileServerEndPointLocalStorage = async (zoneId: string) => {
if
(
Array
.
isArray
(
res
))
{
res
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
id
===
zoneId
)
{
fileServerEndPoint
=
item
.
storageConfig
.
fileServerEndPoint
;
fileServerEndPoint
=
item
.
storageConfig
?
.
fileServerEndPoint
;
}
});
localStorage
.
setItem
(
"fileServerEndPoint"
,
fileServerEndPoint
);
...
...
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