diff --git a/front/src/views/admin/user/index.vue b/front/src/views/admin/user/index.vue
index 3a385b9a8b386e26f051cefda343c3a59c2fe890..8aa9d9f4cb762557bf930dc03b9ea2d9f21a8688 100644
--- a/front/src/views/admin/user/index.vue
+++ b/front/src/views/admin/user/index.vue
@@ -2,10 +2,24 @@
-
+
-
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ {{ item.label }}
+
+
{{ $t('search') }}
@@ -70,7 +84,7 @@
width="120"
>
-
+
-
{{ $t('AdminUser.allocateProject') }}
+
+ {{ $t('AdminUser.allocateProject') }}
+
{{ $t('update') }}
-
+
-
+
{{ $t('admin') }}
-
+
@@ -196,12 +213,23 @@ import TimeTooltip from '@/components/TimeTooltip'
import ProjectSelect from '@/components/ProjectSelect'
export default {
- components: { TimeTooltip, ProjectSelect },
+ components: {TimeTooltip, ProjectSelect},
data() {
return {
+ statusOptions: [
+ {value: 0, label: $t('disable')},
+ {value: 1, label: $t('normal')},
+ {value: 2, label: $t('inactive')}
+ ],
+ isSuperAdminOptions: [
+ {value: 0, label: $t('no')},
+ {value: 1, label: $t('yes')}
+ ],
searchFormData: {
id: '',
username: '',
+ status: '',
+ isSuperAdmin: '',
pageIndex: 1,
pageSize: 10
},
@@ -218,10 +246,10 @@ export default {
},
dialogFormRules: {
username: [
- { required: true, message: $t('notEmpty'), trigger: 'blur' }
+ {required: true, message: $t('notEmpty'), trigger: 'blur'}
],
nickname: [
- { required: true, message: $t('notEmpty'), trigger: 'blur' }
+ {required: true, message: $t('notEmpty'), trigger: 'blur'}
]
},
currentUserId: 0,
@@ -244,7 +272,7 @@ export default {
})
},
onRestPwd(row) {
- this.post('/admin/user/password/reset', { id: row.id }, resp => {
+ this.post('/admin/user/password/reset', {id: row.id}, resp => {
this.alert($t('resetPasswordSuccess', resp.data), $t('resetSuccess'))
})
},
@@ -274,7 +302,7 @@ export default {
onAllocateProject(row) {
this.currentUserId = row.id
this.currentUserNick = row.nickname
- this.get('/admin/user/getUserProjectIds', { userId: row.id }, resp => {
+ this.get('/admin/user/getUserProjectIds', {userId: row.id}, resp => {
const projectIds = resp.data
this.chooseProjectShow = true
this.$nextTick(() => {
diff --git a/server/server-web/src/main/java/cn/torna/web/controller/admin/param/UserSearch.java b/server/server-web/src/main/java/cn/torna/web/controller/admin/param/UserSearch.java
index 7ebe5338e3e0c8fb88f92eb3a6b9ff3bf3aa593f..9b7ad947ce1ec0867128a9ede503fc73b5821906 100644
--- a/server/server-web/src/main/java/cn/torna/web/controller/admin/param/UserSearch.java
+++ b/server/server-web/src/main/java/cn/torna/web/controller/admin/param/UserSearch.java
@@ -18,4 +18,12 @@ public class UserSearch extends PageParam {
@Condition(ignoreEmptyString = true, operator = Operator.like)
private String username;
+
+ /** 用户状态 0:禁用,1:启用(正常),2:重设密码(未激活) */
+ @Condition(operator = Operator.eq)
+ private Byte status;
+
+ /** 是否是超级管理员, 数据库字段:is_super_admin */
+ @Condition(operator = Operator.eq)
+ private Byte isSuperAdmin;
}