|
|
|
@ -120,7 +120,7 @@ function Management() {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const onPermissionChange = (newValue) => {
|
|
|
|
|
const onPermissionChange = (newValue) => {
|
|
|
|
|
console.log('onChange ', newValue);
|
|
|
|
|
setPermissionValue(newValue);
|
|
|
|
|
}
|
|
|
|
@ -205,7 +205,7 @@ function Management() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 默认重新搜索第一页,所有状态的计划
|
|
|
|
|
const onSearchClick = (current=1, status=null) => {
|
|
|
|
|
const onSearchClick = (current = 1, status = null) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const showDisableConfirm = () => {
|
|
|
|
@ -243,65 +243,65 @@ function Management() {
|
|
|
|
|
open={isAccountModalOpen} onOk={handleAccountOk} onCancel={handleAccountCancel}
|
|
|
|
|
>
|
|
|
|
|
<Form
|
|
|
|
|
name='basic'
|
|
|
|
|
form={editAccountForm}
|
|
|
|
|
layout='vertical'
|
|
|
|
|
size='large'
|
|
|
|
|
style={{
|
|
|
|
|
maxWidth: 600,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
|
onFinishFailed={onFinishFailed}
|
|
|
|
|
autoComplete='off'
|
|
|
|
|
>
|
|
|
|
|
<Form.Item><Title level={2}>{t('account:management.newAccount')}</Title></Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.username')}
|
|
|
|
|
name='username'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.username'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.realname')}
|
|
|
|
|
name='realname'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.realname'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.email')}
|
|
|
|
|
name='email'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.email'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
name='basic'
|
|
|
|
|
form={editAccountForm}
|
|
|
|
|
layout='vertical'
|
|
|
|
|
size='large'
|
|
|
|
|
style={{
|
|
|
|
|
maxWidth: 600,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
|
onFinishFailed={onFinishFailed}
|
|
|
|
|
autoComplete='off'
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label={t('account:management.role')}>
|
|
|
|
|
<Select>
|
|
|
|
|
<Select.Option value='1'>客服组</Select.Option>
|
|
|
|
|
<Select.Option value='2'>产品组</Select.Option>
|
|
|
|
|
<Select.Option value='3'>国内供应商</Select.Option>
|
|
|
|
|
<Select.Option value='4'>海外供应商</Select.Option>
|
|
|
|
|
<Select.Option value='5'>技术研发部</Select.Option>
|
|
|
|
|
<Select.Option value='0' disabled>系统管理员</Select.Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
<Form.Item><Title level={2}>{t('account:management.newAccount')}</Title></Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.username')}
|
|
|
|
|
name='username'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.username'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.realname')}
|
|
|
|
|
name='realname'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.realname'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.email')}
|
|
|
|
|
name='email'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.email'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label={t('account:management.role')}>
|
|
|
|
|
<Select>
|
|
|
|
|
<Select.Option value='1'>客服组</Select.Option>
|
|
|
|
|
<Select.Option value='2'>产品组</Select.Option>
|
|
|
|
|
<Select.Option value='3'>国内供应商</Select.Option>
|
|
|
|
|
<Select.Option value='4'>海外供应商</Select.Option>
|
|
|
|
|
<Select.Option value='5'>技术研发部</Select.Option>
|
|
|
|
|
<Select.Option value='0' disabled>系统管理员</Select.Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
{/* Role Edit */}
|
|
|
|
|
<Modal
|
|
|
|
@ -309,51 +309,51 @@ function Management() {
|
|
|
|
|
open={isRoleModalOpen} onOk={handleRoleOk} onCancel={handleRoleCancel}
|
|
|
|
|
>
|
|
|
|
|
<Form
|
|
|
|
|
name='basic'
|
|
|
|
|
form={editRoleForm}
|
|
|
|
|
layout='vertical'
|
|
|
|
|
size='large'
|
|
|
|
|
style={{
|
|
|
|
|
maxWidth: 600,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
|
onFinishFailed={onFinishFailed}
|
|
|
|
|
autoComplete='off'
|
|
|
|
|
>
|
|
|
|
|
<Form.Item><Title level={2}>{t('account:management.newRole')}</Title></Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.roleName')}
|
|
|
|
|
name='roleName'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.roleName'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
name='basic'
|
|
|
|
|
form={editRoleForm}
|
|
|
|
|
layout='vertical'
|
|
|
|
|
size='large'
|
|
|
|
|
style={{
|
|
|
|
|
maxWidth: 600,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={onFinish}
|
|
|
|
|
onFinishFailed={onFinishFailed}
|
|
|
|
|
autoComplete='off'
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label={t('account:management.permission')}>
|
|
|
|
|
<TreeSelect treeData={permissionData} value={permissionValue}
|
|
|
|
|
dropdownStyle={{
|
|
|
|
|
maxHeight: 500,
|
|
|
|
|
overflow: 'auto',
|
|
|
|
|
}}
|
|
|
|
|
placement='bottomLeft'
|
|
|
|
|
showSearch
|
|
|
|
|
allowClear
|
|
|
|
|
multiple
|
|
|
|
|
treeDefaultExpandAll
|
|
|
|
|
treeLine={true}
|
|
|
|
|
onChange={onPermissionChange}
|
|
|
|
|
treeCheckable={true}
|
|
|
|
|
showCheckedStrategy={TreeSelect.SHOW_CHILD}
|
|
|
|
|
placeholder={'Please select'}
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
}} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
<Form.Item><Title level={2}>{t('account:management.newRole')}</Title></Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t('account:management.roleName')}
|
|
|
|
|
name='roleName'
|
|
|
|
|
rules={[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: t('account:Validation.roleName'),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label={t('account:management.permission')}>
|
|
|
|
|
<TreeSelect treeData={permissionData} value={permissionValue}
|
|
|
|
|
dropdownStyle={{
|
|
|
|
|
maxHeight: 500,
|
|
|
|
|
overflow: 'auto',
|
|
|
|
|
}}
|
|
|
|
|
placement='bottomLeft'
|
|
|
|
|
showSearch
|
|
|
|
|
allowClear
|
|
|
|
|
multiple
|
|
|
|
|
treeDefaultExpandAll
|
|
|
|
|
treeLine={true}
|
|
|
|
|
onChange={onPermissionChange}
|
|
|
|
|
treeCheckable={true}
|
|
|
|
|
showCheckedStrategy={TreeSelect.SHOW_CHILD}
|
|
|
|
|
placeholder={'Please select'}
|
|
|
|
|
style={{
|
|
|
|
|
width: '100%',
|
|
|
|
|
}} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Modal>
|
|
|
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
|
|
|
<Title level={3}>{t('account:management.tile')}</Title>
|
|
|
|
@ -401,9 +401,9 @@ function Management() {
|
|
|
|
|
showQuickJumper: true,
|
|
|
|
|
showLessItems: true,
|
|
|
|
|
showSizeChanger: true,
|
|
|
|
|
showTotal: (total) => { return `总数:${total}` }
|
|
|
|
|
showTotal: (total) => { return t('Total') + `:${total}` }
|
|
|
|
|
}}
|
|
|
|
|
onChange={(pagination) => {onSearchClick(pagination.current)}}
|
|
|
|
|
onChange={(pagination) => { onSearchClick(pagination.current) }}
|
|
|
|
|
columns={accountListColumns} dataSource={accountList}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|