This commit is contained in:
2024-11-25 09:59:16 +08:00
parent d31233887c
commit 69b83be6c7
2 changed files with 71 additions and 14 deletions

View File

@@ -51,4 +51,13 @@ export function downloadStatisticsTableExcel(query) {
}, },
responseType: 'blob' responseType: 'blob'
}) })
}
// 获取 首检 倒车雷达数量
export function getParkingSensorTotal(query) {
return request({
url: 'mes/qc/statistics/getParkingSensorTotal',
method: 'get',
params: query,
})
} }

View File

@@ -67,13 +67,7 @@
</el-form> </el-form>
</div> </div>
<div style="width: 100%; display: flex; justify-content: flex-end"> <div style="width: 100%; display: flex; justify-content: flex-end">
<pagination <pagination :pageSizes="[12, 30, 60, 300]" :total="pagination.total" :page.sync="pagination.pageNum" :limit.sync="pagination.pageSize" @pagination="getList" />
:pageSizes="[12, 30, 60, 300]"
:total="pagination.total"
:page.sync="pagination.pageNum"
:limit.sync="pagination.pageSize"
@pagination="getList"
/>
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<div style="font-size: 20px;text-align: center; margin 0 auto"> <div style="font-size: 20px;text-align: center; margin 0 auto">
@@ -84,6 +78,8 @@
<span style="margin-left: 20px">抛光数:{{ totalPaoguangTotal }}</span> <span style="margin-left: 20px">抛光数:{{ totalPaoguangTotal }}</span>
<span style="margin-left: 20px">打磨数:{{ totalDamoTotal }}</span> <span style="margin-left: 20px">打磨数:{{ totalDamoTotal }}</span>
<span style="margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span> <span style="margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span>
<span style="margin-left: 20px">倒车雷达:{{ parkingSensor }}</span>
</div> </div>
</div> </div>
<!-- 表格部分 --> <!-- 表格部分 -->
@@ -250,6 +246,7 @@ import {
GetQualityStatisticsTable_final, GetQualityStatisticsTable_final,
GetQualityStatisticsTable_total, GetQualityStatisticsTable_total,
deleteStatisticsTable, deleteStatisticsTable,
getParkingSensorTotal,
downloadStatisticsTableExcel, downloadStatisticsTableExcel,
} from '@/api/qualityManagement/qualityStatistics_V2' } from '@/api/qualityManagement/qualityStatistics_V2'
export default { export default {
@@ -348,7 +345,10 @@ export default {
}, },
visibleMethod: this.visibleMethod, visibleMethod: this.visibleMethod,
}, },
allDataList:[], // 统计数据
allDataList: [],
// 倒车雷达
parkingSensor:0,
// 自适应 // 自适应
screenWidth: '1920px', screenWidth: '1920px',
screenHeight: '1080px', screenHeight: '1080px',
@@ -375,28 +375,71 @@ export default {
computed: { computed: {
// 投入数 // 投入数
totalQuantity() { totalQuantity() {
return this.allDataList.reduce((acc, data) => acc + data.requireNumber, 0) / 3 return (
this.allDataList.reduce((acc, data) => {
if (!data.productDescription.includes('倒车雷达')) {
return acc + data.requireNumber
} else {
return acc
}
}, 0) / 3
)
}, },
// 合格数 // 合格数
totalQualifiedNumber() { totalQualifiedNumber() {
return this.allDataList.reduce((acc, data) => acc + data.qualifiedNumber, 0) / 3 return (
this.allDataList.reduce((acc, data) => {
if (!data.productDescription.includes('倒车雷达')) {
return acc + data.qualifiedNumber
} else {
return acc
}
}, 0) / 3
)
}, },
// 抛光数 // 抛光数
totalPaoguangTotal() { totalPaoguangTotal() {
return this.allDataList.reduce((acc, data) => acc + data.paoguangTotal, 0) / 3 return (
this.allDataList.reduce((acc, data) => {
let str = data.productDescription
if (!str.includes('倒车雷达')) {
return acc + data.paoguangTotal
} else {
return acc
}
}, 0) / 3
)
}, },
// 打磨数 // 打磨数
totalDamoTotal() { totalDamoTotal() {
return this.allDataList.reduce((acc, data) => acc + data.damoTotal, 0) / 3 return (
this.allDataList.reduce((acc, data) => {
let str = data.productDescription
if (!str.includes('倒车雷达')) {
return acc + data.damoTotal
} else {
return acc
}
}, 0) / 3
)
}, },
// 报废数 // 报废数
totalBaofeiTotal() { totalBaofeiTotal() {
return this.allDataList.reduce((acc, data) => acc + data.baofeiTotal, 0) / 3 return (
this.allDataList.reduce((acc, data) => {
let str = data.productDescription
if (!str.includes('倒车雷达')) {
return acc + data.baofeiTotal
} else {
return acc
}
}, 0) / 3
)
}, },
// 总合格率 // 总合格率
passRate() { passRate() {
if (this.totalQuantity > 0) { if (this.totalQuantity > 0) {
return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%' return Math.ceil((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
} else { } else {
return '0%' return '0%'
} }
@@ -530,6 +573,11 @@ export default {
}) })
break break
} }
getParkingSensorTotal(params).then((res) => {
if (res.code == 200) {
this.parkingSensor = res.data
}
})
}, },
//todo 设置表头颜色 //todo 设置表头颜色