bugFixed
This commit is contained in:
parent
5b7dacc425
commit
dcef9c818f
@ -121,6 +121,7 @@ import { DArrowRight, Plus, Delete, Close } from '@element-plus/icons-vue'
|
|||||||
import MeasurementPage from './analysisAttributes.vue'
|
import MeasurementPage from './analysisAttributes.vue'
|
||||||
import { getModelAttributeListReq } from '/@/api/backend/deviceModel/request'
|
import { getModelAttributeListReq } from '/@/api/backend/deviceModel/request'
|
||||||
import { getCutDecimalsValue } from '/@/views/backend/equipment/airBlower/utils'
|
import { getCutDecimalsValue } from '/@/views/backend/equipment/airBlower/utils'
|
||||||
|
import { getParamList } from '/@/api/backend/SystemParam/request'
|
||||||
|
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@ -299,7 +300,17 @@ const statAnalysisSelectOptions: any = reactive({
|
|||||||
const customName = reactive([statAnalysisSelect.attributes + '1'])
|
const customName = reactive([statAnalysisSelect.attributes + '1'])
|
||||||
const chart: any = ref(null)
|
const chart: any = ref(null)
|
||||||
|
|
||||||
|
const curveColors = ref([])
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getParamList().then((res: any) => {
|
||||||
|
if (res.code == 200 && res.data) {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
if (item.paramName == 'curveColor') {
|
||||||
|
curveColors.value = item.paramValueJson
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
if (chartContainer.value) {
|
if (chartContainer.value) {
|
||||||
chart.value = markRaw(echarts.init(chartContainer.value))
|
chart.value = markRaw(echarts.init(chartContainer.value))
|
||||||
}
|
}
|
||||||
@ -576,6 +587,9 @@ const historyDataReq = (promises: any) => {
|
|||||||
data: yData.map((value: any) => ({
|
data: yData.map((value: any) => ({
|
||||||
value: getCutDecimalsValue(value, 2),
|
value: getCutDecimalsValue(value, 2),
|
||||||
})),
|
})),
|
||||||
|
itemStyle: {
|
||||||
|
color: curveColors.value[index % curveColors.value.length],
|
||||||
|
},
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbolSize: 5,
|
symbolSize: 5,
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
|
@ -187,7 +187,7 @@ import { DArrowRight, Plus, Crop, Notebook, Delete, Close } from '@element-plus/
|
|||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import { getModelAttributeListReq } from '/@/api/backend/deviceModel/request'
|
import { getModelAttributeListReq } from '/@/api/backend/deviceModel/request'
|
||||||
import { getCutDecimalsValue } from '/@/views/backend/equipment/airBlower/utils'
|
import { getCutDecimalsValue } from '/@/views/backend/equipment/airBlower/utils'
|
||||||
import { stat } from 'fs'
|
import { getParamList } from '/@/api/backend/SystemParam/request'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const highSpeed = ref(false)
|
const highSpeed = ref(false)
|
||||||
const statAnalysisInterval = ref('1h')
|
const statAnalysisInterval = ref('1h')
|
||||||
@ -270,13 +270,21 @@ const option: any = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
const curveColors = ref([])
|
||||||
const chart: any = ref(null)
|
const chart: any = ref(null)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (chartContainer.value) {
|
if (chartContainer.value) {
|
||||||
chart.value = markRaw(echarts.init(chartContainer.value))
|
chart.value = markRaw(echarts.init(chartContainer.value))
|
||||||
}
|
}
|
||||||
|
getParamList().then((res: any) => {
|
||||||
|
if (res.code == 200 && res.data) {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
if (item.paramName == 'curveColor') {
|
||||||
|
curveColors.value = item.paramValueJson
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
queryWindTurbines().then((res) => {
|
queryWindTurbines().then((res) => {
|
||||||
submitParams.selectedLeft = [tableDataLeft.value[0]]
|
submitParams.selectedLeft = [tableDataLeft.value[0]]
|
||||||
getCompleteData().then((attrRes: any) => {
|
getCompleteData().then((attrRes: any) => {
|
||||||
@ -578,13 +586,13 @@ const handleRes = (res: any, selectAllDevices: any) => {
|
|||||||
lowSpeedExoprtData.value = []
|
lowSpeedExoprtData.value = []
|
||||||
const deviceIdKeys = Object.keys(resData)
|
const deviceIdKeys = Object.keys(resData)
|
||||||
if (deviceIdKeys.length) {
|
if (deviceIdKeys.length) {
|
||||||
selectAllDevices.forEach((item: any) => {
|
selectAllDevices.forEach((item: any, selectAllDevicesIndex: number) => {
|
||||||
if (!resData[item.irn]) {
|
if (!resData[item.irn]) {
|
||||||
ElMessage.info(`${item.name}没有数据`)
|
ElMessage.info(`${item.name}没有数据`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const deviceName = item.name
|
const deviceName = item.name
|
||||||
Object.keys(resData[item.irn]).forEach((val) => {
|
Object.keys(resData[item.irn]).forEach((val, irnIndex: number) => {
|
||||||
const attRow = submitParams.multipleSelection.filter((value: any) => value.attributeCode === val)
|
const attRow = submitParams.multipleSelection.filter((value: any) => value.attributeCode === val)
|
||||||
const attName = attRow[0]['attributeName']
|
const attName = attRow[0]['attributeName']
|
||||||
const unit = attRow[0]['unit']
|
const unit = attRow[0]['unit']
|
||||||
@ -627,6 +635,8 @@ const handleRes = (res: any, selectAllDevices: any) => {
|
|||||||
ElMessage.info(`${deviceName + attName}数据为空`)
|
ElMessage.info(`${deviceName + attName}数据为空`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log(selectAllDevicesIndex)
|
||||||
|
console.log(irnIndex)
|
||||||
const seriesData = {
|
const seriesData = {
|
||||||
name: deviceName + attName,
|
name: deviceName + attName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
@ -634,6 +644,9 @@ const handleRes = (res: any, selectAllDevices: any) => {
|
|||||||
value: getCutDecimalsValue(value, 2),
|
value: getCutDecimalsValue(value, 2),
|
||||||
unit: unit, // 将单位添加到每个数据点
|
unit: unit, // 将单位添加到每个数据点
|
||||||
})),
|
})),
|
||||||
|
itemStyle: {
|
||||||
|
color: curveColors.value[((selectAllDevicesIndex + 1) * (irnIndex + 1) - 1) % curveColors.value.length],
|
||||||
|
},
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbolSize: 5,
|
symbolSize: 5,
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
|
Loading…
Reference in New Issue
Block a user