|
@@ -11,12 +11,12 @@
|
11
|
11
|
<!--表单信息-->
|
12
|
12
|
<el-tab-pane label="表单信息" name="1">
|
13
|
13
|
<ScTable :tableForm="tableForm" @submit="handleComplete"></ScTable>
|
14
|
|
- <el-row type="flex" justify="center" v-if="taskName != '员工修改'">
|
|
14
|
+ <el-row type="flex" justify="center" v-if="taskName != '员工填报'">
|
15
|
15
|
<el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
|
16
|
16
|
@click="handleComplete">审核通过
|
17
|
17
|
</el-button>
|
18
|
|
- <!-- <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button> -->
|
19
|
|
- <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button>
|
|
18
|
+ <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
|
|
19
|
+ <!-- <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button> -->
|
20
|
20
|
</el-row>
|
21
|
21
|
</el-tab-pane>
|
22
|
22
|
<!--流程流转记录-->
|
|
@@ -103,8 +103,11 @@
|
103
|
103
|
</span>
|
104
|
104
|
</el-dialog>
|
105
|
105
|
<!--驳回流程-->
|
106
|
|
- <el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="40%" append-to-body>
|
107
|
|
- <el-form ref="taskForm" :model="taskForm" label-width="80px">
|
|
106
|
+ <el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="60%" append-to-body>
|
|
107
|
+ <el-form ref="taskForm" :model="taskForm">
|
|
108
|
+ <el-form-item prop="targetKey">
|
|
109
|
+ <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
|
|
110
|
+ </el-form-item>
|
108
|
111
|
<el-form-item label="驳回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
|
109
|
112
|
<el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
|
110
|
113
|
</el-form-item>
|
|
@@ -118,6 +121,7 @@
|
118
|
121
|
</div>
|
119
|
122
|
</template>
|
120
|
123
|
|
|
124
|
+
|
121
|
125
|
<script>
|
122
|
126
|
import { flowRecord } from "@/api/flowable/finished";
|
123
|
127
|
import FlowUser from '@/components/flow/User'
|
|
@@ -132,15 +136,12 @@ import {
|
132
|
136
|
getNextFlowNode,
|
133
|
137
|
delegate,
|
134
|
138
|
flowTaskForm,
|
135
|
|
- checkIsStartUserNode
|
136
|
139
|
} from "@/api/flowable/todo";
|
137
|
|
-import { getAssess, modifyAssess } from '@/api/oa/assess/assess'
|
138
|
140
|
import flow from '@/views/flowable/task/todo/detail/flow'
|
139
|
141
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
140
|
142
|
import { listUser } from "@/api/system/user";
|
|
143
|
+import { getAssess, modifyAssess, submitAssess } from '@/api/oa/assess/assess';
|
141
|
144
|
import ScTable from "../../../form/scTable.vue";
|
142
|
|
-import { submitAssess } from '@/api/oa/assess/assess.js'
|
143
|
|
-import { MessageBox } from 'element-ui'
|
144
|
145
|
|
145
|
146
|
export default {
|
146
|
147
|
name: "Record",
|
|
@@ -192,7 +193,6 @@ export default {
|
192
|
193
|
variables: {
|
193
|
194
|
variables: {}
|
194
|
195
|
},
|
195
|
|
- check: true
|
196
|
196
|
},
|
197
|
197
|
assignee: null,
|
198
|
198
|
formConf: {}, // 默认表单数据
|
|
@@ -347,7 +347,6 @@ export default {
|
347
|
347
|
let formData = new FormData();
|
348
|
348
|
let form = JSON.stringify(this.tableForm);
|
349
|
349
|
formData.append("form", form);
|
350
|
|
- debugger
|
351
|
350
|
this.submitForm(formData);
|
352
|
351
|
},
|
353
|
352
|
/** 用户审批任务 */
|
|
@@ -360,7 +359,10 @@ export default {
|
360
|
359
|
this.$modal.msgError("请选择流程接收角色组!");
|
361
|
360
|
return;
|
362
|
361
|
}
|
363
|
|
- this.$delete(this.taskForm.variables, "pass");
|
|
362
|
+ // if (!this.taskForm.comment) {
|
|
363
|
+ // this.$modal.msgError("请输入审批意见!");
|
|
364
|
+ // return;
|
|
365
|
+ // }
|
364
|
366
|
if (this.taskForm && this.formKeyExist) {
|
365
|
367
|
// 表单是否禁用
|
366
|
368
|
this.taskForm.formData.formData.disabled = true;
|
|
@@ -398,27 +400,17 @@ export default {
|
398
|
400
|
handleReject() {
|
399
|
401
|
this.rejectOpen = true;
|
400
|
402
|
this.rejectTitle = "驳回流程";
|
401
|
|
- console.log(this.flowRecordList);
|
402
|
|
-
|
403
|
403
|
},
|
404
|
404
|
/** 驳回任务 */
|
405
|
405
|
taskReject() {
|
406
|
|
- if (this.taskForm.variables === null) {
|
407
|
|
- this.taskForm.variables = {};
|
408
|
|
- }
|
409
|
|
- this.$set(this.taskForm.variables, "pass", "驳回");
|
410
|
|
- complete(this.taskForm).then(response => {
|
411
|
|
- this.$modal.msgSuccess(response.msg);
|
412
|
|
- this.goBack();
|
|
406
|
+ this.$refs["taskForm"].validate(valid => {
|
|
407
|
+ if (valid) {
|
|
408
|
+ rejectTask(this.taskForm).then(res => {
|
|
409
|
+ this.$modal.msgSuccess(res.msg);
|
|
410
|
+ this.goBack();
|
|
411
|
+ });
|
|
412
|
+ }
|
413
|
413
|
});
|
414
|
|
- // this.$refs["taskForm"].validate(valid => {
|
415
|
|
- // if (valid) {
|
416
|
|
- // rejectTask(this.taskForm).then(res => {
|
417
|
|
- // this.$modal.msgSuccess(res.msg);
|
418
|
|
- // this.goBack();
|
419
|
|
- // });
|
420
|
|
- // }
|
421
|
|
- // });
|
422
|
414
|
},
|
423
|
415
|
/** 可退回任务列表 */
|
424
|
416
|
handleReturn() {
|
|
@@ -470,37 +462,32 @@ export default {
|
470
|
462
|
if (this.taskForm.variables === null) {
|
471
|
463
|
this.taskForm.variables = {};
|
472
|
464
|
}
|
473
|
|
- //排他网关,表达式,多节点情况下,审核通过,先将流程表达式pass变量存入,便于查找流程下一节点
|
474
|
|
- this.$set(this.taskForm.variables, "pass", "通过");
|
475
|
|
- complete(this.taskForm).then(response => {
|
476
|
|
- const params = { taskId: this.taskForm.taskId }
|
477
|
|
- // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况(todo已在上一步实现)
|
478
|
|
- getNextFlowNode(params).then(res => {
|
479
|
|
- const data = res.data;
|
480
|
|
- debugger
|
481
|
|
- this.taskForm.formData = formData;
|
482
|
|
- if (data) {
|
483
|
|
- if (data.dataType === 'dynamic') {
|
484
|
|
- if (data.type === 'assignee') { // 指定人员
|
485
|
|
- this.checkSendUser = true;
|
486
|
|
- this.checkType = "single";
|
487
|
|
- } else if (data.type === 'candidateUsers') { // 候选人员(多个)
|
488
|
|
- this.checkSendUser = true;
|
489
|
|
- this.checkType = "multiple";
|
490
|
|
- } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
|
491
|
|
- this.checkSendRole = true;
|
492
|
|
- } else { // 会签
|
493
|
|
- // 流程设计指定的 elementVariable 作为会签人员列表
|
494
|
|
- this.multiInstanceVars = data.vars;
|
495
|
|
- this.checkSendUser = true;
|
496
|
|
- this.checkType = "multiple";
|
497
|
|
- }
|
|
465
|
+ // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
|
|
466
|
+ const params = { taskId: this.taskForm.taskId }
|
|
467
|
+ getNextFlowNode(params).then(res => {
|
|
468
|
+ const data = res.data;
|
|
469
|
+ this.taskForm.formData = formData;
|
|
470
|
+ if (data) {
|
|
471
|
+ if (data.dataType === 'dynamic') {
|
|
472
|
+ if (data.type === 'assignee') { // 指定人员
|
|
473
|
+ this.checkSendUser = true;
|
|
474
|
+ this.checkType = "single";
|
|
475
|
+ } else if (data.type === 'candidateUsers') { // 候选人员(多个)
|
|
476
|
+ this.checkSendUser = true;
|
|
477
|
+ this.checkType = "multiple";
|
|
478
|
+ } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
|
|
479
|
+ this.checkSendRole = true;
|
|
480
|
+ } else { // 会签
|
|
481
|
+ // 流程设计指定的 elementVariable 作为会签人员列表
|
|
482
|
+ this.multiInstanceVars = data.vars;
|
|
483
|
+ this.checkSendUser = true;
|
|
484
|
+ this.checkType = "multiple";
|
498
|
485
|
}
|
499
|
486
|
}
|
500
|
|
- this.completeOpen = true;
|
501
|
|
- this.completeTitle = "选择下一节点审核人";
|
502
|
|
- })
|
503
|
|
- });
|
|
487
|
+ }
|
|
488
|
+ this.completeOpen = true;
|
|
489
|
+ this.completeTitle = "选择下一节点审核人";
|
|
490
|
+ })
|
504
|
491
|
},
|
505
|
492
|
},
|
506
|
493
|
};
|
|
@@ -508,8 +495,8 @@ export default {
|
508
|
495
|
<style lang="scss" scoped>
|
509
|
496
|
.test-form {
|
510
|
497
|
margin: 15px auto;
|
511
|
|
- // width: 800px;
|
512
|
|
- padding: 20px;
|
|
498
|
+ width: 800px;
|
|
499
|
+ padding: 15px;
|
513
|
500
|
}
|
514
|
501
|
|
515
|
502
|
.clearfix:before,
|