|
@@ -1,6 +1,7 @@
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
|
|
import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
|
|
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
|
|
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
|
|
|
|
+import { getCookie } from '@utils/index'
|
|
import '@common/common.less';
|
|
import '@common/common.less';
|
|
import apiObj from '@api/index';
|
|
import apiObj from '@api/index';
|
|
// import AddRules from './addRules';
|
|
// import AddRules from './addRules';
|
|
@@ -9,9 +10,10 @@ import { message } from "antd/lib/index";
|
|
const { post, api, xPost } = apiObj;
|
|
const { post, api, xPost } = apiObj;
|
|
const { RangePicker } = DatePicker;
|
|
const { RangePicker } = DatePicker;
|
|
const { Option } = Select;
|
|
const { Option } = Select;
|
|
-function FieldRules() {
|
|
|
|
|
|
+function FieldProblem() {
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
getColumnResultPage();
|
|
getColumnResultPage();
|
|
|
|
+ getColumnResultNumber()
|
|
}, []);
|
|
}, []);
|
|
const [addVisible, setAddVisible] = useState(false); //新增页面显示
|
|
const [addVisible, setAddVisible] = useState(false); //新增页面显示
|
|
const [logList, setLogList] = useState([]);
|
|
const [logList, setLogList] = useState([]);
|
|
@@ -21,7 +23,6 @@ function FieldRules() {
|
|
const [size, setSize] = useState(15);
|
|
const [size, setSize] = useState(15);
|
|
const [current, setCurrent] = useState(1);
|
|
const [current, setCurrent] = useState(1);
|
|
const [regularList, setRegularList] = useState([]);//正则式数据
|
|
const [regularList, setRegularList] = useState([]);//正则式数据
|
|
- const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
|
|
const [tableList, setTableList] = useState([]);//表名称
|
|
const [tableList, setTableList] = useState([]);//表名称
|
|
const [colList, setColList] = useState([]);//字段名称
|
|
const [colList, setColList] = useState([]);//字段名称
|
|
const [filedDetail, setFiledDetail] = useState(null);//详情数据
|
|
const [filedDetail, setFiledDetail] = useState(null);//详情数据
|
|
@@ -46,6 +47,13 @@ function FieldRules() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ function getColumnResultNumber() {
|
|
|
|
+ post(api.getColumnResultNumber, { hospitalId: getCookie('hospitalId') }).then((res) => {
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
+ const data = res.data.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
//获取正则式名称
|
|
//获取正则式名称
|
|
function getRegular(name) {
|
|
function getRegular(name) {
|
|
const param = {
|
|
const param = {
|
|
@@ -136,12 +144,6 @@ function FieldRules() {
|
|
setCurrent(page)
|
|
setCurrent(page)
|
|
getColumnResultPage()
|
|
getColumnResultPage()
|
|
}
|
|
}
|
|
- function onTypeChange() {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- function onSelectChange(selectedRowKeys) {
|
|
|
|
- setSelectedRowKeys(selectedRowKeys);
|
|
|
|
- };
|
|
|
|
//返回
|
|
//返回
|
|
function goBack() {
|
|
function goBack() {
|
|
setAddVisible(false);
|
|
setAddVisible(false);
|
|
@@ -180,7 +182,7 @@ function FieldRules() {
|
|
{ title: '上传字段值', dataIndex: 'optimizeCountSql', key: 'optimizeCountSql' },
|
|
{ title: '上传字段值', dataIndex: 'optimizeCountSql', key: 'optimizeCountSql' },
|
|
{ title: '备注', dataIndex: 'standardValue', key: 'standardValue' },
|
|
{ title: '备注', dataIndex: 'standardValue', key: 'standardValue' },
|
|
{ title: '问题类型', dataIndex: 'regularName', key: 'regularName' },
|
|
{ title: '问题类型', dataIndex: 'regularName', key: 'regularName' },
|
|
- { title: '更新事件', dataIndex: 'regularName', key: 'regularName' },
|
|
|
|
|
|
+ { title: '更新时间', dataIndex: 'regularName', key: 'regularName' },
|
|
{
|
|
{
|
|
title: '状态', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
|
|
title: '状态', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
|
|
return record.isSolved == 1 ? "已解决" : "未解决";
|
|
return record.isSolved == 1 ? "已解决" : "未解决";
|
|
@@ -194,10 +196,7 @@ function FieldRules() {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
];
|
|
];
|
|
- const rowSelection = {
|
|
|
|
- selectedRowKeys,
|
|
|
|
- onChange: onSelectChange,
|
|
|
|
- };
|
|
|
|
|
|
+
|
|
// if (addVisible && filedDetail) {
|
|
// if (addVisible && filedDetail) {
|
|
// return (
|
|
// return (
|
|
// <FiledContext.Provider value={{ type, save: addSubFiled, detail: filedDetail }}>
|
|
// <FiledContext.Provider value={{ type, save: addSubFiled, detail: filedDetail }}>
|
|
@@ -262,7 +261,6 @@ function FieldRules() {
|
|
<Form.Item label="是否必填" name="isRequired">
|
|
<Form.Item label="是否必填" name="isRequired">
|
|
<Select
|
|
<Select
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- onChange={onTypeChange}
|
|
|
|
allowClear
|
|
allowClear
|
|
>
|
|
>
|
|
<Option value="1" key={1}>是</Option>
|
|
<Option value="1" key={1}>是</Option>
|
|
@@ -275,7 +273,7 @@ function FieldRules() {
|
|
<Input placeholder="请输入" autoComplete='off' />
|
|
<Input placeholder="请输入" autoComplete='off' />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|
|
- <Col span={7} key={6}>
|
|
|
|
|
|
+ <Col span={5} key={6}>
|
|
<Form.Item label="正则名称" name="regularName">
|
|
<Form.Item label="正则名称" name="regularName">
|
|
<Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
|
|
<Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
|
|
{regularList.map((item) => {
|
|
{regularList.map((item) => {
|
|
@@ -311,7 +309,6 @@ function FieldRules() {
|
|
|
|
|
|
<Table
|
|
<Table
|
|
columns={columns}
|
|
columns={columns}
|
|
- rowSelection={rowSelection}
|
|
|
|
scroll={{ y: 'calc(100vh - 380px)' }}
|
|
scroll={{ y: 'calc(100vh - 380px)' }}
|
|
dataSource={logList}
|
|
dataSource={logList}
|
|
rowKey={record => record.columnId}
|
|
rowKey={record => record.columnId}
|
|
@@ -331,4 +328,4 @@ function FieldRules() {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
-export default FieldRules;
|
|
|
|
|
|
+export default FieldProblem;
|