|
@ -2,62 +2,46 @@ |
|
|
|
|
|
|
|
|
import React from 'react'; |
|
|
import React from 'react'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
// import { Modal, Spin, message, Row } from 'antd'; |
|
|
import { Modal, Spin, Row } from '@douyinfe/semi-ui'; |
|
|
import { RouteTable } from '../../utils/webapi'; |
|
|
|
|
|
import { RouteRequest } from '@peace/utils'; |
|
|
|
|
|
import { useState } from 'react'; |
|
|
import { useState } from 'react'; |
|
|
import { useEffect } from 'react'; |
|
|
import { IconClose } from '@douyinfe/semi-icons'; |
|
|
import { CloseCircleFilled } from '@ant-design/icons'; |
|
|
|
|
|
import './index.less' |
|
|
import './index.less' |
|
|
|
|
|
|
|
|
const { confirm } = Modal; |
|
|
const { confirm } = Modal; |
|
|
|
|
|
|
|
|
const WorkFlowViewModal = (props) => { |
|
|
const WorkFlowViewModal = (props) => { |
|
|
// const { successCallBack, title, visible, clientHeight, postData, processId, user } = props; |
|
|
const { visible, clientHeight, postData, processId, user, webEmis, webOa } = props; |
|
|
// const [loading, setLoading] = useState(true); |
|
|
const [loading, setLoading] = useState(true); |
|
|
// const [ifShowMessage, setIfShowMessage] = useState(true); |
|
|
const [ifShowMessage, setIfShowMessage] = useState(true); |
|
|
// const [webUrl, setWebUrl] = useState(null); |
|
|
const iframeRef = React.createRef(); |
|
|
// const iframeRef = React.createRef(); |
|
|
|
|
|
|
|
|
|
|
|
// const handelCancel = () => { |
|
|
const handelCancel = () => { |
|
|
// const { onCancel } = props; |
|
|
const { onCancel } = props; |
|
|
// onCancel && onCancel(); |
|
|
onCancel && onCancel(); |
|
|
// setLoading(false); |
|
|
setLoading(false); |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// const showConfirm = () => { |
|
|
const showConfirm = () => { |
|
|
// confirm({ |
|
|
confirm({ |
|
|
// title: '确定关闭此表单吗?', |
|
|
title: '确定关闭此表单吗?', |
|
|
// onOk() { |
|
|
onOk () { |
|
|
// handelCancel() |
|
|
handelCancel() |
|
|
// }, |
|
|
}, |
|
|
// onCancel() { }, |
|
|
onCancel () { }, |
|
|
// }); |
|
|
}); |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// useEffect(() => { |
|
|
|
|
|
// if (!webUrl) { |
|
|
|
|
|
// RouteRequest.get(RouteTable.getEmisWebUrl).then(res => { |
|
|
|
|
|
// if (res.url) { |
|
|
|
|
|
// setWebUrl(res.url); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, []) |
|
|
|
|
|
const bodyStyle = { paddingLeft: 32, paddingRight: 32, margin: 0, backgroundColor: '#FAFAFA', height: '100%', overflowY: 'auto' } |
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<div> |
|
|
<div> |
|
|
{/* <Modal |
|
|
<Modal |
|
|
|
|
|
fullScreen |
|
|
visible={visible} |
|
|
visible={visible} |
|
|
width={'100%'} |
|
|
width={'100%'} |
|
|
style={{ top: 0, left: 0, padding: 0, maxWidth: '100%' }} |
|
|
|
|
|
bodyStyle={bodyStyle} |
|
|
|
|
|
title={''} |
|
|
title={''} |
|
|
closable={false} |
|
|
closable={false} |
|
|
footer={null} |
|
|
footer={null} |
|
|
wrapClassName='process_modal_wrap' |
|
|
wrapClassName='process_modal_wrap' |
|
|
onCancel={showConfirm} |
|
|
onCancel={showConfirm} |
|
|
destroyOnClose |
|
|
|
|
|
> |
|
|
> |
|
|
<Row> |
|
|
<Row> |
|
|
<div className='workflow-body'> |
|
|
<div className='workflow-body'> |
|
@ -67,13 +51,13 @@ const WorkFlowViewModal = (props) => { |
|
|
<span className='workflow-body-header_title_shu'>|</span> |
|
|
<span className='workflow-body-header_title_shu'>|</span> |
|
|
<span className='workflow-body-header_title_zi'>让世间万物拥有感知,服务人类社会于美好</span> |
|
|
<span className='workflow-body-header_title_zi'>让世间万物拥有感知,服务人类社会于美好</span> |
|
|
</span> |
|
|
</span> |
|
|
<CloseCircleFilled className="workflow-body-header_closeIcon" onClick={showConfirm} /> |
|
|
<IconClose className="workflow-body-header_closeIcon" onClick={showConfirm} /> |
|
|
</div> |
|
|
</div> |
|
|
<div className='workflow-body-form'> |
|
|
<div className='workflow-body-form'> |
|
|
<Spin |
|
|
<Spin |
|
|
spinning={loading} |
|
|
spinning={loading} |
|
|
> |
|
|
> |
|
|
{webUrl && processId ? <iframe |
|
|
{webEmis && processId ? <iframe |
|
|
id='workflowViewFrame' |
|
|
id='workflowViewFrame' |
|
|
name='workflowViewFrame' |
|
|
name='workflowViewFrame' |
|
|
onLoad={() => { |
|
|
onLoad={() => { |
|
@ -83,7 +67,7 @@ const WorkFlowViewModal = (props) => { |
|
|
}} |
|
|
}} |
|
|
allowTransparency="true" |
|
|
allowTransparency="true" |
|
|
ref={iframeRef} |
|
|
ref={iframeRef} |
|
|
src={`${webUrl}/process/my-apply?token=${user.token}&processInstanceId=${processId}&type=oaleader`} |
|
|
src={`${webEmis}/process/my-apply?token=${user.token}&processInstanceId=${processId}&type=oaleader`} |
|
|
width={'100%'} |
|
|
width={'100%'} |
|
|
style={{ height: '100vh' }} |
|
|
style={{ height: '100vh' }} |
|
|
frameBorder="0" |
|
|
frameBorder="0" |
|
@ -93,7 +77,7 @@ const WorkFlowViewModal = (props) => { |
|
|
</div> |
|
|
</div> |
|
|
</Row> |
|
|
</Row> |
|
|
|
|
|
|
|
|
</Modal > */} |
|
|
</Modal > |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
@ -104,6 +88,8 @@ function mapStateToProps(state) { |
|
|
return { |
|
|
return { |
|
|
user: auth.user, |
|
|
user: auth.user, |
|
|
clientHeight: global.clientHeight, |
|
|
clientHeight: global.clientHeight, |
|
|
|
|
|
webEmis: global.webEmis, |
|
|
|
|
|
webOa: global.webOa |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|