修改测试bug

This commit is contained in:
GGJ
2024-12-11 11:33:44 +08:00
parent 22d85dfca1
commit 26c971f3b0
10 changed files with 197 additions and 108 deletions

View File

@@ -14,16 +14,16 @@
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item >
<el-form-item>
<!-- <el-select style="min-width: 120px !important" v-model="searchForm.dataLevel">
<el-option value="Primary" label="一次值"></el-option>
<el-option value="Secondary" label="二次值"></el-option>
</el-select> -->
<el-radio-group v-model="searchForm.dataLevel" @change="init()">
<el-radio-button label="一次值" value="Primary" />
<el-radio-button label="二次值" value="Secondary" />
<el-radio-button label="一次值" value="Primary" />
<el-radio-button label="二次值" value="Secondary" />
</el-radio-group>
</el-radio-group>
</el-form-item>
<el-form-item label="统计类型">
<el-select style="min-width: 120px !important" placeholder="请选择" v-model="searchForm.valueType">
@@ -68,7 +68,7 @@ import { color } from '@/components/echarts/color'
import { ElMessage } from 'element-plus'
const dictData = useDictData()
defineOptions({
name: 'govern/device/control'
// name: 'govern/device/control'
})
const props = defineProps({
TrendList: {
@@ -86,7 +86,7 @@ const num = ref(0)
//值类型
const pageHeight = ref(mainHeight(290))
const loading = ref(true)
const searchForm:any = ref({})
const searchForm: any = ref({})
const tableHeaderRef = ref()
const typeOptions = [
{
@@ -229,7 +229,7 @@ const init = async () => {
if (item.phase == null) {
key = item.unit
} else {
key = item.unit
key = item.anotherName
}
if (!acc[key]) {
@@ -283,8 +283,17 @@ const init = async () => {
const xname = params[0].value[0]
let str = `${xname}<br>`
params.forEach((el: any, index: any) => {
let marker = ''
if (el.value[3] == 'dashed') {
for (let i = 0; i < 3; i++) {
marker += `<span style="display:inline-block;border: 2px ${el.color} solid;margin-right:5px;width:10px;height:0px;background-color:#ffffff00;"></span>`
}
} else {
marker = `<span style="display:inline-block;border: 2px ${el.color} ${el.value[3]};margin-right:5px;width:40px;height:0px;background-color:#ffffff00;"></span>`
}
let unit = el.value[2] ? el.value[2] : ''
str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1]}${unit}
str += `${marker}${el.seriesName.split('(')[0]}${el.value[1]}${unit}
<br>`
})
return str
@@ -398,7 +407,7 @@ const init = async () => {
yMethodList.push(cc.statisticalData?.toFixed(2) - 0)
}
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit])
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit, lineStyle[lineS].type])
})
// console.log(kk);
@@ -412,7 +421,7 @@ const init = async () => {
symbol: 'none',
data: seriesList,
lineStyle: lineStyle[lineS],
yAxisIndex: index
yAxisIndex: setList.indexOf(kk[0].unit)
})
})
let [min, max] = yMethod(yMethodList)
@@ -572,6 +581,7 @@ const countData: any = ref([])
//根据选择的指标处理谐波次数
const formatCountOptions = (list: any) => {
countData.value = []
if (list.length != 0) {
list.map((item: any, index: any) => {
if (!countData.value[index]) {
@@ -632,6 +642,14 @@ const onCountChange = (val: any, index: any) => {
const flag = ref(true)
const onIndexChange = (val: any) => {
num.value += 1
let pp: any = []
indexOptions.value.forEach((item: any) => {
const filteredResult = val.filter(vv => item.id == vv);
if (filteredResult.length > 0) {
pp.push(filteredResult[0]);
}
})
searchForm.value.index = pp
flag.value = true