|
|
@ -11,6 +11,16 @@
|
|
|
|
></el-option>
|
|
|
|
></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="异常类型">
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.alarmType" placeholder="请选择异常类型" >
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in alarmTypeList"
|
|
|
|
|
|
|
|
:key="item.key"
|
|
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
|
|
:value="item.key"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="日期类型">
|
|
|
|
<el-form-item label="日期类型">
|
|
|
|
<el-select v-model="queryParams.dateType" placeholder="请选择日期类型" >
|
|
|
|
<el-select v-model="queryParams.dateType" placeholder="请选择日期类型" >
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
@ -48,7 +58,7 @@
|
|
|
|
type="info"
|
|
|
|
type="info"
|
|
|
|
plain
|
|
|
|
plain
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
>样品机数:{{ totalSum }}
|
|
|
|
>异常数:{{ totalSum }}
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
@ -68,9 +78,9 @@
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
|
|
|
|
<el-table-column label="日期" align="center" prop="INSPECTOR_TIME" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="日期" align="center" prop="INSPECTOR_TIME" v-if="columns[1].visible"/>
|
|
|
|
<el-table-column label="样品机数" align="center" prop="QUALITY_SUM" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="异常数" align="center" prop="QUALITY_SUM" v-if="columns[2].visible"/>
|
|
|
|
<el-table-column label="产量" align="center" prop="OFF_LINE_NUM" v-if="columns[3].visible"/>
|
|
|
|
<el-table-column label="产量" align="center" prop="OFF_LINE_NUM" v-if="columns[3].visible"/>
|
|
|
|
<el-table-column label="降级率" align="center" prop="REPAIR_RATE" v-if="columns[4].visible">
|
|
|
|
<el-table-column label="异常率" align="center" prop="REPAIR_RATE" v-if="columns[4].visible">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
{{ parseFloat(scope.row.REPAIR_RATE) }}%
|
|
|
|
{{ parseFloat(scope.row.REPAIR_RATE) }}%
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -90,8 +100,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
downgradeProportionReportList,
|
|
|
|
downgradeProportionReportList
|
|
|
|
repairRateReportList
|
|
|
|
|
|
|
|
} from '@/api/report/reportAPI'
|
|
|
|
} from '@/api/report/reportAPI'
|
|
|
|
import {findProductLineList} from '@//api/base/productLine'
|
|
|
|
import {findProductLineList} from '@//api/base/productLine'
|
|
|
|
import {parseTime} from '@//utils/ruoyi'
|
|
|
|
import {parseTime} from '@//utils/ruoyi'
|
|
|
@ -132,6 +141,8 @@ export default {
|
|
|
|
daterangeBeginTime: [],
|
|
|
|
daterangeBeginTime: [],
|
|
|
|
// 日期类型
|
|
|
|
// 日期类型
|
|
|
|
dateTypeList: [{ key: 10, label: '日' }, { key: 7, label: '月' }, { key: 4, label: '年' }],
|
|
|
|
dateTypeList: [{ key: 10, label: '日' }, { key: 7, label: '月' }, { key: 4, label: '年' }],
|
|
|
|
|
|
|
|
// 异常类型
|
|
|
|
|
|
|
|
alarmTypeList: [{ key: 1, label: '降级品' }, { key: 2, label: '报废品' } ],
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
// pageNum: 1,
|
|
|
|
// pageNum: 1,
|
|
|
@ -140,6 +151,7 @@ export default {
|
|
|
|
endBeginTime: null,
|
|
|
|
endBeginTime: null,
|
|
|
|
stationCodeList: null,
|
|
|
|
stationCodeList: null,
|
|
|
|
dateType: 10,
|
|
|
|
dateType: 10,
|
|
|
|
|
|
|
|
alarmType: 1,
|
|
|
|
PRODUCT_LINE_CODE: 'CX_02',
|
|
|
|
PRODUCT_LINE_CODE: 'CX_02',
|
|
|
|
ORDER_CODE: null,
|
|
|
|
ORDER_CODE: null,
|
|
|
|
MATERIAL_CODE: null,
|
|
|
|
MATERIAL_CODE: null,
|
|
|
@ -153,9 +165,9 @@ export default {
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{key: 0, label: `主键标识`, visible: false},
|
|
|
|
{key: 0, label: `主键标识`, visible: false},
|
|
|
|
{key: 1, label: `日期`, visible: true},
|
|
|
|
{key: 1, label: `日期`, visible: true},
|
|
|
|
{key: 2, label: `样品机数`, visible: true},
|
|
|
|
{key: 2, label: `异常数`, visible: true},
|
|
|
|
{key: 3, label: `产量`, visible: true},
|
|
|
|
{key: 3, label: `产量`, visible: true},
|
|
|
|
{key: 4, label: `降级率`, visible: true}
|
|
|
|
{key: 4, label: `异常率`, visible: true}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
// 产线选项
|
|
|
|
// 产线选项
|
|
|
|
productLineList: [],
|
|
|
|
productLineList: [],
|
|
|
@ -222,7 +234,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
itemWidth: 3 * vw,
|
|
|
|
itemWidth: 3 * vw,
|
|
|
|
data: ['样品机数', '降级率(%)', '目标(%)'],
|
|
|
|
data: ['异常数', '异常率(%)', '目标(%)'],
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: "#000",
|
|
|
|
color: "#000",
|
|
|
|
margin: 15,
|
|
|
|
margin: 15,
|
|
|
@ -282,7 +294,7 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: '样品机数',
|
|
|
|
name: '异常数',
|
|
|
|
type: 'bar',
|
|
|
|
type: 'bar',
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
@ -307,7 +319,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: '降级率(%)',
|
|
|
|
name: '异常率(%)',
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
yAxisIndex: 1,
|
|
|
|
yAxisIndex: 1,
|
|
|
|
data: e.map(val => parseFloat(val.REPAIR_RATE)),
|
|
|
|
data: e.map(val => parseFloat(val.REPAIR_RATE)),
|
|
|
@ -376,7 +388,7 @@ export default {
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
this.download('/report/qualityReport/downgradeProportionReportList/export', {
|
|
|
|
this.download('/report/qualityReport/downgradeProportionReportList/export', {
|
|
|
|
...this.queryParams
|
|
|
|
...this.queryParams
|
|
|
|
}, `降级率报表_${new Date().getTime()}.xlsx`)
|
|
|
|
}, `质量异常率报表_${new Date().getTime()}.xlsx`)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|