|
|
|
@ -1,25 +1,36 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :inline="true" :model="form" ref="form">
|
|
|
|
|
<el-form-item label="工厂" prop="factory">
|
|
|
|
|
<el-select v-model="form.factory" placeholder="选择工厂">
|
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>
|
|
|
|
|
<el-form-item label="工厂名称">
|
|
|
|
|
<el-select v-model="form.FACTORY_CODE" placeholder="请选择工厂名称">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in factoryList"
|
|
|
|
|
:key="item.factoryCode"
|
|
|
|
|
:label="item.factoryName"
|
|
|
|
|
:value="item.factoryCode"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产线" prop="productionLine">
|
|
|
|
|
<el-select v-model="form.productionLine" placeholder="选择产线">
|
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in option1"></el-option>
|
|
|
|
|
<el-select v-model="form.productionLine" placeholder="请选择产线" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in productLineList"
|
|
|
|
|
:key="item.productLineCode"
|
|
|
|
|
:label="item.productLineName"
|
|
|
|
|
:value="item.productLineCode"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="下线时间" prop="date">
|
|
|
|
|
<el-form-item label="下线日期" >
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.date"
|
|
|
|
|
type="daterange"
|
|
|
|
|
format="yyyy-mm-dd"
|
|
|
|
|
value-format="yyyy-mm-dd"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
@ -29,19 +40,23 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="tableData"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="index"
|
|
|
|
|
label="序号"
|
|
|
|
|
width="180">
|
|
|
|
|
width="180"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="material_MODEL"
|
|
|
|
|
label="产品型号">
|
|
|
|
|
label="产品型号"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="q_SUM"
|
|
|
|
|
label="问题数量">
|
|
|
|
|
label="问题数量"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
@ -59,13 +74,16 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import Chart from "@/components/board/Chart";
|
|
|
|
|
import Chart from '@/components/board/Chart'
|
|
|
|
|
import { highFaultList } from '@//api/report/reportAPI'
|
|
|
|
|
import { findProductLineList } from '@//api/base/productLine'
|
|
|
|
|
import { parseTime } from '@//utils/ruoyi'
|
|
|
|
|
import { findFactoryList } from '@//api/base/factory'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'ProductOffLine',
|
|
|
|
|
components: {
|
|
|
|
|
Chart,
|
|
|
|
|
Chart
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -73,36 +91,35 @@ export default {
|
|
|
|
|
form: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
factory:'1301',
|
|
|
|
|
FACTORY_CODE: '1301',
|
|
|
|
|
productionLine: 'CX_02',
|
|
|
|
|
date: []
|
|
|
|
|
},
|
|
|
|
|
option: [
|
|
|
|
|
{
|
|
|
|
|
value: '1301',
|
|
|
|
|
label: '工厂一'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
option1: [
|
|
|
|
|
{
|
|
|
|
|
value: 'CX_01',
|
|
|
|
|
label: '产线一'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'CX_02',
|
|
|
|
|
label: '产线二'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
tableData: []
|
|
|
|
|
tableData: [],
|
|
|
|
|
// 工厂选项
|
|
|
|
|
factoryList: [],
|
|
|
|
|
// 产线选项
|
|
|
|
|
productLineList: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
created() {
|
|
|
|
|
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
|
|
|
|
|
this.form.date[0] = nowDate
|
|
|
|
|
this.form.date[1] = nowDate
|
|
|
|
|
findFactoryList().then(response => {
|
|
|
|
|
this.factoryList = response.data
|
|
|
|
|
})
|
|
|
|
|
findProductLineList({ productLineType: 1 }).then(response => {
|
|
|
|
|
this.productLineList = response.data
|
|
|
|
|
this.getList()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getList() {
|
|
|
|
|
highFaultList({ beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1]
|
|
|
|
|
, FACTORY_CODE: this.form.factory , PRODUCT_LINE_CODE: this.form.productionLine}).then(response => {
|
|
|
|
|
highFaultList({
|
|
|
|
|
beginBeginTime: this.form?.date?.[0], endBeginTime: this.form?.date?.[1]
|
|
|
|
|
, FACTORY_CODE: this.form.factory, PRODUCT_LINE_CODE: this.form.productionLine
|
|
|
|
|
}).then(response => {
|
|
|
|
|
//分页查询
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.total = response?.total || 0
|
|
|
|
@ -135,13 +152,13 @@ export default {
|
|
|
|
|
name: '数量',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
data: response.data.map(v => v.q_SUM).reverse()
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
this.$refs[formName].resetFields()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|