Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
40b4ea0b
Commit
40b4ea0b
authored
Dec 30, 2020
by
wufan
Committed by
zhangleyuan
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复文件夹权限问题
parent
94ff797b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
34 deletions
+73
-34
src/modules/resource-disk/components/FolderList.jsx
+1
-1
src/modules/resource-disk/components/FolderManage.jsx
+72
-33
No files found.
src/modules/resource-disk/components/FolderList.jsx
View file @
40b4ea0b
...
...
@@ -570,7 +570,7 @@ class FolderList extends React.Component {
const
hasManagementAuthority
=
currentRootDisk
.
uploadPower
;
// 公共文件权限和复制权限
const
{
folderType
,
rights
}
=
record
;
const
menu
=
(
const
menu
=
(
<
Menu
>
{
rights
===
"EDIT"
&&
!
record
.
parentId
&&
...
...
src/modules/resource-disk/components/FolderManage.jsx
View file @
40b4ea0b
...
...
@@ -105,41 +105,80 @@ class FolderManage extends React.Component {
_params
.
current
=
isSearch
?
1
:
current
;
if
(
parentRights
)
{
this
.
setState
({
_parentRights
:
parentRights
});
}
Service
.
Hades
(
FOLDERLIST_URL_MAP
[
disk
],
_params
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
}
=
result
;
let
_records
=
[];
// 判断是否继承了父级文件权限
if
(
records
.
length
>
0
&&
!
records
[
0
].
rights
)
{
records
.
map
((
item
,
index
)
=>
{
item
.
rights
=
_parentRights
;
_records
.
push
(
item
);
return
_records
;
})
this
.
setState
({
loading
:
false
,
folderList
:
_records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
else
{
this
.
setState
({
_parentRights
:
parentRights
},()
=>
{
Service
.
Hades
(
FOLDERLIST_URL_MAP
[
disk
],
_params
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
}
=
result
;
let
_records
=
[];
// 判断是否继承了父级文件权限
if
(
records
.
length
>
0
&&
!
records
[
0
].
rights
)
{
// debugger
records
.
map
((
item
,
index
)
=>
{
item
.
rights
=
parentRights
;
_records
.
push
(
item
);
return
_records
;
})
this
.
setState
({
loading
:
false
,
folderList
:
_records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
else
{
this
.
setState
({
loading
:
false
,
folderList
:
records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
}).
catch
((
error
)
=>
{
this
.
setState
({
loading
:
false
,
})
});
});
}
else
{
Service
.
Hades
(
FOLDERLIST_URL_MAP
[
disk
],
_params
).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
;
const
{
records
=
[],
total
=
0
}
=
result
;
let
_records
=
[];
// 判断是否继承了父级文件权限
if
(
records
.
length
>
0
&&
!
records
[
0
].
rights
)
{
// debugger
records
.
map
((
item
,
index
)
=>
{
item
.
rights
=
_parentRights
;
_records
.
push
(
item
);
return
_records
;
})
this
.
setState
({
loading
:
false
,
folderList
:
_records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
else
{
this
.
setState
({
loading
:
false
,
folderList
:
records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
}).
catch
((
error
)
=>
{
this
.
setState
({
loading
:
false
,
folderList
:
records
,
totalCount
:
Number
(
total
),
selectedFileIds
:
[],
// 删除之后需要将已经选择的文件清空
selectedFileRights
:
[]
});
}
}).
catch
((
error
)
=>
{
this
.
setState
({
loading
:
false
,
})
});
})
});
}
})
}
...
...
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