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

解决一站式web端一直重复调接口的bug

上级 6409e148
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* 2019年9月19日 * 2019年9月19日
* 查看详情页面 * 查看详情页面
*/ */
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment, useRef } from 'react';
import { import {
Row, Row,
Col, Col,
...@@ -36,7 +36,12 @@ import styles from './styles.less'; ...@@ -36,7 +36,12 @@ import styles from './styles.less';
import TrunToDetail from './trunToDetail'; import TrunToDetail from './trunToDetail';
import Countersign from './components/Countersign'; import Countersign from './components/Countersign';
import ChildTaskModel from './ChildTaskModel'; import ChildTaskModel from './ChildTaskModel';
import { checkNeedFormValidateFieldsAndScroll, must, submitValues, checkNeedWriteAuditInfo } from './splitDetailSplit'; import {
checkNeedFormValidateFieldsAndScroll,
must,
submitValues,
checkNeedWriteAuditInfo,
} from './splitDetailSplit';
import { queryApiVersion, queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfig'; import { queryApiVersion, queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfig';
import { isJSON } from '@/webPublic/zyd_public/utils/utils'; import { isJSON } from '@/webPublic/zyd_public/utils/utils';
import HistoryFormList from '@/webPublic/one_stop_public/DetailForAudit/HistoryFormList'; import HistoryFormList from '@/webPublic/one_stop_public/DetailForAudit/HistoryFormList';
...@@ -130,12 +135,15 @@ class DetailSplit extends Component { ...@@ -130,12 +135,15 @@ class DetailSplit extends Component {
componentDidMount() { componentDidMount() {
this.getInit(); this.getInit();
if (this.props.onRef) { if (this.props.onRef) {
this.props.onRef(this); this.props.onRef(this);
} }
} }
// getInit2 = () => {
// console.log('getInit2');
// }
/** /**
* @function 默认请求 * @function 默认请求
*/ */
...@@ -228,8 +236,6 @@ class DetailSplit extends Component { ...@@ -228,8 +236,6 @@ class DetailSplit extends Component {
}); });
} }
}, },
}); });
...@@ -246,7 +252,7 @@ class DetailSplit extends Component { ...@@ -246,7 +252,7 @@ class DetailSplit extends Component {
closeAutoSign, closeAutoSign,
}); });
if(!closeAutoSign){ if (!closeAutoSign) {
/** /**
* 获取设置的数据 * 获取设置的数据
*/ */
...@@ -687,7 +693,7 @@ class DetailSplit extends Component { ...@@ -687,7 +693,7 @@ class DetailSplit extends Component {
'' ''
)} )}
{isEmpty(data) === false ? ( {isEmpty(data) === false ? (
<ZdyTable <GetZdyTable
key={data.taskFormKey} key={data.taskFormKey}
postData={data} postData={data}
get='web' get='web'
...@@ -978,10 +984,13 @@ class DetailSplit extends Component { ...@@ -978,10 +984,13 @@ class DetailSplit extends Component {
} }
} }
export default function Index(props){ export default function Index(props) {
console.log(window.zdyTableTemplateWillMountProps?.formCreateOptions); return <DetailSplit {...props} />;
const DetailSplitFormNew = Form.create( }
function GetZdyTable(props) {
const ZdyTableFormNew = Form.create(
window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined, window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined,
)(DetailSplit); )(ZdyTable);
return <DetailSplitFormNew {...props}/>; return <ZdyTableFormNew {...props}/>
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论