提交 5028afc0 authored 作者: 钟是志's avatar 钟是志

增加 表单模版挂载前的配置公式 获取全局变量

修改UploadCom 组件
上级 78126566
...@@ -38,7 +38,7 @@ export default class WebModal extends Component { ...@@ -38,7 +38,7 @@ export default class WebModal extends Component {
} }
render() { render() {
let {visible, handleCancel, title, width} = this.props; let {visible, handleCancel, title, width, getContainer} = this.props;
const {top} = this.state; const {top} = this.state;
const style = { const style = {
borderRadius: 4, borderRadius: 4,
...@@ -55,9 +55,7 @@ export default class WebModal extends Component { ...@@ -55,9 +55,7 @@ export default class WebModal extends Component {
closable={false} closable={false}
visible={visible} visible={visible}
footer={null} footer={null}
getContainer={() => { getContainer={getContainer !== undefined ? getContainer : undefined}
return getContainer(dom);
}}
destroyOnClose={true} destroyOnClose={true}
width={!!width ? width : 800} width={!!width ? width : 800}
handleCancel={handleCancel} handleCancel={handleCancel}
......
...@@ -167,6 +167,7 @@ export default class userButton extends Component { ...@@ -167,6 +167,7 @@ export default class userButton extends Component {
{/* <Btn get='2' btnOne={()=>{this.showModal('不同意')}} btnTwo={()=>{this.showModal('驳回')}} btnThree={()=>{this.showModal('通过')}}/> */} {/* <Btn get='2' btnOne={()=>{this.showModal('不同意')}} btnTwo={()=>{this.showModal('驳回')}} btnThree={()=>{this.showModal('通过')}}/> */}
<MyModal <MyModal
visible={visibleOk} visible={visibleOk}
getContainer={false}
title={isSecond ? '重新发起' : '通过审批'} title={isSecond ? '重新发起' : '通过审批'}
width={600} width={600}
handleCancel={this.handleCancelOk}> handleCancel={this.handleCancelOk}>
......
...@@ -115,6 +115,7 @@ export default class index extends Component { ...@@ -115,6 +115,7 @@ export default class index extends Component {
<div <div
style={{ style={{
height: 650, height: 650,
maxWidth: 1200,
}}> }}>
<a target={'_blank'} href={path} download={pathName}> <a target={'_blank'} href={path} download={pathName}>
下载文件 下载文件
......
...@@ -6,6 +6,10 @@ import styles from './style.less'; ...@@ -6,6 +6,10 @@ import styles from './style.less';
import UploadComDiyForQnZy from '@/webPublic/one_stop_public/libs/UploadComDiyForQnZy'; import UploadComDiyForQnZy from '@/webPublic/one_stop_public/libs/UploadComDiyForQnZy';
import {getContainer} from "@/webPublic/one_stop_public/utils/utils"; import {getContainer} from "@/webPublic/one_stop_public/utils/utils";
message.config({
top: 300,
})
export function checkIsImage(path) { export function checkIsImage(path) {
if (!path) { if (!path) {
return false; return false;
...@@ -239,7 +243,16 @@ class UploadCom extends React.Component { ...@@ -239,7 +243,16 @@ class UploadCom extends React.Component {
onCancel={() => this.setState({previewVisible: false})} onCancel={() => this.setState({previewVisible: false})}
width={'90vw'} width={'90vw'}
> >
<img alt="example" style={{width: '100%', height: 'auto'}} src={previewImage}/> <div style={{
textAlign: 'center',
width: '100%',
}}>
<img alt="example" style={{
maxWidth: '1200px',
maxHeight: '700px',
height: 'auto',
}} src={previewImage}/>
</div>
</Modal> </Modal>
</div> </div>
); );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论