|
|
1
|
+<template>
|
|
|
2
|
+ <el-container>
|
|
|
3
|
+ <el-main>
|
|
|
4
|
+
|
|
|
5
|
+ <el-row>
|
|
|
6
|
+ <el-tabs type="border-card" @tab-click="handleClick">
|
|
|
7
|
+ <el-tab-pane label="我的待办">
|
|
|
8
|
+ <!--检索条件-->
|
|
|
9
|
+ <el-row class="toolbar" style="background-color: white;margin-bottom: 10px">
|
|
|
10
|
+ <el-col :span="6">
|
|
|
11
|
+ <el-input v-model="queryinfo.name" placeholder="任务名称" style="width: 200px" clearable>
|
|
|
12
|
+ <template slot="prepend">任务名称</template>
|
|
|
13
|
+ </el-input>
|
|
|
14
|
+ </el-col>
|
|
|
15
|
+ <el-col :span="6">
|
|
|
16
|
+ <el-input v-model="queryinfo.taskDefinitionKey " placeholder="关键字" style="width: 200px" clearable>
|
|
|
17
|
+ <template slot="prepend">关键字</template>
|
|
|
18
|
+ </el-input>
|
|
|
19
|
+ </el-col>
|
|
|
20
|
+
|
|
|
21
|
+ <el-col :span="8">
|
|
|
22
|
+ <el-button type="primary" v-on:click="geMyTask">查询</el-button>
|
|
|
23
|
+ <!-- <el-button type="success" v-on:click="toAddDialog">新增</el-button>-->
|
|
|
24
|
+
|
|
|
25
|
+ </el-col>
|
|
|
26
|
+ </el-row>
|
|
|
27
|
+ <template>
|
|
|
28
|
+ <el-table
|
|
|
29
|
+ v-loading="tableloading"
|
|
|
30
|
+ :data="tableData"
|
|
|
31
|
+ style="width: 100%"
|
|
|
32
|
+ :default-sort = "{prop: 'date', order: 'descending'}"
|
|
|
33
|
+ :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini"
|
|
|
34
|
+ >
|
|
|
35
|
+ <el-table-column
|
|
|
36
|
+ prop="name"
|
|
|
37
|
+ label="任务名称"
|
|
|
38
|
+ width="160">
|
|
|
39
|
+ </el-table-column>
|
|
|
40
|
+ <el-table-column
|
|
|
41
|
+ prop="taskDefinitionKey "
|
|
|
42
|
+ label="关键字">
|
|
|
43
|
+ </el-table-column>
|
|
|
44
|
+ <el-table-column
|
|
|
45
|
+ prop="owner"
|
|
|
46
|
+ label="所有者">
|
|
|
47
|
+ </el-table-column>
|
|
|
48
|
+ <el-table-column
|
|
|
49
|
+ prop="assignee "
|
|
|
50
|
+ label="执行者"
|
|
|
51
|
+ width="160"
|
|
|
52
|
+ show-overflow-tooltip>
|
|
|
53
|
+ </el-table-column>
|
|
|
54
|
+ <el-table-column
|
|
|
55
|
+ prop="createTime"
|
|
|
56
|
+ label="开始时间"
|
|
|
57
|
+ width="160">
|
|
|
58
|
+ </el-table-column>
|
|
|
59
|
+ <el-table-column
|
|
|
60
|
+ fixed="right"
|
|
|
61
|
+ label="操作"
|
|
|
62
|
+ width="280">
|
|
|
63
|
+ <template slot-scope="scope">
|
|
|
64
|
+ <el-button type="success" size="mini" @click="checkProcess(scope.$index,scope.row)">查看进度</el-button>
|
|
|
65
|
+ <el-button type="warning" size="mini" @click="getProcessFormInfoPromise(scope.$index,scope.row)">办理任务</el-button>
|
|
|
66
|
+ <el-button type="danger" size="mini" @click="handleTask(scope.$index,scope.row)">驳回</el-button>
|
|
|
67
|
+ </template>
|
|
|
68
|
+ </el-table-column>
|
|
|
69
|
+ </el-table>
|
|
|
70
|
+ </template>
|
|
|
71
|
+ <!--分页模块-->
|
|
|
72
|
+ <el-row style="float: right;margin-top: 20px">
|
|
|
73
|
+ <el-col>
|
|
|
74
|
+ <div class="block">
|
|
|
75
|
+ <el-pagination
|
|
|
76
|
+ @size-change="handleSizeChange"
|
|
|
77
|
+ @current-change="handleCurrentChange"
|
|
|
78
|
+ :current-page="queryinfo.pageNum"
|
|
|
79
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
80
|
+ :page-size="queryinfo.pageSize"
|
|
|
81
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
82
|
+ :total="total">
|
|
|
83
|
+ </el-pagination>
|
|
|
84
|
+ </div>
|
|
|
85
|
+ </el-col>
|
|
|
86
|
+ </el-row>
|
|
|
87
|
+ </el-tab-pane>
|
|
|
88
|
+ <el-tab-pane label="我的已办">
|
|
|
89
|
+ <!--检索条件-->
|
|
|
90
|
+ <el-row class="toolbar" style="background-color: white;margin-bottom: 10px">
|
|
|
91
|
+ <el-col :span="6">
|
|
|
92
|
+ <el-input v-model="queryinfo.name" placeholder="任务名称" style="width: 200px" clearable>
|
|
|
93
|
+ <template slot="prepend">任务名称</template>
|
|
|
94
|
+ </el-input>
|
|
|
95
|
+ </el-col>
|
|
|
96
|
+ <el-col :span="6">
|
|
|
97
|
+ <el-input v-model="queryinfo.taskDefinitionKey " placeholder="关键字" style="width: 200px" clearable>
|
|
|
98
|
+ <template slot="prepend">关键字</template>
|
|
|
99
|
+ </el-input>
|
|
|
100
|
+ </el-col>
|
|
|
101
|
+
|
|
|
102
|
+ <el-col :span="8">
|
|
|
103
|
+ <el-button type="primary" v-on:click="getAllList">查询</el-button>
|
|
|
104
|
+ <!-- <el-button type="success" v-on:click="toAddDialog">新增</el-button>-->
|
|
|
105
|
+
|
|
|
106
|
+ </el-col>
|
|
|
107
|
+ </el-row>
|
|
|
108
|
+ <template>
|
|
|
109
|
+ <el-table
|
|
|
110
|
+ v-loading="tableloading"
|
|
|
111
|
+ :data="tableData"
|
|
|
112
|
+ style="width: 100%"
|
|
|
113
|
+ :default-sort = "{prop: 'date', order: 'descending'}"
|
|
|
114
|
+ :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini"
|
|
|
115
|
+ >
|
|
|
116
|
+ <el-table-column
|
|
|
117
|
+ prop="name"
|
|
|
118
|
+ label="任务名称"
|
|
|
119
|
+ width="160">
|
|
|
120
|
+ </el-table-column>
|
|
|
121
|
+ <el-table-column
|
|
|
122
|
+ prop="taskDefinitionKey"
|
|
|
123
|
+ label="关键字">
|
|
|
124
|
+ </el-table-column>
|
|
|
125
|
+ <el-table-column
|
|
|
126
|
+ prop="owner"
|
|
|
127
|
+ label="所有者">
|
|
|
128
|
+ </el-table-column>
|
|
|
129
|
+ <el-table-column
|
|
|
130
|
+ prop="assignee"
|
|
|
131
|
+ label="执行人"
|
|
|
132
|
+ width="160"
|
|
|
133
|
+ show-overflow-tooltip>
|
|
|
134
|
+ </el-table-column>
|
|
|
135
|
+ <el-table-column
|
|
|
136
|
+ prop="createTime"
|
|
|
137
|
+ label="开始时间"
|
|
|
138
|
+ width="160">
|
|
|
139
|
+ </el-table-column>
|
|
|
140
|
+ <!-- <el-table-column-->
|
|
|
141
|
+ <!-- fixed="right"-->
|
|
|
142
|
+ <!-- label="操作"-->
|
|
|
143
|
+ <!-- width="280">-->
|
|
|
144
|
+ <!-- <template slot-scope="scope">-->
|
|
|
145
|
+ <!-- <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>-->
|
|
|
146
|
+ <!-- <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>-->
|
|
|
147
|
+ <!-- <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>-->
|
|
|
148
|
+ <!-- </template>-->
|
|
|
149
|
+ <!-- </el-table-column>-->
|
|
|
150
|
+ </el-table>
|
|
|
151
|
+ </template>
|
|
|
152
|
+ <!--分页模块-->
|
|
|
153
|
+ <el-row style="float: right;margin-top: 20px">
|
|
|
154
|
+ <el-col>
|
|
|
155
|
+ <div class="block">
|
|
|
156
|
+ <el-pagination
|
|
|
157
|
+ @size-change="handleSizeChange"
|
|
|
158
|
+ @current-change="handleCurrentChange"
|
|
|
159
|
+ :current-page="queryinfo.pageNum"
|
|
|
160
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
161
|
+ :page-size="queryinfo.pageSize"
|
|
|
162
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
163
|
+ :total="total">
|
|
|
164
|
+ </el-pagination>
|
|
|
165
|
+ </div>
|
|
|
166
|
+ </el-col>
|
|
|
167
|
+ </el-row>
|
|
|
168
|
+ </el-tab-pane>
|
|
|
169
|
+ <el-tab-pane label="我发起的">
|
|
|
170
|
+ <!--检索条件-->
|
|
|
171
|
+ <el-row class="toolbar" style="background-color: white;margin-bottom: 10px">
|
|
|
172
|
+ <el-col :span="6">
|
|
|
173
|
+ <el-input v-model="queryinfo.name" placeholder="任务名称" style="width: 200px" clearable>
|
|
|
174
|
+ <template slot="prepend">任务名称</template>
|
|
|
175
|
+ </el-input>
|
|
|
176
|
+ </el-col>
|
|
|
177
|
+ <el-col :span="6">
|
|
|
178
|
+ <el-input v-model="queryinfo.taskDefinitionKey " placeholder="关键字" style="width: 200px" clearable>
|
|
|
179
|
+ <template slot="prepend">关键字</template>
|
|
|
180
|
+ </el-input>
|
|
|
181
|
+ </el-col>
|
|
|
182
|
+
|
|
|
183
|
+ <el-col :span="8">
|
|
|
184
|
+ <el-button type="primary" v-on:click="getMyList">查询</el-button>
|
|
|
185
|
+ <!-- <el-button type="success" v-on:click="toAddDialog">新增</el-button>-->
|
|
|
186
|
+
|
|
|
187
|
+ </el-col>
|
|
|
188
|
+ </el-row>
|
|
|
189
|
+ <template>
|
|
|
190
|
+ <el-table
|
|
|
191
|
+ v-loading="tableloading"
|
|
|
192
|
+ :data="tableData"
|
|
|
193
|
+ style="width: 100%"
|
|
|
194
|
+ :default-sort = "{prop: 'date', order: 'descending'}"
|
|
|
195
|
+ :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini"
|
|
|
196
|
+ >
|
|
|
197
|
+ <el-table-column
|
|
|
198
|
+ prop="name"
|
|
|
199
|
+ label="任务名称"
|
|
|
200
|
+ width="160">
|
|
|
201
|
+ </el-table-column>
|
|
|
202
|
+ <el-table-column
|
|
|
203
|
+ prop="taskDefinitionKey"
|
|
|
204
|
+ label="关键字">
|
|
|
205
|
+ </el-table-column>
|
|
|
206
|
+ <el-table-column
|
|
|
207
|
+ prop="owner"
|
|
|
208
|
+ label="所有者">
|
|
|
209
|
+ </el-table-column>
|
|
|
210
|
+ <el-table-column
|
|
|
211
|
+ prop="assignee"
|
|
|
212
|
+ label="执行者"
|
|
|
213
|
+ width="160"
|
|
|
214
|
+ show-overflow-tooltip>
|
|
|
215
|
+ </el-table-column>
|
|
|
216
|
+ <el-table-column
|
|
|
217
|
+ prop="createTime"
|
|
|
218
|
+ label="开始时间"
|
|
|
219
|
+ width="160">
|
|
|
220
|
+ </el-table-column>
|
|
|
221
|
+ <!-- <el-table-column-->
|
|
|
222
|
+ <!-- fixed="right"-->
|
|
|
223
|
+ <!-- label="操作"-->
|
|
|
224
|
+ <!-- width="280">-->
|
|
|
225
|
+ <!-- <template slot-scope="scope">-->
|
|
|
226
|
+ <!-- <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>-->
|
|
|
227
|
+ <!-- <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>-->
|
|
|
228
|
+ <!-- <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>-->
|
|
|
229
|
+ <!-- </template>-->
|
|
|
230
|
+ <!-- </el-table-column>-->
|
|
|
231
|
+ </el-table>
|
|
|
232
|
+ </template>
|
|
|
233
|
+ <!--分页模块-->
|
|
|
234
|
+ <el-row style="float: right;margin-top: 20px">
|
|
|
235
|
+ <el-col>
|
|
|
236
|
+ <div class="block">
|
|
|
237
|
+ <el-pagination
|
|
|
238
|
+ @size-change="handleSizeChange"
|
|
|
239
|
+ @current-change="handleCurrentChange"
|
|
|
240
|
+ :current-page="queryinfo.pageNum"
|
|
|
241
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
242
|
+ :page-size="queryinfo.pageSize"
|
|
|
243
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
244
|
+ :total="total">
|
|
|
245
|
+ </el-pagination>
|
|
|
246
|
+ </div>
|
|
|
247
|
+ </el-col>
|
|
|
248
|
+ </el-row>
|
|
|
249
|
+ </el-tab-pane>
|
|
|
250
|
+ </el-tabs>
|
|
|
251
|
+ </el-row>
|
|
|
252
|
+
|
|
|
253
|
+ </el-main>
|
|
|
254
|
+ <el-dialog title="流程图" :visible.sync="dialogFormVisible" v-loading="dialogloading">
|
|
|
255
|
+ <el-form :model="form">
|
|
|
256
|
+ <el-form-item>
|
|
|
257
|
+ <div class="demo-image__preview">
|
|
|
258
|
+ <el-image
|
|
|
259
|
+
|
|
|
260
|
+ :src="form.url">
|
|
|
261
|
+ </el-image>
|
|
|
262
|
+ </div>
|
|
|
263
|
+ </el-form-item>
|
|
|
264
|
+ </el-form>
|
|
|
265
|
+ <div slot="footer" class="dialog-footer">
|
|
|
266
|
+ <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
267
|
+ </div>
|
|
|
268
|
+ </el-dialog>
|
|
|
269
|
+
|
|
|
270
|
+ <el-dialog title="任务表单" :visible.sync="dialogTaskFormVisible" v-loading="dialogloading">
|
|
|
271
|
+ <el-divider content-position="left">已提交表单</el-divider>
|
|
|
272
|
+ <el-row>
|
|
|
273
|
+ <el-col :span="12" v-for="(item,index) in AllTaskFormInfoData" :key="item.id">
|
|
|
274
|
+ <el-input
|
|
|
275
|
+ v-model="item.variableValue"
|
|
|
276
|
+ :disabled="true"
|
|
|
277
|
+ v-if="item.variableType==='string'"
|
|
|
278
|
+ >
|
|
|
279
|
+ <template slot="prepend">{{typeOptions[item.variableName]}}</template>
|
|
|
280
|
+ </el-input>
|
|
|
281
|
+ <el-input
|
|
|
282
|
+ v-model="item.variableValue"
|
|
|
283
|
+ :disabled="true"
|
|
|
284
|
+ v-else-if="item.variableType==='long'"
|
|
|
285
|
+ >
|
|
|
286
|
+ <template slot="prepend">{{typeOptions[item.variableName]}}</template>
|
|
|
287
|
+ </el-input>
|
|
|
288
|
+ <el-input
|
|
|
289
|
+ v-model="item.variableValue"
|
|
|
290
|
+ :disabled="true"
|
|
|
291
|
+ v-else-if="item.variableType==='jodadate'"
|
|
|
292
|
+ >
|
|
|
293
|
+ <template slot="prepend">{{typeOptions[item.variableName]}}</template>
|
|
|
294
|
+ </el-input>
|
|
|
295
|
+ <el-switch
|
|
|
296
|
+ v-model="item.variableValue"
|
|
|
297
|
+ active-color="#13ce66"
|
|
|
298
|
+ inactive-color="#ff4949"
|
|
|
299
|
+ active-text="出库完成"
|
|
|
300
|
+ inactive-text="出库未完成"
|
|
|
301
|
+ v-else-if="item.variableType==='boolean'"
|
|
|
302
|
+ disabled
|
|
|
303
|
+ >
|
|
|
304
|
+ </el-switch>
|
|
|
305
|
+ <span v-else>
|
|
|
306
|
+ {{item.variableName}} = {{item.variableValue}} -[类型] {{item.variableType}}
|
|
|
307
|
+ </span>
|
|
|
308
|
+ </el-col>
|
|
|
309
|
+ </el-row>
|
|
|
310
|
+ <el-divider content-position="left">需要提交的表单</el-divider>
|
|
|
311
|
+ <parser :key="key2" :form-conf="formResource" @submit="handleTask" />
|
|
|
312
|
+ </el-dialog>
|
|
|
313
|
+
|
|
|
314
|
+ </el-container>
|
|
|
315
|
+</template>
|
|
|
316
|
+
|
|
|
317
|
+<script>
|
|
|
318
|
+ import {allTask, allTaskHistory, myTask, processDiagram, handleTask, getFormResource,getAllTaskFormInfo} from "../../api/technological";
|
|
|
319
|
+ import {loginedUserInfo} from '@/api/user';
|
|
|
320
|
+ import Parser from 'form-gen-parser'
|
|
|
321
|
+ import jsutil from "@/common/js/util";
|
|
|
322
|
+
|
|
|
323
|
+ export default {
|
|
|
324
|
+ name: "mytask",
|
|
|
325
|
+ components: {
|
|
|
326
|
+ Parser
|
|
|
327
|
+ },
|
|
|
328
|
+ data() {
|
|
|
329
|
+ return{
|
|
|
330
|
+ queryinfo:{
|
|
|
331
|
+ assignee:'',
|
|
|
332
|
+ pageNum:1,
|
|
|
333
|
+ pageSize:10,
|
|
|
334
|
+ },
|
|
|
335
|
+ form: {
|
|
|
336
|
+ url: ''
|
|
|
337
|
+ },
|
|
|
338
|
+ dialogFormVisible: false,
|
|
|
339
|
+ dialogTaskFormVisible: false,
|
|
|
340
|
+ dialogloading: false,
|
|
|
341
|
+ sysUserName:'',
|
|
|
342
|
+ total:0,
|
|
|
343
|
+ tableData: [],
|
|
|
344
|
+ tableloading:false,
|
|
|
345
|
+ key2: +new Date(),
|
|
|
346
|
+ formResource: {
|
|
|
347
|
+ "fields": [],
|
|
|
348
|
+ "formRef": "wms_truck_plan",
|
|
|
349
|
+ "formModel": "wms_truck_plan_Data",
|
|
|
350
|
+ "size": "mini",
|
|
|
351
|
+ "labelPosition": "left",
|
|
|
352
|
+ "labelWidth": 100,
|
|
|
353
|
+ "formRules": "rules",
|
|
|
354
|
+ "gutter": 5,
|
|
|
355
|
+ "disabled": false,
|
|
|
356
|
+ "span": 12,
|
|
|
357
|
+ "formBtns": true,
|
|
|
358
|
+ "unFocusedComponentBorder": true
|
|
|
359
|
+ },
|
|
|
360
|
+ submitTaskParm:{
|
|
|
361
|
+ "assignee": "",
|
|
|
362
|
+ "cascade": true,
|
|
|
363
|
+ "outcome": "",
|
|
|
364
|
+ "processDefinitionId": "",
|
|
|
365
|
+ "processInstanceId": "",
|
|
|
366
|
+ "taskDefinitionKey": "",
|
|
|
367
|
+ "taskId": "",
|
|
|
368
|
+ "variables": {}
|
|
|
369
|
+ },
|
|
|
370
|
+ AllTaskFormInfoData: [],
|
|
|
371
|
+ typeOptions: {
|
|
|
372
|
+ "truck_type" : "车辆类型",
|
|
|
373
|
+ "truck_quantity" : "车辆数量",
|
|
|
374
|
+ "waybillNo" : "运单列表",
|
|
|
375
|
+ "scheduleTime" : "预定时间",
|
|
|
376
|
+ "userCompanyId" : "企业信息",
|
|
|
377
|
+ "busnessType" : "业务类型",
|
|
|
378
|
+ "candidateUsername" : "用户名称",
|
|
|
379
|
+ "form_wms_truck_plan_outcome" : "表单输出",
|
|
|
380
|
+ "form_truck_form_outcome" : "表单输出",
|
|
|
381
|
+ "form_truck_distribute_outcome" : "表单输出",
|
|
|
382
|
+ "delivery_complete" : "出库完成"
|
|
|
383
|
+
|
|
|
384
|
+ }
|
|
|
385
|
+
|
|
|
386
|
+ }
|
|
|
387
|
+ },
|
|
|
388
|
+ mounted() {
|
|
|
389
|
+ let user = loginedUserInfo();
|
|
|
390
|
+ this.queryinfo.assignee = user.username;
|
|
|
391
|
+ console.log("当前用户名:"+this.queryinfo.assignee);
|
|
|
392
|
+ this.$nextTick(function () {
|
|
|
393
|
+ this.geMyTask();
|
|
|
394
|
+ })
|
|
|
395
|
+
|
|
|
396
|
+ },
|
|
|
397
|
+ methods: {
|
|
|
398
|
+ // 分页
|
|
|
399
|
+ handleSizeChange(val) {
|
|
|
400
|
+ this.queryinfo.pageSize= val
|
|
|
401
|
+ this.getList()
|
|
|
402
|
+ },
|
|
|
403
|
+ handleCurrentChange(val) {
|
|
|
404
|
+ this.queryinfo.pageNum = val
|
|
|
405
|
+ this.getList()
|
|
|
406
|
+ },
|
|
|
407
|
+ //查询我的任务
|
|
|
408
|
+ geMyTask() {
|
|
|
409
|
+ const _this = this
|
|
|
410
|
+ this.tableloading = true;
|
|
|
411
|
+ myTask(this.queryinfo).then((response) => {
|
|
|
412
|
+ const res = response.data
|
|
|
413
|
+ if (res.code != '200') {
|
|
|
414
|
+ return _this.$message.error('获取消息收发记录,失败!')
|
|
|
415
|
+ }
|
|
|
416
|
+ // 获取列表数据
|
|
|
417
|
+ _this.tableData = res.data
|
|
|
418
|
+ // 获取列表的总记录数
|
|
|
419
|
+ _this.total = res.total
|
|
|
420
|
+ this.tableloading = false;
|
|
|
421
|
+ _this.$message.success('获取消息收发记录,成功!')
|
|
|
422
|
+ }).catch(error => {
|
|
|
423
|
+ // 关闭加载
|
|
|
424
|
+ _this.$message.error(error.toString())
|
|
|
425
|
+ this.tableloading = false;
|
|
|
426
|
+
|
|
|
427
|
+ })
|
|
|
428
|
+ },
|
|
|
429
|
+ //查看进度
|
|
|
430
|
+ checkProcess(index,row){
|
|
|
431
|
+ console.log(row)
|
|
|
432
|
+ this.dialogFormVisible = true
|
|
|
433
|
+ this.dialogloading = true;
|
|
|
434
|
+ processDiagram({processId:row.processInstanceId}).then(res =>{
|
|
|
435
|
+ // eslint-disable-next-line no-console
|
|
|
436
|
+ this.form.url=window.URL.createObjectURL(res.data);
|
|
|
437
|
+ this.dialogloading = false;
|
|
|
438
|
+ }).catch(err => {
|
|
|
439
|
+ this.dialogloading = false;
|
|
|
440
|
+ });
|
|
|
441
|
+ },
|
|
|
442
|
+ // 提交任务
|
|
|
443
|
+ handleTask(paras){
|
|
|
444
|
+ this.dialogloading = true;
|
|
|
445
|
+ let _this=this
|
|
|
446
|
+ this.submitTaskParm.variables = paras
|
|
|
447
|
+ handleTask(this.submitTaskParm).then(response =>{
|
|
|
448
|
+ const res = response.data
|
|
|
449
|
+ if (res.code != '200') {
|
|
|
450
|
+ return _this.$message.error('获取记录失败!')
|
|
|
451
|
+ }
|
|
|
452
|
+ _this.$message.success("任务完成"+res.msg);
|
|
|
453
|
+ _this.dialogTaskFormVisible = false
|
|
|
454
|
+ _this.geMyTask()
|
|
|
455
|
+ this.dialogloading = false;
|
|
|
456
|
+ }).catch(err=>{
|
|
|
457
|
+ _this.$message.error("失败"+err);
|
|
|
458
|
+ this.dialogTaskFormVisible = false
|
|
|
459
|
+ this.dialogloading = false;
|
|
|
460
|
+ })
|
|
|
461
|
+ },
|
|
|
462
|
+ //我发起的任务
|
|
|
463
|
+ getMyList(){
|
|
|
464
|
+
|
|
|
465
|
+ },
|
|
|
466
|
+ //获取工单中已完成任务的表单数据的promise
|
|
|
467
|
+ getProcessFormInfoPromise(index,row){
|
|
|
468
|
+ this.dialogloading = true;
|
|
|
469
|
+ this.dialogTaskFormVisible = true
|
|
|
470
|
+ let _this = this;
|
|
|
471
|
+ this.getProcessFormInfo(index,row).then(data =>{
|
|
|
472
|
+ _this.getFormDefine(index,row)
|
|
|
473
|
+ _this.dialogloading = false;
|
|
|
474
|
+ }).catch(err => {
|
|
|
475
|
+ _this.$message.error(err)
|
|
|
476
|
+ _this.dialogloading = false;
|
|
|
477
|
+ })
|
|
|
478
|
+ },
|
|
|
479
|
+ //获取工单中已完成任务的表单数据
|
|
|
480
|
+ getProcessFormInfo(index,row){
|
|
|
481
|
+ let _this = this;
|
|
|
482
|
+ return new Promise((resolve,reject)=> {
|
|
|
483
|
+ getAllTaskFormInfo({processInstanceId:row.processInstanceId}).then(response =>{
|
|
|
484
|
+ const res = response.data
|
|
|
485
|
+ if (res.code != '200') {
|
|
|
486
|
+ _this.$message.error('获取已提交工单数据失败!')
|
|
|
487
|
+ }
|
|
|
488
|
+ const data =res.data;
|
|
|
489
|
+ _this.AllTaskFormInfoData = data
|
|
|
490
|
+ resolve(data);
|
|
|
491
|
+
|
|
|
492
|
+ }).catch(err => {
|
|
|
493
|
+ _this.$message.error(err)
|
|
|
494
|
+ _this.dialogloading = false;
|
|
|
495
|
+ });
|
|
|
496
|
+ })
|
|
|
497
|
+ },
|
|
|
498
|
+ //获取任务的表单定义
|
|
|
499
|
+ getFormDefine(index,row){
|
|
|
500
|
+ this.submitTaskParm.taskId = row.id
|
|
|
501
|
+ let _this = this;
|
|
|
502
|
+ return new Promise((resolve,reject)=> {
|
|
|
503
|
+ getFormResource({taskid:row.id}).then(response =>{
|
|
|
504
|
+ const res = response.data
|
|
|
505
|
+ if (res.code != '200') {
|
|
|
506
|
+ _this.$message.error('提交任务失败!')
|
|
|
507
|
+ }
|
|
|
508
|
+ const data =res.data;
|
|
|
509
|
+ resolve(data);
|
|
|
510
|
+ if (jsutil.checkNull(data)){
|
|
|
511
|
+ _this.key2 = +new Date()
|
|
|
512
|
+ _this.formResource = JSON.parse(data)
|
|
|
513
|
+ }else {
|
|
|
514
|
+ console.log("此任务没有表单定义")
|
|
|
515
|
+ }
|
|
|
516
|
+ }).catch(err => {
|
|
|
517
|
+ _this.$message.error(err)
|
|
|
518
|
+ });
|
|
|
519
|
+ })
|
|
|
520
|
+
|
|
|
521
|
+ },
|
|
|
522
|
+ //查询
|
|
|
523
|
+ getList() {
|
|
|
524
|
+ const _this = this
|
|
|
525
|
+ this.tableloading = true;
|
|
|
526
|
+ allTask(this.queryinfo).then((response) => {
|
|
|
527
|
+ const res = response.data
|
|
|
528
|
+ if (res.code != '200') {
|
|
|
529
|
+ return _this.$message.error('获取消息收发记录,失败!')
|
|
|
530
|
+ }
|
|
|
531
|
+ // 获取列表数据
|
|
|
532
|
+ _this.tableData = res.data
|
|
|
533
|
+ // 获取列表的总记录数
|
|
|
534
|
+ _this.total = res.total
|
|
|
535
|
+ this.tableloading = false;
|
|
|
536
|
+ _this.$message.success('获取消息收发记录,成功!')
|
|
|
537
|
+ }).catch(error => {
|
|
|
538
|
+
|
|
|
539
|
+ // 关闭加载
|
|
|
540
|
+ _this.$message.error(error.toString())
|
|
|
541
|
+ this.tableloading = false;
|
|
|
542
|
+
|
|
|
543
|
+ })
|
|
|
544
|
+ },
|
|
|
545
|
+ handleClick(tab, event){
|
|
|
546
|
+ if (tab.index == 0) {
|
|
|
547
|
+ this.geMyTask();
|
|
|
548
|
+ } else if (tab.index == 1) {
|
|
|
549
|
+ this.getAllList();
|
|
|
550
|
+ } else {
|
|
|
551
|
+ this.getMyList();
|
|
|
552
|
+ }
|
|
|
553
|
+ },
|
|
|
554
|
+ //查询
|
|
|
555
|
+ getAllList() {
|
|
|
556
|
+ const _this = this
|
|
|
557
|
+ this.tableloading = true;
|
|
|
558
|
+ allTaskHistory(this.queryinfo).then((response) => {
|
|
|
559
|
+ const res = response.data
|
|
|
560
|
+ if (res.code != '200') {
|
|
|
561
|
+ return _this.$message.error('获取消息收发记录,失败!')
|
|
|
562
|
+ }
|
|
|
563
|
+ // 获取列表数据
|
|
|
564
|
+ _this.tableData = res.data
|
|
|
565
|
+ // 获取列表的总记录数
|
|
|
566
|
+ _this.total = res.total
|
|
|
567
|
+ this.tableloading = false;
|
|
|
568
|
+ _this.$message.success('获取消息收发记录,成功!')
|
|
|
569
|
+ }).catch(error => {
|
|
|
570
|
+
|
|
|
571
|
+ // 关闭加载
|
|
|
572
|
+ _this.$message.error(error.toString())
|
|
|
573
|
+ this.tableloading = false;
|
|
|
574
|
+
|
|
|
575
|
+ })
|
|
|
576
|
+ },
|
|
|
577
|
+ }
|
|
|
578
|
+
|
|
|
579
|
+ }
|
|
|
580
|
+</script>
|
|
|
581
|
+
|
|
|
582
|
+<style scoped>
|
|
|
583
|
+
|
|
|
584
|
+</style> |