1
This commit is contained in:
@@ -51,4 +51,13 @@ export function downloadStatisticsTableExcel(query) {
|
||||
},
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取 首检 倒车雷达数量
|
||||
export function getParkingSensorTotal(query) {
|
||||
return request({
|
||||
url: 'mes/qc/statistics/getParkingSensorTotal',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
@@ -67,13 +67,7 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="width: 100%; display: flex; justify-content: flex-end">
|
||||
<pagination
|
||||
:pageSizes="[12, 30, 60, 300]"
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination :pageSizes="[12, 30, 60, 300]" :total="pagination.total" :page.sync="pagination.pageNum" :limit.sync="pagination.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<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">打磨数:{{ totalDamoTotal }}</span>
|
||||
<span style="margin-left: 20px">报废数:{{ totalBaofeiTotal }}</span>
|
||||
<span style="margin-left: 20px">倒车雷达:{{ parkingSensor }}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格部分 -->
|
||||
@@ -250,6 +246,7 @@ import {
|
||||
GetQualityStatisticsTable_final,
|
||||
GetQualityStatisticsTable_total,
|
||||
deleteStatisticsTable,
|
||||
getParkingSensorTotal,
|
||||
downloadStatisticsTableExcel,
|
||||
} from '@/api/qualityManagement/qualityStatistics_V2'
|
||||
export default {
|
||||
@@ -348,7 +345,10 @@ export default {
|
||||
},
|
||||
visibleMethod: this.visibleMethod,
|
||||
},
|
||||
allDataList:[],
|
||||
// 统计数据
|
||||
allDataList: [],
|
||||
// 倒车雷达
|
||||
parkingSensor:0,
|
||||
// 自适应
|
||||
screenWidth: '1920px',
|
||||
screenHeight: '1080px',
|
||||
@@ -375,28 +375,71 @@ export default {
|
||||
computed: {
|
||||
// 投入数
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
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() {
|
||||
if (this.totalQuantity > 0) {
|
||||
return Math.floor((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
|
||||
return Math.ceil((this.totalQualifiedNumber / this.totalQuantity) * 100) + '%'
|
||||
} else {
|
||||
return '0%'
|
||||
}
|
||||
@@ -530,6 +573,11 @@ export default {
|
||||
})
|
||||
break
|
||||
}
|
||||
getParkingSensorTotal(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.parkingSensor = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//todo 设置表头颜色
|
||||
|
||||
Reference in New Issue
Block a user