|
@@ -12,7 +12,7 @@
|
|
<template v-for="node in checkNode">
|
|
<template v-for="node in checkNode">
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
v-if="node.id!=-1"
|
|
v-if="node.id!=-1"
|
|
- :key="node.id"
|
|
|
|
|
|
+ :key="node.id+'dept'"
|
|
:label="node.name"
|
|
:label="node.name"
|
|
:name="node.id.toString()"
|
|
:name="node.id.toString()"
|
|
v-loading="loading.childrenActive"
|
|
v-loading="loading.childrenActive"
|
|
@@ -27,7 +27,7 @@
|
|
<div v-if="!childrenActive || childrenNode.length==0" class="tips">空空哒哟~</div>
|
|
<div v-if="!childrenActive || childrenNode.length==0" class="tips">空空哒哟~</div>
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
v-for="children in childrenNode"
|
|
v-for="children in childrenNode"
|
|
- :key="children.id"
|
|
|
|
|
|
+ :key="children.id+'job'"
|
|
:label="children.name"
|
|
:label="children.name"
|
|
:name="children.id.toString()"
|
|
:name="children.id.toString()"
|
|
>
|
|
>
|
|
@@ -53,6 +53,7 @@
|
|
<!-- 用户管理 -->
|
|
<!-- 用户管理 -->
|
|
<el-dialog title="用户管理" :visible.sync="visible.dialog" width="650px">
|
|
<el-dialog title="用户管理" :visible.sync="visible.dialog" width="650px">
|
|
<transfer
|
|
<transfer
|
|
|
|
+ @change-visible="changeJobUsers"
|
|
:jobName="jobs.activeTabName"
|
|
:jobName="jobs.activeTabName"
|
|
:users="userTableData"
|
|
:users="userTableData"
|
|
:visible="visible.dialog"
|
|
:visible="visible.dialog"
|
|
@@ -67,7 +68,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { addJob, getJob, delJob } from "@/Api/jobs";
|
|
import { addJob, getJob, delJob } from "@/Api/jobs";
|
|
-import { getUsers } from "@/Api/user";
|
|
|
|
|
|
+import { getUsers,changeJobUsers } from "@/Api/user";
|
|
export default {
|
|
export default {
|
|
name: "home",
|
|
name: "home",
|
|
components: {
|
|
components: {
|
|
@@ -228,6 +229,7 @@ export default {
|
|
},
|
|
},
|
|
//初始化用户详情,岗位空则查询全部
|
|
//初始化用户详情,岗位空则查询全部
|
|
async initUserDetail(job_id = undefined) {
|
|
async initUserDetail(job_id = undefined) {
|
|
|
|
+ this.loading.userTableData = true
|
|
let params = job_id ? { job_id } : {};
|
|
let params = job_id ? { job_id } : {};
|
|
await getUsers(params).then(res => {
|
|
await getUsers(params).then(res => {
|
|
this.userTableData = res.data.result;
|
|
this.userTableData = res.data.result;
|
|
@@ -242,6 +244,21 @@ export default {
|
|
//点击岗位tab
|
|
//点击岗位tab
|
|
childrenTabClick(tab) {
|
|
childrenTabClick(tab) {
|
|
this.jobs.activeTabName = tab.label;
|
|
this.jobs.activeTabName = tab.label;
|
|
|
|
+ },
|
|
|
|
+ //传入用户组,改变这个岗位下的用户
|
|
|
|
+ changeJobUsers(users){
|
|
|
|
+ this.visible.dialog = false
|
|
|
|
+ let data={
|
|
|
|
+ dept_id:this.active,
|
|
|
|
+ job_id:this.childrenActive,
|
|
|
|
+ user_id:users
|
|
|
|
+ }
|
|
|
|
+ changeJobUsers(data).then(res=>{
|
|
|
|
+ if(res.status==200){
|
|
|
|
+ this.initUserDetail(this.childrenActive)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // console.log('改变岗位下的用户',users);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
directives: {
|
|
directives: {
|