From 034518cfa247679c8bf97ce54f1ea0ffd3c8d4c0 Mon Sep 17 00:00:00 2001 From: annnj-company <380904787@qq.com> Date: Mon, 27 Apr 2026 13:59:04 +0800 Subject: [PATCH] no commit message --- pgserver/application/admin/controller/ReportManage.php | 6 ++++++ pgweb/src/views/report/components/baseInfo.vue | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pgserver/application/admin/controller/ReportManage.php b/pgserver/application/admin/controller/ReportManage.php index 635f92e..c7f9d03 100644 --- a/pgserver/application/admin/controller/ReportManage.php +++ b/pgserver/application/admin/controller/ReportManage.php @@ -2747,6 +2747,12 @@ class ReportManage extends Base{ public function reqPreviewReport() { $postData = $this->postData; if(empty($postData['reportid'])) return $this->buildFailed('请求参数错误'); + $report_info = Db::name('report')->where('id', $postData['reportid'])->find(); + if(empty($report_info)) return $this->buildFailed('报告不存在'); + + if (!$this->produceReport($report_info['id'], $report_info['cur_tmpl_id'])) { + return $this->buildFailed('报告制作失败'); + } $url = Db::name('report')->where('id', $postData['reportid'])->value('report_url'); return $this->buildSuccess(['url' => $url]); diff --git a/pgweb/src/views/report/components/baseInfo.vue b/pgweb/src/views/report/components/baseInfo.vue index d91cdd3..38a6d85 100644 --- a/pgweb/src/views/report/components/baseInfo.vue +++ b/pgweb/src/views/report/components/baseInfo.vue @@ -2143,7 +2143,7 @@ export default { subReport(this.topInfo).then(res => { // this.loading = false if (res.code === 1) { - // this.reqPreviewReport() + this.reqPreviewReport() this.$Message.success(res.msg) closeCurrentPage(this, this.$route.query.from, {}) // 关闭当前页 } else { @@ -2683,7 +2683,7 @@ export default { subFinish(this.topInfo).then(res => { // this.finishLoad = false if (res.code === 1) { - // this.reqPreviewReport() + this.reqPreviewReport() this.$Message.success(res.msg) closeCurrentPage(this, this.$route.query.from, {}, this.$route) // 关闭当前页 } else {