!2012 拆单界面支持最大化

pull/2007/MERGE
cf-erp 2 years ago committed by ChenX
parent 04f1e79218
commit 176c889b8e

@ -1,7 +1,9 @@
import { Button, Classes, Intent } from "@blueprintjs/core"; import { Classes, Intent } from "@blueprintjs/core";
import * as React from "react"; import * as React from "react";
import AutoSizer from 'react-virtualized-auto-sizer';
import { FileServer } from '../../DatabaseServices/FileServer'; import { FileServer } from '../../DatabaseServices/FileServer';
import { userConfig } from "../../Editor/UserConfig"; import { userConfig } from "../../Editor/UserConfig";
import { ModalHeader } from "../../UI/Components/Modal/ModalContainer";
import { ModalState } from "../../UI/Components/Modal/ModalInterface"; import { ModalState } from "../../UI/Components/Modal/ModalInterface";
import { AppToaster } from "../../UI/Components/Toaster"; import { AppToaster } from "../../UI/Components/Toaster";
import { BoardStore } from "../../UI/Store/BoardStore"; import { BoardStore } from "../../UI/Store/BoardStore";
@ -108,28 +110,29 @@ export class ErpView extends React.Component<ErpViewProp, {}> {
{ {
let includes = ErpURL.host.includes('?'); let includes = ErpURL.host.includes('?');
let erpUrl = ErpURL.host.replace(/\/$/, '') + `${includes ? '&' : '/?'}stamp=${new Date().getTime()}#/` + this.props.erpRoute.RouteName; let erpUrl = ErpURL.host.replace(/\/$/, '') + `${includes ? '&' : '/?'}stamp=${new Date().getTime()}#/` + this.props.erpRoute.RouteName;
let isMax = this.props.erpRoute.RouteType == ErpRoutes. || this.props.erpRoute.RouteType == ErpRoutes.;
return ( return (
<div className={Classes.DIALOG_CONTAINER}> <div className={Classes.DIALOG_CONTAINER}
style={{ width: this.props.erpRoute.FrameWidth, height: this.props.erpRoute.FrameHeight }}>
<div className={Classes.DIALOG + " board-config"}> <div className={Classes.DIALOG + " board-config"}>
<div className={Classes.DIALOG_HEADER} data-id="dragArea"> <ModalHeader
<h4 className="bp3-heading">{this.props.erpRoute.TitleName}</h4> title="拆单"
<Button close={() => this.props.store.OnOk(ModalState.Cancel)}
aria-label="Close" isPinBtn={true}
minimal isMaxBtn={isMax}
icon="cross" />
className={Classes.DIALOG_CLOSE_BUTTON} <div className={Classes.DIALOG_BODY} style={{ height: this.props.erpRoute.FrameHeight, width: "100%" }}>
onClick={() => this.props.store.OnOk(ModalState.Cancel)} <AutoSizer>
/> {({ height, width }) => (
</div> <iframe
<div className={Classes.DIALOG_BODY}> width={width}
<iframe height={height}
width={this.props.erpRoute.FrameWidth} scrolling="no"
height={this.props.erpRoute.FrameHeight} src={erpUrl}
scrolling="no" ref={this.iframe}
src={erpUrl} onLoad={this.iframeLoaded}
ref={this.iframe} />)}
onLoad={this.iframeLoaded} </AutoSizer>
/>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save