修改事件展示查询问题
This commit is contained in:
@@ -391,18 +391,24 @@ const next = () => {
|
||||
if (year >= presentY && !props.nextFlag) {
|
||||
startTime = presentY + '-01-01'
|
||||
if (presentM < 10) {
|
||||
|
||||
if (presentD < 10) {
|
||||
endTime = presentY + '-0' + presentM + '-0' + presentD
|
||||
} else {
|
||||
endTime = presentY + '-0' + presentM + '-' + presentD
|
||||
}
|
||||
} else {
|
||||
endTime = presentY + '-' + presentM + '-' + presentD
|
||||
if (presentD < 10) {
|
||||
endTime = presentY + '-' + presentM + '-0' + presentD
|
||||
} else {
|
||||
endTime = presentY + '-' + presentM + '-' + presentD
|
||||
}
|
||||
}
|
||||
} else {
|
||||
startTime = year + '-01-01'
|
||||
endTime = year + '-12-31'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
timeValue.value = [startTime, endTime]
|
||||
|
||||
@@ -152,7 +152,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.el-tabs__content {
|
||||
height: calc(100% - 40px);
|
||||
.el-tab-pane {
|
||||
@@ -214,11 +213,16 @@
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
//tabs 添加icon样式
|
||||
.custom-tabs-label{
|
||||
.custom-tabs-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.el-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-pagination__sizes {
|
||||
.el-select {
|
||||
min-width: 128px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { install$2 } from 'echarts/types/dist/shared'
|
||||
|
||||
export const yMethod = (arr: any) => {
|
||||
console.log('🚀 ~ yMethod ~ arr:', arr)
|
||||
let interval = 0
|
||||
let maxValue = 0
|
||||
let minValue = 0
|
||||
@@ -10,33 +9,6 @@ export const yMethod = (arr: any) => {
|
||||
maxValue = Math.max(...arr)
|
||||
minValue = Math.min(...arr)
|
||||
|
||||
console.log('🚀 ~ yMethod ~ minValue:', minValue,maxValue)
|
||||
|
||||
// interval = (maxValue - minValue) / 4
|
||||
// if (maxValue > 1000) {
|
||||
// interval = (Math.ceil(maxValue / 100) * 100 - Math.ceil(minValue / 100) * 100) / 4
|
||||
// min = Math.floor((minValue - interval / 2) / 100) * 100
|
||||
// max = Math.ceil((maxValue + interval / 2) / 100) * 100
|
||||
// min >= 0 ? 0 : ''
|
||||
// } else {
|
||||
// min = Math.floor(minValue - interval / 2)
|
||||
// max = Math.ceil(maxValue + interval / 2)
|
||||
// console.log('🚀 ~ yMethod ~ minValue:', minValue)
|
||||
|
||||
// if (minValue >= 0 && minValue < 10) {
|
||||
// min = 0
|
||||
// }
|
||||
// if (maxValue < 1 && maxValue >= 0) {
|
||||
// max = 1
|
||||
// }
|
||||
// interval = (max - min) / 4
|
||||
// }
|
||||
|
||||
// if (interval < 1 && interval > -1) {
|
||||
// interval = 1
|
||||
// }
|
||||
// console.log("🚀 ~ yMethod ~ minValue:", minValue)
|
||||
|
||||
if (maxValue > 1000) {
|
||||
max = Math.ceil(maxValue / 100) * 100
|
||||
min = (Math.floor(minValue / 100) - 1) * 100
|
||||
@@ -44,12 +16,12 @@ export const yMethod = (arr: any) => {
|
||||
max = Math.ceil(maxValue / 10) * 10
|
||||
min = Math.floor(minValue / 10) * 10
|
||||
}
|
||||
if (max > 0 && max < 1) {
|
||||
|
||||
if (maxValue > 0 && maxValue < 1) {
|
||||
max = 1
|
||||
}
|
||||
// if (min < 0 && min < -1) {
|
||||
// min = -1
|
||||
// }
|
||||
} else if (max == 0 && minValue > -1 && minValue < 0) {
|
||||
min = -1
|
||||
}
|
||||
|
||||
return [min, max, interval]
|
||||
}
|
||||
|
||||
@@ -2,25 +2,15 @@
|
||||
<TableHeader datePicker ref="refheader">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
<el-cascader
|
||||
v-model="tableStore.table.params.cascader"
|
||||
placeholder="请选择数据来源"
|
||||
@change="sourceChange"
|
||||
:options="deviceTreeOptions"
|
||||
:show-all-levels="false"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-cascader v-model="tableStore.table.params.cascader" placeholder="请选择数据来源" @change="sourceChange"
|
||||
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="级别">
|
||||
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="item in rankOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
<el-option v-for="item in rankOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -70,7 +60,7 @@ const rankOptions = ref([
|
||||
])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
@@ -82,9 +72,7 @@ const tableStore = new TableStore({
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (!tableStore.table.params.deviceId) {
|
||||
delete tableStore.table.params.deviceId
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -102,6 +90,7 @@ tableStore.table.params.eventIds = []
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.target = []
|
||||
tableStore.table.params.userId = ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
|
||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
@@ -110,21 +99,24 @@ deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
}
|
||||
})
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '治理设备'
|
||||
})
|
||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '便携式设备'
|
||||
})
|
||||
//便携式设备特殊处理
|
||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
tableStore.table.params.deviceId = e[1]
|
||||
}
|
||||
//治理设备
|
||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
if (e) {
|
||||
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||
return item.id == e[0]
|
||||
})[0].name
|
||||
|
||||
if (name == '便携式设备') {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.deviceId = e[1] || ''
|
||||
} else {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +126,6 @@ onMounted(() => {
|
||||
setTimeout(() => {
|
||||
// tableStore.table.height = mainHeight(200).height as any
|
||||
}, 0)
|
||||
const addMenu = () => {}
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<style></style>
|
||||
|
||||
@@ -2,15 +2,9 @@
|
||||
<TableHeader datePicker ref="refheader">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
<el-cascader
|
||||
v-model="tableStore.table.params.cascader"
|
||||
placeholder="请选择数据来源"
|
||||
@change="sourceChange"
|
||||
:options="deviceTreeOptions"
|
||||
:show-all-levels="false"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-cascader v-model="tableStore.table.params.cascader" placeholder="请选择数据来源" @change="sourceChange"
|
||||
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="级别">
|
||||
@@ -70,7 +64,7 @@ const rankOptions = ref([
|
||||
])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
publicHeight: 65,
|
||||
column: [
|
||||
@@ -81,9 +75,7 @@ const tableStore = new TableStore({
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (!tableStore.table.params.deviceId) {
|
||||
delete tableStore.table.params.deviceId
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -92,6 +84,7 @@ provide('tableStore', tableStore)
|
||||
// "type": "",
|
||||
// "userId": ""
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
tableStore.table.params.type = 1
|
||||
@@ -109,22 +102,26 @@ deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
}
|
||||
})
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '治理设备'
|
||||
})
|
||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '便携式设备'
|
||||
})
|
||||
//便携式设备特殊处理
|
||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
tableStore.table.params.deviceId = e[1]
|
||||
}
|
||||
//治理设备
|
||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
if (e) {
|
||||
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||
return item.id == e[0]
|
||||
})[0].name
|
||||
|
||||
if (name == '便携式设备') {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.deviceId = e[1] || ''
|
||||
} else {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
@@ -132,6 +129,6 @@ onMounted(() => {
|
||||
setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(200).height as any
|
||||
}, 0)
|
||||
const addMenu = () => {}
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<style></style>
|
||||
|
||||
@@ -3,15 +3,9 @@
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
<el-cascader
|
||||
placeholder="请选择数据来源"
|
||||
@change="sourceChange"
|
||||
v-model="tableStore.table.params.cascader"
|
||||
:options="deviceTreeOptions"
|
||||
:show-all-levels="false"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-cascader placeholder="请选择数据来源" @change="sourceChange" v-model="tableStore.table.params.cascader"
|
||||
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="级别">
|
||||
@@ -31,54 +25,28 @@
|
||||
<div v-if="view2" style="display: flex">
|
||||
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
v-if="view2"
|
||||
@click="backbxlb"
|
||||
type="primary"
|
||||
class="el-icon-refresh-right"
|
||||
icon="el-icon-Back"
|
||||
style="float: right"
|
||||
>
|
||||
<el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right"
|
||||
icon="el-icon-Back" style="float: right">
|
||||
返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick">
|
||||
<el-tab-pane
|
||||
label="瞬时波形"
|
||||
name="ssbx"
|
||||
class="boxbx pt10 pb10"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
||||
>
|
||||
<shushiboxi
|
||||
v-if="bxactiveName == 'ssbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></shushiboxi>
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
||||
</shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="RMS波形"
|
||||
class="boxbx pt10 pb10"
|
||||
name="rmsbx"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
||||
>
|
||||
<rmsboxi
|
||||
v-if="bxactiveName == 'rmsbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></rmsboxi>
|
||||
<el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
||||
@@ -188,9 +156,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (!tableStore.table.params.deviceId) {
|
||||
delete tableStore.table.params.deviceId
|
||||
}
|
||||
// if (!tableStore.table.params.deviceId) {
|
||||
// delete tableStore.table.params.deviceId
|
||||
// }
|
||||
},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
@@ -206,6 +174,7 @@ provide('tableStore', tableStore)
|
||||
// "userId": ""
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
tableStore.table.params.type = 0
|
||||
tableStore.table.params.eventIds = []
|
||||
@@ -215,29 +184,52 @@ tableStore.table.params.userId = ''
|
||||
tableStore.table.params.cascader = ''
|
||||
// tableStore.table.params.level=''
|
||||
|
||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
||||
const deviceTreeOptions: any = ref<any>(props.deviceTree)
|
||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
if (item.children.length == 0) {
|
||||
deviceTreeOptions.value.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '治理设备'
|
||||
})
|
||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '便携式设备'
|
||||
})
|
||||
//便携式设备特殊处理
|
||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
tableStore.table.params.deviceId = e[1]
|
||||
}
|
||||
//治理设备
|
||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
if (e) {
|
||||
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||
return item.id == e[0]
|
||||
})[0].name
|
||||
|
||||
if (name == '便携式设备') {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.deviceId = e[1] || ''
|
||||
} else {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// tableStore.table.params.engineeringid = e[1] || ''
|
||||
// tableStore.table.params.projectId = e[2] || ''
|
||||
// const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
// return item.name == '治理设备'
|
||||
// })
|
||||
// const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
// return item.name == '便携式设备'
|
||||
// })
|
||||
|
||||
// console.log("🚀 ~ zlIndex ~ zlIndex:", zlIndex,bxsIndex)
|
||||
|
||||
// //便携式设备特殊处理
|
||||
// if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
// tableStore.table.params.deviceId = e[1]
|
||||
// }
|
||||
// //治理设备
|
||||
// if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
// tableStore.table.params.deviceId = e[2] || ''
|
||||
// }
|
||||
}
|
||||
const getboxin = async (row: any) => {
|
||||
console.log('🚀 ~ getboxin ~ row:', row)
|
||||
@@ -279,6 +271,6 @@ setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(200).height as any
|
||||
}, 0)
|
||||
|
||||
const addMenu = () => {}
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -76,7 +76,7 @@ const options = ref([
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '事件描述', field: 'evtParamPosition' },
|
||||
|
||||
@@ -100,7 +100,7 @@ onMounted(() => {
|
||||
const init = () => {
|
||||
echartsData.value = null
|
||||
loading.value = true
|
||||
console.log(props.detail.children, 'props.detail.children')
|
||||
// console.log(props.detail.children, 'props.detail.children')
|
||||
let statisticalParams = props.detail.children
|
||||
statisticalParams[0].statMethod = form.statMethod
|
||||
getDeviceDataTrend({
|
||||
|
||||
@@ -36,6 +36,7 @@ import { queryStatistical } from '@/api/system-boot/csstatisticalset'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getDeviceHarmonicSpectrumData, getRealTimeTableList } from '@/api/cs-device-boot/EquipmentDelivery.ts'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
const searchForm: any = ref({})
|
||||
searchForm.value = {
|
||||
index: []
|
||||
@@ -75,7 +76,7 @@ const init = () => {
|
||||
})
|
||||
//查询谐波频谱
|
||||
getDeviceHarmonicSpectrumData(params.value).then(res => {
|
||||
res.data.length > 3 ? height = mainHeight(275, 3 ).height : height = mainHeight(275, res.data.length ).height
|
||||
res.data.length > 3 ? height = mainHeight(275, 3).height : height = mainHeight(275, res.data.length).height
|
||||
chartsList.value = res.data
|
||||
//数据根据相别组装成新数组
|
||||
chartsList.value.map((item: any) => {
|
||||
@@ -154,27 +155,29 @@ const init = () => {
|
||||
},
|
||||
boundaryGap: false
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name:
|
||||
item.thdDataVOS.length != 0 &&
|
||||
item.thdDataVOS[0].list &&
|
||||
item.thdDataVOS[0].list[0].unit,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#000'
|
||||
}
|
||||
yAxis:
|
||||
{
|
||||
type: 'value',
|
||||
name:
|
||||
item.thdDataVOS.length != 0 &&
|
||||
item.thdDataVOS[0].list &&
|
||||
item.thdDataVOS[0].list[0].unit,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: true
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#000'
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
splitNumber: 5,
|
||||
minInterval: 1,
|
||||
}
|
||||
,
|
||||
series: []
|
||||
}
|
||||
}
|
||||
@@ -185,7 +188,7 @@ const init = () => {
|
||||
item.thdDataVOS[0].list.map((ss: any) => {
|
||||
return ss.frequency + '次'
|
||||
})
|
||||
|
||||
let aar: any = []
|
||||
//y轴数据
|
||||
item.thdDataVOS.map((vv: any) => {
|
||||
item.echartsData.options.series.push({
|
||||
@@ -199,6 +202,7 @@ const init = () => {
|
||||
// }e
|
||||
},
|
||||
data: vv.list.map((vvs: any) => {
|
||||
aar.push(vvs.statisticalData)
|
||||
return vvs.statisticalData
|
||||
}),
|
||||
smooth: true, // 这里设置平滑曲线
|
||||
@@ -207,6 +211,10 @@ const init = () => {
|
||||
//legend数据
|
||||
item.echartsData.options.legend.data.push(vv.phase + '相')
|
||||
})
|
||||
let [min, max] = yMethod(aar)
|
||||
item.echartsData.options.yAxis.max = max
|
||||
item.echartsData.options.yAxis.min = min
|
||||
|
||||
})
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user