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

优化组件申请组件

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