提交 17096f97 authored 作者: 钟是志's avatar 钟是志

优化组件申请组件

上级 d610672e
...@@ -4,14 +4,16 @@ ...@@ -4,14 +4,16 @@
* */ * */
import { message } from 'antd'; import { message } from 'antd';
import React, { Fragment } from 'react'; import React from 'react';
import { getToken } from '@/utils/authority'; import { getToken } from '@/utils/authority';
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import ButtonDiy from '@/baseComponent/ButtonDiy'; import ButtonDiy from '@/baseComponent/ButtonDiy';
import Shell from '@/baseComponent/Shell'; import Shell from '@/baseComponent/Shell';
import config from '@/config/config'; // import config from '@/config/config';
import router from 'umi/router'; import router from 'umi/router';
import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
export default class AffairPage extends React.Component { export default class AffairPage extends React.Component {
constructor(props) { constructor(props) {
...@@ -61,13 +63,11 @@ export default class AffairPage extends React.Component { ...@@ -61,13 +63,11 @@ export default class AffairPage extends React.Component {
if (!workId) { if (!workId) {
return null; return null;
} }
const url = config.onestopPC.split('/#/'); // const url = config.onestopPC.split('/#/');
const params = `id=${workId}&token=${getToken()}&init=${encodeURIComponent( // const params = `id=${workId}&token=${getToken()}&init=${encodeURIComponent(
JSON.stringify(init), // JSON.stringify(init),
)}`; // )}`;
let iframeUrl = `${url[0]}/#/IFrameForApply?${params}`; // let iframeUrl = `${url[0]}/#/IFrameForApply?${params}`;
console.log(iframeUrl);
// iframeUrl = `http://localhost:8001/onestop/IFrameForApply?${params}`;
return ( return (
<PageHeaderWrapper title=""> <PageHeaderWrapper title="">
<div <div
...@@ -91,7 +91,12 @@ export default class AffairPage extends React.Component { ...@@ -91,7 +91,12 @@ export default class AffairPage extends React.Component {
/> />
</div> </div>
</Shell> </Shell>
<iframe <ApplyForZyd
{...this.props}
id={workId}
init={encodeURIComponent(JSON.stringify(init))}
/>
{/* <iframe
src={iframeUrl} src={iframeUrl}
frameBorder={0} frameBorder={0}
id="applyIframeId" id="applyIframeId"
...@@ -107,7 +112,7 @@ export default class AffairPage extends React.Component { ...@@ -107,7 +112,7 @@ export default class AffairPage extends React.Component {
overflowY: 'hidden', overflowY: 'hidden',
backgroundColor: '#fff', backgroundColor: '#fff',
}} }}
/> />*/}
: null : null
</div> </div>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* */ * */
import { message, Modal, notification, Popconfirm } from 'antd'; import { message } from 'antd';
import React from 'react'; import React from 'react';
import * as service from '../publicApiService'; import * as service from '../publicApiService';
import * as destructionFunc from '../destruction'; import * as destructionFunc from '../destruction';
...@@ -18,14 +18,10 @@ import List from './List'; ...@@ -18,14 +18,10 @@ import List from './List';
import pageSetting from './pageSetting'; import pageSetting from './pageSetting';
import ButtonDiy from '@/baseComponent/ButtonDiy'; import ButtonDiy from '@/baseComponent/ButtonDiy';
import Shell from '@/baseComponent/Shell'; import Shell from '@/baseComponent/Shell';
import config from '@/config/config';
import { deepCopy } from '@/webPublic/zyd_public/utils/utils'; import { deepCopy } from '@/webPublic/zyd_public/utils/utils';
window.iframeParentComponent = { import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
Modal,
message,
notification,
Popconfirm
};
export default function index(props) { export default function index(props) {
const { state = {} } = props.location; const { state = {} } = props.location;
if (state.justApply) { if (state.justApply) {
...@@ -282,10 +278,8 @@ class AffairPage extends React.Component { ...@@ -282,10 +278,8 @@ class AffairPage extends React.Component {
return null; return null;
} }
// console.log(allConfigSetInfo.isCloseStart); // console.log(allConfigSetInfo.isCloseStart);
const url = config.onestopPC.split('/#/'); // const url = config.onestopPC.split('/#/');
let iframeUrl = iframeUrlDiy || `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`; // let iframeUrl = iframeUrlDiy || `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`;
console.log(iframeUrl);
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getToken()}`;
let buttons = this.handleButtonSet({}); let buttons = this.handleButtonSet({});
let listConfig = pageSetting.listConfig; let listConfig = pageSetting.listConfig;
if (!buttons.length) { if (!buttons.length) {
...@@ -332,7 +326,29 @@ class AffairPage extends React.Component { ...@@ -332,7 +326,29 @@ class AffairPage extends React.Component {
</div> </div>
</Shell> </Shell>
{renderIframe ? ( {renderIframe ? (
<iframe iframeUrlDiy ?
<iframe
src={iframeUrlDiy}
frameBorder={0}
id="applyIframeId"
name="applyIframe"
marginWidth="0"
marginHeight="0"
allowTransparency="yes"
seamless
scrolling={'auto'}
style={{
width: '100%',
minHeight: '800px',
overflowY: 'hidden',
backgroundColor: '#fff',
}}
/> :
<ApplyForZyd
{...this.props}
id={workId}
/>
/* <iframe
src={iframeUrl} src={iframeUrl}
frameBorder={0} frameBorder={0}
id="applyIframeId" id="applyIframeId"
...@@ -348,7 +364,7 @@ class AffairPage extends React.Component { ...@@ -348,7 +364,7 @@ class AffairPage extends React.Component {
overflowY: 'hidden', overflowY: 'hidden',
backgroundColor: '#fff', backgroundColor: '#fff',
}} }}
/> />*/
) : null} ) : null}
</div> </div>
</PageHeaderWrapper> </PageHeaderWrapper>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论