|
@@ -2,20 +2,12 @@
|
2
|
2
|
<div class="app-container">
|
3
|
3
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
4
|
4
|
<el-form-item label="名称" prop="name">
|
5
|
|
- <el-input
|
6
|
|
- v-model="queryParams.name"
|
7
|
|
- placeholder="请输入名称"
|
8
|
|
- clearable
|
9
|
|
- size="small"
|
10
|
|
- @keyup.enter.native="handleQuery"
|
11
|
|
- />
|
|
5
|
+ <el-input v-model="queryParams.name" placeholder="请输入名称" clearable size="small"
|
|
6
|
+ @keyup.enter.native="handleQuery" />
|
12
|
7
|
</el-form-item>
|
13
|
8
|
<el-form-item label="开始时间" prop="deployTime">
|
14
|
|
- <el-date-picker clearable size="small"
|
15
|
|
- v-model="queryParams.deployTime"
|
16
|
|
- type="date"
|
17
|
|
- value-format="yyyy-MM-dd"
|
18
|
|
- placeholder="选择时间">
|
|
9
|
+ <el-date-picker clearable size="small" v-model="queryParams.deployTime" type="date" value-format="yyyy-MM-dd"
|
|
10
|
+ placeholder="选择时间">
|
19
|
11
|
</el-date-picker>
|
20
|
12
|
</el-form-item>
|
21
|
13
|
<el-form-item>
|
|
@@ -26,116 +18,88 @@
|
26
|
18
|
|
27
|
19
|
<el-row :gutter="10" class="mb8">
|
28
|
20
|
<el-col :span="1.5">
|
29
|
|
- <el-button
|
30
|
|
- type="primary"
|
31
|
|
- plain
|
32
|
|
- icon="el-icon-plus"
|
33
|
|
- size="mini"
|
34
|
|
- @click="handleAdd"
|
35
|
|
- v-hasPermi="['system:deployment:add']"
|
36
|
|
- >新增流程</el-button>
|
|
21
|
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
|
22
|
+ v-hasPermi="['system:deployment:add']">新增流程</el-button>
|
37
|
23
|
</el-col>
|
38
|
24
|
<el-col :span="1.5">
|
39
|
|
- <el-button
|
40
|
|
- type="danger"
|
41
|
|
- plain
|
42
|
|
- icon="el-icon-delete"
|
43
|
|
- size="mini"
|
44
|
|
- :disabled="multiple"
|
45
|
|
- @click="handleDelete"
|
46
|
|
- v-hasPermi="['system:deployment:remove']"
|
47
|
|
- >删除</el-button>
|
|
25
|
+ <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
|
26
|
+ v-hasPermi="['system:deployment:remove']">删除</el-button>
|
48
|
27
|
</el-col>
|
49
|
28
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
50
|
29
|
</el-row>
|
51
|
30
|
|
52
|
31
|
<el-table v-loading="loading" :data="myProcessList" border @selection-change="handleSelectionChange">
|
53
|
32
|
<el-table-column type="selection" width="55" align="center" />
|
54
|
|
- <el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true"/>
|
55
|
|
- <el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/>
|
|
33
|
+ <el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true" />
|
|
34
|
+ <el-table-column label="流程名称" align="center" prop="procDefName" :show-overflow-tooltip="true" />
|
56
|
35
|
<el-table-column label="流程类别" align="center" prop="category" width="100px" />
|
57
|
36
|
<el-table-column label="流程版本" align="center" width="80px">
|
58
|
37
|
<template slot-scope="scope">
|
59
|
|
- <el-tag size="medium" >v{{ scope.row.procDefVersion }}</el-tag>
|
|
38
|
+ <el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
60
|
39
|
</template>
|
61
|
40
|
</el-table-column>
|
62
|
|
- <el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
|
|
41
|
+ <el-table-column label="提交时间" align="center" prop="createTime" width="180" />
|
63
|
42
|
<el-table-column label="流程状态" align="center" width="100">
|
64
|
43
|
<template slot-scope="scope">
|
65
|
44
|
<el-tag v-if="scope.row.finishTime == null" size="mini">进行中</el-tag>
|
66
|
45
|
<el-tag type="success" v-if="scope.row.finishTime != null" size="mini">已完成</el-tag>
|
67
|
46
|
</template>
|
68
|
47
|
</el-table-column>
|
69
|
|
- <el-table-column label="耗时" align="center" prop="duration" width="180"/>
|
70
|
|
- <el-table-column label="当前节点" align="center" prop="taskName"/>
|
|
48
|
+ <el-table-column label="耗时" align="center" prop="duration" width="180" />
|
|
49
|
+ <el-table-column label="当前节点" align="center" prop="taskName" />
|
71
|
50
|
<el-table-column label="办理人" align="center">
|
72
|
51
|
<template slot-scope="scope">
|
73
|
|
- <label v-if="scope.row.assigneeName">{{scope.row.assigneeName}} <el-tag type="info" size="mini">{{scope.row.assigneeDeptName}}</el-tag></label>
|
74
|
|
-<!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
|
|
52
|
+ <label v-if="scope.row.assigneeName">{{ scope.row.assigneeName }} <el-tag type="info"
|
|
53
|
+ size="mini">{{ scope.row.assigneeDeptName }}</el-tag></label>
|
|
54
|
+ <!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
|
75
|
55
|
</template>
|
76
|
56
|
</el-table-column>
|
77
|
57
|
<el-table-column label="操作" width="150" fixed="right" class-name="small-padding fixed-width">
|
78
|
58
|
<template slot-scope="scope">
|
79
|
59
|
<el-button @click="handleFlowRecord(scope.row)" type="text" size="small">详情</el-button>
|
80
|
60
|
<el-button @click="handleStop(scope.row)" type="text" size="small">取消申请</el-button>
|
81
|
|
- <el-button @click="handleDelete(scope.row)" type="text" size="small" v-hasPermi="['system:deployment:remove']">删除</el-button>
|
|
61
|
+ <el-button @click="handleDelete(scope.row)" type="text" size="small"
|
|
62
|
+ v-hasPermi="['system:deployment:remove']">删除</el-button>
|
82
|
63
|
</template>
|
83
|
64
|
</el-table-column>
|
84
|
65
|
</el-table>
|
85
|
66
|
|
86
|
|
- <pagination
|
87
|
|
- v-show="total>0"
|
88
|
|
- :total="total"
|
89
|
|
- :page.sync="queryParams.pageNum"
|
90
|
|
- :limit.sync="queryParams.pageSize"
|
91
|
|
- @pagination="getList"
|
92
|
|
- />
|
|
67
|
+ <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
68
|
+ @pagination="getList" />
|
93
|
69
|
|
94
|
70
|
<!-- 发起流程 -->
|
95
|
71
|
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
|
96
|
72
|
<el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px">
|
97
|
73
|
<el-form-item label="名称" prop="name">
|
98
|
|
- <el-input
|
99
|
|
- v-model="queryProcessParams.name"
|
100
|
|
- placeholder="请输入名称"
|
101
|
|
- clearable
|
102
|
|
- size="small"
|
103
|
|
- @keyup.enter.native="handleQuery"
|
104
|
|
- />
|
|
74
|
+ <el-input v-model="queryProcessParams.name" placeholder="请输入名称" clearable size="small"
|
|
75
|
+ @keyup.enter.native="handleQuery" />
|
105
|
76
|
</el-form-item>
|
106
|
77
|
<el-form-item>
|
107
|
78
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleProcessQuery">搜索</el-button>
|
108
|
79
|
<el-button icon="el-icon-refresh" size="mini" @click="resetProcessQuery">重置</el-button>
|
109
|
80
|
</el-form-item>
|
110
|
81
|
</el-form>
|
111
|
|
- <el-table v-loading="processLoading" fit :data="definitionList" border >
|
|
82
|
+ <el-table v-loading="processLoading" fit :data="definitionList" border>
|
112
|
83
|
<el-table-column label="流程名称" align="center" prop="name" />
|
113
|
84
|
<el-table-column label="流程版本" align="center">
|
114
|
85
|
<template slot-scope="scope">
|
115
|
|
- <el-tag size="medium" >v{{ scope.row.version }}</el-tag>
|
|
86
|
+ <el-tag size="medium">v{{ scope.row.version }}</el-tag>
|
116
|
87
|
</template>
|
117
|
88
|
</el-table-column>
|
118
|
89
|
<el-table-column label="流程分类" align="center" prop="category" />
|
119
|
90
|
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
120
|
91
|
<template slot-scope="scope">
|
121
|
|
- <el-button
|
122
|
|
- size="mini"
|
123
|
|
- type="text"
|
124
|
|
- icon="el-icon-edit-outline"
|
125
|
|
- @click="handleStartProcess(scope.row)"
|
126
|
|
- >发起流程</el-button>
|
|
92
|
+ <el-button size="mini" type="text" icon="el-icon-edit-outline"
|
|
93
|
+ @click="handleStartProcess(scope.row)">发起流程</el-button>
|
127
|
94
|
</template>
|
128
|
95
|
</el-table-column>
|
129
|
96
|
</el-table>
|
130
|
|
- <pagination
|
131
|
|
- v-show="processTotal>0"
|
132
|
|
- :total="processTotal"
|
133
|
|
- :page.sync="queryProcessParams.pageNum"
|
134
|
|
- :limit.sync="queryProcessParams.pageSize"
|
135
|
|
- @pagination="listDefinition"
|
136
|
|
- />
|
|
97
|
+ <pagination v-show="processTotal > 0" :total="processTotal" :page.sync="queryProcessParams.pageNum"
|
|
98
|
+ :limit.sync="queryProcessParams.pageSize" @pagination="listDefinition" />
|
|
99
|
+ </el-dialog>
|
|
100
|
+ <el-dialog title="详情" :visible.sync="detailsOpen" width="60%" append-to-body>
|
|
101
|
+ <RowDetail :rows="clickRow"></RowDetail>
|
137
|
102
|
</el-dialog>
|
138
|
|
-
|
139
|
103
|
</div>
|
140
|
104
|
</template>
|
141
|
105
|
|
|
@@ -148,11 +112,13 @@ import {
|
148
|
112
|
exportDeployment,
|
149
|
113
|
flowRecord
|
150
|
114
|
} from "@/api/flowable/finished";
|
151
|
|
-import { myProcessList,stopProcess } from "@/api/flowable/process";
|
152
|
|
-import {listDefinition} from "@/api/flowable/definition";
|
|
115
|
+import { myProcessList, stopProcess } from "@/api/flowable/process";
|
|
116
|
+import { listDefinition } from "@/api/flowable/definition";
|
|
117
|
+import RowDetail from './send/rowDetail.vue'
|
153
|
118
|
export default {
|
154
|
119
|
name: "Deploy",
|
155
|
120
|
components: {
|
|
121
|
+ RowDetail
|
156
|
122
|
},
|
157
|
123
|
data() {
|
158
|
124
|
return {
|
|
@@ -169,15 +135,17 @@ export default {
|
169
|
135
|
showSearch: true,
|
170
|
136
|
// 总条数
|
171
|
137
|
total: 0,
|
172
|
|
- processTotal:0,
|
|
138
|
+ processTotal: 0,
|
173
|
139
|
// 我发起的流程列表数据
|
174
|
140
|
myProcessList: [],
|
175
|
141
|
// 弹出层标题
|
176
|
142
|
title: "",
|
177
|
143
|
// 是否显示弹出层
|
178
|
144
|
open: false,
|
|
145
|
+ // 详情弹出框
|
|
146
|
+ detailsOpen: false,
|
179
|
147
|
src: "",
|
180
|
|
- definitionList:[],
|
|
148
|
+ definitionList: [],
|
181
|
149
|
// 查询参数
|
182
|
150
|
queryParams: {
|
183
|
151
|
pageNum: 1,
|
|
@@ -211,6 +179,8 @@ export default {
|
211
|
179
|
// 表单校验
|
212
|
180
|
rules: {
|
213
|
181
|
},
|
|
182
|
+ // 当前点击的行数据
|
|
183
|
+ clickRow:{}
|
214
|
184
|
};
|
215
|
185
|
},
|
216
|
186
|
created() {
|
|
@@ -270,7 +240,7 @@ export default {
|
270
|
240
|
// 多选框选中数据
|
271
|
241
|
handleSelectionChange(selection) {
|
272
|
242
|
this.ids = selection.map(item => item.procInsId)
|
273
|
|
- this.single = selection.length!==1
|
|
243
|
+ this.single = selection.length !== 1
|
274
|
244
|
this.multiple = !selection.length
|
275
|
245
|
},
|
276
|
246
|
/** 新增按钮操作 */
|
|
@@ -279,7 +249,7 @@ export default {
|
279
|
249
|
this.title = "发起流程";
|
280
|
250
|
this.listDefinition();
|
281
|
251
|
},
|
282
|
|
- listDefinition(){
|
|
252
|
+ listDefinition() {
|
283
|
253
|
listDefinition(this.queryProcessParams).then(response => {
|
284
|
254
|
this.definitionList = response.data.records;
|
285
|
255
|
this.processTotal = response.data.total;
|
|
@@ -287,32 +257,38 @@ export default {
|
287
|
257
|
});
|
288
|
258
|
},
|
289
|
259
|
/** 发起流程申请 */
|
290
|
|
- handleStartProcess(row){
|
291
|
|
- this.$router.push({ path: '/flowable/task/myProcess/send/index',
|
|
260
|
+ handleStartProcess(row) {
|
|
261
|
+ this.$router.push({
|
|
262
|
+ path: '/flowable/task/myProcess/send/index',
|
292
|
263
|
query: {
|
293
|
264
|
deployId: row.deploymentId,
|
294
|
265
|
procDefId: row.id
|
295
|
|
- }
|
|
266
|
+ }
|
296
|
267
|
})
|
297
|
268
|
},
|
298
|
269
|
/** 取消流程申请 */
|
299
|
|
- handleStop(row){
|
|
270
|
+ handleStop(row) {
|
300
|
271
|
const params = {
|
301
|
272
|
instanceId: row.procInsId
|
302
|
273
|
}
|
303
|
|
- stopProcess(params).then( res => {
|
304
|
|
- this.$modal.msgSuccess(res.msg);
|
|
274
|
+ stopProcess(params).then(res => {
|
|
275
|
+ this.$modal.msgSuccess(res.msg);
|
305
|
276
|
this.getList();
|
306
|
277
|
});
|
307
|
278
|
},
|
308
|
279
|
/** 流程流转记录 */
|
309
|
|
- handleFlowRecord(row){
|
310
|
|
- this.$router.push({ path: '/flowable/task/myProcess/detail/index',
|
311
|
|
- query: {
|
312
|
|
- procInsId: row.procInsId,
|
313
|
|
- deployId: row.deployId,
|
314
|
|
- taskId: row.taskId
|
315
|
|
- }})
|
|
280
|
+ handleFlowRecord(row) {
|
|
281
|
+ // this.$router.push({
|
|
282
|
+ // path: '/flowable/task/myProcess/detail/index',
|
|
283
|
+ // query: {
|
|
284
|
+ // procInsId: row.procInsId,
|
|
285
|
+ // deployId: row.deployId,
|
|
286
|
+ // taskId: row.taskId
|
|
287
|
+ // }
|
|
288
|
+ // })
|
|
289
|
+ console.log(row);
|
|
290
|
+ this.clickRow = row;
|
|
291
|
+ this.detailsOpen = true;
|
316
|
292
|
},
|
317
|
293
|
/** 修改按钮操作 */
|
318
|
294
|
handleUpdate(row) {
|
|
@@ -330,13 +306,13 @@ export default {
|
330
|
306
|
if (valid) {
|
331
|
307
|
if (this.form.id != null) {
|
332
|
308
|
updateDeployment(this.form).then(response => {
|
333
|
|
- this.$modal.msgSuccess("修改成功");
|
|
309
|
+ this.$modal.msgSuccess("修改成功");
|
334
|
310
|
this.open = false;
|
335
|
311
|
this.getList();
|
336
|
312
|
});
|
337
|
313
|
} else {
|
338
|
314
|
addDeployment(this.form).then(response => {
|
339
|
|
- this.$modal.msgSuccess("新增成功");
|
|
315
|
+ this.$modal.msgSuccess("新增成功");
|
340
|
316
|
this.open = false;
|
341
|
317
|
this.getList();
|
342
|
318
|
});
|
|
@@ -355,7 +331,7 @@ export default {
|
355
|
331
|
return delDeployment(ids);
|
356
|
332
|
}).then(() => {
|
357
|
333
|
this.getList();
|
358
|
|
- this.$modal.msgSuccess("删除成功");
|
|
334
|
+ this.$modal.msgSuccess("删除成功");
|
359
|
335
|
})
|
360
|
336
|
},
|
361
|
337
|
/** 导出按钮操作 */
|