Merge remote-tracking branch 'origin/dev_20230829_change' into dev_20230829_change

This commit is contained in:
zyn
2023-11-23 09:33:01 +08:00
@@ -70,10 +70,10 @@
<el-form-item>
<el-button size="mini" type="primary" @click="selectEdit" v-btn-permission="'786a941b255a4fe4d13b7e67f100a4e5'">
批量配置岗位
批量配置角色
</el-button>
<el-button size="mini" type="primary" @click="selectEditOfOrg" v-btn-permission="'786a941b255a4fe4d13b7e67f100a4e5'">
根据部门批量配置岗位
根据部门批量配置角色
</el-button>
</el-form-item>
</el-form>
@@ -176,8 +176,8 @@
禁用
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">
配置岗位
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置角色']">
配置角色
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -201,7 +201,7 @@
<el-form-item class="search-item" style="padding-left: 25px">
<el-input v-model="sarPost.name"
size="small"
placeholder="岗位名称查找"
placeholder="角色名称查找"
clearable></el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
@@ -270,7 +270,7 @@ export default {
nodeList: [],
modalPost: false,
sarPost: {
name: "", // 岗位名称
name: "", // 角色名称
},
filterText: '', // 树结构检索条件
defaultProps: {
@@ -290,10 +290,10 @@ export default {
Loading: false,
butionLoading: false,
id: '',
// 批量配置岗位勾选暂存
// 批量配置角色勾选暂存
manageData: [],
configOrgManage:false,
drawerTitle: '配置岗位'
drawerTitle: '配置角色'
}
},
methods: {
@@ -312,39 +312,39 @@ export default {
},
PostSubmit() {
this.butionLoading = true
if (this.drawerTitle === '配置岗位') {
this.$http.postData('sarUser/user/position', {
positionIds: this.$refs.tree2.getCheckedKeys(),
if (this.drawerTitle === '配置角色') {
this.$http.postData('sarUser/user/role', {
roleIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('配置岗位成功')
this.$message.success('配置角色成功')
this.modalPost = false
this.getData()
}
})
} else if(this.configOrgManage){
//批量配置岗位信息
this.$http.postData('sarUser/user/positionBatchByOrgId', {
positionIds: this.$refs.tree2.getCheckedKeys(),
//批量配置角色信息
this.$http.postData('sarUser/user/roleBatchByOrgId', {
roleIds: this.$refs.tree2.getCheckedKeys(),
orgId: this.id
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('批量配置岗位成功')
this.$message.success('批量配置角色成功')
this.modalPost = false
this.getData()
}
})
}else{
this.$http.postData('sarUser/user/positionBatch', {
positionIds: this.$refs.tree2.getCheckedKeys(),
this.$http.postData('sarUser/user/roleBatch', {
roleIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('配置岗位成功')
this.$message.success('配置角色成功')
this.modalPost = false
this.getData()
}
@@ -369,14 +369,14 @@ export default {
case '禁用':
this.disableFlagEdit(command[0], 1)
break
case '配置岗位':
case '配置角色':
this.postsConfigure(command[0])
break
}
},
getTree2() {
this.$http.get('sarPosition/position', {
this.$http.get('sarRole/role/allPage', {
current: this.page1,
pageSize: this.pageSize1,
...this.sarPost,
@@ -389,7 +389,7 @@ export default {
},
postsConfigure(row) {
this.configOrgManage = false
this.drawerTitle = '配置岗位'
this.drawerTitle = '配置角色'
var arr = []
this.userId = row.userId
row.positions.forEach((item) => {
@@ -558,7 +558,7 @@ export default {
this.getTree2()
},
/** 批量编辑岗位的勾选数据 */
/** 批量编辑角色的勾选数据 */
selectedData(val) {
this.manageData = val
},
@@ -571,16 +571,16 @@ export default {
this.manageData.forEach(item=>{
this.userId.push(item.userId)
})
this.drawerTitle = '批量配置岗位'
this.drawerTitle = '批量配置角色'
this.modalPost = true
}else{
this.$message.warning('请选择需要批量配置岗位的角色')
this.$message.warning('请选择需要批量配置的角色')
}
},
selectEditOfOrg() {
this.configOrgManage = true
this.getTree2()
this.drawerTitle = '批量配置岗位'
this.drawerTitle = '批量配置角色'
this.modalPost = true
},