From a970199e2417318743ca3f7852dca896906ac574 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 30 八月 2023 09:09:23 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before --- src/views/experiment/checkTheReport/index.vue | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue index dce2174..b4efda6 100644 --- a/src/views/experiment/checkTheReport/index.vue +++ b/src/views/experiment/checkTheReport/index.vue @@ -60,8 +60,8 @@ <el-button type="primary" @click="printFun()">鎵撳嵃</el-button> </span> <div class="printStyle"> - <preview id="printDiv" :reportData="reportData" v-if="reportType===0"></preview> - <div v-else>鎴愬搧妫�娴嬫姤鍛�</div> + <Preview id="printRaw" :reportData="reportData" v-if="reportType===0"></Preview> + <TestReport id="printFinished" :reportData="reportData" v-else></TestReport> </div> </el-dialog> <div class="table-box"> @@ -182,6 +182,7 @@ <script> import { selectAllReport,getReportData } from "@/api/experiment/checkTheReport"; import Preview from "@/components/experiment/checkTheReport/index.vue"; +import TestReport from "@/components/experiment/template_testReport/index.vue" import PrintJS from 'print-js' export default { data() { @@ -194,7 +195,26 @@ application_code: '' }, checkStatus: undefined, - reportTable: [], + reportTable: [ + { + materialCode:'SN23-0517001', + reportCode: 'SN23-0517001', + inspectionCode: 'SN23-0517001', + approver:'榛勫皬鏄�', + status: '', + conclusion: 1, + name: '榛勫皬鏄�' + }, + { + materialCode:'SN23-0517001', + reportCode: 'SN23-0517001', + inspectionCode: 'SN23-0517001', + approver:'榛勫皬鏄�', + status: '', + conclusion: 1, + name: '榛勫皬鏄�' + } + ], page: 1, total: 0, pageSize: 10, @@ -203,12 +223,13 @@ }; }, created() { - this.getData(); + // this.getData(); }, mounted(){ }, components:{ - Preview + Preview, + TestReport }, methods: { async queryReportByRCode(code){ @@ -219,6 +240,7 @@ }, //鏌ョ湅鎶ュ憡鎸夐挳 previewFun(row){ + console.log(row) this.reportType = row.type; this.queryReportByRCode(row.reportCode); }, @@ -226,7 +248,7 @@ printFun(){ this.dialogVisible = false; PrintJS({ - printable: "printDiv", + printable: this.reportType===0 ? "printRaw" : "printFinished", type: "html", // header: "鍘熸潗鏂欐娴嬫姤鍛�", targetStyles: ["*"], -- Gitblit v1.9.3