🎉 2.4.0.RELEASE

This commit is contained in:
smallchill 2019-08-04 23:21:04 +08:00
parent d37a240042
commit f7da3596a6
19 changed files with 58 additions and 58 deletions

View File

@ -6,21 +6,21 @@ function getFakeList(req, res) {
data.push({
id: '1',
deptName: '刀锋科技',
tenantCode: '000000',
tenantId: '000000',
fullName: '江苏刀锋科技有限公司',
sort: '1',
children: [
{
id: '2',
deptName: '常州刀锋',
tenantCode: '000000',
tenantId: '000000',
fullName: '常州刀锋科技有限公司',
sort: '1',
},
{
id: '3',
deptName: '南京刀锋',
tenantCode: '000000',
tenantId: '000000',
fullName: '南京刀锋科技有限公司',
sort: '2',
},
@ -36,7 +36,7 @@ function getFakeDetail(req, res) {
id: 2,
parentId: 1,
parentName: '江苏刀锋',
tenantCode: '000000',
tenantId: '000000',
deptName: '常州刀锋',
fullName: '常州刀锋科技有限公司',
sort: 1,

View File

@ -7,14 +7,14 @@ function getFakeList(req, res) {
{
id: '1',
roleName: '超级管理员',
tenantCode: '000000',
tenantId: '000000',
roleAlias: 'administrator',
sort: '1',
children: [
{
id: '2',
roleName: '管理员',
tenantCode: '000001',
tenantId: '000001',
roleAlias: 'admin',
sort: '1',
},
@ -23,21 +23,21 @@ function getFakeList(req, res) {
{
id: '3',
roleName: '用户',
tenantCode: '000002',
tenantId: '000002',
roleAlias: 'user',
sort: '2',
children: [
{
id: '4',
roleName: '普通用户',
tenantCode: '000003',
tenantId: '000003',
roleAlias: 'user',
sort: '1',
},
{
id: '5',
roleName: '访客',
tenantCode: '000004',
tenantId: '000004',
roleAlias: 'guest',
sort: '2',
},
@ -54,7 +54,7 @@ function getFakeDetail(req, res) {
id: 2,
parentId: 1,
parentName: '超级管理员',
tenantCode: '000000',
tenantId: '000000',
roleName: '用户',
roleAlias: 'user',
sort: 1,

View File

@ -6,7 +6,7 @@ function getFakeList(req, res) {
list.push(
{
id: '1',
tenantCode: '000000',
tenantId: '000000',
tenantName: '管理组',
linkman: 'Chill',
contactNumber: '66666666666',
@ -14,7 +14,7 @@ function getFakeList(req, res) {
},
{
id: '2',
tenantCode: '000001',
tenantId: '000001',
tenantName: '用户组',
linkman: 'Bill',
contactNumber: '23333333333',
@ -36,7 +36,7 @@ function getFakeDetail(req, res) {
const json = { code: 200, success: true, msg: '操作成功' };
json.data = {
id: '1',
tenantCode: '000000',
tenantId: '000000',
tenantName: '管理组',
linkman: 'Chill',
contactNumber: '66666666666',
@ -54,11 +54,11 @@ function getFakeTenantSelect(req, res) {
const json = { code: 200, success: true, msg: '操作成功' };
json.data = [
{
tenantCode: '000000',
tenantId: '000000',
tenantName: '管理组',
},
{
tenantCode: '000001',
tenantId: '000001',
tenantName: '用户组',
},
];

View File

@ -6,7 +6,7 @@ function getFakeList(req, res) {
list.push(
{
id: '1',
tenantCode: '000000',
tenantId: '000000',
account: 'admin',
name: '超级管理员',
realName: '管理员',
@ -18,7 +18,7 @@ function getFakeList(req, res) {
},
{
id: '2',
tenantCode: '000001',
tenantId: '000001',
account: 'user',
name: '系统用户',
realName: '用户',
@ -44,7 +44,7 @@ function getFakeDetail(req, res) {
const json = { code: 200, success: true, msg: '操作成功' };
json.data = {
id: '1',
tenantCode: '000000',
tenantId: '000000',
account: 'admin',
name: '超级管理员',
realName: '管理员',

View File

@ -1,6 +1,6 @@
{
"name": "sword",
"version": "1.0.0",
"version": "2.4.0",
"description": "An out-of-box UI solution for enterprise applications",
"private": true,
"scripts": {

View File

@ -12,7 +12,7 @@ export interface ILoginProps {
export default class Login extends React.Component<ILoginProps, any> {
public static Tab: typeof LoginTab;
public static TenantCode: typeof LoginItem;
public static TenantId: typeof LoginItem;
public static UserName: typeof LoginItem;
public static Password: typeof LoginItem;
public static Mobile: typeof LoginItem;

View File

@ -3,17 +3,17 @@ import { Icon } from 'antd';
import styles from './index.less';
export default {
TenantCode: {
TenantId: {
props: {
size: 'large',
id: 'tenantCode',
id: 'tenantId',
prefix: <Icon type="home" className={styles.prefixIcon} />,
placeholder: 'admin',
},
rules: [
{
required: true,
message: 'Please enter tenantcode!',
message: 'Please enter tenantId!',
},
],
},

View File

@ -1,5 +1,5 @@
export default {
'app.login.tenantCode': 'tenantCode',
'app.login.tenantId': 'tenantId',
'app.login.userName': 'userName',
'app.login.password': 'password',
'app.login.message-invalid-credentials': 'Invalid username or passwordadmin/ant.design',
@ -21,7 +21,7 @@ export default {
'app.register-result.view-mailbox': 'View mailbox',
'validation.email.required': 'Please enter your email!',
'validation.email.wrong-format': 'The email address is in the wrong format!',
'validation.userName.tenantCode': 'Please enter your tenantCode!',
'validation.userName.tenantId': 'Please enter your tenantId!',
'validation.userName.required': 'Please enter your userName!',
'validation.password.required': 'Please enter your password!',
'validation.password.twice': 'The passwords entered twice do not match!',

View File

@ -1,5 +1,5 @@
export default {
'app.login.tenantCode': '租户编号',
'app.login.tenantId': '租户ID',
'app.login.userName': '用户名',
'app.login.password': '密码',
'app.login.message-invalid-credentials': '账户或密码错误admin/ant.design',
@ -21,7 +21,7 @@ export default {
'app.register-result.view-mailbox': '查看邮箱',
'validation.email.required': '请输入邮箱地址!',
'validation.email.wrong-format': '邮箱地址格式错误!',
'validation.tenantCode.required': '请输入租户编号!',
'validation.tenantId.required': '请输入租户ID!',
'validation.userName.required': '请输入用户名!',
'validation.password.required': '请输入密码!',
'validation.password.twice': '两次输入的密码不匹配!',

View File

@ -1,5 +1,5 @@
export default {
'app.login.tenantCode': '租戶編號',
'app.login.tenantId': '租戶編號',
'app.login.userName': '賬戶',
'app.login.password': '密碼',
'app.login.message-invalid-credentials': '賬戶或密碼錯誤admin/ant.design',
@ -21,7 +21,7 @@ export default {
'app.register-result.view-mailbox': '查看郵箱',
'validation.email.required': '請輸入郵箱地址!',
'validation.email.wrong-format': '郵箱地址格式錯誤!',
'validation.tenantCode.required': '請輸入租戶編號!',
'validation.tenantId.required': '請輸入租戶編號!',
'validation.userName.required': '請輸入賬戶!',
'validation.password.required': '請輸入密碼!',
'validation.password.twice': '兩次輸入的密碼不匹配!',

View File

@ -6,7 +6,7 @@ import Login from '../../components/Login';
import styles from './Login.less';
import { tenantMode } from '../../defaultSettings';
const { Tab, TenantCode, UserName, Password, Submit } = Login;
const { Tab, TenantId, UserName, Password, Submit } = Login;
@connect(({ login, loading }) => ({
login,
@ -82,13 +82,13 @@ class LoginPage extends Component {
!submitting &&
this.renderMessage(formatMessage({ id: 'app.login.message-invalid-credentials' }))}
{tenantMode ? (
<TenantCode
name="tenantCode"
placeholder={`${formatMessage({ id: 'app.login.tenantCode' })}: 000000`}
<TenantId
name="tenantId"
placeholder={`${formatMessage({ id: 'app.login.tenantId' })}: 000000`}
rules={[
{
required: true,
message: formatMessage({ id: 'validation.tenantCode.required' }),
message: formatMessage({ id: 'validation.tenantId.required' }),
},
]}
/>

View File

@ -33,8 +33,8 @@ class Dept extends PureComponent {
</FormItem>
</Col>
<Col md={6} sm={24}>
<FormItem label="租户编号">
{getFieldDecorator('tenantCode')(<Input placeholder="请输入角色名称" />)}
<FormItem label="租户ID">
{getFieldDecorator('tenantId')(<Input placeholder="请输入角色名称" />)}
</FormItem>
</Col>
<Col md={6} sm={24}>
@ -67,8 +67,8 @@ class Dept extends PureComponent {
const columns = [
{
title: '租户编号',
dataIndex: 'tenantCode',
title: '租户ID',
dataIndex: 'tenantId',
},
{
title: '部门名称',

View File

@ -124,8 +124,8 @@ class Role extends PureComponent {
</FormItem>
</Col>
<Col md={6} sm={24}>
<FormItem label="租户编号">
{getFieldDecorator('tenantCode')(<Input placeholder="请输入角色名称" />)}
<FormItem label="租户ID">
{getFieldDecorator('tenantId')(<Input placeholder="请输入角色名称" />)}
</FormItem>
</Col>
<Col md={6} sm={24}>
@ -178,8 +178,8 @@ class Role extends PureComponent {
const columns = [
{
title: '租户编号',
dataIndex: 'tenantCode',
title: '租户ID',
dataIndex: 'tenantId',
},
{
title: '角色名称',

View File

@ -27,8 +27,8 @@ class Tenant extends PureComponent {
return (
<Row gutter={{ md: 8, lg: 24, xl: 48 }}>
<Col md={6} sm={24}>
<FormItem label="租户编号">
{getFieldDecorator('tenantCode')(<Input placeholder="请输入租户编号" />)}
<FormItem label="租户ID">
{getFieldDecorator('tenantId')(<Input placeholder="请输入租户ID" />)}
</FormItem>
</Col>
<Col md={6} sm={24}>
@ -66,8 +66,8 @@ class Tenant extends PureComponent {
const columns = [
{
title: '租户编号',
dataIndex: 'tenantCode',
title: '租户ID',
dataIndex: 'tenantId',
},
{
title: '租户名称',

View File

@ -59,8 +59,8 @@ class TenantView extends PureComponent {
<Panel title="查看" back="/system/tenant" action={action}>
<Form hideRequiredMark style={{ marginTop: 8 }}>
<Card className={styles.card} bordered={false}>
<FormItem {...formItemLayout} label="租户编号">
<span>{detail.tenantCode}</span>
<FormItem {...formItemLayout} label="租户ID">
<span>{detail.tenantId}</span>
</FormItem>
<FormItem {...formItemLayout} label="租户名称">
<span>{detail.tenantName}</span>

View File

@ -175,8 +175,8 @@ class User extends PureComponent {
const columns = [
{
title: '租户编号',
dataIndex: 'tenantCode',
title: '租户ID',
dataIndex: 'tenantId',
},
{
title: '登录账号',

View File

@ -46,7 +46,7 @@ class UserAdd extends PureComponent {
handleChange = value => {
const { dispatch, form } = this.props;
form.resetFields(['roleId', 'deptId']);
dispatch(USER_CHANGE_INIT({ tenantCode: value }));
dispatch(USER_CHANGE_INIT({ tenantId: value }));
};
render() {
@ -104,7 +104,7 @@ class UserAdd extends PureComponent {
<Row gutter={24}>
<Col span={20}>
<FormItem {...formAllItemLayout} label="所属租户">
{getFieldDecorator('tenantCode', {
{getFieldDecorator('tenantId', {
rules: [
{
required: true,
@ -122,7 +122,7 @@ class UserAdd extends PureComponent {
placeholder="请选择所属租户"
>
{tenantList.map(d => (
<Select.Option key={d.tenantCode} value={d.tenantCode}>
<Select.Option key={d.tenantId} value={d.tenantId}>
{d.tenantName}
</Select.Option>
))}

View File

@ -53,7 +53,7 @@ class UserEdit extends PureComponent {
handleChange = value => {
const { dispatch, form } = this.props;
form.resetFields(['roleId', 'deptId']);
dispatch(USER_CHANGE_INIT({ tenantCode: value }));
dispatch(USER_CHANGE_INIT({ tenantId: value }));
};
render() {
@ -113,14 +113,14 @@ class UserEdit extends PureComponent {
<Row gutter={24}>
<Col span={20}>
<FormItem {...formAllItemLayout} label="所属租户">
{getFieldDecorator('tenantCode', {
{getFieldDecorator('tenantId', {
rules: [
{
required: true,
message: '请选择所属租户',
},
],
initialValue: detail.tenantCode,
initialValue: detail.tenantId,
})(
<Select
showSearch
@ -132,7 +132,7 @@ class UserEdit extends PureComponent {
placeholder="请选择所属租户"
>
{tenantList.map(d => (
<Select.Option key={d.tenantCode} value={d.tenantCode}>
<Select.Option key={d.tenantId} value={d.tenantId}>
{d.tenantName}
</Select.Option>
))}

View File

@ -77,7 +77,7 @@ class UserView extends PureComponent {
<Row gutter={24}>
<Col span={20}>
<FormItem {...formAllItemLayout} label="所属租户">
<span>{detail.tenantCode}</span>
<span>{detail.tenantId}</span>
</FormItem>
</Col>
</Row>