|
@@ -9,24 +9,27 @@
|
9
|
9
|
</div>
|
10
|
10
|
<el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick">
|
11
|
11
|
<!--表单信息-->
|
12
|
|
- <el-tab-pane label="表单信息" name="1">
|
|
12
|
+ <!-- <el-tab-pane label="表单信息" name="1">
|
13
|
13
|
<el-col :span="16" :offset="4">
|
14
|
14
|
<div class="test-form">
|
15
|
|
- <!-- <parser :key="new Date().getTime()" :form-conf="variablesData"/>-->
|
16
|
|
- <parser :key="new Date().getTime()" :form-conf="variablesData" @submit="submitForm" ref="parser"/>
|
|
15
|
+ <parser :key="new Date().getTime()" :form-conf="variablesData"/>
|
|
16
|
+ <parser :key="new Date().getTime()" :form-conf="variablesData" @submit="submitForm" ref="parser" />
|
17
|
17
|
|
18
|
18
|
</div>
|
19
|
19
|
<div style="margin-left:15%;margin-bottom: 20px;font-size: 14px;">
|
20
|
20
|
<el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
|
21
|
|
- @click="handleComplete">审批
|
|
21
|
+ @click="handleComplete">审批
|
22
|
22
|
</el-button>
|
23
|
|
- <!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate">委派</el-button>-->
|
24
|
|
- <!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleAssign">转办</el-button>-->
|
25
|
|
- <!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate">签收</el-button>-->
|
26
|
|
- <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
|
27
|
|
- <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
|
|
23
|
+ <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate">委派</el-button>
|
|
24
|
+ <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleAssign">转办</el-button>
|
|
25
|
+ <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate">签收</el-button>
|
|
26
|
+ <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
|
|
27
|
+ <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
|
28
|
28
|
</div>
|
29
|
29
|
</el-col>
|
|
30
|
+ </el-tab-pane> -->
|
|
31
|
+ <el-tab-pane label="表单信息" name="1">
|
|
32
|
+
|
30
|
33
|
</el-tab-pane>
|
31
|
34
|
<!--流程流转记录-->
|
32
|
35
|
<el-tab-pane label="流转记录" name="2">
|
|
@@ -34,12 +37,8 @@
|
34
|
37
|
<el-col :span="16" :offset="4">
|
35
|
38
|
<div class="block">
|
36
|
39
|
<el-timeline>
|
37
|
|
- <el-timeline-item
|
38
|
|
- v-for="(item,index ) in flowRecordList"
|
39
|
|
- :key="index"
|
40
|
|
- :icon="setIcon(item.finishTime)"
|
41
|
|
- :color="setColor(item.finishTime)"
|
42
|
|
- >
|
|
40
|
+ <el-timeline-item v-for="(item, index ) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)"
|
|
41
|
+ :color="setColor(item.finishTime)">
|
43
|
42
|
<p style="font-weight: 700">{{ item.taskName }}</p>
|
44
|
43
|
<el-card :body-style="{ padding: '10px' }">
|
45
|
44
|
<el-descriptions class="margin-top" :column="1" size="small" border>
|
|
@@ -77,7 +76,7 @@
|
77
|
76
|
</el-tab-pane>
|
78
|
77
|
<!--流程图-->
|
79
|
78
|
<el-tab-pane label="流程图" name="3">
|
80
|
|
- <flow :flowData="flowData"/>
|
|
79
|
+ <flow :flowData="flowData" />
|
81
|
80
|
</el-tab-pane>
|
82
|
81
|
</el-tabs>
|
83
|
82
|
<!--审批任务-->
|
|
@@ -91,8 +90,8 @@
|
91
|
90
|
<el-checkbox v-model="taskForm.check">备选项</el-checkbox>
|
92
|
91
|
</el-form-item>
|
93
|
92
|
<el-form-item label="处理意见" label-width="80px" prop="comment"
|
94
|
|
- :rules="[{ required: true, message: '请输入处理意见', trigger: 'blur' }]">
|
95
|
|
- <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见"/>
|
|
93
|
+ :rules="[{ required: true, message: '请输入处理意见', trigger: 'blur' }]">
|
|
94
|
+ <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见" />
|
96
|
95
|
</el-form-item>
|
97
|
96
|
</el-form>
|
98
|
97
|
<span slot="footer" class="dialog-footer">
|
|
@@ -105,47 +104,41 @@
|
105
|
104
|
<el-form ref="taskForm" :model="taskForm" label-width="80px">
|
106
|
105
|
<el-form-item label="退回节点" prop="targetKey">
|
107
|
106
|
<el-radio-group v-model="taskForm.targetKey">
|
108
|
|
- <el-radio-button
|
109
|
|
- v-for="item in returnTaskList"
|
110
|
|
- :key="item.id"
|
111
|
|
- :label="item.id"
|
112
|
|
- >{{ item.name }}
|
|
107
|
+ <el-radio-button v-for="item in returnTaskList" :key="item.id" :label="item.id">{{ item.name }}
|
113
|
108
|
</el-radio-button>
|
114
|
109
|
</el-radio-group>
|
115
|
110
|
</el-form-item>
|
116
|
|
- <el-form-item label="退回意见" prop="comment"
|
117
|
|
- :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
118
|
|
- <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见"/>
|
|
111
|
+ <el-form-item label="退回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
|
112
|
+ <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
|
119
|
113
|
</el-form-item>
|
120
|
114
|
</el-form>
|
121
|
115
|
<span slot="footer" class="dialog-footer">
|
122
|
|
- <el-button @click="returnOpen = false">取 消</el-button>
|
123
|
|
- <el-button type="primary" @click="taskReturn">确 定</el-button>
|
124
|
|
- </span>
|
|
116
|
+ <el-button @click="returnOpen = false">取 消</el-button>
|
|
117
|
+ <el-button type="primary" @click="taskReturn">确 定</el-button>
|
|
118
|
+ </span>
|
125
|
119
|
</el-dialog>
|
126
|
120
|
<!--驳回流程-->
|
127
|
121
|
<el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="40%" append-to-body>
|
128
|
122
|
<el-form ref="taskForm" :model="taskForm" label-width="80px">
|
129
|
|
- <el-form-item label="驳回意见" prop="comment"
|
130
|
|
- :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
131
|
|
- <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见"/>
|
|
123
|
+ <el-form-item label="驳回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
|
124
|
+ <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
|
132
|
125
|
</el-form-item>
|
133
|
126
|
</el-form>
|
134
|
127
|
<span slot="footer" class="dialog-footer">
|
135
|
|
- <el-button @click="rejectOpen = false">取 消</el-button>
|
136
|
|
- <el-button type="primary" @click="taskReject">确 定</el-button>
|
137
|
|
- </span>
|
|
128
|
+ <el-button @click="rejectOpen = false">取 消</el-button>
|
|
129
|
+ <el-button type="primary" @click="taskReject">确 定</el-button>
|
|
130
|
+ </span>
|
138
|
131
|
</el-dialog>
|
139
|
132
|
</el-card>
|
140
|
133
|
</div>
|
141
|
134
|
</template>
|
142
|
135
|
|
143
|
136
|
<script>
|
144
|
|
-import {flowRecord} from "@/api/flowable/finished";
|
|
137
|
+import { flowRecord } from "@/api/flowable/finished";
|
145
|
138
|
import FlowUser from '@/components/flow/User'
|
146
|
139
|
import FlowRole from '@/components/flow/Role'
|
147
|
140
|
import Parser from '@/components/parser/Parser'
|
148
|
|
-import {getProcessVariables, flowXmlAndNode, definitionStart} from "@/api/flowable/definition";
|
|
141
|
+import { getProcessVariables, flowXmlAndNode, definitionStart } from "@/api/flowable/definition";
|
149
|
142
|
import {
|
150
|
143
|
complete,
|
151
|
144
|
rejectTask,
|
|
@@ -158,7 +151,7 @@ import {
|
158
|
151
|
} from "@/api/flowable/todo";
|
159
|
152
|
import flow from '@/views/flowable/task/todo/detail/flow'
|
160
|
153
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
161
|
|
-import {listUser} from "@/api/system/user";
|
|
154
|
+import { listUser } from "@/api/system/user";
|
162
|
155
|
|
163
|
156
|
export default {
|
164
|
157
|
name: "Record",
|
|
@@ -209,7 +202,7 @@ export default {
|
209
|
202
|
variables: {
|
210
|
203
|
variables: {}
|
211
|
204
|
},
|
212
|
|
- check:true
|
|
205
|
+ check: true
|
213
|
206
|
},
|
214
|
207
|
assignee: null,
|
215
|
208
|
formConf: {}, // 默认表单数据
|
|
@@ -252,7 +245,7 @@ export default {
|
252
|
245
|
methods: {
|
253
|
246
|
handleClick(tab, event) {
|
254
|
247
|
if (tab.name === '3') {
|
255
|
|
- flowXmlAndNode({procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId}).then(res => {
|
|
248
|
+ flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
|
256
|
249
|
this.flowData = res.data;
|
257
|
250
|
})
|
258
|
251
|
}
|
|
@@ -300,7 +293,7 @@ export default {
|
300
|
293
|
/** 流程流转记录 */
|
301
|
294
|
getFlowRecordList(procInsId, deployId) {
|
302
|
295
|
const that = this
|
303
|
|
- const params = {procInsId: procInsId, deployId: deployId}
|
|
296
|
+ const params = { procInsId: procInsId, deployId: deployId }
|
304
|
297
|
flowRecord(params).then(res => {
|
305
|
298
|
that.flowRecordList = res.data.flowList;
|
306
|
299
|
}).catch(res => {
|
|
@@ -328,8 +321,10 @@ export default {
|
328
|
321
|
getFlowTaskForm(taskId) {
|
329
|
322
|
if (taskId) {
|
330
|
323
|
// 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
|
331
|
|
- flowTaskForm({taskId: taskId}).then(res => {
|
|
324
|
+ flowTaskForm({ taskId: taskId }).then(res => {
|
|
325
|
+ debugger
|
332
|
326
|
this.variablesData = res.data.formData;
|
|
327
|
+ console.log( res.data.formData);
|
333
|
328
|
this.taskForm.variables = res.data.formData;
|
334
|
329
|
this.formKeyExist = res.data.formKeyExist;
|
335
|
330
|
});
|
|
@@ -342,7 +337,7 @@ export default {
|
342
|
337
|
this.submitForm(null);
|
343
|
338
|
},
|
344
|
339
|
/** 用户审批任务 */
|
345
|
|
- taskComplete() {
|
|
340
|
+ taskComplete() {
|
346
|
341
|
this.$set(this.taskForm.variables, "pass", "通过");
|
347
|
342
|
if (!this.taskForm.variables && this.checkSendUser) {
|
348
|
343
|
this.$modal.msgError("请选择流程接收人员!");
|
|
@@ -386,7 +381,7 @@ export default {
|
386
|
381
|
/** 返回页面 */
|
387
|
382
|
goBack() {
|
388
|
383
|
// 关闭当前标签页并返回上个页面
|
389
|
|
- const obj = { path: "/task/todo", query: { t: Date.now()} };
|
|
384
|
+ const obj = { path: "/task/todo", query: { t: Date.now() } };
|
390
|
385
|
this.$tab.closeOpenPage(obj);
|
391
|
386
|
},
|
392
|
387
|
/** 驳回任务 */
|
|
@@ -398,9 +393,9 @@ export default {
|
398
|
393
|
taskReject() {
|
399
|
394
|
this.$set(this.taskForm.variables, "pass", "驳回");
|
400
|
395
|
complete(this.taskForm).then(response => {
|
401
|
|
- this.$modal.msgSuccess(response.msg);
|
402
|
|
- this.goBack();
|
403
|
|
- });
|
|
396
|
+ this.$modal.msgSuccess(response.msg);
|
|
397
|
+ this.goBack();
|
|
398
|
+ });
|
404
|
399
|
// this.$refs["taskForm"].validate(valid => {
|
405
|
400
|
// if (valid) {
|
406
|
401
|
// rejectTask(this.taskForm).then(res => {
|
|
@@ -456,7 +451,7 @@ export default {
|
456
|
451
|
/** 申请流程表单数据提交 */
|
457
|
452
|
submitForm(formData) {
|
458
|
453
|
// 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
|
459
|
|
- const params = {taskId: this.taskForm.taskId}
|
|
454
|
+ const params = { taskId: this.taskForm.taskId }
|
460
|
455
|
getNextFlowNode(params).then(res => {
|
461
|
456
|
const data = res.data;
|
462
|
457
|
this.taskForm.formData = formData;
|
|
@@ -507,7 +502,7 @@ export default {
|
507
|
502
|
margin-bottom: 20px;
|
508
|
503
|
}
|
509
|
504
|
|
510
|
|
-.el-tag + .el-tag {
|
|
505
|
+.el-tag+.el-tag {
|
511
|
506
|
margin-left: 10px;
|
512
|
507
|
}
|
513
|
508
|
|