提交 543986fb authored 作者: 钟是志's avatar 钟是志

bug修改

上级 b2e5d127
......@@ -257,6 +257,12 @@ export default class List extends Component {
}
if(columnsLength > 10 && item.title && !item.width){
item.width = item.title.length * 30;
if(item.title === '学号'){
item.width = 140;
}
if(item.title.indexOf('时间') > -1){
item.width = 150;
}
}
}
......
......@@ -9,7 +9,7 @@ import { message } from 'antd';
import React, { Fragment } from 'react';
import * as service from '../publicApiService';
import * as destructionFunc from '../destruction';
import { Link } from 'dva/router';
import { Link } from 'dva/router';
import { getApplyPage } from '../publicApiService';
import { getToken } from '@/utils/authority';
......@@ -35,6 +35,7 @@ export default class AffairPage extends React.Component {
searchCondition: [],
dataBaseId: idObj.dataBaseId,
addFields: [], // 新增时填写的字段。
renderIframe: true,
};
};
......@@ -138,11 +139,7 @@ export default class AffairPage extends React.Component {
window.addEventListener('message', (event) => {
if (event.data === 'returnList') {
this.setState({
showIframe: false,
}, () => {
this.ListComponent.getPage();
});
this.returnList(true);
}
if (event.data.indexOf('iframeHeight') > -1) {
let height = Number(event.data.split('-')[1]);
......@@ -153,11 +150,25 @@ export default class AffairPage extends React.Component {
return true;
}
returnList = (needSearchList = false) => {
this.setState({
renderIframe: false,
},()=>{
if(needSearchList){
this.ListComponent.getPage();
}
this.setState({
showIframe: false,
renderIframe: true, // 重新挂载IFrame 保证申请数据不会再次显示出来
});
});
};
render() {
const { workId, dataBaseId, addFields, showIframe } = this.state;
const { workId, dataBaseId, addFields, showIframe, renderIframe } = this.state;
const url = config.onestopPC.split('/#/');
let iframeUrl = `${url[0]}/#/IFrameForApply?id=${workId}&token=${getToken()}`;
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getHuanGeToken()}`;
// iframeUrl = `http://localhost:8000/onestop/IFrameForApply?id=${workId}&token=${getToken()}`;
return (
<PageHeaderWrapper title="">
<div style={{
......@@ -186,31 +197,31 @@ export default class AffairPage extends React.Component {
}}>
<ButtonDiy name="返回"
className="defaultBlue"
handleClick={() => {
this.setState({
showIframe: false,
});
}}
handleClick={this.returnList}
icon="arrow-left"
/>
</div>
</Shell>
<iframe src={iframeUrl}
frameBorder={0}
id='applyIframeId'
name='applyIframe'
marginWidth="0"
marginHeight="0"
allowTransparency="yes"
seamless
scrolling={'no'}
style={{
width: '100%',
minHeight: '800px',
overflowY: 'hidden',
backgroundColor: '#fff',
}}
/>
{
renderIframe ?
<iframe src={iframeUrl}
frameBorder={0}
id='applyIframeId'
name='applyIframe'
marginWidth="0"
marginHeight="0"
allowTransparency="yes"
seamless
scrolling={'no'}
style={{
width: '100%',
minHeight: '800px',
overflowY: 'hidden',
backgroundColor: '#fff',
}}
/> : null
}
</div>
</PageHeaderWrapper>
);
......
......@@ -311,6 +311,12 @@ export default class List extends Component {
if(columnsLength > 10 && item.title && !item.width){
item.width = item.title.length * 30;
if(item.title === '学号'){
item.width = 140;
}
if(item.title.indexOf('时间') > -1){
item.width = 150;
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论