'改bug'
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
/*
|
||||
* @Author: lb
|
||||
* @Date: 2022-07-24 13:30:00
|
||||
* @LastEditTime: 2022-07-28 09:30:00
|
||||
* @LastEditors: lb
|
||||
* @LastEditTime: 2023-02-02 15:02:52
|
||||
* @LastEditors: fzq
|
||||
* @Description: 设备效率分析-echarts图
|
||||
*/
|
||||
-->
|
||||
<template>
|
||||
<div class="graph-area">
|
||||
<span class="close-btn" @click="close">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: 100%;" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="height: 100%; width: 100%" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</span>
|
||||
@@ -21,12 +21,12 @@
|
||||
<el-radio-button :label="$t('eq.time')" />
|
||||
</el-radio-group>
|
||||
|
||||
<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
|
||||
<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px" size="small" @change="handleRadioGroupChanged">
|
||||
<el-radio-button v-for="(opt, index) in searchRadioOptions" :key="index" :label="opt" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<div id="trend-graph" class="real-graph" style="width: 100%; height: 500px;" />
|
||||
<div id="trend-graph" class="real-graph" style="width: 100%; height: 500px" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -131,6 +131,7 @@ export default {
|
||||
this.config.setTitle(this.injectData.equipmentName + i18n.t('eq.timetrend'))
|
||||
await this.getList()
|
||||
this.setLegend()
|
||||
// console.log('this.dataType',this.dataType);
|
||||
},
|
||||
|
||||
init(data) {
|
||||
@@ -181,14 +182,14 @@ export default {
|
||||
getList() {
|
||||
const params = this.makeQuerys()
|
||||
// 发起请求
|
||||
return this.getOEE(params).then(datalist => {
|
||||
return this.getOEE(params).then((datalist) => {
|
||||
console.log('getOEE res:', datalist)
|
||||
this.timeList.splice(0)
|
||||
this.rateList.splice(0)
|
||||
this.xAxis.splice(0)
|
||||
if (datalist.length) {
|
||||
// 分流
|
||||
datalist.map(item => {
|
||||
datalist.map((item) => {
|
||||
const time = moment(item.time)
|
||||
if (this.searchType === i18n.t('eq.monthgap')) {
|
||||
this.xAxis.push(`${time.year()}${i18n.t('eq.year')}${time.month() + 1}${i18n.t('eq.month')}`)
|
||||
@@ -241,7 +242,7 @@ export default {
|
||||
const workTimeList = []
|
||||
const stopTimeList = []
|
||||
const downTimeList = []
|
||||
this.timeList.map(item => {
|
||||
this.timeList.map((item) => {
|
||||
workTimeList.push(item.workTime)
|
||||
stopTimeList.push(item.stopTime)
|
||||
downTimeList.push(item.downTime)
|
||||
@@ -260,7 +261,7 @@ export default {
|
||||
const timeEfficiencyList = []
|
||||
const oeeList = []
|
||||
const teepList = []
|
||||
this.rateList.map(item => {
|
||||
this.rateList.map((item) => {
|
||||
workRateList.push(item.workRate)
|
||||
stopRateList.push(item.stopRate)
|
||||
downRateList.push(item.downRate)
|
||||
@@ -283,6 +284,18 @@ export default {
|
||||
|
||||
// 重新绘制图形
|
||||
renderGraph() {
|
||||
if (this.dataType === i18n.t('eq.time')) {
|
||||
this.config.yAxis = {
|
||||
type: 'value',
|
||||
name: i18n.t('yAxisTime')
|
||||
}
|
||||
} else {
|
||||
this.config.yAxis = {
|
||||
type: 'value',
|
||||
name: i18n.t('yAxisRate')
|
||||
}
|
||||
}
|
||||
console.log('this.dataType', this.dataType)
|
||||
console.log('latest config: ', JSON.stringify(this.config))
|
||||
this.$nextTick(() => {
|
||||
// this.chart.setOption(this.config)
|
||||
|
||||
Reference in New Issue
Block a user