Commit bd2bbc67 authored by wangdanlei's avatar wangdanlei

合并产品【10719】工作流业务信息同步机制修改延申问题:【流程实例管理页面】、【我处理的任务】、【我发起的流程】页面,关于【流程实例名称】查询条件调整

parent f2cf6da2
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -44,6 +44,7 @@
<script>
import TaskDetail from '@/business-components/tabCom/task-detail'
import { getInstancePbo, getTemplateList } from '@/api/workflow/userSettings.js'
import { getTaskList, getUnclaimedTask, getUnfinishedTask, getFinishedTask, getUnreadTask, getReadTask, receiveTask, completeTask, batOperationCheck } from '@/api/workflow/taskCenter.js'
import { getAllApp } from '@/api/workflow/config'
import HandleTasks from './handleTasks'
......@@ -164,6 +165,28 @@ export default {
])
}
}, minWidth: 180 },
{ title: '业务对象', key: 'taskTitle', align: 'left', minWidth: 200,
component: {
render: (h, params) => {
return h('span', {
class: 'link-style',
on: {
click: () => {
getInstancePbo(params.processInstanceId).then(res => {
const pbo = res.items
if (pbo) {
let modelName = pbo.dxClassname.split('.').splice(-1)[0]
modelName = this.$utils.getModelName4dxClassName(modelName)
const title = `${pbo.subTypeDisplayName}_ ${pbo.number}_${pbo.name}`
this.$utils.toObjectDetail(pbo.id, pbo.subTypeName, title, modelName)
}
})
}
}
}, params.taskTitle || '/')
}
}
},
{ title: '流程模板', key: 'procDefName', align: 'center' },
{ title: '任务状态', key: 'state', align: 'center', formatter(row, column) {
return row.endTime ? '已完成' : '进行中'
......@@ -244,7 +267,9 @@ export default {
this.handleTasks()
}
}
}]
}],
// 流程模板下拉列表数据
workflowTemplateOpts: []
}
},
computed: {
......@@ -254,11 +279,12 @@ export default {
propFormData: [{
data: [
{
key: 'processInstName',
title: '流程名称',
key: 'processDefKey',
title: '流程模板',
component: {
name: 'el-input',
clearable: true
name: 'el-select',
clearable: true,
options: this.workflowTemplateOpts
}
},
{
......@@ -269,6 +295,14 @@ export default {
clearable: true
}
},
{
key: 'businessTitle',
title: '业务对象',
component: {
name: 'el-input',
clearable: true
}
},
{
key: 'assignee',
title: '活动执行人',
......@@ -399,6 +433,15 @@ export default {
this.getTasks(getUnreadTask, 3)
this.getTasks(getReadTask, 4)
this.getList()
getTemplateList({ page: 1, size: 9999 }).then(res => {
const content = this.$utils._get(res, 'items.content') || []
this.workflowTemplateOpts = content.map(m => {
return {
label: m.name,
value: m.procDefKey
}
})
})
},
handleSearch(obj) {
this.searchObj = {}
......@@ -417,6 +460,12 @@ export default {
if (obj.taskName) {
this.searchObj.taskName = obj.taskName
}
if (obj.processDefKey) {
this.searchObj.processDefKey = obj.processDefKey
}
if (obj.businessTitle) {
this.searchObj.businessTitle = obj.businessTitle
}
if (obj.assignee) {
this.searchObj.assignee = !isNaN(obj.assignee) ? obj.assignee : localStorage.getItem('userId')
}
......
......@@ -58,6 +58,7 @@
<script>
import { getInsts, getOwnerSignAddActivityList } from '@/api/workflow/process.js'
import { completeTask } from '@/api/workflow/taskCenter'
import { getInstancePbo, getTemplateList } from '@/api/workflow/userSettings.js'
import addExaminationUserSelect from './addExaminationUserSelect'
import processInfo from './components/processInfo'
export default {
......@@ -99,7 +100,7 @@ export default {
]
}
}},
{ title: '实例名称', key: 'name', align: 'center', minWidth: 180, component: {
{ title: '流程名称', key: 'name', align: 'center', minWidth: 180, component: {
render: (h, params) => {
return h('div', [
h('span', {
......@@ -114,6 +115,29 @@ export default {
])
}
}},
{ title: '流程模板', key: 'procDefName', align: 'center', minWidth: 120 },
{ title: '业务对象', key: 'businessName', align: 'left', minWidth: 200,
component: {
render: (h, params) => {
return h('span', {
class: 'link-style',
on: {
click: () => {
getInstancePbo(params.processInstanceId).then(res => {
const pbo = res.items
if (pbo) {
let modelName = pbo.dxClassname.split('.').splice(-1)[0]
modelName = this.$utils.getModelName4dxClassName(modelName)
const title = `${pbo.subTypeDisplayName}_ ${pbo.number}_${pbo.name}`
this.$utils.toObjectDetail(pbo.id, pbo.subTypeName, title, modelName)
}
})
}
}
}, params.businessName || '/')
}
}
},
{ title: '状态', key: 'status', align: 'center', minWidth: 100 },
{ title: '当前任务', key: 'taskName', align: 'center', minWidth: 100 },
{ title: '处理人', key: 'assignName', align: 'center', minWidth: 100 },
......@@ -158,7 +182,9 @@ export default {
}
}
}],
addExaminationTableData: []
addExaminationTableData: [],
// 流程模板下拉列表数据
workflowTemplateOpts: []
}
},
computed: {
......@@ -168,8 +194,17 @@ export default {
propFormData: [{
data: [
{
key: 'name',
title: '流程名称',
key: 'processDefKey',
title: '流程模板',
component: {
name: 'el-select',
clearable: true,
options: this.workflowTemplateOpts
}
},
{
key: 'businessTitle',
title: '业务对象',
component: {
name: 'el-input',
clearable: true
......@@ -220,6 +255,15 @@ export default {
},
initData() {
this.getList()
getTemplateList({ page: 1, size: 9999 }).then(res => {
const content = this.$utils._get(res, 'items.content') || []
this.workflowTemplateOpts = content.map(m => {
return {
label: m.name,
value: m.procDefKey
}
})
})
},
handleSearch(obj) {
this.searchObj = {}
......@@ -227,8 +271,11 @@ export default {
this.searchObj.gmtCreateStart = obj.receiveTimeRange[0] + ' 00:00:00'
this.searchObj.gmtCreateEnd = obj.receiveTimeRange[1] + ' 23:59:59'
}
if (obj && obj.name) {
this.searchObj.name = obj.name
if (obj && obj.processDefKey) {
this.searchObj.processDefKey = obj.processDefKey
}
if (obj.businessTitle) {
this.searchObj.businessTitle = obj.businessTitle
}
if (obj && obj.startedUserId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment