| | |
| | | <td>检测结果</td> |
| | | <td>单项判断</td> |
| | | </tr> |
| | | <tr v-for="(item,index) in reportData.products" :key="item"> |
| | | <tr v-for="(item,index) in arr" :key="index"> |
| | | <td>{{index+1}}</td> |
| | | <td>{{item.ipName}}</td> |
| | | <td>{{item.unit}}</td> |
| | | <td>{{item.required}}</td> |
| | | <td>{{item.testValue}}</td> |
| | | <td>{{item.testState === 1 ? "√" : "X"}}</td> |
| | | <td > |
| | | {{isIfState(item.testState) }} |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="6">检验结论:{{reportData.type == 1 ? "合格" : "不合格"}}</td> |
| | |
| | | data() { |
| | | return { |
| | | logoSrc : require("@/assets/404_images/logo.png"), |
| | | now: new Date().toLocaleDateString() |
| | | now: new Date().toLocaleDateString(), |
| | | arr: [] |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.arr = this.reportData.products; |
| | | if(this.reportData.products.length < 10){ |
| | | let size = this.reportData.products.length; |
| | | let num=10-size |
| | | for(let i=0;i< num;i++){ |
| | | this.arr.push({ |
| | | code: null, |
| | | ipName: "", |
| | | required: "", |
| | | testState: null, |
| | | testValue: "", |
| | | unit: ""}) |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | |
| | | let month = (dt.getMonth() + 1).toString().padStart(2,'0'); |
| | | let date = dt.getDate().toString().padStart(2,'0'); |
| | | return `${year}-${month}-${date}`; |
| | | }, |
| | | isIfState(val){ |
| | | if(val===1)return "√" |
| | | else if(val===null || val=== undefined) return null |
| | | else return "X" |
| | | } |
| | | }, |
| | | props:["reportData"] |
| | |
| | | border: 2px solid black; |
| | | } |
| | | tr,td,th{ |
| | | padding: 10px 10px; |
| | | padding: 15px 10px; |
| | | } |
| | | .date-group{ |
| | | width: 90%; |
| | |
| | | margin-left: 5%; |
| | | color: lightgray; |
| | | text-align: center; |
| | | margin-top: 250px; |
| | | margin-top: 300px; |
| | | } |
| | | } |
| | | } |