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

getTaskInfos

上级 65c49b26
......@@ -23,6 +23,7 @@ export default class AuditPage extends Component {
? {
type: 'audit',
component: 'RenderComponent',
key: 'audit',
render: ({ selectRows, getPage }) => {
const disabled = !selectRows || !Array.isArray(selectRows) || !selectRows.length;
function handleClick(onShow) {
......@@ -42,9 +43,14 @@ export default class AuditPage extends Component {
onShow();
}
return (
<AuditModal selectRows={selectRows} getPage={getPage} noNeedForm={noNeedForm}>
<AuditModal selectRows={selectRows}
getPage={getPage}
noNeedForm={noNeedForm}
key={'audit'}
>
{({ onShow }) => (
<ButtonDiy
key={'audit'}
name={batchAuditButtonName || '批量审核'}
handleClick={() => handleClick(onShow)}
disabled={disabled}
......
......@@ -4,19 +4,22 @@
* 钟是志
*
* */
import React, { Component } from 'react';
import React, { Component, useEffect, useState } from 'react';
import AuditPage from './index';
export default class BatchAudit extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
}
render() {
return <AuditPage {...this.props} hasBatchAudit={true} />;
}
export default function BatchAudit(props) {
// const { workId } = props;
// const [show, setShow] = useState(true);
// useEffect(() => {
// if (workId) {
// setShow(false);
// setTimeout(() => {
// setShow(true);
// }, 100);
// }
// }, [workId]);
// if(!show){
// return null;
// }
return <AuditPage {...props} hasBatchAudit={true}/>;
}
import React from "react";
import CheckRecord from "@/webPublic/FormInsertDiy/ExportComponent/CheckRecord"; // 查询类
import Apply from "@/webPublic/FormInsertDiy/AffairPage/ApplyPage"; // 申请
import BatchAudit from "@/webPublic/FormInsertDiy/AffairPage/AuditPage/BatchAudit"; // 批量审批
import Audit from "@/webPublic/FormInsertDiy/AffairPage/AuditPage/index.js"; // 审批
import Detail from "@/webPublic/FormInsertDiy/AffairPage/Detail"; //详情
import React, { useEffect, useState } from 'react';
import CheckRecord from '@/webPublic/FormInsertDiy/ExportComponent/CheckRecord'; // 查询类
import Apply from '@/webPublic/FormInsertDiy/AffairPage/ApplyPage'; // 申请
import BatchAudit from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/BatchAudit'; // 批量审批
import Audit from '@/webPublic/FormInsertDiy/AffairPage/AuditPage/index.js'; // 审批
import Detail from '@/webPublic/FormInsertDiy/AffairPage/Detail'; //详情
import { Modal, message, notification, Popconfirm } from 'antd';
window.iframeParentComponent = {
Modal,
message,
notification,
Popconfirm
Modal,
message,
notification,
Popconfirm,
};
export default function ActiveMenuComponent({
routerConfig,
...otherProps
}) {
const { component = "", appId } = routerConfig;
switch (component) {
case "CheckRecord": // 查询类应用
return <CheckRecord workId={appId}
/>;
case "Apply": // 申请类 详情是 iframe
return <Apply
workId={appId} {...otherProps}/>;
case "Audit": // 审批类 详情是 iframe
return <Audit
workId={appId} {...otherProps}/>;
case "BatchAudit": // 批量审批 详情是 iframe
return <BatchAudit
workId={appId} {...otherProps}/>;
case "Detail": // 详情 iframe
return <Detail
{...otherProps} {...otherProps}/>;
default:
console.log(component, "没有找到此组件");
return <div>暂无此功能</div>;
}
export default function ActiveMenuComponent({ routerConfig, ...otherProps }) {
const { component = '', appId } = routerConfig;
const { location } = otherProps;
const record = location?.state?.record;
const [show, setShow] = useState(false);
useEffect(
() => {
if (appId || record.id) {
setShow(false);
setTimeout(() => {
setShow(true);
}, 100);
}
},
[appId, record],
);
if (!show) {
return null;
}
switch (component) {
case 'CheckRecord': // 查询类应用
return <CheckRecord workId={appId} />;
case 'Apply': // 申请类 详情是 iframe
return <Apply workId={appId} {...otherProps} />;
case 'Audit': // 审批类 详情是 iframe
return <Audit workId={appId} {...otherProps} />;
case 'BatchAudit': // 批量审批 详情是 iframe
return <BatchAudit workId={appId} {...otherProps} />;
case 'Detail': // 详情 iframe
return <Detail {...otherProps} />;
default:
console.log(component, '没有找到此组件');
return <div>暂无此功能</div>;
}
}
......@@ -178,7 +178,7 @@ export default class DetailSplit extends Component {
});
}
if (val && !val.taskInfo) {
permRequest('/UnifiedAppFormApi/getTaskInfos', { // 获取每一步的审核人. TODO 2022年7月22日 钟是志 未完成.
permRequest('/UnifiedAppFormApi/getTaskInfos', { // 获取每一步的审核人.
id: queryId ? queryId : id, // 审批表Id
})
.then(res => {
......@@ -566,7 +566,8 @@ export default class DetailSplit extends Component {
</div>
</div>
</div>
{isLoading ? (
{isLoading ?
(
<>
<Card style={{ width: '100%' }}>
{!isCloseUserDetail && (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论