提交 0b31747f authored 作者: 钟是志's avatar 钟是志

25020 流程审核时弹窗优化

上级 d9cecbce
......@@ -5,8 +5,8 @@
*/
import React, {Component} from 'react';
import { Button } from 'antd';
import styles from './index.less';
import { getModal } from '@/webPublic/one_stop_public/utils/utils';
import stylesList from '@/webPublic/one_stop_public/AffairButton/AuditButton/Modal/stylesList';
const Modal = getModal();
......@@ -60,10 +60,11 @@ export default class WebModal extends Component {
width={!!width ? width : 800}
handleCancel={handleCancel}
style={style}>
<div className={styles.content_div}>
<div className={styles.title}>
<div style={stylesList.content_div}>
<div style={stylesList.title}>
{title}
<Button className={styles.button} onClick={handleCancel}>
<Button style={stylesList.button}
onClick={handleCancel}>
X
</Button>
</div>
......
const stylesList = {
content_div: {
margin: '-24px',
position: 'relative',
},
title: {
color: '#333',
fontSize: '16px',
fontWeight: 'bold',
width: '100%',
lineHeight: '44px',
textAlign: 'center',
backgroundColor: '#E0E7EE',
},
button: {
backgroundColor: 'rgba(255, 255, 255, 0)',
border: '0 solid #cccccc',
float: 'right',
marginTop: '5px',
},
};
export default stylesList;
const styleList = {
btn_page: {
width: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexWrap: 'wrap',
},
btn: {
minWidth: '90px',
minHeight: '32px',
borderRadius: '2px',
},
btn_margin: {
marginRight: '16px',
},
btn_no: {
color: '#FF5350',
border: '1px solid #FF5350',
},
btn_reject: {
color: '#FF9B00',
border: '1px solid #FF9B00',
},
};
export default styleList;
......@@ -9,7 +9,7 @@ import { Input, Checkbox } from 'antd';
import Btn from '../pagesBtn';
import MyModal from '../Modal';
import styles from './styles.less';
import stylesList from './styles-in-line';
const { TextArea } = Input;
export default class userButton extends Component {
constructor() {
......@@ -171,13 +171,17 @@ export default class userButton extends Component {
title={isSecond ? '重新发起' : '审批'}
width={600}
handleCancel={this.handleCancelOk}>
<div className={styles.is_ok}>
<p className={styles.header}>
<span>{isSecond ? '当前状态' : '审批结果'}</span>
<div style={stylesList.is_ok}>
<p style={stylesList.header}>
<span style={{...stylesList.headerSpan, ...stylesList.headerSpan_1}}>
{isSecond ? '当前状态' : '审批结果'}
</span>
{this.getUser()}
</p>
<div className={styles.body}>
<span>{isSecond ? '发起说明' : '审批说明'}</span>
<div style={stylesList.body}>
<span style={{...stylesList.body_span, ...stylesList.body_span_1}}>
{isSecond ? '发起说明' : '审批说明'}
</span>
<span>
<TextArea
value={value}
......@@ -188,9 +192,11 @@ export default class userButton extends Component {
</span>
</div>
{Sign ? (
<div className={styles.body}>
<span>使用签名</span>
<span>
<div style={stylesList.body}>
<span style={{...stylesList.body_span, ...stylesList.body_span_1}}>
使用签名
</span>
<span style={{...stylesList.body_span}}>
<Checkbox defaultChecked={user.isUseBackImage} onChange={this.onChange1} />
</span>
</div>
......
const styles = {
is_ok: {
minHeight: '336px',
boxSizing: 'border-box',
padding: '60px 81px 0px 59px',
overflow: 'hidden',
},
header: {
marginBottom: '23px',
},
headerSpan: {
fontSize: '14px',
lineHeight: '24px',
},
headerSpan_1: {
color: '#666',
textAlign: 'right',
marginRight: '24px',
},
headerSpan_2: {
fontWeight: 'bold',
},
body: {
display: 'flex',
marginBottom: '60px',
},
body_span: {
fontSize: '14px',
lineHeight: '24px',
color: '#666',
},
body_span_1: {
textAlign: 'right',
marginRight: '24px',
},
};
export default styles;
......@@ -3,7 +3,7 @@
*/
import React, {Component} from 'react';
import {checkIsImage} from '@/webPublic/one_stop_public/libs/UploadCom';
import { getModal, getPopconfirm } from '@/webPublic/one_stop_public/utils/utils';
import { getModal, getPopconfirm, isFromIframe } from '@/webPublic/one_stop_public/utils/utils';
const FileViewer = CLIENT_TYPE === 'mobile' ? null : require('react-file-viewer');
const Modal = getModal();
......@@ -20,7 +20,7 @@ export default class index extends Component {
}
showModal = () => {
if(window?.parent?.iframeParentComponent){
if(isFromIframe()){
return false;
}
this.setState({
......@@ -81,7 +81,7 @@ export default class index extends Component {
okText='下载'
onCancel={this.showModal}
cancelText={ window?.parent?.iframeParentComponent ? '取消' : '预览'}>
cancelText={ isFromIframe() ? '取消' : '预览'}>
{isImg ? (
<img
ref={(node)=>{ this.imageDom = node;}}
......
import React from "react";
import {queryApiActionPath} from "@/webPublic/one_stop_public/utils/queryConfig";
import {getToken} from "@/webPublic/one_stop_public/utils/token";
import { isFromIframe } from '@/webPublic/one_stop_public/utils/utils';
const oneSetItemP = {
marginBottom: 0,
......@@ -51,7 +52,7 @@ const ShowItem = ({ basicUrl, type, x, y, ...otherInfo }) => {
export const dragEventList = (setOtherProps, otherProps) => {
let draggedRef = null;
let documentThis = window?.parent?.iframeParentComponent?.Modal ? window?.parent?.document : document;
let documentThis = isFromIframe() ? window?.parent?.document : document;
documentThis.onmousedown = function(evt){
startX = evt.offsetX;
startY = evt.offsetY;
......
......@@ -34,26 +34,18 @@ export const dispatch = (type, payload, callback) => {
};
export const isFromIframe = () => { // 判断是否来自iframe 嵌入页面
return !!window?.parent?.iframeParentComponent?.Modal;
}
export const getModal = () => {
if (window?.parent?.iframeParentComponent?.Modal) {
return window?.parent?.iframeParentComponent?.Modal;
} else {
return Modal;
}
return isFromIframe() ? window?.parent?.iframeParentComponent?.Modal : Modal;
};
export const getPopconfirm = () => {
if (window?.parent?.iframeParentComponent?.Popconfirm) {
return window?.parent?.iframeParentComponent?.Popconfirm;
} else {
return Popconfirm;
}
return isFromIframe() ? window?.parent?.iframeParentComponent?.Popconfirm : Popconfirm;
};
export const getMessage = () => {
if (window?.parent?.iframeParentComponent?.Popconfirm) {
return window?.parent?.iframeParentComponent?.message;
} else {
return message;
}
return isFromIframe() ? window?.parent?.iframeParentComponent?.message : message;
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论