我发起的菜单
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="任务名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入任务名称" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
<div>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input v-model='tableStore.table.params.searchValue' placeholder='请输入任务名称' />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
@@ -22,93 +22,100 @@ import { useRouter } from 'vue-router'
|
||||
import { dateFormatter, formatPast2 } from '@/utils/formatTime'
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
name: 'businessUser'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/task/doneList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 170 },
|
||||
url: '/bpm-boot/bpm/task/doneList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 170 },
|
||||
{
|
||||
title: '审批状态',
|
||||
field: 'status',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '审批建议', field: 'reason', minWidth: 150 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return formatPast2(obj.row.durationInMillis)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
title: '审批状态',
|
||||
field: 'status',
|
||||
minWidth: 130,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '审批建议', field: 'reason', minWidth: 150 },
|
||||
{
|
||||
title: '耗时',
|
||||
field: 'durationInMillis',
|
||||
minWidth: 150,
|
||||
formatter: (obj: any) => {
|
||||
return formatPast2(obj.row.durationInMillis)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '150',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstance.id)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstance.id)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,36 +1,42 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="待办任务" name="1">
|
||||
<TodoTask v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已办任务" name="2">
|
||||
<DoneTask v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class='default-main'>
|
||||
<el-tabs v-model='activeName' type='border-card'>
|
||||
<el-tab-pane label='待办任务' name='1'>
|
||||
<TodoTask v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='已办任务' name='2'>
|
||||
<DoneTask v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label='我发起的' name='3'>
|
||||
<MyInstance v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup lang='ts'>
|
||||
import { ref } from 'vue'
|
||||
import TodoTask from './todo/index.vue'
|
||||
import DoneTask from './done/index.vue'
|
||||
import MyInstance from './myInstance/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
|
||||
defineOptions({
|
||||
// name: 'bpm/task'
|
||||
// name: 'bpm/task'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang='scss' scoped>
|
||||
.bars_w {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__content) {
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
height: v-bind('layout.height');
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
138
src/views/system/bpm/task/myInstance/index.vue
Normal file
138
src/views/system/bpm/task/myInstance/index.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div>
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
placeholder='请输入任务名称'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { onMounted, provide, ref } from 'vue'
|
||||
import { formatDate, formatPast2 } from '@/utils/formatTime'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/processInstance/myPage',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'name', minWidth: 130 },
|
||||
{ title: '流程分类', field: 'category', minWidth: 130 },
|
||||
{
|
||||
field: 'status',
|
||||
title: '流程状态',
|
||||
render: 'tag',
|
||||
minWidth: 130,
|
||||
custom: {
|
||||
1: 'primary',
|
||||
2: 'success',
|
||||
3: 'danger',
|
||||
4: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
1: '审批中',
|
||||
2: '审批通过',
|
||||
3: '审批不通过',
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{ title: '发起时间', field: 'startTime', minWidth: 140 },
|
||||
{ title: '结束时间', field: 'endTime', minWidth: 140 },
|
||||
{
|
||||
title: '耗时', field: 'durationInMillis', minWidth: 130,
|
||||
formatter: (obj: any) => {
|
||||
const millis = obj.row.durationInMillis
|
||||
return millis > 0 ? formatPast2(millis) : ''
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '当前审批任务', field: 'tasks', minWidth: 140,
|
||||
formatter: (obj: any) => {
|
||||
const tasks = obj.row.tasks
|
||||
if (tasks) {
|
||||
return tasks[0].name
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
// return millis > 0 ? formatPast2(millis) : '--'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
minWidth: '180',
|
||||
fixed: 'right',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '流程详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.id)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,20 +1,20 @@
|
||||
<!--待办事项列表-->
|
||||
<template>
|
||||
<div >
|
||||
<TableHeader date-picker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
placeholder='请输入任务名称'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<div>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='任务名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.searchValue'
|
||||
placeholder='请输入任务名称'
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
@@ -26,68 +26,75 @@ import { useRouter } from 'vue-router'
|
||||
|
||||
|
||||
defineOptions({
|
||||
name: 'businessUser'
|
||||
name: 'businessUser'
|
||||
})
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/bpm-boot/bpm/task/todoList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
url: '/bpm-boot/bpm/task/todoList',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '任务名称', field: 'processInstance.name', minWidth: 130 },
|
||||
{ title: '发起人', field: 'processInstance.startUser.name', minWidth: 130 },
|
||||
{ title: '发起部门', field: 'processInstance.startUser.deptName', minWidth: 130 },
|
||||
{ title: '发起时间', field: 'createTime', minWidth: 170 },
|
||||
{ title: '当前任务', field: 'name', minWidth: 130 },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '230',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '230',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'productSetting',
|
||||
title: '办理',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstance.id)
|
||||
}
|
||||
}
|
||||
]
|
||||
name: 'productSetting',
|
||||
title: '办理',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
handleAudit(row.processInstance.id)
|
||||
}
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any) => {
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId,
|
||||
todo: 'todo'
|
||||
}
|
||||
})
|
||||
push({
|
||||
name: 'BpmProcessInstanceDetail',
|
||||
query: {
|
||||
id: instanceId,
|
||||
todo: 'todo'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user