Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
f88fc16d
Commit
f88fc16d
authored
Jan 04, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复权限无下级情况, 小区公告图片
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
d84c7021
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
68 deletions
+27
-68
AvatarDropdown.tsx
src/components/GlobalHeader/AvatarDropdown.tsx
+0
-2
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+7
-1
CommunityAnnouncement.ts
src/models/CommunityManagement/CommunityAnnouncement.ts
+1
-3
AccountDetail.tsx
src/pages/AccountManagement/account/AccountDetail.tsx
+8
-29
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+8
-28
Add.tsx
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
+2
-4
Template.tsx
src/pages/runTest/Template.tsx
+1
-1
No files found.
src/components/GlobalHeader/AvatarDropdown.tsx
View file @
f88fc16d
...
...
@@ -40,8 +40,6 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
},
}
=
this
.
props
;
console
.
log
(
currentUser
);
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
this
.
onMenuClick
}
>
<
Menu
.
Item
key=
"logout"
>
...
...
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
f88fc16d
...
...
@@ -16,7 +16,7 @@ function getBase64(file: File) {
import
{
getUrlPicName
}
from
'../../utils/string'
;
const
PictureOptionsRow
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
,
limitNums
}
=
props
;
const
{
value
,
onChange
,
limitNums
,
imgs
}
=
props
;
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
);
...
...
@@ -54,6 +54,12 @@ const PictureOptionsRow = (props: any) => {
}
},
[
value
]);
useEffect
(()
=>
{
if
(
imgs
!=
null
)
{
setFileList
(
imgs
);
}
},
[
imgs
]);
// 加载logo
const
uploadButton
=
(
<
div
>
...
...
src/models/CommunityManagement/CommunityAnnouncement.ts
View file @
f88fc16d
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 202
0-11-26 16:33:11
* @LastEditTime: 202
1-01-04 13:53:50
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\CommunityAnnouncement.ts
...
...
@@ -32,7 +32,6 @@ export default {
return
{
...
state
,
Result
};
},
returnDataSave
(
state
,
{
playload
})
{
console
.
log
(
playload
);
let
DataSave
=
playload
.
DataSave
;
return
{
...
state
,
DataSave
};
},
...
...
@@ -50,7 +49,6 @@ export default {
//标准请求
*
RA
({
playload
},
{
call
,
put
})
{
const
resp
=
yield
call
(
service
.
RA
,
playload
);
console
.
log
(
resp
);
if
(
resp
.
error_code
!=
'0000'
)
{
printf
(
playload
,
resp
);
...
...
src/pages/AccountManagement/account/AccountDetail.tsx
View file @
f88fc16d
...
...
@@ -84,21 +84,8 @@ const Account = (props: any) => {
// 已选权限
useEffect
(()
=>
{
if
(
Permission
!=
null
)
{
// 当前权限
let
newPer
=
eval
(
'('
+
Permission
.
curUserPermission
+
')'
);
// 上级或者下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
data
:
any
=
[];
// 当前权限-- 字符串
let
dataTow
:
any
=
[];
// 上级或者下级权限 (可编辑权限)-- 字符串
// 转字符串
for
(
let
i
in
newPer
)
{
data
[
i
]
=
newPer
[
i
]
+
''
;
}
for
(
let
i
in
newPerTow
)
{
dataTow
[
i
]
=
newPerTow
[
i
]
+
''
;
}
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
let
dataTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
// 深拷贝权限列表
let
treeDatas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
// 如果是三级账户 可编辑的就是 上级权限,否者是登录的账户权限
...
...
@@ -218,12 +205,7 @@ const Account = (props: any) => {
//新旧权限比对
let
subPermissionArray
=
[];
if
(
values
==
2
)
{
let
newPer
=
eval
(
'('
+
Permission
.
curUserPermission
+
')'
);
let
data
:
any
=
[];
// 当前权限-- 字符串
// 转字符串
for
(
let
i
in
newPer
)
{
data
[
i
]
=
newPer
[
i
]
+
''
;
}
let
data
=
Permission
.
curUserPermission
.
split
(
','
);
let
Deleted
=
compare
(
data
,
newData
);
// 当前删除的权限有哪些
subPermissionArray
=
compares
(
Deleted
);
// 当前删除的三级权限有哪些
}
...
...
@@ -268,12 +250,8 @@ const Account = (props: any) => {
// 看看是不是动了三级权限的东西
function
compares
(
afterArr
:
any
)
{
// 下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
dataTow
:
any
=
[];
// 上级或者下级权限 (可编辑权限)-- 字符串
let
dataTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
let
del
=
[];
for
(
let
i
in
newPerTow
)
{
dataTow
[
i
]
=
newPerTow
[
i
]
+
''
;
}
for
(
let
i
of
afterArr
)
{
if
(
dataTow
.
indexOf
(
i
)
!==
-
1
)
{
del
.
push
(
i
);
...
...
@@ -300,7 +278,8 @@ const Account = (props: any) => {
let
checkers
=
(
arr
:
any
,
target
:
any
)
=>
target
.
every
((
v
:
any
)
=>
arr
.
includes
(
v
));
// 上级或者下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
newPerTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
// 列表权限
let
treeDatas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
// 列表的二级权限
...
...
@@ -309,8 +288,8 @@ const Account = (props: any) => {
let
dataTow
:
any
=
[];
for
(
let
i
in
newPerTow
)
{
// 如果不是二级就添加进去
if
(
TowLev
.
indexOf
(
newPerTow
[
i
]
+
''
)
==
-
1
)
{
dataTow
.
push
(
newPerTow
[
i
]
+
''
);
if
(
TowLev
.
indexOf
(
newPerTow
[
i
])
==
-
1
)
{
dataTow
.
push
(
newPerTow
[
i
]);
}
}
// true 就是没有勾选到三级 false 就是勾选到三级了
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
f88fc16d
...
...
@@ -79,20 +79,8 @@ const Account = (props: any) => {
// 已选权限
useEffect
(()
=>
{
if
(
Permission
!=
null
)
{
// 当前权限
let
newPer
=
eval
(
'('
+
Permission
.
curUserPermission
+
')'
);
// 上级或者下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
data
:
any
=
[];
// 当前权限-- 字符串
let
dataTow
:
any
=
[];
// 上级或者下级权限 (可编辑权限)-- 字符串
// 转字符串
for
(
let
i
in
newPer
)
{
data
[
i
]
=
newPer
[
i
]
+
''
;
}
for
(
let
i
in
newPerTow
)
{
dataTow
[
i
]
=
newPerTow
[
i
]
+
''
;
}
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
let
dataTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
// 深拷贝权限列表
let
treeDatas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
...
...
@@ -213,12 +201,7 @@ const Account = (props: any) => {
//新旧权限比对
let
subPermissionArray
=
[];
if
(
values
==
2
)
{
let
newPer
=
eval
(
'('
+
Permission
.
curUserPermission
+
')'
);
let
data
:
any
=
[];
// 当前权限-- 字符串
// 转字符串
for
(
let
i
in
newPer
)
{
data
[
i
]
=
newPer
[
i
]
+
''
;
}
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
''
;
let
Deleted
=
compare
(
data
,
newData
);
// 当前删除的权限有哪些
subPermissionArray
=
compares
(
Deleted
);
// 当前删除的三级权限有哪些
}
...
...
@@ -263,12 +246,8 @@ const Account = (props: any) => {
// 看看是不是动了三级权限的东西
function
compares
(
afterArr
:
any
)
{
// 下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
dataTow
:
any
=
[];
// 上级或者下级权限 (可编辑权限)-- 字符串
let
dataTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
let
del
=
[];
for
(
let
i
in
newPerTow
)
{
dataTow
[
i
]
=
newPerTow
[
i
]
+
''
;
}
for
(
let
i
of
afterArr
)
{
if
(
dataTow
.
indexOf
(
i
)
!==
-
1
)
{
del
.
push
(
i
);
...
...
@@ -295,7 +274,8 @@ const Account = (props: any) => {
let
checkers
=
(
arr
:
any
,
target
:
any
)
=>
target
.
every
((
v
:
any
)
=>
arr
.
includes
(
v
));
// 上级或者下级权限
let
newPerTow
=
eval
(
'('
+
Permission
.
beloginPermission
+
')'
);
let
newPerTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
// 列表权限
let
treeDatas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
// 列表的二级权限
...
...
@@ -304,8 +284,8 @@ const Account = (props: any) => {
let
dataTow
:
any
=
[];
for
(
let
i
in
newPerTow
)
{
// 如果不是二级就添加进去
if
(
TowLev
.
indexOf
(
newPerTow
[
i
]
+
''
)
==
-
1
)
{
dataTow
.
push
(
newPerTow
[
i
]
+
''
);
if
(
TowLev
.
indexOf
(
newPerTow
[
i
])
==
-
1
)
{
dataTow
.
push
(
newPerTow
[
i
]);
}
}
// true 就是没有勾选到三级 false 就是勾选到三级了
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
f88fc16d
...
...
@@ -12,7 +12,6 @@ import TextArea from 'antd/lib/input/TextArea';
import
SelectCommunity
from
'@/components/SelectCommunity'
;
import
'./ann.less'
;
import
{
Notice
}
from
'@/utils/tip'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
moment
from
'moment'
;
import
{
randomString
}
from
'@/utils/string'
;
...
...
@@ -64,7 +63,7 @@ const Add = (props: any) => {
// 监听图片状态 ImgSrc
useEffect
(()
=>
{
if
(
ImgSrc
!=
null
)
{
if
(
ImgSrc
)
{
let
a
=
ImgSrc
.
map
((
item
:
any
)
=>
{
let
key
=
Object
.
keys
(
item
)[
0
];
return
{
...
...
@@ -74,7 +73,6 @@ const Add = (props: any) => {
url
:
item
[
key
],
};
});
// 图片列表
setImageSrc
(
a
);
}
...
...
@@ -200,7 +198,7 @@ const Add = (props: any) => {
imageType
:
'tosNotice'
,
}
}
limitNums=
{
5
}
defaultValue
=
{
ImageSrc
}
imgs
=
{
ImageSrc
}
/>
</
Form
.
Item
>
<
Form
.
Item
...
...
src/pages/runTest/Template.tsx
View file @
f88fc16d
...
...
@@ -22,7 +22,7 @@ const Guard = (props: any) => {
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
'Version 1.5.
6
'
}
/>
<
TitleGet
title=
{
'Version 1.5.
7
'
}
/>
{
/* <p>
token:{page.token}
name:{getCookie('name')}
...
...
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