Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
3a386c47
Commit
3a386c47
authored
Nov 25, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
008d184d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
2 deletions
+37
-2
post-form.vue
src/components/system/post-form.vue
+37
-2
No files found.
src/components/system/post-form.vue
View file @
3a386c47
...
...
@@ -18,6 +18,15 @@
<div
class=
"text-grey-6 text-caption"
>
注意:关闭后,岗位将无法正常使用.
</div>
</div>
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
绑定角色
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(item,index) in RoleList"
>
<div>
<span>
{{
item
.
RoleName
}}
</span>
<q-checkbox
v-model=
"item.IsChecked"
/>
</div>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
...
@@ -39,6 +48,11 @@
savePostInfo
}
from
'../../api/system/post'
//角色相关
import
{
queryRoleDropdown
}
from
'../../api/system/index'
export
default
{
props
:
{
saveObj
:
{
...
...
@@ -57,22 +71,30 @@
PostName
:
""
,
//岗位名称
RB_Dept_Id
:
0
,
//所属部门
Status
:
0
,
//状态(0-正常,1-禁用),
PostRoleList
:
[],
//岗位角色列表
},
optionTitle
:
""
,
returnString
:
[],
//岗位树形列表
DeptTreeList
:
[],
saveLoading
:
false
,
PersionList
:
[],
RoleList
:
[],
//角色列表
}
},
created
()
{
this
.
getRoleList
();
this
.
queryDeptTree
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
//获取角色列表
getRoleList
()
{
queryRoleDropdown
({}).
then
(
res
=>
{
this
.
RoleList
=
res
.
Data
;
})
},
getChild
(
menuArray
)
{
var
tempStr
=
""
;
if
(
menuArray
&&
menuArray
!=
''
)
{
...
...
@@ -116,7 +138,20 @@
},
//保存岗位
savePost
()
{
this
.
saveLoading
=
true
var
tempRole
=
[];
if
(
this
.
RoleList
&&
this
.
RoleList
.
length
>
0
)
{
this
.
RoleList
.
forEach
(
item
=>
{
if
(
item
.
IsChecked
)
{
tempRole
.
push
({
Id
:
0
,
PostId
:
0
,
RoleId
:
item
.
RoleId
});
}
})
}
this
.
objOption
.
PostRoleList
=
tempRole
;
this
.
saveLoading
=
true
;
savePostInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
...
...
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