Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
9b3767a9
Commit
9b3767a9
authored
Aug 21, 2022
by
RuoYi
Browse files
优化多角色数据权限匹配规则
parent
851dc54b
Changes
21
Show whitespace changes
Inline
Side-by-side
ruoyi-ui/src/views/system/user/index.vue
View file @
9b3767a9
...
@@ -342,9 +342,8 @@
...
@@ -342,9 +342,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
resetUserPwd
,
changeUserStatus
}
from
"
@/api/system/user
"
;
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
resetUserPwd
,
changeUserStatus
,
deptTreeSelect
}
from
"
@/api/system/user
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
getToken
}
from
"
@/utils/auth
"
;
import
{
treeselect
}
from
"
@/api/system/dept
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
Treeselect
from
"
@riophae/vue-treeselect
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
...
@@ -462,7 +461,7 @@ export default {
...
@@ -462,7 +461,7 @@ export default {
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getTree
select
();
this
.
get
Dept
Tree
();
this
.
getConfigKey
(
"
sys.user.initPassword
"
).
then
(
response
=>
{
this
.
getConfigKey
(
"
sys.user.initPassword
"
).
then
(
response
=>
{
this
.
initPassword
=
response
.
msg
;
this
.
initPassword
=
response
.
msg
;
});
});
...
@@ -479,8 +478,8 @@ export default {
...
@@ -479,8 +478,8 @@ export default {
);
);
},
},
/** 查询部门下拉树结构 */
/** 查询部门下拉树结构 */
getTree
select
()
{
get
Dept
Tree
()
{
t
ree
s
elect
().
then
(
response
=>
{
deptT
ree
S
elect
().
then
(
response
=>
{
this
.
deptOptions
=
response
.
data
;
this
.
deptOptions
=
response
.
data
;
});
});
},
},
...
@@ -561,7 +560,6 @@ export default {
...
@@ -561,7 +560,6 @@ export default {
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
getTreeselect
();
getUser
().
then
(
response
=>
{
getUser
().
then
(
response
=>
{
this
.
postOptions
=
response
.
posts
;
this
.
postOptions
=
response
.
posts
;
this
.
roleOptions
=
response
.
roles
;
this
.
roleOptions
=
response
.
roles
;
...
@@ -573,7 +571,6 @@ export default {
...
@@ -573,7 +571,6 @@ export default {
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
this
.
getTreeselect
();
const
userId
=
row
.
userId
||
this
.
ids
;
const
userId
=
row
.
userId
||
this
.
ids
;
getUser
(
userId
).
then
(
response
=>
{
getUser
(
userId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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