|
|
@@ -168,6 +168,7 @@
|
|
|
<script>
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { checklistrecordGetById } from '@/api/checklistrecord/index';
|
|
|
+ import { getTaskListByProcessInstanceId } from '@/api/bpm/task';
|
|
|
|
|
|
/** 常量 */
|
|
|
const CHECK_TYPE = {
|
|
|
@@ -180,7 +181,7 @@
|
|
|
|
|
|
props: {
|
|
|
businessId: { default: '' },
|
|
|
- tasks: { type: Array, default: () => [] }
|
|
|
+ id: { type: String, default: '' }
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -216,8 +217,7 @@
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- const currentTask = this.tasks.find((v) => v.result === 1);
|
|
|
- this.nodeType = currentTask?.definitionKey || '';
|
|
|
+ this.getDetail();
|
|
|
this.getCheckDetails(this.businessId);
|
|
|
},
|
|
|
|
|
|
@@ -272,6 +272,13 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ async getDetail() {
|
|
|
+ await getTaskListByProcessInstanceId(this.id).then((response) => {
|
|
|
+ const currentTask = response.find((v) => v.result === 1);
|
|
|
+ this.nodeType = currentTask?.definitionKey || '';
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
/** 获取详情 */
|
|
|
async getCheckDetails(id) {
|
|
|
this.loading = true;
|