用户管理 组织机构bug修改

This commit is contained in:
fengachen
2021-08-30 17:35:57 +08:00
parent f4f4d9ba0d
commit e19b92a51e
3 changed files with 27 additions and 15 deletions
+1 -1
View File
@@ -494,7 +494,7 @@ export default {
let formData = Object.assign(this.currSelected, values)
console.log('Received values of form: ', formData)
httpAction(this.url.edit, formData, 'put').then((res) => {
httpAction(this.url.edit, formData, 'post').then((res) => {
if (res.success) {
this.$message.success('保存成功!')
this.loadTree()
+17 -11
View File
@@ -81,7 +81,7 @@
<span slot="action" class="action-span-cell" slot-scope="text, record">
<a @click="handleEdit(record)" v-has="'user:edit'">编辑</a>
<a @click="resetPassword(record.id)">重置密码</a>
<a @click="resetPassword(record)">重置密码</a>
<a @click="handleDelete(record.id)" v-has="'sys:user:del'">删除</a>
</span>
<template slot="text" slot-scope="text">
@@ -151,6 +151,13 @@ export default {
// dataIndex: "sex_dictText",
// scopedSlots: { customRender: "text" },
// },
{
title: "手机号",
align: "center",
width: 100,
dataIndex: "phone",
scopedSlots: { customRender: "text" },
},
{
title: "角色类型",
align: "center",
@@ -158,13 +165,6 @@ export default {
dataIndex: "roleName",
scopedSlots: { customRender: "text" },
},
{
title: "手机号码",
align: "center",
width: 100,
dataIndex: "phone",
scopedSlots: { customRender: "text" },
},
{
title: "组织机构",
align: "center",
@@ -184,6 +184,12 @@ export default {
// width: 180,
// dataIndex: 'departIds_dictText'
// },
{
title: "创建时间",
dataIndex: "createTime",
align: "center",
width: 170
},
{
title: "操作",
dataIndex: "action",
@@ -255,14 +261,14 @@ export default {
* */
initAllRole() {
getAction('/sys/role/treeList').then(res => {
this.treeRoleData = res.result
this.treeRoleData = res.result || []
})
},
/*
* 重置密码
* */
resetPassword(id){
resetUserPassword({id:id}).then( res => {
resetPassword(record){
resetUserPassword({username:record.username}).then( res => {
if(res.success){
this.$message.success(res.message)
}else {
+9 -3
View File
@@ -73,7 +73,7 @@
<script>
import {JeroListMixin} from '@/mixins/JeroListMixin'
import {getAction, postAction, deleteAction} from '@/api/manage'
import {getAction, postAction,} from '@/api/manage'
import SelectUserModal from './SelectUserModal'
import UserModal from './UserModal'
import DeptRoleUserModal from './DeptRoleUserModal'
@@ -89,6 +89,12 @@ export default {
UserModal,
JEllipsis
},
props:{
departId:{
type:String,
required:false
}
},
data() {
return {
description: '用户信息',
@@ -196,7 +202,7 @@ export default {
title: "确认取消",
content: "是否取消用户与选中部门的关联?",
onOk: function () {
deleteAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
getAction(that.url.deleteBatch, {depId: that.currentDeptId, userIds: ids}).then((res) => {
if (res.success) {
that.$message.success("删除用户与选中部门关系成功!");
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
@@ -230,7 +236,7 @@ export default {
title: "确认取消",
content: "是否取消用户与选中部门的关联?",
onOk: function () {
deleteAction(that.url.delete, {depId: that.currentDeptId, userId: id}).then((res) => {
getAction(that.url.delete, {depId: that.currentDeptId, userId: id}).then((res) => {
if (res.success) {
that.$message.success("删除用户与选中部门关系成功!");
if (that.selectedRowKeys.length > 0) {