提交 33beec33 authored 作者: 钟是志's avatar 钟是志

29573 当前位置: 违纪管理/违纪上报(辅导员),100086 下面这个模块做个超链接 搞到这儿来

上级 d91547e3
...@@ -140,7 +140,7 @@ class AffairPage extends React.Component { ...@@ -140,7 +140,7 @@ class AffairPage extends React.Component {
handleButtonSet = () => { handleButtonSet = () => {
const { const {
canApply, canApply,
otherButtons = [] otherButtons = [],
} = this.props; } = this.props;
const { allConfigSetInfo } = this.state; const { allConfigSetInfo } = this.state;
if (!allConfigSetInfo) { if (!allConfigSetInfo) {
......
/**
* 钟是志
* 2022年9月15日
* onestopApp1.0
* */
import React, { useEffect, useState, createContext, useRef } from 'react'; import React, { useEffect, useState, createContext, useRef } from 'react';
import CheckRecord from '@/webPublic/FormInsertDiy/ExportComponent/CheckRecord'; // 查询类 import CheckRecord from '@/webPublic/FormInsertDiy/ExportComponent/CheckRecord'; // 查询类
import Apply from '@/webPublic/FormInsertDiy/AffairPage/ApplyPage'; // 申请 import Apply from '@/webPublic/FormInsertDiy/AffairPage/ApplyPage'; // 申请
...@@ -6,8 +11,7 @@ import Audit from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/index.js'; // ...@@ -6,8 +11,7 @@ import Audit from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/index.js'; //
import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情 import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情
import { Modal, message, notification, Popconfirm } from 'antd'; import { Modal, message, notification, Popconfirm } from 'antd';
import { connect } from 'dva'; import { connect } from 'dva';
import config from '@/config/config'; import router from 'umi/router';
import { getToken } from '@/webPublic/one_stop_public/utils/getToken';
export const CreateC = createContext({ export const CreateC = createContext({
routerConfig: {}, routerConfig: {},
...@@ -28,7 +32,8 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) { ...@@ -28,7 +32,8 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
const [show, setShow] = useState(false); const [show, setShow] = useState(false);
useEffect( useEffect(
() => { () => {
if ((appId || record.id) && refType.current?.component === component) { // 当同一个组件渲染时 切换show 保证重新调接口并渲染页面 if ((appId || record.id) && refType.current?.component === component) {
// 当同一个组件渲染时 切换show 保证重新调接口并渲染页面
setShow(false); setShow(false);
setTimeout(() => { setTimeout(() => {
setShow(true); setShow(true);
...@@ -51,9 +56,22 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) { ...@@ -51,9 +56,22 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
Res = <CheckRecord workId={appId} />; Res = <CheckRecord workId={appId} />;
break; break;
case 'Apply': // 申请类 case 'Apply': // 申请类
Res = <Apply workId={appId} if (appId === '1549319936277479424') {
{...otherProps} // 29573 当前位置: 违纪管理/违纪上报(辅导员),100086 下面这个模块做个超链接 搞到这儿来
/>; otherProps.otherButtons = [
{
type: 'weijiJiangjiLiebiao',
name: '申诉降级上报',
component: 'Normal',
handleClick: () => {
router.push({
pathname: '/xg/Violation/downgrade',
});
},
},
];
}
Res = <Apply workId={appId} {...otherProps} />;
break; break;
case 'Audit': // 审批类 case 'Audit': // 审批类
Res = <Audit workId={appId} {...otherProps} />; Res = <Audit workId={appId} {...otherProps} />;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论