|
|
@ -14,7 +14,7 @@ import './index.less' |
|
|
|
const { confirm } = Modal; |
|
|
|
|
|
|
|
const WorkFlowModal = (props) => { |
|
|
|
const { successCallBack = () => { }, title, visible, clientHeight, postData, processId, user, dispatch } = props; |
|
|
|
const { successCallBack = () => { }, title, visible, clientHeight, postData, processId, user, dispatch, webEmis } = props; |
|
|
|
const [loading, setLoading] = useState(true); |
|
|
|
const [ifShowMessage, setIfShowMessage] = useState(true); |
|
|
|
const [webUrl, setWebUrl] = useState(null); |
|
|
@ -65,14 +65,14 @@ const WorkFlowModal = (props) => { |
|
|
|
const handelDeny = () => { |
|
|
|
// dispatch(delDraft(draftId)).then(res => { |
|
|
|
// if (res.success) { |
|
|
|
// Notification.success('删除草稿成功'); |
|
|
|
// Notification.success({title:'删除草稿成功'}); |
|
|
|
// const { onCancel } = props; |
|
|
|
// onCancel && onCancel(); |
|
|
|
// setLoading(false); |
|
|
|
// setCustomVisible(false); |
|
|
|
// setDraftId(null); |
|
|
|
// } else { |
|
|
|
// Notification.error('删除草稿失败,请联系管理员'); |
|
|
|
// Notification.error({title:'删除草稿失败,请联系管理员'}); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} |
|
|
@ -87,19 +87,19 @@ const WorkFlowModal = (props) => { |
|
|
|
let data = JSON.parse(event.data); |
|
|
|
const { type, isSaveDraft, setIntervalSave, draftId, msg } = data; |
|
|
|
if (msg) { |
|
|
|
Notification.success(msg) |
|
|
|
Notification.success({ title: msg }) |
|
|
|
} |
|
|
|
setDraftId(draftId); |
|
|
|
if (type == 'saveSuccess' && successCallBack) { |
|
|
|
if (ifShowMessage) { |
|
|
|
if (isSaveDraft) { |
|
|
|
if (setIntervalSave) { |
|
|
|
Notification.success('60秒,表单暂存草稿成功'); |
|
|
|
Notification.success({ title: '60秒,表单暂存草稿成功' }); |
|
|
|
} else { |
|
|
|
Notification.success(<span>保存草稿成功,可在<a onClick={() => handelApprovalCenter("save")}>【审批中心/保存待发】</a>查看详情</span>, 10); |
|
|
|
} |
|
|
|
} else { |
|
|
|
Notification.success('提交成功,可在【审批中心/由我发起】查看详情'); |
|
|
|
Notification.success({ title: '提交成功,可在【审批中心/由我发起】查看详情' }); |
|
|
|
successCallBack(); |
|
|
|
} |
|
|
|
//防止提示多次 |
|
|
@ -189,9 +189,11 @@ const WorkFlowModal = (props) => { |
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
|
const { auth, global } = state; |
|
|
|
console.log(global); |
|
|
|
return { |
|
|
|
user: auth.user, |
|
|
|
clientHeight: global.clientHeight, |
|
|
|
webEmis: global.webEmis |
|
|
|
} |
|
|
|
} |
|
|
|
|