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

从流程的配置项里面去取 批量审批时是否显示表单的配置项

上级 aefaf0d7
......@@ -62,7 +62,6 @@ export default class AuditPage extends Component {
handleSearchSet = () => {
const { columns, searchCondition, allConfigSetInfo } = this.props;
console.log(searchCondition);
const tab1 = {
search: {
field: {},
......
......@@ -12,6 +12,10 @@ export default class BatchAudit extends Component {
super(props);
}
componentDidMount() {
}
render() {
return <AuditPage {...this.props} hasBatchAudit={true} />;
}
......
import { Modal, Spin, Form, Input, message } from 'antd';
import { useState, useEffect } from 'react';
import { getHistoryFormDetail } from '../../../Services';
import { getHistoryFormDetail, getTaskDefinition } from '../../../Services';
import AuditButton from '@/webPublic/FormInsertDiy/AuditButton';
import RenderForm from '../../RenderForm';
......@@ -24,6 +24,8 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
}
const [data, setData] = useState(null);
const [taskDefinition, setTaskDefinition] = useState({});
const [configNoNeedForm, setConfigNeedForm] = useState(false);
const [loading, setLoading] = useState(false);
useEffect(
......@@ -38,6 +40,21 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
setLoading(false);
if (res && !res.errMsg) {
setData({ ...res, hisTaskForm: { ...res.hisTaskForm, formKeys: [] } });
getTaskDefinition({
appId: res.appId,
key: res.taskDefinitionKey,
}).then((res2) =>{
if(res2){
setTaskDefinition(res2);
if(res2.id && res2.formProperties){ // 从流程的配置项里面去取 批量审批时是否显示表单的配置项
let check = res2.formProperties.find((g) => g.name === 'batchAuditHiddenForm');
if(check && check.expression === 'true'){
setConfigNeedForm(true);
}
}
}
})
}
});
},
......@@ -66,7 +83,7 @@ function AuditModal({ form, selectRows, children, getPage, noNeedForm }) {
footer={footer}
onCancel={() => setVisible(false)}>
<Spin spinning={loading}>
{data && data.isHandle && !!data.taskFormKey && !noNeedForm ? (
{data && data.isHandle && !!data.taskFormKey && !noNeedForm && !configNoNeedForm ? (
<RenderForm
postData={data}
get="web"
......
......@@ -100,6 +100,10 @@ export const getHistoryFormDetail = ({ id, code }) => {
return uaaRequest('/UnifiedAppFormApi/getFormDetail', { id, code });
};
export const getTaskDefinition = (data) => {
return uaaRequest('/UnifiedAppFormApi/getTaskDefinition', data);
}
/**
* 获取一站式应用列表
* 用于授权
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论