From 5afadfb1cea4d5cc35d17991fa2d7287a31ee338 Mon Sep 17 00:00:00 2001 From: Fanzink <460995166@qq.com> Date: Fri, 24 Mar 2023 17:23:26 +0530 Subject: [PATCH] =?UTF-8?q?'=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B92=E6=AC=A1'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitoring/equProductTimesequence.vue | 11 +++--- .../modules/monitoring/equipmentException.vue | 8 ++--- .../monitoring/equipmentTimesequence.vue | 8 ++--- .../modules/monitoring/productAnalysis.vue | 34 +++++++++++++++---- .../modules/monitoring/productQuality.vue | 15 +++++++- 5 files changed, 55 insertions(+), 21 deletions(-) diff --git a/src/views/modules/monitoring/equProductTimesequence.vue b/src/views/modules/monitoring/equProductTimesequence.vue index 54e7329..b469ed7 100644 --- a/src/views/modules/monitoring/equProductTimesequence.vue +++ b/src/views/modules/monitoring/equProductTimesequence.vue @@ -358,7 +358,8 @@ export default { dialogEqList: [], count: 0, // 产线默认产线1 - lineIds: ['1'], + // lineIds: ['1'], + lineIds: [], sectionIds: [], lineList: [], // tableConfigStatic, @@ -428,10 +429,10 @@ export default { if (data && data.code === 0) { this.lineList = data.data // console.log('产线数组', this.lineList) - /** set default */ - if (this.lineList.length) { - this.lineIds = [this.lineList[this.lineList.length - 1].id] - } + /** set default 默认*/ + // if (this.lineList.length) { + // this.lineIds = [this.lineList[this.lineList.length - 1].id] + // } } else { this.lineList = [] } diff --git a/src/views/modules/monitoring/equipmentException.vue b/src/views/modules/monitoring/equipmentException.vue index 5df0c25..9a4056d 100644 --- a/src/views/modules/monitoring/equipmentException.vue +++ b/src/views/modules/monitoring/equipmentException.vue @@ -135,10 +135,10 @@ export default { }).then(({ data: res }) => { if (res && res.code === 0) { this.productLineList = res.data - /** set default */ - if (this.productLineList.length) { - this.dataForm.productlines = [this.productLineList[0].id] - } + /** set default 默认*/ + // if (this.productLineList.length) { + // this.dataForm.productlines = [this.productLineList[0].id] + // } } else { this.productLineList = [] this.dataForm.productlines = [] diff --git a/src/views/modules/monitoring/equipmentTimesequence.vue b/src/views/modules/monitoring/equipmentTimesequence.vue index a2a715f..d525b7f 100644 --- a/src/views/modules/monitoring/equipmentTimesequence.vue +++ b/src/views/modules/monitoring/equipmentTimesequence.vue @@ -270,10 +270,10 @@ export default { }).then(({ data: res }) => { if (res && res.code === 0) { this.productLineList = res.data - /** set default */ - if (this.productLineList.length) { - this.dataForm.productlines = this.productLineList[0].id - } + /** set default 默认*/ + // if (this.productLineList.length) { + // this.dataForm.productlines = this.productLineList[0].id + // } } else { this.productLineList = [] } diff --git a/src/views/modules/monitoring/productAnalysis.vue b/src/views/modules/monitoring/productAnalysis.vue index 0ccdb68..1f2a077 100644 --- a/src/views/modules/monitoring/productAnalysis.vue +++ b/src/views/modules/monitoring/productAnalysis.vue @@ -167,7 +167,9 @@ const FakeChart = { show: true }, /** end */ - data: [this.$t('eq.line1'), this.$t('eq.line2'), this.$t('eq.line3'), this.$t('eq.line4')] + data: [] + // selected:{'产线1':(this.echartsData1 === [] ? false : true) , 'Line 1':(this.echartsData1 === [] ? false : true) , + // '产线2':(this.echartsData2 === [] ? false : true) , 'Line 2':(this.echartsData2 === [] ? false : true) } }, xAxis: { type: 'category', @@ -268,8 +270,8 @@ const FakeChart = { typeList: { handler: function (val, oldVal) { if (val && val !== oldVal) { - this.defaultOpts.legend.data.push(...val) - // this.defaultOpts.legend.data = val + // this.defaultOpts.legend.data.push(...val) + this.defaultOpts.legend.data = val } }, immediate: true @@ -423,10 +425,10 @@ export default { if (data && data.code === 0) { this.lineList = data.data // console.log('产线数组', this.lineList) - /** set default */ - if (this.lineList.length) { - this.lineIds = [this.lineList[this.lineList.length - 1].id] - } + /** set default 默认 */ + // if (this.lineList.length) { + // this.lineIds = [this.lineList[this.lineList.length - 1].id] + // } } else { this.lineList = [] } @@ -641,6 +643,24 @@ export default { // { name: '11', type: 'bar', data: [/**产线1*/ 2, /**产线2*/ 3] }, // { name: '222', type: 'bar', data: [1, 2, 3] } // ] + // 没有数据的产线legend隐藏 + if (this.echartsData1.length !== 0) { + this.echartCheckTypes.push(this.$t('eq.line1')) + } + if (this.echartsData2.length !== 0) { + this.echartCheckTypes.push(this.$t('eq.line2')) + } + if (this.echartsData3.length !== 0) { + this.echartCheckTypes.push(this.$t('eq.line3')) + } + if (this.echartsData4.length !== 0) { + this.echartCheckTypes.push(this.$t('eq.line4')) + } + // console.log('this.echartCheckTypes', this.echartCheckTypes) + // console.log(this.echartsData1.length) + // console.log(this.echartsData2.length) + // console.log(this.echartsData3) + // console.log(this.echartsData4) }, fetchList(startTime, endTime, lineIds) { diff --git a/src/views/modules/monitoring/productQuality.vue b/src/views/modules/monitoring/productQuality.vue index 9fd5b5d..af19d3e 100644 --- a/src/views/modules/monitoring/productQuality.vue +++ b/src/views/modules/monitoring/productQuality.vue @@ -151,7 +151,7 @@ const FakeChart = { left: '5%', right: '12%', top: '20%', - bottom: '10%' + bottom: '22%' }, title: { text: i18n.t('eq.productQuality') @@ -318,6 +318,19 @@ const FakeChart = { } } ], + dataZoom: [ + { + type: 'slider', + start: 0, + end: 100, + // 最大的放大是图形的2% + // maxSpan: 2 + }, + { + start: 0, + end: 10 + } + ], series: [ // dynamic { -- 2.45.2