[update] 新增流程中心页,企标计划立项/变更流程

This commit is contained in:
lideqin
2023-10-11 18:07:14 +08:00
parent 4d45b77827
commit 505c07fd88
23 changed files with 3007 additions and 139 deletions
@@ -0,0 +1,87 @@
<template>
<a-card :bordered="false">
<a-tabs default-active-key="1" v-model="activeTab">
<template v-for="tab in tabList">
<a-tab-pane v-if="isHasPermission(tab.permission)" :key="tab.component">
<template v-slot:tab>
<div>
{{ tab.label }}
</div>
</template>
</a-tab-pane>
</template>
</a-tabs>
<div class="tabs-table-box">
<component
:is="comp"
ref="compModel"
v-if="comp">
</component>
</div>
</a-card>
</template>
<script>
import { isHasPermission } from '@/utils/hasPermission'
export default {
name: 'ProcessCenter',
data () {
return {
comp: null,
activeTab: '',
tabList: [
{ // 待办流程
component: 'TodoList',
label: this.$t('workCenter.processCenter.todoProcess'),
permission: 'workCenter:processCenter:todo'
},
{ // 已办流程
component: 'DoneList',
label: this.$t('workCenter.processCenter.doneProcess'),
permission: 'workCenter:processCenter:done'
},
{ // 已发流程
component: 'SentList',
label: this.$t('workCenter.processCenter.sentProcess'),
permission: 'workCenter:processCenter:sent'
},
{ // 监控流程
component: 'MonitorList',
label: this.$t('workCenter.processCenter.monitorProcess'),
permission: 'workCenter:processCenter:monitor'
},
{ // 草稿
component: 'DraftList',
label: this.$t('workCenter.processCenter.draft'),
permission: 'workCenter:processCenter:draft'
}
]
}
},
watch: {
activeTab () {
this.comp = resolve => require([`@views/workCenter/processCenter/table/${this.activeTab}.vue`], resolve)
}
},
created () {
// 获取有权限的第一个tab
this.activeTab = (this.tabList.find(item => isHasPermission(item.permission)) || {}).component
this.comp = resolve => require([`@views/workCenter/processCenter/table/${this.activeTab}.vue`], resolve)
},
mounted () {
window.reloadData = () => {
if (this.$refs.compModel && this.$refs.compModel.loadData) {
this.$refs.compModel.loadData()
}
}
},
methods: {
isHasPermission
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,171 @@
<template>
<div>
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 流程名称 -->
<a-col :span="6">
<a-form-item :label="$t('processName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('processName')" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<!-- 流程编号 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('workCenter.processCenter.processNumber')" v-model="queryParam.processNumber"></a-input>
</a-form-item>
</a-col>
<!-- 流程类型 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="esp_project_status"
v-model="queryParam.projectStatus">
</j-dict-select-tag>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search" v-has="'workCenter:processCenter:doneSearch'" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 查看 -->
<a @click="handleDetail(record)" class="table-ope-btn" v-has="'workCenter:processCenter:doneDetail'">{{ $t('view') }}</a>
</div>
</j-table>
</div>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default {
name: 'DoneList',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{ // 流程编号
title: this.$t('workCenter.processCenter.processNumber'),
align: 'center',
width: 180,
dataIndex: 'processNumber',
scopedSlots: { customRender: 'text' }
},
{ // 流程类型
title: this.$t('workCenter.processCenter.processType'),
align: 'center',
width: 180,
dataIndex: 'processType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 流程名称
title: this.$t('processName'),
align: 'center',
width: 180,
dataIndex: 'processName',
scopedSlots: { customRender: 'text' }
},
{ // 发起人
title: this.$t('workCenter.processCenter.initiator'),
align: 'center',
width: 180,
dataIndex: 'initiator',
scopedSlots: { customRender: 'text' }
},
{ // 当前处理人
title: this.$t('workCenter.processCenter.currentProcessor'),
align: 'center',
width: 180,
dataIndex: 'currentProcessor',
scopedSlots: { customRender: 'text' }
},
{ // 接收任务时间
title: this.$t('workCenter.processCenter.receivingTaskTime'),
align: 'center',
width: 180,
dataIndex: 'receivingTaskTime',
scopedSlots: { customRender: 'text' }
},
{ // 完成时间
title: this.$t('workCenter.processCenter.finishTime'),
align: 'center',
width: 180,
dataIndex: 'finishTime',
scopedSlots: { customRender: 'text' }
},
{ // 流程状态
title: this.$t('workCenter.processCenter.processState'),
align: 'center',
width: 180,
dataIndex: 'processState_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
url: {
list: ''
}
}
},
methods: {
handleDetail (record) {
// 跳转到对应流程页面
let path = ''
switch (record.processType) {
case '':
path = ''
}
this.$router.push({
path: path,
query: {
processId: record.id,
onlyLook: true
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,132 @@
<template>
<div>
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 流程类型 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="esp_project_status"
v-model="queryParam.projectStatus">
</j-dict-select-tag>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search" v-has="'workCenter:processCenter:draftSearch'" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 办理 -->
<a @click="handleTransact(record)" class="table-ope-btn" v-has="'workCenter:processCenter:draftTransact'">{{ $t('transact') }}</a>
</div>
</j-table>
</div>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
export default {
name: 'DraftList',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{ // 流程类型
title: this.$t('workCenter.processCenter.processType'),
align: 'center',
width: 180,
dataIndex: 'processType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 流程名称
title: this.$t('processName'),
align: 'center',
width: 180,
dataIndex: 'processName',
scopedSlots: { customRender: 'text' }
},
{ // 发起人
title: this.$t('workCenter.processCenter.initiator'),
align: 'center',
width: 180,
dataIndex: 'initiator',
scopedSlots: { customRender: 'text' }
},
{ // 创建时间
title: this.$t('createTime'),
align: 'center',
width: 180,
dataIndex: 'createTime',
sort: true,
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
url: {
list: ''
}
}
},
methods: {
// 办理
handleTransact (record) {
// 跳转到对应流程页面
let path = ''
switch (record.processType) {
case '':
path = ''
}
this.$router.push({
path: path,
query: {
currentNode: record.currentNode
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,195 @@
<template>
<div>
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 流程名称 -->
<a-col :span="6">
<a-form-item :label="$t('processName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('processName')" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<!-- 流程编号 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('workCenter.processCenter.processNumber')" v-model="queryParam.processNumber"></a-input>
</a-form-item>
</a-col>
<!-- 流程类型 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="esp_project_status"
v-model="queryParam.processType">
</j-dict-select-tag>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search" v-has="'workCenter:processCenter:monitorSearch'" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 查看 -->
<a @click="handleDetail(record)" class="table-ope-btn" v-has="'workCenter:processCenter:monitorDetail'">{{ $t('view') }}</a>
<a-divider type="vertical" />
<!-- 强制撤回 -->
<a @click="handleWithdrawal(record)" class="table-ope-btn" v-has="'workCenter:processCenter:todoWithdrawal'">{{ $t('compulsoryWithdrawal') }}</a>
</div>
</j-table>
</div>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { compulsoryWithdrawal } from '@/api/workCenter'
export default {
name: 'MonitorList',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{ // 流程编号
title: this.$t('workCenter.processCenter.processNumber'),
align: 'center',
width: 180,
dataIndex: 'processNumber',
scopedSlots: { customRender: 'text' }
},
{ // 流程类型
title: this.$t('workCenter.processCenter.processType'),
align: 'center',
width: 180,
dataIndex: 'processType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 流程名称
title: this.$t('processName'),
align: 'center',
width: 180,
dataIndex: 'processName',
scopedSlots: { customRender: 'text' }
},
{ // 发起人
title: this.$t('workCenter.processCenter.initiator'),
align: 'center',
width: 180,
dataIndex: 'initiator',
scopedSlots: { customRender: 'text' }
},
{ // 当前处理人
title: this.$t('workCenter.processCenter.currentProcessor'),
align: 'center',
width: 180,
dataIndex: 'currentProcessor',
scopedSlots: { customRender: 'text' }
},
{ // 接收任务时间
title: this.$t('workCenter.processCenter.receivingTaskTime'),
align: 'center',
width: 180,
dataIndex: 'receivingTaskTime',
scopedSlots: { customRender: 'text' }
},
{ // 完成时间
title: this.$t('workCenter.processCenter.finishTime'),
align: 'center',
width: 180,
dataIndex: 'finishTime',
scopedSlots: { customRender: 'text' }
},
{ // 流程耗时(小时)
title: this.$t('workCenter.processCenter.processTime'),
align: 'center',
width: 180,
dataIndex: 'processTime',
scopedSlots: { customRender: 'text' }
},
{ // 流程状态
title: this.$t('workCenter.processCenter.processState'),
align: 'center',
width: 180,
dataIndex: 'processState_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
url: {
list: ''
}
}
},
methods: {
// 查看
handleDetail (record) {
// 跳转到对应流程页面
let path = ''
switch (record.processType) {
case '':
path = ''
}
this.$router.push({
path: path,
query: {
processId: record.id
}
})
},
// 强制撤回
handleWithdrawal (record) {
const params = {}
params.processId = this.currentTurnTo.id
compulsoryWithdrawal(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,205 @@
<template>
<div>
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 流程名称 -->
<a-col :span="6">
<a-form-item :label="$t('processName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('processName')" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<!-- 流程编号 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('workCenter.processCenter.processNumber')" v-model="queryParam.processNumber"></a-input>
</a-form-item>
</a-col>
<!-- 流程类型 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="esp_project_status"
v-model="queryParam.processType">
</j-dict-select-tag>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<!-- 流程状态 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processState')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processState')"
dict-code="esp_project_status"
v-model="queryParam.processState">
</j-dict-select-tag>
</a-form-item>
</a-col>
</template>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a @click="handleToggleSearch">
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" v-has="'workCenter:processCenter:sentSearch'" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 查看 -->
<a @click="handleDetail(record)" class="table-ope-btn" v-has="'workCenter:processCenter:sentDetail'">{{ $t('view') }}</a>
<a-divider type="vertical" />
<!-- 强制撤回 -->
<a @click="handleWithdrawal(record)" class="table-ope-btn" v-has="'workCenter:processCenter:sentWithdrawal'">{{ $t('compulsoryWithdrawal') }}</a>
</div>
</j-table>
</div>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { compulsoryWithdrawal } from '@/api/workCenter'
export default {
name: 'SentList',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{ // 流程编号
title: this.$t('workCenter.processCenter.processNumber'),
align: 'center',
width: 180,
dataIndex: 'processNumber',
scopedSlots: { customRender: 'text' }
},
{ // 流程类型
title: this.$t('workCenter.processCenter.processType'),
align: 'center',
width: 180,
dataIndex: 'processType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 流程名称
title: this.$t('processName'),
align: 'center',
width: 180,
dataIndex: 'processName',
scopedSlots: { customRender: 'text' }
},
{ // 发起人
title: this.$t('workCenter.processCenter.initiator'),
align: 'center',
width: 180,
dataIndex: 'initiator',
scopedSlots: { customRender: 'text' }
},
{ // 当前处理人
title: this.$t('workCenter.processCenter.currentProcessor'),
align: 'center',
width: 180,
dataIndex: 'currentProcessor',
scopedSlots: { customRender: 'text' }
},
{ // 接收任务时间
title: this.$t('workCenter.processCenter.receivingTaskTime'),
align: 'center',
width: 180,
dataIndex: 'receivingTaskTime',
scopedSlots: { customRender: 'text' }
},
{ // 完成时间
title: this.$t('workCenter.processCenter.finishTime'),
align: 'center',
width: 180,
dataIndex: 'finishTime',
scopedSlots: { customRender: 'text' }
},
{ // 流程状态
title: this.$t('workCenter.processCenter.processState'),
align: 'center',
width: 180,
dataIndex: 'processState_dictText',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
url: {
list: ''
}
}
},
methods: {
// 查看
handleDetail (record) {
// 跳转到对应流程页面
let path = ''
switch (record.processType) {
case '':
path = ''
}
this.$router.push({
path: path,
query: {
processId: record.id,
onlyLook: true
}
})
},
// 强制撤回
handleWithdrawal (record) {
const params = {}
params.processId = this.currentTurnTo.id
compulsoryWithdrawal(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,180 @@
<template>
<div>
<!-- 搜索区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 流程名称 -->
<a-col :span="6">
<a-form-item :label="$t('processName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('processName')" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<!-- 流程编号 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input :placeholder="$t('pleaseEnter')+$t('workCenter.processCenter.processNumber')" v-model="queryParam.processNumber"></a-input>
</a-form-item>
</a-col>
<!-- 流程类型 -->
<a-col :span="6">
<a-form-item :label="$t('workCenter.processCenter.processType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:placeholder="$t('pleaseSelect')+$t('workCenter.processCenter.processType')"
dict-code="esp_project_status"
v-model="queryParam.projectStatus">
</j-dict-select-tag>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search" v-has="'workCenter:processCenter:todoSearch'" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell">
<!-- 办理 -->
<a @click="handleTransact(record)" class="table-ope-btn" v-has="'workCenter:processCenter:todoTransact'">{{ $t('transact') }}</a>
<a-divider type="vertical" />
<!-- 转办 -->
<a @click="handleTurnTo(record)" class="table-ope-btn" v-has="'workCenter:processCenter:todoTurnTo'">{{ $t('turnTo') }}</a>
</div>
</j-table>
</div>
<!-- 转办需要选人 -->
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectChange"></user-select-modal>
</div>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import UserSelectModal from '@/components/selection/UserSelectModal'
import { toDoTurnTo } from '@/api/workCenter'
export default {
name: 'TodoList',
components: { JTable, UserSelectModal },
mixins: [JeroListMixin],
data () {
return {
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{ // 流程编号
title: this.$t('workCenter.processCenter.processNumber'),
align: 'center',
width: 180,
dataIndex: 'processNumber',
scopedSlots: { customRender: 'text' }
},
{ // 流程类型
title: this.$t('workCenter.processCenter.processType'),
align: 'center',
width: 180,
dataIndex: 'processType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 流程名称
title: this.$t('processName'),
align: 'center',
width: 180,
dataIndex: 'processName',
scopedSlots: { customRender: 'text' }
},
{ // 发起人
title: this.$t('workCenter.processCenter.initiator'),
align: 'center',
width: 180,
dataIndex: 'initiator',
scopedSlots: { customRender: 'text' }
},
{ // 接收任务时间
title: this.$t('workCenter.processCenter.receivingTaskTime'),
align: 'center',
width: 180,
dataIndex: 'receivingTaskTime',
sort: true,
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],
url: {
list: '/process/center/todoTaskList'
},
currentTurnTo: {} // 当前转办
}
},
methods: {
// 办理
handleTransact (record) {
// 跳转到对应流程页面
let path = ''
switch (record.processType) {
case '':
path = ''
}
this.$router.push({
path: path,
query: {
currentNode: record.currentNode
}
})
},
// 转办
handleTurnTo (record) {
this.currentTurnTo = record
this.$refs.userSelectModal.open()
},
// 转办选完人的回调
userSelectChange (value) {
if (value) {
const params = {}
params.processId = this.currentTurnTo.id
params.person = value
toDoTurnTo(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
}
}
}
</script>
<style scoped>
</style>