|
@@ -96,6 +96,14 @@ function DutyRecord() {
|
|
function delRecord() {
|
|
function delRecord() {
|
|
post(api.delOfficialCapacityPage, { id: selectedRowKeys }).then((res) => {
|
|
post(api.delOfficialCapacityPage, { id: selectedRowKeys }).then((res) => {
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
|
|
+ //刷新列表
|
|
|
|
+ const totalPage = Math.ceil((total - selectedRowKeys.length) / size);
|
|
|
|
+ //将当前页码与删除数据之后的总页数进行比较,避免当前页码不存在
|
|
|
|
+ const pagenum =
|
|
|
|
+ params.current > totalPage ? totalPage : params.current;
|
|
|
|
+ //避免pagenum变为0
|
|
|
|
+ params.current = pagenum < 1 ? 1 : pagenum;
|
|
|
|
+ setParams(params)
|
|
//刷新列表
|
|
//刷新列表
|
|
getDutyRecord()
|
|
getDutyRecord()
|
|
} else {
|
|
} else {
|
|
@@ -183,23 +191,23 @@ function DutyRecord() {
|
|
>
|
|
>
|
|
<Row gutter={24}>
|
|
<Row gutter={24}>
|
|
<Col span={5} key={0}>
|
|
<Col span={5} key={0}>
|
|
- <Form.Item label="医生姓名" name="doctorName" rules={[{ max: 30, message: '不能超过30个字符' }]}>
|
|
|
|
- <Input placeholder="请输入" autoComplete='off' allowClear/>
|
|
|
|
|
|
+ <Form.Item label="医生姓名" name="doctorName">
|
|
|
|
+ <Input placeholder="请输入" autoComplete='off' allowClear maxLength='30'/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={5} key={1}>
|
|
<Col span={5} key={1}>
|
|
- <Form.Item label="科室" name="deptName" rules={[{ max: 30, message: '不能超过30个字符' }]}>
|
|
|
|
- <Input placeholder="请输入" autoComplete='off' allowClear/>
|
|
|
|
|
|
+ <Form.Item label="科室" name="deptName">
|
|
|
|
+ <Input placeholder="请输入" autoComplete='off' allowClear maxLength='30'/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={5} key={2}>
|
|
<Col span={5} key={2}>
|
|
- <Form.Item label="工号" name="doctorCode" rules={[{ max: 30, message: '不能超过30个字符' }]}>
|
|
|
|
- <Input placeholder="请输入" autoComplete='off' allowClear/>
|
|
|
|
|
|
+ <Form.Item label="工号" name="doctorCode">
|
|
|
|
+ <Input placeholder="请输入" autoComplete='off' allowClear maxLength='30'/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={5} key={3}>
|
|
<Col span={5} key={3}>
|
|
- <Form.Item label="职务/职称名称" name="name" rules={[{ max: 30, message: '不能超过30个字符' }]}>
|
|
|
|
- <Input placeholder="请输入" autoComplete='off' allowClear/>
|
|
|
|
|
|
+ <Form.Item label="职务/职称名称" name="name">
|
|
|
|
+ <Input placeholder="请输入" autoComplete='off' allowClear maxLength='30'/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
<Col span={5} key={4}>
|
|
<Col span={5} key={4}>
|