1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
| <template>
| <basic-container title="待办流程任务">
| <avue-crud ref="crud" :data="todoData" :option="todoOption" :page.sync="page"
| :table-loading="loading"
| @on-load="onLoad"
| @cell-click="cellHandle">
| <template #menu="{size,row,index}">
| <el-button :size="size"
| icon="el-icon-check"
| type="text"
| @click="gotodo(row,index)">执行
| </el-button>
| </template>
| </avue-crud>
| </basic-container>
| </template>
|
| <script>
| export default {
| name: "UndoTaskPortlet",
| data(){
| return {
| loading: false,
| page: {
| pageSize: 10,
| currentPage: 1,
| total: 0
| },
| // 代办流程任务data
| todoData: [],
| // 代办流程任务option
| todoOption: {
| height: 500,
| addBtn: false,
| header: false,
| align: 'center',
| index: true,
| menuWidth: 80,
| editBtn: false,
| delBtn: false,
| border: true,
| column: [{
| label: '任务名称',
| prop: 'taskName',
| sortable: true,
| headerAlign: 'center',
| align: 'left',
| html: true,
| width: 300,
| overHidden: true,
| formatter: (val) => {
| return '<a name="processname" href="javascript:;" style="color: #66b1ff;">' + val.variables.processName + '-' + val.taskName + '</a>'
| }
| },
| {
| label: '上一步处理时间',
| sortable: true,
| width: 150,
| prop: 'createTime'
| },
| {
| label: '上一步操作人',
| sortable: true,
| width: 120,
| prop: 'historyActivityAssigneName'
| },
| {
| label: '流程描述',
| prop: 'processDesc',
| overHidden: true,
| formatter: (val) => {
| return val.variables.processDesc
| }
| },
| {
| label: '所属流程模板',
| sortable: true,
| overHidden: true,
| prop: 'categoryName'
| }
| ]
| },
| }
| },
| created() {
| },
| methods: {
| onLoad(page, params = {}) {
| this.loading = true;
| const query = {
| ...this.query,
| category: (params.category) ? flowCategory(params.category) : null
| };
| todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
| const data = res.data.data;
| this.page.total = data.total;
| this.todoData = data.records;
| this.loading = false;
| }).catch(error => {
| this.$message.error(error);
| this.loading = false;
| })
| },
| cellHandle(row, column, cell, event) {
| if (column.property == 'taskName') {
| this.gotodo(row)
| }
| },
| gotodo(row, index) {
| this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`});
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|