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

页面修改

parent 008d184d
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
<div class="text-grey-6 text-caption">注意:关闭后,岗位将无法正常使用.</div> <div class="text-grey-6 text-caption">注意:关闭后,岗位将无法正常使用.</div>
</div> </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-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -39,6 +48,11 @@ ...@@ -39,6 +48,11 @@
savePostInfo savePostInfo
} }
from '../../api/system/post' from '../../api/system/post'
//角色相关
import {
queryRoleDropdown
}
from '../../api/system/index'
export default { export default {
props: { props: {
saveObj: { saveObj: {
...@@ -57,22 +71,30 @@ ...@@ -57,22 +71,30 @@
PostName: "", //岗位名称 PostName: "", //岗位名称
RB_Dept_Id: 0, //所属部门 RB_Dept_Id: 0, //所属部门
Status: 0, //状态(0-正常,1-禁用), Status: 0, //状态(0-正常,1-禁用),
PostRoleList: [], //岗位角色列表
}, },
optionTitle: "", optionTitle: "",
returnString: [], returnString: [],
//岗位树形列表 //岗位树形列表
DeptTreeList: [], DeptTreeList: [],
saveLoading: false, saveLoading: false,
PersionList: [], RoleList: [], //角色列表
} }
}, },
created() { created() {
this.getRoleList();
this.queryDeptTree(); this.queryDeptTree();
}, },
mounted() { mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//获取角色列表
getRoleList() {
queryRoleDropdown({}).then(res => {
this.RoleList = res.Data;
})
},
getChild(menuArray) { getChild(menuArray) {
var tempStr = ""; var tempStr = "";
if (menuArray && menuArray != '') { if (menuArray && menuArray != '') {
...@@ -116,7 +138,20 @@ ...@@ -116,7 +138,20 @@
}, },
//保存岗位 //保存岗位
savePost() { 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 => { savePostInfo(this.objOption).then(res => {
this.saveLoading = false this.saveLoading = false
this.$q.notify({ 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