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
029dbe41
Commit
029dbe41
authored
Jun 16, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220608-projectdata' into 'release'
Feat 20220608 projectdata See merge request
!47
parents
34c8a931
53f3ef04
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
19 deletions
+55
-19
tusUpload.ts
src/utils/Upload/tusUpload.ts
+1
-1
index.tsx
src/views/ConsoleLayout/components/FileItem/index.tsx
+12
-2
index.tsx
src/views/Project/ProjectData/MoveFile/index.tsx
+28
-12
index.tsx
src/views/Project/ProjectData/index.tsx
+11
-2
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+1
-0
index.tsx
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
+2
-2
No files found.
src/utils/Upload/tusUpload.ts
View file @
029dbe41
...
@@ -25,7 +25,7 @@ const UseTusUpload = (uploadInfoStore: any) => {
...
@@ -25,7 +25,7 @@ const UseTusUpload = (uploadInfoStore: any) => {
let
json
=
{
let
json
=
{
name
:
file
.
name
,
name
:
file
.
name
,
bytesUploaded
:
0
,
bytesUploaded
:
0
,
bytesTotal
:
0
,
bytesTotal
:
file
?.
size
,
percentage
:
0
,
percentage
:
0
,
startTime
:
new
Date
().
getTime
(),
startTime
:
new
Date
().
getTime
(),
endTime
:
new
Date
().
getTime
()
+
1000
,
endTime
:
new
Date
().
getTime
()
+
1000
,
...
...
src/views/ConsoleLayout/components/FileItem/index.tsx
View file @
029dbe41
...
@@ -29,6 +29,7 @@ const FileItem = observer((props: IProps) => {
...
@@ -29,6 +29,7 @@ const FileItem = observer((props: IProps) => {
const
itemInfo
=
toJS
(
fileItemInfo
)?.
info
;
const
itemInfo
=
toJS
(
fileItemInfo
)?.
info
;
const
{
statusMsg
=
""
}
=
itemInfo
||
{};
const
{
statusMsg
=
""
}
=
itemInfo
||
{};
const
uploadInfoStore
=
toJS
(
useGlobalStore
(
"fileListStore"
));
const
uploadInfoStore
=
toJS
(
useGlobalStore
(
"fileListStore"
));
const
currentProjectStore
=
toJS
(
useGlobalStore
(
"currentProjectStore"
));
const
Message
=
useMessage
();
const
Message
=
useMessage
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
...
@@ -98,17 +99,26 @@ const FileItem = observer((props: IProps) => {
...
@@ -98,17 +99,26 @@ const FileItem = observer((props: IProps) => {
</
span
>
</
span
>
)
}
)
}
</
div
>
</
div
>
{
statusMsg
!==
"上传成功"
?
(
<
LinearProgress
<
LinearProgress
sx=
{
{
width
:
300
,
borderRadius
:
2
,
margin
:
"6px 0"
,
color
:
"red"
}
}
sx=
{
{
width
:
300
,
borderRadius
:
2
,
margin
:
"6px 0"
,
color
:
"red"
,
}
}
variant=
"determinate"
variant=
"determinate"
value=
{
itemInfo
?.
percentage
}
value=
{
itemInfo
?.
percentage
}
/>
/>
)
:
null
}
<
div
style=
{
{
fontSize
:
12
}
}
>
<
div
style=
{
{
fontSize
:
12
}
}
>
{
statusMsg
===
"上传成功"
?
(
{
statusMsg
===
"上传成功"
?
(
<>
<>
<
span
style=
{
{
color
:
"#8A9099"
}
}
>
已上传至
</
span
>
<
span
style=
{
{
color
:
"#8A9099"
}
}
>
已上传至
</
span
>
<
span
style=
{
{
color
:
"#565C66"
,
marginLeft
:
12
}
}
>
<
span
style=
{
{
color
:
"#565C66"
,
marginLeft
:
12
}
}
>
{
fileItemInfo
?.
path
}
{
`CADD - ${
currentProjectStore?.currentProjectInfo?.name || ""
}`
}
</
span
>
</
span
>
</>
</>
)
:
(
)
:
(
...
...
src/views/Project/ProjectData/MoveFile/index.tsx
View file @
029dbe41
...
@@ -138,7 +138,9 @@ const MoveFile = (props: any) => {
...
@@ -138,7 +138,9 @@ const MoveFile = (props: any) => {
foldersMove
(
folderMoveList
);
foldersMove
(
folderMoveList
);
}
}
if
(
fileMoveList
.
length
>
0
)
{
if
(
fileMoveList
.
length
>
0
)
{
filesMove
(
fileMoveList
);
filesMove
(
fileMoveList
)?.
then
((
res
)
=>
{
successMove
();
});
}
}
}
else
{
}
else
{
if
(
currentOperateFile
.
type
===
"dataSet"
)
{
if
(
currentOperateFile
.
type
===
"dataSet"
)
{
...
@@ -146,7 +148,9 @@ const MoveFile = (props: any) => {
...
@@ -146,7 +148,9 @@ const MoveFile = (props: any) => {
}
else
if
(
currentOperateFile
.
type
===
"directory"
)
{
}
else
if
(
currentOperateFile
.
type
===
"directory"
)
{
folerMove
();
folerMove
();
}
else
{
}
else
{
fileMove
();
fileMove
()?.
then
((
res
)
=>
{
successMove
();
});
}
}
}
}
}
}
...
@@ -155,15 +159,13 @@ const MoveFile = (props: any) => {
...
@@ -155,15 +159,13 @@ const MoveFile = (props: any) => {
// 单文件移动
// 单文件移动
const
fileMove
=
()
=>
{
const
fileMove
=
()
=>
{
const
oldPathToFileServer
=
`
${
oldPathProvidedToFileServer
}${
currentOperateFile
.
name
}
`
;
const
oldPathToFileServer
=
`
${
oldPathProvidedToFileServer
}${
currentOperateFile
.
name
}
`
;
CloudEController
.
JobFileMove
(
return
CloudEController
.
JobFileMove
(
newPath
,
newPath
,
oldPathToFileServer
,
oldPathToFileServer
,
""
,
""
,
fileToken
,
fileToken
,
projectId
projectId
)?.
then
((
res
)
=>
{
);
successMove
();
});
};
};
// 多文件移动
// 多文件移动
...
@@ -171,22 +173,28 @@ const MoveFile = (props: any) => {
...
@@ -171,22 +173,28 @@ const MoveFile = (props: any) => {
const
oldPaths
=
fileMoveList
.
map
((
item
:
any
)
=>
{
const
oldPaths
=
fileMoveList
.
map
((
item
:
any
)
=>
{
return
`
${
oldPathProvidedToFileServer
}${
item
.
name
}
`
;
return
`
${
oldPathProvidedToFileServer
}${
item
.
name
}
`
;
});
});
CloudEController
.
JobFileBatchMove
(
return
CloudEController
.
JobFileBatchMove
(
newPath
,
newPath
,
oldPaths
,
oldPaths
,
""
,
""
,
fileToken
,
fileToken
,
projectId
projectId
)?.
then
((
res
)
=>
{
);
successMove
();
});
};
};
// 单文件夹移动
// 单文件夹移动
const
folerMove
=
()
=>
{
const
folerMove
=
()
=>
{
fileMove
();
fileMove
()
?.
then
((
res
)
=>
{
const
names
=
currentOperateFile
.
name
;
const
names
=
currentOperateFile
.
name
;
dataSetInFolerMove
(
names
);
dataSetInFolerMove
(
names
);
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
if
(
error
?.
response
?.
status
===
405
)
{
Message
.
error
(
"因目标路径存在同名文件,数据移动失败。"
);
}
});
};
};
// 移动文件夹中的数据集
// 移动文件夹中的数据集
...
@@ -201,9 +209,17 @@ const MoveFile = (props: any) => {
...
@@ -201,9 +209,17 @@ const MoveFile = (props: any) => {
// 多文件夹移动
// 多文件夹移动
const
foldersMove
=
(
folderMoveList
:
Array
<
any
>
)
=>
{
const
foldersMove
=
(
folderMoveList
:
Array
<
any
>
)
=>
{
filesMove
(
folderMoveList
);
filesMove
(
folderMoveList
)
?.
then
((
res
)
=>
{
const
names
=
folderMoveList
.
map
((
item
:
any
)
=>
item
.
name
).
join
(
","
);
const
names
=
folderMoveList
.
map
((
item
:
any
)
=>
item
.
name
).
join
(
","
);
dataSetInFolerMove
(
names
);
dataSetInFolerMove
(
names
);
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
if
(
error
?.
response
?.
status
===
405
)
{
Message
.
error
(
"因目标路径存在同名文件,数据移动失败。"
);
}
});
};
};
// 单数据集移动
// 单数据集移动
...
...
src/views/Project/ProjectData/index.tsx
View file @
029dbe41
...
@@ -88,13 +88,22 @@ const ProjectData = observer(() => {
...
@@ -88,13 +88,22 @@ const ProjectData = observer(() => {
useEffect
(()
=>
{
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
const
locationInfo
:
any
=
location
?.
state
;
setPath
(
locationInfo
?.
pathName
||
""
);
setPath
(
locationInfo
?.
pathName
||
""
);
handleRefresh
();
},
[
location
]);
},
[
location
]);
// 列表展示的数据
// 列表展示的数据
const
showList
=
useMemo
(()
=>
{
const
showList
=
useMemo
(()
=>
{
if
(
activeTab
===
1
)
{
if
(
activeTab
===
1
)
{
return
list
;
// 做排序 文件夹在前
let
folderList
:
any
=
[];
let
fileList
:
any
=
[];
list
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
===
"directory"
)
{
folderList
.
push
(
item
);
}
else
{
fileList
.
push
(
item
);
}
});
return
[...
folderList
,
...
fileList
];
}
else
{
}
else
{
const
folderList
=
list
.
filter
((
item
:
any
)
=>
{
const
folderList
=
list
.
filter
((
item
:
any
)
=>
{
return
item
.
type
===
"directory"
;
return
item
.
type
===
"directory"
;
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
029dbe41
...
@@ -50,6 +50,7 @@ const BaseInfo = observer(() => {
...
@@ -50,6 +50,7 @@ const BaseInfo = observer(() => {
const
currentUserName
=
JSON
.
parse
(
const
currentUserName
=
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
).
name
;
).
name
;
// 是否拥有编辑权限
const
hasEditAuth
=
useMemo
(()
=>
{
const
hasEditAuth
=
useMemo
(()
=>
{
if
(
!
currentUserName
)
{
if
(
!
currentUserName
)
{
return
false
;
return
false
;
...
...
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
View file @
029dbe41
...
@@ -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: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-16 1
7:26:40
* @LastEditTime: 2022-06-16 1
8:17:04
* @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
*/
*/
...
@@ -65,7 +65,7 @@ const ProjectMembers = observer(() => {
...
@@ -65,7 +65,7 @@ const ProjectMembers = observer(() => {
label
:
"操作"
,
label
:
"操作"
,
width
:
160
,
width
:
160
,
render
:
(
item
:
any
,
row
:
any
)
=>
{
render
:
(
item
:
any
,
row
:
any
)
=>
{
return
item
.
projectRole
===
"OWNER"
?
null
:
(
return
item
?
.
projectRole
===
"OWNER"
?
null
:
(
<>
<>
<
span
<
span
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
...
...
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