update - 异常率报表改

master
yinq 7 months ago
parent 6c240afefb
commit af51566c3f

@ -12,7 +12,7 @@ module.exports = {
/**
* 是否显示顶部导航
*/
topNav: false,
topNav: true,
/**
* 是否显示 tagsView

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

@ -68,18 +68,18 @@
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['report:electricalInspection:remove']"
>删除
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['report:electricalInspection:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"

Loading…
Cancel
Save