|
@@ -1,6 +1,6 @@
|
|
|
import React, { useState, useEffect, useRef } from 'react';
|
|
|
import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space, message } from 'antd';
|
|
|
-import { getCookie } from '@utils/index'
|
|
|
+import { getCookie,disabledDate } from '@utils/index'
|
|
|
import '@common/common.less';
|
|
|
import moment from "moment";
|
|
|
import "moment/locale/zh-cn"
|
|
@@ -8,7 +8,6 @@ import './index.less'
|
|
|
import apiObj from '@api/index';
|
|
|
import EditProblem from './editProblem';
|
|
|
import ProblemContext from './problem-context';
|
|
|
-import { disabledDate } from '@utils/index'
|
|
|
const { post, api, xPost } = apiObj;
|
|
|
const { RangePicker } = DatePicker;
|
|
|
const { Option } = Select;
|
|
@@ -17,7 +16,6 @@ function FieldProblem() {
|
|
|
getColumnResultPage();
|
|
|
getColumnResultNumber()
|
|
|
}, []);
|
|
|
- const [addVisible, setAddVisible] = useState(false); //新增页面显示
|
|
|
const [logList, setLogList] = useState([]);
|
|
|
const [total, setTotal] = useState(0);
|
|
|
const [type, setType] = useState(0);//1新增 2修改
|
|
@@ -26,10 +24,6 @@ function FieldProblem() {
|
|
|
const [current, setCurrent] = useState(1);
|
|
|
const [problemDetail, setProblemDetail] = useState(null);//详情数据
|
|
|
const [title, setTitle] = useState();//正则式数据
|
|
|
- const [regularList, setRegularList] = useState([]);//正则式数据
|
|
|
- const [tableList, setTableList] = useState([]);//表名称
|
|
|
- const [colList, setColList] = useState([]);//字段名称
|
|
|
- const [filedDetail, setFiledDetail] = useState(null);//详情数据
|
|
|
const [params, setParams] = useState({
|
|
|
pages: 1,
|
|
|
current: 1,
|
|
@@ -52,25 +46,12 @@ function FieldProblem() {
|
|
|
})
|
|
|
}
|
|
|
function getColumnResultNumber() {
|
|
|
- post(api.getColumnResultNumber, { hospitalId: 4 }).then((res) => {
|
|
|
+ post(api.getColumnResultNumber, { hospitalId: getCookie('hospitalId') }).then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
const data = res.data.data;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- //获取正则式名称
|
|
|
- function getRegular(name) {
|
|
|
- const param = {
|
|
|
- name: name || ''
|
|
|
- }
|
|
|
- post(api.getRegular, param).then((res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- const data = res.data.data;
|
|
|
- setRegularList(data);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
//修改
|
|
|
function showModal(title, row, type) {
|