| | |
| | | <table> |
| | | <thead> |
| | | <tr> |
| | | <th width="20%" style="text-align: center;">检验项目</th> |
| | | <th width="8%" style="text-align: center;">序号</th> |
| | | <th width="17%" style="text-align: center;">检验项目</th> |
| | | <th width="50%" style="text-align: center;">检验描述</th> |
| | | <th width="15%" style="text-align: center;">记录(点击)</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tr v-for="(item, index) in tableData" :key="index"> |
| | | <td style="text-align: center;">{{ item.forder || (index + 1) }}</td> |
| | | <td>{{ item.projName }}</td> |
| | | <td> |
| | | <view v-if="item.result=='合格'" class="watermark approved"> |
| | |
| | | } |
| | | }).then(res1 => { |
| | | let tableData = res1.data.tbBillList || []; |
| | | |
| | | //当已检验个数都不为空时按照检测结构排序 |
| | | |
| | | // 按FORDER序号排序 |
| | | tableData.sort((a, b) => { |
| | | if (a.result === '未完成' && b.result === '合格') { |
| | | return -1; |
| | | } else if (a.result === '合格' && b.result === '未完成') { |
| | | return 1; |
| | | } else { |
| | | return 0; |
| | | } |
| | | return (a.forder || 0) - (b.forder || 0); |
| | | }); |
| | | this.tableData = tableData; |
| | | |
| | |
| | | padding: 12px 15px; |
| | | border: 1px solid #ddd; |
| | | text-align: left; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .inspection-table th { |
| | |
| | | } |
| | | |
| | | /* 调整表格单元格 */ |
| | | .inspection-table td:nth-child(2) { |
| | | .inspection-table td:nth-child(3) { |
| | | position: relative; |
| | | overflow: hidden; |
| | | padding: 0; |
| | | min-height: 80px; |
| | | } |
| | | |
| | | /* 表单上方操作按钮区样式 */ |