新增测试项选择电压等级更新PT变比

This commit is contained in:
zhujiyan
2024-10-28 14:56:15 +08:00
parent c078adad5a
commit 56a11cf7d6
2 changed files with 100 additions and 41 deletions

View File

@@ -186,7 +186,7 @@ import { useDictData } from '@/stores/dictData'
import TreeTransfers from './treeTransfers.vue'
const dictData = useDictData()
const dialogVisible = ref(false)
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
const voltageLevelList: any = dictData.getBasicData('Dev_Voltage_Stand')
const volConTypeList = dictData.getBasicData('Dev_Connect')
const emit = defineEmits(['onSubmit'])
//表单数据
@@ -277,6 +277,17 @@ const changeVoltageLevel = async () => {
} else {
form1.value.capacitySscb = 9000
}
//PT变比 电压<0.48kv 1:1 电压>0.48 *1000/100
console.log(value,"999");
if (Number(value) <= 0.48) {
form1.value.pt = 1
form1.value.pt1 = 1
}
if (Number(value) > 0.48) {
form1.value.pt = value * 10
form1.value.pt1 = 1
}
}
initForm()
@@ -399,19 +410,18 @@ const detailsType = (val: any) => {
}
//回显方案、测试项操作
const details = (val: any) => {
console.log(val,"88888");
console.log(val, '88888')
if (val) {
form.value = {
describe: val.describe,
itemName: val.itemName
}
}
if(val){
}
if (val) {
form1.value = val
checkedIdList.value = form1.value.list
}
return
//修改方案回显
if (popupType.value == 1) {

View File

@@ -21,8 +21,12 @@
<p>测试项信息</p>
</div> -->
<el-tabs v-model="activeName" type="border-card" @click.self="handleClickTabs">
<el-tab-pane v-for="(item, index) in deviceData?.records" :label="item.itemName"
:name="item.id" :key="index">
<el-tab-pane
v-for="(item, index) in deviceData?.records"
:label="item.itemName"
:name="item.id"
:key="index"
>
<template #label>
<span class="custom-tabs-label">
<el-icon>
@@ -94,47 +98,85 @@
<div class="history_trend">
<div class="history_header" ref="headerRef">
<!-- <el-form :model="searchForm" class="history_select" id="history_select"> -->
<TableHeader :showSearch="false" ref="tableHeaderRef"
@selectChange="selectChange">
<TableHeader
:showSearch="false"
ref="tableHeaderRef"
@selectChange="selectChange"
>
<template v-slot:select :key="num">
<el-form-item for="-" label="统计指标">
<el-select style="min-width: 200px" collapse-tags
collapse-tags-tooltip v-model="searchForm.index"
placeholder="请选择统计指标" @change="onIndexChange($event)"
multiple :multiple-limit="3">
<el-option v-for="item in indexOptions" :key="item.id"
:label="item.name" :value="item.id"></el-option>
<el-select
style="min-width: 200px"
collapse-tags
collapse-tags-tooltip
v-model="searchForm.index"
placeholder="请选择统计指标"
@change="onIndexChange($event)"
multiple
:multiple-limit="3"
>
<el-option
v-for="item in indexOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="值类型">
<el-select style="width: 12px !important"
v-model="searchForm.dataLevel">
<el-select
style="width: 12px !important"
v-model="searchForm.dataLevel"
>
<el-option value="Primary" label="一次值"></el-option>
<el-option value="Secondary" label="二次值"></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" v-for="(item, index) in countData"
:key="index" :label="item.name + '谐波次数'" label-width="180px"
v-show="item.countOptions.length != 0">
<el-form-item
for="-"
v-for="(item, index) in countData"
:key="index"
:label="item.name + '谐波次数'"
label-width="180px"
v-show="item.countOptions.length != 0"
>
<!-- multiple -->
<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" :value="vv"></el-option>
<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"
:value="vv"
></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="统计类型" label-width="80px">
<el-select style="width: 120px" v-model="searchForm.type"
placeholder="请选择值类型">
<el-option v-for="item in typeOptions" :key="item.id"
:label="item.name" :value="item.id"></el-option>
<el-select
style="width: 120px"
v-model="searchForm.type"
placeholder="请选择值类型"
>
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template v-slot:operation>
<el-button type="primary" icon="el-icon-Download"
@click="handleExport">
<el-button
type="primary"
icon="el-icon-Download"
@click="handleExport"
>
数据导出
</el-button>
<el-button type="primary" icon="el-icon-Search" @click="init(true)">
@@ -146,10 +188,19 @@
<div class="history_title">
<p>{{ chartTitle }}</p>
</div>
<div class="history_chart" v-loading="loading" :style="EcharHeight"
:key="EcharHeight.height" ref="chartRef">
<MyEchart ref="historyChart" v-if="echartsData" :isExport="true"
:options="echartsData" />
<div
class="history_chart"
v-loading="loading"
:style="EcharHeight"
:key="EcharHeight.height"
ref="chartRef"
>
<MyEchart
ref="historyChart"
v-if="echartsData"
:isExport="true"
:options="echartsData"
/>
</div>
</div>
</div>
@@ -306,12 +357,10 @@ const nodeClick = async (e: anyObj) => {
}
}
const onIndexChange = (val: any) => {
num.value += 1
if (val.length == 0) {
searchForm.value.index = [indexOptions.value[0].id]
}
}
const dialogRef = ref()
const dailogForm = ref()
@@ -468,8 +517,9 @@ const init = (flag: boolean) => {
const xname = params[0].value[0]
let str = `${xname}<br>`
params.forEach((el: any, index: any) => {
str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1] ? el.value[1] + ' ' + el.value[2] : '-'
}<br>`
str += `${el.marker}${el.seriesName.split('(')[0]}${
el.value[1] ? el.value[1] + ' ' + el.value[2] : '-'
}<br>`
})
return str
}
@@ -713,13 +763,12 @@ const formatCountOptions = (list: any) => {
}
})
})
} else {
countData.value = []
}
setTimeout(() => {
tableHeaderRef.value[activeName.value]?.computedSearchRow()
tableHeaderRef.value && tableHeaderRef.value[activeName.value]?.computedSearchRow()
}, 100)
}
const flag = ref(false)