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
1073fb5c
Commit
1073fb5c
authored
Dec 25, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限修复
parent
de1f7a8b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
18 deletions
+95
-18
Card.tsx
src/pages/CommercialService/Card.tsx
+5
-1
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+6
-0
Detail.tsx
src/pages/CommercialService/Detail.tsx
+30
-1
PropertyServices.tsx
src/pages/CommercialService/PropertyServices.tsx
+28
-3
Renovation.tsx
src/pages/CommercialService/Renovation.tsx
+2
-2
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+6
-0
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+1
-1
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+6
-4
Guard.tsx
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
+8
-3
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+3
-3
No files found.
src/pages/CommercialService/Card.tsx
View file @
1073fb5c
...
@@ -112,7 +112,7 @@ const Card = (props: any) => {
...
@@ -112,7 +112,7 @@ const Card = (props: any) => {
},
[
Data7
]);
},
[
Data7
]);
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'
12
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'
30
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
@@ -120,6 +120,10 @@ const Card = (props: any) => {
...
@@ -120,6 +120,10 @@ const Card = (props: any) => {
};
};
const
goToAdd
=
()
=>
{
const
goToAdd
=
()
=>
{
if
(
permissionArr
.
indexOf
(
'32'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
history
.
push
(
'./AccessCardApplication/Add'
);
history
.
push
(
'./AccessCardApplication/Add'
);
};
};
...
...
src/pages/CommercialService/CardDetail.tsx
View file @
1073fb5c
...
@@ -51,6 +51,12 @@ const CardDetail = (props: any) => {
...
@@ -51,6 +51,12 @@ const CardDetail = (props: any) => {
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'31'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
if
(
values
.
applyStatus
===
'2'
&&
!
values
.
replyContent
)
{
if
(
values
.
applyStatus
===
'2'
&&
!
values
.
replyContent
)
{
message
.
error
(
'Replies must be filled in!'
,
3
);
message
.
error
(
'Replies must be filled in!'
,
3
);
return
;
return
;
...
...
src/pages/CommercialService/Detail.tsx
View file @
1073fb5c
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./css/Detail.less'
;
import
styles
from
'./css/Detail.less'
;
import
{
Form
,
Row
,
Col
,
Spin
,
Button
,
Descriptions
}
from
'antd'
;
import
{
Form
,
Row
,
Col
,
Spin
,
Button
,
Descriptions
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
...
@@ -76,6 +76,35 @@ const Detail = (props: any) => {
...
@@ -76,6 +76,35 @@ const Detail = (props: any) => {
},
[
CurDataDetail
]);
},
[
CurDataDetail
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
location
.
query
.
serviceType
===
'1'
)
{
if
(
permissionArr
.
indexOf
(
'19'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
location
.
query
.
serviceType
===
'2'
)
{
if
(
permissionArr
.
indexOf
(
'38'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
location
.
query
.
serviceType
===
'3'
)
{
if
(
permissionArr
.
indexOf
(
'22'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
location
.
query
.
serviceType
===
'4'
)
{
if
(
permissionArr
.
indexOf
(
'35'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
location
.
query
.
serviceType
===
'5'
)
{
if
(
permissionArr
.
indexOf
(
'25'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
var
val
=
values
;
var
val
=
values
;
val
.
handleName
=
getCookie
(
'name'
);
val
.
handleName
=
getCookie
(
'name'
);
val
.
handleContacts
=
getCookie
(
'phone'
);
val
.
handleContacts
=
getCookie
(
'phone'
);
...
...
src/pages/CommercialService/PropertyServices.tsx
View file @
1073fb5c
...
@@ -86,10 +86,35 @@ const PropertyServices = (props: any) => {
...
@@ -86,10 +86,35 @@ const PropertyServices = (props: any) => {
];
];
const
goToDetail
=
(
value
:
any
,
record
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
value
:
any
,
record
:
any
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'12'
)
<
0
)
{
console
.
log
(
serviceTypeGobal
);
if
(
serviceTypeGobal
===
'1'
)
{
if
(
permissionArr
.
indexOf
(
'18'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
serviceTypeGobal
===
'2'
)
{
if
(
permissionArr
.
indexOf
(
'37'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
}
else
if
(
serviceTypeGobal
===
'3'
)
{
if
(
permissionArr
.
indexOf
(
'21'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
serviceTypeGobal
===
'4'
)
{
if
(
permissionArr
.
indexOf
(
'34'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
else
if
(
serviceTypeGobal
===
'5'
)
{
if
(
permissionArr
.
indexOf
(
'24'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
}
//页面递进
//页面递进
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
...
...
src/pages/CommercialService/Renovation.tsx
View file @
1073fb5c
...
@@ -5,7 +5,7 @@ import { connect, history } from 'umi';
...
@@ -5,7 +5,7 @@ import { connect, history } from 'umi';
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
{
RA
,
SA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
objectColumns
,
stringTab
}
from
'@/utils/string'
;
import
{
objectColumns
,
stringTab
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
...
@@ -102,7 +102,7 @@ const Renovation = (props: any) => {
...
@@ -102,7 +102,7 @@ const Renovation = (props: any) => {
};
};
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'
12
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'
27
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
...
src/pages/CommercialService/RenovationDetail.tsx
View file @
1073fb5c
...
@@ -46,6 +46,12 @@ const RenovationDetail = (props: any) => {
...
@@ -46,6 +46,12 @@ const RenovationDetail = (props: any) => {
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'28'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
if
(
if
(
values
.
decorationStatus
===
'2'
&&
values
.
decorationStatus
===
'2'
&&
(
values
.
replyView
==
undefined
||
values
.
replyView
.
trim
()
===
''
)
(
values
.
replyView
==
undefined
||
values
.
replyView
.
trim
()
===
''
)
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
1073fb5c
...
@@ -45,7 +45,7 @@ const ChargeManager = (props: any) => {
...
@@ -45,7 +45,7 @@ const ChargeManager = (props: any) => {
// 详情页
// 详情页
const
goToDetail
=
(
values
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'1
0
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'1
6
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
...
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
1073fb5c
...
@@ -16,7 +16,7 @@ const Detail = (props: any) => {
...
@@ -16,7 +16,7 @@ const Detail = (props: any) => {
const
status
=
[
'Normal'
,
'Cancelled'
];
const
status
=
[
'Normal'
,
'Cancelled'
];
const
[
loading
,
setLoding
]
=
useState
(
false
);
const
[
loading
,
setLoding
]
=
useState
(
false
);
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
const
TosSecurityGuarderGet
=
(
values
:
any
)
=>
{
const
TosSecurityGuarderGet
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosSecurityGuarderGet'
,
playload
:
values
});
dispatch
({
type
:
'ServiceProvider/TosSecurityGuarderGet'
,
playload
:
values
});
};
};
...
@@ -45,6 +45,10 @@ const Detail = (props: any) => {
...
@@ -45,6 +45,10 @@ const Detail = (props: any) => {
// 保安详情页
// 保安详情页
const
goToGuard
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToGuard
=
(
values
:
any
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'13'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
GuarderById
(
values
);
GuarderById
(
values
);
history
.
push
(
location
.
pathname
+
'/Guard?saferName='
+
values
.
saferName
);
history
.
push
(
location
.
pathname
+
'/Guard?saferName='
+
values
.
saferName
);
};
};
...
@@ -77,8 +81,7 @@ const Detail = (props: any) => {
...
@@ -77,8 +81,7 @@ const Detail = (props: any) => {
// 注销
// 注销
const
handleClick
=
(
id
:
string
)
=>
{
const
handleClick
=
(
id
:
string
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'12'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'9'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
@@ -104,7 +107,6 @@ const Detail = (props: any) => {
...
@@ -104,7 +107,6 @@ const Detail = (props: any) => {
setLoding
(
false
);
setLoding
(
false
);
if
(
Result
)
{
if
(
Result
)
{
message
.
success
(
'Logout successful!'
);
message
.
success
(
'Logout successful!'
);
console
.
log
(
'跳转页面'
);
history
.
goBack
();
history
.
goBack
();
}
else
{
}
else
{
message
.
error
(
'Logout failed. Please try again!'
,
3
);
message
.
error
(
'Logout failed. Please try again!'
,
3
);
...
...
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
View file @
1073fb5c
import
React
,
{
use
State
,
use
Effect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
styles
from
'./Guard.less'
;
import
styles
from
'./Guard.less'
;
import
{
Modal
,
Button
}
from
'antd'
;
import
{
Modal
,
Button
,
message
}
from
'antd'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
const
{
confirm
}
=
Modal
;
const
{
confirm
}
=
Modal
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
Line
from
'../../../components/Line/Line'
;
import
Line
from
'../../../components/Line/Line'
;
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
BackButton
from
'../../../components/BackButton/BackButton'
;
...
@@ -23,6 +23,11 @@ const Guard = (props: any) => {
...
@@ -23,6 +23,11 @@ const Guard = (props: any) => {
// 删除保安
// 删除保安
const
handleClickBtn
=
(
id
:
string
)
=>
{
const
handleClickBtn
=
(
id
:
string
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
if
(
permissionArr
.
indexOf
(
'14'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
confirm
({
confirm
({
title
:
'Do you Want to delete these items?'
,
title
:
'Do you Want to delete these items?'
,
icon
:
<
ExclamationCircleOutlined
/>,
icon
:
<
ExclamationCircleOutlined
/>,
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
1073fb5c
...
@@ -55,7 +55,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -55,7 +55,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
};
const
goToDetail
=
(
values
:
valuesType
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
valuesType
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'
6
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'
9
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
@@ -70,7 +70,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -70,7 +70,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
};
const
goToEdit
=
(
values
:
object
,
e
:
any
)
=>
{
const
goToEdit
=
(
values
:
object
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'
7
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'
10
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
@@ -79,7 +79,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -79,7 +79,7 @@ const ServiceProviderManagement = (props: propsType) => {
};
};
const
goToCreate
=
()
=>
{
const
goToCreate
=
()
=>
{
if
(
permissionArr
.
indexOf
(
'
8
'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'
11
'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
}
}
...
...
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