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
2947cee2
Commit
2947cee2
authored
Dec 18, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:联调权限管理若干接口
parent
7625dfc2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
29 deletions
+52
-29
src/bu-components/ChooseMembersModal.jsx
+14
-5
src/bu-components/ChooseMembersModal.less
+9
-0
src/bu-components/ManagingMembersModal.jsx
+8
-8
src/bu-components/UploadProgressModal.jsx
+3
-3
src/common/less/icon-font.less
+6
-6
src/index.html
+3
-3
src/modules/resource-disk/components/FolderList.jsx
+3
-3
src/modules/resource-disk/components/FolderManage.jsx
+6
-1
No files found.
src/bu-components/ChooseMembersModal.jsx
View file @
2947cee2
...
...
@@ -9,6 +9,7 @@ import { Modal, Input, Table } from 'antd';
import
Service
from
'@/common/js/service'
;
// import _ from 'underscore';
import
'./ChooseMembersModal.less'
;
import
User
from
'@/common/js/user'
const
{
Search
}
=
Input
;
...
...
@@ -35,11 +36,11 @@ class ChooseMembersModal extends React.Component {
const
{
dataInfo
=
{}
}
=
this
.
props
;
const
{
folderType
,
id
}
=
dataInfo
;
const
_params
=
{
instId
:
this
.
state
.
instId
,
folderTypeEnum
:
folderType
,
id
id
,
storeId
:
User
.
getStoreId
()
}
Service
.
Hades
(
'public/
apollo
/getFileUser'
,
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
'public/
hadesStore
/getFileUser'
,
_params
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
let
_allUserList
=
[];
_allUserList
=
res
.
result
;
...
...
@@ -166,7 +167,7 @@ class ChooseMembersModal extends React.Component {
createId
,
rightsList
,
}
Service
.
Hades
(
'public/
apollo
/addFileUserAuthorityList'
,
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
'public/
hadesStore
/addFileUserAuthorityList'
,
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
'200'
)
{
this
.
handleClose
();
this
.
setState
({
...
...
@@ -241,11 +242,18 @@ class ChooseMembersModal extends React.Component {
dataIndex
:
'adminName'
,
width
:
'40%'
,
render
:
(
value
,
record
)
=>
{
const
{
adminName
=
''
}
=
record
;
const
{
adminName
=
''
,
avatar
}
=
record
;
return
(
<
div
className=
'avatar'
>
{
value
?
[<
img
className=
'avatar-img'
src=
{
avatar
}
key=
'avatar'
alt=
""
/>]
:
[<
img
className=
'avatar-img'
src=
'https://image.xiaomaiketang.com/xm/dEyxDRKwFw.png'
key=
'avatar'
alt=
""
/>]
}
<
span
className=
'userImg'
>
{
adminName
}
</
span
>
</
div
>
)
}
},{
...
...
@@ -304,6 +312,7 @@ class ChooseMembersModal extends React.Component {
// bordered={true}
size=
{
'small'
}
rowSelection=
{
{
columnWidth
:
30
,
selectedRowKeys
,
onChange
:
this
.
onChangeRow
,
getCheckboxProps
:
this
.
getCheckboxProps
,
...
...
src/bu-components/ChooseMembersModal.less
View file @
2947cee2
...
...
@@ -84,6 +84,15 @@
margin: 100px 0 !important;
}
.avatar{
.avatar-img{
height: 23px;
width: 23px;
border-radius: 50%;
margin-right: 15px;
}
}
.ant-table-tbody{
>tr >td {
border-bottom:none;
...
...
src/bu-components/ManagingMembersModal.jsx
View file @
2947cee2
...
...
@@ -10,14 +10,14 @@ import Service from '@/common/js/service';
import
ChooseMembersModal
from
'./ChooseMembersModal'
;
import
_
from
'underscore'
;
import
'./ManagingMembersModal.less'
;
import
User
from
'@/common/js/user'
class
ManagingMembersModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
dataSource
:
[],
// 数据源
addManagingMember
:
false
,
// 是否点击了添加成员
instId
:
window
.
currentUserInstInfo
.
instId
,
// 机构
Id
storeId
:
User
.
getStoreId
()
,
// 店铺
Id
iconRotateList
:
[],
userAuthority
:
[
'可编辑'
,
'可查看/下载'
,
'仅可查看'
,
''
,
'创建者'
,
'主账号'
]
,
// 空 代表删除
}
...
...
@@ -30,15 +30,15 @@ class ManagingMembersModal extends React.Component {
}
// 获取成员列表
getFileUserAuthority
=
()
=>
{
const
{
inst
Id
}
=
this
.
state
;
const
{
store
Id
}
=
this
.
state
;
const
{
dataInfo
}
=
this
.
props
;
const
{
id
}
=
dataInfo
;
const
_params
=
{
inst
Id
,
store
Id
,
id
}
Service
.
Hades
(
'public/
apollo
/getFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
'public/
hadesStore
/getFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
if
(
res
.
result
)
{
// 数据排序,文件创建者在最前,并修改文案为所有者
let
_selectUserList
=
[],
_dataSource
=
[],
flag
=
[],
_iconRotateList
=
[];
...
...
@@ -83,7 +83,7 @@ class ManagingMembersModal extends React.Component {
delete
_params
.
currentRight
;
// 此接口只返回成功与失败,没有其他数据
Service
.
Hades
(
'public/
apollo
/updateFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
'public/
hadesStore
/updateFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
this
.
getFileUserAuthority
()
message
.
success
(
res
.
message
);
})
...
...
@@ -100,7 +100,7 @@ class ManagingMembersModal extends React.Component {
content
:
'确定要移除该成员'
,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
onOk
:
()
=>
{
Service
.
Hades
(
'public/
apollo
/updateFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
Service
.
Hades
(
'public/
hadesStore
/updateFileUserAuthority'
,
_params
).
then
((
res
)
=>
{
if
(
res
.
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
this
.
getFileUserAuthority
();
...
...
@@ -146,7 +146,7 @@ class ManagingMembersModal extends React.Component {
const
{
folderType
,
id
}
=
dataInfo
;
const
updateId
=
dataSource
.
filter
(
item
=>
item
.
fileUserEnum
===
"CREATE"
)[
0
].
userId
;
const
params
=
{
instId
:
this
.
state
.
inst
Id
,
// 机构Id
storeId
:
this
.
state
.
store
Id
,
// 机构Id
id
:
id
,
// 文件ID
userId
:
record
.
userId
,
// 被修改权限用户ID
updateId
,
// 文件夹创建者ID
...
...
src/bu-components/UploadProgressModal.jsx
View file @
2947cee2
...
...
@@ -276,20 +276,20 @@ class UploadProgressModal extends React.Component {
<
span
className=
"icon iconfont"
onClick=
{
this
.
handleToggleFileList
}
>

660
;
</
span
>
>

835
;
</
span
>
</
When
>
<
Otherwise
>
<
span
className=
"icon iconfont"
style=
{
{
transform
:
'rotate(180deg)'
}
}
onClick=
{
this
.
handleToggleFileList
}
>

660
;
</
span
>
>

835
;
</
span
>
</
Otherwise
>
</
Choose
>
<
span
className=
"icon iconfont"
onClick=
{
this
.
handleCancelAllUpload
}
>

6e
f;
</
span
>
>

82
f;
</
span
>
</
div
>
</
div
>
{
...
...
src/common/less/icon-font.less
View file @
2947cee2
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.eot');
src: url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.svg#iconfont') format('svg');
src: url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.eot');
src: url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
...
...
src/index.html
View file @
2947cee2
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-1
7 19:17:39
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-1
8 11:26:06
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
...
...
@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
0r4evvgermkp
.css"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
66rskwvxbny
.css"
>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
src/modules/resource-disk/components/FolderList.jsx
View file @
2947cee2
...
...
@@ -564,7 +564,7 @@ class FolderList extends React.Component {
const
menu
=
(
<
Menu
>
{
rights
===
"EDIT"
&&
rights
===
"EDIT"
&&
!
record
.
parentId
&&
[
<
Menu
.
Item
key=
"administration"
>
<
span
onClick=
{
()
=>
this
.
handleShowManagingModal
(
record
)
}
>
权限管理
</
span
>
...
...
@@ -630,10 +630,10 @@ class FolderList extends React.Component {
columns=
{
this
.
parseColumns
()
}
dataSource=
{
folderList
}
rowSelection=
{
hasManagementAuthority
?
{
{
selectedRowKeys
:
selectedFileIds
,
onChange
:
this
.
props
.
onChangeRow
}
:
null
}
}
pagination=
{
false
}
onChange=
{
this
.
handleChangeTable
}
...
...
src/modules/resource-disk/components/FolderManage.jsx
View file @
2947cee2
...
...
@@ -129,7 +129,12 @@ class FolderManage extends React.Component {
selectedFileRights
:
[]
});
}
});
}).
catch
((
error
)
=>
{
console
.
log
(
"error-----"
,
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