diff --git a/src/locales/zh/user.json b/src/locales/zh/user.json index 4f62cdaa..a382eb2f 100644 --- a/src/locales/zh/user.json +++ b/src/locales/zh/user.json @@ -18,6 +18,8 @@ "Normal Role Title Count": "终端角色({{count}})", "Operation list": "操作列表", "Edit info": "编辑信息", + "isv": "应用服务商", + "user": "用户", "Set permission": "设置权限", "Delete role": "删除角色", "Disable": "禁用", diff --git a/src/portals/admin/pages/Users/ModalActions/index.jsx b/src/portals/admin/pages/Users/ModalActions/index.jsx index ef0baae0..cd74abf2 100644 --- a/src/portals/admin/pages/Users/ModalActions/index.jsx +++ b/src/portals/admin/pages/Users/ModalActions/index.jsx @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import { observer } from 'mobx-react'; import _ from 'lodash'; @@ -153,8 +153,8 @@ export default class UserModalActions extends Component { const { setRole, roles, userNames } = userStore; const roleId = _.get(item, 'role'); const userId = _.get(item, 'user_id') || userStore.selectIds.join(','); - const names = roleId ? item.username : userNames; - const text = roleId + const names = userId ? item.username : userNames; + const text = userId ? t('Set_Role_Title', { names }) : t('Set_Role_Title_For_Multi_User', { count: names.length, @@ -186,13 +186,9 @@ export default class UserModalActions extends Component { renderModalCreateUser() { const { userStore, modalStore, t } = this.props; - const { isOpen } = modalStore; - const { - userDetail, roles, hideModifyUser, createOrModify - } = userStore; - const { - user_id, role, username, email - } = userDetail; + const { isOpen, item } = modalStore; + const { roles, hideModifyUser, createOrModify } = userStore; + const { user_id, username, email } = item; const title = !user_id === 'modify' ? t('Create New User') : t('Modify User'); @@ -227,21 +223,23 @@ export default class UserModalActions extends Component { /> {!user_id && ( -
- - -
+ +
+ + +
+
+ + +
+
)} -
- - -