feat: 机组管理迁移l2代码

This commit is contained in:
砂糖
2025-10-10 14:40:29 +08:00
parent b0b8416e2f
commit 0a366b054c
32 changed files with 5133 additions and 11 deletions

View File

@@ -0,0 +1,60 @@
<template>
<div class="pdo-report">
<ReportBody v-loading="loading" title="实绩报表" :summary="reportSummary" :dataset="reportDetail" :columns="columns" />
</div>
</template>
<script>
import ReportBody from './body.vue'
import { getReportSummary, getReportDetail } from '@/api/l2/report'
export default {
name: 'PdoReport',
components: {
ReportBody
},
data() {
return {
loading: false,
reportSummary: [],
reportDetail: [],
columns: []
}
},
methods: {
async fetchReportData() {
this.loading = true
const res = await getReportSummary()
this.reportSummary = [
{ label: '成品卷数', value: res.coilCount }, // coilCount=总卷数,结合“成品总重/原料总重”场景,推测为成品卷数
{ label: '平均出口厚度[mm]', value: res.avgExitThickness }, // avgExitThickness=平均出口厚度,厚度用“平均”更符合实际(单卷厚度均匀,无“总厚度”概念)
{ label: '原料总重[t]', value: res.totalEntryWeight }, // totalEntryWeight=总入口重量,入口重量即原料重量
{ label: '总出口长度[mm]', value: res.totalExitLength }, // totalExitLength=总出口长度,补充原“去锌总重”(无对应字段)的空缺,符合卷材加工的核心维度
{ label: '平均出口宽度[mm]', value: res.avgExitWidth }, // avgExitWidth=平均出口宽度,宽度用“平均”更合理(单卷宽度固定,“总宽度”无业务意义)
{ label: '成品总重[t]', value: res.totalActualWeight }, // totalActualWeight=总实际重量,实际重量即成品最终重量
{ label: '总理论重量[t]', value: res.totalTheoryWeight }, // totalTheoryWeight=总理论重量工业场景中常用“理论重量vs实际重量”对比
{ label: '成材率', value: (res.yieldRate * 100).toFixed(2) + '%' } // yieldRate=成材率,原配置正确,保留
];
const res2 = await getReportDetail()
this.reportDetail = res2
this.columns = [
{ label: '出口物料ID', prop: 'exitMatId' },
{ label: '入口物料ID', prop: 'entryMatId' },
{ label: '机组号', prop: 'groupNo' },
{ label: '班次号', prop: 'shiftNo' },
{ label: '钢种', prop: 'steelGrade' },
{ label: '出口厚度(mm)', prop: 'exitThickness' },
{ label: '出口宽度(mm)', prop: 'exitWidth' },
{ label: '出口长度(m)', prop: 'exitLength' },
{ label: '理论重量(kg)', prop: 'theoryWeight' },
{ label: '实际重量(kg)', prop: 'actualWeight' },
{ label: '上线时间', prop: 'onlineTime' },
]
this.loading = false
}
},
mounted() {
this.fetchReportData()
}
}
</script>