diff --git a/src/views/modules/sys/role.vue b/src/views/modules/sys/role.vue
index 6278122..64069b6 100644
--- a/src/views/modules/sys/role.vue
+++ b/src/views/modules/sys/role.vue
@@ -43,7 +43,8 @@
{{buttons.edit||'修改'}}
{{buttons.delete|| '删除'}}
- {{buttons.reportRole || '报表赋权'}}
+
+
diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue
index b9a6687..59adcaa 100644
--- a/src/views/modules/sys/user-add-or-update.vue
+++ b/src/views/modules/sys/user-add-or-update.vue
@@ -44,12 +44,12 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -105,7 +105,7 @@ export default {
userName: '',
password: '',
comfirmPassword: '',
- languageDefault: '',
+ languageDefault: 'cn',
salt: '',
email: '',
mobile: '',
@@ -177,7 +177,7 @@ export default {
init(id) {
this.dataForm.id = id || 0
-
+
// 如果是新增模式,清空表单数据
if (!this.dataForm.id) {
this.dataForm = {
@@ -185,7 +185,7 @@ export default {
userName: '',
password: '',
comfirmPassword: '',
- languageDefault: '',
+ languageDefault: 'cn',
salt: '',
email: '',
mobile: '',
@@ -197,7 +197,7 @@ export default {
domainAccount: ''
}
}
-
+
// this.factoryList();
this.getLanguageList();
this.getSiteOptions(); // 获取工厂选项
diff --git a/src/views/modules/sys/user.vue b/src/views/modules/sys/user.vue
index 0bbedf0..085ab7a 100644
--- a/src/views/modules/sys/user.vue
+++ b/src/views/modules/sys/user.vue
@@ -84,12 +84,13 @@
fixed="right"
header-align="center"
align="center"
- width="150"
+ width="200"
:label="buttons.cz||'操作'">
- {{ buttons.auth || '审核' }}
- {{ buttons.edit || '修改' }}
- {{ buttons.delete || '删除' }}
+
+ {{ buttons.edit || '修改' }}
+ {{ buttons.delete || '删除' }}
+ {{ buttons.forceLogout || '踢出登录' }}
@@ -219,6 +220,7 @@ export default {
specialVisible: false,
siteVisible: false,
warehouseVisible: false,
+ forceLogoutLoading: false,
currentData: {},
userId: this.$store.state.user.name,
transferData: [],
@@ -291,6 +293,7 @@ export default {
add: '添加',
edit: '编辑',
delete: '删除',
+ forceLogout: '踢出登录',
specialCompetencies: '特殊权限',
factoryAuthorization: '工厂授权',
warehouseAuthorization: '仓库授权',
@@ -621,6 +624,35 @@ export default {
})
}).catch(() => {
})
+ },
+ // 踢出登录 - rqrq
+ forceLogoutHandle(row) {
+ this.$confirm(`确定要踢出用户 [${row.username}] 的登录状态吗?该操作将清除该用户的登录状态,使其需要重新登录。`, '踢出登录确认', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.forceLogoutLoading = true
+ this.$http({
+ url: this.$http.adornUrl('/sys/user/forceLogout'),
+ method: 'post',
+ data: this.$http.adornData({
+ userId: row.userId
+ })
+ }).then(({data}) => {
+ if (data && data.code === 0) {
+ this.$message.success('已成功踢出该用户,用户需要重新登录')
+ this.getDataList()
+ } else {
+ this.$alert(data.msg || '踢出登录失败', '错误')
+ }
+ }).catch(() => {
+ this.$message.error('踢出登录失败')
+ }).finally(() => {
+ this.forceLogoutLoading = false
+ })
+ }).catch(() => {
+ })
}
},
created() {