From 7a5f71b1a9868ea0a90a097d24890454b8f7ef34 Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期四, 27 十一月 2025 10:27:32 +0800
Subject: [PATCH] 修改新增
---
src/views/work/onlineEducation/people/components/trainRecord.vue | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/views/work/onlineEducation/people/components/trainRecord.vue b/src/views/work/onlineEducation/people/components/trainRecord.vue
index e868866..a976d68 100644
--- a/src/views/work/onlineEducation/people/components/trainRecord.vue
+++ b/src/views/work/onlineEducation/people/components/trainRecord.vue
@@ -22,6 +22,11 @@
</template>
</el-table-column>
<el-table-column label="所在公司" prop="companyName" align="center"/>
+ <el-table-column label="证书" align="center" >
+ <template #default="scope">
+ <el-button v-if="scope.row.passed == 1" type="primary" @click="downloadCert(scope.row)" link>下载</el-button>
+ </template>
+ </el-table-column>
</el-table>
</el-dialog>
</div>
@@ -39,7 +44,8 @@
import Cookies from "js-cookie";
import {addQuestionBank, checkQuestionBankName, editQuestionBank} from "@/api/onlineEducation/questionBank";
import {getStudent, getStuTrainRecord} from "@/api/onlineEducation/student";
-
+import {useRouter} from "vue-router";
+const router = useRouter();
const dialogVisible = ref(false);
const title = ref("");
const busRef = ref();
@@ -77,6 +83,14 @@
emit("getList")
}
+const downloadCert = (info) => {
+ const routePath = '/certPdf'
+ const resolvedRoute = router.resolve(routePath)
+ const queryString = new URLSearchParams(info).toString()
+ const fullPath = `${resolvedRoute.href}?${queryString}`
+ window.open(fullPath, '_blank')
+
+}
defineExpose({
openDialog
--
Gitblit v1.9.2