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
4c2c3780
Commit
4c2c3780
authored
Jun 16, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220608-projectdata' into 'release'
fix: 文件传输支持实时网速 See merge request
!48
parents
029dbe41
996c6119
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
16 deletions
+36
-16
api_prefix.ts
src/api/api_prefix.ts
+2
-2
index.module.css
src/views/ConsoleLayout/components/FileItem/index.module.css
+5
-0
index.tsx
src/views/ConsoleLayout/components/FileItem/index.tsx
+21
-1
index.tsx
src/views/ConsoleLayout/components/TransferList/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
+6
-11
No files found.
src/api/api_prefix.ts
View file @
4c2c3780
...
@@ -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:17:48
* @Date: 2022-05-31 10:17:48
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-1
3 09:59:45
* @LastEditTime: 2022-06-1
6 20:22:37
* @FilePath: /bkunyun/src/api/api_prefix.ts
* @FilePath: /bkunyun/src/api/api_prefix.ts
* @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
*/
*/
...
@@ -32,7 +32,7 @@ switch (process.env.REACT_APP_ENV) {
...
@@ -32,7 +32,7 @@ switch (process.env.REACT_APP_ENV) {
if
([
"www.bkunyun.com"
].
includes
(
window
.
location
.
host
))
{
if
([
"www.bkunyun.com"
].
includes
(
window
.
location
.
host
))
{
BACKEND_API_URI_PREFIX
=
"https://www.bkunyun.com"
;
BACKEND_API_URI_PREFIX
=
"https://www.bkunyun.com"
;
}
else
{
}
else
{
BACKEND_API_URI_PREFIX
=
"http://47.
57.4.97
"
;
BACKEND_API_URI_PREFIX
=
"http://47.
75.104.171
"
;
}
}
break
;
break
;
}
}
...
...
src/views/ConsoleLayout/components/FileItem/index.module.css
View file @
4c2c3780
...
@@ -17,6 +17,11 @@
...
@@ -17,6 +17,11 @@
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.speedBox
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.rightBox
{
.rightBox
{
cursor
:
pointer
;
cursor
:
pointer
;
...
...
src/views/ConsoleLayout/components/FileItem/index.tsx
View file @
4c2c3780
...
@@ -79,6 +79,20 @@ const FileItem = observer((props: IProps) => {
...
@@ -79,6 +79,20 @@ const FileItem = observer((props: IProps) => {
});
});
}
}
};
};
const
speed
=
useMemo
(()
=>
{
let
val
=
0
;
const
time
=
Math
.
floor
((
itemInfo
?.
endTime
-
itemInfo
.
startTime
)
/
1000
);
if
(
time
>
0
)
{
val
=
Math
.
floor
(
itemInfo
?.
bytesUploaded
/
time
);
}
return
val
;
},
[
itemInfo
?.
bytesUploaded
,
itemInfo
?.
endTime
,
itemInfo
.
startTime
]);
console
.
log
(
Math
.
floor
((
itemInfo
?.
endTime
-
itemInfo
.
startTime
)
/
1000
),
"111111"
);
return
(
return
(
<
div
className=
{
styles
.
itemBox
}
>
<
div
className=
{
styles
.
itemBox
}
>
<
div
className=
{
styles
.
leftBox
}
>
<
div
className=
{
styles
.
leftBox
}
>
...
@@ -122,9 +136,15 @@ const FileItem = observer((props: IProps) => {
...
@@ -122,9 +136,15 @@ const FileItem = observer((props: IProps) => {
</
span
>
</
span
>
</>
</>
)
:
(
)
:
(
<
div
className=
{
styles
.
speedBox
}
>
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
itemInfo?.bytesUploaded || 0
itemInfo?.bytesUploaded || 0
)}/${storageUnitFromB(itemInfo?.bytesTotal || 0)}`
}
</
span
>
)}/${storageUnitFromB(itemInfo?.bytesTotal || 0)}`
}
</
span
>
{
" "
}
:
<
span
className=
{
styles
.
span
}
>
{
`${storageUnitFromB(
speed
)}/s`
}
</
span
>
</
div
>
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/views/ConsoleLayout/components/TransferList/index.tsx
View file @
4c2c3780
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-10 18:05:21
* @Date: 2022-06-10 18:05:21
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-06-16
03:05:08
* @LastEditTime: 2022-06-16
21:15:59
* @FilePath: /bkunyun/src/views/ConsoleLayout/components/TransferList/index.tsx
* @FilePath: /bkunyun/src/views/ConsoleLayout/components/TransferList/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
*/
*/
...
@@ -46,7 +46,7 @@ const TranSferList = observer(() => {
...
@@ -46,7 +46,7 @@ const TranSferList = observer(() => {
size=
"small"
size=
"small"
/>
/>
</
Box
>
</
Box
>
<
Box
>
<
Box
style=
{
{
height
:
400
,
overflowY
:
"auto"
}
}
>
{
uploadInfoStore
?.
fileList
.
map
((
item
)
=>
{
{
uploadInfoStore
?.
fileList
.
map
((
item
)
=>
{
return
<
FileItem
fileItemInfo=
{
item
}
key=
{
item
.
id
}
/>;
return
<
FileItem
fileItemInfo=
{
item
}
key=
{
item
.
id
}
/>;
})
}
})
}
...
...
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
View file @
4c2c3780
...
@@ -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
18:17:0
4
* @LastEditTime: 2022-06-16
20:49:1
4
* @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
*/
*/
...
@@ -50,22 +50,18 @@ const ProjectMembers = observer(() => {
...
@@ -50,22 +50,18 @@ const ProjectMembers = observer(() => {
const
[
projectName
,
setProjectMember
]
=
useState
(
""
);
const
[
projectName
,
setProjectMember
]
=
useState
(
""
);
/** 过滤后数据 */
/** 过滤后数据 */
const
[
filterTableData
,
setFilterTableData
]
=
useState
([]);
const
[
filterTableData
,
setFilterTableData
]
=
useState
([]);
/** 项目所有者 */
const
[
projectOwner
,
setProjectOwner
]
=
useState
(
""
);
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
const
val
:
any
=
[
const
val
:
any
=
[
{
id
:
"username"
,
label
:
"成员名称"
},
{
id
:
"username"
,
label
:
"成员名称"
},
{
id
:
"projectRoleDesc"
,
label
:
"项目权限"
},
{
id
:
"projectRoleDesc"
,
label
:
"项目权限"
},
{
id
:
"phone"
,
label
:
"联系方式"
},
{
id
:
"phone"
,
label
:
"联系方式"
},
];
{
if
(
isProjectOwner
(
projectOwner
))
{
val
.
push
({
id
:
"operation"
,
id
:
"operation"
,
label
:
"操作"
,
label
:
"操作"
,
width
:
160
,
width
:
160
,
render
:
(
item
:
any
,
row
:
any
)
=>
{
render
:
(
item
:
any
,
row
:
any
)
=>
{
return
item
?.
projectRole
===
"OWNER"
?
null
:
(
return
row
?.
projectRole
===
"OWNER"
?
null
:
(
<>
<>
<
span
<
span
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
...
@@ -86,10 +82,10 @@ const ProjectMembers = observer(() => {
...
@@ -86,10 +82,10 @@ const ProjectMembers = observer(() => {
</>
</>
);
);
},
},
}
);
}
,
}
];
return
val
;
return
val
;
},
[
projectOwner
]);
},
[]);
/** 获取表格数据 */
/** 获取表格数据 */
const
getTableList
=
useCallback
(()
=>
{
const
getTableList
=
useCallback
(()
=>
{
...
@@ -101,7 +97,6 @@ const ProjectMembers = observer(() => {
...
@@ -101,7 +97,6 @@ const ProjectMembers = observer(() => {
}
)
}
)
.then((res) =
>
{
.then((res) =
>
{
const
{
data
=
{}
}
=
res
;
const
{
data
=
{}
}
=
res
;
setProjectOwner
(
data
.
owner
);
setTableData
(
data
?.
members
||
[]);
setTableData
(
data
?.
members
||
[]);
}
);
}
);
}, [currentProjectStore?.currentProjectInfo, http]);
}, [currentProjectStore?.currentProjectInfo, http]);
...
...
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