|
|
@@ -23,7 +23,10 @@
|
|
|
import browse from '@/components/jimureport/browse.vue';
|
|
|
import { getJmPrintViewUrl } from '@/components/jimureport//api.js';
|
|
|
import { getToken } from '@/utils/token-util';
|
|
|
-
|
|
|
+ import {
|
|
|
+ requestentrustGetById,
|
|
|
+ taskmonadGetById
|
|
|
+ } from '@/api/bpm/components/inspectionProjectRequest';
|
|
|
export default {
|
|
|
props: {
|
|
|
taskDefinitionKey: {
|
|
|
@@ -38,7 +41,8 @@
|
|
|
},
|
|
|
businessCode: {
|
|
|
default: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ businessType: ''
|
|
|
},
|
|
|
components: {
|
|
|
browse
|
|
|
@@ -55,7 +59,14 @@
|
|
|
},
|
|
|
methods: {
|
|
|
async open() {
|
|
|
- const detail = await getDetailById(this.businessId);
|
|
|
+ let api = getDetailById;
|
|
|
+ if (this.businessType.includes('质检任务单')) {
|
|
|
+ api = taskmonadGetById;
|
|
|
+ }
|
|
|
+ if (this.businessType.includes('质检受托单')) {
|
|
|
+ api = requestentrustGetById
|
|
|
+ }
|
|
|
+ const detail = await api(this.businessId);
|
|
|
// this.reportData = detail;
|
|
|
// this.showEditFlag = true;
|
|
|
if (detail.data.reportTemplateJson?.template) {
|