|
|
@ -8,11 +8,11 @@
|
|
|
|
placeholder="选择年">
|
|
|
|
placeholder="选择年">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="周期" prop="period">
|
|
|
|
<!-- <el-form-item label="周期" prop="period">-->
|
|
|
|
<el-select v-model="form.period" placeholder="选择周期">
|
|
|
|
<!-- <el-select v-model="form.period" placeholder="选择周期">-->
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>
|
|
|
|
<!-- <el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>-->
|
|
|
|
</el-select>
|
|
|
|
<!-- </el-select>-->
|
|
|
|
</el-form-item>
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="getList">查询</el-button>
|
|
|
|
<el-button type="primary" @click="getList">查询</el-button>
|
|
|
|
<el-button @click="resetForm('form')">重置</el-button>
|
|
|
|
<el-button @click="resetForm('form')">重置</el-button>
|
|
|
@ -23,15 +23,19 @@
|
|
|
|
:data="tableData"
|
|
|
|
:data="tableData"
|
|
|
|
style="width: 100%">
|
|
|
|
style="width: 100%">
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
prop="type"
|
|
|
|
prop="productLineName"
|
|
|
|
label="工序"
|
|
|
|
label="产线"
|
|
|
|
width="150">
|
|
|
|
width="150">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
v-for="i in tableHead"
|
|
|
|
v-for="i in 52"
|
|
|
|
:prop="i.value"
|
|
|
|
:label="'第'+(i)+'周'"
|
|
|
|
:label="i.label"
|
|
|
|
|
|
|
|
width="120">
|
|
|
|
width="120">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
{{
|
|
|
|
|
|
|
|
((tableData.find(v => v.productLineName === scope.row.productLineName).children.find(r => r.WEEK_NUMBER === i) || {}).REPAIR_RATE) || '0'
|
|
|
|
|
|
|
|
}}%
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
@ -51,7 +55,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import Chart from "@/components/board/Chart";
|
|
|
|
import Chart from "@/components/board/Chart";
|
|
|
|
import { highFaultList, weldLeakRateList } from '@//api/report/reportAPI'
|
|
|
|
import {highFaultList, weldLeakRateList} from '@//api/report/reportAPI'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'ProductOffLine',
|
|
|
|
name: 'ProductOffLine',
|
|
|
@ -62,6 +66,7 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
total: 100,
|
|
|
|
total: 100,
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
|
|
|
|
|
year: new Date().getFullYear().toString(),
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10
|
|
|
|
pageSize: 10
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -79,198 +84,102 @@ export default {
|
|
|
|
label: '年'
|
|
|
|
label: '年'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
tableData: [
|
|
|
|
tableData: [],
|
|
|
|
{
|
|
|
|
|
|
|
|
type: '1',
|
|
|
|
|
|
|
|
column1: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: '1',
|
|
|
|
|
|
|
|
column1: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: '1',
|
|
|
|
|
|
|
|
column1: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: '1',
|
|
|
|
|
|
|
|
column1: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: '1',
|
|
|
|
|
|
|
|
column1: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tableHead: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第1周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第2周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第3周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第4周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第5周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '第6周',
|
|
|
|
|
|
|
|
value: 'column1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
,
|
|
|
|
,
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.$refs.chart1.setData({
|
|
|
|
}
|
|
|
|
tooltip: {
|
|
|
|
,
|
|
|
|
trigger: "axis",
|
|
|
|
methods: {
|
|
|
|
},
|
|
|
|
getList() {
|
|
|
|
legend: {},
|
|
|
|
weldLeakRateList({year: this.form.year,}).then(response => {
|
|
|
|
grid: {
|
|
|
|
//分页查询
|
|
|
|
top: "middle",
|
|
|
|
let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))]
|
|
|
|
left: "3%",
|
|
|
|
let data = productLineArr.map(v => {
|
|
|
|
right: "4%",
|
|
|
|
return {
|
|
|
|
bottom: "3%",
|
|
|
|
productLineName: v,
|
|
|
|
height: "80%",
|
|
|
|
children: response.data.filter(val => val.PRODUCT_LINE_NAME === v)
|
|
|
|
containLabel: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
xAxis: {
|
|
|
|
this.tableData = data
|
|
|
|
type: "category",
|
|
|
|
|
|
|
|
data: [100, 200, 20, 30, 60, 89],
|
|
|
|
this.$refs.chart1.setData({
|
|
|
|
axisLine: {
|
|
|
|
tooltip: {
|
|
|
|
lineStyle: {
|
|
|
|
trigger: "axis",
|
|
|
|
color: "#999",
|
|
|
|
formatter: (v)=>{
|
|
|
|
},
|
|
|
|
console.log(v)
|
|
|
|
},
|
|
|
|
return v[0].axisValueLabel+'<br />'+v.map(e=>{
|
|
|
|
},
|
|
|
|
return `
|
|
|
|
yAxis: {
|
|
|
|
${e.marker}${e.seriesName} : ${e.data}%\n
|
|
|
|
type: "value",
|
|
|
|
`
|
|
|
|
axisLabel: {
|
|
|
|
}).join('')
|
|
|
|
formatter: '{value}%'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
type: "dashed",
|
|
|
|
|
|
|
|
color: "#DDD",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {},
|
|
|
|
axisLine: {
|
|
|
|
grid: {
|
|
|
|
show: false,
|
|
|
|
top: "middle",
|
|
|
|
lineStyle: {
|
|
|
|
left: "3%",
|
|
|
|
color: "#333",
|
|
|
|
right: "4%",
|
|
|
|
|
|
|
|
bottom: "3%",
|
|
|
|
|
|
|
|
height: "80%",
|
|
|
|
|
|
|
|
containLabel: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
nameTextStyle: {
|
|
|
|
type: "category",
|
|
|
|
color: "#999",
|
|
|
|
data: Array(52).fill('').map((v, k) => '第' + (k + 1) + '周'),
|
|
|
|
},
|
|
|
|
axisLine: {
|
|
|
|
splitArea: {
|
|
|
|
lineStyle: {
|
|
|
|
show: false,
|
|
|
|
color: "#999",
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
series: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "冰箱A线",
|
|
|
|
|
|
|
|
type: "line",
|
|
|
|
|
|
|
|
data: [800, 900, 220, 130, 660, 289],
|
|
|
|
|
|
|
|
color: "#F58080",
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
type: "linear",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: "#FFCAD4", // 0% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0.4,
|
|
|
|
|
|
|
|
color: "#F58080", // 100% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: "#F58080", // 100% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
globalCoord: false, // 缺省为 false
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemStyle: {
|
|
|
|
yAxis: {
|
|
|
|
normal: {
|
|
|
|
type: "value",
|
|
|
|
color: "#F58080",
|
|
|
|
axisLabel: {
|
|
|
|
borderWidth: 10,
|
|
|
|
formatter: '{value}%'
|
|
|
|
/*shadowColor: 'rgba(72,216,191, 0.3)',
|
|
|
|
|
|
|
|
shadowBlur: 100,*/
|
|
|
|
|
|
|
|
borderColor: "#F58080",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
smooth: true,
|
|
|
|
lineStyle: {
|
|
|
|
},
|
|
|
|
type: "dashed",
|
|
|
|
{
|
|
|
|
color: "#DDD",
|
|
|
|
name: "冰箱B线",
|
|
|
|
|
|
|
|
type: "line",
|
|
|
|
|
|
|
|
data: [123, 568, 111, 222, 123, 56],
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
width: 2,
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
type: "linear",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: "#AAF487", // 0% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0.4,
|
|
|
|
|
|
|
|
color: "#47D8BE", // 100% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: "#47D8BE", // 100% 处的颜色
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
globalCoord: false, // 缺省为 false
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
shadowColor: "rgba(71,216,190, 0.5)",
|
|
|
|
|
|
|
|
shadowBlur: 10,
|
|
|
|
|
|
|
|
shadowOffsetY: 7,
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLine: {
|
|
|
|
itemStyle: {
|
|
|
|
show: false,
|
|
|
|
normal: {
|
|
|
|
lineStyle: {
|
|
|
|
color: "#AAF487",
|
|
|
|
color: "#333",
|
|
|
|
borderWidth: 10,
|
|
|
|
},
|
|
|
|
/*shadowColor: 'rgba(72,216,191, 0.3)',
|
|
|
|
},
|
|
|
|
shadowBlur: 100,*/
|
|
|
|
nameTextStyle: {
|
|
|
|
borderColor: "#AAF487",
|
|
|
|
color: "#999",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
splitArea: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
smooth: true,
|
|
|
|
series: data.map(v => {
|
|
|
|
},
|
|
|
|
return {
|
|
|
|
],
|
|
|
|
name: v.productLineName,
|
|
|
|
})
|
|
|
|
type: "line",
|
|
|
|
}
|
|
|
|
data: v.children.map(r => parseFloat(r.REPAIR_RATE)),
|
|
|
|
,
|
|
|
|
color: "#F58080",
|
|
|
|
methods: {
|
|
|
|
lineStyle: {
|
|
|
|
getList() {
|
|
|
|
normal: {
|
|
|
|
weldLeakRateList({ year: '\'2022\'', }).then(response => {
|
|
|
|
width: 2,
|
|
|
|
//分页查询
|
|
|
|
},
|
|
|
|
console.log(response)
|
|
|
|
},
|
|
|
|
this.loading = false
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
// color: "#F58080",
|
|
|
|
|
|
|
|
borderWidth: 10,
|
|
|
|
|
|
|
|
// borderColor: "#F58080",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
smooth: true,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
,
|
|
|
|
,
|
|
|
|