|
|
@@ -101,14 +101,29 @@ export default { |
|
|
|
console.log(wfForms); |
|
|
|
|
|
|
|
// 处理没有有效表单的情况,停止加载 |
|
|
|
if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { |
|
|
|
this.HIDE_LOADING() |
|
|
|
this.TOAST('移动表单数据(wfForms)中无有效表单') |
|
|
|
return |
|
|
|
} |
|
|
|
//if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { |
|
|
|
//this.HIDE_LOADING() |
|
|
|
//this.TOAST('移动表单数据(wfForms)中无有效表单') |
|
|
|
//return |
|
|
|
//} |
|
|
|
//2022-02-14修改 |
|
|
|
if (this.type !== 'child') { |
|
|
|
if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { |
|
|
|
this.HIDE_LOADING() |
|
|
|
this.TOAST('移动表单数据(wfForms)中无有效表单') |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
//2022-02-14修改end |
|
|
|
|
|
|
|
// 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 |
|
|
|
const appSysPage = wfForms.find(t => t.appurl) |
|
|
|
//const appSysPage = wfForms.find(t => t.appurl) |
|
|
|
//2022-02-14修改 |
|
|
|
var appSysPage = null |
|
|
|
if(wfForms && wfForms.every(t => t.formId && t.appurl)){ |
|
|
|
appSysPage = wfForms.find(t => t.appurl) |
|
|
|
} |
|
|
|
//2022-02-14修改end |
|
|
|
if (this.type !== 'child' && appSysPage) { |
|
|
|
this.sysFormJump(appSysPage.appurl, { |
|
|
|
currentNode: this.currentNode, |
|
|
@@ -223,7 +238,7 @@ export default { |
|
|
|
this.LOADING('正在提交…') |
|
|
|
const draftFormValue = this.$refs.form.getFormValue() |
|
|
|
const draftPostData = await this.getPostData(draftFormValue, this.scheme) |
|
|
|
this.HTTP_POST('/newwf/draft', draftPostData, '提交草稿失败').then(success => { |
|
|
|
this.HTTP_POST('learun/adms/newwf/draft', draftPostData, '提交草稿失败').then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (success) { |
|
|
|
this.EMIT('task-list-change') |
|
|
@@ -252,7 +267,7 @@ export default { |
|
|
|
postData.parentTaskId = this.taskId |
|
|
|
} |
|
|
|
const errorTips = '流程发起失败' |
|
|
|
this.HTTP_POST('/newwf/createchildflow', postData, errorTips).then(success => { |
|
|
|
this.HTTP_POST('learun/adms/newwf/childcreate', postData, errorTips).then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (success) { |
|
|
|
this.EMIT('task-list-change') |
|
|
|