Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
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
youjj
cloud-platform-ui
Commits
4d3f3d9f
Commit
4d3f3d9f
authored
May 10, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户修改表单bug
parent
63241234
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
index.js
src/api/admin/group/index.js
+11
-0
index.vue
src/views/admin/user/index.vue
+31
-1
No files found.
src/api/admin/group/index.js
View file @
4d3f3d9f
...
@@ -112,4 +112,15 @@ export function getCurrentGroups() {
...
@@ -112,4 +112,15 @@ export function getCurrentGroups() {
});
});
}
}
/**
*
* @param id
*/
export
function
getUserGroups
(
id
)
{
return
fetch
({
url
:
'/api/admin/user/'
+
id
+
'/group'
,
method
:
'get'
});
}
src/views/admin/user/index.vue
View file @
4d3f3d9f
...
@@ -115,7 +115,7 @@ import {
...
@@ -115,7 +115,7 @@ import {
import
{
import
{
fetchTree
,
fetchTree
,
get
Current
Groups
get
User
Groups
}
from
'api/admin/group/index'
;
}
from
'api/admin/group/index'
;
export
default
{
export
default
{
...
@@ -282,9 +282,38 @@ export default {
...
@@ -282,9 +282,38 @@ export default {
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
},
},
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
resetTemp
();
getObj
(
row
.
id
)
getObj
(
row
.
id
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
let
dataLimit
=
new
Array
();
if
(
response
.
data
.
dataCompany
!=
undefined
)
{
let
companys
=
response
.
data
.
dataCompany
.
split
(
","
);
if
(
companys
.
includes
(
response
.
data
.
zoneId
))
{
dataLimit
.
push
(
"1"
);
}
}
if
(
response
.
data
.
dataZone
!=
undefined
)
{
let
zones
=
response
.
data
.
dataZone
.
split
(
","
);
if
(
zones
.
includes
(
response
.
data
.
zoneId
))
{
dataLimit
.
push
(
"2"
);
}
}
if
(
response
.
data
.
dataAll
!=
undefined
)
{
dataLimit
.
push
(
"3"
);
}
this
.
form
.
dataLimit
=
dataLimit
;
getUserGroups
(
response
.
data
.
id
).
then
(
result
=>
{
this
.
myGroups
=
result
.
data
;
let
mems
=
[];
for
(
let
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
mems
.
push
(
result
.
data
[
i
].
id
);
}
this
.
form
.
members
=
mems
;
});
this
.
dialogFormVisible
=
true
;
this
.
dialogFormVisible
=
true
;
this
.
dialogStatus
=
'update'
;
this
.
dialogStatus
=
'update'
;
});
});
...
@@ -355,6 +384,7 @@ export default {
...
@@ -355,6 +384,7 @@ export default {
});
});
},
},
resetTemp
()
{
resetTemp
()
{
console
.
log
(
"12"
);
this
.
form
=
{
this
.
form
=
{
username
:
undefined
,
username
:
undefined
,
name
:
undefined
,
name
:
undefined
,
...
...
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