暂未选择处理人
@@ -134,18 +135,15 @@
prop="taskKeyShow"
label="任务步骤"
align="center"
- sortable="custom"
/>
@@ -176,7 +174,7 @@
align="center"
>
- {{ scope.row.endTime ? '已完成' : scope.row.receiveStatus ? '已接收' : '未完成' }}
+ {{ scope.row.taskStatusShow }}
@@ -332,10 +330,10 @@
_this: this
}, res => {
this.nameList = res
- this.nameList.forEach(val=>{
- if (val.userNames){
- val.userNames = val.userNames.split(',')
- }
+ this.nameList.forEach(val => {
+ if (val.userNames) {
+ val.userNames = val.userNames.split(',')
+ }
})
this.$nextTick(() => {
let flowGroupProcess = document.getElementsByClassName('flow-group-process')
@@ -354,10 +352,10 @@
checkedRole(data) {
this.assigneeNewLoading = true
changeAssigneeNew({
- taskId: this.selectPeople.id, // 任务id
+ taskId: this.selectPeople.taskId || this.selectPeople.id, // 任务id
assignee: data[0].id, // 被委托人
- userId: this.selectPeople.assigneeId, // 委托人
- pId: this.selectPeople.processInstanceId // 流程实例
+ userId: this.selectPeople.userId || this.selectPeople.assigneeId, // 委托人
+ pId: this.selectPeople.prcId || this.selectPeople.processInstanceId // 流程实例
}).then(res => {
this.assigneeNewLoading = false
if (res.success) {
@@ -370,22 +368,51 @@
}
})
},
+ integrateData(list) {
+ list = list.reverse()
+ let row = {}
+ for (let i = 0; i < list.length; i++) {
+ if (list[i].taskId) {
+ row = list[i]
+ return row
+ } else {
+ if (list[i].children && list[i].children.length > 0) {
+ let children = list[i].children.reverse()
+ for (let j = 0; j < children.length; j++) {
+ if (children[j].taskId){
+ row = children[j]
+ return row
+ }
+ }
+ }
+ }
+ }
+ },
// 汇总流程
approveHandler() {
const index = this.detailData.length - 1 // 当前流程任务最后一步index
const isEnd = true
- let row = {...this.detailData[this.approveRowIndex + 1]}// 汇总页下一步拿到数据
- if (this.approveRowIndex === this.detailData.length - 1) { // 最后一步
- row = {...this.detailData[this.approveRowIndex]}
+ let prcType = ''
+ let row = {}
+ if (this.$route.query.oldAndNew == 'new' && this.$route.query.flowType == '3') {
+ row = this.integrateData(JSON.parse(JSON.stringify(this.detailData)))
+ prcType = row.flowType
+ row.taskInfo = row.taskKeyShow
+ row.taskIds = row.taskId
+ row.tabsName = this.$route.query.tabsName
+ row.prcType = row.flowType
+ } else {
+ row = {...this.detailData[this.approveRowIndex + 1]}// 汇总页下一步拿到数据
+ if (this.approveRowIndex === this.detailData.length - 1) { // 最后一步
+ row = {...this.detailData[this.approveRowIndex]}
+ }
+ row.taskIds = row.id
+ row.taskInfo = row.name
+ row.tabsName = this.$route.query.tabsName
+ const currentItem = this.detailData[this.approveRowIndex]
+ row.currentItem = currentItem
+ prcType = this.detailData[index].prcType
}
- row.taskIds = row.id
- row.taskInfo = row.name
- row.tabsName = this.$route.query.tabsName
-
- const currentItem = this.detailData[this.approveRowIndex]
- row.currentItem = currentItem
-
- const prcType = this.detailData[index].prcType || this.detailData[index].flowType // 流程类型
if (isEnd) {
if (this.$store.state.detailMap !== '') {
const lastDetailMap = this.$store.getters.getLastDetailMap
@@ -492,14 +519,22 @@
* @Description: 查看流程最后一步
*/
seeProcessLast() {
+ const row = {...this.detailData[0]}
+ let prcType = ''
const index = this.detailData.length - 1 // 当前流程任务最后一步index
const isEnd = true
- const row = {...this.detailData[0]}
- row.taskIds = row.id
- row.taskInfo = row.name
- row.tabsName = this.$route.query.tabsName
- const prcType = this.detailData[index].prcType // 流程类型
- console.log(prcType);
+ if (this.$route.query.oldAndNew == 'new' && this.$route.query.flowType == '3') {
+ prcType = row.flowType
+ row.taskInfo = row.taskKeyShow
+ row.taskIds = row.taskId
+ row.tabsName = this.$route.query.tabsName
+ row.prcType = row.flowType
+ } else {
+ row.taskIds = row.id
+ row.taskInfo = row.name
+ row.tabsName = this.$route.query.tabsName
+ prcType = this.detailData[index].prcType
+ }
// 判断当前流程是否已全部办理完成
// this.detailData.map(item => {
// if (!item.endTime) {
@@ -666,15 +701,15 @@
name: componentName,
query: {
bpnId: row.bpnId,
- taskIds: row.id,
- prcId: row.processInstanceId,
+ taskIds: row.taskIds || row.id,
+ prcId: row.prcId || row.processInstanceId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType,
disabledXX: true,
verifySarStandard: true,
index: this.approveRowIndex,
- processInstanceId: row.processInstanceId
+ processInstanceId: row.prcId || row.processInstanceId
},
params: {
currentItem: row.currentItem
@@ -1575,9 +1610,9 @@
}
},
mounted() {
- if (this.$route.query.oldAndNew == 'new' && this.$route.query.flowType == '3'){
+ if (this.$route.query.oldAndNew == 'new' && this.$route.query.flowType == '3') {
this.getProcessList()
- }else{
+ } else {
this.processNum()
}
this.processTable()