diff --git a/hippo4j-ui/src/locale/lang/en.js b/hippo4j-ui/src/locale/lang/en.js
index cefc21c1..556f35ad 100644
--- a/hippo4j-ui/src/locale/lang/en.js
+++ b/hippo4j-ui/src/locale/lang/en.js
@@ -186,4 +186,11 @@ export default {
'-WeChat: Fill in \'userid\' and it will be sent to the user as a @ message, otherwise fill in the name, such as: XiaomaGe\n' +
'-Lark: Fill in with \'ou_\' the unique user ID at the beginning will be sent to the user as a @ message, and filling in the phone number is normal@'
},
+
+ //用户权限
+ userAuthority: {
+ userName: 'User Name',
+ role: 'Role',
+ password: 'Password'
+ },
}
diff --git a/hippo4j-ui/src/locale/lang/zh.js b/hippo4j-ui/src/locale/lang/zh.js
index b1220121..1ef2609a 100644
--- a/hippo4j-ui/src/locale/lang/zh.js
+++ b/hippo4j-ui/src/locale/lang/zh.js
@@ -186,4 +186,11 @@ export default {
'- 企微:填写user_id会以@的消息发给用户,否则填写姓名,如:小马哥\n' +
'- 飞书:填写ou_开头用户唯一标识会以@的消息发给用户,填写手机号则是普通的@"'
},
+
+ //用户权限
+ userAuthority: {
+ userName: '用户名',
+ role: '角色',
+ password: '密码'
+ },
}
diff --git a/hippo4j-ui/src/views/hippo4j/user/index.vue b/hippo4j-ui/src/views/hippo4j/user/index.vue
index a895f205..10171a41 100755
--- a/hippo4j-ui/src/views/hippo4j/user/index.vue
+++ b/hippo4j-ui/src/views/hippo4j/user/index.vue
@@ -3,7 +3,7 @@
@@ -14,7 +14,7 @@
icon="el-icon-search"
@click="fetchData"
>
- 搜索
+ {{ $t('common.query') }}
- 添加
+ {{ $t('common.insert') }}
-
+
{{ scope.$index + 1 }}
-
+
{{ scope.row.userName }}
-
+
{{ scope.row.role }}
-
+
{{ scope.row.gmtCreate }}
-
+
{{ scope.row.gmtModified }}
-
+
- 编辑
+ {{ $t('common.edit') }}
- 删除
+ {{ $t('common.delete') }}
@@ -85,38 +85,38 @@
label-width="100px"
style="width: 400px; margin-left: 50px"
>
-
+
-
-
+
+
-
+
-
+
{{
- tenantKey
- }}
+ tenantKey
+ }}
@@ -168,10 +168,10 @@ export default {
create: 'Create',
},
rules: {
- role: [{ required: true, message: 'role is required', trigger: 'change' }],
- userName: [{ required: true, message: 'userName is required', trigger: 'blur' }],
- tenants: [{ required: false, message: 'tenants is required', trigger: 'blur' }],
- password: [{ required: false, message: 'password is required', trigger: 'blur' }],
+ role: [{ required: true, message: this.$t('message.requiredError'), trigger: 'change' }],
+ userName: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }],
+ tenants: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
+ password: [{ required: false, message: this.$t('message.requiredError'), trigger: 'blur' }],
},
temp: {
id: undefined,
@@ -182,7 +182,14 @@ export default {
resources: [],
},
resetTemp() {
- this.temp = this.$options.data().temp;
+ this.temp = {
+ id: undefined,
+ role: '',
+ userName: '',
+ password: '',
+ permission: '',
+ resources: [],
+ }
},
};
},
@@ -222,8 +229,8 @@ export default {
this.fetchData();
this.dialogFormVisible = false;
this.$notify({
- title: 'Success',
- message: 'Created Successfully',
+ title: this.$t('message.success'),
+ message: this.$t('message.createdSuccess'),
type: 'success',
duration: 2000,
});
@@ -256,8 +263,8 @@ export default {
this.fetchData();
this.dialogFormVisible = false;
this.$notify({
- title: 'Success',
- message: 'Update Successfully',
+ title: this.$t('message.success'),
+ message: this.$t('message.updateSuccess'),
type: 'success',
duration: 2000,
});
@@ -266,9 +273,9 @@ export default {
});
},
openDelConfirm(name) {
- return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), {
+ confirmButtonText: this.$t('common.ok'),
+ cancelButtonText: this.$t('common.cancel'),
type: 'warning',
});
},
@@ -277,8 +284,8 @@ export default {
user.deleteUser(row.userName).then((response) => {
this.fetchData();
this.$notify({
- title: 'Success',
- message: 'Delete Successfully',
+ title: this.$t('message.success'),
+ message: this.$t('message.deleteSuccess'),
type: 'success',
duration: 2000,
});