新增测试项选择电压等级更新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' import TreeTransfers from './treeTransfers.vue'
const dictData = useDictData() const dictData = useDictData()
const dialogVisible = ref(false) 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 volConTypeList = dictData.getBasicData('Dev_Connect')
const emit = defineEmits(['onSubmit']) const emit = defineEmits(['onSubmit'])
//表单数据 //表单数据
@@ -277,6 +277,17 @@ const changeVoltageLevel = async () => {
} else { } else {
form1.value.capacitySscb = 9000 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() initForm()
@@ -399,19 +410,18 @@ const detailsType = (val: any) => {
} }
//回显方案、测试项操作 //回显方案、测试项操作
const details = (val: any) => { const details = (val: any) => {
console.log(val,"88888"); console.log(val, '88888')
if (val) { if (val) {
form.value = { form.value = {
describe: val.describe, describe: val.describe,
itemName: val.itemName itemName: val.itemName
} }
} }
if(val){ if (val) {
form1.value = val form1.value = val
checkedIdList.value = form1.value.list checkedIdList.value = form1.value.list
} }
return return
//修改方案回显 //修改方案回显
if (popupType.value == 1) { if (popupType.value == 1) {

View File

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