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

28887 北电]学生事务-学生医保管理,审核通过后停留在当前页面

上级 4ecc5efb
......@@ -177,7 +177,7 @@ class DetailSplit extends Component {
});
});
}
if (val && !val.taskInfo) {
if (val) {
permRequest('/UnifiedAppFormApi/getTaskInfos', {
// 获取每一步的审核人.
id: queryId ? queryId : id, // 审批表Id
......@@ -971,43 +971,49 @@ function Index(props) {
const [prepare, setPrepare] = useState(false);
const DetailSplitFormNew = useRef();
useEffect(() => {
const id = history.location.state && history.location.state.id;
const code = history.location.state && history.location.state.code;
const queryId = history.location.query && history.location.query.id;
const taskId = history.location.state && history.location.state.taskId;
if (!id && !code) {
if (queryId) {
} else {
openToast('error', '数据已过期', '当前页面数据已过期,请重新进入');
return;
}
}
message.info('正在加载数据,请等待。');
dispatch({
type: 'affair/getIdFormDetail',
payload: {
id: queryId ? queryId : id, // 审批表Id
code: code || null, // 表单值
handleUser: null, // 处理人
taskId, // 多任务流程会使用到,后续改为必须传入
lite: true,
},
callback: (val) => {
message.destroy();
if (val) {
getFormDetailData();
}, []);
const getFormDetailData = () => {
const id = history.location.state && history.location.state.id;
const code = history.location.state && history.location.state.code;
const queryId = history.location.query && history.location.query.id;
const taskId = history.location.state && history.location.state.taskId;
if (!id && !code) {
if (queryId) {
} else {
openToast('error', '数据已过期', '当前页面数据已过期,请重新进入');
return;
}
}
message.info('正在加载数据,请等待。');
dispatch({
type: 'affair/getIdFormDetail',
payload: {
id: queryId ? queryId : id, // 审批表Id
code: code || null, // 表单值
handleUser: null, // 处理人
taskId, // 多任务流程会使用到,后续改为必须传入
lite: true,
},
callback: (val) => {
message.destroy();
if (val) {
DetailSplitFormNew.current = Form.create(
window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined,
)(DetailSplit);
setPrepare(val);
}
},
});
}, []);
setPrepare(val);
}
},
});
}
if (!prepare) {
return <Spin size="large" spinning={true} />;
}
return <DetailSplitFormNew.current {...props} formPrepareData={prepare} />;
return <DetailSplitFormNew.current {...props} formPrepareData={prepare} getFormDetailData={getFormDetailData}/>;
}
export default connect(() => {
......
......@@ -119,7 +119,7 @@ const submitValues = ({
payload: resParams,
callback: val => {
if (val) {
that.getInit();
// that.getInit();
that.setState({
isHandle: false,
isSumbitLoading: false,
......@@ -133,7 +133,7 @@ const submitValues = ({
</div>
),
onOk: () => {
that.getInit();
that.props.getFormDetailData();
},
okText: '确认',
});
......
......@@ -25,7 +25,6 @@ export function getVisitorToken(){
const res = {
headers: {},
};
console.log(process.env.NODE_ENV);
if(process.env.NODE_ENV === 'development' && getIsBei_Dian()){
res.headers.env = 'test';
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论