|
|
@@ -82,6 +82,7 @@ export default { |
|
|
|
// 页面初始化 |
|
|
|
async init() { |
|
|
|
this.taskParam = this.GET_PARAM() |
|
|
|
console.log(this.taskParam) |
|
|
|
this.type = this.taskParam.type |
|
|
|
this.typeText = this.taskParam.type === 'sign' ? '加签' : '审核' |
|
|
|
|
|
|
@@ -218,23 +219,40 @@ export default { |
|
|
|
operationCode: this.taskParam.code, |
|
|
|
} |
|
|
|
const userList = await this.HTTP_GET('learun/adms/newwf/auditer', params, `获取审核人时发生错误`) |
|
|
|
if (!userList) { |
|
|
|
return |
|
|
|
} |
|
|
|
// if (!userList) { |
|
|
|
// return |
|
|
|
// } |
|
|
|
|
|
|
|
if(Object.keys(userList).length==0){ |
|
|
|
console.log('为空') |
|
|
|
const success = await this.HTTP_POST( |
|
|
|
this.type === 'sign' ? 'learun/adms/newwf/sign' : 'learun/adms/newwf/audit', |
|
|
|
postData, |
|
|
|
`提交[${this.typeText}]时发生错误` |
|
|
|
) |
|
|
|
|
|
|
|
if (!success) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.EMIT('task-list-change') |
|
|
|
this.NAV_BACK(2) |
|
|
|
this.TOAST(`已成功提交${this.typeText}`, 'success') |
|
|
|
} |
|
|
|
let arr = Object.entries(userList) |
|
|
|
this.reviewerListId = arr[0][0] |
|
|
|
this.reviewerList = arr[0][1].map(item => { |
|
|
|
return { |
|
|
|
text: item.Name, |
|
|
|
value: item.Id |
|
|
|
} |
|
|
|
}) |
|
|
|
return { |
|
|
|
text: item.Name, |
|
|
|
value: item.Id |
|
|
|
} |
|
|
|
}) |
|
|
|
this.submitPostData = postData |
|
|
|
if(this.reviewerList.length>1){ |
|
|
|
this.modal = true |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const success = await this.HTTP_POST( |
|
|
|