替换 useHistory
This commit is contained in:
@ -2,7 +2,7 @@ import { isNotEmpty } from '@/utils/CommonUtils';
|
|||||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import { Button, Spin, message, Popconfirm } from 'antd';
|
import { Button, Spin, message, Popconfirm } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import ManuPlatformModal from './modal/ManuPlatformModal';
|
import ManuPlatformModal from './modal/ManuPlatformModal';
|
||||||
import { getManuPlatformList, deleteManuPlatformInfo } from './service';
|
import { getManuPlatformList, deleteManuPlatformInfo } from './service';
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ const ManuPlatformModalManage: React.FC<{}> = () => {
|
|||||||
const [spin, spinSet] = useState<boolean>(false);
|
const [spin, spinSet] = useState<boolean>(false);
|
||||||
const [visible, setVisible] = useState<boolean>(false);
|
const [visible, setVisible] = useState<boolean>(false);
|
||||||
const manuPlatformInfo = useRef<any>();
|
const manuPlatformInfo = useRef<any>();
|
||||||
// const history = useHistory();
|
|
||||||
const manuPlatformModalRef = useRef<any>(null);
|
const manuPlatformModalRef = useRef<any>(null);
|
||||||
//编辑
|
//编辑
|
||||||
const editManuPlatform = (record: any) => {
|
const editManuPlatform = (record: any) => {
|
||||||
|
@ -3,7 +3,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin, message, Popconfirm } from 'antd';
|
import { Button, Spin, message, Popconfirm } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import AreasModal from './modal/AreasModal';
|
import AreasModal from './modal/AreasModal';
|
||||||
import { getAreasPage, deleteAreasInfo } from '../service';
|
import { getAreasPage, deleteAreasInfo } from '../service';
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ const AreasManage: React.FC<{}> = () => {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
// const history = useHistory();
|
|
||||||
const areasModalRef = useRef<any>(null);
|
const areasModalRef = useRef<any>(null);
|
||||||
//编辑
|
//编辑
|
||||||
const editAreas = (record: any) => {
|
const editAreas = (record: any) => {
|
||||||
|
@ -3,7 +3,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin, message, Popconfirm } from 'antd';
|
import { Button, Spin, message, Popconfirm } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import PlaceModal from './modal/PlaceModal';
|
import PlaceModal from './modal/PlaceModal';
|
||||||
import { getPlacePage, deletePlaceInfo } from '../service';
|
import { getPlacePage, deletePlaceInfo } from '../service';
|
||||||
import PcaSelect from './PcaSelect';
|
import PcaSelect from './PcaSelect';
|
||||||
@ -44,7 +44,7 @@ const PlaceManage: React.FC<{}> = () => {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
// const history = useHistory();
|
|
||||||
const placeModalRef = useRef<any>(null);
|
const placeModalRef = useRef<any>(null);
|
||||||
//编辑
|
//编辑
|
||||||
const editPlace = (record: any) => {
|
const editPlace = (record: any) => {
|
||||||
|
@ -3,7 +3,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin, message } from 'antd';
|
import { Button, Spin, message } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import ViewModal from '../../ViewModal';
|
import ViewModal from '../../ViewModal';
|
||||||
import { getPage } from '../../service';
|
import { getPage } from '../../service';
|
||||||
import { btnAuthority } from '@/utils/authority';
|
import { btnAuthority } from '@/utils/authority';
|
||||||
@ -20,7 +20,7 @@ const OnlineSupervision: React.FC<{}> = () => {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
// const history = useHistory();
|
|
||||||
const viewModalRef = useRef(null);
|
const viewModalRef = useRef(null);
|
||||||
//查看详情
|
//查看详情
|
||||||
const viewDetails = (record: any) => {
|
const viewDetails = (record: any) => {
|
||||||
|
@ -3,7 +3,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin } from 'antd';
|
import { Button, Spin } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import ViewModal from '../../ViewModal';
|
import ViewModal from '../../ViewModal';
|
||||||
import { getPage } from '../../service';
|
import { getPage } from '../../service';
|
||||||
import { btnAuthority } from '@/utils/authority';
|
import { btnAuthority } from '@/utils/authority';
|
||||||
@ -21,7 +21,7 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
// const history = useHistory();
|
|
||||||
const viewModalRef = useRef(null);
|
const viewModalRef = useRef(null);
|
||||||
|
|
||||||
//查看详情
|
//查看详情
|
||||||
|
@ -3,7 +3,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin, message, Card } from 'antd';
|
import { Button, Spin, message, Card } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import ViewModal from '../ViewModal';
|
import ViewModal from '../ViewModal';
|
||||||
import { getPage } from '../service';
|
import { getPage } from '../service';
|
||||||
import { btnAuthority } from '@/utils/authority';
|
import { btnAuthority } from '@/utils/authority';
|
||||||
@ -20,7 +20,7 @@ const PostSupervision: React.FC<{}> = () => {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
// const history = useHistory();
|
|
||||||
const viewModalRef = useRef(null);
|
const viewModalRef = useRef(null);
|
||||||
|
|
||||||
//查看详情
|
//查看详情
|
||||||
|
@ -4,7 +4,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Spin } from 'antd';
|
import { Button, Spin } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { getPage } from '../service';
|
import { getPage } from '../service';
|
||||||
|
|
||||||
interface ProjectManageProps {
|
interface ProjectManageProps {
|
||||||
@ -35,7 +35,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
const procurementTypeEntrust = 'procurement_type=entrust';
|
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||||
//采购方式
|
//采购方式
|
||||||
const procurementModeEntrust = 'procurement_mode=entrust';
|
const procurementModeEntrust = 'procurement_mode=entrust';
|
||||||
// const history = useHistory();
|
|
||||||
|
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { queryingPagingData } from '@/utils/PageUtils';
|
import { queryingPagingData } from '@/utils/PageUtils';
|
||||||
import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils';
|
import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } from '@/utils/session';
|
import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } from '@/utils/session';
|
||||||
import ExceptionHandling from './ExceptionHandling/ExceptionHandling';
|
import ExceptionHandling from './ExceptionHandling/ExceptionHandling';
|
||||||
import { Button, Card, Col, Popover, Progress, Row, Tag, message } from 'antd';
|
import { Button, Card, Col, Popover, Progress, Row, Tag, message } from 'antd';
|
||||||
@ -37,7 +37,7 @@ const ProjectDocumentation: React.FC = () => {
|
|||||||
//获取字典
|
//获取字典
|
||||||
const getDict: any = getDicData();
|
const getDict: any = getDicData();
|
||||||
const dictData = JSON.parse(getDict);
|
const dictData = JSON.parse(getDict);
|
||||||
// const history = useHistory();
|
|
||||||
/**
|
/**
|
||||||
* proList信息
|
* proList信息
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Card, PageHeader } from 'antd';
|
import { Button, Card, PageHeader } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import kefu from '@/assets/img/kefu.png' //智慧客服
|
import kefu from '@/assets/img/kefu.png' //智慧客服
|
||||||
import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服
|
import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服
|
||||||
const PurchasingManagerEnquiries: React.FC = () => {
|
const PurchasingManagerEnquiries: React.FC = () => {
|
||||||
@ -30,7 +30,7 @@ const PurchasingManagerEnquiries: React.FC = () => {
|
|||||||
const procurementTypeEntrust = 'procurement_type=entrust';
|
const procurementTypeEntrust = 'procurement_type=entrust';
|
||||||
//采购方式
|
//采购方式
|
||||||
const procurementModeEntrust = 'procurement_mode=entrust';
|
const procurementModeEntrust = 'procurement_mode=entrust';
|
||||||
// const history = useHistory();
|
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
|
@ -4,7 +4,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, message, Popconfirm, Spin, Space, Tag } from 'antd';
|
import { Button, message, Popconfirm, Spin, Space, Tag } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { getFavoritesList, removePublic, toPublic, updateReadStatus } from '../service';
|
import { getFavoritesList, removePublic, toPublic, updateReadStatus } from '../service';
|
||||||
|
|
||||||
interface FavoritesListProps {
|
interface FavoritesListProps {
|
||||||
@ -43,7 +43,7 @@ const FavoritesList: React.FC<FavoritesListProps> = (props) => {
|
|||||||
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
|
|
||||||
|
|
||||||
// const history = useHistory();
|
|
||||||
const ref = useRef<ActionType>();
|
const ref = useRef<ActionType>();
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, message, Space, Spin, Tag } from 'antd';
|
import { Button, message, Space, Spin, Tag } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { getPage, removePublic, toPublic } from '../service';
|
import { getPage, removePublic, toPublic } from '../service';
|
||||||
|
|
||||||
interface ProjectManageProps {
|
interface ProjectManageProps {
|
||||||
@ -42,7 +42,7 @@ const ProjectManage: React.FC<ProjectManageProps> = (props) => {
|
|||||||
//选中
|
//选中
|
||||||
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
const [selectedRows, setSelectedRows] = useState<any[]>([]);
|
||||||
|
|
||||||
// const history = useHistory();
|
|
||||||
const ref = useRef<ActionType>();
|
const ref = useRef<ActionType>();
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import ProTable from '@ant-design/pro-table';
|
|||||||
import tableProps from '@/utils/tableProps';
|
import tableProps from '@/utils/tableProps';
|
||||||
import { Button, Card, Checkbox, Form, Input, message, Modal } from 'antd';
|
import { Button, Card, Checkbox, Form, Input, message, Modal } from 'antd';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useHistory } from '@umijs/max';
|
import { history } from '@umijs/max';
|
||||||
import { getBidMethodDictTypeCode, getProTypeCodeByBidMethodDict, isNotEmpty } from './CommonUtils';
|
import { getBidMethodDictTypeCode, getProTypeCodeByBidMethodDict, isNotEmpty } from './CommonUtils';
|
||||||
import { queryingPagingData } from './PageUtils';
|
import { queryingPagingData } from './PageUtils';
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ const IParticipateIn: React.FC<IParticipateInItem> = (props) => {
|
|||||||
const [sectionCheckbox, setSectionCheckbox] = useState<any[]>();
|
const [sectionCheckbox, setSectionCheckbox] = useState<any[]>();
|
||||||
//采购方式
|
//采购方式
|
||||||
const [bidMethodDict, setBidMethodDict] = useState<string>('');
|
const [bidMethodDict, setBidMethodDict] = useState<string>('');
|
||||||
// const history = useHistory();
|
|
||||||
//联系人数据
|
//联系人数据
|
||||||
const [contactsItem, setContactsItem] = useState<any>(null);
|
const [contactsItem, setContactsItem] = useState<any>(null);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Reference in New Issue
Block a user