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

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

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