From 616a1831249c79a051415e1a9fa3e32683a40d00 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 29 八月 2023 15:47:36 +0800
Subject: [PATCH] 修改设备
---
src/views/experiment/checkTheReport/index.vue | 41 ++++++++++++++++++++++++++++++++++-------
1 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue
index ab2d6ee..b4efda6 100644
--- a/src/views/experiment/checkTheReport/index.vue
+++ b/src/views/experiment/checkTheReport/index.vue
@@ -60,7 +60,8 @@
<el-button type="primary" @click="printFun()">鎵撳嵃</el-button>
</span>
<div class="printStyle">
- <preview id="printDiv" :reportData="reportData"></preview>
+ <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">
@@ -181,18 +182,39 @@
<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() {
return {
reportData: [],
+ reportType: 0,
searchData:{
sample_code:'',
reportCode:'',
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,
@@ -201,29 +223,32 @@
};
},
created() {
- this.getData();
+ // this.getData();
},
mounted(){
},
components:{
- Preview
+ Preview,
+ TestReport
},
methods: {
async queryReportByRCode(code){
const resp = await getReportData({code:code});
this.reportData = resp.data;
+ this.dialogVisible = true;
console.log(this.reportData);
},
//鏌ョ湅鎶ュ憡鎸夐挳
previewFun(row){
- this.dialogVisible = true;
+ console.log(row)
+ this.reportType = row.type;
this.queryReportByRCode(row.reportCode);
},
//鎵撳嵃鎸夐挳
printFun(){
this.dialogVisible = false;
PrintJS({
- printable: "printDiv",
+ printable: this.reportType===0 ? "printRaw" : "printFinished",
type: "html",
// header: "鍘熸潗鏂欐娴嬫姤鍛�",
targetStyles: ["*"],
@@ -295,6 +320,8 @@
}
}
.library-table {
+ height: 80vh;
+ overflow: scroll;
background-color: #fff;
flex: 1;
margin: 0px -15px;
@@ -324,7 +351,7 @@
}
.printStyle{
overflow: scroll;
- height:600px;
+ height:500px;
.el-button{
position: absolute;
top: 10vh;
--
Gitblit v1.9.3