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

getTaskInfos

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