Browse Source

表单流程优化

dev
巴林闲侠 2 years ago
parent
commit
0444a15533
  1. 12
      web/client/src/components/workflow/approval.jsx
  2. 10
      web/client/src/components/workflow/index.jsx
  3. 14
      web/client/src/sections/workOrder/containers/jobOrder.jsx

12
web/client/src/components/workflow/approval.jsx

@ -10,12 +10,12 @@ import './index.less'
const WorkFlowApprovalModal = (props) => { const WorkFlowApprovalModal = (props) => {
const { visible, onCancel, webEmis, user, processAuditList, checkProcessInstanceId, successCallBack, type } = props; const { visible, onCancel, webEmis, user, processAuditList, checkProcessInstanceId, successCallBack, type } = props;
const ifreamUrlMap = useRef({ const ifreamUrlMap = useRef({
approval: 'approval/info', approval: 'approval/info', //
myApply: 'process/my-apply', myApply: 'process/my-apply', //
notice: 'process/my-apply', notice: 'process/my-apply', //
hasDone: 'process/my-apply', hasDone: 'process/my-apply', //
draft: 'process/{processId}/draft', draft: 'process/{processId}/draft', // 稿
submit: 'process/{processId}/apply' submit: 'process/{processId}/apply' //
}) })
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [ifreamUrl, setIfreamUrl] = useState(''); const [ifreamUrl, setIfreamUrl] = useState('');

10
web/client/src/components/workflow/index.jsx

@ -79,7 +79,6 @@ const WorkFlowModal = (props) => {
if (event && event.data && typeof (event.data) == 'string') { if (event && event.data && typeof (event.data) == 'string') {
let data = JSON.parse(event.data); let data = JSON.parse(event.data);
const { type, isSaveDraft, setIntervalSave, draftId, msg } = data; const { type, isSaveDraft, setIntervalSave, draftId, msg } = data;
console.log(data, msg);
if (msg) { if (msg) {
Notification.success({ title: msg }) Notification.success({ title: msg })
} }
@ -142,7 +141,9 @@ const WorkFlowModal = (props) => {
<Spin <Spin
spinning={loading} spinning={loading}
> >
{webEmis && processId ? <iframe {
webEmis && processId ?
<iframe
id='workflowFrame' id='workflowFrame'
onLoad={() => { onLoad={() => {
let frameWin = document.getElementById('workflowFrame'); let frameWin = document.getElementById('workflowFrame');
@ -155,7 +156,10 @@ const WorkFlowModal = (props) => {
width={'100%'} width={'100%'}
style={{ height: '100vh' }} style={{ height: '100vh' }}
frameBorder="0" frameBorder="0"
></iframe> : ''} >
</iframe> : ''
}
</Spin> </Spin>
</div> </div>
</div> </div>

14
web/client/src/sections/workOrder/containers/jobOrder.jsx

@ -46,13 +46,13 @@ const JobOrder = (props) => {
}).then(res => { }).then(res => {
setFormStateRequestingIndex(false) setFormStateRequestingIndex(false)
if (res) { if (res) {
// if (res.deleted) { if (res.deleted) {
// Notification.error({ title: '退' }) Notification.error({ title: '该表单流程已删除,请尝试退出账号重新登录或联系项企管理员' })
// } else if (res.isEdited) { } else if (res.isEdited) {
// Notification.error({ title: '退' }) Notification.error({ title: '该表单流程已修改,请尝试退出账号重新登录或联系项企管理员' })
// } else if (!res.isEnable) { } else if (!res.isEnable) {
// Notification.error({ title: '退' }) Notification.error({ title: '该表单流程已停用,请尝试退出账号重新登录或联系项企管理员' })
// } else } else
if (res.id) { if (res.id) {
setLaunchProcessId(res.id) setLaunchProcessId(res.id)
setWorkflowModalVisible(true) setWorkflowModalVisible(true)

Loading…
Cancel
Save