yinq 8 months ago
commit 2fa36a7d89

@ -37,9 +37,24 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<div class="chart1">
<div class="chart1" v-if="!isChart">
<Chart ref="chart1"></Chart>
</div>
<div v-if="isChart">
<div class="chart11">
<Chart ref="chart11"></Chart>
</div>
<div class="chart12">
<Chart ref="chart12"></Chart>
</div>
<div class="chart13">
<Chart ref="chart13"></Chart>
</div>
<div class="chart14">
<Chart ref="chart14"></Chart>
</div>
</div>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -84,7 +99,6 @@
<!-- />-->
</div>
</template>
@ -105,6 +119,7 @@ export default {
},
data() {
return {
isChart: true,
//
loading: true,
//
@ -171,7 +186,9 @@ export default {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = weekDate
this.daterangeBeginTime[1] = nowDate
this.getList()
// this.getList()
this.getChart()
},
watch: {
'queryParams.PRODUCT_LINE_CODE': function (newVal, oldVal) {
@ -182,8 +199,335 @@ export default {
},
},
methods: {
getChart() {
repairRateReportList({
...this.queryParams,
STATION_CODE: [2001,2006,2007],
stationCodeList: '2001,2006,2007',
}).then(response => {
let e = response.data
this.$refs.chart11.setData({
grid: {
top: "15%",
left: "1%",
right: "1%",
bottom: "2%",
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#000',
},
},
},
legend: {
itemWidth: 3 * vw,
data: ['检漏返修率(%)'],
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
xAxis: [
{
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
type: 'category',
data: e.map(val => val.INSPECTOR_TIME),
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
splitLine: {
show: false,
},
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
formatter: '{value}% '
}
}
],
series: [
{
name: '检漏返修率(%)',
type: 'line',
data: e.map(val => parseFloat(val.REPAIR_RATE)),
itemStyle: {
normal: {
color: '#F9A25B',
},
},
}
]
})
})
repairRateReportList({
...this.queryParams,
STATION_CODE: [2002,2003],
stationCodeList: '2002,2003',
}).then(response => {
let e = response.data
this.$refs.chart12.setData({
grid: {
top: "15%",
left: "1%",
right: "1%",
bottom: "2%",
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#000',
},
},
},
legend: {
itemWidth: 3 * vw,
data: ['发泡返修率(%)'],
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
xAxis: [
{
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
type: 'category',
data: e.map(val => val.INSPECTOR_TIME),
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
splitLine: {
show: false,
},
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
formatter: '{value}% '
}
}
],
series: [
{
name: '发泡返修率(%)',
type: 'line',
data: e.map(val => parseFloat(val.REPAIR_RATE)),
itemStyle: {
normal: {
color: '#F9A25B',
},
},
}
]
})
})
repairRateReportList({
...this.queryParams,
STATION_CODE: [2005],
stationCodeList: '2005',
}).then(response => {
let e = response.data
this.$refs.chart13.setData({
grid: {
top: "15%",
left: "1%",
right: "1%",
bottom: "2%",
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#000',
},
},
},
legend: {
itemWidth: 3 * vw,
data: ['电检返修率(%)'],
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
xAxis: [
{
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
type: 'category',
data: e.map(val => val.INSPECTOR_TIME),
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
splitLine: {
show: false,
},
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
formatter: '{value}% '
}
}
],
series: [
{
name: '电检返修率(%)',
type: 'line',
data: e.map(val => parseFloat(val.REPAIR_RATE)),
itemStyle: {
normal: {
color: '#F9A25B',
},
},
}
]
})
})
repairRateReportList({
...this.queryParams,
STATION_CODE: [2008,2009,2010,2011],
stationCodeList: '2008,2009,2010,2011',
}).then(response => {
let e = response.data
this.$refs.chart14.setData({
grid: {
top: "15%",
left: "1%",
right: "1%",
bottom: "2%",
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#000',
},
},
},
legend: {
itemWidth: 3 * vw,
data: ['总装返修率(%)'],
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
xAxis: [
{
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
},
type: 'category',
data: e.map(val => val.INSPECTOR_TIME),
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
splitLine: {
show: false,
},
axisLabel: {
//
textStyle: {
color: "#000",
margin: 15,
fontSize: 0.75 * vw
},
formatter: '{value}% '
}
}
],
series: [
{
name: '总装返修率(%)',
type: 'line',
data: e.map(val => parseFloat(val.REPAIR_RATE)),
itemStyle: {
normal: {
color: '#F9A25B',
},
},
}
]
})
})
},
/** 查询工单信息列表 */
getList() {
this.isChart = false
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
@ -390,4 +734,24 @@ export default {
width: 100%;
height: 20vw;
}
.chart11 {
width: 100%;
height: 20vw;
}
.chart12 {
width: 100%;
height: 20vw;
}
.chart13 {
width: 100%;
height: 20vw;
}
.chart14 {
width: 100%;
height: 20vw;
}
</style>

Loading…
Cancel
Save