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
8fb30dd9
Commit
8fb30dd9
authored
Jul 26, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: MyTable组件替换
parent
cef305a1
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
118 additions
and
190 deletions
+118
-190
NoProject.module.css
...ponents/BusinessComponents/NoProject/NoProject.module.css
+2
-5
NoProject.tsx
src/components/BusinessComponents/NoProject/NoProject.tsx
+14
-6
MyButton.tsx
src/components/mui/MyButton.tsx
+8
-3
MyDialog.tsx
src/components/mui/MyDialog.tsx
+7
-9
MyPopconfirm.tsx
src/components/mui/MyPopconfirm.tsx
+7
-6
Table.tsx
src/components/mui/Table.tsx
+0
-74
index.tsx
src/views/ConsoleLayout/index.tsx
+3
-4
index.tsx
src/views/Project/ProjectData/AddFolder/index.tsx
+6
-6
index.tsx
src/views/Project/ProjectData/UpLoaderFile/index.tsx
+9
-12
index.tsx
src/views/Project/ProjectData/index.tsx
+30
-30
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+13
-14
index.tsx
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
+5
-6
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+3
-3
addTemplate.tsx
...ectWorkbench/workbenchTemplate/components/addTemplate.tsx
+2
-3
templateBox.tsx
...ectWorkbench/workbenchTemplate/components/templateBox.tsx
+5
-5
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+4
-4
No files found.
src/components/BusinessComponents/NoProject/NoProject.module.css
View file @
8fb30dd9
...
@@ -21,8 +21,4 @@
...
@@ -21,8 +21,4 @@
font-size
:
14px
;
font-size
:
14px
;
color
:
#8a9099
;
color
:
#8a9099
;
margin-bottom
:
24px
;
margin-bottom
:
24px
;
}
}
.button
{
\ No newline at end of file
background-color
:
#1370ff
;
color
:
#fff
;
}
src/components/BusinessComponents/NoProject/NoProject.tsx
View file @
8fb30dd9
/*
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-07-20 17:36:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-26 17:48:14
* @FilePath: /bkunyun/src/components/BusinessComponents/NoProject/NoProject.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
style
from
"./NoProject.module.css"
;
import
style
from
"./NoProject.module.css"
;
import
noData
from
"@/assets/project/noData.svg"
;
import
noData
from
"@/assets/project/noData.svg"
;
import
{
Button
}
from
"@mui/material"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
AddProject
from
"@/views/Project/components/AddProject"
;
import
AddProject
from
"@/views/Project/components/AddProject"
;
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
useState
}
from
"react"
;
import
MyButton
from
"@/components/mui/MyButton"
;
const
NoProject
=
()
=>
{
const
NoProject
=
()
=>
{
// 新建弹窗显示控制
// 新建弹窗显示控制
...
@@ -14,16 +22,16 @@ const NoProject = () => {
...
@@ -14,16 +22,16 @@ const NoProject = () => {
<
img
src=
{
noData
}
alt=
""
className=
{
style
.
noDataImg
}
/>
<
img
src=
{
noData
}
alt=
""
className=
{
style
.
noDataImg
}
/>
<
div
className=
{
style
.
text1
}
>
当前产品暂无项目
</
div
>
<
div
className=
{
style
.
text1
}
>
当前产品暂无项目
</
div
>
<
div
className=
{
style
.
text2
}
>
请先创建项目
</
div
>
<
div
className=
{
style
.
text2
}
>
请先创建项目
</
div
>
<
Button
<
MyButton
text=
'创建项目'
variant=
"contained"
variant=
"contained"
size=
"large"
size=
"large"
className=
{
style
.
button
}
startIcon=
{
<
AddIcon
/>
}
startIcon=
{
<
AddIcon
/>
}
onClick=
{
()
=>
setAddOpen
(
true
)
}
onClick=
{
()
=>
setAddOpen
(
true
)
}
style=
{
{
backgroundColor
:
"#1370ff"
,
color
:
"#fff"
}
}
style=
{
{
backgroundColor
:
"#1370ff"
,
color
:
"#fff"
}
}
>
/
>
创建项目
</
Button
>
<
AddProject
addOpen=
{
addOpen
}
setAddOpen=
{
setAddOpen
}
/>
<
AddProject
addOpen=
{
addOpen
}
setAddOpen=
{
setAddOpen
}
/>
</
div
>
</
div
>
);
);
...
...
src/components/mui/MyButton.tsx
View file @
8fb30dd9
...
@@ -7,10 +7,14 @@ import {
...
@@ -7,10 +7,14 @@ import {
Button
,
Button
,
ThemeProvider
,
ThemeProvider
,
createTheme
,
createTheme
,
ExtendButtonBase
,
ButtonTypeMap
,
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
ArrowDropDownIcon
from
"@mui/icons-material/ArrowDropDown"
;
import
ArrowDropDownIcon
from
"@mui/icons-material/ArrowDropDown"
;
type
ButtonTagProps
=
{
interface
ButtonTagProps
extends
Omit
<
ExtendButtonBase
<
ButtonTypeMap
<
{},
"button"
>>
,
'text'
>
{
startIcon
?:
React
.
ReactNode
;
/** 开始Icon */
endIcon
?:
React
.
ReactNode
;
/** 结束Icon */
text
:
string
;
//文本内容
text
:
string
;
//文本内容
variant
?:
"text"
|
"contained"
|
"outlined"
;
//按钮样式
variant
?:
"text"
|
"contained"
|
"outlined"
;
//按钮样式
onClick
?:
any
;
//点击事件
onClick
?:
any
;
//点击事件
...
@@ -18,7 +22,7 @@ type ButtonTagProps = {
...
@@ -18,7 +22,7 @@ type ButtonTagProps = {
fontSize
?:
string
;
//按钮文字大小
fontSize
?:
string
;
//按钮文字大小
dropValue
?:
boolean
;
//选择的值
dropValue
?:
boolean
;
//选择的值
drop
?:
boolean
;
//是否开启选择
drop
?:
boolean
;
//是否开启选择
color
?:
"inherit"
|
"primary"
|
"secondary"
|
undefined
;
//按钮颜色风格
color
?:
"inherit"
|
"primary"
|
"secondary"
|
'success'
|
'error'
|
'info'
|
'warning'
;
//按钮颜色风格
size
?:
"large"
|
"medium"
|
"small"
;
//按钮尺寸
size
?:
"large"
|
"medium"
|
"small"
;
//按钮尺寸
disabled
?:
boolean
;
//是否禁用
disabled
?:
boolean
;
//是否禁用
style
?:
any
;
//按钮自定义样式
style
?:
any
;
//按钮自定义样式
...
@@ -109,7 +113,7 @@ const theme = createTheme({
...
@@ -109,7 +113,7 @@ const theme = createTheme({
});
});
const
ButtonComponent
=
(
props
:
ButtonTagProps
)
=>
{
const
ButtonComponent
=
(
props
:
ButtonTagProps
)
=>
{
const
{
size
,
disabled
,
variant
,
color
,
img
,
select
,
selectCallBack
}
=
props
;
const
{
size
,
disabled
,
variant
,
color
,
img
,
select
,
selectCallBack
,
...
other
}
=
props
;
const
{
classes
,
cx
}
=
useStyles
({});
const
{
classes
,
cx
}
=
useStyles
({});
const
[
anchorEl
,
setAnchorEl
]
=
React
.
useState
(
null
);
const
[
anchorEl
,
setAnchorEl
]
=
React
.
useState
(
null
);
...
@@ -145,6 +149,7 @@ const ButtonComponent = (props: ButtonTagProps) => {
...
@@ -145,6 +149,7 @@ const ButtonComponent = (props: ButtonTagProps) => {
disabled=
{
disabled
||
false
}
disabled=
{
disabled
||
false
}
style=
{
{
...
props
.
style
}
}
style=
{
{
...
props
.
style
}
}
onClick=
{
props
.
select
?
handleClick
:
props
.
onClick
||
defaultClick
}
onClick=
{
props
.
select
?
handleClick
:
props
.
onClick
||
defaultClick
}
{
...
other
}
>
>
{
img
||
""
}
{
img
||
""
}
<
Typography
style=
{
{
fontSize
:
props
.
fontSize
}
}
>
<
Typography
style=
{
{
fontSize
:
props
.
fontSize
}
}
>
...
...
src/components/mui/MyDialog.tsx
View file @
8fb30dd9
import
React
from
"react"
;
import
React
from
"react"
;
import
{
import
{
Button
,
Dialog
,
Dialog
,
DialogActions
,
DialogActions
,
DialogContent
,
DialogContent
,
...
@@ -9,6 +8,8 @@ import {
...
@@ -9,6 +8,8 @@ import {
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
CloseIcon
from
"@mui/icons-material/Close"
;
import
CloseIcon
from
"@mui/icons-material/Close"
;
import
MyButton
from
'./MyButton'
export
interface
IDialogProps
{
export
interface
IDialogProps
{
/** 自定义类名 */
/** 自定义类名 */
className
?:
string
;
className
?:
string
;
...
@@ -83,20 +84,17 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
...
@@ -83,20 +84,17 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
)
:
(
)
:
(
<
DialogActions
style=
{
{
padding
:
"0 24px 24px 24px"
}
}
>
<
DialogActions
style=
{
{
padding
:
"0 24px 24px 24px"
}
}
>
{
showCancel
?
(
{
showCancel
?
(
<
Button
onClick=
{
onClose
}
variant=
"outlined"
size=
"small"
>
<
MyButton
text=
{
cancelText
||
"取消"
}
onClick=
{
onClose
}
variant=
"outlined"
size=
"small"
/>
{
cancelText
||
"取消"
}
</
Button
>
)
:
null
}
)
:
null
}
{
showConfirm
?
(
{
showConfirm
?
(
<
Button
<
MyButton
text=
{
okText
||
"确定"
}
onClick=
{
onConfirm
}
onClick=
{
onConfirm
}
variant=
"contained"
variant=
"contained"
size=
"small"
size=
"small"
disabled=
{
disabledConfirm
}
disabled=
{
disabledConfirm
}
sx=
{
{
...
okSx
}
}
style=
{
{
...
okSx
}
}
>
/>
{
okText
||
"确定"
}
</
Button
>
)
:
null
}
)
:
null
}
</
DialogActions
>
</
DialogActions
>
);
);
...
...
src/components/mui/MyPopconfirm.tsx
View file @
8fb30dd9
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
import
*
as
React
from
"react"
;
import
*
as
React
from
"react"
;
import
{
ReactNode
,
useMemo
}
from
"react"
;
import
{
ReactNode
,
useMemo
}
from
"react"
;
import
Box
from
"@mui/material/Box"
;
import
Box
from
"@mui/material/Box"
;
import
ButtonComponent
from
"./MyButton"
;
import
MyButton
from
"./MyButton"
;
import
tipsIcon
from
"@/assets/project/information-outline.svg"
;
import
tipsIcon
from
"@/assets/project/information-outline.svg"
;
import
Popper
from
"@mui/material/Popper"
;
import
Popper
from
"@mui/material/Popper"
;
type
IMyPopconfirmProps
=
{
interface
IMyPopconfirmProps
{
title
:
string
|
ReactNode
;
title
:
string
|
ReactNode
;
placement
?:
placement
?:
|
"auto-end"
|
"auto-end"
...
@@ -83,19 +83,20 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
...
@@ -83,19 +83,20 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
</
Box
>
</
Box
>
<
Box
sx=
{
{
display
:
"flex"
,
justifyContent
:
"flex-end"
}
}
>
<
Box
sx=
{
{
display
:
"flex"
,
justifyContent
:
"flex-end"
}
}
>
{
showCancel
&&
(
{
showCancel
&&
(
<
ButtonComponent
<
MyButton
text=
{
cancelText
}
text=
{
cancelText
}
variant=
'outlined'
size=
"small"
size=
"small"
color=
"inherit"
color=
"inherit"
onClick=
{
handleCancel
}
onClick=
{
handleCancel
}
style=
{
{
marginRight
:
"12px"
}
}
style=
{
{
marginRight
:
"12px"
}
}
></
ButtonComponent
>
/
>
)
}
)
}
<
ButtonComponent
<
MyButton
text=
{
okText
}
text=
{
okText
}
size=
"small"
size=
"small"
onClick=
{
handleOk
}
onClick=
{
handleOk
}
></
ButtonComponent
>
/
>
</
Box
>
</
Box
>
</
Popper
>
</
Popper
>
);
);
...
...
src/components/mui/Table.tsx
deleted
100644 → 0
View file @
cef305a1
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-02 10:38:01
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-02 13:45:33
* @FilePath: /bkunyun/src/components/mui/Table.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
*
as
React
from
"react"
;
import
MuiTable
from
"@mui/material/Table"
;
import
TableBody
from
"@mui/material/TableBody"
;
import
TableCell
from
"@mui/material/TableCell"
;
import
TableContainer
from
"@mui/material/TableContainer"
;
import
TableHead
from
"@mui/material/TableHead"
;
import
TableRow
from
"@mui/material/TableRow"
;
import
Paper
from
"@mui/material/Paper"
;
import
{
Box
}
from
"@mui/material"
;
interface
IColumns
{
key
:
string
;
title
:
string
;
align
?:
"left"
|
"center"
|
"right"
;
render
?:
(
value
:
any
,
index
:
number
)
=>
void
;
}
interface
IProps
{
columns
:
IColumns
[];
dataSource
:
any
;
}
export
default
function
Table
(
props
:
IProps
)
{
const
{
columns
=
[],
dataSource
=
[]
}
=
props
;
return
(
<
TableContainer
component=
{
Paper
}
>
<
MuiTable
sx=
{
{
minWidth
:
650
}
}
aria
-
label=
"simple table"
>
<
TableHead
>
<
TableRow
>
{
columns
?.
map
((
item
:
IColumns
)
=>
{
return
(
<
TableCell
{
...
item
}
key=
{
item
.
key
}
>
{
item
.
title
}
</
TableCell
>
);
})
}
</
TableRow
>
</
TableHead
>
<
TableBody
>
{
dataSource
.
length
?
(
dataSource
?.
map
(()
=>
(
<
TableRow
key=
{
Math
.
random
()
}
sx=
{
{
"&:last-child td, &:last-child th"
:
{
border
:
0
}
}
}
>
{
columns
?.
map
((
item
:
IColumns
,
index
:
number
)
=>
{
if
(
item
.
render
)
{
return
<>
{
item
.
render
(
item
,
index
)
}
</>;
}
else
{
return
(
<
TableCell
align=
"right"
key=
{
item
.
key
}
>
{
item
.
title
}
</
TableCell
>
);
}
})
}
</
TableRow
>
))
)
:
(
<
Box
p=
{
2
}
>
暂无数据
</
Box
>
)
}
</
TableBody
>
</
MuiTable
>
</
TableContainer
>
);
}
src/views/ConsoleLayout/index.tsx
View file @
8fb30dd9
...
@@ -10,7 +10,7 @@ import uploadIcon from "@/assets/img/uploadIcon.svg";
...
@@ -10,7 +10,7 @@ import uploadIcon from "@/assets/img/uploadIcon.svg";
import
globalText
from
"@/utils/globalText_CN"
;
import
globalText
from
"@/utils/globalText_CN"
;
import
useIndex
from
"./useIndex"
;
import
useIndex
from
"./useIndex"
;
import
{
useStores
}
from
"@/store/index"
;
import
{
useStores
}
from
"@/store/index"
;
import
Button
from
"@/components/mui/MyButton"
;
import
My
Button
from
"@/components/mui/MyButton"
;
import
logo
from
"@/assets/img/logo.svg"
;
import
logo
from
"@/assets/img/logo.svg"
;
import
MyPopover
from
"@/components/mui/MyPopover"
;
import
MyPopover
from
"@/components/mui/MyPopover"
;
import
TranSferList
from
"./components/TransferList"
;
import
TranSferList
from
"./components/TransferList"
;
...
@@ -81,8 +81,7 @@ const ConsoleLayout = observer(() => {
...
@@ -81,8 +81,7 @@ const ConsoleLayout = observer(() => {
<
Box
className=
{
style
.
topApp
}
>
<
Box
className=
{
style
.
topApp
}
>
<
Box
className=
{
style
.
topLeftBox
}
>
<
Box
className=
{
style
.
topLeftBox
}
>
<
img
src=
{
logo
}
alt=
""
className=
{
style
.
logo
}
/>
<
img
src=
{
logo
}
alt=
""
className=
{
style
.
logo
}
/>
<
MyButton
<
Button
text=
{
globalText
.
console
}
text=
{
globalText
.
console
}
variant=
{
"text"
}
variant=
{
"text"
}
style=
{
{
color
:
"#565C66"
}
}
style=
{
{
color
:
"#565C66"
}
}
...
@@ -90,7 +89,7 @@ const ConsoleLayout = observer(() => {
...
@@ -90,7 +89,7 @@ const ConsoleLayout = observer(() => {
/>
/>
<
Box
sx=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
Box
sx=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
Button
<
My
Button
text=
{
globalText
.
product
}
text=
{
globalText
.
product
}
variant=
{
"text"
}
variant=
{
"text"
}
style=
{
{
color
:
"#565C66"
}
}
style=
{
{
color
:
"#565C66"
}
}
...
...
src/views/Project/ProjectData/AddFolder/index.tsx
View file @
8fb30dd9
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
TextField
,
Button
}
from
"@mui/material"
;
import
{
TextField
}
from
"@mui/material"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
import
{
checkIsNumberLetterChinese
}
from
"@/utils/util"
;
import
{
checkIsNumberLetterChinese
}
from
"@/utils/util"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
CloudEController
from
"@/api/fileserver/CloudEController"
;
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
InputAdornment
from
"@mui/material/InputAdornment"
;
import
InputAdornment
from
"@mui/material/InputAdornment"
;
import
MyButton
from
"@/components/mui/MyButton"
;
type
IAddFolderProps
=
{
type
IAddFolderProps
=
{
list
:
Array
<
any
>
;
list
:
Array
<
any
>
;
...
@@ -91,17 +92,16 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -91,17 +92,16 @@ const AddFolder = (props: IAddFolderProps) => {
return
(
return
(
<>
<>
<
Button
<
My
Button
color=
"neutral"
text=
'新建文件夹'
variant=
"outlined"
variant=
"outlined"
size=
"small"
size=
"small"
onClick=
{
()
=>
setDeleteDialogOpen
(
true
)
}
onClick=
{
()
=>
setDeleteDialogOpen
(
true
)
}
disabled=
{
disabled=
{
selectIds
.
length
!==
0
||
!
isPass
(
"PROJECT_DATA_ADDDIR"
,
"USER"
)
selectIds
.
length
!==
0
||
!
isPass
(
"PROJECT_DATA_ADDDIR"
,
"USER"
)
}
}
>
/>
新建文件夹
</
Button
>
<
MyDialog
<
MyDialog
open=
{
deleteDialogOpen
}
open=
{
deleteDialogOpen
}
onClose=
{
()
=>
setDeleteDialogOpen
(
false
)
}
onClose=
{
()
=>
setDeleteDialogOpen
(
false
)
}
...
...
src/views/Project/ProjectData/UpLoaderFile/index.tsx
View file @
8fb30dd9
import
React
,
{
useState
,
useCallback
,
useMemo
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useCallback
,
useMemo
,
useEffect
}
from
"react"
;
import
classnames
from
"classnames"
;
import
{
observer
}
from
"mobx-react"
;
import
{
toJS
}
from
"mobx"
;
import
{
useDropzone
}
from
"react-dropzone"
;
import
style
from
"./index.module.css"
;
import
style
from
"./index.module.css"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
import
{
Button
}
from
"@mui/material"
;
import
{
uuid
}
from
"@/utils/util"
;
import
{
uuid
}
from
"@/utils/util"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useDropzone
}
from
"react-dropzone"
;
import
MyTable
from
"@/components/mui/MyTable"
;
import
MyTable
from
"@/components/mui/MyTable"
;
import
fileIcon
from
"@/assets/project/fileIcon.svg"
;
import
fileIcon
from
"@/assets/project/fileIcon.svg"
;
import
noFile
from
"@/assets/project/noFile.svg"
;
import
noFile
from
"@/assets/project/noFile.svg"
;
import
uploaderIcon
from
"@/assets/project/uploaderIcon.svg"
;
import
uploaderIcon
from
"@/assets/project/uploaderIcon.svg"
;
import
classnames
from
"classnames"
;
import
{
storageUnitFromB
}
from
"@/utils/util"
;
import
{
storageUnitFromB
}
from
"@/utils/util"
;
import
{
observer
}
from
"mobx-react"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
{
toJS
}
from
"mobx"
;
import
useGlobalStore
from
"@/hooks/useGlobalStore"
;
import
useGlobalStore
from
"@/hooks/useGlobalStore"
;
import
{
APIOPTION
,
urlToken
}
from
"@/api/fileserver/raysyncApi"
;
import
{
APIOPTION
,
urlToken
}
from
"@/api/fileserver/raysyncApi"
;
import
UseTusUpload
from
"@/utils/Upload/tusUpload"
;
import
UseTusUpload
from
"@/utils/Upload/tusUpload"
;
import
MyButton
from
"@/components/mui/MyButton"
;
type
IMoveFileProps
=
{
type
IMoveFileProps
=
{
uploaderDialogOpen
:
any
;
uploaderDialogOpen
:
any
;
...
@@ -172,17 +172,14 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
...
@@ -172,17 +172,14 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
const renderButtons = (item: any, index: number) => {
const renderButtons = (item: any, index: number) => {
return (
return (
<span>
<MyButton
<Button
text='删除'
s
x
={{ position: "relative", left: "-18px" }}
s
tyle
={{ position: "relative", left: "-18px" }}
variant="text"
variant="text"
size="small"
size="small"
color="error"
color="error"
onClick={() => handleRowDelete(index)}
onClick={() => handleRowDelete(index)}
>
/>
删除
</Button>
</span>
);
);
};
};
...
...
src/views/Project/ProjectData/index.tsx
View file @
8fb30dd9
import
React
,
{
useState
,
useCallback
,
useEffect
,
useMemo
}
from
"react"
;
import
React
,
{
useState
,
useCallback
,
useEffect
,
useMemo
}
from
"react"
;
import
style
from
"./index.module.css"
;
import
style
from
"./index.module.css"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
Button
,
InputBase
,
IconButton
}
from
"@mui/material"
;
import
{
InputBase
,
IconButton
}
from
"@mui/material"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material/styles"
;
import
{
createTheme
,
ThemeProvider
}
from
"@mui/material/styles"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
RefreshIcon
from
"@mui/icons-material/Refresh"
;
import
RefreshIcon
from
"@mui/icons-material/Refresh"
;
...
@@ -27,6 +27,7 @@ import { useLocation } from "react-router-dom";
...
@@ -27,6 +27,7 @@ import { useLocation } from "react-router-dom";
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
SeeDataset
from
"./SeeDataset"
;
import
SeeDataset
from
"./SeeDataset"
;
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
MyButton
from
"@/components/mui/MyButton"
;
const
theme
=
createTheme
({
const
theme
=
createTheme
({
palette
:
{
palette
:
{
...
@@ -389,8 +390,9 @@ const ProjectData = observer(() => {
...
@@ -389,8 +390,9 @@ const ProjectData = observer(() => {
return
(
return
(
<
span
style=
{
{
whiteSpace
:
"nowrap"
}
}
>
<
span
style=
{
{
whiteSpace
:
"nowrap"
}
}
>
{
!
isAllDirectory
&&
(
{
!
isAllDirectory
&&
(
<
Button
<
MyButton
sx=
{
{
text=
'下载'
style=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-4px"
,
left
:
"-4px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
...
@@ -404,12 +406,12 @@ const ProjectData = observer(() => {
...
@@ -404,12 +406,12 @@ const ProjectData = observer(() => {
size=
"small"
size=
"small"
disabled=
{
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_DOWNLOAD"
)
}
disabled=
{
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_DOWNLOAD"
)
}
onClick=
{
()
=>
hanleDownloadFile
(
item
)
}
onClick=
{
()
=>
hanleDownloadFile
(
item
)
}
>
/>
下载
</
Button
>
)
}
)
}
<
Button
<
MyButton
sx=
{
{
text=
'移动至'
style=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-4px"
,
left
:
"-4px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
...
@@ -424,11 +426,11 @@ const ProjectData = observer(() => {
...
@@ -424,11 +426,11 @@ const ProjectData = observer(() => {
disabled=
{
disabled=
{
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_MOVE"
,
"USER"
)
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_MOVE"
,
"USER"
)
}
}
>
/
>
移动至
<
/
Button
>
<
MyButton
<
Button
text=
'删除'
s
x
=
{
{
s
tyle
=
{
{
position
:
"relative"
,
position
:
"relative"
,
left
:
"-4px"
,
left
:
"-4px"
,
minWidth
:
"10px"
,
minWidth
:
"10px"
,
...
@@ -444,9 +446,7 @@ const ProjectData = observer(() => {
...
@@ -444,9 +446,7 @@ const ProjectData = observer(() => {
disabled=
{
disabled=
{
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_DELETE"
,
"USER"
)
selectIds
.
length
>
0
||
!
isPass
(
"PROJECT_DATA_DELETE"
,
"USER"
)
}
}
>
/>
删除
</
Button
>
</
span
>
</
span
>
);
);
};
};
...
@@ -539,8 +539,9 @@ const ProjectData = observer(() => {
...
@@ -539,8 +539,9 @@ const ProjectData = observer(() => {
<
div
className=
{
style
.
projectDataHeader
}
>
<
div
className=
{
style
.
projectDataHeader
}
>
<
div
className=
{
style
.
projectDataButtonAndSearch
}
>
<
div
className=
{
style
.
projectDataButtonAndSearch
}
>
<
div
className=
{
style
.
projectDataButtonBox
}
>
<
div
className=
{
style
.
projectDataButtonBox
}
>
<
Button
<
MyButton
color=
"neutral"
text=
'上传文件'
// color="neutral"
variant=
"contained"
variant=
"contained"
size=
"small"
size=
"small"
style=
{
{
marginRight
:
"12px"
}
}
style=
{
{
marginRight
:
"12px"
}
}
...
@@ -549,9 +550,8 @@ const ProjectData = observer(() => {
...
@@ -549,9 +550,8 @@ const ProjectData = observer(() => {
selectIds
.
length
!==
0
||
selectIds
.
length
!==
0
||
!
isPass
(
"PROJECT_DATA_UPLOAD"
,
"USER"
)
!
isPass
(
"PROJECT_DATA_UPLOAD"
,
"USER"
)
}
}
>
/>
上传文件
</
Button
>
<
AddFolder
<
AddFolder
selectIds=
{
selectIds
}
selectIds=
{
selectIds
}
list=
{
allList
}
list=
{
allList
}
...
@@ -638,7 +638,8 @@ const ProjectData = observer(() => {
...
@@ -638,7 +638,8 @@ const ProjectData = observer(() => {
</
div
>
</
div
>
{
selectIds
.
length
>
0
&&
(
{
selectIds
.
length
>
0
&&
(
<
div
className=
{
style
.
projectDataStickyBox
}
>
<
div
className=
{
style
.
projectDataStickyBox
}
>
<
Button
<
MyButton
text=
{
`批量删除(${selectIds.length})`
}
color=
"error"
color=
"error"
variant=
"outlined"
variant=
"outlined"
size=
"small"
size=
"small"
...
@@ -648,11 +649,10 @@ const ProjectData = observer(() => {
...
@@ -648,11 +649,10 @@ const ProjectData = observer(() => {
setDeleteDialogOpen
(
true
);
setDeleteDialogOpen
(
true
);
}
}
}
}
disabled=
{
!
isPass
(
"PROJECT_DATA_DELETE"
,
"USER"
)
}
disabled=
{
!
isPass
(
"PROJECT_DATA_DELETE"
,
"USER"
)
}
>
/>
批量删除(
{
selectIds
.
length
}
)
<
MyButton
</
Button
>
text=
{
`批量移动(${selectIds.length})`
}
<
Button
// color="neutral"
color=
"neutral"
variant=
"contained"
variant=
"contained"
size=
"small"
size=
"small"
style=
{
{
marginRight
:
"24px"
}
}
style=
{
{
marginRight
:
"24px"
}
}
...
@@ -661,9 +661,9 @@ const ProjectData = observer(() => {
...
@@ -661,9 +661,9 @@ const ProjectData = observer(() => {
setDeleteDialogOpen
(
true
);
setDeleteDialogOpen
(
true
);
}
}
}
}
disabled=
{
!
isPass
(
"PROJECT_DATA_MOVE"
,
"USER"
)
}
disabled=
{
!
isPass
(
"PROJECT_DATA_MOVE"
,
"USER"
)
}
>
/
>
批量移动(
{
selectIds
.
length
}
)
</
Button
>
</
div
>
</
div
>
)
}
)
}
{
deleteDialogOpen
&&
(
{
deleteDialogOpen
&&
(
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
8fb30dd9
/*
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-0
6-14 15:40:27
* @LastEditTime: 2022-0
7-26 20:39:32
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/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
*/
*/
...
@@ -21,7 +21,7 @@ import { toJS } from "mobx";
...
@@ -21,7 +21,7 @@ import { toJS } from "mobx";
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
InformationDisplay
from
"@/components/CommonComponents/InformationDisplay"
;
import
InformationDisplay
from
"@/components/CommonComponents/InformationDisplay"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
Button
,
TextField
}
from
"@mui/material"
;
import
{
TextField
}
from
"@mui/material"
;
import
LoadingButton
from
"@mui/lab/LoadingButton"
;
import
LoadingButton
from
"@mui/lab/LoadingButton"
;
import
InputAdornment
from
'@mui/material/InputAdornment'
;
import
InputAdornment
from
'@mui/material/InputAdornment'
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
...
@@ -33,7 +33,7 @@ import {
...
@@ -33,7 +33,7 @@ import {
setFileServerEndPointLocalStorage
,
setFileServerEndPointLocalStorage
,
getFiletokenAccordingToId
,
getFiletokenAccordingToId
,
}
from
"@/views/Project/project"
;
}
from
"@/views/Project/project"
;
import
My
Input
from
"@/components/mui/MyInput"
import
My
Button
from
"@/components/mui/MyButton"
;
type
zoneIdOption
=
{
type
zoneIdOption
=
{
id
:
string
;
id
:
string
;
...
@@ -416,18 +416,17 @@ const BaseInfo = observer(() => {
...
@@ -416,18 +416,17 @@ const BaseInfo = observer(() => {
<
div
className=
{
style
.
projectInfoListLiText
}
>
<
div
className=
{
style
.
projectInfoListLiText
}
>
删除项目将删除其存储的数据和所有相关资源,并且已删除的项目无法恢复!请谨慎操作!
删除项目将删除其存储的数据和所有相关资源,并且已删除的项目无法恢复!请谨慎操作!
</
div
>
</
div
>
<
Button
<
MyButton
text=
'删除项目'
variant=
"contained"
variant=
"contained"
className=
{
style
.
updateButton
}
onClick=
{
()
=>
setDialogOpen
(
true
)
}
onClick=
{
()
=>
setDialogOpen
(
true
)
}
style=
{
{
color=
'error'
backgroundColor
:
"#fff"
,
// style={{
color
:
"#FF4E4E"
,
// backgroundColor: "#fff",
border
:
"1px solid #FF4E4E"
,
// color: "#FF4E4E",
}
}
// border: "1px solid #FF4E4E",
>
// }}
删除项目
/>
</
Button
>
</
div
>
</
div
>
<
MyDialog
<
MyDialog
open=
{
dialogOpen
}
open=
{
dialogOpen
}
...
...
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
View file @
8fb30dd9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-26 1
2:00:56
* @LastEditTime: 2022-07-26 1
8:39:52
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/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
*/
*/
...
@@ -10,7 +10,6 @@ import { memo, useCallback, useEffect, useMemo, useState } from "react";
...
@@ -10,7 +10,6 @@ import { memo, useCallback, useEffect, useMemo, useState } from "react";
import
_
from
"lodash"
;
import
_
from
"lodash"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
{
Box
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/material"
;
import
Button
from
"@mui/material/Button"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Add
from
"@mui/icons-material/Add"
;
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
...
@@ -23,6 +22,7 @@ import ChangePermission from "./components/ChangePermission";
...
@@ -23,6 +22,7 @@ import ChangePermission from "./components/ChangePermission";
import
AddMember
from
"./components/AddMember"
;
import
AddMember
from
"./components/AddMember"
;
import
{
IDialogInfo
}
from
"./interface"
;
import
{
IDialogInfo
}
from
"./interface"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -157,15 +157,14 @@ const ProjectMembers = observer(() => {
...
@@ -157,15 +157,14 @@ const ProjectMembers = observer(() => {
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#8A9099"
}
}
/>
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#8A9099"
}
}
/>
}
/>
/>
{
currentProjectStore
?.
currentProjectInfo
?.
projectRole
===
"OWNER"
?
(
{
currentProjectStore
?.
currentProjectInfo
?.
projectRole
===
"OWNER"
?
(
<
Button
<
MyButton
text=
'添加成员'
style=
{
{
backgroundColor
:
"#1370FF "
}
}
style=
{
{
backgroundColor
:
"#1370FF "
}
}
variant=
"contained"
variant=
"contained"
onClick=
{
onAddMember
}
onClick=
{
onAddMember
}
startIcon=
{
<
Add
/>
}
startIcon=
{
<
Add
/>
}
size=
"small"
size=
"small"
>
/>
添加成员
</
Button
>
)
:
null
}
)
:
null
}
</
Box
>
</
Box
>
<
MyTable
<
MyTable
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
8fb30dd9
...
@@ -5,7 +5,7 @@ import CloseOutlinedIcon from "@mui/icons-material/CloseOutlined";
...
@@ -5,7 +5,7 @@ import CloseOutlinedIcon from "@mui/icons-material/CloseOutlined";
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
Button
from
"@/components/mui/MyButton"
;
import
My
Button
from
"@/components/mui/MyButton"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
Checkbox
from
"@mui/material/Checkbox"
;
import
Checkbox
from
"@mui/material/Checkbox"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
...
@@ -213,7 +213,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
...
@@ -213,7 +213,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
radioOptions=
{
radioOptions
}
radioOptions=
{
radioOptions
}
handleRadio=
{
handleRadio
}
handleRadio=
{
handleRadio
}
></
RadioGroupOfButtonStyle
>
></
RadioGroupOfButtonStyle
>
<
Button
<
My
Button
onClick=
{
handleAddTemplate
}
onClick=
{
handleAddTemplate
}
size=
{
"small"
}
size=
{
"small"
}
style=
{
{
style=
{
{
...
@@ -295,7 +295,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
...
@@ -295,7 +295,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
<
div
className=
{
style
.
templateLiDesc
}
>
{
item
.
description
}
</
div
>
<
div
className=
{
style
.
templateLiDesc
}
>
{
item
.
description
}
</
div
>
{
templateType
!==
"public"
&&
(
{
templateType
!==
"public"
&&
(
<
div
className=
{
style
.
templateLiEditBox
}
>
<
div
className=
{
style
.
templateLiEditBox
}
>
<
Button
<
My
Button
onClick=
{
()
=>
handleEditTemplate
(
item
)
}
onClick=
{
()
=>
handleEditTemplate
(
item
)
}
size=
{
"small"
}
size=
{
"small"
}
style=
{
{
style=
{
{
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/addTemplate.tsx
View file @
8fb30dd9
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
memo
,
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
styles
from
"../index.module.css"
;
import
styles
from
"../index.module.css"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
Button
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
Dialog
from
"@/components/mui/MyDialog"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
...
@@ -89,7 +88,7 @@ const AddTemplate = (props: any) => {
...
@@ -89,7 +88,7 @@ const AddTemplate = (props: any) => {
radioOptions=
{
radioOptions
}
radioOptions=
{
radioOptions
}
handleRadio=
{
handleRadio
}
handleRadio=
{
handleRadio
}
></
RadioGroupOfButtonStyle
>
></
RadioGroupOfButtonStyle
>
<
Button
<
My
Button
onClick=
{
addTemplateCallback
}
onClick=
{
addTemplateCallback
}
size=
{
"small"
}
size=
{
"small"
}
style=
{
{
style=
{
{
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/templateBox.tsx
View file @
8fb30dd9
/*
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-17 14:48:57
* @Date: 2022-06-17 14:48:57
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-07-2
0 15:01:04
* @LastEditTime: 2022-07-2
6 18:35:33
* @FilePath: /bkunyun/src/views/Project/ProjectWorkbench/workbenchTemplate/components/templateBox.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectWorkbench/workbenchTemplate/components/templateBox.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
*/
*/
import
{
memo
,
useCallback
}
from
"react"
;
import
{
memo
,
useCallback
}
from
"react"
;
import
styles
from
"../index.module.css"
;
import
styles
from
"../index.module.css"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
Button
from
"@/components/mui/MyButton"
;
import
My
Button
from
"@/components/mui/MyButton"
;
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
{
useNavigate
}
from
"react-router-dom"
;
...
@@ -91,7 +91,7 @@ const TemplateBox = (props: any) => {
...
@@ -91,7 +91,7 @@ const TemplateBox = (props: any) => {
}
}
}
}
>
>
{
isPass
(
"PROJECT_WORKBENCH_FLOES_USE"
,
"MANAGER"
)
&&
(
{
isPass
(
"PROJECT_WORKBENCH_FLOES_USE"
,
"MANAGER"
)
&&
(
<
Button
<
My
Button
size=
{
"small"
}
size=
{
"small"
}
text=
{
"删除模版"
}
text=
{
"删除模版"
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
...
@@ -101,7 +101,7 @@ const TemplateBox = (props: any) => {
...
@@ -101,7 +101,7 @@ const TemplateBox = (props: any) => {
/>
/>
)
}
)
}
{
isPass
(
"PROJECT_WORKBENCH_FLOES_USE"
,
"USER"
)
&&
(
{
isPass
(
"PROJECT_WORKBENCH_FLOES_USE"
,
"USER"
)
&&
(
<
Button
<
My
Button
size=
{
"small"
}
size=
{
"small"
}
text=
{
"使用模版"
}
text=
{
"使用模版"
}
onClick=
{
()
=>
addTemplateBlock
(
info
.
id
)
}
onClick=
{
()
=>
addTemplateBlock
(
info
.
id
)
}
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
8fb30dd9
/*
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-07-2
0 15:01:29
* @LastEditTime: 2022-07-2
6 18:34:46
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/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
*/
*/
...
@@ -14,7 +14,7 @@ import { toJS } from "mobx";
...
@@ -14,7 +14,7 @@ import { toJS } from "mobx";
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Button
from
"@/components/mui/MyButton"
;
import
My
Button
from
"@/components/mui/MyButton"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
TemplateBox
from
"./components/templateBox"
;
import
TemplateBox
from
"./components/templateBox"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
...
@@ -122,7 +122,7 @@ const ProjectMembers = observer(() => {
...
@@ -122,7 +122,7 @@ const ProjectMembers = observer(() => {
{
templateList
.
length
>
0
&&
{
templateList
.
length
>
0
&&
isPass
(
"PROJECT_WORKBENCH_FLOES_ADD"
,
"MANAGER"
)
&&
(
isPass
(
"PROJECT_WORKBENCH_FLOES_ADD"
,
"MANAGER"
)
&&
(
<
Button
<
My
Button
text=
{
"添加工作流模版"
}
text=
{
"添加工作流模版"
}
img=
{
<
Add
/>
}
img=
{
<
Add
/>
}
onClick=
{
addTemplateBlock
}
onClick=
{
addTemplateBlock
}
...
...
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