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
58c7aac0
Commit
58c7aac0
authored
Dec 28, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
00b9f6eb
4d8c9fc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
index.jsx
src/components/TagSelect/index.jsx
+32
-7
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+4
-0
No files found.
src/components/TagSelect/index.jsx
View file @
58c7aac0
...
...
@@ -9,6 +9,7 @@ class TagSelect extends React.Component {
inputValue
:
''
,
editInputIndex
:
-
1
,
editInputValue
:
''
,
permissionArr
:
[],
};
// componentDidUpdate(value) {
...
...
@@ -17,17 +18,24 @@ class TagSelect extends React.Component {
// console.log(value);
// }
// componentDidMount(value) {
// console.log('--组件加载完成--');
// console.log(this.state.value);
// console.log(value);
// }
componentDidMount
()
{
// console.log('--组件加载完成--');
// console.log(this.state.value);
// console.log(value);
this
.
setState
({
permissionArr
:
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
),
});
}
componentWillReceiveProps
(
value
)
{
this
.
setState
({
value
:
value
.
value
});
}
handleClose
=
(
removedTag
,
e
)
=>
{
if
(
this
.
state
.
permissionArr
.
indexOf
(
'70'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
console
.
log
(
removedTag
,
e
);
const
that
=
this
;
confirm
({
...
...
@@ -47,6 +55,10 @@ class TagSelect extends React.Component {
};
showInput
=
()
=>
{
if
(
this
.
state
.
permissionArr
.
indexOf
(
'69'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
this
.
setState
({
inputVisible
:
true
},
()
=>
this
.
input
.
focus
());
};
...
...
@@ -103,7 +115,15 @@ class TagSelect extends React.Component {
};
render
()
{
const
{
value
,
inputVisible
,
inputValue
,
editInputIndex
,
editInputValue
,
visible
}
=
this
.
state
;
const
{
value
,
inputVisible
,
inputValue
,
editInputIndex
,
editInputValue
,
visible
,
permissionArr
,
}
=
this
.
state
;
return
(
<>
{
value
.
map
((
tag
,
index
)
=>
{
...
...
@@ -136,6 +156,11 @@ class TagSelect extends React.Component {
>
<
span
onDoubleClick=
{
(
e
)
=>
{
if
(
permissionArr
.
indexOf
(
'68'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
if
(
index
!==
0
&&
index
!==
1
)
{
this
.
setState
({
editInputIndex
:
index
,
editInputValue
:
tag
},
()
=>
{
this
.
editInput
.
focus
();
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
58c7aac0
...
...
@@ -88,6 +88,10 @@ const ServiceProviderManagement = (props: propsType) => {
};
const
goToServices
=
()
=>
{
if
(
permissionArr
.
indexOf
(
'67'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
history
.
push
(
location
.
pathname
+
'/Services'
);
};
...
...
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