update 调整大量细节
This commit is contained in:
@@ -109,7 +109,7 @@ export default class form extends Component {
|
||||
//#region 从后端转换成前段所需格式
|
||||
const orgData = await this.loadOrgData()
|
||||
const posData = await this.loadPosData()
|
||||
const codes = await getDicData('org_type')
|
||||
const codes = await getDictData('org_type')
|
||||
|
||||
// 日期特殊处理
|
||||
if (this.record.birthday) {
|
||||
@@ -278,101 +278,95 @@ export default class form extends Component {
|
||||
<Spin
|
||||
spinning={this.state.loading}
|
||||
indicator={<AntIcon type="loading" />}>
|
||||
<Row gutter={16}>
|
||||
<Col span={10}>
|
||||
<h3 className="h3t">基本信息</h3>
|
||||
<div className="yo-form-group">
|
||||
<Form.Item label="账号" name="account" rules={[{ required: true, message: '请输入账号', trigger: 'blur' }]}>
|
||||
<Input autoComplete="off" placeholder="请输入账号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="姓名" name="name" rules={[{ required: true, message: '请输入姓名', trigger: 'blur' }]}>
|
||||
<Input autoComplete="off" placeholder="请输入姓名" />
|
||||
</Form.Item>
|
||||
{this.props.mode == 'add' && <>
|
||||
<Form.Item label="密码" name="password" rules={[{ required: true, message: '请输入密码', trigger: 'blur' }]}>
|
||||
<Input.Password autoComplete="off" placeholder="请输入密码" />
|
||||
</Form.Item>
|
||||
<Form.Item label="确认密码" name="confirm" rules={[{ required: true, message: '请确认密码', trigger: 'blur' }]}>
|
||||
<Input.Password autoComplete="off" placeholder="请确认密码" />
|
||||
</Form.Item>
|
||||
</>
|
||||
<h3 className="h3">基本信息</h3>
|
||||
<div className="yo-form-group">
|
||||
<Form.Item label="账号" name="account" rules={[{ required: true, message: '请输入账号', trigger: 'blur' }]}>
|
||||
<Input autoComplete="off" placeholder="请输入账号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="姓名" name="name" rules={[{ required: true, message: '请输入姓名', trigger: 'blur' }]}>
|
||||
<Input autoComplete="off" placeholder="请输入姓名" />
|
||||
</Form.Item>
|
||||
{this.props.mode == 'add' && <>
|
||||
<Form.Item label="密码" name="password" rules={[{ required: true, message: '请输入密码', trigger: 'blur' }]}>
|
||||
<Input.Password autoComplete="off" placeholder="请输入密码" />
|
||||
</Form.Item>
|
||||
<Form.Item label="确认密码" name="confirm" rules={[{ required: true, message: '请确认密码', trigger: 'blur' }]}>
|
||||
<Input.Password autoComplete="off" placeholder="请确认密码" />
|
||||
</Form.Item>
|
||||
</>
|
||||
}
|
||||
<Form.Item label="昵称" name="nickName" >
|
||||
<Input autoComplete="off" placeholder="请输入昵称" />
|
||||
</Form.Item>
|
||||
<Form.Item label="生日" name="birthday" >
|
||||
<DatePicker className="w-100-p" />
|
||||
</Form.Item>
|
||||
<Form.Item label="性别" name="sex" >
|
||||
<Radio.Group >
|
||||
<Radio.Button value={0}>
|
||||
<AntIcon className="mr-xxs" type="stop" />
|
||||
<span>保密</span>
|
||||
</Radio.Button>
|
||||
<Radio.Button value={1}>
|
||||
<AntIcon style={{ color: '#1890ff' }} className="mr-xxs" type="man" />
|
||||
<span>男</span>
|
||||
</Radio.Button>
|
||||
<Radio.Button value={2}>
|
||||
<AntIcon style={{ color: '#eb2f96' }} className="mr-xxs" type="woman" />
|
||||
<span>女</span>
|
||||
</Radio.Button>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label="邮箱" name="email" >
|
||||
<Input autoComplete="off" placeholder="请输入邮箱" />
|
||||
</Form.Item>
|
||||
<Form.Item label="手机号" name="phone" >
|
||||
<Input autoComplete="off" placeholder="请输入手机号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="电话" name="tel" >
|
||||
<Input autoComplete="off" placeholder="请输入电话" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
<h3 className="h3">员工信息</h3>
|
||||
<div className="yo-form-group">
|
||||
<Form.Item
|
||||
label="所属组织机构"
|
||||
name={['sysEmpParam', 'orgId']}
|
||||
rules={[{ required: true, message: '所属组织机构' }]}>
|
||||
<TreeSelect
|
||||
treeData={this.state.options.orgData}
|
||||
dropdownStyle={{ maxHeight: '300px', overflow: 'auto' }}
|
||||
treeDefaultExpandAll
|
||||
placeholder="请选择所属组织机构"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="工号"
|
||||
name={['sysEmpParam', 'jobNum']} >
|
||||
<Input
|
||||
autoComplete="off"
|
||||
placeholder="请输入工号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="职位信息" name={['sysEmpParam', 'posIdList']}>
|
||||
<Select
|
||||
mode="multiple"
|
||||
placeholder="请选择职位信息">
|
||||
{
|
||||
this.state.options.posData.map(item => {
|
||||
return <Select.Option
|
||||
key={item.id}
|
||||
value={item.id}
|
||||
>
|
||||
{item.name}</Select.Option>
|
||||
})
|
||||
}
|
||||
<Form.Item label="昵称" name="nickName" >
|
||||
<Input autoComplete="off" placeholder="请输入昵称" />
|
||||
</Form.Item>
|
||||
<Form.Item label="生日" name="birthday" >
|
||||
<DatePicker className="w-100-p" />
|
||||
</Form.Item>
|
||||
<Form.Item label="性别" name="sex" >
|
||||
<Radio.Group >
|
||||
<Radio.Button value={0}>
|
||||
<AntIcon className="mr-xxs" type="stop" />
|
||||
<span>保密</span>
|
||||
</Radio.Button>
|
||||
<Radio.Button value={1}>
|
||||
<AntIcon style={{ color: '#1890ff' }} className="mr-xxs" type="man" />
|
||||
<span>男</span>
|
||||
</Radio.Button>
|
||||
<Radio.Button value={2}>
|
||||
<AntIcon style={{ color: '#eb2f96' }} className="mr-xxs" type="woman" />
|
||||
<span>女</span>
|
||||
</Radio.Button>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label="邮箱" name="email" >
|
||||
<Input autoComplete="off" placeholder="请输入邮箱" />
|
||||
</Form.Item>
|
||||
<Form.Item label="手机号" name="phone" >
|
||||
<Input autoComplete="off" placeholder="请输入手机号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="电话" name="tel" >
|
||||
<Input autoComplete="off" placeholder="请输入电话" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={14}>
|
||||
<h3 className="h3t">员工信息</h3>
|
||||
<div className="yo-form-group">
|
||||
<Form.Item
|
||||
label="所属组织机构"
|
||||
name={['sysEmpParam', 'orgId']}
|
||||
rules={[{ required: true, message: '所属组织机构' }]}>
|
||||
<TreeSelect
|
||||
treeData={this.state.options.orgData}
|
||||
dropdownStyle={{ maxHeight: '300px', overflow: 'auto' }}
|
||||
treeDefaultExpandAll
|
||||
placeholder="请选择所属组织机构"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="工号"
|
||||
name={['sysEmpParam', 'jobNum']} >
|
||||
<Input
|
||||
autoComplete="off"
|
||||
placeholder="请输入工号" />
|
||||
</Form.Item>
|
||||
<Form.Item label="职位信息" name={['sysEmpParam', 'posIdList']}>
|
||||
<Select
|
||||
mode="multiple"
|
||||
placeholder="请选择职位信息">
|
||||
{
|
||||
this.state.options.posData.map(item => {
|
||||
return <Select.Option
|
||||
key={item.id}
|
||||
value={item.id}
|
||||
>
|
||||
{item.name}</Select.Option>
|
||||
})
|
||||
}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</div>
|
||||
{/* <h4 className="h4">附加信息</h4>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</div>
|
||||
{/* <h4 className="h4">附加信息</h4>
|
||||
<div className="pl-md pr-md">
|
||||
{this.renderExtInfoTable()}
|
||||
</div> */}
|
||||
</Col>
|
||||
</Row>
|
||||
</Spin>
|
||||
</Form>
|
||||
)
|
||||
|
||||
@@ -301,7 +301,6 @@ export default class index extends Component {
|
||||
action={apiAction.add}
|
||||
ref={this.addForm}
|
||||
onSuccess={() => this.list.current.onReloadData()}
|
||||
width={1100}
|
||||
>
|
||||
<FormBody mode="add" />
|
||||
</ModalForm>
|
||||
@@ -311,7 +310,6 @@ export default class index extends Component {
|
||||
action={apiAction.edit}
|
||||
ref={this.editForm}
|
||||
onSuccess={() => this.list.current.onReloadData()}
|
||||
width={1100}
|
||||
>
|
||||
<FormBody mode="edit" />
|
||||
</ModalForm>
|
||||
|
||||
Reference in New Issue
Block a user