|
@@ -552,7 +552,7 @@ import {
|
|
getPersonnel
|
|
getPersonnel
|
|
} from '@/api/system/employeenInfo'
|
|
} from '@/api/system/employeenInfo'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
-// import { treeselect } from '@/api/system/dept'
|
|
|
|
|
|
+import { treeselect } from '@/api/system/dept'
|
|
import userAvatar from './profile/userAvatar.vue'
|
|
import userAvatar from './profile/userAvatar.vue'
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
import TreeChoice from '@/components/deptTreeChoice/index.vue'
|
|
import TreeChoice from '@/components/deptTreeChoice/index.vue'
|
|
@@ -746,7 +746,6 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList()
|
|
this.getList()
|
|
- // this.getTreeselect()
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 查询用户列表 */
|
|
/** 查询用户列表 */
|
|
@@ -759,12 +758,11 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
/** 查询部门下拉树结构 */
|
|
/** 查询部门下拉树结构 */
|
|
- // getTreeselect() {
|
|
|
|
- // treeselect().then((response) => {
|
|
|
|
- // this.deptOptions = response.data
|
|
|
|
- // // this.deptOptions.map((item) => item.id.toString())
|
|
|
|
- // })
|
|
|
|
- // },
|
|
|
|
|
|
+ getTreeselect() {
|
|
|
|
+ treeselect().then((response) => {
|
|
|
|
+ this.deptOptions = response.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 节点单击事件
|
|
// 节点单击事件
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
this.queryParams.deptId = data.id
|
|
this.queryParams.deptId = data.id
|
|
@@ -814,14 +812,13 @@ export default {
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset()
|
|
this.reset()
|
|
- // this.getTreeselect()
|
|
|
|
|
|
+ this.getTreeselect()
|
|
this.open = true
|
|
this.open = true
|
|
this.title = '添加用户'
|
|
this.title = '添加用户'
|
|
this.getLevelList()
|
|
this.getLevelList()
|
|
this.getNatureList()
|
|
this.getNatureList()
|
|
// this.userList.map((item, index, c) => item.serialNumber)
|
|
// this.userList.map((item, index, c) => item.serialNumber)
|
|
this.accountForm.serialNumber = this.total + 1
|
|
this.accountForm.serialNumber = this.total + 1
|
|
- console.log(this.accountForm.serialNumber)
|
|
|
|
},
|
|
},
|
|
// 修改角色权限
|
|
// 修改角色权限
|
|
getRolePermissions(row) {
|
|
getRolePermissions(row) {
|
|
@@ -829,7 +826,6 @@ export default {
|
|
getAuthRole(row.userId).then((res) => {
|
|
getAuthRole(row.userId).then((res) => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.roleList = res.roles
|
|
this.roleList = res.roles
|
|
- console.log(this.roleList)
|
|
|
|
this.dialogTableRolePermissions = true
|
|
this.dialogTableRolePermissions = true
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -838,10 +834,8 @@ export default {
|
|
getDataRole(row) {
|
|
getDataRole(row) {
|
|
this.userId = row.userId
|
|
this.userId = row.userId
|
|
getDataRole(row.userId).then((res) => {
|
|
getDataRole(row.userId).then((res) => {
|
|
- console.log(res)
|
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.dataRoleList = res.dataRoles
|
|
this.dataRoleList = res.dataRoles
|
|
- console.log(this.dataRoleList)
|
|
|
|
this.dialogTableDataRole = true
|
|
this.dialogTableDataRole = true
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -852,7 +846,6 @@ export default {
|
|
let dataRoleIds = newArr.map((item, index, c) => item.dataRoleId)
|
|
let dataRoleIds = newArr.map((item, index, c) => item.dataRoleId)
|
|
// let dataRoleIdsStr = dataRoleIds.join(',')
|
|
// let dataRoleIdsStr = dataRoleIds.join(',')
|
|
updateDataRole({ userId: this.userId, roleIds: dataRoleIds }).then((res) => {
|
|
updateDataRole({ userId: this.userId, roleIds: dataRoleIds }).then((res) => {
|
|
- console.log(res)
|
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.dialogTableDataRole = false
|
|
this.dialogTableDataRole = false
|
|
this.$msg({ message: '修改成功' })
|
|
this.$msg({ message: '修改成功' })
|
|
@@ -874,7 +867,6 @@ export default {
|
|
},
|
|
},
|
|
// 保存角色权限修改
|
|
// 保存角色权限修改
|
|
saveRolePermissions() {
|
|
saveRolePermissions() {
|
|
- console.log(this.roleList)
|
|
|
|
let newArr = this.roleList.filter((item, index, c) => item.flag == true)
|
|
let newArr = this.roleList.filter((item, index, c) => item.flag == true)
|
|
let roleIds = newArr.map((item, index, c) => item.roleId)
|
|
let roleIds = newArr.map((item, index, c) => item.roleId)
|
|
// let roleIdsStr = roleIds.join(',')
|
|
// let roleIdsStr = roleIds.join(',')
|
|
@@ -895,12 +887,10 @@ export default {
|
|
let staff = this.userList.find((item, index, c) => item.userId === row.userId)
|
|
let staff = this.userList.find((item, index, c) => item.userId === row.userId)
|
|
this.levelJobs = staff.levelJobs
|
|
this.levelJobs = staff.levelJobs
|
|
// this.jodId = this.levelJobs[0].jobId
|
|
// this.jodId = this.levelJobs[0].jobId
|
|
- console.log(this.levelJobs)
|
|
|
|
this.dialogPower = true
|
|
this.dialogPower = true
|
|
},
|
|
},
|
|
// 选择职责权限
|
|
// 选择职责权限
|
|
changeJob(val) {
|
|
changeJob(val) {
|
|
- console.log(val)
|
|
|
|
this.responsibility = val.responsibility
|
|
this.responsibility = val.responsibility
|
|
this.right = val.right
|
|
this.right = val.right
|
|
},
|
|
},
|
|
@@ -953,7 +943,6 @@ export default {
|
|
this.getNatureList()
|
|
this.getNatureList()
|
|
// 查询账号信息
|
|
// 查询账号信息
|
|
getAccountInfo(row.userId).then((response) => {
|
|
getAccountInfo(row.userId).then((response) => {
|
|
- console.log(response)
|
|
|
|
this.open = true
|
|
this.open = true
|
|
this.title = '修改用户'
|
|
this.title = '修改用户'
|
|
this.accountForm = response.data
|
|
this.accountForm = response.data
|
|
@@ -963,7 +952,6 @@ export default {
|
|
})
|
|
})
|
|
// 查询基础信息
|
|
// 查询基础信息
|
|
getPersonnel(row.userId).then((res) => {
|
|
getPersonnel(row.userId).then((res) => {
|
|
- console.log(res)
|
|
|
|
this.basicsForm = res.data
|
|
this.basicsForm = res.data
|
|
this.basicsForm.descriptionJson = JSON.parse(res.data.descriptionJson)
|
|
this.basicsForm.descriptionJson = JSON.parse(res.data.descriptionJson)
|
|
this.basicsForm.favorite = res.data.favorite.split(',')
|
|
this.basicsForm.favorite = res.data.favorite.split(',')
|
|
@@ -974,8 +962,8 @@ export default {
|
|
submitForm: function () {
|
|
submitForm: function () {
|
|
let accountStr = deepClone(this.accountForm)
|
|
let accountStr = deepClone(this.accountForm)
|
|
accountStr.deptIds = accountStr.deptIds.join(',')
|
|
accountStr.deptIds = accountStr.deptIds.join(',')
|
|
- accountStr.levelJobIds = accountStr.levelJobIds.join(',')
|
|
|
|
accountStr.naturePostIds = accountStr.naturePostIds.join(',')
|
|
accountStr.naturePostIds = accountStr.naturePostIds.join(',')
|
|
|
|
+ accountStr.levelJobIds = accountStr.levelJobIds.join(',')
|
|
let str = deepClone(this.basicsForm)
|
|
let str = deepClone(this.basicsForm)
|
|
str.dateOfBirth = this.ageInfo.birthday
|
|
str.dateOfBirth = this.ageInfo.birthday
|
|
str.age = this.ageInfo.age
|
|
str.age = this.ageInfo.age
|
|
@@ -988,7 +976,6 @@ export default {
|
|
this.$refs['accountForm'].validate((valid) => {
|
|
this.$refs['accountForm'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (params.userId != null) {
|
|
if (params.userId != null) {
|
|
- console.log(1231231312)
|
|
|
|
updateUser(params).then((response) => {
|
|
updateUser(params).then((response) => {
|
|
this.$modal.msgSuccess('修改成功')
|
|
this.$modal.msgSuccess('修改成功')
|
|
this.open = false
|
|
this.open = false
|