This commit is contained in:
@@ -301,7 +301,8 @@ TESTING INFO:
|
|||||||
set to 1m timeout and then run a ginormous report or temp set server to always timeout is probably better for testing purposes
|
set to 1m timeout and then run a ginormous report or temp set server to always timeout is probably better for testing purposes
|
||||||
- report designer print needs to be fixed to use new system
|
- report designer print needs to be fixed to use new system
|
||||||
- direct print report from url must be tested and fixed up
|
- direct print report from url must be tested and fixed up
|
||||||
|
- upload and test on devops
|
||||||
|
- give to Joyce to mangle
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
|
|||||||
@@ -170,16 +170,11 @@ export default {
|
|||||||
const jobLogRes = await window.$gz.api.get(
|
const jobLogRes = await window.$gz.api.get(
|
||||||
`job-operations/logs/${jobId}`
|
`job-operations/logs/${jobId}`
|
||||||
);
|
);
|
||||||
//console.log(jobLogRes);
|
|
||||||
//todo:look for reportfilename property in job log here and then put in reportUrl
|
|
||||||
//debugger;
|
|
||||||
if (Array.isArray(jobLogRes.data)) {
|
if (Array.isArray(jobLogRes.data)) {
|
||||||
//walk the array backwards as it's probably the final entry in the log
|
//walk the array backwards as it's probably the final entry in the log
|
||||||
for (var i = jobLogRes.data.length - 1; i >= 0; i--) {
|
for (var i = jobLogRes.data.length - 1; i >= 0; i--) {
|
||||||
var v = jobLogRes.data[i].statusText;
|
var v = jobLogRes.data[i].statusText;
|
||||||
//console.log("value type is:", typeof v);
|
|
||||||
if (v.includes("reportfilename")) {
|
if (v.includes("reportfilename")) {
|
||||||
console.log("Parsing:", v);
|
|
||||||
const o = JSON.parse(v);
|
const o = JSON.parse(v);
|
||||||
reportUrl = window.$gz.api.reportDownloadUrl(
|
reportUrl = window.$gz.api.reportDownloadUrl(
|
||||||
o.reportfilename
|
o.reportfilename
|
||||||
|
|||||||
@@ -307,6 +307,7 @@
|
|||||||
</v-form>
|
</v-form>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -852,6 +853,26 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async render() {
|
async render() {
|
||||||
|
// console.log(JSON.stringify(this.$route.params.reportDataOptions));
|
||||||
|
const vm = this;
|
||||||
|
if (vm.$route.params.recordid == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const reportDataOptions = vm.$route.params.reportDataOptions;
|
||||||
|
if (!reportDataOptions) {
|
||||||
|
throw new Error(
|
||||||
|
"Missing report data: to view report must come here from an object edit form or list so data can be provided for viewing the report"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
reportDataOptions.ReportId = vm.obj.id;
|
||||||
|
//Meta data from client for use by report script
|
||||||
|
reportDataOptions.ClientMeta = window.$gz.api.reportClientMetaData();
|
||||||
|
const res = await vm.$refs.reportSelector.open(
|
||||||
|
reportDataOptions,
|
||||||
|
vm.obj.id
|
||||||
|
);
|
||||||
|
},
|
||||||
|
async xxrender() {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
if (vm.$route.params.recordid == 0) {
|
if (vm.$route.params.recordid == 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user