修改测试bug
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<div class="default-main device-manage" :style="{ height: pageHeight.height }">
|
||||
<!-- @node-change="nodeClick" -->
|
||||
<schemeTree @node-change="nodeClick" @node-click="nodeClick" @init="nodeClick" ref="schemeTreeRef"></schemeTree>
|
||||
<schemeTree @node-change="nodeClick" @node-click="nodeClick" @init="nodeClick" @onAdd="onAdd" @bind="bind"
|
||||
ref="schemeTreeRef"></schemeTree>
|
||||
<div class="device-manage-right" v-if="deviceData">
|
||||
<el-descriptions title="方案信息" :column="2" border>
|
||||
<template #extra>
|
||||
<!-- <template #extra>
|
||||
<el-button type="primary" icon="el-icon-Plus" @click="handleOpen(0)">新增方案</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
<el-descriptions-item label="方案名称" width="60">
|
||||
{{ deviceData.itemName }}
|
||||
</el-descriptions-item>
|
||||
@@ -83,11 +84,11 @@
|
||||
<el-descriptions-item label="监测位置" width="160">
|
||||
{{ item.location }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作" width="160">
|
||||
<!-- <el-descriptions-item label="操作" width="160">
|
||||
<el-button type="primary" icon="el-icon-Tools" @click="handleOpen(3)">
|
||||
数据绑定
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -128,7 +129,7 @@
|
||||
<el-form-item for="-" v-for="(item, index) in countData" :key="index"
|
||||
:label="item.name.includes('次数') ? item.name : item.name.includes('幅值') ? item.name.slice(0, -2) + '次数' : item.name + '谐波次数'"
|
||||
v-show="item.countOptions.length != 0">
|
||||
|
||||
|
||||
<el-select v-model="item.count" collapse-tags collapse-tags-tooltip
|
||||
placeholder="请选择谐波次数" style="width: 120px">
|
||||
<el-option v-for="vv in item.countOptions" :key="vv" :label="vv"
|
||||
@@ -171,7 +172,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getTestRecordInfo, getHistoryTrend } from '@/api/cs-device-boot/planData'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { queryStatistical } from '@/api/system-boot/csstatisticalset'
|
||||
import { TrendCharts, Plus, Platform } from '@element-plus/icons-vue'
|
||||
import { TrendCharts, Plus, Platform, } from '@element-plus/icons-vue'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
import { color, gradeColor3 } from '@/components/echarts/color'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
@@ -190,7 +191,7 @@ const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//值类型
|
||||
const pageHeight = mainHeight(20)
|
||||
const EcharHeight = ref(mainHeight(468))
|
||||
const EcharHeight = ref(mainHeight(448))
|
||||
const loading = ref(false)
|
||||
const searchForm: any = ref({})
|
||||
const typeOptions = [
|
||||
@@ -309,7 +310,13 @@ const onIndexChange = (val: any) => {
|
||||
}
|
||||
const dialogRef = ref()
|
||||
const dailogForm = ref()
|
||||
const handleOpen = (val: any) => {
|
||||
const onAdd = () => {
|
||||
handleOpen(0)
|
||||
}
|
||||
const bind = (data: any) => {
|
||||
handleOpen(3, data)
|
||||
}
|
||||
const handleOpen = (val: any, data?: any) => {
|
||||
if (!deviceData.value) {
|
||||
dialogRef.value.open(val, '')
|
||||
return
|
||||
@@ -321,18 +328,21 @@ const handleOpen = (val: any) => {
|
||||
})
|
||||
dialogRef.value.details(dailogForm.value)
|
||||
// deviceData.value.records[0].id
|
||||
let ids = ''
|
||||
|
||||
let ids: any = ''
|
||||
let name: any = ''
|
||||
//数据绑定
|
||||
if (val == 3) {
|
||||
ids = deviceData.value.records.find((item: any) => {
|
||||
return item.id == activeName.value
|
||||
})?.id
|
||||
ids = data?.id
|
||||
name = data?.name
|
||||
dialogRef.value.detailsType('table')
|
||||
} else {
|
||||
ids = ''
|
||||
name = ''
|
||||
dialogRef.value.detailsType('')
|
||||
}
|
||||
dialogRef.value.open(val, ids)
|
||||
|
||||
dialogRef.value.open(val, ids, name)
|
||||
}
|
||||
const echartsData = ref<any>(null)
|
||||
//加载echarts图表
|
||||
@@ -446,7 +456,7 @@ const init = (flag: boolean) => {
|
||||
if (item.phase == null) {
|
||||
key = item.unit
|
||||
} else {
|
||||
key = item.anotherName
|
||||
key = item.unit
|
||||
}
|
||||
if (!acc[key]) {
|
||||
acc[key] = []
|
||||
@@ -494,7 +504,7 @@ const init = (flag: boolean) => {
|
||||
// orient: 'vertical', // 垂直排列
|
||||
top: 5,
|
||||
right: 70,
|
||||
width: 400,
|
||||
width: 550,
|
||||
height: 50
|
||||
},
|
||||
grid: {
|
||||
@@ -547,7 +557,8 @@ const init = (flag: boolean) => {
|
||||
}
|
||||
if (chartsList.length > 0) {
|
||||
echartsData.value.yAxis = []
|
||||
unitList.forEach((item: any, index: any) => {
|
||||
let setList = [...new Set(unitList)];
|
||||
setList.forEach((item: any, index: any) => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
@@ -808,35 +819,35 @@ const formatCountOptions = (list: any) => {
|
||||
const flag = ref(false)
|
||||
const selectChange = (e: boolean) => {
|
||||
flag.value = e
|
||||
console.log("🚀 ~ handleChange ~ activeColName.value:", activeColName.value, flag.value)
|
||||
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(512)
|
||||
EcharHeight.value = mainHeight(492)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(468)
|
||||
EcharHeight.value = mainHeight(448)
|
||||
}
|
||||
} else {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(342)
|
||||
EcharHeight.value = mainHeight(322)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(290)
|
||||
EcharHeight.value = mainHeight(280)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handleChange = () => {
|
||||
console.log("🚀 ~ handleChange ~ activeColName.value:", activeColName.value, flag.value)
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(512)
|
||||
EcharHeight.value = mainHeight(492)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(468)
|
||||
EcharHeight.value = mainHeight(448)
|
||||
}
|
||||
} else {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(342)
|
||||
EcharHeight.value = mainHeight(322)
|
||||
} else {
|
||||
EcharHeight.value = mainHeight(290)
|
||||
EcharHeight.value = mainHeight(280)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user