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

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

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