|
|
@ -8,6 +8,12 @@
|
|
|
|
placeholder="选择年">
|
|
|
|
placeholder="选择年">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="月/周" >
|
|
|
|
|
|
|
|
<el-select v-model="form.month" clearable placeholder="请选择">
|
|
|
|
|
|
|
|
<el-option label="月" value="1"></el-option>
|
|
|
|
|
|
|
|
<el-option label="周" value="0"></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</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>-->
|
|
|
@ -23,11 +29,13 @@
|
|
|
|
:data="tableData"
|
|
|
|
:data="tableData"
|
|
|
|
style="width: 100%">
|
|
|
|
style="width: 100%">
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
v-if="week111||month111"
|
|
|
|
prop="productLineName"
|
|
|
|
prop="productLineName"
|
|
|
|
label="产线"
|
|
|
|
label="产线"
|
|
|
|
width="150">
|
|
|
|
width="150">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
v-if="week111"
|
|
|
|
v-for="i in 52"
|
|
|
|
v-for="i in 52"
|
|
|
|
:label="'第'+(i)+'周'"
|
|
|
|
:label="'第'+(i)+'周'"
|
|
|
|
width="120">
|
|
|
|
width="120">
|
|
|
@ -37,6 +45,17 @@
|
|
|
|
}}%
|
|
|
|
}}%
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
v-if="month111"
|
|
|
|
|
|
|
|
v-for="i in 12"
|
|
|
|
|
|
|
|
: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>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
<pagination
|
|
|
@ -65,11 +84,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
month111:false,
|
|
|
|
|
|
|
|
week111:false,
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
|
year: new Date().getFullYear().toString(),
|
|
|
|
year: new Date().getFullYear().toString(),
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
month:"0",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
option: [
|
|
|
|
option: [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -96,8 +118,20 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
weldLeakRateList({year: this.form.year,}).then(response => {
|
|
|
|
weldLeakRateList({year: this.form.year,month:this.form.month},
|
|
|
|
|
|
|
|
).then(response => {
|
|
|
|
this.total = response?.total || 0
|
|
|
|
this.total = response?.total || 0
|
|
|
|
|
|
|
|
var length = response.data.length;
|
|
|
|
|
|
|
|
var yname = "";
|
|
|
|
|
|
|
|
if (length == 12){
|
|
|
|
|
|
|
|
yname = "月"
|
|
|
|
|
|
|
|
this.month111=true;
|
|
|
|
|
|
|
|
this.week111 = false;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.week111 = true;
|
|
|
|
|
|
|
|
this.month111 = false;
|
|
|
|
|
|
|
|
yname="周"
|
|
|
|
|
|
|
|
}
|
|
|
|
//分页查询
|
|
|
|
//分页查询
|
|
|
|
let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))]
|
|
|
|
let productLineArr = [...new Set(response.data.map(v => v.PRODUCT_LINE_NAME))]
|
|
|
|
let data = productLineArr.map(v => {
|
|
|
|
let data = productLineArr.map(v => {
|
|
|
@ -112,7 +146,7 @@ export default {
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
|
trigger: "axis",
|
|
|
|
trigger: "axis",
|
|
|
|
formatter: (v)=>{
|
|
|
|
formatter: (v)=>{
|
|
|
|
console.log(v)
|
|
|
|
// console.log(v)
|
|
|
|
return v[0].axisValueLabel+'<br />'+v.map(e=>{
|
|
|
|
return v[0].axisValueLabel+'<br />'+v.map(e=>{
|
|
|
|
return `
|
|
|
|
return `
|
|
|
|
${e.marker}${e.seriesName} : ${e.data}%\n
|
|
|
|
${e.marker}${e.seriesName} : ${e.data}%\n
|
|
|
@ -131,7 +165,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
type: "category",
|
|
|
|
type: "category",
|
|
|
|
data: Array(52).fill('').map((v, k) => '第' + (k + 1) + '周'),
|
|
|
|
data: Array(length).fill('').map((v, k) => '第' + (k + 1) + yname),
|
|
|
|
axisLine: {
|
|
|
|
axisLine: {
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
|
color: "#999",
|
|
|
|
color: "#999",
|
|
|
@ -175,6 +209,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
label:{show:true},
|
|
|
|
// color: "#F58080",
|
|
|
|
// color: "#F58080",
|
|
|
|
borderWidth: 10,
|
|
|
|
borderWidth: 10,
|
|
|
|
// borderColor: "#F58080",
|
|
|
|
// borderColor: "#F58080",
|
|
|
|