|
|
@@ -14,8 +14,6 @@ |
|
|
|
:currentNode="currentNode" |
|
|
|
:currentTask="currentTask" |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
<!-- Tab #2:流程图页 --> |
|
|
|
<view v-if="ready && tab === 1" class="progress"><l-workflow-timeline :processList="processList" /></view> |
|
|
@@ -30,7 +28,6 @@ import workflowFormMixins from '../workflow.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
tab: 0, |
|
|
|
editMode: false, |
|
|
|
type: 'view', |
|
|
@@ -75,7 +72,6 @@ export default { |
|
|
|
// 需要字段: mark (是 my 或者不是,表示是否自「我的」列打开) |
|
|
|
this.type = type |
|
|
|
this.currentTask = this.GET_PARAM() |
|
|
|
console.log(this.type,this.currentTask); |
|
|
|
this.LOADING('加载表单中…') |
|
|
|
this.SET_TITLE(this.currentTask.F_Title) |
|
|
|
// 未完成的子流程,可以编辑 |
|
|
@@ -93,49 +89,38 @@ export default { |
|
|
|
processId: this.processId, |
|
|
|
taskId: this.taskId |
|
|
|
}) |
|
|
|
console.log(this.processInfo) |
|
|
|
this.currentTask = { |
|
|
|
...this.currentTask, |
|
|
|
F_TaskType:(this.processInfo.task&&this.processInfo.task[0])?this.processInfo.task[0].F_Type:undefined, |
|
|
|
} |
|
|
|
this.currentNode = this.getCurrentNode(this.processInfo) |
|
|
|
console.log(this.currentNode) |
|
|
|
this.processList = get(this.processInfo, 'info.TaskLogList', []) |
|
|
|
console.log(this.processList) |
|
|
|
// wfForms 的数组成员 t,表示表单数据项(TAB页) |
|
|
|
// t.formId 使用表单,根据这个 formId 来获取 scheme 等信息 |
|
|
|
// t.appurl 使用移动页面,直接跳转到本地的页面;表单结构等均写死在页面里 |
|
|
|
const { wfForms } = this.currentNode |
|
|
|
console.log(wfForms); |
|
|
|
|
|
|
|
// 处理没有有效表单的情况,停止加载 |
|
|
|
//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) |
|
|
|
//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, |
|
|
|
currentTask: this.currentTask, |
|
|
|
logList: this.processList |
|
|
|
}) |
|
|
|
if (!wfForms || wfForms.every(t => !t.formId && !t.appurl)) { |
|
|
|
this.HIDE_LOADING() |
|
|
|
this.TOAST('移动表单数据(wfForms)中无有效表单') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
const fetchFolderkeyData=await this.fetchFolderkeyData(this.currentNode , this.processId); |
|
|
|
uni.setStorageSync('guids',JSON.stringify(fetchFolderkeyData)); |
|
|
|
|
|
|
|
// // 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 |
|
|
|
// const appSysPage = wfForms.find(t => t.appurl) |
|
|
|
// if (this.type !== 'child' && appSysPage) { |
|
|
|
// this.sysFormJump(appSysPage.appurl, { |
|
|
|
// currentNode: this.currentNode, |
|
|
|
// currentTask: this.currentTask, |
|
|
|
// logList: this.processList, |
|
|
|
// processInfo:this.processInfo |
|
|
|
// }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.type === 'child') { |
|
|
|
// 发起子流程的场合 |
|
|
|
// 获取子流程的流程信息,提取出时间线和表单模板 code |
|
|
@@ -166,6 +151,21 @@ export default { |
|
|
|
code: this.code, |
|
|
|
useDefault: true |
|
|
|
}) |
|
|
|
|
|
|
|
// 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 |
|
|
|
const appSysPage = wfForms.find(t => t.appurl) |
|
|
|
if (this.type !== 'child' && appSysPage) { |
|
|
|
this.sysFormJump(appSysPage.appurl, { |
|
|
|
currentNode: this.currentNode, |
|
|
|
currentTask: this.currentTask, |
|
|
|
logList: this.processList, |
|
|
|
processInfo:this.processInfo, |
|
|
|
formValue, |
|
|
|
scheme, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.scheme = scheme |
|
|
|
this.formValue = formValue |
|
|
|
this.rel = rel |
|
|
@@ -173,8 +173,6 @@ export default { |
|
|
|
// 不是子流程,可以直接渲染 |
|
|
|
const schemeData = await this.fetchSchemeData(this.currentNode) |
|
|
|
const formData = await this.fetchFormData(this.currentNode, this.processId) |
|
|
|
console.log(schemeData) |
|
|
|
console.log(formData) |
|
|
|
const { formValue, scheme, rel } = await this.getCustomForm({ |
|
|
|
formData, |
|
|
|
schemeData, |
|
|
@@ -182,8 +180,22 @@ export default { |
|
|
|
processId: this.processId, |
|
|
|
code: null |
|
|
|
}) |
|
|
|
|
|
|
|
// 处理移动端本地表单(也就是系统表单)的情况,直接跳转过去 |
|
|
|
const appSysPage = wfForms.find(t => t.appurl) |
|
|
|
if (this.type !== 'child' && appSysPage) { |
|
|
|
this.sysFormJump(appSysPage.appurl, { |
|
|
|
currentNode: this.currentNode, |
|
|
|
currentTask: this.currentTask, |
|
|
|
logList: this.processList, |
|
|
|
processInfo:this.processInfo, |
|
|
|
formValue, |
|
|
|
scheme, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.scheme = scheme |
|
|
|
console.log(scheme) |
|
|
|
this.formValue = formValue |
|
|
|
this.rel = rel |
|
|
|
} |
|
|
@@ -242,7 +254,7 @@ export default { |
|
|
|
this.LOADING('正在提交…') |
|
|
|
const draftFormValue = this.$refs.form.getFormValue() |
|
|
|
const draftPostData = await this.getPostData(draftFormValue, this.scheme) |
|
|
|
this.HTTP_POST('learun/adms/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') |
|
|
@@ -271,7 +283,7 @@ export default { |
|
|
|
postData.parentTaskId = this.taskId |
|
|
|
} |
|
|
|
const errorTips = '流程发起失败' |
|
|
|
this.HTTP_POST('learun/adms/newwf/childcreate', postData, errorTips).then(success => { |
|
|
|
this.HTTP_POST('/learun/adms/newwf/createchildflow', postData, errorTips).then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|
if (success) { |
|
|
|
this.EMIT('task-list-change') |
|
|
@@ -295,7 +307,9 @@ export default { |
|
|
|
processId: currentTask.F_ProcessId, |
|
|
|
taskId: currentTask.F_Id, |
|
|
|
formreq: postData.formreq, |
|
|
|
taskName: this.currentTask.F_Title |
|
|
|
taskName: this.currentTask.F_Title, |
|
|
|
currentNode:this.currentNode, |
|
|
|
schemeCode:this.code||'' |
|
|
|
} |
|
|
|
// 不是加签 |
|
|
|
if (action.code !== '__sign__') { |
|
|
|