|
|
@@ -203,7 +203,7 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- onRemind: function (str) {
|
|
|
+ setRemindText: function (str) {
|
|
|
this.remindText = str
|
|
|
this.timeoutCount++
|
|
|
},
|
|
|
@@ -237,13 +237,13 @@
|
|
|
openDelete (item) {
|
|
|
if (this.isAdmin) {
|
|
|
if (item.userUU === this.userInfo.userUU) {
|
|
|
- this.onRemind('自己不可修改自己')
|
|
|
+ this.setRemindText('自己不可修改自己')
|
|
|
} else {
|
|
|
this.currentObject = item
|
|
|
this.showDelete = true
|
|
|
}
|
|
|
} else {
|
|
|
- this.onRemind('您不是管理员不可修改')
|
|
|
+ this.setRemindText('您不是管理员不可修改')
|
|
|
}
|
|
|
},
|
|
|
// 员工列表确认删除
|
|
|
@@ -252,13 +252,13 @@
|
|
|
.then(response => {
|
|
|
// console.log(response)
|
|
|
this.showDelete = false
|
|
|
- this.onRemind('用户' + this.currentObject.userUU + '删除成功')
|
|
|
+ this.setRemindText('用户' + this.currentObject.userUU + '删除成功')
|
|
|
this.page = 1
|
|
|
this.isChange = true
|
|
|
this.staffList()
|
|
|
}).catch(data => {
|
|
|
this.showDelete = false
|
|
|
- this.onRemind(data.response.data)
|
|
|
+ this.setRemindText(data.response.data)
|
|
|
})
|
|
|
},
|
|
|
// 打开选择
|
|
|
@@ -305,16 +305,16 @@
|
|
|
},
|
|
|
// 员工列表当前选中对象
|
|
|
goEdit (item) {
|
|
|
- if (this.isAdmin) {
|
|
|
- if (item.userUU === this.userInfo.userUU) {
|
|
|
- this.onRemind('自己不可修改自己')
|
|
|
- } else {
|
|
|
+ if (item.userUU === this.userInfo.userUU) {
|
|
|
+ this.setRemindText('自己不可修改自己')
|
|
|
+ } else {
|
|
|
+ this.authorityInterceptor('/basic/user/updaterole', () => {
|
|
|
let currentData = item
|
|
|
this.currentStaff = this.baseUtils.deepCopy(currentData)
|
|
|
this.activeTab = 1
|
|
|
for (let j = 0; j < this.rolesList.length; j++) {
|
|
|
for (let i = 0; i < this.currentStaff.roles.length; i++) {
|
|
|
- //判断已绑定角色
|
|
|
+ // 判断已绑定角色
|
|
|
if (this.currentStaff.roles[i].id === this.rolesList[j].id) {
|
|
|
this.rolesList[j].checked = true
|
|
|
break
|
|
|
@@ -323,10 +323,13 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.onRemind('您不是管理员不可修改')
|
|
|
+ })
|
|
|
}
|
|
|
+// if (this.isAdmin) {
|
|
|
+//
|
|
|
+// } else {
|
|
|
+// this.setRemindText('您不是管理员不可修改')
|
|
|
+// }
|
|
|
},
|
|
|
// 员工列表选择角色
|
|
|
checkRole (role) {
|
|
|
@@ -346,7 +349,7 @@
|
|
|
}
|
|
|
this.$http.put(`/basic/user/updaterole`, this.currentStaff)
|
|
|
.then(() => {
|
|
|
- this.onRemind('角色编辑成功')
|
|
|
+ this.setRemindText('角色编辑成功')
|
|
|
this.activeTab = 0
|
|
|
this.page = 1
|
|
|
this.isChange = true
|
|
|
@@ -371,7 +374,7 @@
|
|
|
agreeEvent (type, flag) {
|
|
|
this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
|
|
|
.then(() => {
|
|
|
- this.onRemind('操作成功!')
|
|
|
+ this.setRemindText('操作成功!')
|
|
|
this.auditSearch = ''
|
|
|
this.page = 1
|
|
|
this.searchAudit()
|