add:机构管理增加根据部门批量配置岗位功能

This commit is contained in:
zyd
2022-08-30 23:59:46 +08:00
parent e31fdacb4c
commit 806dd53e32
@@ -72,6 +72,9 @@
<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>
</div>
@@ -186,7 +189,6 @@
<loading :loading="Loading">加载中...</loading>
<pagination :page="page" :total="total" :pageSize="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
<el-drawer
class="postPage"
:title="drawerTitle"
@@ -236,12 +238,14 @@
class="common-button-primary"
icon="el-icon-check"
type="primary"
:loading="butionLoading"
@click="PostSubmit"
>确定
</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetFormPost">取消</el-button>
</div>
</el-drawer>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
</div>
</template>
@@ -284,9 +288,11 @@ export default {
data: [], // table数据
treeLoading: false,
Loading: false,
butionLoading: false,
id: '',
// 批量配置岗位勾选暂存
manageData: [],
configOrgManage:false,
drawerTitle: '配置岗位'
}
},
@@ -301,26 +307,43 @@ export default {
},
resetFormPost() {
this.modalPost = false
this.postList = []
this.page1 = 1
},
PostSubmit() {
this.butionLoading = true
if (this.drawerTitle === '配置岗位') {
this.$http.postData('sarUser/user/position', {
positionIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('配置岗位成功')
this.modalPost = false
this.getData()
}
})
} else {
} else if(this.configOrgManage){
//批量配置岗位信息
this.$http.postData('sarUser/user/positionBatchByOrgId', {
positionIds: this.$refs.tree2.getCheckedKeys(),
orgId: this.id
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('批量配置岗位成功')
this.modalPost = false
this.getData()
}
})
}else{
this.$http.postData('sarUser/user/positionBatch', {
positionIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.butionLoading = false
this.$message.success('配置岗位成功')
this.modalPost = false
this.getData()
@@ -539,6 +562,7 @@ export default {
},
selectEdit() {
this.configOrgManage = false
this.getTree2()
if(this.manageData.length){
this.userId = []
@@ -551,6 +575,13 @@ export default {
this.$message.warning('请选择需要批量配置岗位的角色')
}
},
selectEditOfOrg() {
this.configOrgManage = true
this.getTree2()
this.drawerTitle = '批量配置岗位'
this.modalPost = true
},
},
computed: {},
watch: {