This commit is contained in:
@@ -298,7 +298,9 @@ TESTING INFO:
|
|||||||
|
|
||||||
- 1 todo: cancellable reporting?? Jobify it just like any other long running job, it's necessary unfortunately and then put a cancel button
|
- 1 todo: cancellable reporting?? Jobify it just like any other long running job, it's necessary unfortunately and then put a cancel button
|
||||||
must free up server when cancelling
|
must free up server when cancelling
|
||||||
EXPORT must use this too, fuck.
|
|
||||||
|
Ok, working now but not cancellable yet, not sure how to do that but will figure it out
|
||||||
|
|
||||||
|
|
||||||
- 1 todo: add the caching technique to *all* the other getreportdata methods as was done with workorder
|
- 1 todo: add the caching technique to *all* the other getreportdata methods as was done with workorder
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export default {
|
|||||||
reportList: [],
|
reportList: [],
|
||||||
selectedReport: null,
|
selectedReport: null,
|
||||||
rendering: false,
|
rendering: false,
|
||||||
|
jobActive: false,
|
||||||
preSelectReportId: null
|
preSelectReportId: null
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
@@ -180,6 +181,7 @@ export default {
|
|||||||
throw new Error("Job failed");
|
throw new Error("Job failed");
|
||||||
}
|
}
|
||||||
if (jobStatus == 3) {
|
if (jobStatus == 3) {
|
||||||
|
this.rendering = false;
|
||||||
//success, get the report url name
|
//success, get the report url name
|
||||||
const jobLogRes = await window.$gz.api.get(
|
const jobLogRes = await window.$gz.api.get(
|
||||||
`job-operations/logs/${jobId}`
|
`job-operations/logs/${jobId}`
|
||||||
@@ -201,37 +203,19 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"created": "2021-12-27T20:23:54.145758Z",
|
|
||||||
"statusText": "LT:ProcessingJob \"LT:Report id: \"60\" LT:WorkOrder (1) LT:User AyaNova SuperUser - RenderReport\"",
|
|
||||||
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"created": "2021-12-27T20:23:54.156294Z",
|
|
||||||
"statusText": "LT:StartJob RenderReport",
|
|
||||||
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"created": "2021-12-27T20:23:55.820618Z",
|
|
||||||
"statusText": "{reportfilename:\"4jpsvserib2.pdf\"}",
|
|
||||||
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
*/
|
|
||||||
this.jobActive = false;
|
this.jobActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//job ran to completion, get the report file name and fetch it
|
//job ran to completion, get the report file name and fetch it
|
||||||
if (reportUrl) {
|
if (reportUrl) {
|
||||||
console.log("Attempting to open report url:", reportUrl);
|
|
||||||
if (window.open(reportUrl, "Report") == null) {
|
if (window.open(reportUrl, "Report") == null) {
|
||||||
this.reject(
|
this.reject(
|
||||||
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
|
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.rendering = false;
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
if (reportName != null) {
|
if (reportName != null) {
|
||||||
this.resolve({ name: reportName, id: reportId });
|
this.resolve({ name: reportName, id: reportId });
|
||||||
@@ -239,6 +223,7 @@ export default {
|
|||||||
this.resolve(null);
|
this.resolve(null);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.rendering = false;
|
||||||
this.jobActive = false;
|
this.jobActive = false;
|
||||||
this.reject(error);
|
this.reject(error);
|
||||||
//window.$gz.errorHandler.handleFormError(error, this);
|
//window.$gz.errorHandler.handleFormError(error, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user