|
|
|
@ -8,11 +8,11 @@
|
|
|
|
|
placeholder="选择年">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="周期" prop="period">
|
|
|
|
|
<el-select v-model="form.period" placeholder="选择周期">
|
|
|
|
|
<el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="周期" prop="period">-->
|
|
|
|
|
<!-- <el-select v-model="form.period" placeholder="选择周期">-->
|
|
|
|
|
<!-- <el-option :label="i.label" :value="i.value" v-for="i in option"></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="getList">查询</el-button>
|
|
|
|
|
<el-button @click="resetForm('form')">重置</el-button>
|
|
|
|
@ -23,15 +23,19 @@
|
|
|
|
|
:data="tableData"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="type"
|
|
|
|
|
label="工序"
|
|
|
|
|
prop="productLineName"
|
|
|
|
|
label="产线"
|
|
|
|
|
width="150">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-for="i in tableHead"
|
|
|
|
|
:prop="i.value"
|
|
|
|
|
:label="i.label"
|
|
|
|
|
v-for="i in 52"
|
|
|
|
|
:label="'第'+(i)+'周'"
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
@ -62,6 +66,7 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
total: 100,
|
|
|
|
|
form: {
|
|
|
|
|
year: new Date().getFullYear().toString(),
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10
|
|
|
|
|
},
|
|
|
|
@ -79,62 +84,37 @@ export default {
|
|
|
|
|
label: '年'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
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',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
tableData: [],
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
mounted() {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
methods: {
|
|
|
|
|
getList() {
|
|
|
|
|
weldLeakRateList({year: this.form.year,}).then(response => {
|
|
|
|
|
//分页查询
|
|
|
|
|
let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))]
|
|
|
|
|
let data = productLineArr.map(v => {
|
|
|
|
|
return {
|
|
|
|
|
productLineName: v,
|
|
|
|
|
children: response.data.filter(val => val.PRODUCT_LINE_NAME === v)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.tableData = data
|
|
|
|
|
|
|
|
|
|
this.$refs.chart1.setData({
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: "axis",
|
|
|
|
|
formatter: (v)=>{
|
|
|
|
|
console.log(v)
|
|
|
|
|
return v[0].axisValueLabel+'<br />'+v.map(e=>{
|
|
|
|
|
return `
|
|
|
|
|
${e.marker}${e.seriesName} : ${e.data}%\n
|
|
|
|
|
`
|
|
|
|
|
}).join('')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {},
|
|
|
|
|
grid: {
|
|
|
|
@ -147,7 +127,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: "category",
|
|
|
|
|
data: [100, 200, 20, 30, 60, 89],
|
|
|
|
|
data: Array(52).fill('').map((v, k) => '第' + (k + 1) + '周'),
|
|
|
|
|
axisLine: {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
color: "#999",
|
|
|
|
@ -178,99 +158,28 @@ export default {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: "冰箱A线",
|
|
|
|
|
series: data.map(v => {
|
|
|
|
|
return {
|
|
|
|
|
name: v.productLineName,
|
|
|
|
|
type: "line",
|
|
|
|
|
data: [800, 900, 220, 130, 660, 289],
|
|
|
|
|
data: v.children.map(r => parseFloat(r.REPAIR_RATE)),
|
|
|
|
|
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: {
|
|
|
|
|
normal: {
|
|
|
|
|
color: "#F58080",
|
|
|
|
|
// color: "#F58080",
|
|
|
|
|
borderWidth: 10,
|
|
|
|
|
/*shadowColor: 'rgba(72,216,191, 0.3)',
|
|
|
|
|
shadowBlur: 100,*/
|
|
|
|
|
borderColor: "#F58080",
|
|
|
|
|
// borderColor: "#F58080",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
smooth: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
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,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
color: "#AAF487",
|
|
|
|
|
borderWidth: 10,
|
|
|
|
|
/*shadowColor: 'rgba(72,216,191, 0.3)',
|
|
|
|
|
shadowBlur: 100,*/
|
|
|
|
|
borderColor: "#AAF487",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
smooth: true,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
methods: {
|
|
|
|
|
getList() {
|
|
|
|
|
weldLeakRateList({ year: '\'2022\'', }).then(response => {
|
|
|
|
|
//分页查询
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.loading = false
|
|
|
|
|
}),
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|