Commit 3a386c47 authored by 黄奎's avatar 黄奎

页面修改

parent 008d184d
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment