Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Guten-PigxUI
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
JIRA
JIRA
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
黄卓然
Guten-PigxUI
Commits
e568edb8
Commit
e568edb8
authored
Nov 20, 2018
by
冷冷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
Fixing a bug. api change
parent
57ab08c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
dept.js
src/api/dept.js
+8
-0
role.js
src/api/role.js
+0
-8
index.vue
src/views/admin/user/index.vue
+5
-4
No files found.
src/api/dept.js
View file @
e568edb8
...
...
@@ -17,6 +17,14 @@
import
request
from
'@/router/axios'
export
function
fetchDeptTree
(
query
)
{
return
request
({
url
:
'/admin/dept/user-tree'
,
method
:
'get'
,
params
:
query
})
}
export
function
fetchTree
(
query
)
{
return
request
({
url
:
'/admin/dept/tree'
,
...
...
src/api/role.js
View file @
e568edb8
...
...
@@ -86,11 +86,3 @@ export function fetchRoleTree(roleName) {
method
:
'get'
})
}
export
function
fetchDeptTree
(
query
)
{
return
request
({
url
:
'/admin/dept/tree'
,
method
:
'get'
,
params
:
query
})
}
src/views/admin/user/index.vue
View file @
e568edb8
...
...
@@ -111,7 +111,8 @@
<
script
>
import
{
fetchList
,
getObj
,
addObj
,
putObj
,
delObj
}
from
"@/api/user"
;
import
{
deptRoleList
,
fetchDeptTree
}
from
"@/api/role"
;
import
{
deptRoleList
}
from
"@/api/role"
;
import
{
fetchDeptTree
}
from
"@/api/dept"
;
import
{
tableOption
}
from
'@/const/crud/user'
;
import
{
mapGetters
}
from
"vuex"
;
import
{
constants
}
from
'fs'
;
...
...
@@ -228,7 +229,7 @@ export default {
this
.
role
[
i
]
=
this
.
form
.
roleList
[
i
].
roleId
;
}
deptRoleList
().
then
(
response
=>
{
this
.
rolesOptions
=
response
.
data
;
this
.
rolesOptions
=
response
.
data
.
data
;
});
}
else
if
(
type
===
'add'
)
{
this
.
role
=
[];
...
...
@@ -241,7 +242,7 @@ export default {
},
create
(
row
,
done
,
loading
)
{
addObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
();
this
.
getList
(
this
.
page
);
done
();
this
.
$notify
({
title
:
"成功"
,
...
...
@@ -255,7 +256,7 @@ export default {
},
update
(
row
,
index
,
done
,
loading
)
{
putObj
(
this
.
form
).
then
(()
=>
{
this
.
getList
();
this
.
getList
(
this
.
page
);
done
();
this
.
$notify
({
title
:
"成功"
,
...
...
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