|
@@ -1,6 +1,6 @@
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
import { useSelector, useDispatch } from 'react-redux';
|
|
-import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space, message } from 'antd';
|
|
|
|
|
|
+import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space, message, Spin } from 'antd';
|
|
import '@common/common.less';
|
|
import '@common/common.less';
|
|
import moment from "moment";
|
|
import moment from "moment";
|
|
import "moment/locale/zh-cn"
|
|
import "moment/locale/zh-cn"
|
|
@@ -12,13 +12,14 @@ import { getValueFromEvent, disabledDate, getDaysBetween } from '@utils/index'
|
|
const { post, api, xPost } = apiObj;
|
|
const { post, api, xPost } = apiObj;
|
|
const { Option } = Select;
|
|
const { Option } = Select;
|
|
function FieldProblem() {
|
|
function FieldProblem() {
|
|
-
|
|
|
|
|
|
+
|
|
const [logList, setLogList] = useState([]);
|
|
const [logList, setLogList] = useState([]);
|
|
const [total, setTotal] = useState(0);
|
|
const [total, setTotal] = useState(0);
|
|
const [type, setType] = useState(0);//1新增 2修改
|
|
const [type, setType] = useState(0);//1新增 2修改
|
|
const [visible, setVisible] = useState(false);
|
|
const [visible, setVisible] = useState(false);
|
|
const [size, setSize] = useState(15);
|
|
const [size, setSize] = useState(15);
|
|
const [current, setCurrent] = useState(1);
|
|
const [current, setCurrent] = useState(1);
|
|
|
|
+ const [loading, setLoading] = useState(false);
|
|
const [probleData, setProbleData] = useState({});
|
|
const [probleData, setProbleData] = useState({});
|
|
const [problemDetail, setProblemDetail] = useState(null);//详情数据
|
|
const [problemDetail, setProblemDetail] = useState(null);//详情数据
|
|
const [title, setTitle] = useState();//正则式数据
|
|
const [title, setTitle] = useState();//正则式数据
|
|
@@ -47,22 +48,29 @@ function FieldProblem() {
|
|
behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:59:59'
|
|
behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:59:59'
|
|
}
|
|
}
|
|
const { problemNum } = useSelector((state) => {
|
|
const { problemNum } = useSelector((state) => {
|
|
- return state.userInfo;
|
|
|
|
- });
|
|
|
|
|
|
+ return state.userInfo;
|
|
|
|
+ });
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
+ setCurrent(1)
|
|
|
|
+ setParams(data)
|
|
form.resetFields();
|
|
form.resetFields();
|
|
- getColumnResultPage();
|
|
|
|
|
|
+ getColumnResultPage(data);
|
|
getColumnResultNumber(date)
|
|
getColumnResultNumber(date)
|
|
getModeName()
|
|
getModeName()
|
|
}, [problemNum]);
|
|
}, [problemNum]);
|
|
//表格数据
|
|
//表格数据
|
|
function getColumnResultPage(param) {
|
|
function getColumnResultPage(param) {
|
|
|
|
+ const hide = message.loading('加载中...', 0);
|
|
post(api.getColumnResultPage, param || params).then((res) => {
|
|
post(api.getColumnResultPage, param || params).then((res) => {
|
|
|
|
+ hide()
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
const data = res.data.data;
|
|
const data = res.data.data;
|
|
setLogList(data.records);
|
|
setLogList(data.records);
|
|
setTotal(data.total)
|
|
setTotal(data.total)
|
|
|
|
+ setLoading(false)
|
|
}
|
|
}
|
|
|
|
+ }).catch((err) => {
|
|
|
|
+ hide()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
function getColumnResultNumber(param) {
|
|
function getColumnResultNumber(param) {
|
|
@@ -258,17 +266,15 @@ function FieldProblem() {
|
|
<Input placeholder="请输入" autoComplete='off' allowClear maxLength='30' />
|
|
<Input placeholder="请输入" autoComplete='off' allowClear maxLength='30' />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
- <Col span={5} key={4}>
|
|
|
|
- <Form.Item label="质控模块名称" name="modeName" >
|
|
|
|
- <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
|
|
|
|
- {modeList.map((item, i) => {
|
|
|
|
- return (
|
|
|
|
- <Option value={item} key={i}>{item}</Option>
|
|
|
|
- )
|
|
|
|
- })}
|
|
|
|
- </Select>
|
|
|
|
- </Form.Item>
|
|
|
|
- </Col>
|
|
|
|
|
|
+ <Form.Item label="质控模块名称" name="modeName" >
|
|
|
|
+ <Select showSearch allowClear onSearch={onSearch} placeholder="请选择" style={{ width: '159px' }}>
|
|
|
|
+ {modeList.map((item, i) => {
|
|
|
|
+ return (
|
|
|
|
+ <Option value={item} key={i}>{item}</Option>
|
|
|
|
+ )
|
|
|
|
+ })}
|
|
|
|
+ </Select>
|
|
|
|
+ </Form.Item>
|
|
<Col span={4} key={5}>
|
|
<Col span={4} key={5}>
|
|
<Form.Item label="问题类型" name="type">
|
|
<Form.Item label="问题类型" name="type">
|
|
<Select
|
|
<Select
|
|
@@ -370,6 +376,7 @@ function FieldProblem() {
|
|
onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
|
|
onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
|
|
total: total
|
|
total: total
|
|
}} />
|
|
}} />
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{visible && problemDetail ?
|
|
{visible && problemDetail ?
|