| | |
| | | <el-button size="mini" >日志</el-button> |
| | | </router-link> |
| | | <el-button size="mini" @click="status(row)" class="link-left">状态</el-button> |
| | | <el-button type="primary" size="mini" @click="move(row)" class="link-left">调动</el-button> |
| | | <el-button type="primary" size="mini" @click="transposition(row)" class="link-left">调动</el-button> |
| | | <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-button @click="statusVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 调动弹窗 --> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | | width="400px"> |
| | | <el-select v-model="examine.departmentId" multiple filterable placeholder="请选择部门"> |
| | | <el-option |
| | | v-for="item in deptList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitExamine">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { mapGetters, mapState } from 'vuex' |
| | | import Pagination from '@/components/Pagination' |
| | | import userApi from '@/api/user' |
| | | import departmentExamineApi from '@/api/departmentExamine' |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | |
| | | }, |
| | | listLoading: true, |
| | | tableData: [], |
| | | total: 0 |
| | | total: 0, |
| | | examine: { |
| | | userId: '', |
| | | departmentId: [], |
| | | departmentIds: '', |
| | | nowDepartmentIds: '', |
| | | }, |
| | | title: '部门调动', |
| | | dialogVisible: false, |
| | | deptList: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | submitExamine() { |
| | | this.examine.departmentIds = this.examine.departmentId.join(',') |
| | | departmentExamineApi.save(this.examine).then(res => { |
| | | if (res.code === 1) { |
| | | this.$message.success("提交成功,审核后生效") |
| | | this.dialogVisible = false |
| | | this.search() |
| | | } else { |
| | | this.$message.error("操作失败") |
| | | } |
| | | }) |
| | | }, |
| | | transposition(item) { |
| | | this.examine.userId = item.id |
| | | this.examine.departmentId = item.deptIdList |
| | | this.examine.nowDepartmentIds = item.deptIdList.join(',') |
| | | departmentExamineApi.getDeptList().then(res => { |
| | | if (res.code === 1) { |
| | | this.deptList = res.response |
| | | this.dialogVisible = true |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | status(user) { |
| | | this.statusVisible = true; |
| | | this.user = { ...user }; |