Commit c43fa49d by zhaochengxiang

去除警告

parent da5afbb9
...@@ -11,7 +11,7 @@ import { DataModelerRoleAdmin, DataModelerRoleUser, DataModelerRoleReader } from ...@@ -11,7 +11,7 @@ import { DataModelerRoleAdmin, DataModelerRoleUser, DataModelerRoleReader } from
//内网深交所环境 isSzseEnv true //内网深交所环境 isSzseEnv true
//元曜公网环境 isSzseEnv false //元曜公网环境 isSzseEnv false
export const isSzseEnv = false; export const isSzseEnv = true;
export const inputWidth = isSzseEnv?360:240; export const inputWidth = isSzseEnv?360:240;
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Button, Upload, Drawer, Table, Pagination, Form, Tooltip, Typography, Space, Spin } from 'antd'; import { Button, Upload, Drawer, Pagination, Form, Spin } from 'antd';
import { UploadOutlined, DownloadOutlined } from '@ant-design/icons'; import { UploadOutlined, DownloadOutlined } from '@ant-design/icons';
import ResizeableTable from '../../../ResizeableTable'; import ResizeableTable from '../../../ResizeableTable';
import { dispatch, dispatchLatest } from '../../../../../model'; import { dispatch, dispatchLatest } from '../../../../../model';
import { showMessage, formatDate } from '../../../../../util'; import { showMessage, formatDate } from '../../../../../util';
const { Text } = Typography;
const ExpandedRow = (props) => { const ExpandedRow = (props) => {
const {data} = props; const {data} = props;
...@@ -16,6 +14,7 @@ const ExpandedRow = (props) => { ...@@ -16,6 +14,7 @@ const ExpandedRow = (props) => {
useEffect(() => { useEffect(() => {
getLog(); getLog();
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [data]) }, [data])
const getLog = () => { const getLog = () => {
...@@ -51,7 +50,7 @@ const ImportDataDrawer = (props) => { ...@@ -51,7 +50,7 @@ const ImportDataDrawer = (props) => {
const { pageNum, pageSize } = pagination; const { pageNum, pageSize } = pagination;
const [ total, setTotal ] = useState(0); const [ total, setTotal ] = useState(0);
const cols = [ const columns = [
{ {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
...@@ -105,8 +104,6 @@ const ImportDataDrawer = (props) => { ...@@ -105,8 +104,6 @@ const ImportDataDrawer = (props) => {
} }
] ]
const [ columns, setColumns ] = useState(cols);
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
setPagination({ pageNum: 1, pageSize: 20 }); setPagination({ pageNum: 1, pageSize: 20 });
...@@ -118,6 +115,7 @@ const ImportDataDrawer = (props) => { ...@@ -118,6 +115,7 @@ const ImportDataDrawer = (props) => {
if (visible) { if (visible) {
getLogs(); getLogs();
} }
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [pagination]) }, [pagination])
const getLogs = () => { const getLogs = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment