| | |
| | | /* 绘制利用率仪表盘图表 */ |
| | | drawGaugeChart1(opt) { |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '利用率' |
| | | option.series[0].name = '利用率' |
| | | option.series[0].data = [this.gaugeChartData.utilizationRate] |
| | | this.gaugeChart1.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart1.hideLoading(), this.hideLoadingDelayTime) |
| | | |
| | | signageApi.getGaugeColorByTypeApi('lyl') |
| | | .then(res => { |
| | | if (res.success) { |
| | | const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) |
| | | option.series[0].axisLine.lineStyle.color = colorRange |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '利用率' |
| | | option.series[0].name = '利用率' |
| | | option.series[0].data = [this.gaugeChartData.utilizationRate] |
| | | this.gaugeChart1.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart1.hideLoading(), this.hideLoadingDelayTime) |
| | | }) |
| | | |
| | | this.gaugeChart1.getZr().on('click', params => { |
| | | // 仅有点击表盘区域才会有以下属性,topTarget表示触发事件对象,shape表示触发事件对象的图像属性,clockwise表示表盘是否以顺时针排列,默认为true |
| | |
| | | /* 绘制开动率仪表盘图表 */ |
| | | drawGaugeChart2(opt) { |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '开动率' |
| | | option.series[0].name = '开动率' |
| | | option.series[0].data = [this.gaugeChartData.startRate] |
| | | this.gaugeChart2.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart2.hideLoading(), this.hideLoadingDelayTime) |
| | | |
| | | signageApi.getGaugeColorByTypeApi('lyl') |
| | | .then(res => { |
| | | if (res.success) { |
| | | const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) |
| | | option.series[0].axisLine.lineStyle.color = colorRange |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '开动率' |
| | | option.series[0].name = '开动率' |
| | | option.series[0].data = [this.gaugeChartData.startRate] |
| | | this.gaugeChart2.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart2.hideLoading(), this.hideLoadingDelayTime) |
| | | }) |
| | | |
| | | this.gaugeChart2.getZr().on('click', params => { |
| | | // 仅有点击表盘区域才会有以下属性,topTarget表示触发事件对象,shape表示触发事件对象的图像属性,clockwise表示表盘是否以顺时针排列,默认为true |
| | |
| | | /* 绘制开机率仪表盘图表 */ |
| | | drawGaugeChart3(opt) { |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '开机率' |
| | | option.series[0].name = '开机率' |
| | | option.series[0].data = [this.gaugeChartData.openRate] |
| | | this.gaugeChart3.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart3.hideLoading(), this.hideLoadingDelayTime) |
| | | |
| | | signageApi.getGaugeColorByTypeApi('lyl') |
| | | .then(res => { |
| | | if (res.success) { |
| | | const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) |
| | | option.series[0].axisLine.lineStyle.color = colorRange |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | option.title.text = moment().subtract(1, 'days').format('M月D日') + '开机率' |
| | | option.series[0].name = '开机率' |
| | | option.series[0].data = [this.gaugeChartData.openRate] |
| | | this.gaugeChart3.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart3.hideLoading(), this.hideLoadingDelayTime) |
| | | }) |
| | | |
| | | this.gaugeChart3.getZr().on('click', params => { |
| | | // 仅有点击表盘区域才会有以下属性,topTarget表示触发事件对象,shape表示触发事件对象的图像属性,clockwise表示表盘是否以顺时针排列,默认为true |
| | |
| | | /* 绘制OEE仪表盘图表 */ |
| | | drawGaugeChart4(opt) { |
| | | const option = Object.assign({}, opt) |
| | | option.title.text = moment().subtract(1, 'months').format('M月') + `OEE` |
| | | option.series[0].name = 'OEE' |
| | | option.series[0].data = [this.gaugeChartData.overallEquipmentEfficiency] |
| | | this.gaugeChart4.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart4.hideLoading(), this.hideLoadingDelayTime) |
| | | |
| | | signageApi.getGaugeColorByTypeApi('lyl') |
| | | .then(res => { |
| | | if (res.success) { |
| | | const colorRange = res.result.map(item => item = [+item.maximumRange / 100, item.rateParameterColor]) |
| | | option.series[0].axisLine.lineStyle.color = colorRange |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | option.title.text = moment().subtract(1, 'months').format('M月') + `OEE` |
| | | option.series[0].name = 'OEE' |
| | | option.series[0].data = [this.gaugeChartData.overallEquipmentEfficiency] |
| | | this.gaugeChart4.setOption(option, true) |
| | | setTimeout(() => this.gaugeChart4.hideLoading(), this.hideLoadingDelayTime) |
| | | }) |
| | | |
| | | this.gaugeChart4.getZr().on('click', params => { |
| | | // 仅有点击表盘区域才会有以下属性,topTarget表示触发事件对象,shape表示触发事件对象的图像属性,clockwise表示表盘是否以顺时针排列,默认为true |